@kong-ui-public/entities-upstreams-targets 1.1.21 → 1.1.22-pr.790.b9b7a5bf.0
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.
|
@@ -907,7 +907,7 @@ const ne = {
|
|
|
907
907
|
* Value should NOT contain config.apiBaseUrl, as we auto include this. Typically this will just an entry from
|
|
908
908
|
* the endpoints file.
|
|
909
909
|
*
|
|
910
|
-
* ex. `/api/
|
|
910
|
+
* ex. `/api/control_planes/{controlPlaneId}/snis/{id}`
|
|
911
911
|
*/
|
|
912
912
|
fetchUrl: {
|
|
913
913
|
type: String,
|
|
@@ -1150,7 +1150,7 @@ const ne = {
|
|
|
1150
1150
|
]), 1024);
|
|
1151
1151
|
};
|
|
1152
1152
|
}
|
|
1153
|
-
}), rs = /* @__PURE__ */ pe(ss, [["__scopeId", "data-v-
|
|
1153
|
+
}), rs = /* @__PURE__ */ pe(ss, [["__scopeId", "data-v-8ede8e2e"]]), os = ["onReset", "onSubmit"], is = {
|
|
1154
1154
|
class: "form-actions",
|
|
1155
1155
|
"data-testid": "form-actions"
|
|
1156
1156
|
}, ns = /* @__PURE__ */ ae({
|
|
@@ -1174,7 +1174,7 @@ const ne = {
|
|
|
1174
1174
|
* the endpoints file.
|
|
1175
1175
|
* Required if `editId` is specified.
|
|
1176
1176
|
*
|
|
1177
|
-
* ex. `/api/
|
|
1177
|
+
* ex. `/api/control_planes/{controlPlaneId}/snis/{id}`
|
|
1178
1178
|
*/
|
|
1179
1179
|
fetchUrl: {
|
|
1180
1180
|
type: String,
|
|
@@ -1295,7 +1295,7 @@ const ne = {
|
|
|
1295
1295
|
});
|
|
1296
1296
|
};
|
|
1297
1297
|
}
|
|
1298
|
-
}), Aa = /* @__PURE__ */ pe(ns, [["__scopeId", "data-v-
|
|
1298
|
+
}), Aa = /* @__PURE__ */ pe(ns, [["__scopeId", "data-v-bffcae34"]]), us = { key: 0 }, cs = /* @__PURE__ */ ae({
|
|
1299
1299
|
__name: "EntityBaseTableCell",
|
|
1300
1300
|
props: {
|
|
1301
1301
|
keyName: {
|
|
@@ -2873,7 +2873,7 @@ const me = {
|
|
|
2873
2873
|
useI18n: Rs,
|
|
2874
2874
|
useMultiselectCreation: Ue,
|
|
2875
2875
|
useHelpers: Ae
|
|
2876
|
-
}, _e = "/api/
|
|
2876
|
+
}, _e = "/api/control_planes/{controlPlaneId}", Ce = "/{workspace}", we = {
|
|
2877
2877
|
list: {
|
|
2878
2878
|
konnect: `${_e}/upstreams`,
|
|
2879
2879
|
kongManager: `${Ce}/upstreams`
|
|
@@ -3194,14 +3194,14 @@ const ye = (e, r) => {
|
|
|
3194
3194
|
return t;
|
|
3195
3195
|
}, Qr = /* @__PURE__ */ ye(Xs, [["__scopeId", "data-v-033bd1ef"]]), Oe = {
|
|
3196
3196
|
list: {
|
|
3197
|
-
konnect: "/api/
|
|
3197
|
+
konnect: "/api/control_planes/{controlPlaneId}/upstreams/{upstreamId}/targets",
|
|
3198
3198
|
kongManager: "/{workspace}/upstreams/{upstreamId}/targets"
|
|
3199
3199
|
},
|
|
3200
3200
|
form: {
|
|
3201
3201
|
konnect: {
|
|
3202
|
-
create: "/api/
|
|
3203
|
-
edit: "/api/
|
|
3204
|
-
validate: "/api/
|
|
3202
|
+
create: "/api/control_planes/{controlPlaneId}/upstreams/{upstreamId}/targets",
|
|
3203
|
+
edit: "/api/control_planes/{controlPlaneId}/upstreams/{upstreamId}/targets/{id}",
|
|
3204
|
+
validate: "/api/control_planes/{controlPlaneId}/v1/schemas/json/target/validate"
|
|
3205
3205
|
},
|
|
3206
3206
|
kongManager: {
|
|
3207
3207
|
create: "/{workspace}/upstreams/{upstreamId}/targets",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(z,e){typeof exports=="object"&&typeof module<"u"?e(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"],e):(z=typeof globalThis<"u"?globalThis:z||self,e(z["kong-ui-entities-upstreams-targets"]={},z.Vue,z.axios,z["kong-ui-public-i18n"],z.Kongponents,z.VueRouter))})(this,function(z,e,ka,ce,ba,ke){"use strict";var be=(t=>(t.GatewayService="service",t.Route="route",t.Consumer="consumer",t.ConsumerGroup="consumer group",t.Plugin="plugin",t.Upstream="upstream",t.Certificate="certificate",t.CACertificate="ca certificate",t.SNI="SNI",t.Key="key",t.KeySet="key set",t.Vault="vault",t.Application="application",t.Developer="developer",t.acls="ACL Credential",t["basic-auth"]="Basic Auth Credential",t["key-auth"]="Key Auth Credential",t["key-auth-enc"]="Key Auth Encrypted Credential",t.oauth2="OAuth 2.0 Credential",t["hmac-auth"]="HMAC Credential",t.jwt="JWT Credential",t.Target="target",t.Policy="policy",t))(be||{}),G=(t=>(t.Edit="edit",t.Create="create",t))(G||{}),te=(t=>(t[t.Loading=0]="Loading",t[t.Idle=1]="Idle",t[t.NoResults=2]="NoResults",t[t.Error=3]="Error",t))(te||{}),R=(t=>(t.ID="id",t.IdArray="id-array",t.Text="plain-text",t.Date="date",t.Redacted="redacted",t.RedactedArray="redacted-array",t.Json="json",t.JsonArray="json-array",t.BadgeTag="badge-tag",t.BadgeStatus="badge-status",t.BadgeMethod="badge-method",t.LinkInternal="link-internal",t.LinkExternal="link-external",t))(R||{}),j=(t=>(t.Basic="basic",t.Advanced="advanced",t.Plugin="plugin",t))(j||{});function Ce(t={}){return{axiosInstance:ka.create({withCredentials:!0,timeout:3e4,...t})}}function Ca(){return{debounce:(t,o)=>{let a;return(...l)=>{clearTimeout(a),a=window==null?void 0:window.setTimeout(()=>{t(...l)},o)}}}}const _e="khcp-user-table-preferences",_a={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function wa(){const t=a=>{if(typeof a=="string")try{return JSON.parse(a)}catch(l){console.error("useTablePreferences(tryParseJson)",l);return}},o=()=>{const a=t(localStorage.getItem(_e));return!a||!Object.keys(a).length?new Map:new Map(Object.entries(a))};return{setTablePreferences:(a,l)=>{try{const i=o();i.set(a,l),localStorage.setItem(_e,JSON.stringify(Object.fromEntries(i.entries())))}catch(i){console.error("useTablePreferences(setTablePreferences)",i)}},getTablePreferences:a=>{const l=o();return(l==null?void 0:l.get(a))||void 0||_a},deleteAllTablePreferences:()=>{localStorage.removeItem(_e)}}}const Sa={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},xa={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},Va={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},Na={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}"}},Ba={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},Ha={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},Ia={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Ta={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"}},Ea={deleteModal:Sa,baseForm:xa,baseTable:Va,baseConfigCard:Na,filter:Ba,debouncedFilter:Ha,errors:Ia,toggleModal:Ta};function we(){const t=ce.createI18n("en-us",Ea);return{i18n:t,i18nT:ce.i18nTComponent(t)}}function Ua(t,o,a,l={fetchedItemsKey:"data",searchKeys:["id"]}){a||(a="100");const{axiosInstance:i}=Ce({headers:t.requestHeaders}),{i18n:{t:m}}=we(),{debounce:b}=Ca(),V=b(async w=>{await S(w)},200),n=e.ref(!1),r=e.ref(""),y=e.ref(""),d=e.ref([]),s=e.ref(void 0),x=e.unref(o);let N=`${t.apiBaseUrl}${x}`;t.app==="konnect"?N=N.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(N=N.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:""));const h=async()=>{try{n.value=!0;const{data:w}=await i.get(`${N}?size=${a}`);w!=null&&w.next||(s.value=l.fetchedItemsKey in w?w[l.fetchedItemsKey]:[]),d.value=l.fetchedItemsKey in w?w[l.fetchedItemsKey]:[]}catch{d.value=[],r.value=m("debouncedFilter.errors.fetch")}finally{n.value=!1}},p=e.ref(""),S=async w=>{var B,$;if(p.value!==w)if(p.value=w||"",s.value===void 0)try{n.value=!0,r.value="",y.value="";let u=N+"";w&&(u+=`/${w}`);const{data:C}=await i.get(`${u}?size=${a}`);l.fetchedItemsKey in C?d.value=C[l.fetchedItemsKey]:C!=null&&C.id?d.value=[C]:d.value=[]}catch(u){((B=u==null?void 0:u.response)==null?void 0:B.status)===404?y.value=m("debouncedFilter.errors.invalid"):(d.value=[],r.value=m("debouncedFilter.errors.fetch"))}finally{n.value=!1}else n.value=!0,y.value="",w?(d.value=($=s.value)==null?void 0:$.filter(u=>{var C;let _=!1;for(const q of l.searchKeys){const T=typeof u[q]=="string"?(C=u[q])==null?void 0:C.toLowerCase():u[q];T!=null&&T.includes(w.toLowerCase())&&(_=!0)}return _}),(!d.value||!d.value.length)&&(y.value=m("debouncedFilter.errors.invalid"))):d.value=s.value,n.value=!1};return{loading:n,error:r,validationError:y,results:d,allRecords:s,loadItems:h,debouncedQueryChange:V}}function qa(t,o){const a=e.unref(o),l=e.computed(()=>t.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${a}`):new URL(a));return l.value.search="",i=>`${l.value.href}/${i}`}function Fa(){const{i18n:{t}}=we();return{getMessageFromError:o=>{var a,l,i;if(!o)return t("errors.unexpected");if((a=o==null?void 0:o.response)!=null&&a.data){if(o.response.data.detail)return o.response.data.detail;if((l=o.response.data.details)!=null&&l.length)return o.response.data.details.map(m=>{let b=t("errors.unexpected");return m.messages&&typeof m.messages=="object"&&m.messages.length&&(b=m.messages.join(", ")),m.field?`${m.field} - ${b}`:b}).join("; ");if(o.response.data.message){const{message:m}=o.response.data;return Array.isArray(m)?(i=m[0])!=null&&i.constraints?Object.values(m[0].constraints)[0]:m[0]:m}if(typeof o.response.data=="string")return o.response.data;if(typeof o.response.data=="object")return Object.keys(o.response.data).map(m=>`${m} ${o.response.data[m]}`).join(", ")}return o.message||t("errors.unexpected")}}}function Te(t,o){const a=e.ref(e.unref(t)),l=e.ref(e.unref(o)),i=e.computed(()=>!!(a.value.app==="konnect"||a.value.isExactMatch)),m=e.computed(()=>l.value.startsWith("/")?new URL(`${window.location.origin}${l.value}`):new URL(l.value));return b=>{const{page:V,pageSize:n,offset:r,sortColumnKey:y,sortColumnOrder:d,query:s}=b;try{let x=new URL(m.value.href);return i.value&&s?(x.search="",x=new URL(`${x.href}/${s}/`)):(i.value||new URLSearchParams(s).forEach((N,h)=>{x.searchParams.append(h,N)}),y&&x.searchParams.append("sort_by",y),d==="desc"&&x.searchParams.append("sort_desc","1"),x.searchParams.append("size",String(n))),r&&V!==1&&x.searchParams.append("offset",String(r)),x.href}catch(x){return console.error("RouteList(fetcher)",x),l.value}}}function $a(t,o,a="data"){const l=e.unref(o),{axiosInstance:i}=Ce({headers:t.requestHeaders}),m=Te(t,l),b=e.ref({status:te.Idle});return{fetcher:async V=>{try{b.value={status:te.Loading};const n=m(V),{data:r}=await i.get(n),y=a&&a.replace(/[^\w-_]/gi,"");let d;r[y]&&Array.isArray(r[y])?d=r[y]:d=Object.keys(r).length?[r]:[];const s={data:d,total:d.length,...r.offset?{pagination:{offset:r.offset}}:null};return b.value={status:te.Idle,response:s},s}catch(n){const r={data:[],total:0};return V.query&&n.response.status===404?(b.value={status:te.NoResults,response:r,error:n},r):(b.value={status:te.Error,response:r,error:n},r)}},fetcherState:b}}function Da(){return{convertKeyToTitle:(t,o="_")=>t?t.split(o).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):""}}const Ee=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ue=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const o=t.match(Ee);if(!o)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return o.shift(),o},qe=t=>t==="*"||t==="x"||t==="X",Fe=t=>{const o=parseInt(t,10);return isNaN(o)?t:o},Oa=(t,o)=>typeof t!=typeof o?[String(t),String(o)]:[t,o],Ka=(t,o)=>{if(qe(t)||qe(o))return 0;const[a,l]=Oa(Fe(t),Fe(o));return a>l?1:a<l?-1:0},$e=(t,o)=>{for(let a=0;a<Math.max(t.length,o.length);a++){const l=Ka(t[a]||"0",o[a]||"0");if(l!==0)return l}return 0},Pa=(t,o)=>{const a=Ue(t),l=Ue(o),i=a.pop(),m=l.pop(),b=$e(a,l);return b!==0?b:i&&m?$e(i.split("."),m.split(".")):i||m?i?-1:1:0},De=(t,o,a)=>{Ma(a);const l=Pa(t,o);return Oe[a].includes(l)},Oe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Ke=Object.keys(Oe),Ma=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(Ke.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${Ke.join("|")}`)},Aa=t=>typeof t=="string"&&/^[v\d]/.test(t)&&Ee.test(t);function va(t){const{gatewayInfo:o,supportedRange:a}=t;if(!o)return!0;const{edition:l,version:i}=o;if(!Aa(i))return console.error("Invalid version"),!1;const m=a[l];if(!m)return!1;const[b,V]=m;return!(b&&De(i,b,"<")||V&&De(i,V,">"))}const Q={useAxios:Ce,useDebouncedFilter:Ua,useDeleteUrlBuilder:qa,useErrors:Fa,useFetcher:$a,useFetchUrlBuilder:Te,useStringHelpers:Da,useI18n:we,useGatewayFeatureSupported:va},Ra={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},La="Copy to clipboard",ja={message:Ra,iconTitle:La},Ja="kong-ui-copy-uuid-notify",Qa={class:"kong-ui-copy-uuid"},za=["title"],Wa=["onClick"],Pe=15,Ga=e.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},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:t=>["uuid","hidden","redacted","deleted"].includes(t)}},emits:["success","error"],setup(t,{emit:o}){const a=t,{t:l}=ce.createI18n("en-us",ja),i=a.notify||e.inject(Ja,()=>{}),m=e.computed(()=>!!(a.tooltip&&a.successTooltip)),b=e.ref(a.tooltip),V=e.computed(()=>a.tooltip?{label:b.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),n=e.computed(()=>a.format==="redacted"?"*****":a.format==="deleted"?`*${a.uuid.substring(0,5)}`:a.uuid),r=d=>{b.value=d,setTimeout(()=>{b.value=a.tooltip},1800)},y=d=>{if(!d(a.uuid)){typeof i=="function"&&i({type:"error",message:l("message.fail")}),m.value?r(l("message.fail")):o("error",a.uuid);return}const s=a.uuid.length>Pe,x=a.format==="hidden"||a.format==="redacted"?l("message.success.prefix"):`"${a.uuid.substring(0,Pe)+(s?"...":"")}"`;typeof i=="function"&&i({type:"success",message:`${x}${l("message.success.content")}`}),m.value?r(a.successTooltip):o("success",a.uuid)};return(d,s)=>{const x=e.resolveComponent("KIcon"),N=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Qa,[t.format!=="hidden"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":"copy-id",title:t.uuid},[e.createElementVNode("div",{class:e.normalizeClass(["uuid-container",t.truncated?"truncated-uuid":null,t.useMono?"mono":null])},e.toDisplayString(n.value),3)],8,za)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tooltip?"KTooltip":"div"),e.mergeProps(V.value,{class:"uuid-icon-wrapper"}),{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:e.withModifiers(p=>y(h),["stop"])},[e.createVNode(x,{class:"uuid-icon",color:t.iconColor,"hide-title":!!t.tooltip||void 0,icon:"copy",size:"16",title:e.unref(l)("iconTitle")},null,8,["color","hide-title","title"])],8,Wa)]),_:1})]),_:1},16))])}}}),Xa=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},Me=Xa(Ga,[["__scopeId","data-v-e4ea1359"]]),Ya={key:0,class:"config-card-fieldset-title"},Za=e.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(t){const o=t,{i18n:{t:a}}=Q.useI18n(),{convertKeyToTitle:l}=Q.useStringHelpers(),i=e.computed(()=>o.item.key??"json-array-item"),m=e.computed(()=>o.item.value??o.item),b=e.computed(()=>{const n=JSON.parse(JSON.stringify(m.value));return o.isArrayItem&&delete n.name,n}),V=e.computed(()=>{var n;return o.isArrayItem?(n=m.value)!=null&&n.name?l(m.value.name,"_"):a("baseConfigCard.general.entryTitle",{index:o.index}):""});return(n,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.isArrayItem?"fieldset":"div"),{class:e.normalizeClass(t.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:e.withCtx(()=>[t.isArrayItem?(e.openBlock(),e.createElementBlock("legend",Ya,[e.createElementVNode("b",null,e.toDisplayString(V.value),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(b.value),(y,d)=>(e.openBlock(),e.createBlock(ve,{key:`${i.value}-property-${d}`,item:{key:y,label:e.unref(l)(y),value:b.value[y]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),X=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},Ae=X(Za,[["__scopeId","data-v-68ca83ec"]]),el=X(e.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(t){const{i18n:{t:o}}=Q.useI18n();return(a,l)=>{const i=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{appearance:"btn-link",class:"navigation-button",onClick:l[0]||(l[0]=m=>a.$emit("navigation-click",t.item))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.value||e.unref(o)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-7410504d"]]),tl=e.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(t){const{i18n:{t:o}}=Q.useI18n();return(a,l)=>{const i=e.resolveComponent("KBadge");return e.openBlock(),e.createBlock(i,{appearance:t.status?"success":"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.status?e.unref(o)("baseConfigCard.statusBadge.enabledLabel"):e.unref(o)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),al="#0044f4",ll="#e0e4ea",sl="#3a3f51",ol="1px",rl={class:"config-card-details-row"},nl=["data-testid"],il=["data-testid"],cl=["data-testid"],dl=["data-testid"],hl={key:1},pl=["data-testid"],ul=["data-testid"],ml=["data-testid"],fl=["data-testid"],yl=["title"],gl={name:"ConfigCardItem",components:{CopyUuid:Me,JsonCardItem:Ae,StatusBadge:tl,InternalLinkItem:el}},kl=e.defineComponent({...gl,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(t,{emit:o}){const a=t;e.useCssVars(d=>({"2c6ac268":r.value?"none":`solid ${e.unref(ol)} ${e.unref(ll)}`,c7a65802:n.value&&b.value?"block":"flex","778426fe":n.value&&b.value?"100%":a.slim?"50%":"25%","777f9b48":n.value&&b.value?"100%":a.slim?"50%":"75%"}));const l=e.useSlots(),{i18n:{t:i,formatUnixTimeStamp:m}}=Q.useI18n(),b=e.computed(()=>a.item.value!==void 0&&a.item.value!==null&&a.item.value!==""),V=e.computed(()=>!!(a.item.tooltip||l["label-tooltip"])),n=e.computed(()=>a.item.type===R.Json||a.item.type===R.JsonArray),r=e.computed(()=>a.item.type===R.JsonArray),y=e.computed(()=>{switch(a.item.type){case R.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${a.item.key}-copy-uuid`,"success-tooltip":i("baseConfigCard.copy.success"),tooltip:i("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,uuid:a.item.value,notify:()=>{}}};case R.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":i("baseConfigCard.copy.success"),tooltip:i("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,notify:()=>{}}};case R.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${a.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":i("baseConfigCard.copy.success"),tooltip:i("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,uuid:a.item.value,notify:()=>{}}};case R.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":i("baseConfigCard.copy.success"),tooltip:i("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,notify:()=>{}}};case R.Date:return{tag:"div",attrs:{"data-testid":`${a.item.key}-date`},text:m(a.item.value)};case R.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${a.item.key}-badge-status`,status:a.item.value}};case R.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case R.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case R.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${a.item.key}-internal-link`,item:a.item,onNavigationClick:d=>{o("navigation-click",d)}}};case R.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${a.item.key}-external-link`,href:a.item.value},text:a.item.value};case R.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${a.item.key}-json-content`,item:a.item}};case R.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}}});return(d,s)=>{const x=e.resolveComponent("KLabel"),N=e.resolveComponent("KBadge"),h=e.resolveComponent("KMethodBadge");return e.openBlock(),e.createElementBlock("div",rl,[e.createElementVNode("div",{class:"config-card-details-label","data-testid":`${t.item.key}-label`},[e.renderSlot(d.$slots,"label",{item:t.item},()=>[e.createVNode(x,{"tooltip-attributes":{maxWidth:"500px"}},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.label)+" ",1)]),_:2},[V.value?{name:"tooltip",fn:e.withCtx(()=>[e.createElementVNode("div",{"data-testid":`${t.item.key}-label-tooltip`},[e.renderSlot(d.$slots,"label-tooltip",{},()=>[e.createTextVNode(e.toDisplayString(t.item.tooltip),1)],!0)],8,il)]),key:"0"}:void 0]),1024)],!0)],8,nl),e.createElementVNode("div",{class:"config-card-details-value","data-testid":`${t.item.key}-property-value`},[e.renderSlot(d.$slots,t.item.key,{rowValue:t.item.value},()=>[b.value?(e.openBlock(),e.createElementBlock("div",hl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value.tag),e.normalizeProps(e.guardReactiveProps(y.value.attrs)),{default:e.withCtx(()=>[y.value.additionalComponent==="KBadge"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-badge-tags`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(p,S)=>(e.openBlock(),e.createBlock(N,{key:`${t.item.key}-badge-tag-${S}`,class:"config-badge","data-testid":`${t.item.key}-badge-tag-${S}`,"truncation-tooltip":p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,pl)):e.createCommentVNode("",!0),y.value.additionalComponent==="CopyUuid"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${t.item.key}-copy-uuid-array`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(p,S)=>(e.openBlock(),e.createBlock(e.unref(Me),e.mergeProps(y.value.childAttrs,{key:`${t.item.key}-copy-uuid-${S}`,"data-testid":`${t.item.key}-copy-uuid-${S}`,uuid:p}),null,16,["data-testid","uuid"]))),128))],8,ul)):y.value.additionalComponent==="KMethodBadge"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${t.item.key}-badge-methods`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(p,S)=>(e.openBlock(),e.createBlock(h,{key:`${t.item.key}-badge-method-${S}`,class:"config-badge","data-testid":`${t.item.key}-badge-method-${S}`,"is-rounded":"",label:p,method:e.unref(ba.MethodsArray).includes(p.toLowerCase())?p.toLowerCase():"custom"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,ml)):e.createCommentVNode("",!0),y.value.additionalComponent==="JsonCardItem"?(e.openBlock(),e.createElementBlock("div",{key:3,"data-testid":`${a.item.key}-json-array-content`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(p,S)=>(e.openBlock(),e.createBlock(Ae,{key:`json-array-item-${S}`,index:S,"is-array-item":"",item:p},null,8,["index","item"]))),128))],8,fl)):(e.openBlock(),e.createElementBlock("span",{key:4,class:e.normalizeClass(["attrs-data-text",{truncated:t.truncated}]),title:t.truncated?t.item.value:void 0},e.toDisplayString(y.value.text),11,yl))]),_:1},16))])):(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-no-value`}," – ",8,dl))],!0)],8,cl)])}}}),ve=X(kl,[["__scopeId","data-v-a3c5ab01"]]),bl={"data-testid":"config-card-title"},Cl={class:"config-card-actions"},_l={class:"config-card-details-section"},wl=["data-testid"],Sl={key:0,class:"config-card-prop-section-title"},xl=X(e.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.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}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(t,{emit:o}){var a;const l=t,i=e.useSlots(),{i18n:{t:m}}=Q.useI18n(),{getMessageFromError:b}=Q.useErrors(),{convertKeyToTitle:V}=Q.useStringHelpers(),{axiosInstance:n}=Q.useAxios({headers:(a=l.config)==null?void 0:a.requestHeaders}),r={id:{type:R.ID,label:m("baseConfigCard.commonFields.id_label"),order:0,section:j.Basic},name:{order:1,section:j.Basic},enabled:{type:R.BadgeStatus,order:2,section:j.Basic},updated_at:{type:R.Date,label:m("baseConfigCard.commonFields.updated_at_label"),order:3,section:j.Basic},created_at:{type:R.Date,label:m("baseConfigCard.commonFields.created_at_label"),order:4,section:j.Basic},tags:{type:R.BadgeTag,order:-1,section:j.Basic}},y=e.ref(!1),d=e.ref(!1),s=e.ref(""),x=e.ref(),N=e.computed(()=>{var u,C,_;if(!x.value)return[];const q=[],T=Object.keys(x.value).length;for(const g in x.value){const I=(C=(u=l.configSchema)==null?void 0:u[g])==null?void 0:C.order,H=(_=r[g])==null?void 0:_.order;let D=T;(H||H===0)&&(D=H===-1?T+1:H),I&&(D=I===-1?T+1:I),q.push([g,D])}return q.sort(function(g,I){return g[1]-I[1]}),q.map(g=>{var I,H;const D=g[0],F=(I=x.value)==null?void 0:I[D],O=((H=l.configSchema)==null?void 0:H[D])||{},A=r[D];return{key:D,value:F,hidden:O.hidden||!1,type:O.type??((A==null?void 0:A.type)||R.Text),label:O.label??((A==null?void 0:A.label)||V(D)),tooltip:O.tooltip??((A==null?void 0:A.tooltip)||void 0),section:O.section??((A==null?void 0:A.section)||j.Advanced)}}).filter(g=>!g.hidden&&g.key!==l.pluginConfigKey)}),h=e.computed(()=>{var u,C;if(!x.value||!l.pluginConfigKey)return[];const _=x.value[l.pluginConfigKey]||{},q=Object.keys(_).length,T=[];for(const g in _){const I=(C=(u=l.pluginConfigSchema)==null?void 0:u[g])==null?void 0:C.order,H=_[g];let D=H!=null&&H!==""?q-1:q;I&&(D=I===-1?q+1:I),T.push([g,D])}return T.sort(function(g,I){return g[1]-I[1]}),T.map(g=>{var I;const H=g[0],D=_[H],F=((I=l.pluginConfigSchema)==null?void 0:I[H])||{};return{key:H,value:D,hidden:F.hidden||!1,type:F.type??R.Text,label:F.label??V(H),tooltip:F.tooltip??void 0,section:j.Plugin}}).filter(g=>!g.hidden)}),p=e.computed(()=>{var u,C,_,q;return{basic:(u=N.value)==null?void 0:u.filter(T=>T.section===j.Basic),advanced:(C=N.value)==null?void 0:C.filter(T=>T.section===j.Advanced),plugin:(q=h.value)==null?void 0:q.concat((_=N.value)==null?void 0:_.filter(T=>T.section===j.Plugin))}}),S=e.computed(()=>{const u=[];return p.value.basic.length&&u.push("basic"),p.value.advanced.length&&u.push("advanced"),p.value.plugin.length&&u.push("plugin"),u}),w=u=>!!(u.tooltip||i[`${u.key}-label-tooltip`]),B=e.computed(()=>{var u,C;let _=`${l.config.apiBaseUrl}${l.fetchUrl}`;return l.config.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,((u=l.config)==null?void 0:u.controlPlaneId)||""):l.config.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,(C=l.config)!=null&&C.workspace?`/${l.config.workspace}`:"")),_=_.replace(/{id}/gi,l.config.entityId),_}),$=u=>{x.value&&u(JSON.stringify(x.value))?o("copy:success",x.value):o("copy:error")};return e.watch(y,u=>{o("loading",u)},{immediate:!0}),e.onBeforeMount(async()=>{d.value=!1,y.value=!0;try{const{data:u}=await n.get(B.value);if(l.dataKey)if(typeof u[l.dataKey]<"u")x.value={...u[l.dataKey]};else throw new Error(m("errors.dataKeyUndefined",{dataKey:l.dataKey}));else x.value={...u};Object.keys(l.configSchema).filter(C=>l.configSchema[C].forceShow).forEach(C=>{x.value&&typeof x.value[C]>"u"&&(x.value[C]=null)}),o("fetch:success",u)}catch(u){const C=b(u);s.value=C.startsWith("code")?m("baseConfigCard.errors.load"):C,d.value=!0,o("fetch:error",u)}finally{y.value=!1}}),(u,C)=>{const _=e.resolveComponent("KButton"),q=e.resolveComponent("KClipboardProvider"),T=e.resolveComponent("KSkeleton"),g=e.resolveComponent("KEmptyState"),I=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(I,{"border-variant":"noBorder",class:"kong-ui-entity-base-config-card"},e.createSlots({actions:e.withCtx(()=>[e.createElementVNode("div",Cl,[e.renderSlot(u.$slots,"actions",{},void 0,!0),e.createVNode(q,null,{default:e.withCtx(({copyToClipboard:H})=>[!y.value&&!d.value?(e.openBlock(),e.createBlock(_,{key:0,appearance:"btn-link","data-testid":"json-copy-button",onClick:D=>$(H)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:1})])]),body:e.withCtx(()=>[y.value?(e.openBlock(),e.createBlock(T,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):d.value?(e.openBlock(),e.createBlock(g,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",_l,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,H=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${H}-props`,class:e.normalizeClass(`config-card-details-${H}-props`),"data-testid":`config-card-details-${H}-props`},[H!=="basic"?(e.openBlock(),e.createElementBlock("div",Sl,e.toDisplayString(H==="advanced"?e.unref(m)("baseConfigCard.sections.advanced"):e.unref(m)("baseConfigCard.sections.plugin")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value[H],D=>(e.openBlock(),e.createBlock(ve,{key:D.key,item:D},e.createSlots({label:e.withCtx(()=>[e.renderSlot(u.$slots,`${D.key}-label`,{row:D},void 0,!0)]),[D.key]:e.withCtx(({rowValue:F})=>[e.renderSlot(u.$slots,D.key,{row:D,rowValue:F},void 0,!0)]),_:2},[w(D)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(u.$slots,`${D.key}-label-tooltip`,{row:D},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,wl))),128))])]),_:2},[t.hideTitle?void 0:{name:"title",fn:e.withCtx(()=>[e.createElementVNode("div",bl,[e.renderSlot(u.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(m)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-b72bbdde"]]),Vl=["onReset","onSubmit"],Nl={class:"form-actions","data-testid":"form-actions"},Re=X(e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.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(t,{emit:o}){var a;const l=t,i=ke.useRouter(),{i18n:{t:m}}=Q.useI18n(),{getMessageFromError:b}=Q.useErrors(),{axiosInstance:V}=Q.useAxios({headers:(a=l.config)==null?void 0:a.requestHeaders}),n=e.ref(!1),r=e.ref(!1),y=e.ref(""),d=e.computed(()=>l.canSubmit===!1||l.isReadonly),s=e.computed(()=>{var p,S;if(!l.editId)return"";let w=`${l.config.apiBaseUrl}${l.fetchUrl}`;return l.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((p=l.config)==null?void 0:p.controlPlaneId)||""):l.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(S=l.config)!=null&&S.workspace?`/${l.config.workspace}`:"")),w=w.replace(/{id}/gi,l.editId),w}),x=()=>{l.config.cancelRoute?i.push(l.config.cancelRoute):N()},N=()=>{o("cancel")},h=()=>{d.value||o("submit")};return e.watch(()=>n.value,p=>{o("loading",p)},{immediate:!0}),e.onBeforeMount(async()=>{if(l.editId)try{r.value=!1,n.value=!0;const{data:p}=await V.get(s.value);o("fetch:success",p)}catch(p){const S=b(p);y.value=S.startsWith("code")?m("baseForm.errors.edit"):S,r.value=!0,o("fetch:error",p)}finally{n.value=!1}}),(p,S)=>{const w=e.resolveComponent("KSkeleton"),B=e.resolveComponent("KEmptyState"),$=e.resolveComponent("KAlert"),u=e.resolveComponent("KButton"),C=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(C,{class:"kong-ui-entity-base-form"},{body:e.withCtx(()=>[n.value?(e.openBlock(),e.createBlock(w,{key:0,type:"form"})):r.value?(e.openBlock(),e.createBlock(B,{key:1,"cta-text":e.unref(m)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":x,"is-error":!0},{message:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(y.value),1)]),_:1},8,["cta-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:e.withModifiers(N,["prevent"]),onSubmit:e.withModifiers(h,["prevent"])},[e.renderSlot(p.$slots,"default",{},void 0,!0),t.errorMessage?(e.openBlock(),e.createBlock($,{key:0,"alert-message":t.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):e.createCommentVNode("",!0),e.createElementVNode("div",Nl,[e.renderSlot(p.$slots,"form-actions",{},()=>[e.createVNode(u,{appearance:"outline","data-testid":"form-cancel",disabled:t.isReadonly,type:"reset"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),e.createVNode(u,{appearance:"primary","data-testid":"form-submit",disabled:d.value,type:"submit"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,Vl))]),_:3})}}}),[["__scopeId","data-v-2286e5f2"]]),Bl={key:0},Hl=X(e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(t){const o=t,a=e.computed(()=>{var h;return((h=o.rowEl)==null?void 0:h.querySelector(`[data-testid="${o.keyName}"]`))||null}),l=e.computed(()=>{var h;return((h=a.value)==null?void 0:h.querySelector('[role="button"]'))||null}),i=e.computed(()=>{var h,p;const S=(h=o.rowEl)==null?void 0:h.querySelectorAll("td");return S?((p=S[0])==null?void 0:p.getAttribute("data-testid"))===o.keyName:!1});let m;const b=()=>{m&&(m.disconnect(),m=void 0)},V=()=>{var h,p,S;r.value=((h=l.value)==null?void 0:h.getBoundingClientRect().width)||0,y.value=((p=a.value)==null?void 0:p.clientWidth)||0,d.value=((S=n.value)==null?void 0:S.innerText)||""},n=e.ref({}),r=e.ref(0),y=e.ref(0),d=e.ref(""),s=e.computed(()=>[l.value,a.value]),x=e.watch(s,h=>{if(i.value&&(b(),"ResizeObserver"in window&&window)){m=new ResizeObserver(p=>{window.requestAnimationFrame(()=>{!Array.isArray(p)||!p.length||V()})});for(const p of h)p&&m.observe(p)}},{immediate:!0,flush:"post",deep:!0}),N=e.computed(()=>i.value?r.value>y.value:!1);return e.onMounted(()=>{V()}),e.onUnmounted(()=>{x()}),(h,p)=>{const S=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:n,class:"content-wrapper"},[i.value?(e.openBlock(),e.createElementBlock("span",Bl,[e.createVNode(S,{disabled:!N.value,label:d.value,"max-width":"300",placement:"bottomStart"},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default",{},void 0,!0)]),_:3},8,["disabled","label"])])):e.renderSlot(h.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-f8a220e9"]]),Il={class:"toolbar-container"},Tl={key:0,class:"toolbar-button-container"},El=["data-testid"],Le=X(e.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,default:""},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:""}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(t,{emit:o}){const a=t,{i18n:{t:l}}=Q.useI18n(),i=e.computed(()=>a.cacheIdentifier||a.preferencesStorageKey),m=B=>B.hasData||!!a.query,b=e.computed(()=>{const B=[];return Object.keys(a.tableHeaders).forEach($=>{const u=a.tableHeaders[$];B.push({label:u.label??$,key:$,sortable:u.sortable??!1})}),a.enableEntityActions&&B.push({key:"actions",hideLabel:!0}),B}),V=B=>({"data-rowid":B.id,"data-testid":B.name,...a.rowAttributes(B)}),n=e.ref({}),r=B=>{var $;return($=n.value)==null?void 0:$.$el.querySelector(`[data-rowid="${B.id}"]`)},y=B=>{const $={"data-testid":B.headerKey,...a.cellAttributes(B)};return B.colIndex===0&&($.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),$},d=()=>{o("empty-state-cta-clicked"),s()},s=()=>{o("clear-search-input")},x=(B,$)=>{o("click:row",$)},N=B=>{o("sort",B)},{setTablePreferences:h,getTablePreferences:p}=wa(),S=e.computed(()=>{const B=p(a.preferencesStorageKey);return{...a.initialFetcherParams,...B}}),w=B=>{a.preferencesStorageKey&&h(a.preferencesStorageKey,B)};return(B,$)=>{const u=e.resolveComponent("KIcon"),C=e.resolveComponent("KButton"),_=e.resolveComponent("KDropdownMenu"),q=e.resolveComponent("KTable"),T=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(T,{class:"kong-ui-entity-base-table",title:t.title},{body:e.withCtx(()=>[e.createVNode(q,{ref_key:"tableRefs",ref:n,"cache-identifier":i.value,"cell-attrs":y,"disable-pagination-page-jump":t.disablePaginationPageJump,"disable-sorting":t.disableSorting,"empty-state-action-button-icon":t.query?"":"plus","empty-state-action-message":t.query?e.unref(l)("baseTable.emptyState.noSearchResultsCtaText"):t.emptyStateOptions.ctaText,"empty-state-action-route":t.query?"":t.emptyStateOptions.ctaPath,"empty-state-icon":t.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":t.query?e.unref(l)("baseTable.emptyState.noSearchResultsMessage"):t.emptyStateOptions.message,"empty-state-title":t.query?e.unref(l)("baseTable.emptyState.noSearchResultsTitle"):t.emptyStateOptions.title,"enable-client-sort":t.enableClientSort,"error-state-title":t.errorMessage,fetcher:t.fetcher,"fetcher-cache-key":String(t.fetcherCacheKey),"has-error":!!t.errorMessage,headers:b.value,"hide-pagination-when-optional":"","initial-fetcher-params":S.value,"is-loading":t.isLoading,"pagination-type":t.paginationType,"row-attrs":V,"search-input":t.query,onKtableEmptyStateCtaClicked:d,"onRow:click":x,onSort:$[0]||($[0]=g=>N(g)),"onUpdate:tablePreferences":w},e.createSlots({toolbar:e.withCtx(({state:g})=>[e.withDirectives(e.createElementVNode("div",Il,[e.renderSlot(B.$slots,"toolbar-filter",{},void 0,!0),B.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",Tl,[e.renderSlot(B.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)],512),[[e.vShow,m(g)]])]),actions:e.withCtx(({row:g,rowKey:I,rowValue:H})=>[e.createElementVNode("div",{class:"actions-container","data-testid":g.name},[e.createVNode(_,{"kpop-attributes":{placement:"bottomEnd"},width:t.dropdownMenuWidth},{items:e.withCtx(()=>[e.renderSlot(B.$slots,"actions",{row:g,rowKey:I,rowValue:H},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(C,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:e.withCtx(()=>[e.createVNode(u,{color:e.unref(sl),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,El)]),_:2},[e.renderList(t.tableHeaders,(g,I)=>({name:I,fn:e.withCtx(({row:H,rowKey:D,rowValue:F})=>[e.createVNode(Hl,{"key-name":String(I),"row-el":r(H)},{default:e.withCtx(()=>[e.renderSlot(B.$slots,I,{row:H,rowKey:D,rowValue:F},()=>[e.createTextVNode(e.toDisplayString(F),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-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-a598b1d9"]]),Ul={key:0,class:"kong-ui-entity-delete-error"},ql={key:1,class:"description"},je=X(e.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(t,{emit:o}){const a=t,{i18nT:l}=Q.useI18n(),i=e.computed(()=>a.needConfirm?a.entityName:""),m=()=>{o("cancel")},b=()=>{o("proceed")};return(V,n)=>{const r=e.resolveComponent("KAlert"),y=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(y,{"action-button-text":"Yes, delete","action-pending":t.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":i.value,"is-visible":t.visible,title:t.title,type:"danger",onCanceled:m,onProceed:b},{"body-content":e.withCtx(()=>[t.error?(e.openBlock(),e.createElementBlock("div",Ul,[e.createVNode(r,{appearance:"danger"},{alertMessage:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(l),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.entityType),1)]),_:2},[a.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),a.description||V.$slots.description?(e.openBlock(),e.createElementBlock("div",ql,[e.renderSlot(V.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(a.description),1)],!0)])):e.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),Fl={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},$l={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},Dl=["fill"],Ol={mask:"url(#mask0_180_20349)"},Kl=["fill"],Pl=e.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${al})`}},setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("svg",Fl,[e.createElementVNode("mask",$l,[e.createElementVNode("rect",{fill:t.color,height:"20",width:"20"},null,8,Dl)]),e.createElementVNode("g",Ol,[e.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:t.color},null,8,Kl)])]))}}),Ml={key:1,class:"kong-ui-entity-filter"},Al={class:"menu-item-title"},vl={class:"menu-item-indicator"},Rl={class:"menu-item-body"},Ll=["for"],jl={class:"menu-item-buttons"},Jl=X(e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:o}){const a=t,{i18n:{t:l}}=Q.useI18n(),i=e.ref(!1),m=e.ref({}),b=e.computed(()=>{const p=[];return new URLSearchParams(a.modelValue).forEach((S,w)=>{S!==""&&p.push(w)}),p}),V=e.computed(()=>{const p=a.config.fields;return Object.keys(p).filter(S=>p[S].searchable).map(S=>({label:p[S].label||S,value:S}))});e.watch(()=>a.modelValue,p=>{m.value={},new URLSearchParams(p).forEach((S,w)=>{m.value[w]=S})});const n=()=>{i.value=!i.value},r=p=>{o("update:modelValue",p)},y=p=>`filter-${p}`,d=p=>{var S,w;return(((w=(S=a.config.schema)==null?void 0:S[p])==null?void 0:w.values)??[]).map(B=>({value:B,label:B}))},s=p=>{var S,w;return((w=(S=a.config.schema)==null?void 0:S[p])==null?void 0:w.type)??"text"},x=p=>{m.value={...m.value,[p]:""},h()},N=()=>{m.value={},h(!0)},h=(p=!1)=>{const S=Object.keys(m.value).reduce((w,B)=>(m.value[B]&&(w[B]=`${m.value[B]}`),w),{});p&&(i.value=!1),o("update:modelValue",new URLSearchParams(S).toString())};return(p,S)=>{const w=e.resolveComponent("KInput"),B=e.resolveComponent("KButton"),$=e.resolveComponent("KSelect"),u=e.resolveComponent("KMenuItem"),C=e.resolveComponent("KMenu");return t.config.isExactMatch?(e.openBlock(),e.createBlock(w,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":t.modelValue,placeholder:t.config.placeholder,"onUpdate:modelValue":r},{icon:e.withCtx(()=>[e.createVNode(Pl)]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",Ml,[e.createVNode(B,{appearance:"btn-link","data-testid":"filter-button",icon:"filter",onClick:n},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("filter.filterButtonText"))+" "+e.toDisplayString(b.value.length>0?`(${b.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:n},null,512),[[e.vShow,i.value]]),e.withDirectives(e.createVNode(C,{class:"kong-ui-entity-filter-menu"},{body:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(_,q)=>(e.openBlock(),e.createBlock(u,{key:_.value,"data-testid":_.value,expandable:"","last-menu-item":q===V.value.length-1},{itemTitle:e.withCtx(()=>[e.createElementVNode("span",Al,[e.createTextVNode(e.toDisplayString(_.label)+" ",1),e.withDirectives(e.createElementVNode("span",vl,null,512),[[e.vShow,b.value.includes(_.value)]])])]),itemBody:e.withCtx(()=>{var T,g;return[e.createElementVNode("div",Rl,[e.createElementVNode("label",{class:"menu-item-label",for:y(_.value)},e.toDisplayString(e.unref(l)("filter.fieldLabel")),9,Ll),((g=(T=t.config.schema)==null?void 0:T[_.value])==null?void 0:g.type)==="select"?(e.openBlock(),e.createBlock($,{key:0,id:y(_.value),modelValue:m.value[_.value],"onUpdate:modelValue":I=>m.value[_.value]=I,appearance:"select",items:d(_.value),placeholder:e.unref(l)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(e.openBlock(),e.createBlock(w,{key:1,id:y(_.value),modelValue:m.value[_.value],"onUpdate:modelValue":I=>m.value[_.value]=I,autocomplete:"off",placeholder:e.unref(l)("filter.inputPlaceholder"),size:"small",type:s(_.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),e.createElementVNode("div",jl,[e.createVNode(B,{appearance:"btn-link","data-testid":"apply-filter",size:"small",onClick:S[0]||(S[0]=I=>h(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("filter.applyButtonText")),1)]),_:1}),e.createVNode(B,{appearance:"btn-link","data-testid":"clear-filter",size:"small",onClick:I=>x(_.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:e.withCtx(()=>[e.createVNode(B,{onClick:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("filter.clearAllButtonText")),1)]),_:1})]),_:1},512),[[e.vShow,i.value]])]))}}}),[["__scopeId","data-v-745f38c0"]]),Y=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(t){const o=t,a=e.ref(void 0),l=e.computed(()=>a.value===!0||a.value!==void 0&&o.forceShow===!0);return e.watch(()=>o.authFunction,async()=>{a.value=await o.authFunction()},{immediate:!0}),(i,m)=>l.value?e.renderSlot(i.$slots,"default",{key:0,isAllowed:a.value}):e.createCommentVNode("",!0)}}),Ql={class:"form-section-wrapper"},zl={key:0,class:"form-section-title"},Wl={key:1,class:"form-section-description"},Gl={key:2,class:"form-section-footer"},Xl={class:"form-section-content"},de=X(e.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(t){const o=e.useSlots();return(a,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":t.hasDivider}])},[e.createElementVNode("div",Ql,[t.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:t.stickyInfoHeader}])},[t.title?(e.openBlock(),e.createElementBlock("h4",zl,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.description||e.unref(o).description?(e.openBlock(),e.createElementBlock("div",Wl,[e.renderSlot(a.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(o).footer?(e.openBlock(),e.createElementBlock("div",Gl,[e.renderSlot(a.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",Xl,[e.renderSlot(a.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:ue,useDeleteUrlBuilder:Je,useErrors:Qe,useFetchUrlBuilder:io,useFetcher:ze,useDebouncedFilter:We,useStringHelpers:co,useGatewayFeatureSupported:ho}=Q,Yl={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 Zl(){const t=ce.createI18n("en-us",Yl);return{i18n:t,i18nT:ce.i18nTComponent(t)}}function he(t){const{replaceId:o=!1}=t,a=e.ref([]);return{addedItems:a,trackNewItems:(i,m)=>{if(m){const b={...i};o&&(b.value=i.label),a.value.push(b)}else a.value=a.value.filter(b=>b.value!==i.value)}}}const me=[{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"}],Se=10,xe=65536,es=0,ts=65535,le=0,se=255,Ge=0,Xe=255,as=0,ls=65535,Ye=0,Ze=65535,ss=0,os=2**31,Ve=["200","302"],Ne=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],Be=["429","404","500","501","502","503","504","505"],He=["429","500","503"];function fe(){const t=n=>/^\d+$/.test(n),o=(n,r,y)=>{if(t(n)){const d=Number(n);return d>=r&&d<=y}else return!1},a=n=>n.map(r=>Number(r)),l=n=>n.map(r=>r.toString()),i=()=>({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:Ve,unhealthyInterval:"0",httpFailures:"5",tcpFailures:"5",unhealthyHttpStatuses:Be,unhealthyTimeouts:"0"},passiveHealthCheck:{type:"http",successes:"0",httpStatuses:Ne,timeouts:"0",httpFailures:"5",unhealthyHttpStatuses:He,tcpFailures:"5"}});return{isInteger:t,inRange:o,stringToNumberArray:a,numberToStringArray:l,upstreamsResponseToFields:n=>{var y,d,s,x,N,h,p,S,w,B,$,u,C,_,q,T,g,I,H,D,F,O,A,E,K,P,U,k,c,f,M,L,W,v,J,ae,pe,ie,tt,at,lt,st,ot,rt,nt,it,ct,dt,ht,pt,ut,mt,ft,yt,gt,kt,bt,Ct,_t,wt,St,xt,Vt,Nt,Bt,Ht,It,Tt,Et,Ut,qt,Ft,$t,Dt,Ot,Kt,Pt,Mt,At,vt,Rt,Lt,jt,Jt,Qt,zt,Wt,Gt,Xt,Yt,Zt,ea,ta,aa,la,sa,oa,ra,na,ia,ca,da,ha,pa,ua,ma,fa,ya,ga;const r=i();return r.name=n.name||"",r.algorithm=n.algorithm||"round-robin",r.hostHeader=n.host_header||"",r.clientCertificate=n.client_certificate?(y=n.client_certificate)==null?void 0:y.id:"",r.tags=((d=n.tags)==null?void 0:d.join(", "))||"",r.slots=n.slots!==null&&n.slots!==void 0?n.slots.toString():"10000",r.hashOn=n.hash_on||"none",r.hashFallback=n.hash_fallback||"none",r.hashOnHeader=n.hash_on_header||"",r.hashOnCookie=n.hash_on_cookie||"",r.hashOnCookiePath=n.hash_on_cookie_path||"/",r.hashOnQueryArgument=n.hash_on_query_arg||"",r.hashOnUriCapture=n.hash_on_uri_capture||"",r.hashFallbackHeader=n.hash_fallback_header||"",r.hashFallbackQueryArgument=n.hash_fallback_query_arg||"",r.hashFallbackUriCapture=n.hash_fallback_uri_capture||"",r.healthchecksThreshold=n.healthchecks.threshold!==null&&n.healthchecks.threshold!==void 0?n.healthchecks.threshold.toString():"",r.activeHealthSwitch=((x=(s=n.healthchecks.active)==null?void 0:s.healthy)==null?void 0:x.interval)!==0||((h=(N=n.healthchecks.active)==null?void 0:N.unhealthy)==null?void 0:h.interval)!==0,r.activeHealthCheck.type=((p=n.healthchecks.active)==null?void 0:p.type)||"http",r.activeHealthCheck.httpPath=((S=n.healthchecks.active)==null?void 0:S.http_path)||"/",r.activeHealthCheck.timeout=((w=n.healthchecks.active)==null?void 0:w.timeout)!==null&&((B=n.healthchecks.active)==null?void 0:B.timeout)!==void 0?(u=($=n.healthchecks.active)==null?void 0:$.timeout)==null?void 0:u.toString():"",r.activeHealthCheck.concurrency=((C=n.healthchecks.active)==null?void 0:C.concurrency)!==null&&((_=n.healthchecks.active)==null?void 0:_.concurrency)!==void 0?(T=(q=n.healthchecks.active)==null?void 0:q.concurrency)==null?void 0:T.toString():"",r.activeHealthCheck.httpsSni=((g=n.healthchecks.active)==null?void 0:g.https_sni)||"",r.activeHealthCheck.verifySsl=((I=n.healthchecks.active)==null?void 0:I.https_verify_certificate)||!1,r.activeHealthCheck.headers=(H=n.healthchecks.active)!=null&&H.headers&&Object.entries((D=n.healthchecks.active)==null?void 0:D.headers).length>0?Object.entries((F=n.healthchecks.active)==null?void 0:F.headers).map(([Zs,Ie])=>({key:Zs,values:Ie==null?void 0:Ie.join(", ")})):[{key:"",values:""}],r.activeHealthCheck.interval=((A=(O=n.healthchecks.active)==null?void 0:O.healthy)==null?void 0:A.interval)!==null&&((K=(E=n.healthchecks.active)==null?void 0:E.healthy)==null?void 0:K.interval)!==void 0?(k=(U=(P=n.healthchecks.active)==null?void 0:P.healthy)==null?void 0:U.interval)==null?void 0:k.toString():"0",r.activeHealthCheck.interval=((f=(c=n.healthchecks.active)==null?void 0:c.healthy)==null?void 0:f.interval)!==null&&((L=(M=n.healthchecks.active)==null?void 0:M.healthy)==null?void 0:L.interval)!==void 0?(J=(v=(W=n.healthchecks.active)==null?void 0:W.healthy)==null?void 0:v.interval)==null?void 0:J.toString():"0",r.activeHealthCheck.successes=((pe=(ae=n.healthchecks.active)==null?void 0:ae.healthy)==null?void 0:pe.successes)!==null&&((tt=(ie=n.healthchecks.active)==null?void 0:ie.healthy)==null?void 0:tt.successes)!==void 0?(st=(lt=(at=n.healthchecks.active)==null?void 0:at.healthy)==null?void 0:lt.successes)==null?void 0:st.toString():"0",r.activeHealthCheck.httpStatuses=(rt=(ot=n.healthchecks.active)==null?void 0:ot.healthy)!=null&&rt.http_statuses?l(((it=(nt=n.healthchecks.active)==null?void 0:nt.healthy)==null?void 0:it.http_statuses)||[]):Ve,r.activeHealthCheck.unhealthyInterval=((dt=(ct=n.healthchecks.active)==null?void 0:ct.unhealthy)==null?void 0:dt.interval)!==null&&((pt=(ht=n.healthchecks.active)==null?void 0:ht.unhealthy)==null?void 0:pt.interval)!==void 0?(ft=(mt=(ut=n.healthchecks.active)==null?void 0:ut.unhealthy)==null?void 0:mt.interval)==null?void 0:ft.toString():"0",r.activeHealthCheck.httpFailures=((gt=(yt=n.healthchecks.active)==null?void 0:yt.unhealthy)==null?void 0:gt.http_failures)!==null&&((bt=(kt=n.healthchecks.active)==null?void 0:kt.unhealthy)==null?void 0:bt.http_failures)!==void 0?(wt=(_t=(Ct=n.healthchecks.active)==null?void 0:Ct.unhealthy)==null?void 0:_t.http_failures)==null?void 0:wt.toString():"0",r.activeHealthCheck.unhealthyTimeouts=((xt=(St=n.healthchecks.active)==null?void 0:St.unhealthy)==null?void 0:xt.timeouts)!==null&&((Nt=(Vt=n.healthchecks.active)==null?void 0:Vt.unhealthy)==null?void 0:Nt.timeouts)!==void 0?(It=(Ht=(Bt=n.healthchecks.active)==null?void 0:Bt.unhealthy)==null?void 0:Ht.timeouts)==null?void 0:It.toString():"0",r.activeHealthCheck.unhealthyHttpStatuses=(Et=(Tt=n.healthchecks.active)==null?void 0:Tt.unhealthy)!=null&&Et.http_statuses?l(((qt=(Ut=n.healthchecks.active)==null?void 0:Ut.unhealthy)==null?void 0:qt.http_statuses)||[]):Be,r.passiveHealthSwitch=(($t=(Ft=n.healthchecks.passive)==null?void 0:Ft.healthy)==null?void 0:$t.successes)!==0||((Ot=(Dt=n.healthchecks.passive)==null?void 0:Dt.unhealthy)==null?void 0:Ot.timeouts)!==0||((Pt=(Kt=n.healthchecks.passive)==null?void 0:Kt.unhealthy)==null?void 0:Pt.tcp_failures)!==0||((At=(Mt=n.healthchecks.passive)==null?void 0:Mt.unhealthy)==null?void 0:At.http_failures)!==0,r.passiveHealthCheck.type=((vt=n.healthchecks.passive)==null?void 0:vt.type)||"http",r.passiveHealthCheck.successes=((Lt=(Rt=n.healthchecks.passive)==null?void 0:Rt.healthy)==null?void 0:Lt.successes)!==null&&((Jt=(jt=n.healthchecks.passive)==null?void 0:jt.healthy)==null?void 0:Jt.successes)!==void 0?(Wt=(zt=(Qt=n.healthchecks.passive)==null?void 0:Qt.healthy)==null?void 0:zt.successes)==null?void 0:Wt.toString():"0",r.passiveHealthCheck.httpStatuses=(Xt=(Gt=n.healthchecks.passive)==null?void 0:Gt.healthy)!=null&&Xt.http_statuses?l(((Zt=(Yt=n.healthchecks.passive)==null?void 0:Yt.healthy)==null?void 0:Zt.http_statuses)||[]):Ne,r.passiveHealthCheck.timeouts=((ta=(ea=n.healthchecks.passive)==null?void 0:ea.unhealthy)==null?void 0:ta.timeouts)!==null&&((la=(aa=n.healthchecks.passive)==null?void 0:aa.unhealthy)==null?void 0:la.timeouts)!==void 0?(ra=(oa=(sa=n.healthchecks.passive)==null?void 0:sa.unhealthy)==null?void 0:oa.timeouts)==null?void 0:ra.toString():"0",r.passiveHealthCheck.tcpFailures=((ia=(na=n.healthchecks.passive)==null?void 0:na.unhealthy)==null?void 0:ia.tcp_failures)!==null&&((da=(ca=n.healthchecks.passive)==null?void 0:ca.unhealthy)==null?void 0:da.tcp_failures)!==void 0?(ua=(pa=(ha=n.healthchecks.passive)==null?void 0:ha.unhealthy)==null?void 0:pa.tcp_failures)==null?void 0:ua.toString():"",r.passiveHealthCheck.unhealthyHttpStatuses=(fa=(ma=n.healthchecks.passive)==null?void 0:ma.unhealthy)!=null&&fa.http_statuses?l(((ga=(ya=n.healthchecks.passive)==null?void 0:ya.unhealthy)==null?void 0:ga.http_statuses)||[]):He,r},getDefaultUpstreamFields:i,objectsAreEqual:(n,r)=>{try{return JSON.stringify(n)===JSON.stringify(r)}catch{return!1}},cloneDeep:n=>JSON.parse(JSON.stringify(n))}}const Z={useI18n:Zl,useMultiselectCreation:he,useHelpers:fe},oe="/api/runtime_groups/{controlPlaneId}",re="/{workspace}",ne={list:{konnect:`${oe}/upstreams`,kongManager:`${re}/upstreams`},form:{konnect:{getServices:`${oe}/services`,getCertificates:`${oe}/certificates`,validate:`${oe}/v1/schemas/json/upstream/validate`,create:`${oe}/upstreams`,edit:`${oe}/upstreams/{id}`},kongManager:{getServices:`${re}/services`,getCertificates:`${re}/certificates`,validate:`${re}/schemas/upstreams/validate`,create:`${re}/upstreams`,edit:`${re}/upstreams/{id}`}}},mo="",rs={class:"kong-ui-entities-upstreams-list"},ns={class:"upstream-name"},is=e.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.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(t,{emit:o}){var A;const a=t,{i18n:{t:l}}=Z.useI18n(),i=ke.useRouter(),{axiosInstance:m}=ue({headers:(A=a.config)==null?void 0:A.requestHeaders}),b=e.ref(1),V=e.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),n={name:{label:l("upstreams.list.table_headers.name"),searchable:!0,sortable:!0},slots:{label:l("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:l("upstreams.list.table_headers.tags"),sortable:!1}},r=n,y=e.computed(()=>{var K,P;let E=`${a.config.apiBaseUrl}${ne.list[a.config.app]}`;return a.config.app==="konnect"?E=E.replace(/{controlPlaneId}/gi,((K=a.config)==null?void 0:K.controlPlaneId)||""):a.config.app==="kongManager"&&(E=E.replace(/\/{workspace}/gi,(P=a.config)!=null&&P.workspace?`/${a.config.workspace}`:"")),E}),d=e.ref(""),s=e.computed(()=>{const E=a.config.app==="konnect"||a.config.isExactMatch;if(E)return{isExactMatch:E,placeholder:l("upstreams.search.placeholder")};const{name:K,slots:P}=n;return{isExactMatch:E,fields:{name:K,slots:P},schema:a.config.filterSchema}}),{fetcher:x,fetcherState:N}=ze(a.config,y.value),h=()=>{d.value=""},p=()=>{b.value++},S=e.ref(""),w=(E,K)=>{const P=E.id;if(!K(P)){o("copy:error",{entity:E,field:"id",message:l("upstreams.errors.copy")});return}o("copy:success",{entity:E,field:"id",message:l("upstreams.copy.success",{val:P})})},B=(E,K)=>{const P=JSON.stringify(E);if(!K(P)){o("copy:error",{entity:E,message:l("upstreams.errors.copy")});return}o("copy:success",{entity:E,message:l("upstreams.copy.success_brief")})},$=async E=>{var P;await((P=a.canRetrieve)==null?void 0:P.call(a,E))&&i.push(a.config.getViewRoute(E.id))},u=E=>({label:l("upstreams.actions.view"),to:a.config.getViewRoute(E)}),C=E=>({label:l("upstreams.actions.edit"),to:a.config.getEditRoute(E)}),_=e.ref(void 0),q=e.ref(!1),T=e.ref(!1),g=e.ref(""),I=Je(a.config,y.value),H=E=>{_.value=E,q.value=!0},D=()=>{q.value=!1},F=async()=>{var E,K,P;if((E=_.value)!=null&&E.id){T.value=!0;try{await m.delete(I(_.value.id)),T.value=!1,q.value=!1,b.value++,o("delete:success",_.value)}catch(U){g.value=((P=(K=U.response)==null?void 0:K.data)==null?void 0:P.message)||U.message||l("upstreams.errors.delete"),o("error",U)}finally{T.value=!1}}};e.watch(N,E=>{if(E.status===te.Error){S.value=l("upstreams.errors.general"),o("error",E.error);return}S.value=""});const O=e.ref({ctaPath:a.config.createRoute,ctaText:void 0,message:l("upstreams.list.empty_state.description"),title:l("upstreams.title")});return e.onBeforeMount(async()=>{await a.canCreate()&&(O.value.title=l("upstreams.list.empty_state.title"),O.value.ctaText=l("upstreams.actions.create"))}),(E,K)=>{const P=e.resolveComponent("KButton"),U=e.resolveComponent("KBadge"),k=e.resolveComponent("KTruncate"),c=e.resolveComponent("KDropdownItem"),f=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",rs,[e.createVNode(e.unref(Le),{"cache-identifier":t.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":V.value,"empty-state-options":O.value,"enable-entity-actions":"","error-message":S.value,fetcher:e.unref(x),"fetcher-cache-key":b.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:d.value,"table-headers":e.unref(r),onClearSearchInput:h,"onClick:row":K[1]||(K[1]=M=>$(M)),onSort:p},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(Jl),{modelValue:d.value,"onUpdate:modelValue":K[0]||(K[0]=M=>d.value=M),config:s.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(Y),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(P,{appearance:"primary","data-testid":"toolbar-add-upstream",icon:"plus",to:t.config.createRoute},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:e.withCtx(({rowValue:M})=>[e.createElementVNode("span",ns,e.toDisplayString(M),1)]),tags:e.withCtx(({rowValue:M})=>[e.createVNode(k,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M,L=>(e.openBlock(),e.createBlock(U,{key:L,"max-width":"auto"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L),1)]),_:2},1024))),128))]),_:2},1024)]),actions:e.withCtx(({row:M})=>[e.createVNode(f,null,{default:e.withCtx(({copyToClipboard:L})=>[e.createVNode(c,{"data-testid":"action-entity-copy-id",onClick:W=>w(M,L)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(f,null,{default:e.withCtx(({copyToClipboard:L})=>[e.createVNode(c,{"data-testid":"action-entity-copy-json",onClick:W=>B(M,L)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(Y),{"auth-function":()=>t.canRetrieve(M)},{default:e.withCtx(()=>[e.createVNode(c,{"data-testid":"action-entity-view","has-divider":"",item:u(M.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(Y),{"auth-function":()=>t.canEdit(M)},{default:e.withCtx(()=>[e.createVNode(c,{"data-testid":"action-entity-edit",item:C(M.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(Y),{"auth-function":()=>t.canDelete(M)},{default:e.withCtx(()=>[e.createVNode(c,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:L=>H(M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("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"]),e.createVNode(e.unref(je),{"action-pending":T.value,description:e.unref(l)("upstreams.delete.description"),"entity-name":_.value&&(_.value.name||_.value.id),"entity-type":e.unref(be).Upstream,error:g.value,title:e.unref(l)("upstreams.delete.title"),visible:q.value,onCancel:D,onProceed:F},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),fo="",ee=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},cs=ee(is,[["__scopeId","data-v-033bd1ef"]]),ye={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"}}},ds={class:"kong-ui-entities-target-form"},hs={class:"target-form-container"},ps={key:0,class:"target-form-info"},us=e.defineComponent({__name:"TargetForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(t,{emit:o}){var $;const a=t;e.useCssVars(u=>({"2cc5362c":B.value}));const{i18n:{t:l}}=Z.useI18n(),{getMessageFromError:i}=Qe(),{axiosInstance:m}=ue({headers:($=a.config)==null?void 0:$.requestHeaders}),b=e.computed(()=>{var u;return ye.form[a.config.app].edit.replace(/{upstreamId}/gi,((u=a.config)==null?void 0:u.upstreamId)||"")}),V=e.computed(()=>a.targetId?G.Edit:G.Create),n=e.computed(()=>V.value===G.Edit?l("targets.form.edit.title"):l("targets.form.create.title")),r=e.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),y=e.reactive({target:"",weight:100,tags:""}),d={target:"",weight:100,tags:""},s=e.computed(()=>{const u=parseInt(r.fields.weight.toString(),10);return u<0||u>65535}),x=e.computed(()=>JSON.stringify(r.fields)!==JSON.stringify(y)&&!!r.fields.target&&!!r.fields.weight&&!s.value),N=u=>{var C;r.fields.target=(u==null?void 0:u.target)||"",r.fields.weight=(u==null?void 0:u.weight)??"",r.fields.tags=((C=u==null?void 0:u.tags)==null?void 0:C.join(", "))||"",Object.assign(y,r.fields)},h=()=>{r.errorMessage="",o("cancel")},p=e.computed(()=>{var C,_;let u=`${a.config.apiBaseUrl}${ye.form[a.config.app].validate}`;return a.config.app==="konnect"?u=u.replace(/{controlPlaneId}/gi,((C=a.config)==null?void 0:C.controlPlaneId)||""):a.config.app==="kongManager"&&(u=u.replace(/\/{workspace}/gi,(_=a.config)!=null&&_.workspace?`/${a.config.workspace}`:"")),u=u.replace(/{id}/gi,a.targetId),u}),S=e.computed(()=>{var C,_,q,T;let u=`${a.config.apiBaseUrl}${ye.form[a.config.app][V.value]}`;return a.config.app==="konnect"?u=u.replace(/{controlPlaneId}/gi,((C=a.config)==null?void 0:C.controlPlaneId)||"").replace(/{upstreamId}/gi,((_=a.config)==null?void 0:_.upstreamId)||""):a.config.app==="kongManager"&&(u=u.replace(/\/{workspace}/gi,(q=a.config)!=null&&q.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((T=a.config)==null?void 0:T.upstreamId)||"")),u=u.replace(/{id}/gi,a.targetId),u}),w=async()=>{var u,C,_,q,T;try{r.isReadonly=!0,r.errorMessage="";const g={target:r.fields.target,weight:parseInt(r.fields.weight),tags:(_=(C=(u=r.fields.tags)==null?void 0:u.split(","))==null?void 0:C.map(H=>String(H||"").trim()))==null?void 0:_.filter(H=>H!==""),upstream:{id:a.config.upstreamId}};let I;if(await m.post(p.value,g),V.value==="create"?I=await m.post(S.value,g):V.value==="edit"&&(I=((q=a.config)==null?void 0:q.app)==="konnect"?await m.put(S.value,g):await m.patch(S.value,g)),I){const{data:H}=I;r.fields.target=(H==null?void 0:H.name)||"",r.fields.weight=(H==null?void 0:H.weight)??100,r.fields.tags=((T=H==null?void 0:H.tags)==null?void 0:T.join(", "))||"",o("update",H),Object.assign(r.fields,d)}}catch(g){r.errorMessage=i(g),o("error",g)}finally{r.isReadonly=!1}},B=e.computed(()=>r.isReadonly?"inline-flex":"none");return e.watch(()=>a.targetId,()=>{Object.assign(r.fields,d)}),(u,C)=>{const _=e.resolveComponent("KInput"),q=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(q,{"action-button-text":e.unref(l)("targets.form.buttons.save"),"action-pending":!x.value||r.isReadonly,"cancel-button-text":e.unref(l)("targets.form.buttons.cancel"),"is-visible":t.isVisible,title:n.value,onCanceled:h,onProceed:w},{"body-content":e.withCtx(()=>[e.createElementVNode("div",ds,[e.createVNode(e.unref(Re),{config:t.config,"edit-id":t.targetId,"error-message":r.errorMessage,"fetch-url":b.value,"is-readonly":r.isReadonly,onCancel:h,"onFetch:error":C[3]||(C[3]=T=>u.$emit("error",T)),"onFetch:success":N,onLoading:C[4]||(C[4]=T=>u.$emit("loading",T))},{default:e.withCtx(()=>[e.createElementVNode("div",hs,[u.$slots.info?(e.openBlock(),e.createElementBlock("div",ps,[e.renderSlot(u.$slots,"info",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(_,{modelValue:r.fields.target,"onUpdate:modelValue":C[0]||(C[0]=T=>r.fields.target=T),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:e.unref(l)("targets.form.fields.target.label"),"label-attributes":{info:e.unref(l)("targets.form.fields.target.tooltip")},placeholder:e.unref(l)("targets.form.fields.target.placeholder"),readonly:r.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(_,{modelValue:r.fields.weight,"onUpdate:modelValue":C[1]||(C[1]=T=>r.fields.weight=T),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight","error-message":e.unref(l)("targets.errors.weight"),"has-error":s.value,label:e.unref(l)("targets.form.fields.weight.label"),"label-attributes":{info:e.unref(l)("targets.form.fields.weight.tooltip")},max:"65535",min:"0",readonly:r.isReadonly,required:"",type:"number"},null,8,["modelValue","error-message","has-error","label","label-attributes","readonly"]),e.createVNode(_,{modelValue:r.fields.tags,"onUpdate:modelValue":C[2]||(C[2]=T=>r.fields.tags=T),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:e.unref(l)("targets.form.fields.tags.help"),label:e.unref(l)("targets.form.fields.tags.label"),placeholder:e.unref(l)("targets.form.fields.tags.placeholder"),readonly:r.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"])}}}),yo="",et=ee(us,[["__scopeId","data-v-77134304"]]),ms={class:"kong-ui-entities-targets-list"},fs={class:"target-address"},ys=e.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.upstreamId||t.app==="kongManager"&&(typeof t.canMarkHealthy>"u"||typeof t.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(t,{emit:o}){var P;const a=t,{i18n:{t:l}}=Z.useI18n(),{axiosInstance:i}=ue({headers:(P=a.config)==null?void 0:P.requestHeaders}),m=e.ref(1),b=e.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),n={target:{label:l("targets.list.table_headers.target_address"),sortable:!0},weight:{label:l("targets.list.table_headers.weight"),sortable:!0},tags:{label:l("targets.list.table_headers.tags"),sortable:!1}},r=e.computed(()=>{var k,c,f,M;let U=`${a.config.apiBaseUrl}${ye.list[a.config.app]}`;return a.config.app==="konnect"?U=U.replace(/{controlPlaneId}/gi,((k=a.config)==null?void 0:k.controlPlaneId)||"").replace(/{upstreamId}/gi,((c=a.config)==null?void 0:c.upstreamId)||""):a.config.app==="kongManager"&&(U=U.replace(/\/{workspace}/gi,(f=a.config)!=null&&f.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((M=a.config)==null?void 0:M.upstreamId)||"")),U}),{fetcher:y,fetcherState:d}=ze(a.config,r.value),s=()=>{m.value++},x=e.ref(""),N=()=>{O.value=!0},h=(U,k)=>{const c=U.id;if(!k(c)){o("copy:error",{entity:U,field:"id",message:l("targets.errors.copy")});return}o("copy:success",{entity:U,field:"id",message:l("targets.copy.success",{val:c})})},p=(U,k)=>{const c=JSON.stringify(U);if(!k(c)){o("copy:error",{entity:U,message:l("targets.errors.copy")});return}o("copy:success",{entity:U,message:l("targets.copy.success_brief")})},S=U=>{F.value=U,O.value=!0},w=U=>a.config.app==="konnect"?!1:a.config.canMarkHealthy(U),B=U=>a.config.app==="konnect"?!1:a.config.canMarkUnhealthy(U),$=e.ref(void 0),u=e.ref(!1),C=e.ref(!1),_=e.ref(""),q=Je(a.config,r.value),T=U=>{$.value=U,u.value=!0},g=()=>{u.value=!1},I=async()=>{var U,k,c;if((U=$.value)!=null&&U.id){C.value=!0;try{await i.delete(q($.value.id)),C.value=!1,u.value=!1,m.value++,o("delete:success",$.value)}catch(f){_.value=((c=(k=f.response)==null?void 0:k.data)==null?void 0:c.message)||f.message||l("targets.errors.delete"),o("error",f)}finally{C.value=!1}}};e.watch(d,U=>{if(U.status===te.Error){x.value=l("targets.errors.general"),o("error",U.error);return}x.value=""});const H=e.ref({ctaText:void 0,message:l("targets.list.empty_state.description"),title:l("targets.title"),...a.config.createRoute&&{ctaPath:a.config.createRoute}});e.onBeforeMount(async()=>{await a.canCreate()&&(H.value.title=l("targets.list.empty_state.title"),H.value.ctaText=l("targets.actions.create"))});const D=e.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}})),F=e.ref(""),O=e.ref(!1),A=U=>{F.value?o("update:target",U):o("create:target",U),E()},E=()=>{K(),m.value++},K=()=>{O.value=!1,F.value=""};return(U,k)=>{const c=e.resolveComponent("KButton"),f=e.resolveComponent("KBadge"),M=e.resolveComponent("KTruncate"),L=e.resolveComponent("KDropdownItem"),W=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ms,[e.createVNode(e.unref(Le),{"cache-identifier":t.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":b.value,"empty-state-options":H.value,"enable-entity-actions":"","error-message":x.value,fetcher:e.unref(y),"fetcher-cache-key":m.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":e.unref(n),onEmptyStateCtaClicked:k[1]||(k[1]=()=>a.config.createRoute?void 0:N()),onSort:s},{"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(Y),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(c,{appearance:"primary","data-testid":"toolbar-new-target",icon:"plus",to:a.config.createRoute?a.config.createRoute:void 0,onClick:k[0]||(k[0]=()=>a.config.createRoute?void 0:N())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),target:e.withCtx(({rowValue:v})=>[e.createElementVNode("span",fs,e.toDisplayString(v),1)]),tags:e.withCtx(({rowValue:v})=>[e.createVNode(M,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v,J=>(e.openBlock(),e.createBlock(f,{key:J,"max-width":"auto"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(J),1)]),_:2},1024))),128))]),_:2},1024)]),actions:e.withCtx(({row:v})=>[e.createVNode(W,null,{default:e.withCtx(({copyToClipboard:J})=>[e.createVNode(L,{"data-testid":"action-entity-copy-id",onClick:ae=>h(v,J)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(W,null,{default:e.withCtx(({copyToClipboard:J})=>[e.createVNode(L,{"data-testid":"action-entity-copy-json",onClick:ae=>p(v,J)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(Y),{"auth-function":()=>t.canEdit(v)},{default:e.withCtx(()=>[e.createVNode(L,{"data-testid":"action-entity-edit","has-divider":"",onClick:J=>S(v.id)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(Y),{"auth-function":()=>w(v)},{default:e.withCtx(()=>[e.createVNode(L,{"data-testid":"action-target-mark-healthy",onClick:J=>o("health-actions:healthy",v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(Y),{"auth-function":()=>B(v)},{default:e.withCtx(()=>[e.createVNode(L,{"data-testid":"action-target-mark-unhealthy",onClick:J=>o("health-actions:unhealthy",v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(Y),{"auth-function":()=>t.canDelete(v)},{default:e.withCtx(()=>[e.createVNode(L,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:J=>T(v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("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"]),e.createVNode(e.unref(je),{"action-pending":C.value,description:e.unref(l)("targets.delete.description"),"entity-type":e.unref(be).Target,error:_.value,"need-confirm":!1,title:e.unref(l)("targets.delete.title"),visible:u.value,onCancel:g,onProceed:I},null,8,["action-pending","description","entity-type","error","title","visible"]),e.createVNode(et,{config:D.value,"is-visible":O.value,"target-id":F.value,onCancel:K,onUpdate:A},e.createSlots({_:2},[U.$slots["form-info"]?{name:"info",fn:e.withCtx(()=>[e.renderSlot(U.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),go="",gs=ee(ys,[["__scopeId","data-v-aba40390"]]),ks={key:1},bs=e.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(t,{emit:o}){var g,I,H,D;const a=t,{i18nT:l,i18n:{t:i}}=Z.useI18n(),{debouncedQueryChange:m,loading:b,loadItems:V,results:n,allRecords:r}=We(a.config,(I=ne.form[(g=a.config)==null?void 0:g.app])==null?void 0:I.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:y,loading:d,loadItems:s,results:x}=We(a.config,(D=ne.form[(H=a.config)==null?void 0:H.app])==null?void 0:D.getCertificates),N=e.ref(""),h=e.computed(()=>{var F;return!!a.name&&!((F=r.value)!=null&&F.some(O=>O.host===a.name))}),p=e.computed(()=>{var O,A,E;const F=h.value&&a.name.includes((O=N.value)==null?void 0:O.toLowerCase());return(E=n.value)==null?void 0:E.map(K=>({label:K.host,value:K.id})).concat(F?[{label:a.name,value:((A=B.value)==null?void 0:A.value)||a.name}]:[])}),S=e.computed(()=>{var F;return(F=x.value)==null?void 0:F.map(O=>({label:O.id,value:O.id}))}),w=e.ref(""),B=e.ref({value:"",label:""}),$=e.computed(()=>{var F,O;return((F=p.value.find(A=>A.value===w.value))==null?void 0:F.label)||((O=B.value)==null?void 0:O.label)}),u=F=>{N.value=F,m(F)},C=F=>{B.value=F},_=()=>{B.value={value:"",label:""}},q=F=>{w.value=F,o("update:name",$.value)},T=e.ref(!1);return e.onBeforeMount(async()=>{var F,O;try{T.value=!0,await V(),a.name&&(w.value=((O=(F=p.value.find(A=>A.label===a.name))==null?void 0:F.value)==null?void 0:O.toString())||a.name),await s()}finally{T.value=!1}}),(F,O)=>{const A=e.resolveComponent("KSkeleton"),E=e.resolveComponent("KSelect"),K=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(de),{class:"kong-ui-entities-upstreams-general-info",description:e.unref(i)("upstreams.form.general_info.help"),title:e.unref(i)("upstreams.form.general_info.title")},{default:e.withCtx(()=>[T.value?(e.openBlock(),e.createBlock(A,{key:0,type:"form"})):(e.openBlock(),e.createElementBlock("div",ks,[e.createVNode(E,{appearance:"select",autosuggest:"",class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"",items:p.value,label:e.unref(i)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},loading:e.unref(b),"model-value":w.value,placeholder:e.unref(i)("upstreams.form.fields.name.placeholder"),readonly:t.readonly,required:"",width:"100%","onItem:added":C,"onItem:removed":_,onQueryChange:u,"onUpdate:modelValue":q},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),e.createVNode(K,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:e.unref(i)("upstreams.form.fields.host_header.label"),"model-value":t.hostHeader,readonly:t.readonly,type:"text","onUpdate:modelValue":O[0]||(O[0]=P=>o("update:host-header",P))},null,8,["label","model-value","readonly"]),e.createVNode(E,{appearance:"select",autosuggest:"",class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"",items:S.value,label:e.unref(i)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"250px"}},loading:e.unref(d),"model-value":t.clientCertificate,placeholder:e.unref(i)("upstreams.form.fields.client_certificate.placeholder"),readonly:t.readonly,width:"100%",onQueryChange:e.unref(y),"onUpdate:modelValue":O[1]||(O[1]=P=>o("update:client-certificate",P))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),e.createVNode(K,{autocomplete:"off","data-testid":"upstreams-form-tags",help:e.unref(i)("upstreams.form.fields.tags.help"),label:e.unref(i)("upstreams.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250px"}},"model-value":t.tags,placeholder:e.unref(i)("upstreams.form.fields.tags.placeholder"),readonly:t.readonly,type:"text","onUpdate:modelValue":O[2]||(O[2]=P=>o("update:tags",P))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),ko="",Cs=ee(bs,[["__scopeId","data-v-02065a3d"]]),ge={upstreamObject:"https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",loadBalancing:"https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"},_s={class:"fields-group-title"},ws={class:"fields-group-text"},Ss={class:"fields-group-title"},xs={class:"fields-group-text"},Vs=e.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(t,{emit:o}){const a=t,{i18nT:l,i18n:{t:i}}=Z.useI18n(),{inRange:m}=fe(),b=e.ref([{label:i("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:i("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:i("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:i("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1}]),V=e.ref([{label:i("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:i("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:i("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:i("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:i("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:i("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:i("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:i("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);e.watch(()=>a.hashOn,(y,d)=>{d==="header"&&y!==d&&o("update:hash-on-header",""),d==="cookie"&&y!==d&&(o("update:hash-on-cookie",""),o("update:hash-on-cookie-path","/")),d==="query_arg"&&y!==d&&o("update:hash-on-query-argument",""),d==="uri_capture"&&y!==d&&o("update:hash-on-uri-capture",""),(y==="cookie"||y==="none")&&(o("update:hash-fallback","none"),o("update:hash-fallback-header",""),o("update:hash-fallback-query-argument",""),o("update:hash-fallback-uri-capture",""))}),e.watch(()=>a.hashFallback,(y,d)=>{d==="header"&&y!==d&&o("update:hash-fallback-header",""),d==="cookie"&&y!==d&&(o("update:hash-on-cookie",""),o("update:hash-on-cookie-path","/")),d==="query_arg"&&y!==d&&o("update:hash-fallback-query-argument",""),d==="uri_capture"&&y!==d&&o("update:hash-fallback-uri-capture","")});const n=e.computed(()=>a.hashOn==="cookie"||a.hashOn==="none"),r=e.computed(()=>a.slots?m(a.slots,Se,xe)?"":i("upstreams.form.errors.in_range"):"");return(y,d)=>{const s=e.resolveComponent("KExternalLink"),x=e.resolveComponent("KSelect"),N=e.resolveComponent("KInput"),h=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(de),{class:"kong-ui-entities-upstreams-load-balancing",title:e.unref(i)("upstreams.form.load_balancing.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.form.load_balancing.help"))+" ",1),e.createVNode(s,{"hide-icon":"",href:e.unref(ge).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(x,{appearance:"select",class:"algorithm-select",items:b.value,label:e.unref(i)("upstreams.form.fields.algorithm.label"),"model-value":t.algorithm,readonly:t.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=p=>o("update:algorithm",p))},null,8,["items","label","model-value","readonly"]),e.createVNode(N,{autocomplete:"off","data-testid":"upstreams-form-slots","error-message":r.value,"has-error":!!r.value,help:e.unref(i)("upstreams.form.fields.slots.help"),label:e.unref(i)("upstreams.form.fields.slots.label"),max:e.unref(xe),min:e.unref(Se),"model-value":t.slots,readonly:t.readonly,type:"number","onUpdate:modelValue":d[1]||(d[1]=p=>o("update:slots",p))},null,8,["error-message","has-error","help","label","max","min","model-value","readonly"]),e.createVNode(h,null,{body:e.withCtx(()=>[e.createElementVNode("h5",_s,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_on.label")),1),e.createElementVNode("p",ws,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_on.help")),1),e.createVNode(x,{appearance:"select",class:"hash-on-select",items:V.value,label:e.unref(i)("upstreams.form.fields.hash_on.label"),"model-value":t.hashOn,readonly:t.readonly,width:"100%","onUpdate:modelValue":d[2]||(d[2]=p=>o("update:hash-on",p))},null,8,["items","label","model-value","readonly"]),t.hashOn==="header"?(e.openBlock(),e.createBlock(N,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:e.unref(i)("upstreams.form.fields.header.label"),"model-value":t.hashOnHeader,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[3]||(d[3]=p=>o("update:hash-on-header",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),t.hashOn==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(N,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(i)("upstreams.form.fields.cookie.label"),"model-value":t.hashOnCookie,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[4]||(d[4]=p=>o("update:hash-on-cookie",p))},null,8,["label","model-value","readonly"]),e.createVNode(N,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(i)("upstreams.form.fields.cookie_path.label"),"model-value":t.hashOnCookiePath,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[5]||(d[5]=p=>o("update:hash-on-cookie-path",p))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),t.hashOn==="query_arg"?(e.openBlock(),e.createBlock(N,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:e.unref(i)("upstreams.form.fields.query_argument.label"),"model-value":t.hashOnQueryArgument,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[6]||(d[6]=p=>o("update:hash-on-query-argument",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),t.hashOn==="uri_capture"?(e.openBlock(),e.createBlock(N,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:e.unref(i)("upstreams.form.fields.uri_capture.label"),"model-value":t.hashOnUriCapture,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[7]||(d[7]=p=>o("update:hash-on-uri-capture",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(h,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Ss,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_fallback.label")),1),e.createElementVNode("p",xs,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_fallback.help")),1),e.createVNode(x,{appearance:"select",class:"hash-fallback-select",disabled:n.value,items:V.value,label:e.unref(i)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},"model-value":t.hashFallback,readonly:t.readonly,width:"100%","onUpdate:modelValue":d[8]||(d[8]=p=>o("update:hash-fallback",p))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),t.hashFallback==="header"?(e.openBlock(),e.createBlock(N,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:e.unref(i)("upstreams.form.fields.header.label"),"model-value":t.hashFallbackHeader,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[9]||(d[9]=p=>o("update:hash-fallback-header",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),t.hashFallback==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(N,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(i)("upstreams.form.fields.cookie.label"),"model-value":t.hashOnCookie,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[10]||(d[10]=p=>o("update:hash-on-cookie",p))},null,8,["label","model-value","readonly"]),e.createVNode(N,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(i)("upstreams.form.fields.cookie_path.label"),"model-value":t.hashOnCookiePath,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[11]||(d[11]=p=>o("update:hash-on-cookie-path",p))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),t.hashFallback==="query_arg"?(e.openBlock(),e.createBlock(N,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:e.unref(i)("upstreams.form.fields.query_argument.label"),"model-value":t.hashFallbackQueryArgument,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[12]||(d[12]=p=>o("update:hash-fallback-query-argument",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),t.hashFallback==="uri_capture"?(e.openBlock(),e.createBlock(N,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:e.unref(i)("upstreams.form.fields.uri_capture.label"),"model-value":t.hashFallbackUriCapture,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[13]||(d[13]=p=>o("update:hash-fallback-uri-capture",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])}}}),bo="",Ns=ee(Vs,[["__scopeId","data-v-522adce0"]]),Bs={class:"fields-group-title"},Hs={class:"fields-group-text"},Is={class:"fields-group-title"},Ts={class:"fields-group-text"},Es=e.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(t,{emit:o}){const{i18n:{t:a}}=Z.useI18n();return(l,i)=>{const m=e.resolveComponent("KExternalLink"),b=e.resolveComponent("KInputSwitch"),V=e.resolveComponent("KCard"),n=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(de),{class:"kong-ui-entities-upstreams-healthchecks",title:e.unref(a)("upstreams.form.health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(a)("upstreams.form.health_check.help"))+" ",1),e.createVNode(m,{"hide-icon":"",href:e.unref(ge).loadBalancing},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(V,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Bs,e.toDisplayString(e.unref(a)("upstreams.form.fields.active_health_checks.label")),1),e.createElementVNode("p",Hs,e.toDisplayString(e.unref(a)("upstreams.form.fields.active_health_checks.help")),1),e.createVNode(b,{class:"active-health-switch","data-testid":"active-health-switch",disabled:t.readonly,"model-value":t.activeHealthSwitch,onChange:i[0]||(i[0]=r=>o("update:active-health-switch",r))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(V,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Is,e.toDisplayString(e.unref(a)("upstreams.form.fields.passive_health_checks.label")),1),e.createElementVNode("p",Ts,e.toDisplayString(e.unref(a)("upstreams.form.fields.passive_health_checks.help")),1),e.createVNode(b,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:t.readonly,"model-value":t.passiveHealthSwitch,onChange:i[1]||(i[1]=r=>o("update:passive-health-switch",r))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(n,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:e.unref(a)("upstreams.form.fields.healthchecks_threshold.label"),max:e.unref(ts),min:e.unref(es),"model-value":t.healthchecksThreshold,readonly:t.readonly,type:"number","onUpdate:modelValue":i[2]||(i[2]=r=>o("update:healthchecks-threshold",r))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),Co="",Us=ee(Es,[["__scopeId","data-v-7fda4841"]]),qs={key:2},Fs={class:"fields-group-title"},$s={class:"fields-group-text"},Ds={class:"fields-group-title"},Os={class:"fields-group-text"},Ks=e.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(t,{emit:o}){const a=t,{i18n:{t:l}}=Z.useI18n(),{objectsAreEqual:i}=fe(),m=e.ref([{label:l("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),b=e.computed(()=>a.type==="https"||a.type==="grpcs"),V=e.computed(()=>a.type==="tcp"),{trackNewItems:n}=he({replaceId:!0}),{trackNewItems:r}=he({replaceId:!0});e.watch(()=>a.type,(N,h)=>{h==="tcp"&&N!==h&&o("update:tcp-failures","5"),(h==="https"||h==="grpcs")&&N!==h&&(o("update:https-sni",""),o("update:verify-ssl",!1)),h!=="tcp"&&N==="tcp"&&(o("update:http-path","/"),o("update:http-statuses",Ve),o("update:unhealthy-http-statuses",Be))});const y=e.ref([{key:"",values:""}]);e.watch(()=>a.headers,N=>{i(y.value,N)||(y.value=[...N])},{immediate:!0,deep:!0});const d=()=>{o("update:headers",y.value)},s=()=>{y.value.push({key:"",values:""}),d()},x=N=>{N===0&&y.value.length===1?y.value[0]={key:"",values:""}:y.value.splice(N,1),d()};return(N,h)=>{const p=e.resolveComponent("KExternalLink"),S=e.resolveComponent("KSelect"),w=e.resolveComponent("KInput"),B=e.resolveComponent("KCheckbox"),$=e.resolveComponent("KLabel"),u=e.resolveComponent("KIcon"),C=e.resolveComponent("KButton"),_=e.resolveComponent("KMultiselect"),q=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(de),{class:"kong-ui-entities-upstreams-active-healthcheck",title:e.unref(l)("upstreams.form.active_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.active_health_check.help"))+" ",1),e.createVNode(p,{"hide-icon":"",href:e.unref(ge).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>{var T;return[e.createVNode(S,{appearance:"select",class:"active-healthcheck-type-select",items:m.value,label:e.unref(l)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":t.type,readonly:t.readonly,width:"100%","onUpdate:modelValue":h[0]||(h[0]=g=>o("update:type",g))},null,8,["items","label","model-value","readonly"]),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:e.unref(l)("upstreams.form.fields.http_path.label"),"model-value":t.httpPath,readonly:t.readonly,type:"text","onUpdate:modelValue":h[1]||(h[1]=g=>o("update:http-path",g))},null,8,["label","model-value","readonly"])),e.createVNode(w,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:e.unref(l)("upstreams.form.fields.timeout.label"),max:e.unref(ls),min:e.unref(as),"model-value":t.timeout,readonly:t.readonly,type:"number","onUpdate:modelValue":h[2]||(h[2]=g=>o("update:timeout",g))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(w,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:e.unref(l)("upstreams.form.fields.concurrency.label"),max:e.unref(os),min:e.unref(ss),"model-value":t.concurrency,readonly:t.readonly,type:"number","onUpdate:modelValue":h[3]||(h[3]=g=>o("update:concurrency",g))},null,8,["label","max","min","model-value","readonly"]),b.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:e.unref(l)("upstreams.form.fields.https_sni.label"),"model-value":t.httpsSni,readonly:t.readonly,type:"text","onUpdate:modelValue":h[4]||(h[4]=g=>o("update:https-sni",g))},null,8,["label","model-value","readonly"]),e.createVNode(B,{"data-testid":"active-healthcheck-verify-ssl",disabled:t.readonly,label:e.unref(l)("upstreams.form.fields.verify_ssl.label"),"model-value":t.verifySsl,"onUpdate:modelValue":h[5]||(h[5]=g=>o("update:verify-ssl",g))},null,8,["disabled","label","model-value"])],64)):e.createCommentVNode("",!0),((T=t.config)==null?void 0:T.app)==="kongManager"?(e.openBlock(),e.createElementBlock("div",qs,[e.createVNode($,{info:e.unref(l)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(g,I)=>(e.openBlock(),e.createElementBlock("div",{key:`${g.header}_${I}`,class:e.normalizeClass(["headers-row",{"margin-top-6":I>0}])},[e.createVNode(w,{modelValue:y.value[I].key,"onUpdate:modelValue":H=>y.value[I].key=H,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${I+1}`,readonly:t.readonly,type:"text",onBlur:d},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(w,{modelValue:y.value[I].values,"onUpdate:modelValue":H=>y.value[I].values=H,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${I+1}`,readonly:t.readonly,type:"text",onBlur:d},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(C,{appearance:"btn-link",class:"btn-remove","data-testid":"btn-remove-header",onClick:H=>x(I)},{icon:e.withCtx(()=>[e.createVNode(u,{class:"delete-item",icon:"trash"})]),_:2},1032,["onClick"]),y.value&&I===y.value.length-1?(e.openBlock(),e.createBlock(C,{key:0,appearance:"btn-link",class:"btn-add-header","data-testid":"btn-add-header",onClick:s},{icon:e.withCtx(()=>[e.createVNode(u,{color:"$kui-color-text-primary-strong",icon:"plus",size:"22"})]),_:1})):e.createCommentVNode("",!0)],2))),128))])])):e.createCommentVNode("",!0),e.createVNode(q,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Fs,e.toDisplayString(e.unref(l)("upstreams.form.healthy.label")),1),e.createElementVNode("p",$s,e.toDisplayString(e.unref(l)("upstreams.form.healthy.help")),1),e.createVNode(w,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-interval",help:e.unref(l)("upstreams.form.fields.interval.help"),label:e.unref(l)("upstreams.form.fields.interval.label"),max:e.unref(Ze),min:e.unref(Ye),"model-value":t.interval,readonly:t.readonly,type:"number","onUpdate:modelValue":h[6]||(h[6]=g=>o("update:interval",g))},null,8,["help","label","max","min","model-value","readonly"]),e.createVNode(w,{autocomplete:"off","data-testid":"active-healthcheck-successes",label:e.unref(l)("upstreams.form.fields.successes.label"),max:e.unref(se),min:e.unref(le),"model-value":t.successes,readonly:t.readonly,type:"number","onUpdate:modelValue":h[7]||(h[7]=g=>o("update:successes",g))},null,8,["label","max","min","model-value","readonly"]),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-http-statuses","enable-item-creation":"",items:e.unref(me),label:e.unref(l)("upstreams.form.fields.http_statuses.label"),"model-value":t.httpStatuses,readonly:t.readonly,width:"100%","onItem:added":h[8]||(h[8]=g=>e.unref(n)(g,!0)),"onItem:removed":h[9]||(h[9]=g=>e.unref(n)(g,!1)),"onUpdate:modelValue":h[10]||(h[10]=g=>o("update:http-statuses",g))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(q,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Ds,e.toDisplayString(e.unref(l)("upstreams.form.unhealthy.label")),1),e.createElementVNode("p",Os,e.toDisplayString(e.unref(l)("upstreams.form.unhealthy.help")),1),e.createVNode(w,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:e.unref(l)("upstreams.form.fields.interval.help"),label:e.unref(l)("upstreams.form.fields.interval.label"),max:e.unref(Ze),min:e.unref(Ye),"model-value":t.unhealthyInterval,readonly:t.readonly,type:"number","onUpdate:modelValue":h[11]||(h[11]=g=>o("update:unhealthy-interval",g))},null,8,["help","label","max","min","model-value","readonly"]),V.value?(e.openBlock(),e.createBlock(w,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-tcp-failures",label:e.unref(l)("upstreams.form.fields.tcp_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":t.tcpFailures,readonly:t.readonly,type:"number","onUpdate:modelValue":h[12]||(h[12]=g=>o("update:tcp-failures",g))},null,8,["label","max","min","model-value","readonly"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-http-failures",label:e.unref(l)("upstreams.form.fields.http_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":t.httpFailures,readonly:t.readonly,type:"number","onUpdate:modelValue":h[13]||(h[13]=g=>o("update:http-failures",g))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(_,{autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(me),label:e.unref(l)("upstreams.form.fields.http_statuses.label"),"model-value":t.unhealthyHttpStatuses,readonly:t.readonly,width:"100%","onItem:added":h[14]||(h[14]=g=>e.unref(r)(g,!0)),"onItem:removed":h[15]||(h[15]=g=>e.unref(r)(g,!1)),"onUpdate:modelValue":h[16]||(h[16]=g=>o("update:unhealthy-http-statuses",g))},null,8,["items","label","model-value","readonly"])],64)),e.createVNode(w,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:e.unref(l)("upstreams.form.fields.timeouts.label"),max:e.unref(Xe),min:e.unref(Ge),"model-value":t.unhealthyTimeouts,readonly:t.readonly,type:"number","onUpdate:modelValue":h[17]||(h[17]=g=>o("update:unhealthy-timeouts",g))},null,8,["label","max","min","model-value","readonly"])]),_:1})]}),_:1},8,["title"])}}}),_o="",Ps=ee(Ks,[["__scopeId","data-v-18b80e62"]]),Ms={class:"fields-group-title"},As={class:"fields-group-text"},vs={class:"fields-group-title"},Rs={class:"fields-group-text"},Ls=e.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(t,{emit:o}){const a=t,{i18n:{t:l}}=Z.useI18n(),i=e.ref([{label:l("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),m=e.computed(()=>a.type==="tcp"),{trackNewItems:b}=he({replaceId:!0}),{trackNewItems:V}=he({replaceId:!0});return e.watch(()=>a.type,(n,r)=>{r==="tcp"&&n!==r&&o("update:tcp-failures","5"),r!=="tcp"&&n==="tcp"&&(o("update:http-statuses",Ne),o("update:unhealthy-http-statuses",He))}),(n,r)=>{const y=e.resolveComponent("KExternalLink"),d=e.resolveComponent("KSelect"),s=e.resolveComponent("KInput"),x=e.resolveComponent("KMultiselect"),N=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(de),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:e.unref(l)("upstreams.form.passive_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.passive_health_check.help"))+" ",1),e.createVNode(y,{"hide-icon":"",href:e.unref(ge).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(d,{appearance:"select",class:"passive-healthcheck-type-select",items:i.value,label:e.unref(l)("upstreams.form.fields.passive_health_check_type.label"),"model-value":t.type,readonly:t.readonly,width:"100%","onUpdate:modelValue":r[0]||(r[0]=h=>o("update:type",h))},null,8,["items","label","model-value","readonly"]),e.createVNode(N,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Ms,e.toDisplayString(e.unref(l)("upstreams.form.passive_healthy.label")),1),e.createElementVNode("p",As,e.toDisplayString(e.unref(l)("upstreams.form.passive_healthy.help")),1),e.createVNode(s,{autocomplete:"off","data-testid":"passive-healthcheck-successes",label:e.unref(l)("upstreams.form.fields.successes.label"),max:e.unref(se),min:e.unref(le),"model-value":t.successes,readonly:t.readonly,type:"number","onUpdate:modelValue":r[1]||(r[1]=h=>o("update:successes",h))},null,8,["label","max","min","model-value","readonly"]),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(x,{key:0,class:"margin-top-6 passive-healthcheck-http-statuses","enable-item-creation":"",items:e.unref(me),label:e.unref(l)("upstreams.form.fields.http_statuses.label"),"model-value":t.httpStatuses,readonly:t.readonly,width:"100%","onItem:added":r[2]||(r[2]=h=>e.unref(b)(h,!0)),"onItem:removed":r[3]||(r[3]=h=>e.unref(b)(h,!1)),"onUpdate:modelValue":r[4]||(r[4]=h=>o("update:http-statuses",h))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(N,null,{body:e.withCtx(()=>[e.createElementVNode("h5",vs,e.toDisplayString(e.unref(l)("upstreams.form.passive_unhealthy.label")),1),e.createElementVNode("p",Rs,e.toDisplayString(e.unref(l)("upstreams.form.passive_unhealthy.help")),1),e.createVNode(s,{autocomplete:"off","data-testid":"passive-healthcheck-timeouts",label:e.unref(l)("upstreams.form.fields.timeouts.label"),max:e.unref(Xe),min:e.unref(Ge),"model-value":t.timeouts,readonly:t.readonly,type:"number","onUpdate:modelValue":r[5]||(r[5]=h=>o("update:timeouts",h))},null,8,["label","max","min","model-value","readonly"]),m.value?(e.openBlock(),e.createBlock(s,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-tcp-failures",label:e.unref(l)("upstreams.form.fields.tcp_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":t.tcpFailures,readonly:t.readonly,type:"number","onUpdate:modelValue":r[6]||(r[6]=h=>o("update:tcp-failures",h))},null,8,["label","max","min","model-value","readonly"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-http-failures",label:e.unref(l)("upstreams.form.fields.http_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":t.httpFailures,readonly:t.readonly,type:"number","onUpdate:modelValue":r[7]||(r[7]=h=>o("update:http-failures",h))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(x,{autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(me),label:e.unref(l)("upstreams.form.fields.http_statuses.label"),"model-value":t.unhealthyHttpStatuses,readonly:t.readonly,width:"100%","onItem:added":r[8]||(r[8]=h=>e.unref(V)(h,!0)),"onItem:removed":r[9]||(r[9]=h=>e.unref(V)(h,!1)),"onUpdate:modelValue":r[10]||(r[10]=h=>o("update:unhealthy-http-statuses",h))},null,8,["items","label","model-value","readonly"])],64))]),_:1})]),_:1},8,["title"])}}}),wo="",js=ee(Ls,[["__scopeId","data-v-6d6854e3"]]),Js={class:"kong-ui-entities-upstreams-form"},Qs=e.defineComponent({__name:"UpstreamsForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string"||!(t!=null&&t.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:o}){var U;const a=t,{inRange:l,stringToNumberArray:i,upstreamsResponseToFields:m,getDefaultUpstreamFields:b,objectsAreEqual:V,cloneDeep:n}=fe(),{axiosInstance:r}=ue({headers:(U=a.config)==null?void 0:U.requestHeaders}),{getMessageFromError:y}=Qe(),d=ke.useRouter(),s=e.reactive({fields:b(),readonly:!1,errorMessage:""}),x=e.reactive(b()),N=e.computed(()=>!V(s.fields,x)),h=k=>{s.fields.activeHealthCheck.interval=k?"5":"0",s.fields.activeHealthCheck.successes=k?"5":"0",s.fields.activeHealthCheck.httpFailures=k?"5":"0",s.fields.activeHealthCheck.unhealthyInterval=k?"5":"0"},p=k=>{s.fields.passiveHealthCheck.timeouts=k?"5":"0",s.fields.passiveHealthCheck.successes=k?"80":"0"},S=e.computed(()=>s.fields.slots?l(s.fields.slots,Se,xe):!0),w=e.computed(()=>s.fields.hashOn==="header"?!!s.fields.hashOnHeader:!0),B=e.computed(()=>s.fields.hashOn==="cookie"||s.fields.hashFallback==="cookie"?!!s.fields.hashOnCookie:!0),$=e.computed(()=>s.fields.hashOn==="cookie"||s.fields.hashFallback==="cookie"?!!s.fields.hashOnCookiePath:!0),u=e.computed(()=>s.fields.hashOn==="query_arg"?!!s.fields.hashOnQueryArgument:!0),C=e.computed(()=>s.fields.hashOn==="uri_capture"?!!s.fields.hashOnUriCapture:!0),_=e.computed(()=>s.fields.hashFallback==="header"?!!s.fields.hashFallbackHeader:!0),q=e.computed(()=>s.fields.hashFallback==="query_arg"?!!s.fields.hashFallbackQueryArgument:!0),T=e.computed(()=>s.fields.hashFallback==="uri_capture"?!!s.fields.hashFallbackUriCapture:!0),g=e.computed(()=>!!s.fields.name&&S.value&&w.value&&B.value&&$.value&&u.value&&C.value&&_.value&&q.value&&T.value),I=e.computed(()=>a.upstreamId?G.Edit:G.Create),H=e.computed(()=>{var k,c;return(c=ne.form[(k=a.config)==null?void 0:k.app])==null?void 0:c.edit}),D=k=>{Object.assign(s.fields,m(k)),Object.assign(x,n(s.fields))},F=()=>{var k;d.push(((k=a.config)==null?void 0:k.cancelRoute)||{name:"upstreams-list"})},O=k=>{o("loading",k)},A=k=>{o("error",k)},E=()=>{var c,f,M,L,W;const k={name:s.fields.name,slots:Number(s.fields.slots),algorithm:s.fields.algorithm,hash_on:s.fields.hashOn,hash_fallback:s.fields.hashFallback,healthchecks:{}};return s.fields.hostHeader&&(k.host_header=s.fields.hostHeader),s.fields.clientCertificate&&(k.client_certificate={id:s.fields.clientCertificate}),s.fields.healthchecksThreshold&&(k.healthchecks.threshold=Number(s.fields.healthchecksThreshold)),s.fields.tags&&(k.tags=(f=(c=s.fields.tags.split(","))==null?void 0:c.map(v=>String(v||"").trim()))==null?void 0:f.filter(v=>v!=="")),s.fields.hashOn==="header"&&(k.hash_on_header=s.fields.hashOnHeader),(s.fields.hashOn==="cookie"||s.fields.hashFallback==="cookie")&&(k.hash_on_cookie=s.fields.hashOnCookie,k.hash_on_cookie_path=s.fields.hashOnCookiePath),s.fields.hashOn==="query_arg"&&(k.hash_on_query_arg=s.fields.hashOnQueryArgument),s.fields.hashOn==="uri_capture"&&(k.hash_on_uri_capture=s.fields.hashOnUriCapture),s.fields.hashFallback==="header"&&(k.hash_fallback_header=s.fields.hashFallbackHeader),s.fields.hashFallback==="query_arg"&&(k.hash_fallback_query_arg=s.fields.hashFallbackQueryArgument),s.fields.hashFallback==="uri_capture"&&(k.hash_fallback_uri_capture=s.fields.hashFallbackUriCapture),s.fields.activeHealthSwitch?(k.healthchecks.active={type:s.fields.activeHealthCheck.type,healthy:{},unhealthy:{}},s.fields.activeHealthCheck.timeout&&(k.healthchecks.active.timeout=Number(s.fields.activeHealthCheck.timeout)),s.fields.activeHealthCheck.concurrency&&(k.healthchecks.active.concurrency=Number(s.fields.activeHealthCheck.concurrency)),s.fields.activeHealthCheck.type!=="tcp"&&s.fields.activeHealthCheck.httpPath&&(k.healthchecks.active.http_path=s.fields.activeHealthCheck.httpPath),((M=a.config)==null?void 0:M.app)==="kongManager"&&(s.fields.activeHealthCheck.headers.length===0?k.healthchecks.active.headers=[]:k.healthchecks.active.headers=s.fields.activeHealthCheck.headers.reduce((v,J)=>{var ae,pe;return J.key?{...v,[J.key]:(pe=(ae=J.values.split(","))==null?void 0:ae.map(ie=>String(ie||"").trim()))==null?void 0:pe.filter(ie=>ie!=="")}:{...v}},{})),(s.fields.activeHealthCheck.type==="https"||s.fields.activeHealthCheck.type==="grpcs")&&s.fields.activeHealthCheck.httpsSni&&(k.healthchecks.active.https_sni=s.fields.activeHealthCheck.httpsSni),(s.fields.activeHealthCheck.type==="https"||s.fields.activeHealthCheck.type==="grpcs")&&(k.healthchecks.active.https_verify_certificate=s.fields.activeHealthCheck.verifySsl),s.fields.activeHealthCheck.interval&&(k.healthchecks.active.healthy.interval=Number(s.fields.activeHealthCheck.interval)),s.fields.activeHealthCheck.successes&&(k.healthchecks.active.healthy.successes=Number(s.fields.activeHealthCheck.successes)),s.fields.activeHealthCheck.type!=="tcp"&&s.fields.activeHealthCheck.httpStatuses&&(k.healthchecks.active.healthy.http_statuses=i(s.fields.activeHealthCheck.httpStatuses)),s.fields.activeHealthCheck.unhealthyInterval&&(k.healthchecks.active.unhealthy.interval=Number(s.fields.activeHealthCheck.unhealthyInterval)),s.fields.activeHealthCheck.unhealthyTimeouts&&(k.healthchecks.active.unhealthy.timeouts=Number(s.fields.activeHealthCheck.unhealthyTimeouts)),s.fields.activeHealthCheck.type!=="tcp"&&s.fields.activeHealthCheck.unhealthyHttpStatuses&&(k.healthchecks.active.unhealthy.http_statuses=i(s.fields.activeHealthCheck.unhealthyHttpStatuses)),s.fields.activeHealthCheck.type!=="tcp"&&s.fields.activeHealthCheck.httpFailures&&(k.healthchecks.active.unhealthy.http_failures=Number(s.fields.activeHealthCheck.httpFailures)),s.fields.activeHealthCheck.type==="tcp"&&s.fields.activeHealthCheck.tcpFailures&&(k.healthchecks.active.unhealthy.tcp_failures=Number(s.fields.activeHealthCheck.tcpFailures))):((L=a.config)==null?void 0:L.app)==="kongManager"&&I.value===G.Edit&&(k.healthchecks.active={type:s.fields.activeHealthCheck.type,headers:{},healthy:{interval:0},unhealthy:{interval:0}}),s.fields.passiveHealthSwitch?(k.healthchecks.passive={type:s.fields.passiveHealthCheck.type,healthy:{},unhealthy:{}},s.fields.passiveHealthCheck.successes&&(k.healthchecks.passive.healthy.successes=Number(s.fields.passiveHealthCheck.successes)),s.fields.passiveHealthCheck.type!=="tcp"&&s.fields.passiveHealthCheck.httpStatuses&&(k.healthchecks.passive.healthy.http_statuses=i(s.fields.passiveHealthCheck.httpStatuses)),s.fields.passiveHealthCheck.timeouts&&(k.healthchecks.passive.unhealthy.timeouts=Number(s.fields.passiveHealthCheck.timeouts)),s.fields.passiveHealthCheck.type!=="tcp"&&s.fields.passiveHealthCheck.unhealthyHttpStatuses&&(k.healthchecks.passive.unhealthy.http_statuses=i(s.fields.passiveHealthCheck.unhealthyHttpStatuses)),s.fields.passiveHealthCheck.type!=="tcp"&&s.fields.passiveHealthCheck.httpFailures&&(k.healthchecks.passive.unhealthy.http_failures=Number(s.fields.passiveHealthCheck.httpFailures)),s.fields.passiveHealthCheck.type==="tcp"&&s.fields.passiveHealthCheck.tcpFailures&&(k.healthchecks.passive.unhealthy.tcp_failures=Number(s.fields.passiveHealthCheck.tcpFailures))):((W=a.config)==null?void 0:W.app)==="kongManager"&&I.value===G.Edit&&(k.healthchecks.passive={type:s.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}),k},K=k=>{var f,M,L,W,v,J;let c=`${(f=a.config)==null?void 0:f.apiBaseUrl}${ne.form[(M=a.config)==null?void 0:M.app][k]}`;return((L=a.config)==null?void 0:L.app)==="konnect"?c=c.replace(/{controlPlaneId}/gi,((W=a.config)==null?void 0:W.controlPlaneId)||""):((v=a.config)==null?void 0:v.app)==="kongManager"&&(c=c.replace(/\/{workspace}/gi,(J=a.config)!=null&&J.workspace?`/${a.config.workspace}`:"")),c=c.replace(/{id}/gi,a.upstreamId),c},P=async()=>{var k;try{s.readonly=!0,await r.post(K("validate"),E());let c;I.value===G.Create?c=await r.post(K("create"),E()):I.value===G.Edit&&(c=((k=a.config)==null?void 0:k.app)==="konnect"?await r.put(K("edit"),E()):await r.patch(K("edit"),E())),o("update",c==null?void 0:c.data)}catch(c){s.errorMessage=y(c),o("error",c)}finally{s.readonly=!1}};return(k,c)=>(e.openBlock(),e.createElementBlock("div",Js,[e.createVNode(e.unref(Re),{"can-submit":g.value&&N.value,config:t.config,"edit-id":t.upstreamId,"error-message":s.errorMessage,"fetch-url":H.value,"is-readonly":s.readonly,onCancel:F,"onFetch:error":A,"onFetch:success":D,onLoading:O,onSubmit:P},{default:e.withCtx(()=>[e.createVNode(Cs,{"client-certificate":s.fields.clientCertificate,"onUpdate:clientCertificate":c[0]||(c[0]=f=>s.fields.clientCertificate=f),"host-header":s.fields.hostHeader,"onUpdate:hostHeader":c[1]||(c[1]=f=>s.fields.hostHeader=f),name:s.fields.name,"onUpdate:name":c[2]||(c[2]=f=>s.fields.name=f),tags:s.fields.tags,"onUpdate:tags":c[3]||(c[3]=f=>s.fields.tags=f),config:t.config,readonly:s.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),e.createVNode(Ns,{algorithm:s.fields.algorithm,"onUpdate:algorithm":c[4]||(c[4]=f=>s.fields.algorithm=f),"hash-fallback":s.fields.hashFallback,"onUpdate:hashFallback":c[5]||(c[5]=f=>s.fields.hashFallback=f),"hash-fallback-header":s.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":c[6]||(c[6]=f=>s.fields.hashFallbackHeader=f),"hash-fallback-query-argument":s.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":c[7]||(c[7]=f=>s.fields.hashFallbackQueryArgument=f),"hash-fallback-uri-capture":s.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":c[8]||(c[8]=f=>s.fields.hashFallbackUriCapture=f),"hash-on":s.fields.hashOn,"onUpdate:hashOn":c[9]||(c[9]=f=>s.fields.hashOn=f),"hash-on-cookie":s.fields.hashOnCookie,"onUpdate:hashOnCookie":c[10]||(c[10]=f=>s.fields.hashOnCookie=f),"hash-on-cookie-path":s.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":c[11]||(c[11]=f=>s.fields.hashOnCookiePath=f),"hash-on-header":s.fields.hashOnHeader,"onUpdate:hashOnHeader":c[12]||(c[12]=f=>s.fields.hashOnHeader=f),"hash-on-query-argument":s.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":c[13]||(c[13]=f=>s.fields.hashOnQueryArgument=f),"hash-on-uri-capture":s.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":c[14]||(c[14]=f=>s.fields.hashOnUriCapture=f),slots:s.fields.slots,"onUpdate:slots":c[15]||(c[15]=f=>s.fields.slots=f),readonly:s.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"]),e.createVNode(Us,{"active-health-switch":s.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[c[16]||(c[16]=f=>s.fields.activeHealthSwitch=f),h],"healthchecks-threshold":s.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":c[17]||(c[17]=f=>s.fields.healthchecksThreshold=f),"passive-health-switch":s.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[c[18]||(c[18]=f=>s.fields.passiveHealthSwitch=f),p],readonly:s.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),s.fields.activeHealthSwitch?(e.openBlock(),e.createBlock(Ps,{key:0,concurrency:s.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":c[19]||(c[19]=f=>s.fields.activeHealthCheck.concurrency=f),headers:s.fields.activeHealthCheck.headers,"onUpdate:headers":c[20]||(c[20]=f=>s.fields.activeHealthCheck.headers=f),"http-failures":s.fields.activeHealthCheck.httpFailures,"onUpdate:httpFailures":c[21]||(c[21]=f=>s.fields.activeHealthCheck.httpFailures=f),"http-path":s.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":c[22]||(c[22]=f=>s.fields.activeHealthCheck.httpPath=f),"http-statuses":s.fields.activeHealthCheck.httpStatuses,"onUpdate:httpStatuses":c[23]||(c[23]=f=>s.fields.activeHealthCheck.httpStatuses=f),"https-sni":s.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":c[24]||(c[24]=f=>s.fields.activeHealthCheck.httpsSni=f),interval:s.fields.activeHealthCheck.interval,"onUpdate:interval":c[25]||(c[25]=f=>s.fields.activeHealthCheck.interval=f),successes:s.fields.activeHealthCheck.successes,"onUpdate:successes":c[26]||(c[26]=f=>s.fields.activeHealthCheck.successes=f),"tcp-failures":s.fields.activeHealthCheck.tcpFailures,"onUpdate:tcpFailures":c[27]||(c[27]=f=>s.fields.activeHealthCheck.tcpFailures=f),timeout:s.fields.activeHealthCheck.timeout,"onUpdate:timeout":c[28]||(c[28]=f=>s.fields.activeHealthCheck.timeout=f),type:s.fields.activeHealthCheck.type,"onUpdate:type":c[29]||(c[29]=f=>s.fields.activeHealthCheck.type=f),"unhealthy-http-statuses":s.fields.activeHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":c[30]||(c[30]=f=>s.fields.activeHealthCheck.unhealthyHttpStatuses=f),"unhealthy-interval":s.fields.activeHealthCheck.unhealthyInterval,"onUpdate:unhealthyInterval":c[31]||(c[31]=f=>s.fields.activeHealthCheck.unhealthyInterval=f),"unhealthy-timeouts":s.fields.activeHealthCheck.unhealthyTimeouts,"onUpdate:unhealthyTimeouts":c[32]||(c[32]=f=>s.fields.activeHealthCheck.unhealthyTimeouts=f),"verify-ssl":s.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":c[33]||(c[33]=f=>s.fields.activeHealthCheck.verifySsl=f),config:t.config,readonly:s.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"])):e.createCommentVNode("",!0),s.fields.passiveHealthSwitch?(e.openBlock(),e.createBlock(js,{key:1,"http-failures":s.fields.passiveHealthCheck.httpFailures,"onUpdate:httpFailures":c[34]||(c[34]=f=>s.fields.passiveHealthCheck.httpFailures=f),"http-statuses":s.fields.passiveHealthCheck.httpStatuses,"onUpdate:httpStatuses":c[35]||(c[35]=f=>s.fields.passiveHealthCheck.httpStatuses=f),successes:s.fields.passiveHealthCheck.successes,"onUpdate:successes":c[36]||(c[36]=f=>s.fields.passiveHealthCheck.successes=f),"tcp-failures":s.fields.passiveHealthCheck.tcpFailures,"onUpdate:tcpFailures":c[37]||(c[37]=f=>s.fields.passiveHealthCheck.tcpFailures=f),timeouts:s.fields.passiveHealthCheck.timeouts,"onUpdate:timeouts":c[38]||(c[38]=f=>s.fields.passiveHealthCheck.timeouts=f),type:s.fields.passiveHealthCheck.type,"onUpdate:type":c[39]||(c[39]=f=>s.fields.passiveHealthCheck.type=f),"unhealthy-http-statuses":s.fields.passiveHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":c[40]||(c[40]=f=>s.fields.passiveHealthCheck.unhealthyHttpStatuses=f),readonly:s.readonly},null,8,["http-failures","http-statuses","successes","tcp-failures","timeouts","type","unhealthy-http-statuses","readonly"])):e.createCommentVNode("",!0)]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])]))}}),So="",zs=ee(Qs,[["__scopeId","data-v-810fb7b7"]]),Ws=e.createElementVNode("code",null,"10",-1),Gs=e.createElementVNode("code",null,"65536",-1),Xs={"data-testid":"client_certificate-plain-text"},Ys=e.defineComponent({__name:"UpstreamsConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(t){const o=t,{i18n:{t:a},i18nT:l}=Z.useI18n(),i=e.computed(()=>ne.form[o.config.app].edit),m=e.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:j.Basic,tooltip:a("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:j.Basic},hash_on:{order:7,section:j.Basic},hash_on_header:{order:8,section:j.Basic},hash_on_uri_capture:{order:9,section:j.Basic},hash_on_query_arg:{order:10,section:j.Basic,label:`${a("upstreams.form.fields.hash_on.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:j.Basic},hash_on_cookie_path:{order:12,section:j.Basic},healthchecks:{order:13,section:j.Basic,type:R.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(b,V)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(xl),{config:t.config,"config-schema":m.value,"fetch-url":i.value,"hide-title":t.hideTitle,"onCopy:success":V[0]||(V[0]=n=>b.$emit("copy:success",n)),"onFetch:error":V[1]||(V[1]=n=>b.$emit("fetch:error",n)),"onFetch:success":V[2]||(V[2]=n=>b.$emit("fetch:success",n)),onLoading:V[3]||(V[3]=n=>b.$emit("loading",n))},{"name-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":e.withCtx(({row:n})=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(n.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:e.withCtx(()=>[Ws]),max:e.withCtx(()=>[Gs]),_:1})]),"hash_fallback-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:e.withCtx(({rowValue:n})=>[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[e.createElementVNode("span",null,e.toDisplayString(n==null?void 0:n.id),1)])])]),_:1},8,["config","config-schema","fetch-url","hide-title"])]))}});z.TargetForm=et,z.TargetsList=gs,z.UpstreamsConfigCard=Ys,z.UpstreamsForm=zs,z.UpstreamsList=cs,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(z,e){typeof exports=="object"&&typeof module<"u"?e(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"],e):(z=typeof globalThis<"u"?globalThis:z||self,e(z["kong-ui-entities-upstreams-targets"]={},z.Vue,z.axios,z["kong-ui-public-i18n"],z.Kongponents,z.VueRouter))})(this,function(z,e,ka,ce,ba,ke){"use strict";var be=(t=>(t.GatewayService="service",t.Route="route",t.Consumer="consumer",t.ConsumerGroup="consumer group",t.Plugin="plugin",t.Upstream="upstream",t.Certificate="certificate",t.CACertificate="ca certificate",t.SNI="SNI",t.Key="key",t.KeySet="key set",t.Vault="vault",t.Application="application",t.Developer="developer",t.acls="ACL Credential",t["basic-auth"]="Basic Auth Credential",t["key-auth"]="Key Auth Credential",t["key-auth-enc"]="Key Auth Encrypted Credential",t.oauth2="OAuth 2.0 Credential",t["hmac-auth"]="HMAC Credential",t.jwt="JWT Credential",t.Target="target",t.Policy="policy",t))(be||{}),G=(t=>(t.Edit="edit",t.Create="create",t))(G||{}),te=(t=>(t[t.Loading=0]="Loading",t[t.Idle=1]="Idle",t[t.NoResults=2]="NoResults",t[t.Error=3]="Error",t))(te||{}),R=(t=>(t.ID="id",t.IdArray="id-array",t.Text="plain-text",t.Date="date",t.Redacted="redacted",t.RedactedArray="redacted-array",t.Json="json",t.JsonArray="json-array",t.BadgeTag="badge-tag",t.BadgeStatus="badge-status",t.BadgeMethod="badge-method",t.LinkInternal="link-internal",t.LinkExternal="link-external",t))(R||{}),j=(t=>(t.Basic="basic",t.Advanced="advanced",t.Plugin="plugin",t))(j||{});function Ce(t={}){return{axiosInstance:ka.create({withCredentials:!0,timeout:3e4,...t})}}function Ca(){return{debounce:(t,o)=>{let a;return(...l)=>{clearTimeout(a),a=window==null?void 0:window.setTimeout(()=>{t(...l)},o)}}}}const _e="khcp-user-table-preferences",_a={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function wa(){const t=a=>{if(typeof a=="string")try{return JSON.parse(a)}catch(l){console.error("useTablePreferences(tryParseJson)",l);return}},o=()=>{const a=t(localStorage.getItem(_e));return!a||!Object.keys(a).length?new Map:new Map(Object.entries(a))};return{setTablePreferences:(a,l)=>{try{const i=o();i.set(a,l),localStorage.setItem(_e,JSON.stringify(Object.fromEntries(i.entries())))}catch(i){console.error("useTablePreferences(setTablePreferences)",i)}},getTablePreferences:a=>{const l=o();return(l==null?void 0:l.get(a))||void 0||_a},deleteAllTablePreferences:()=>{localStorage.removeItem(_e)}}}const Sa={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},xa={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},Va={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},Na={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}"}},Ba={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},Ha={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},Ia={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Ta={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"}},Ea={deleteModal:Sa,baseForm:xa,baseTable:Va,baseConfigCard:Na,filter:Ba,debouncedFilter:Ha,errors:Ia,toggleModal:Ta};function we(){const t=ce.createI18n("en-us",Ea);return{i18n:t,i18nT:ce.i18nTComponent(t)}}function Ua(t,o,a,l={fetchedItemsKey:"data",searchKeys:["id"]}){a||(a="100");const{axiosInstance:i}=Ce({headers:t.requestHeaders}),{i18n:{t:f}}=we(),{debounce:b}=Ca(),V=b(async w=>{await S(w)},200),n=e.ref(!1),r=e.ref(""),y=e.ref(""),d=e.ref([]),s=e.ref(void 0),x=e.unref(o);let N=`${t.apiBaseUrl}${x}`;t.app==="konnect"?N=N.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(N=N.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:""));const h=async()=>{try{n.value=!0;const{data:w}=await i.get(`${N}?size=${a}`);w!=null&&w.next||(s.value=l.fetchedItemsKey in w?w[l.fetchedItemsKey]:[]),d.value=l.fetchedItemsKey in w?w[l.fetchedItemsKey]:[]}catch{d.value=[],r.value=f("debouncedFilter.errors.fetch")}finally{n.value=!1}},p=e.ref(""),S=async w=>{var B,$;if(p.value!==w)if(p.value=w||"",s.value===void 0)try{n.value=!0,r.value="",y.value="";let u=N+"";w&&(u+=`/${w}`);const{data:C}=await i.get(`${u}?size=${a}`);l.fetchedItemsKey in C?d.value=C[l.fetchedItemsKey]:C!=null&&C.id?d.value=[C]:d.value=[]}catch(u){((B=u==null?void 0:u.response)==null?void 0:B.status)===404?y.value=f("debouncedFilter.errors.invalid"):(d.value=[],r.value=f("debouncedFilter.errors.fetch"))}finally{n.value=!1}else n.value=!0,y.value="",w?(d.value=($=s.value)==null?void 0:$.filter(u=>{var C;let _=!1;for(const q of l.searchKeys){const T=typeof u[q]=="string"?(C=u[q])==null?void 0:C.toLowerCase():u[q];T!=null&&T.includes(w.toLowerCase())&&(_=!0)}return _}),(!d.value||!d.value.length)&&(y.value=f("debouncedFilter.errors.invalid"))):d.value=s.value,n.value=!1};return{loading:n,error:r,validationError:y,results:d,allRecords:s,loadItems:h,debouncedQueryChange:V}}function qa(t,o){const a=e.unref(o),l=e.computed(()=>t.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${a}`):new URL(a));return l.value.search="",i=>`${l.value.href}/${i}`}function Fa(){const{i18n:{t}}=we();return{getMessageFromError:o=>{var a,l,i;if(!o)return t("errors.unexpected");if((a=o==null?void 0:o.response)!=null&&a.data){if(o.response.data.detail)return o.response.data.detail;if((l=o.response.data.details)!=null&&l.length)return o.response.data.details.map(f=>{let b=t("errors.unexpected");return f.messages&&typeof f.messages=="object"&&f.messages.length&&(b=f.messages.join(", ")),f.field?`${f.field} - ${b}`:b}).join("; ");if(o.response.data.message){const{message:f}=o.response.data;return Array.isArray(f)?(i=f[0])!=null&&i.constraints?Object.values(f[0].constraints)[0]:f[0]:f}if(typeof o.response.data=="string")return o.response.data;if(typeof o.response.data=="object")return Object.keys(o.response.data).map(f=>`${f} ${o.response.data[f]}`).join(", ")}return o.message||t("errors.unexpected")}}}function Te(t,o){const a=e.ref(e.unref(t)),l=e.ref(e.unref(o)),i=e.computed(()=>!!(a.value.app==="konnect"||a.value.isExactMatch)),f=e.computed(()=>l.value.startsWith("/")?new URL(`${window.location.origin}${l.value}`):new URL(l.value));return b=>{const{page:V,pageSize:n,offset:r,sortColumnKey:y,sortColumnOrder:d,query:s}=b;try{let x=new URL(f.value.href);return i.value&&s?(x.search="",x=new URL(`${x.href}/${s}/`)):(i.value||new URLSearchParams(s).forEach((N,h)=>{x.searchParams.append(h,N)}),y&&x.searchParams.append("sort_by",y),d==="desc"&&x.searchParams.append("sort_desc","1"),x.searchParams.append("size",String(n))),r&&V!==1&&x.searchParams.append("offset",String(r)),x.href}catch(x){return console.error("RouteList(fetcher)",x),l.value}}}function $a(t,o,a="data"){const l=e.unref(o),{axiosInstance:i}=Ce({headers:t.requestHeaders}),f=Te(t,l),b=e.ref({status:te.Idle});return{fetcher:async V=>{try{b.value={status:te.Loading};const n=f(V),{data:r}=await i.get(n),y=a&&a.replace(/[^\w-_]/gi,"");let d;r[y]&&Array.isArray(r[y])?d=r[y]:d=Object.keys(r).length?[r]:[];const s={data:d,total:d.length,...r.offset?{pagination:{offset:r.offset}}:null};return b.value={status:te.Idle,response:s},s}catch(n){const r={data:[],total:0};return V.query&&n.response.status===404?(b.value={status:te.NoResults,response:r,error:n},r):(b.value={status:te.Error,response:r,error:n},r)}},fetcherState:b}}function Da(){return{convertKeyToTitle:(t,o="_")=>t?t.split(o).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):""}}const Ee=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ue=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const o=t.match(Ee);if(!o)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return o.shift(),o},qe=t=>t==="*"||t==="x"||t==="X",Fe=t=>{const o=parseInt(t,10);return isNaN(o)?t:o},Oa=(t,o)=>typeof t!=typeof o?[String(t),String(o)]:[t,o],Ka=(t,o)=>{if(qe(t)||qe(o))return 0;const[a,l]=Oa(Fe(t),Fe(o));return a>l?1:a<l?-1:0},$e=(t,o)=>{for(let a=0;a<Math.max(t.length,o.length);a++){const l=Ka(t[a]||"0",o[a]||"0");if(l!==0)return l}return 0},Pa=(t,o)=>{const a=Ue(t),l=Ue(o),i=a.pop(),f=l.pop(),b=$e(a,l);return b!==0?b:i&&f?$e(i.split("."),f.split(".")):i||f?i?-1:1:0},De=(t,o,a)=>{Ma(a);const l=Pa(t,o);return Oe[a].includes(l)},Oe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Ke=Object.keys(Oe),Ma=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(Ke.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${Ke.join("|")}`)},Aa=t=>typeof t=="string"&&/^[v\d]/.test(t)&&Ee.test(t);function va(t){const{gatewayInfo:o,supportedRange:a}=t;if(!o)return!0;const{edition:l,version:i}=o;if(!Aa(i))return console.error("Invalid version"),!1;const f=a[l];if(!f)return!1;const[b,V]=f;return!(b&&De(i,b,"<")||V&&De(i,V,">"))}const Q={useAxios:Ce,useDebouncedFilter:Ua,useDeleteUrlBuilder:qa,useErrors:Fa,useFetcher:$a,useFetchUrlBuilder:Te,useStringHelpers:Da,useI18n:we,useGatewayFeatureSupported:va},Ra={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},La="Copy to clipboard",ja={message:Ra,iconTitle:La},Ja="kong-ui-copy-uuid-notify",Qa={class:"kong-ui-copy-uuid"},za=["title"],Wa=["onClick"],Pe=15,Ga=e.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},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:t=>["uuid","hidden","redacted","deleted"].includes(t)}},emits:["success","error"],setup(t,{emit:o}){const a=t,{t:l}=ce.createI18n("en-us",ja),i=a.notify||e.inject(Ja,()=>{}),f=e.computed(()=>!!(a.tooltip&&a.successTooltip)),b=e.ref(a.tooltip),V=e.computed(()=>a.tooltip?{label:b.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),n=e.computed(()=>a.format==="redacted"?"*****":a.format==="deleted"?`*${a.uuid.substring(0,5)}`:a.uuid),r=d=>{b.value=d,setTimeout(()=>{b.value=a.tooltip},1800)},y=d=>{if(!d(a.uuid)){typeof i=="function"&&i({type:"error",message:l("message.fail")}),f.value?r(l("message.fail")):o("error",a.uuid);return}const s=a.uuid.length>Pe,x=a.format==="hidden"||a.format==="redacted"?l("message.success.prefix"):`"${a.uuid.substring(0,Pe)+(s?"...":"")}"`;typeof i=="function"&&i({type:"success",message:`${x}${l("message.success.content")}`}),f.value?r(a.successTooltip):o("success",a.uuid)};return(d,s)=>{const x=e.resolveComponent("KIcon"),N=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Qa,[t.format!=="hidden"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":"copy-id",title:t.uuid},[e.createElementVNode("div",{class:e.normalizeClass(["uuid-container",t.truncated?"truncated-uuid":null,t.useMono?"mono":null])},e.toDisplayString(n.value),3)],8,za)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tooltip?"KTooltip":"div"),e.mergeProps(V.value,{class:"uuid-icon-wrapper"}),{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:e.withModifiers(p=>y(h),["stop"])},[e.createVNode(x,{class:"uuid-icon",color:t.iconColor,"hide-title":!!t.tooltip||void 0,icon:"copy",size:"16",title:e.unref(l)("iconTitle")},null,8,["color","hide-title","title"])],8,Wa)]),_:1})]),_:1},16))])}}}),Xa=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},Me=Xa(Ga,[["__scopeId","data-v-e4ea1359"]]),Ya={key:0,class:"config-card-fieldset-title"},Za=e.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(t){const o=t,{i18n:{t:a}}=Q.useI18n(),{convertKeyToTitle:l}=Q.useStringHelpers(),i=e.computed(()=>o.item.key??"json-array-item"),f=e.computed(()=>o.item.value??o.item),b=e.computed(()=>{const n=JSON.parse(JSON.stringify(f.value));return o.isArrayItem&&delete n.name,n}),V=e.computed(()=>{var n;return o.isArrayItem?(n=f.value)!=null&&n.name?l(f.value.name,"_"):a("baseConfigCard.general.entryTitle",{index:o.index}):""});return(n,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.isArrayItem?"fieldset":"div"),{class:e.normalizeClass(t.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:e.withCtx(()=>[t.isArrayItem?(e.openBlock(),e.createElementBlock("legend",Ya,[e.createElementVNode("b",null,e.toDisplayString(V.value),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(b.value),(y,d)=>(e.openBlock(),e.createBlock(ve,{key:`${i.value}-property-${d}`,item:{key:y,label:e.unref(l)(y),value:b.value[y]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),X=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},Ae=X(Za,[["__scopeId","data-v-68ca83ec"]]),el=X(e.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(t){const{i18n:{t:o}}=Q.useI18n();return(a,l)=>{const i=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{appearance:"btn-link",class:"navigation-button",onClick:l[0]||(l[0]=f=>a.$emit("navigation-click",t.item))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.value||e.unref(o)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-7410504d"]]),tl=e.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(t){const{i18n:{t:o}}=Q.useI18n();return(a,l)=>{const i=e.resolveComponent("KBadge");return e.openBlock(),e.createBlock(i,{appearance:t.status?"success":"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.status?e.unref(o)("baseConfigCard.statusBadge.enabledLabel"):e.unref(o)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),al="#0044f4",ll="#e0e4ea",sl="#3a3f51",ol="1px",rl={class:"config-card-details-row"},nl=["data-testid"],il=["data-testid"],cl=["data-testid"],dl=["data-testid"],hl={key:1},pl=["data-testid"],ul=["data-testid"],fl=["data-testid"],ml=["data-testid"],yl=["title"],gl={name:"ConfigCardItem",components:{CopyUuid:Me,JsonCardItem:Ae,StatusBadge:tl,InternalLinkItem:el}},kl=e.defineComponent({...gl,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(t,{emit:o}){const a=t;e.useCssVars(d=>({"2c6ac268":r.value?"none":`solid ${e.unref(ol)} ${e.unref(ll)}`,c7a65802:n.value&&b.value?"block":"flex","778426fe":n.value&&b.value?"100%":a.slim?"50%":"25%","777f9b48":n.value&&b.value?"100%":a.slim?"50%":"75%"}));const l=e.useSlots(),{i18n:{t:i,formatUnixTimeStamp:f}}=Q.useI18n(),b=e.computed(()=>a.item.value!==void 0&&a.item.value!==null&&a.item.value!==""),V=e.computed(()=>!!(a.item.tooltip||l["label-tooltip"])),n=e.computed(()=>a.item.type===R.Json||a.item.type===R.JsonArray),r=e.computed(()=>a.item.type===R.JsonArray),y=e.computed(()=>{switch(a.item.type){case R.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${a.item.key}-copy-uuid`,"success-tooltip":i("baseConfigCard.copy.success"),tooltip:i("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,uuid:a.item.value,notify:()=>{}}};case R.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":i("baseConfigCard.copy.success"),tooltip:i("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,notify:()=>{}}};case R.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${a.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":i("baseConfigCard.copy.success"),tooltip:i("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,uuid:a.item.value,notify:()=>{}}};case R.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":i("baseConfigCard.copy.success"),tooltip:i("baseConfigCard.copy.tooltip",{label:a.item.label}),truncated:!1,notify:()=>{}}};case R.Date:return{tag:"div",attrs:{"data-testid":`${a.item.key}-date`},text:f(a.item.value)};case R.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${a.item.key}-badge-status`,status:a.item.value}};case R.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case R.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case R.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${a.item.key}-internal-link`,item:a.item,onNavigationClick:d=>{o("navigation-click",d)}}};case R.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${a.item.key}-external-link`,href:a.item.value},text:a.item.value};case R.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${a.item.key}-json-content`,item:a.item}};case R.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}}});return(d,s)=>{const x=e.resolveComponent("KLabel"),N=e.resolveComponent("KBadge"),h=e.resolveComponent("KMethodBadge");return e.openBlock(),e.createElementBlock("div",rl,[e.createElementVNode("div",{class:"config-card-details-label","data-testid":`${t.item.key}-label`},[e.renderSlot(d.$slots,"label",{item:t.item},()=>[e.createVNode(x,{"tooltip-attributes":{maxWidth:"500px"}},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.label)+" ",1)]),_:2},[V.value?{name:"tooltip",fn:e.withCtx(()=>[e.createElementVNode("div",{"data-testid":`${t.item.key}-label-tooltip`},[e.renderSlot(d.$slots,"label-tooltip",{},()=>[e.createTextVNode(e.toDisplayString(t.item.tooltip),1)],!0)],8,il)]),key:"0"}:void 0]),1024)],!0)],8,nl),e.createElementVNode("div",{class:"config-card-details-value","data-testid":`${t.item.key}-property-value`},[e.renderSlot(d.$slots,t.item.key,{rowValue:t.item.value},()=>[b.value?(e.openBlock(),e.createElementBlock("div",hl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value.tag),e.normalizeProps(e.guardReactiveProps(y.value.attrs)),{default:e.withCtx(()=>[y.value.additionalComponent==="KBadge"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-badge-tags`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(p,S)=>(e.openBlock(),e.createBlock(N,{key:`${t.item.key}-badge-tag-${S}`,class:"config-badge","data-testid":`${t.item.key}-badge-tag-${S}`,"truncation-tooltip":p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,pl)):e.createCommentVNode("",!0),y.value.additionalComponent==="CopyUuid"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${t.item.key}-copy-uuid-array`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(p,S)=>(e.openBlock(),e.createBlock(e.unref(Me),e.mergeProps(y.value.childAttrs,{key:`${t.item.key}-copy-uuid-${S}`,"data-testid":`${t.item.key}-copy-uuid-${S}`,uuid:p}),null,16,["data-testid","uuid"]))),128))],8,ul)):y.value.additionalComponent==="KMethodBadge"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${t.item.key}-badge-methods`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(p,S)=>(e.openBlock(),e.createBlock(h,{key:`${t.item.key}-badge-method-${S}`,class:"config-badge","data-testid":`${t.item.key}-badge-method-${S}`,"is-rounded":"",label:p,method:e.unref(ba.MethodsArray).includes(p.toLowerCase())?p.toLowerCase():"custom"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,fl)):e.createCommentVNode("",!0),y.value.additionalComponent==="JsonCardItem"?(e.openBlock(),e.createElementBlock("div",{key:3,"data-testid":`${a.item.key}-json-array-content`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(p,S)=>(e.openBlock(),e.createBlock(Ae,{key:`json-array-item-${S}`,index:S,"is-array-item":"",item:p},null,8,["index","item"]))),128))],8,ml)):(e.openBlock(),e.createElementBlock("span",{key:4,class:e.normalizeClass(["attrs-data-text",{truncated:t.truncated}]),title:t.truncated?t.item.value:void 0},e.toDisplayString(y.value.text),11,yl))]),_:1},16))])):(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-no-value`}," – ",8,dl))],!0)],8,cl)])}}}),ve=X(kl,[["__scopeId","data-v-a3c5ab01"]]),bl={"data-testid":"config-card-title"},Cl={class:"config-card-actions"},_l={class:"config-card-details-section"},wl=["data-testid"],Sl={key:0,class:"config-card-prop-section-title"},xl=X(e.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.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}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(t,{emit:o}){var a;const l=t,i=e.useSlots(),{i18n:{t:f}}=Q.useI18n(),{getMessageFromError:b}=Q.useErrors(),{convertKeyToTitle:V}=Q.useStringHelpers(),{axiosInstance:n}=Q.useAxios({headers:(a=l.config)==null?void 0:a.requestHeaders}),r={id:{type:R.ID,label:f("baseConfigCard.commonFields.id_label"),order:0,section:j.Basic},name:{order:1,section:j.Basic},enabled:{type:R.BadgeStatus,order:2,section:j.Basic},updated_at:{type:R.Date,label:f("baseConfigCard.commonFields.updated_at_label"),order:3,section:j.Basic},created_at:{type:R.Date,label:f("baseConfigCard.commonFields.created_at_label"),order:4,section:j.Basic},tags:{type:R.BadgeTag,order:-1,section:j.Basic}},y=e.ref(!1),d=e.ref(!1),s=e.ref(""),x=e.ref(),N=e.computed(()=>{var u,C,_;if(!x.value)return[];const q=[],T=Object.keys(x.value).length;for(const g in x.value){const I=(C=(u=l.configSchema)==null?void 0:u[g])==null?void 0:C.order,H=(_=r[g])==null?void 0:_.order;let D=T;(H||H===0)&&(D=H===-1?T+1:H),I&&(D=I===-1?T+1:I),q.push([g,D])}return q.sort(function(g,I){return g[1]-I[1]}),q.map(g=>{var I,H;const D=g[0],F=(I=x.value)==null?void 0:I[D],O=((H=l.configSchema)==null?void 0:H[D])||{},A=r[D];return{key:D,value:F,hidden:O.hidden||!1,type:O.type??((A==null?void 0:A.type)||R.Text),label:O.label??((A==null?void 0:A.label)||V(D)),tooltip:O.tooltip??((A==null?void 0:A.tooltip)||void 0),section:O.section??((A==null?void 0:A.section)||j.Advanced)}}).filter(g=>!g.hidden&&g.key!==l.pluginConfigKey)}),h=e.computed(()=>{var u,C;if(!x.value||!l.pluginConfigKey)return[];const _=x.value[l.pluginConfigKey]||{},q=Object.keys(_).length,T=[];for(const g in _){const I=(C=(u=l.pluginConfigSchema)==null?void 0:u[g])==null?void 0:C.order,H=_[g];let D=H!=null&&H!==""?q-1:q;I&&(D=I===-1?q+1:I),T.push([g,D])}return T.sort(function(g,I){return g[1]-I[1]}),T.map(g=>{var I;const H=g[0],D=_[H],F=((I=l.pluginConfigSchema)==null?void 0:I[H])||{};return{key:H,value:D,hidden:F.hidden||!1,type:F.type??R.Text,label:F.label??V(H),tooltip:F.tooltip??void 0,section:j.Plugin}}).filter(g=>!g.hidden)}),p=e.computed(()=>{var u,C,_,q;return{basic:(u=N.value)==null?void 0:u.filter(T=>T.section===j.Basic),advanced:(C=N.value)==null?void 0:C.filter(T=>T.section===j.Advanced),plugin:(q=h.value)==null?void 0:q.concat((_=N.value)==null?void 0:_.filter(T=>T.section===j.Plugin))}}),S=e.computed(()=>{const u=[];return p.value.basic.length&&u.push("basic"),p.value.advanced.length&&u.push("advanced"),p.value.plugin.length&&u.push("plugin"),u}),w=u=>!!(u.tooltip||i[`${u.key}-label-tooltip`]),B=e.computed(()=>{var u,C;let _=`${l.config.apiBaseUrl}${l.fetchUrl}`;return l.config.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,((u=l.config)==null?void 0:u.controlPlaneId)||""):l.config.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,(C=l.config)!=null&&C.workspace?`/${l.config.workspace}`:"")),_=_.replace(/{id}/gi,l.config.entityId),_}),$=u=>{x.value&&u(JSON.stringify(x.value))?o("copy:success",x.value):o("copy:error")};return e.watch(y,u=>{o("loading",u)},{immediate:!0}),e.onBeforeMount(async()=>{d.value=!1,y.value=!0;try{const{data:u}=await n.get(B.value);if(l.dataKey)if(typeof u[l.dataKey]<"u")x.value={...u[l.dataKey]};else throw new Error(f("errors.dataKeyUndefined",{dataKey:l.dataKey}));else x.value={...u};Object.keys(l.configSchema).filter(C=>l.configSchema[C].forceShow).forEach(C=>{x.value&&typeof x.value[C]>"u"&&(x.value[C]=null)}),o("fetch:success",u)}catch(u){const C=b(u);s.value=C.startsWith("code")?f("baseConfigCard.errors.load"):C,d.value=!0,o("fetch:error",u)}finally{y.value=!1}}),(u,C)=>{const _=e.resolveComponent("KButton"),q=e.resolveComponent("KClipboardProvider"),T=e.resolveComponent("KSkeleton"),g=e.resolveComponent("KEmptyState"),I=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(I,{"border-variant":"noBorder",class:"kong-ui-entity-base-config-card"},e.createSlots({actions:e.withCtx(()=>[e.createElementVNode("div",Cl,[e.renderSlot(u.$slots,"actions",{},void 0,!0),e.createVNode(q,null,{default:e.withCtx(({copyToClipboard:H})=>[!y.value&&!d.value?(e.openBlock(),e.createBlock(_,{key:0,appearance:"btn-link","data-testid":"json-copy-button",onClick:D=>$(H)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:1})])]),body:e.withCtx(()=>[y.value?(e.openBlock(),e.createBlock(T,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):d.value?(e.openBlock(),e.createBlock(g,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",_l,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,H=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${H}-props`,class:e.normalizeClass(`config-card-details-${H}-props`),"data-testid":`config-card-details-${H}-props`},[H!=="basic"?(e.openBlock(),e.createElementBlock("div",Sl,e.toDisplayString(H==="advanced"?e.unref(f)("baseConfigCard.sections.advanced"):e.unref(f)("baseConfigCard.sections.plugin")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value[H],D=>(e.openBlock(),e.createBlock(ve,{key:D.key,item:D},e.createSlots({label:e.withCtx(()=>[e.renderSlot(u.$slots,`${D.key}-label`,{row:D},void 0,!0)]),[D.key]:e.withCtx(({rowValue:F})=>[e.renderSlot(u.$slots,D.key,{row:D,rowValue:F},void 0,!0)]),_:2},[w(D)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(u.$slots,`${D.key}-label-tooltip`,{row:D},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,wl))),128))])]),_:2},[t.hideTitle?void 0:{name:"title",fn:e.withCtx(()=>[e.createElementVNode("div",bl,[e.renderSlot(u.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-8ede8e2e"]]),Vl=["onReset","onSubmit"],Nl={class:"form-actions","data-testid":"form-actions"},Re=X(e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.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(t,{emit:o}){var a;const l=t,i=ke.useRouter(),{i18n:{t:f}}=Q.useI18n(),{getMessageFromError:b}=Q.useErrors(),{axiosInstance:V}=Q.useAxios({headers:(a=l.config)==null?void 0:a.requestHeaders}),n=e.ref(!1),r=e.ref(!1),y=e.ref(""),d=e.computed(()=>l.canSubmit===!1||l.isReadonly),s=e.computed(()=>{var p,S;if(!l.editId)return"";let w=`${l.config.apiBaseUrl}${l.fetchUrl}`;return l.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((p=l.config)==null?void 0:p.controlPlaneId)||""):l.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(S=l.config)!=null&&S.workspace?`/${l.config.workspace}`:"")),w=w.replace(/{id}/gi,l.editId),w}),x=()=>{l.config.cancelRoute?i.push(l.config.cancelRoute):N()},N=()=>{o("cancel")},h=()=>{d.value||o("submit")};return e.watch(()=>n.value,p=>{o("loading",p)},{immediate:!0}),e.onBeforeMount(async()=>{if(l.editId)try{r.value=!1,n.value=!0;const{data:p}=await V.get(s.value);o("fetch:success",p)}catch(p){const S=b(p);y.value=S.startsWith("code")?f("baseForm.errors.edit"):S,r.value=!0,o("fetch:error",p)}finally{n.value=!1}}),(p,S)=>{const w=e.resolveComponent("KSkeleton"),B=e.resolveComponent("KEmptyState"),$=e.resolveComponent("KAlert"),u=e.resolveComponent("KButton"),C=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(C,{class:"kong-ui-entity-base-form"},{body:e.withCtx(()=>[n.value?(e.openBlock(),e.createBlock(w,{key:0,type:"form"})):r.value?(e.openBlock(),e.createBlock(B,{key:1,"cta-text":e.unref(f)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":x,"is-error":!0},{message:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(y.value),1)]),_:1},8,["cta-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:e.withModifiers(N,["prevent"]),onSubmit:e.withModifiers(h,["prevent"])},[e.renderSlot(p.$slots,"default",{},void 0,!0),t.errorMessage?(e.openBlock(),e.createBlock($,{key:0,"alert-message":t.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):e.createCommentVNode("",!0),e.createElementVNode("div",Nl,[e.renderSlot(p.$slots,"form-actions",{},()=>[e.createVNode(u,{appearance:"outline","data-testid":"form-cancel",disabled:t.isReadonly,type:"reset"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),e.createVNode(u,{appearance:"primary","data-testid":"form-submit",disabled:d.value,type:"submit"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,Vl))]),_:3})}}}),[["__scopeId","data-v-bffcae34"]]),Bl={key:0},Hl=X(e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(t){const o=t,a=e.computed(()=>{var h;return((h=o.rowEl)==null?void 0:h.querySelector(`[data-testid="${o.keyName}"]`))||null}),l=e.computed(()=>{var h;return((h=a.value)==null?void 0:h.querySelector('[role="button"]'))||null}),i=e.computed(()=>{var h,p;const S=(h=o.rowEl)==null?void 0:h.querySelectorAll("td");return S?((p=S[0])==null?void 0:p.getAttribute("data-testid"))===o.keyName:!1});let f;const b=()=>{f&&(f.disconnect(),f=void 0)},V=()=>{var h,p,S;r.value=((h=l.value)==null?void 0:h.getBoundingClientRect().width)||0,y.value=((p=a.value)==null?void 0:p.clientWidth)||0,d.value=((S=n.value)==null?void 0:S.innerText)||""},n=e.ref({}),r=e.ref(0),y=e.ref(0),d=e.ref(""),s=e.computed(()=>[l.value,a.value]),x=e.watch(s,h=>{if(i.value&&(b(),"ResizeObserver"in window&&window)){f=new ResizeObserver(p=>{window.requestAnimationFrame(()=>{!Array.isArray(p)||!p.length||V()})});for(const p of h)p&&f.observe(p)}},{immediate:!0,flush:"post",deep:!0}),N=e.computed(()=>i.value?r.value>y.value:!1);return e.onMounted(()=>{V()}),e.onUnmounted(()=>{x()}),(h,p)=>{const S=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:n,class:"content-wrapper"},[i.value?(e.openBlock(),e.createElementBlock("span",Bl,[e.createVNode(S,{disabled:!N.value,label:d.value,"max-width":"300",placement:"bottomStart"},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default",{},void 0,!0)]),_:3},8,["disabled","label"])])):e.renderSlot(h.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-f8a220e9"]]),Il={class:"toolbar-container"},Tl={key:0,class:"toolbar-button-container"},El=["data-testid"],Le=X(e.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,default:""},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:""}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(t,{emit:o}){const a=t,{i18n:{t:l}}=Q.useI18n(),i=e.computed(()=>a.cacheIdentifier||a.preferencesStorageKey),f=B=>B.hasData||!!a.query,b=e.computed(()=>{const B=[];return Object.keys(a.tableHeaders).forEach($=>{const u=a.tableHeaders[$];B.push({label:u.label??$,key:$,sortable:u.sortable??!1})}),a.enableEntityActions&&B.push({key:"actions",hideLabel:!0}),B}),V=B=>({"data-rowid":B.id,"data-testid":B.name,...a.rowAttributes(B)}),n=e.ref({}),r=B=>{var $;return($=n.value)==null?void 0:$.$el.querySelector(`[data-rowid="${B.id}"]`)},y=B=>{const $={"data-testid":B.headerKey,...a.cellAttributes(B)};return B.colIndex===0&&($.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),$},d=()=>{o("empty-state-cta-clicked"),s()},s=()=>{o("clear-search-input")},x=(B,$)=>{o("click:row",$)},N=B=>{o("sort",B)},{setTablePreferences:h,getTablePreferences:p}=wa(),S=e.computed(()=>{const B=p(a.preferencesStorageKey);return{...a.initialFetcherParams,...B}}),w=B=>{a.preferencesStorageKey&&h(a.preferencesStorageKey,B)};return(B,$)=>{const u=e.resolveComponent("KIcon"),C=e.resolveComponent("KButton"),_=e.resolveComponent("KDropdownMenu"),q=e.resolveComponent("KTable"),T=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(T,{class:"kong-ui-entity-base-table",title:t.title},{body:e.withCtx(()=>[e.createVNode(q,{ref_key:"tableRefs",ref:n,"cache-identifier":i.value,"cell-attrs":y,"disable-pagination-page-jump":t.disablePaginationPageJump,"disable-sorting":t.disableSorting,"empty-state-action-button-icon":t.query?"":"plus","empty-state-action-message":t.query?e.unref(l)("baseTable.emptyState.noSearchResultsCtaText"):t.emptyStateOptions.ctaText,"empty-state-action-route":t.query?"":t.emptyStateOptions.ctaPath,"empty-state-icon":t.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":t.query?e.unref(l)("baseTable.emptyState.noSearchResultsMessage"):t.emptyStateOptions.message,"empty-state-title":t.query?e.unref(l)("baseTable.emptyState.noSearchResultsTitle"):t.emptyStateOptions.title,"enable-client-sort":t.enableClientSort,"error-state-title":t.errorMessage,fetcher:t.fetcher,"fetcher-cache-key":String(t.fetcherCacheKey),"has-error":!!t.errorMessage,headers:b.value,"hide-pagination-when-optional":"","initial-fetcher-params":S.value,"is-loading":t.isLoading,"pagination-type":t.paginationType,"row-attrs":V,"search-input":t.query,onKtableEmptyStateCtaClicked:d,"onRow:click":x,onSort:$[0]||($[0]=g=>N(g)),"onUpdate:tablePreferences":w},e.createSlots({toolbar:e.withCtx(({state:g})=>[e.withDirectives(e.createElementVNode("div",Il,[e.renderSlot(B.$slots,"toolbar-filter",{},void 0,!0),B.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",Tl,[e.renderSlot(B.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)],512),[[e.vShow,f(g)]])]),actions:e.withCtx(({row:g,rowKey:I,rowValue:H})=>[e.createElementVNode("div",{class:"actions-container","data-testid":g.name},[e.createVNode(_,{"kpop-attributes":{placement:"bottomEnd"},width:t.dropdownMenuWidth},{items:e.withCtx(()=>[e.renderSlot(B.$slots,"actions",{row:g,rowKey:I,rowValue:H},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(C,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:e.withCtx(()=>[e.createVNode(u,{color:e.unref(sl),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,El)]),_:2},[e.renderList(t.tableHeaders,(g,I)=>({name:I,fn:e.withCtx(({row:H,rowKey:D,rowValue:F})=>[e.createVNode(Hl,{"key-name":String(I),"row-el":r(H)},{default:e.withCtx(()=>[e.renderSlot(B.$slots,I,{row:H,rowKey:D,rowValue:F},()=>[e.createTextVNode(e.toDisplayString(F),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-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-a598b1d9"]]),Ul={key:0,class:"kong-ui-entity-delete-error"},ql={key:1,class:"description"},je=X(e.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(t,{emit:o}){const a=t,{i18nT:l}=Q.useI18n(),i=e.computed(()=>a.needConfirm?a.entityName:""),f=()=>{o("cancel")},b=()=>{o("proceed")};return(V,n)=>{const r=e.resolveComponent("KAlert"),y=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(y,{"action-button-text":"Yes, delete","action-pending":t.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":i.value,"is-visible":t.visible,title:t.title,type:"danger",onCanceled:f,onProceed:b},{"body-content":e.withCtx(()=>[t.error?(e.openBlock(),e.createElementBlock("div",Ul,[e.createVNode(r,{appearance:"danger"},{alertMessage:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(l),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.entityType),1)]),_:2},[a.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),a.description||V.$slots.description?(e.openBlock(),e.createElementBlock("div",ql,[e.renderSlot(V.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(a.description),1)],!0)])):e.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),Fl={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},$l={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},Dl=["fill"],Ol={mask:"url(#mask0_180_20349)"},Kl=["fill"],Pl=e.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${al})`}},setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("svg",Fl,[e.createElementVNode("mask",$l,[e.createElementVNode("rect",{fill:t.color,height:"20",width:"20"},null,8,Dl)]),e.createElementVNode("g",Ol,[e.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:t.color},null,8,Kl)])]))}}),Ml={key:1,class:"kong-ui-entity-filter"},Al={class:"menu-item-title"},vl={class:"menu-item-indicator"},Rl={class:"menu-item-body"},Ll=["for"],jl={class:"menu-item-buttons"},Jl=X(e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:o}){const a=t,{i18n:{t:l}}=Q.useI18n(),i=e.ref(!1),f=e.ref({}),b=e.computed(()=>{const p=[];return new URLSearchParams(a.modelValue).forEach((S,w)=>{S!==""&&p.push(w)}),p}),V=e.computed(()=>{const p=a.config.fields;return Object.keys(p).filter(S=>p[S].searchable).map(S=>({label:p[S].label||S,value:S}))});e.watch(()=>a.modelValue,p=>{f.value={},new URLSearchParams(p).forEach((S,w)=>{f.value[w]=S})});const n=()=>{i.value=!i.value},r=p=>{o("update:modelValue",p)},y=p=>`filter-${p}`,d=p=>{var S,w;return(((w=(S=a.config.schema)==null?void 0:S[p])==null?void 0:w.values)??[]).map(B=>({value:B,label:B}))},s=p=>{var S,w;return((w=(S=a.config.schema)==null?void 0:S[p])==null?void 0:w.type)??"text"},x=p=>{f.value={...f.value,[p]:""},h()},N=()=>{f.value={},h(!0)},h=(p=!1)=>{const S=Object.keys(f.value).reduce((w,B)=>(f.value[B]&&(w[B]=`${f.value[B]}`),w),{});p&&(i.value=!1),o("update:modelValue",new URLSearchParams(S).toString())};return(p,S)=>{const w=e.resolveComponent("KInput"),B=e.resolveComponent("KButton"),$=e.resolveComponent("KSelect"),u=e.resolveComponent("KMenuItem"),C=e.resolveComponent("KMenu");return t.config.isExactMatch?(e.openBlock(),e.createBlock(w,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":t.modelValue,placeholder:t.config.placeholder,"onUpdate:modelValue":r},{icon:e.withCtx(()=>[e.createVNode(Pl)]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",Ml,[e.createVNode(B,{appearance:"btn-link","data-testid":"filter-button",icon:"filter",onClick:n},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("filter.filterButtonText"))+" "+e.toDisplayString(b.value.length>0?`(${b.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:n},null,512),[[e.vShow,i.value]]),e.withDirectives(e.createVNode(C,{class:"kong-ui-entity-filter-menu"},{body:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(_,q)=>(e.openBlock(),e.createBlock(u,{key:_.value,"data-testid":_.value,expandable:"","last-menu-item":q===V.value.length-1},{itemTitle:e.withCtx(()=>[e.createElementVNode("span",Al,[e.createTextVNode(e.toDisplayString(_.label)+" ",1),e.withDirectives(e.createElementVNode("span",vl,null,512),[[e.vShow,b.value.includes(_.value)]])])]),itemBody:e.withCtx(()=>{var T,g;return[e.createElementVNode("div",Rl,[e.createElementVNode("label",{class:"menu-item-label",for:y(_.value)},e.toDisplayString(e.unref(l)("filter.fieldLabel")),9,Ll),((g=(T=t.config.schema)==null?void 0:T[_.value])==null?void 0:g.type)==="select"?(e.openBlock(),e.createBlock($,{key:0,id:y(_.value),modelValue:f.value[_.value],"onUpdate:modelValue":I=>f.value[_.value]=I,appearance:"select",items:d(_.value),placeholder:e.unref(l)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(e.openBlock(),e.createBlock(w,{key:1,id:y(_.value),modelValue:f.value[_.value],"onUpdate:modelValue":I=>f.value[_.value]=I,autocomplete:"off",placeholder:e.unref(l)("filter.inputPlaceholder"),size:"small",type:s(_.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),e.createElementVNode("div",jl,[e.createVNode(B,{appearance:"btn-link","data-testid":"apply-filter",size:"small",onClick:S[0]||(S[0]=I=>h(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("filter.applyButtonText")),1)]),_:1}),e.createVNode(B,{appearance:"btn-link","data-testid":"clear-filter",size:"small",onClick:I=>x(_.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:e.withCtx(()=>[e.createVNode(B,{onClick:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("filter.clearAllButtonText")),1)]),_:1})]),_:1},512),[[e.vShow,i.value]])]))}}}),[["__scopeId","data-v-745f38c0"]]),Y=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(t){const o=t,a=e.ref(void 0),l=e.computed(()=>a.value===!0||a.value!==void 0&&o.forceShow===!0);return e.watch(()=>o.authFunction,async()=>{a.value=await o.authFunction()},{immediate:!0}),(i,f)=>l.value?e.renderSlot(i.$slots,"default",{key:0,isAllowed:a.value}):e.createCommentVNode("",!0)}}),Ql={class:"form-section-wrapper"},zl={key:0,class:"form-section-title"},Wl={key:1,class:"form-section-description"},Gl={key:2,class:"form-section-footer"},Xl={class:"form-section-content"},de=X(e.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(t){const o=e.useSlots();return(a,l)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":t.hasDivider}])},[e.createElementVNode("div",Ql,[t.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:t.stickyInfoHeader}])},[t.title?(e.openBlock(),e.createElementBlock("h4",zl,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.description||e.unref(o).description?(e.openBlock(),e.createElementBlock("div",Wl,[e.renderSlot(a.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(o).footer?(e.openBlock(),e.createElementBlock("div",Gl,[e.renderSlot(a.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",Xl,[e.renderSlot(a.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:ue,useDeleteUrlBuilder:Je,useErrors:Qe,useFetchUrlBuilder:io,useFetcher:ze,useDebouncedFilter:We,useStringHelpers:co,useGatewayFeatureSupported:ho}=Q,Yl={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 Zl(){const t=ce.createI18n("en-us",Yl);return{i18n:t,i18nT:ce.i18nTComponent(t)}}function he(t){const{replaceId:o=!1}=t,a=e.ref([]);return{addedItems:a,trackNewItems:(i,f)=>{if(f){const b={...i};o&&(b.value=i.label),a.value.push(b)}else a.value=a.value.filter(b=>b.value!==i.value)}}}const fe=[{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"}],Se=10,xe=65536,es=0,ts=65535,le=0,se=255,Ge=0,Xe=255,as=0,ls=65535,Ye=0,Ze=65535,ss=0,os=2**31,Ve=["200","302"],Ne=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],Be=["429","404","500","501","502","503","504","505"],He=["429","500","503"];function me(){const t=n=>/^\d+$/.test(n),o=(n,r,y)=>{if(t(n)){const d=Number(n);return d>=r&&d<=y}else return!1},a=n=>n.map(r=>Number(r)),l=n=>n.map(r=>r.toString()),i=()=>({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:Ve,unhealthyInterval:"0",httpFailures:"5",tcpFailures:"5",unhealthyHttpStatuses:Be,unhealthyTimeouts:"0"},passiveHealthCheck:{type:"http",successes:"0",httpStatuses:Ne,timeouts:"0",httpFailures:"5",unhealthyHttpStatuses:He,tcpFailures:"5"}});return{isInteger:t,inRange:o,stringToNumberArray:a,numberToStringArray:l,upstreamsResponseToFields:n=>{var y,d,s,x,N,h,p,S,w,B,$,u,C,_,q,T,g,I,H,D,F,O,A,E,K,P,U,k,c,m,M,L,W,v,J,ae,pe,ie,tt,at,lt,st,ot,rt,nt,it,ct,dt,ht,pt,ut,ft,mt,yt,gt,kt,bt,Ct,_t,wt,St,xt,Vt,Nt,Bt,Ht,It,Tt,Et,Ut,qt,Ft,$t,Dt,Ot,Kt,Pt,Mt,At,vt,Rt,Lt,jt,Jt,Qt,zt,Wt,Gt,Xt,Yt,Zt,ea,ta,aa,la,sa,oa,ra,na,ia,ca,da,ha,pa,ua,fa,ma,ya,ga;const r=i();return r.name=n.name||"",r.algorithm=n.algorithm||"round-robin",r.hostHeader=n.host_header||"",r.clientCertificate=n.client_certificate?(y=n.client_certificate)==null?void 0:y.id:"",r.tags=((d=n.tags)==null?void 0:d.join(", "))||"",r.slots=n.slots!==null&&n.slots!==void 0?n.slots.toString():"10000",r.hashOn=n.hash_on||"none",r.hashFallback=n.hash_fallback||"none",r.hashOnHeader=n.hash_on_header||"",r.hashOnCookie=n.hash_on_cookie||"",r.hashOnCookiePath=n.hash_on_cookie_path||"/",r.hashOnQueryArgument=n.hash_on_query_arg||"",r.hashOnUriCapture=n.hash_on_uri_capture||"",r.hashFallbackHeader=n.hash_fallback_header||"",r.hashFallbackQueryArgument=n.hash_fallback_query_arg||"",r.hashFallbackUriCapture=n.hash_fallback_uri_capture||"",r.healthchecksThreshold=n.healthchecks.threshold!==null&&n.healthchecks.threshold!==void 0?n.healthchecks.threshold.toString():"",r.activeHealthSwitch=((x=(s=n.healthchecks.active)==null?void 0:s.healthy)==null?void 0:x.interval)!==0||((h=(N=n.healthchecks.active)==null?void 0:N.unhealthy)==null?void 0:h.interval)!==0,r.activeHealthCheck.type=((p=n.healthchecks.active)==null?void 0:p.type)||"http",r.activeHealthCheck.httpPath=((S=n.healthchecks.active)==null?void 0:S.http_path)||"/",r.activeHealthCheck.timeout=((w=n.healthchecks.active)==null?void 0:w.timeout)!==null&&((B=n.healthchecks.active)==null?void 0:B.timeout)!==void 0?(u=($=n.healthchecks.active)==null?void 0:$.timeout)==null?void 0:u.toString():"",r.activeHealthCheck.concurrency=((C=n.healthchecks.active)==null?void 0:C.concurrency)!==null&&((_=n.healthchecks.active)==null?void 0:_.concurrency)!==void 0?(T=(q=n.healthchecks.active)==null?void 0:q.concurrency)==null?void 0:T.toString():"",r.activeHealthCheck.httpsSni=((g=n.healthchecks.active)==null?void 0:g.https_sni)||"",r.activeHealthCheck.verifySsl=((I=n.healthchecks.active)==null?void 0:I.https_verify_certificate)||!1,r.activeHealthCheck.headers=(H=n.healthchecks.active)!=null&&H.headers&&Object.entries((D=n.healthchecks.active)==null?void 0:D.headers).length>0?Object.entries((F=n.healthchecks.active)==null?void 0:F.headers).map(([Zs,Ie])=>({key:Zs,values:Ie==null?void 0:Ie.join(", ")})):[{key:"",values:""}],r.activeHealthCheck.interval=((A=(O=n.healthchecks.active)==null?void 0:O.healthy)==null?void 0:A.interval)!==null&&((K=(E=n.healthchecks.active)==null?void 0:E.healthy)==null?void 0:K.interval)!==void 0?(k=(U=(P=n.healthchecks.active)==null?void 0:P.healthy)==null?void 0:U.interval)==null?void 0:k.toString():"0",r.activeHealthCheck.interval=((m=(c=n.healthchecks.active)==null?void 0:c.healthy)==null?void 0:m.interval)!==null&&((L=(M=n.healthchecks.active)==null?void 0:M.healthy)==null?void 0:L.interval)!==void 0?(J=(v=(W=n.healthchecks.active)==null?void 0:W.healthy)==null?void 0:v.interval)==null?void 0:J.toString():"0",r.activeHealthCheck.successes=((pe=(ae=n.healthchecks.active)==null?void 0:ae.healthy)==null?void 0:pe.successes)!==null&&((tt=(ie=n.healthchecks.active)==null?void 0:ie.healthy)==null?void 0:tt.successes)!==void 0?(st=(lt=(at=n.healthchecks.active)==null?void 0:at.healthy)==null?void 0:lt.successes)==null?void 0:st.toString():"0",r.activeHealthCheck.httpStatuses=(rt=(ot=n.healthchecks.active)==null?void 0:ot.healthy)!=null&&rt.http_statuses?l(((it=(nt=n.healthchecks.active)==null?void 0:nt.healthy)==null?void 0:it.http_statuses)||[]):Ve,r.activeHealthCheck.unhealthyInterval=((dt=(ct=n.healthchecks.active)==null?void 0:ct.unhealthy)==null?void 0:dt.interval)!==null&&((pt=(ht=n.healthchecks.active)==null?void 0:ht.unhealthy)==null?void 0:pt.interval)!==void 0?(mt=(ft=(ut=n.healthchecks.active)==null?void 0:ut.unhealthy)==null?void 0:ft.interval)==null?void 0:mt.toString():"0",r.activeHealthCheck.httpFailures=((gt=(yt=n.healthchecks.active)==null?void 0:yt.unhealthy)==null?void 0:gt.http_failures)!==null&&((bt=(kt=n.healthchecks.active)==null?void 0:kt.unhealthy)==null?void 0:bt.http_failures)!==void 0?(wt=(_t=(Ct=n.healthchecks.active)==null?void 0:Ct.unhealthy)==null?void 0:_t.http_failures)==null?void 0:wt.toString():"0",r.activeHealthCheck.unhealthyTimeouts=((xt=(St=n.healthchecks.active)==null?void 0:St.unhealthy)==null?void 0:xt.timeouts)!==null&&((Nt=(Vt=n.healthchecks.active)==null?void 0:Vt.unhealthy)==null?void 0:Nt.timeouts)!==void 0?(It=(Ht=(Bt=n.healthchecks.active)==null?void 0:Bt.unhealthy)==null?void 0:Ht.timeouts)==null?void 0:It.toString():"0",r.activeHealthCheck.unhealthyHttpStatuses=(Et=(Tt=n.healthchecks.active)==null?void 0:Tt.unhealthy)!=null&&Et.http_statuses?l(((qt=(Ut=n.healthchecks.active)==null?void 0:Ut.unhealthy)==null?void 0:qt.http_statuses)||[]):Be,r.passiveHealthSwitch=(($t=(Ft=n.healthchecks.passive)==null?void 0:Ft.healthy)==null?void 0:$t.successes)!==0||((Ot=(Dt=n.healthchecks.passive)==null?void 0:Dt.unhealthy)==null?void 0:Ot.timeouts)!==0||((Pt=(Kt=n.healthchecks.passive)==null?void 0:Kt.unhealthy)==null?void 0:Pt.tcp_failures)!==0||((At=(Mt=n.healthchecks.passive)==null?void 0:Mt.unhealthy)==null?void 0:At.http_failures)!==0,r.passiveHealthCheck.type=((vt=n.healthchecks.passive)==null?void 0:vt.type)||"http",r.passiveHealthCheck.successes=((Lt=(Rt=n.healthchecks.passive)==null?void 0:Rt.healthy)==null?void 0:Lt.successes)!==null&&((Jt=(jt=n.healthchecks.passive)==null?void 0:jt.healthy)==null?void 0:Jt.successes)!==void 0?(Wt=(zt=(Qt=n.healthchecks.passive)==null?void 0:Qt.healthy)==null?void 0:zt.successes)==null?void 0:Wt.toString():"0",r.passiveHealthCheck.httpStatuses=(Xt=(Gt=n.healthchecks.passive)==null?void 0:Gt.healthy)!=null&&Xt.http_statuses?l(((Zt=(Yt=n.healthchecks.passive)==null?void 0:Yt.healthy)==null?void 0:Zt.http_statuses)||[]):Ne,r.passiveHealthCheck.timeouts=((ta=(ea=n.healthchecks.passive)==null?void 0:ea.unhealthy)==null?void 0:ta.timeouts)!==null&&((la=(aa=n.healthchecks.passive)==null?void 0:aa.unhealthy)==null?void 0:la.timeouts)!==void 0?(ra=(oa=(sa=n.healthchecks.passive)==null?void 0:sa.unhealthy)==null?void 0:oa.timeouts)==null?void 0:ra.toString():"0",r.passiveHealthCheck.tcpFailures=((ia=(na=n.healthchecks.passive)==null?void 0:na.unhealthy)==null?void 0:ia.tcp_failures)!==null&&((da=(ca=n.healthchecks.passive)==null?void 0:ca.unhealthy)==null?void 0:da.tcp_failures)!==void 0?(ua=(pa=(ha=n.healthchecks.passive)==null?void 0:ha.unhealthy)==null?void 0:pa.tcp_failures)==null?void 0:ua.toString():"",r.passiveHealthCheck.unhealthyHttpStatuses=(ma=(fa=n.healthchecks.passive)==null?void 0:fa.unhealthy)!=null&&ma.http_statuses?l(((ga=(ya=n.healthchecks.passive)==null?void 0:ya.unhealthy)==null?void 0:ga.http_statuses)||[]):He,r},getDefaultUpstreamFields:i,objectsAreEqual:(n,r)=>{try{return JSON.stringify(n)===JSON.stringify(r)}catch{return!1}},cloneDeep:n=>JSON.parse(JSON.stringify(n))}}const Z={useI18n:Zl,useMultiselectCreation:he,useHelpers:me},oe="/api/control_planes/{controlPlaneId}",re="/{workspace}",ne={list:{konnect:`${oe}/upstreams`,kongManager:`${re}/upstreams`},form:{konnect:{getServices:`${oe}/services`,getCertificates:`${oe}/certificates`,validate:`${oe}/v1/schemas/json/upstream/validate`,create:`${oe}/upstreams`,edit:`${oe}/upstreams/{id}`},kongManager:{getServices:`${re}/services`,getCertificates:`${re}/certificates`,validate:`${re}/schemas/upstreams/validate`,create:`${re}/upstreams`,edit:`${re}/upstreams/{id}`}}},fo="",rs={class:"kong-ui-entities-upstreams-list"},ns={class:"upstream-name"},is=e.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.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(t,{emit:o}){var A;const a=t,{i18n:{t:l}}=Z.useI18n(),i=ke.useRouter(),{axiosInstance:f}=ue({headers:(A=a.config)==null?void 0:A.requestHeaders}),b=e.ref(1),V=e.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),n={name:{label:l("upstreams.list.table_headers.name"),searchable:!0,sortable:!0},slots:{label:l("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:l("upstreams.list.table_headers.tags"),sortable:!1}},r=n,y=e.computed(()=>{var K,P;let E=`${a.config.apiBaseUrl}${ne.list[a.config.app]}`;return a.config.app==="konnect"?E=E.replace(/{controlPlaneId}/gi,((K=a.config)==null?void 0:K.controlPlaneId)||""):a.config.app==="kongManager"&&(E=E.replace(/\/{workspace}/gi,(P=a.config)!=null&&P.workspace?`/${a.config.workspace}`:"")),E}),d=e.ref(""),s=e.computed(()=>{const E=a.config.app==="konnect"||a.config.isExactMatch;if(E)return{isExactMatch:E,placeholder:l("upstreams.search.placeholder")};const{name:K,slots:P}=n;return{isExactMatch:E,fields:{name:K,slots:P},schema:a.config.filterSchema}}),{fetcher:x,fetcherState:N}=ze(a.config,y.value),h=()=>{d.value=""},p=()=>{b.value++},S=e.ref(""),w=(E,K)=>{const P=E.id;if(!K(P)){o("copy:error",{entity:E,field:"id",message:l("upstreams.errors.copy")});return}o("copy:success",{entity:E,field:"id",message:l("upstreams.copy.success",{val:P})})},B=(E,K)=>{const P=JSON.stringify(E);if(!K(P)){o("copy:error",{entity:E,message:l("upstreams.errors.copy")});return}o("copy:success",{entity:E,message:l("upstreams.copy.success_brief")})},$=async E=>{var P;await((P=a.canRetrieve)==null?void 0:P.call(a,E))&&i.push(a.config.getViewRoute(E.id))},u=E=>({label:l("upstreams.actions.view"),to:a.config.getViewRoute(E)}),C=E=>({label:l("upstreams.actions.edit"),to:a.config.getEditRoute(E)}),_=e.ref(void 0),q=e.ref(!1),T=e.ref(!1),g=e.ref(""),I=Je(a.config,y.value),H=E=>{_.value=E,q.value=!0},D=()=>{q.value=!1},F=async()=>{var E,K,P;if((E=_.value)!=null&&E.id){T.value=!0;try{await f.delete(I(_.value.id)),T.value=!1,q.value=!1,b.value++,o("delete:success",_.value)}catch(U){g.value=((P=(K=U.response)==null?void 0:K.data)==null?void 0:P.message)||U.message||l("upstreams.errors.delete"),o("error",U)}finally{T.value=!1}}};e.watch(N,E=>{if(E.status===te.Error){S.value=l("upstreams.errors.general"),o("error",E.error);return}S.value=""});const O=e.ref({ctaPath:a.config.createRoute,ctaText:void 0,message:l("upstreams.list.empty_state.description"),title:l("upstreams.title")});return e.onBeforeMount(async()=>{await a.canCreate()&&(O.value.title=l("upstreams.list.empty_state.title"),O.value.ctaText=l("upstreams.actions.create"))}),(E,K)=>{const P=e.resolveComponent("KButton"),U=e.resolveComponent("KBadge"),k=e.resolveComponent("KTruncate"),c=e.resolveComponent("KDropdownItem"),m=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",rs,[e.createVNode(e.unref(Le),{"cache-identifier":t.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":V.value,"empty-state-options":O.value,"enable-entity-actions":"","error-message":S.value,fetcher:e.unref(x),"fetcher-cache-key":b.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:d.value,"table-headers":e.unref(r),onClearSearchInput:h,"onClick:row":K[1]||(K[1]=M=>$(M)),onSort:p},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(Jl),{modelValue:d.value,"onUpdate:modelValue":K[0]||(K[0]=M=>d.value=M),config:s.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(Y),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(P,{appearance:"primary","data-testid":"toolbar-add-upstream",icon:"plus",to:t.config.createRoute},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:e.withCtx(({rowValue:M})=>[e.createElementVNode("span",ns,e.toDisplayString(M),1)]),tags:e.withCtx(({rowValue:M})=>[e.createVNode(k,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M,L=>(e.openBlock(),e.createBlock(U,{key:L,"max-width":"auto"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L),1)]),_:2},1024))),128))]),_:2},1024)]),actions:e.withCtx(({row:M})=>[e.createVNode(m,null,{default:e.withCtx(({copyToClipboard:L})=>[e.createVNode(c,{"data-testid":"action-entity-copy-id",onClick:W=>w(M,L)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(m,null,{default:e.withCtx(({copyToClipboard:L})=>[e.createVNode(c,{"data-testid":"action-entity-copy-json",onClick:W=>B(M,L)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(Y),{"auth-function":()=>t.canRetrieve(M)},{default:e.withCtx(()=>[e.createVNode(c,{"data-testid":"action-entity-view","has-divider":"",item:u(M.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(Y),{"auth-function":()=>t.canEdit(M)},{default:e.withCtx(()=>[e.createVNode(c,{"data-testid":"action-entity-edit",item:C(M.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(Y),{"auth-function":()=>t.canDelete(M)},{default:e.withCtx(()=>[e.createVNode(c,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:L=>H(M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("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"]),e.createVNode(e.unref(je),{"action-pending":T.value,description:e.unref(l)("upstreams.delete.description"),"entity-name":_.value&&(_.value.name||_.value.id),"entity-type":e.unref(be).Upstream,error:g.value,title:e.unref(l)("upstreams.delete.title"),visible:q.value,onCancel:D,onProceed:F},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),mo="",ee=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},cs=ee(is,[["__scopeId","data-v-033bd1ef"]]),ye={list:{konnect:"/api/control_planes/{controlPlaneId}/upstreams/{upstreamId}/targets",kongManager:"/{workspace}/upstreams/{upstreamId}/targets"},form:{konnect:{create:"/api/control_planes/{controlPlaneId}/upstreams/{upstreamId}/targets",edit:"/api/control_planes/{controlPlaneId}/upstreams/{upstreamId}/targets/{id}",validate:"/api/control_planes/{controlPlaneId}/v1/schemas/json/target/validate"},kongManager:{create:"/{workspace}/upstreams/{upstreamId}/targets",edit:"/{workspace}/upstreams/{upstreamId}/targets/{id}",validate:"/{workspace}/schemas/targets/validate"}}},ds={class:"kong-ui-entities-target-form"},hs={class:"target-form-container"},ps={key:0,class:"target-form-info"},us=e.defineComponent({__name:"TargetForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(t,{emit:o}){var $;const a=t;e.useCssVars(u=>({"2cc5362c":B.value}));const{i18n:{t:l}}=Z.useI18n(),{getMessageFromError:i}=Qe(),{axiosInstance:f}=ue({headers:($=a.config)==null?void 0:$.requestHeaders}),b=e.computed(()=>{var u;return ye.form[a.config.app].edit.replace(/{upstreamId}/gi,((u=a.config)==null?void 0:u.upstreamId)||"")}),V=e.computed(()=>a.targetId?G.Edit:G.Create),n=e.computed(()=>V.value===G.Edit?l("targets.form.edit.title"):l("targets.form.create.title")),r=e.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),y=e.reactive({target:"",weight:100,tags:""}),d={target:"",weight:100,tags:""},s=e.computed(()=>{const u=parseInt(r.fields.weight.toString(),10);return u<0||u>65535}),x=e.computed(()=>JSON.stringify(r.fields)!==JSON.stringify(y)&&!!r.fields.target&&!!r.fields.weight&&!s.value),N=u=>{var C;r.fields.target=(u==null?void 0:u.target)||"",r.fields.weight=(u==null?void 0:u.weight)??"",r.fields.tags=((C=u==null?void 0:u.tags)==null?void 0:C.join(", "))||"",Object.assign(y,r.fields)},h=()=>{r.errorMessage="",o("cancel")},p=e.computed(()=>{var C,_;let u=`${a.config.apiBaseUrl}${ye.form[a.config.app].validate}`;return a.config.app==="konnect"?u=u.replace(/{controlPlaneId}/gi,((C=a.config)==null?void 0:C.controlPlaneId)||""):a.config.app==="kongManager"&&(u=u.replace(/\/{workspace}/gi,(_=a.config)!=null&&_.workspace?`/${a.config.workspace}`:"")),u=u.replace(/{id}/gi,a.targetId),u}),S=e.computed(()=>{var C,_,q,T;let u=`${a.config.apiBaseUrl}${ye.form[a.config.app][V.value]}`;return a.config.app==="konnect"?u=u.replace(/{controlPlaneId}/gi,((C=a.config)==null?void 0:C.controlPlaneId)||"").replace(/{upstreamId}/gi,((_=a.config)==null?void 0:_.upstreamId)||""):a.config.app==="kongManager"&&(u=u.replace(/\/{workspace}/gi,(q=a.config)!=null&&q.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((T=a.config)==null?void 0:T.upstreamId)||"")),u=u.replace(/{id}/gi,a.targetId),u}),w=async()=>{var u,C,_,q,T;try{r.isReadonly=!0,r.errorMessage="";const g={target:r.fields.target,weight:parseInt(r.fields.weight),tags:(_=(C=(u=r.fields.tags)==null?void 0:u.split(","))==null?void 0:C.map(H=>String(H||"").trim()))==null?void 0:_.filter(H=>H!==""),upstream:{id:a.config.upstreamId}};let I;if(await f.post(p.value,g),V.value==="create"?I=await f.post(S.value,g):V.value==="edit"&&(I=((q=a.config)==null?void 0:q.app)==="konnect"?await f.put(S.value,g):await f.patch(S.value,g)),I){const{data:H}=I;r.fields.target=(H==null?void 0:H.name)||"",r.fields.weight=(H==null?void 0:H.weight)??100,r.fields.tags=((T=H==null?void 0:H.tags)==null?void 0:T.join(", "))||"",o("update",H),Object.assign(r.fields,d)}}catch(g){r.errorMessage=i(g),o("error",g)}finally{r.isReadonly=!1}},B=e.computed(()=>r.isReadonly?"inline-flex":"none");return e.watch(()=>a.targetId,()=>{Object.assign(r.fields,d)}),(u,C)=>{const _=e.resolveComponent("KInput"),q=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(q,{"action-button-text":e.unref(l)("targets.form.buttons.save"),"action-pending":!x.value||r.isReadonly,"cancel-button-text":e.unref(l)("targets.form.buttons.cancel"),"is-visible":t.isVisible,title:n.value,onCanceled:h,onProceed:w},{"body-content":e.withCtx(()=>[e.createElementVNode("div",ds,[e.createVNode(e.unref(Re),{config:t.config,"edit-id":t.targetId,"error-message":r.errorMessage,"fetch-url":b.value,"is-readonly":r.isReadonly,onCancel:h,"onFetch:error":C[3]||(C[3]=T=>u.$emit("error",T)),"onFetch:success":N,onLoading:C[4]||(C[4]=T=>u.$emit("loading",T))},{default:e.withCtx(()=>[e.createElementVNode("div",hs,[u.$slots.info?(e.openBlock(),e.createElementBlock("div",ps,[e.renderSlot(u.$slots,"info",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(_,{modelValue:r.fields.target,"onUpdate:modelValue":C[0]||(C[0]=T=>r.fields.target=T),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:e.unref(l)("targets.form.fields.target.label"),"label-attributes":{info:e.unref(l)("targets.form.fields.target.tooltip")},placeholder:e.unref(l)("targets.form.fields.target.placeholder"),readonly:r.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(_,{modelValue:r.fields.weight,"onUpdate:modelValue":C[1]||(C[1]=T=>r.fields.weight=T),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight","error-message":e.unref(l)("targets.errors.weight"),"has-error":s.value,label:e.unref(l)("targets.form.fields.weight.label"),"label-attributes":{info:e.unref(l)("targets.form.fields.weight.tooltip")},max:"65535",min:"0",readonly:r.isReadonly,required:"",type:"number"},null,8,["modelValue","error-message","has-error","label","label-attributes","readonly"]),e.createVNode(_,{modelValue:r.fields.tags,"onUpdate:modelValue":C[2]||(C[2]=T=>r.fields.tags=T),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:e.unref(l)("targets.form.fields.tags.help"),label:e.unref(l)("targets.form.fields.tags.label"),placeholder:e.unref(l)("targets.form.fields.tags.placeholder"),readonly:r.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"])}}}),yo="",et=ee(us,[["__scopeId","data-v-77134304"]]),fs={class:"kong-ui-entities-targets-list"},ms={class:"target-address"},ys=e.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.upstreamId||t.app==="kongManager"&&(typeof t.canMarkHealthy>"u"||typeof t.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(t,{emit:o}){var P;const a=t,{i18n:{t:l}}=Z.useI18n(),{axiosInstance:i}=ue({headers:(P=a.config)==null?void 0:P.requestHeaders}),f=e.ref(1),b=e.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),n={target:{label:l("targets.list.table_headers.target_address"),sortable:!0},weight:{label:l("targets.list.table_headers.weight"),sortable:!0},tags:{label:l("targets.list.table_headers.tags"),sortable:!1}},r=e.computed(()=>{var k,c,m,M;let U=`${a.config.apiBaseUrl}${ye.list[a.config.app]}`;return a.config.app==="konnect"?U=U.replace(/{controlPlaneId}/gi,((k=a.config)==null?void 0:k.controlPlaneId)||"").replace(/{upstreamId}/gi,((c=a.config)==null?void 0:c.upstreamId)||""):a.config.app==="kongManager"&&(U=U.replace(/\/{workspace}/gi,(m=a.config)!=null&&m.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((M=a.config)==null?void 0:M.upstreamId)||"")),U}),{fetcher:y,fetcherState:d}=ze(a.config,r.value),s=()=>{f.value++},x=e.ref(""),N=()=>{O.value=!0},h=(U,k)=>{const c=U.id;if(!k(c)){o("copy:error",{entity:U,field:"id",message:l("targets.errors.copy")});return}o("copy:success",{entity:U,field:"id",message:l("targets.copy.success",{val:c})})},p=(U,k)=>{const c=JSON.stringify(U);if(!k(c)){o("copy:error",{entity:U,message:l("targets.errors.copy")});return}o("copy:success",{entity:U,message:l("targets.copy.success_brief")})},S=U=>{F.value=U,O.value=!0},w=U=>a.config.app==="konnect"?!1:a.config.canMarkHealthy(U),B=U=>a.config.app==="konnect"?!1:a.config.canMarkUnhealthy(U),$=e.ref(void 0),u=e.ref(!1),C=e.ref(!1),_=e.ref(""),q=Je(a.config,r.value),T=U=>{$.value=U,u.value=!0},g=()=>{u.value=!1},I=async()=>{var U,k,c;if((U=$.value)!=null&&U.id){C.value=!0;try{await i.delete(q($.value.id)),C.value=!1,u.value=!1,f.value++,o("delete:success",$.value)}catch(m){_.value=((c=(k=m.response)==null?void 0:k.data)==null?void 0:c.message)||m.message||l("targets.errors.delete"),o("error",m)}finally{C.value=!1}}};e.watch(d,U=>{if(U.status===te.Error){x.value=l("targets.errors.general"),o("error",U.error);return}x.value=""});const H=e.ref({ctaText:void 0,message:l("targets.list.empty_state.description"),title:l("targets.title"),...a.config.createRoute&&{ctaPath:a.config.createRoute}});e.onBeforeMount(async()=>{await a.canCreate()&&(H.value.title=l("targets.list.empty_state.title"),H.value.ctaText=l("targets.actions.create"))});const D=e.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}})),F=e.ref(""),O=e.ref(!1),A=U=>{F.value?o("update:target",U):o("create:target",U),E()},E=()=>{K(),f.value++},K=()=>{O.value=!1,F.value=""};return(U,k)=>{const c=e.resolveComponent("KButton"),m=e.resolveComponent("KBadge"),M=e.resolveComponent("KTruncate"),L=e.resolveComponent("KDropdownItem"),W=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",fs,[e.createVNode(e.unref(Le),{"cache-identifier":t.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":b.value,"empty-state-options":H.value,"enable-entity-actions":"","error-message":x.value,fetcher:e.unref(y),"fetcher-cache-key":f.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":e.unref(n),onEmptyStateCtaClicked:k[1]||(k[1]=()=>a.config.createRoute?void 0:N()),onSort:s},{"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(Y),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(c,{appearance:"primary","data-testid":"toolbar-new-target",icon:"plus",to:a.config.createRoute?a.config.createRoute:void 0,onClick:k[0]||(k[0]=()=>a.config.createRoute?void 0:N())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),target:e.withCtx(({rowValue:v})=>[e.createElementVNode("span",ms,e.toDisplayString(v),1)]),tags:e.withCtx(({rowValue:v})=>[e.createVNode(M,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v,J=>(e.openBlock(),e.createBlock(m,{key:J,"max-width":"auto"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(J),1)]),_:2},1024))),128))]),_:2},1024)]),actions:e.withCtx(({row:v})=>[e.createVNode(W,null,{default:e.withCtx(({copyToClipboard:J})=>[e.createVNode(L,{"data-testid":"action-entity-copy-id",onClick:ae=>h(v,J)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(W,null,{default:e.withCtx(({copyToClipboard:J})=>[e.createVNode(L,{"data-testid":"action-entity-copy-json",onClick:ae=>p(v,J)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(Y),{"auth-function":()=>t.canEdit(v)},{default:e.withCtx(()=>[e.createVNode(L,{"data-testid":"action-entity-edit","has-divider":"",onClick:J=>S(v.id)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(Y),{"auth-function":()=>w(v)},{default:e.withCtx(()=>[e.createVNode(L,{"data-testid":"action-target-mark-healthy",onClick:J=>o("health-actions:healthy",v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(Y),{"auth-function":()=>B(v)},{default:e.withCtx(()=>[e.createVNode(L,{"data-testid":"action-target-mark-unhealthy",onClick:J=>o("health-actions:unhealthy",v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(Y),{"auth-function":()=>t.canDelete(v)},{default:e.withCtx(()=>[e.createVNode(L,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:J=>T(v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("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"]),e.createVNode(e.unref(je),{"action-pending":C.value,description:e.unref(l)("targets.delete.description"),"entity-type":e.unref(be).Target,error:_.value,"need-confirm":!1,title:e.unref(l)("targets.delete.title"),visible:u.value,onCancel:g,onProceed:I},null,8,["action-pending","description","entity-type","error","title","visible"]),e.createVNode(et,{config:D.value,"is-visible":O.value,"target-id":F.value,onCancel:K,onUpdate:A},e.createSlots({_:2},[U.$slots["form-info"]?{name:"info",fn:e.withCtx(()=>[e.renderSlot(U.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),go="",gs=ee(ys,[["__scopeId","data-v-aba40390"]]),ks={key:1},bs=e.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(t,{emit:o}){var g,I,H,D;const a=t,{i18nT:l,i18n:{t:i}}=Z.useI18n(),{debouncedQueryChange:f,loading:b,loadItems:V,results:n,allRecords:r}=We(a.config,(I=ne.form[(g=a.config)==null?void 0:g.app])==null?void 0:I.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:y,loading:d,loadItems:s,results:x}=We(a.config,(D=ne.form[(H=a.config)==null?void 0:H.app])==null?void 0:D.getCertificates),N=e.ref(""),h=e.computed(()=>{var F;return!!a.name&&!((F=r.value)!=null&&F.some(O=>O.host===a.name))}),p=e.computed(()=>{var O,A,E;const F=h.value&&a.name.includes((O=N.value)==null?void 0:O.toLowerCase());return(E=n.value)==null?void 0:E.map(K=>({label:K.host,value:K.id})).concat(F?[{label:a.name,value:((A=B.value)==null?void 0:A.value)||a.name}]:[])}),S=e.computed(()=>{var F;return(F=x.value)==null?void 0:F.map(O=>({label:O.id,value:O.id}))}),w=e.ref(""),B=e.ref({value:"",label:""}),$=e.computed(()=>{var F,O;return((F=p.value.find(A=>A.value===w.value))==null?void 0:F.label)||((O=B.value)==null?void 0:O.label)}),u=F=>{N.value=F,f(F)},C=F=>{B.value=F},_=()=>{B.value={value:"",label:""}},q=F=>{w.value=F,o("update:name",$.value)},T=e.ref(!1);return e.onBeforeMount(async()=>{var F,O;try{T.value=!0,await V(),a.name&&(w.value=((O=(F=p.value.find(A=>A.label===a.name))==null?void 0:F.value)==null?void 0:O.toString())||a.name),await s()}finally{T.value=!1}}),(F,O)=>{const A=e.resolveComponent("KSkeleton"),E=e.resolveComponent("KSelect"),K=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(de),{class:"kong-ui-entities-upstreams-general-info",description:e.unref(i)("upstreams.form.general_info.help"),title:e.unref(i)("upstreams.form.general_info.title")},{default:e.withCtx(()=>[T.value?(e.openBlock(),e.createBlock(A,{key:0,type:"form"})):(e.openBlock(),e.createElementBlock("div",ks,[e.createVNode(E,{appearance:"select",autosuggest:"",class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"",items:p.value,label:e.unref(i)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},loading:e.unref(b),"model-value":w.value,placeholder:e.unref(i)("upstreams.form.fields.name.placeholder"),readonly:t.readonly,required:"",width:"100%","onItem:added":C,"onItem:removed":_,onQueryChange:u,"onUpdate:modelValue":q},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),e.createVNode(K,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:e.unref(i)("upstreams.form.fields.host_header.label"),"model-value":t.hostHeader,readonly:t.readonly,type:"text","onUpdate:modelValue":O[0]||(O[0]=P=>o("update:host-header",P))},null,8,["label","model-value","readonly"]),e.createVNode(E,{appearance:"select",autosuggest:"",class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"",items:S.value,label:e.unref(i)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"250px"}},loading:e.unref(d),"model-value":t.clientCertificate,placeholder:e.unref(i)("upstreams.form.fields.client_certificate.placeholder"),readonly:t.readonly,width:"100%",onQueryChange:e.unref(y),"onUpdate:modelValue":O[1]||(O[1]=P=>o("update:client-certificate",P))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),e.createVNode(K,{autocomplete:"off","data-testid":"upstreams-form-tags",help:e.unref(i)("upstreams.form.fields.tags.help"),label:e.unref(i)("upstreams.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250px"}},"model-value":t.tags,placeholder:e.unref(i)("upstreams.form.fields.tags.placeholder"),readonly:t.readonly,type:"text","onUpdate:modelValue":O[2]||(O[2]=P=>o("update:tags",P))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),ko="",Cs=ee(bs,[["__scopeId","data-v-02065a3d"]]),ge={upstreamObject:"https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",loadBalancing:"https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"},_s={class:"fields-group-title"},ws={class:"fields-group-text"},Ss={class:"fields-group-title"},xs={class:"fields-group-text"},Vs=e.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(t,{emit:o}){const a=t,{i18nT:l,i18n:{t:i}}=Z.useI18n(),{inRange:f}=me(),b=e.ref([{label:i("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:i("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:i("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:i("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1}]),V=e.ref([{label:i("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:i("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:i("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:i("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:i("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:i("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:i("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:i("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);e.watch(()=>a.hashOn,(y,d)=>{d==="header"&&y!==d&&o("update:hash-on-header",""),d==="cookie"&&y!==d&&(o("update:hash-on-cookie",""),o("update:hash-on-cookie-path","/")),d==="query_arg"&&y!==d&&o("update:hash-on-query-argument",""),d==="uri_capture"&&y!==d&&o("update:hash-on-uri-capture",""),(y==="cookie"||y==="none")&&(o("update:hash-fallback","none"),o("update:hash-fallback-header",""),o("update:hash-fallback-query-argument",""),o("update:hash-fallback-uri-capture",""))}),e.watch(()=>a.hashFallback,(y,d)=>{d==="header"&&y!==d&&o("update:hash-fallback-header",""),d==="cookie"&&y!==d&&(o("update:hash-on-cookie",""),o("update:hash-on-cookie-path","/")),d==="query_arg"&&y!==d&&o("update:hash-fallback-query-argument",""),d==="uri_capture"&&y!==d&&o("update:hash-fallback-uri-capture","")});const n=e.computed(()=>a.hashOn==="cookie"||a.hashOn==="none"),r=e.computed(()=>a.slots?f(a.slots,Se,xe)?"":i("upstreams.form.errors.in_range"):"");return(y,d)=>{const s=e.resolveComponent("KExternalLink"),x=e.resolveComponent("KSelect"),N=e.resolveComponent("KInput"),h=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(de),{class:"kong-ui-entities-upstreams-load-balancing",title:e.unref(i)("upstreams.form.load_balancing.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.form.load_balancing.help"))+" ",1),e.createVNode(s,{"hide-icon":"",href:e.unref(ge).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(x,{appearance:"select",class:"algorithm-select",items:b.value,label:e.unref(i)("upstreams.form.fields.algorithm.label"),"model-value":t.algorithm,readonly:t.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=p=>o("update:algorithm",p))},null,8,["items","label","model-value","readonly"]),e.createVNode(N,{autocomplete:"off","data-testid":"upstreams-form-slots","error-message":r.value,"has-error":!!r.value,help:e.unref(i)("upstreams.form.fields.slots.help"),label:e.unref(i)("upstreams.form.fields.slots.label"),max:e.unref(xe),min:e.unref(Se),"model-value":t.slots,readonly:t.readonly,type:"number","onUpdate:modelValue":d[1]||(d[1]=p=>o("update:slots",p))},null,8,["error-message","has-error","help","label","max","min","model-value","readonly"]),e.createVNode(h,null,{body:e.withCtx(()=>[e.createElementVNode("h5",_s,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_on.label")),1),e.createElementVNode("p",ws,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_on.help")),1),e.createVNode(x,{appearance:"select",class:"hash-on-select",items:V.value,label:e.unref(i)("upstreams.form.fields.hash_on.label"),"model-value":t.hashOn,readonly:t.readonly,width:"100%","onUpdate:modelValue":d[2]||(d[2]=p=>o("update:hash-on",p))},null,8,["items","label","model-value","readonly"]),t.hashOn==="header"?(e.openBlock(),e.createBlock(N,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:e.unref(i)("upstreams.form.fields.header.label"),"model-value":t.hashOnHeader,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[3]||(d[3]=p=>o("update:hash-on-header",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),t.hashOn==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(N,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(i)("upstreams.form.fields.cookie.label"),"model-value":t.hashOnCookie,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[4]||(d[4]=p=>o("update:hash-on-cookie",p))},null,8,["label","model-value","readonly"]),e.createVNode(N,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(i)("upstreams.form.fields.cookie_path.label"),"model-value":t.hashOnCookiePath,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[5]||(d[5]=p=>o("update:hash-on-cookie-path",p))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),t.hashOn==="query_arg"?(e.openBlock(),e.createBlock(N,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:e.unref(i)("upstreams.form.fields.query_argument.label"),"model-value":t.hashOnQueryArgument,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[6]||(d[6]=p=>o("update:hash-on-query-argument",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),t.hashOn==="uri_capture"?(e.openBlock(),e.createBlock(N,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:e.unref(i)("upstreams.form.fields.uri_capture.label"),"model-value":t.hashOnUriCapture,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[7]||(d[7]=p=>o("update:hash-on-uri-capture",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(h,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Ss,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_fallback.label")),1),e.createElementVNode("p",xs,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_fallback.help")),1),e.createVNode(x,{appearance:"select",class:"hash-fallback-select",disabled:n.value,items:V.value,label:e.unref(i)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},"model-value":t.hashFallback,readonly:t.readonly,width:"100%","onUpdate:modelValue":d[8]||(d[8]=p=>o("update:hash-fallback",p))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),t.hashFallback==="header"?(e.openBlock(),e.createBlock(N,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:e.unref(i)("upstreams.form.fields.header.label"),"model-value":t.hashFallbackHeader,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[9]||(d[9]=p=>o("update:hash-fallback-header",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),t.hashFallback==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(N,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(i)("upstreams.form.fields.cookie.label"),"model-value":t.hashOnCookie,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[10]||(d[10]=p=>o("update:hash-on-cookie",p))},null,8,["label","model-value","readonly"]),e.createVNode(N,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(i)("upstreams.form.fields.cookie_path.label"),"model-value":t.hashOnCookiePath,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[11]||(d[11]=p=>o("update:hash-on-cookie-path",p))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),t.hashFallback==="query_arg"?(e.openBlock(),e.createBlock(N,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:e.unref(i)("upstreams.form.fields.query_argument.label"),"model-value":t.hashFallbackQueryArgument,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[12]||(d[12]=p=>o("update:hash-fallback-query-argument",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),t.hashFallback==="uri_capture"?(e.openBlock(),e.createBlock(N,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:e.unref(i)("upstreams.form.fields.uri_capture.label"),"model-value":t.hashFallbackUriCapture,readonly:t.readonly,required:"",type:"text","onUpdate:modelValue":d[13]||(d[13]=p=>o("update:hash-fallback-uri-capture",p))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])}}}),bo="",Ns=ee(Vs,[["__scopeId","data-v-522adce0"]]),Bs={class:"fields-group-title"},Hs={class:"fields-group-text"},Is={class:"fields-group-title"},Ts={class:"fields-group-text"},Es=e.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(t,{emit:o}){const{i18n:{t:a}}=Z.useI18n();return(l,i)=>{const f=e.resolveComponent("KExternalLink"),b=e.resolveComponent("KInputSwitch"),V=e.resolveComponent("KCard"),n=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(de),{class:"kong-ui-entities-upstreams-healthchecks",title:e.unref(a)("upstreams.form.health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(a)("upstreams.form.health_check.help"))+" ",1),e.createVNode(f,{"hide-icon":"",href:e.unref(ge).loadBalancing},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(V,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Bs,e.toDisplayString(e.unref(a)("upstreams.form.fields.active_health_checks.label")),1),e.createElementVNode("p",Hs,e.toDisplayString(e.unref(a)("upstreams.form.fields.active_health_checks.help")),1),e.createVNode(b,{class:"active-health-switch","data-testid":"active-health-switch",disabled:t.readonly,"model-value":t.activeHealthSwitch,onChange:i[0]||(i[0]=r=>o("update:active-health-switch",r))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(V,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Is,e.toDisplayString(e.unref(a)("upstreams.form.fields.passive_health_checks.label")),1),e.createElementVNode("p",Ts,e.toDisplayString(e.unref(a)("upstreams.form.fields.passive_health_checks.help")),1),e.createVNode(b,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:t.readonly,"model-value":t.passiveHealthSwitch,onChange:i[1]||(i[1]=r=>o("update:passive-health-switch",r))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(n,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:e.unref(a)("upstreams.form.fields.healthchecks_threshold.label"),max:e.unref(ts),min:e.unref(es),"model-value":t.healthchecksThreshold,readonly:t.readonly,type:"number","onUpdate:modelValue":i[2]||(i[2]=r=>o("update:healthchecks-threshold",r))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),Co="",Us=ee(Es,[["__scopeId","data-v-7fda4841"]]),qs={key:2},Fs={class:"fields-group-title"},$s={class:"fields-group-text"},Ds={class:"fields-group-title"},Os={class:"fields-group-text"},Ks=e.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(t,{emit:o}){const a=t,{i18n:{t:l}}=Z.useI18n(),{objectsAreEqual:i}=me(),f=e.ref([{label:l("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),b=e.computed(()=>a.type==="https"||a.type==="grpcs"),V=e.computed(()=>a.type==="tcp"),{trackNewItems:n}=he({replaceId:!0}),{trackNewItems:r}=he({replaceId:!0});e.watch(()=>a.type,(N,h)=>{h==="tcp"&&N!==h&&o("update:tcp-failures","5"),(h==="https"||h==="grpcs")&&N!==h&&(o("update:https-sni",""),o("update:verify-ssl",!1)),h!=="tcp"&&N==="tcp"&&(o("update:http-path","/"),o("update:http-statuses",Ve),o("update:unhealthy-http-statuses",Be))});const y=e.ref([{key:"",values:""}]);e.watch(()=>a.headers,N=>{i(y.value,N)||(y.value=[...N])},{immediate:!0,deep:!0});const d=()=>{o("update:headers",y.value)},s=()=>{y.value.push({key:"",values:""}),d()},x=N=>{N===0&&y.value.length===1?y.value[0]={key:"",values:""}:y.value.splice(N,1),d()};return(N,h)=>{const p=e.resolveComponent("KExternalLink"),S=e.resolveComponent("KSelect"),w=e.resolveComponent("KInput"),B=e.resolveComponent("KCheckbox"),$=e.resolveComponent("KLabel"),u=e.resolveComponent("KIcon"),C=e.resolveComponent("KButton"),_=e.resolveComponent("KMultiselect"),q=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(de),{class:"kong-ui-entities-upstreams-active-healthcheck",title:e.unref(l)("upstreams.form.active_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.active_health_check.help"))+" ",1),e.createVNode(p,{"hide-icon":"",href:e.unref(ge).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>{var T;return[e.createVNode(S,{appearance:"select",class:"active-healthcheck-type-select",items:f.value,label:e.unref(l)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":t.type,readonly:t.readonly,width:"100%","onUpdate:modelValue":h[0]||(h[0]=g=>o("update:type",g))},null,8,["items","label","model-value","readonly"]),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:e.unref(l)("upstreams.form.fields.http_path.label"),"model-value":t.httpPath,readonly:t.readonly,type:"text","onUpdate:modelValue":h[1]||(h[1]=g=>o("update:http-path",g))},null,8,["label","model-value","readonly"])),e.createVNode(w,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:e.unref(l)("upstreams.form.fields.timeout.label"),max:e.unref(ls),min:e.unref(as),"model-value":t.timeout,readonly:t.readonly,type:"number","onUpdate:modelValue":h[2]||(h[2]=g=>o("update:timeout",g))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(w,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:e.unref(l)("upstreams.form.fields.concurrency.label"),max:e.unref(os),min:e.unref(ss),"model-value":t.concurrency,readonly:t.readonly,type:"number","onUpdate:modelValue":h[3]||(h[3]=g=>o("update:concurrency",g))},null,8,["label","max","min","model-value","readonly"]),b.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:e.unref(l)("upstreams.form.fields.https_sni.label"),"model-value":t.httpsSni,readonly:t.readonly,type:"text","onUpdate:modelValue":h[4]||(h[4]=g=>o("update:https-sni",g))},null,8,["label","model-value","readonly"]),e.createVNode(B,{"data-testid":"active-healthcheck-verify-ssl",disabled:t.readonly,label:e.unref(l)("upstreams.form.fields.verify_ssl.label"),"model-value":t.verifySsl,"onUpdate:modelValue":h[5]||(h[5]=g=>o("update:verify-ssl",g))},null,8,["disabled","label","model-value"])],64)):e.createCommentVNode("",!0),((T=t.config)==null?void 0:T.app)==="kongManager"?(e.openBlock(),e.createElementBlock("div",qs,[e.createVNode($,{info:e.unref(l)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(g,I)=>(e.openBlock(),e.createElementBlock("div",{key:`${g.header}_${I}`,class:e.normalizeClass(["headers-row",{"margin-top-6":I>0}])},[e.createVNode(w,{modelValue:y.value[I].key,"onUpdate:modelValue":H=>y.value[I].key=H,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${I+1}`,readonly:t.readonly,type:"text",onBlur:d},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(w,{modelValue:y.value[I].values,"onUpdate:modelValue":H=>y.value[I].values=H,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${I+1}`,readonly:t.readonly,type:"text",onBlur:d},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(C,{appearance:"btn-link",class:"btn-remove","data-testid":"btn-remove-header",onClick:H=>x(I)},{icon:e.withCtx(()=>[e.createVNode(u,{class:"delete-item",icon:"trash"})]),_:2},1032,["onClick"]),y.value&&I===y.value.length-1?(e.openBlock(),e.createBlock(C,{key:0,appearance:"btn-link",class:"btn-add-header","data-testid":"btn-add-header",onClick:s},{icon:e.withCtx(()=>[e.createVNode(u,{color:"$kui-color-text-primary-strong",icon:"plus",size:"22"})]),_:1})):e.createCommentVNode("",!0)],2))),128))])])):e.createCommentVNode("",!0),e.createVNode(q,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Fs,e.toDisplayString(e.unref(l)("upstreams.form.healthy.label")),1),e.createElementVNode("p",$s,e.toDisplayString(e.unref(l)("upstreams.form.healthy.help")),1),e.createVNode(w,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-interval",help:e.unref(l)("upstreams.form.fields.interval.help"),label:e.unref(l)("upstreams.form.fields.interval.label"),max:e.unref(Ze),min:e.unref(Ye),"model-value":t.interval,readonly:t.readonly,type:"number","onUpdate:modelValue":h[6]||(h[6]=g=>o("update:interval",g))},null,8,["help","label","max","min","model-value","readonly"]),e.createVNode(w,{autocomplete:"off","data-testid":"active-healthcheck-successes",label:e.unref(l)("upstreams.form.fields.successes.label"),max:e.unref(se),min:e.unref(le),"model-value":t.successes,readonly:t.readonly,type:"number","onUpdate:modelValue":h[7]||(h[7]=g=>o("update:successes",g))},null,8,["label","max","min","model-value","readonly"]),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-http-statuses","enable-item-creation":"",items:e.unref(fe),label:e.unref(l)("upstreams.form.fields.http_statuses.label"),"model-value":t.httpStatuses,readonly:t.readonly,width:"100%","onItem:added":h[8]||(h[8]=g=>e.unref(n)(g,!0)),"onItem:removed":h[9]||(h[9]=g=>e.unref(n)(g,!1)),"onUpdate:modelValue":h[10]||(h[10]=g=>o("update:http-statuses",g))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(q,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Ds,e.toDisplayString(e.unref(l)("upstreams.form.unhealthy.label")),1),e.createElementVNode("p",Os,e.toDisplayString(e.unref(l)("upstreams.form.unhealthy.help")),1),e.createVNode(w,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:e.unref(l)("upstreams.form.fields.interval.help"),label:e.unref(l)("upstreams.form.fields.interval.label"),max:e.unref(Ze),min:e.unref(Ye),"model-value":t.unhealthyInterval,readonly:t.readonly,type:"number","onUpdate:modelValue":h[11]||(h[11]=g=>o("update:unhealthy-interval",g))},null,8,["help","label","max","min","model-value","readonly"]),V.value?(e.openBlock(),e.createBlock(w,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-tcp-failures",label:e.unref(l)("upstreams.form.fields.tcp_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":t.tcpFailures,readonly:t.readonly,type:"number","onUpdate:modelValue":h[12]||(h[12]=g=>o("update:tcp-failures",g))},null,8,["label","max","min","model-value","readonly"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-http-failures",label:e.unref(l)("upstreams.form.fields.http_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":t.httpFailures,readonly:t.readonly,type:"number","onUpdate:modelValue":h[13]||(h[13]=g=>o("update:http-failures",g))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(_,{autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(fe),label:e.unref(l)("upstreams.form.fields.http_statuses.label"),"model-value":t.unhealthyHttpStatuses,readonly:t.readonly,width:"100%","onItem:added":h[14]||(h[14]=g=>e.unref(r)(g,!0)),"onItem:removed":h[15]||(h[15]=g=>e.unref(r)(g,!1)),"onUpdate:modelValue":h[16]||(h[16]=g=>o("update:unhealthy-http-statuses",g))},null,8,["items","label","model-value","readonly"])],64)),e.createVNode(w,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:e.unref(l)("upstreams.form.fields.timeouts.label"),max:e.unref(Xe),min:e.unref(Ge),"model-value":t.unhealthyTimeouts,readonly:t.readonly,type:"number","onUpdate:modelValue":h[17]||(h[17]=g=>o("update:unhealthy-timeouts",g))},null,8,["label","max","min","model-value","readonly"])]),_:1})]}),_:1},8,["title"])}}}),_o="",Ps=ee(Ks,[["__scopeId","data-v-18b80e62"]]),Ms={class:"fields-group-title"},As={class:"fields-group-text"},vs={class:"fields-group-title"},Rs={class:"fields-group-text"},Ls=e.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(t,{emit:o}){const a=t,{i18n:{t:l}}=Z.useI18n(),i=e.ref([{label:l("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:l("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),f=e.computed(()=>a.type==="tcp"),{trackNewItems:b}=he({replaceId:!0}),{trackNewItems:V}=he({replaceId:!0});return e.watch(()=>a.type,(n,r)=>{r==="tcp"&&n!==r&&o("update:tcp-failures","5"),r!=="tcp"&&n==="tcp"&&(o("update:http-statuses",Ne),o("update:unhealthy-http-statuses",He))}),(n,r)=>{const y=e.resolveComponent("KExternalLink"),d=e.resolveComponent("KSelect"),s=e.resolveComponent("KInput"),x=e.resolveComponent("KMultiselect"),N=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(de),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:e.unref(l)("upstreams.form.passive_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.passive_health_check.help"))+" ",1),e.createVNode(y,{"hide-icon":"",href:e.unref(ge).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(d,{appearance:"select",class:"passive-healthcheck-type-select",items:i.value,label:e.unref(l)("upstreams.form.fields.passive_health_check_type.label"),"model-value":t.type,readonly:t.readonly,width:"100%","onUpdate:modelValue":r[0]||(r[0]=h=>o("update:type",h))},null,8,["items","label","model-value","readonly"]),e.createVNode(N,null,{body:e.withCtx(()=>[e.createElementVNode("h5",Ms,e.toDisplayString(e.unref(l)("upstreams.form.passive_healthy.label")),1),e.createElementVNode("p",As,e.toDisplayString(e.unref(l)("upstreams.form.passive_healthy.help")),1),e.createVNode(s,{autocomplete:"off","data-testid":"passive-healthcheck-successes",label:e.unref(l)("upstreams.form.fields.successes.label"),max:e.unref(se),min:e.unref(le),"model-value":t.successes,readonly:t.readonly,type:"number","onUpdate:modelValue":r[1]||(r[1]=h=>o("update:successes",h))},null,8,["label","max","min","model-value","readonly"]),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(x,{key:0,class:"margin-top-6 passive-healthcheck-http-statuses","enable-item-creation":"",items:e.unref(fe),label:e.unref(l)("upstreams.form.fields.http_statuses.label"),"model-value":t.httpStatuses,readonly:t.readonly,width:"100%","onItem:added":r[2]||(r[2]=h=>e.unref(b)(h,!0)),"onItem:removed":r[3]||(r[3]=h=>e.unref(b)(h,!1)),"onUpdate:modelValue":r[4]||(r[4]=h=>o("update:http-statuses",h))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(N,null,{body:e.withCtx(()=>[e.createElementVNode("h5",vs,e.toDisplayString(e.unref(l)("upstreams.form.passive_unhealthy.label")),1),e.createElementVNode("p",Rs,e.toDisplayString(e.unref(l)("upstreams.form.passive_unhealthy.help")),1),e.createVNode(s,{autocomplete:"off","data-testid":"passive-healthcheck-timeouts",label:e.unref(l)("upstreams.form.fields.timeouts.label"),max:e.unref(Xe),min:e.unref(Ge),"model-value":t.timeouts,readonly:t.readonly,type:"number","onUpdate:modelValue":r[5]||(r[5]=h=>o("update:timeouts",h))},null,8,["label","max","min","model-value","readonly"]),f.value?(e.openBlock(),e.createBlock(s,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-tcp-failures",label:e.unref(l)("upstreams.form.fields.tcp_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":t.tcpFailures,readonly:t.readonly,type:"number","onUpdate:modelValue":r[6]||(r[6]=h=>o("update:tcp-failures",h))},null,8,["label","max","min","model-value","readonly"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-http-failures",label:e.unref(l)("upstreams.form.fields.http_failures.label"),max:e.unref(se),min:e.unref(le),"model-value":t.httpFailures,readonly:t.readonly,type:"number","onUpdate:modelValue":r[7]||(r[7]=h=>o("update:http-failures",h))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(x,{autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(fe),label:e.unref(l)("upstreams.form.fields.http_statuses.label"),"model-value":t.unhealthyHttpStatuses,readonly:t.readonly,width:"100%","onItem:added":r[8]||(r[8]=h=>e.unref(V)(h,!0)),"onItem:removed":r[9]||(r[9]=h=>e.unref(V)(h,!1)),"onUpdate:modelValue":r[10]||(r[10]=h=>o("update:unhealthy-http-statuses",h))},null,8,["items","label","model-value","readonly"])],64))]),_:1})]),_:1},8,["title"])}}}),wo="",js=ee(Ls,[["__scopeId","data-v-6d6854e3"]]),Js={class:"kong-ui-entities-upstreams-form"},Qs=e.defineComponent({__name:"UpstreamsForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string"||!(t!=null&&t.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:o}){var U;const a=t,{inRange:l,stringToNumberArray:i,upstreamsResponseToFields:f,getDefaultUpstreamFields:b,objectsAreEqual:V,cloneDeep:n}=me(),{axiosInstance:r}=ue({headers:(U=a.config)==null?void 0:U.requestHeaders}),{getMessageFromError:y}=Qe(),d=ke.useRouter(),s=e.reactive({fields:b(),readonly:!1,errorMessage:""}),x=e.reactive(b()),N=e.computed(()=>!V(s.fields,x)),h=k=>{s.fields.activeHealthCheck.interval=k?"5":"0",s.fields.activeHealthCheck.successes=k?"5":"0",s.fields.activeHealthCheck.httpFailures=k?"5":"0",s.fields.activeHealthCheck.unhealthyInterval=k?"5":"0"},p=k=>{s.fields.passiveHealthCheck.timeouts=k?"5":"0",s.fields.passiveHealthCheck.successes=k?"80":"0"},S=e.computed(()=>s.fields.slots?l(s.fields.slots,Se,xe):!0),w=e.computed(()=>s.fields.hashOn==="header"?!!s.fields.hashOnHeader:!0),B=e.computed(()=>s.fields.hashOn==="cookie"||s.fields.hashFallback==="cookie"?!!s.fields.hashOnCookie:!0),$=e.computed(()=>s.fields.hashOn==="cookie"||s.fields.hashFallback==="cookie"?!!s.fields.hashOnCookiePath:!0),u=e.computed(()=>s.fields.hashOn==="query_arg"?!!s.fields.hashOnQueryArgument:!0),C=e.computed(()=>s.fields.hashOn==="uri_capture"?!!s.fields.hashOnUriCapture:!0),_=e.computed(()=>s.fields.hashFallback==="header"?!!s.fields.hashFallbackHeader:!0),q=e.computed(()=>s.fields.hashFallback==="query_arg"?!!s.fields.hashFallbackQueryArgument:!0),T=e.computed(()=>s.fields.hashFallback==="uri_capture"?!!s.fields.hashFallbackUriCapture:!0),g=e.computed(()=>!!s.fields.name&&S.value&&w.value&&B.value&&$.value&&u.value&&C.value&&_.value&&q.value&&T.value),I=e.computed(()=>a.upstreamId?G.Edit:G.Create),H=e.computed(()=>{var k,c;return(c=ne.form[(k=a.config)==null?void 0:k.app])==null?void 0:c.edit}),D=k=>{Object.assign(s.fields,f(k)),Object.assign(x,n(s.fields))},F=()=>{var k;d.push(((k=a.config)==null?void 0:k.cancelRoute)||{name:"upstreams-list"})},O=k=>{o("loading",k)},A=k=>{o("error",k)},E=()=>{var c,m,M,L,W;const k={name:s.fields.name,slots:Number(s.fields.slots),algorithm:s.fields.algorithm,hash_on:s.fields.hashOn,hash_fallback:s.fields.hashFallback,healthchecks:{}};return s.fields.hostHeader&&(k.host_header=s.fields.hostHeader),s.fields.clientCertificate&&(k.client_certificate={id:s.fields.clientCertificate}),s.fields.healthchecksThreshold&&(k.healthchecks.threshold=Number(s.fields.healthchecksThreshold)),s.fields.tags&&(k.tags=(m=(c=s.fields.tags.split(","))==null?void 0:c.map(v=>String(v||"").trim()))==null?void 0:m.filter(v=>v!=="")),s.fields.hashOn==="header"&&(k.hash_on_header=s.fields.hashOnHeader),(s.fields.hashOn==="cookie"||s.fields.hashFallback==="cookie")&&(k.hash_on_cookie=s.fields.hashOnCookie,k.hash_on_cookie_path=s.fields.hashOnCookiePath),s.fields.hashOn==="query_arg"&&(k.hash_on_query_arg=s.fields.hashOnQueryArgument),s.fields.hashOn==="uri_capture"&&(k.hash_on_uri_capture=s.fields.hashOnUriCapture),s.fields.hashFallback==="header"&&(k.hash_fallback_header=s.fields.hashFallbackHeader),s.fields.hashFallback==="query_arg"&&(k.hash_fallback_query_arg=s.fields.hashFallbackQueryArgument),s.fields.hashFallback==="uri_capture"&&(k.hash_fallback_uri_capture=s.fields.hashFallbackUriCapture),s.fields.activeHealthSwitch?(k.healthchecks.active={type:s.fields.activeHealthCheck.type,healthy:{},unhealthy:{}},s.fields.activeHealthCheck.timeout&&(k.healthchecks.active.timeout=Number(s.fields.activeHealthCheck.timeout)),s.fields.activeHealthCheck.concurrency&&(k.healthchecks.active.concurrency=Number(s.fields.activeHealthCheck.concurrency)),s.fields.activeHealthCheck.type!=="tcp"&&s.fields.activeHealthCheck.httpPath&&(k.healthchecks.active.http_path=s.fields.activeHealthCheck.httpPath),((M=a.config)==null?void 0:M.app)==="kongManager"&&(s.fields.activeHealthCheck.headers.length===0?k.healthchecks.active.headers=[]:k.healthchecks.active.headers=s.fields.activeHealthCheck.headers.reduce((v,J)=>{var ae,pe;return J.key?{...v,[J.key]:(pe=(ae=J.values.split(","))==null?void 0:ae.map(ie=>String(ie||"").trim()))==null?void 0:pe.filter(ie=>ie!=="")}:{...v}},{})),(s.fields.activeHealthCheck.type==="https"||s.fields.activeHealthCheck.type==="grpcs")&&s.fields.activeHealthCheck.httpsSni&&(k.healthchecks.active.https_sni=s.fields.activeHealthCheck.httpsSni),(s.fields.activeHealthCheck.type==="https"||s.fields.activeHealthCheck.type==="grpcs")&&(k.healthchecks.active.https_verify_certificate=s.fields.activeHealthCheck.verifySsl),s.fields.activeHealthCheck.interval&&(k.healthchecks.active.healthy.interval=Number(s.fields.activeHealthCheck.interval)),s.fields.activeHealthCheck.successes&&(k.healthchecks.active.healthy.successes=Number(s.fields.activeHealthCheck.successes)),s.fields.activeHealthCheck.type!=="tcp"&&s.fields.activeHealthCheck.httpStatuses&&(k.healthchecks.active.healthy.http_statuses=i(s.fields.activeHealthCheck.httpStatuses)),s.fields.activeHealthCheck.unhealthyInterval&&(k.healthchecks.active.unhealthy.interval=Number(s.fields.activeHealthCheck.unhealthyInterval)),s.fields.activeHealthCheck.unhealthyTimeouts&&(k.healthchecks.active.unhealthy.timeouts=Number(s.fields.activeHealthCheck.unhealthyTimeouts)),s.fields.activeHealthCheck.type!=="tcp"&&s.fields.activeHealthCheck.unhealthyHttpStatuses&&(k.healthchecks.active.unhealthy.http_statuses=i(s.fields.activeHealthCheck.unhealthyHttpStatuses)),s.fields.activeHealthCheck.type!=="tcp"&&s.fields.activeHealthCheck.httpFailures&&(k.healthchecks.active.unhealthy.http_failures=Number(s.fields.activeHealthCheck.httpFailures)),s.fields.activeHealthCheck.type==="tcp"&&s.fields.activeHealthCheck.tcpFailures&&(k.healthchecks.active.unhealthy.tcp_failures=Number(s.fields.activeHealthCheck.tcpFailures))):((L=a.config)==null?void 0:L.app)==="kongManager"&&I.value===G.Edit&&(k.healthchecks.active={type:s.fields.activeHealthCheck.type,headers:{},healthy:{interval:0},unhealthy:{interval:0}}),s.fields.passiveHealthSwitch?(k.healthchecks.passive={type:s.fields.passiveHealthCheck.type,healthy:{},unhealthy:{}},s.fields.passiveHealthCheck.successes&&(k.healthchecks.passive.healthy.successes=Number(s.fields.passiveHealthCheck.successes)),s.fields.passiveHealthCheck.type!=="tcp"&&s.fields.passiveHealthCheck.httpStatuses&&(k.healthchecks.passive.healthy.http_statuses=i(s.fields.passiveHealthCheck.httpStatuses)),s.fields.passiveHealthCheck.timeouts&&(k.healthchecks.passive.unhealthy.timeouts=Number(s.fields.passiveHealthCheck.timeouts)),s.fields.passiveHealthCheck.type!=="tcp"&&s.fields.passiveHealthCheck.unhealthyHttpStatuses&&(k.healthchecks.passive.unhealthy.http_statuses=i(s.fields.passiveHealthCheck.unhealthyHttpStatuses)),s.fields.passiveHealthCheck.type!=="tcp"&&s.fields.passiveHealthCheck.httpFailures&&(k.healthchecks.passive.unhealthy.http_failures=Number(s.fields.passiveHealthCheck.httpFailures)),s.fields.passiveHealthCheck.type==="tcp"&&s.fields.passiveHealthCheck.tcpFailures&&(k.healthchecks.passive.unhealthy.tcp_failures=Number(s.fields.passiveHealthCheck.tcpFailures))):((W=a.config)==null?void 0:W.app)==="kongManager"&&I.value===G.Edit&&(k.healthchecks.passive={type:s.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}),k},K=k=>{var m,M,L,W,v,J;let c=`${(m=a.config)==null?void 0:m.apiBaseUrl}${ne.form[(M=a.config)==null?void 0:M.app][k]}`;return((L=a.config)==null?void 0:L.app)==="konnect"?c=c.replace(/{controlPlaneId}/gi,((W=a.config)==null?void 0:W.controlPlaneId)||""):((v=a.config)==null?void 0:v.app)==="kongManager"&&(c=c.replace(/\/{workspace}/gi,(J=a.config)!=null&&J.workspace?`/${a.config.workspace}`:"")),c=c.replace(/{id}/gi,a.upstreamId),c},P=async()=>{var k;try{s.readonly=!0,await r.post(K("validate"),E());let c;I.value===G.Create?c=await r.post(K("create"),E()):I.value===G.Edit&&(c=((k=a.config)==null?void 0:k.app)==="konnect"?await r.put(K("edit"),E()):await r.patch(K("edit"),E())),o("update",c==null?void 0:c.data)}catch(c){s.errorMessage=y(c),o("error",c)}finally{s.readonly=!1}};return(k,c)=>(e.openBlock(),e.createElementBlock("div",Js,[e.createVNode(e.unref(Re),{"can-submit":g.value&&N.value,config:t.config,"edit-id":t.upstreamId,"error-message":s.errorMessage,"fetch-url":H.value,"is-readonly":s.readonly,onCancel:F,"onFetch:error":A,"onFetch:success":D,onLoading:O,onSubmit:P},{default:e.withCtx(()=>[e.createVNode(Cs,{"client-certificate":s.fields.clientCertificate,"onUpdate:clientCertificate":c[0]||(c[0]=m=>s.fields.clientCertificate=m),"host-header":s.fields.hostHeader,"onUpdate:hostHeader":c[1]||(c[1]=m=>s.fields.hostHeader=m),name:s.fields.name,"onUpdate:name":c[2]||(c[2]=m=>s.fields.name=m),tags:s.fields.tags,"onUpdate:tags":c[3]||(c[3]=m=>s.fields.tags=m),config:t.config,readonly:s.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),e.createVNode(Ns,{algorithm:s.fields.algorithm,"onUpdate:algorithm":c[4]||(c[4]=m=>s.fields.algorithm=m),"hash-fallback":s.fields.hashFallback,"onUpdate:hashFallback":c[5]||(c[5]=m=>s.fields.hashFallback=m),"hash-fallback-header":s.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":c[6]||(c[6]=m=>s.fields.hashFallbackHeader=m),"hash-fallback-query-argument":s.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":c[7]||(c[7]=m=>s.fields.hashFallbackQueryArgument=m),"hash-fallback-uri-capture":s.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":c[8]||(c[8]=m=>s.fields.hashFallbackUriCapture=m),"hash-on":s.fields.hashOn,"onUpdate:hashOn":c[9]||(c[9]=m=>s.fields.hashOn=m),"hash-on-cookie":s.fields.hashOnCookie,"onUpdate:hashOnCookie":c[10]||(c[10]=m=>s.fields.hashOnCookie=m),"hash-on-cookie-path":s.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":c[11]||(c[11]=m=>s.fields.hashOnCookiePath=m),"hash-on-header":s.fields.hashOnHeader,"onUpdate:hashOnHeader":c[12]||(c[12]=m=>s.fields.hashOnHeader=m),"hash-on-query-argument":s.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":c[13]||(c[13]=m=>s.fields.hashOnQueryArgument=m),"hash-on-uri-capture":s.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":c[14]||(c[14]=m=>s.fields.hashOnUriCapture=m),slots:s.fields.slots,"onUpdate:slots":c[15]||(c[15]=m=>s.fields.slots=m),readonly:s.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"]),e.createVNode(Us,{"active-health-switch":s.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[c[16]||(c[16]=m=>s.fields.activeHealthSwitch=m),h],"healthchecks-threshold":s.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":c[17]||(c[17]=m=>s.fields.healthchecksThreshold=m),"passive-health-switch":s.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[c[18]||(c[18]=m=>s.fields.passiveHealthSwitch=m),p],readonly:s.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),s.fields.activeHealthSwitch?(e.openBlock(),e.createBlock(Ps,{key:0,concurrency:s.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":c[19]||(c[19]=m=>s.fields.activeHealthCheck.concurrency=m),headers:s.fields.activeHealthCheck.headers,"onUpdate:headers":c[20]||(c[20]=m=>s.fields.activeHealthCheck.headers=m),"http-failures":s.fields.activeHealthCheck.httpFailures,"onUpdate:httpFailures":c[21]||(c[21]=m=>s.fields.activeHealthCheck.httpFailures=m),"http-path":s.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":c[22]||(c[22]=m=>s.fields.activeHealthCheck.httpPath=m),"http-statuses":s.fields.activeHealthCheck.httpStatuses,"onUpdate:httpStatuses":c[23]||(c[23]=m=>s.fields.activeHealthCheck.httpStatuses=m),"https-sni":s.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":c[24]||(c[24]=m=>s.fields.activeHealthCheck.httpsSni=m),interval:s.fields.activeHealthCheck.interval,"onUpdate:interval":c[25]||(c[25]=m=>s.fields.activeHealthCheck.interval=m),successes:s.fields.activeHealthCheck.successes,"onUpdate:successes":c[26]||(c[26]=m=>s.fields.activeHealthCheck.successes=m),"tcp-failures":s.fields.activeHealthCheck.tcpFailures,"onUpdate:tcpFailures":c[27]||(c[27]=m=>s.fields.activeHealthCheck.tcpFailures=m),timeout:s.fields.activeHealthCheck.timeout,"onUpdate:timeout":c[28]||(c[28]=m=>s.fields.activeHealthCheck.timeout=m),type:s.fields.activeHealthCheck.type,"onUpdate:type":c[29]||(c[29]=m=>s.fields.activeHealthCheck.type=m),"unhealthy-http-statuses":s.fields.activeHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":c[30]||(c[30]=m=>s.fields.activeHealthCheck.unhealthyHttpStatuses=m),"unhealthy-interval":s.fields.activeHealthCheck.unhealthyInterval,"onUpdate:unhealthyInterval":c[31]||(c[31]=m=>s.fields.activeHealthCheck.unhealthyInterval=m),"unhealthy-timeouts":s.fields.activeHealthCheck.unhealthyTimeouts,"onUpdate:unhealthyTimeouts":c[32]||(c[32]=m=>s.fields.activeHealthCheck.unhealthyTimeouts=m),"verify-ssl":s.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":c[33]||(c[33]=m=>s.fields.activeHealthCheck.verifySsl=m),config:t.config,readonly:s.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"])):e.createCommentVNode("",!0),s.fields.passiveHealthSwitch?(e.openBlock(),e.createBlock(js,{key:1,"http-failures":s.fields.passiveHealthCheck.httpFailures,"onUpdate:httpFailures":c[34]||(c[34]=m=>s.fields.passiveHealthCheck.httpFailures=m),"http-statuses":s.fields.passiveHealthCheck.httpStatuses,"onUpdate:httpStatuses":c[35]||(c[35]=m=>s.fields.passiveHealthCheck.httpStatuses=m),successes:s.fields.passiveHealthCheck.successes,"onUpdate:successes":c[36]||(c[36]=m=>s.fields.passiveHealthCheck.successes=m),"tcp-failures":s.fields.passiveHealthCheck.tcpFailures,"onUpdate:tcpFailures":c[37]||(c[37]=m=>s.fields.passiveHealthCheck.tcpFailures=m),timeouts:s.fields.passiveHealthCheck.timeouts,"onUpdate:timeouts":c[38]||(c[38]=m=>s.fields.passiveHealthCheck.timeouts=m),type:s.fields.passiveHealthCheck.type,"onUpdate:type":c[39]||(c[39]=m=>s.fields.passiveHealthCheck.type=m),"unhealthy-http-statuses":s.fields.passiveHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":c[40]||(c[40]=m=>s.fields.passiveHealthCheck.unhealthyHttpStatuses=m),readonly:s.readonly},null,8,["http-failures","http-statuses","successes","tcp-failures","timeouts","type","unhealthy-http-statuses","readonly"])):e.createCommentVNode("",!0)]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])]))}}),So="",zs=ee(Qs,[["__scopeId","data-v-810fb7b7"]]),Ws=e.createElementVNode("code",null,"10",-1),Gs=e.createElementVNode("code",null,"65536",-1),Xs={"data-testid":"client_certificate-plain-text"},Ys=e.defineComponent({__name:"UpstreamsConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(t){const o=t,{i18n:{t:a},i18nT:l}=Z.useI18n(),i=e.computed(()=>ne.form[o.config.app].edit),f=e.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:j.Basic,tooltip:a("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:j.Basic},hash_on:{order:7,section:j.Basic},hash_on_header:{order:8,section:j.Basic},hash_on_uri_capture:{order:9,section:j.Basic},hash_on_query_arg:{order:10,section:j.Basic,label:`${a("upstreams.form.fields.hash_on.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:j.Basic},hash_on_cookie_path:{order:12,section:j.Basic},healthchecks:{order:13,section:j.Basic,type:R.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(b,V)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(xl),{config:t.config,"config-schema":f.value,"fetch-url":i.value,"hide-title":t.hideTitle,"onCopy:success":V[0]||(V[0]=n=>b.$emit("copy:success",n)),"onFetch:error":V[1]||(V[1]=n=>b.$emit("fetch:error",n)),"onFetch:success":V[2]||(V[2]=n=>b.$emit("fetch:success",n)),onLoading:V[3]||(V[3]=n=>b.$emit("loading",n))},{"name-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":e.withCtx(({row:n})=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(n.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:e.withCtx(()=>[Ws]),max:e.withCtx(()=>[Gs]),_:1})]),"hash_fallback-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(a)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:e.withCtx(({rowValue:n})=>[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[e.createElementVNode("span",null,e.toDisplayString(n==null?void 0:n.id),1)])])]),_:1},8,["config","config-schema","fetch-url","hide-title"])]))}});z.TargetForm=et,z.TargetsList=gs,z.UpstreamsConfigCard=Ys,z.UpstreamsForm=zs,z.UpstreamsList=cs,Object.defineProperty(z,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-7410504d] .k-button.navigation-button{font-size:14px;font-weight:400}.kong-ui-copy-uuid[data-v-e4ea1359]{display:flex}.kong-ui-copy-uuid .uuid-container[data-v-e4ea1359]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-e4ea1359]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-e4ea1359]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-e4ea1359]{display:flex}.config-card-details-row[data-v-a3c5ab01]{border-bottom:var(--2c6ac268);display:var(--c7a65802);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-a3c5ab01]{width:var(--778426fe)}.config-card-details-row .config-card-details-label label[data-v-a3c5ab01]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-a3c5ab01]{width:var(--777f9b48)}.config-card-details-row .config-card-details-value .truncated[data-v-a3c5ab01]{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-a3c5ab01]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-a3c5ab01] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-a3c5ab01]{display:flex}.config-card-details-row .config-badge[data-v-a3c5ab01]{margin-right:4px}.config-card-details-row[data-v-a3c5ab01] .k-input-label{margin-bottom:0}.config-card-details-row[data-v-a3c5ab01] .k-input-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-a3c5ab01] .config-card-details-row{width:auto}.kong-ui-entity-base-config-card[data-v-b72bbdde] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-b72bbdde]{display:flex}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-b72bbdde]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-b72bbdde] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-form[data-v-2286e5f2]{border:1px solid #F1F1F5!important;box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-2286e5f2]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-2286e5f2] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-f8a220e9] [role=button]{display:inline}.kong-ui-entity-base-table[data-v-a598b1d9]{border:1px solid #F1F1F5!important}.kong-ui-entity-base-table .toolbar-container[data-v-a598b1d9]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-a598b1d9]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-a598b1d9]{float:right}.kong-ui-entity-base-table .actions-container[data-v-a598b1d9] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-a598b1d9]{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-745f38c0]{width:100%}.kong-ui-entity-filter[data-v-745f38c0]{display:flex;position:relative}.kong-ui-entity-filter[data-v-745f38c0] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-745f38c0] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-745f38c0]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-745f38c0]{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-745f38c0] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-745f38c0]{align-items:center;display:flex}.menu-item-indicator[data-v-745f38c0]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-745f38c0]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-745f38c0] .k-input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-745f38c0] .k-input-wrapper{width:100%}.menu-item-body[data-v-745f38c0] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-745f38c0] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-745f38c0]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-745f38c0]{display:flex;justify-content:space-between;margin:10px 0 6px}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-entities-upstreams-list .kong-ui-entity-filter-input[data-v-033bd1ef]{width:300px}.kong-ui-entities-upstreams-list .upstream-name[data-v-033bd1ef]{font-weight:600}[data-v-77134304] .kong-card{padding:0}[data-v-77134304] .kong-card.border{border:0!important}[data-v-77134304] .kong-card.borderTop{border-top:0!important}[data-v-77134304] .k-prompt-proceed .kong-icon-spinner{display:var(--2cc5362c)}.kong-ui-entities-target-form[data-v-77134304]{width:100%}.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-77134304],.kong-ui-entities-target-form .target-form-container .target-form-info p[data-v-77134304],.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-77134304] 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-77134304]{margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-77134304]:last-of-type{margin-bottom:0}.kong-ui-entities-target-form[data-v-77134304] .k-alert{margin-top:20px}.kong-ui-entities-target-form[data-v-77134304] .form-actions{display:none!important}.kong-ui-entities-targets-list .target-address[data-v-aba40390]{font-weight:600}.margin-bottom-6[data-v-02065a3d]{margin-bottom:24px}.fields-group-title[data-v-522adce0]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-522adce0]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-522adce0]{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-18b80e62]{margin-bottom:24px}.margin-top-6[data-v-18b80e62]{margin-top:24px}.fields-group-title[data-v-18b80e62]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-18b80e62]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.headers-row[data-v-18b80e62]{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-7410504d] .k-button.navigation-button{font-size:14px;font-weight:400}.kong-ui-copy-uuid[data-v-e4ea1359]{display:flex}.kong-ui-copy-uuid .uuid-container[data-v-e4ea1359]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-e4ea1359]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-e4ea1359]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-e4ea1359]{display:flex}.config-card-details-row[data-v-a3c5ab01]{border-bottom:var(--2c6ac268);display:var(--c7a65802);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-a3c5ab01]{width:var(--778426fe)}.config-card-details-row .config-card-details-label label[data-v-a3c5ab01]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-a3c5ab01]{width:var(--777f9b48)}.config-card-details-row .config-card-details-value .truncated[data-v-a3c5ab01]{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-a3c5ab01]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-a3c5ab01] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-a3c5ab01]{display:flex}.config-card-details-row .config-badge[data-v-a3c5ab01]{margin-right:4px}.config-card-details-row[data-v-a3c5ab01] .k-input-label{margin-bottom:0}.config-card-details-row[data-v-a3c5ab01] .k-input-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-a3c5ab01] .config-card-details-row{width:auto}.kong-ui-entity-base-config-card[data-v-8ede8e2e] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-8ede8e2e]{display:flex}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-8ede8e2e]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-8ede8e2e] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-form[data-v-bffcae34]{border:1px solid #F1F1F5!important;box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-bffcae34]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-bffcae34] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-f8a220e9] [role=button]{display:inline}.kong-ui-entity-base-table[data-v-a598b1d9]{border:1px solid #F1F1F5!important}.kong-ui-entity-base-table .toolbar-container[data-v-a598b1d9]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-a598b1d9]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-a598b1d9]{float:right}.kong-ui-entity-base-table .actions-container[data-v-a598b1d9] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-a598b1d9]{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-745f38c0]{width:100%}.kong-ui-entity-filter[data-v-745f38c0]{display:flex;position:relative}.kong-ui-entity-filter[data-v-745f38c0] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-745f38c0] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-745f38c0]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-745f38c0]{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-745f38c0] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-745f38c0]{align-items:center;display:flex}.menu-item-indicator[data-v-745f38c0]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-745f38c0]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-745f38c0] .k-input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-745f38c0] .k-input-wrapper{width:100%}.menu-item-body[data-v-745f38c0] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-745f38c0] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-745f38c0]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-745f38c0]{display:flex;justify-content:space-between;margin:10px 0 6px}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-entities-upstreams-list .kong-ui-entity-filter-input[data-v-033bd1ef]{width:300px}.kong-ui-entities-upstreams-list .upstream-name[data-v-033bd1ef]{font-weight:600}[data-v-77134304] .kong-card{padding:0}[data-v-77134304] .kong-card.border{border:0!important}[data-v-77134304] .kong-card.borderTop{border-top:0!important}[data-v-77134304] .k-prompt-proceed .kong-icon-spinner{display:var(--2cc5362c)}.kong-ui-entities-target-form[data-v-77134304]{width:100%}.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-77134304],.kong-ui-entities-target-form .target-form-container .target-form-info p[data-v-77134304],.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-77134304] 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-77134304]{margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-77134304]:last-of-type{margin-bottom:0}.kong-ui-entities-target-form[data-v-77134304] .k-alert{margin-top:20px}.kong-ui-entities-target-form[data-v-77134304] .form-actions{display:none!important}.kong-ui-entities-targets-list .target-address[data-v-aba40390]{font-weight:600}.margin-bottom-6[data-v-02065a3d]{margin-bottom:24px}.fields-group-title[data-v-522adce0]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-522adce0]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-522adce0]{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-18b80e62]{margin-bottom:24px}.margin-top-6[data-v-18b80e62]{margin-top:24px}.fields-group-title[data-v-18b80e62]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-18b80e62]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.headers-row[data-v-18b80e62]{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": "1.1.
|
|
3
|
+
"version": "1.1.22-pr.790.b9b7a5bf.0",
|
|
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": "^1.3.
|
|
52
|
+
"@kong-ui-public/entities-shared": "^1.3.4-pr.790.b9b7a5bf.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"dev": "cross-env USE_SANDBOX=true vite",
|