@kong-ui-public/entities-gateway-services 3.11.25-pr.2114.f471b8dbc.0 → 3.11.25-pr.2145.96ea30cf8.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(R,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):(R=typeof globalThis<"u"?globalThis:R||self,e(R["kong-ui-public-entities-gateway-services"]={},R.Vue,R.VueRouter,R.KongIcons,R["kong-ui-public-i18n"],R["kong-ui-public-entities-shared"]))})(this,function(R,e,Ve,ke,xe,y){"use strict";const Se={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."},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 Ie(){const n=xe.createI18n("en-us",Se);return{i18n:n,i18nT:xe.i18nTComponent(n)}}function Pe(){return{getPortFromProtocol:(P,u)=>{const p=[80,443],a=Number(u);if((a||a===0)&&!p.includes(a))return a;switch(P){case"grpcs":case"tls":case"https":case"wss":return 443;case"grpc":case"tcp":case"http":case"ws":default:return 80}}}}function Te(){const{i18n:{t:n}}=X.useI18n();return{validateHost:_=>{if(!_||_.trim()==="")return n("gateway_services.form.errors.host.empty");const S=/^(?!:\/\/)([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(_)||S.test(_)?"":n("gateway_services.form.errors.host.invalid")},validateProtocol:(_,S)=>!_||_.trim()===""?n("gateway_services.form.errors.protocol.empty"):(_=_.slice(0,-1),S.find(i=>{if(i.value===_)return i})===void 0?n("gateway_services.form.errors.protocol.invalid"):""),validatePath:_=>!_||_===""?"":_.startsWith("/")?/[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(_)?n("gateway_services.form.errors.path.invalid"):"":n("gateway_services.form.errors.path.prefix"),validatePort:_=>{if(_==null||_==="")return"";const S=typeof _=="string"?parseInt(_,10):_;return isNaN(S)?n("gateway_services.form.errors.port.type"):S<0||S>65535?n("gateway_services.form.errors.port.invalid"):""}}}const X={useI18n:Ie,usePortFromProtocol:Pe,useUrlValidators:Te},he="/v2/control-planes/{controlPlaneId}/core-entities",ve="/{workspace}",le={list:{konnect:{all:`${he}/services`},kongManager:{all:`${ve}/services`}},form:{konnect:{create:`${he}/services`,validate:`${he}/v1/schemas/json/service/validate`,edit:`${he}/services/{id}`},kongManager:{create:`${ve}/services`,validate:`${ve}/schemas/services/validate`,edit:`${ve}/services/{id}`}}},Be="#00abd2",Fe="24px",Ue={class:"kong-ui-entities-gateway-services-list"},$e={class:"button-row"},Ae={class:"empty-state-icon-gateway"},Re={key:1},Me=e.defineComponent({__name:"GatewayServiceList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.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(n,{emit:P}){var I;const u=P,p=n,{i18n:{t:a,formatUnixTimeStamp:_}}=X.useI18n(),S=Ve.useRouter(),{axiosInstance:K}=y.useAxios((I=p.config)==null?void 0:I.axiosRequestConfig),{hasRecords:i,handleStateChange:B}=y.useTableState(()=>q.value),V=e.computed(()=>i.value&&p.config.app==="konnect"),Y=e.computed(()=>p.config.app!=="kongManager"||!!p.config.disableSorting),ee={name:{label:a("gateway_services.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},...p.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}},H={columnVisibility:{created_at:!1}},me=ee,O=e.computed(()=>{var h,m;let s=`${p.config.apiBaseUrl}${le.list[p.config.app].all}`;return p.config.app==="konnect"?s=s.replace(/{controlPlaneId}/gi,((h=p.config)==null?void 0:h.controlPlaneId)||""):p.config.app==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(m=p.config)!=null&&m.workspace?`/${p.config.workspace}`:"")),s}),T=e.computed(()=>p.config.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${O.value}`):new URL(O.value)),q=e.ref(""),j=e.computed(()=>{const s=p.config.app==="konnect"||p.config.isExactMatch;if(s)return{isExactMatch:s,placeholder:a(`search.placeholder.${p.config.app}`)};const{name:h,enabled:m,protocol:U,host:J,port:L,path:Q}=ee;return{isExactMatch:s,fields:{name:h,enabled:m,protocol:U,host:J,port:L,path:Q},schema:p.config.filterSchema}}),{fetcher:be,fetcherState:r,fetcherCacheKey:w}=y.useFetcher(e.computed(()=>({...p.config,cacheIdentifier:p.cacheIdentifier})),O),se=()=>{q.value=""},ae=()=>{w.value++},te=e.ref(null),t=e.computed(()=>({ctaPath:p.config.createRoute,ctaText:x.value?p.isServerless?a("actions.serverless_create"):a("actions.create"):void 0,message:`${a("gateway_services.list.empty_state.description")}${p.config.additionMessageForEmptyState?` ${p.config.additionMessageForEmptyState}`:""}`,title:x.value?p.isServerless?a("gateway_services.list.empty_state.serverless_title"):a("gateway_services.list.empty_state.title"):a("gateway_services.title")})),k=e.ref(!1),A=e.ref(null),oe=e.computed(()=>{const s={action:"disable",id:"",name:""};if(A.value){const{enabled:h,id:m,name:U}=A.value;s.action=h?"disable":"enable",s.id=m,s.name=U||m}return s}),ne=s=>{k.value=!0,A.value=s},ue=()=>{k.value=!1,A.value=null},re=async()=>{var U,J;if(!await((U=p.canEdit)==null?void 0:U.call(p,A.value))||!A.value)return;const h=`${T.value.href}/${A.value.id}`,m=!A.value.enabled;try{const{data:L}=((J=p.config)==null?void 0:J.app)==="konnect"?await K.put(h,{...A.value,enabled:m}):await K.patch(h,{...A.value,enabled:m});u("toggle:success",L),A.value.enabled=m}catch(L){u("error",L)}},ge=s=>{p.config.getControlPlaneRoute&&S.push(p.config.getControlPlaneRoute(s))},ye=async(s,h)=>{const m=s.id;if(!await h(m)){u("copy:error",{entity:s,field:"id",message:a("errors.copy")});return}u("copy:success",{entity:s,field:"id",message:a("copy.success",{val:m})})},ie=async(s,h)=>{const m=JSON.stringify(s);if(!await h(m)){u("copy:error",{entity:s,message:a("errors.copy")});return}u("copy:success",{entity:s,message:a("copy.success_brief")})},ce=async s=>{var m;await((m=p.canRetrieve)==null?void 0:m.call(p,s))&&S.push(p.config.getViewRoute(s.id))},de=s=>({label:a("actions.view"),to:p.config.getViewRoute(s)}),we=s=>({label:a("actions.edit"),to:p.config.getEditRoute(s)}),F=e.ref(void 0),Z=e.ref(!1),M=e.ref(!1),z=e.ref(""),fe=y.useDeleteUrlBuilder(p.config,O.value),l=s=>{F.value=s,Z.value=!0,z.value=""},d=()=>{Z.value=!1,F.value=void 0},v=async()=>{var s,h,m;if((s=F.value)!=null&&s.id){M.value=!0;try{await K.delete(fe(F.value.id)),u("delete:success",F.value),d(),w.value++}catch(U){z.value=((m=(h=U.response)==null?void 0:h.data)==null?void 0:m.message)||U.message||a("errors.delete"),u("error",U)}finally{M.value=!1}}},W=()=>{S.push(p.config.createRoute)};e.watch(r,s=>{var h,m,U;if(s.status===y.FetcherStatus.Error){te.value={title:a("errors.general")},(U=(m=(h=s.error)==null?void 0:h.response)==null?void 0:m.data)!=null&&U.message&&(te.value.message=s.error.response.data.message),u("error",s.error);return}te.value=null});const x=e.ref(!1);return e.onBeforeMount(async()=>{x.value=await p.canCreate()}),(s,h)=>{const m=e.resolveComponent("KButton"),U=e.resolveComponent("KBadge"),J=e.resolveComponent("KInputSwitch"),L=e.resolveComponent("KDropdownItem"),Q=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Ue,[e.createVNode(e.unref(y.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"default-table-preferences":H,"disable-sorting":Y.value,"empty-state-options":t.value,"enable-entity-actions":"","error-message":te.value,fetcher:e.unref(be),"fetcher-cache-key":e.unref(w),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-gateway-services-list",query:q.value,"table-headers":e.unref(me),onClearSearchInput:se,"onClick:row":h[4]||(h[4]=b=>ce(b)),onSort:ae,onState:e.unref(B)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(y.EntityFilter),{modelValue:q.value,"onUpdate:modelValue":h[0]||(h[0]=b=>q.value=b),config:j.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",$e,[V.value?(e.openBlock(),e.createBlock(m,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-learn-more-button",icon:"",onClick:h[1]||(h[1]=b=>s.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ke.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(y.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.createVNode(m,{appearance:"primary","data-testid":"toolbar-add-gateway-service",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(ke.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:b})=>[e.createElementVNode("b",null,e.toDisplayString(b??"-"),1)]),control_plane:e.withCtx(({row:b})=>{var D;return[(D=b.x_meta)!=null&&D.cluster_id?(e.openBlock(),e.createBlock(U,{key:0,tooltip:b.x_meta.cluster_id,"truncation-tooltip":"",onClick:e.withModifiers(o=>ge(b.x_meta.cluster_id),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.x_meta.cluster_id),1)]),_:2},1032,["tooltip","onClick"])):(e.openBlock(),e.createElementBlock("b",Re,"-"))]}),enabled:e.withCtx(({row:b})=>[e.createVNode(e.unref(y.PermissionsWrapper),{"auth-function":()=>n.canEdit(b),"force-show":""},{default:e.withCtx(({isAllowed:D})=>[e.createElementVNode("div",{onClick:h[3]||(h[3]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(J,{modelValue:b.enabled,"onUpdate:modelValue":o=>b.enabled=o,"data-testid":`row-${b.id}-toggle-input`,disabled:!D,onClick:e.withModifiers(o=>ne(b),["prevent"])},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","onClick"])])]),_:2},1032,["auth-function"])]),tags:e.withCtx(({rowValue:b})=>[e.createVNode(e.unref(y.TableTags),{tags:b},null,8,["tags"])]),created_at:e.withCtx(({rowValue:b})=>[e.createTextVNode(e.toDisplayString(e.unref(_)(b)),1)]),updated_at:e.withCtx(({row:b,rowValue:D})=>[e.createTextVNode(e.toDisplayString(e.unref(_)(D??b.created_at)),1)]),actions:e.withCtx(({row:b})=>[e.createVNode(Q,null,{default:e.withCtx(({copyToClipboard:D})=>[e.createVNode(L,{"data-testid":"action-entity-copy-id",onClick:o=>ye(b,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(Q,null,{default:e.withCtx(({copyToClipboard:D})=>[e.createVNode(L,{"data-testid":"action-entity-copy-json",onClick:o=>ie(b,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(y.PermissionsWrapper),{"auth-function":()=>n.canRetrieve(b)},{default:e.withCtx(()=>[e.createVNode(L,{"data-testid":"action-entity-view","has-divider":"",item:de(b.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(y.PermissionsWrapper),{"auth-function":()=>n.canEdit(b)},{default:e.withCtx(()=>[e.createVNode(L,{"data-testid":"action-entity-edit",item:we(b.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(y.PermissionsWrapper),{"auth-function":()=>n.canDelete(b)},{default:e.withCtx(()=>[e.createVNode(L,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:D=>l(b)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.delete.menu_label")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!q.value&&n.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var b;return[e.createVNode(e.unref(y.EntityEmptyState),{"action-button-text":e.unref(a)("gateway_services.empty_state_v2.create"),appearance:"secondary","can-create":()=>n.canCreate(),"data-testid":"gateway-services-entity-empty-state",description:e.unref(a)("gateway_services.empty_state_v2.description"),"learn-more":n.config.app==="konnect",title:e.unref(a)("gateway_services.empty_state_v2.title"),"onClick:create":W,"onClick:learnMore":h[2]||(h[2]=D=>s.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",Ae,[e.createVNode(e.unref(ke.ServicesIcon),{color:e.unref(Be),size:e.unref(Fe)},null,8,["color","size"])])]),_:2},[(b=n.config)!=null&&b.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","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(y.EntityToggleModal),{action:oe.value.action,"entity-id":oe.value.id,"entity-name":oe.value.name,"entity-type":e.unref(a)("glossary.gateway_services"),"on-confirm":re,visible:k.value,onCancel:ue,onProceed:ue},null,8,["action","entity-id","entity-name","entity-type","visible"]),e.createVNode(e.unref(y.EntityDeleteModal),{"action-pending":M.value,description:e.unref(a)("actions.delete.description"),"entity-name":F.value&&(F.value.name||F.value.id),"entity-type":e.unref(y.EntityTypes).GatewayService,error:z.value,title:e.unref(a)("actions.delete.title"),visible:Z.value,onCancel:d,onProceed:v},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Ce=(n,P)=>{const u=n.__vccOpts||n;for(const[p,a]of P)u[p]=a;return u},De=Ce(Me,[["__scopeId","data-v-46700fcd"]]),Ke={class:"kong-ui-entities-gateway-service-form"},We={key:0},Le={class:"gateway-service-form-traffic-label"},qe={class:"gateway-service-form-margin-bottom"},Ge={key:0,class:"gateway-service-form-group-fields"},Oe={key:1,class:"gateway-service-form-group-fields"},je={key:0},ze={class:"gateway-service-form-margin-top"},He={class:"gateway-service-form-margin-bottom"},Ze={class:"gateway-service-form-margin-bottom"},Je={class:"gateway-service-form-margin-bottom"},Qe={class:"gateway-service-form-margin-bottom"},Xe={key:0,class:"gateway-service-form-margin-bottom"},Ye={key:1,class:"gateway-service-form-margin-bottom"},et={key:2,class:"gateway-service-form-margin-bottom"},tt={key:0,class:"checkbox-aligned-radio"},ot={key:1,class:"checkbox-aligned-radio"},rt=Ce(e.defineComponent({__name:"LegacyGatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated"],setup(n,{expose:P,emit:u}){var fe;const p=u,a=n,_=e.ref(!0),S=Ve.useRouter(),{i18nT:K,i18n:{t:i}}=X.useI18n(),{getMessageFromError:B}=y.useErrors(),{axiosInstance:V}=y.useAxios((fe=a.config)==null?void 0:fe.axiosRequestConfig),Y=y.useValidators(),ee=e.computed(()=>le.form[a.config.app].edit),H=e.computed(()=>a.gatewayServiceId?y.EntityBaseFormType.Edit:y.EntityBaseFormType.Create),me=e.ref(!1),O=e.computed(()=>!!a.gatewayServiceId),T=e.ref(O.value?"protocol":"url"),q=X.usePortFromProtocol(),j=e.ref(""),be=e.computed(()=>!!j.value),r=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:""},isReadonly:!1,errorMessage:""}),w=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:""}),se=a.config.app==="konnect"||y.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),ae=[{label:i("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:i("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:i("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:i("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...se?[{label:i("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:i("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:i("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],te={url:"url",protocol:"protocol"},t=(l,d)=>{d.value},k=l=>l?parseFloat(l):0,A=()=>{_.value=!0,r.errorMessage="",r.fields.host=w.host,r.fields.path=w.path,r.fields.port=w.port,r.fields.protocol=w.protocol,r.fields.url=w.url,r.fields.retries=w.retries,r.fields.connect_timeout=w.connect_timeout,r.fields.write_timeout=w.write_timeout,r.fields.read_timeout=w.read_timeout,r.fields.client_certificate=w.client_certificate,r.fields.ca_certificates=w.ca_certificates,r.fields.tls_verify_enabled=w.tls_verify_enabled,r.fields.tls_verify_value=w.tls_verify_value},oe=()=>{if(r.fields.url&&T.value==="url")try{const l=new URL(r.fields.url);r.errorMessage="",r.fields.protocol=l.protocol.slice(0,-1),r.fields.host=l.hostname,r.fields.path=l.pathname;const d=Number(l.port);me.value=!!d,r.fields.port=d||q.getPortFromProtocol(r.fields.protocol),r.errorMessage="",p("url-valid:success")}catch(l){r.errorMessage=i("errors.urlErrorMessage"),p("url-valid:error",B(l))}else p("url-valid:success"),r.errorMessage=""},ne=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(r.fields.protocol)),ue=e.computed(()=>{if(T.value==="url")return!0;const l=["https","wss","tls"].includes(r.fields.protocol);return T.value==="protocol"&&l}),re=e.computed(()=>{if(T.value==="url")return!0;const l=["https","tls"].includes(r.fields.protocol);return T.value==="protocol"&&l}),ge=e.computed(()=>{if(T.value==="url")return!0;const l=["https","wss","tls"].includes(r.fields.protocol);return T.value==="protocol"&&l}),ye=l=>{j.value=Y.utf8Name(l)},ie=e.computed(()=>O.value&&JSON.stringify(r.fields)!==JSON.stringify(w)||T.value==="url"&&!!r.fields.url||T.value==="protocol"&&!!r.fields.host),ce=l=>{var d,v,W;r.fields.name=(l==null?void 0:l.name)||"",r.fields.tags=((d=l==null?void 0:l.tags)==null?void 0:d.join(", "))||"",r.fields.protocol=(l==null?void 0:l.protocol)||"http",r.fields.path=(l==null?void 0:l.path)||"",r.fields.read_timeout=l!=null&&l.read_timeout||(l==null?void 0:l.read_timeout)===0?l==null?void 0:l.read_timeout:6e4,r.fields.retries=l!=null&&l.retries||(l==null?void 0:l.retries)===0?l==null?void 0:l.retries:5,r.fields.host=(l==null?void 0:l.host)||"",r.fields.connect_timeout=l!=null&&l.connect_timeout||(l==null?void 0:l.connect_timeout)===0?l==null?void 0:l.connect_timeout:6e4,r.fields.tls_verify_enabled=(l==null?void 0:l.tls_verify)!==""&&(l==null?void 0:l.tls_verify)!==null&&(l==null?void 0:l.tls_verify)!==void 0,r.fields.tls_verify_value=l!=null&&l.tls_verify?l==null?void 0:l.tls_verify:!1,r.fields.ca_certificates=((v=l==null?void 0:l.ca_certificates)==null?void 0:v.join(","))||"",r.fields.client_certificate=((W=l==null?void 0:l.client_certificate)==null?void 0:W.id)||"",r.fields.write_timeout=l!=null&&l.write_timeout||(l==null?void 0:l.write_timeout)===0?l==null?void 0:l.write_timeout:6e4,r.fields.port=l!=null&&l.port||(l==null?void 0:l.port)===0?l==null?void 0:l.port:80,Object.assign(w,r.fields)},de=()=>{S.push(a.config.cancelRoute)},we=e.computed(()=>{var d,v;let l=`${a.config.apiBaseUrl}${le.form[a.config.app].validate}`;return a.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((d=a.config)==null?void 0:d.controlPlaneId)||""):a.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(v=a.config)!=null&&v.workspace?`/${a.config.workspace}`:"")),l=l.replace(/{id}/gi,a.gatewayServiceId),l}),F=e.computed(()=>{var d,v;let l=`${a.config.apiBaseUrl}${le.form[a.config.app][H.value]}`;return a.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((d=a.config)==null?void 0:d.controlPlaneId)||""):a.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(v=a.config)!=null&&v.workspace?`/${a.config.workspace}`:"")),l=l.replace(/{id}/gi,a.gatewayServiceId),l}),Z=l=>{let d="";l.url&&(d=new URL(l.url).protocol),(["https","wss","tls"].includes(l.protocol)||["https","wss","tls"].includes(d))&&(l.tls_verify=l.tls_verify_enabled?l.tls_verify_value:null),delete l.tls_verify_enabled,delete l.tls_verify_value},M=e.computed(()=>{var d,v,W,x;const l={name:r.fields.name||null,tags:r.fields.tags?(W=(v=(d=r.fields.tags)==null?void 0:d.split(","))==null?void 0:v.map(I=>String(I||"").trim()))==null?void 0:W.filter(I=>I!==""):null,protocol:r.fields.protocol,path:r.fields.path||null,read_timeout:r.fields.read_timeout,retries:r.fields.retries,host:r.fields.host,connect_timeout:r.fields.connect_timeout,tls_verify_value:r.fields.tls_verify_value,tls_verify_enabled:r.fields.tls_verify_enabled,ca_certificates:r.fields.ca_certificates?(x=r.fields.ca_certificates)==null?void 0:x.split(",").filter(I=>I!==""):null,client_certificate:r.fields.client_certificate?{id:r.fields.client_certificate}:null,write_timeout:r.fields.write_timeout,port:r.fields.port,url:r.fields.url};return r.fields.client_certificate&&["https","wss","tls"].includes(r.fields.protocol)&&(l.client_certificate={id:r.fields.client_certificate}),r.fields.tls_verify_enabled&&["https","wss","tls"].includes(r.fields.protocol)&&(l.tls_verify=r.fields.tls_verify_value),ne.value||(l.path=null),H.value==="create"?T.value==="url"?(delete l.protocol,delete l.host,delete l.path,a.config.app==="konnect"&&delete l.port):delete l.url:H.value==="edit"&&delete l.url,l}),z=async()=>{var l,d,v,W;try{r.isReadonly=!0,oe();const x=M.value;Z(x);let I;if(await V.post(we.value,x),H.value==="create"?I=await V.post(F.value,x):H.value==="edit"&&(I=((l=a.config)==null?void 0:l.app)==="konnect"?await V.put(F.value,x):await V.patch(F.value,x)),I){const{data:s}=I;r.fields.name=(s==null?void 0:s.name)||"",r.fields.port=s.port||q.getPortFromProtocol(s.protocol),r.fields.protocol=(s==null?void 0:s.protocol)||"http",r.fields.host=(s==null?void 0:s.host)||"",r.fields.path=(s==null?void 0:s.path)||"",r.fields.url=(s==null?void 0:s.url)||"",r.fields.retries=s!=null&&s.retries||(s==null?void 0:s.retries)===0?s==null?void 0:s.retries:5,r.fields.connect_timeout=s!=null&&s.connect_timeout||(s==null?void 0:s.connect_timeout)===0?s==null?void 0:s.connect_timeout:6e4,r.fields.write_timeout=s!=null&&s.write_timeout||(s==null?void 0:s.write_timeout)===0?s==null?void 0:s.write_timeout:6e4,r.fields.read_timeout=s!=null&&s.read_timeout||(s==null?void 0:s.read_timeout)===0?s==null?void 0:s.read_timeout:6e4,r.fields.client_certificate=((d=s==null?void 0:s.client_certificate)==null?void 0:d.id)||"",r.fields.ca_certificates=(v=s==null?void 0:s.ca_certificates)!=null&&v.length?s==null?void 0:s.ca_certificates.join(","):"",r.fields.tls_verify_enabled=(s==null?void 0:s.tls_verify)!==""&&(s==null?void 0:s.tls_verify)!==null&&(s==null?void 0:s.tls_verify)!==void 0,r.fields.tls_verify_value=r.fields.tls_verify_enabled&&(s==null?void 0:s.tls_verify),r.fields.tags=(W=s==null?void 0:s.tags)!=null&&W.length?s.tags.join(", "):"",Object.assign(w,r.fields),p("update",I==null?void 0:I.data)}return I}catch(x){r.errorMessage=B(x),p("error",x)}finally{r.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(r.fields,w)}),e.watch(r.fields,l=>{r.fields.port=q.getPortFromProtocol(l.protocol,String(l.port)),p("model-updated",M.value)}),e.onMounted(()=>{p("model-updated",M.value)}),P({validateUrl:oe,getPayload:M,saveFormData:z,canSubmit:ie,initForm:ce}),(l,d)=>{const v=e.resolveComponent("KInput"),W=e.resolveComponent("KLabel"),x=e.resolveComponent("KRadio"),I=e.resolveComponent("KSelect"),s=e.resolveComponent("KCheckbox"),h=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(e.unref(y.EntityBaseForm),{"can-submit":ie.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(y.SupportedEntityType).GatewayService,"error-message":r.errorMessage,"fetch-url":ee.value,"form-fields":M.value,"is-readonly":r.isReadonly,onCancel:de,"onFetch:error":d[25]||(d[25]=m=>l.$emit("error",m)),"onFetch:success":ce,onLoading:d[26]||(d[26]=m=>l.$emit("loading",m)),onSubmit:z},{"form-actions":e.withCtx(()=>[e.renderSlot(l.$slots,"form-actions",{canSubmit:ie.value,cancel:de,submit:z},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(y.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(v,{modelValue:r.fields.name,"onUpdate:modelValue":d[0]||(d[0]=m=>r.fields.name=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:be.value,"error-message":j.value,label:e.unref(i)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(i)("gateway_services.form.fields.name.placeholder"),readonly:r.isReadonly,type:"text",onInput:ye},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(v,{modelValue:r.fields.tags,"onUpdate:modelValue":d[1]||(d[1]=m=>r.fields.tags=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(i)("gateway_services.form.fields.tags.help"),label:e.unref(i)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(i)("gateway_services.form.fields.tags.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(y.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[O.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("div",Le,[e.createVNode(W,{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.checkedGroupLabel")),1)]),_:1})]),e.createElementVNode("div",qe,[e.createVNode(x,{modelValue:T.value,"onUpdate:modelValue":d[2]||(d[2]=m=>T.value=m),"data-testid":"gateway-service-url-radio","selected-value":te.url,onChange:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.urlLabel")),1)]),_:1},8,["modelValue","selected-value"])]),T.value==="url"?(e.openBlock(),e.createElementBlock("div",Ge,[e.createVNode(v,{modelValue:r.fields.url,"onUpdate:modelValue":d[3]||(d[3]=m=>r.fields.url=m),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",label:e.unref(i)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(i)("gateway_services.form.fields.upstream_url.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(x,{modelValue:T.value,"onUpdate:modelValue":d[4]||(d[4]=m=>T.value=m),"checked-group":"protocol","data-testid":"gateway-service-protocol-radio","selected-value":te.protocol,onChange:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.checkedGroupAltLabel")),1)]),_:1},8,["modelValue","selected-value"])])),T.value==="protocol"||O.value?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(I,{modelValue:r.fields.protocol,"onUpdate:modelValue":d[5]||(d[5]=m=>r.fields.protocol=m),"data-testid":"gateway-service-protocol-select",items:ae,label:e.unref(i)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:r.isReadonly,required:"",width:"100%",onSelected:d[6]||(d[6]=m=>t(r.fields.protocol,m))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(v,{modelValue:r.fields.host,"onUpdate:modelValue":d[7]||(d[7]=m=>r.fields.host=m),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",label:e.unref(i)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(i)("gateway_services.form.fields.host.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"]),ne.value?(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(v,{modelValue:r.fields.path,"onUpdate:modelValue":d[8]||(d[8]=m=>r.fields.path=m),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",label:e.unref(i)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(i)("gateway_services.form.fields.path.placeholder")},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(v,{modelValue:r.fields.port,"onUpdate:modelValue":[d[9]||(d[9]=m=>r.fields.port=m),d[10]||(d[10]=()=>{r.fields.port=k(r.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",label:e.unref(i)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number"},null,8,["modelValue","label","label-attributes"])])):e.createCommentVNode("",!0),e.createVNode(h,{modelValue:_.value,"onUpdate:modelValue":d[24]||(d[24]=m=>_.value=m),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createElementVNode("div",ze,[e.createElementVNode("div",He,[e.createVNode(v,{modelValue:r.fields.retries,"onUpdate:modelValue":[d[11]||(d[11]=m=>r.fields.retries=m),d[12]||(d[12]=()=>{r.fields.retries=k(r.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(i)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Ze,[e.createVNode(v,{modelValue:r.fields.connect_timeout,"onUpdate:modelValue":[d[13]||(d[13]=m=>r.fields.connect_timeout=m),d[14]||(d[14]=()=>{r.fields.connect_timeout=k(r.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(i)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Je,[e.createVNode(v,{modelValue:r.fields.write_timeout,"onUpdate:modelValue":[d[15]||(d[15]=m=>r.fields.write_timeout=m),d[16]||(d[16]=()=>{r.fields.write_timeout=k(r.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(i)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Qe,[e.createVNode(v,{modelValue:r.fields.read_timeout,"onUpdate:modelValue":[d[17]||(d[17]=m=>r.fields.read_timeout=m),d[18]||(d[18]=()=>{r.fields.read_timeout=k(r.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(i)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),ue.value?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(v,{modelValue:r.fields.client_certificate,"onUpdate:modelValue":d[19]||(d[19]=m=>r.fields.client_certificate=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",label:e.unref(i)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(i)("gateway_services.form.fields.client_certificate.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(v,{modelValue:r.fields.ca_certificates,"onUpdate:modelValue":d[20]||(d[20]=m=>r.fields.ca_certificates=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",label:e.unref(i)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:r.isReadonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(K),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(s,{modelValue:r.fields.tls_verify_enabled,"onUpdate:modelValue":d[21]||(d[21]=m=>r.fields.tls_verify_enabled=m),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(K),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),r.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(x,{modelValue:r.fields.tls_verify_value,"onUpdate:modelValue":d[22]||(d[22]=m=>r.fields.tls_verify_value=m),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),r.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(x,{modelValue:r.fields.tls_verify_value,"onUpdate:modelValue":d[23]||(d[23]=m=>r.fields.tls_verify_value=m),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"])]),_:3},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-59d8e66b"]]),lt={class:"kong-ui-gateway-service-entity-config-card"},it=e.defineComponent({__name:"GatewayServiceConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(n){const P=n,{i18n:{t:u},i18nT:p}=X.useI18n(),a=e.computed(()=>le.form[P.config.app].edit),{getPropValue:_}=y.useHelpers(),S=(i,B)=>_(i,B)===!0?u("gateway_services.form.fields.tls_verify_option.true.display"):u("gateway_services.form.fields.tls_verify_option.false.display"),K=e.ref({id:{},name:{tooltip:u("gateway_services.form.fields.name.tooltip")},enabled:{},updated_at:{},created_at:{},protocol:{section:y.ConfigurationSchemaSection.Basic,tooltip:u("gateway_services.form.fields.protocol.tooltip")},host:{section:y.ConfigurationSchemaSection.Basic,tooltip:u("gateway_services.form.fields.host.tooltip")},path:{section:y.ConfigurationSchemaSection.Basic,tooltip:u("gateway_services.form.fields.path.tooltip")},port:{section:y.ConfigurationSchemaSection.Basic,tooltip:u("gateway_services.form.fields.port.tooltip")},tags:{tooltip:u("gateway_services.form.fields.tags.tooltip")},retries:{order:1,tooltip:u("gateway_services.form.fields.retries.tooltip")},connect_timeout:{order:2,tooltip:u("gateway_services.form.fields.connect_timeout.tooltip")},write_timeout:{order:3,tooltip:u("gateway_services.form.fields.write_timeout.tooltip")},read_timeout:{order:4,tooltip:u("gateway_services.form.fields.read_timeout.tooltip")},client_certificate:{order:5,tooltip:u("gateway_services.form.fields.client_certificate.tooltip")},ca_certificates:{type:y.ConfigurationSchemaType.BadgeTag,label:u("gateway_services.form.fields.ca_certificates.label"),order:6},tls_verify:{label:u("gateway_services.form.fields.tls_verify_enabled.label")},tls_verify_depth:{hidden:!0}});return(i,B)=>(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(e.unref(y.EntityBaseConfigCard),{config:n.config,"config-card-doc":n.configCardDoc,"config-schema":K.value,"entity-type":e.unref(y.SupportedEntityType).GatewayService,"fetch-url":a.value,"hide-title":n.hideTitle,"onFetch:error":B[0]||(B[0]=V=>i.$emit("fetch:error",V)),"onFetch:success":B[1]||(B[1]=V=>i.$emit("fetch:success",V)),onLoading:B[2]||(B[2]=V=>i.$emit("loading",V))},{"enabled-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.enabled.tooltip",scope:"global"},{false:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(u)("gateway_services.form.fields.enabled.false")),1)]),true:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(u)("gateway_services.form.fields.enabled.true")),1)]),_:1})]),"ca_certificates-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(u)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(u)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),"tls_verify-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(u)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),tls_verify:e.withCtx(V=>[e.createTextVNode(e.toDisplayString(typeof e.unref(_)("rowValue",V)=="boolean"?S("rowValue",V):e.unref(u)("gateway_services.form.fields.tls_verify_option.unset.display")),1)]),client_certificate:e.withCtx(V=>[e.createTextVNode(e.toDisplayString(e.unref(_)("rowValue",V)?e.unref(_)("rowValue",V).id:"–"),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ee=()=>{};function st(n,P){function u(...p){return new Promise((a,_)=>{Promise.resolve(n(()=>P.apply(this,p),{fn:P,thisArg:this,args:p})).then(a).catch(_)})}return u}function at(n,P={}){let u,p,a=Ee;const _=i=>{clearTimeout(i),a(),a=Ee};let S;return i=>{const B=e.toValue(n),V=e.toValue(P.maxWait);return u&&_(u),B<=0||V!==void 0&&V<=0?(p&&(_(p),p=null),Promise.resolve(i())):new Promise((Y,ee)=>{a=P.rejectOnCancel?ee:Y,S=i,V&&!p&&(p=setTimeout(()=>{u&&_(u),p=null,Y(S())},V)),u=setTimeout(()=>{p&&_(p),p=null,Y(i())},B)})}}function Ne(n,P=200,u={}){return st(at(P,u),n)}const G={name:"Kong-Air-Flights-API",tags:[],protocol:"https",path:"/flights",read_timeout:6e4,retries:5,host:"api.kong-air.com",connect_timeout:6e4,ca_certificates:null,client_certificate:null,write_timeout:6e4,port:443},nt={class:"kong-ui-entities-gateway-service-form"},ct={key:0,class:"gateway-service-form-general-info"},dt={class:"gateway-service-form-group-selection-wrapper"},ft={key:0,class:"gateway-service-form-group-fields"},pt={key:0,class:"gateway-service-form-group-fields"},mt={key:0},ut={key:0,class:"gateway-service-form-advanced-fields"},gt={class:"gateway-service-form-margin-bottom"},yt={class:"gateway-service-form-margin-bottom"},_t={class:"gateway-service-form-margin-bottom"},bt={class:"gateway-service-form-margin-bottom"},wt={key:0,class:"gateway-service-form-margin-bottom"},ht={key:1,class:"gateway-service-form-margin-bottom"},vt={key:2,class:"gateway-service-form-margin-bottom"},Vt={key:0,class:"checkbox-aligned-radio"},kt={key:1,class:"checkbox-aligned-radio"},Ct={class:"gateway-service-form-tags"},Nt={class:"form-error-list"},xt=Ce(e.defineComponent({__name:"GatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.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(n,{expose:P,emit:u}){var D;const p=u,a=n,_=e.ref(!0),S=Ve.useRouter(),{i18nT:K,i18n:{t:i}}=X.useI18n(),{getErrorFieldsFromError:B}=y.useErrors(),{axiosInstance:V}=y.useAxios((D=a.config)==null?void 0:D.axiosRequestConfig),Y=y.useValidators(),{validateHost:ee,validatePath:H,validatePort:me,validateProtocol:O}=X.useUrlValidators(),{objectsAreEqual:T}=y.useHelpers(),q=e.computed(()=>le.form[a.config.app].edit),j=e.computed(()=>a.gatewayServiceId?y.EntityBaseFormType.Edit:y.EntityBaseFormType.Create),be=e.ref(!1),r=e.computed(()=>!!a.gatewayServiceId),w=e.ref(r.value?"protocol":"url"),se=X.usePortFromProtocol(),ae=e.ref(""),te=e.computed(()=>!!ae.value||!!F("name")),t=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:""},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:""}}),k=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:""}),A=a.config.app==="konnect"||y.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),oe=[{label:i("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:i("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:i("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:i("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...A?[{label:i("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:i("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:i("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],ne={url:"url",protocol:"protocol"},ue=(o,c)=>{c.value},re=o=>o?parseFloat(o):0,ge=()=>{t.fields.host=k.host,t.fields.path=k.path,t.fields.port=k.port,t.fields.protocol=k.protocol,t.fields.url=k.url,t.fields.retries=k.retries,t.fields.connect_timeout=k.connect_timeout,t.fields.write_timeout=k.write_timeout,t.fields.read_timeout=k.read_timeout,t.fields.client_certificate=k.client_certificate,t.fields.ca_certificates=k.ca_certificates,t.fields.tls_verify_enabled=k.tls_verify_enabled,t.fields.tls_verify_value=k.tls_verify_value},ye=()=>{_.value=!0,M(),t.errorMessages=[],ge()},ie=()=>{switch(ge(),t.fields.name=`${G.name}-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,w.value){case"url":t.fields.url=`${G.protocol}://${G.host}${G.path}`;break;case"protocol":t.fields.host=G.host,t.fields.path=G.path,t.fields.protocol=G.protocol,t.fields.port=G.port;break;default:t.fields.url=`${G.protocol}://${G.host}${G.path}`}},ce=Ne(()=>{if(M(),t.fields.url.length)try{const o=new URL(t.fields.url),c=O(o.protocol,oe);if(c)throw new Error(c);t.fields.protocol=o.protocol.slice(0,-1);const C=ee(o.hostname);if(C)throw new Error(C);t.fields.host=o.hostname;const $=H(o.pathname);if($)throw new Error($);t.fields.path=o.pathname;const N=me(o.port);if(N)throw new Error(N);const E=Number(o.port);be.value=!!E,t.fields.port=E||se.getPortFromProtocol(t.fields.protocol),p("url-valid:success")}catch{p("url-valid:error",i("gateway_services.form.errors.url.invalid")),t.formFieldErrors.url=i("gateway_services.form.errors.url.invalid")}},300),de=Ne(o=>{M(o)},300),we=e.computed(()=>!!t.formFieldErrors.url||!!t.formFieldErrors.host||!!t.formFieldErrors.port),F=o=>{if(t.errorMessages.length)return"";const c=t.formFieldErrors;return c[o]?c[o]:""},Z=Ne(o=>{M(o??void 0);const c=ee(t.fields.host);c&&(t.formFieldErrors.host=c);const C=H(t.fields.path);C&&(t.formFieldErrors.path=C);const $=me(t.fields.port);$&&(t.formFieldErrors.port=$),z.value?p("url-valid:success"):p("url-valid:error",t.errorMessages.join(",")||i("gateway_services.form.errors.url.invalid"))},300),M=o=>{if(o)t.formFieldErrors[o]="";else for(let c in t.formFieldErrors)t.formFieldErrors[c]="";t.errorMessages=[]},z=e.computed(()=>{for(let o in t.formFieldErrors)if(t.formFieldErrors[o].length)return!1;return!0}),fe=()=>{t.fields.url&&w.value==="url"?ce():Z()},l=()=>`new-service-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,d=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(t.fields.protocol)),v=e.computed(()=>{if(w.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return w.value==="protocol"&&o}),W=e.computed(()=>{if(w.value==="url")return!0;const o=["https","tls"].includes(t.fields.protocol);return w.value==="protocol"&&o}),x=e.computed(()=>{if(w.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return w.value==="protocol"&&o}),I=o=>{M("name"),ae.value=Y.utf8Name(o)},s=e.computed(()=>{const o=!r.value||!T(t.fields,k),c=w.value==="url"&&!!t.fields.url&&z.value,C=w.value==="protocol"&&!!t.fields.host&&z.value;return o&&(c||C)}),h=o=>{var c,C,$;t.fields.name=(o==null?void 0:o.name)||"",t.fields.tags=((c=o==null?void 0:o.tags)==null?void 0:c.join(", "))||"",t.fields.protocol=(o==null?void 0:o.protocol)||"http",t.fields.path=(o==null?void 0:o.path)||"",t.fields.read_timeout=o!=null&&o.read_timeout||(o==null?void 0:o.read_timeout)===0?o==null?void 0:o.read_timeout:6e4,t.fields.retries=o!=null&&o.retries||(o==null?void 0:o.retries)===0?o==null?void 0:o.retries:5,t.fields.host=(o==null?void 0:o.host)||"",t.fields.connect_timeout=o!=null&&o.connect_timeout||(o==null?void 0:o.connect_timeout)===0?o==null?void 0:o.connect_timeout:6e4,t.fields.tls_verify_enabled=(o==null?void 0:o.tls_verify)!==""&&(o==null?void 0:o.tls_verify)!==null&&(o==null?void 0:o.tls_verify)!==void 0,t.fields.tls_verify_value=o!=null&&o.tls_verify?o==null?void 0:o.tls_verify:!1,t.fields.ca_certificates=((C=o==null?void 0:o.ca_certificates)==null?void 0:C.join(","))||"",t.fields.client_certificate=(($=o==null?void 0:o.client_certificate)==null?void 0:$.id)||"",t.fields.write_timeout=o!=null&&o.write_timeout||(o==null?void 0:o.write_timeout)===0?o==null?void 0:o.write_timeout:6e4,t.fields.port=o!=null&&o.port||(o==null?void 0:o.port)===0?o==null?void 0:o.port:80,Object.assign(k,t.fields)},m=()=>{S.push(a.config.cancelRoute)},U=e.computed(()=>{var c,C;let o=`${a.config.apiBaseUrl}${le.form[a.config.app].validate}`;return a.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((c=a.config)==null?void 0:c.controlPlaneId)||""):a.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(C=a.config)!=null&&C.workspace?`/${a.config.workspace}`:"")),o=o.replace(/{id}/gi,a.gatewayServiceId),o}),J=e.computed(()=>{var c,C;let o=`${a.config.apiBaseUrl}${le.form[a.config.app][j.value]}`;return a.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((c=a.config)==null?void 0:c.controlPlaneId)||""):a.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(C=a.config)!=null&&C.workspace?`/${a.config.workspace}`:"")),o=o.replace(/{id}/gi,a.gatewayServiceId),o}),L=o=>{let c="";o.url&&(c=new URL(o.url).protocol),(["https","wss","tls"].includes(o.protocol)||["https","wss","tls"].includes(c))&&(o.tls_verify=o.tls_verify_enabled?o.tls_verify_value:null),delete o.tls_verify_enabled,delete o.tls_verify_value},Q=e.computed(()=>{var c,C,$,N;const o={name:t.fields.name||null,tags:t.fields.tags?($=(C=(c=t.fields.tags)==null?void 0:c.split(","))==null?void 0:C.map(E=>String(E||"").trim()))==null?void 0:$.filter(E=>E!==""):null,protocol:t.fields.protocol,path:t.fields.path||null,read_timeout:t.fields.read_timeout,retries:t.fields.retries,host:t.fields.host,connect_timeout:t.fields.connect_timeout,tls_verify_value:t.fields.tls_verify_value,tls_verify_enabled:t.fields.tls_verify_enabled,ca_certificates:t.fields.ca_certificates?(N=t.fields.ca_certificates)==null?void 0:N.split(",").filter(E=>E!==""):null,client_certificate:t.fields.client_certificate?{id:t.fields.client_certificate}:null,write_timeout:t.fields.write_timeout,port:t.fields.port,url:t.fields.url};return t.fields.client_certificate&&["https","wss","tls"].includes(t.fields.protocol)&&(o.client_certificate={id:t.fields.client_certificate}),t.fields.tls_verify_enabled&&["https","wss","tls"].includes(t.fields.protocol)&&(o.tls_verify=t.fields.tls_verify_value),d.value||(o.path=null),j.value==="create"?w.value==="url"?(delete o.protocol,delete o.host,delete o.path,a.config.app==="konnect"&&delete o.port):delete o.url:j.value==="edit"&&delete o.url,o}),b=async()=>{var o,c,C,$;try{t.isReadonly=!0,fe();const N=Q.value;L(N);let E;if(await V.post(U.value,N),j.value==="create"?E=await V.post(J.value,N):j.value==="edit"&&(E=((o=a.config)==null?void 0:o.app)==="konnect"?await V.put(J.value,N):await V.patch(J.value,N)),E){const{data:f}=E;t.fields.name=(f==null?void 0:f.name)||"",t.fields.port=f.port||se.getPortFromProtocol(f.protocol),t.fields.protocol=(f==null?void 0:f.protocol)||"http",t.fields.host=(f==null?void 0:f.host)||"",t.fields.path=(f==null?void 0:f.path)||"",t.fields.url=(f==null?void 0:f.url)||"",t.fields.retries=f!=null&&f.retries||(f==null?void 0:f.retries)===0?f==null?void 0:f.retries:5,t.fields.connect_timeout=f!=null&&f.connect_timeout||(f==null?void 0:f.connect_timeout)===0?f==null?void 0:f.connect_timeout:6e4,t.fields.write_timeout=f!=null&&f.write_timeout||(f==null?void 0:f.write_timeout)===0?f==null?void 0:f.write_timeout:6e4,t.fields.read_timeout=f!=null&&f.read_timeout||(f==null?void 0:f.read_timeout)===0?f==null?void 0:f.read_timeout:6e4,t.fields.client_certificate=((c=f==null?void 0:f.client_certificate)==null?void 0:c.id)||"",t.fields.ca_certificates=(C=f==null?void 0:f.ca_certificates)!=null&&C.length?f==null?void 0:f.ca_certificates.join(","):"",t.fields.tls_verify_enabled=(f==null?void 0:f.tls_verify)!==""&&(f==null?void 0:f.tls_verify)!==null&&(f==null?void 0:f.tls_verify)!==void 0,t.fields.tls_verify_value=t.fields.tls_verify_enabled&&(f==null?void 0:f.tls_verify),t.fields.tags=($=f==null?void 0:f.tags)!=null&&$.length?f.tags.join(", "):"",Object.assign(k,t.fields),p("update",E==null?void 0:E.data)}return E}catch(N){const{fields:E,messages:f}=B(N);t.errorMessages=f,E.length&&E.forEach(pe=>{const _e=pe.field;_e==="client_certificate.id"?t.formFieldErrors.client_certificate=pe.message:_e.startsWith("ca_certificates")?t.formFieldErrors.ca_certificates=pe.message:Object.keys(t.formFieldErrors).includes(_e)&&(t.formFieldErrors={...t.formFieldErrors,[_e]:pe.message})}),p("error",N)}finally{t.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(t.fields,k)}),e.watch(t.fields,o=>{t.fields.port=se.getPortFromProtocol(o.protocol,String(o.port)),p("model-updated",Q.value)}),e.onMounted(()=>{p("model-updated",Q.value),r.value||(t.fields.name=l())}),P({validateUrl:fe,getPayload:Q,saveFormData:b,canSubmit:s,initForm:h}),(o,c)=>{const C=e.resolveComponent("KRadio"),$=e.resolveComponent("KButton"),N=e.resolveComponent("KInput"),E=e.resolveComponent("KSelect"),f=e.resolveComponent("KCheckbox"),pe=e.resolveComponent("KCollapse"),_e=e.resolveComponent("KAlert");return e.openBlock(),e.createElementBlock("div",nt,[e.createVNode(e.unref(y.EntityBaseForm),{"can-submit":s.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(y.SupportedEntityType).GatewayService,"fetch-url":q.value,"form-fields":Q.value,"is-readonly":t.isReadonly,onCancel:m,"onFetch:error":c[30]||(c[30]=g=>o.$emit("error",g)),"onFetch:success":h,onLoading:c[31]||(c[31]=g=>o.$emit("loading",g)),onSubmit:b},{"form-actions":e.withCtx(()=>[e.renderSlot(o.$slots,"form-actions",{canSubmit:s.value,cancel:m,submit:b},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(y.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ct,[e.createElementVNode("div",dt,[e.createVNode(C,{modelValue:w.value,"onUpdate:modelValue":c[0]||(c[0]=g=>w.value=g),card:"","card-orientation":"horizontal","data-testid":"gateway-service-url-radio",description:e.unref(i)("gateway_services.form.sections.keys.url.description"),label:e.unref(i)("gateway_services.form.sections.keys.url.label"),"selected-value":ne.url,onChange:ye},null,8,["modelValue","description","label","selected-value"]),e.createVNode(C,{modelValue:w.value,"onUpdate:modelValue":c[1]||(c[1]=g=>w.value=g),card:"","card-orientation":"horizontal","checked-group":"protocol","data-testid":"gateway-service-protocol-radio",description:e.unref(i)("gateway_services.form.sections.keys.protocol.description"),label:e.unref(i)("gateway_services.form.sections.keys.protocol.label"),"selected-value":ne.protocol,onChange:ye},null,8,["modelValue","description","label","selected-value"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[w.value==="url"?(e.openBlock(),e.createElementBlock("div",ft,[e.createVNode(N,{modelValue:t.fields.url,"onUpdate:modelValue":c[2]||(c[2]=g=>t.fields.url=g),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",error:we.value,"error-message":F("url"),label:e.unref(i)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(i)("gateway_services.form.fields.upstream_url.placeholder"),required:"",onInput:e.unref(ce)},e.createSlots({_:2},[n.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode($,{appearance:"tertiary","data-testid":"try-sample-api",size:"small",onClick:ie},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder","onInput"])])):e.createCommentVNode("",!0)]),_:1})])),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[w.value==="protocol"||r.value?(e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(E,{modelValue:t.fields.protocol,"onUpdate:modelValue":c[3]||(c[3]=g=>t.fields.protocol=g),"data-testid":"gateway-service-protocol-select",items:oe,label:e.unref(i)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.isReadonly,required:"",width:"100%",onSelected:c[4]||(c[4]=g=>ue(t.fields.protocol,g))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(N,{modelValue:t.fields.host,"onUpdate:modelValue":c[5]||(c[5]=g=>t.fields.host=g),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",error:!!t.formFieldErrors.host,"error-message":F("host"),label:e.unref(i)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(i)("gateway_services.form.fields.host.placeholder"),required:"",onInput:c[6]||(c[6]=g=>e.unref(Z)("host"))},e.createSlots({_:2},[n.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode($,{appearance:"tertiary",size:"small",onClick:ie},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"]),d.value?(e.openBlock(),e.createElementBlock("div",mt,[e.createVNode(N,{modelValue:t.fields.path,"onUpdate:modelValue":c[7]||(c[7]=g=>t.fields.path=g),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",error:!!t.formFieldErrors.path,"error-message":F("path"),label:e.unref(i)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(i)("gateway_services.form.fields.path.placeholder"),onInput:c[8]||(c[8]=g=>e.unref(Z)("path"))},null,8,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(N,{modelValue:t.fields.port,"onUpdate:modelValue":[c[9]||(c[9]=g=>t.fields.port=g),c[11]||(c[11]=()=>{t.fields.port=re(t.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",error:!!t.formFieldErrors.port,"error-message":F("port"),label:e.unref(i)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number",onInput:c[10]||(c[10]=g=>e.unref(Z)("port"))},null,8,["modelValue","error","error-message","label","label-attributes"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(pe,{modelValue:_.value,"onUpdate:modelValue":c[27]||(c[27]=g=>_.value=g),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ut,[e.createElementVNode("div",gt,[e.createVNode(N,{modelValue:t.fields.retries,"onUpdate:modelValue":[c[12]||(c[12]=g=>t.fields.retries=g),c[13]||(c[13]=()=>{t.fields.retries=re(t.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(i)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",yt,[e.createVNode(N,{modelValue:t.fields.connect_timeout,"onUpdate:modelValue":[c[14]||(c[14]=g=>t.fields.connect_timeout=g),c[15]||(c[15]=()=>{t.fields.connect_timeout=re(t.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(i)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",_t,[e.createVNode(N,{modelValue:t.fields.write_timeout,"onUpdate:modelValue":[c[16]||(c[16]=g=>t.fields.write_timeout=g),c[17]||(c[17]=()=>{t.fields.write_timeout=re(t.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(i)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",bt,[e.createVNode(N,{modelValue:t.fields.read_timeout,"onUpdate:modelValue":[c[18]||(c[18]=g=>t.fields.read_timeout=g),c[19]||(c[19]=()=>{t.fields.read_timeout=re(t.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(i)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),v.value?(e.openBlock(),e.createElementBlock("div",wt,[e.createVNode(N,{modelValue:t.fields.client_certificate,"onUpdate:modelValue":c[20]||(c[20]=g=>t.fields.client_certificate=g),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",error:!!t.formFieldErrors.client_certificate,label:e.unref(i)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(i)("gateway_services.form.fields.client_certificate.placeholder"),readonly:t.isReadonly,type:"text",onInput:c[21]||(c[21]=g=>e.unref(de)("client_certificate"))},null,8,["modelValue","error","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),W.value?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(N,{modelValue:t.fields.ca_certificates,"onUpdate:modelValue":c[22]||(c[22]=g=>t.fields.ca_certificates=g),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",error:!!t.formFieldErrors.ca_certificates,label:e.unref(i)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:t.isReadonly,type:"text",onInput:c[23]||(c[23]=g=>e.unref(de)("ca_certificates"))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(K),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","error","label","placeholder","readonly"])])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("div",vt,[e.createVNode(f,{modelValue:t.fields.tls_verify_enabled,"onUpdate:modelValue":c[24]||(c[24]=g=>t.fields.tls_verify_enabled=g),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(K),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Vt,[e.createVNode(C,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":c[25]||(c[25]=g=>t.fields.tls_verify_value=g),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",kt,[e.createVNode(C,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":c[26]||(c[26]=g=>t.fields.tls_verify_value=g),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(i)("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(y.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.fields.name,"onUpdate:modelValue":c[28]||(c[28]=g=>t.fields.name=g),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:te.value,"error-message":ae.value,label:e.unref(i)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(i)("gateway_services.form.fields.name.placeholder"),readonly:t.isReadonly,type:"text",onInput:I},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(pe,{"data-testid":"tags-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.fields.tags.collapse")},{default:e.withCtx(()=>[e.createElementVNode("div",Ct,[e.createVNode(N,{modelValue:t.fields.tags,"onUpdate:modelValue":c[29]||(c[29]=g=>t.fields.tags=g),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(i)("gateway_services.form.fields.tags.help"),label:e.unref(i)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(i)("gateway_services.form.fields.tags.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])])]),_:1},8,["trigger-label"])]),_:1},8,["description","hide-info-header","title"]),t.errorMessages.length?(e.openBlock(),e.createBlock(_e,{key:0,appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("ul",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.errorMessages,g=>(e.openBlock(),e.createElementBlock("li",{key:g},e.toDisplayString(g),1))),128))])]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["can-submit","config","edit-id","entity-type","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-aac697aa"]]),{validateHost:Et,validatePort:St,validateProtocol:It,validatePath:Pt}=X.useUrlValidators(),Tt=()=>({validateHost:Et,validatePort:St,validateProtocol:It,validatePath:Pt});R.GatewayServiceConfigCard=it,R.GatewayServiceForm=xt,R.GatewayServiceList=De,R.LegacyGatewayServiceForm=rt,R.useUrlValidator=Tt,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(D,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):(D=typeof globalThis<"u"?globalThis:D||self,e(D["kong-ui-public-entities-gateway-services"]={},D.Vue,D.VueRouter,D.KongIcons,D["kong-ui-public-i18n"],D["kong-ui-public-entities-shared"]))})(this,function(D,e,ke,he,Ee,_){"use strict";const Se={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."},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 Ie(){const n=Ee.createI18n("en-us",Se);return{i18n:n,i18nT:Ee.i18nTComponent(n)}}function Pe(){return{getPortFromProtocol:(B,g)=>{const p=[80,443],s=Number(g);if((s||s===0)&&!p.includes(s))return s;switch(B){case"grpcs":case"tls":case"https":case"wss":return 443;case"grpc":case"tcp":case"http":case"ws":default:return 80}}}}function Be(){const{i18n:{t:n}}=Z.useI18n();return{validateHost:b=>{if(!b||b.trim()==="")return n("gateway_services.form.errors.host.empty");const P=/^(?!:\/\/)([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(b)||P.test(b)?"":n("gateway_services.form.errors.host.invalid")},validateProtocol:(b,P)=>!b||b.trim()===""?n("gateway_services.form.errors.protocol.empty"):(b=b.slice(0,-1),P.find(i=>{if(i.value===b)return i})===void 0?n("gateway_services.form.errors.protocol.invalid"):""),validatePath:b=>!b||b===""?"":b.startsWith("/")?/[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(b)?n("gateway_services.form.errors.path.invalid"):"":n("gateway_services.form.errors.path.prefix"),validatePort:b=>{if(b==null||b==="")return"";const P=typeof b=="string"?parseInt(b,10):b;return isNaN(P)?n("gateway_services.form.errors.port.type"):P<0||P>65535?n("gateway_services.form.errors.port.invalid"):""}}}const Z={useI18n:Ie,usePortFromProtocol:Pe,useUrlValidators:Be},ve="/v2/control-planes/{controlPlaneId}/core-entities",Ve="/{workspace}",ee={list:{konnect:{all:`${ve}/services`},kongManager:{all:`${Ve}/services`}},form:{konnect:{create:`${ve}/services`,validate:`${ve}/v1/schemas/json/service/validate`,edit:`${ve}/services/{id}`},kongManager:{create:`${Ve}/services`,validate:`${Ve}/schemas/services/validate`,edit:`${Ve}/services/{id}`}}},Te="#00abd2",Fe="24px",$e={class:"kong-ui-entities-gateway-services-list"},Ue={class:"button-row"},Ae={class:"empty-state-icon-gateway"},Re={key:1},Me=e.defineComponent({__name:"GatewayServiceList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.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},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","toggle:success"],setup(n,{emit:B}){var c;const g=B,p=n,{i18n:{t:s,formatUnixTimeStamp:b}}=Z.useI18n(),P=ke.useRouter(),{axiosInstance:L}=_.useAxios((c=p.config)==null?void 0:c.axiosRequestConfig),{hasRecords:i,handleStateChange:$}=_.useTableState(()=>M.value),k=e.computed(()=>i.value&&p.config.app==="konnect"),J=e.computed(()=>!p.enableV2EmptyStates&&p.config.app==="konnect"),te=e.computed(()=>p.config.app!=="kongManager"||!!p.config.disableSorting),O={name:{label:s("gateway_services.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},...p.config.showControlPlaneColumn?{control_plane:{label:s("gateway_services.list.table_headers.control_plane")}}:{},protocol:{label:s("gateway_services.list.table_headers.protocol"),searchable:!0,sortable:!0},host:{label:s("gateway_services.list.table_headers.host"),searchable:!0,sortable:!0},port:{label:s("gateway_services.list.table_headers.port"),searchable:!0,sortable:!0},path:{label:s("gateway_services.list.table_headers.path"),searchable:!0,sortable:!0},enabled:{label:s("gateway_services.list.table_headers.enabled"),searchable:!0,sortable:!0},tags:{label:s("gateway_services.list.table_headers.tags"),sortable:!1},updated_at:{label:s("gateway_services.list.table_headers.updated_at"),sortable:!0},created_at:{label:s("gateway_services.list.table_headers.created_at"),sortable:!0}},pe={columnVisibility:{created_at:!1}},oe=O,x=e.computed(()=>{var m,V;let u=`${p.config.apiBaseUrl}${ee.list[p.config.app].all}`;return p.config.app==="konnect"?u=u.replace(/{controlPlaneId}/gi,((m=p.config)==null?void 0:m.controlPlaneId)||""):p.config.app==="kongManager"&&(u=u.replace(/\/{workspace}/gi,(V=p.config)!=null&&V.workspace?`/${p.config.workspace}`:"")),u}),ae=e.computed(()=>p.config.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${x.value}`):new URL(x.value)),M=e.ref(""),_e=e.computed(()=>{const u=p.config.app==="konnect"||p.config.isExactMatch;if(u)return{isExactMatch:u,placeholder:s(`search.placeholder.${p.config.app}`)};const{name:m,enabled:V,protocol:F,host:ie,port:A,path:se}=O;return{isExactMatch:u,fields:{name:m,enabled:V,protocol:F,host:ie,port:A,path:se},schema:p.config.filterSchema}}),{fetcher:r,fetcherState:h,fetcherCacheKey:Q}=_.useFetcher(e.computed(()=>({...p.config,cacheIdentifier:p.cacheIdentifier})),x),ne=()=>{M.value=""},me=()=>{Q.value++},t=e.ref(null),E=e.computed(()=>({ctaPath:p.config.createRoute,ctaText:S.value?p.isServerless?s("actions.serverless_create"):s("actions.create"):void 0,message:`${s("gateway_services.list.empty_state.description")}${p.config.additionMessageForEmptyState?` ${p.config.additionMessageForEmptyState}`:""}`,title:S.value?p.isServerless?s("gateway_services.list.empty_state.serverless_title"):s("gateway_services.list.empty_state.title"):s("gateway_services.title")})),re=e.ref(!1),U=e.ref(null),X=e.computed(()=>{const u={action:"disable",id:"",name:""};if(U.value){const{enabled:m,id:V,name:F}=U.value;u.action=m?"disable":"enable",u.id=V,u.name=F||V}return u}),be=u=>{re.value=!0,U.value=u},H=()=>{re.value=!1,U.value=null},ue=async()=>{var F,ie;if(!await((F=p.canEdit)==null?void 0:F.call(p,U.value))||!U.value)return;const m=`${ae.value.href}/${U.value.id}`,V=!U.value.enabled;try{const{data:A}=((ie=p.config)==null?void 0:ie.app)==="konnect"?await L.put(m,{...U.value,enabled:V}):await L.patch(m,{...U.value,enabled:V});g("toggle:success",A),U.value.enabled=V}catch(A){g("error",A)}},ge=u=>{p.config.getControlPlaneRoute&&P.push(p.config.getControlPlaneRoute(u))},le=async(u,m)=>{const V=u.id;if(!await m(V)){g("copy:error",{entity:u,field:"id",message:s("errors.copy")});return}g("copy:success",{entity:u,field:"id",message:s("copy.success",{val:V})})},ce=async(u,m)=>{const V=JSON.stringify(u);if(!await m(V)){g("copy:error",{entity:u,message:s("errors.copy")});return}g("copy:success",{entity:u,message:s("copy.success_brief")})},de=async u=>{var V;await((V=p.canRetrieve)==null?void 0:V.call(p,u))&&P.push(p.config.getViewRoute(u.id))},we=u=>({label:s("actions.view"),to:p.config.getViewRoute(u)}),j=u=>({label:s("actions.edit"),to:p.config.getEditRoute(u)}),K=e.ref(void 0),W=e.ref(!1),z=e.ref(!1),Y=e.ref(""),l=_.useDeleteUrlBuilder(p.config,x.value),d=u=>{K.value=u,W.value=!0,Y.value=""},v=()=>{W.value=!1,K.value=void 0},q=async()=>{var u,m,V;if((u=K.value)!=null&&u.id){z.value=!0;try{await L.delete(l(K.value.id)),g("delete:success",K.value),v(),Q.value++}catch(F){Y.value=((V=(m=F.response)==null?void 0:m.data)==null?void 0:V.message)||F.message||s("errors.delete"),g("error",F)}finally{z.value=!1}}},T=()=>{P.push(p.config.createRoute)};e.watch(h,u=>{var m,V,F;if(u.status===_.FetcherStatus.Error){t.value={title:s("errors.general")},(F=(V=(m=u.error)==null?void 0:m.response)==null?void 0:V.data)!=null&&F.message&&(t.value.message=u.error.response.data.message),g("error",u.error);return}t.value=null});const S=e.ref(!1);return e.onBeforeMount(async()=>{S.value=await p.canCreate()}),(u,m)=>{const V=e.resolveComponent("KButton"),F=e.resolveComponent("KBadge"),ie=e.resolveComponent("KInputSwitch"),A=e.resolveComponent("KDropdownItem"),se=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(e.unref(_.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"default-table-preferences":pe,"disable-sorting":te.value,"empty-state-options":E.value,"enable-entity-actions":"","error-message":t.value,fetcher:e.unref(r),"fetcher-cache-key":e.unref(Q),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-gateway-services-list",query:M.value,"table-headers":e.unref(oe),onClearSearchInput:ne,"onClick:row":m[5]||(m[5]=w=>de(w)),onSort:me,onState:e.unref($)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(_.EntityFilter),{modelValue:M.value,"onUpdate:modelValue":m[0]||(m[0]=w=>M.value=w),config:_e.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Ue,[k.value?(e.openBlock(),e.createBlock(V,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-learn-more-button",icon:"",onClick:m[1]||(m[1]=w=>u.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(he.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.createVNode(V,{appearance:"primary","data-testid":"toolbar-add-gateway-service",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(he.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(s)("gateway_services.list.toolbar_actions.new_gateway_service")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:w})=>[e.createElementVNode("b",null,e.toDisplayString(w??"-"),1)]),control_plane:e.withCtx(({row:w})=>{var o;return[(o=w.x_meta)!=null&&o.cluster_id?(e.openBlock(),e.createBlock(F,{key:0,tooltip:w.x_meta.cluster_id,"truncation-tooltip":"",onClick:e.withModifiers(a=>ge(w.x_meta.cluster_id),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.x_meta.cluster_id),1)]),_:2},1032,["tooltip","onClick"])):(e.openBlock(),e.createElementBlock("b",Re,"-"))]}),enabled:e.withCtx(({row:w})=>[e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>n.canEdit(w),"force-show":""},{default:e.withCtx(({isAllowed:o})=>[e.createElementVNode("div",{onClick:m[4]||(m[4]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(ie,{modelValue:w.enabled,"onUpdate:modelValue":a=>w.enabled=a,"data-testid":`row-${w.id}-toggle-input`,disabled:!o,onClick:e.withModifiers(a=>be(w),["prevent"])},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","onClick"])])]),_:2},1032,["auth-function"])]),tags:e.withCtx(({rowValue:w})=>[e.createVNode(e.unref(_.TableTags),{tags:w},null,8,["tags"])]),created_at:e.withCtx(({rowValue:w})=>[e.createTextVNode(e.toDisplayString(e.unref(b)(w)),1)]),updated_at:e.withCtx(({row:w,rowValue:o})=>[e.createTextVNode(e.toDisplayString(e.unref(b)(o??w.created_at)),1)]),actions:e.withCtx(({row:w})=>[e.createVNode(se,null,{default:e.withCtx(({copyToClipboard:o})=>[e.createVNode(A,{"data-testid":"action-entity-copy-id",onClick:a=>le(w,o)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(se,null,{default:e.withCtx(({copyToClipboard:o})=>[e.createVNode(A,{"data-testid":"action-entity-copy-json",onClick:a=>ce(w,o)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>n.canRetrieve(w)},{default:e.withCtx(()=>[e.createVNode(A,{"data-testid":"action-entity-view","has-divider":"",item:we(w.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>n.canEdit(w)},{default:e.withCtx(()=>[e.createVNode(A,{"data-testid":"action-entity-edit",item:j(w.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>n.canDelete(w)},{default:e.withCtx(()=>[e.createVNode(A,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:o=>d(w)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("actions.delete.menu_label")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(i)&&J.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(V,{appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-more-button",icon:"",onClick:m[2]||(m[2]=w=>u.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(he.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!M.value&&n.enableV2EmptyStates&&n.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var w;return[e.createVNode(e.unref(_.EntityEmptyState),{"action-button-text":e.unref(s)("gateway_services.empty_state_v2.create"),appearance:"secondary","can-create":()=>n.canCreate(),"data-testid":"gateway-services-entity-empty-state",description:e.unref(s)("gateway_services.empty_state_v2.description"),"learn-more":n.config.app==="konnect",title:e.unref(s)("gateway_services.empty_state_v2.title"),"onClick:create":T,"onClick:learnMore":m[3]||(m[3]=o=>u.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",Ae,[e.createVNode(e.unref(he.ServicesIcon),{color:e.unref(Te),size:e.unref(Fe)},null,8,["color","size"])])]),_:2},[(w=n.config)!=null&&w.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("gateway_services.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(_.EntityToggleModal),{action:X.value.action,"entity-id":X.value.id,"entity-name":X.value.name,"entity-type":e.unref(s)("glossary.gateway_services"),"on-confirm":ue,visible:re.value,onCancel:H,onProceed:H},null,8,["action","entity-id","entity-name","entity-type","visible"]),e.createVNode(e.unref(_.EntityDeleteModal),{"action-pending":z.value,description:e.unref(s)("actions.delete.description"),"entity-name":K.value&&(K.value.name||K.value.id),"entity-type":e.unref(_.EntityTypes).GatewayService,error:Y.value,title:e.unref(s)("actions.delete.title"),visible:W.value,onCancel:v,onProceed:q},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Ce=(n,B)=>{const g=n.__vccOpts||n;for(const[p,s]of B)g[p]=s;return g},De=Ce(Me,[["__scopeId","data-v-210f19c5"]]),Ke={class:"kong-ui-entities-gateway-service-form"},We={key:0},Le={class:"gateway-service-form-traffic-label"},qe={class:"gateway-service-form-margin-bottom"},Ge={key:0,class:"gateway-service-form-group-fields"},Oe={key:1,class:"gateway-service-form-group-fields"},je={key:0},ze={class:"gateway-service-form-margin-top"},He={class:"gateway-service-form-margin-bottom"},Ze={class:"gateway-service-form-margin-bottom"},Je={class:"gateway-service-form-margin-bottom"},Qe={class:"gateway-service-form-margin-bottom"},Xe={key:0,class:"gateway-service-form-margin-bottom"},Ye={key:1,class:"gateway-service-form-margin-bottom"},et={key:2,class:"gateway-service-form-margin-bottom"},tt={key:0,class:"checkbox-aligned-radio"},ot={key:1,class:"checkbox-aligned-radio"},rt=Ce(e.defineComponent({__name:"LegacyGatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated"],setup(n,{expose:B,emit:g}){var Y;const p=g,s=n,b=e.ref(!0),P=ke.useRouter(),{i18nT:L,i18n:{t:i}}=Z.useI18n(),{getMessageFromError:$}=_.useErrors(),{axiosInstance:k}=_.useAxios((Y=s.config)==null?void 0:Y.axiosRequestConfig),J=_.useValidators(),te=e.computed(()=>ee.form[s.config.app].edit),O=e.computed(()=>s.gatewayServiceId?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),pe=e.ref(!1),oe=e.computed(()=>!!s.gatewayServiceId),x=e.ref(oe.value?"protocol":"url"),ae=Z.usePortFromProtocol(),M=e.ref(""),_e=e.computed(()=>!!M.value),r=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:""},isReadonly:!1,errorMessage:""}),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:""}),Q=s.config.app==="konnect"||_.useGatewayFeatureSupported({gatewayInfo:s.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),ne=[{label:i("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:i("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:i("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:i("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...Q?[{label:i("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:i("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:i("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],me={url:"url",protocol:"protocol"},t=(l,d)=>{d.value},E=l=>l?parseFloat(l):0,re=()=>{b.value=!0,r.errorMessage="",r.fields.host=h.host,r.fields.path=h.path,r.fields.port=h.port,r.fields.protocol=h.protocol,r.fields.url=h.url,r.fields.retries=h.retries,r.fields.connect_timeout=h.connect_timeout,r.fields.write_timeout=h.write_timeout,r.fields.read_timeout=h.read_timeout,r.fields.client_certificate=h.client_certificate,r.fields.ca_certificates=h.ca_certificates,r.fields.tls_verify_enabled=h.tls_verify_enabled,r.fields.tls_verify_value=h.tls_verify_value},U=()=>{if(r.fields.url&&x.value==="url")try{const l=new URL(r.fields.url);r.errorMessage="",r.fields.protocol=l.protocol.slice(0,-1),r.fields.host=l.hostname,r.fields.path=l.pathname;const d=Number(l.port);pe.value=!!d,r.fields.port=d||ae.getPortFromProtocol(r.fields.protocol),r.errorMessage="",p("url-valid:success")}catch(l){r.errorMessage=i("errors.urlErrorMessage"),p("url-valid:error",$(l))}else p("url-valid:success"),r.errorMessage=""},X=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(r.fields.protocol)),be=e.computed(()=>{if(x.value==="url")return!0;const l=["https","wss","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),H=e.computed(()=>{if(x.value==="url")return!0;const l=["https","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),ue=e.computed(()=>{if(x.value==="url")return!0;const l=["https","wss","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),ge=l=>{M.value=J.utf8Name(l)},le=e.computed(()=>oe.value&&JSON.stringify(r.fields)!==JSON.stringify(h)||x.value==="url"&&!!r.fields.url||x.value==="protocol"&&!!r.fields.host),ce=l=>{var d,v,q;r.fields.name=(l==null?void 0:l.name)||"",r.fields.tags=((d=l==null?void 0:l.tags)==null?void 0:d.join(", "))||"",r.fields.protocol=(l==null?void 0:l.protocol)||"http",r.fields.path=(l==null?void 0:l.path)||"",r.fields.read_timeout=l!=null&&l.read_timeout||(l==null?void 0:l.read_timeout)===0?l==null?void 0:l.read_timeout:6e4,r.fields.retries=l!=null&&l.retries||(l==null?void 0:l.retries)===0?l==null?void 0:l.retries:5,r.fields.host=(l==null?void 0:l.host)||"",r.fields.connect_timeout=l!=null&&l.connect_timeout||(l==null?void 0:l.connect_timeout)===0?l==null?void 0:l.connect_timeout:6e4,r.fields.tls_verify_enabled=(l==null?void 0:l.tls_verify)!==""&&(l==null?void 0:l.tls_verify)!==null&&(l==null?void 0:l.tls_verify)!==void 0,r.fields.tls_verify_value=l!=null&&l.tls_verify?l==null?void 0:l.tls_verify:!1,r.fields.ca_certificates=((v=l==null?void 0:l.ca_certificates)==null?void 0:v.join(","))||"",r.fields.client_certificate=((q=l==null?void 0:l.client_certificate)==null?void 0:q.id)||"",r.fields.write_timeout=l!=null&&l.write_timeout||(l==null?void 0:l.write_timeout)===0?l==null?void 0:l.write_timeout:6e4,r.fields.port=l!=null&&l.port||(l==null?void 0:l.port)===0?l==null?void 0:l.port:80,Object.assign(h,r.fields)},de=()=>{P.push(s.config.cancelRoute)},we=e.computed(()=>{var d,v;let l=`${s.config.apiBaseUrl}${ee.form[s.config.app].validate}`;return s.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((d=s.config)==null?void 0:d.controlPlaneId)||""):s.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(v=s.config)!=null&&v.workspace?`/${s.config.workspace}`:"")),l=l.replace(/{id}/gi,s.gatewayServiceId),l}),j=e.computed(()=>{var d,v;let l=`${s.config.apiBaseUrl}${ee.form[s.config.app][O.value]}`;return s.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((d=s.config)==null?void 0:d.controlPlaneId)||""):s.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(v=s.config)!=null&&v.workspace?`/${s.config.workspace}`:"")),l=l.replace(/{id}/gi,s.gatewayServiceId),l}),K=l=>{let d="";l.url&&(d=new URL(l.url).protocol),(["https","wss","tls"].includes(l.protocol)||["https","wss","tls"].includes(d))&&(l.tls_verify=l.tls_verify_enabled?l.tls_verify_value:null),delete l.tls_verify_enabled,delete l.tls_verify_value},W=e.computed(()=>{var d,v,q,T;const l={name:r.fields.name||null,tags:r.fields.tags?(q=(v=(d=r.fields.tags)==null?void 0:d.split(","))==null?void 0:v.map(S=>String(S||"").trim()))==null?void 0:q.filter(S=>S!==""):null,protocol:r.fields.protocol,path:r.fields.path||null,read_timeout:r.fields.read_timeout,retries:r.fields.retries,host:r.fields.host,connect_timeout:r.fields.connect_timeout,tls_verify_value:r.fields.tls_verify_value,tls_verify_enabled:r.fields.tls_verify_enabled,ca_certificates:r.fields.ca_certificates?(T=r.fields.ca_certificates)==null?void 0:T.split(",").filter(S=>S!==""):null,client_certificate:r.fields.client_certificate?{id:r.fields.client_certificate}:null,write_timeout:r.fields.write_timeout,port:r.fields.port,url:r.fields.url};return r.fields.client_certificate&&["https","wss","tls"].includes(r.fields.protocol)&&(l.client_certificate={id:r.fields.client_certificate}),r.fields.tls_verify_enabled&&["https","wss","tls"].includes(r.fields.protocol)&&(l.tls_verify=r.fields.tls_verify_value),X.value||(l.path=null),O.value==="create"?x.value==="url"?(delete l.protocol,delete l.host,delete l.path,s.config.app==="konnect"&&delete l.port):delete l.url:O.value==="edit"&&delete l.url,l}),z=async()=>{var l,d,v,q;try{r.isReadonly=!0,U();const T=W.value;K(T);let S;if(await k.post(we.value,T),O.value==="create"?S=await k.post(j.value,T):O.value==="edit"&&(S=((l=s.config)==null?void 0:l.app)==="konnect"?await k.put(j.value,T):await k.patch(j.value,T)),S){const{data:c}=S;r.fields.name=(c==null?void 0:c.name)||"",r.fields.port=c.port||ae.getPortFromProtocol(c.protocol),r.fields.protocol=(c==null?void 0:c.protocol)||"http",r.fields.host=(c==null?void 0:c.host)||"",r.fields.path=(c==null?void 0:c.path)||"",r.fields.url=(c==null?void 0:c.url)||"",r.fields.retries=c!=null&&c.retries||(c==null?void 0:c.retries)===0?c==null?void 0:c.retries:5,r.fields.connect_timeout=c!=null&&c.connect_timeout||(c==null?void 0:c.connect_timeout)===0?c==null?void 0:c.connect_timeout:6e4,r.fields.write_timeout=c!=null&&c.write_timeout||(c==null?void 0:c.write_timeout)===0?c==null?void 0:c.write_timeout:6e4,r.fields.read_timeout=c!=null&&c.read_timeout||(c==null?void 0:c.read_timeout)===0?c==null?void 0:c.read_timeout:6e4,r.fields.client_certificate=((d=c==null?void 0:c.client_certificate)==null?void 0:d.id)||"",r.fields.ca_certificates=(v=c==null?void 0:c.ca_certificates)!=null&&v.length?c==null?void 0:c.ca_certificates.join(","):"",r.fields.tls_verify_enabled=(c==null?void 0:c.tls_verify)!==""&&(c==null?void 0:c.tls_verify)!==null&&(c==null?void 0:c.tls_verify)!==void 0,r.fields.tls_verify_value=r.fields.tls_verify_enabled&&(c==null?void 0:c.tls_verify),r.fields.tags=(q=c==null?void 0:c.tags)!=null&&q.length?c.tags.join(", "):"",Object.assign(h,r.fields),p("update",S==null?void 0:S.data)}return S}catch(T){r.errorMessage=$(T),p("error",T)}finally{r.isReadonly=!1}};return e.watch(()=>s.gatewayServiceId,()=>{Object.assign(r.fields,h)}),e.watch(r.fields,l=>{r.fields.port=ae.getPortFromProtocol(l.protocol,String(l.port)),p("model-updated",W.value)}),e.onMounted(()=>{p("model-updated",W.value)}),B({validateUrl:U,getPayload:W,saveFormData:z,canSubmit:le,initForm:ce}),(l,d)=>{const v=e.resolveComponent("KInput"),q=e.resolveComponent("KLabel"),T=e.resolveComponent("KRadio"),S=e.resolveComponent("KSelect"),c=e.resolveComponent("KCheckbox"),u=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(e.unref(_.EntityBaseForm),{"can-submit":le.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(_.SupportedEntityType).GatewayService,"error-message":r.errorMessage,"fetch-url":te.value,"form-fields":W.value,"is-readonly":r.isReadonly,onCancel:de,"onFetch:error":d[25]||(d[25]=m=>l.$emit("error",m)),"onFetch:success":ce,onLoading:d[26]||(d[26]=m=>l.$emit("loading",m)),onSubmit:z},{"form-actions":e.withCtx(()=>[e.renderSlot(l.$slots,"form-actions",{canSubmit:le.value,cancel:de,submit:z},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(v,{modelValue:r.fields.name,"onUpdate:modelValue":d[0]||(d[0]=m=>r.fields.name=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:_e.value,"error-message":M.value,label:e.unref(i)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(i)("gateway_services.form.fields.name.placeholder"),readonly:r.isReadonly,type:"text",onInput:ge},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(v,{modelValue:r.fields.tags,"onUpdate:modelValue":d[1]||(d[1]=m=>r.fields.tags=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(i)("gateway_services.form.fields.tags.help"),label:e.unref(i)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(i)("gateway_services.form.fields.tags.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[oe.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("div",Le,[e.createVNode(q,{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.checkedGroupLabel")),1)]),_:1})]),e.createElementVNode("div",qe,[e.createVNode(T,{modelValue:x.value,"onUpdate:modelValue":d[2]||(d[2]=m=>x.value=m),"data-testid":"gateway-service-url-radio","selected-value":me.url,onChange:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.urlLabel")),1)]),_:1},8,["modelValue","selected-value"])]),x.value==="url"?(e.openBlock(),e.createElementBlock("div",Ge,[e.createVNode(v,{modelValue:r.fields.url,"onUpdate:modelValue":d[3]||(d[3]=m=>r.fields.url=m),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",label:e.unref(i)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(i)("gateway_services.form.fields.upstream_url.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(T,{modelValue:x.value,"onUpdate:modelValue":d[4]||(d[4]=m=>x.value=m),"checked-group":"protocol","data-testid":"gateway-service-protocol-radio","selected-value":me.protocol,onChange:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.checkedGroupAltLabel")),1)]),_:1},8,["modelValue","selected-value"])])),x.value==="protocol"||oe.value?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(S,{modelValue:r.fields.protocol,"onUpdate:modelValue":d[5]||(d[5]=m=>r.fields.protocol=m),"data-testid":"gateway-service-protocol-select",items:ne,label:e.unref(i)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:r.isReadonly,required:"",width:"100%",onSelected:d[6]||(d[6]=m=>t(r.fields.protocol,m))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(v,{modelValue:r.fields.host,"onUpdate:modelValue":d[7]||(d[7]=m=>r.fields.host=m),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",label:e.unref(i)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(i)("gateway_services.form.fields.host.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"]),X.value?(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(v,{modelValue:r.fields.path,"onUpdate:modelValue":d[8]||(d[8]=m=>r.fields.path=m),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",label:e.unref(i)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(i)("gateway_services.form.fields.path.placeholder")},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(v,{modelValue:r.fields.port,"onUpdate:modelValue":[d[9]||(d[9]=m=>r.fields.port=m),d[10]||(d[10]=()=>{r.fields.port=E(r.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",label:e.unref(i)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number"},null,8,["modelValue","label","label-attributes"])])):e.createCommentVNode("",!0),e.createVNode(u,{modelValue:b.value,"onUpdate:modelValue":d[24]||(d[24]=m=>b.value=m),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createElementVNode("div",ze,[e.createElementVNode("div",He,[e.createVNode(v,{modelValue:r.fields.retries,"onUpdate:modelValue":[d[11]||(d[11]=m=>r.fields.retries=m),d[12]||(d[12]=()=>{r.fields.retries=E(r.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(i)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Ze,[e.createVNode(v,{modelValue:r.fields.connect_timeout,"onUpdate:modelValue":[d[13]||(d[13]=m=>r.fields.connect_timeout=m),d[14]||(d[14]=()=>{r.fields.connect_timeout=E(r.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(i)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Je,[e.createVNode(v,{modelValue:r.fields.write_timeout,"onUpdate:modelValue":[d[15]||(d[15]=m=>r.fields.write_timeout=m),d[16]||(d[16]=()=>{r.fields.write_timeout=E(r.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(i)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Qe,[e.createVNode(v,{modelValue:r.fields.read_timeout,"onUpdate:modelValue":[d[17]||(d[17]=m=>r.fields.read_timeout=m),d[18]||(d[18]=()=>{r.fields.read_timeout=E(r.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(i)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),be.value?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(v,{modelValue:r.fields.client_certificate,"onUpdate:modelValue":d[19]||(d[19]=m=>r.fields.client_certificate=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",label:e.unref(i)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(i)("gateway_services.form.fields.client_certificate.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(v,{modelValue:r.fields.ca_certificates,"onUpdate:modelValue":d[20]||(d[20]=m=>r.fields.ca_certificates=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",label:e.unref(i)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:r.isReadonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(L),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(c,{modelValue:r.fields.tls_verify_enabled,"onUpdate:modelValue":d[21]||(d[21]=m=>r.fields.tls_verify_enabled=m),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(L),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),r.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(T,{modelValue:r.fields.tls_verify_value,"onUpdate:modelValue":d[22]||(d[22]=m=>r.fields.tls_verify_value=m),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),r.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(T,{modelValue:r.fields.tls_verify_value,"onUpdate:modelValue":d[23]||(d[23]=m=>r.fields.tls_verify_value=m),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"])]),_:3},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-59d8e66b"]]),lt={class:"kong-ui-gateway-service-entity-config-card"},it=e.defineComponent({__name:"GatewayServiceConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(n){const B=n,{i18n:{t:g},i18nT:p}=Z.useI18n(),s=e.computed(()=>ee.form[B.config.app].edit),{getPropValue:b}=_.useHelpers(),P=(i,$)=>b(i,$)===!0?g("gateway_services.form.fields.tls_verify_option.true.display"):g("gateway_services.form.fields.tls_verify_option.false.display"),L=e.ref({id:{},name:{tooltip:g("gateway_services.form.fields.name.tooltip")},enabled:{},updated_at:{},created_at:{},protocol:{section:_.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.protocol.tooltip")},host:{section:_.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.host.tooltip")},path:{section:_.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.path.tooltip")},port:{section:_.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.port.tooltip")},tags:{tooltip:g("gateway_services.form.fields.tags.tooltip")},retries:{order:1,tooltip:g("gateway_services.form.fields.retries.tooltip")},connect_timeout:{order:2,tooltip:g("gateway_services.form.fields.connect_timeout.tooltip")},write_timeout:{order:3,tooltip:g("gateway_services.form.fields.write_timeout.tooltip")},read_timeout:{order:4,tooltip:g("gateway_services.form.fields.read_timeout.tooltip")},client_certificate:{order:5,tooltip:g("gateway_services.form.fields.client_certificate.tooltip")},ca_certificates:{type:_.ConfigurationSchemaType.BadgeTag,label:g("gateway_services.form.fields.ca_certificates.label"),order:6},tls_verify:{label:g("gateway_services.form.fields.tls_verify_enabled.label")},tls_verify_depth:{hidden:!0}});return(i,$)=>(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(e.unref(_.EntityBaseConfigCard),{config:n.config,"config-card-doc":n.configCardDoc,"config-schema":L.value,"entity-type":e.unref(_.SupportedEntityType).GatewayService,"fetch-url":s.value,"hide-title":n.hideTitle,"onFetch:error":$[0]||($[0]=k=>i.$emit("fetch:error",k)),"onFetch:success":$[1]||($[1]=k=>i.$emit("fetch:success",k)),onLoading:$[2]||($[2]=k=>i.$emit("loading",k))},{"enabled-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.enabled.tooltip",scope:"global"},{false:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.enabled.false")),1)]),true:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.enabled.true")),1)]),_:1})]),"ca_certificates-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),"tls_verify-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),tls_verify:e.withCtx(k=>[e.createTextVNode(e.toDisplayString(typeof e.unref(b)("rowValue",k)=="boolean"?P("rowValue",k):e.unref(g)("gateway_services.form.fields.tls_verify_option.unset.display")),1)]),client_certificate:e.withCtx(k=>[e.createTextVNode(e.toDisplayString(e.unref(b)("rowValue",k)?e.unref(b)("rowValue",k).id:"–"),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const xe=()=>{};function st(n,B){function g(...p){return new Promise((s,b)=>{Promise.resolve(n(()=>B.apply(this,p),{fn:B,thisArg:this,args:p})).then(s).catch(b)})}return g}function at(n,B={}){let g,p,s=xe;const b=i=>{clearTimeout(i),s(),s=xe};let P;return i=>{const $=e.toValue(n),k=e.toValue(B.maxWait);return g&&b(g),$<=0||k!==void 0&&k<=0?(p&&(b(p),p=null),Promise.resolve(i())):new Promise((J,te)=>{s=B.rejectOnCancel?te:J,P=i,k&&!p&&(p=setTimeout(()=>{g&&b(g),p=null,J(P())},k)),g=setTimeout(()=>{p&&b(p),p=null,J(i())},$)})}}function Ne(n,B=200,g={}){return st(at(B,g),n)}const G={name:"Kong-Air-Flights-API",tags:[],protocol:"https",path:"/flights",read_timeout:6e4,retries:5,host:"api.kong-air.com",connect_timeout:6e4,ca_certificates:null,client_certificate:null,write_timeout:6e4,port:443},nt={class:"kong-ui-entities-gateway-service-form"},ct={key:0,class:"gateway-service-form-general-info"},dt={class:"gateway-service-form-group-selection-wrapper"},ft={key:0,class:"gateway-service-form-group-fields"},pt={key:0,class:"gateway-service-form-group-fields"},mt={key:0},ut={key:0,class:"gateway-service-form-advanced-fields"},gt={class:"gateway-service-form-margin-bottom"},yt={class:"gateway-service-form-margin-bottom"},_t={class:"gateway-service-form-margin-bottom"},bt={class:"gateway-service-form-margin-bottom"},wt={key:0,class:"gateway-service-form-margin-bottom"},ht={key:1,class:"gateway-service-form-margin-bottom"},vt={key:2,class:"gateway-service-form-margin-bottom"},Vt={key:0,class:"checkbox-aligned-radio"},kt={key:1,class:"checkbox-aligned-radio"},Ct={class:"gateway-service-form-tags"},Nt={class:"form-error-list"},Et=Ce(e.defineComponent({__name:"GatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.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(n,{expose:B,emit:g}){var w;const p=g,s=n,b=e.ref(!0),P=ke.useRouter(),{i18nT:L,i18n:{t:i}}=Z.useI18n(),{getErrorFieldsFromError:$}=_.useErrors(),{axiosInstance:k}=_.useAxios((w=s.config)==null?void 0:w.axiosRequestConfig),J=_.useValidators(),{validateHost:te,validatePath:O,validatePort:pe,validateProtocol:oe}=Z.useUrlValidators(),{objectsAreEqual:x}=_.useHelpers(),ae=e.computed(()=>ee.form[s.config.app].edit),M=e.computed(()=>s.gatewayServiceId?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),_e=e.ref(!1),r=e.computed(()=>!!s.gatewayServiceId),h=e.ref(r.value?"protocol":"url"),Q=Z.usePortFromProtocol(),ne=e.ref(""),me=e.computed(()=>!!ne.value||!!j("name")),t=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:""},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:""}}),E=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:""}),re=s.config.app==="konnect"||_.useGatewayFeatureSupported({gatewayInfo:s.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),U=[{label:i("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:i("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:i("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:i("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...re?[{label:i("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:i("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:i("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],X={url:"url",protocol:"protocol"},be=(o,a)=>{a.value},H=o=>o?parseFloat(o):0,ue=()=>{t.fields.host=E.host,t.fields.path=E.path,t.fields.port=E.port,t.fields.protocol=E.protocol,t.fields.url=E.url,t.fields.retries=E.retries,t.fields.connect_timeout=E.connect_timeout,t.fields.write_timeout=E.write_timeout,t.fields.read_timeout=E.read_timeout,t.fields.client_certificate=E.client_certificate,t.fields.ca_certificates=E.ca_certificates,t.fields.tls_verify_enabled=E.tls_verify_enabled,t.fields.tls_verify_value=E.tls_verify_value},ge=()=>{b.value=!0,W(),t.errorMessages=[],ue()},le=()=>{switch(ue(),t.fields.name=`${G.name}-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,h.value){case"url":t.fields.url=`${G.protocol}://${G.host}${G.path}`;break;case"protocol":t.fields.host=G.host,t.fields.path=G.path,t.fields.protocol=G.protocol,t.fields.port=G.port;break;default:t.fields.url=`${G.protocol}://${G.host}${G.path}`}},ce=Ne(()=>{if(W(),t.fields.url.length)try{const o=new URL(t.fields.url),a=oe(o.protocol,U);if(a)throw new Error(a);t.fields.protocol=o.protocol.slice(0,-1);const C=te(o.hostname);if(C)throw new Error(C);t.fields.host=o.hostname;const R=O(o.pathname);if(R)throw new Error(R);t.fields.path=o.pathname;const N=pe(o.port);if(N)throw new Error(N);const I=Number(o.port);_e.value=!!I,t.fields.port=I||Q.getPortFromProtocol(t.fields.protocol),p("url-valid:success")}catch{p("url-valid:error",i("gateway_services.form.errors.url.invalid")),t.formFieldErrors.url=i("gateway_services.form.errors.url.invalid")}},300),de=Ne(o=>{W(o)},300),we=e.computed(()=>!!t.formFieldErrors.url||!!t.formFieldErrors.host||!!t.formFieldErrors.port),j=o=>{if(t.errorMessages.length)return"";const a=t.formFieldErrors;return a[o]?a[o]:""},K=Ne(o=>{W(o??void 0);const a=te(t.fields.host);a&&(t.formFieldErrors.host=a);const C=O(t.fields.path);C&&(t.formFieldErrors.path=C);const R=pe(t.fields.port);R&&(t.formFieldErrors.port=R),z.value?p("url-valid:success"):p("url-valid:error",t.errorMessages.join(",")||i("gateway_services.form.errors.url.invalid"))},300),W=o=>{if(o)t.formFieldErrors[o]="";else for(let a in t.formFieldErrors)t.formFieldErrors[a]="";t.errorMessages=[]},z=e.computed(()=>{for(let o in t.formFieldErrors)if(t.formFieldErrors[o].length)return!1;return!0}),Y=()=>{t.fields.url&&h.value==="url"?ce():K()},l=()=>`new-service-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,d=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(t.fields.protocol)),v=e.computed(()=>{if(h.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return h.value==="protocol"&&o}),q=e.computed(()=>{if(h.value==="url")return!0;const o=["https","tls"].includes(t.fields.protocol);return h.value==="protocol"&&o}),T=e.computed(()=>{if(h.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return h.value==="protocol"&&o}),S=o=>{W("name"),ne.value=J.utf8Name(o)},c=e.computed(()=>{const o=!r.value||!x(t.fields,E),a=h.value==="url"&&!!t.fields.url&&z.value,C=h.value==="protocol"&&!!t.fields.host&&z.value;return o&&(a||C)}),u=o=>{var a,C,R;t.fields.name=(o==null?void 0:o.name)||"",t.fields.tags=((a=o==null?void 0:o.tags)==null?void 0:a.join(", "))||"",t.fields.protocol=(o==null?void 0:o.protocol)||"http",t.fields.path=(o==null?void 0:o.path)||"",t.fields.read_timeout=o!=null&&o.read_timeout||(o==null?void 0:o.read_timeout)===0?o==null?void 0:o.read_timeout:6e4,t.fields.retries=o!=null&&o.retries||(o==null?void 0:o.retries)===0?o==null?void 0:o.retries:5,t.fields.host=(o==null?void 0:o.host)||"",t.fields.connect_timeout=o!=null&&o.connect_timeout||(o==null?void 0:o.connect_timeout)===0?o==null?void 0:o.connect_timeout:6e4,t.fields.tls_verify_enabled=(o==null?void 0:o.tls_verify)!==""&&(o==null?void 0:o.tls_verify)!==null&&(o==null?void 0:o.tls_verify)!==void 0,t.fields.tls_verify_value=o!=null&&o.tls_verify?o==null?void 0:o.tls_verify:!1,t.fields.ca_certificates=((C=o==null?void 0:o.ca_certificates)==null?void 0:C.join(","))||"",t.fields.client_certificate=((R=o==null?void 0:o.client_certificate)==null?void 0:R.id)||"",t.fields.write_timeout=o!=null&&o.write_timeout||(o==null?void 0:o.write_timeout)===0?o==null?void 0:o.write_timeout:6e4,t.fields.port=o!=null&&o.port||(o==null?void 0:o.port)===0?o==null?void 0:o.port:80,Object.assign(E,t.fields)},m=()=>{P.push(s.config.cancelRoute)},V=e.computed(()=>{var a,C;let o=`${s.config.apiBaseUrl}${ee.form[s.config.app].validate}`;return s.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((a=s.config)==null?void 0:a.controlPlaneId)||""):s.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(C=s.config)!=null&&C.workspace?`/${s.config.workspace}`:"")),o=o.replace(/{id}/gi,s.gatewayServiceId),o}),F=e.computed(()=>{var a,C;let o=`${s.config.apiBaseUrl}${ee.form[s.config.app][M.value]}`;return s.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((a=s.config)==null?void 0:a.controlPlaneId)||""):s.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(C=s.config)!=null&&C.workspace?`/${s.config.workspace}`:"")),o=o.replace(/{id}/gi,s.gatewayServiceId),o}),ie=o=>{let a="";o.url&&(a=new URL(o.url).protocol),(["https","wss","tls"].includes(o.protocol)||["https","wss","tls"].includes(a))&&(o.tls_verify=o.tls_verify_enabled?o.tls_verify_value:null),delete o.tls_verify_enabled,delete o.tls_verify_value},A=e.computed(()=>{var a,C,R,N;const o={name:t.fields.name||null,tags:t.fields.tags?(R=(C=(a=t.fields.tags)==null?void 0:a.split(","))==null?void 0:C.map(I=>String(I||"").trim()))==null?void 0:R.filter(I=>I!==""):null,protocol:t.fields.protocol,path:t.fields.path||null,read_timeout:t.fields.read_timeout,retries:t.fields.retries,host:t.fields.host,connect_timeout:t.fields.connect_timeout,tls_verify_value:t.fields.tls_verify_value,tls_verify_enabled:t.fields.tls_verify_enabled,ca_certificates:t.fields.ca_certificates?(N=t.fields.ca_certificates)==null?void 0:N.split(",").filter(I=>I!==""):null,client_certificate:t.fields.client_certificate?{id:t.fields.client_certificate}:null,write_timeout:t.fields.write_timeout,port:t.fields.port,url:t.fields.url};return t.fields.client_certificate&&["https","wss","tls"].includes(t.fields.protocol)&&(o.client_certificate={id:t.fields.client_certificate}),t.fields.tls_verify_enabled&&["https","wss","tls"].includes(t.fields.protocol)&&(o.tls_verify=t.fields.tls_verify_value),d.value||(o.path=null),M.value==="create"?h.value==="url"?(delete o.protocol,delete o.host,delete o.path,s.config.app==="konnect"&&delete o.port):delete o.url:M.value==="edit"&&delete o.url,o}),se=async()=>{var o,a,C,R;try{t.isReadonly=!0,Y();const N=A.value;ie(N);let I;if(await k.post(V.value,N),M.value==="create"?I=await k.post(F.value,N):M.value==="edit"&&(I=((o=s.config)==null?void 0:o.app)==="konnect"?await k.put(F.value,N):await k.patch(F.value,N)),I){const{data:f}=I;t.fields.name=(f==null?void 0:f.name)||"",t.fields.port=f.port||Q.getPortFromProtocol(f.protocol),t.fields.protocol=(f==null?void 0:f.protocol)||"http",t.fields.host=(f==null?void 0:f.host)||"",t.fields.path=(f==null?void 0:f.path)||"",t.fields.url=(f==null?void 0:f.url)||"",t.fields.retries=f!=null&&f.retries||(f==null?void 0:f.retries)===0?f==null?void 0:f.retries:5,t.fields.connect_timeout=f!=null&&f.connect_timeout||(f==null?void 0:f.connect_timeout)===0?f==null?void 0:f.connect_timeout:6e4,t.fields.write_timeout=f!=null&&f.write_timeout||(f==null?void 0:f.write_timeout)===0?f==null?void 0:f.write_timeout:6e4,t.fields.read_timeout=f!=null&&f.read_timeout||(f==null?void 0:f.read_timeout)===0?f==null?void 0:f.read_timeout:6e4,t.fields.client_certificate=((a=f==null?void 0:f.client_certificate)==null?void 0:a.id)||"",t.fields.ca_certificates=(C=f==null?void 0:f.ca_certificates)!=null&&C.length?f==null?void 0:f.ca_certificates.join(","):"",t.fields.tls_verify_enabled=(f==null?void 0:f.tls_verify)!==""&&(f==null?void 0:f.tls_verify)!==null&&(f==null?void 0:f.tls_verify)!==void 0,t.fields.tls_verify_value=t.fields.tls_verify_enabled&&(f==null?void 0:f.tls_verify),t.fields.tags=(R=f==null?void 0:f.tags)!=null&&R.length?f.tags.join(", "):"",Object.assign(E,t.fields),p("update",I==null?void 0:I.data)}return I}catch(N){const{fields:I,messages:f}=$(N);t.errorMessages=f,I.length&&I.forEach(fe=>{const ye=fe.field;ye==="client_certificate.id"?t.formFieldErrors.client_certificate=fe.message:ye.startsWith("ca_certificates")?t.formFieldErrors.ca_certificates=fe.message:Object.keys(t.formFieldErrors).includes(ye)&&(t.formFieldErrors={...t.formFieldErrors,[ye]:fe.message})}),p("error",N)}finally{t.isReadonly=!1}};return e.watch(()=>s.gatewayServiceId,()=>{Object.assign(t.fields,E)}),e.watch(t.fields,o=>{t.fields.port=Q.getPortFromProtocol(o.protocol,String(o.port)),p("model-updated",A.value)}),e.onMounted(()=>{p("model-updated",A.value),r.value||(t.fields.name=l())}),B({validateUrl:Y,getPayload:A,saveFormData:se,canSubmit:c,initForm:u}),(o,a)=>{const C=e.resolveComponent("KRadio"),R=e.resolveComponent("KButton"),N=e.resolveComponent("KInput"),I=e.resolveComponent("KSelect"),f=e.resolveComponent("KCheckbox"),fe=e.resolveComponent("KCollapse"),ye=e.resolveComponent("KAlert");return e.openBlock(),e.createElementBlock("div",nt,[e.createVNode(e.unref(_.EntityBaseForm),{"can-submit":c.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(_.SupportedEntityType).GatewayService,"fetch-url":ae.value,"form-fields":A.value,"is-readonly":t.isReadonly,onCancel:m,"onFetch:error":a[30]||(a[30]=y=>o.$emit("error",y)),"onFetch:success":u,onLoading:a[31]||(a[31]=y=>o.$emit("loading",y)),onSubmit:se},{"form-actions":e.withCtx(()=>[e.renderSlot(o.$slots,"form-actions",{canSubmit:c.value,cancel:m,submit:se},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ct,[e.createElementVNode("div",dt,[e.createVNode(C,{modelValue:h.value,"onUpdate:modelValue":a[0]||(a[0]=y=>h.value=y),card:"","card-orientation":"horizontal","data-testid":"gateway-service-url-radio",description:e.unref(i)("gateway_services.form.sections.keys.url.description"),label:e.unref(i)("gateway_services.form.sections.keys.url.label"),"selected-value":X.url,onChange:ge},null,8,["modelValue","description","label","selected-value"]),e.createVNode(C,{modelValue:h.value,"onUpdate:modelValue":a[1]||(a[1]=y=>h.value=y),card:"","card-orientation":"horizontal","checked-group":"protocol","data-testid":"gateway-service-protocol-radio",description:e.unref(i)("gateway_services.form.sections.keys.protocol.description"),label:e.unref(i)("gateway_services.form.sections.keys.protocol.label"),"selected-value":X.protocol,onChange:ge},null,8,["modelValue","description","label","selected-value"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[h.value==="url"?(e.openBlock(),e.createElementBlock("div",ft,[e.createVNode(N,{modelValue:t.fields.url,"onUpdate:modelValue":a[2]||(a[2]=y=>t.fields.url=y),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",error:we.value,"error-message":j("url"),label:e.unref(i)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(i)("gateway_services.form.fields.upstream_url.placeholder"),required:"",onInput:e.unref(ce)},e.createSlots({_:2},[n.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(R,{appearance:"tertiary","data-testid":"try-sample-api",size:"small",onClick:le},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder","onInput"])])):e.createCommentVNode("",!0)]),_:1})])),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[h.value==="protocol"||r.value?(e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(I,{modelValue:t.fields.protocol,"onUpdate:modelValue":a[3]||(a[3]=y=>t.fields.protocol=y),"data-testid":"gateway-service-protocol-select",items:U,label:e.unref(i)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.isReadonly,required:"",width:"100%",onSelected:a[4]||(a[4]=y=>be(t.fields.protocol,y))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(N,{modelValue:t.fields.host,"onUpdate:modelValue":a[5]||(a[5]=y=>t.fields.host=y),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",error:!!t.formFieldErrors.host,"error-message":j("host"),label:e.unref(i)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(i)("gateway_services.form.fields.host.placeholder"),required:"",onInput:a[6]||(a[6]=y=>e.unref(K)("host"))},e.createSlots({_:2},[n.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(R,{appearance:"tertiary",size:"small",onClick:le},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"]),d.value?(e.openBlock(),e.createElementBlock("div",mt,[e.createVNode(N,{modelValue:t.fields.path,"onUpdate:modelValue":a[7]||(a[7]=y=>t.fields.path=y),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",error:!!t.formFieldErrors.path,"error-message":j("path"),label:e.unref(i)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(i)("gateway_services.form.fields.path.placeholder"),onInput:a[8]||(a[8]=y=>e.unref(K)("path"))},null,8,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(N,{modelValue:t.fields.port,"onUpdate:modelValue":[a[9]||(a[9]=y=>t.fields.port=y),a[11]||(a[11]=()=>{t.fields.port=H(t.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",error:!!t.formFieldErrors.port,"error-message":j("port"),label:e.unref(i)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number",onInput:a[10]||(a[10]=y=>e.unref(K)("port"))},null,8,["modelValue","error","error-message","label","label-attributes"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(fe,{modelValue:b.value,"onUpdate:modelValue":a[27]||(a[27]=y=>b.value=y),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ut,[e.createElementVNode("div",gt,[e.createVNode(N,{modelValue:t.fields.retries,"onUpdate:modelValue":[a[12]||(a[12]=y=>t.fields.retries=y),a[13]||(a[13]=()=>{t.fields.retries=H(t.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(i)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",yt,[e.createVNode(N,{modelValue:t.fields.connect_timeout,"onUpdate:modelValue":[a[14]||(a[14]=y=>t.fields.connect_timeout=y),a[15]||(a[15]=()=>{t.fields.connect_timeout=H(t.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(i)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",_t,[e.createVNode(N,{modelValue:t.fields.write_timeout,"onUpdate:modelValue":[a[16]||(a[16]=y=>t.fields.write_timeout=y),a[17]||(a[17]=()=>{t.fields.write_timeout=H(t.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(i)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",bt,[e.createVNode(N,{modelValue:t.fields.read_timeout,"onUpdate:modelValue":[a[18]||(a[18]=y=>t.fields.read_timeout=y),a[19]||(a[19]=()=>{t.fields.read_timeout=H(t.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(i)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),v.value?(e.openBlock(),e.createElementBlock("div",wt,[e.createVNode(N,{modelValue:t.fields.client_certificate,"onUpdate:modelValue":a[20]||(a[20]=y=>t.fields.client_certificate=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",error:!!t.formFieldErrors.client_certificate,label:e.unref(i)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(i)("gateway_services.form.fields.client_certificate.placeholder"),readonly:t.isReadonly,type:"text",onInput:a[21]||(a[21]=y=>e.unref(de)("client_certificate"))},null,8,["modelValue","error","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),q.value?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(N,{modelValue:t.fields.ca_certificates,"onUpdate:modelValue":a[22]||(a[22]=y=>t.fields.ca_certificates=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",error:!!t.formFieldErrors.ca_certificates,label:e.unref(i)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:t.isReadonly,type:"text",onInput:a[23]||(a[23]=y=>e.unref(de)("ca_certificates"))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(L),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","error","label","placeholder","readonly"])])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("div",vt,[e.createVNode(f,{modelValue:t.fields.tls_verify_enabled,"onUpdate:modelValue":a[24]||(a[24]=y=>t.fields.tls_verify_enabled=y),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(L),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Vt,[e.createVNode(C,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":a[25]||(a[25]=y=>t.fields.tls_verify_value=y),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",kt,[e.createVNode(C,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":a[26]||(a[26]=y=>t.fields.tls_verify_value=y),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(i)("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(_.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.fields.name,"onUpdate:modelValue":a[28]||(a[28]=y=>t.fields.name=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:me.value,"error-message":ne.value,label:e.unref(i)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(i)("gateway_services.form.fields.name.placeholder"),readonly:t.isReadonly,type:"text",onInput:S},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(fe,{"data-testid":"tags-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.fields.tags.collapse")},{default:e.withCtx(()=>[e.createElementVNode("div",Ct,[e.createVNode(N,{modelValue:t.fields.tags,"onUpdate:modelValue":a[29]||(a[29]=y=>t.fields.tags=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(i)("gateway_services.form.fields.tags.help"),label:e.unref(i)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(i)("gateway_services.form.fields.tags.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])])]),_:1},8,["trigger-label"])]),_:1},8,["description","hide-info-header","title"]),t.errorMessages.length?(e.openBlock(),e.createBlock(ye,{key:0,appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("ul",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.errorMessages,y=>(e.openBlock(),e.createElementBlock("li",{key:y},e.toDisplayString(y),1))),128))])]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["can-submit","config","edit-id","entity-type","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-aac697aa"]]),{validateHost:xt,validatePort:St,validateProtocol:It,validatePath:Pt}=Z.useUrlValidators(),Bt=()=>({validateHost:xt,validatePort:St,validateProtocol:It,validatePath:Pt});D.GatewayServiceConfigCard=it,D.GatewayServiceForm=Et,D.GatewayServiceList=De,D.LegacyGatewayServiceForm=rt,D.useUrlValidator=Bt,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{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-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{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-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{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-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .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(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{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-dd0edd92]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-dd0edd92]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-dd0edd92]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-dd0edd92] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-dd0edd92]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-b073d014]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-b073d014] .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-b073d014] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-b073d014] .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-b073d014] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-b073d014]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-b073d014] .k-button:last-of-type,.form-actions[data-v-b073d014] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-254b0222]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-254b0222]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-254b0222]{display:none}.kong-ui-entity-base-table[data-v-254b0222] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.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-d1bb74d1]{width:100%}.kong-ui-entity-filter-clear[data-v-d1bb74d1]{cursor:pointer}.kong-ui-entity-filter[data-v-d1bb74d1]{display:flex;position:relative}.kong-ui-entity-filter[data-v-d1bb74d1] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-d1bb74d1] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-d1bb74d1]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-d1bb74d1]{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-d1bb74d1]{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-d1bb74d1]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-d1bb74d1]{color:#232633}.menu-item-expand-icon[data-v-d1bb74d1]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-d1bb74d1]{transform:rotate(180deg)}.menu-item-indicator[data-v-d1bb74d1]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-d1bb74d1]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-d1bb74d1] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-d1bb74d1] .k-input{width:100%}.menu-item-body[data-v-d1bb74d1] .k-select-input .input{font-size:12px}.menu-item-body[data-v-d1bb74d1] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-d1bb74d1]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-d1bb74d1]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-d1bb74d1]{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}.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-b6376b66]{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-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{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-b6376b66]{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-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{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-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{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-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{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-b6376b66]{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-b6376b66] .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-b6376b66] .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-b6376b66] .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-b6376b66]{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-b6376b66]{width:640px}}.button-row[data-v-46700fcd]{align-items:center;display:flex;gap:12px}.kong-ui-entities-gateway-services-list[data-v-46700fcd]{width:100%}.kong-ui-entities-gateway-services-list .kong-ui-entity-filter-input[data-v-46700fcd]{margin-right:12px}.kong-ui-entities-gateway-service-form[data-v-59d8e66b]{width:100%}.kong-ui-entities-gateway-service-form[data-v-59d8e66b] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-59d8e66b]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-59d8e66b]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-59d8e66b],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-59d8e66b] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-group-fields[data-v-59d8e66b]{margin-left:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-bottom[data-v-59d8e66b]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-59d8e66b]{margin:4px;padding-left:24px}.kong-ui-entities-gateway-service-form[data-v-aac697aa]{width:100%}.kong-ui-entities-gateway-service-form[data-v-aac697aa] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form[data-v-aac697aa] .k-radio{align-items:normal}.kong-ui-entities-gateway-service-form[data-v-aac697aa] .form-section-wrapper{padding-bottom:48px}.kong-ui-entities-gateway-service-form .form-error-list[data-v-aac697aa]{list-style-type:disc;margin:0;padding-left:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-aac697aa]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-advanced-fields[data-v-aac697aa]{display:flex;flex-direction:column;gap:16px;margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-tags[data-v-aac697aa]{margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-aac697aa]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-aac697aa],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-aac697aa] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-general-info[data-v-aac697aa]{display:flex;flex-direction:column;gap:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-aac697aa]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-aac697aa] .radio-label-wrapper{height:auto}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-aac697aa]{margin:4px;padding-left:24px}.slide-fade-enter-active[data-v-aac697aa]{transition:all .5s ease}.slide-fade-enter-from[data-v-aac697aa]{opacity:0;transform:translateY(-5px)}.slide-fade-leave-to[data-v-aac697aa]{opacity:0;transform:translateY(5px)}
|
|
1
|
+
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{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-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{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-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{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-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .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(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{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-dd0edd92]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-dd0edd92]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-dd0edd92]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-dd0edd92] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-dd0edd92]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-724cbb48]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-724cbb48] .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-724cbb48] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-724cbb48] .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-724cbb48] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-724cbb48]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-724cbb48] .k-button:last-of-type,.form-actions[data-v-724cbb48] .k-button:nth-last-of-type(2){margin-left:16px}.sticky-form-error[data-v-724cbb48]{bottom:0;max-height:180px;overflow-y:auto;position:sticky}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-254b0222]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-254b0222]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-254b0222]{display:none}.kong-ui-entity-base-table[data-v-254b0222] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.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-d1bb74d1]{width:100%}.kong-ui-entity-filter-clear[data-v-d1bb74d1]{cursor:pointer}.kong-ui-entity-filter[data-v-d1bb74d1]{display:flex;position:relative}.kong-ui-entity-filter[data-v-d1bb74d1] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-d1bb74d1] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-d1bb74d1]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-d1bb74d1]{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-d1bb74d1]{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-d1bb74d1]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-d1bb74d1]{color:#232633}.menu-item-expand-icon[data-v-d1bb74d1]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-d1bb74d1]{transform:rotate(180deg)}.menu-item-indicator[data-v-d1bb74d1]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-d1bb74d1]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-d1bb74d1] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-d1bb74d1] .k-input{width:100%}.menu-item-body[data-v-d1bb74d1] .k-select-input .input{font-size:12px}.menu-item-body[data-v-d1bb74d1] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-d1bb74d1]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-d1bb74d1]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-d1bb74d1]{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}.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-b6376b66]{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-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{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-b6376b66]{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-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{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-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{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-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{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-b6376b66]{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-b6376b66] .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-b6376b66] .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-b6376b66] .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-b6376b66]{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-b6376b66]{width:640px}}.button-row[data-v-210f19c5]{align-items:center;display:flex;gap:12px}.kong-ui-entities-gateway-services-list[data-v-210f19c5]{width:100%}.kong-ui-entities-gateway-services-list .kong-ui-entity-filter-input[data-v-210f19c5]{margin-right:12px}.kong-ui-entities-gateway-service-form[data-v-59d8e66b]{width:100%}.kong-ui-entities-gateway-service-form[data-v-59d8e66b] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-59d8e66b]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-59d8e66b]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-59d8e66b],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-59d8e66b] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-group-fields[data-v-59d8e66b]{margin-left:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-bottom[data-v-59d8e66b]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-59d8e66b]{margin:4px;padding-left:24px}.kong-ui-entities-gateway-service-form[data-v-aac697aa]{width:100%}.kong-ui-entities-gateway-service-form[data-v-aac697aa] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form[data-v-aac697aa] .k-radio{align-items:normal}.kong-ui-entities-gateway-service-form[data-v-aac697aa] .form-section-wrapper{padding-bottom:48px}.kong-ui-entities-gateway-service-form .form-error-list[data-v-aac697aa]{list-style-type:disc;margin:0;padding-left:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-aac697aa]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-advanced-fields[data-v-aac697aa]{display:flex;flex-direction:column;gap:16px;margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-tags[data-v-aac697aa]{margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-aac697aa]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-aac697aa],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-aac697aa] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-general-info[data-v-aac697aa]{display:flex;flex-direction:column;gap:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-aac697aa]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-aac697aa] .radio-label-wrapper{height:auto}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-aac697aa]{margin:4px;padding-left:24px}.slide-fade-enter-active[data-v-aac697aa]{transition:all .5s ease}.slide-fade-enter-from[data-v-aac697aa]{opacity:0;transform:translateY(-5px)}.slide-fade-leave-to[data-v-aac697aa]{opacity:0;transform:translateY(5px)}
|
|
@@ -47,6 +47,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
47
47
|
type: BooleanConstructor;
|
|
48
48
|
default: boolean;
|
|
49
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* Enables the new empty state design, this prop can be removed when
|
|
52
|
+
* the khcp-14756-empty-states-m2 FF is removed.
|
|
53
|
+
*/
|
|
54
|
+
enableV2EmptyStates: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
50
58
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
51
59
|
error: (error: AxiosError<unknown, any>) => any;
|
|
52
60
|
"click:learn-more": () => any;
|
|
@@ -99,6 +107,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
99
107
|
type: BooleanConstructor;
|
|
100
108
|
default: boolean;
|
|
101
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* Enables the new empty state design, this prop can be removed when
|
|
112
|
+
* the khcp-14756-empty-states-m2 FF is removed.
|
|
113
|
+
*/
|
|
114
|
+
enableV2EmptyStates: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
default: boolean;
|
|
117
|
+
};
|
|
102
118
|
}>> & Readonly<{
|
|
103
119
|
onError?: ((error: AxiosError<unknown, any>) => any) | undefined;
|
|
104
120
|
"onClick:learn-more"?: (() => any) | undefined;
|
|
@@ -114,6 +130,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
114
130
|
canRetrieve: (row: EntityRow) => boolean | Promise<boolean>;
|
|
115
131
|
useActionOutside: boolean;
|
|
116
132
|
isServerless: boolean;
|
|
133
|
+
enableV2EmptyStates: boolean;
|
|
117
134
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
118
135
|
export default _default;
|
|
119
136
|
//# sourceMappingURL=GatewayServiceList.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GatewayServiceList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/GatewayServiceList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GatewayServiceList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/GatewayServiceList.vue"],"names":[],"mappings":"AA8qBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAMnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASvC,OAAO,KAAK,EACV,mCAAmC,EACnC,+BAA+B,EAC/B,SAAS,EACT,gBAAgB,EACjB,MAAM,UAAU,CAAA;AAiBjB,OAAO,gDAAgD,CAAA;;IAwrCrD,oHAAoH;;cAElG,QAAQ,CAAC,+BAA+B,GAAG,mCAAmC,CAAC;;4BAE3E,+BAA+B,GAAG,mCAAmC,KAAG,OAAO;;;;;;IAYrG,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;IAKjH,8CAA8C;;;;;IAK9C;;;OAGG;;;;;;;;;;;;;IArDH,oHAAoH;;cAElG,QAAQ,CAAC,+BAA+B,GAAG,mCAAmC,CAAC;;4BAE3E,+BAA+B,GAAG,mCAAmC,KAAG,OAAO;;;;;;IAYrG,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;IAKjH,8CAA8C;;;;;IAK9C;;;OAGG;;;;;;;;;;;;;;qBAnCgC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAM1B,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;uBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;;;;AAlD7E,wBAyEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-gateway-services",
|
|
3
|
-
"version": "3.11.25-pr.
|
|
3
|
+
"version": "3.11.25-pr.2145.96ea30cf8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-gateway-services.umd.js",
|
|
6
6
|
"module": "./dist/entities-gateway-services.es.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"axios": "^1.7.7",
|
|
27
27
|
"vue": ">= 3.3.13 < 4",
|
|
28
28
|
"vue-router": "^4.4.5",
|
|
29
|
-
"@kong-ui-public/
|
|
30
|
-
"@kong-ui-public/
|
|
29
|
+
"@kong-ui-public/entities-shared": "^3.24.1-pr.2145.96ea30cf8.0",
|
|
30
|
+
"@kong-ui-public/i18n": "^2.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@kong/design-tokens": "1.17.4",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"axios": "^1.7.7",
|
|
37
37
|
"vue": "^3.5.13",
|
|
38
38
|
"vue-router": "^4.4.5",
|
|
39
|
-
"@kong-ui-public/entities-shared": "^3.24.1-pr.
|
|
39
|
+
"@kong-ui-public/entities-shared": "^3.24.1-pr.2145.96ea30cf8.0",
|
|
40
40
|
"@kong-ui-public/i18n": "^2.3.0"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|