@kong-ui-public/entities-upstreams-targets 3.5.35 → 3.5.37
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(Q,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared","vue-router","@kong/icons","@kong-ui-public/i18n"],e):(Q=typeof globalThis<"u"?globalThis:Q||self,e(Q["kong-ui-entities-upstreams-targets"]={},Q.Vue,Q["kong-ui-public-entities-shared"],Q.VueRouter,Q.KongIcons,Q["kong-ui-public-i18n"]))})(this,function(Q,e,m,Ce,oe,_e){"use strict";const Rt={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 jt(){const a=_e.createI18n("en-us",Rt);return{i18n:a,i18nT:_e.i18nTComponent(a)}}function re(a){const{replaceId:E=!1}=a,r=e.ref([]);return{addedItems:r,trackNewItems:(i,k)=>{if(k){const g={...i};E&&(g.value=i.label),r.value.push(g)}else r.value=r.value.filter(g=>g.value!==i.value)}}}const ne=[{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"}],pe=10,fe=65536,Lt=0,Qt=65535,ee=0,te=255,we=0,Ve=255,Wt=0,Jt=65535,He=0,Ne=65535,zt=0,Gt=2**31,me=["200","302"],ge=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],ye=["429","404","500","501","502","503","504","505"],ke=["429","500","503"];function ie(){const a=o=>/^\d+$/.test(o),E=(o,u,c)=>{if(a(o)){const C=Number(o);return C>=u&&C<=c}else return!1},r=o=>o.map(u=>Number(u)),l=o=>o.map(u=>u.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:me,unhealthyInterval:"0",httpFailures:"5",tcpFailures:"5",unhealthyHttpStatuses:ye,unhealthyTimeouts:"0"},passiveHealthCheck:{type:"http",successes:"0",httpStatuses:ge,timeouts:"0",httpFailures:"5",unhealthyHttpStatuses:ke,tcpFailures:"5"}});return{isInteger:a,inRange:E,stringToNumberArray:r,numberToStringArray:l,upstreamsResponseToFields:o=>{var c,C,p,t,O,V,d,_,K,x,j,W,y,w,N,H,f,D,A,G,z,T,F,P,$,R,b,I,h,s,n,U,v,S,B,J,M,L,Z,Se,Te,Ue,Fe,Ie,qe,Be,Ee,Oe,De,$e,ve,Pe,Ae,Me,Ke,Re,je,Le,Qe,We,Je,ze,Ge,Xe,Ye,Ze,et,tt,at,lt,st,rt,ot,nt,it,ht,ct,dt,ut,pt,ft,mt,gt,yt,kt,bt,Ct,_t,wt,Vt,Ht,Nt,xt,St,Tt,Ut,Ft,It,qt,Bt,Et,Ot,Dt,$t,vt,Pt,At,Mt,Kt;const u=i();return u.name=o.name||"",u.algorithm=o.algorithm||"round-robin",u.hostHeader=o.host_header||"",u.clientCertificate=o.client_certificate?(c=o.client_certificate)==null?void 0:c.id:"",u.tags=((C=o.tags)==null?void 0:C.join(", "))||"",u.slots=o.slots!==null&&o.slots!==void 0?o.slots.toString():"10000",u.hashOn=o.hash_on||"none",u.hashFallback=o.hash_fallback||"none",u.hashOnHeader=o.hash_on_header||"",u.hashOnCookie=o.hash_on_cookie||"",u.hashOnCookiePath=o.hash_on_cookie_path||"/",u.hashOnQueryArgument=o.hash_on_query_arg||"",u.hashOnUriCapture=o.hash_on_uri_capture||"",u.hashFallbackHeader=o.hash_fallback_header||"",u.hashFallbackQueryArgument=o.hash_fallback_query_arg||"",u.hashFallbackUriCapture=o.hash_fallback_uri_capture||"",u.healthchecksThreshold=o.healthchecks.threshold!==null&&o.healthchecks.threshold!==void 0?o.healthchecks.threshold.toString():"",u.activeHealthSwitch=((t=(p=o.healthchecks.active)==null?void 0:p.healthy)==null?void 0:t.interval)!==0||((V=(O=o.healthchecks.active)==null?void 0:O.unhealthy)==null?void 0:V.interval)!==0,u.activeHealthCheck.type=((d=o.healthchecks.active)==null?void 0:d.type)||"http",u.activeHealthCheck.httpPath=((_=o.healthchecks.active)==null?void 0:_.http_path)||"/",u.activeHealthCheck.timeout=((K=o.healthchecks.active)==null?void 0:K.timeout)!==null&&((x=o.healthchecks.active)==null?void 0:x.timeout)!==void 0?(W=(j=o.healthchecks.active)==null?void 0:j.timeout)==null?void 0:W.toString():"",u.activeHealthCheck.concurrency=((y=o.healthchecks.active)==null?void 0:y.concurrency)!==null&&((w=o.healthchecks.active)==null?void 0:w.concurrency)!==void 0?(H=(N=o.healthchecks.active)==null?void 0:N.concurrency)==null?void 0:H.toString():"",u.activeHealthCheck.httpsSni=((f=o.healthchecks.active)==null?void 0:f.https_sni)||"",u.activeHealthCheck.verifySsl=((D=o.healthchecks.active)==null?void 0:D.https_verify_certificate)||!1,u.activeHealthCheck.headers=(A=o.healthchecks.active)!=null&&A.headers&&Object.entries((G=o.healthchecks.active)==null?void 0:G.headers).length>0?Object.entries((z=o.healthchecks.active)==null?void 0:z.headers).map(([Oa,be])=>({key:Oa,values:be==null?void 0:be.join(", ")})):[{key:"",values:""}],u.activeHealthCheck.interval=((F=(T=o.healthchecks.active)==null?void 0:T.healthy)==null?void 0:F.interval)!==null&&(($=(P=o.healthchecks.active)==null?void 0:P.healthy)==null?void 0:$.interval)!==void 0?(I=(b=(R=o.healthchecks.active)==null?void 0:R.healthy)==null?void 0:b.interval)==null?void 0:I.toString():"0",u.activeHealthCheck.interval=((s=(h=o.healthchecks.active)==null?void 0:h.healthy)==null?void 0:s.interval)!==null&&((U=(n=o.healthchecks.active)==null?void 0:n.healthy)==null?void 0:U.interval)!==void 0?(B=(S=(v=o.healthchecks.active)==null?void 0:v.healthy)==null?void 0:S.interval)==null?void 0:B.toString():"0",u.activeHealthCheck.successes=((M=(J=o.healthchecks.active)==null?void 0:J.healthy)==null?void 0:M.successes)!==null&&((Z=(L=o.healthchecks.active)==null?void 0:L.healthy)==null?void 0:Z.successes)!==void 0?(Ue=(Te=(Se=o.healthchecks.active)==null?void 0:Se.healthy)==null?void 0:Te.successes)==null?void 0:Ue.toString():"0",u.activeHealthCheck.httpStatuses=(Ie=(Fe=o.healthchecks.active)==null?void 0:Fe.healthy)!=null&&Ie.http_statuses?l(((Be=(qe=o.healthchecks.active)==null?void 0:qe.healthy)==null?void 0:Be.http_statuses)||[]):me,u.activeHealthCheck.unhealthyInterval=((Oe=(Ee=o.healthchecks.active)==null?void 0:Ee.unhealthy)==null?void 0:Oe.interval)!==null&&(($e=(De=o.healthchecks.active)==null?void 0:De.unhealthy)==null?void 0:$e.interval)!==void 0?(Ae=(Pe=(ve=o.healthchecks.active)==null?void 0:ve.unhealthy)==null?void 0:Pe.interval)==null?void 0:Ae.toString():"0",u.activeHealthCheck.httpFailures=((Ke=(Me=o.healthchecks.active)==null?void 0:Me.unhealthy)==null?void 0:Ke.http_failures)!==null&&((je=(Re=o.healthchecks.active)==null?void 0:Re.unhealthy)==null?void 0:je.http_failures)!==void 0?(We=(Qe=(Le=o.healthchecks.active)==null?void 0:Le.unhealthy)==null?void 0:Qe.http_failures)==null?void 0:We.toString():"0",u.activeHealthCheck.unhealthyTimeouts=((ze=(Je=o.healthchecks.active)==null?void 0:Je.unhealthy)==null?void 0:ze.timeouts)!==null&&((Xe=(Ge=o.healthchecks.active)==null?void 0:Ge.unhealthy)==null?void 0:Xe.timeouts)!==void 0?(et=(Ze=(Ye=o.healthchecks.active)==null?void 0:Ye.unhealthy)==null?void 0:Ze.timeouts)==null?void 0:et.toString():"0",u.activeHealthCheck.unhealthyHttpStatuses=(at=(tt=o.healthchecks.active)==null?void 0:tt.unhealthy)!=null&&at.http_statuses?l(((st=(lt=o.healthchecks.active)==null?void 0:lt.unhealthy)==null?void 0:st.http_statuses)||[]):ye,u.passiveHealthSwitch=((ot=(rt=o.healthchecks.passive)==null?void 0:rt.healthy)==null?void 0:ot.successes)!==0||((it=(nt=o.healthchecks.passive)==null?void 0:nt.unhealthy)==null?void 0:it.timeouts)!==0||((ct=(ht=o.healthchecks.passive)==null?void 0:ht.unhealthy)==null?void 0:ct.tcp_failures)!==0||((ut=(dt=o.healthchecks.passive)==null?void 0:dt.unhealthy)==null?void 0:ut.http_failures)!==0,u.passiveHealthCheck.type=((pt=o.healthchecks.passive)==null?void 0:pt.type)||"http",u.passiveHealthCheck.successes=((mt=(ft=o.healthchecks.passive)==null?void 0:ft.healthy)==null?void 0:mt.successes)!==null&&((yt=(gt=o.healthchecks.passive)==null?void 0:gt.healthy)==null?void 0:yt.successes)!==void 0?(Ct=(bt=(kt=o.healthchecks.passive)==null?void 0:kt.healthy)==null?void 0:bt.successes)==null?void 0:Ct.toString():"0",u.passiveHealthCheck.httpStatuses=(wt=(_t=o.healthchecks.passive)==null?void 0:_t.healthy)!=null&&wt.http_statuses?l(((Ht=(Vt=o.healthchecks.passive)==null?void 0:Vt.healthy)==null?void 0:Ht.http_statuses)||[]):ge,u.passiveHealthCheck.timeouts=((xt=(Nt=o.healthchecks.passive)==null?void 0:Nt.unhealthy)==null?void 0:xt.timeouts)!==null&&((Tt=(St=o.healthchecks.passive)==null?void 0:St.unhealthy)==null?void 0:Tt.timeouts)!==void 0?(It=(Ft=(Ut=o.healthchecks.passive)==null?void 0:Ut.unhealthy)==null?void 0:Ft.timeouts)==null?void 0:It.toString():"0",u.passiveHealthCheck.tcpFailures=((Bt=(qt=o.healthchecks.passive)==null?void 0:qt.unhealthy)==null?void 0:Bt.tcp_failures)!==null&&((Ot=(Et=o.healthchecks.passive)==null?void 0:Et.unhealthy)==null?void 0:Ot.tcp_failures)!==void 0?(vt=($t=(Dt=o.healthchecks.passive)==null?void 0:Dt.unhealthy)==null?void 0:$t.tcp_failures)==null?void 0:vt.toString():"",u.passiveHealthCheck.unhealthyHttpStatuses=(At=(Pt=o.healthchecks.passive)==null?void 0:Pt.unhealthy)!=null&&At.http_statuses?l(((Kt=(Mt=o.healthchecks.passive)==null?void 0:Mt.unhealthy)==null?void 0:Kt.http_statuses)||[]):ke,u},getDefaultUpstreamFields:i,objectsAreEqual:(o,u)=>{try{return JSON.stringify(o)===JSON.stringify(u)}catch{return!1}},cloneDeep:o=>JSON.parse(JSON.stringify(o))}}const X={useI18n:jt,useMultiselectCreation:re,useHelpers:ie},ae="/v2/control-planes/{controlPlaneId}/core-entities",le="/{workspace}",se={list:{konnect:`${ae}/upstreams`,kongManager:`${le}/upstreams`},form:{konnect:{getServices:`${ae}/services`,getCertificates:`${ae}/certificates`,validate:`${ae}/v1/schemas/json/upstream/validate`,create:`${ae}/upstreams`,edit:`${ae}/upstreams/{id}`},kongManager:{getServices:`${le}/services`,getCertificates:`${le}/certificates`,validate:`${le}/schemas/upstreams/validate`,create:`${le}/upstreams`,edit:`${le}/upstreams/{id}`}}},Xt={class:"kong-ui-entities-upstreams-list"},Yt={class:"upstream-name"},Zt=e.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||!a.createRoute||!a.getViewRoute||!a.getEditRoute||a.app==="kongManager"&&!a.isExactMatch&&!a.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},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(a,{emit:E}){var R;const r=E,l=a,{i18n:{t:i}}=X.useI18n(),k=Ce.useRouter(),{axiosInstance:g}=m.useAxios((R=l.config)==null?void 0:R.axiosRequestConfig),q=e.ref(1),o=e.computed(()=>l.config.app!=="kongManager"||!!l.config.disableSorting),u={name:{label:i("upstreams.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},slots:{label:i("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:i("upstreams.list.table_headers.tags"),sortable:!1}},c=u,C=e.computed(()=>{var I,h;let b=`${l.config.apiBaseUrl}${se.list[l.config.app]}`;return l.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((I=l.config)==null?void 0:I.controlPlaneId)||""):l.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(h=l.config)!=null&&h.workspace?`/${l.config.workspace}`:"")),b}),p=e.ref(""),t=e.computed(()=>{const b=l.config.app==="konnect"||l.config.isExactMatch;if(b)return{isExactMatch:b,placeholder:i("upstreams.search.placeholder")};const{name:I,slots:h}=u;return{isExactMatch:b,fields:{name:I,slots:h},schema:l.config.filterSchema}}),{fetcher:O,fetcherState:V}=m.useFetcher(l.config,C.value),d=()=>{p.value=""},_=()=>{q.value++},K=e.ref(null),x=e.ref(!1),j=(b,I)=>{const h=b.id;if(!I(h)){r("copy:error",{entity:b,field:"id",message:i("upstreams.errors.copy")});return}r("copy:success",{entity:b,field:"id",message:i("upstreams.copy.success",{val:h})})},W=(b,I)=>{const h=JSON.stringify(b);if(!I(h)){r("copy:error",{entity:b,message:i("upstreams.errors.copy")});return}r("copy:success",{entity:b,message:i("upstreams.copy.success_brief")})},y=async b=>{var h;await((h=l.canRetrieve)==null?void 0:h.call(l,b))&&k.push(l.config.getViewRoute(b.id))},w=b=>({label:i("upstreams.actions.view"),to:l.config.getViewRoute(b)}),N=b=>({label:i("upstreams.actions.edit"),to:l.config.getEditRoute(b)}),H=e.ref(void 0),f=e.ref(!1),D=e.ref(!1),A=e.ref(""),G=m.useDeleteUrlBuilder(l.config,C.value),z=b=>{H.value=b,f.value=!0},T=()=>{f.value=!1},F=async()=>{var b,I,h;if((b=H.value)!=null&&b.id){D.value=!0;try{await g.delete(G(H.value.id)),D.value=!1,f.value=!1,q.value++,r("delete:success",H.value)}catch(s){A.value=((h=(I=s.response)==null?void 0:I.data)==null?void 0:h.message)||s.message||i("upstreams.errors.delete"),r("error",s)}finally{D.value=!1}}},P=e.ref(!1);e.watch(V,b=>{var I,h,s,n;if(Array.isArray((I=b==null?void 0:b.response)==null?void 0:I.data)&&(P.value=b.response.data.length>0),b.status===m.FetcherStatus.NoRecords?x.value=!0:x.value=!1,b.status===m.FetcherStatus.Error){K.value={title:i("upstreams.errors.general")},(n=(s=(h=b.error)==null?void 0:h.response)==null?void 0:s.data)!=null&&n.message&&(K.value.message=b.error.response.data.message),r("error",b.error);return}K.value=null});const $=e.ref({ctaPath:l.config.createRoute,ctaText:void 0,message:`${i("upstreams.list.empty_state.description")}${l.config.additionMessageForEmptyState?` ${l.config.additionMessageForEmptyState}`:""}`,title:i("upstreams.title")});return e.onBeforeMount(async()=>{await l.canCreate()&&($.value.title=i("upstreams.list.empty_state.title"),$.value.ctaText=i("upstreams.actions.create"))}),(b,I)=>{const h=e.resolveComponent("KButton"),s=e.resolveComponent("KBadge"),n=e.resolveComponent("KTruncate"),U=e.resolveComponent("KDropdownItem"),v=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Xt,[e.createVNode(e.unref(m.EntityBaseTable),{"cache-identifier":a.cacheIdentifier,"disable-sorting":o.value,"empty-state-options":$.value,"enable-entity-actions":"","error-message":K.value,fetcher:e.unref(O),"fetcher-cache-key":q.value,"hide-toolbar":x.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:p.value,"table-headers":e.unref(c),onClearSearchInput:d,"onClick:row":I[1]||(I[1]=S=>y(S)),onSort:_},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(m.EntityFilter),{modelValue:p.value,"onUpdate:modelValue":I[0]||(I[0]=S=>p.value=S),config:t.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!a.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(h,{appearance:"primary","data-testid":"toolbar-add-upstream",size:a.useActionOutside?"medium":"large",to:a.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["size","to"]),[[e.vShow,P.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:S})=>[e.createElementVNode("span",Yt,e.toDisplayString(S),1)]),tags:e.withCtx(({rowValue:S})=>[e.createVNode(n,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S,B=>(e.openBlock(),e.createBlock(s,{key:B,"max-width":"auto"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B),1)]),_:2},1024))),128))]),_:2},1024)]),actions:e.withCtx(({row:S})=>[e.createVNode(v,null,{default:e.withCtx(({copyToClipboard:B})=>[e.createVNode(U,{"data-testid":"action-entity-copy-id",onClick:J=>j(S,B)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(v,null,{default:e.withCtx(({copyToClipboard:B})=>[e.createVNode(U,{"data-testid":"action-entity-copy-json",onClick:J=>W(S,B)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canRetrieve(S)},{default:e.withCtx(()=>[e.createVNode(U,{"data-testid":"action-entity-view","has-divider":"",item:w(S.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canEdit(S)},{default:e.withCtx(()=>[e.createVNode(U,{"data-testid":"action-entity-edit",item:N(S.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canDelete(S)},{default:e.withCtx(()=>[e.createVNode(U,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:B=>z(S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("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","hide-toolbar","query","table-headers"]),e.createVNode(e.unref(m.EntityDeleteModal),{"action-pending":D.value,description:e.unref(i)("upstreams.delete.description"),"entity-name":H.value&&(H.value.name||H.value.id),"entity-type":e.unref(m.EntityTypes).Upstream,error:A.value,title:e.unref(i)("upstreams.delete.title"),visible:f.value,onCancel:T,onProceed:F},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Y=(a,E)=>{const r=a.__vccOpts||a;for(const[l,i]of E)r[l]=i;return r},ea=Y(Zt,[["__scopeId","data-v-f95599ac"]]),he="/v2/control-planes/{controlPlaneId}/core-entities",ce="/{workspace}",de={list:{konnect:`${he}/upstreams/{upstreamId}/targets`,kongManager:`${ce}/upstreams/{upstreamId}/targets`},form:{konnect:{create:`${he}/upstreams/{upstreamId}/targets`,edit:`${he}/upstreams/{upstreamId}/targets/{id}`,validate:`${he}/v1/schemas/json/target/validate`},kongManager:{create:`${ce}/upstreams/{upstreamId}/targets`,edit:`${ce}/upstreams/{upstreamId}/targets/{id}`,validate:`${ce}/schemas/targets/validate`}}},ta={class:"kong-ui-entities-target-form"},aa={class:"target-form-container"},la={key:0,class:"target-form-info"},xe=Y(e.defineComponent({__name:"TargetForm",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||a.app==="konnect"&&!a.controlPlaneId||a.app==="kongManager"&&typeof a.workspace!="string"||!a.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(a,{emit:E}){var W;const r=E,l=a,{i18n:{t:i}}=X.useI18n(),{getMessageFromError:k}=m.useErrors(),{axiosInstance:g}=m.useAxios((W=l.config)==null?void 0:W.axiosRequestConfig),q=e.computed(()=>{var y;return de.form[l.config.app].edit.replace(/{upstreamId}/gi,((y=l.config)==null?void 0:y.upstreamId)||"")}),o=e.computed(()=>l.targetId?m.EntityBaseFormType.Edit:m.EntityBaseFormType.Create),u=e.computed(()=>o.value===m.EntityBaseFormType.Edit?i("targets.form.edit.title"):i("targets.form.create.title")),c=e.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),C=e.reactive({target:"",weight:100,tags:""}),p={target:"",weight:100,tags:""},t=e.computed(()=>{const y=parseInt(c.fields.weight.toString(),10);return y<0||y>65535}),O=e.computed(()=>JSON.stringify(c.fields)!==JSON.stringify(C)&&!!c.fields.target&&!!c.fields.weight&&!t.value),V=y=>{var w;c.fields.target=(y==null?void 0:y.target)||"",c.fields.weight=(y==null?void 0:y.weight)??"",c.fields.tags=((w=y==null?void 0:y.tags)==null?void 0:w.join(", "))||"",Object.assign(C,c.fields)},d=()=>{c.errorMessage="",r("cancel")},_=e.computed(()=>{var w,N;let y=`${l.config.apiBaseUrl}${de.form[l.config.app].validate}`;return l.config.app==="konnect"?y=y.replace(/{controlPlaneId}/gi,((w=l.config)==null?void 0:w.controlPlaneId)||""):l.config.app==="kongManager"&&(y=y.replace(/\/{workspace}/gi,(N=l.config)!=null&&N.workspace?`/${l.config.workspace}`:"")),y=y.replace(/{id}/gi,l.targetId),y}),K=e.computed(()=>{var w,N,H,f;let y=`${l.config.apiBaseUrl}${de.form[l.config.app][o.value]}`;return l.config.app==="konnect"?y=y.replace(/{controlPlaneId}/gi,((w=l.config)==null?void 0:w.controlPlaneId)||"").replace(/{upstreamId}/gi,((N=l.config)==null?void 0:N.upstreamId)||""):l.config.app==="kongManager"&&(y=y.replace(/\/{workspace}/gi,(H=l.config)!=null&&H.workspace?`/${l.config.workspace}`:"").replace(/{upstreamId}/gi,((f=l.config)==null?void 0:f.upstreamId)||"")),y=y.replace(/{id}/gi,l.targetId),y}),x=e.computed(()=>{var y,w,N;return{target:c.fields.target,weight:parseInt(c.fields.weight),tags:(N=(w=(y=c.fields.tags)==null?void 0:y.split(","))==null?void 0:w.map(H=>String(H||"").trim()))==null?void 0:N.filter(H=>H!==""),upstream:{id:l.config.upstreamId}}}),j=async()=>{var y,w;try{c.isReadonly=!0,c.errorMessage="";let N;if(await g.post(_.value,x.value),o.value==="create"?N=await g.post(K.value,x.value):o.value==="edit"&&(N=((y=l.config)==null?void 0:y.app)==="konnect"?await g.put(K.value,x.value):await g.patch(K.value,x.value)),N){const{data:H}=N;c.fields.target=(H==null?void 0:H.name)||"",c.fields.weight=(H==null?void 0:H.weight)??100,c.fields.tags=((w=H==null?void 0:H.tags)==null?void 0:w.join(", "))||"",r("update",H),Object.assign(c.fields,p)}}catch(N){c.errorMessage=k(N),r("error",N)}finally{c.isReadonly=!1}};return e.watch(()=>l.targetId,()=>{Object.assign(c.fields,p)}),(y,w)=>{const N=e.resolveComponent("KInput"),H=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(H,{"action-button-disabled":!O.value||c.isReadonly,"action-button-text":e.unref(i)("targets.form.buttons.save"),"cancel-button-text":e.unref(i)("targets.form.buttons.cancel"),title:u.value,visible:a.isVisible,onCancel:d,onProceed:j},{default:e.withCtx(()=>[e.createElementVNode("div",ta,[e.createVNode(e.unref(m.EntityBaseForm),{config:a.config,"edit-id":a.targetId,"entity-type":e.unref(m.SupportedEntityType).Target,"error-message":c.errorMessage,"fetch-url":q.value,"form-fields":x.value,"is-readonly":c.isReadonly,onCancel:d,"onFetch:error":w[3]||(w[3]=f=>y.$emit("error",f)),"onFetch:success":V,onLoading:w[4]||(w[4]=f=>y.$emit("loading",f))},{default:e.withCtx(()=>[e.createElementVNode("div",aa,[y.$slots.info?(e.openBlock(),e.createElementBlock("div",la,[e.renderSlot(y.$slots,"info",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(N,{modelValue:c.fields.target,"onUpdate:modelValue":w[0]||(w[0]=f=>c.fields.target=f),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:e.unref(i)("targets.form.fields.target.label"),"label-attributes":{info:e.unref(i)("targets.form.fields.target.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("targets.form.fields.target.placeholder"),readonly:c.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(N,{modelValue:c.fields.weight,"onUpdate:modelValue":w[1]||(w[1]=f=>c.fields.weight=f),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight",error:t.value,"error-message":e.unref(i)("targets.errors.weight"),label:e.unref(i)("targets.form.fields.weight.label"),"label-attributes":{info:e.unref(i)("targets.form.fields.weight.tooltip"),tooltipAttributes:{maxWidth:"400"}},max:"65535",min:"0",readonly:c.isReadonly,required:"",type:"number"},null,8,["modelValue","error","error-message","label","label-attributes","readonly"]),e.createVNode(N,{modelValue:c.fields.tags,"onUpdate:modelValue":w[2]||(w[2]=f=>c.fields.tags=f),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:e.unref(i)("targets.form.fields.tags.help"),label:e.unref(i)("targets.form.fields.tags.label"),placeholder:e.unref(i)("targets.form.fields.tags.placeholder"),readonly:c.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])])]),_:3},8,["config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])]),_:3},8,["action-button-disabled","action-button-text","cancel-button-text","title","visible"])}}}),[["__scopeId","data-v-6a64b86e"]]),sa={class:"kong-ui-entities-targets-list"},ra={class:"target-address"},oa=Y(e.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||!a.upstreamId||a.app==="kongManager"&&(typeof a.canMarkHealthy>"u"||typeof a.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},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success","health-actions:healthy","health-actions:unhealthy","create:target","update:target"],setup(a,{emit:E}){var h;const r=E,l=a,{i18n:{t:i}}=X.useI18n(),{axiosInstance:k}=m.useAxios((h=l.config)==null?void 0:h.axiosRequestConfig),g=e.ref(1),q=e.computed(()=>l.config.app!=="kongManager"||!!l.config.disableSorting),u={target:{label:i("targets.list.table_headers.target_address"),sortable:!0,hidable:!1},weight:{label:i("targets.list.table_headers.weight"),sortable:!0},tags:{label:i("targets.list.table_headers.tags"),sortable:!1}},c=e.computed(()=>{var n,U,v,S;let s=`${l.config.apiBaseUrl}${de.list[l.config.app]}`;return l.config.app==="konnect"?s=s.replace(/{controlPlaneId}/gi,((n=l.config)==null?void 0:n.controlPlaneId)||"").replace(/{upstreamId}/gi,((U=l.config)==null?void 0:U.upstreamId)||""):l.config.app==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(v=l.config)!=null&&v.workspace?`/${l.config.workspace}`:"").replace(/{upstreamId}/gi,((S=l.config)==null?void 0:S.upstreamId)||"")),s}),{fetcher:C,fetcherState:p}=m.useFetcher(l.config,c.value),t=()=>{g.value++},O=e.ref(null),V=e.ref(!1),d=()=>{$.value=!0},_=(s,n)=>{const U=s.id;if(!n(U)){r("copy:error",{entity:s,field:"id",message:i("targets.errors.copy")});return}r("copy:success",{entity:s,field:"id",message:i("targets.copy.success",{val:U})})},K=(s,n)=>{const U=JSON.stringify(s);if(!n(U)){r("copy:error",{entity:s,message:i("targets.errors.copy")});return}r("copy:success",{entity:s,message:i("targets.copy.success_brief")})},x=s=>{P.value=s,$.value=!0},j=s=>l.config.app==="konnect"?!1:l.config.canMarkHealthy(s),W=s=>l.config.app==="konnect"?!1:l.config.canMarkUnhealthy(s),y=e.ref(void 0),w=e.ref(!1),N=e.ref(!1),H=e.ref(""),f=m.useDeleteUrlBuilder(l.config,c.value),D=s=>{y.value=s,w.value=!0},A=()=>{w.value=!1},G=async()=>{var s,n,U;if((s=y.value)!=null&&s.id){N.value=!0;try{await k.delete(f(y.value.id)),N.value=!1,w.value=!1,g.value++,r("delete:success",y.value)}catch(v){H.value=((U=(n=v.response)==null?void 0:n.data)==null?void 0:U.message)||v.message||i("targets.errors.delete"),r("error",v)}finally{N.value=!1}}},z=e.ref(!1);e.watch(p,s=>{var n,U,v,S;if(Array.isArray((n=s==null?void 0:s.response)==null?void 0:n.data)&&(z.value=s.response.data.length>0),s.status===m.FetcherStatus.NoRecords?V.value=!0:V.value=!1,s.status===m.FetcherStatus.Error){O.value={title:i("targets.errors.general")},(S=(v=(U=s.error)==null?void 0:U.response)==null?void 0:v.data)!=null&&S.message&&(O.value.message=s.error.response.data.message),r("error",s.error);return}O.value=null});const T=e.ref({ctaText:void 0,message:`${i("targets.list.empty_state.description")}${l.config.additionMessageForEmptyState?` ${l.config.additionMessageForEmptyState}`:""}`,title:i("targets.title"),...l.config.createRoute&&{ctaPath:l.config.createRoute}});e.onBeforeMount(async()=>{await l.canCreate()&&(T.value.title=i("targets.list.empty_state.title"),T.value.ctaText=i("targets.actions.create"))});const F=e.computed(()=>({app:l.config.app,apiBaseUrl:l.config.apiBaseUrl,upstreamId:l.config.upstreamId,axiosRequestConfig:l.config.axiosRequestConfig,...l.config.app==="konnect"&&{controlPlaneId:l.config.controlPlaneId},...l.config.app==="kongManager"&&{workspace:l.config.workspace}})),P=e.ref(""),$=e.ref(!1),R=s=>{P.value?r("update:target",s):r("create:target",s),b()},b=()=>{I(),g.value++},I=()=>{$.value=!1,P.value=""};return(s,n)=>{const U=e.resolveComponent("KButton"),v=e.resolveComponent("KBadge"),S=e.resolveComponent("KTruncate"),B=e.resolveComponent("KDropdownItem"),J=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",sa,[e.createVNode(e.unref(m.EntityBaseTable),{"cache-identifier":a.cacheIdentifier,"disable-sorting":q.value,"empty-state-options":T.value,"enable-entity-actions":"","error-message":O.value,fetcher:e.unref(C),"fetcher-cache-key":g.value,"hide-toolbar":V.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":e.unref(u),onEmptyStateCtaClicked:n[1]||(n[1]=()=>l.config.createRoute?void 0:d()),onSort:t},{"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!a.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(U,{appearance:"primary","data-testid":"toolbar-new-target",size:a.useActionOutside?"medium":"large",to:l.config.createRoute?l.config.createRoute:void 0,onClick:n[0]||(n[0]=()=>l.config.createRoute?void 0:d())},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["size","to"]),[[e.vShow,z.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),target:e.withCtx(({rowValue:M})=>[e.createElementVNode("span",ra,e.toDisplayString(M),1)]),tags:e.withCtx(({rowValue:M})=>[e.createVNode(S,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M,L=>(e.openBlock(),e.createBlock(v,{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(J,null,{default:e.withCtx(({copyToClipboard:L})=>[e.createVNode(B,{"data-testid":"action-entity-copy-id",onClick:Z=>_(M,L)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(J,null,{default:e.withCtx(({copyToClipboard:L})=>[e.createVNode(B,{"data-testid":"action-entity-copy-json",onClick:Z=>K(M,L)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canEdit(M)},{default:e.withCtx(()=>[e.createVNode(B,{"data-testid":"action-entity-edit","has-divider":"",onClick:L=>x(M.id)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>j(M)},{default:e.withCtx(()=>[e.createVNode(B,{"data-testid":"action-target-mark-healthy",onClick:L=>r("health-actions:healthy",M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>W(M)},{default:e.withCtx(()=>[e.createVNode(B,{"data-testid":"action-target-mark-unhealthy",onClick:L=>r("health-actions:unhealthy",M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(m.PermissionsWrapper),{"auth-function":()=>a.canDelete(M)},{default:e.withCtx(()=>[e.createVNode(B,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:L=>D(M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("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","hide-toolbar","table-headers"]),e.createVNode(e.unref(m.EntityDeleteModal),{"action-pending":N.value,description:e.unref(i)("targets.delete.description"),"entity-type":e.unref(m.EntityTypes).Target,error:H.value,"need-confirm":!1,title:e.unref(i)("targets.delete.title"),visible:w.value,onCancel:A,onProceed:G},null,8,["action-pending","description","entity-type","error","title","visible"]),e.createVNode(xe,{config:F.value,"is-visible":$.value,"target-id":P.value,onCancel:I,onUpdate:R},e.createSlots({_:2},[s.$slots["form-info"]?{name:"info",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),[["__scopeId","data-v-980cfece"]]),na={key:1},ia=Y(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(a,{emit:E}){var D,A,G,z;const{i18nT:r,i18n:{t:l}}=X.useI18n(),i=a,k=E,{debouncedQueryChange:g,loading:q,loadItems:o,results:u,allRecords:c}=m.useDebouncedFilter(i.config,(A=se.form[(D=i.config)==null?void 0:D.app])==null?void 0:A.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:C,loading:p,loadItems:t,results:O}=m.useDebouncedFilter(i.config,(z=se.form[(G=i.config)==null?void 0:G.app])==null?void 0:z.getCertificates),V=e.ref(""),d=e.computed(()=>{var T;return!!i.name&&!((T=c.value)!=null&&T.some(F=>F.host===i.name))}),_=e.computed(()=>{var F,P,$;const T=d.value&&i.name.includes((F=V.value)==null?void 0:F.toLowerCase());return($=u.value)==null?void 0:$.map(R=>({label:R.host,value:R.id})).concat(T?[{label:i.name,value:((P=j.value)==null?void 0:P.value)||i.name}]:[])}),K=e.computed(()=>{var T;return(T=O.value)==null?void 0:T.map(F=>({label:F.id,value:F.id}))}),x=e.ref(""),j=e.ref({value:"",label:""}),W=e.computed(()=>{var T,F;return((T=_.value.find(P=>P.value===x.value))==null?void 0:T.label)||((F=j.value)==null?void 0:F.label)}),y=T=>{V.value=T,g(T)},w=T=>{j.value=T},N=()=>{j.value={value:"",label:""}},H=T=>{x.value=T,k("update:name",W.value)},f=e.ref(!1);return e.onBeforeMount(async()=>{var T,F;try{f.value=!0,await o(),i.name&&(x.value=((F=(T=_.value.find(P=>P.label===i.name))==null?void 0:T.value)==null?void 0:F.toString())||i.name),await t()}finally{f.value=!1}}),(T,F)=>{const P=e.resolveComponent("KSkeleton"),$=e.resolveComponent("KSelect"),R=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-general-info",description:e.unref(l)("upstreams.form.general_info.help"),title:e.unref(l)("upstreams.form.general_info.title")},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(P,{key:0,type:"form"})):(e.openBlock(),e.createElementBlock("div",na,[e.createVNode($,{class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"","filter-function":()=>!0,items:_.value,label:e.unref(l)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{"max-width":"400"}},loading:e.unref(q),"model-value":x.value,placeholder:e.unref(l)("upstreams.form.fields.name.placeholder"),readonly:a.readonly,required:"",width:"100%",onItemAdded:w,onItemRemoved:N,onQueryChange:y,"onUpdate:modelValue":H},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),e.createVNode(R,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:e.unref(l)("upstreams.form.fields.host_header.label"),"model-value":a.hostHeader,readonly:a.readonly,type:"text","onUpdate:modelValue":F[0]||(F[0]=b=>k("update:host-header",b))},null,8,["label","model-value","readonly"]),e.createVNode($,{class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"","filter-function":()=>!0,items:K.value,label:e.unref(l)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(l)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},loading:e.unref(p),"model-value":a.clientCertificate,placeholder:e.unref(l)("upstreams.form.fields.client_certificate.placeholder"),readonly:a.readonly,width:"100%",onQueryChange:e.unref(C),"onUpdate:modelValue":F[1]||(F[1]=b=>k("update:client-certificate",b))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),e.createVNode(R,{autocomplete:"off","data-testid":"upstreams-form-tags",help:e.unref(l)("upstreams.form.fields.tags.help"),label:e.unref(l)("upstreams.form.fields.tags.label"),"label-attributes":{info:e.unref(l)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},"model-value":a.tags,placeholder:e.unref(l)("upstreams.form.fields.tags.placeholder"),readonly:a.readonly,type:"text","onUpdate:modelValue":F[2]||(F[2]=b=>k("update:tags",b))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),[["__scopeId","data-v-626ed41f"]]),ue={upstreamObject:"https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",loadBalancing:"https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"},ha={class:"fields-group-title"},ca={class:"fields-group-text"},da={class:"fields-group-title"},ua={class:"fields-group-text"},pa=Y(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(a,{emit:E}){const{i18nT:r,i18n:{t:l}}=X.useI18n(),{inRange:i}=ie(),k=a,g=E,q=e.ref([{label:l("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:l("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:l("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:l("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1}]),o=e.ref([{label:l("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:l("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:l("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:l("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:l("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:l("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:l("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:l("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);e.watch(()=>k.hashOn,(C,p)=>{p==="header"&&C!==p&&g("update:hash-on-header",""),p==="cookie"&&C!==p&&(g("update:hash-on-cookie",""),g("update:hash-on-cookie-path","/")),p==="query_arg"&&C!==p&&g("update:hash-on-query-argument",""),p==="uri_capture"&&C!==p&&g("update:hash-on-uri-capture",""),(C==="cookie"||C==="none")&&(g("update:hash-fallback","none"),g("update:hash-fallback-header",""),g("update:hash-fallback-query-argument",""),g("update:hash-fallback-uri-capture",""))}),e.watch(()=>k.hashFallback,(C,p)=>{p==="header"&&C!==p&&g("update:hash-fallback-header",""),p==="cookie"&&C!==p&&(g("update:hash-on-cookie",""),g("update:hash-on-cookie-path","/")),p==="query_arg"&&C!==p&&g("update:hash-fallback-query-argument",""),p==="uri_capture"&&C!==p&&g("update:hash-fallback-uri-capture","")});const u=e.computed(()=>k.hashOn==="cookie"||k.hashOn==="none"),c=e.computed(()=>k.slots?i(k.slots,pe,fe)?"":l("upstreams.form.errors.in_range"):"");return(C,p)=>{const t=e.resolveComponent("KExternalLink"),O=e.resolveComponent("KSelect"),V=e.resolveComponent("KInput"),d=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-load-balancing",title:e.unref(l)("upstreams.form.load_balancing.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(l)("upstreams.form.load_balancing.help"))+" ",1),e.createVNode(t,{"hide-icon":"",href:e.unref(ue).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(O,{class:"algorithm-select",items:q.value,label:e.unref(l)("upstreams.form.fields.algorithm.label"),"model-value":a.algorithm,readonly:a.readonly,width:"100%","onUpdate:modelValue":p[0]||(p[0]=_=>g("update:algorithm",_))},null,8,["items","label","model-value","readonly"]),e.createVNode(V,{autocomplete:"off","data-testid":"upstreams-form-slots",error:!!c.value,"error-message":c.value,help:e.unref(l)("upstreams.form.fields.slots.help"),label:e.unref(l)("upstreams.form.fields.slots.label"),max:e.unref(fe),min:e.unref(pe),"model-value":a.slots,readonly:a.readonly,type:"number","onUpdate:modelValue":p[1]||(p[1]=_=>g("update:slots",_))},null,8,["error","error-message","help","label","max","min","model-value","readonly"]),e.createVNode(d,null,{default:e.withCtx(()=>[e.createElementVNode("h5",ha,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_on.label")),1),e.createElementVNode("p",ca,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_on.help")),1),e.createVNode(O,{class:"hash-on-select",items:o.value,label:e.unref(l)("upstreams.form.fields.hash_on.label"),"model-value":a.hashOn,readonly:a.readonly,width:"100%","onUpdate:modelValue":p[2]||(p[2]=_=>g("update:hash-on",_))},null,8,["items","label","model-value","readonly"]),a.hashOn==="header"?(e.openBlock(),e.createBlock(V,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:e.unref(l)("upstreams.form.fields.header.label"),"model-value":a.hashOnHeader,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":p[3]||(p[3]=_=>g("update:hash-on-header",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashOn==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(l)("upstreams.form.fields.cookie.label"),"model-value":a.hashOnCookie,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":p[4]||(p[4]=_=>g("update:hash-on-cookie",_))},null,8,["label","model-value","readonly"]),e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(l)("upstreams.form.fields.cookie_path.label"),"model-value":a.hashOnCookiePath,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":p[5]||(p[5]=_=>g("update:hash-on-cookie-path",_))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),a.hashOn==="query_arg"?(e.openBlock(),e.createBlock(V,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:e.unref(l)("upstreams.form.fields.query_argument.label"),"model-value":a.hashOnQueryArgument,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":p[6]||(p[6]=_=>g("update:hash-on-query-argument",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashOn==="uri_capture"?(e.openBlock(),e.createBlock(V,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:e.unref(l)("upstreams.form.fields.uri_capture.label"),"model-value":a.hashOnUriCapture,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":p[7]||(p[7]=_=>g("update:hash-on-uri-capture",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createElementVNode("h5",da,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.label")),1),e.createElementVNode("p",ua,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.help")),1),e.createVNode(O,{class:"hash-fallback-select",disabled:u.value,items:o.value,label:e.unref(l)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{"max-width":"400"}},"model-value":a.hashFallback,readonly:a.readonly,width:"100%","onUpdate:modelValue":p[8]||(p[8]=_=>g("update:hash-fallback",_))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(r),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),a.hashFallback==="header"?(e.openBlock(),e.createBlock(V,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:e.unref(l)("upstreams.form.fields.header.label"),"model-value":a.hashFallbackHeader,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":p[9]||(p[9]=_=>g("update:hash-fallback-header",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashFallback==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(l)("upstreams.form.fields.cookie.label"),"model-value":a.hashOnCookie,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":p[10]||(p[10]=_=>g("update:hash-on-cookie",_))},null,8,["label","model-value","readonly"]),e.createVNode(V,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(l)("upstreams.form.fields.cookie_path.label"),"model-value":a.hashOnCookiePath,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":p[11]||(p[11]=_=>g("update:hash-on-cookie-path",_))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),a.hashFallback==="query_arg"?(e.openBlock(),e.createBlock(V,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:e.unref(l)("upstreams.form.fields.query_argument.label"),"model-value":a.hashFallbackQueryArgument,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":p[12]||(p[12]=_=>g("update:hash-fallback-query-argument",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashFallback==="uri_capture"?(e.openBlock(),e.createBlock(V,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:e.unref(l)("upstreams.form.fields.uri_capture.label"),"model-value":a.hashFallbackUriCapture,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":p[13]||(p[13]=_=>g("update:hash-fallback-uri-capture",_))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-d662db8e"]]),fa={class:"fields-group-title"},ma={class:"fields-group-text"},ga={class:"fields-group-title"},ya={class:"fields-group-text"},ka=Y(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(a,{emit:E}){const{i18n:{t:r}}=X.useI18n(),l=E;return(i,k)=>{const g=e.resolveComponent("KExternalLink"),q=e.resolveComponent("KInputSwitch"),o=e.resolveComponent("KCard"),u=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-healthchecks",title:e.unref(r)("upstreams.form.health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(r)("upstreams.form.health_check.help"))+" ",1),e.createVNode(g,{"hide-icon":"",href:e.unref(ue).loadBalancing},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(o,null,{default:e.withCtx(()=>[e.createElementVNode("h5",fa,e.toDisplayString(e.unref(r)("upstreams.form.fields.active_health_checks.label")),1),e.createElementVNode("p",ma,e.toDisplayString(e.unref(r)("upstreams.form.fields.active_health_checks.help")),1),e.createVNode(q,{class:"active-health-switch","data-testid":"active-health-switch",disabled:a.readonly,"model-value":a.activeHealthSwitch,onChange:k[0]||(k[0]=c=>l("update:active-health-switch",c))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(o,null,{default:e.withCtx(()=>[e.createElementVNode("h5",ga,e.toDisplayString(e.unref(r)("upstreams.form.fields.passive_health_checks.label")),1),e.createElementVNode("p",ya,e.toDisplayString(e.unref(r)("upstreams.form.fields.passive_health_checks.help")),1),e.createVNode(q,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:a.readonly,"model-value":a.passiveHealthSwitch,onChange:k[1]||(k[1]=c=>l("update:passive-health-switch",c))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(u,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:e.unref(r)("upstreams.form.fields.healthchecks_threshold.label"),max:e.unref(Qt),min:e.unref(Lt),"model-value":a.healthchecksThreshold,readonly:a.readonly,type:"number","onUpdate:modelValue":k[2]||(k[2]=c=>l("update:healthchecks-threshold",c))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),[["__scopeId","data-v-bfdc5a59"]]),ba="#d60027",Ca={key:2},_a={class:"fields-group-title"},wa={class:"fields-group-text"},Va={class:"fields-group-title"},Ha={class:"fields-group-text"},Na=Y(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(a,{emit:E}){const{i18n:{t:r}}=X.useI18n(),{objectsAreEqual:l}=ie(),i=a,k=E,g=e.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),q=e.computed(()=>i.type==="https"||i.type==="grpcs"),o=e.computed(()=>i.type==="tcp"),{trackNewItems:u}=re({replaceId:!0}),{trackNewItems:c}=re({replaceId:!0});e.watch(()=>i.type,(V,d)=>{d==="tcp"&&V!==d&&k("update:tcp-failures","5"),(d==="https"||d==="grpcs")&&V!==d&&(k("update:https-sni",""),k("update:verify-ssl",!1)),d!=="tcp"&&V==="tcp"&&(k("update:http-path","/"),k("update:http-statuses",me),k("update:unhealthy-http-statuses",ye))});const C=e.ref([{key:"",values:""}]);e.watch(()=>i.headers,V=>{l(C.value,V)||(C.value=[...V])},{immediate:!0,deep:!0});const p=()=>{k("update:headers",C.value)},t=()=>{C.value.push({key:"",values:""}),p()},O=V=>{V===0&&C.value.length===1?C.value[0]={key:"",values:""}:C.value.splice(V,1),p()};return(V,d)=>{const _=e.resolveComponent("KExternalLink"),K=e.resolveComponent("KSelect"),x=e.resolveComponent("KInput"),j=e.resolveComponent("KCheckbox"),W=e.resolveComponent("KLabel"),y=e.resolveComponent("KButton"),w=e.resolveComponent("KMultiselect"),N=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-active-healthcheck",title:e.unref(r)("upstreams.form.active_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(r)("upstreams.form.active_health_check.help"))+" ",1),e.createVNode(_,{"hide-icon":"",href:e.unref(ue).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>{var H;return[e.createVNode(K,{class:"active-healthcheck-type-select",items:g.value,label:e.unref(r)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":a.type,readonly:a.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=f=>k("update:type",f))},null,8,["items","label","model-value","readonly"]),o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(x,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:e.unref(r)("upstreams.form.fields.http_path.label"),"model-value":a.httpPath,readonly:a.readonly,type:"text","onUpdate:modelValue":d[1]||(d[1]=f=>k("update:http-path",f))},null,8,["label","model-value","readonly"])),e.createVNode(x,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:e.unref(r)("upstreams.form.fields.timeout.label"),max:e.unref(Jt),min:e.unref(Wt),"model-value":a.timeout,readonly:a.readonly,type:"number","onUpdate:modelValue":d[2]||(d[2]=f=>k("update:timeout",f))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(x,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:e.unref(r)("upstreams.form.fields.concurrency.label"),max:e.unref(Gt),min:e.unref(zt),"model-value":a.concurrency,readonly:a.readonly,type:"number","onUpdate:modelValue":d[3]||(d[3]=f=>k("update:concurrency",f))},null,8,["label","max","min","model-value","readonly"]),q.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(x,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:e.unref(r)("upstreams.form.fields.https_sni.label"),"model-value":a.httpsSni,readonly:a.readonly,type:"text","onUpdate:modelValue":d[4]||(d[4]=f=>k("update:https-sni",f))},null,8,["label","model-value","readonly"]),e.createVNode(j,{"data-testid":"active-healthcheck-verify-ssl",disabled:a.readonly,label:e.unref(r)("upstreams.form.fields.verify_ssl.label"),"model-value":a.verifySsl,"onUpdate:modelValue":d[5]||(d[5]=f=>k("update:verify-ssl",f))},null,8,["disabled","label","model-value"])],64)):e.createCommentVNode("",!0),((H=a.config)==null?void 0:H.app)==="kongManager"?(e.openBlock(),e.createElementBlock("div",Ca,[e.createVNode(W,{info:e.unref(r)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(f,D)=>(e.openBlock(),e.createElementBlock("div",{key:`${f.header}_${D}`,class:e.normalizeClass(["headers-row",{"margin-top-6":D>0}])},[e.createVNode(x,{modelValue:C.value[D].key,"onUpdate:modelValue":A=>C.value[D].key=A,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${D+1}`,readonly:a.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(x,{modelValue:C.value[D].values,"onUpdate:modelValue":A=>C.value[D].values=A,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${D+1}`,readonly:a.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(y,{appearance:"tertiary",class:"btn-remove","data-testid":"btn-remove-header",disabled:C.value.length===1,icon:"",onClick:A=>O(D)},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.TrashIcon),{class:"delete-item",color:C.value.length>1?e.unref(ba):void 0},null,8,["color"])]),_:2},1032,["disabled","onClick"]),C.value&&D===C.value.length-1?(e.openBlock(),e.createBlock(y,{key:0,appearance:"tertiary",class:"btn-add-header","data-testid":"btn-add-header",icon:"",onClick:t},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.AddIcon))]),_:1})):e.createCommentVNode("",!0)],2))),128))])])):e.createCommentVNode("",!0),e.createVNode(N,null,{default:e.withCtx(()=>[e.createElementVNode("h5",_a,e.toDisplayString(e.unref(r)("upstreams.form.healthy.label")),1),e.createElementVNode("p",wa,e.toDisplayString(e.unref(r)("upstreams.form.healthy.help")),1),e.createVNode(x,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-interval",help:e.unref(r)("upstreams.form.fields.interval.help"),label:e.unref(r)("upstreams.form.fields.interval.label"),max:e.unref(Ne),min:e.unref(He),"model-value":a.interval,readonly:a.readonly,type:"number","onUpdate:modelValue":d[6]||(d[6]=f=>k("update:interval",f))},null,8,["help","label","max","min","model-value","readonly"]),e.createVNode(x,{autocomplete:"off","data-testid":"active-healthcheck-successes",label:e.unref(r)("upstreams.form.fields.successes.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.successes,readonly:a.readonly,type:"number","onUpdate:modelValue":d[7]||(d[7]=f=>k("update:successes",f))},null,8,["label","max","min","model-value","readonly"]),o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-http-statuses","enable-item-creation":"",items:e.unref(ne),label:e.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":a.httpStatuses,readonly:a.readonly,width:"100%",onItemAdded:d[8]||(d[8]=f=>e.unref(u)(f,!0)),onItemRemoved:d[9]||(d[9]=f=>e.unref(u)(f,!1)),"onUpdate:modelValue":d[10]||(d[10]=f=>k("update:http-statuses",f))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(N,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Va,e.toDisplayString(e.unref(r)("upstreams.form.unhealthy.label")),1),e.createElementVNode("p",Ha,e.toDisplayString(e.unref(r)("upstreams.form.unhealthy.help")),1),e.createVNode(x,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:e.unref(r)("upstreams.form.fields.interval.help"),label:e.unref(r)("upstreams.form.fields.interval.label"),max:e.unref(Ne),min:e.unref(He),"model-value":a.unhealthyInterval,readonly:a.readonly,type:"number","onUpdate:modelValue":d[11]||(d[11]=f=>k("update:unhealthy-interval",f))},null,8,["help","label","max","min","model-value","readonly"]),e.createVNode(x,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-tcp-failures",label:e.unref(r)("upstreams.form.fields.tcp_failures.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.tcpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":d[12]||(d[12]=f=>k("update:tcp-failures",f))},null,8,["label","max","min","model-value","readonly"]),o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(x,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-http-failures",label:e.unref(r)("upstreams.form.fields.http_failures.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.httpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":d[13]||(d[13]=f=>k("update:http-failures",f))},null,8,["label","max","min","model-value","readonly"])),o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w,{key:1,autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(ne),label:e.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":a.unhealthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:d[14]||(d[14]=f=>e.unref(c)(f,!0)),onItemRemoved:d[15]||(d[15]=f=>e.unref(c)(f,!1)),"onUpdate:modelValue":d[16]||(d[16]=f=>k("update:unhealthy-http-statuses",f))},null,8,["items","label","model-value","readonly"])),e.createVNode(x,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:e.unref(r)("upstreams.form.fields.timeouts.label"),max:e.unref(Ve),min:e.unref(we),"model-value":a.unhealthyTimeouts,readonly:a.readonly,type:"number","onUpdate:modelValue":d[17]||(d[17]=f=>k("update:unhealthy-timeouts",f))},null,8,["label","max","min","model-value","readonly"])]),_:1})]}),_:1},8,["title"])}}}),[["__scopeId","data-v-efccf560"]]),xa={class:"fields-group-title"},Sa={class:"fields-group-text"},Ta={class:"fields-group-title"},Ua={class:"fields-group-text"},Fa=Y(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(a,{emit:E}){const{i18n:{t:r}}=X.useI18n(),l=a,i=E,k=e.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),g=e.computed(()=>l.type==="tcp"),{trackNewItems:q}=re({replaceId:!0}),{trackNewItems:o}=re({replaceId:!0});return e.watch(()=>l.type,(u,c)=>{c==="tcp"&&u!==c&&i("update:tcp-failures","5"),c!=="tcp"&&u==="tcp"&&(i("update:http-statuses",ge),i("update:unhealthy-http-statuses",ke))}),(u,c)=>{const C=e.resolveComponent("KExternalLink"),p=e.resolveComponent("KSelect"),t=e.resolveComponent("KInput"),O=e.resolveComponent("KMultiselect"),V=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(m.EntityFormSection),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:e.unref(r)("upstreams.form.passive_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(r)("upstreams.form.passive_health_check.help"))+" ",1),e.createVNode(C,{"hide-icon":"",href:e.unref(ue).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(p,{class:"passive-healthcheck-type-select",items:k.value,label:e.unref(r)("upstreams.form.fields.passive_health_check_type.label"),"model-value":a.type,readonly:a.readonly,width:"100%","onUpdate:modelValue":c[0]||(c[0]=d=>i("update:type",d))},null,8,["items","label","model-value","readonly"]),e.createVNode(V,null,{default:e.withCtx(()=>[e.createElementVNode("h5",xa,e.toDisplayString(e.unref(r)("upstreams.form.passive_healthy.label")),1),e.createElementVNode("p",Sa,e.toDisplayString(e.unref(r)("upstreams.form.passive_healthy.help")),1),e.createVNode(t,{autocomplete:"off","data-testid":"passive-healthcheck-successes",label:e.unref(r)("upstreams.form.fields.successes.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.successes,readonly:a.readonly,type:"number","onUpdate:modelValue":c[1]||(c[1]=d=>i("update:successes",d))},null,8,["label","max","min","model-value","readonly"]),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O,{key:0,class:"margin-top-6 passive-healthcheck-http-statuses","enable-item-creation":"",items:e.unref(ne),label:e.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":a.httpStatuses,readonly:a.readonly,width:"100%",onItemAdded:c[2]||(c[2]=d=>e.unref(q)(d,!0)),onItemRemoved:c[3]||(c[3]=d=>e.unref(q)(d,!1)),"onUpdate:modelValue":c[4]||(c[4]=d=>i("update:http-statuses",d))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Ta,e.toDisplayString(e.unref(r)("upstreams.form.passive_unhealthy.label")),1),e.createElementVNode("p",Ua,e.toDisplayString(e.unref(r)("upstreams.form.passive_unhealthy.help")),1),e.createVNode(t,{autocomplete:"off","data-testid":"passive-healthcheck-timeouts",label:e.unref(r)("upstreams.form.fields.timeouts.label"),max:e.unref(Ve),min:e.unref(we),"model-value":a.timeouts,readonly:a.readonly,type:"number","onUpdate:modelValue":c[5]||(c[5]=d=>i("update:timeouts",d))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(t,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-tcp-failures",label:e.unref(r)("upstreams.form.fields.tcp_failures.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.tcpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":c[6]||(c[6]=d=>i("update:tcp-failures",d))},null,8,["label","max","min","model-value","readonly"]),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(t,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-http-failures",label:e.unref(r)("upstreams.form.fields.http_failures.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.httpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":c[7]||(c[7]=d=>i("update:http-failures",d))},null,8,["label","max","min","model-value","readonly"])),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O,{key:1,autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(ne),label:e.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":a.unhealthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:c[8]||(c[8]=d=>e.unref(o)(d,!0)),onItemRemoved:c[9]||(c[9]=d=>e.unref(o)(d,!1)),"onUpdate:modelValue":c[10]||(c[10]=d=>i("update:unhealthy-http-statuses",d))},null,8,["items","label","model-value","readonly"]))]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-5bd9952e"]]),Ia={class:"kong-ui-entities-upstreams-form"},qa=Y(e.defineComponent({__name:"UpstreamsForm",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||(a==null?void 0:a.app)==="konnect"&&!(a!=null&&a.controlPlaneId)||(a==null?void 0:a.app)==="kongManager"&&typeof(a==null?void 0:a.workspace)!="string"||!(a!=null&&a.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(a,{emit:E}){var I;const r=a,l=E,{inRange:i,stringToNumberArray:k,upstreamsResponseToFields:g,getDefaultUpstreamFields:q,objectsAreEqual:o,cloneDeep:u}=ie(),{axiosInstance:c}=m.useAxios((I=r.config)==null?void 0:I.axiosRequestConfig),{getMessageFromError:C}=m.useErrors(),p=Ce.useRouter(),t=e.reactive({fields:q(),readonly:!1,errorMessage:""}),O=e.reactive(q()),V=e.computed(()=>!o(t.fields,O)),d=h=>{t.fields.activeHealthCheck.interval=h?"5":"0",t.fields.activeHealthCheck.successes=h?"5":"0",t.fields.activeHealthCheck.httpFailures=h?"5":"0",t.fields.activeHealthCheck.unhealthyInterval=h?"5":"0",t.fields.activeHealthCheck.tcpFailures=h?"5":"0"},_=h=>{t.fields.passiveHealthCheck.timeouts=h?"5":"0",t.fields.passiveHealthCheck.successes=h?"80":"0",t.fields.passiveHealthCheck.tcpFailures=h?"5":"0",t.fields.passiveHealthCheck.httpFailures=h?"5":"0"},K=e.computed(()=>t.fields.slots?i(t.fields.slots,pe,fe):!0),x=e.computed(()=>t.fields.hashOn==="header"?!!t.fields.hashOnHeader:!0),j=e.computed(()=>t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie"?!!t.fields.hashOnCookie:!0),W=e.computed(()=>t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie"?!!t.fields.hashOnCookiePath:!0),y=e.computed(()=>t.fields.hashOn==="query_arg"?!!t.fields.hashOnQueryArgument:!0),w=e.computed(()=>t.fields.hashOn==="uri_capture"?!!t.fields.hashOnUriCapture:!0),N=e.computed(()=>t.fields.hashFallback==="header"?!!t.fields.hashFallbackHeader:!0),H=e.computed(()=>t.fields.hashFallback==="query_arg"?!!t.fields.hashFallbackQueryArgument:!0),f=e.computed(()=>t.fields.hashFallback==="uri_capture"?!!t.fields.hashFallbackUriCapture:!0),D=e.computed(()=>!!t.fields.name&&K.value&&x.value&&j.value&&W.value&&y.value&&w.value&&N.value&&H.value&&f.value),A=e.computed(()=>r.upstreamId?m.EntityBaseFormType.Edit:m.EntityBaseFormType.Create),G=e.computed(()=>{var h,s;return(s=se.form[(h=r.config)==null?void 0:h.app])==null?void 0:s.edit}),z=h=>{Object.assign(t.fields,g(h)),Object.assign(O,u(t.fields))},T=()=>{var h;p.push(((h=r.config)==null?void 0:h.cancelRoute)||{name:"upstreams-list"})},F=h=>{l("loading",h)},P=h=>{l("error",h)},$=e.computed(()=>{var s,n,U,v,S;const h={name:t.fields.name,slots:Number(t.fields.slots),algorithm:t.fields.algorithm,hash_on:t.fields.hashOn,hash_fallback:t.fields.hashFallback,healthchecks:{}};return t.fields.hostHeader&&(h.host_header=t.fields.hostHeader),t.fields.clientCertificate&&(h.client_certificate={id:t.fields.clientCertificate}),t.fields.healthchecksThreshold&&(h.healthchecks.threshold=Number(t.fields.healthchecksThreshold)),t.fields.tags&&(h.tags=(n=(s=t.fields.tags.split(","))==null?void 0:s.map(B=>String(B||"").trim()))==null?void 0:n.filter(B=>B!=="")),t.fields.hashOn==="header"&&(h.hash_on_header=t.fields.hashOnHeader),(t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie")&&(h.hash_on_cookie=t.fields.hashOnCookie,h.hash_on_cookie_path=t.fields.hashOnCookiePath),t.fields.hashOn==="query_arg"&&(h.hash_on_query_arg=t.fields.hashOnQueryArgument),t.fields.hashOn==="uri_capture"&&(h.hash_on_uri_capture=t.fields.hashOnUriCapture),t.fields.hashFallback==="header"&&(h.hash_fallback_header=t.fields.hashFallbackHeader),t.fields.hashFallback==="query_arg"&&(h.hash_fallback_query_arg=t.fields.hashFallbackQueryArgument),t.fields.hashFallback==="uri_capture"&&(h.hash_fallback_uri_capture=t.fields.hashFallbackUriCapture),t.fields.activeHealthSwitch?(h.healthchecks.active={type:t.fields.activeHealthCheck.type,healthy:{},unhealthy:{}},t.fields.activeHealthCheck.timeout&&(h.healthchecks.active.timeout=Number(t.fields.activeHealthCheck.timeout)),t.fields.activeHealthCheck.concurrency&&(h.healthchecks.active.concurrency=Number(t.fields.activeHealthCheck.concurrency)),t.fields.activeHealthCheck.type!=="tcp"&&t.fields.activeHealthCheck.httpPath&&(h.healthchecks.active.http_path=t.fields.activeHealthCheck.httpPath),((U=r.config)==null?void 0:U.app)==="kongManager"&&(t.fields.activeHealthCheck.headers.length===0?h.healthchecks.active.headers=[]:h.healthchecks.active.headers=t.fields.activeHealthCheck.headers.reduce((B,J)=>{var M,L;return J.key?{...B,[J.key]:(L=(M=J.values.split(","))==null?void 0:M.map(Z=>String(Z||"").trim()))==null?void 0:L.filter(Z=>Z!=="")}:{...B}},{})),(t.fields.activeHealthCheck.type==="https"||t.fields.activeHealthCheck.type==="grpcs")&&t.fields.activeHealthCheck.httpsSni&&(h.healthchecks.active.https_sni=t.fields.activeHealthCheck.httpsSni),(t.fields.activeHealthCheck.type==="https"||t.fields.activeHealthCheck.type==="grpcs")&&(h.healthchecks.active.https_verify_certificate=t.fields.activeHealthCheck.verifySsl),t.fields.activeHealthCheck.interval&&(h.healthchecks.active.healthy.interval=Number(t.fields.activeHealthCheck.interval)),t.fields.activeHealthCheck.successes&&(h.healthchecks.active.healthy.successes=Number(t.fields.activeHealthCheck.successes)),t.fields.activeHealthCheck.type!=="tcp"&&t.fields.activeHealthCheck.httpStatuses&&(h.healthchecks.active.healthy.http_statuses=k(t.fields.activeHealthCheck.httpStatuses)),t.fields.activeHealthCheck.unhealthyInterval&&(h.healthchecks.active.unhealthy.interval=Number(t.fields.activeHealthCheck.unhealthyInterval)),t.fields.activeHealthCheck.unhealthyTimeouts&&(h.healthchecks.active.unhealthy.timeouts=Number(t.fields.activeHealthCheck.unhealthyTimeouts)),t.fields.activeHealthCheck.type!=="tcp"&&t.fields.activeHealthCheck.unhealthyHttpStatuses&&(h.healthchecks.active.unhealthy.http_statuses=k(t.fields.activeHealthCheck.unhealthyHttpStatuses)),t.fields.activeHealthCheck.type!=="tcp"&&t.fields.activeHealthCheck.httpFailures&&(h.healthchecks.active.unhealthy.http_failures=Number(t.fields.activeHealthCheck.httpFailures)),t.fields.activeHealthCheck.tcpFailures&&(h.healthchecks.active.unhealthy.tcp_failures=Number(t.fields.activeHealthCheck.tcpFailures))):((v=r.config)==null?void 0:v.app)==="kongManager"&&A.value===m.EntityBaseFormType.Edit&&(h.healthchecks.active={type:t.fields.activeHealthCheck.type,headers:{},healthy:{interval:0,successes:0},unhealthy:{interval:0,http_failures:0,tcp_failures:0}}),t.fields.passiveHealthSwitch?(h.healthchecks.passive={type:t.fields.passiveHealthCheck.type,healthy:{},unhealthy:{}},t.fields.passiveHealthCheck.successes&&(h.healthchecks.passive.healthy.successes=Number(t.fields.passiveHealthCheck.successes)),t.fields.passiveHealthCheck.type!=="tcp"&&t.fields.passiveHealthCheck.httpStatuses&&(h.healthchecks.passive.healthy.http_statuses=k(t.fields.passiveHealthCheck.httpStatuses)),t.fields.passiveHealthCheck.timeouts&&(h.healthchecks.passive.unhealthy.timeouts=Number(t.fields.passiveHealthCheck.timeouts)),t.fields.passiveHealthCheck.type!=="tcp"&&t.fields.passiveHealthCheck.unhealthyHttpStatuses&&(h.healthchecks.passive.unhealthy.http_statuses=k(t.fields.passiveHealthCheck.unhealthyHttpStatuses)),t.fields.passiveHealthCheck.type!=="tcp"&&t.fields.passiveHealthCheck.httpFailures&&(h.healthchecks.passive.unhealthy.http_failures=Number(t.fields.passiveHealthCheck.httpFailures)),t.fields.passiveHealthCheck.tcpFailures&&(h.healthchecks.passive.unhealthy.tcp_failures=Number(t.fields.passiveHealthCheck.tcpFailures))):((S=r.config)==null?void 0:S.app)==="kongManager"&&A.value===m.EntityBaseFormType.Edit&&(h.healthchecks.passive={type:t.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}),h}),R=h=>{var n,U,v,S,B,J;let s=`${(n=r.config)==null?void 0:n.apiBaseUrl}${se.form[(U=r.config)==null?void 0:U.app][h]}`;return((v=r.config)==null?void 0:v.app)==="konnect"?s=s.replace(/{controlPlaneId}/gi,((S=r.config)==null?void 0:S.controlPlaneId)||""):((B=r.config)==null?void 0:B.app)==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(J=r.config)!=null&&J.workspace?`/${r.config.workspace}`:"")),s=s.replace(/{id}/gi,r.upstreamId),s},b=async()=>{var h;try{t.readonly=!0,await c.post(R("validate"),$.value);let s;A.value===m.EntityBaseFormType.Create?s=await c.post(R("create"),$.value):A.value===m.EntityBaseFormType.Edit&&(s=((h=r.config)==null?void 0:h.app)==="konnect"?await c.put(R("edit"),$.value):await c.patch(R("edit"),$.value)),l("update",s==null?void 0:s.data)}catch(s){t.errorMessage=C(s),l("error",s)}finally{t.readonly=!1}};return(h,s)=>(e.openBlock(),e.createElementBlock("div",Ia,[e.createVNode(e.unref(m.EntityBaseForm),{"can-submit":D.value&&V.value,config:a.config,"edit-id":a.upstreamId,"entity-type":e.unref(m.SupportedEntityType).Upstream,"error-message":t.errorMessage,"fetch-url":G.value,"form-fields":$.value,"is-readonly":t.readonly,onCancel:T,"onFetch:error":P,"onFetch:success":z,onLoading:F,onSubmit:b},{default:e.withCtx(()=>[e.createVNode(ia,{"client-certificate":t.fields.clientCertificate,"onUpdate:clientCertificate":s[0]||(s[0]=n=>t.fields.clientCertificate=n),"host-header":t.fields.hostHeader,"onUpdate:hostHeader":s[1]||(s[1]=n=>t.fields.hostHeader=n),name:t.fields.name,"onUpdate:name":s[2]||(s[2]=n=>t.fields.name=n),tags:t.fields.tags,"onUpdate:tags":s[3]||(s[3]=n=>t.fields.tags=n),config:a.config,readonly:t.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),e.createVNode(pa,{algorithm:t.fields.algorithm,"onUpdate:algorithm":s[4]||(s[4]=n=>t.fields.algorithm=n),"hash-fallback":t.fields.hashFallback,"onUpdate:hashFallback":s[5]||(s[5]=n=>t.fields.hashFallback=n),"hash-fallback-header":t.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":s[6]||(s[6]=n=>t.fields.hashFallbackHeader=n),"hash-fallback-query-argument":t.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":s[7]||(s[7]=n=>t.fields.hashFallbackQueryArgument=n),"hash-fallback-uri-capture":t.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":s[8]||(s[8]=n=>t.fields.hashFallbackUriCapture=n),"hash-on":t.fields.hashOn,"onUpdate:hashOn":s[9]||(s[9]=n=>t.fields.hashOn=n),"hash-on-cookie":t.fields.hashOnCookie,"onUpdate:hashOnCookie":s[10]||(s[10]=n=>t.fields.hashOnCookie=n),"hash-on-cookie-path":t.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":s[11]||(s[11]=n=>t.fields.hashOnCookiePath=n),"hash-on-header":t.fields.hashOnHeader,"onUpdate:hashOnHeader":s[12]||(s[12]=n=>t.fields.hashOnHeader=n),"hash-on-query-argument":t.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":s[13]||(s[13]=n=>t.fields.hashOnQueryArgument=n),"hash-on-uri-capture":t.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":s[14]||(s[14]=n=>t.fields.hashOnUriCapture=n),slots:t.fields.slots,"onUpdate:slots":s[15]||(s[15]=n=>t.fields.slots=n),readonly:t.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(ka,{"active-health-switch":t.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[s[16]||(s[16]=n=>t.fields.activeHealthSwitch=n),d],"healthchecks-threshold":t.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":s[17]||(s[17]=n=>t.fields.healthchecksThreshold=n),"passive-health-switch":t.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[s[18]||(s[18]=n=>t.fields.passiveHealthSwitch=n),_],readonly:t.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),t.fields.activeHealthSwitch?(e.openBlock(),e.createBlock(Na,{key:0,concurrency:t.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":s[19]||(s[19]=n=>t.fields.activeHealthCheck.concurrency=n),headers:t.fields.activeHealthCheck.headers,"onUpdate:headers":s[20]||(s[20]=n=>t.fields.activeHealthCheck.headers=n),"http-failures":t.fields.activeHealthCheck.httpFailures,"onUpdate:httpFailures":s[21]||(s[21]=n=>t.fields.activeHealthCheck.httpFailures=n),"http-path":t.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":s[22]||(s[22]=n=>t.fields.activeHealthCheck.httpPath=n),"http-statuses":t.fields.activeHealthCheck.httpStatuses,"onUpdate:httpStatuses":s[23]||(s[23]=n=>t.fields.activeHealthCheck.httpStatuses=n),"https-sni":t.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":s[24]||(s[24]=n=>t.fields.activeHealthCheck.httpsSni=n),interval:t.fields.activeHealthCheck.interval,"onUpdate:interval":s[25]||(s[25]=n=>t.fields.activeHealthCheck.interval=n),successes:t.fields.activeHealthCheck.successes,"onUpdate:successes":s[26]||(s[26]=n=>t.fields.activeHealthCheck.successes=n),"tcp-failures":t.fields.activeHealthCheck.tcpFailures,"onUpdate:tcpFailures":s[27]||(s[27]=n=>t.fields.activeHealthCheck.tcpFailures=n),timeout:t.fields.activeHealthCheck.timeout,"onUpdate:timeout":s[28]||(s[28]=n=>t.fields.activeHealthCheck.timeout=n),type:t.fields.activeHealthCheck.type,"onUpdate:type":s[29]||(s[29]=n=>t.fields.activeHealthCheck.type=n),"unhealthy-http-statuses":t.fields.activeHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":s[30]||(s[30]=n=>t.fields.activeHealthCheck.unhealthyHttpStatuses=n),"unhealthy-interval":t.fields.activeHealthCheck.unhealthyInterval,"onUpdate:unhealthyInterval":s[31]||(s[31]=n=>t.fields.activeHealthCheck.unhealthyInterval=n),"unhealthy-timeouts":t.fields.activeHealthCheck.unhealthyTimeouts,"onUpdate:unhealthyTimeouts":s[32]||(s[32]=n=>t.fields.activeHealthCheck.unhealthyTimeouts=n),"verify-ssl":t.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":s[33]||(s[33]=n=>t.fields.activeHealthCheck.verifySsl=n),config:a.config,readonly:t.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),t.fields.passiveHealthSwitch?(e.openBlock(),e.createBlock(Fa,{key:1,"http-failures":t.fields.passiveHealthCheck.httpFailures,"onUpdate:httpFailures":s[34]||(s[34]=n=>t.fields.passiveHealthCheck.httpFailures=n),"http-statuses":t.fields.passiveHealthCheck.httpStatuses,"onUpdate:httpStatuses":s[35]||(s[35]=n=>t.fields.passiveHealthCheck.httpStatuses=n),successes:t.fields.passiveHealthCheck.successes,"onUpdate:successes":s[36]||(s[36]=n=>t.fields.passiveHealthCheck.successes=n),"tcp-failures":t.fields.passiveHealthCheck.tcpFailures,"onUpdate:tcpFailures":s[37]||(s[37]=n=>t.fields.passiveHealthCheck.tcpFailures=n),timeouts:t.fields.passiveHealthCheck.timeouts,"onUpdate:timeouts":s[38]||(s[38]=n=>t.fields.passiveHealthCheck.timeouts=n),type:t.fields.passiveHealthCheck.type,"onUpdate:type":s[39]||(s[39]=n=>t.fields.passiveHealthCheck.type=n),"unhealthy-http-statuses":t.fields.passiveHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":s[40]||(s[40]=n=>t.fields.passiveHealthCheck.unhealthyHttpStatuses=n),readonly:t.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","entity-type","error-message","fetch-url","form-fields","is-readonly"])]))}}),[["__scopeId","data-v-0669debc"]]),Ba={"data-testid":"client_certificate-plain-text"},Ea=e.defineComponent({__name:"UpstreamsConfigCard",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||a.app==="konnect"&&!a.controlPlaneId||a.app==="kongManager"&&typeof a.workspace!="string"||!a.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(a){const E=a,{i18n:{t:r},i18nT:l}=X.useI18n(),{getPropValue:i}=m.useHelpers(),k=e.computed(()=>se.form[E.config.app].edit),g=e.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:m.ConfigurationSchemaSection.Basic,tooltip:r("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:m.ConfigurationSchemaSection.Basic},hash_on:{order:7,section:m.ConfigurationSchemaSection.Basic},hash_on_header:{order:8,section:m.ConfigurationSchemaSection.Basic},hash_on_uri_capture:{order:9,section:m.ConfigurationSchemaSection.Basic},hash_on_query_arg:{order:10,section:m.ConfigurationSchemaSection.Basic,label:`${r("upstreams.form.fields.hash_on.label")} ${r("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:m.ConfigurationSchemaSection.Basic},hash_on_cookie_path:{order:12,section:m.ConfigurationSchemaSection.Basic},healthchecks:{order:13,section:m.ConfigurationSchemaSection.Basic,type:m.ConfigurationSchemaType.Json},tags:{order:14,tooltip:r("upstreams.form.hash_tooltips.tags")},hash_fallback:{order:1},hash_fallback_header:{order:2},hash_fallback_query_arg:{order:3,label:`${r("upstreams.form.fields.hash_fallback.label")} ${r("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:r("upstreams.form.hash_tooltips.client_certificate")}});return(q,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(m.EntityBaseConfigCard),{config:a.config,"config-card-doc":a.configCardDoc,"config-schema":g.value,"entity-type":e.unref(m.SupportedEntityType).Upstream,"fetch-url":k.value,"hide-title":a.hideTitle,"onFetch:error":o[0]||(o[0]=u=>q.$emit("fetch:error",u)),"onFetch:success":o[1]||(o[1]=u=>q.$emit("fetch:success",u)),onLoading:o[2]||(o[2]=u=>q.$emit("loading",u))},{"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(r)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":e.withCtx(({row:u})=>[e.createVNode(e.unref(l),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(u.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(r)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("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(r)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("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(r)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("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(r)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("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(r)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("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(r)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:e.withCtx(()=>o[3]||(o[3]=[e.createElementVNode("code",null,"10",-1)])),max:e.withCtx(()=>o[4]||(o[4]=[e.createElementVNode("code",null,"65536",-1)])),_: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(r)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("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(r)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("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(r)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("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(r)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(r)("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(r)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:e.withCtx(u=>{var c;return[e.createElementVNode("div",null,[e.createElementVNode("div",Ba,[e.createElementVNode("span",null,e.toDisplayString((c=e.unref(i)("rowValue",u))==null?void 0:c.id),1)])])]}),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});Q.TargetForm=xe,Q.TargetsList=oa,Q.UpstreamsConfigCard=Ea,Q.UpstreamsForm=qa,Q.UpstreamsList=ea,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(Q,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared","vue-router","@kong/icons","@kong-ui-public/i18n"],e):(Q=typeof globalThis<"u"?globalThis:Q||self,e(Q["kong-ui-entities-upstreams-targets"]={},Q.Vue,Q["kong-ui-public-entities-shared"],Q.VueRouter,Q.KongIcons,Q["kong-ui-public-i18n"]))})(this,function(Q,e,p,ye,oe,ge){"use strict";const Ze={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 et(){const a=ge.createI18n("en-us",Ze);return{i18n:a,i18nT:ge.i18nTComponent(a)}}function re(a){const{replaceId:E=!1}=a,o=e.ref([]);return{addedItems:o,trackNewItems:(n,g)=>{if(g){const m={...n};E&&(m.value=n.label),o.value.push(m)}else o.value=o.value.filter(m=>m.value!==n.value)}}}const ie=[{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"}],fe=10,pe=65536,tt=0,at=65535,ee=0,te=255,be=0,ke=255,lt=0,st=65535,Ce=0,_e=65535,rt=0,ot=2**31,we=["200","302"],Ve=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],Ne=["429","404","500","501","502","503","504","505"],xe=["429","500","503"];function ne(){const a=l=>/^\d+$/.test(l),E=(l,h,k)=>{if(a(l)){const u=Number(l);return u>=h&&u<=k}else return!1},o=l=>l.map(h=>Number(h)),s=l=>l.map(h=>h.toString()),n=l=>{var k,u,t,O,w,d,C,R,S,j,W,y,_,x,V,f,D,M,G,z,T,I,A,$,v,b,F,c,r,i,U,P,H,B,J,K,L,Z,He,Te,Ue,Ie,Fe,qe,Be,Ee,Oe,De,$e,Pe,Ae,Me,Ke,Re,ve,je,Le,Qe,We,Je,ze,Ge,Xe,Ye;return{name:(l==null?void 0:l.name)||"",hostHeader:(l==null?void 0:l.host_header)||"",clientCertificate:((k=l==null?void 0:l.client_certificate)==null?void 0:k.id)||"",tags:((u=l==null?void 0:l.tags)==null?void 0:u.join(", "))||"",algorithm:(l==null?void 0:l.algorithm)||"round-robin",slots:((t=l==null?void 0:l.slots)==null?void 0:t.toString())||"10000",hashOn:(l==null?void 0:l.hash_on)||"none",hashFallback:(l==null?void 0:l.hash_fallback)||"none",hashOnHeader:(l==null?void 0:l.hash_on_header)||"",hashOnCookie:(l==null?void 0:l.hash_on_cookie)||"",hashOnCookiePath:(l==null?void 0:l.hash_on_cookie_path)||"/",hashOnQueryArgument:(l==null?void 0:l.hash_on_query_arg)||"",hashOnUriCapture:(l==null?void 0:l.hash_on_uri_capture)||"",hashFallbackHeader:(l==null?void 0:l.hash_fallback_header)||"",hashFallbackQueryArgument:(l==null?void 0:l.hash_fallback_query_arg)||"",hashFallbackUriCapture:(l==null?void 0:l.hash_fallback_uri_capture)||"",activeHealthSwitch:l?((w=(O=l.healthchecks.active)==null?void 0:O.healthy)==null?void 0:w.interval)!==0||((C=(d=l.healthchecks.active)==null?void 0:d.unhealthy)==null?void 0:C.interval)!==0:!1,passiveHealthSwitch:l?((S=(R=l.healthchecks.passive)==null?void 0:R.healthy)==null?void 0:S.successes)!==0||((W=(j=l.healthchecks.passive)==null?void 0:j.unhealthy)==null?void 0:W.timeouts)!==0||((_=(y=l.healthchecks.passive)==null?void 0:y.unhealthy)==null?void 0:_.tcp_failures)!==0||((V=(x=l.healthchecks.passive)==null?void 0:x.unhealthy)==null?void 0:V.http_failures)!==0:!1,healthchecksThreshold:((f=l==null?void 0:l.healthchecks.threshold)==null?void 0:f.toString())||"0",activeHealthCheck:{type:((D=l==null?void 0:l.healthchecks.active)==null?void 0:D.type)||"http",httpPath:((M=l==null?void 0:l.healthchecks.active)==null?void 0:M.http_path)||"/",timeout:((z=(G=l==null?void 0:l.healthchecks.active)==null?void 0:G.timeout)==null?void 0:z.toString())||"1",concurrency:((I=(T=l==null?void 0:l.healthchecks.active)==null?void 0:T.concurrency)==null?void 0:I.toString())||"10",httpsSni:((A=l==null?void 0:l.healthchecks.active)==null?void 0:A.https_sni)||"",verifySsl:(($=l==null?void 0:l.healthchecks.active)==null?void 0:$.https_verify_certificate)||!1,headers:(v=l==null?void 0:l.healthchecks.active)!=null&&v.headers&&Object.entries(l.healthchecks.active.headers).length>0?Object.entries(l.healthchecks.active.headers).map(([Lt,me])=>({key:Lt,values:me==null?void 0:me.join(", ")})):[{key:"",values:""}],interval:((c=(F=(b=l==null?void 0:l.healthchecks.active)==null?void 0:b.healthy)==null?void 0:F.interval)==null?void 0:c.toString())||"0",successes:((U=(i=(r=l==null?void 0:l.healthchecks.active)==null?void 0:r.healthy)==null?void 0:i.successes)==null?void 0:U.toString())||"5",httpStatuses:(H=(P=l==null?void 0:l.healthchecks.active)==null?void 0:P.healthy)!=null&&H.http_statuses?s(l.healthchecks.active.healthy.http_statuses):we,unhealthyInterval:((K=(J=(B=l==null?void 0:l.healthchecks.active)==null?void 0:B.unhealthy)==null?void 0:J.interval)==null?void 0:K.toString())||"0",httpFailures:((He=(Z=(L=l==null?void 0:l.healthchecks.active)==null?void 0:L.unhealthy)==null?void 0:Z.http_failures)==null?void 0:He.toString())||"5",tcpFailures:((Ie=(Ue=(Te=l==null?void 0:l.healthchecks.active)==null?void 0:Te.unhealthy)==null?void 0:Ue.tcp_failures)==null?void 0:Ie.toString())||"5",unhealthyHttpStatuses:(qe=(Fe=l==null?void 0:l.healthchecks.active)==null?void 0:Fe.unhealthy)!=null&&qe.http_statuses?s(l.healthchecks.active.unhealthy.http_statuses):Ne,unhealthyTimeouts:((Oe=(Ee=(Be=l==null?void 0:l.healthchecks.active)==null?void 0:Be.unhealthy)==null?void 0:Ee.timeouts)==null?void 0:Oe.toString())||"0"},passiveHealthCheck:{type:((De=l==null?void 0:l.healthchecks.passive)==null?void 0:De.type)||"http",successes:((Ae=(Pe=($e=l==null?void 0:l.healthchecks.passive)==null?void 0:$e.healthy)==null?void 0:Pe.successes)==null?void 0:Ae.toString())||"0",httpStatuses:(Ke=(Me=l==null?void 0:l.healthchecks.passive)==null?void 0:Me.healthy)!=null&&Ke.http_statuses?s(l.healthchecks.passive.healthy.http_statuses):Ve,timeouts:((je=(ve=(Re=l==null?void 0:l.healthchecks.passive)==null?void 0:Re.unhealthy)==null?void 0:ve.timeouts)==null?void 0:je.toString())||"0",httpFailures:((We=(Qe=(Le=l==null?void 0:l.healthchecks.passive)==null?void 0:Le.unhealthy)==null?void 0:Qe.http_failures)==null?void 0:We.toString())||"5",tcpFailures:((Ge=(ze=(Je=l==null?void 0:l.healthchecks.passive)==null?void 0:Je.unhealthy)==null?void 0:ze.tcp_failures)==null?void 0:Ge.toString())||"5",unhealthyHttpStatuses:(Ye=(Xe=l==null?void 0:l.healthchecks.passive)==null?void 0:Xe.unhealthy)!=null&&Ye.http_statuses?s(l.healthchecks.passive.unhealthy.http_statuses):xe}}};return{isInteger:a,inRange:E,stringToNumberArray:o,numberToStringArray:s,upstreamsResponseToFields:l=>n(l),getDefaultUpstreamFields:()=>n(),objectsAreEqual:(l,h)=>{try{return JSON.stringify(l)===JSON.stringify(h)}catch{return!1}},cloneDeep:l=>JSON.parse(JSON.stringify(l))}}const X={useI18n:et,useMultiselectCreation:re,useHelpers:ne},ae="/v2/control-planes/{controlPlaneId}/core-entities",le="/{workspace}",se={list:{konnect:`${ae}/upstreams`,kongManager:`${le}/upstreams`},form:{konnect:{getServices:`${ae}/services`,getCertificates:`${ae}/certificates`,validate:`${ae}/v1/schemas/json/upstream/validate`,create:`${ae}/upstreams`,edit:`${ae}/upstreams/{id}`},kongManager:{getServices:`${le}/services`,getCertificates:`${le}/certificates`,validate:`${le}/schemas/upstreams/validate`,create:`${le}/upstreams`,edit:`${le}/upstreams/{id}`}}},it={class:"kong-ui-entities-upstreams-list"},nt={class:"upstream-name"},ht=e.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||!a.createRoute||!a.getViewRoute||!a.getEditRoute||a.app==="kongManager"&&!a.isExactMatch&&!a.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},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(a,{emit:E}){var v;const o=E,s=a,{i18n:{t:n}}=X.useI18n(),g=ye.useRouter(),{axiosInstance:m}=p.useAxios((v=s.config)==null?void 0:v.axiosRequestConfig),q=e.ref(1),N=e.computed(()=>s.config.app!=="kongManager"||!!s.config.disableSorting),l={name:{label:n("upstreams.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},slots:{label:n("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:n("upstreams.list.table_headers.tags"),sortable:!1}},h=l,k=e.computed(()=>{var F,c;let b=`${s.config.apiBaseUrl}${se.list[s.config.app]}`;return s.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((F=s.config)==null?void 0:F.controlPlaneId)||""):s.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(c=s.config)!=null&&c.workspace?`/${s.config.workspace}`:"")),b}),u=e.ref(""),t=e.computed(()=>{const b=s.config.app==="konnect"||s.config.isExactMatch;if(b)return{isExactMatch:b,placeholder:n("upstreams.search.placeholder")};const{name:F,slots:c}=l;return{isExactMatch:b,fields:{name:F,slots:c},schema:s.config.filterSchema}}),{fetcher:O,fetcherState:w}=p.useFetcher(s.config,k.value),d=()=>{u.value=""},C=()=>{q.value++},R=e.ref(null),S=e.ref(!1),j=(b,F)=>{const c=b.id;if(!F(c)){o("copy:error",{entity:b,field:"id",message:n("upstreams.errors.copy")});return}o("copy:success",{entity:b,field:"id",message:n("upstreams.copy.success",{val:c})})},W=(b,F)=>{const c=JSON.stringify(b);if(!F(c)){o("copy:error",{entity:b,message:n("upstreams.errors.copy")});return}o("copy:success",{entity:b,message:n("upstreams.copy.success_brief")})},y=async b=>{var c;await((c=s.canRetrieve)==null?void 0:c.call(s,b))&&g.push(s.config.getViewRoute(b.id))},_=b=>({label:n("upstreams.actions.view"),to:s.config.getViewRoute(b)}),x=b=>({label:n("upstreams.actions.edit"),to:s.config.getEditRoute(b)}),V=e.ref(void 0),f=e.ref(!1),D=e.ref(!1),M=e.ref(""),G=p.useDeleteUrlBuilder(s.config,k.value),z=b=>{V.value=b,f.value=!0},T=()=>{f.value=!1},I=async()=>{var b,F,c;if((b=V.value)!=null&&b.id){D.value=!0;try{await m.delete(G(V.value.id)),D.value=!1,f.value=!1,q.value++,o("delete:success",V.value)}catch(r){M.value=((c=(F=r.response)==null?void 0:F.data)==null?void 0:c.message)||r.message||n("upstreams.errors.delete"),o("error",r)}finally{D.value=!1}}},A=e.ref(!1);e.watch(w,b=>{var F,c,r,i;if(Array.isArray((F=b==null?void 0:b.response)==null?void 0:F.data)&&(A.value=b.response.data.length>0),b.status===p.FetcherStatus.NoRecords?S.value=!0:S.value=!1,b.status===p.FetcherStatus.Error){R.value={title:n("upstreams.errors.general")},(i=(r=(c=b.error)==null?void 0:c.response)==null?void 0:r.data)!=null&&i.message&&(R.value.message=b.error.response.data.message),o("error",b.error);return}R.value=null});const $=e.ref({ctaPath:s.config.createRoute,ctaText:void 0,message:`${n("upstreams.list.empty_state.description")}${s.config.additionMessageForEmptyState?` ${s.config.additionMessageForEmptyState}`:""}`,title:n("upstreams.title")});return e.onBeforeMount(async()=>{await s.canCreate()&&($.value.title=n("upstreams.list.empty_state.title"),$.value.ctaText=n("upstreams.actions.create"))}),(b,F)=>{const c=e.resolveComponent("KButton"),r=e.resolveComponent("KBadge"),i=e.resolveComponent("KTruncate"),U=e.resolveComponent("KDropdownItem"),P=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",it,[e.createVNode(e.unref(p.EntityBaseTable),{"cache-identifier":a.cacheIdentifier,"disable-sorting":N.value,"empty-state-options":$.value,"enable-entity-actions":"","error-message":R.value,fetcher:e.unref(O),"fetcher-cache-key":q.value,"hide-toolbar":S.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:u.value,"table-headers":e.unref(h),onClearSearchInput:d,"onClick:row":F[1]||(F[1]=H=>y(H)),onSort:C},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(p.EntityFilter),{modelValue:u.value,"onUpdate:modelValue":F[0]||(F[0]=H=>u.value=H),config:t.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!a.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>a.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(c,{appearance:"primary","data-testid":"toolbar-add-upstream",size:a.useActionOutside?"medium":"large",to:a.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(n)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["size","to"]),[[e.vShow,A.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:H})=>[e.createElementVNode("span",nt,e.toDisplayString(H),1)]),tags:e.withCtx(({rowValue:H})=>[e.createVNode(i,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H,B=>(e.openBlock(),e.createBlock(r,{key:B,"max-width":"auto"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B),1)]),_:2},1024))),128))]),_:2},1024)]),actions:e.withCtx(({row:H})=>[e.createVNode(P,null,{default:e.withCtx(({copyToClipboard:B})=>[e.createVNode(U,{"data-testid":"action-entity-copy-id",onClick:J=>j(H,B)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(P,null,{default:e.withCtx(({copyToClipboard:B})=>[e.createVNode(U,{"data-testid":"action-entity-copy-json",onClick:J=>W(H,B)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>a.canRetrieve(H)},{default:e.withCtx(()=>[e.createVNode(U,{"data-testid":"action-entity-view","has-divider":"",item:_(H.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>a.canEdit(H)},{default:e.withCtx(()=>[e.createVNode(U,{"data-testid":"action-entity-edit",item:x(H.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>a.canDelete(H)},{default:e.withCtx(()=>[e.createVNode(U,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:B=>z(H)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("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","hide-toolbar","query","table-headers"]),e.createVNode(e.unref(p.EntityDeleteModal),{"action-pending":D.value,description:e.unref(n)("upstreams.delete.description"),"entity-name":V.value&&(V.value.name||V.value.id),"entity-type":e.unref(p.EntityTypes).Upstream,error:M.value,title:e.unref(n)("upstreams.delete.title"),visible:f.value,onCancel:T,onProceed:I},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Y=(a,E)=>{const o=a.__vccOpts||a;for(const[s,n]of E)o[s]=n;return o},ct=Y(ht,[["__scopeId","data-v-f95599ac"]]),he="/v2/control-planes/{controlPlaneId}/core-entities",ce="/{workspace}",de={list:{konnect:`${he}/upstreams/{upstreamId}/targets`,kongManager:`${ce}/upstreams/{upstreamId}/targets`},form:{konnect:{create:`${he}/upstreams/{upstreamId}/targets`,edit:`${he}/upstreams/{upstreamId}/targets/{id}`,validate:`${he}/v1/schemas/json/target/validate`},kongManager:{create:`${ce}/upstreams/{upstreamId}/targets`,edit:`${ce}/upstreams/{upstreamId}/targets/{id}`,validate:`${ce}/schemas/targets/validate`}}},dt={class:"kong-ui-entities-target-form"},ut={class:"target-form-container"},ft={key:0,class:"target-form-info"},Se=Y(e.defineComponent({__name:"TargetForm",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||a.app==="konnect"&&!a.controlPlaneId||a.app==="kongManager"&&typeof a.workspace!="string"||!a.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(a,{emit:E}){var W;const o=E,s=a,{i18n:{t:n}}=X.useI18n(),{getMessageFromError:g}=p.useErrors(),{axiosInstance:m}=p.useAxios((W=s.config)==null?void 0:W.axiosRequestConfig),q=e.computed(()=>{var y;return de.form[s.config.app].edit.replace(/{upstreamId}/gi,((y=s.config)==null?void 0:y.upstreamId)||"")}),N=e.computed(()=>s.targetId?p.EntityBaseFormType.Edit:p.EntityBaseFormType.Create),l=e.computed(()=>N.value===p.EntityBaseFormType.Edit?n("targets.form.edit.title"):n("targets.form.create.title")),h=e.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),k=e.reactive({target:"",weight:100,tags:""}),u={target:"",weight:100,tags:""},t=e.computed(()=>{const y=parseInt(h.fields.weight.toString(),10);return y<0||y>65535}),O=e.computed(()=>JSON.stringify(h.fields)!==JSON.stringify(k)&&!!h.fields.target&&!!h.fields.weight&&!t.value),w=y=>{var _;h.fields.target=(y==null?void 0:y.target)||"",h.fields.weight=(y==null?void 0:y.weight)??"",h.fields.tags=((_=y==null?void 0:y.tags)==null?void 0:_.join(", "))||"",Object.assign(k,h.fields)},d=()=>{h.errorMessage="",o("cancel")},C=e.computed(()=>{var _,x;let y=`${s.config.apiBaseUrl}${de.form[s.config.app].validate}`;return s.config.app==="konnect"?y=y.replace(/{controlPlaneId}/gi,((_=s.config)==null?void 0:_.controlPlaneId)||""):s.config.app==="kongManager"&&(y=y.replace(/\/{workspace}/gi,(x=s.config)!=null&&x.workspace?`/${s.config.workspace}`:"")),y=y.replace(/{id}/gi,s.targetId),y}),R=e.computed(()=>{var _,x,V,f;let y=`${s.config.apiBaseUrl}${de.form[s.config.app][N.value]}`;return s.config.app==="konnect"?y=y.replace(/{controlPlaneId}/gi,((_=s.config)==null?void 0:_.controlPlaneId)||"").replace(/{upstreamId}/gi,((x=s.config)==null?void 0:x.upstreamId)||""):s.config.app==="kongManager"&&(y=y.replace(/\/{workspace}/gi,(V=s.config)!=null&&V.workspace?`/${s.config.workspace}`:"").replace(/{upstreamId}/gi,((f=s.config)==null?void 0:f.upstreamId)||"")),y=y.replace(/{id}/gi,s.targetId),y}),S=e.computed(()=>{var y,_,x;return{target:h.fields.target,weight:parseInt(h.fields.weight),tags:(x=(_=(y=h.fields.tags)==null?void 0:y.split(","))==null?void 0:_.map(V=>String(V||"").trim()))==null?void 0:x.filter(V=>V!==""),upstream:{id:s.config.upstreamId}}}),j=async()=>{var y,_;try{h.isReadonly=!0,h.errorMessage="";let x;if(await m.post(C.value,S.value),N.value==="create"?x=await m.post(R.value,S.value):N.value==="edit"&&(x=((y=s.config)==null?void 0:y.app)==="konnect"?await m.put(R.value,S.value):await m.patch(R.value,S.value)),x){const{data:V}=x;h.fields.target=(V==null?void 0:V.name)||"",h.fields.weight=(V==null?void 0:V.weight)??100,h.fields.tags=((_=V==null?void 0:V.tags)==null?void 0:_.join(", "))||"",o("update",V),Object.assign(h.fields,u)}}catch(x){h.errorMessage=g(x),o("error",x)}finally{h.isReadonly=!1}};return e.watch(()=>s.targetId,()=>{Object.assign(h.fields,u)}),(y,_)=>{const x=e.resolveComponent("KInput"),V=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(V,{"action-button-disabled":!O.value||h.isReadonly,"action-button-text":e.unref(n)("targets.form.buttons.save"),"cancel-button-text":e.unref(n)("targets.form.buttons.cancel"),title:l.value,visible:a.isVisible,onCancel:d,onProceed:j},{default:e.withCtx(()=>[e.createElementVNode("div",dt,[e.createVNode(e.unref(p.EntityBaseForm),{config:a.config,"edit-id":a.targetId,"entity-type":e.unref(p.SupportedEntityType).Target,"error-message":h.errorMessage,"fetch-url":q.value,"form-fields":S.value,"is-readonly":h.isReadonly,onCancel:d,"onFetch:error":_[3]||(_[3]=f=>y.$emit("error",f)),"onFetch:success":w,onLoading:_[4]||(_[4]=f=>y.$emit("loading",f))},{default:e.withCtx(()=>[e.createElementVNode("div",ut,[y.$slots.info?(e.openBlock(),e.createElementBlock("div",ft,[e.renderSlot(y.$slots,"info",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(x,{modelValue:h.fields.target,"onUpdate:modelValue":_[0]||(_[0]=f=>h.fields.target=f),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:e.unref(n)("targets.form.fields.target.label"),"label-attributes":{info:e.unref(n)("targets.form.fields.target.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(n)("targets.form.fields.target.placeholder"),readonly:h.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(x,{modelValue:h.fields.weight,"onUpdate:modelValue":_[1]||(_[1]=f=>h.fields.weight=f),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight",error:t.value,"error-message":e.unref(n)("targets.errors.weight"),label:e.unref(n)("targets.form.fields.weight.label"),"label-attributes":{info:e.unref(n)("targets.form.fields.weight.tooltip"),tooltipAttributes:{maxWidth:"400"}},max:"65535",min:"0",readonly:h.isReadonly,required:"",type:"number"},null,8,["modelValue","error","error-message","label","label-attributes","readonly"]),e.createVNode(x,{modelValue:h.fields.tags,"onUpdate:modelValue":_[2]||(_[2]=f=>h.fields.tags=f),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:e.unref(n)("targets.form.fields.tags.help"),label:e.unref(n)("targets.form.fields.tags.label"),placeholder:e.unref(n)("targets.form.fields.tags.placeholder"),readonly:h.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])])]),_:3},8,["config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])]),_:3},8,["action-button-disabled","action-button-text","cancel-button-text","title","visible"])}}}),[["__scopeId","data-v-6a64b86e"]]),pt={class:"kong-ui-entities-targets-list"},mt={class:"target-address"},yt=Y(e.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||!a.upstreamId||a.app==="kongManager"&&(typeof a.canMarkHealthy>"u"||typeof a.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},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success","health-actions:healthy","health-actions:unhealthy","create:target","update:target"],setup(a,{emit:E}){var c;const o=E,s=a,{i18n:{t:n}}=X.useI18n(),{axiosInstance:g}=p.useAxios((c=s.config)==null?void 0:c.axiosRequestConfig),m=e.ref(1),q=e.computed(()=>s.config.app!=="kongManager"||!!s.config.disableSorting),l={target:{label:n("targets.list.table_headers.target_address"),sortable:!0,hidable:!1},weight:{label:n("targets.list.table_headers.weight"),sortable:!0},tags:{label:n("targets.list.table_headers.tags"),sortable:!1}},h=e.computed(()=>{var i,U,P,H;let r=`${s.config.apiBaseUrl}${de.list[s.config.app]}`;return s.config.app==="konnect"?r=r.replace(/{controlPlaneId}/gi,((i=s.config)==null?void 0:i.controlPlaneId)||"").replace(/{upstreamId}/gi,((U=s.config)==null?void 0:U.upstreamId)||""):s.config.app==="kongManager"&&(r=r.replace(/\/{workspace}/gi,(P=s.config)!=null&&P.workspace?`/${s.config.workspace}`:"").replace(/{upstreamId}/gi,((H=s.config)==null?void 0:H.upstreamId)||"")),r}),{fetcher:k,fetcherState:u}=p.useFetcher(s.config,h.value),t=()=>{m.value++},O=e.ref(null),w=e.ref(!1),d=()=>{$.value=!0},C=(r,i)=>{const U=r.id;if(!i(U)){o("copy:error",{entity:r,field:"id",message:n("targets.errors.copy")});return}o("copy:success",{entity:r,field:"id",message:n("targets.copy.success",{val:U})})},R=(r,i)=>{const U=JSON.stringify(r);if(!i(U)){o("copy:error",{entity:r,message:n("targets.errors.copy")});return}o("copy:success",{entity:r,message:n("targets.copy.success_brief")})},S=r=>{A.value=r,$.value=!0},j=r=>s.config.app==="konnect"?!1:s.config.canMarkHealthy(r),W=r=>s.config.app==="konnect"?!1:s.config.canMarkUnhealthy(r),y=e.ref(void 0),_=e.ref(!1),x=e.ref(!1),V=e.ref(""),f=p.useDeleteUrlBuilder(s.config,h.value),D=r=>{y.value=r,_.value=!0},M=()=>{_.value=!1},G=async()=>{var r,i,U;if((r=y.value)!=null&&r.id){x.value=!0;try{await g.delete(f(y.value.id)),x.value=!1,_.value=!1,m.value++,o("delete:success",y.value)}catch(P){V.value=((U=(i=P.response)==null?void 0:i.data)==null?void 0:U.message)||P.message||n("targets.errors.delete"),o("error",P)}finally{x.value=!1}}},z=e.ref(!1);e.watch(u,r=>{var i,U,P,H;if(Array.isArray((i=r==null?void 0:r.response)==null?void 0:i.data)&&(z.value=r.response.data.length>0),r.status===p.FetcherStatus.NoRecords?w.value=!0:w.value=!1,r.status===p.FetcherStatus.Error){O.value={title:n("targets.errors.general")},(H=(P=(U=r.error)==null?void 0:U.response)==null?void 0:P.data)!=null&&H.message&&(O.value.message=r.error.response.data.message),o("error",r.error);return}O.value=null});const T=e.ref({ctaText:void 0,message:`${n("targets.list.empty_state.description")}${s.config.additionMessageForEmptyState?` ${s.config.additionMessageForEmptyState}`:""}`,title:n("targets.title"),...s.config.createRoute&&{ctaPath:s.config.createRoute}});e.onBeforeMount(async()=>{await s.canCreate()&&(T.value.title=n("targets.list.empty_state.title"),T.value.ctaText=n("targets.actions.create"))});const I=e.computed(()=>({app:s.config.app,apiBaseUrl:s.config.apiBaseUrl,upstreamId:s.config.upstreamId,axiosRequestConfig:s.config.axiosRequestConfig,...s.config.app==="konnect"&&{controlPlaneId:s.config.controlPlaneId},...s.config.app==="kongManager"&&{workspace:s.config.workspace}})),A=e.ref(""),$=e.ref(!1),v=r=>{A.value?o("update:target",r):o("create:target",r),b()},b=()=>{F(),m.value++},F=()=>{$.value=!1,A.value=""};return(r,i)=>{const U=e.resolveComponent("KButton"),P=e.resolveComponent("KBadge"),H=e.resolveComponent("KTruncate"),B=e.resolveComponent("KDropdownItem"),J=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(e.unref(p.EntityBaseTable),{"cache-identifier":a.cacheIdentifier,"disable-sorting":q.value,"empty-state-options":T.value,"enable-entity-actions":"","error-message":O.value,fetcher:e.unref(k),"fetcher-cache-key":m.value,"hide-toolbar":w.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":e.unref(l),onEmptyStateCtaClicked:i[1]||(i[1]=()=>s.config.createRoute?void 0:d()),onSort:t},{"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!a.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>a.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(U,{appearance:"primary","data-testid":"toolbar-new-target",size:a.useActionOutside?"medium":"large",to:s.config.createRoute?s.config.createRoute:void 0,onClick:i[0]||(i[0]=()=>s.config.createRoute?void 0:d())},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(n)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["size","to"]),[[e.vShow,z.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),target:e.withCtx(({rowValue:K})=>[e.createElementVNode("span",mt,e.toDisplayString(K),1)]),tags:e.withCtx(({rowValue:K})=>[e.createVNode(H,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K,L=>(e.openBlock(),e.createBlock(P,{key:L,"max-width":"auto"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L),1)]),_:2},1024))),128))]),_:2},1024)]),actions:e.withCtx(({row:K})=>[e.createVNode(J,null,{default:e.withCtx(({copyToClipboard:L})=>[e.createVNode(B,{"data-testid":"action-entity-copy-id",onClick:Z=>C(K,L)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(J,null,{default:e.withCtx(({copyToClipboard:L})=>[e.createVNode(B,{"data-testid":"action-entity-copy-json",onClick:Z=>R(K,L)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>a.canEdit(K)},{default:e.withCtx(()=>[e.createVNode(B,{"data-testid":"action-entity-edit","has-divider":"",onClick:L=>S(K.id)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>j(K)},{default:e.withCtx(()=>[e.createVNode(B,{"data-testid":"action-target-mark-healthy",onClick:L=>o("health-actions:healthy",K)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>W(K)},{default:e.withCtx(()=>[e.createVNode(B,{"data-testid":"action-target-mark-unhealthy",onClick:L=>o("health-actions:unhealthy",K)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>a.canDelete(K)},{default:e.withCtx(()=>[e.createVNode(B,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:L=>D(K)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("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","hide-toolbar","table-headers"]),e.createVNode(e.unref(p.EntityDeleteModal),{"action-pending":x.value,description:e.unref(n)("targets.delete.description"),"entity-type":e.unref(p.EntityTypes).Target,error:V.value,"need-confirm":!1,title:e.unref(n)("targets.delete.title"),visible:_.value,onCancel:M,onProceed:G},null,8,["action-pending","description","entity-type","error","title","visible"]),e.createVNode(Se,{config:I.value,"is-visible":$.value,"target-id":A.value,onCancel:F,onUpdate:v},e.createSlots({_:2},[r.$slots["form-info"]?{name:"info",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),[["__scopeId","data-v-980cfece"]]),gt={key:1},bt=Y(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(a,{emit:E}){var D,M,G,z;const{i18nT:o,i18n:{t:s}}=X.useI18n(),n=a,g=E,{debouncedQueryChange:m,loading:q,loadItems:N,results:l,allRecords:h}=p.useDebouncedFilter(n.config,(M=se.form[(D=n.config)==null?void 0:D.app])==null?void 0:M.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:k,loading:u,loadItems:t,results:O}=p.useDebouncedFilter(n.config,(z=se.form[(G=n.config)==null?void 0:G.app])==null?void 0:z.getCertificates),w=e.ref(""),d=e.computed(()=>{var T;return!!n.name&&!((T=h.value)!=null&&T.some(I=>I.host===n.name))}),C=e.computed(()=>{var I,A,$;const T=d.value&&n.name.includes((I=w.value)==null?void 0:I.toLowerCase());return($=l.value)==null?void 0:$.map(v=>({label:v.host,value:v.id})).concat(T?[{label:n.name,value:((A=j.value)==null?void 0:A.value)||n.name}]:[])}),R=e.computed(()=>{var T;return(T=O.value)==null?void 0:T.map(I=>({label:I.id,value:I.id}))}),S=e.ref(""),j=e.ref({value:"",label:""}),W=e.computed(()=>{var T,I;return((T=C.value.find(A=>A.value===S.value))==null?void 0:T.label)||((I=j.value)==null?void 0:I.label)}),y=T=>{w.value=T,m(T)},_=T=>{j.value=T},x=()=>{j.value={value:"",label:""}},V=T=>{S.value=T,g("update:name",W.value)},f=e.ref(!1);return e.onBeforeMount(async()=>{var T,I;try{f.value=!0,await N(),n.name&&(S.value=((I=(T=C.value.find(A=>A.label===n.name))==null?void 0:T.value)==null?void 0:I.toString())||n.name),await t()}finally{f.value=!1}}),(T,I)=>{const A=e.resolveComponent("KSkeleton"),$=e.resolveComponent("KSelect"),v=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(p.EntityFormSection),{class:"kong-ui-entities-upstreams-general-info",description:e.unref(s)("upstreams.form.general_info.help"),title:e.unref(s)("upstreams.form.general_info.title")},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(A,{key:0,type:"form"})):(e.openBlock(),e.createElementBlock("div",gt,[e.createVNode($,{class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"","filter-function":()=>!0,items:C.value,label:e.unref(s)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{"max-width":"400"}},loading:e.unref(q),"model-value":S.value,placeholder:e.unref(s)("upstreams.form.fields.name.placeholder"),readonly:a.readonly,required:"",width:"100%",onItemAdded:_,onItemRemoved:x,onQueryChange:y,"onUpdate:modelValue":V},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(o),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(s)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),e.createVNode(v,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:e.unref(s)("upstreams.form.fields.host_header.label"),"model-value":a.hostHeader,readonly:a.readonly,type:"text","onUpdate:modelValue":I[0]||(I[0]=b=>g("update:host-header",b))},null,8,["label","model-value","readonly"]),e.createVNode($,{class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"","filter-function":()=>!0,items:R.value,label:e.unref(s)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(s)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},loading:e.unref(u),"model-value":a.clientCertificate,placeholder:e.unref(s)("upstreams.form.fields.client_certificate.placeholder"),readonly:a.readonly,width:"100%",onQueryChange:e.unref(k),"onUpdate:modelValue":I[1]||(I[1]=b=>g("update:client-certificate",b))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),e.createVNode(v,{autocomplete:"off","data-testid":"upstreams-form-tags",help:e.unref(s)("upstreams.form.fields.tags.help"),label:e.unref(s)("upstreams.form.fields.tags.label"),"label-attributes":{info:e.unref(s)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},"model-value":a.tags,placeholder:e.unref(s)("upstreams.form.fields.tags.placeholder"),readonly:a.readonly,type:"text","onUpdate:modelValue":I[2]||(I[2]=b=>g("update:tags",b))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),[["__scopeId","data-v-626ed41f"]]),ue={upstreamObject:"https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",loadBalancing:"https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"},kt={class:"fields-group-title"},Ct={class:"fields-group-text"},_t={class:"fields-group-title"},wt={class:"fields-group-text"},Vt=Y(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(a,{emit:E}){const{i18nT:o,i18n:{t:s}}=X.useI18n(),{inRange:n}=ne(),g=a,m=E,q=e.ref([{label:s("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:s("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:s("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:s("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1}]),N=e.ref([{label:s("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:s("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:s("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:s("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:s("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:s("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:s("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:s("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);e.watch(()=>g.hashOn,(k,u)=>{u==="header"&&k!==u&&m("update:hash-on-header",""),u==="cookie"&&k!==u&&(m("update:hash-on-cookie",""),m("update:hash-on-cookie-path","/")),u==="query_arg"&&k!==u&&m("update:hash-on-query-argument",""),u==="uri_capture"&&k!==u&&m("update:hash-on-uri-capture",""),(k==="cookie"||k==="none")&&(m("update:hash-fallback","none"),m("update:hash-fallback-header",""),m("update:hash-fallback-query-argument",""),m("update:hash-fallback-uri-capture",""))}),e.watch(()=>g.hashFallback,(k,u)=>{u==="header"&&k!==u&&m("update:hash-fallback-header",""),u==="cookie"&&k!==u&&(m("update:hash-on-cookie",""),m("update:hash-on-cookie-path","/")),u==="query_arg"&&k!==u&&m("update:hash-fallback-query-argument",""),u==="uri_capture"&&k!==u&&m("update:hash-fallback-uri-capture","")});const l=e.computed(()=>g.hashOn==="cookie"||g.hashOn==="none"),h=e.computed(()=>g.slots?n(g.slots,fe,pe)?"":s("upstreams.form.errors.in_range"):"");return(k,u)=>{const t=e.resolveComponent("KExternalLink"),O=e.resolveComponent("KSelect"),w=e.resolveComponent("KInput"),d=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(p.EntityFormSection),{class:"kong-ui-entities-upstreams-load-balancing",title:e.unref(s)("upstreams.form.load_balancing.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(s)("upstreams.form.load_balancing.help"))+" ",1),e.createVNode(t,{"hide-icon":"",href:e.unref(ue).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(O,{class:"algorithm-select",items:q.value,label:e.unref(s)("upstreams.form.fields.algorithm.label"),"model-value":a.algorithm,readonly:a.readonly,width:"100%","onUpdate:modelValue":u[0]||(u[0]=C=>m("update:algorithm",C))},null,8,["items","label","model-value","readonly"]),e.createVNode(w,{autocomplete:"off","data-testid":"upstreams-form-slots",error:!!h.value,"error-message":h.value,help:e.unref(s)("upstreams.form.fields.slots.help"),label:e.unref(s)("upstreams.form.fields.slots.label"),max:e.unref(pe),min:e.unref(fe),"model-value":a.slots,readonly:a.readonly,type:"number","onUpdate:modelValue":u[1]||(u[1]=C=>m("update:slots",C))},null,8,["error","error-message","help","label","max","min","model-value","readonly"]),e.createVNode(d,null,{default:e.withCtx(()=>[e.createElementVNode("h5",kt,e.toDisplayString(e.unref(s)("upstreams.form.fields.hash_on.label")),1),e.createElementVNode("p",Ct,e.toDisplayString(e.unref(s)("upstreams.form.fields.hash_on.help")),1),e.createVNode(O,{class:"hash-on-select",items:N.value,label:e.unref(s)("upstreams.form.fields.hash_on.label"),"model-value":a.hashOn,readonly:a.readonly,width:"100%","onUpdate:modelValue":u[2]||(u[2]=C=>m("update:hash-on",C))},null,8,["items","label","model-value","readonly"]),a.hashOn==="header"?(e.openBlock(),e.createBlock(w,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:e.unref(s)("upstreams.form.fields.header.label"),"model-value":a.hashOnHeader,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[3]||(u[3]=C=>m("update:hash-on-header",C))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashOn==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(s)("upstreams.form.fields.cookie.label"),"model-value":a.hashOnCookie,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[4]||(u[4]=C=>m("update:hash-on-cookie",C))},null,8,["label","model-value","readonly"]),e.createVNode(w,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(s)("upstreams.form.fields.cookie_path.label"),"model-value":a.hashOnCookiePath,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[5]||(u[5]=C=>m("update:hash-on-cookie-path",C))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),a.hashOn==="query_arg"?(e.openBlock(),e.createBlock(w,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:e.unref(s)("upstreams.form.fields.query_argument.label"),"model-value":a.hashOnQueryArgument,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[6]||(u[6]=C=>m("update:hash-on-query-argument",C))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashOn==="uri_capture"?(e.openBlock(),e.createBlock(w,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:e.unref(s)("upstreams.form.fields.uri_capture.label"),"model-value":a.hashOnUriCapture,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[7]||(u[7]=C=>m("update:hash-on-uri-capture",C))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createElementVNode("h5",_t,e.toDisplayString(e.unref(s)("upstreams.form.fields.hash_fallback.label")),1),e.createElementVNode("p",wt,e.toDisplayString(e.unref(s)("upstreams.form.fields.hash_fallback.help")),1),e.createVNode(O,{class:"hash-fallback-select",disabled:l.value,items:N.value,label:e.unref(s)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{"max-width":"400"}},"model-value":a.hashFallback,readonly:a.readonly,width:"100%","onUpdate:modelValue":u[8]||(u[8]=C=>m("update:hash-fallback",C))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(o),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(s)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(s)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),a.hashFallback==="header"?(e.openBlock(),e.createBlock(w,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:e.unref(s)("upstreams.form.fields.header.label"),"model-value":a.hashFallbackHeader,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[9]||(u[9]=C=>m("update:hash-fallback-header",C))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashFallback==="cookie"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:e.unref(s)("upstreams.form.fields.cookie.label"),"model-value":a.hashOnCookie,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[10]||(u[10]=C=>m("update:hash-on-cookie",C))},null,8,["label","model-value","readonly"]),e.createVNode(w,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:e.unref(s)("upstreams.form.fields.cookie_path.label"),"model-value":a.hashOnCookiePath,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[11]||(u[11]=C=>m("update:hash-on-cookie-path",C))},null,8,["label","model-value","readonly"])],64)):e.createCommentVNode("",!0),a.hashFallback==="query_arg"?(e.openBlock(),e.createBlock(w,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:e.unref(s)("upstreams.form.fields.query_argument.label"),"model-value":a.hashFallbackQueryArgument,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[12]||(u[12]=C=>m("update:hash-fallback-query-argument",C))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0),a.hashFallback==="uri_capture"?(e.openBlock(),e.createBlock(w,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:e.unref(s)("upstreams.form.fields.uri_capture.label"),"model-value":a.hashFallbackUriCapture,readonly:a.readonly,required:"",type:"text","onUpdate:modelValue":u[13]||(u[13]=C=>m("update:hash-fallback-uri-capture",C))},null,8,["label","model-value","readonly"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-d662db8e"]]),Nt={class:"fields-group-title"},xt={class:"fields-group-text"},St={class:"fields-group-title"},Ht={class:"fields-group-text"},Tt=Y(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(a,{emit:E}){const{i18n:{t:o}}=X.useI18n(),s=E;return(n,g)=>{const m=e.resolveComponent("KExternalLink"),q=e.resolveComponent("KInputSwitch"),N=e.resolveComponent("KCard"),l=e.resolveComponent("KInput");return e.openBlock(),e.createBlock(e.unref(p.EntityFormSection),{class:"kong-ui-entities-upstreams-healthchecks",title:e.unref(o)("upstreams.form.health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.health_check.help"))+" ",1),e.createVNode(m,{"hide-icon":"",href:e.unref(ue).loadBalancing},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Nt,e.toDisplayString(e.unref(o)("upstreams.form.fields.active_health_checks.label")),1),e.createElementVNode("p",xt,e.toDisplayString(e.unref(o)("upstreams.form.fields.active_health_checks.help")),1),e.createVNode(q,{class:"active-health-switch","data-testid":"active-health-switch",disabled:a.readonly,"model-value":a.activeHealthSwitch,onChange:g[0]||(g[0]=h=>s("update:active-health-switch",h))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(N,null,{default:e.withCtx(()=>[e.createElementVNode("h5",St,e.toDisplayString(e.unref(o)("upstreams.form.fields.passive_health_checks.label")),1),e.createElementVNode("p",Ht,e.toDisplayString(e.unref(o)("upstreams.form.fields.passive_health_checks.help")),1),e.createVNode(q,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:a.readonly,"model-value":a.passiveHealthSwitch,onChange:g[1]||(g[1]=h=>s("update:passive-health-switch",h))},null,8,["disabled","model-value"])]),_:1}),e.createVNode(l,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:e.unref(o)("upstreams.form.fields.healthchecks_threshold.label"),max:e.unref(at),min:e.unref(tt),"model-value":a.healthchecksThreshold,readonly:a.readonly,type:"number","onUpdate:modelValue":g[2]||(g[2]=h=>s("update:healthchecks-threshold",h))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),[["__scopeId","data-v-bfdc5a59"]]),Ut="#d60027",It={key:2},Ft={class:"fields-group-title"},qt={class:"fields-group-text"},Bt={class:"fields-group-title"},Et={class:"fields-group-text"},Ot=Y(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(a,{emit:E}){const{i18n:{t:o}}=X.useI18n(),{objectsAreEqual:s}=ne(),n=a,g=E,m=e.ref([{label:o("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),q=e.computed(()=>n.type==="https"||n.type==="grpcs"),N=e.computed(()=>n.type==="tcp"),{trackNewItems:l}=re({replaceId:!0}),{trackNewItems:h}=re({replaceId:!0});e.watch(()=>n.type,(w,d)=>{d==="tcp"&&w!==d&&g("update:tcp-failures","5"),(d==="https"||d==="grpcs")&&w!==d&&(g("update:https-sni",""),g("update:verify-ssl",!1)),d!=="tcp"&&w==="tcp"&&(g("update:http-path","/"),g("update:http-statuses",we),g("update:unhealthy-http-statuses",Ne))});const k=e.ref([{key:"",values:""}]);e.watch(()=>n.headers,w=>{s(k.value,w)||(k.value=[...w])},{immediate:!0,deep:!0});const u=()=>{g("update:headers",k.value)},t=()=>{k.value.push({key:"",values:""}),u()},O=w=>{w===0&&k.value.length===1?k.value[0]={key:"",values:""}:k.value.splice(w,1),u()};return(w,d)=>{const C=e.resolveComponent("KExternalLink"),R=e.resolveComponent("KSelect"),S=e.resolveComponent("KInput"),j=e.resolveComponent("KCheckbox"),W=e.resolveComponent("KLabel"),y=e.resolveComponent("KButton"),_=e.resolveComponent("KMultiselect"),x=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(p.EntityFormSection),{class:"kong-ui-entities-upstreams-active-healthcheck",title:e.unref(o)("upstreams.form.active_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.active_health_check.help"))+" ",1),e.createVNode(C,{"hide-icon":"",href:e.unref(ue).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>{var V;return[e.createVNode(R,{class:"active-healthcheck-type-select",items:m.value,label:e.unref(o)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":a.type,readonly:a.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=f=>g("update:type",f))},null,8,["items","label","model-value","readonly"]),N.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(S,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:e.unref(o)("upstreams.form.fields.http_path.label"),"model-value":a.httpPath,readonly:a.readonly,type:"text","onUpdate:modelValue":d[1]||(d[1]=f=>g("update:http-path",f))},null,8,["label","model-value","readonly"])),e.createVNode(S,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:e.unref(o)("upstreams.form.fields.timeout.label"),max:e.unref(st),min:e.unref(lt),"model-value":a.timeout,readonly:a.readonly,type:"number","onUpdate:modelValue":d[2]||(d[2]=f=>g("update:timeout",f))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(S,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:e.unref(o)("upstreams.form.fields.concurrency.label"),max:e.unref(ot),min:e.unref(rt),"model-value":a.concurrency,readonly:a.readonly,type:"number","onUpdate:modelValue":d[3]||(d[3]=f=>g("update:concurrency",f))},null,8,["label","max","min","model-value","readonly"]),q.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(S,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:e.unref(o)("upstreams.form.fields.https_sni.label"),"model-value":a.httpsSni,readonly:a.readonly,type:"text","onUpdate:modelValue":d[4]||(d[4]=f=>g("update:https-sni",f))},null,8,["label","model-value","readonly"]),e.createVNode(j,{"data-testid":"active-healthcheck-verify-ssl",disabled:a.readonly,label:e.unref(o)("upstreams.form.fields.verify_ssl.label"),"model-value":a.verifySsl,"onUpdate:modelValue":d[5]||(d[5]=f=>g("update:verify-ssl",f))},null,8,["disabled","label","model-value"])],64)):e.createCommentVNode("",!0),((V=a.config)==null?void 0:V.app)==="kongManager"?(e.openBlock(),e.createElementBlock("div",It,[e.createVNode(W,{info:e.unref(o)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(f,D)=>(e.openBlock(),e.createElementBlock("div",{key:`${f.header}_${D}`,class:e.normalizeClass(["headers-row",{"margin-top-6":D>0}])},[e.createVNode(S,{modelValue:k.value[D].key,"onUpdate:modelValue":M=>k.value[D].key=M,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${D+1}`,readonly:a.readonly,type:"text",onBlur:u},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(S,{modelValue:k.value[D].values,"onUpdate:modelValue":M=>k.value[D].values=M,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${D+1}`,readonly:a.readonly,type:"text",onBlur:u},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),e.createVNode(y,{appearance:"tertiary",class:"btn-remove","data-testid":"btn-remove-header",disabled:k.value.length===1,icon:"",onClick:M=>O(D)},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.TrashIcon),{class:"delete-item",color:k.value.length>1?e.unref(Ut):void 0},null,8,["color"])]),_:2},1032,["disabled","onClick"]),k.value&&D===k.value.length-1?(e.openBlock(),e.createBlock(y,{key:0,appearance:"tertiary",class:"btn-add-header","data-testid":"btn-add-header",icon:"",onClick:t},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.AddIcon))]),_:1})):e.createCommentVNode("",!0)],2))),128))])])):e.createCommentVNode("",!0),e.createVNode(x,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Ft,e.toDisplayString(e.unref(o)("upstreams.form.healthy.label")),1),e.createElementVNode("p",qt,e.toDisplayString(e.unref(o)("upstreams.form.healthy.help")),1),e.createVNode(S,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-interval",help:e.unref(o)("upstreams.form.fields.interval.help"),label:e.unref(o)("upstreams.form.fields.interval.label"),max:e.unref(_e),min:e.unref(Ce),"model-value":a.interval,readonly:a.readonly,type:"number","onUpdate:modelValue":d[6]||(d[6]=f=>g("update:interval",f))},null,8,["help","label","max","min","model-value","readonly"]),e.createVNode(S,{autocomplete:"off","data-testid":"active-healthcheck-successes",label:e.unref(o)("upstreams.form.fields.successes.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.successes,readonly:a.readonly,type:"number","onUpdate:modelValue":d[7]||(d[7]=f=>g("update:successes",f))},null,8,["label","max","min","model-value","readonly"]),N.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(ie),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.httpStatuses,readonly:a.readonly,width:"100%",onItemAdded:d[8]||(d[8]=f=>e.unref(l)(f,!0)),onItemRemoved:d[9]||(d[9]=f=>e.unref(l)(f,!1)),"onUpdate:modelValue":d[10]||(d[10]=f=>g("update:http-statuses",f))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Bt,e.toDisplayString(e.unref(o)("upstreams.form.unhealthy.label")),1),e.createElementVNode("p",Et,e.toDisplayString(e.unref(o)("upstreams.form.unhealthy.help")),1),e.createVNode(S,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:e.unref(o)("upstreams.form.fields.interval.help"),label:e.unref(o)("upstreams.form.fields.interval.label"),max:e.unref(_e),min:e.unref(Ce),"model-value":a.unhealthyInterval,readonly:a.readonly,type:"number","onUpdate:modelValue":d[11]||(d[11]=f=>g("update:unhealthy-interval",f))},null,8,["help","label","max","min","model-value","readonly"]),e.createVNode(S,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-tcp-failures",label:e.unref(o)("upstreams.form.fields.tcp_failures.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.tcpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":d[12]||(d[12]=f=>g("update:tcp-failures",f))},null,8,["label","max","min","model-value","readonly"]),N.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(S,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-http-failures",label:e.unref(o)("upstreams.form.fields.http_failures.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.httpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":d[13]||(d[13]=f=>g("update:http-failures",f))},null,8,["label","max","min","model-value","readonly"])),N.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:1,autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(ie),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.unhealthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:d[14]||(d[14]=f=>e.unref(h)(f,!0)),onItemRemoved:d[15]||(d[15]=f=>e.unref(h)(f,!1)),"onUpdate:modelValue":d[16]||(d[16]=f=>g("update:unhealthy-http-statuses",f))},null,8,["items","label","model-value","readonly"])),e.createVNode(S,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:e.unref(o)("upstreams.form.fields.timeouts.label"),max:e.unref(ke),min:e.unref(be),"model-value":a.unhealthyTimeouts,readonly:a.readonly,type:"number","onUpdate:modelValue":d[17]||(d[17]=f=>g("update:unhealthy-timeouts",f))},null,8,["label","max","min","model-value","readonly"])]),_:1})]}),_:1},8,["title"])}}}),[["__scopeId","data-v-efccf560"]]),Dt={class:"fields-group-title"},$t={class:"fields-group-text"},Pt={class:"fields-group-title"},At={class:"fields-group-text"},Mt=Y(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(a,{emit:E}){const{i18n:{t:o}}=X.useI18n(),s=a,n=E,g=e.ref([{label:o("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:o("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),m=e.computed(()=>s.type==="tcp"),{trackNewItems:q}=re({replaceId:!0}),{trackNewItems:N}=re({replaceId:!0});return e.watch(()=>s.type,(l,h)=>{h==="tcp"&&l!==h&&n("update:tcp-failures","5"),h!=="tcp"&&l==="tcp"&&(n("update:http-statuses",Ve),n("update:unhealthy-http-statuses",xe))}),(l,h)=>{const k=e.resolveComponent("KExternalLink"),u=e.resolveComponent("KSelect"),t=e.resolveComponent("KInput"),O=e.resolveComponent("KMultiselect"),w=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(e.unref(p.EntityFormSection),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:e.unref(o)("upstreams.form.passive_health_check.title")},{description:e.withCtx(()=>[e.createElementVNode("p",null,[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.passive_health_check.help"))+" ",1),e.createVNode(k,{"hide-icon":"",href:e.unref(ue).upstreamObject},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:e.withCtx(()=>[e.createVNode(u,{class:"passive-healthcheck-type-select",items:g.value,label:e.unref(o)("upstreams.form.fields.passive_health_check_type.label"),"model-value":a.type,readonly:a.readonly,width:"100%","onUpdate:modelValue":h[0]||(h[0]=d=>n("update:type",d))},null,8,["items","label","model-value","readonly"]),e.createVNode(w,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Dt,e.toDisplayString(e.unref(o)("upstreams.form.passive_healthy.label")),1),e.createElementVNode("p",$t,e.toDisplayString(e.unref(o)("upstreams.form.passive_healthy.help")),1),e.createVNode(t,{autocomplete:"off","data-testid":"passive-healthcheck-successes",label:e.unref(o)("upstreams.form.fields.successes.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.successes,readonly:a.readonly,type:"number","onUpdate:modelValue":h[1]||(h[1]=d=>n("update:successes",d))},null,8,["label","max","min","model-value","readonly"]),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O,{key:0,class:"margin-top-6 passive-healthcheck-http-statuses","enable-item-creation":"",items:e.unref(ie),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.httpStatuses,readonly:a.readonly,width:"100%",onItemAdded:h[2]||(h[2]=d=>e.unref(q)(d,!0)),onItemRemoved:h[3]||(h[3]=d=>e.unref(q)(d,!1)),"onUpdate:modelValue":h[4]||(h[4]=d=>n("update:http-statuses",d))},null,8,["items","label","model-value","readonly"]))]),_:1}),e.createVNode(w,null,{default:e.withCtx(()=>[e.createElementVNode("h5",Pt,e.toDisplayString(e.unref(o)("upstreams.form.passive_unhealthy.label")),1),e.createElementVNode("p",At,e.toDisplayString(e.unref(o)("upstreams.form.passive_unhealthy.help")),1),e.createVNode(t,{autocomplete:"off","data-testid":"passive-healthcheck-timeouts",label:e.unref(o)("upstreams.form.fields.timeouts.label"),max:e.unref(ke),min:e.unref(be),"model-value":a.timeouts,readonly:a.readonly,type:"number","onUpdate:modelValue":h[5]||(h[5]=d=>n("update:timeouts",d))},null,8,["label","max","min","model-value","readonly"]),e.createVNode(t,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-tcp-failures",label:e.unref(o)("upstreams.form.fields.tcp_failures.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.tcpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":h[6]||(h[6]=d=>n("update:tcp-failures",d))},null,8,["label","max","min","model-value","readonly"]),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(t,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-http-failures",label:e.unref(o)("upstreams.form.fields.http_failures.label"),max:e.unref(te),min:e.unref(ee),"model-value":a.httpFailures,readonly:a.readonly,type:"number","onUpdate:modelValue":h[7]||(h[7]=d=>n("update:http-failures",d))},null,8,["label","max","min","model-value","readonly"])),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O,{key:1,autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:e.unref(ie),label:e.unref(o)("upstreams.form.fields.http_statuses.label"),"model-value":a.unhealthyHttpStatuses,readonly:a.readonly,width:"100%",onItemAdded:h[8]||(h[8]=d=>e.unref(N)(d,!0)),onItemRemoved:h[9]||(h[9]=d=>e.unref(N)(d,!1)),"onUpdate:modelValue":h[10]||(h[10]=d=>n("update:unhealthy-http-statuses",d))},null,8,["items","label","model-value","readonly"]))]),_:1})]),_:1},8,["title"])}}}),[["__scopeId","data-v-5bd9952e"]]),Kt={class:"kong-ui-entities-upstreams-form"},Rt=Y(e.defineComponent({__name:"UpstreamsForm",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||(a==null?void 0:a.app)==="konnect"&&!(a!=null&&a.controlPlaneId)||(a==null?void 0:a.app)==="kongManager"&&typeof(a==null?void 0:a.workspace)!="string"||!(a!=null&&a.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(a,{emit:E}){var F;const o=a,s=E,{inRange:n,stringToNumberArray:g,upstreamsResponseToFields:m,getDefaultUpstreamFields:q,objectsAreEqual:N,cloneDeep:l}=ne(),{axiosInstance:h}=p.useAxios((F=o.config)==null?void 0:F.axiosRequestConfig),{getMessageFromError:k}=p.useErrors(),u=ye.useRouter(),t=e.reactive({fields:q(),readonly:!1,errorMessage:""}),O=e.reactive(q()),w=e.computed(()=>!N(t.fields,O)),d=c=>{t.fields.activeHealthCheck.interval=c?"5":"0",t.fields.activeHealthCheck.successes=c?"5":"0",t.fields.activeHealthCheck.httpFailures=c?"5":"0",t.fields.activeHealthCheck.unhealthyInterval=c?"5":"0",t.fields.activeHealthCheck.tcpFailures=c?"5":"0"},C=c=>{t.fields.passiveHealthCheck.timeouts=c?"5":"0",t.fields.passiveHealthCheck.successes=c?"80":"0",t.fields.passiveHealthCheck.tcpFailures=c?"5":"0",t.fields.passiveHealthCheck.httpFailures=c?"5":"0"},R=e.computed(()=>t.fields.slots?n(t.fields.slots,fe,pe):!0),S=e.computed(()=>t.fields.hashOn==="header"?!!t.fields.hashOnHeader:!0),j=e.computed(()=>t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie"?!!t.fields.hashOnCookie:!0),W=e.computed(()=>t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie"?!!t.fields.hashOnCookiePath:!0),y=e.computed(()=>t.fields.hashOn==="query_arg"?!!t.fields.hashOnQueryArgument:!0),_=e.computed(()=>t.fields.hashOn==="uri_capture"?!!t.fields.hashOnUriCapture:!0),x=e.computed(()=>t.fields.hashFallback==="header"?!!t.fields.hashFallbackHeader:!0),V=e.computed(()=>t.fields.hashFallback==="query_arg"?!!t.fields.hashFallbackQueryArgument:!0),f=e.computed(()=>t.fields.hashFallback==="uri_capture"?!!t.fields.hashFallbackUriCapture:!0),D=e.computed(()=>!!t.fields.name&&R.value&&S.value&&j.value&&W.value&&y.value&&_.value&&x.value&&V.value&&f.value),M=e.computed(()=>o.upstreamId?p.EntityBaseFormType.Edit:p.EntityBaseFormType.Create),G=e.computed(()=>{var c,r;return(r=se.form[(c=o.config)==null?void 0:c.app])==null?void 0:r.edit}),z=c=>{Object.assign(t.fields,m(c)),Object.assign(O,l(t.fields))},T=()=>{var c;u.push(((c=o.config)==null?void 0:c.cancelRoute)||{name:"upstreams-list"})},I=c=>{s("loading",c)},A=c=>{s("error",c)},$=e.computed(()=>{var r,i,U,P,H;const c={name:t.fields.name,slots:Number(t.fields.slots),algorithm:t.fields.algorithm,hash_on:t.fields.hashOn,hash_fallback:t.fields.hashFallback,healthchecks:{}};return t.fields.hostHeader&&(c.host_header=t.fields.hostHeader),t.fields.clientCertificate&&(c.client_certificate={id:t.fields.clientCertificate}),t.fields.healthchecksThreshold&&(c.healthchecks.threshold=Number(t.fields.healthchecksThreshold)),t.fields.tags&&(c.tags=(i=(r=t.fields.tags.split(","))==null?void 0:r.map(B=>String(B||"").trim()))==null?void 0:i.filter(B=>B!=="")),t.fields.hashOn==="header"&&(c.hash_on_header=t.fields.hashOnHeader),(t.fields.hashOn==="cookie"||t.fields.hashFallback==="cookie")&&(c.hash_on_cookie=t.fields.hashOnCookie,c.hash_on_cookie_path=t.fields.hashOnCookiePath),t.fields.hashOn==="query_arg"&&(c.hash_on_query_arg=t.fields.hashOnQueryArgument),t.fields.hashOn==="uri_capture"&&(c.hash_on_uri_capture=t.fields.hashOnUriCapture),t.fields.hashFallback==="header"&&(c.hash_fallback_header=t.fields.hashFallbackHeader),t.fields.hashFallback==="query_arg"&&(c.hash_fallback_query_arg=t.fields.hashFallbackQueryArgument),t.fields.hashFallback==="uri_capture"&&(c.hash_fallback_uri_capture=t.fields.hashFallbackUriCapture),t.fields.activeHealthSwitch?(c.healthchecks.active={type:t.fields.activeHealthCheck.type,healthy:{},unhealthy:{}},t.fields.activeHealthCheck.timeout&&(c.healthchecks.active.timeout=Number(t.fields.activeHealthCheck.timeout)),t.fields.activeHealthCheck.concurrency&&(c.healthchecks.active.concurrency=Number(t.fields.activeHealthCheck.concurrency)),t.fields.activeHealthCheck.type!=="tcp"&&t.fields.activeHealthCheck.httpPath&&(c.healthchecks.active.http_path=t.fields.activeHealthCheck.httpPath),((U=o.config)==null?void 0:U.app)==="kongManager"&&(t.fields.activeHealthCheck.headers.length===0?c.healthchecks.active.headers=[]:c.healthchecks.active.headers=t.fields.activeHealthCheck.headers.reduce((B,J)=>{var K,L;return J.key?{...B,[J.key]:(L=(K=J.values.split(","))==null?void 0:K.map(Z=>String(Z||"").trim()))==null?void 0:L.filter(Z=>Z!=="")}:{...B}},{})),(t.fields.activeHealthCheck.type==="https"||t.fields.activeHealthCheck.type==="grpcs")&&t.fields.activeHealthCheck.httpsSni&&(c.healthchecks.active.https_sni=t.fields.activeHealthCheck.httpsSni),(t.fields.activeHealthCheck.type==="https"||t.fields.activeHealthCheck.type==="grpcs")&&(c.healthchecks.active.https_verify_certificate=t.fields.activeHealthCheck.verifySsl),t.fields.activeHealthCheck.interval&&(c.healthchecks.active.healthy.interval=Number(t.fields.activeHealthCheck.interval)),t.fields.activeHealthCheck.successes&&(c.healthchecks.active.healthy.successes=Number(t.fields.activeHealthCheck.successes)),t.fields.activeHealthCheck.type!=="tcp"&&t.fields.activeHealthCheck.httpStatuses&&(c.healthchecks.active.healthy.http_statuses=g(t.fields.activeHealthCheck.httpStatuses)),t.fields.activeHealthCheck.unhealthyInterval&&(c.healthchecks.active.unhealthy.interval=Number(t.fields.activeHealthCheck.unhealthyInterval)),t.fields.activeHealthCheck.unhealthyTimeouts&&(c.healthchecks.active.unhealthy.timeouts=Number(t.fields.activeHealthCheck.unhealthyTimeouts)),t.fields.activeHealthCheck.type!=="tcp"&&t.fields.activeHealthCheck.unhealthyHttpStatuses&&(c.healthchecks.active.unhealthy.http_statuses=g(t.fields.activeHealthCheck.unhealthyHttpStatuses)),t.fields.activeHealthCheck.type!=="tcp"&&t.fields.activeHealthCheck.httpFailures&&(c.healthchecks.active.unhealthy.http_failures=Number(t.fields.activeHealthCheck.httpFailures)),t.fields.activeHealthCheck.tcpFailures&&(c.healthchecks.active.unhealthy.tcp_failures=Number(t.fields.activeHealthCheck.tcpFailures))):((P=o.config)==null?void 0:P.app)==="kongManager"&&M.value===p.EntityBaseFormType.Edit&&(c.healthchecks.active={type:t.fields.activeHealthCheck.type,headers:{},healthy:{interval:0,successes:0},unhealthy:{interval:0,http_failures:0,tcp_failures:0}}),t.fields.passiveHealthSwitch?(c.healthchecks.passive={type:t.fields.passiveHealthCheck.type,healthy:{},unhealthy:{}},t.fields.passiveHealthCheck.successes&&(c.healthchecks.passive.healthy.successes=Number(t.fields.passiveHealthCheck.successes)),t.fields.passiveHealthCheck.type!=="tcp"&&t.fields.passiveHealthCheck.httpStatuses&&(c.healthchecks.passive.healthy.http_statuses=g(t.fields.passiveHealthCheck.httpStatuses)),t.fields.passiveHealthCheck.timeouts&&(c.healthchecks.passive.unhealthy.timeouts=Number(t.fields.passiveHealthCheck.timeouts)),t.fields.passiveHealthCheck.type!=="tcp"&&t.fields.passiveHealthCheck.unhealthyHttpStatuses&&(c.healthchecks.passive.unhealthy.http_statuses=g(t.fields.passiveHealthCheck.unhealthyHttpStatuses)),t.fields.passiveHealthCheck.type!=="tcp"&&t.fields.passiveHealthCheck.httpFailures&&(c.healthchecks.passive.unhealthy.http_failures=Number(t.fields.passiveHealthCheck.httpFailures)),t.fields.passiveHealthCheck.tcpFailures&&(c.healthchecks.passive.unhealthy.tcp_failures=Number(t.fields.passiveHealthCheck.tcpFailures))):((H=o.config)==null?void 0:H.app)==="kongManager"&&M.value===p.EntityBaseFormType.Edit&&(c.healthchecks.passive={type:t.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}),c}),v=c=>{var i,U,P,H,B,J;let r=`${(i=o.config)==null?void 0:i.apiBaseUrl}${se.form[(U=o.config)==null?void 0:U.app][c]}`;return((P=o.config)==null?void 0:P.app)==="konnect"?r=r.replace(/{controlPlaneId}/gi,((H=o.config)==null?void 0:H.controlPlaneId)||""):((B=o.config)==null?void 0:B.app)==="kongManager"&&(r=r.replace(/\/{workspace}/gi,(J=o.config)!=null&&J.workspace?`/${o.config.workspace}`:"")),r=r.replace(/{id}/gi,o.upstreamId),r},b=async()=>{var c;try{t.readonly=!0,await h.post(v("validate"),$.value);let r;M.value===p.EntityBaseFormType.Create?r=await h.post(v("create"),$.value):M.value===p.EntityBaseFormType.Edit&&(r=((c=o.config)==null?void 0:c.app)==="konnect"?await h.put(v("edit"),$.value):await h.patch(v("edit"),$.value)),s("update",r==null?void 0:r.data)}catch(r){t.errorMessage=k(r),s("error",r)}finally{t.readonly=!1}};return(c,r)=>(e.openBlock(),e.createElementBlock("div",Kt,[e.createVNode(e.unref(p.EntityBaseForm),{"can-submit":D.value&&w.value,config:a.config,"edit-id":a.upstreamId,"entity-type":e.unref(p.SupportedEntityType).Upstream,"error-message":t.errorMessage,"fetch-url":G.value,"form-fields":$.value,"is-readonly":t.readonly,onCancel:T,"onFetch:error":A,"onFetch:success":z,onLoading:I,onSubmit:b},{default:e.withCtx(()=>[e.createVNode(bt,{"client-certificate":t.fields.clientCertificate,"onUpdate:clientCertificate":r[0]||(r[0]=i=>t.fields.clientCertificate=i),"host-header":t.fields.hostHeader,"onUpdate:hostHeader":r[1]||(r[1]=i=>t.fields.hostHeader=i),name:t.fields.name,"onUpdate:name":r[2]||(r[2]=i=>t.fields.name=i),tags:t.fields.tags,"onUpdate:tags":r[3]||(r[3]=i=>t.fields.tags=i),config:a.config,readonly:t.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),e.createVNode(Vt,{algorithm:t.fields.algorithm,"onUpdate:algorithm":r[4]||(r[4]=i=>t.fields.algorithm=i),"hash-fallback":t.fields.hashFallback,"onUpdate:hashFallback":r[5]||(r[5]=i=>t.fields.hashFallback=i),"hash-fallback-header":t.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":r[6]||(r[6]=i=>t.fields.hashFallbackHeader=i),"hash-fallback-query-argument":t.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":r[7]||(r[7]=i=>t.fields.hashFallbackQueryArgument=i),"hash-fallback-uri-capture":t.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":r[8]||(r[8]=i=>t.fields.hashFallbackUriCapture=i),"hash-on":t.fields.hashOn,"onUpdate:hashOn":r[9]||(r[9]=i=>t.fields.hashOn=i),"hash-on-cookie":t.fields.hashOnCookie,"onUpdate:hashOnCookie":r[10]||(r[10]=i=>t.fields.hashOnCookie=i),"hash-on-cookie-path":t.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":r[11]||(r[11]=i=>t.fields.hashOnCookiePath=i),"hash-on-header":t.fields.hashOnHeader,"onUpdate:hashOnHeader":r[12]||(r[12]=i=>t.fields.hashOnHeader=i),"hash-on-query-argument":t.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":r[13]||(r[13]=i=>t.fields.hashOnQueryArgument=i),"hash-on-uri-capture":t.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":r[14]||(r[14]=i=>t.fields.hashOnUriCapture=i),slots:t.fields.slots,"onUpdate:slots":r[15]||(r[15]=i=>t.fields.slots=i),readonly:t.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(Tt,{"active-health-switch":t.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[r[16]||(r[16]=i=>t.fields.activeHealthSwitch=i),d],"healthchecks-threshold":t.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":r[17]||(r[17]=i=>t.fields.healthchecksThreshold=i),"passive-health-switch":t.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[r[18]||(r[18]=i=>t.fields.passiveHealthSwitch=i),C],readonly:t.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),t.fields.activeHealthSwitch?(e.openBlock(),e.createBlock(Ot,{key:0,concurrency:t.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":r[19]||(r[19]=i=>t.fields.activeHealthCheck.concurrency=i),headers:t.fields.activeHealthCheck.headers,"onUpdate:headers":r[20]||(r[20]=i=>t.fields.activeHealthCheck.headers=i),"http-failures":t.fields.activeHealthCheck.httpFailures,"onUpdate:httpFailures":r[21]||(r[21]=i=>t.fields.activeHealthCheck.httpFailures=i),"http-path":t.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":r[22]||(r[22]=i=>t.fields.activeHealthCheck.httpPath=i),"http-statuses":t.fields.activeHealthCheck.httpStatuses,"onUpdate:httpStatuses":r[23]||(r[23]=i=>t.fields.activeHealthCheck.httpStatuses=i),"https-sni":t.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":r[24]||(r[24]=i=>t.fields.activeHealthCheck.httpsSni=i),interval:t.fields.activeHealthCheck.interval,"onUpdate:interval":r[25]||(r[25]=i=>t.fields.activeHealthCheck.interval=i),successes:t.fields.activeHealthCheck.successes,"onUpdate:successes":r[26]||(r[26]=i=>t.fields.activeHealthCheck.successes=i),"tcp-failures":t.fields.activeHealthCheck.tcpFailures,"onUpdate:tcpFailures":r[27]||(r[27]=i=>t.fields.activeHealthCheck.tcpFailures=i),timeout:t.fields.activeHealthCheck.timeout,"onUpdate:timeout":r[28]||(r[28]=i=>t.fields.activeHealthCheck.timeout=i),type:t.fields.activeHealthCheck.type,"onUpdate:type":r[29]||(r[29]=i=>t.fields.activeHealthCheck.type=i),"unhealthy-http-statuses":t.fields.activeHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":r[30]||(r[30]=i=>t.fields.activeHealthCheck.unhealthyHttpStatuses=i),"unhealthy-interval":t.fields.activeHealthCheck.unhealthyInterval,"onUpdate:unhealthyInterval":r[31]||(r[31]=i=>t.fields.activeHealthCheck.unhealthyInterval=i),"unhealthy-timeouts":t.fields.activeHealthCheck.unhealthyTimeouts,"onUpdate:unhealthyTimeouts":r[32]||(r[32]=i=>t.fields.activeHealthCheck.unhealthyTimeouts=i),"verify-ssl":t.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":r[33]||(r[33]=i=>t.fields.activeHealthCheck.verifySsl=i),config:a.config,readonly:t.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),t.fields.passiveHealthSwitch?(e.openBlock(),e.createBlock(Mt,{key:1,"http-failures":t.fields.passiveHealthCheck.httpFailures,"onUpdate:httpFailures":r[34]||(r[34]=i=>t.fields.passiveHealthCheck.httpFailures=i),"http-statuses":t.fields.passiveHealthCheck.httpStatuses,"onUpdate:httpStatuses":r[35]||(r[35]=i=>t.fields.passiveHealthCheck.httpStatuses=i),successes:t.fields.passiveHealthCheck.successes,"onUpdate:successes":r[36]||(r[36]=i=>t.fields.passiveHealthCheck.successes=i),"tcp-failures":t.fields.passiveHealthCheck.tcpFailures,"onUpdate:tcpFailures":r[37]||(r[37]=i=>t.fields.passiveHealthCheck.tcpFailures=i),timeouts:t.fields.passiveHealthCheck.timeouts,"onUpdate:timeouts":r[38]||(r[38]=i=>t.fields.passiveHealthCheck.timeouts=i),type:t.fields.passiveHealthCheck.type,"onUpdate:type":r[39]||(r[39]=i=>t.fields.passiveHealthCheck.type=i),"unhealthy-http-statuses":t.fields.passiveHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":r[40]||(r[40]=i=>t.fields.passiveHealthCheck.unhealthyHttpStatuses=i),readonly:t.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","entity-type","error-message","fetch-url","form-fields","is-readonly"])]))}}),[["__scopeId","data-v-0669debc"]]),vt={"data-testid":"client_certificate-plain-text"},jt=e.defineComponent({__name:"UpstreamsConfigCard",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||a.app==="konnect"&&!a.controlPlaneId||a.app==="kongManager"&&typeof a.workspace!="string"||!a.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(a){const E=a,{i18n:{t:o},i18nT:s}=X.useI18n(),{getPropValue:n}=p.useHelpers(),g=e.computed(()=>se.form[E.config.app].edit),m=e.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:p.ConfigurationSchemaSection.Basic,tooltip:o("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:p.ConfigurationSchemaSection.Basic},hash_on:{order:7,section:p.ConfigurationSchemaSection.Basic},hash_on_header:{order:8,section:p.ConfigurationSchemaSection.Basic},hash_on_uri_capture:{order:9,section:p.ConfigurationSchemaSection.Basic},hash_on_query_arg:{order:10,section:p.ConfigurationSchemaSection.Basic,label:`${o("upstreams.form.fields.hash_on.label")} ${o("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:p.ConfigurationSchemaSection.Basic},hash_on_cookie_path:{order:12,section:p.ConfigurationSchemaSection.Basic},healthchecks:{order:13,section:p.ConfigurationSchemaSection.Basic,type:p.ConfigurationSchemaType.Json},tags:{order:14,tooltip:o("upstreams.form.hash_tooltips.tags")},hash_fallback:{order:1},hash_fallback_header:{order:2},hash_fallback_query_arg:{order:3,label:`${o("upstreams.form.fields.hash_fallback.label")} ${o("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:o("upstreams.form.hash_tooltips.client_certificate")}});return(q,N)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(p.EntityBaseConfigCard),{config:a.config,"config-card-doc":a.configCardDoc,"config-schema":m.value,"entity-type":e.unref(p.SupportedEntityType).Upstream,"fetch-url":g.value,"hide-title":a.hideTitle,"onFetch:error":N[0]||(N[0]=l=>q.$emit("fetch:error",l)),"onFetch:success":N[1]||(N[1]=l=>q.$emit("fetch:success",l)),onLoading:N[2]||(N[2]=l=>q.$emit("loading",l))},{"name-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":e.withCtx(({row:l})=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(l.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:e.withCtx(()=>N[3]||(N[3]=[e.createElementVNode("code",null,"10",-1)])),max:e.withCtx(()=>N[4]||(N[4]=[e.createElementVNode("code",null,"65536",-1)])),_:1})]),"hash_fallback-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(s),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(o)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:e.withCtx(l=>{var h;return[e.createElementVNode("div",null,[e.createElementVNode("div",vt,[e.createElementVNode("span",null,e.toDisplayString((h=e.unref(n)("rowValue",l))==null?void 0:h.id),1)])])]}),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});Q.TargetForm=Se,Q.TargetsList=yt,Q.UpstreamsConfigCard=jt,Q.UpstreamsForm=Rt,Q.UpstreamsList=ct,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|