@kong-ui-public/entities-upstreams-targets 1.3.1 → 1.3.2

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.
@@ -2965,7 +2965,7 @@ const go = {
2965
2965
  });
2966
2966
  };
2967
2967
  }
2968
- }), Ts = /* @__PURE__ */ be(Eo, [["__scopeId", "data-v-2286e5f2"]]), Lo = { key: 0 }, Vo = /* @__PURE__ */ le({
2968
+ }), Ts = /* @__PURE__ */ be(Eo, [["__scopeId", "data-v-44a90aae"]]), Lo = { key: 0 }, Vo = /* @__PURE__ */ le({
2969
2969
  __name: "EntityBaseTableCell",
2970
2970
  props: {
2971
2971
  keyName: {
@@ -3303,7 +3303,7 @@ const go = {
3303
3303
  }, 8, ["title"]);
3304
3304
  };
3305
3305
  }
3306
- }), As = /* @__PURE__ */ be(Wo, [["__scopeId", "data-v-a598b1d9"]]), Qo = {
3306
+ }), As = /* @__PURE__ */ be(Wo, [["__scopeId", "data-v-2622d034"]]), Qo = {
3307
3307
  key: 0,
3308
3308
  class: "kong-ui-entity-delete-error"
3309
3309
  }, Yo = {
@@ -29,4 +29,4 @@
29
29
  `+e.slice(n,i),n=i+1),c=h;return s+=`
30
30
  `,e.length-n>l&&c>n?s+=e.slice(n,c)+`
31
31
  `+e.slice(c+1):s+=e.slice(n),s.slice(1)}function ds(e){for(var l="",a=0,r,n=0;n<e.length;a>=65536?n+=2:n++)a=Ee(e,n),r=Z[a],!r&&He(a)?(l+=e[n],a>=65536&&(l+=e[n+1])):l+=r||ts(a);return l}function hs(e,l,a){var r="",n=e.tag,i,c,h;for(i=0,c=a.length;i<c;i+=1)h=a[i],e.replacer&&(h=e.replacer.call(a,String(i),h)),(oe(e,l,h,!1,!1)||typeof h>"u"&&oe(e,l,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=n,e.dump="["+r+"]"}function Ea(e,l,a,r){var n="",i=e.tag,c,h,s;for(c=0,h=a.length;c<h;c+=1)s=a[c],e.replacer&&(s=e.replacer.call(a,String(c),s)),(oe(e,l+1,s,!0,!0,!1,!0)||typeof s>"u"&&oe(e,l+1,null,!0,!0,!1,!0))&&((!r||n!=="")&&(n+=it(e,l)),e.dump&&Ie===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=i,e.dump=n||"[]"}function ps(e,l,a){var r="",n=e.tag,i=Object.keys(a),c,h,s,d,u;for(c=0,h=i.length;c<h;c+=1)u="",r!==""&&(u+=", "),e.condenseFlow&&(u+='"'),s=i[c],d=a[s],e.replacer&&(d=e.replacer.call(a,s,d)),oe(e,l,s,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),oe(e,l,d,!1,!1)&&(u+=e.dump,r+=u));e.tag=n,e.dump="{"+r+"}"}function us(e,l,a,r){var n="",i=e.tag,c=Object.keys(a),h,s,d,u,p,o;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new ee("sortKeys must be a boolean or a function");for(h=0,s=c.length;h<s;h+=1)o="",(!r||n!=="")&&(o+=it(e,l)),d=c[h],u=a[d],e.replacer&&(u=e.replacer.call(a,d,u)),oe(e,l+1,d,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&Ie===e.dump.charCodeAt(0)?o+="?":o+="? "),o+=e.dump,p&&(o+=it(e,l)),oe(e,l+1,u,!0,p)&&(e.dump&&Ie===e.dump.charCodeAt(0)?o+=":":o+=": ",o+=e.dump,n+=o));e.tag=i,e.dump=n||"{}"}function Aa(e,l,a){var r,n,i,c,h,s;for(n=a?e.explicitTypes:e.implicitTypes,i=0,c=n.length;i<c;i+=1)if(h=n[i],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof l=="object"&&l instanceof h.instanceOf)&&(!h.predicate||h.predicate(l))){if(a?h.multi&&h.representName?e.tag=h.representName(l):e.tag=h.tag:e.tag="?",h.represent){if(s=e.styleMap[h.tag]||h.defaultStyle,fa.call(h.represent)==="[object Function]")r=h.represent(l,s);else if(ma.call(h.represent,s))r=h.represent[s](l,s);else throw new ee("!<"+h.tag+'> tag resolver accepts not "'+s+'" style');e.dump=r}return!0}return!1}function oe(e,l,a,r,n,i,c){e.tag=null,e.dump=a,Aa(e,a,!1)||Aa(e,a,!0);var h=fa.call(e.dump),s=r,d;r&&(r=e.flowLevel<0||e.flowLevel>l);var u=h==="[object Object]"||h==="[object Array]",p,o;if(u&&(p=e.duplicates.indexOf(a),o=p!==-1),(e.tag!==null&&e.tag!=="?"||o||e.indent!==2&&l>0)&&(n=!1),o&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(u&&o&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),h==="[object Object]")r&&Object.keys(e.dump).length!==0?(us(e,l,e.dump,n),o&&(e.dump="&ref_"+p+e.dump)):(ps(e,l,e.dump),o&&(e.dump="&ref_"+p+" "+e.dump));else if(h==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!c&&l>0?Ea(e,l-1,e.dump,n):Ea(e,l,e.dump,n),o&&(e.dump="&ref_"+p+e.dump)):(hs(e,l,e.dump),o&&(e.dump="&ref_"+p+" "+e.dump));else if(h==="[object String]")e.tag!=="?"&&is(e,e.dump,l,i,s);else{if(h==="[object Undefined]"||e.skipInvalid)return!1;throw new ee("unacceptable kind of an object to dump "+h)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function fs(e,l){var a=[],r=[],n,i;for(dt(e,a,r),n=0,i=r.length;n<i;n+=1)l.duplicates.push(a[r[n]]);l.usedDuplicates=new Array(i)}function dt(e,l,a){var r,n,i;if(e!==null&&typeof e=="object")if(n=l.indexOf(e),n!==-1)a.indexOf(n)===-1&&a.push(n);else if(l.push(e),Array.isArray(e))for(n=0,i=e.length;n<i;n+=1)dt(e[n],l,a);else for(r=Object.keys(e),n=0,i=r.length;n<i;n+=1)dt(e[r[n]],l,a)}function ms(e,l){l=l||{};var a=new ls(l);a.noRefs||fs(e,a);var r=e;return a.replacer&&(r=a.replacer.call({"":r},"",r)),oe(a,0,r,!0,!0)?a.dump+`
32
- `:""}var gs=ms,ys={dump:gs};function ht(e,l){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}var ks=G,bs=Ot,Cs=$t,_s=jt,ws=Lt,Ss=at,xs=ua.load,Ns=ua.loadAll,Vs=ys.dump,Bs=ee,Is={binary:Qt,float:Pt,map:vt,null:Dt,pairs:Gt,set:Zt,timestamp:Jt,bool:Mt,int:Kt,merge:Wt,omap:Yt,seq:Ut,str:qt},Ts=ht("safeLoad","load"),Hs=ht("safeLoadAll","loadAll"),Es=ht("safeDump","dump"),As={Type:ks,Schema:bs,FAILSAFE_SCHEMA:Cs,JSON_SCHEMA:_s,CORE_SCHEMA:ws,DEFAULT_SCHEMA:Ss,load:xs,loadAll:Ns,dump:Vs,YAMLException:Bs,types:Is,safeLoad:Ts,safeLoadAll:Hs,safeDump:Es};const Fs={key:0,class:"config-card-display-form"},Os=["data-testid"],qs={key:0,class:"config-card-prop-section-title"},Us={key:1,class:"config-card-display-json"},vs={key:2,class:"config-card-display-yaml"},$s=le(t.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(e){const l=e,a=t.useSlots(),{i18n:{t:r}}=Y.useI18n(),n=h=>!!(h.tooltip||a[`${h.key}-label-tooltip`]),i=t.ref(""),c=t.ref("");return t.watch(()=>l.format,h=>{h==="json"?i.value=JSON.stringify(l.record,null,2):h==="yaml"&&(c.value=As.dump(l.record))},{immediate:!0}),(h,s)=>{const d=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",Fs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,u=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${u}-props`,class:t.normalizeClass(`config-card-details-${u}-props`),"data-testid":`config-card-details-${u}-props`},[u!=="basic"?(t.openBlock(),t.createElementBlock("div",qs,t.toDisplayString(u==="advanced"?t.unref(r)("baseConfigCard.sections.advanced"):t.unref(r)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[u],p=>(t.openBlock(),t.createBlock(Ge,{key:p.key,item:p},t.createSlots({label:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label`,{row:p},void 0,!0)]),[p.key]:t.withCtx(({rowValue:o})=>[t.renderSlot(h.$slots,p.key,{row:p,rowValue:o},void 0,!0)]),_:2},[n(p)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label-tooltip`,{row:p},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Os))),128))])):t.createCommentVNode("",!0),e.format==="json"?(t.openBlock(),t.createElementBlock("div",Us,[t.createVNode(d,{id:"config-card-codeblock",code:i.value,language:"json",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),e.format==="yaml"?(t.openBlock(),t.createElementBlock("div",vs,[t.createVNode(d,{id:"config-card-codeblock",code:c.value,language:"yaml","show-line-number-links":!0,theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-a58d7adb"]]),Fa="24px",Ds=(e,l)=>{const a=e.__vccOpts||e;for(const[r,n]of l)a[r]=n;return a},Ms=e=>(t.pushScopeId("data-v-817dfcab"),e=e(),t.popScopeId(),e),Ks=["aria-hidden"],Ps={key:0,"data-testid":"kui-icon-svg-title"},js=Ms(()=>t.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),Ls=t.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Fa,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const l=String(e).replace(/px/gi,""),a=Number(l);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const l=e,a=t.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const n=String(l.size).replace(/px/gi,""),i=Number(n);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return Fa}),r=t.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:a.value,lineHeight:"0",width:a.value}));return(n,i)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Ps,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),js],8,Ks))]),_:1},8,["aria-hidden","style"]))}}),Rs=Ds(Ls,[["__scopeId","data-v-817dfcab"]]),zs={"data-testid":"config-card-title"},Js={class:"config-card-actions"},Ws=["href"],Qs={key:2,class:"config-card-details-section"},Ys={key:3,class:"config-card-details-section"},Gs=["data-testid"],Zs={key:0,class:"config-card-prop-section-title"},Xs=le(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(e,{emit:l}){var a;const r=e,n=t.useSlots(),{i18n:{t:i}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{convertKeyToTitle:h}=Y.useStringHelpers(),{axiosInstance:s}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),d=[{label:i("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],u=t.ref("structured"),p=N=>{u.value=N==null?void 0:N.value},o={id:{type:L.ID,label:i("baseConfigCard.commonFields.id_label"),order:0,section:z.Basic},name:{order:1,section:z.Basic},enabled:{type:L.BadgeStatus,order:2,section:z.Basic},updated_at:{type:L.Date,label:i("baseConfigCard.commonFields.updated_at_label"),order:3,section:z.Basic},created_at:{type:L.Date,label:i("baseConfigCard.commonFields.created_at_label"),order:4,section:z.Basic},tags:{type:L.BadgeTag,order:-1,section:z.Basic}},y=t.ref(!1),C=t.ref(!1),m=t.ref(""),f=t.ref(),w=t.computed(()=>{var N,I,_;if(!f.value)return[];const F=[],O=Object.keys(f.value).length;for(const M in f.value){const A=(I=(N=r.configSchema)==null?void 0:N[M])==null?void 0:I.order,U=(_=o[M])==null?void 0:_.order;let K=O;(U||U===0)&&(K=U===-1?O+1:U),A&&(K=A===-1?O+1:A),F.push([M,K])}return F.sort(function(M,A){return M[1]-A[1]}),F.map(M=>{var A,U;const K=M[0],B=(A=f.value)==null?void 0:A[K],q=((U=r.configSchema)==null?void 0:U[K])||{},$=o[K];return{key:K,value:B,hidden:q.hidden||!1,type:q.type??(($==null?void 0:$.type)||L.Text),label:q.label??(($==null?void 0:$.label)||h(K)),tooltip:q.tooltip??(($==null?void 0:$.tooltip)||void 0),section:q.section??(($==null?void 0:$.section)||z.Advanced)}}).filter(M=>!M.hidden&&M.key!==r.pluginConfigKey)}),k=t.computed(()=>{var N,I;if(!f.value||!r.pluginConfigKey)return[];const _=f.value[r.pluginConfigKey]||{},F=Object.keys(_).length,O=[];for(const M in _){const A=(I=(N=r.pluginConfigSchema)==null?void 0:N[M])==null?void 0:I.order,U=_[M];let K=U!=null&&U!==""?F-1:F;A&&(K=A===-1?F+1:A),O.push([M,K])}return O.sort(function(M,A){return M[1]-A[1]}),O.map(M=>{var A;const U=M[0],K=_[U],B=((A=r.pluginConfigSchema)==null?void 0:A[U])||{};return{key:U,value:K,hidden:B.hidden||!1,type:B.type??L.Text,label:B.label??h(U),tooltip:B.tooltip??void 0,section:z.Plugin}}).filter(M=>!M.hidden)}),V=t.computed(()=>{var N,I,_,F;return{basic:(N=w.value)==null?void 0:N.filter(O=>O.section===z.Basic),advanced:(I=w.value)==null?void 0:I.filter(O=>O.section===z.Advanced),plugin:(F=k.value)==null?void 0:F.concat((_=w.value)==null?void 0:_.filter(O=>O.section===z.Plugin))}}),D=t.computed(()=>{const N=[];return V.value.basic.length&&N.push("basic"),V.value.advanced.length&&N.push("advanced"),V.value.plugin.length&&N.push("plugin"),N}),x=N=>!!(N.tooltip||n[`${N.key}-label-tooltip`]),H=t.computed(()=>{var N,I;let _=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,((N=r.config)==null?void 0:N.controlPlaneId)||""):r.config.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,(I=r.config)!=null&&I.workspace?`/${r.config.workspace}`:"")),_=_.replace(/{id}/gi,r.config.entityId),_}),E=N=>{f.value&&N(JSON.stringify(f.value))?l("copy:success",f.value):l("copy:error")};return t.watch(y,N=>{l("loading",N)},{immediate:!0}),t.onBeforeMount(async()=>{C.value=!1,y.value=!0;try{const{data:N}=await s.get(H.value);if(r.dataKey)if(typeof N[r.dataKey]<"u")f.value={...N[r.dataKey]};else throw new Error(i("errors.dataKeyUndefined",{dataKey:r.dataKey}));else f.value={...N};Object.keys(r.configSchema).filter(I=>r.configSchema[I].forceShow).forEach(I=>{f.value&&typeof f.value[I]>"u"&&(f.value[I]=null)}),l("fetch:success",N)}catch(N){const I=c(N);m.value=I.startsWith("code")?i("baseConfigCard.errors.load"):I,C.value=!0,l("fetch:error",N)}finally{y.value=!1}}),(N,I)=>{const _=t.resolveComponent("KLabel"),F=t.resolveComponent("KSelect"),O=t.resolveComponent("KButton"),M=t.resolveComponent("KClipboardProvider"),A=t.resolveComponent("KSkeleton"),U=t.resolveComponent("KEmptyState"),K=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(K,{class:"kong-ui-entity-base-config-card"},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",Js,[t.renderSlot(N.$slots,"actions",{},void 0,!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(_,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(F,{key:1,appearance:"select","data-testid":"select-config-format",items:d,onChange:p})):t.createCommentVNode("",!0),r.config.jsonYamlEnabled&&e.configCardDoc?(t.openBlock(),t.createBlock(O,{key:2,appearance:"btn-link",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(Rs),{size:t.unref(Gr)},null,8,["size"])],8,Ws)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(M,{key:3},{default:t.withCtx(({copyToClipboard:B})=>[!y.value&&!C.value?(t.openBlock(),t.createBlock(O,{key:0,appearance:"btn-link","data-testid":"json-copy-button",onClick:q=>E(B)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:1}))])]),body:t.withCtx(()=>[y.value?(t.openBlock(),t.createBlock(A,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):C.value?(t.openBlock(),t.createBlock(U,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(m.value),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createElementBlock("div",Qs,[t.createVNode($s,{format:u.value,"prop-list-types":D.value,"property-collections":V.value,record:f.value},t.createSlots({_:2},[t.renderList(Object.keys(N.$slots),B=>({name:B,fn:t.withCtx(({row:q,rowValue:$})=>[t.renderSlot(N.$slots,B,{row:q,rowValue:$},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(t.openBlock(),t.createElementBlock("div",Ys,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.value,B=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${B}-props`,class:t.normalizeClass(`config-card-details-${B}-props`),"data-testid":`config-card-details-${B}-props`},[B!=="basic"?(t.openBlock(),t.createElementBlock("div",Zs,t.toDisplayString(B==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(V.value[B],q=>(t.openBlock(),t.createBlock(Ge,{key:q.key,item:q},t.createSlots({label:t.withCtx(()=>[t.renderSlot(N.$slots,`${q.key}-label`,{row:q},void 0,!0)]),[q.key]:t.withCtx(({rowValue:$})=>[t.renderSlot(N.$slots,q.key,{row:q,rowValue:$},void 0,!0)]),_:2},[x(q)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(N.$slots,`${q.key}-label-tooltip`,{row:q},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Gs))),128))]))]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("div",zs,[t.renderSlot(N.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-64349aa2"]]),ei=["onReset","onSubmit"],ti={class:"form-actions","data-testid":"form-actions"},Oa=le(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:l}){var a;const r=e,n=ze.useRouter(),{i18n:{t:i}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{axiosInstance:h}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),s=t.ref(!1),d=t.ref(!1),u=t.ref(""),p=t.computed(()=>r.canSubmit===!1||r.isReadonly),o=t.computed(()=>{var f,w;if(!r.editId)return"";let k=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((f=r.config)==null?void 0:f.controlPlaneId)||""):r.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(w=r.config)!=null&&w.workspace?`/${r.config.workspace}`:"")),k=k.replace(/{id}/gi,r.editId),k}),y=()=>{r.config.cancelRoute?n.push(r.config.cancelRoute):C()},C=()=>{l("cancel")},m=()=>{p.value||l("submit")};return t.watch(()=>s.value,f=>{l("loading",f)},{immediate:!0}),t.onBeforeMount(async()=>{if(r.editId)try{d.value=!1,s.value=!0;const{data:f}=await h.get(o.value);l("fetch:success",f)}catch(f){const w=c(f);u.value=w.startsWith("code")?i("baseForm.errors.edit"):w,d.value=!0,l("fetch:error",f)}finally{s.value=!1}}),(f,w)=>{const k=t.resolveComponent("KSkeleton"),V=t.resolveComponent("KEmptyState"),D=t.resolveComponent("KAlert"),x=t.resolveComponent("KButton"),H=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(H,{class:"kong-ui-entity-base-form"},{body:t.withCtx(()=>[s.value?(t.openBlock(),t.createBlock(k,{key:0,type:"form"})):d.value?(t.openBlock(),t.createBlock(V,{key:1,"cta-text":t.unref(i)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":y,"is-error":!0},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(u.value),1)]),_:1},8,["cta-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:t.withModifiers(C,["prevent"]),onSubmit:t.withModifiers(m,["prevent"])},[t.renderSlot(f.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(D,{key:0,"alert-message":e.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):t.createCommentVNode("",!0),t.createElementVNode("div",ti,[t.renderSlot(f.$slots,"form-actions",{},()=>[t.createVNode(x,{appearance:"outline","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),t.createVNode(x,{appearance:"primary","data-testid":"form-submit",disabled:p.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,ei))]),_:3})}}}),[["__scopeId","data-v-2286e5f2"]]),ai={key:0},li=le(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(e){const l=e,a=t.computed(()=>{var m;return((m=l.rowEl)==null?void 0:m.querySelector(`[data-testid="${l.keyName}"]`))||null}),r=t.computed(()=>{var m;return((m=a.value)==null?void 0:m.querySelector('[role="button"]'))||null}),n=t.computed(()=>{var m,f;const w=(m=l.rowEl)==null?void 0:m.querySelectorAll("td");return w?((f=w[0])==null?void 0:f.getAttribute("data-testid"))===l.keyName:!1});let i;const c=()=>{i&&(i.disconnect(),i=void 0)},h=()=>{var m,f,w;d.value=((m=r.value)==null?void 0:m.getBoundingClientRect().width)||0,u.value=((f=a.value)==null?void 0:f.clientWidth)||0,p.value=((w=s.value)==null?void 0:w.innerText)||""},s=t.ref({}),d=t.ref(0),u=t.ref(0),p=t.ref(""),o=t.computed(()=>[r.value,a.value]),y=t.watch(o,m=>{if(n.value&&(c(),"ResizeObserver"in window&&window)){i=new ResizeObserver(f=>{window.requestAnimationFrame(()=>{!Array.isArray(f)||!f.length||h()})});for(const f of m)f&&i.observe(f)}},{immediate:!0,flush:"post",deep:!0}),C=t.computed(()=>n.value?d.value>u.value:!1);return t.onMounted(()=>{h()}),t.onUnmounted(()=>{y()}),(m,f)=>{const w=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:s,class:"content-wrapper"},[n.value?(t.openBlock(),t.createElementBlock("span",ai,[t.createVNode(w,{disabled:!C.value,label:p.value,"max-width":"300",placement:"bottomStart"},{default:t.withCtx(()=>[t.renderSlot(m.$slots,"default",{},void 0,!0)]),_:3},8,["disabled","label"])])):t.renderSlot(m.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-f8a220e9"]]),ri={class:"toolbar-container"},ni={key:0,class:"toolbar-button-container"},oi=["data-testid"],qa=le(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:String,default:""},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),n=t.computed(()=>a.cacheIdentifier||a.preferencesStorageKey),i=V=>V.hasData||!!a.query,c=t.computed(()=>{const V=[];return Object.keys(a.tableHeaders).forEach(D=>{const x=a.tableHeaders[D];V.push({label:x.label??D,key:D,sortable:x.sortable??!1})}),a.enableEntityActions&&V.push({key:"actions",hideLabel:!0}),V}),h=V=>({"data-rowid":V.id,"data-testid":V.name,...a.rowAttributes(V)}),s=t.ref({}),d=V=>{var D;return(D=s.value)==null?void 0:D.$el.querySelector(`[data-rowid="${V.id}"]`)},u=V=>{const D={"data-testid":V.headerKey,...a.cellAttributes(V)};return V.colIndex===0&&(D.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),D},p=()=>{l("empty-state-cta-clicked"),o()},o=()=>{l("clear-search-input")},y=(V,D)=>{l("click:row",D)},C=V=>{l("sort",V)},{setTablePreferences:m,getTablePreferences:f}=ur(),w=t.computed(()=>{const V=f(a.preferencesStorageKey);return{...a.initialFetcherParams,...V}}),k=V=>{a.preferencesStorageKey&&m(a.preferencesStorageKey,V)};return(V,D)=>{const x=t.resolveComponent("KIcon"),H=t.resolveComponent("KButton"),E=t.resolveComponent("KDropdownMenu"),N=t.resolveComponent("KTable"),I=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(I,{class:"kong-ui-entity-base-table",title:e.title},{body:t.withCtx(()=>[t.createVNode(N,{ref_key:"tableRefs",ref:s,"cache-identifier":n.value,"cell-attrs":u,"disable-pagination-page-jump":e.disablePaginationPageJump,"disable-sorting":e.disableSorting,"empty-state-action-button-icon":e.query?"":"plus","empty-state-action-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?"":e.emptyStateOptions.ctaPath,"empty-state-icon":e.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,"enable-client-sort":e.enableClientSort,"error-state-title":e.errorMessage,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),"has-error":!!e.errorMessage,headers:c.value,"hide-pagination-when-optional":"","initial-fetcher-params":w.value,"is-loading":e.isLoading,"pagination-type":e.paginationType,"row-attrs":h,"search-input":e.query,onKtableEmptyStateCtaClicked:p,"onRow:click":y,onSort:D[0]||(D[0]=_=>C(_)),"onUpdate:tablePreferences":k},t.createSlots({toolbar:t.withCtx(({state:_})=>[t.withDirectives(t.createElementVNode("div",ri,[t.renderSlot(V.$slots,"toolbar-filter",{},void 0,!0),V.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",ni,[t.renderSlot(V.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)],512),[[t.vShow,i(_)]])]),actions:t.withCtx(({row:_,rowKey:F,rowValue:O})=>[t.createElementVNode("div",{class:"actions-container","data-testid":_.name},[t.createVNode(E,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:t.withCtx(()=>[t.renderSlot(V.$slots,"actions",{row:_,rowKey:F,rowValue:O},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(H,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:t.withCtx(()=>[t.createVNode(x,{color:t.unref(Qr),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,oi)]),_:2},[t.renderList(e.tableHeaders,(_,F)=>({name:F,fn:t.withCtx(({row:O,rowKey:M,rowValue:A})=>[t.createVNode(li,{"key-name":String(F),"row-el":d(O)},{default:t.withCtx(()=>[t.renderSlot(V.$slots,F,{row:O,rowKey:M,rowValue:A},()=>[t.createTextVNode(t.toDisplayString(A),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-a598b1d9"]]),si={key:0,class:"kong-ui-entity-delete-error"},ii={key:1,class:"description"},Ua=le(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:l}){const a=e,{i18nT:r}=Y.useI18n(),n=t.computed(()=>a.needConfirm?a.entityName:""),i=()=>{l("cancel")},c=()=>{l("proceed")};return(h,s)=>{const d=t.resolveComponent("KAlert"),u=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(u,{"action-button-text":"Yes, delete","action-pending":e.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":n.value,"is-visible":e.visible,title:e.title,type:"danger",onCanceled:i,onProceed:c},{"body-content":t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",si,[t.createVNode(d,{appearance:"danger"},{alertMessage:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.entityType),1)]),_:2},[a.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),a.description||h.$slots.description?(t.openBlock(),t.createElementBlock("div",ii,[t.renderSlot(h.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(a.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),ci={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},di={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},hi=["fill"],pi={mask:"url(#mask0_180_20349)"},ui=["fill"],fi=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Jr})`}},setup(e){return(l,a)=>(t.openBlock(),t.createElementBlock("svg",ci,[t.createElementVNode("mask",di,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,hi)]),t.createElementVNode("g",pi,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,ui)])]))}}),mi={key:1,class:"kong-ui-entity-filter"},gi={class:"menu-item-title"},yi={class:"menu-item-indicator"},ki={class:"menu-item-body"},bi=["for"],Ci={class:"menu-item-buttons"},_i=le(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),n=t.ref(!1),i=t.ref({}),c=t.computed(()=>{const f=[];return new URLSearchParams(a.modelValue).forEach((w,k)=>{w!==""&&f.push(k)}),f}),h=t.computed(()=>{const f=a.config.fields;return Object.keys(f).filter(w=>f[w].searchable).map(w=>({label:f[w].label||w,value:w}))});t.watch(()=>a.modelValue,f=>{i.value={},new URLSearchParams(f).forEach((w,k)=>{i.value[k]=w})});const s=()=>{n.value=!n.value},d=f=>{l("update:modelValue",f)},u=f=>`filter-${f}`,p=f=>{var w,k;return(((k=(w=a.config.schema)==null?void 0:w[f])==null?void 0:k.values)??[]).map(V=>({value:V,label:V}))},o=f=>{var w,k;return((k=(w=a.config.schema)==null?void 0:w[f])==null?void 0:k.type)??"text"},y=f=>{i.value={...i.value,[f]:""},m()},C=()=>{i.value={},m(!0)},m=(f=!1)=>{const w=Object.keys(i.value).reduce((k,V)=>(i.value[V]&&(k[V]=`${i.value[V]}`),k),{});f&&(n.value=!1),l("update:modelValue",new URLSearchParams(w).toString())};return(f,w)=>{const k=t.resolveComponent("KInput"),V=t.resolveComponent("KButton"),D=t.resolveComponent("KSelect"),x=t.resolveComponent("KMenuItem"),H=t.resolveComponent("KMenu");return e.config.isExactMatch?(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":d},{icon:t.withCtx(()=>[t.createVNode(fi)]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",mi,[t.createVNode(V,{appearance:"btn-link","data-testid":"filter-button",icon:"filter",onClick:s},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(c.value.length>0?`(${c.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:s},null,512),[[t.vShow,n.value]]),t.withDirectives(t.createVNode(H,{class:"kong-ui-entity-filter-menu"},{body:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(E,N)=>(t.openBlock(),t.createBlock(x,{key:E.value,"data-testid":E.value,expandable:"","last-menu-item":N===h.value.length-1},{itemTitle:t.withCtx(()=>[t.createElementVNode("span",gi,[t.createTextVNode(t.toDisplayString(E.label)+" ",1),t.withDirectives(t.createElementVNode("span",yi,null,512),[[t.vShow,c.value.includes(E.value)]])])]),itemBody:t.withCtx(()=>{var I,_;return[t.createElementVNode("div",ki,[t.createElementVNode("label",{class:"menu-item-label",for:u(E.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,bi),((_=(I=e.config.schema)==null?void 0:I[E.value])==null?void 0:_.type)==="select"?(t.openBlock(),t.createBlock(D,{key:0,id:u(E.value),modelValue:i.value[E.value],"onUpdate:modelValue":F=>i.value[E.value]=F,appearance:"select",items:p(E.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(k,{key:1,id:u(E.value),modelValue:i.value[E.value],"onUpdate:modelValue":F=>i.value[E.value]=F,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),size:"small",type:o(E.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),t.createElementVNode("div",Ci,[t.createVNode(V,{appearance:"btn-link","data-testid":"apply-filter",size:"small",onClick:w[0]||(w[0]=F=>m(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(V,{appearance:"btn-link","data-testid":"clear-filter",size:"small",onClick:F=>y(E.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:t.withCtx(()=>[t.createVNode(V,{onClick:C},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})]),_:1},512),[[t.vShow,n.value]])]))}}}),[["__scopeId","data-v-745f38c0"]]),se=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const l=e,a=t.ref(void 0),r=t.computed(()=>a.value===!0||a.value!==void 0&&l.forceShow===!0);return t.watch(()=>l.authFunction,async()=>{a.value=await l.authFunction()},{immediate:!0}),(n,i)=>r.value?t.renderSlot(n.$slots,"default",{key:0,isAllowed:a.value}):t.createCommentVNode("",!0)}}),wi={class:"form-section-wrapper"},Si={key:0,class:"form-section-title"},xi={key:1,class:"form-section-description"},Ni={key:2,class:"form-section-footer"},Vi={class:"form-section-content"},Ae=le(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(e){const l=t.useSlots();return(a,r)=>(t.openBlock(),t.createElementBlock("fieldset",{class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}])},[t.createElementVNode("div",wi,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createElementBlock("h4",Si,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.description||t.unref(l).description?(t.openBlock(),t.createElementBlock("div",xi,[t.renderSlot(a.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(l).footer?(t.openBlock(),t.createElementBlock("div",Ni,[t.renderSlot(a.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Vi,[t.renderSlot(a.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:Ke,useDeleteUrlBuilder:va,useErrors:$a,useFetchUrlBuilder:Dc,useFetcher:Da,useDebouncedFilter:Ma,useStringHelpers:Mc,useHelpers:Bi,useGatewayFeatureSupported:Kc}=Y,Ii={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 Ti(){const e=Ve.createI18n("en-us",Ii);return{i18n:e,i18nT:Ve.i18nTComponent(e)}}function Fe(e){const{replaceId:l=!1}=e,a=t.ref([]);return{addedItems:a,trackNewItems:(n,i)=>{if(i){const c={...n};l&&(c.value=n.label),a.value.push(c)}else a.value=a.value.filter(c=>c.value!==n.value)}}}const Pe=[{label:"100",value:"100"},{label:"101",value:"101"},{label:"102",value:"102"},{label:"103",value:"103"},{label:"200",value:"200"},{label:"201",value:"201"},{label:"202",value:"202"},{label:"203",value:"203"},{label:"204",value:"204"},{label:"205",value:"205"},{label:"206",value:"206"},{label:"207",value:"207"},{label:"208",value:"208"},{label:"226",value:"226"},{label:"300",value:"300"},{label:"301",value:"301"},{label:"302",value:"302"},{label:"303",value:"303"},{label:"304",value:"304"},{label:"305",value:"305"},{label:"306",value:"306"},{label:"307",value:"307"},{label:"308",value:"308"},{label:"400",value:"400"},{label:"401",value:"401"},{label:"402",value:"402"},{label:"403",value:"403"},{label:"404",value:"404"},{label:"405",value:"405"},{label:"406",value:"406"},{label:"407",value:"407"},{label:"408",value:"408"},{label:"409",value:"409"},{label:"410",value:"410"},{label:"411",value:"411"},{label:"412",value:"412"},{label:"413",value:"413"},{label:"414",value:"414"},{label:"415",value:"415"},{label:"416",value:"416"},{label:"417",value:"417"},{label:"418",value:"418"},{label:"419",value:"419"},{label:"420",value:"420"},{label:"421",value:"421"},{label:"422",value:"422"},{label:"423",value:"423"},{label:"424",value:"424"},{label:"425",value:"425"},{label:"426",value:"426"},{label:"428",value:"428"},{label:"429",value:"429"},{label:"430",value:"430"},{label:"431",value:"431"},{label:"440",value:"440"},{label:"444",value:"444"},{label:"449",value:"449"},{label:"450",value:"450"},{label:"451",value:"451"},{label:"460",value:"460"},{label:"463",value:"463"},{label:"494",value:"494"},{label:"495",value:"495"},{label:"496",value:"496"},{label:"497",value:"497"},{label:"498",value:"498"},{label:"499",value:"499"},{label:"500",value:"500"},{label:"501",value:"501"},{label:"502",value:"502"},{label:"503",value:"503"},{label:"504",value:"504"},{label:"505",value:"505"},{label:"506",value:"506"},{label:"507",value:"507"},{label:"508",value:"508"},{label:"509",value:"509"},{label:"510",value:"510"},{label:"511",value:"511"},{label:"520",value:"520"},{label:"521",value:"521"},{label:"522",value:"522"},{label:"523",value:"523"},{label:"524",value:"524"},{label:"525",value:"525"},{label:"526",value:"526"},{label:"527",value:"527"},{label:"529",value:"529"},{label:"530",value:"530"},{label:"561",value:"561"},{label:"598",value:"598"},{label:"599",value:"599"}],pt=10,ut=65536,Hi=0,Ei=65535,Ce=0,_e=255,Ka=0,Pa=255,Ai=0,Fi=65535,ja=0,La=65535,Oi=0,qi=2**31,ft=["200","302"],mt=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],gt=["429","404","500","501","502","503","504","505"],yt=["429","500","503"];function je(){const e=s=>/^\d+$/.test(s),l=(s,d,u)=>{if(e(s)){const p=Number(s);return p>=d&&p<=u}else return!1},a=s=>s.map(d=>Number(d)),r=s=>s.map(d=>d.toString()),n=()=>({name:"",hostHeader:"",clientCertificate:"",tags:"",algorithm:"round-robin",slots:"10000",hashOn:"none",hashFallback:"none",hashOnHeader:"",hashOnCookie:"",hashOnCookiePath:"/",hashOnQueryArgument:"",hashOnUriCapture:"",hashFallbackHeader:"",hashFallbackQueryArgument:"",hashFallbackUriCapture:"",activeHealthSwitch:!1,passiveHealthSwitch:!1,healthchecksThreshold:"0",activeHealthCheck:{type:"http",httpPath:"/",timeout:"1",concurrency:"10",httpsSni:"",verifySsl:!1,headers:[{key:"",values:""}],interval:"0",successes:"5",httpStatuses:ft,unhealthyInterval:"0",httpFailures:"5",tcpFailures:"5",unhealthyHttpStatuses:gt,unhealthyTimeouts:"0"},passiveHealthCheck:{type:"http",successes:"0",httpStatuses:mt,timeouts:"0",httpFailures:"5",unhealthyHttpStatuses:yt,tcpFailures:"5"}});return{isInteger:e,inRange:l,stringToNumberArray:a,numberToStringArray:r,upstreamsResponseToFields:s=>{var u,p,o,y,C,m,f,w,k,V,D,x,H,E,N,I,_,F,O,M,A,U,K,B,q,$,v,S,g,b,P,R,ae,j,W,fe,Oe,Ne,za,Ja,Wa,Qa,Ya,Ga,Za,Xa,el,tl,al,ll,rl,nl,ol,sl,il,cl,dl,hl,pl,ul,fl,ml,gl,yl,kl,bl,Cl,_l,wl,Sl,xl,Nl,Vl,Bl,Il,Tl,Hl,El,Al,Fl,Ol,ql,Ul,vl,$l,Dl,Ml,Kl,Pl,jl,Ll,Rl,zl,Jl,Wl,Ql,Yl,Gl,Zl,Xl,er,tr,ar,lr,rr,nr,or,sr,ir;const d=n();return d.name=s.name||"",d.algorithm=s.algorithm||"round-robin",d.hostHeader=s.host_header||"",d.clientCertificate=s.client_certificate?(u=s.client_certificate)==null?void 0:u.id:"",d.tags=((p=s.tags)==null?void 0:p.join(", "))||"",d.slots=s.slots!==null&&s.slots!==void 0?s.slots.toString():"10000",d.hashOn=s.hash_on||"none",d.hashFallback=s.hash_fallback||"none",d.hashOnHeader=s.hash_on_header||"",d.hashOnCookie=s.hash_on_cookie||"",d.hashOnCookiePath=s.hash_on_cookie_path||"/",d.hashOnQueryArgument=s.hash_on_query_arg||"",d.hashOnUriCapture=s.hash_on_uri_capture||"",d.hashFallbackHeader=s.hash_fallback_header||"",d.hashFallbackQueryArgument=s.hash_fallback_query_arg||"",d.hashFallbackUriCapture=s.hash_fallback_uri_capture||"",d.healthchecksThreshold=s.healthchecks.threshold!==null&&s.healthchecks.threshold!==void 0?s.healthchecks.threshold.toString():"",d.activeHealthSwitch=((y=(o=s.healthchecks.active)==null?void 0:o.healthy)==null?void 0:y.interval)!==0||((m=(C=s.healthchecks.active)==null?void 0:C.unhealthy)==null?void 0:m.interval)!==0,d.activeHealthCheck.type=((f=s.healthchecks.active)==null?void 0:f.type)||"http",d.activeHealthCheck.httpPath=((w=s.healthchecks.active)==null?void 0:w.http_path)||"/",d.activeHealthCheck.timeout=((k=s.healthchecks.active)==null?void 0:k.timeout)!==null&&((V=s.healthchecks.active)==null?void 0:V.timeout)!==void 0?(x=(D=s.healthchecks.active)==null?void 0:D.timeout)==null?void 0:x.toString():"",d.activeHealthCheck.concurrency=((H=s.healthchecks.active)==null?void 0:H.concurrency)!==null&&((E=s.healthchecks.active)==null?void 0:E.concurrency)!==void 0?(I=(N=s.healthchecks.active)==null?void 0:N.concurrency)==null?void 0:I.toString():"",d.activeHealthCheck.httpsSni=((_=s.healthchecks.active)==null?void 0:_.https_sni)||"",d.activeHealthCheck.verifySsl=((F=s.healthchecks.active)==null?void 0:F.https_verify_certificate)||!1,d.activeHealthCheck.headers=(O=s.healthchecks.active)!=null&&O.headers&&Object.entries((M=s.healthchecks.active)==null?void 0:M.headers).length>0?Object.entries((A=s.healthchecks.active)==null?void 0:A.headers).map(([Tc,kt])=>({key:Tc,values:kt==null?void 0:kt.join(", ")})):[{key:"",values:""}],d.activeHealthCheck.interval=((K=(U=s.healthchecks.active)==null?void 0:U.healthy)==null?void 0:K.interval)!==null&&((q=(B=s.healthchecks.active)==null?void 0:B.healthy)==null?void 0:q.interval)!==void 0?(S=(v=($=s.healthchecks.active)==null?void 0:$.healthy)==null?void 0:v.interval)==null?void 0:S.toString():"0",d.activeHealthCheck.interval=((b=(g=s.healthchecks.active)==null?void 0:g.healthy)==null?void 0:b.interval)!==null&&((R=(P=s.healthchecks.active)==null?void 0:P.healthy)==null?void 0:R.interval)!==void 0?(W=(j=(ae=s.healthchecks.active)==null?void 0:ae.healthy)==null?void 0:j.interval)==null?void 0:W.toString():"0",d.activeHealthCheck.successes=((Oe=(fe=s.healthchecks.active)==null?void 0:fe.healthy)==null?void 0:Oe.successes)!==null&&((za=(Ne=s.healthchecks.active)==null?void 0:Ne.healthy)==null?void 0:za.successes)!==void 0?(Qa=(Wa=(Ja=s.healthchecks.active)==null?void 0:Ja.healthy)==null?void 0:Wa.successes)==null?void 0:Qa.toString():"0",d.activeHealthCheck.httpStatuses=(Ga=(Ya=s.healthchecks.active)==null?void 0:Ya.healthy)!=null&&Ga.http_statuses?r(((Xa=(Za=s.healthchecks.active)==null?void 0:Za.healthy)==null?void 0:Xa.http_statuses)||[]):ft,d.activeHealthCheck.unhealthyInterval=((tl=(el=s.healthchecks.active)==null?void 0:el.unhealthy)==null?void 0:tl.interval)!==null&&((ll=(al=s.healthchecks.active)==null?void 0:al.unhealthy)==null?void 0:ll.interval)!==void 0?(ol=(nl=(rl=s.healthchecks.active)==null?void 0:rl.unhealthy)==null?void 0:nl.interval)==null?void 0:ol.toString():"0",d.activeHealthCheck.httpFailures=((il=(sl=s.healthchecks.active)==null?void 0:sl.unhealthy)==null?void 0:il.http_failures)!==null&&((dl=(cl=s.healthchecks.active)==null?void 0:cl.unhealthy)==null?void 0:dl.http_failures)!==void 0?(ul=(pl=(hl=s.healthchecks.active)==null?void 0:hl.unhealthy)==null?void 0:pl.http_failures)==null?void 0:ul.toString():"0",d.activeHealthCheck.unhealthyTimeouts=((ml=(fl=s.healthchecks.active)==null?void 0:fl.unhealthy)==null?void 0:ml.timeouts)!==null&&((yl=(gl=s.healthchecks.active)==null?void 0:gl.unhealthy)==null?void 0:yl.timeouts)!==void 0?(Cl=(bl=(kl=s.healthchecks.active)==null?void 0:kl.unhealthy)==null?void 0:bl.timeouts)==null?void 0:Cl.toString():"0",d.activeHealthCheck.unhealthyHttpStatuses=(wl=(_l=s.healthchecks.active)==null?void 0:_l.unhealthy)!=null&&wl.http_statuses?r(((xl=(Sl=s.healthchecks.active)==null?void 0:Sl.unhealthy)==null?void 0:xl.http_statuses)||[]):gt,d.passiveHealthSwitch=((Vl=(Nl=s.healthchecks.passive)==null?void 0:Nl.healthy)==null?void 0:Vl.successes)!==0||((Il=(Bl=s.healthchecks.passive)==null?void 0:Bl.unhealthy)==null?void 0:Il.timeouts)!==0||((Hl=(Tl=s.healthchecks.passive)==null?void 0:Tl.unhealthy)==null?void 0:Hl.tcp_failures)!==0||((Al=(El=s.healthchecks.passive)==null?void 0:El.unhealthy)==null?void 0:Al.http_failures)!==0,d.passiveHealthCheck.type=((Fl=s.healthchecks.passive)==null?void 0:Fl.type)||"http",d.passiveHealthCheck.successes=((ql=(Ol=s.healthchecks.passive)==null?void 0:Ol.healthy)==null?void 0:ql.successes)!==null&&((vl=(Ul=s.healthchecks.passive)==null?void 0:Ul.healthy)==null?void 0:vl.successes)!==void 0?(Ml=(Dl=($l=s.healthchecks.passive)==null?void 0:$l.healthy)==null?void 0:Dl.successes)==null?void 0:Ml.toString():"0",d.passiveHealthCheck.httpStatuses=(Pl=(Kl=s.healthchecks.passive)==null?void 0:Kl.healthy)!=null&&Pl.http_statuses?r(((Ll=(jl=s.healthchecks.passive)==null?void 0:jl.healthy)==null?void 0:Ll.http_statuses)||[]):mt,d.passiveHealthCheck.timeouts=((zl=(Rl=s.healthchecks.passive)==null?void 0:Rl.unhealthy)==null?void 0:zl.timeouts)!==null&&((Wl=(Jl=s.healthchecks.passive)==null?void 0:Jl.unhealthy)==null?void 0:Wl.timeouts)!==void 0?(Gl=(Yl=(Ql=s.healthchecks.passive)==null?void 0:Ql.unhealthy)==null?void 0:Yl.timeouts)==null?void 0:Gl.toString():"0",d.passiveHealthCheck.tcpFailures=((Xl=(Zl=s.healthchecks.passive)==null?void 0:Zl.unhealthy)==null?void 0:Xl.tcp_failures)!==null&&((tr=(er=s.healthchecks.passive)==null?void 0:er.unhealthy)==null?void 0:tr.tcp_failures)!==void 0?(rr=(lr=(ar=s.healthchecks.passive)==null?void 0:ar.unhealthy)==null?void 0:lr.tcp_failures)==null?void 0:rr.toString():"",d.passiveHealthCheck.unhealthyHttpStatuses=(or=(nr=s.healthchecks.passive)==null?void 0:nr.unhealthy)!=null&&or.http_statuses?r(((ir=(sr=s.healthchecks.passive)==null?void 0:sr.unhealthy)==null?void 0:ir.http_statuses)||[]):yt,d},getDefaultUpstreamFields:n,objectsAreEqual:(s,d)=>{try{return JSON.stringify(s)===JSON.stringify(d)}catch{return!1}},cloneDeep:s=>JSON.parse(JSON.stringify(s))}}const ie={useI18n:Ti,useMultiselectCreation:Fe,useHelpers:je},we="/api/runtime_groups/{controlPlaneId}",Se="/{workspace}",xe={list:{konnect:`${we}/upstreams`,kongManager:`${Se}/upstreams`},form:{konnect:{getServices:`${we}/services`,getCertificates:`${we}/certificates`,validate:`${we}/v1/schemas/json/upstream/validate`,create:`${we}/upstreams`,edit:`${we}/upstreams/{id}`},kongManager:{getServices:`${Se}/services`,getCertificates:`${Se}/certificates`,validate:`${Se}/schemas/upstreams/validate`,create:`${Se}/upstreams`,edit:`${Se}/upstreams/{id}`}}},Lc="",Ui={class:"kong-ui-entities-upstreams-list"},vi={class:"upstream-name"},$i=t.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success"],setup(e,{emit:l}){var K;const a=e,{i18n:{t:r}}=ie.useI18n(),n=ze.useRouter(),{axiosInstance:i}=Ke({headers:(K=a.config)==null?void 0:K.requestHeaders}),c=t.ref(1),h=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),s={name:{label:r("upstreams.list.table_headers.name"),searchable:!0,sortable:!0},slots:{label:r("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:r("upstreams.list.table_headers.tags"),sortable:!1}},d=s,u=t.computed(()=>{var q,$;let B=`${a.config.apiBaseUrl}${xe.list[a.config.app]}`;return a.config.app==="konnect"?B=B.replace(/{controlPlaneId}/gi,((q=a.config)==null?void 0:q.controlPlaneId)||""):a.config.app==="kongManager"&&(B=B.replace(/\/{workspace}/gi,($=a.config)!=null&&$.workspace?`/${a.config.workspace}`:"")),B}),p=t.ref(""),o=t.computed(()=>{const B=a.config.app==="konnect"||a.config.isExactMatch;if(B)return{isExactMatch:B,placeholder:r("upstreams.search.placeholder")};const{name:q,slots:$}=s;return{isExactMatch:B,fields:{name:q,slots:$},schema:a.config.filterSchema}}),{fetcher:y,fetcherState:C}=Da(a.config,u.value),m=()=>{p.value=""},f=()=>{c.value++},w=t.ref(""),k=(B,q)=>{const $=B.id;if(!q($)){l("copy:error",{entity:B,field:"id",message:r("upstreams.errors.copy")});return}l("copy:success",{entity:B,field:"id",message:r("upstreams.copy.success",{val:$})})},V=(B,q)=>{const $=JSON.stringify(B);if(!q($)){l("copy:error",{entity:B,message:r("upstreams.errors.copy")});return}l("copy:success",{entity:B,message:r("upstreams.copy.success_brief")})},D=async B=>{var $;await(($=a.canRetrieve)==null?void 0:$.call(a,B))&&n.push(a.config.getViewRoute(B.id))},x=B=>({label:r("upstreams.actions.view"),to:a.config.getViewRoute(B)}),H=B=>({label:r("upstreams.actions.edit"),to:a.config.getEditRoute(B)}),E=t.ref(void 0),N=t.ref(!1),I=t.ref(!1),_=t.ref(""),F=va(a.config,u.value),O=B=>{E.value=B,N.value=!0},M=()=>{N.value=!1},A=async()=>{var B,q,$;if((B=E.value)!=null&&B.id){I.value=!0;try{await i.delete(F(E.value.id)),I.value=!1,N.value=!1,c.value++,l("delete:success",E.value)}catch(v){_.value=(($=(q=v.response)==null?void 0:q.data)==null?void 0:$.message)||v.message||r("upstreams.errors.delete"),l("error",v)}finally{I.value=!1}}};t.watch(C,B=>{if(B.status===de.Error){w.value=r("upstreams.errors.general"),l("error",B.error);return}w.value=""});const U=t.ref({ctaPath:a.config.createRoute,ctaText:void 0,message:r("upstreams.list.empty_state.description"),title:r("upstreams.title")});return t.onBeforeMount(async()=>{await a.canCreate()&&(U.value.title=r("upstreams.list.empty_state.title"),U.value.ctaText=r("upstreams.actions.create"))}),(B,q)=>{const $=t.resolveComponent("KButton"),v=t.resolveComponent("KBadge"),S=t.resolveComponent("KTruncate"),g=t.resolveComponent("KDropdownItem"),b=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Ui,[t.createVNode(t.unref(qa),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":h.value,"empty-state-options":U.value,"enable-entity-actions":"","error-message":w.value,fetcher:t.unref(y),"fetcher-cache-key":c.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:p.value,"table-headers":t.unref(d),onClearSearchInput:m,"onClick:row":q[1]||(q[1]=P=>D(P)),onSort:f},{"toolbar-filter":t.withCtx(()=>[t.createVNode(t.unref(_i),{modelValue:p.value,"onUpdate:modelValue":q[0]||(q[0]=P=>p.value=P),config:o.value},null,8,["modelValue","config"])]),"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode($,{appearance:"primary","data-testid":"toolbar-add-upstream",icon:"plus",to:e.config.createRoute},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:t.withCtx(({rowValue:P})=>[t.createElementVNode("span",vi,t.toDisplayString(P),1)]),tags:t.withCtx(({rowValue:P})=>[t.createVNode(S,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P,R=>(t.openBlock(),t.createBlock(v,{key:R,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(R),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:P})=>[t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-id",onClick:ae=>k(P,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-json",onClick:ae=>V(P,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canRetrieve(P)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-view","has-divider":"",item:x(P.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(P)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-edit",item:H(P.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(P)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:R=>O(P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),t.createVNode(t.unref(Ua),{"action-pending":I.value,description:t.unref(r)("upstreams.delete.description"),"entity-name":E.value&&(E.value.name||E.value.id),"entity-type":t.unref(Je).Upstream,error:_.value,title:t.unref(r)("upstreams.delete.title"),visible:N.value,onCancel:M,onProceed:A},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Rc="",ce=(e,l)=>{const a=e.__vccOpts||e;for(const[r,n]of l)a[r]=n;return a},Di=ce($i,[["__scopeId","data-v-033bd1ef"]]),Le={list:{konnect:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",kongManager:"/{workspace}/upstreams/{upstreamId}/targets"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",edit:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets/{id}",validate:"/api/runtime_groups/{controlPlaneId}/v1/schemas/json/target/validate"},kongManager:{create:"/{workspace}/upstreams/{upstreamId}/targets",edit:"/{workspace}/upstreams/{upstreamId}/targets/{id}",validate:"/{workspace}/schemas/targets/validate"}}},Mi={class:"kong-ui-entities-target-form"},Ki={class:"target-form-container"},Pi={key:0,class:"target-form-info"},ji=t.defineComponent({__name:"TargetForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(e,{emit:l}){var D;const a=e;t.useCssVars(x=>({"2cc5362c":V.value}));const{i18n:{t:r}}=ie.useI18n(),{getMessageFromError:n}=$a(),{axiosInstance:i}=Ke({headers:(D=a.config)==null?void 0:D.requestHeaders}),c=t.computed(()=>{var x;return Le.form[a.config.app].edit.replace(/{upstreamId}/gi,((x=a.config)==null?void 0:x.upstreamId)||"")}),h=t.computed(()=>a.targetId?re.Edit:re.Create),s=t.computed(()=>h.value===re.Edit?r("targets.form.edit.title"):r("targets.form.create.title")),d=t.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),u=t.reactive({target:"",weight:100,tags:""}),p={target:"",weight:100,tags:""},o=t.computed(()=>{const x=parseInt(d.fields.weight.toString(),10);return x<0||x>65535}),y=t.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(u)&&!!d.fields.target&&!!d.fields.weight&&!o.value),C=x=>{var H;d.fields.target=(x==null?void 0:x.target)||"",d.fields.weight=(x==null?void 0:x.weight)??"",d.fields.tags=((H=x==null?void 0:x.tags)==null?void 0:H.join(", "))||"",Object.assign(u,d.fields)},m=()=>{d.errorMessage="",l("cancel")},f=t.computed(()=>{var H,E;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app].validate}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((H=a.config)==null?void 0:H.controlPlaneId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(E=a.config)!=null&&E.workspace?`/${a.config.workspace}`:"")),x=x.replace(/{id}/gi,a.targetId),x}),w=t.computed(()=>{var H,E,N,I;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app][h.value]}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((H=a.config)==null?void 0:H.controlPlaneId)||"").replace(/{upstreamId}/gi,((E=a.config)==null?void 0:E.upstreamId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(N=a.config)!=null&&N.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((I=a.config)==null?void 0:I.upstreamId)||"")),x=x.replace(/{id}/gi,a.targetId),x}),k=async()=>{var x,H,E,N,I;try{d.isReadonly=!0,d.errorMessage="";const _={target:d.fields.target,weight:parseInt(d.fields.weight),tags:(E=(H=(x=d.fields.tags)==null?void 0:x.split(","))==null?void 0:H.map(O=>String(O||"").trim()))==null?void 0:E.filter(O=>O!==""),upstream:{id:a.config.upstreamId}};let F;if(await i.post(f.value,_),h.value==="create"?F=await i.post(w.value,_):h.value==="edit"&&(F=((N=a.config)==null?void 0:N.app)==="konnect"?await i.put(w.value,_):await i.patch(w.value,_)),F){const{data:O}=F;d.fields.target=(O==null?void 0:O.name)||"",d.fields.weight=(O==null?void 0:O.weight)??100,d.fields.tags=((I=O==null?void 0:O.tags)==null?void 0:I.join(", "))||"",l("update",O),Object.assign(d.fields,p)}}catch(_){d.errorMessage=n(_),l("error",_)}finally{d.isReadonly=!1}},V=t.computed(()=>d.isReadonly?"inline-flex":"none");return t.watch(()=>a.targetId,()=>{Object.assign(d.fields,p)}),(x,H)=>{const E=t.resolveComponent("KInput"),N=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(N,{"action-button-text":t.unref(r)("targets.form.buttons.save"),"action-pending":!y.value||d.isReadonly,"cancel-button-text":t.unref(r)("targets.form.buttons.cancel"),"is-visible":e.isVisible,title:s.value,onCanceled:m,onProceed:k},{"body-content":t.withCtx(()=>[t.createElementVNode("div",Mi,[t.createVNode(t.unref(Oa),{config:e.config,"edit-id":e.targetId,"error-message":d.errorMessage,"fetch-url":c.value,"is-readonly":d.isReadonly,onCancel:m,"onFetch:error":H[3]||(H[3]=I=>x.$emit("error",I)),"onFetch:success":C,onLoading:H[4]||(H[4]=I=>x.$emit("loading",I))},{default:t.withCtx(()=>[t.createElementVNode("div",Ki,[x.$slots.info?(t.openBlock(),t.createElementBlock("div",Pi,[t.renderSlot(x.$slots,"info",{},void 0,!0)])):t.createCommentVNode("",!0),t.createVNode(E,{modelValue:d.fields.target,"onUpdate:modelValue":H[0]||(H[0]=I=>d.fields.target=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:t.unref(r)("targets.form.fields.target.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.target.tooltip")},placeholder:t.unref(r)("targets.form.fields.target.placeholder"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),t.createVNode(E,{modelValue:d.fields.weight,"onUpdate:modelValue":H[1]||(H[1]=I=>d.fields.weight=I),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight","error-message":t.unref(r)("targets.errors.weight"),"has-error":o.value,label:t.unref(r)("targets.form.fields.weight.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.weight.tooltip")},max:"65535",min:"0",readonly:d.isReadonly,required:"",type:"number"},null,8,["modelValue","error-message","has-error","label","label-attributes","readonly"]),t.createVNode(E,{modelValue:d.fields.tags,"onUpdate:modelValue":H[2]||(H[2]=I=>d.fields.tags=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:t.unref(r)("targets.form.fields.tags.help"),label:t.unref(r)("targets.form.fields.tags.label"),placeholder:t.unref(r)("targets.form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])])]),_:3},8,["config","edit-id","error-message","fetch-url","is-readonly"])])]),_:3},8,["action-button-text","action-pending","cancel-button-text","is-visible","title"])}}}),zc="",Ra=ce(ji,[["__scopeId","data-v-77134304"]]),Li={class:"kong-ui-entities-targets-list"},Ri={class:"target-address"},zi=t.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.upstreamId||e.app==="kongManager"&&(typeof e.canMarkHealthy>"u"||typeof e.canMarkUnhealthy>"u"))},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success","health-actions:healthy","health-actions:unhealthy","create:target","update:target"],setup(e,{emit:l}){var $;const a=e,{i18n:{t:r}}=ie.useI18n(),{axiosInstance:n}=Ke({headers:($=a.config)==null?void 0:$.requestHeaders}),i=t.ref(1),c=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),s={target:{label:r("targets.list.table_headers.target_address"),sortable:!0},weight:{label:r("targets.list.table_headers.weight"),sortable:!0},tags:{label:r("targets.list.table_headers.tags"),sortable:!1}},d=t.computed(()=>{var S,g,b,P;let v=`${a.config.apiBaseUrl}${Le.list[a.config.app]}`;return a.config.app==="konnect"?v=v.replace(/{controlPlaneId}/gi,((S=a.config)==null?void 0:S.controlPlaneId)||"").replace(/{upstreamId}/gi,((g=a.config)==null?void 0:g.upstreamId)||""):a.config.app==="kongManager"&&(v=v.replace(/\/{workspace}/gi,(b=a.config)!=null&&b.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((P=a.config)==null?void 0:P.upstreamId)||"")),v}),{fetcher:u,fetcherState:p}=Da(a.config,d.value),o=()=>{i.value++},y=t.ref(""),C=()=>{U.value=!0},m=(v,S)=>{const g=v.id;if(!S(g)){l("copy:error",{entity:v,field:"id",message:r("targets.errors.copy")});return}l("copy:success",{entity:v,field:"id",message:r("targets.copy.success",{val:g})})},f=(v,S)=>{const g=JSON.stringify(v);if(!S(g)){l("copy:error",{entity:v,message:r("targets.errors.copy")});return}l("copy:success",{entity:v,message:r("targets.copy.success_brief")})},w=v=>{A.value=v,U.value=!0},k=v=>a.config.app==="konnect"?!1:a.config.canMarkHealthy(v),V=v=>a.config.app==="konnect"?!1:a.config.canMarkUnhealthy(v),D=t.ref(void 0),x=t.ref(!1),H=t.ref(!1),E=t.ref(""),N=va(a.config,d.value),I=v=>{D.value=v,x.value=!0},_=()=>{x.value=!1},F=async()=>{var v,S,g;if((v=D.value)!=null&&v.id){H.value=!0;try{await n.delete(N(D.value.id)),H.value=!1,x.value=!1,i.value++,l("delete:success",D.value)}catch(b){E.value=((g=(S=b.response)==null?void 0:S.data)==null?void 0:g.message)||b.message||r("targets.errors.delete"),l("error",b)}finally{H.value=!1}}};t.watch(p,v=>{if(v.status===de.Error){y.value=r("targets.errors.general"),l("error",v.error);return}y.value=""});const O=t.ref({ctaText:void 0,message:r("targets.list.empty_state.description"),title:r("targets.title"),...a.config.createRoute&&{ctaPath:a.config.createRoute}});t.onBeforeMount(async()=>{await a.canCreate()&&(O.value.title=r("targets.list.empty_state.title"),O.value.ctaText=r("targets.actions.create"))});const M=t.computed(()=>({app:a.config.app,apiBaseUrl:a.config.apiBaseUrl,upstreamId:a.config.upstreamId,...a.config.app==="konnect"&&{controlPlaneId:a.config.controlPlaneId},...a.config.app==="kongManager"&&{workspace:a.config.workspace,requestHeaders:a.config.requestHeaders}})),A=t.ref(""),U=t.ref(!1),K=v=>{A.value?l("update:target",v):l("create:target",v),B()},B=()=>{q(),i.value++},q=()=>{U.value=!1,A.value=""};return(v,S)=>{const g=t.resolveComponent("KButton"),b=t.resolveComponent("KBadge"),P=t.resolveComponent("KTruncate"),R=t.resolveComponent("KDropdownItem"),ae=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Li,[t.createVNode(t.unref(qa),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":c.value,"empty-state-options":O.value,"enable-entity-actions":"","error-message":y.value,fetcher:t.unref(u),"fetcher-cache-key":i.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":t.unref(s),onEmptyStateCtaClicked:S[1]||(S[1]=()=>a.config.createRoute?void 0:C()),onSort:o},{"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(g,{appearance:"primary","data-testid":"toolbar-new-target",icon:"plus",to:a.config.createRoute?a.config.createRoute:void 0,onClick:S[0]||(S[0]=()=>a.config.createRoute?void 0:C())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),target:t.withCtx(({rowValue:j})=>[t.createElementVNode("span",Ri,t.toDisplayString(j),1)]),tags:t.withCtx(({rowValue:j})=>[t.createVNode(P,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(j,W=>(t.openBlock(),t.createBlock(b,{key:W,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(W),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:j})=>[t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-id",onClick:fe=>m(j,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-json",onClick:fe=>f(j,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(j)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-entity-edit","has-divider":"",onClick:W=>w(j.id)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>k(j)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-healthy",onClick:W=>l("health-actions:healthy",j)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>V(j)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-unhealthy",onClick:W=>l("health-actions:unhealthy",j)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(j)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:W=>I(j)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),t.createVNode(t.unref(Ua),{"action-pending":H.value,description:t.unref(r)("targets.delete.description"),"entity-type":t.unref(Je).Target,error:E.value,"need-confirm":!1,title:t.unref(r)("targets.delete.title"),visible:x.value,onCancel:_,onProceed:F},null,8,["action-pending","description","entity-type","error","title","visible"]),t.createVNode(Ra,{config:M.value,"is-visible":U.value,"target-id":A.value,onCancel:q,onUpdate:K},t.createSlots({_:2},[v.$slots["form-info"]?{name:"info",fn:t.withCtx(()=>[t.renderSlot(v.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),Jc="",Ji=ce(zi,[["__scopeId","data-v-aba40390"]]),Wi={key:1},Qi=t.defineComponent({__name:"UpstreamsFormGeneralInfo",props:{config:{type:Object,required:!0},name:{type:String,required:!0},hostHeader:{type:String,required:!0},clientCertificate:{type:String,required:!0},tags:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:name","update:host-header","update:client-certificate","update:tags"],setup(e,{emit:l}){var _,F,O,M;const a=e,{i18nT:r,i18n:{t:n}}=ie.useI18n(),{debouncedQueryChange:i,loading:c,loadItems:h,results:s,allRecords:d}=Ma(a.config,(F=xe.form[(_=a.config)==null?void 0:_.app])==null?void 0:F.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:u,loading:p,loadItems:o,results:y}=Ma(a.config,(M=xe.form[(O=a.config)==null?void 0:O.app])==null?void 0:M.getCertificates),C=t.ref(""),m=t.computed(()=>{var A;return!!a.name&&!((A=d.value)!=null&&A.some(U=>U.host===a.name))}),f=t.computed(()=>{var U,K,B;const A=m.value&&a.name.includes((U=C.value)==null?void 0:U.toLowerCase());return(B=s.value)==null?void 0:B.map(q=>({label:q.host,value:q.id})).concat(A?[{label:a.name,value:((K=V.value)==null?void 0:K.value)||a.name}]:[])}),w=t.computed(()=>{var A;return(A=y.value)==null?void 0:A.map(U=>({label:U.id,value:U.id}))}),k=t.ref(""),V=t.ref({value:"",label:""}),D=t.computed(()=>{var A,U;return((A=f.value.find(K=>K.value===k.value))==null?void 0:A.label)||((U=V.value)==null?void 0:U.label)}),x=A=>{C.value=A,i(A)},H=A=>{V.value=A},E=()=>{V.value={value:"",label:""}},N=A=>{k.value=A,l("update:name",D.value)},I=t.ref(!1);return t.onBeforeMount(async()=>{var A,U;try{I.value=!0,await h(),a.name&&(k.value=((U=(A=f.value.find(K=>K.label===a.name))==null?void 0:A.value)==null?void 0:U.toString())||a.name),await o()}finally{I.value=!1}}),(A,U)=>{const K=t.resolveComponent("KSkeleton"),B=t.resolveComponent("KSelect"),q=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-general-info",description:t.unref(n)("upstreams.form.general_info.help"),title:t.unref(n)("upstreams.form.general_info.title")},{default:t.withCtx(()=>[I.value?(t.openBlock(),t.createBlock(K,{key:0,type:"form"})):(t.openBlock(),t.createElementBlock("div",Wi,[t.createVNode(B,{appearance:"select",autosuggest:"",class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"",items:f.value,label:t.unref(n)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},loading:t.unref(c),"model-value":k.value,placeholder:t.unref(n)("upstreams.form.fields.name.placeholder"),readonly:e.readonly,required:"",width:"100%","onItem:added":H,"onItem:removed":E,onQueryChange:x,"onUpdate:modelValue":N},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(n)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),t.createVNode(q,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:t.unref(n)("upstreams.form.fields.host_header.label"),"model-value":e.hostHeader,readonly:e.readonly,type:"text","onUpdate:modelValue":U[0]||(U[0]=$=>l("update:host-header",$))},null,8,["label","model-value","readonly"]),t.createVNode(B,{appearance:"select",autosuggest:"",class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"",items:w.value,label:t.unref(n)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:t.unref(n)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"250px"}},loading:t.unref(p),"model-value":e.clientCertificate,placeholder:t.unref(n)("upstreams.form.fields.client_certificate.placeholder"),readonly:e.readonly,width:"100%",onQueryChange:t.unref(u),"onUpdate:modelValue":U[1]||(U[1]=$=>l("update:client-certificate",$))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),t.createVNode(q,{autocomplete:"off","data-testid":"upstreams-form-tags",help:t.unref(n)("upstreams.form.fields.tags.help"),label:t.unref(n)("upstreams.form.fields.tags.label"),"label-attributes":{info:t.unref(n)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250px"}},"model-value":e.tags,placeholder:t.unref(n)("upstreams.form.fields.tags.placeholder"),readonly:e.readonly,type:"text","onUpdate:modelValue":U[2]||(U[2]=$=>l("update:tags",$))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),Wc="",Yi=ce(Qi,[["__scopeId","data-v-02065a3d"]]),Re={upstreamObject:"https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",loadBalancing:"https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"},Gi={class:"fields-group-title"},Zi={class:"fields-group-text"},Xi={class:"fields-group-title"},ec={class:"fields-group-text"},tc=t.defineComponent({__name:"UpstreamsFormLoadBalancing",props:{algorithm:{type:String,required:!0},slots:{type:String,required:!0},hashOn:{type:String,required:!0},hashFallback:{type:String,required:!0},hashOnHeader:{type:String,required:!0},hashOnCookie:{type:String,required:!0},hashOnCookiePath:{type:String,required:!0},hashOnQueryArgument:{type:String,required:!0},hashOnUriCapture:{type:String,required:!0},hashFallbackHeader:{type:String,required:!0},hashFallbackQueryArgument:{type:String,required:!0},hashFallbackUriCapture:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:algorithm","update:slots","update:hash-on","update:hash-fallback","update:hash-on-header","update:hash-on-cookie","update:hash-on-cookie-path","update:hash-on-query-argument","update:hash-on-uri-capture","update:hash-fallback-header","update:hash-fallback-query-argument","update:hash-fallback-uri-capture"],setup(e,{emit:l}){const a=e,{i18nT:r,i18n:{t:n}}=ie.useI18n(),{inRange:i}=je(),c=t.ref([{label:n("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:n("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:n("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:n("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1}]),h=t.ref([{label:n("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:n("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:n("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:n("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:n("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:n("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:n("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:n("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);t.watch(()=>a.hashOn,(u,p)=>{p==="header"&&u!==p&&l("update:hash-on-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-on-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-on-uri-capture",""),(u==="cookie"||u==="none")&&(l("update:hash-fallback","none"),l("update:hash-fallback-header",""),l("update:hash-fallback-query-argument",""),l("update:hash-fallback-uri-capture",""))}),t.watch(()=>a.hashFallback,(u,p)=>{p==="header"&&u!==p&&l("update:hash-fallback-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-fallback-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-fallback-uri-capture","")});const s=t.computed(()=>a.hashOn==="cookie"||a.hashOn==="none"),d=t.computed(()=>a.slots?i(a.slots,pt,ut)?"":n("upstreams.form.errors.in_range"):"");return(u,p)=>{const o=t.resolveComponent("KExternalLink"),y=t.resolveComponent("KSelect"),C=t.resolveComponent("KInput"),m=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-load-balancing",title:t.unref(n)("upstreams.form.load_balancing.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(n)("upstreams.form.load_balancing.help"))+" ",1),t.createVNode(o,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(y,{appearance:"select",class:"algorithm-select",items:c.value,label:t.unref(n)("upstreams.form.fields.algorithm.label"),"model-value":e.algorithm,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[0]||(p[0]=f=>l("update:algorithm",f))},null,8,["items","label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off","data-testid":"upstreams-form-slots","error-message":d.value,"has-error":!!d.value,help:t.unref(n)("upstreams.form.fields.slots.help"),label:t.unref(n)("upstreams.form.fields.slots.label"),max:t.unref(ut),min:t.unref(pt),"model-value":e.slots,readonly:e.readonly,type:"number","onUpdate:modelValue":p[1]||(p[1]=f=>l("update:slots",f))},null,8,["error-message","has-error","help","label","max","min","model-value","readonly"]),t.createVNode(m,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Gi,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_on.label")),1),t.createElementVNode("p",Zi,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_on.help")),1),t.createVNode(y,{appearance:"select",class:"hash-on-select",items:h.value,label:t.unref(n)("upstreams.form.fields.hash_on.label"),"model-value":e.hashOn,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[2]||(p[2]=f=>l("update:hash-on",f))},null,8,["items","label","model-value","readonly"]),e.hashOn==="header"?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:t.unref(n)("upstreams.form.fields.header.label"),"model-value":e.hashOnHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[3]||(p[3]=f=>l("update:hash-on-header",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(n)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[4]||(p[4]=f=>l("update:hash-on-cookie",f))},null,8,["label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(n)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[5]||(p[5]=f=>l("update:hash-on-cookie-path",f))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashOn==="query_arg"?(t.openBlock(),t.createBlock(C,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:t.unref(n)("upstreams.form.fields.query_argument.label"),"model-value":e.hashOnQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[6]||(p[6]=f=>l("update:hash-on-query-argument",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="uri_capture"?(t.openBlock(),t.createBlock(C,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:t.unref(n)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashOnUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[7]||(p[7]=f=>l("update:hash-on-uri-capture",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1}),t.createVNode(m,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Xi,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_fallback.label")),1),t.createElementVNode("p",ec,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_fallback.help")),1),t.createVNode(y,{appearance:"select",class:"hash-fallback-select",disabled:s.value,items:h.value,label:t.unref(n)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},"model-value":e.hashFallback,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[8]||(p[8]=f=>l("update:hash-fallback",f))},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),e.hashFallback==="header"?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:t.unref(n)("upstreams.form.fields.header.label"),"model-value":e.hashFallbackHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[9]||(p[9]=f=>l("update:hash-fallback-header",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(n)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[10]||(p[10]=f=>l("update:hash-on-cookie",f))},null,8,["label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(n)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[11]||(p[11]=f=>l("update:hash-on-cookie-path",f))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashFallback==="query_arg"?(t.openBlock(),t.createBlock(C,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:t.unref(n)("upstreams.form.fields.query_argument.label"),"model-value":e.hashFallbackQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[12]||(p[12]=f=>l("update:hash-fallback-query-argument",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="uri_capture"?(t.openBlock(),t.createBlock(C,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:t.unref(n)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashFallbackUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[13]||(p[13]=f=>l("update:hash-fallback-uri-capture",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])}}}),Qc="",ac=ce(tc,[["__scopeId","data-v-522adce0"]]),lc={class:"fields-group-title"},rc={class:"fields-group-text"},nc={class:"fields-group-title"},oc={class:"fields-group-text"},sc=t.defineComponent({__name:"UpstreamsFormHealthChecks",props:{activeHealthSwitch:{type:Boolean,required:!0},passiveHealthSwitch:{type:Boolean,required:!0},healthchecksThreshold:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:active-health-switch","update:passive-health-switch","update:healthchecks-threshold"],setup(e,{emit:l}){const{i18n:{t:a}}=ie.useI18n();return(r,n)=>{const i=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KInputSwitch"),h=t.resolveComponent("KCard"),s=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-healthchecks",title:t.unref(a)("upstreams.form.health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.health_check.help"))+" ",1),t.createVNode(i,{"hide-icon":"",href:t.unref(Re).loadBalancing},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",lc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.label")),1),t.createElementVNode("p",rc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.help")),1),t.createVNode(c,{class:"active-health-switch","data-testid":"active-health-switch",disabled:e.readonly,"model-value":e.activeHealthSwitch,onChange:n[0]||(n[0]=d=>l("update:active-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",nc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.label")),1),t.createElementVNode("p",oc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.help")),1),t.createVNode(c,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:e.readonly,"model-value":e.passiveHealthSwitch,onChange:n[1]||(n[1]=d=>l("update:passive-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(s,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:t.unref(a)("upstreams.form.fields.healthchecks_threshold.label"),max:t.unref(Ei),min:t.unref(Hi),"model-value":e.healthchecksThreshold,readonly:e.readonly,type:"number","onUpdate:modelValue":n[2]||(n[2]=d=>l("update:healthchecks-threshold",d))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),Yc="",ic=ce(sc,[["__scopeId","data-v-7fda4841"]]),cc={key:2},dc={class:"fields-group-title"},hc={class:"fields-group-text"},pc={class:"fields-group-title"},uc={class:"fields-group-text"},fc=t.defineComponent({__name:"UpstreamsFormActiveHealthCheck",props:{config:{type:Object,required:!0},type:{type:String,required:!0},httpPath:{type:String,required:!0},timeout:{type:String,required:!0},concurrency:{type:String,required:!0},httpsSni:{type:String,required:!0},verifySsl:{type:Boolean,required:!0},headers:{type:Array,required:!0},interval:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},unhealthyInterval:{type:String,required:!0},httpFailures:{type:String,required:!0},tcpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},unhealthyTimeouts:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:http-path","update:timeout","update:concurrency","update:https-sni","update:verify-ssl","update:headers","update:interval","update:successes","update:http-statuses","update:unhealthy-interval","update:http-failures","update:tcp-failures","update:unhealthy-http-statuses","update:unhealthy-timeouts"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),{objectsAreEqual:n}=je(),i=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),c=t.computed(()=>a.type==="https"||a.type==="grpcs"),h=t.computed(()=>a.type==="tcp"),{trackNewItems:s}=Fe({replaceId:!0}),{trackNewItems:d}=Fe({replaceId:!0});t.watch(()=>a.type,(C,m)=>{m==="tcp"&&C!==m&&l("update:tcp-failures","5"),(m==="https"||m==="grpcs")&&C!==m&&(l("update:https-sni",""),l("update:verify-ssl",!1)),m!=="tcp"&&C==="tcp"&&(l("update:http-path","/"),l("update:http-statuses",ft),l("update:unhealthy-http-statuses",gt))});const u=t.ref([{key:"",values:""}]);t.watch(()=>a.headers,C=>{n(u.value,C)||(u.value=[...C])},{immediate:!0,deep:!0});const p=()=>{l("update:headers",u.value)},o=()=>{u.value.push({key:"",values:""}),p()},y=C=>{C===0&&u.value.length===1?u.value[0]={key:"",values:""}:u.value.splice(C,1),p()};return(C,m)=>{const f=t.resolveComponent("KExternalLink"),w=t.resolveComponent("KSelect"),k=t.resolveComponent("KInput"),V=t.resolveComponent("KCheckbox"),D=t.resolveComponent("KLabel"),x=t.resolveComponent("KIcon"),H=t.resolveComponent("KButton"),E=t.resolveComponent("KMultiselect"),N=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-active-healthcheck",title:t.unref(r)("upstreams.form.active_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.active_health_check.help"))+" ",1),t.createVNode(f,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>{var I;return[t.createVNode(w,{appearance:"select",class:"active-healthcheck-type-select",items:i.value,label:t.unref(r)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":m[0]||(m[0]=_=>l("update:type",_))},null,8,["items","label","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:t.unref(r)("upstreams.form.fields.http_path.label"),"model-value":e.httpPath,readonly:e.readonly,type:"text","onUpdate:modelValue":m[1]||(m[1]=_=>l("update:http-path",_))},null,8,["label","model-value","readonly"])),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:t.unref(r)("upstreams.form.fields.timeout.label"),max:t.unref(Fi),min:t.unref(Ai),"model-value":e.timeout,readonly:e.readonly,type:"number","onUpdate:modelValue":m[2]||(m[2]=_=>l("update:timeout",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:t.unref(r)("upstreams.form.fields.concurrency.label"),max:t.unref(qi),min:t.unref(Oi),"model-value":e.concurrency,readonly:e.readonly,type:"number","onUpdate:modelValue":m[3]||(m[3]=_=>l("update:concurrency",_))},null,8,["label","max","min","model-value","readonly"]),c.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:t.unref(r)("upstreams.form.fields.https_sni.label"),"model-value":e.httpsSni,readonly:e.readonly,type:"text","onUpdate:modelValue":m[4]||(m[4]=_=>l("update:https-sni",_))},null,8,["label","model-value","readonly"]),t.createVNode(V,{"data-testid":"active-healthcheck-verify-ssl",disabled:e.readonly,label:t.unref(r)("upstreams.form.fields.verify_ssl.label"),"model-value":e.verifySsl,"onUpdate:modelValue":m[5]||(m[5]=_=>l("update:verify-ssl",_))},null,8,["disabled","label","model-value"])],64)):t.createCommentVNode("",!0),((I=e.config)==null?void 0:I.app)==="kongManager"?(t.openBlock(),t.createElementBlock("div",cc,[t.createVNode(D,{info:t.unref(r)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(_,F)=>(t.openBlock(),t.createElementBlock("div",{key:`${_.header}_${F}`,class:t.normalizeClass(["headers-row",{"margin-top-6":F>0}])},[t.createVNode(k,{modelValue:u.value[F].key,"onUpdate:modelValue":O=>u.value[F].key=O,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${F+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(k,{modelValue:u.value[F].values,"onUpdate:modelValue":O=>u.value[F].values=O,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${F+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(H,{appearance:"btn-link",class:"btn-remove","data-testid":"btn-remove-header",onClick:O=>y(F)},{icon:t.withCtx(()=>[t.createVNode(x,{class:"delete-item",icon:"trash"})]),_:2},1032,["onClick"]),u.value&&F===u.value.length-1?(t.openBlock(),t.createBlock(H,{key:0,appearance:"btn-link",class:"btn-add-header","data-testid":"btn-add-header",onClick:o},{icon:t.withCtx(()=>[t.createVNode(x,{color:"$kui-color-text-primary-strong",icon:"plus",size:"22"})]),_:1})):t.createCommentVNode("",!0)],2))),128))])])):t.createCommentVNode("",!0),t.createVNode(N,null,{body:t.withCtx(()=>[t.createElementVNode("h5",dc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.label")),1),t.createElementVNode("p",hc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.help")),1),t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(La),min:t.unref(ja),"model-value":e.interval,readonly:e.readonly,type:"number","onUpdate:modelValue":m[6]||(m[6]=_=>l("update:interval",_))},null,8,["help","label","max","min","model-value","readonly"]),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":m[7]||(m[7]=_=>l("update:successes",_))},null,8,["label","max","min","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(E,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(Pe),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":m[8]||(m[8]=_=>t.unref(s)(_,!0)),"onItem:removed":m[9]||(m[9]=_=>t.unref(s)(_,!1)),"onUpdate:modelValue":m[10]||(m[10]=_=>l("update:http-statuses",_))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(N,null,{body:t.withCtx(()=>[t.createElementVNode("h5",pc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.label")),1),t.createElementVNode("p",uc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.help")),1),t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(La),min:t.unref(ja),"model-value":e.unhealthyInterval,readonly:e.readonly,type:"number","onUpdate:modelValue":m[11]||(m[11]=_=>l("update:unhealthy-interval",_))},null,8,["help","label","max","min","model-value","readonly"]),h.value?(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":m[12]||(m[12]=_=>l("update:tcp-failures",_))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":m[13]||(m[13]=_=>l("update:http-failures",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(E,{autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(Pe),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":m[14]||(m[14]=_=>t.unref(d)(_,!0)),"onItem:removed":m[15]||(m[15]=_=>t.unref(d)(_,!1)),"onUpdate:modelValue":m[16]||(m[16]=_=>l("update:unhealthy-http-statuses",_))},null,8,["items","label","model-value","readonly"])],64)),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(Pa),min:t.unref(Ka),"model-value":e.unhealthyTimeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":m[17]||(m[17]=_=>l("update:unhealthy-timeouts",_))},null,8,["label","max","min","model-value","readonly"])]),_:1})]}),_:1},8,["title"])}}}),Gc="",mc=ce(fc,[["__scopeId","data-v-18b80e62"]]),gc={class:"fields-group-title"},yc={class:"fields-group-text"},kc={class:"fields-group-title"},bc={class:"fields-group-text"},Cc=t.defineComponent({__name:"UpstreamsFormPassiveHealthCheck",props:{type:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},timeouts:{type:String,required:!0},httpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},tcpFailures:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:successes","update:http-statuses","update:timeouts","update:http-failures","update:unhealthy-http-statuses","update:tcp-failures"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),n=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),i=t.computed(()=>a.type==="tcp"),{trackNewItems:c}=Fe({replaceId:!0}),{trackNewItems:h}=Fe({replaceId:!0});return t.watch(()=>a.type,(s,d)=>{d==="tcp"&&s!==d&&l("update:tcp-failures","5"),d!=="tcp"&&s==="tcp"&&(l("update:http-statuses",mt),l("update:unhealthy-http-statuses",yt))}),(s,d)=>{const u=t.resolveComponent("KExternalLink"),p=t.resolveComponent("KSelect"),o=t.resolveComponent("KInput"),y=t.resolveComponent("KMultiselect"),C=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:t.unref(r)("upstreams.form.passive_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.passive_health_check.help"))+" ",1),t.createVNode(u,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(p,{appearance:"select",class:"passive-healthcheck-type-select",items:n.value,label:t.unref(r)("upstreams.form.fields.passive_health_check_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=m=>l("update:type",m))},null,8,["items","label","model-value","readonly"]),t.createVNode(C,null,{body:t.withCtx(()=>[t.createElementVNode("h5",gc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.label")),1),t.createElementVNode("p",yc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.help")),1),t.createVNode(o,{autocomplete:"off","data-testid":"passive-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":d[1]||(d[1]=m=>l("update:successes",m))},null,8,["label","max","min","model-value","readonly"]),i.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(y,{key:0,class:"margin-top-6 passive-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(Pe),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[2]||(d[2]=m=>t.unref(c)(m,!0)),"onItem:removed":d[3]||(d[3]=m=>t.unref(c)(m,!1)),"onUpdate:modelValue":d[4]||(d[4]=m=>l("update:http-statuses",m))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(C,null,{body:t.withCtx(()=>[t.createElementVNode("h5",kc,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.label")),1),t.createElementVNode("p",bc,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.help")),1),t.createVNode(o,{autocomplete:"off","data-testid":"passive-healthcheck-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(Pa),min:t.unref(Ka),"model-value":e.timeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":d[5]||(d[5]=m=>l("update:timeouts",m))},null,8,["label","max","min","model-value","readonly"]),i.value?(t.openBlock(),t.createBlock(o,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[6]||(d[6]=m=>l("update:tcp-failures",m))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(o,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[7]||(d[7]=m=>l("update:http-failures",m))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(y,{autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(Pe),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[8]||(d[8]=m=>t.unref(h)(m,!0)),"onItem:removed":d[9]||(d[9]=m=>t.unref(h)(m,!1)),"onUpdate:modelValue":d[10]||(d[10]=m=>l("update:unhealthy-http-statuses",m))},null,8,["items","label","model-value","readonly"])],64))]),_:1})]),_:1},8,["title"])}}}),Zc="",_c=ce(Cc,[["__scopeId","data-v-6d6854e3"]]),wc={class:"kong-ui-entities-upstreams-form"},Sc=t.defineComponent({__name:"UpstreamsForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||(e==null?void 0:e.app)==="konnect"&&!(e!=null&&e.controlPlaneId)||(e==null?void 0:e.app)==="kongManager"&&typeof(e==null?void 0:e.workspace)!="string"||!(e!=null&&e.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:l}){var v;const a=e,{inRange:r,stringToNumberArray:n,upstreamsResponseToFields:i,getDefaultUpstreamFields:c,objectsAreEqual:h,cloneDeep:s}=je(),{axiosInstance:d}=Ke({headers:(v=a.config)==null?void 0:v.requestHeaders}),{getMessageFromError:u}=$a(),p=ze.useRouter(),o=t.reactive({fields:c(),readonly:!1,errorMessage:""}),y=t.reactive(c()),C=t.computed(()=>!h(o.fields,y)),m=S=>{o.fields.activeHealthCheck.interval=S?"5":"0",o.fields.activeHealthCheck.successes=S?"5":"0",o.fields.activeHealthCheck.httpFailures=S?"5":"0",o.fields.activeHealthCheck.unhealthyInterval=S?"5":"0"},f=S=>{o.fields.passiveHealthCheck.timeouts=S?"5":"0",o.fields.passiveHealthCheck.successes=S?"80":"0"},w=t.computed(()=>o.fields.slots?r(o.fields.slots,pt,ut):!0),k=t.computed(()=>o.fields.hashOn==="header"?!!o.fields.hashOnHeader:!0),V=t.computed(()=>o.fields.hashOn==="cookie"||o.fields.hashFallback==="cookie"?!!o.fields.hashOnCookie:!0),D=t.computed(()=>o.fields.hashOn==="cookie"||o.fields.hashFallback==="cookie"?!!o.fields.hashOnCookiePath:!0),x=t.computed(()=>o.fields.hashOn==="query_arg"?!!o.fields.hashOnQueryArgument:!0),H=t.computed(()=>o.fields.hashOn==="uri_capture"?!!o.fields.hashOnUriCapture:!0),E=t.computed(()=>o.fields.hashFallback==="header"?!!o.fields.hashFallbackHeader:!0),N=t.computed(()=>o.fields.hashFallback==="query_arg"?!!o.fields.hashFallbackQueryArgument:!0),I=t.computed(()=>o.fields.hashFallback==="uri_capture"?!!o.fields.hashFallbackUriCapture:!0),_=t.computed(()=>!!o.fields.name&&w.value&&k.value&&V.value&&D.value&&x.value&&H.value&&E.value&&N.value&&I.value),F=t.computed(()=>a.upstreamId?re.Edit:re.Create),O=t.computed(()=>{var S,g;return(g=xe.form[(S=a.config)==null?void 0:S.app])==null?void 0:g.edit}),M=S=>{Object.assign(o.fields,i(S)),Object.assign(y,s(o.fields))},A=()=>{var S;p.push(((S=a.config)==null?void 0:S.cancelRoute)||{name:"upstreams-list"})},U=S=>{l("loading",S)},K=S=>{l("error",S)},B=()=>{var g,b,P,R,ae;const S={name:o.fields.name,slots:Number(o.fields.slots),algorithm:o.fields.algorithm,hash_on:o.fields.hashOn,hash_fallback:o.fields.hashFallback,healthchecks:{}};return o.fields.hostHeader&&(S.host_header=o.fields.hostHeader),o.fields.clientCertificate&&(S.client_certificate={id:o.fields.clientCertificate}),o.fields.healthchecksThreshold&&(S.healthchecks.threshold=Number(o.fields.healthchecksThreshold)),o.fields.tags&&(S.tags=(b=(g=o.fields.tags.split(","))==null?void 0:g.map(j=>String(j||"").trim()))==null?void 0:b.filter(j=>j!=="")),o.fields.hashOn==="header"&&(S.hash_on_header=o.fields.hashOnHeader),(o.fields.hashOn==="cookie"||o.fields.hashFallback==="cookie")&&(S.hash_on_cookie=o.fields.hashOnCookie,S.hash_on_cookie_path=o.fields.hashOnCookiePath),o.fields.hashOn==="query_arg"&&(S.hash_on_query_arg=o.fields.hashOnQueryArgument),o.fields.hashOn==="uri_capture"&&(S.hash_on_uri_capture=o.fields.hashOnUriCapture),o.fields.hashFallback==="header"&&(S.hash_fallback_header=o.fields.hashFallbackHeader),o.fields.hashFallback==="query_arg"&&(S.hash_fallback_query_arg=o.fields.hashFallbackQueryArgument),o.fields.hashFallback==="uri_capture"&&(S.hash_fallback_uri_capture=o.fields.hashFallbackUriCapture),o.fields.activeHealthSwitch?(S.healthchecks.active={type:o.fields.activeHealthCheck.type,healthy:{},unhealthy:{}},o.fields.activeHealthCheck.timeout&&(S.healthchecks.active.timeout=Number(o.fields.activeHealthCheck.timeout)),o.fields.activeHealthCheck.concurrency&&(S.healthchecks.active.concurrency=Number(o.fields.activeHealthCheck.concurrency)),o.fields.activeHealthCheck.type!=="tcp"&&o.fields.activeHealthCheck.httpPath&&(S.healthchecks.active.http_path=o.fields.activeHealthCheck.httpPath),((P=a.config)==null?void 0:P.app)==="kongManager"&&(o.fields.activeHealthCheck.headers.length===0?S.healthchecks.active.headers=[]:S.healthchecks.active.headers=o.fields.activeHealthCheck.headers.reduce((j,W)=>{var fe,Oe;return W.key?{...j,[W.key]:(Oe=(fe=W.values.split(","))==null?void 0:fe.map(Ne=>String(Ne||"").trim()))==null?void 0:Oe.filter(Ne=>Ne!=="")}:{...j}},{})),(o.fields.activeHealthCheck.type==="https"||o.fields.activeHealthCheck.type==="grpcs")&&o.fields.activeHealthCheck.httpsSni&&(S.healthchecks.active.https_sni=o.fields.activeHealthCheck.httpsSni),(o.fields.activeHealthCheck.type==="https"||o.fields.activeHealthCheck.type==="grpcs")&&(S.healthchecks.active.https_verify_certificate=o.fields.activeHealthCheck.verifySsl),o.fields.activeHealthCheck.interval&&(S.healthchecks.active.healthy.interval=Number(o.fields.activeHealthCheck.interval)),o.fields.activeHealthCheck.successes&&(S.healthchecks.active.healthy.successes=Number(o.fields.activeHealthCheck.successes)),o.fields.activeHealthCheck.type!=="tcp"&&o.fields.activeHealthCheck.httpStatuses&&(S.healthchecks.active.healthy.http_statuses=n(o.fields.activeHealthCheck.httpStatuses)),o.fields.activeHealthCheck.unhealthyInterval&&(S.healthchecks.active.unhealthy.interval=Number(o.fields.activeHealthCheck.unhealthyInterval)),o.fields.activeHealthCheck.unhealthyTimeouts&&(S.healthchecks.active.unhealthy.timeouts=Number(o.fields.activeHealthCheck.unhealthyTimeouts)),o.fields.activeHealthCheck.type!=="tcp"&&o.fields.activeHealthCheck.unhealthyHttpStatuses&&(S.healthchecks.active.unhealthy.http_statuses=n(o.fields.activeHealthCheck.unhealthyHttpStatuses)),o.fields.activeHealthCheck.type!=="tcp"&&o.fields.activeHealthCheck.httpFailures&&(S.healthchecks.active.unhealthy.http_failures=Number(o.fields.activeHealthCheck.httpFailures)),o.fields.activeHealthCheck.type==="tcp"&&o.fields.activeHealthCheck.tcpFailures&&(S.healthchecks.active.unhealthy.tcp_failures=Number(o.fields.activeHealthCheck.tcpFailures))):((R=a.config)==null?void 0:R.app)==="kongManager"&&F.value===re.Edit&&(S.healthchecks.active={type:o.fields.activeHealthCheck.type,headers:{},healthy:{interval:0},unhealthy:{interval:0}}),o.fields.passiveHealthSwitch?(S.healthchecks.passive={type:o.fields.passiveHealthCheck.type,healthy:{},unhealthy:{}},o.fields.passiveHealthCheck.successes&&(S.healthchecks.passive.healthy.successes=Number(o.fields.passiveHealthCheck.successes)),o.fields.passiveHealthCheck.type!=="tcp"&&o.fields.passiveHealthCheck.httpStatuses&&(S.healthchecks.passive.healthy.http_statuses=n(o.fields.passiveHealthCheck.httpStatuses)),o.fields.passiveHealthCheck.timeouts&&(S.healthchecks.passive.unhealthy.timeouts=Number(o.fields.passiveHealthCheck.timeouts)),o.fields.passiveHealthCheck.type!=="tcp"&&o.fields.passiveHealthCheck.unhealthyHttpStatuses&&(S.healthchecks.passive.unhealthy.http_statuses=n(o.fields.passiveHealthCheck.unhealthyHttpStatuses)),o.fields.passiveHealthCheck.type!=="tcp"&&o.fields.passiveHealthCheck.httpFailures&&(S.healthchecks.passive.unhealthy.http_failures=Number(o.fields.passiveHealthCheck.httpFailures)),o.fields.passiveHealthCheck.type==="tcp"&&o.fields.passiveHealthCheck.tcpFailures&&(S.healthchecks.passive.unhealthy.tcp_failures=Number(o.fields.passiveHealthCheck.tcpFailures))):((ae=a.config)==null?void 0:ae.app)==="kongManager"&&F.value===re.Edit&&(S.healthchecks.passive={type:o.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}),S},q=S=>{var b,P,R,ae,j,W;let g=`${(b=a.config)==null?void 0:b.apiBaseUrl}${xe.form[(P=a.config)==null?void 0:P.app][S]}`;return((R=a.config)==null?void 0:R.app)==="konnect"?g=g.replace(/{controlPlaneId}/gi,((ae=a.config)==null?void 0:ae.controlPlaneId)||""):((j=a.config)==null?void 0:j.app)==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(W=a.config)!=null&&W.workspace?`/${a.config.workspace}`:"")),g=g.replace(/{id}/gi,a.upstreamId),g},$=async()=>{var S;try{o.readonly=!0,await d.post(q("validate"),B());let g;F.value===re.Create?g=await d.post(q("create"),B()):F.value===re.Edit&&(g=((S=a.config)==null?void 0:S.app)==="konnect"?await d.put(q("edit"),B()):await d.patch(q("edit"),B())),l("update",g==null?void 0:g.data)}catch(g){o.errorMessage=u(g),l("error",g)}finally{o.readonly=!1}};return(S,g)=>(t.openBlock(),t.createElementBlock("div",wc,[t.createVNode(t.unref(Oa),{"can-submit":_.value&&C.value,config:e.config,"edit-id":e.upstreamId,"error-message":o.errorMessage,"fetch-url":O.value,"is-readonly":o.readonly,onCancel:A,"onFetch:error":K,"onFetch:success":M,onLoading:U,onSubmit:$},{default:t.withCtx(()=>[t.createVNode(Yi,{"client-certificate":o.fields.clientCertificate,"onUpdate:clientCertificate":g[0]||(g[0]=b=>o.fields.clientCertificate=b),"host-header":o.fields.hostHeader,"onUpdate:hostHeader":g[1]||(g[1]=b=>o.fields.hostHeader=b),name:o.fields.name,"onUpdate:name":g[2]||(g[2]=b=>o.fields.name=b),tags:o.fields.tags,"onUpdate:tags":g[3]||(g[3]=b=>o.fields.tags=b),config:e.config,readonly:o.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),t.createVNode(ac,{algorithm:o.fields.algorithm,"onUpdate:algorithm":g[4]||(g[4]=b=>o.fields.algorithm=b),"hash-fallback":o.fields.hashFallback,"onUpdate:hashFallback":g[5]||(g[5]=b=>o.fields.hashFallback=b),"hash-fallback-header":o.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":g[6]||(g[6]=b=>o.fields.hashFallbackHeader=b),"hash-fallback-query-argument":o.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":g[7]||(g[7]=b=>o.fields.hashFallbackQueryArgument=b),"hash-fallback-uri-capture":o.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":g[8]||(g[8]=b=>o.fields.hashFallbackUriCapture=b),"hash-on":o.fields.hashOn,"onUpdate:hashOn":g[9]||(g[9]=b=>o.fields.hashOn=b),"hash-on-cookie":o.fields.hashOnCookie,"onUpdate:hashOnCookie":g[10]||(g[10]=b=>o.fields.hashOnCookie=b),"hash-on-cookie-path":o.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":g[11]||(g[11]=b=>o.fields.hashOnCookiePath=b),"hash-on-header":o.fields.hashOnHeader,"onUpdate:hashOnHeader":g[12]||(g[12]=b=>o.fields.hashOnHeader=b),"hash-on-query-argument":o.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":g[13]||(g[13]=b=>o.fields.hashOnQueryArgument=b),"hash-on-uri-capture":o.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":g[14]||(g[14]=b=>o.fields.hashOnUriCapture=b),slots:o.fields.slots,"onUpdate:slots":g[15]||(g[15]=b=>o.fields.slots=b),readonly:o.readonly},null,8,["algorithm","hash-fallback","hash-fallback-header","hash-fallback-query-argument","hash-fallback-uri-capture","hash-on","hash-on-cookie","hash-on-cookie-path","hash-on-header","hash-on-query-argument","hash-on-uri-capture","slots","readonly"]),t.createVNode(ic,{"active-health-switch":o.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[g[16]||(g[16]=b=>o.fields.activeHealthSwitch=b),m],"healthchecks-threshold":o.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":g[17]||(g[17]=b=>o.fields.healthchecksThreshold=b),"passive-health-switch":o.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[g[18]||(g[18]=b=>o.fields.passiveHealthSwitch=b),f],readonly:o.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),o.fields.activeHealthSwitch?(t.openBlock(),t.createBlock(mc,{key:0,concurrency:o.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":g[19]||(g[19]=b=>o.fields.activeHealthCheck.concurrency=b),headers:o.fields.activeHealthCheck.headers,"onUpdate:headers":g[20]||(g[20]=b=>o.fields.activeHealthCheck.headers=b),"http-failures":o.fields.activeHealthCheck.httpFailures,"onUpdate:httpFailures":g[21]||(g[21]=b=>o.fields.activeHealthCheck.httpFailures=b),"http-path":o.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":g[22]||(g[22]=b=>o.fields.activeHealthCheck.httpPath=b),"http-statuses":o.fields.activeHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[23]||(g[23]=b=>o.fields.activeHealthCheck.httpStatuses=b),"https-sni":o.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":g[24]||(g[24]=b=>o.fields.activeHealthCheck.httpsSni=b),interval:o.fields.activeHealthCheck.interval,"onUpdate:interval":g[25]||(g[25]=b=>o.fields.activeHealthCheck.interval=b),successes:o.fields.activeHealthCheck.successes,"onUpdate:successes":g[26]||(g[26]=b=>o.fields.activeHealthCheck.successes=b),"tcp-failures":o.fields.activeHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[27]||(g[27]=b=>o.fields.activeHealthCheck.tcpFailures=b),timeout:o.fields.activeHealthCheck.timeout,"onUpdate:timeout":g[28]||(g[28]=b=>o.fields.activeHealthCheck.timeout=b),type:o.fields.activeHealthCheck.type,"onUpdate:type":g[29]||(g[29]=b=>o.fields.activeHealthCheck.type=b),"unhealthy-http-statuses":o.fields.activeHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[30]||(g[30]=b=>o.fields.activeHealthCheck.unhealthyHttpStatuses=b),"unhealthy-interval":o.fields.activeHealthCheck.unhealthyInterval,"onUpdate:unhealthyInterval":g[31]||(g[31]=b=>o.fields.activeHealthCheck.unhealthyInterval=b),"unhealthy-timeouts":o.fields.activeHealthCheck.unhealthyTimeouts,"onUpdate:unhealthyTimeouts":g[32]||(g[32]=b=>o.fields.activeHealthCheck.unhealthyTimeouts=b),"verify-ssl":o.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":g[33]||(g[33]=b=>o.fields.activeHealthCheck.verifySsl=b),config:e.config,readonly:o.readonly},null,8,["concurrency","headers","http-failures","http-path","http-statuses","https-sni","interval","successes","tcp-failures","timeout","type","unhealthy-http-statuses","unhealthy-interval","unhealthy-timeouts","verify-ssl","config","readonly"])):t.createCommentVNode("",!0),o.fields.passiveHealthSwitch?(t.openBlock(),t.createBlock(_c,{key:1,"http-failures":o.fields.passiveHealthCheck.httpFailures,"onUpdate:httpFailures":g[34]||(g[34]=b=>o.fields.passiveHealthCheck.httpFailures=b),"http-statuses":o.fields.passiveHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[35]||(g[35]=b=>o.fields.passiveHealthCheck.httpStatuses=b),successes:o.fields.passiveHealthCheck.successes,"onUpdate:successes":g[36]||(g[36]=b=>o.fields.passiveHealthCheck.successes=b),"tcp-failures":o.fields.passiveHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[37]||(g[37]=b=>o.fields.passiveHealthCheck.tcpFailures=b),timeouts:o.fields.passiveHealthCheck.timeouts,"onUpdate:timeouts":g[38]||(g[38]=b=>o.fields.passiveHealthCheck.timeouts=b),type:o.fields.passiveHealthCheck.type,"onUpdate:type":g[39]||(g[39]=b=>o.fields.passiveHealthCheck.type=b),"unhealthy-http-statuses":o.fields.passiveHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[40]||(g[40]=b=>o.fields.passiveHealthCheck.unhealthyHttpStatuses=b),readonly:o.readonly},null,8,["http-failures","http-statuses","successes","tcp-failures","timeouts","type","unhealthy-http-statuses","readonly"])):t.createCommentVNode("",!0)]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])]))}}),Xc="",xc=ce(Sc,[["__scopeId","data-v-810fb7b7"]]),Nc=t.createElementVNode("code",null,"10",-1),Vc=t.createElementVNode("code",null,"65536",-1),Bc={"data-testid":"client_certificate-plain-text"},Ic=t.defineComponent({__name:"UpstreamsConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e){const l=e,{i18n:{t:a},i18nT:r}=ie.useI18n(),{getPropValue:n}=Bi(),i=t.computed(()=>xe.form[l.config.app].edit),c=t.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:z.Basic,tooltip:a("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:z.Basic},hash_on:{order:7,section:z.Basic},hash_on_header:{order:8,section:z.Basic},hash_on_uri_capture:{order:9,section:z.Basic},hash_on_query_arg:{order:10,section:z.Basic,label:`${a("upstreams.form.fields.hash_on.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:z.Basic},hash_on_cookie_path:{order:12,section:z.Basic},healthchecks:{order:13,section:z.Basic,type:L.Json},tags:{order:14,tooltip:a("upstreams.form.hash_tooltips.tags")},hash_fallback:{order:1},hash_fallback_header:{order:2},hash_fallback_query_arg:{order:3,label:`${a("upstreams.form.fields.hash_fallback.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_fallback_uri_capture:{order:4},host_header:{order:5},use_srv_name:{order:6},client_certificate:{order:7,tooltip:a("upstreams.form.hash_tooltips.client_certificate")}});return(h,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(t.unref(Xs),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":c.value,"fetch-url":i.value,"hide-title":e.hideTitle,"onCopy:success":s[0]||(s[0]=d=>h.$emit("copy:success",d)),"onFetch:error":s[1]||(s[1]=d=>h.$emit("fetch:error",d)),"onFetch:success":s[2]||(s[2]=d=>h.$emit("fetch:success",d)),onLoading:s[3]||(s[3]=d=>h.$emit("loading",d))},{"name-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":t.withCtx(({row:d})=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(d.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:t.withCtx(()=>[Nc]),max:t.withCtx(()=>[Vc]),_:1})]),"hash_fallback-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:t.withCtx(d=>{var u;return[t.createElementVNode("div",null,[t.createElementVNode("div",Bc,[t.createElementVNode("span",null,t.toDisplayString((u=t.unref(n)("rowValue",d))==null?void 0:u.id),1)])])]}),_:1},8,["config","config-card-doc","config-schema","fetch-url","hide-title"])]))}});X.TargetForm=Ra,X.TargetsList=Ji,X.UpstreamsConfigCard=Ic,X.UpstreamsForm=xc,X.UpstreamsList=Di,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
32
+ `:""}var gs=ms,ys={dump:gs};function ht(e,l){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}var ks=G,bs=Ot,Cs=$t,_s=jt,ws=Lt,Ss=at,xs=ua.load,Ns=ua.loadAll,Vs=ys.dump,Bs=ee,Is={binary:Qt,float:Pt,map:vt,null:Dt,pairs:Gt,set:Zt,timestamp:Jt,bool:Mt,int:Kt,merge:Wt,omap:Yt,seq:Ut,str:qt},Ts=ht("safeLoad","load"),Hs=ht("safeLoadAll","loadAll"),Es=ht("safeDump","dump"),As={Type:ks,Schema:bs,FAILSAFE_SCHEMA:Cs,JSON_SCHEMA:_s,CORE_SCHEMA:ws,DEFAULT_SCHEMA:Ss,load:xs,loadAll:Ns,dump:Vs,YAMLException:Bs,types:Is,safeLoad:Ts,safeLoadAll:Hs,safeDump:Es};const Fs={key:0,class:"config-card-display-form"},Os=["data-testid"],qs={key:0,class:"config-card-prop-section-title"},Us={key:1,class:"config-card-display-json"},vs={key:2,class:"config-card-display-yaml"},$s=le(t.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(e){const l=e,a=t.useSlots(),{i18n:{t:r}}=Y.useI18n(),n=h=>!!(h.tooltip||a[`${h.key}-label-tooltip`]),i=t.ref(""),c=t.ref("");return t.watch(()=>l.format,h=>{h==="json"?i.value=JSON.stringify(l.record,null,2):h==="yaml"&&(c.value=As.dump(l.record))},{immediate:!0}),(h,s)=>{const d=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",Fs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,u=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${u}-props`,class:t.normalizeClass(`config-card-details-${u}-props`),"data-testid":`config-card-details-${u}-props`},[u!=="basic"?(t.openBlock(),t.createElementBlock("div",qs,t.toDisplayString(u==="advanced"?t.unref(r)("baseConfigCard.sections.advanced"):t.unref(r)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[u],p=>(t.openBlock(),t.createBlock(Ge,{key:p.key,item:p},t.createSlots({label:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label`,{row:p},void 0,!0)]),[p.key]:t.withCtx(({rowValue:o})=>[t.renderSlot(h.$slots,p.key,{row:p,rowValue:o},void 0,!0)]),_:2},[n(p)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(h.$slots,`${p.key}-label-tooltip`,{row:p},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Os))),128))])):t.createCommentVNode("",!0),e.format==="json"?(t.openBlock(),t.createElementBlock("div",Us,[t.createVNode(d,{id:"config-card-codeblock",code:i.value,language:"json",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),e.format==="yaml"?(t.openBlock(),t.createElementBlock("div",vs,[t.createVNode(d,{id:"config-card-codeblock",code:c.value,language:"yaml","show-line-number-links":!0,theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-a58d7adb"]]),Fa="24px",Ds=(e,l)=>{const a=e.__vccOpts||e;for(const[r,n]of l)a[r]=n;return a},Ms=e=>(t.pushScopeId("data-v-817dfcab"),e=e(),t.popScopeId(),e),Ks=["aria-hidden"],Ps={key:0,"data-testid":"kui-icon-svg-title"},js=Ms(()=>t.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),Ls=t.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Fa,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const l=String(e).replace(/px/gi,""),a=Number(l);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const l=e,a=t.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const n=String(l.size).replace(/px/gi,""),i=Number(n);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return Fa}),r=t.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:a.value,lineHeight:"0",width:a.value}));return(n,i)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(t.openBlock(),t.createElementBlock("title",Ps,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),js],8,Ks))]),_:1},8,["aria-hidden","style"]))}}),Rs=Ds(Ls,[["__scopeId","data-v-817dfcab"]]),zs={"data-testid":"config-card-title"},Js={class:"config-card-actions"},Ws=["href"],Qs={key:2,class:"config-card-details-section"},Ys={key:3,class:"config-card-details-section"},Gs=["data-testid"],Zs={key:0,class:"config-card-prop-section-title"},Xs=le(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(e,{emit:l}){var a;const r=e,n=t.useSlots(),{i18n:{t:i}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{convertKeyToTitle:h}=Y.useStringHelpers(),{axiosInstance:s}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),d=[{label:i("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],u=t.ref("structured"),p=N=>{u.value=N==null?void 0:N.value},o={id:{type:L.ID,label:i("baseConfigCard.commonFields.id_label"),order:0,section:z.Basic},name:{order:1,section:z.Basic},enabled:{type:L.BadgeStatus,order:2,section:z.Basic},updated_at:{type:L.Date,label:i("baseConfigCard.commonFields.updated_at_label"),order:3,section:z.Basic},created_at:{type:L.Date,label:i("baseConfigCard.commonFields.created_at_label"),order:4,section:z.Basic},tags:{type:L.BadgeTag,order:-1,section:z.Basic}},y=t.ref(!1),C=t.ref(!1),m=t.ref(""),f=t.ref(),w=t.computed(()=>{var N,I,_;if(!f.value)return[];const F=[],O=Object.keys(f.value).length;for(const M in f.value){const A=(I=(N=r.configSchema)==null?void 0:N[M])==null?void 0:I.order,U=(_=o[M])==null?void 0:_.order;let K=O;(U||U===0)&&(K=U===-1?O+1:U),A&&(K=A===-1?O+1:A),F.push([M,K])}return F.sort(function(M,A){return M[1]-A[1]}),F.map(M=>{var A,U;const K=M[0],B=(A=f.value)==null?void 0:A[K],q=((U=r.configSchema)==null?void 0:U[K])||{},$=o[K];return{key:K,value:B,hidden:q.hidden||!1,type:q.type??(($==null?void 0:$.type)||L.Text),label:q.label??(($==null?void 0:$.label)||h(K)),tooltip:q.tooltip??(($==null?void 0:$.tooltip)||void 0),section:q.section??(($==null?void 0:$.section)||z.Advanced)}}).filter(M=>!M.hidden&&M.key!==r.pluginConfigKey)}),k=t.computed(()=>{var N,I;if(!f.value||!r.pluginConfigKey)return[];const _=f.value[r.pluginConfigKey]||{},F=Object.keys(_).length,O=[];for(const M in _){const A=(I=(N=r.pluginConfigSchema)==null?void 0:N[M])==null?void 0:I.order,U=_[M];let K=U!=null&&U!==""?F-1:F;A&&(K=A===-1?F+1:A),O.push([M,K])}return O.sort(function(M,A){return M[1]-A[1]}),O.map(M=>{var A;const U=M[0],K=_[U],B=((A=r.pluginConfigSchema)==null?void 0:A[U])||{};return{key:U,value:K,hidden:B.hidden||!1,type:B.type??L.Text,label:B.label??h(U),tooltip:B.tooltip??void 0,section:z.Plugin}}).filter(M=>!M.hidden)}),V=t.computed(()=>{var N,I,_,F;return{basic:(N=w.value)==null?void 0:N.filter(O=>O.section===z.Basic),advanced:(I=w.value)==null?void 0:I.filter(O=>O.section===z.Advanced),plugin:(F=k.value)==null?void 0:F.concat((_=w.value)==null?void 0:_.filter(O=>O.section===z.Plugin))}}),D=t.computed(()=>{const N=[];return V.value.basic.length&&N.push("basic"),V.value.advanced.length&&N.push("advanced"),V.value.plugin.length&&N.push("plugin"),N}),x=N=>!!(N.tooltip||n[`${N.key}-label-tooltip`]),H=t.computed(()=>{var N,I;let _=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,((N=r.config)==null?void 0:N.controlPlaneId)||""):r.config.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,(I=r.config)!=null&&I.workspace?`/${r.config.workspace}`:"")),_=_.replace(/{id}/gi,r.config.entityId),_}),E=N=>{f.value&&N(JSON.stringify(f.value))?l("copy:success",f.value):l("copy:error")};return t.watch(y,N=>{l("loading",N)},{immediate:!0}),t.onBeforeMount(async()=>{C.value=!1,y.value=!0;try{const{data:N}=await s.get(H.value);if(r.dataKey)if(typeof N[r.dataKey]<"u")f.value={...N[r.dataKey]};else throw new Error(i("errors.dataKeyUndefined",{dataKey:r.dataKey}));else f.value={...N};Object.keys(r.configSchema).filter(I=>r.configSchema[I].forceShow).forEach(I=>{f.value&&typeof f.value[I]>"u"&&(f.value[I]=null)}),l("fetch:success",N)}catch(N){const I=c(N);m.value=I.startsWith("code")?i("baseConfigCard.errors.load"):I,C.value=!0,l("fetch:error",N)}finally{y.value=!1}}),(N,I)=>{const _=t.resolveComponent("KLabel"),F=t.resolveComponent("KSelect"),O=t.resolveComponent("KButton"),M=t.resolveComponent("KClipboardProvider"),A=t.resolveComponent("KSkeleton"),U=t.resolveComponent("KEmptyState"),K=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(K,{class:"kong-ui-entity-base-config-card"},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",Js,[t.renderSlot(N.$slots,"actions",{},void 0,!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(_,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createBlock(F,{key:1,appearance:"select","data-testid":"select-config-format",items:d,onChange:p})):t.createCommentVNode("",!0),r.config.jsonYamlEnabled&&e.configCardDoc?(t.openBlock(),t.createBlock(O,{key:2,appearance:"btn-link",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(Rs),{size:t.unref(Gr)},null,8,["size"])],8,Ws)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(M,{key:3},{default:t.withCtx(({copyToClipboard:B})=>[!y.value&&!C.value?(t.openBlock(),t.createBlock(O,{key:0,appearance:"btn-link","data-testid":"json-copy-button",onClick:q=>E(B)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:1}))])]),body:t.withCtx(()=>[y.value?(t.openBlock(),t.createBlock(A,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):C.value?(t.openBlock(),t.createBlock(U,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(m.value),1)]),_:1})):t.createCommentVNode("",!0),e.config.jsonYamlEnabled?(t.openBlock(),t.createElementBlock("div",Qs,[t.createVNode($s,{format:u.value,"prop-list-types":D.value,"property-collections":V.value,record:f.value},t.createSlots({_:2},[t.renderList(Object.keys(N.$slots),B=>({name:B,fn:t.withCtx(({row:q,rowValue:$})=>[t.renderSlot(N.$slots,B,{row:q,rowValue:$},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(t.openBlock(),t.createElementBlock("div",Ys,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.value,B=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${B}-props`,class:t.normalizeClass(`config-card-details-${B}-props`),"data-testid":`config-card-details-${B}-props`},[B!=="basic"?(t.openBlock(),t.createElementBlock("div",Zs,t.toDisplayString(B==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(V.value[B],q=>(t.openBlock(),t.createBlock(Ge,{key:q.key,item:q},t.createSlots({label:t.withCtx(()=>[t.renderSlot(N.$slots,`${q.key}-label`,{row:q},void 0,!0)]),[q.key]:t.withCtx(({rowValue:$})=>[t.renderSlot(N.$slots,q.key,{row:q,rowValue:$},void 0,!0)]),_:2},[x(q)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(N.$slots,`${q.key}-label-tooltip`,{row:q},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Gs))),128))]))]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("div",zs,[t.renderSlot(N.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-64349aa2"]]),ei=["onReset","onSubmit"],ti={class:"form-actions","data-testid":"form-actions"},Oa=le(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:l}){var a;const r=e,n=ze.useRouter(),{i18n:{t:i}}=Y.useI18n(),{getMessageFromError:c}=Y.useErrors(),{axiosInstance:h}=Y.useAxios({headers:(a=r.config)==null?void 0:a.requestHeaders}),s=t.ref(!1),d=t.ref(!1),u=t.ref(""),p=t.computed(()=>r.canSubmit===!1||r.isReadonly),o=t.computed(()=>{var f,w;if(!r.editId)return"";let k=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((f=r.config)==null?void 0:f.controlPlaneId)||""):r.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(w=r.config)!=null&&w.workspace?`/${r.config.workspace}`:"")),k=k.replace(/{id}/gi,r.editId),k}),y=()=>{r.config.cancelRoute?n.push(r.config.cancelRoute):C()},C=()=>{l("cancel")},m=()=>{p.value||l("submit")};return t.watch(()=>s.value,f=>{l("loading",f)},{immediate:!0}),t.onBeforeMount(async()=>{if(r.editId)try{d.value=!1,s.value=!0;const{data:f}=await h.get(o.value);l("fetch:success",f)}catch(f){const w=c(f);u.value=w.startsWith("code")?i("baseForm.errors.edit"):w,d.value=!0,l("fetch:error",f)}finally{s.value=!1}}),(f,w)=>{const k=t.resolveComponent("KSkeleton"),V=t.resolveComponent("KEmptyState"),D=t.resolveComponent("KAlert"),x=t.resolveComponent("KButton"),H=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(H,{class:"kong-ui-entity-base-form"},{body:t.withCtx(()=>[s.value?(t.openBlock(),t.createBlock(k,{key:0,type:"form"})):d.value?(t.openBlock(),t.createBlock(V,{key:1,"cta-text":t.unref(i)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":y,"is-error":!0},{message:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(u.value),1)]),_:1},8,["cta-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:t.withModifiers(C,["prevent"]),onSubmit:t.withModifiers(m,["prevent"])},[t.renderSlot(f.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(D,{key:0,"alert-message":e.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):t.createCommentVNode("",!0),t.createElementVNode("div",ti,[t.renderSlot(f.$slots,"form-actions",{},()=>[t.createVNode(x,{appearance:"outline","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),t.createVNode(x,{appearance:"primary","data-testid":"form-submit",disabled:p.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,ei))]),_:3})}}}),[["__scopeId","data-v-44a90aae"]]),ai={key:0},li=le(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(e){const l=e,a=t.computed(()=>{var m;return((m=l.rowEl)==null?void 0:m.querySelector(`[data-testid="${l.keyName}"]`))||null}),r=t.computed(()=>{var m;return((m=a.value)==null?void 0:m.querySelector('[role="button"]'))||null}),n=t.computed(()=>{var m,f;const w=(m=l.rowEl)==null?void 0:m.querySelectorAll("td");return w?((f=w[0])==null?void 0:f.getAttribute("data-testid"))===l.keyName:!1});let i;const c=()=>{i&&(i.disconnect(),i=void 0)},h=()=>{var m,f,w;d.value=((m=r.value)==null?void 0:m.getBoundingClientRect().width)||0,u.value=((f=a.value)==null?void 0:f.clientWidth)||0,p.value=((w=s.value)==null?void 0:w.innerText)||""},s=t.ref({}),d=t.ref(0),u=t.ref(0),p=t.ref(""),o=t.computed(()=>[r.value,a.value]),y=t.watch(o,m=>{if(n.value&&(c(),"ResizeObserver"in window&&window)){i=new ResizeObserver(f=>{window.requestAnimationFrame(()=>{!Array.isArray(f)||!f.length||h()})});for(const f of m)f&&i.observe(f)}},{immediate:!0,flush:"post",deep:!0}),C=t.computed(()=>n.value?d.value>u.value:!1);return t.onMounted(()=>{h()}),t.onUnmounted(()=>{y()}),(m,f)=>{const w=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:s,class:"content-wrapper"},[n.value?(t.openBlock(),t.createElementBlock("span",ai,[t.createVNode(w,{disabled:!C.value,label:p.value,"max-width":"300",placement:"bottomStart"},{default:t.withCtx(()=>[t.renderSlot(m.$slots,"default",{},void 0,!0)]),_:3},8,["disabled","label"])])):t.renderSlot(m.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-f8a220e9"]]),ri={class:"toolbar-container"},ni={key:0,class:"toolbar-button-container"},oi=["data-testid"],qa=le(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:String,default:""},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),n=t.computed(()=>a.cacheIdentifier||a.preferencesStorageKey),i=V=>V.hasData||!!a.query,c=t.computed(()=>{const V=[];return Object.keys(a.tableHeaders).forEach(D=>{const x=a.tableHeaders[D];V.push({label:x.label??D,key:D,sortable:x.sortable??!1})}),a.enableEntityActions&&V.push({key:"actions",hideLabel:!0}),V}),h=V=>({"data-rowid":V.id,"data-testid":V.name,...a.rowAttributes(V)}),s=t.ref({}),d=V=>{var D;return(D=s.value)==null?void 0:D.$el.querySelector(`[data-rowid="${V.id}"]`)},u=V=>{const D={"data-testid":V.headerKey,...a.cellAttributes(V)};return V.colIndex===0&&(D.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),D},p=()=>{l("empty-state-cta-clicked"),o()},o=()=>{l("clear-search-input")},y=(V,D)=>{l("click:row",D)},C=V=>{l("sort",V)},{setTablePreferences:m,getTablePreferences:f}=ur(),w=t.computed(()=>{const V=f(a.preferencesStorageKey);return{...a.initialFetcherParams,...V}}),k=V=>{a.preferencesStorageKey&&m(a.preferencesStorageKey,V)};return(V,D)=>{const x=t.resolveComponent("KIcon"),H=t.resolveComponent("KButton"),E=t.resolveComponent("KDropdownMenu"),N=t.resolveComponent("KTable"),I=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(I,{class:"kong-ui-entity-base-table",title:e.title},{body:t.withCtx(()=>[t.createVNode(N,{ref_key:"tableRefs",ref:s,"cache-identifier":n.value,"cell-attrs":u,"disable-pagination-page-jump":e.disablePaginationPageJump,"disable-sorting":e.disableSorting,"empty-state-action-button-icon":e.query?"":"plus","empty-state-action-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?"":e.emptyStateOptions.ctaPath,"empty-state-icon":e.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(r)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,"enable-client-sort":e.enableClientSort,"error-state-title":e.errorMessage,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),"has-error":!!e.errorMessage,headers:c.value,"hide-pagination-when-optional":"","initial-fetcher-params":w.value,"is-loading":e.isLoading,"pagination-type":e.paginationType,"row-attrs":h,"search-input":e.query,onKtableEmptyStateCtaClicked:p,"onRow:click":y,onSort:D[0]||(D[0]=_=>C(_)),"onUpdate:tablePreferences":k},t.createSlots({toolbar:t.withCtx(({state:_})=>[t.withDirectives(t.createElementVNode("div",ri,[t.renderSlot(V.$slots,"toolbar-filter",{},void 0,!0),V.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",ni,[t.renderSlot(V.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)],512),[[t.vShow,i(_)]])]),actions:t.withCtx(({row:_,rowKey:F,rowValue:O})=>[t.createElementVNode("div",{class:"actions-container","data-testid":_.name},[t.createVNode(E,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:t.withCtx(()=>[t.renderSlot(V.$slots,"actions",{row:_,rowKey:F,rowValue:O},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(H,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:t.withCtx(()=>[t.createVNode(x,{color:t.unref(Qr),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,oi)]),_:2},[t.renderList(e.tableHeaders,(_,F)=>({name:F,fn:t.withCtx(({row:O,rowKey:M,rowValue:A})=>[t.createVNode(li,{"key-name":String(F),"row-el":d(O)},{default:t.withCtx(()=>[t.renderSlot(V.$slots,F,{row:O,rowKey:M,rowValue:A},()=>[t.createTextVNode(t.toDisplayString(A),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-2622d034"]]),si={key:0,class:"kong-ui-entity-delete-error"},ii={key:1,class:"description"},Ua=le(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:l}){const a=e,{i18nT:r}=Y.useI18n(),n=t.computed(()=>a.needConfirm?a.entityName:""),i=()=>{l("cancel")},c=()=>{l("proceed")};return(h,s)=>{const d=t.resolveComponent("KAlert"),u=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(u,{"action-button-text":"Yes, delete","action-pending":e.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":n.value,"is-visible":e.visible,title:e.title,type:"danger",onCanceled:i,onProceed:c},{"body-content":t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",si,[t.createVNode(d,{appearance:"danger"},{alertMessage:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.entityType),1)]),_:2},[a.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),a.description||h.$slots.description?(t.openBlock(),t.createElementBlock("div",ii,[t.renderSlot(h.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(a.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),ci={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},di={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},hi=["fill"],pi={mask:"url(#mask0_180_20349)"},ui=["fill"],fi=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Jr})`}},setup(e){return(l,a)=>(t.openBlock(),t.createElementBlock("svg",ci,[t.createElementVNode("mask",di,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,hi)]),t.createElementVNode("g",pi,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,ui)])]))}}),mi={key:1,class:"kong-ui-entity-filter"},gi={class:"menu-item-title"},yi={class:"menu-item-indicator"},ki={class:"menu-item-body"},bi=["for"],Ci={class:"menu-item-buttons"},_i=le(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=Y.useI18n(),n=t.ref(!1),i=t.ref({}),c=t.computed(()=>{const f=[];return new URLSearchParams(a.modelValue).forEach((w,k)=>{w!==""&&f.push(k)}),f}),h=t.computed(()=>{const f=a.config.fields;return Object.keys(f).filter(w=>f[w].searchable).map(w=>({label:f[w].label||w,value:w}))});t.watch(()=>a.modelValue,f=>{i.value={},new URLSearchParams(f).forEach((w,k)=>{i.value[k]=w})});const s=()=>{n.value=!n.value},d=f=>{l("update:modelValue",f)},u=f=>`filter-${f}`,p=f=>{var w,k;return(((k=(w=a.config.schema)==null?void 0:w[f])==null?void 0:k.values)??[]).map(V=>({value:V,label:V}))},o=f=>{var w,k;return((k=(w=a.config.schema)==null?void 0:w[f])==null?void 0:k.type)??"text"},y=f=>{i.value={...i.value,[f]:""},m()},C=()=>{i.value={},m(!0)},m=(f=!1)=>{const w=Object.keys(i.value).reduce((k,V)=>(i.value[V]&&(k[V]=`${i.value[V]}`),k),{});f&&(n.value=!1),l("update:modelValue",new URLSearchParams(w).toString())};return(f,w)=>{const k=t.resolveComponent("KInput"),V=t.resolveComponent("KButton"),D=t.resolveComponent("KSelect"),x=t.resolveComponent("KMenuItem"),H=t.resolveComponent("KMenu");return e.config.isExactMatch?(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":d},{icon:t.withCtx(()=>[t.createVNode(fi)]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",mi,[t.createVNode(V,{appearance:"btn-link","data-testid":"filter-button",icon:"filter",onClick:s},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(c.value.length>0?`(${c.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:s},null,512),[[t.vShow,n.value]]),t.withDirectives(t.createVNode(H,{class:"kong-ui-entity-filter-menu"},{body:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(E,N)=>(t.openBlock(),t.createBlock(x,{key:E.value,"data-testid":E.value,expandable:"","last-menu-item":N===h.value.length-1},{itemTitle:t.withCtx(()=>[t.createElementVNode("span",gi,[t.createTextVNode(t.toDisplayString(E.label)+" ",1),t.withDirectives(t.createElementVNode("span",yi,null,512),[[t.vShow,c.value.includes(E.value)]])])]),itemBody:t.withCtx(()=>{var I,_;return[t.createElementVNode("div",ki,[t.createElementVNode("label",{class:"menu-item-label",for:u(E.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,bi),((_=(I=e.config.schema)==null?void 0:I[E.value])==null?void 0:_.type)==="select"?(t.openBlock(),t.createBlock(D,{key:0,id:u(E.value),modelValue:i.value[E.value],"onUpdate:modelValue":F=>i.value[E.value]=F,appearance:"select",items:p(E.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(k,{key:1,id:u(E.value),modelValue:i.value[E.value],"onUpdate:modelValue":F=>i.value[E.value]=F,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),size:"small",type:o(E.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),t.createElementVNode("div",Ci,[t.createVNode(V,{appearance:"btn-link","data-testid":"apply-filter",size:"small",onClick:w[0]||(w[0]=F=>m(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(V,{appearance:"btn-link","data-testid":"clear-filter",size:"small",onClick:F=>y(E.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:t.withCtx(()=>[t.createVNode(V,{onClick:C},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})]),_:1},512),[[t.vShow,n.value]])]))}}}),[["__scopeId","data-v-745f38c0"]]),se=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const l=e,a=t.ref(void 0),r=t.computed(()=>a.value===!0||a.value!==void 0&&l.forceShow===!0);return t.watch(()=>l.authFunction,async()=>{a.value=await l.authFunction()},{immediate:!0}),(n,i)=>r.value?t.renderSlot(n.$slots,"default",{key:0,isAllowed:a.value}):t.createCommentVNode("",!0)}}),wi={class:"form-section-wrapper"},Si={key:0,class:"form-section-title"},xi={key:1,class:"form-section-description"},Ni={key:2,class:"form-section-footer"},Vi={class:"form-section-content"},Ae=le(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(e){const l=t.useSlots();return(a,r)=>(t.openBlock(),t.createElementBlock("fieldset",{class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}])},[t.createElementVNode("div",wi,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createElementBlock("h4",Si,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.description||t.unref(l).description?(t.openBlock(),t.createElementBlock("div",xi,[t.renderSlot(a.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(l).footer?(t.openBlock(),t.createElementBlock("div",Ni,[t.renderSlot(a.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Vi,[t.renderSlot(a.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:Ke,useDeleteUrlBuilder:va,useErrors:$a,useFetchUrlBuilder:Dc,useFetcher:Da,useDebouncedFilter:Ma,useStringHelpers:Mc,useHelpers:Bi,useGatewayFeatureSupported:Kc}=Y,Ii={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 Ti(){const e=Ve.createI18n("en-us",Ii);return{i18n:e,i18nT:Ve.i18nTComponent(e)}}function Fe(e){const{replaceId:l=!1}=e,a=t.ref([]);return{addedItems:a,trackNewItems:(n,i)=>{if(i){const c={...n};l&&(c.value=n.label),a.value.push(c)}else a.value=a.value.filter(c=>c.value!==n.value)}}}const Pe=[{label:"100",value:"100"},{label:"101",value:"101"},{label:"102",value:"102"},{label:"103",value:"103"},{label:"200",value:"200"},{label:"201",value:"201"},{label:"202",value:"202"},{label:"203",value:"203"},{label:"204",value:"204"},{label:"205",value:"205"},{label:"206",value:"206"},{label:"207",value:"207"},{label:"208",value:"208"},{label:"226",value:"226"},{label:"300",value:"300"},{label:"301",value:"301"},{label:"302",value:"302"},{label:"303",value:"303"},{label:"304",value:"304"},{label:"305",value:"305"},{label:"306",value:"306"},{label:"307",value:"307"},{label:"308",value:"308"},{label:"400",value:"400"},{label:"401",value:"401"},{label:"402",value:"402"},{label:"403",value:"403"},{label:"404",value:"404"},{label:"405",value:"405"},{label:"406",value:"406"},{label:"407",value:"407"},{label:"408",value:"408"},{label:"409",value:"409"},{label:"410",value:"410"},{label:"411",value:"411"},{label:"412",value:"412"},{label:"413",value:"413"},{label:"414",value:"414"},{label:"415",value:"415"},{label:"416",value:"416"},{label:"417",value:"417"},{label:"418",value:"418"},{label:"419",value:"419"},{label:"420",value:"420"},{label:"421",value:"421"},{label:"422",value:"422"},{label:"423",value:"423"},{label:"424",value:"424"},{label:"425",value:"425"},{label:"426",value:"426"},{label:"428",value:"428"},{label:"429",value:"429"},{label:"430",value:"430"},{label:"431",value:"431"},{label:"440",value:"440"},{label:"444",value:"444"},{label:"449",value:"449"},{label:"450",value:"450"},{label:"451",value:"451"},{label:"460",value:"460"},{label:"463",value:"463"},{label:"494",value:"494"},{label:"495",value:"495"},{label:"496",value:"496"},{label:"497",value:"497"},{label:"498",value:"498"},{label:"499",value:"499"},{label:"500",value:"500"},{label:"501",value:"501"},{label:"502",value:"502"},{label:"503",value:"503"},{label:"504",value:"504"},{label:"505",value:"505"},{label:"506",value:"506"},{label:"507",value:"507"},{label:"508",value:"508"},{label:"509",value:"509"},{label:"510",value:"510"},{label:"511",value:"511"},{label:"520",value:"520"},{label:"521",value:"521"},{label:"522",value:"522"},{label:"523",value:"523"},{label:"524",value:"524"},{label:"525",value:"525"},{label:"526",value:"526"},{label:"527",value:"527"},{label:"529",value:"529"},{label:"530",value:"530"},{label:"561",value:"561"},{label:"598",value:"598"},{label:"599",value:"599"}],pt=10,ut=65536,Hi=0,Ei=65535,Ce=0,_e=255,Ka=0,Pa=255,Ai=0,Fi=65535,ja=0,La=65535,Oi=0,qi=2**31,ft=["200","302"],mt=["200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","306","307","308"],gt=["429","404","500","501","502","503","504","505"],yt=["429","500","503"];function je(){const e=s=>/^\d+$/.test(s),l=(s,d,u)=>{if(e(s)){const p=Number(s);return p>=d&&p<=u}else return!1},a=s=>s.map(d=>Number(d)),r=s=>s.map(d=>d.toString()),n=()=>({name:"",hostHeader:"",clientCertificate:"",tags:"",algorithm:"round-robin",slots:"10000",hashOn:"none",hashFallback:"none",hashOnHeader:"",hashOnCookie:"",hashOnCookiePath:"/",hashOnQueryArgument:"",hashOnUriCapture:"",hashFallbackHeader:"",hashFallbackQueryArgument:"",hashFallbackUriCapture:"",activeHealthSwitch:!1,passiveHealthSwitch:!1,healthchecksThreshold:"0",activeHealthCheck:{type:"http",httpPath:"/",timeout:"1",concurrency:"10",httpsSni:"",verifySsl:!1,headers:[{key:"",values:""}],interval:"0",successes:"5",httpStatuses:ft,unhealthyInterval:"0",httpFailures:"5",tcpFailures:"5",unhealthyHttpStatuses:gt,unhealthyTimeouts:"0"},passiveHealthCheck:{type:"http",successes:"0",httpStatuses:mt,timeouts:"0",httpFailures:"5",unhealthyHttpStatuses:yt,tcpFailures:"5"}});return{isInteger:e,inRange:l,stringToNumberArray:a,numberToStringArray:r,upstreamsResponseToFields:s=>{var u,p,o,y,C,m,f,w,k,V,D,x,H,E,N,I,_,F,O,M,A,U,K,B,q,$,v,S,g,b,P,R,ae,j,W,fe,Oe,Ne,za,Ja,Wa,Qa,Ya,Ga,Za,Xa,el,tl,al,ll,rl,nl,ol,sl,il,cl,dl,hl,pl,ul,fl,ml,gl,yl,kl,bl,Cl,_l,wl,Sl,xl,Nl,Vl,Bl,Il,Tl,Hl,El,Al,Fl,Ol,ql,Ul,vl,$l,Dl,Ml,Kl,Pl,jl,Ll,Rl,zl,Jl,Wl,Ql,Yl,Gl,Zl,Xl,er,tr,ar,lr,rr,nr,or,sr,ir;const d=n();return d.name=s.name||"",d.algorithm=s.algorithm||"round-robin",d.hostHeader=s.host_header||"",d.clientCertificate=s.client_certificate?(u=s.client_certificate)==null?void 0:u.id:"",d.tags=((p=s.tags)==null?void 0:p.join(", "))||"",d.slots=s.slots!==null&&s.slots!==void 0?s.slots.toString():"10000",d.hashOn=s.hash_on||"none",d.hashFallback=s.hash_fallback||"none",d.hashOnHeader=s.hash_on_header||"",d.hashOnCookie=s.hash_on_cookie||"",d.hashOnCookiePath=s.hash_on_cookie_path||"/",d.hashOnQueryArgument=s.hash_on_query_arg||"",d.hashOnUriCapture=s.hash_on_uri_capture||"",d.hashFallbackHeader=s.hash_fallback_header||"",d.hashFallbackQueryArgument=s.hash_fallback_query_arg||"",d.hashFallbackUriCapture=s.hash_fallback_uri_capture||"",d.healthchecksThreshold=s.healthchecks.threshold!==null&&s.healthchecks.threshold!==void 0?s.healthchecks.threshold.toString():"",d.activeHealthSwitch=((y=(o=s.healthchecks.active)==null?void 0:o.healthy)==null?void 0:y.interval)!==0||((m=(C=s.healthchecks.active)==null?void 0:C.unhealthy)==null?void 0:m.interval)!==0,d.activeHealthCheck.type=((f=s.healthchecks.active)==null?void 0:f.type)||"http",d.activeHealthCheck.httpPath=((w=s.healthchecks.active)==null?void 0:w.http_path)||"/",d.activeHealthCheck.timeout=((k=s.healthchecks.active)==null?void 0:k.timeout)!==null&&((V=s.healthchecks.active)==null?void 0:V.timeout)!==void 0?(x=(D=s.healthchecks.active)==null?void 0:D.timeout)==null?void 0:x.toString():"",d.activeHealthCheck.concurrency=((H=s.healthchecks.active)==null?void 0:H.concurrency)!==null&&((E=s.healthchecks.active)==null?void 0:E.concurrency)!==void 0?(I=(N=s.healthchecks.active)==null?void 0:N.concurrency)==null?void 0:I.toString():"",d.activeHealthCheck.httpsSni=((_=s.healthchecks.active)==null?void 0:_.https_sni)||"",d.activeHealthCheck.verifySsl=((F=s.healthchecks.active)==null?void 0:F.https_verify_certificate)||!1,d.activeHealthCheck.headers=(O=s.healthchecks.active)!=null&&O.headers&&Object.entries((M=s.healthchecks.active)==null?void 0:M.headers).length>0?Object.entries((A=s.healthchecks.active)==null?void 0:A.headers).map(([Tc,kt])=>({key:Tc,values:kt==null?void 0:kt.join(", ")})):[{key:"",values:""}],d.activeHealthCheck.interval=((K=(U=s.healthchecks.active)==null?void 0:U.healthy)==null?void 0:K.interval)!==null&&((q=(B=s.healthchecks.active)==null?void 0:B.healthy)==null?void 0:q.interval)!==void 0?(S=(v=($=s.healthchecks.active)==null?void 0:$.healthy)==null?void 0:v.interval)==null?void 0:S.toString():"0",d.activeHealthCheck.interval=((b=(g=s.healthchecks.active)==null?void 0:g.healthy)==null?void 0:b.interval)!==null&&((R=(P=s.healthchecks.active)==null?void 0:P.healthy)==null?void 0:R.interval)!==void 0?(W=(j=(ae=s.healthchecks.active)==null?void 0:ae.healthy)==null?void 0:j.interval)==null?void 0:W.toString():"0",d.activeHealthCheck.successes=((Oe=(fe=s.healthchecks.active)==null?void 0:fe.healthy)==null?void 0:Oe.successes)!==null&&((za=(Ne=s.healthchecks.active)==null?void 0:Ne.healthy)==null?void 0:za.successes)!==void 0?(Qa=(Wa=(Ja=s.healthchecks.active)==null?void 0:Ja.healthy)==null?void 0:Wa.successes)==null?void 0:Qa.toString():"0",d.activeHealthCheck.httpStatuses=(Ga=(Ya=s.healthchecks.active)==null?void 0:Ya.healthy)!=null&&Ga.http_statuses?r(((Xa=(Za=s.healthchecks.active)==null?void 0:Za.healthy)==null?void 0:Xa.http_statuses)||[]):ft,d.activeHealthCheck.unhealthyInterval=((tl=(el=s.healthchecks.active)==null?void 0:el.unhealthy)==null?void 0:tl.interval)!==null&&((ll=(al=s.healthchecks.active)==null?void 0:al.unhealthy)==null?void 0:ll.interval)!==void 0?(ol=(nl=(rl=s.healthchecks.active)==null?void 0:rl.unhealthy)==null?void 0:nl.interval)==null?void 0:ol.toString():"0",d.activeHealthCheck.httpFailures=((il=(sl=s.healthchecks.active)==null?void 0:sl.unhealthy)==null?void 0:il.http_failures)!==null&&((dl=(cl=s.healthchecks.active)==null?void 0:cl.unhealthy)==null?void 0:dl.http_failures)!==void 0?(ul=(pl=(hl=s.healthchecks.active)==null?void 0:hl.unhealthy)==null?void 0:pl.http_failures)==null?void 0:ul.toString():"0",d.activeHealthCheck.unhealthyTimeouts=((ml=(fl=s.healthchecks.active)==null?void 0:fl.unhealthy)==null?void 0:ml.timeouts)!==null&&((yl=(gl=s.healthchecks.active)==null?void 0:gl.unhealthy)==null?void 0:yl.timeouts)!==void 0?(Cl=(bl=(kl=s.healthchecks.active)==null?void 0:kl.unhealthy)==null?void 0:bl.timeouts)==null?void 0:Cl.toString():"0",d.activeHealthCheck.unhealthyHttpStatuses=(wl=(_l=s.healthchecks.active)==null?void 0:_l.unhealthy)!=null&&wl.http_statuses?r(((xl=(Sl=s.healthchecks.active)==null?void 0:Sl.unhealthy)==null?void 0:xl.http_statuses)||[]):gt,d.passiveHealthSwitch=((Vl=(Nl=s.healthchecks.passive)==null?void 0:Nl.healthy)==null?void 0:Vl.successes)!==0||((Il=(Bl=s.healthchecks.passive)==null?void 0:Bl.unhealthy)==null?void 0:Il.timeouts)!==0||((Hl=(Tl=s.healthchecks.passive)==null?void 0:Tl.unhealthy)==null?void 0:Hl.tcp_failures)!==0||((Al=(El=s.healthchecks.passive)==null?void 0:El.unhealthy)==null?void 0:Al.http_failures)!==0,d.passiveHealthCheck.type=((Fl=s.healthchecks.passive)==null?void 0:Fl.type)||"http",d.passiveHealthCheck.successes=((ql=(Ol=s.healthchecks.passive)==null?void 0:Ol.healthy)==null?void 0:ql.successes)!==null&&((vl=(Ul=s.healthchecks.passive)==null?void 0:Ul.healthy)==null?void 0:vl.successes)!==void 0?(Ml=(Dl=($l=s.healthchecks.passive)==null?void 0:$l.healthy)==null?void 0:Dl.successes)==null?void 0:Ml.toString():"0",d.passiveHealthCheck.httpStatuses=(Pl=(Kl=s.healthchecks.passive)==null?void 0:Kl.healthy)!=null&&Pl.http_statuses?r(((Ll=(jl=s.healthchecks.passive)==null?void 0:jl.healthy)==null?void 0:Ll.http_statuses)||[]):mt,d.passiveHealthCheck.timeouts=((zl=(Rl=s.healthchecks.passive)==null?void 0:Rl.unhealthy)==null?void 0:zl.timeouts)!==null&&((Wl=(Jl=s.healthchecks.passive)==null?void 0:Jl.unhealthy)==null?void 0:Wl.timeouts)!==void 0?(Gl=(Yl=(Ql=s.healthchecks.passive)==null?void 0:Ql.unhealthy)==null?void 0:Yl.timeouts)==null?void 0:Gl.toString():"0",d.passiveHealthCheck.tcpFailures=((Xl=(Zl=s.healthchecks.passive)==null?void 0:Zl.unhealthy)==null?void 0:Xl.tcp_failures)!==null&&((tr=(er=s.healthchecks.passive)==null?void 0:er.unhealthy)==null?void 0:tr.tcp_failures)!==void 0?(rr=(lr=(ar=s.healthchecks.passive)==null?void 0:ar.unhealthy)==null?void 0:lr.tcp_failures)==null?void 0:rr.toString():"",d.passiveHealthCheck.unhealthyHttpStatuses=(or=(nr=s.healthchecks.passive)==null?void 0:nr.unhealthy)!=null&&or.http_statuses?r(((ir=(sr=s.healthchecks.passive)==null?void 0:sr.unhealthy)==null?void 0:ir.http_statuses)||[]):yt,d},getDefaultUpstreamFields:n,objectsAreEqual:(s,d)=>{try{return JSON.stringify(s)===JSON.stringify(d)}catch{return!1}},cloneDeep:s=>JSON.parse(JSON.stringify(s))}}const ie={useI18n:Ti,useMultiselectCreation:Fe,useHelpers:je},we="/api/runtime_groups/{controlPlaneId}",Se="/{workspace}",xe={list:{konnect:`${we}/upstreams`,kongManager:`${Se}/upstreams`},form:{konnect:{getServices:`${we}/services`,getCertificates:`${we}/certificates`,validate:`${we}/v1/schemas/json/upstream/validate`,create:`${we}/upstreams`,edit:`${we}/upstreams/{id}`},kongManager:{getServices:`${Se}/services`,getCertificates:`${Se}/certificates`,validate:`${Se}/schemas/upstreams/validate`,create:`${Se}/upstreams`,edit:`${Se}/upstreams/{id}`}}},Lc="",Ui={class:"kong-ui-entities-upstreams-list"},vi={class:"upstream-name"},$i=t.defineComponent({__name:"UpstreamsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success"],setup(e,{emit:l}){var K;const a=e,{i18n:{t:r}}=ie.useI18n(),n=ze.useRouter(),{axiosInstance:i}=Ke({headers:(K=a.config)==null?void 0:K.requestHeaders}),c=t.ref(1),h=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),s={name:{label:r("upstreams.list.table_headers.name"),searchable:!0,sortable:!0},slots:{label:r("upstreams.list.table_headers.slots"),searchable:!0,sortable:!0},tags:{label:r("upstreams.list.table_headers.tags"),sortable:!1}},d=s,u=t.computed(()=>{var q,$;let B=`${a.config.apiBaseUrl}${xe.list[a.config.app]}`;return a.config.app==="konnect"?B=B.replace(/{controlPlaneId}/gi,((q=a.config)==null?void 0:q.controlPlaneId)||""):a.config.app==="kongManager"&&(B=B.replace(/\/{workspace}/gi,($=a.config)!=null&&$.workspace?`/${a.config.workspace}`:"")),B}),p=t.ref(""),o=t.computed(()=>{const B=a.config.app==="konnect"||a.config.isExactMatch;if(B)return{isExactMatch:B,placeholder:r("upstreams.search.placeholder")};const{name:q,slots:$}=s;return{isExactMatch:B,fields:{name:q,slots:$},schema:a.config.filterSchema}}),{fetcher:y,fetcherState:C}=Da(a.config,u.value),m=()=>{p.value=""},f=()=>{c.value++},w=t.ref(""),k=(B,q)=>{const $=B.id;if(!q($)){l("copy:error",{entity:B,field:"id",message:r("upstreams.errors.copy")});return}l("copy:success",{entity:B,field:"id",message:r("upstreams.copy.success",{val:$})})},V=(B,q)=>{const $=JSON.stringify(B);if(!q($)){l("copy:error",{entity:B,message:r("upstreams.errors.copy")});return}l("copy:success",{entity:B,message:r("upstreams.copy.success_brief")})},D=async B=>{var $;await(($=a.canRetrieve)==null?void 0:$.call(a,B))&&n.push(a.config.getViewRoute(B.id))},x=B=>({label:r("upstreams.actions.view"),to:a.config.getViewRoute(B)}),H=B=>({label:r("upstreams.actions.edit"),to:a.config.getEditRoute(B)}),E=t.ref(void 0),N=t.ref(!1),I=t.ref(!1),_=t.ref(""),F=va(a.config,u.value),O=B=>{E.value=B,N.value=!0},M=()=>{N.value=!1},A=async()=>{var B,q,$;if((B=E.value)!=null&&B.id){I.value=!0;try{await i.delete(F(E.value.id)),I.value=!1,N.value=!1,c.value++,l("delete:success",E.value)}catch(v){_.value=(($=(q=v.response)==null?void 0:q.data)==null?void 0:$.message)||v.message||r("upstreams.errors.delete"),l("error",v)}finally{I.value=!1}}};t.watch(C,B=>{if(B.status===de.Error){w.value=r("upstreams.errors.general"),l("error",B.error);return}w.value=""});const U=t.ref({ctaPath:a.config.createRoute,ctaText:void 0,message:r("upstreams.list.empty_state.description"),title:r("upstreams.title")});return t.onBeforeMount(async()=>{await a.canCreate()&&(U.value.title=r("upstreams.list.empty_state.title"),U.value.ctaText=r("upstreams.actions.create"))}),(B,q)=>{const $=t.resolveComponent("KButton"),v=t.resolveComponent("KBadge"),S=t.resolveComponent("KTruncate"),g=t.resolveComponent("KDropdownItem"),b=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Ui,[t.createVNode(t.unref(qa),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":h.value,"empty-state-options":U.value,"enable-entity-actions":"","error-message":w.value,fetcher:t.unref(y),"fetcher-cache-key":c.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-upstreams-list",query:p.value,"table-headers":t.unref(d),onClearSearchInput:m,"onClick:row":q[1]||(q[1]=P=>D(P)),onSort:f},{"toolbar-filter":t.withCtx(()=>[t.createVNode(t.unref(_i),{modelValue:p.value,"onUpdate:modelValue":q[0]||(q[0]=P=>p.value=P),config:o.value},null,8,["modelValue","config"])]),"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode($,{appearance:"primary","data-testid":"toolbar-add-upstream",icon:"plus",to:e.config.createRoute},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.list.toolbar_actions.new_upstream")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:t.withCtx(({rowValue:P})=>[t.createElementVNode("span",vi,t.toDisplayString(P),1)]),tags:t.withCtx(({rowValue:P})=>[t.createVNode(S,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P,R=>(t.openBlock(),t.createBlock(v,{key:R,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(R),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:P})=>[t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-id",onClick:ae=>k(P,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:R})=>[t.createVNode(g,{"data-testid":"action-entity-copy-json",onClick:ae=>V(P,R)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canRetrieve(P)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-view","has-divider":"",item:x(P.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(P)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-edit",item:H(P.id)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(P)},{default:t.withCtx(()=>[t.createVNode(g,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:R=>O(P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),t.createVNode(t.unref(Ua),{"action-pending":I.value,description:t.unref(r)("upstreams.delete.description"),"entity-name":E.value&&(E.value.name||E.value.id),"entity-type":t.unref(Je).Upstream,error:_.value,title:t.unref(r)("upstreams.delete.title"),visible:N.value,onCancel:M,onProceed:A},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Rc="",ce=(e,l)=>{const a=e.__vccOpts||e;for(const[r,n]of l)a[r]=n;return a},Di=ce($i,[["__scopeId","data-v-033bd1ef"]]),Le={list:{konnect:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",kongManager:"/{workspace}/upstreams/{upstreamId}/targets"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",edit:"/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets/{id}",validate:"/api/runtime_groups/{controlPlaneId}/v1/schemas/json/target/validate"},kongManager:{create:"/{workspace}/upstreams/{upstreamId}/targets",edit:"/{workspace}/upstreams/{upstreamId}/targets/{id}",validate:"/{workspace}/schemas/targets/validate"}}},Mi={class:"kong-ui-entities-target-form"},Ki={class:"target-form-container"},Pi={key:0,class:"target-form-info"},ji=t.defineComponent({__name:"TargetForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.upstreamId)},isVisible:{type:Boolean,required:!0,default:!1},targetId:{type:String,required:!1,default:""}},emits:["update","error","loading","cancel"],setup(e,{emit:l}){var D;const a=e;t.useCssVars(x=>({"2cc5362c":V.value}));const{i18n:{t:r}}=ie.useI18n(),{getMessageFromError:n}=$a(),{axiosInstance:i}=Ke({headers:(D=a.config)==null?void 0:D.requestHeaders}),c=t.computed(()=>{var x;return Le.form[a.config.app].edit.replace(/{upstreamId}/gi,((x=a.config)==null?void 0:x.upstreamId)||"")}),h=t.computed(()=>a.targetId?re.Edit:re.Create),s=t.computed(()=>h.value===re.Edit?r("targets.form.edit.title"):r("targets.form.create.title")),d=t.reactive({fields:{target:"",weight:100,tags:""},isReadonly:!1,errorMessage:""}),u=t.reactive({target:"",weight:100,tags:""}),p={target:"",weight:100,tags:""},o=t.computed(()=>{const x=parseInt(d.fields.weight.toString(),10);return x<0||x>65535}),y=t.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(u)&&!!d.fields.target&&!!d.fields.weight&&!o.value),C=x=>{var H;d.fields.target=(x==null?void 0:x.target)||"",d.fields.weight=(x==null?void 0:x.weight)??"",d.fields.tags=((H=x==null?void 0:x.tags)==null?void 0:H.join(", "))||"",Object.assign(u,d.fields)},m=()=>{d.errorMessage="",l("cancel")},f=t.computed(()=>{var H,E;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app].validate}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((H=a.config)==null?void 0:H.controlPlaneId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(E=a.config)!=null&&E.workspace?`/${a.config.workspace}`:"")),x=x.replace(/{id}/gi,a.targetId),x}),w=t.computed(()=>{var H,E,N,I;let x=`${a.config.apiBaseUrl}${Le.form[a.config.app][h.value]}`;return a.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,((H=a.config)==null?void 0:H.controlPlaneId)||"").replace(/{upstreamId}/gi,((E=a.config)==null?void 0:E.upstreamId)||""):a.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,(N=a.config)!=null&&N.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((I=a.config)==null?void 0:I.upstreamId)||"")),x=x.replace(/{id}/gi,a.targetId),x}),k=async()=>{var x,H,E,N,I;try{d.isReadonly=!0,d.errorMessage="";const _={target:d.fields.target,weight:parseInt(d.fields.weight),tags:(E=(H=(x=d.fields.tags)==null?void 0:x.split(","))==null?void 0:H.map(O=>String(O||"").trim()))==null?void 0:E.filter(O=>O!==""),upstream:{id:a.config.upstreamId}};let F;if(await i.post(f.value,_),h.value==="create"?F=await i.post(w.value,_):h.value==="edit"&&(F=((N=a.config)==null?void 0:N.app)==="konnect"?await i.put(w.value,_):await i.patch(w.value,_)),F){const{data:O}=F;d.fields.target=(O==null?void 0:O.name)||"",d.fields.weight=(O==null?void 0:O.weight)??100,d.fields.tags=((I=O==null?void 0:O.tags)==null?void 0:I.join(", "))||"",l("update",O),Object.assign(d.fields,p)}}catch(_){d.errorMessage=n(_),l("error",_)}finally{d.isReadonly=!1}},V=t.computed(()=>d.isReadonly?"inline-flex":"none");return t.watch(()=>a.targetId,()=>{Object.assign(d.fields,p)}),(x,H)=>{const E=t.resolveComponent("KInput"),N=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(N,{"action-button-text":t.unref(r)("targets.form.buttons.save"),"action-pending":!y.value||d.isReadonly,"cancel-button-text":t.unref(r)("targets.form.buttons.cancel"),"is-visible":e.isVisible,title:s.value,onCanceled:m,onProceed:k},{"body-content":t.withCtx(()=>[t.createElementVNode("div",Mi,[t.createVNode(t.unref(Oa),{config:e.config,"edit-id":e.targetId,"error-message":d.errorMessage,"fetch-url":c.value,"is-readonly":d.isReadonly,onCancel:m,"onFetch:error":H[3]||(H[3]=I=>x.$emit("error",I)),"onFetch:success":C,onLoading:H[4]||(H[4]=I=>x.$emit("loading",I))},{default:t.withCtx(()=>[t.createElementVNode("div",Ki,[x.$slots.info?(t.openBlock(),t.createElementBlock("div",Pi,[t.renderSlot(x.$slots,"info",{},void 0,!0)])):t.createCommentVNode("",!0),t.createVNode(E,{modelValue:d.fields.target,"onUpdate:modelValue":H[0]||(H[0]=I=>d.fields.target=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-target",label:t.unref(r)("targets.form.fields.target.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.target.tooltip")},placeholder:t.unref(r)("targets.form.fields.target.placeholder"),readonly:d.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),t.createVNode(E,{modelValue:d.fields.weight,"onUpdate:modelValue":H[1]||(H[1]=I=>d.fields.weight=I),autocomplete:"off",class:"target-form-input","data-testid":"target-form-weight","error-message":t.unref(r)("targets.errors.weight"),"has-error":o.value,label:t.unref(r)("targets.form.fields.weight.label"),"label-attributes":{info:t.unref(r)("targets.form.fields.weight.tooltip")},max:"65535",min:"0",readonly:d.isReadonly,required:"",type:"number"},null,8,["modelValue","error-message","has-error","label","label-attributes","readonly"]),t.createVNode(E,{modelValue:d.fields.tags,"onUpdate:modelValue":H[2]||(H[2]=I=>d.fields.tags=I),modelModifiers:{trim:!0},autocomplete:"off",class:"target-form-input","data-testid":"target-form-tags",help:t.unref(r)("targets.form.fields.tags.help"),label:t.unref(r)("targets.form.fields.tags.label"),placeholder:t.unref(r)("targets.form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"])])]),_:3},8,["config","edit-id","error-message","fetch-url","is-readonly"])])]),_:3},8,["action-button-text","action-pending","cancel-button-text","is-visible","title"])}}}),zc="",Ra=ce(ji,[["__scopeId","data-v-77134304"]]),Li={class:"kong-ui-entities-targets-list"},Ri={class:"target-address"},zi=t.defineComponent({__name:"TargetsList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.upstreamId||e.app==="kongManager"&&(typeof e.canMarkHealthy>"u"||typeof e.canMarkUnhealthy>"u"))},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success","health-actions:healthy","health-actions:unhealthy","create:target","update:target"],setup(e,{emit:l}){var $;const a=e,{i18n:{t:r}}=ie.useI18n(),{axiosInstance:n}=Ke({headers:($=a.config)==null?void 0:$.requestHeaders}),i=t.ref(1),c=t.computed(()=>a.config.app!=="kongManager"||!!a.config.disableSorting),s={target:{label:r("targets.list.table_headers.target_address"),sortable:!0},weight:{label:r("targets.list.table_headers.weight"),sortable:!0},tags:{label:r("targets.list.table_headers.tags"),sortable:!1}},d=t.computed(()=>{var S,g,b,P;let v=`${a.config.apiBaseUrl}${Le.list[a.config.app]}`;return a.config.app==="konnect"?v=v.replace(/{controlPlaneId}/gi,((S=a.config)==null?void 0:S.controlPlaneId)||"").replace(/{upstreamId}/gi,((g=a.config)==null?void 0:g.upstreamId)||""):a.config.app==="kongManager"&&(v=v.replace(/\/{workspace}/gi,(b=a.config)!=null&&b.workspace?`/${a.config.workspace}`:"").replace(/{upstreamId}/gi,((P=a.config)==null?void 0:P.upstreamId)||"")),v}),{fetcher:u,fetcherState:p}=Da(a.config,d.value),o=()=>{i.value++},y=t.ref(""),C=()=>{U.value=!0},m=(v,S)=>{const g=v.id;if(!S(g)){l("copy:error",{entity:v,field:"id",message:r("targets.errors.copy")});return}l("copy:success",{entity:v,field:"id",message:r("targets.copy.success",{val:g})})},f=(v,S)=>{const g=JSON.stringify(v);if(!S(g)){l("copy:error",{entity:v,message:r("targets.errors.copy")});return}l("copy:success",{entity:v,message:r("targets.copy.success_brief")})},w=v=>{A.value=v,U.value=!0},k=v=>a.config.app==="konnect"?!1:a.config.canMarkHealthy(v),V=v=>a.config.app==="konnect"?!1:a.config.canMarkUnhealthy(v),D=t.ref(void 0),x=t.ref(!1),H=t.ref(!1),E=t.ref(""),N=va(a.config,d.value),I=v=>{D.value=v,x.value=!0},_=()=>{x.value=!1},F=async()=>{var v,S,g;if((v=D.value)!=null&&v.id){H.value=!0;try{await n.delete(N(D.value.id)),H.value=!1,x.value=!1,i.value++,l("delete:success",D.value)}catch(b){E.value=((g=(S=b.response)==null?void 0:S.data)==null?void 0:g.message)||b.message||r("targets.errors.delete"),l("error",b)}finally{H.value=!1}}};t.watch(p,v=>{if(v.status===de.Error){y.value=r("targets.errors.general"),l("error",v.error);return}y.value=""});const O=t.ref({ctaText:void 0,message:r("targets.list.empty_state.description"),title:r("targets.title"),...a.config.createRoute&&{ctaPath:a.config.createRoute}});t.onBeforeMount(async()=>{await a.canCreate()&&(O.value.title=r("targets.list.empty_state.title"),O.value.ctaText=r("targets.actions.create"))});const M=t.computed(()=>({app:a.config.app,apiBaseUrl:a.config.apiBaseUrl,upstreamId:a.config.upstreamId,...a.config.app==="konnect"&&{controlPlaneId:a.config.controlPlaneId},...a.config.app==="kongManager"&&{workspace:a.config.workspace,requestHeaders:a.config.requestHeaders}})),A=t.ref(""),U=t.ref(!1),K=v=>{A.value?l("update:target",v):l("create:target",v),B()},B=()=>{q(),i.value++},q=()=>{U.value=!1,A.value=""};return(v,S)=>{const g=t.resolveComponent("KButton"),b=t.resolveComponent("KBadge"),P=t.resolveComponent("KTruncate"),R=t.resolveComponent("KDropdownItem"),ae=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",Li,[t.createVNode(t.unref(qa),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":c.value,"empty-state-options":O.value,"enable-entity-actions":"","error-message":y.value,fetcher:t.unref(u),"fetcher-cache-key":i.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-targets-list","table-headers":t.unref(s),onEmptyStateCtaClicked:S[1]||(S[1]=()=>a.config.createRoute?void 0:C()),onSort:o},{"toolbar-button":t.withCtx(()=>[t.createVNode(t.unref(se),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(g,{appearance:"primary","data-testid":"toolbar-new-target",icon:"plus",to:a.config.createRoute?a.config.createRoute:void 0,onClick:S[0]||(S[0]=()=>a.config.createRoute?void 0:C())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.list.toolbar_actions.new_target")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),target:t.withCtx(({rowValue:j})=>[t.createElementVNode("span",Ri,t.toDisplayString(j),1)]),tags:t.withCtx(({rowValue:j})=>[t.createVNode(P,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(j,W=>(t.openBlock(),t.createBlock(b,{key:W,"max-width":"auto"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(W),1)]),_:2},1024))),128))]),_:2},1024)]),actions:t.withCtx(({row:j})=>[t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-id",onClick:fe=>m(j,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(ae,null,{default:t.withCtx(({copyToClipboard:W})=>[t.createVNode(R,{"data-testid":"action-entity-copy-json",onClick:fe=>f(j,W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(se),{"auth-function":()=>e.canEdit(j)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-entity-edit","has-divider":"",onClick:W=>w(j.id)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.edit")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>k(j)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-healthy",onClick:W=>l("health-actions:healthy",j)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_healthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>V(j)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-target-mark-unhealthy",onClick:W=>l("health-actions:unhealthy",j)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.mark_unhealthy")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(se),{"auth-function":()=>e.canDelete(j)},{default:t.withCtx(()=>[t.createVNode(R,{"data-testid":"action-entity-delete","has-divider":"","is-dangerous":"",onClick:W=>I(j)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("targets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","table-headers"]),t.createVNode(t.unref(Ua),{"action-pending":H.value,description:t.unref(r)("targets.delete.description"),"entity-type":t.unref(Je).Target,error:E.value,"need-confirm":!1,title:t.unref(r)("targets.delete.title"),visible:x.value,onCancel:_,onProceed:F},null,8,["action-pending","description","entity-type","error","title","visible"]),t.createVNode(Ra,{config:M.value,"is-visible":U.value,"target-id":A.value,onCancel:q,onUpdate:K},t.createSlots({_:2},[v.$slots["form-info"]?{name:"info",fn:t.withCtx(()=>[t.renderSlot(v.$slots,"form-info",{},void 0,!0)]),key:"0"}:void 0]),1032,["config","is-visible","target-id"])])}}}),Jc="",Ji=ce(zi,[["__scopeId","data-v-aba40390"]]),Wi={key:1},Qi=t.defineComponent({__name:"UpstreamsFormGeneralInfo",props:{config:{type:Object,required:!0},name:{type:String,required:!0},hostHeader:{type:String,required:!0},clientCertificate:{type:String,required:!0},tags:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:name","update:host-header","update:client-certificate","update:tags"],setup(e,{emit:l}){var _,F,O,M;const a=e,{i18nT:r,i18n:{t:n}}=ie.useI18n(),{debouncedQueryChange:i,loading:c,loadItems:h,results:s,allRecords:d}=Ma(a.config,(F=xe.form[(_=a.config)==null?void 0:_.app])==null?void 0:F.getServices,"",{fetchedItemsKey:"data",searchKeys:["host"]}),{debouncedQueryChange:u,loading:p,loadItems:o,results:y}=Ma(a.config,(M=xe.form[(O=a.config)==null?void 0:O.app])==null?void 0:M.getCertificates),C=t.ref(""),m=t.computed(()=>{var A;return!!a.name&&!((A=d.value)!=null&&A.some(U=>U.host===a.name))}),f=t.computed(()=>{var U,K,B;const A=m.value&&a.name.includes((U=C.value)==null?void 0:U.toLowerCase());return(B=s.value)==null?void 0:B.map(q=>({label:q.host,value:q.id})).concat(A?[{label:a.name,value:((K=V.value)==null?void 0:K.value)||a.name}]:[])}),w=t.computed(()=>{var A;return(A=y.value)==null?void 0:A.map(U=>({label:U.id,value:U.id}))}),k=t.ref(""),V=t.ref({value:"",label:""}),D=t.computed(()=>{var A,U;return((A=f.value.find(K=>K.value===k.value))==null?void 0:A.label)||((U=V.value)==null?void 0:U.label)}),x=A=>{C.value=A,i(A)},H=A=>{V.value=A},E=()=>{V.value={value:"",label:""}},N=A=>{k.value=A,l("update:name",D.value)},I=t.ref(!1);return t.onBeforeMount(async()=>{var A,U;try{I.value=!0,await h(),a.name&&(k.value=((U=(A=f.value.find(K=>K.label===a.name))==null?void 0:A.value)==null?void 0:U.toString())||a.name),await o()}finally{I.value=!1}}),(A,U)=>{const K=t.resolveComponent("KSkeleton"),B=t.resolveComponent("KSelect"),q=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-general-info",description:t.unref(n)("upstreams.form.general_info.help"),title:t.unref(n)("upstreams.form.general_info.title")},{default:t.withCtx(()=>[I.value?(t.openBlock(),t.createBlock(K,{key:0,type:"form"})):(t.openBlock(),t.createElementBlock("div",Wi,[t.createVNode(B,{appearance:"select",autosuggest:"",class:"name-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-name","enable-filtering":"","enable-item-creation":"",items:f.value,label:t.unref(n)("upstreams.form.fields.name.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},loading:t.unref(c),"model-value":k.value,placeholder:t.unref(n)("upstreams.form.fields.name.placeholder"),readonly:e.readonly,required:"",width:"100%","onItem:added":H,"onItem:removed":E,onQueryChange:x,"onUpdate:modelValue":N},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(n)("upstreams.form.fields.name.host")),1)]),_:1})]),_:1},8,["items","label","loading","model-value","placeholder","readonly","onUpdate:modelValue"]),t.createVNode(q,{autocomplete:"off",class:"margin-bottom-6","data-testid":"upstreams-form-host-header",label:t.unref(n)("upstreams.form.fields.host_header.label"),"model-value":e.hostHeader,readonly:e.readonly,type:"text","onUpdate:modelValue":U[0]||(U[0]=$=>l("update:host-header",$))},null,8,["label","model-value","readonly"]),t.createVNode(B,{appearance:"select",autosuggest:"",class:"certificate-select margin-bottom-6",clearable:"","data-testid":"upstreams-form-client-certificate","enable-filtering":"",items:w.value,label:t.unref(n)("upstreams.form.fields.client_certificate.label"),"label-attributes":{info:t.unref(n)("upstreams.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"250px"}},loading:t.unref(p),"model-value":e.clientCertificate,placeholder:t.unref(n)("upstreams.form.fields.client_certificate.placeholder"),readonly:e.readonly,width:"100%",onQueryChange:t.unref(u),"onUpdate:modelValue":U[1]||(U[1]=$=>l("update:client-certificate",$))},null,8,["items","label","label-attributes","loading","model-value","placeholder","readonly","onQueryChange"]),t.createVNode(q,{autocomplete:"off","data-testid":"upstreams-form-tags",help:t.unref(n)("upstreams.form.fields.tags.help"),label:t.unref(n)("upstreams.form.fields.tags.label"),"label-attributes":{info:t.unref(n)("upstreams.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250px"}},"model-value":e.tags,placeholder:t.unref(n)("upstreams.form.fields.tags.placeholder"),readonly:e.readonly,type:"text","onUpdate:modelValue":U[2]||(U[2]=$=>l("update:tags",$))},null,8,["help","label","label-attributes","model-value","placeholder","readonly"])]))]),_:1},8,["description","title"])}}}),Wc="",Yi=ce(Qi,[["__scopeId","data-v-02065a3d"]]),Re={upstreamObject:"https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",loadBalancing:"https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"},Gi={class:"fields-group-title"},Zi={class:"fields-group-text"},Xi={class:"fields-group-title"},ec={class:"fields-group-text"},tc=t.defineComponent({__name:"UpstreamsFormLoadBalancing",props:{algorithm:{type:String,required:!0},slots:{type:String,required:!0},hashOn:{type:String,required:!0},hashFallback:{type:String,required:!0},hashOnHeader:{type:String,required:!0},hashOnCookie:{type:String,required:!0},hashOnCookiePath:{type:String,required:!0},hashOnQueryArgument:{type:String,required:!0},hashOnUriCapture:{type:String,required:!0},hashFallbackHeader:{type:String,required:!0},hashFallbackQueryArgument:{type:String,required:!0},hashFallbackUriCapture:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:algorithm","update:slots","update:hash-on","update:hash-fallback","update:hash-on-header","update:hash-on-cookie","update:hash-on-cookie-path","update:hash-on-query-argument","update:hash-on-uri-capture","update:hash-fallback-header","update:hash-fallback-query-argument","update:hash-fallback-uri-capture"],setup(e,{emit:l}){const a=e,{i18nT:r,i18n:{t:n}}=ie.useI18n(),{inRange:i}=je(),c=t.ref([{label:n("upstreams.form.algorithms.round_robin_label"),value:"round-robin",selected:!1},{label:n("upstreams.form.algorithms.least_connections_label"),value:"least-connections",selected:!1},{label:n("upstreams.form.algorithms.consistent_hashing_label"),value:"consistent-hashing",selected:!1},{label:n("upstreams.form.algorithms.latency_label"),value:"latency",selected:!1}]),h=t.ref([{label:n("upstreams.form.hash_labels.none"),value:"none",selected:!1},{label:n("upstreams.form.hash_labels.consumer"),value:"consumer",selected:!1},{label:n("upstreams.form.hash_labels.ip"),value:"ip",selected:!1},{label:n("upstreams.form.hash_labels.header"),value:"header",selected:!1},{label:n("upstreams.form.hash_labels.cookie"),value:"cookie",selected:!1},{label:n("upstreams.form.hash_labels.path"),value:"path",selected:!1},{label:n("upstreams.form.hash_labels.query_argument"),value:"query_arg",selected:!1},{label:n("upstreams.form.hash_labels.uri_capture"),value:"uri_capture",selected:!1}]);t.watch(()=>a.hashOn,(u,p)=>{p==="header"&&u!==p&&l("update:hash-on-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-on-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-on-uri-capture",""),(u==="cookie"||u==="none")&&(l("update:hash-fallback","none"),l("update:hash-fallback-header",""),l("update:hash-fallback-query-argument",""),l("update:hash-fallback-uri-capture",""))}),t.watch(()=>a.hashFallback,(u,p)=>{p==="header"&&u!==p&&l("update:hash-fallback-header",""),p==="cookie"&&u!==p&&(l("update:hash-on-cookie",""),l("update:hash-on-cookie-path","/")),p==="query_arg"&&u!==p&&l("update:hash-fallback-query-argument",""),p==="uri_capture"&&u!==p&&l("update:hash-fallback-uri-capture","")});const s=t.computed(()=>a.hashOn==="cookie"||a.hashOn==="none"),d=t.computed(()=>a.slots?i(a.slots,pt,ut)?"":n("upstreams.form.errors.in_range"):"");return(u,p)=>{const o=t.resolveComponent("KExternalLink"),y=t.resolveComponent("KSelect"),C=t.resolveComponent("KInput"),m=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-load-balancing",title:t.unref(n)("upstreams.form.load_balancing.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(n)("upstreams.form.load_balancing.help"))+" ",1),t.createVNode(o,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(y,{appearance:"select",class:"algorithm-select",items:c.value,label:t.unref(n)("upstreams.form.fields.algorithm.label"),"model-value":e.algorithm,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[0]||(p[0]=f=>l("update:algorithm",f))},null,8,["items","label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off","data-testid":"upstreams-form-slots","error-message":d.value,"has-error":!!d.value,help:t.unref(n)("upstreams.form.fields.slots.help"),label:t.unref(n)("upstreams.form.fields.slots.label"),max:t.unref(ut),min:t.unref(pt),"model-value":e.slots,readonly:e.readonly,type:"number","onUpdate:modelValue":p[1]||(p[1]=f=>l("update:slots",f))},null,8,["error-message","has-error","help","label","max","min","model-value","readonly"]),t.createVNode(m,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Gi,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_on.label")),1),t.createElementVNode("p",Zi,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_on.help")),1),t.createVNode(y,{appearance:"select",class:"hash-on-select",items:h.value,label:t.unref(n)("upstreams.form.fields.hash_on.label"),"model-value":e.hashOn,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[2]||(p[2]=f=>l("update:hash-on",f))},null,8,["items","label","model-value","readonly"]),e.hashOn==="header"?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-header",label:t.unref(n)("upstreams.form.fields.header.label"),"model-value":e.hashOnHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[3]||(p[3]=f=>l("update:hash-on-header",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(n)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[4]||(p[4]=f=>l("update:hash-on-cookie",f))},null,8,["label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(n)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[5]||(p[5]=f=>l("update:hash-on-cookie-path",f))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashOn==="query_arg"?(t.openBlock(),t.createBlock(C,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-query-argument",label:t.unref(n)("upstreams.form.fields.query_argument.label"),"model-value":e.hashOnQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[6]||(p[6]=f=>l("update:hash-on-query-argument",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashOn==="uri_capture"?(t.openBlock(),t.createBlock(C,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-uri-capture",label:t.unref(n)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashOnUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[7]||(p[7]=f=>l("update:hash-on-uri-capture",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1}),t.createVNode(m,null,{body:t.withCtx(()=>[t.createElementVNode("h5",Xi,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_fallback.label")),1),t.createElementVNode("p",ec,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_fallback.help")),1),t.createVNode(y,{appearance:"select",class:"hash-fallback-select",disabled:s.value,items:h.value,label:t.unref(n)("upstreams.form.fields.hash_fallback.label"),"label-attributes":{tooltipAttributes:{"max-width":"250px"}},"model-value":e.hashFallback,readonly:e.readonly,width:"100%","onUpdate:modelValue":p[8]||(p[8]=f=>l("update:hash-fallback",f))},{"label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_fallback.tooltip",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(n)("upstreams.form.fields.hash_fallback.cookie")),1)]),_:1})]),_:1},8,["disabled","items","label","model-value","readonly"]),e.hashFallback==="header"?(t.openBlock(),t.createBlock(C,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-header",label:t.unref(n)("upstreams.form.fields.header.label"),"model-value":e.hashFallbackHeader,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[9]||(p[9]=f=>l("update:hash-fallback-header",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="cookie"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie",label:t.unref(n)("upstreams.form.fields.cookie.label"),"model-value":e.hashOnCookie,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[10]||(p[10]=f=>l("update:hash-on-cookie",f))},null,8,["label","model-value","readonly"]),t.createVNode(C,{autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-on-cookie-path",label:t.unref(n)("upstreams.form.fields.cookie_path.label"),"model-value":e.hashOnCookiePath,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[11]||(p[11]=f=>l("update:hash-on-cookie-path",f))},null,8,["label","model-value","readonly"])],64)):t.createCommentVNode("",!0),e.hashFallback==="query_arg"?(t.openBlock(),t.createBlock(C,{key:2,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-query-argument",label:t.unref(n)("upstreams.form.fields.query_argument.label"),"model-value":e.hashFallbackQueryArgument,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[12]||(p[12]=f=>l("update:hash-fallback-query-argument",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0),e.hashFallback==="uri_capture"?(t.openBlock(),t.createBlock(C,{key:3,autocomplete:"off",class:"margin-top-6","data-testid":"upstreams-form-hash-fallback-uri-capture",label:t.unref(n)("upstreams.form.fields.uri_capture.label"),"model-value":e.hashFallbackUriCapture,readonly:e.readonly,required:"",type:"text","onUpdate:modelValue":p[13]||(p[13]=f=>l("update:hash-fallback-uri-capture",f))},null,8,["label","model-value","readonly"])):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])}}}),Qc="",ac=ce(tc,[["__scopeId","data-v-522adce0"]]),lc={class:"fields-group-title"},rc={class:"fields-group-text"},nc={class:"fields-group-title"},oc={class:"fields-group-text"},sc=t.defineComponent({__name:"UpstreamsFormHealthChecks",props:{activeHealthSwitch:{type:Boolean,required:!0},passiveHealthSwitch:{type:Boolean,required:!0},healthchecksThreshold:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:active-health-switch","update:passive-health-switch","update:healthchecks-threshold"],setup(e,{emit:l}){const{i18n:{t:a}}=ie.useI18n();return(r,n)=>{const i=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KInputSwitch"),h=t.resolveComponent("KCard"),s=t.resolveComponent("KInput");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-healthchecks",title:t.unref(a)("upstreams.form.health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.health_check.help"))+" ",1),t.createVNode(i,{"hide-icon":"",href:t.unref(Re).loadBalancing},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",lc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.label")),1),t.createElementVNode("p",rc,t.toDisplayString(t.unref(a)("upstreams.form.fields.active_health_checks.help")),1),t.createVNode(c,{class:"active-health-switch","data-testid":"active-health-switch",disabled:e.readonly,"model-value":e.activeHealthSwitch,onChange:n[0]||(n[0]=d=>l("update:active-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(h,null,{body:t.withCtx(()=>[t.createElementVNode("h5",nc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.label")),1),t.createElementVNode("p",oc,t.toDisplayString(t.unref(a)("upstreams.form.fields.passive_health_checks.help")),1),t.createVNode(c,{class:"passive-health-switch","data-testid":"passive-health-switch",disabled:e.readonly,"model-value":e.passiveHealthSwitch,onChange:n[1]||(n[1]=d=>l("update:passive-health-switch",d))},null,8,["disabled","model-value"])]),_:1}),t.createVNode(s,{autocomplete:"off","data-testid":"upstreams-form-healthchecks-threshold",label:t.unref(a)("upstreams.form.fields.healthchecks_threshold.label"),max:t.unref(Ei),min:t.unref(Hi),"model-value":e.healthchecksThreshold,readonly:e.readonly,type:"number","onUpdate:modelValue":n[2]||(n[2]=d=>l("update:healthchecks-threshold",d))},null,8,["label","max","min","model-value","readonly"])]),_:1},8,["title"])}}}),Yc="",ic=ce(sc,[["__scopeId","data-v-7fda4841"]]),cc={key:2},dc={class:"fields-group-title"},hc={class:"fields-group-text"},pc={class:"fields-group-title"},uc={class:"fields-group-text"},fc=t.defineComponent({__name:"UpstreamsFormActiveHealthCheck",props:{config:{type:Object,required:!0},type:{type:String,required:!0},httpPath:{type:String,required:!0},timeout:{type:String,required:!0},concurrency:{type:String,required:!0},httpsSni:{type:String,required:!0},verifySsl:{type:Boolean,required:!0},headers:{type:Array,required:!0},interval:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},unhealthyInterval:{type:String,required:!0},httpFailures:{type:String,required:!0},tcpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},unhealthyTimeouts:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:http-path","update:timeout","update:concurrency","update:https-sni","update:verify-ssl","update:headers","update:interval","update:successes","update:http-statuses","update:unhealthy-interval","update:http-failures","update:tcp-failures","update:unhealthy-http-statuses","update:unhealthy-timeouts"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),{objectsAreEqual:n}=je(),i=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),c=t.computed(()=>a.type==="https"||a.type==="grpcs"),h=t.computed(()=>a.type==="tcp"),{trackNewItems:s}=Fe({replaceId:!0}),{trackNewItems:d}=Fe({replaceId:!0});t.watch(()=>a.type,(C,m)=>{m==="tcp"&&C!==m&&l("update:tcp-failures","5"),(m==="https"||m==="grpcs")&&C!==m&&(l("update:https-sni",""),l("update:verify-ssl",!1)),m!=="tcp"&&C==="tcp"&&(l("update:http-path","/"),l("update:http-statuses",ft),l("update:unhealthy-http-statuses",gt))});const u=t.ref([{key:"",values:""}]);t.watch(()=>a.headers,C=>{n(u.value,C)||(u.value=[...C])},{immediate:!0,deep:!0});const p=()=>{l("update:headers",u.value)},o=()=>{u.value.push({key:"",values:""}),p()},y=C=>{C===0&&u.value.length===1?u.value[0]={key:"",values:""}:u.value.splice(C,1),p()};return(C,m)=>{const f=t.resolveComponent("KExternalLink"),w=t.resolveComponent("KSelect"),k=t.resolveComponent("KInput"),V=t.resolveComponent("KCheckbox"),D=t.resolveComponent("KLabel"),x=t.resolveComponent("KIcon"),H=t.resolveComponent("KButton"),E=t.resolveComponent("KMultiselect"),N=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-active-healthcheck",title:t.unref(r)("upstreams.form.active_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.active_health_check.help"))+" ",1),t.createVNode(f,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>{var I;return[t.createVNode(w,{appearance:"select",class:"active-healthcheck-type-select",items:i.value,label:t.unref(r)("upstreams.form.fields.active_healthcheck_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":m[0]||(m[0]=_=>l("update:type",_))},null,8,["items","label","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off","data-testid":"active-healthcheck-http-path",label:t.unref(r)("upstreams.form.fields.http_path.label"),"model-value":e.httpPath,readonly:e.readonly,type:"text","onUpdate:modelValue":m[1]||(m[1]=_=>l("update:http-path",_))},null,8,["label","model-value","readonly"])),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-timeout",label:t.unref(r)("upstreams.form.fields.timeout.label"),max:t.unref(Fi),min:t.unref(Ai),"model-value":e.timeout,readonly:e.readonly,type:"number","onUpdate:modelValue":m[2]||(m[2]=_=>l("update:timeout",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-concurrency",label:t.unref(r)("upstreams.form.fields.concurrency.label"),max:t.unref(qi),min:t.unref(Oi),"model-value":e.concurrency,readonly:e.readonly,type:"number","onUpdate:modelValue":m[3]||(m[3]=_=>l("update:concurrency",_))},null,8,["label","max","min","model-value","readonly"]),c.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-https-sni",label:t.unref(r)("upstreams.form.fields.https_sni.label"),"model-value":e.httpsSni,readonly:e.readonly,type:"text","onUpdate:modelValue":m[4]||(m[4]=_=>l("update:https-sni",_))},null,8,["label","model-value","readonly"]),t.createVNode(V,{"data-testid":"active-healthcheck-verify-ssl",disabled:e.readonly,label:t.unref(r)("upstreams.form.fields.verify_ssl.label"),"model-value":e.verifySsl,"onUpdate:modelValue":m[5]||(m[5]=_=>l("update:verify-ssl",_))},null,8,["disabled","label","model-value"])],64)):t.createCommentVNode("",!0),((I=e.config)==null?void 0:I.app)==="kongManager"?(t.openBlock(),t.createElementBlock("div",cc,[t.createVNode(D,{info:t.unref(r)("upstreams.form.fields.headers.tooltip_active"),"tooltip-attributes":{maxWidth:"250px"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.fields.headers.label")),1)]),_:1},8,["info"]),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(_,F)=>(t.openBlock(),t.createElementBlock("div",{key:`${_.header}_${F}`,class:t.normalizeClass(["headers-row",{"margin-top-6":F>0}])},[t.createVNode(k,{modelValue:u.value[F].key,"onUpdate:modelValue":O=>u.value[F].key=O,autocomplete:"off","data-testid":`active-healthcheck-headers-header-${F+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(k,{modelValue:u.value[F].values,"onUpdate:modelValue":O=>u.value[F].values=O,autocomplete:"off","data-testid":`active-healthcheck-headers-value-${F+1}`,readonly:e.readonly,type:"text",onBlur:p},null,8,["modelValue","onUpdate:modelValue","data-testid","readonly"]),t.createVNode(H,{appearance:"btn-link",class:"btn-remove","data-testid":"btn-remove-header",onClick:O=>y(F)},{icon:t.withCtx(()=>[t.createVNode(x,{class:"delete-item",icon:"trash"})]),_:2},1032,["onClick"]),u.value&&F===u.value.length-1?(t.openBlock(),t.createBlock(H,{key:0,appearance:"btn-link",class:"btn-add-header","data-testid":"btn-add-header",onClick:o},{icon:t.withCtx(()=>[t.createVNode(x,{color:"$kui-color-text-primary-strong",icon:"plus",size:"22"})]),_:1})):t.createCommentVNode("",!0)],2))),128))])])):t.createCommentVNode("",!0),t.createVNode(N,null,{body:t.withCtx(()=>[t.createElementVNode("h5",dc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.label")),1),t.createElementVNode("p",hc,t.toDisplayString(t.unref(r)("upstreams.form.healthy.help")),1),t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(La),min:t.unref(ja),"model-value":e.interval,readonly:e.readonly,type:"number","onUpdate:modelValue":m[6]||(m[6]=_=>l("update:interval",_))},null,8,["help","label","max","min","model-value","readonly"]),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":m[7]||(m[7]=_=>l("update:successes",_))},null,8,["label","max","min","model-value","readonly"]),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(E,{key:0,autocomplete:"off",class:"margin-top-6 active-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(Pe),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":m[8]||(m[8]=_=>t.unref(s)(_,!0)),"onItem:removed":m[9]||(m[9]=_=>t.unref(s)(_,!1)),"onUpdate:modelValue":m[10]||(m[10]=_=>l("update:http-statuses",_))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(N,null,{body:t.withCtx(()=>[t.createElementVNode("h5",pc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.label")),1),t.createElementVNode("p",uc,t.toDisplayString(t.unref(r)("upstreams.form.unhealthy.help")),1),t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-unhealthy-interval",help:t.unref(r)("upstreams.form.fields.interval.help"),label:t.unref(r)("upstreams.form.fields.interval.label"),max:t.unref(La),min:t.unref(ja),"model-value":e.unhealthyInterval,readonly:e.readonly,type:"number","onUpdate:modelValue":m[11]||(m[11]=_=>l("update:unhealthy-interval",_))},null,8,["help","label","max","min","model-value","readonly"]),h.value?(t.openBlock(),t.createBlock(k,{key:0,autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":m[12]||(m[12]=_=>l("update:tcp-failures",_))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(k,{autocomplete:"off",class:"margin-bottom-6","data-testid":"active-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":m[13]||(m[13]=_=>l("update:http-failures",_))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(E,{autocomplete:"off",class:"margin-bottom-6 active-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(Pe),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":m[14]||(m[14]=_=>t.unref(d)(_,!0)),"onItem:removed":m[15]||(m[15]=_=>t.unref(d)(_,!1)),"onUpdate:modelValue":m[16]||(m[16]=_=>l("update:unhealthy-http-statuses",_))},null,8,["items","label","model-value","readonly"])],64)),t.createVNode(k,{autocomplete:"off","data-testid":"active-healthcheck-unhealthy-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(Pa),min:t.unref(Ka),"model-value":e.unhealthyTimeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":m[17]||(m[17]=_=>l("update:unhealthy-timeouts",_))},null,8,["label","max","min","model-value","readonly"])]),_:1})]}),_:1},8,["title"])}}}),Gc="",mc=ce(fc,[["__scopeId","data-v-18b80e62"]]),gc={class:"fields-group-title"},yc={class:"fields-group-text"},kc={class:"fields-group-title"},bc={class:"fields-group-text"},Cc=t.defineComponent({__name:"UpstreamsFormPassiveHealthCheck",props:{type:{type:String,required:!0},successes:{type:String,required:!0},httpStatuses:{type:Array,required:!0},timeouts:{type:String,required:!0},httpFailures:{type:String,required:!0},unhealthyHttpStatuses:{type:Array,required:!0},tcpFailures:{type:String,required:!0},readonly:{type:Boolean,required:!1,default:!1}},emits:["update:type","update:successes","update:http-statuses","update:timeouts","update:http-failures","update:unhealthy-http-statuses","update:tcp-failures"],setup(e,{emit:l}){const a=e,{i18n:{t:r}}=ie.useI18n(),n=t.ref([{label:r("upstreams.form.healthcheck_type_labels.http"),value:"http",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.https"),value:"https",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.tcp"),value:"tcp",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsp"),value:"grpc",selected:!1},{label:r("upstreams.form.healthcheck_type_labels.grsps"),value:"grpcs",selected:!1}]),i=t.computed(()=>a.type==="tcp"),{trackNewItems:c}=Fe({replaceId:!0}),{trackNewItems:h}=Fe({replaceId:!0});return t.watch(()=>a.type,(s,d)=>{d==="tcp"&&s!==d&&l("update:tcp-failures","5"),d!=="tcp"&&s==="tcp"&&(l("update:http-statuses",mt),l("update:unhealthy-http-statuses",yt))}),(s,d)=>{const u=t.resolveComponent("KExternalLink"),p=t.resolveComponent("KSelect"),o=t.resolveComponent("KInput"),y=t.resolveComponent("KMultiselect"),C=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(t.unref(Ae),{class:"kong-ui-entities-upstreams-passive-healthcheck",title:t.unref(r)("upstreams.form.passive_health_check.title")},{description:t.withCtx(()=>[t.createElementVNode("p",null,[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.passive_health_check.help"))+" ",1),t.createVNode(u,{"hide-icon":"",href:t.unref(Re).upstreamObject},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("upstreams.form.buttons.view_documentation")),1)]),_:1},8,["href"])])]),default:t.withCtx(()=>[t.createVNode(p,{appearance:"select",class:"passive-healthcheck-type-select",items:n.value,label:t.unref(r)("upstreams.form.fields.passive_health_check_type.label"),"model-value":e.type,readonly:e.readonly,width:"100%","onUpdate:modelValue":d[0]||(d[0]=m=>l("update:type",m))},null,8,["items","label","model-value","readonly"]),t.createVNode(C,null,{body:t.withCtx(()=>[t.createElementVNode("h5",gc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.label")),1),t.createElementVNode("p",yc,t.toDisplayString(t.unref(r)("upstreams.form.passive_healthy.help")),1),t.createVNode(o,{autocomplete:"off","data-testid":"passive-healthcheck-successes",label:t.unref(r)("upstreams.form.fields.successes.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.successes,readonly:e.readonly,type:"number","onUpdate:modelValue":d[1]||(d[1]=m=>l("update:successes",m))},null,8,["label","max","min","model-value","readonly"]),i.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(y,{key:0,class:"margin-top-6 passive-healthcheck-http-statuses","enable-item-creation":"",items:t.unref(Pe),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.httpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[2]||(d[2]=m=>t.unref(c)(m,!0)),"onItem:removed":d[3]||(d[3]=m=>t.unref(c)(m,!1)),"onUpdate:modelValue":d[4]||(d[4]=m=>l("update:http-statuses",m))},null,8,["items","label","model-value","readonly"]))]),_:1}),t.createVNode(C,null,{body:t.withCtx(()=>[t.createElementVNode("h5",kc,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.label")),1),t.createElementVNode("p",bc,t.toDisplayString(t.unref(r)("upstreams.form.passive_unhealthy.help")),1),t.createVNode(o,{autocomplete:"off","data-testid":"passive-healthcheck-timeouts",label:t.unref(r)("upstreams.form.fields.timeouts.label"),max:t.unref(Pa),min:t.unref(Ka),"model-value":e.timeouts,readonly:e.readonly,type:"number","onUpdate:modelValue":d[5]||(d[5]=m=>l("update:timeouts",m))},null,8,["label","max","min","model-value","readonly"]),i.value?(t.openBlock(),t.createBlock(o,{key:0,autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-tcp-failures",label:t.unref(r)("upstreams.form.fields.tcp_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.tcpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[6]||(d[6]=m=>l("update:tcp-failures",m))},null,8,["label","max","min","model-value","readonly"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(o,{autocomplete:"off",class:"margin-top-6","data-testid":"passive-healthcheck-http-failures",label:t.unref(r)("upstreams.form.fields.http_failures.label"),max:t.unref(_e),min:t.unref(Ce),"model-value":e.httpFailures,readonly:e.readonly,type:"number","onUpdate:modelValue":d[7]||(d[7]=m=>l("update:http-failures",m))},null,8,["label","max","min","model-value","readonly"]),t.createVNode(y,{autocomplete:"off",class:"margin-top-6 passive-healthcheck-unhealthy-http-statuses","enable-item-creation":"",items:t.unref(Pe),label:t.unref(r)("upstreams.form.fields.http_statuses.label"),"model-value":e.unhealthyHttpStatuses,readonly:e.readonly,width:"100%","onItem:added":d[8]||(d[8]=m=>t.unref(h)(m,!0)),"onItem:removed":d[9]||(d[9]=m=>t.unref(h)(m,!1)),"onUpdate:modelValue":d[10]||(d[10]=m=>l("update:unhealthy-http-statuses",m))},null,8,["items","label","model-value","readonly"])],64))]),_:1})]),_:1},8,["title"])}}}),Zc="",_c=ce(Cc,[["__scopeId","data-v-6d6854e3"]]),wc={class:"kong-ui-entities-upstreams-form"},Sc=t.defineComponent({__name:"UpstreamsForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||(e==null?void 0:e.app)==="konnect"&&!(e!=null&&e.controlPlaneId)||(e==null?void 0:e.app)==="kongManager"&&typeof(e==null?void 0:e.workspace)!="string"||!(e!=null&&e.cancelRoute))},upstreamId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:l}){var v;const a=e,{inRange:r,stringToNumberArray:n,upstreamsResponseToFields:i,getDefaultUpstreamFields:c,objectsAreEqual:h,cloneDeep:s}=je(),{axiosInstance:d}=Ke({headers:(v=a.config)==null?void 0:v.requestHeaders}),{getMessageFromError:u}=$a(),p=ze.useRouter(),o=t.reactive({fields:c(),readonly:!1,errorMessage:""}),y=t.reactive(c()),C=t.computed(()=>!h(o.fields,y)),m=S=>{o.fields.activeHealthCheck.interval=S?"5":"0",o.fields.activeHealthCheck.successes=S?"5":"0",o.fields.activeHealthCheck.httpFailures=S?"5":"0",o.fields.activeHealthCheck.unhealthyInterval=S?"5":"0"},f=S=>{o.fields.passiveHealthCheck.timeouts=S?"5":"0",o.fields.passiveHealthCheck.successes=S?"80":"0"},w=t.computed(()=>o.fields.slots?r(o.fields.slots,pt,ut):!0),k=t.computed(()=>o.fields.hashOn==="header"?!!o.fields.hashOnHeader:!0),V=t.computed(()=>o.fields.hashOn==="cookie"||o.fields.hashFallback==="cookie"?!!o.fields.hashOnCookie:!0),D=t.computed(()=>o.fields.hashOn==="cookie"||o.fields.hashFallback==="cookie"?!!o.fields.hashOnCookiePath:!0),x=t.computed(()=>o.fields.hashOn==="query_arg"?!!o.fields.hashOnQueryArgument:!0),H=t.computed(()=>o.fields.hashOn==="uri_capture"?!!o.fields.hashOnUriCapture:!0),E=t.computed(()=>o.fields.hashFallback==="header"?!!o.fields.hashFallbackHeader:!0),N=t.computed(()=>o.fields.hashFallback==="query_arg"?!!o.fields.hashFallbackQueryArgument:!0),I=t.computed(()=>o.fields.hashFallback==="uri_capture"?!!o.fields.hashFallbackUriCapture:!0),_=t.computed(()=>!!o.fields.name&&w.value&&k.value&&V.value&&D.value&&x.value&&H.value&&E.value&&N.value&&I.value),F=t.computed(()=>a.upstreamId?re.Edit:re.Create),O=t.computed(()=>{var S,g;return(g=xe.form[(S=a.config)==null?void 0:S.app])==null?void 0:g.edit}),M=S=>{Object.assign(o.fields,i(S)),Object.assign(y,s(o.fields))},A=()=>{var S;p.push(((S=a.config)==null?void 0:S.cancelRoute)||{name:"upstreams-list"})},U=S=>{l("loading",S)},K=S=>{l("error",S)},B=()=>{var g,b,P,R,ae;const S={name:o.fields.name,slots:Number(o.fields.slots),algorithm:o.fields.algorithm,hash_on:o.fields.hashOn,hash_fallback:o.fields.hashFallback,healthchecks:{}};return o.fields.hostHeader&&(S.host_header=o.fields.hostHeader),o.fields.clientCertificate&&(S.client_certificate={id:o.fields.clientCertificate}),o.fields.healthchecksThreshold&&(S.healthchecks.threshold=Number(o.fields.healthchecksThreshold)),o.fields.tags&&(S.tags=(b=(g=o.fields.tags.split(","))==null?void 0:g.map(j=>String(j||"").trim()))==null?void 0:b.filter(j=>j!=="")),o.fields.hashOn==="header"&&(S.hash_on_header=o.fields.hashOnHeader),(o.fields.hashOn==="cookie"||o.fields.hashFallback==="cookie")&&(S.hash_on_cookie=o.fields.hashOnCookie,S.hash_on_cookie_path=o.fields.hashOnCookiePath),o.fields.hashOn==="query_arg"&&(S.hash_on_query_arg=o.fields.hashOnQueryArgument),o.fields.hashOn==="uri_capture"&&(S.hash_on_uri_capture=o.fields.hashOnUriCapture),o.fields.hashFallback==="header"&&(S.hash_fallback_header=o.fields.hashFallbackHeader),o.fields.hashFallback==="query_arg"&&(S.hash_fallback_query_arg=o.fields.hashFallbackQueryArgument),o.fields.hashFallback==="uri_capture"&&(S.hash_fallback_uri_capture=o.fields.hashFallbackUriCapture),o.fields.activeHealthSwitch?(S.healthchecks.active={type:o.fields.activeHealthCheck.type,healthy:{},unhealthy:{}},o.fields.activeHealthCheck.timeout&&(S.healthchecks.active.timeout=Number(o.fields.activeHealthCheck.timeout)),o.fields.activeHealthCheck.concurrency&&(S.healthchecks.active.concurrency=Number(o.fields.activeHealthCheck.concurrency)),o.fields.activeHealthCheck.type!=="tcp"&&o.fields.activeHealthCheck.httpPath&&(S.healthchecks.active.http_path=o.fields.activeHealthCheck.httpPath),((P=a.config)==null?void 0:P.app)==="kongManager"&&(o.fields.activeHealthCheck.headers.length===0?S.healthchecks.active.headers=[]:S.healthchecks.active.headers=o.fields.activeHealthCheck.headers.reduce((j,W)=>{var fe,Oe;return W.key?{...j,[W.key]:(Oe=(fe=W.values.split(","))==null?void 0:fe.map(Ne=>String(Ne||"").trim()))==null?void 0:Oe.filter(Ne=>Ne!=="")}:{...j}},{})),(o.fields.activeHealthCheck.type==="https"||o.fields.activeHealthCheck.type==="grpcs")&&o.fields.activeHealthCheck.httpsSni&&(S.healthchecks.active.https_sni=o.fields.activeHealthCheck.httpsSni),(o.fields.activeHealthCheck.type==="https"||o.fields.activeHealthCheck.type==="grpcs")&&(S.healthchecks.active.https_verify_certificate=o.fields.activeHealthCheck.verifySsl),o.fields.activeHealthCheck.interval&&(S.healthchecks.active.healthy.interval=Number(o.fields.activeHealthCheck.interval)),o.fields.activeHealthCheck.successes&&(S.healthchecks.active.healthy.successes=Number(o.fields.activeHealthCheck.successes)),o.fields.activeHealthCheck.type!=="tcp"&&o.fields.activeHealthCheck.httpStatuses&&(S.healthchecks.active.healthy.http_statuses=n(o.fields.activeHealthCheck.httpStatuses)),o.fields.activeHealthCheck.unhealthyInterval&&(S.healthchecks.active.unhealthy.interval=Number(o.fields.activeHealthCheck.unhealthyInterval)),o.fields.activeHealthCheck.unhealthyTimeouts&&(S.healthchecks.active.unhealthy.timeouts=Number(o.fields.activeHealthCheck.unhealthyTimeouts)),o.fields.activeHealthCheck.type!=="tcp"&&o.fields.activeHealthCheck.unhealthyHttpStatuses&&(S.healthchecks.active.unhealthy.http_statuses=n(o.fields.activeHealthCheck.unhealthyHttpStatuses)),o.fields.activeHealthCheck.type!=="tcp"&&o.fields.activeHealthCheck.httpFailures&&(S.healthchecks.active.unhealthy.http_failures=Number(o.fields.activeHealthCheck.httpFailures)),o.fields.activeHealthCheck.type==="tcp"&&o.fields.activeHealthCheck.tcpFailures&&(S.healthchecks.active.unhealthy.tcp_failures=Number(o.fields.activeHealthCheck.tcpFailures))):((R=a.config)==null?void 0:R.app)==="kongManager"&&F.value===re.Edit&&(S.healthchecks.active={type:o.fields.activeHealthCheck.type,headers:{},healthy:{interval:0},unhealthy:{interval:0}}),o.fields.passiveHealthSwitch?(S.healthchecks.passive={type:o.fields.passiveHealthCheck.type,healthy:{},unhealthy:{}},o.fields.passiveHealthCheck.successes&&(S.healthchecks.passive.healthy.successes=Number(o.fields.passiveHealthCheck.successes)),o.fields.passiveHealthCheck.type!=="tcp"&&o.fields.passiveHealthCheck.httpStatuses&&(S.healthchecks.passive.healthy.http_statuses=n(o.fields.passiveHealthCheck.httpStatuses)),o.fields.passiveHealthCheck.timeouts&&(S.healthchecks.passive.unhealthy.timeouts=Number(o.fields.passiveHealthCheck.timeouts)),o.fields.passiveHealthCheck.type!=="tcp"&&o.fields.passiveHealthCheck.unhealthyHttpStatuses&&(S.healthchecks.passive.unhealthy.http_statuses=n(o.fields.passiveHealthCheck.unhealthyHttpStatuses)),o.fields.passiveHealthCheck.type!=="tcp"&&o.fields.passiveHealthCheck.httpFailures&&(S.healthchecks.passive.unhealthy.http_failures=Number(o.fields.passiveHealthCheck.httpFailures)),o.fields.passiveHealthCheck.type==="tcp"&&o.fields.passiveHealthCheck.tcpFailures&&(S.healthchecks.passive.unhealthy.tcp_failures=Number(o.fields.passiveHealthCheck.tcpFailures))):((ae=a.config)==null?void 0:ae.app)==="kongManager"&&F.value===re.Edit&&(S.healthchecks.passive={type:o.fields.passiveHealthCheck.type,healthy:{successes:0},unhealthy:{timeouts:0,tcp_failures:0,http_failures:0}}),S},q=S=>{var b,P,R,ae,j,W;let g=`${(b=a.config)==null?void 0:b.apiBaseUrl}${xe.form[(P=a.config)==null?void 0:P.app][S]}`;return((R=a.config)==null?void 0:R.app)==="konnect"?g=g.replace(/{controlPlaneId}/gi,((ae=a.config)==null?void 0:ae.controlPlaneId)||""):((j=a.config)==null?void 0:j.app)==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(W=a.config)!=null&&W.workspace?`/${a.config.workspace}`:"")),g=g.replace(/{id}/gi,a.upstreamId),g},$=async()=>{var S;try{o.readonly=!0,await d.post(q("validate"),B());let g;F.value===re.Create?g=await d.post(q("create"),B()):F.value===re.Edit&&(g=((S=a.config)==null?void 0:S.app)==="konnect"?await d.put(q("edit"),B()):await d.patch(q("edit"),B())),l("update",g==null?void 0:g.data)}catch(g){o.errorMessage=u(g),l("error",g)}finally{o.readonly=!1}};return(S,g)=>(t.openBlock(),t.createElementBlock("div",wc,[t.createVNode(t.unref(Oa),{"can-submit":_.value&&C.value,config:e.config,"edit-id":e.upstreamId,"error-message":o.errorMessage,"fetch-url":O.value,"is-readonly":o.readonly,onCancel:A,"onFetch:error":K,"onFetch:success":M,onLoading:U,onSubmit:$},{default:t.withCtx(()=>[t.createVNode(Yi,{"client-certificate":o.fields.clientCertificate,"onUpdate:clientCertificate":g[0]||(g[0]=b=>o.fields.clientCertificate=b),"host-header":o.fields.hostHeader,"onUpdate:hostHeader":g[1]||(g[1]=b=>o.fields.hostHeader=b),name:o.fields.name,"onUpdate:name":g[2]||(g[2]=b=>o.fields.name=b),tags:o.fields.tags,"onUpdate:tags":g[3]||(g[3]=b=>o.fields.tags=b),config:e.config,readonly:o.readonly},null,8,["client-certificate","host-header","name","tags","config","readonly"]),t.createVNode(ac,{algorithm:o.fields.algorithm,"onUpdate:algorithm":g[4]||(g[4]=b=>o.fields.algorithm=b),"hash-fallback":o.fields.hashFallback,"onUpdate:hashFallback":g[5]||(g[5]=b=>o.fields.hashFallback=b),"hash-fallback-header":o.fields.hashFallbackHeader,"onUpdate:hashFallbackHeader":g[6]||(g[6]=b=>o.fields.hashFallbackHeader=b),"hash-fallback-query-argument":o.fields.hashFallbackQueryArgument,"onUpdate:hashFallbackQueryArgument":g[7]||(g[7]=b=>o.fields.hashFallbackQueryArgument=b),"hash-fallback-uri-capture":o.fields.hashFallbackUriCapture,"onUpdate:hashFallbackUriCapture":g[8]||(g[8]=b=>o.fields.hashFallbackUriCapture=b),"hash-on":o.fields.hashOn,"onUpdate:hashOn":g[9]||(g[9]=b=>o.fields.hashOn=b),"hash-on-cookie":o.fields.hashOnCookie,"onUpdate:hashOnCookie":g[10]||(g[10]=b=>o.fields.hashOnCookie=b),"hash-on-cookie-path":o.fields.hashOnCookiePath,"onUpdate:hashOnCookiePath":g[11]||(g[11]=b=>o.fields.hashOnCookiePath=b),"hash-on-header":o.fields.hashOnHeader,"onUpdate:hashOnHeader":g[12]||(g[12]=b=>o.fields.hashOnHeader=b),"hash-on-query-argument":o.fields.hashOnQueryArgument,"onUpdate:hashOnQueryArgument":g[13]||(g[13]=b=>o.fields.hashOnQueryArgument=b),"hash-on-uri-capture":o.fields.hashOnUriCapture,"onUpdate:hashOnUriCapture":g[14]||(g[14]=b=>o.fields.hashOnUriCapture=b),slots:o.fields.slots,"onUpdate:slots":g[15]||(g[15]=b=>o.fields.slots=b),readonly:o.readonly},null,8,["algorithm","hash-fallback","hash-fallback-header","hash-fallback-query-argument","hash-fallback-uri-capture","hash-on","hash-on-cookie","hash-on-cookie-path","hash-on-header","hash-on-query-argument","hash-on-uri-capture","slots","readonly"]),t.createVNode(ic,{"active-health-switch":o.fields.activeHealthSwitch,"onUpdate:activeHealthSwitch":[g[16]||(g[16]=b=>o.fields.activeHealthSwitch=b),m],"healthchecks-threshold":o.fields.healthchecksThreshold,"onUpdate:healthchecksThreshold":g[17]||(g[17]=b=>o.fields.healthchecksThreshold=b),"passive-health-switch":o.fields.passiveHealthSwitch,"onUpdate:passiveHealthSwitch":[g[18]||(g[18]=b=>o.fields.passiveHealthSwitch=b),f],readonly:o.readonly},null,8,["active-health-switch","healthchecks-threshold","passive-health-switch","readonly"]),o.fields.activeHealthSwitch?(t.openBlock(),t.createBlock(mc,{key:0,concurrency:o.fields.activeHealthCheck.concurrency,"onUpdate:concurrency":g[19]||(g[19]=b=>o.fields.activeHealthCheck.concurrency=b),headers:o.fields.activeHealthCheck.headers,"onUpdate:headers":g[20]||(g[20]=b=>o.fields.activeHealthCheck.headers=b),"http-failures":o.fields.activeHealthCheck.httpFailures,"onUpdate:httpFailures":g[21]||(g[21]=b=>o.fields.activeHealthCheck.httpFailures=b),"http-path":o.fields.activeHealthCheck.httpPath,"onUpdate:httpPath":g[22]||(g[22]=b=>o.fields.activeHealthCheck.httpPath=b),"http-statuses":o.fields.activeHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[23]||(g[23]=b=>o.fields.activeHealthCheck.httpStatuses=b),"https-sni":o.fields.activeHealthCheck.httpsSni,"onUpdate:httpsSni":g[24]||(g[24]=b=>o.fields.activeHealthCheck.httpsSni=b),interval:o.fields.activeHealthCheck.interval,"onUpdate:interval":g[25]||(g[25]=b=>o.fields.activeHealthCheck.interval=b),successes:o.fields.activeHealthCheck.successes,"onUpdate:successes":g[26]||(g[26]=b=>o.fields.activeHealthCheck.successes=b),"tcp-failures":o.fields.activeHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[27]||(g[27]=b=>o.fields.activeHealthCheck.tcpFailures=b),timeout:o.fields.activeHealthCheck.timeout,"onUpdate:timeout":g[28]||(g[28]=b=>o.fields.activeHealthCheck.timeout=b),type:o.fields.activeHealthCheck.type,"onUpdate:type":g[29]||(g[29]=b=>o.fields.activeHealthCheck.type=b),"unhealthy-http-statuses":o.fields.activeHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[30]||(g[30]=b=>o.fields.activeHealthCheck.unhealthyHttpStatuses=b),"unhealthy-interval":o.fields.activeHealthCheck.unhealthyInterval,"onUpdate:unhealthyInterval":g[31]||(g[31]=b=>o.fields.activeHealthCheck.unhealthyInterval=b),"unhealthy-timeouts":o.fields.activeHealthCheck.unhealthyTimeouts,"onUpdate:unhealthyTimeouts":g[32]||(g[32]=b=>o.fields.activeHealthCheck.unhealthyTimeouts=b),"verify-ssl":o.fields.activeHealthCheck.verifySsl,"onUpdate:verifySsl":g[33]||(g[33]=b=>o.fields.activeHealthCheck.verifySsl=b),config:e.config,readonly:o.readonly},null,8,["concurrency","headers","http-failures","http-path","http-statuses","https-sni","interval","successes","tcp-failures","timeout","type","unhealthy-http-statuses","unhealthy-interval","unhealthy-timeouts","verify-ssl","config","readonly"])):t.createCommentVNode("",!0),o.fields.passiveHealthSwitch?(t.openBlock(),t.createBlock(_c,{key:1,"http-failures":o.fields.passiveHealthCheck.httpFailures,"onUpdate:httpFailures":g[34]||(g[34]=b=>o.fields.passiveHealthCheck.httpFailures=b),"http-statuses":o.fields.passiveHealthCheck.httpStatuses,"onUpdate:httpStatuses":g[35]||(g[35]=b=>o.fields.passiveHealthCheck.httpStatuses=b),successes:o.fields.passiveHealthCheck.successes,"onUpdate:successes":g[36]||(g[36]=b=>o.fields.passiveHealthCheck.successes=b),"tcp-failures":o.fields.passiveHealthCheck.tcpFailures,"onUpdate:tcpFailures":g[37]||(g[37]=b=>o.fields.passiveHealthCheck.tcpFailures=b),timeouts:o.fields.passiveHealthCheck.timeouts,"onUpdate:timeouts":g[38]||(g[38]=b=>o.fields.passiveHealthCheck.timeouts=b),type:o.fields.passiveHealthCheck.type,"onUpdate:type":g[39]||(g[39]=b=>o.fields.passiveHealthCheck.type=b),"unhealthy-http-statuses":o.fields.passiveHealthCheck.unhealthyHttpStatuses,"onUpdate:unhealthyHttpStatuses":g[40]||(g[40]=b=>o.fields.passiveHealthCheck.unhealthyHttpStatuses=b),readonly:o.readonly},null,8,["http-failures","http-statuses","successes","tcp-failures","timeouts","type","unhealthy-http-statuses","readonly"])):t.createCommentVNode("",!0)]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])]))}}),Xc="",xc=ce(Sc,[["__scopeId","data-v-810fb7b7"]]),Nc=t.createElementVNode("code",null,"10",-1),Vc=t.createElementVNode("code",null,"65536",-1),Bc={"data-testid":"client_certificate-plain-text"},Ic=t.defineComponent({__name:"UpstreamsConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e){const l=e,{i18n:{t:a},i18nT:r}=ie.useI18n(),{getPropValue:n}=Bi(),i=t.computed(()=>xe.form[l.config.app].edit),c=t.ref({id:{},name:{},created_at:{},updated_at:{},algorithm:{order:5,section:z.Basic,tooltip:a("upstreams.form.fields.algorithm.tooltip")},slots:{order:6,section:z.Basic},hash_on:{order:7,section:z.Basic},hash_on_header:{order:8,section:z.Basic},hash_on_uri_capture:{order:9,section:z.Basic},hash_on_query_arg:{order:10,section:z.Basic,label:`${a("upstreams.form.fields.hash_on.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_on_cookie:{order:11,section:z.Basic},hash_on_cookie_path:{order:12,section:z.Basic},healthchecks:{order:13,section:z.Basic,type:L.Json},tags:{order:14,tooltip:a("upstreams.form.hash_tooltips.tags")},hash_fallback:{order:1},hash_fallback_header:{order:2},hash_fallback_query_arg:{order:3,label:`${a("upstreams.form.fields.hash_fallback.label")} ${a("upstreams.form.hash_labels.query_argument")}`},hash_fallback_uri_capture:{order:4},host_header:{order:5},use_srv_name:{order:6},client_certificate:{order:7,tooltip:a("upstreams.form.hash_tooltips.client_certificate")}});return(h,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(t.unref(Xs),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":c.value,"fetch-url":i.value,"hide-title":e.hideTitle,"onCopy:success":s[0]||(s[0]=d=>h.$emit("copy:success",d)),"onFetch:error":s[1]||(s[1]=d=>h.$emit("fetch:error",d)),"onFetch:success":s[2]||(s[2]=d=>h.$emit("fetch:success",d)),onLoading:s[3]||(s[3]=d=>h.$emit("loading",d))},{"name-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.name.tooltip",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.fields.name.host")),1)]),_:1})]),"hash_on-label-tooltip":t.withCtx(({row:d})=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.fields.hash_on.tooltip",scope:"global"},{result:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(d.value),1)]),_:2},1024)]),"hash_on_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_header.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.hash_on")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_header.header")),1)]),_:1})]),"hash_on_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_uri_capture.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")),1)]),_:1})]),"hash_on_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_query_arg.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")),1)]),_:1})]),"hash_on_cookie-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")),1)]),_:1})]),"hash_on_cookie_path-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_on_cookie_path.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")),1)]),hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")),1)]),_:1})]),"slots-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.slots.text",scope:"global"},{algorithm:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.algorithm")),1)]),round_robin:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.round_robin")),1)]),consistent_hashing:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.slots.consistent_hashing")),1)]),min:t.withCtx(()=>[Nc]),max:t.withCtx(()=>[Vc]),_:1})]),"hash_fallback-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback.text",scope:"global"},{hash_on:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.hash_on")),1)]),cookie:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback.cookie")),1)]),_:1})]),"hash_fallback_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_header.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")),1)]),header:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_header.header")),1)]),_:1})]),"hash_fallback_query_arg-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_query_arg.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")),1)]),query_arg:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")),1)]),_:1})]),"hash_fallback_uri_capture-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",scope:"global"},{hash_fallback:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")),1)]),uri_capture:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")),1)]),_:1})]),"host_header-label-tooltip":t.withCtx(()=>[t.createVNode(t.unref(r),{keypath:"upstreams.form.hash_tooltips.host_header.text",scope:"global"},{host:t.withCtx(()=>[t.createElementVNode("code",null,t.toDisplayString(t.unref(a)("upstreams.form.hash_tooltips.host_header.host")),1)]),_:1})]),client_certificate:t.withCtx(d=>{var u;return[t.createElementVNode("div",null,[t.createElementVNode("div",Bc,[t.createElementVNode("span",null,t.toDisplayString((u=t.unref(n)("rowValue",d))==null?void 0:u.id),1)])])]}),_:1},8,["config","config-card-doc","config-schema","fetch-url","hide-title"])]))}});X.TargetForm=Ra,X.TargetsList=Ji,X.UpstreamsConfigCard=Ic,X.UpstreamsForm=xc,X.UpstreamsList=Di,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-7410504d] .k-button.navigation-button{font-size:14px;font-weight:400}.kong-ui-copy-uuid[data-v-bfdaf6f7]{display:flex}.kong-ui-copy-uuid .uuid-container[data-v-bfdaf6f7]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-bfdaf6f7]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-bfdaf6f7]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-bfdaf6f7]{display:flex}.config-card-details-row[data-v-a3c5ab01]{border-bottom:var(--2c6ac268);display:var(--c7a65802);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-a3c5ab01]{width:var(--778426fe)}.config-card-details-row .config-card-details-label label[data-v-a3c5ab01]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-a3c5ab01]{width:var(--777f9b48)}.config-card-details-row .config-card-details-value .truncated[data-v-a3c5ab01]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-a3c5ab01]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-a3c5ab01] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-a3c5ab01]{display:flex}.config-card-details-row .config-badge[data-v-a3c5ab01]{margin-right:4px}.config-card-details-row[data-v-a3c5ab01] .k-input-label{margin-bottom:0}.config-card-details-row[data-v-a3c5ab01] .k-input-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-a3c5ab01] .config-card-details-row{width:auto}.config-card-display-json #config-card-codeblock .k-highlighted-code-block code,.config-card-display-yaml #config-card-codeblock .k-highlighted-code-block code{background-color:#232633}.config-card-prop-section-title[data-v-a58d7adb]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-64349aa2] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-64349aa2]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-64349aa2]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-64349aa2]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-64349aa2] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-64349aa2]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-2286e5f2]{border:1px solid #F1F1F5!important;box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-2286e5f2]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-2286e5f2] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-f8a220e9] [role=button]{display:inline}.kong-ui-entity-base-table[data-v-a598b1d9]{border:1px solid #F1F1F5!important}.kong-ui-entity-base-table .toolbar-container[data-v-a598b1d9]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-a598b1d9]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-a598b1d9]{float:right}.kong-ui-entity-base-table .actions-container[data-v-a598b1d9] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-a598b1d9]{background-color:#0000!important;border:none!important;cursor:pointer!important;font-weight:400!important}.k-tabs>.tab-container>.kong-ui-entity-base-table,.k-tabs>.tab-container>[class^=kong-ui-entities-]>.kong-ui-entity-base-table{border-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-1c9a2a07],.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-1c9a2a07]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{margin-top:32px}.kong-ui-entity-delete-error[data-v-1c9a2a07]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-745f38c0]{width:100%}.kong-ui-entity-filter[data-v-745f38c0]{display:flex;position:relative}.kong-ui-entity-filter[data-v-745f38c0] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-745f38c0] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-745f38c0]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-745f38c0]{box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;position:absolute;top:100%;z-index:1060}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-745f38c0]{align-items:center;display:flex}.menu-item-indicator[data-v-745f38c0]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-745f38c0]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-745f38c0] .k-input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-745f38c0] .k-input-wrapper{width:100%}.menu-item-body[data-v-745f38c0] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-745f38c0] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-745f38c0]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-745f38c0]{display:flex;justify-content:space-between;margin:10px 0 6px}fieldset[data-v-8b6dc312]{margin:0;padding:0}.kong-ui-entity-form-section[data-v-8b6dc312]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-8b6dc312]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-8b6dc312]{color:#000933;font-size:18px;font-weight:600;line-height:24px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-8b6dc312]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-8b6dc312]{border-bottom:1px solid #e0e4ea}.kong-ui-entities-upstreams-list .kong-ui-entity-filter-input[data-v-033bd1ef]{width:300px}.kong-ui-entities-upstreams-list .upstream-name[data-v-033bd1ef]{font-weight:600}[data-v-77134304] .kong-card{padding:0}[data-v-77134304] .kong-card.border{border:0!important}[data-v-77134304] .kong-card.borderTop{border-top:0!important}[data-v-77134304] .k-prompt-proceed .kong-icon-spinner{display:var(--2cc5362c)}.kong-ui-entities-target-form[data-v-77134304]{width:100%}.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-77134304],.kong-ui-entities-target-form .target-form-container .target-form-info p[data-v-77134304],.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-77134304] p{color:#000933;font-size:14px;line-height:24px;margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-77134304]{margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-77134304]:last-of-type{margin-bottom:0}.kong-ui-entities-target-form[data-v-77134304] .k-alert{margin-top:20px}.kong-ui-entities-target-form[data-v-77134304] .form-actions{display:none!important}.kong-ui-entities-targets-list .target-address[data-v-aba40390]{font-weight:600}.margin-bottom-6[data-v-02065a3d]{margin-bottom:24px}.fields-group-title[data-v-522adce0]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-522adce0]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-522adce0]{margin-top:24px}.fields-group-title[data-v-7fda4841]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-7fda4841]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-bottom-6[data-v-18b80e62]{margin-bottom:24px}.margin-top-6[data-v-18b80e62]{margin-top:24px}.fields-group-title[data-v-18b80e62]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-18b80e62]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.headers-row[data-v-18b80e62]{align-items:center;column-gap:16px;display:flex}.fields-group-title[data-v-6d6854e3]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-6d6854e3]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-6d6854e3]{margin-top:24px}.kong-ui-entities-upstreams-form[data-v-810fb7b7]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-upstreams-form[data-v-810fb7b7] .form-section-wrapper{column-gap:64px}}
1
+ .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-7410504d] .k-button.navigation-button{font-size:14px;font-weight:400}.kong-ui-copy-uuid[data-v-bfdaf6f7]{display:flex}.kong-ui-copy-uuid .uuid-container[data-v-bfdaf6f7]{margin-right:12px;white-space:nowrap}.kong-ui-copy-uuid .truncated-uuid[data-v-bfdaf6f7]{margin-right:1ch;max-width:10ch;overflow:hidden;text-overflow:ellipsis}.kong-ui-copy-uuid .uuid-icon-wrapper[data-v-bfdaf6f7]{align-items:center;cursor:pointer;display:flex}.kong-ui-copy-uuid .uuid-icon[data-v-bfdaf6f7]{display:flex}.config-card-details-row[data-v-a3c5ab01]{border-bottom:var(--2c6ac268);display:var(--c7a65802);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-a3c5ab01]{width:var(--778426fe)}.config-card-details-row .config-card-details-label label[data-v-a3c5ab01]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-a3c5ab01]{width:var(--777f9b48)}.config-card-details-row .config-card-details-value .truncated[data-v-a3c5ab01]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-a3c5ab01]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-a3c5ab01] .kong-ui-copy-uuid:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-a3c5ab01]{display:flex}.config-card-details-row .config-badge[data-v-a3c5ab01]{margin-right:4px}.config-card-details-row[data-v-a3c5ab01] .k-input-label{margin-bottom:0}.config-card-details-row[data-v-a3c5ab01] .k-input-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-a3c5ab01] .config-card-details-row{width:auto}.config-card-display-json #config-card-codeblock .k-highlighted-code-block code,.config-card-display-yaml #config-card-codeblock .k-highlighted-code-block code{background-color:#232633}.config-card-prop-section-title[data-v-a58d7adb]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-64349aa2] .k-card-content .k-card-body{font-size:14px}.kong-ui-entity-base-config-card .config-card-actions[data-v-64349aa2]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-64349aa2]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-64349aa2]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-64349aa2] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-64349aa2]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-44a90aae]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-44a90aae]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-44a90aae] .k-button:last-of-type{margin-left:16px}.content-wrapper[data-v-f8a220e9] [role=button]{display:inline}.kong-ui-entity-base-table .toolbar-container[data-v-2622d034]{align-items:center}.kong-ui-entity-base-table .toolbar-button-container[data-v-2622d034]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-2622d034]{float:right}.kong-ui-entity-base-table .actions-container[data-v-2622d034] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table .actions-trigger[data-v-2622d034]{background-color:#0000!important;border:none!important;cursor:pointer!important;font-weight:400!important}.k-tabs>.tab-container>.kong-ui-entity-base-table,.k-tabs>.tab-container>[class^=kong-ui-entities-]>.kong-ui-entity-base-table{border-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-1c9a2a07],.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-1c9a2a07]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-1c9a2a07]{margin-top:32px}.kong-ui-entity-delete-error[data-v-1c9a2a07]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-745f38c0]{width:100%}.kong-ui-entity-filter[data-v-745f38c0]{display:flex;position:relative}.kong-ui-entity-filter[data-v-745f38c0] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-745f38c0] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-745f38c0]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-745f38c0]{box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;position:absolute;top:100%;z-index:1060}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus{box-shadow:none}.kong-ui-entity-filter-menu[data-v-745f38c0] .k-menu-item .menu-button:focus-visible{box-shadow:0 0 0 1px #bee2ff}.menu-item-title[data-v-745f38c0]{align-items:center;display:flex}.menu-item-indicator[data-v-745f38c0]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-745f38c0]{align-items:center;display:flex;justify-content:space-between}.menu-item-body[data-v-745f38c0] .k-input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-745f38c0] .k-input-wrapper{width:100%}.menu-item-body[data-v-745f38c0] .k-select-input .k-input{font-size:12px}.menu-item-body[data-v-745f38c0] .k-select-input .k-input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-745f38c0]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-745f38c0]{display:flex;justify-content:space-between;margin:10px 0 6px}fieldset[data-v-8b6dc312]{margin:0;padding:0}.kong-ui-entity-form-section[data-v-8b6dc312]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-8b6dc312]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-8b6dc312]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-8b6dc312]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-8b6dc312]{color:#000933;font-size:18px;font-weight:600;line-height:24px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-8b6dc312],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-8b6dc312] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-8b6dc312]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-8b6dc312]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-8b6dc312]{border-bottom:1px solid #e0e4ea}.kong-ui-entities-upstreams-list .kong-ui-entity-filter-input[data-v-033bd1ef]{width:300px}.kong-ui-entities-upstreams-list .upstream-name[data-v-033bd1ef]{font-weight:600}[data-v-77134304] .kong-card{padding:0}[data-v-77134304] .kong-card.border{border:0!important}[data-v-77134304] .kong-card.borderTop{border-top:0!important}[data-v-77134304] .k-prompt-proceed .kong-icon-spinner{display:var(--2cc5362c)}.kong-ui-entities-target-form[data-v-77134304]{width:100%}.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-77134304],.kong-ui-entities-target-form .target-form-container .target-form-info p[data-v-77134304],.kong-ui-entities-target-form .target-form-container .target-form-info[data-v-77134304] p{color:#000933;font-size:14px;line-height:24px;margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-77134304]{margin-bottom:32px}.kong-ui-entities-target-form .target-form-container .target-form-input[data-v-77134304]:last-of-type{margin-bottom:0}.kong-ui-entities-target-form[data-v-77134304] .k-alert{margin-top:20px}.kong-ui-entities-target-form[data-v-77134304] .form-actions{display:none!important}.kong-ui-entities-targets-list .target-address[data-v-aba40390]{font-weight:600}.margin-bottom-6[data-v-02065a3d]{margin-bottom:24px}.fields-group-title[data-v-522adce0]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-522adce0]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-522adce0]{margin-top:24px}.fields-group-title[data-v-7fda4841]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-7fda4841]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-bottom-6[data-v-18b80e62]{margin-bottom:24px}.margin-top-6[data-v-18b80e62]{margin-top:24px}.fields-group-title[data-v-18b80e62]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-18b80e62]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.headers-row[data-v-18b80e62]{align-items:center;column-gap:16px;display:flex}.fields-group-title[data-v-6d6854e3]{color:#000933;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-6d6854e3]{color:#828a9e;font-size:14px;line-height:20px;margin-bottom:24px;margin-top:0}.margin-top-6[data-v-6d6854e3]{margin-top:24px}.kong-ui-entities-upstreams-form[data-v-810fb7b7]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-upstreams-form[data-v-810fb7b7] .form-section-wrapper{column-gap:64px}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-upstreams-targets",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-upstreams-targets.umd.js",
6
6
  "module": "./dist/entities-upstreams-targets.es.js",
@@ -49,7 +49,7 @@
49
49
  "errorLimit": "900KB"
50
50
  },
51
51
  "dependencies": {
52
- "@kong-ui-public/entities-shared": "^1.5.1"
52
+ "@kong-ui-public/entities-shared": "^1.6.0"
53
53
  },
54
54
  "scripts": {
55
55
  "dev": "cross-env USE_SANDBOX=true vite",