@kong-ui-public/entities-gateway-services 3.13.13 → 3.13.14-pr.2604.83e30815e.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -619,8 +619,8 @@ const X = {
619
619
  default: d(() => [
620
620
  U(h(r(a)("actions.copy_id")), 1)
621
621
  ]),
622
- _: 2
623
- }, 1032, ["onClick"])
622
+ _: 1
623
+ }, 8, ["onClick"])
624
624
  ]),
625
625
  _: 2
626
626
  }, 1024),
@@ -633,8 +633,8 @@ const X = {
633
633
  default: d(() => [
634
634
  U(h(r(a)("actions.copy_json")), 1)
635
635
  ]),
636
- _: 2
637
- }, 1032, ["onClick"])
636
+ _: 1
637
+ }, 8, ["onClick"])
638
638
  ]),
639
639
  _: 2
640
640
  }, 1024),
@@ -674,8 +674,8 @@ const X = {
674
674
  default: d(() => [
675
675
  U(h(r(a)("actions.delete.menu_label")), 1)
676
676
  ]),
677
- _: 2
678
- }, 1032, ["onClick"])
677
+ _: 1
678
+ }, 8, ["onClick"])
679
679
  ]),
680
680
  _: 2
681
681
  }, 1032, ["auth-function"])
@@ -1 +1 @@
1
- (function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E["kong-ui-public-entities-gateway-services"]={},E.Vue,E.VueRouter,E.KongIcons,E["kong-ui-public-i18n"],E["kong-ui-public-entities-shared"]))})(this,function(E,e,Ve,J,ke,p){"use strict";const Ee={actions:{create:"New gateway service",serverless_create:"Add a Service",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",clear:"Clear",view:"View Details",delete:{title:"Delete a Gateway Service",description:"Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",menu_label:"Delete"}},search:{placeholder:{konnect:"Filter by name",kongManager:"Filter by exact name or ID"}},gateway_services:{title:"Gateway Services",list:{toolbar_actions:{new_gateway_service:"New gateway service"},table_headers:{name:"Name",control_plane:"Control Plane",protocol:"Protocol",host:"Host",port:"Port",path:"Path",enabled:"Enabled",tags:"Tags",id:"ID",created_at:"Created At",updated_at:"Last Modified"},empty_state:{title:"Configure a New Gateway Service",description:"Gateway services are used to proxy traffic.",serverless_title:"Configure your first Gateway Service"}},empty_state_v2:{create:"New gateway service",title:"Configure your first gateway service",group:"Services created in gateways within this group will automatically appear here.",description:"Gateway services represent backend APIs or microservices that receive traffic routed through the gateway.",learn_more:"Learn more"},form:{buttons:{try_sample:"Try sample API"},errors:{host:{empty:"Host cannot be empty",invalid:"Invalid host"},port:{type:"Port must be a number",invalid:"Port must be between 0 and 65535"},path:{prefix:"Path must begin with /",invalid:"Path should not include characters outside of the reserved list of RFC 3986"},protocol:{empty:"Protocol cannot be empty",invalid:"Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss"},url:{invalid:"The URL must follow a valid format. Example: https://api.kong-air.com/flights"}},sections:{general:{title:"General Information",description:"Provide a name and tags to help identify and manage this service."},keys:{title:"Service endpoint",description:"Define where this service should send requests.",checkedGroupLabel:"Choose how and where to send traffic",urlLabel:"Full URL",checkedGroupAltLabel:"Protocol, host, port and path",url:{label:"Full URL",description:"Define the service using a single, complete API URL for simple setup."},protocol:{label:"Protocol, host, port, and path",description:"Manually specify each component of the API’s URL for advanced configurations."},viewAdvancedFields:"View advanced fields"}},fields:{upstream_url:{label:"Full URL",placeholder:"e.g. https://api.kong-air.com/flights",tooltip_for_konnect:"This is the URL of the API you will manage in Konnect.",tooltip_for_km:"This is the URL of the API you will manage in Kong Gateway."},name:{label:"Name",placeholder:"Enter a unique name",tooltip:"The Service name."},protocol:{label:"Protocol",tooltip:"The protocol used to communicate with the upstream.",options:{http:"http",https:"https",tcp:"tcp",tls:"tls",tls_passthrough:"tls_passthrough",grpc:"grpc",grpcs:"grpcs",ws:"ws",wss:"wss",udp:"udp"}},host:{label:"Host",placeholder:"e.g. api.kong-air.com",tooltip:"The host of the upstream server. Note that the host value is case sensitive."},path:{label:"Path",placeholder:"e.g. /sample",tooltip:"The path to be used in request to the upstream server."},port:{label:"Port",tooltip:"The upstream server port."},retries:{label:"Retries",tooltip:"The number of retries to execute upon failure to proxy."},connect_timeout:{label:"Connection timeout",tooltip:"The timeout in milliseconds for establishing a connection to the upstream server."},write_timeout:{label:"Write timeout",tooltip:"The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."},read_timeout:{label:"Read timeout",tooltip:"The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."},client_certificate:{label:"Client certificate",placeholder:"Enter a Certificate ID",tooltip:"Certificate to be used as client certificate while TLS handshaking to the upstream server."},ca_certificates:{label:"CA certificates",placeholder:"Enter a comma separated list of CA Certificate IDs",tooltip:"Array of {code1} object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to {code2} when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).",code1:"CA Certificate",code2:"null"},tls_verify_enabled:{label:"TLS verify",help:"If unchecked, use default system setting",tooltip:"Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",code1:"null"},tls_verify_option:{unset:{display:"Use default system setting"},true:{label:"True",display:"On"},false:{label:"False",display:"Off"}},tags:{label:"Tags",tooltip:"An optional set of strings associated with the Service for grouping and filtering.",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",collapse:"Add tags"},enabled:{label:"Enabled",tooltip:"Whether the Service is active. If set to {false}, the proxy behavior will be as if any routes attached to it do not exist (404). Default: {true}.",false:"false",true:"true"}}}},errors:{general:"Gateway Services could not be retrieved",delete:"The gateway service could not be deleted at this time.",copy:"Failed to copy to clipboard",urlErrorMessage:"Error: invalid URL"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},glossary:{gateway_services:"gateway services"}};function Ne(){const s=ke.createI18n("en-us",Ee);return{i18n:s,i18nT:ke.i18nTComponent(s)}}function xe(){return{getPortFromProtocol:(B,f)=>{const n=[80,443],a=Number(f);if((a||a===0)&&!n.includes(a))return a;switch(B){case"grpcs":case"tls":case"https":case"wss":return 443;case"grpc":case"tcp":case"http":case"ws":default:return 80}}}}function Se(){const{i18n:{t:s}}=D.useI18n();return{validateHost:u=>{if(!u||u.trim()==="")return s("gateway_services.form.errors.host.empty");const C=/^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,63})?$/;return/^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(u)||C.test(u)?"":s("gateway_services.form.errors.host.invalid")},validateProtocol:(u,C)=>!u||u.trim()===""?s("gateway_services.form.errors.protocol.empty"):(u=u.slice(0,-1),C.find(l=>{if(l.value===u)return l})===void 0?s("gateway_services.form.errors.protocol.invalid"):""),validatePath:u=>!u||u===""?"":u.startsWith("/")?/[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(u)?s("gateway_services.form.errors.path.invalid"):"":s("gateway_services.form.errors.path.prefix"),validatePort:u=>{if(u==null||u==="")return"";const C=typeof u=="string"?parseInt(u,10):u;return isNaN(C)?s("gateway_services.form.errors.port.type"):C<0||C>65535?s("gateway_services.form.errors.port.invalid"):""}}}const D={useI18n:Ne,usePortFromProtocol:xe,useUrlValidators:Se},pe="/v2/control-planes/{controlPlaneId}/core-entities",ue="/{workspace}",te={list:{konnect:{all:`${pe}/services`},kongManager:{all:`${ue}/services`}},form:{konnect:{create:`${pe}/services`,edit:`${pe}/services/{id}`},kongManager:{create:`${ue}/services`,edit:`${ue}/services/{id}`}}},Pe={class:"kong-ui-entities-gateway-services-list"},Ie={class:"button-row"},Te={key:1},Be=e.defineComponent({__name:"GatewayServiceList",props:{config:{type:Object,required:!0,validator:s=>!(!s||!["konnect","kongManager"].includes(s==null?void 0:s.app)||!s.createRoute||!s.getViewRoute||!s.getEditRoute||s.app==="kongManager"&&!s.isExactMatch&&!s.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},isServerless:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","toggle:success"],setup(s,{emit:B}){var fe;const f=B,n=s,{i18n:{t:a,formatUnixTimeStamp:u}}=D.useI18n(),C=Ve.useRouter(),{axiosInstance:F}=p.useAxios((fe=n.config)==null?void 0:fe.axiosRequestConfig),{hasRecords:l,handleStateChange:P}=p.useTableState(()=>U.value),V=e.computed(()=>l.value&&n.config.app==="konnect"),me=e.computed(()=>n.config.app!=="kongManager"||!!n.config.disableSorting),Q={name:{label:a("gateway_services.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},...n.config.showControlPlaneColumn?{control_plane:{label:a("gateway_services.list.table_headers.control_plane")}}:{},protocol:{label:a("gateway_services.list.table_headers.protocol"),searchable:!0,sortable:!0},host:{label:a("gateway_services.list.table_headers.host"),searchable:!0,sortable:!0},port:{label:a("gateway_services.list.table_headers.port"),searchable:!0,sortable:!0},path:{label:a("gateway_services.list.table_headers.path"),searchable:!0,sortable:!0},enabled:{label:a("gateway_services.list.table_headers.enabled"),searchable:!0,sortable:!0},tags:{label:a("gateway_services.list.table_headers.tags"),sortable:!1},updated_at:{label:a("gateway_services.list.table_headers.updated_at"),sortable:!0},created_at:{label:a("gateway_services.list.table_headers.created_at"),sortable:!0}},oe={columnVisibility:{created_at:!1}},re=Q,W=e.computed(()=>{var m,g;let d=`${n.config.apiBaseUrl}${te.list[n.config.app].all}`;return n.config.app==="konnect"?d=d.replace(/{controlPlaneId}/gi,((m=n.config)==null?void 0:m.controlPlaneId)||""):n.config.app==="kongManager"&&(d=d.replace(/\/{workspace}/gi,(g=n.config)!=null&&g.workspace?`/${n.config.workspace}`:"")),d}),ge=e.computed(()=>n.config.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${W.value}`):new URL(W.value)),U=e.ref(""),M=e.computed(()=>{const d=n.config.app==="konnect"||n.config.isExactMatch;if(d)return{isExactMatch:d,placeholder:a(`search.placeholder.${n.config.app}`)};const{name:m,enabled:g,protocol:v,host:R,port:S,path:T}=Q;return{isExactMatch:d,fields:{name:m,enabled:g,protocol:v,host:R,port:S,path:T},schema:n.config.filterSchema}}),{fetcher:ye,fetcherState:K,fetcherCacheKey:b}=p.useFetcher(e.computed(()=>({...n.config,cacheIdentifier:n.cacheIdentifier})),W),X=()=>{U.value=""},Y=()=>{b.value++},O=e.ref(null),o=e.computed(()=>({ctaPath:n.config.createRoute,ctaText:z.value?n.isServerless?a("actions.serverless_create"):a("actions.create"):void 0,message:`${a("gateway_services.list.empty_state.description")}${n.config.additionMessageForEmptyState?` ${n.config.additionMessageForEmptyState}`:""}`,title:z.value?n.isServerless?a("gateway_services.list.empty_state.serverless_title"):a("gateway_services.list.empty_state.title"):a("gateway_services.title")})),h=e.ref(!1),x=e.ref(null),j=e.computed(()=>{const d={action:"disable",id:"",name:""};if(x.value){const{enabled:m,id:g,name:v}=x.value;d.action=m?"disable":"enable",d.id=g,d.name=v||g}return d}),ie=d=>{h.value=!0,x.value=d},le=()=>{h.value=!1,x.value=null},q=async()=>{var v,R;if(!await((v=n.canEdit)==null?void 0:v.call(n,x.value))||!x.value)return;const m=`${ge.value.href}/${x.value.id}`,g=!x.value.enabled;try{const{data:S}=((R=n.config)==null?void 0:R.app)==="konnect"?await F.put(m,{...x.value,enabled:g}):await F.patch(m,{...x.value,enabled:g});f("toggle:success",S),x.value.enabled=g}catch(S){f("error",S)}},se=d=>{n.config.getControlPlaneRoute&&C.push(n.config.getControlPlaneRoute(d))},ae=async(d,m)=>{const g=d.id;if(!await m(g)){f("copy:error",{entity:d,field:"id",message:a("errors.copy")});return}f("copy:success",{entity:d,field:"id",message:a("copy.success",{val:g})})},ne=async(d,m)=>{const g=JSON.stringify(d);if(!await m(g)){f("copy:error",{entity:d,message:a("errors.copy")});return}f("copy:success",{entity:d,message:a("copy.success_brief")})},ce=async d=>{var g;await((g=n.canRetrieve)==null?void 0:g.call(n,d))&&C.push(n.config.getViewRoute(d.id))},de=d=>({label:a("actions.view"),to:n.config.getViewRoute(d)}),_e=d=>({label:a("actions.edit"),to:n.config.getEditRoute(d)}),N=e.ref(void 0),$=e.ref(!1),A=e.ref(!1),L=e.ref(""),he=p.useDeleteUrlBuilder(n.config,W.value),we=d=>{N.value=d,$.value=!0,L.value=""},ee=()=>{$.value=!1,N.value=void 0},be=async()=>{var d,m,g;if((d=N.value)!=null&&d.id){A.value=!0;try{await F.delete(he(N.value.id)),f("delete:success",N.value),ee(),b.value++}catch(v){L.value=((g=(m=v.response)==null?void 0:m.data)==null?void 0:g.message)||v.message||a("errors.delete"),f("error",v)}finally{A.value=!1}}},ve=()=>{C.push(n.config.createRoute)};e.watch(K,d=>{var m,g,v;if(d.status===p.FetcherStatus.Error){O.value={title:a("errors.general")},(v=(g=(m=d.error)==null?void 0:m.response)==null?void 0:g.data)!=null&&v.message&&(O.value.message=d.error.response.data.message),f("error",d.error);return}O.value=null});const z=e.ref(!1);return e.onBeforeMount(async()=>{z.value=await n.canCreate()}),(d,m)=>{const g=e.resolveComponent("KButton"),v=e.resolveComponent("KEmptyState"),R=e.resolveComponent("KBadge"),S=e.resolveComponent("KInputSwitch"),T=e.resolveComponent("KDropdownItem"),H=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(e.unref(p.EntityBaseTable),{"cache-identifier":s.cacheIdentifier,"default-table-preferences":oe,"disable-sorting":me.value,"empty-state-options":o.value,"enable-entity-actions":"","error-message":O.value,fetcher:e.unref(ye),"fetcher-cache-key":e.unref(b),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-gateway-services-list",query:U.value,"table-headers":e.unref(re),onClearSearchInput:X,"onClick:row":m[4]||(m[4]=t=>ce(t)),onSort:Y,onState:e.unref(P)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(p.EntityFilter),{modelValue:U.value,"onUpdate:modelValue":m[0]||(m[0]=t=>U.value=t),config:M.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!s.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Ie,[V.value?(e.openBlock(),e.createBlock(g,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-learn-more-button",icon:"",onClick:m[1]||(m[1]=t=>d.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(J.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>s.canCreate()},{default:e.withCtx(()=>[e.createVNode(g,{appearance:"primary","data-testid":"toolbar-add-gateway-service",size:s.useActionOutside?"medium":"large",to:s.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(J.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("gateway_services.list.toolbar_actions.new_gateway_service")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:t})=>[e.createElementVNode("b",null,e.toDisplayString(t??"-"),1)]),control_plane:e.withCtx(({row:t})=>{var r;return[(r=t.x_meta)!=null&&r.cluster_id?(e.openBlock(),e.createBlock(R,{key:0,tooltip:t.x_meta.cluster_id,"truncation-tooltip":"",onClick:e.withModifiers(y=>se(t.x_meta.cluster_id),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.x_meta.cluster_id),1)]),_:2},1032,["tooltip","onClick"])):(e.openBlock(),e.createElementBlock("b",Te,"-"))]}),enabled:e.withCtx(({row:t})=>[e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>s.canEdit(t),"force-show":""},{default:e.withCtx(({isAllowed:r})=>[e.createElementVNode("div",{onClick:m[3]||(m[3]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(S,{modelValue:t.enabled,"onUpdate:modelValue":y=>t.enabled=y,"data-testid":`row-${t.id}-toggle-input`,disabled:!r,onClick:e.withModifiers(y=>ie(t),["prevent"])},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","onClick"])])]),_:2},1032,["auth-function"])]),tags:e.withCtx(({rowValue:t})=>[e.createVNode(e.unref(p.TableTags),{tags:t},null,8,["tags"])]),created_at:e.withCtx(({rowValue:t})=>[e.createTextVNode(e.toDisplayString(e.unref(u)(t)),1)]),updated_at:e.withCtx(({row:t,rowValue:r})=>[e.createTextVNode(e.toDisplayString(e.unref(u)(r??t.created_at)),1)]),actions:e.withCtx(({row:t})=>[e.createVNode(H,null,{default:e.withCtx(({copyToClipboard:r})=>[e.createVNode(T,{"data-testid":"action-entity-copy-id",onClick:y=>ae(t,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(H,null,{default:e.withCtx(({copyToClipboard:r})=>[e.createVNode(T,{"data-testid":"action-entity-copy-json",onClick:y=>ne(t,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>s.canRetrieve(t)},{default:e.withCtx(()=>[e.createVNode(T,{"data-testid":"action-entity-view","has-divider":"",item:de(t.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>s.canEdit(t)},{default:e.withCtx(()=>[e.createVNode(T,{"data-testid":"action-entity-edit",item:_e(t.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>s.canDelete(t)},{default:e.withCtx(()=>[e.createVNode(T,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:r=>we(t)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.delete.menu_label")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!U.value&&s.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var t;return[e.createVNode(v,{"data-testid":"gateway-services-entity-empty-state","icon-background":"",message:e.unref(a)("gateway_services.empty_state_v2.description"),title:e.unref(a)("gateway_services.empty_state_v2.title")},e.createSlots({icon:e.withCtx(()=>[e.createVNode(e.unref(J.ServicesIcon),{decorative:""})]),action:e.withCtx(()=>[z.value?(e.openBlock(),e.createBlock(g,{key:0,"data-testid":"entity-create-button",onClick:ve},{default:e.withCtx(()=>[e.createVNode(e.unref(J.AddIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.create")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(g,{appearance:"secondary","data-testid":"entity-learn-more-button",onClick:m[2]||(m[2]=r=>d.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(J.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.learn_more")),1)]),_:1})]),_:2},[(t=s.config)!=null&&t.isControlPlaneGroup?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["message","title"])]}),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(p.EntityToggleModal),{action:j.value.action,"entity-id":j.value.id,"entity-name":j.value.name,"entity-type":e.unref(a)("glossary.gateway_services"),"on-confirm":q,visible:h.value,onCancel:le,onProceed:le},null,8,["action","entity-id","entity-name","entity-type","visible"]),e.createVNode(e.unref(p.EntityDeleteModal),{"action-pending":A.value,description:e.unref(a)("actions.delete.description"),"entity-name":N.value&&(N.value.name||N.value.id),"entity-type":e.unref(p.EntityTypes).GatewayService,error:L.value,title:e.unref(a)("actions.delete.title"),visible:$.value,onCancel:ee,onProceed:be},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Ce=(s,B)=>{const f=s.__vccOpts||s;for(const[n,a]of B)f[n]=a;return f},Fe=Ce(Be,[["__scopeId","data-v-0ab33d23"]]),Ae={class:"kong-ui-gateway-service-entity-config-card"},Ue=e.defineComponent({__name:"GatewayServiceConfigCard",props:{config:{type:Object,required:!0,validator:s=>!(!s||!["konnect","kongManager"].includes(s==null?void 0:s.app)||s.app==="konnect"&&!s.controlPlaneId||s.app==="kongManager"&&typeof s.workspace!="string"||!s.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(s){const B=s,{i18n:{t:f},i18nT:n}=D.useI18n(),a=e.computed(()=>te.form[B.config.app].edit),{getPropValue:u}=p.useHelpers(),C=(l,P)=>u(l,P)===!0?f("gateway_services.form.fields.tls_verify_option.true.display"):f("gateway_services.form.fields.tls_verify_option.false.display"),F=e.ref({id:{},name:{tooltip:f("gateway_services.form.fields.name.tooltip")},enabled:{},updated_at:{},created_at:{},protocol:{section:p.ConfigurationSchemaSection.Basic,tooltip:f("gateway_services.form.fields.protocol.tooltip")},host:{section:p.ConfigurationSchemaSection.Basic,tooltip:f("gateway_services.form.fields.host.tooltip")},path:{section:p.ConfigurationSchemaSection.Basic,tooltip:f("gateway_services.form.fields.path.tooltip")},port:{section:p.ConfigurationSchemaSection.Basic,tooltip:f("gateway_services.form.fields.port.tooltip")},tags:{tooltip:f("gateway_services.form.fields.tags.tooltip")},retries:{order:1,tooltip:f("gateway_services.form.fields.retries.tooltip")},connect_timeout:{order:2,tooltip:f("gateway_services.form.fields.connect_timeout.tooltip")},write_timeout:{order:3,tooltip:f("gateway_services.form.fields.write_timeout.tooltip")},read_timeout:{order:4,tooltip:f("gateway_services.form.fields.read_timeout.tooltip")},client_certificate:{order:5,tooltip:f("gateway_services.form.fields.client_certificate.tooltip")},ca_certificates:{type:p.ConfigurationSchemaType.BadgeTag,label:f("gateway_services.form.fields.ca_certificates.label"),order:6},tls_verify:{label:f("gateway_services.form.fields.tls_verify_enabled.label")},tls_verify_depth:{hidden:!0}});return(l,P)=>(e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(e.unref(p.EntityBaseConfigCard),{config:s.config,"config-card-doc":s.configCardDoc,"config-schema":F.value,"entity-type":e.unref(p.SupportedEntityType).GatewayService,"fetch-url":a.value,"hide-title":s.hideTitle,"onFetch:error":P[0]||(P[0]=V=>l.$emit("fetch:error",V)),"onFetch:success":P[1]||(P[1]=V=>l.$emit("fetch:success",V)),onLoading:P[2]||(P[2]=V=>l.$emit("loading",V))},{"enabled-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(n),{keypath:"gateway_services.form.fields.enabled.tooltip",scope:"global"},{false:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(f)("gateway_services.form.fields.enabled.false")),1)]),true:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(f)("gateway_services.form.fields.enabled.true")),1)]),_:1})]),"ca_certificates-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(n),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(f)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(f)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),"tls_verify-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(n),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(f)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),tls_verify:e.withCtx(V=>[e.createTextVNode(e.toDisplayString(typeof e.unref(u)("rowValue",V)=="boolean"?C("rowValue",V):e.unref(f)("gateway_services.form.fields.tls_verify_option.unset.display")),1)]),client_certificate:e.withCtx(V=>[e.createTextVNode(e.toDisplayString(e.unref(u)("rowValue",V)?e.unref(u)("rowValue",V).id:"–"),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),I={name:"Kong-Air-Flights-API",protocol:"https",path:"/flights",host:"api.kong-air.com",port:443},$e={class:"kong-ui-entities-gateway-service-form"},Re={key:0,class:"gateway-service-form-general-info"},De={class:"gateway-service-form-group-selection-wrapper"},Me={key:0,class:"gateway-service-form-group-fields"},Ke={key:0,class:"gateway-service-form-group-fields"},qe={key:0},Le={key:0,class:"gateway-service-form-advanced-fields"},Ge={class:"gateway-service-form-margin-bottom"},We={class:"gateway-service-form-margin-bottom"},Oe={class:"gateway-service-form-margin-bottom"},je={class:"gateway-service-form-margin-bottom"},ze={key:0,class:"gateway-service-form-margin-bottom"},He={key:1,class:"gateway-service-form-margin-bottom"},Ze={key:2,class:"gateway-service-form-margin-bottom"},Je={key:0,class:"checkbox-aligned-radio"},Qe={key:1,class:"checkbox-aligned-radio"},Xe={class:"gateway-service-form-tags"},Ye={class:"form-error-list"},et=Ce(e.defineComponent({__name:"GatewayServiceForm",props:{config:{type:Object,required:!0,validator:s=>!(!s||!["konnect","kongManager"].includes(s==null?void 0:s.app)||s.app==="konnect"&&!s.controlPlaneId||s.app==="kongManager"&&typeof s.workspace!="string"||!s.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1},hideTrySampleApiButton:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated","try-sample-api"],setup(s,{expose:B,emit:f}){var H;const n=f,a=s,u=e.ref(!0),C=Ve.useRouter(),{i18nT:F,i18n:{t:l}}=D.useI18n(),{getErrorFieldsFromError:P}=p.useErrors(),{axiosInstance:V}=p.useAxios((H=a.config)==null?void 0:H.axiosRequestConfig),me=p.useValidators(),{validateHost:Q,validatePath:oe,validatePort:re,validateProtocol:W}=D.useUrlValidators(),{objectsAreEqual:ge}=p.useHelpers(),U=e.computed(()=>te.form[a.config.app].edit),M=e.computed(()=>a.gatewayServiceId?p.EntityBaseFormType.Edit:p.EntityBaseFormType.Create),ye=e.ref(!1),K=e.computed(()=>!!a.gatewayServiceId),b=e.ref(K.value?"protocol":"url"),X=D.usePortFromProtocol(),Y=e.ref(""),O=e.computed(()=>!!Y.value||!!N("name")),o=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:"",enabled:!0},isReadonly:!1,errorMessages:[],formFieldErrors:{host:"",port:"",path:"",name:"",url:"",tags:"",retries:"",connect_timeout:"",write_timeout:"",read_timeout:"",client_certificate:"",ca_certificates:"",tls_verify_enabled:"",tls_verify_value:""}}),h=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:"",enabled:!0}),x=a.config.app==="konnect"||p.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),j=[{label:l("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:l("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:l("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:l("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:l("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:l("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:l("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...x?[{label:l("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:l("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:l("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],ie={url:"url",protocol:"protocol"},le=(t,r)=>{r.value},q=t=>t?parseFloat(t):0,se=()=>{o.fields.host=h.host,o.fields.path=h.path,o.fields.port=h.port,o.fields.protocol=h.protocol,o.fields.url=h.url,o.fields.retries=h.retries,o.fields.connect_timeout=h.connect_timeout,o.fields.write_timeout=h.write_timeout,o.fields.read_timeout=h.read_timeout,o.fields.client_certificate=h.client_certificate,o.fields.ca_certificates=h.ca_certificates,o.fields.tls_verify_enabled=h.tls_verify_enabled,o.fields.tls_verify_value=h.tls_verify_value,o.fields.enabled=h.enabled},ae=()=>{u.value=!0,A(),o.errorMessages=[],se()},ne=()=>{switch(se(),o.fields.name=`${I.name}-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,b.value){case"url":o.fields.url=`${I.protocol}://${I.host}${I.path}`;break;case"protocol":o.fields.host=I.host,o.fields.path=I.path,o.fields.protocol=I.protocol,o.fields.port=I.port;break;default:o.fields.url=`${I.protocol}://${I.host}${I.path}`}},ce=()=>{if(A(),o.fields.url.length)try{const t=new URL(o.fields.url),r=W(t.protocol,j);if(r)throw new Error(r);o.fields.protocol=t.protocol.slice(0,-1);const y=Q(t.hostname);if(y)throw new Error(y);o.fields.host=t.hostname;const k=oe(t.pathname);if(k)throw new Error(k);o.fields.path=t.pathname;const _=re(t.port);if(_)throw new Error(_);const w=Number(t.port);ye.value=!!w,o.fields.port=w||X.getPortFromProtocol(o.fields.protocol),n("url-valid:success")}catch{n("url-valid:error",l("gateway_services.form.errors.url.invalid")),o.formFieldErrors.url=l("gateway_services.form.errors.url.invalid")}},de=t=>{A(t)},_e=e.computed(()=>!!o.formFieldErrors.url||!!o.formFieldErrors.host||!!o.formFieldErrors.port),N=t=>{if(o.errorMessages.length)return"";const r=o.formFieldErrors;return r[t]?r[t]:""},$=t=>{A(t??void 0);const r=Q(o.fields.host);r&&(o.formFieldErrors.host=r);const y=oe(o.fields.path);y&&(o.formFieldErrors.path=y);const k=re(o.fields.port);k&&(o.formFieldErrors.port=k),L.value?n("url-valid:success"):n("url-valid:error",o.errorMessages.join(",")||l("gateway_services.form.errors.url.invalid"))},A=t=>{if(t)o.formFieldErrors[t]="";else for(let r in o.formFieldErrors)o.formFieldErrors[r]="";o.errorMessages=[]},L=e.computed(()=>{for(let t in o.formFieldErrors)if(o.formFieldErrors[t].length)return!1;return!0}),he=()=>{o.fields.url&&b.value==="url"?ce():$()},we=()=>`new-service-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,ee=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(o.fields.protocol)),be=e.computed(()=>{if(b.value==="url")return!0;const t=["https","wss","tls"].includes(o.fields.protocol);return b.value==="protocol"&&t}),ve=e.computed(()=>{if(b.value==="url")return!0;const t=["https","tls"].includes(o.fields.protocol);return b.value==="protocol"&&t}),z=e.computed(()=>{if(b.value==="url")return!0;const t=["https","wss","tls"].includes(o.fields.protocol);return b.value==="protocol"&&t}),fe=t=>{A("name"),Y.value=me.utf8Name(t)},d=e.computed(()=>{const t=!K.value||!ge(o.fields,h),r=b.value==="url"&&!!o.fields.url&&L.value,y=b.value==="protocol"&&!!o.fields.host&&L.value;return t&&(r||y)}),m=t=>{var r,y,k;o.fields.name=(t==null?void 0:t.name)||"",o.fields.tags=((r=t==null?void 0:t.tags)==null?void 0:r.join(", "))||"",o.fields.protocol=(t==null?void 0:t.protocol)||"http",o.fields.path=(t==null?void 0:t.path)||"",o.fields.read_timeout=t!=null&&t.read_timeout||(t==null?void 0:t.read_timeout)===0?t==null?void 0:t.read_timeout:6e4,o.fields.retries=t!=null&&t.retries||(t==null?void 0:t.retries)===0?t==null?void 0:t.retries:5,o.fields.host=(t==null?void 0:t.host)||"",o.fields.connect_timeout=t!=null&&t.connect_timeout||(t==null?void 0:t.connect_timeout)===0?t==null?void 0:t.connect_timeout:6e4,o.fields.tls_verify_enabled=(t==null?void 0:t.tls_verify)!==""&&(t==null?void 0:t.tls_verify)!==null&&(t==null?void 0:t.tls_verify)!==void 0,o.fields.tls_verify_value=t!=null&&t.tls_verify?t==null?void 0:t.tls_verify:!1,o.fields.ca_certificates=((y=t==null?void 0:t.ca_certificates)==null?void 0:y.join(","))||"",o.fields.client_certificate=((k=t==null?void 0:t.client_certificate)==null?void 0:k.id)||"",o.fields.write_timeout=t!=null&&t.write_timeout||(t==null?void 0:t.write_timeout)===0?t==null?void 0:t.write_timeout:6e4,o.fields.port=t!=null&&t.port||(t==null?void 0:t.port)===0?t==null?void 0:t.port:80,o.fields.enabled=(t==null?void 0:t.enabled)??!0,Object.assign(h,o.fields)},g=()=>{C.push(a.config.cancelRoute)},v=e.computed(()=>{var r,y;let t=`${a.config.apiBaseUrl}${te.form[a.config.app][M.value]}`;return a.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((r=a.config)==null?void 0:r.controlPlaneId)||""):a.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(y=a.config)!=null&&y.workspace?`/${a.config.workspace}`:"")),t=t.replace(/{id}/gi,a.gatewayServiceId),t}),R=t=>{let r="";t.url&&(r=new URL(t.url).protocol),(["https","wss","tls"].includes(t.protocol)||["https","wss","tls"].includes(r))&&(t.tls_verify=t.tls_verify_enabled?t.tls_verify_value:null),delete t.tls_verify_enabled,delete t.tls_verify_value},S=e.computed(()=>{var r,y,k,_;const t={name:o.fields.name||null,tags:o.fields.tags?(k=(y=(r=o.fields.tags)==null?void 0:r.split(","))==null?void 0:y.map(w=>String(w||"").trim()))==null?void 0:k.filter(w=>w!==""):null,protocol:o.fields.protocol,path:o.fields.path||null,read_timeout:o.fields.read_timeout,retries:o.fields.retries,host:o.fields.host,connect_timeout:o.fields.connect_timeout,tls_verify_value:o.fields.tls_verify_value,tls_verify_enabled:o.fields.tls_verify_enabled,ca_certificates:o.fields.ca_certificates?(_=o.fields.ca_certificates)==null?void 0:_.split(",").filter(w=>w!==""):null,client_certificate:o.fields.client_certificate?{id:o.fields.client_certificate}:null,write_timeout:o.fields.write_timeout,port:o.fields.port,url:o.fields.url,enabled:o.fields.enabled};return o.fields.client_certificate&&["https","wss","tls"].includes(o.fields.protocol)&&(t.client_certificate={id:o.fields.client_certificate}),o.fields.tls_verify_enabled&&["https","wss","tls"].includes(o.fields.protocol)&&(t.tls_verify=o.fields.tls_verify_value),ee.value||(t.path=null),M.value==="create"?b.value==="url"?(delete t.protocol,delete t.host,delete t.path,a.config.app==="konnect"&&delete t.port):delete t.url:M.value==="edit"&&delete t.url,t}),T=async()=>{var t,r,y,k;try{o.isReadonly=!0;const _=S.value;R(_);let w;if(M.value==="create"?w=await V.post(v.value,_):M.value==="edit"&&(w=((t=a.config)==null?void 0:t.app)==="konnect"?await V.put(v.value,_):await V.patch(v.value,_)),w){const{data:i}=w;o.fields.name=(i==null?void 0:i.name)||"",o.fields.port=i.port||X.getPortFromProtocol(i.protocol),o.fields.protocol=(i==null?void 0:i.protocol)||"http",o.fields.host=(i==null?void 0:i.host)||"",o.fields.path=(i==null?void 0:i.path)||"",o.fields.url=(i==null?void 0:i.url)||"",o.fields.retries=i!=null&&i.retries||(i==null?void 0:i.retries)===0?i==null?void 0:i.retries:5,o.fields.connect_timeout=i!=null&&i.connect_timeout||(i==null?void 0:i.connect_timeout)===0?i==null?void 0:i.connect_timeout:6e4,o.fields.write_timeout=i!=null&&i.write_timeout||(i==null?void 0:i.write_timeout)===0?i==null?void 0:i.write_timeout:6e4,o.fields.read_timeout=i!=null&&i.read_timeout||(i==null?void 0:i.read_timeout)===0?i==null?void 0:i.read_timeout:6e4,o.fields.client_certificate=((r=i==null?void 0:i.client_certificate)==null?void 0:r.id)||"",o.fields.ca_certificates=(y=i==null?void 0:i.ca_certificates)!=null&&y.length?i==null?void 0:i.ca_certificates.join(","):"",o.fields.tls_verify_enabled=(i==null?void 0:i.tls_verify)!==""&&(i==null?void 0:i.tls_verify)!==null&&(i==null?void 0:i.tls_verify)!==void 0,o.fields.tls_verify_value=o.fields.tls_verify_enabled&&(i==null?void 0:i.tls_verify),o.fields.tags=(k=i==null?void 0:i.tags)!=null&&k.length?i.tags.join(", "):"",o.fields.enabled=(i==null?void 0:i.enabled)??!0,Object.assign(h,o.fields),n("update",w==null?void 0:w.data)}return w}catch(_){const{fields:w,messages:i}=P(_);o.errorMessages=i,w.length&&w.forEach(G=>{const Z=G.field;Z==="client_certificate.id"?o.formFieldErrors.client_certificate=G.message:Z.startsWith("ca_certificates")?o.formFieldErrors.ca_certificates=G.message:Object.keys(o.formFieldErrors).includes(Z)&&(o.formFieldErrors={...o.formFieldErrors,[Z]:G.message})}),n("error",_)}finally{o.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(o.fields,h)}),e.watch(o.fields,t=>{o.fields.port=X.getPortFromProtocol(t.protocol,String(t.port)),n("model-updated",S.value)}),e.onMounted(()=>{n("model-updated",S.value),K.value||(o.fields.name=we())}),B({validateUrl:he,getPayload:S,saveFormData:T,canSubmit:d,initForm:m}),(t,r)=>{const y=e.resolveComponent("KRadio"),k=e.resolveComponent("KButton"),_=e.resolveComponent("KInput"),w=e.resolveComponent("KSelect"),i=e.resolveComponent("KCheckbox"),G=e.resolveComponent("KCollapse"),Z=e.resolveComponent("KAlert");return e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(e.unref(p.EntityBaseForm),{"can-submit":d.value,config:s.config,"edit-id":s.gatewayServiceId,"entity-type":e.unref(p.SupportedEntityType).GatewayService,"fetch-url":U.value,"form-fields":S.value,"is-readonly":o.isReadonly,onCancel:g,"onFetch:error":r[31]||(r[31]=c=>t.$emit("error",c)),"onFetch:success":m,onLoading:r[32]||(r[32]=c=>t.$emit("loading",c)),onSubmit:T},{"form-actions":e.withCtx(()=>[e.renderSlot(t.$slots,"form-actions",{canSubmit:d.value,cancel:g,submit:T},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(l)("gateway_services.form.sections.keys.description"),"hide-info-header":s.hideSectionsInfo,title:e.unref(l)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[K.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",De,[e.createVNode(y,{modelValue:b.value,"onUpdate:modelValue":r[0]||(r[0]=c=>b.value=c),card:"","card-orientation":"horizontal","data-testid":"gateway-service-url-radio",description:e.unref(l)("gateway_services.form.sections.keys.url.description"),label:e.unref(l)("gateway_services.form.sections.keys.url.label"),"selected-value":ie.url,onChange:ae},null,8,["modelValue","description","label","selected-value"]),e.createVNode(y,{modelValue:b.value,"onUpdate:modelValue":r[1]||(r[1]=c=>b.value=c),card:"","card-orientation":"horizontal","checked-group":"protocol","data-testid":"gateway-service-protocol-radio",description:e.unref(l)("gateway_services.form.sections.keys.protocol.description"),label:e.unref(l)("gateway_services.form.sections.keys.protocol.label"),"selected-value":ie.protocol,onChange:ae},null,8,["modelValue","description","label","selected-value"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[b.value==="url"?(e.openBlock(),e.createElementBlock("div",Me,[e.createVNode(_,{modelValue:o.fields.url,"onUpdate:modelValue":r[2]||(r[2]=c=>o.fields.url=c),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",error:_e.value,"error-message":N("url"),label:e.unref(l)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:s.config.app==="konnect"?e.unref(l)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(l)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(l)("gateway_services.form.fields.upstream_url.placeholder"),required:"",onInput:ce},e.createSlots({_:2},[s.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(k,{appearance:"tertiary","data-testid":"try-sample-api",size:"small",onClick:ne},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0)]),_:1})])),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[b.value==="protocol"||K.value?(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(w,{modelValue:o.fields.protocol,"onUpdate:modelValue":r[3]||(r[3]=c=>o.fields.protocol=c),"data-testid":"gateway-service-protocol-select",items:j,label:e.unref(l)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:o.isReadonly,required:"",width:"100%",onSelected:r[4]||(r[4]=c=>le(o.fields.protocol,c))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(_,{modelValue:o.fields.host,"onUpdate:modelValue":r[5]||(r[5]=c=>o.fields.host=c),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",error:!!o.formFieldErrors.host,"error-message":N("host"),label:e.unref(l)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(l)("gateway_services.form.fields.host.placeholder"),required:"",onInput:r[6]||(r[6]=c=>$("host"))},e.createSlots({_:2},[s.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(k,{appearance:"tertiary",size:"small",onClick:ne},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"]),ee.value?(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(_,{modelValue:o.fields.path,"onUpdate:modelValue":r[7]||(r[7]=c=>o.fields.path=c),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",error:!!o.formFieldErrors.path,"error-message":N("path"),label:e.unref(l)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(l)("gateway_services.form.fields.path.placeholder"),onInput:r[8]||(r[8]=c=>$("path"))},null,8,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(_,{modelValue:o.fields.port,"onUpdate:modelValue":[r[9]||(r[9]=c=>o.fields.port=c),r[11]||(r[11]=()=>{o.fields.port=q(o.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",error:!!o.formFieldErrors.port,"error-message":N("port"),label:e.unref(l)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number",onInput:r[10]||(r[10]=c=>$("port"))},null,8,["modelValue","error","error-message","label","label-attributes"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(G,{modelValue:u.value,"onUpdate:modelValue":r[27]||(r[27]=c=>u.value=c),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(l)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",Ge,[e.createVNode(_,{modelValue:o.fields.retries,"onUpdate:modelValue":[r[12]||(r[12]=c=>o.fields.retries=c),r[13]||(r[13]=()=>{o.fields.retries=q(o.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(l)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",We,[e.createVNode(_,{modelValue:o.fields.connect_timeout,"onUpdate:modelValue":[r[14]||(r[14]=c=>o.fields.connect_timeout=c),r[15]||(r[15]=()=>{o.fields.connect_timeout=q(o.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(l)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Oe,[e.createVNode(_,{modelValue:o.fields.write_timeout,"onUpdate:modelValue":[r[16]||(r[16]=c=>o.fields.write_timeout=c),r[17]||(r[17]=()=>{o.fields.write_timeout=q(o.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(l)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",je,[e.createVNode(_,{modelValue:o.fields.read_timeout,"onUpdate:modelValue":[r[18]||(r[18]=c=>o.fields.read_timeout=c),r[19]||(r[19]=()=>{o.fields.read_timeout=q(o.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(l)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),be.value?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(_,{modelValue:o.fields.client_certificate,"onUpdate:modelValue":r[20]||(r[20]=c=>o.fields.client_certificate=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",error:!!o.formFieldErrors.client_certificate,label:e.unref(l)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(l)("gateway_services.form.fields.client_certificate.placeholder"),readonly:o.isReadonly,type:"text",onInput:r[21]||(r[21]=c=>de("client_certificate"))},null,8,["modelValue","error","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),ve.value?(e.openBlock(),e.createElementBlock("div",He,[e.createVNode(_,{modelValue:o.fields.ca_certificates,"onUpdate:modelValue":r[22]||(r[22]=c=>o.fields.ca_certificates=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",error:!!o.formFieldErrors.ca_certificates,label:e.unref(l)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(l)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:o.isReadonly,type:"text",onInput:r[23]||(r[23]=c=>de("ca_certificates"))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(F),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","error","label","placeholder","readonly"])])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",Ze,[e.createVNode(i,{modelValue:o.fields.tls_verify_enabled,"onUpdate:modelValue":r[24]||(r[24]=c=>o.fields.tls_verify_enabled=c),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(l)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(l)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(F),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),o.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Je,[e.createVNode(y,{modelValue:o.fields.tls_verify_value,"onUpdate:modelValue":r[25]||(r[25]=c=>o.fields.tls_verify_value=c),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(l)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),o.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(y,{modelValue:o.fields.tls_verify_value,"onUpdate:modelValue":r[26]||(r[26]=c=>o.fields.tls_verify_value=c),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(l)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))]),_:1})]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(l)("gateway_services.form.sections.general.description"),"hide-info-header":s.hideSectionsInfo,title:e.unref(l)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:o.fields.name,"onUpdate:modelValue":r[28]||(r[28]=c=>o.fields.name=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:O.value,"error-message":Y.value,label:e.unref(l)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(l)("gateway_services.form.fields.name.placeholder"),readonly:o.isReadonly,type:"text",onInput:fe},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(G,{"data-testid":"tags-collapse","trigger-alignment":"leading","trigger-label":e.unref(l)("gateway_services.form.fields.tags.collapse")},{default:e.withCtx(()=>[e.createElementVNode("div",Xe,[e.createVNode(_,{modelValue:o.fields.tags,"onUpdate:modelValue":r[29]||(r[29]=c=>o.fields.tags=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(l)("gateway_services.form.fields.tags.help"),label:e.unref(l)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(l)("gateway_services.form.fields.tags.placeholder"),readonly:o.isReadonly,type:"text",onInput:r[30]||(r[30]=c=>A("tags"))},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])])]),_:1},8,["trigger-label"])]),_:1},8,["description","hide-info-header","title"]),o.errorMessages.length?(e.openBlock(),e.createBlock(Z,{key:0,appearance:"danger","data-testid":"form-error"},{default:e.withCtx(()=>[e.createElementVNode("ul",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.errorMessages,c=>(e.openBlock(),e.createElementBlock("li",{key:c},e.toDisplayString(c),1))),128))])]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["can-submit","config","edit-id","entity-type","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-f4bc8c36"]]),{validateHost:tt,validatePort:ot,validateProtocol:rt,validatePath:it}=D.useUrlValidators(),lt=()=>({validateHost:tt,validatePort:ot,validateProtocol:rt,validatePath:it});E.GatewayServiceConfigCard=Ue,E.GatewayServiceForm=et,E.GatewayServiceList=Fe,E.useUrlValidator=lt,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
1
+ (function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E["kong-ui-public-entities-gateway-services"]={},E.Vue,E.VueRouter,E.KongIcons,E["kong-ui-public-i18n"],E["kong-ui-public-entities-shared"]))})(this,function(E,e,Ve,J,ke,p){"use strict";const Ee={actions:{create:"New gateway service",serverless_create:"Add a Service",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",clear:"Clear",view:"View Details",delete:{title:"Delete a Gateway Service",description:"Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",menu_label:"Delete"}},search:{placeholder:{konnect:"Filter by name",kongManager:"Filter by exact name or ID"}},gateway_services:{title:"Gateway Services",list:{toolbar_actions:{new_gateway_service:"New gateway service"},table_headers:{name:"Name",control_plane:"Control Plane",protocol:"Protocol",host:"Host",port:"Port",path:"Path",enabled:"Enabled",tags:"Tags",id:"ID",created_at:"Created At",updated_at:"Last Modified"},empty_state:{title:"Configure a New Gateway Service",description:"Gateway services are used to proxy traffic.",serverless_title:"Configure your first Gateway Service"}},empty_state_v2:{create:"New gateway service",title:"Configure your first gateway service",group:"Services created in gateways within this group will automatically appear here.",description:"Gateway services represent backend APIs or microservices that receive traffic routed through the gateway.",learn_more:"Learn more"},form:{buttons:{try_sample:"Try sample API"},errors:{host:{empty:"Host cannot be empty",invalid:"Invalid host"},port:{type:"Port must be a number",invalid:"Port must be between 0 and 65535"},path:{prefix:"Path must begin with /",invalid:"Path should not include characters outside of the reserved list of RFC 3986"},protocol:{empty:"Protocol cannot be empty",invalid:"Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss"},url:{invalid:"The URL must follow a valid format. Example: https://api.kong-air.com/flights"}},sections:{general:{title:"General Information",description:"Provide a name and tags to help identify and manage this service."},keys:{title:"Service endpoint",description:"Define where this service should send requests.",checkedGroupLabel:"Choose how and where to send traffic",urlLabel:"Full URL",checkedGroupAltLabel:"Protocol, host, port and path",url:{label:"Full URL",description:"Define the service using a single, complete API URL for simple setup."},protocol:{label:"Protocol, host, port, and path",description:"Manually specify each component of the API’s URL for advanced configurations."},viewAdvancedFields:"View advanced fields"}},fields:{upstream_url:{label:"Full URL",placeholder:"e.g. https://api.kong-air.com/flights",tooltip_for_konnect:"This is the URL of the API you will manage in Konnect.",tooltip_for_km:"This is the URL of the API you will manage in Kong Gateway."},name:{label:"Name",placeholder:"Enter a unique name",tooltip:"The Service name."},protocol:{label:"Protocol",tooltip:"The protocol used to communicate with the upstream.",options:{http:"http",https:"https",tcp:"tcp",tls:"tls",tls_passthrough:"tls_passthrough",grpc:"grpc",grpcs:"grpcs",ws:"ws",wss:"wss",udp:"udp"}},host:{label:"Host",placeholder:"e.g. api.kong-air.com",tooltip:"The host of the upstream server. Note that the host value is case sensitive."},path:{label:"Path",placeholder:"e.g. /sample",tooltip:"The path to be used in request to the upstream server."},port:{label:"Port",tooltip:"The upstream server port."},retries:{label:"Retries",tooltip:"The number of retries to execute upon failure to proxy."},connect_timeout:{label:"Connection timeout",tooltip:"The timeout in milliseconds for establishing a connection to the upstream server."},write_timeout:{label:"Write timeout",tooltip:"The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."},read_timeout:{label:"Read timeout",tooltip:"The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."},client_certificate:{label:"Client certificate",placeholder:"Enter a Certificate ID",tooltip:"Certificate to be used as client certificate while TLS handshaking to the upstream server."},ca_certificates:{label:"CA certificates",placeholder:"Enter a comma separated list of CA Certificate IDs",tooltip:"Array of {code1} object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to {code2} when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).",code1:"CA Certificate",code2:"null"},tls_verify_enabled:{label:"TLS verify",help:"If unchecked, use default system setting",tooltip:"Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",code1:"null"},tls_verify_option:{unset:{display:"Use default system setting"},true:{label:"True",display:"On"},false:{label:"False",display:"Off"}},tags:{label:"Tags",tooltip:"An optional set of strings associated with the Service for grouping and filtering.",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",collapse:"Add tags"},enabled:{label:"Enabled",tooltip:"Whether the Service is active. If set to {false}, the proxy behavior will be as if any routes attached to it do not exist (404). Default: {true}.",false:"false",true:"true"}}}},errors:{general:"Gateway Services could not be retrieved",delete:"The gateway service could not be deleted at this time.",copy:"Failed to copy to clipboard",urlErrorMessage:"Error: invalid URL"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},glossary:{gateway_services:"gateway services"}};function Ne(){const s=ke.createI18n("en-us",Ee);return{i18n:s,i18nT:ke.i18nTComponent(s)}}function xe(){return{getPortFromProtocol:(B,f)=>{const n=[80,443],a=Number(f);if((a||a===0)&&!n.includes(a))return a;switch(B){case"grpcs":case"tls":case"https":case"wss":return 443;case"grpc":case"tcp":case"http":case"ws":default:return 80}}}}function Se(){const{i18n:{t:s}}=D.useI18n();return{validateHost:u=>{if(!u||u.trim()==="")return s("gateway_services.form.errors.host.empty");const C=/^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,63})?$/;return/^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(u)||C.test(u)?"":s("gateway_services.form.errors.host.invalid")},validateProtocol:(u,C)=>!u||u.trim()===""?s("gateway_services.form.errors.protocol.empty"):(u=u.slice(0,-1),C.find(l=>{if(l.value===u)return l})===void 0?s("gateway_services.form.errors.protocol.invalid"):""),validatePath:u=>!u||u===""?"":u.startsWith("/")?/[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(u)?s("gateway_services.form.errors.path.invalid"):"":s("gateway_services.form.errors.path.prefix"),validatePort:u=>{if(u==null||u==="")return"";const C=typeof u=="string"?parseInt(u,10):u;return isNaN(C)?s("gateway_services.form.errors.port.type"):C<0||C>65535?s("gateway_services.form.errors.port.invalid"):""}}}const D={useI18n:Ne,usePortFromProtocol:xe,useUrlValidators:Se},pe="/v2/control-planes/{controlPlaneId}/core-entities",ue="/{workspace}",te={list:{konnect:{all:`${pe}/services`},kongManager:{all:`${ue}/services`}},form:{konnect:{create:`${pe}/services`,edit:`${pe}/services/{id}`},kongManager:{create:`${ue}/services`,edit:`${ue}/services/{id}`}}},Pe={class:"kong-ui-entities-gateway-services-list"},Ie={class:"button-row"},Te={key:1},Be=e.defineComponent({__name:"GatewayServiceList",props:{config:{type:Object,required:!0,validator:s=>!(!s||!["konnect","kongManager"].includes(s==null?void 0:s.app)||!s.createRoute||!s.getViewRoute||!s.getEditRoute||s.app==="kongManager"&&!s.isExactMatch&&!s.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},isServerless:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","toggle:success"],setup(s,{emit:B}){var fe;const f=B,n=s,{i18n:{t:a,formatUnixTimeStamp:u}}=D.useI18n(),C=Ve.useRouter(),{axiosInstance:F}=p.useAxios((fe=n.config)==null?void 0:fe.axiosRequestConfig),{hasRecords:l,handleStateChange:P}=p.useTableState(()=>U.value),V=e.computed(()=>l.value&&n.config.app==="konnect"),me=e.computed(()=>n.config.app!=="kongManager"||!!n.config.disableSorting),Q={name:{label:a("gateway_services.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},...n.config.showControlPlaneColumn?{control_plane:{label:a("gateway_services.list.table_headers.control_plane")}}:{},protocol:{label:a("gateway_services.list.table_headers.protocol"),searchable:!0,sortable:!0},host:{label:a("gateway_services.list.table_headers.host"),searchable:!0,sortable:!0},port:{label:a("gateway_services.list.table_headers.port"),searchable:!0,sortable:!0},path:{label:a("gateway_services.list.table_headers.path"),searchable:!0,sortable:!0},enabled:{label:a("gateway_services.list.table_headers.enabled"),searchable:!0,sortable:!0},tags:{label:a("gateway_services.list.table_headers.tags"),sortable:!1},updated_at:{label:a("gateway_services.list.table_headers.updated_at"),sortable:!0},created_at:{label:a("gateway_services.list.table_headers.created_at"),sortable:!0}},oe={columnVisibility:{created_at:!1}},re=Q,W=e.computed(()=>{var m,g;let d=`${n.config.apiBaseUrl}${te.list[n.config.app].all}`;return n.config.app==="konnect"?d=d.replace(/{controlPlaneId}/gi,((m=n.config)==null?void 0:m.controlPlaneId)||""):n.config.app==="kongManager"&&(d=d.replace(/\/{workspace}/gi,(g=n.config)!=null&&g.workspace?`/${n.config.workspace}`:"")),d}),ge=e.computed(()=>n.config.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${W.value}`):new URL(W.value)),U=e.ref(""),M=e.computed(()=>{const d=n.config.app==="konnect"||n.config.isExactMatch;if(d)return{isExactMatch:d,placeholder:a(`search.placeholder.${n.config.app}`)};const{name:m,enabled:g,protocol:v,host:R,port:S,path:T}=Q;return{isExactMatch:d,fields:{name:m,enabled:g,protocol:v,host:R,port:S,path:T},schema:n.config.filterSchema}}),{fetcher:ye,fetcherState:K,fetcherCacheKey:b}=p.useFetcher(e.computed(()=>({...n.config,cacheIdentifier:n.cacheIdentifier})),W),X=()=>{U.value=""},Y=()=>{b.value++},O=e.ref(null),o=e.computed(()=>({ctaPath:n.config.createRoute,ctaText:z.value?n.isServerless?a("actions.serverless_create"):a("actions.create"):void 0,message:`${a("gateway_services.list.empty_state.description")}${n.config.additionMessageForEmptyState?` ${n.config.additionMessageForEmptyState}`:""}`,title:z.value?n.isServerless?a("gateway_services.list.empty_state.serverless_title"):a("gateway_services.list.empty_state.title"):a("gateway_services.title")})),h=e.ref(!1),x=e.ref(null),j=e.computed(()=>{const d={action:"disable",id:"",name:""};if(x.value){const{enabled:m,id:g,name:v}=x.value;d.action=m?"disable":"enable",d.id=g,d.name=v||g}return d}),ie=d=>{h.value=!0,x.value=d},le=()=>{h.value=!1,x.value=null},q=async()=>{var v,R;if(!await((v=n.canEdit)==null?void 0:v.call(n,x.value))||!x.value)return;const m=`${ge.value.href}/${x.value.id}`,g=!x.value.enabled;try{const{data:S}=((R=n.config)==null?void 0:R.app)==="konnect"?await F.put(m,{...x.value,enabled:g}):await F.patch(m,{...x.value,enabled:g});f("toggle:success",S),x.value.enabled=g}catch(S){f("error",S)}},se=d=>{n.config.getControlPlaneRoute&&C.push(n.config.getControlPlaneRoute(d))},ae=async(d,m)=>{const g=d.id;if(!await m(g)){f("copy:error",{entity:d,field:"id",message:a("errors.copy")});return}f("copy:success",{entity:d,field:"id",message:a("copy.success",{val:g})})},ne=async(d,m)=>{const g=JSON.stringify(d);if(!await m(g)){f("copy:error",{entity:d,message:a("errors.copy")});return}f("copy:success",{entity:d,message:a("copy.success_brief")})},ce=async d=>{var g;await((g=n.canRetrieve)==null?void 0:g.call(n,d))&&C.push(n.config.getViewRoute(d.id))},de=d=>({label:a("actions.view"),to:n.config.getViewRoute(d)}),_e=d=>({label:a("actions.edit"),to:n.config.getEditRoute(d)}),N=e.ref(void 0),$=e.ref(!1),A=e.ref(!1),L=e.ref(""),he=p.useDeleteUrlBuilder(n.config,W.value),we=d=>{N.value=d,$.value=!0,L.value=""},ee=()=>{$.value=!1,N.value=void 0},be=async()=>{var d,m,g;if((d=N.value)!=null&&d.id){A.value=!0;try{await F.delete(he(N.value.id)),f("delete:success",N.value),ee(),b.value++}catch(v){L.value=((g=(m=v.response)==null?void 0:m.data)==null?void 0:g.message)||v.message||a("errors.delete"),f("error",v)}finally{A.value=!1}}},ve=()=>{C.push(n.config.createRoute)};e.watch(K,d=>{var m,g,v;if(d.status===p.FetcherStatus.Error){O.value={title:a("errors.general")},(v=(g=(m=d.error)==null?void 0:m.response)==null?void 0:g.data)!=null&&v.message&&(O.value.message=d.error.response.data.message),f("error",d.error);return}O.value=null});const z=e.ref(!1);return e.onBeforeMount(async()=>{z.value=await n.canCreate()}),(d,m)=>{const g=e.resolveComponent("KButton"),v=e.resolveComponent("KEmptyState"),R=e.resolveComponent("KBadge"),S=e.resolveComponent("KInputSwitch"),T=e.resolveComponent("KDropdownItem"),H=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(e.unref(p.EntityBaseTable),{"cache-identifier":s.cacheIdentifier,"default-table-preferences":oe,"disable-sorting":me.value,"empty-state-options":o.value,"enable-entity-actions":"","error-message":O.value,fetcher:e.unref(ye),"fetcher-cache-key":e.unref(b),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-gateway-services-list",query:U.value,"table-headers":e.unref(re),onClearSearchInput:X,"onClick:row":m[4]||(m[4]=t=>ce(t)),onSort:Y,onState:e.unref(P)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(p.EntityFilter),{modelValue:U.value,"onUpdate:modelValue":m[0]||(m[0]=t=>U.value=t),config:M.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!s.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Ie,[V.value?(e.openBlock(),e.createBlock(g,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-learn-more-button",icon:"",onClick:m[1]||(m[1]=t=>d.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(J.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>s.canCreate()},{default:e.withCtx(()=>[e.createVNode(g,{appearance:"primary","data-testid":"toolbar-add-gateway-service",size:s.useActionOutside?"medium":"large",to:s.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(J.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("gateway_services.list.toolbar_actions.new_gateway_service")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:t})=>[e.createElementVNode("b",null,e.toDisplayString(t??"-"),1)]),control_plane:e.withCtx(({row:t})=>{var r;return[(r=t.x_meta)!=null&&r.cluster_id?(e.openBlock(),e.createBlock(R,{key:0,tooltip:t.x_meta.cluster_id,"truncation-tooltip":"",onClick:e.withModifiers(y=>se(t.x_meta.cluster_id),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.x_meta.cluster_id),1)]),_:2},1032,["tooltip","onClick"])):(e.openBlock(),e.createElementBlock("b",Te,"-"))]}),enabled:e.withCtx(({row:t})=>[e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>s.canEdit(t),"force-show":""},{default:e.withCtx(({isAllowed:r})=>[e.createElementVNode("div",{onClick:m[3]||(m[3]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(S,{modelValue:t.enabled,"onUpdate:modelValue":y=>t.enabled=y,"data-testid":`row-${t.id}-toggle-input`,disabled:!r,onClick:e.withModifiers(y=>ie(t),["prevent"])},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","onClick"])])]),_:2},1032,["auth-function"])]),tags:e.withCtx(({rowValue:t})=>[e.createVNode(e.unref(p.TableTags),{tags:t},null,8,["tags"])]),created_at:e.withCtx(({rowValue:t})=>[e.createTextVNode(e.toDisplayString(e.unref(u)(t)),1)]),updated_at:e.withCtx(({row:t,rowValue:r})=>[e.createTextVNode(e.toDisplayString(e.unref(u)(r??t.created_at)),1)]),actions:e.withCtx(({row:t})=>[e.createVNode(H,null,{default:e.withCtx(({copyToClipboard:r})=>[e.createVNode(T,{"data-testid":"action-entity-copy-id",onClick:y=>ae(t,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_id")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(H,null,{default:e.withCtx(({copyToClipboard:r})=>[e.createVNode(T,{"data-testid":"action-entity-copy-json",onClick:y=>ne(t,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_json")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>s.canRetrieve(t)},{default:e.withCtx(()=>[e.createVNode(T,{"data-testid":"action-entity-view","has-divider":"",item:de(t.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>s.canEdit(t)},{default:e.withCtx(()=>[e.createVNode(T,{"data-testid":"action-entity-edit",item:_e(t.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(p.PermissionsWrapper),{"auth-function":()=>s.canDelete(t)},{default:e.withCtx(()=>[e.createVNode(T,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:r=>we(t)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.delete.menu_label")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!U.value&&s.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var t;return[e.createVNode(v,{"data-testid":"gateway-services-entity-empty-state","icon-background":"",message:e.unref(a)("gateway_services.empty_state_v2.description"),title:e.unref(a)("gateway_services.empty_state_v2.title")},e.createSlots({icon:e.withCtx(()=>[e.createVNode(e.unref(J.ServicesIcon),{decorative:""})]),action:e.withCtx(()=>[z.value?(e.openBlock(),e.createBlock(g,{key:0,"data-testid":"entity-create-button",onClick:ve},{default:e.withCtx(()=>[e.createVNode(e.unref(J.AddIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.create")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(g,{appearance:"secondary","data-testid":"entity-learn-more-button",onClick:m[2]||(m[2]=r=>d.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(J.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.learn_more")),1)]),_:1})]),_:2},[(t=s.config)!=null&&t.isControlPlaneGroup?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["message","title"])]}),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(p.EntityToggleModal),{action:j.value.action,"entity-id":j.value.id,"entity-name":j.value.name,"entity-type":e.unref(a)("glossary.gateway_services"),"on-confirm":q,visible:h.value,onCancel:le,onProceed:le},null,8,["action","entity-id","entity-name","entity-type","visible"]),e.createVNode(e.unref(p.EntityDeleteModal),{"action-pending":A.value,description:e.unref(a)("actions.delete.description"),"entity-name":N.value&&(N.value.name||N.value.id),"entity-type":e.unref(p.EntityTypes).GatewayService,error:L.value,title:e.unref(a)("actions.delete.title"),visible:$.value,onCancel:ee,onProceed:be},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Ce=(s,B)=>{const f=s.__vccOpts||s;for(const[n,a]of B)f[n]=a;return f},Fe=Ce(Be,[["__scopeId","data-v-0ab33d23"]]),Ae={class:"kong-ui-gateway-service-entity-config-card"},Ue=e.defineComponent({__name:"GatewayServiceConfigCard",props:{config:{type:Object,required:!0,validator:s=>!(!s||!["konnect","kongManager"].includes(s==null?void 0:s.app)||s.app==="konnect"&&!s.controlPlaneId||s.app==="kongManager"&&typeof s.workspace!="string"||!s.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(s){const B=s,{i18n:{t:f},i18nT:n}=D.useI18n(),a=e.computed(()=>te.form[B.config.app].edit),{getPropValue:u}=p.useHelpers(),C=(l,P)=>u(l,P)===!0?f("gateway_services.form.fields.tls_verify_option.true.display"):f("gateway_services.form.fields.tls_verify_option.false.display"),F=e.ref({id:{},name:{tooltip:f("gateway_services.form.fields.name.tooltip")},enabled:{},updated_at:{},created_at:{},protocol:{section:p.ConfigurationSchemaSection.Basic,tooltip:f("gateway_services.form.fields.protocol.tooltip")},host:{section:p.ConfigurationSchemaSection.Basic,tooltip:f("gateway_services.form.fields.host.tooltip")},path:{section:p.ConfigurationSchemaSection.Basic,tooltip:f("gateway_services.form.fields.path.tooltip")},port:{section:p.ConfigurationSchemaSection.Basic,tooltip:f("gateway_services.form.fields.port.tooltip")},tags:{tooltip:f("gateway_services.form.fields.tags.tooltip")},retries:{order:1,tooltip:f("gateway_services.form.fields.retries.tooltip")},connect_timeout:{order:2,tooltip:f("gateway_services.form.fields.connect_timeout.tooltip")},write_timeout:{order:3,tooltip:f("gateway_services.form.fields.write_timeout.tooltip")},read_timeout:{order:4,tooltip:f("gateway_services.form.fields.read_timeout.tooltip")},client_certificate:{order:5,tooltip:f("gateway_services.form.fields.client_certificate.tooltip")},ca_certificates:{type:p.ConfigurationSchemaType.BadgeTag,label:f("gateway_services.form.fields.ca_certificates.label"),order:6},tls_verify:{label:f("gateway_services.form.fields.tls_verify_enabled.label")},tls_verify_depth:{hidden:!0}});return(l,P)=>(e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(e.unref(p.EntityBaseConfigCard),{config:s.config,"config-card-doc":s.configCardDoc,"config-schema":F.value,"entity-type":e.unref(p.SupportedEntityType).GatewayService,"fetch-url":a.value,"hide-title":s.hideTitle,"onFetch:error":P[0]||(P[0]=V=>l.$emit("fetch:error",V)),"onFetch:success":P[1]||(P[1]=V=>l.$emit("fetch:success",V)),onLoading:P[2]||(P[2]=V=>l.$emit("loading",V))},{"enabled-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(n),{keypath:"gateway_services.form.fields.enabled.tooltip",scope:"global"},{false:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(f)("gateway_services.form.fields.enabled.false")),1)]),true:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(f)("gateway_services.form.fields.enabled.true")),1)]),_:1})]),"ca_certificates-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(n),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(f)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(f)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),"tls_verify-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(n),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(f)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),tls_verify:e.withCtx(V=>[e.createTextVNode(e.toDisplayString(typeof e.unref(u)("rowValue",V)=="boolean"?C("rowValue",V):e.unref(f)("gateway_services.form.fields.tls_verify_option.unset.display")),1)]),client_certificate:e.withCtx(V=>[e.createTextVNode(e.toDisplayString(e.unref(u)("rowValue",V)?e.unref(u)("rowValue",V).id:"–"),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),I={name:"Kong-Air-Flights-API",protocol:"https",path:"/flights",host:"api.kong-air.com",port:443},$e={class:"kong-ui-entities-gateway-service-form"},Re={key:0,class:"gateway-service-form-general-info"},De={class:"gateway-service-form-group-selection-wrapper"},Me={key:0,class:"gateway-service-form-group-fields"},Ke={key:0,class:"gateway-service-form-group-fields"},qe={key:0},Le={key:0,class:"gateway-service-form-advanced-fields"},Ge={class:"gateway-service-form-margin-bottom"},We={class:"gateway-service-form-margin-bottom"},Oe={class:"gateway-service-form-margin-bottom"},je={class:"gateway-service-form-margin-bottom"},ze={key:0,class:"gateway-service-form-margin-bottom"},He={key:1,class:"gateway-service-form-margin-bottom"},Ze={key:2,class:"gateway-service-form-margin-bottom"},Je={key:0,class:"checkbox-aligned-radio"},Qe={key:1,class:"checkbox-aligned-radio"},Xe={class:"gateway-service-form-tags"},Ye={class:"form-error-list"},et=Ce(e.defineComponent({__name:"GatewayServiceForm",props:{config:{type:Object,required:!0,validator:s=>!(!s||!["konnect","kongManager"].includes(s==null?void 0:s.app)||s.app==="konnect"&&!s.controlPlaneId||s.app==="kongManager"&&typeof s.workspace!="string"||!s.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1},hideTrySampleApiButton:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated","try-sample-api"],setup(s,{expose:B,emit:f}){var H;const n=f,a=s,u=e.ref(!0),C=Ve.useRouter(),{i18nT:F,i18n:{t:l}}=D.useI18n(),{getErrorFieldsFromError:P}=p.useErrors(),{axiosInstance:V}=p.useAxios((H=a.config)==null?void 0:H.axiosRequestConfig),me=p.useValidators(),{validateHost:Q,validatePath:oe,validatePort:re,validateProtocol:W}=D.useUrlValidators(),{objectsAreEqual:ge}=p.useHelpers(),U=e.computed(()=>te.form[a.config.app].edit),M=e.computed(()=>a.gatewayServiceId?p.EntityBaseFormType.Edit:p.EntityBaseFormType.Create),ye=e.ref(!1),K=e.computed(()=>!!a.gatewayServiceId),b=e.ref(K.value?"protocol":"url"),X=D.usePortFromProtocol(),Y=e.ref(""),O=e.computed(()=>!!Y.value||!!N("name")),o=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:"",enabled:!0},isReadonly:!1,errorMessages:[],formFieldErrors:{host:"",port:"",path:"",name:"",url:"",tags:"",retries:"",connect_timeout:"",write_timeout:"",read_timeout:"",client_certificate:"",ca_certificates:"",tls_verify_enabled:"",tls_verify_value:""}}),h=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:"",enabled:!0}),x=a.config.app==="konnect"||p.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),j=[{label:l("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:l("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:l("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:l("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:l("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:l("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:l("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...x?[{label:l("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:l("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:l("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],ie={url:"url",protocol:"protocol"},le=(t,r)=>{r.value},q=t=>t?parseFloat(t):0,se=()=>{o.fields.host=h.host,o.fields.path=h.path,o.fields.port=h.port,o.fields.protocol=h.protocol,o.fields.url=h.url,o.fields.retries=h.retries,o.fields.connect_timeout=h.connect_timeout,o.fields.write_timeout=h.write_timeout,o.fields.read_timeout=h.read_timeout,o.fields.client_certificate=h.client_certificate,o.fields.ca_certificates=h.ca_certificates,o.fields.tls_verify_enabled=h.tls_verify_enabled,o.fields.tls_verify_value=h.tls_verify_value,o.fields.enabled=h.enabled},ae=()=>{u.value=!0,A(),o.errorMessages=[],se()},ne=()=>{switch(se(),o.fields.name=`${I.name}-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,b.value){case"url":o.fields.url=`${I.protocol}://${I.host}${I.path}`;break;case"protocol":o.fields.host=I.host,o.fields.path=I.path,o.fields.protocol=I.protocol,o.fields.port=I.port;break;default:o.fields.url=`${I.protocol}://${I.host}${I.path}`}},ce=()=>{if(A(),o.fields.url.length)try{const t=new URL(o.fields.url),r=W(t.protocol,j);if(r)throw new Error(r);o.fields.protocol=t.protocol.slice(0,-1);const y=Q(t.hostname);if(y)throw new Error(y);o.fields.host=t.hostname;const k=oe(t.pathname);if(k)throw new Error(k);o.fields.path=t.pathname;const _=re(t.port);if(_)throw new Error(_);const w=Number(t.port);ye.value=!!w,o.fields.port=w||X.getPortFromProtocol(o.fields.protocol),n("url-valid:success")}catch{n("url-valid:error",l("gateway_services.form.errors.url.invalid")),o.formFieldErrors.url=l("gateway_services.form.errors.url.invalid")}},de=t=>{A(t)},_e=e.computed(()=>!!o.formFieldErrors.url||!!o.formFieldErrors.host||!!o.formFieldErrors.port),N=t=>{if(o.errorMessages.length)return"";const r=o.formFieldErrors;return r[t]?r[t]:""},$=t=>{A(t??void 0);const r=Q(o.fields.host);r&&(o.formFieldErrors.host=r);const y=oe(o.fields.path);y&&(o.formFieldErrors.path=y);const k=re(o.fields.port);k&&(o.formFieldErrors.port=k),L.value?n("url-valid:success"):n("url-valid:error",o.errorMessages.join(",")||l("gateway_services.form.errors.url.invalid"))},A=t=>{if(t)o.formFieldErrors[t]="";else for(let r in o.formFieldErrors)o.formFieldErrors[r]="";o.errorMessages=[]},L=e.computed(()=>{for(let t in o.formFieldErrors)if(o.formFieldErrors[t].length)return!1;return!0}),he=()=>{o.fields.url&&b.value==="url"?ce():$()},we=()=>`new-service-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,ee=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(o.fields.protocol)),be=e.computed(()=>{if(b.value==="url")return!0;const t=["https","wss","tls"].includes(o.fields.protocol);return b.value==="protocol"&&t}),ve=e.computed(()=>{if(b.value==="url")return!0;const t=["https","tls"].includes(o.fields.protocol);return b.value==="protocol"&&t}),z=e.computed(()=>{if(b.value==="url")return!0;const t=["https","wss","tls"].includes(o.fields.protocol);return b.value==="protocol"&&t}),fe=t=>{A("name"),Y.value=me.utf8Name(t)},d=e.computed(()=>{const t=!K.value||!ge(o.fields,h),r=b.value==="url"&&!!o.fields.url&&L.value,y=b.value==="protocol"&&!!o.fields.host&&L.value;return t&&(r||y)}),m=t=>{var r,y,k;o.fields.name=(t==null?void 0:t.name)||"",o.fields.tags=((r=t==null?void 0:t.tags)==null?void 0:r.join(", "))||"",o.fields.protocol=(t==null?void 0:t.protocol)||"http",o.fields.path=(t==null?void 0:t.path)||"",o.fields.read_timeout=t!=null&&t.read_timeout||(t==null?void 0:t.read_timeout)===0?t==null?void 0:t.read_timeout:6e4,o.fields.retries=t!=null&&t.retries||(t==null?void 0:t.retries)===0?t==null?void 0:t.retries:5,o.fields.host=(t==null?void 0:t.host)||"",o.fields.connect_timeout=t!=null&&t.connect_timeout||(t==null?void 0:t.connect_timeout)===0?t==null?void 0:t.connect_timeout:6e4,o.fields.tls_verify_enabled=(t==null?void 0:t.tls_verify)!==""&&(t==null?void 0:t.tls_verify)!==null&&(t==null?void 0:t.tls_verify)!==void 0,o.fields.tls_verify_value=t!=null&&t.tls_verify?t==null?void 0:t.tls_verify:!1,o.fields.ca_certificates=((y=t==null?void 0:t.ca_certificates)==null?void 0:y.join(","))||"",o.fields.client_certificate=((k=t==null?void 0:t.client_certificate)==null?void 0:k.id)||"",o.fields.write_timeout=t!=null&&t.write_timeout||(t==null?void 0:t.write_timeout)===0?t==null?void 0:t.write_timeout:6e4,o.fields.port=t!=null&&t.port||(t==null?void 0:t.port)===0?t==null?void 0:t.port:80,o.fields.enabled=(t==null?void 0:t.enabled)??!0,Object.assign(h,o.fields)},g=()=>{C.push(a.config.cancelRoute)},v=e.computed(()=>{var r,y;let t=`${a.config.apiBaseUrl}${te.form[a.config.app][M.value]}`;return a.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((r=a.config)==null?void 0:r.controlPlaneId)||""):a.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(y=a.config)!=null&&y.workspace?`/${a.config.workspace}`:"")),t=t.replace(/{id}/gi,a.gatewayServiceId),t}),R=t=>{let r="";t.url&&(r=new URL(t.url).protocol),(["https","wss","tls"].includes(t.protocol)||["https","wss","tls"].includes(r))&&(t.tls_verify=t.tls_verify_enabled?t.tls_verify_value:null),delete t.tls_verify_enabled,delete t.tls_verify_value},S=e.computed(()=>{var r,y,k,_;const t={name:o.fields.name||null,tags:o.fields.tags?(k=(y=(r=o.fields.tags)==null?void 0:r.split(","))==null?void 0:y.map(w=>String(w||"").trim()))==null?void 0:k.filter(w=>w!==""):null,protocol:o.fields.protocol,path:o.fields.path||null,read_timeout:o.fields.read_timeout,retries:o.fields.retries,host:o.fields.host,connect_timeout:o.fields.connect_timeout,tls_verify_value:o.fields.tls_verify_value,tls_verify_enabled:o.fields.tls_verify_enabled,ca_certificates:o.fields.ca_certificates?(_=o.fields.ca_certificates)==null?void 0:_.split(",").filter(w=>w!==""):null,client_certificate:o.fields.client_certificate?{id:o.fields.client_certificate}:null,write_timeout:o.fields.write_timeout,port:o.fields.port,url:o.fields.url,enabled:o.fields.enabled};return o.fields.client_certificate&&["https","wss","tls"].includes(o.fields.protocol)&&(t.client_certificate={id:o.fields.client_certificate}),o.fields.tls_verify_enabled&&["https","wss","tls"].includes(o.fields.protocol)&&(t.tls_verify=o.fields.tls_verify_value),ee.value||(t.path=null),M.value==="create"?b.value==="url"?(delete t.protocol,delete t.host,delete t.path,a.config.app==="konnect"&&delete t.port):delete t.url:M.value==="edit"&&delete t.url,t}),T=async()=>{var t,r,y,k;try{o.isReadonly=!0;const _=S.value;R(_);let w;if(M.value==="create"?w=await V.post(v.value,_):M.value==="edit"&&(w=((t=a.config)==null?void 0:t.app)==="konnect"?await V.put(v.value,_):await V.patch(v.value,_)),w){const{data:i}=w;o.fields.name=(i==null?void 0:i.name)||"",o.fields.port=i.port||X.getPortFromProtocol(i.protocol),o.fields.protocol=(i==null?void 0:i.protocol)||"http",o.fields.host=(i==null?void 0:i.host)||"",o.fields.path=(i==null?void 0:i.path)||"",o.fields.url=(i==null?void 0:i.url)||"",o.fields.retries=i!=null&&i.retries||(i==null?void 0:i.retries)===0?i==null?void 0:i.retries:5,o.fields.connect_timeout=i!=null&&i.connect_timeout||(i==null?void 0:i.connect_timeout)===0?i==null?void 0:i.connect_timeout:6e4,o.fields.write_timeout=i!=null&&i.write_timeout||(i==null?void 0:i.write_timeout)===0?i==null?void 0:i.write_timeout:6e4,o.fields.read_timeout=i!=null&&i.read_timeout||(i==null?void 0:i.read_timeout)===0?i==null?void 0:i.read_timeout:6e4,o.fields.client_certificate=((r=i==null?void 0:i.client_certificate)==null?void 0:r.id)||"",o.fields.ca_certificates=(y=i==null?void 0:i.ca_certificates)!=null&&y.length?i==null?void 0:i.ca_certificates.join(","):"",o.fields.tls_verify_enabled=(i==null?void 0:i.tls_verify)!==""&&(i==null?void 0:i.tls_verify)!==null&&(i==null?void 0:i.tls_verify)!==void 0,o.fields.tls_verify_value=o.fields.tls_verify_enabled&&(i==null?void 0:i.tls_verify),o.fields.tags=(k=i==null?void 0:i.tags)!=null&&k.length?i.tags.join(", "):"",o.fields.enabled=(i==null?void 0:i.enabled)??!0,Object.assign(h,o.fields),n("update",w==null?void 0:w.data)}return w}catch(_){const{fields:w,messages:i}=P(_);o.errorMessages=i,w.length&&w.forEach(G=>{const Z=G.field;Z==="client_certificate.id"?o.formFieldErrors.client_certificate=G.message:Z.startsWith("ca_certificates")?o.formFieldErrors.ca_certificates=G.message:Object.keys(o.formFieldErrors).includes(Z)&&(o.formFieldErrors={...o.formFieldErrors,[Z]:G.message})}),n("error",_)}finally{o.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(o.fields,h)}),e.watch(o.fields,t=>{o.fields.port=X.getPortFromProtocol(t.protocol,String(t.port)),n("model-updated",S.value)}),e.onMounted(()=>{n("model-updated",S.value),K.value||(o.fields.name=we())}),B({validateUrl:he,getPayload:S,saveFormData:T,canSubmit:d,initForm:m}),(t,r)=>{const y=e.resolveComponent("KRadio"),k=e.resolveComponent("KButton"),_=e.resolveComponent("KInput"),w=e.resolveComponent("KSelect"),i=e.resolveComponent("KCheckbox"),G=e.resolveComponent("KCollapse"),Z=e.resolveComponent("KAlert");return e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(e.unref(p.EntityBaseForm),{"can-submit":d.value,config:s.config,"edit-id":s.gatewayServiceId,"entity-type":e.unref(p.SupportedEntityType).GatewayService,"fetch-url":U.value,"form-fields":S.value,"is-readonly":o.isReadonly,onCancel:g,"onFetch:error":r[31]||(r[31]=c=>t.$emit("error",c)),"onFetch:success":m,onLoading:r[32]||(r[32]=c=>t.$emit("loading",c)),onSubmit:T},{"form-actions":e.withCtx(()=>[e.renderSlot(t.$slots,"form-actions",{canSubmit:d.value,cancel:g,submit:T},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(l)("gateway_services.form.sections.keys.description"),"hide-info-header":s.hideSectionsInfo,title:e.unref(l)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[K.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",De,[e.createVNode(y,{modelValue:b.value,"onUpdate:modelValue":r[0]||(r[0]=c=>b.value=c),card:"","card-orientation":"horizontal","data-testid":"gateway-service-url-radio",description:e.unref(l)("gateway_services.form.sections.keys.url.description"),label:e.unref(l)("gateway_services.form.sections.keys.url.label"),"selected-value":ie.url,onChange:ae},null,8,["modelValue","description","label","selected-value"]),e.createVNode(y,{modelValue:b.value,"onUpdate:modelValue":r[1]||(r[1]=c=>b.value=c),card:"","card-orientation":"horizontal","checked-group":"protocol","data-testid":"gateway-service-protocol-radio",description:e.unref(l)("gateway_services.form.sections.keys.protocol.description"),label:e.unref(l)("gateway_services.form.sections.keys.protocol.label"),"selected-value":ie.protocol,onChange:ae},null,8,["modelValue","description","label","selected-value"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[b.value==="url"?(e.openBlock(),e.createElementBlock("div",Me,[e.createVNode(_,{modelValue:o.fields.url,"onUpdate:modelValue":r[2]||(r[2]=c=>o.fields.url=c),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",error:_e.value,"error-message":N("url"),label:e.unref(l)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:s.config.app==="konnect"?e.unref(l)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(l)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(l)("gateway_services.form.fields.upstream_url.placeholder"),required:"",onInput:ce},e.createSlots({_:2},[s.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(k,{appearance:"tertiary","data-testid":"try-sample-api",size:"small",onClick:ne},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0)]),_:1})])),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[b.value==="protocol"||K.value?(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(w,{modelValue:o.fields.protocol,"onUpdate:modelValue":r[3]||(r[3]=c=>o.fields.protocol=c),"data-testid":"gateway-service-protocol-select",items:j,label:e.unref(l)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:o.isReadonly,required:"",width:"100%",onSelected:r[4]||(r[4]=c=>le(o.fields.protocol,c))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(_,{modelValue:o.fields.host,"onUpdate:modelValue":r[5]||(r[5]=c=>o.fields.host=c),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",error:!!o.formFieldErrors.host,"error-message":N("host"),label:e.unref(l)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(l)("gateway_services.form.fields.host.placeholder"),required:"",onInput:r[6]||(r[6]=c=>$("host"))},e.createSlots({_:2},[s.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(k,{appearance:"tertiary",size:"small",onClick:ne},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"]),ee.value?(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(_,{modelValue:o.fields.path,"onUpdate:modelValue":r[7]||(r[7]=c=>o.fields.path=c),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",error:!!o.formFieldErrors.path,"error-message":N("path"),label:e.unref(l)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(l)("gateway_services.form.fields.path.placeholder"),onInput:r[8]||(r[8]=c=>$("path"))},null,8,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(_,{modelValue:o.fields.port,"onUpdate:modelValue":[r[9]||(r[9]=c=>o.fields.port=c),r[11]||(r[11]=()=>{o.fields.port=q(o.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",error:!!o.formFieldErrors.port,"error-message":N("port"),label:e.unref(l)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number",onInput:r[10]||(r[10]=c=>$("port"))},null,8,["modelValue","error","error-message","label","label-attributes"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(G,{modelValue:u.value,"onUpdate:modelValue":r[27]||(r[27]=c=>u.value=c),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(l)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",Ge,[e.createVNode(_,{modelValue:o.fields.retries,"onUpdate:modelValue":[r[12]||(r[12]=c=>o.fields.retries=c),r[13]||(r[13]=()=>{o.fields.retries=q(o.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(l)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",We,[e.createVNode(_,{modelValue:o.fields.connect_timeout,"onUpdate:modelValue":[r[14]||(r[14]=c=>o.fields.connect_timeout=c),r[15]||(r[15]=()=>{o.fields.connect_timeout=q(o.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(l)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Oe,[e.createVNode(_,{modelValue:o.fields.write_timeout,"onUpdate:modelValue":[r[16]||(r[16]=c=>o.fields.write_timeout=c),r[17]||(r[17]=()=>{o.fields.write_timeout=q(o.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(l)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",je,[e.createVNode(_,{modelValue:o.fields.read_timeout,"onUpdate:modelValue":[r[18]||(r[18]=c=>o.fields.read_timeout=c),r[19]||(r[19]=()=>{o.fields.read_timeout=q(o.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(l)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),be.value?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(_,{modelValue:o.fields.client_certificate,"onUpdate:modelValue":r[20]||(r[20]=c=>o.fields.client_certificate=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",error:!!o.formFieldErrors.client_certificate,label:e.unref(l)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(l)("gateway_services.form.fields.client_certificate.placeholder"),readonly:o.isReadonly,type:"text",onInput:r[21]||(r[21]=c=>de("client_certificate"))},null,8,["modelValue","error","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),ve.value?(e.openBlock(),e.createElementBlock("div",He,[e.createVNode(_,{modelValue:o.fields.ca_certificates,"onUpdate:modelValue":r[22]||(r[22]=c=>o.fields.ca_certificates=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",error:!!o.formFieldErrors.ca_certificates,label:e.unref(l)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(l)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:o.isReadonly,type:"text",onInput:r[23]||(r[23]=c=>de("ca_certificates"))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(F),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","error","label","placeholder","readonly"])])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",Ze,[e.createVNode(i,{modelValue:o.fields.tls_verify_enabled,"onUpdate:modelValue":r[24]||(r[24]=c=>o.fields.tls_verify_enabled=c),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(l)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(l)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(F),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),o.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Je,[e.createVNode(y,{modelValue:o.fields.tls_verify_value,"onUpdate:modelValue":r[25]||(r[25]=c=>o.fields.tls_verify_value=c),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(l)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),o.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(y,{modelValue:o.fields.tls_verify_value,"onUpdate:modelValue":r[26]||(r[26]=c=>o.fields.tls_verify_value=c),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(l)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))]),_:1})]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(p.EntityFormSection),{description:e.unref(l)("gateway_services.form.sections.general.description"),"hide-info-header":s.hideSectionsInfo,title:e.unref(l)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:o.fields.name,"onUpdate:modelValue":r[28]||(r[28]=c=>o.fields.name=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:O.value,"error-message":Y.value,label:e.unref(l)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(l)("gateway_services.form.fields.name.placeholder"),readonly:o.isReadonly,type:"text",onInput:fe},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(G,{"data-testid":"tags-collapse","trigger-alignment":"leading","trigger-label":e.unref(l)("gateway_services.form.fields.tags.collapse")},{default:e.withCtx(()=>[e.createElementVNode("div",Xe,[e.createVNode(_,{modelValue:o.fields.tags,"onUpdate:modelValue":r[29]||(r[29]=c=>o.fields.tags=c),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(l)("gateway_services.form.fields.tags.help"),label:e.unref(l)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(l)("gateway_services.form.fields.tags.placeholder"),readonly:o.isReadonly,type:"text",onInput:r[30]||(r[30]=c=>A("tags"))},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])])]),_:1},8,["trigger-label"])]),_:1},8,["description","hide-info-header","title"]),o.errorMessages.length?(e.openBlock(),e.createBlock(Z,{key:0,appearance:"danger","data-testid":"form-error"},{default:e.withCtx(()=>[e.createElementVNode("ul",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.errorMessages,c=>(e.openBlock(),e.createElementBlock("li",{key:c},e.toDisplayString(c),1))),128))])]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["can-submit","config","edit-id","entity-type","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-f4bc8c36"]]),{validateHost:tt,validatePort:ot,validateProtocol:rt,validatePath:it}=D.useUrlValidators(),lt=()=>({validateHost:tt,validatePort:ot,validateProtocol:rt,validatePath:it});E.GatewayServiceConfigCard=Ue,E.GatewayServiceForm=et,E.GatewayServiceList=Fe,E.useUrlValidator=lt,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-dc1e39a1]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-dc1e39a1]{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-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-66d61bea]{align-items:center;border-bottom:var(--70f369b3);box-sizing:border-box;display:var(--67c2fae6);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-66d61bea]{box-sizing:border-box;padding-right:16px;width:var(--847b138c)}.config-card-details-row .config-card-details-label label[data-v-66d61bea]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-66d61bea]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-66d61bea]{min-width:0}.config-card-details-row .config-card-details-value[data-v-66d61bea]{box-sizing:border-box;width:var(--847687d6)}.config-card-details-row .config-card-details-value .truncated[data-v-66d61bea]{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-66d61bea]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-66d61bea] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-66d61bea]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-66d61bea]{margin-right:4px}.config-card-details-row[data-v-66d61bea] .k-label{margin-bottom:0}.config-card-details-row[data-v-66d61bea] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-66d61bea] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--eca0976a);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-f11c7e34]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-8dc3c29c]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-8dc3c29c]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-8dc3c29c]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-8dc3c29c] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-8dc3c29c]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-520de902]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-520de902] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-520de902] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-520de902] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-520de902] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-520de902]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-520de902] .k-button:last-of-type,.form-actions[data-v-520de902] .k-button:nth-last-of-type(2){margin-inline-start:16px}.form-actions-reverted[data-v-520de902]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-44153100]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-44153100]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-44153100]{display:none}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-084f7978]{width:100%}.kong-ui-entity-filter-clear[data-v-084f7978]{cursor:pointer}.kong-ui-entity-filter[data-v-084f7978]{display:flex;position:relative}.kong-ui-entity-filter[data-v-084f7978] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-084f7978] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-084f7978]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-084f7978]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-084f7978]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-084f7978]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-084f7978]{color:#232633}.menu-item-expand-icon[data-v-084f7978]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-084f7978]{transform:rotate(180deg)}.menu-item-indicator[data-v-084f7978]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-084f7978]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-084f7978] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-084f7978] .k-input{width:100%}.menu-item-body[data-v-084f7978] .k-select-input .input{font-size:12px}.menu-item-body[data-v-084f7978] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-084f7978]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-084f7978]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-084f7978]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{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-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{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-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] 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-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.ff-form-section .header[data-v-cb6d2e95]{align-items:flex-start;display:flex;gap:8px}.ff-form-section .step[data-v-cb6d2e95]{align-items:center;background:#fff;border:1px solid #afb7c5;border-radius:100px;display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;width:32px}.ff-form-section .header-content[data-v-cb6d2e95]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;padding-top:4px}.ff-form-section .header-title[data-v-cb6d2e95]{color:#000933;font-size:18px;font-weight:700;line-height:24px;margin:0}.ff-form-section .header-description[data-v-cb6d2e95]{color:#52596e;font-size:14px;line-height:20px;margin:0}.ff-form-section .header-extra[data-v-cb6d2e95]{align-items:center;display:flex;flex:0 0 auto;gap:8px;justify-content:flex-end}.ff-form-section .content[data-v-cb6d2e95]{background:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;display:flex;flex-direction:column;gap:20px;margin-left:16px;margin-top:20px;padding:20px 24px}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-645aae54]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-645aae54]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-645aae54]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-645aae54]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-645aae54]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-645aae54]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-645aae54]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-645aae54]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-645aae54]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-645aae54]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-645aae54] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-645aae54]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-645aae54]{width:640px}}.button-row[data-v-0ab33d23]{align-items:center;display:flex;gap:12px}.kong-ui-entities-gateway-services-list[data-v-0ab33d23]{width:100%}.kong-ui-entities-gateway-services-list .kong-ui-entity-filter-input[data-v-0ab33d23]{margin-right:12px}.kong-ui-entities-gateway-service-form[data-v-f4bc8c36]{width:100%}.kong-ui-entities-gateway-service-form[data-v-f4bc8c36] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form[data-v-f4bc8c36] .k-radio{align-items:normal}.kong-ui-entities-gateway-service-form[data-v-f4bc8c36] .form-section-wrapper{padding-bottom:48px}.kong-ui-entities-gateway-service-form .form-error-list[data-v-f4bc8c36]{list-style-type:disc;margin:0;padding-left:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-f4bc8c36]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-advanced-fields[data-v-f4bc8c36]{display:flex;flex-direction:column;gap:16px;margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-tags[data-v-f4bc8c36]{margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-f4bc8c36]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-f4bc8c36],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-f4bc8c36] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-general-info[data-v-f4bc8c36]{display:flex;flex-direction:column;gap:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-f4bc8c36]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-f4bc8c36] .radio-label-wrapper{height:auto}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-f4bc8c36]{margin:4px;padding-left:24px}.slide-fade-enter-active[data-v-f4bc8c36]{transition:all .5s ease}.slide-fade-enter-from[data-v-f4bc8c36]{opacity:0;transform:translateY(-5px)}.slide-fade-leave-to[data-v-f4bc8c36]{opacity:0;transform:translateY(5px)}
1
+ .config-card-fieldset[data-v-dc1e39a1]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-dc1e39a1]{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-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-66d61bea]{align-items:center;border-bottom:var(--v70f369b3);box-sizing:border-box;display:var(--v67c2fae6);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-66d61bea]{box-sizing:border-box;padding-right:16px;width:var(--v847b138c)}.config-card-details-row .config-card-details-label label[data-v-66d61bea]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-66d61bea]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-66d61bea]{min-width:0}.config-card-details-row .config-card-details-value[data-v-66d61bea]{box-sizing:border-box;width:var(--v847687d6)}.config-card-details-row .config-card-details-value .truncated[data-v-66d61bea]{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-66d61bea]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-66d61bea] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-66d61bea]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-66d61bea]{margin-right:4px}.config-card-details-row[data-v-66d61bea] .k-label{margin-bottom:0}.config-card-details-row[data-v-66d61bea] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-66d61bea] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--eca0976a);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-f11c7e34]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-8dc3c29c]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-8dc3c29c]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-8dc3c29c]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-8dc3c29c] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-8dc3c29c]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-520de902]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-520de902] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-520de902] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-520de902] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-520de902] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-520de902]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-520de902] .k-button:last-of-type,.form-actions[data-v-520de902] .k-button:nth-last-of-type(2){margin-inline-start:16px}.form-actions-reverted[data-v-520de902]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-44153100]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-44153100]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-44153100]{display:none}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-084f7978]{width:100%}.kong-ui-entity-filter-clear[data-v-084f7978]{cursor:pointer}.kong-ui-entity-filter[data-v-084f7978]{display:flex;position:relative}.kong-ui-entity-filter[data-v-084f7978] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-084f7978] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-084f7978]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-084f7978]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-084f7978]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-084f7978]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-084f7978]{color:#232633}.menu-item-expand-icon[data-v-084f7978]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-084f7978]{transform:rotate(180deg)}.menu-item-indicator[data-v-084f7978]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-084f7978]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-084f7978] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-084f7978] .k-input{width:100%}.menu-item-body[data-v-084f7978] .k-select-input .input{font-size:12px}.menu-item-body[data-v-084f7978] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-084f7978]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-084f7978]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-084f7978]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{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-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{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-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] 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-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.ff-form-section .header[data-v-cb6d2e95]{align-items:flex-start;display:flex;gap:8px}.ff-form-section .step[data-v-cb6d2e95]{align-items:center;background:#fff;border:1px solid #afb7c5;border-radius:100px;display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;width:32px}.ff-form-section .header-content[data-v-cb6d2e95]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;padding-top:4px}.ff-form-section .header-title[data-v-cb6d2e95]{color:#000933;font-size:18px;font-weight:700;line-height:24px;margin:0}.ff-form-section .header-description[data-v-cb6d2e95]{color:#52596e;font-size:14px;line-height:20px;margin:0}.ff-form-section .header-extra[data-v-cb6d2e95]{align-items:center;display:flex;flex:0 0 auto;gap:8px;justify-content:flex-end}.ff-form-section .content[data-v-cb6d2e95]{background:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;display:flex;flex-direction:column;gap:20px;margin-left:16px;margin-top:20px;padding:20px 24px}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-645aae54]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-645aae54]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-645aae54]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-645aae54]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-645aae54]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-645aae54]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-645aae54]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-645aae54]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-645aae54]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-645aae54]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-645aae54] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-645aae54]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-645aae54]{width:640px}}.button-row[data-v-0ab33d23]{align-items:center;display:flex;gap:12px}.kong-ui-entities-gateway-services-list[data-v-0ab33d23]{width:100%}.kong-ui-entities-gateway-services-list .kong-ui-entity-filter-input[data-v-0ab33d23]{margin-right:12px}.kong-ui-entities-gateway-service-form[data-v-f4bc8c36]{width:100%}.kong-ui-entities-gateway-service-form[data-v-f4bc8c36] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form[data-v-f4bc8c36] .k-radio{align-items:normal}.kong-ui-entities-gateway-service-form[data-v-f4bc8c36] .form-section-wrapper{padding-bottom:48px}.kong-ui-entities-gateway-service-form .form-error-list[data-v-f4bc8c36]{list-style-type:disc;margin:0;padding-left:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-f4bc8c36]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-advanced-fields[data-v-f4bc8c36]{display:flex;flex-direction:column;gap:16px;margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-tags[data-v-f4bc8c36]{margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-f4bc8c36]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-f4bc8c36],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-f4bc8c36] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-general-info[data-v-f4bc8c36]{display:flex;flex-direction:column;gap:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-f4bc8c36]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-f4bc8c36] .radio-label-wrapper{height:auto}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-f4bc8c36]{margin:4px;padding-left:24px}.slide-fade-enter-active[data-v-f4bc8c36]{transition:all .5s ease}.slide-fade-enter-from[data-v-f4bc8c36]{opacity:0;transform:translateY(-5px)}.slide-fade-leave-to[data-v-f4bc8c36]{opacity:0;transform:translateY(5px)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-gateway-services",
3
- "version": "3.13.13",
3
+ "version": "3.13.14-pr.2604.83e30815e.0",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-gateway-services.umd.js",
6
6
  "module": "./dist/entities-gateway-services.es.js",
@@ -26,17 +26,17 @@
26
26
  "axios": "^1.12.0",
27
27
  "vue": ">= 3.3.13 < 4",
28
28
  "vue-router": "^4.4.5",
29
- "@kong-ui-public/i18n": "^2.4.4",
30
- "@kong-ui-public/entities-shared": "^3.32.3"
29
+ "@kong-ui-public/entities-shared": "^3.32.4-pr.2604.83e30815e.0",
30
+ "@kong-ui-public/i18n": "^2.4.4"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@kong/design-tokens": "1.18.0",
34
34
  "@kong/icons": "^1.39.0",
35
35
  "@kong/kongponents": "9.43.2",
36
36
  "axios": "^1.7.7",
37
- "vue": "^3.5.13",
37
+ "vue": "^3.5.22",
38
38
  "vue-router": "^4.4.5",
39
- "@kong-ui-public/entities-shared": "^3.32.3",
39
+ "@kong-ui-public/entities-shared": "^3.32.4-pr.2604.83e30815e.0",
40
40
  "@kong-ui-public/i18n": "^2.4.4"
41
41
  },
42
42
  "repository": {