@kong-ui-public/entities-redis-configurations 1.1.3 → 1.1.5
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,10 +1,10 @@
|
|
|
1
|
-
import { computed as K, reactive as Ut, ref as L, watch as ke, defineComponent as G, resolveComponent as U,
|
|
1
|
+
import { computed as K, reactive as Ut, ref as L, watch as ke, defineComponent as G, resolveComponent as U, createElementBlock as q, openBlock as R, createVNode as p, withCtx as S, renderSlot as bn, unref as i, mergeModels as Nt, useModel as jt, createElementVNode as z, createTextVNode as Z, toDisplayString as F, Fragment as qe, renderList as pt, createBlock as H, getCurrentInstance as yn, onMounted as vn, onUnmounted as hn, isReadonly as Tn, toRefs as wn, onBeforeMount as Sn, createCommentVNode as X, isRef as En, createSlots as Bt, withModifiers as Cn, Teleport as In } from "vue";
|
|
2
2
|
import "@kong-ui-public/entities-shared/dist/style.css";
|
|
3
3
|
import "@kong-ui-public/entities-vaults/dist/style.css";
|
|
4
|
-
import { useAxios as mt, useErrors as kn, EntityBaseFormType as Xe, EntityBaseForm as Rn, SupportedEntityType as Ft, EntityFormSection as ue, EntityFilter as Ht, useDeleteUrlBuilder as On, useFetcher as xn, FetcherStatus as Pn, EntityBaseTable as An, PermissionsWrapper as Me, TableTags as Vn, EntityEmptyState as $n, EntityDeleteModal as Ln, EntityTypes as Mn,
|
|
4
|
+
import { useAxios as mt, useErrors as kn, EntityBaseFormType as Xe, EntityBaseForm as Rn, SupportedEntityType as Ft, EntityFormSection as ue, EntityFilter as Ht, useDeleteUrlBuilder as On, useFetcher as xn, FetcherStatus as Pn, EntityBaseTable as An, PermissionsWrapper as Me, TableTags as Vn, EntityEmptyState as $n, EntityDeleteModal as Ln, EntityTypes as Mn, ConfigurationSchemaSection as P, ConfigurationSchemaType as A, EntityBaseConfigCard as Dn } from "@kong-ui-public/entities-shared";
|
|
5
5
|
import { VaultSecretPickerProvider as De, VaultSecretPicker as Un } from "@kong-ui-public/entities-vaults";
|
|
6
6
|
import { useRouter as Kt } from "vue-router";
|
|
7
|
-
import { TrashIcon as Nn, AddCircleIcon as zt, AddIcon as jn,
|
|
7
|
+
import { TrashIcon as Nn, AddCircleIcon as zt, AddIcon as jn, RefreshIcon as Bn, ClipboardIcon as Fn, DeployIcon as Hn } from "@kong/icons";
|
|
8
8
|
import { createI18n as Kn, i18nTComponent as zn } from "@kong-ui-public/i18n";
|
|
9
9
|
import { PluginIcon as qt } from "@kong-ui-public/entities-plugins-icon";
|
|
10
10
|
var h = /* @__PURE__ */ ((e) => (e[e.HOST_PORT_CE = 0] = "HOST_PORT_CE", e[e.HOST_PORT_EE = 1] = "HOST_PORT_EE", e[e.SENTINEL = 2] = "SENTINEL", e[e.CLUSTER = 3] = "CLUSTER", e))(h || {}), ie = /* @__PURE__ */ ((e) => (e.REDIS_CE = "redis-ce", e.REDIS_EE = "redis-ee", e))(ie || {}), Wt = typeof global == "object" && global && global.Object === Object && global, qn = typeof self == "object" && self && self.Object === Object && self, re = Wt || qn || Function("return this")(), Se = re.Symbol, Gt = Object.prototype, Wn = Gt.hasOwnProperty, Gn = Gt.toString, Ce = Se ? Se.toStringTag : void 0;
|
|
@@ -540,7 +540,7 @@ const Lt = {
|
|
|
540
540
|
randomUUID: Uo
|
|
541
541
|
};
|
|
542
542
|
function No(e, t, n) {
|
|
543
|
-
if (Lt.randomUUID && !
|
|
543
|
+
if (Lt.randomUUID && !e)
|
|
544
544
|
return Lt.randomUUID();
|
|
545
545
|
e = e || {};
|
|
546
546
|
var o = e.random || (e.rng || Do)();
|
|
@@ -2729,7 +2729,7 @@ const $e = (e) => {
|
|
|
2729
2729
|
}, null, 8, ["modelValue", "config"])
|
|
2730
2730
|
]),
|
|
2731
2731
|
"toolbar-button": S(() => [
|
|
2732
|
-
(R(), H(
|
|
2732
|
+
(R(), H(In, {
|
|
2733
2733
|
disabled: !e.useActionOutside,
|
|
2734
2734
|
to: "#kong-ui-app-page-header-action-button"
|
|
2735
2735
|
}, [
|
|
@@ -2765,7 +2765,7 @@ const $e = (e) => {
|
|
|
2765
2765
|
p(wa, {
|
|
2766
2766
|
config: e.config,
|
|
2767
2767
|
"partial-id": x.id,
|
|
2768
|
-
onClick:
|
|
2768
|
+
onClick: Cn((Qe) => ve(x.id), ["stop"])
|
|
2769
2769
|
}, null, 8, ["config", "partial-id", "onClick"])
|
|
2770
2770
|
]),
|
|
2771
2771
|
actions: S(({ row: x }) => [
|
|
@@ -2852,7 +2852,7 @@ const $e = (e) => {
|
|
|
2852
2852
|
}, {
|
|
2853
2853
|
image: S(() => [
|
|
2854
2854
|
z("div", $a, [
|
|
2855
|
-
p(i(
|
|
2855
|
+
p(i(Hn), {
|
|
2856
2856
|
color: i(ya),
|
|
2857
2857
|
size: i(va)
|
|
2858
2858
|
}, null, 8, ["color", "size"])
|
|
@@ -2862,7 +2862,7 @@ const $e = (e) => {
|
|
|
2862
2862
|
p(i(Fn))
|
|
2863
2863
|
]),
|
|
2864
2864
|
"feature-1-icon": S(() => [
|
|
2865
|
-
p(i(
|
|
2865
|
+
p(i(Bn))
|
|
2866
2866
|
]),
|
|
2867
2867
|
_: 1
|
|
2868
2868
|
}, 8, ["action-button-text", "can-create", "description", "features", "title"])
|
|
@@ -2966,151 +2966,151 @@ const $e = (e) => {
|
|
|
2966
2966
|
}, w = {
|
|
2967
2967
|
id: {},
|
|
2968
2968
|
name: {
|
|
2969
|
-
type:
|
|
2970
|
-
section:
|
|
2969
|
+
type: A.Text,
|
|
2970
|
+
section: P.Basic,
|
|
2971
2971
|
label: r("form.fields.name.label")
|
|
2972
2972
|
},
|
|
2973
2973
|
tags: {
|
|
2974
|
-
type:
|
|
2975
|
-
section:
|
|
2974
|
+
type: A.BadgeTag,
|
|
2975
|
+
section: P.Basic,
|
|
2976
2976
|
label: r("form.fields.tags.label"),
|
|
2977
2977
|
tooltip: r("form.fields.tags.tooltip")
|
|
2978
2978
|
},
|
|
2979
2979
|
updated_at: {},
|
|
2980
2980
|
created_at: {},
|
|
2981
2981
|
type: {
|
|
2982
|
-
type:
|
|
2983
|
-
section:
|
|
2982
|
+
type: A.Text,
|
|
2983
|
+
section: P.Basic,
|
|
2984
2984
|
label: r("form.fields.type.label")
|
|
2985
2985
|
},
|
|
2986
2986
|
cluster_max_redirections: {
|
|
2987
|
-
type:
|
|
2988
|
-
section:
|
|
2987
|
+
type: A.Text,
|
|
2988
|
+
section: P.Basic,
|
|
2989
2989
|
tooltip: r("form.fields.cluster_max_redirections.tooltip"),
|
|
2990
2990
|
label: r("form.fields.cluster_max_redirections.label")
|
|
2991
2991
|
},
|
|
2992
2992
|
cluster_nodes: {
|
|
2993
|
-
type:
|
|
2994
|
-
section:
|
|
2993
|
+
type: A.JsonArray,
|
|
2994
|
+
section: P.Basic,
|
|
2995
2995
|
label: r("form.fields.cluster_nodes.title"),
|
|
2996
2996
|
tooltip: r("form.fields.cluster_nodes.tooltip")
|
|
2997
2997
|
},
|
|
2998
2998
|
connect_timeout: {
|
|
2999
|
-
type:
|
|
3000
|
-
section:
|
|
2999
|
+
type: A.Text,
|
|
3000
|
+
section: P.Basic,
|
|
3001
3001
|
label: r("form.fields.connect_timeout.label"),
|
|
3002
3002
|
tooltip: r("form.fields.connect_timeout.tooltip")
|
|
3003
3003
|
},
|
|
3004
3004
|
connection_is_proxied: {
|
|
3005
|
-
type:
|
|
3006
|
-
section:
|
|
3005
|
+
type: A.Text,
|
|
3006
|
+
section: P.Basic,
|
|
3007
3007
|
label: r("form.fields.connection_is_proxied.label"),
|
|
3008
3008
|
tooltip: r("form.fields.connection_is_proxied.tooltip")
|
|
3009
3009
|
},
|
|
3010
3010
|
database: {
|
|
3011
|
-
type:
|
|
3012
|
-
section:
|
|
3011
|
+
type: A.Text,
|
|
3012
|
+
section: P.Basic,
|
|
3013
3013
|
label: r("form.fields.database.label"),
|
|
3014
3014
|
tooltip: r("form.fields.database.tooltip")
|
|
3015
3015
|
},
|
|
3016
3016
|
host: {
|
|
3017
|
-
type:
|
|
3018
|
-
section:
|
|
3017
|
+
type: A.Text,
|
|
3018
|
+
section: P.Basic,
|
|
3019
3019
|
label: r("form.fields.host.label"),
|
|
3020
3020
|
tooltip: r("form.fields.host.tooltip")
|
|
3021
3021
|
},
|
|
3022
3022
|
keepalive_backlog: {
|
|
3023
|
-
type:
|
|
3024
|
-
section:
|
|
3023
|
+
type: A.Text,
|
|
3024
|
+
section: P.Basic,
|
|
3025
3025
|
label: r("form.fields.keepalive_backlog.label"),
|
|
3026
3026
|
tooltip: r("form.fields.keepalive_backlog.tooltip")
|
|
3027
3027
|
},
|
|
3028
3028
|
keepalive_pool_size: {
|
|
3029
|
-
type:
|
|
3030
|
-
section:
|
|
3029
|
+
type: A.Text,
|
|
3030
|
+
section: P.Basic,
|
|
3031
3031
|
label: r("form.fields.keepalive_pool_size.label"),
|
|
3032
3032
|
tooltip: r("form.fields.keepalive_pool_size.tooltip")
|
|
3033
3033
|
},
|
|
3034
3034
|
password: {
|
|
3035
|
-
type:
|
|
3036
|
-
section:
|
|
3035
|
+
type: A.Redacted,
|
|
3036
|
+
section: P.Basic,
|
|
3037
3037
|
label: r("form.fields.password.label"),
|
|
3038
3038
|
tooltip: r("form.fields.password.tooltip")
|
|
3039
3039
|
},
|
|
3040
3040
|
port: {
|
|
3041
|
-
type:
|
|
3042
|
-
section:
|
|
3041
|
+
type: A.Text,
|
|
3042
|
+
section: P.Basic,
|
|
3043
3043
|
label: r("form.fields.port.label"),
|
|
3044
3044
|
tooltip: r("form.fields.port.tooltip")
|
|
3045
3045
|
},
|
|
3046
3046
|
read_timeout: {
|
|
3047
|
-
type:
|
|
3048
|
-
section:
|
|
3047
|
+
type: A.Text,
|
|
3048
|
+
section: P.Basic,
|
|
3049
3049
|
label: r("form.fields.read_timeout.label"),
|
|
3050
3050
|
tooltip: r("form.fields.read_timeout.tooltip")
|
|
3051
3051
|
},
|
|
3052
3052
|
send_timeout: {
|
|
3053
|
-
type:
|
|
3054
|
-
section:
|
|
3053
|
+
type: A.Text,
|
|
3054
|
+
section: P.Basic,
|
|
3055
3055
|
label: r("form.fields.send_timeout.label"),
|
|
3056
3056
|
tooltip: r("form.fields.send_timeout.tooltip")
|
|
3057
3057
|
},
|
|
3058
3058
|
sentinel_master: {
|
|
3059
|
-
type:
|
|
3060
|
-
section:
|
|
3059
|
+
type: A.Text,
|
|
3060
|
+
section: P.Basic,
|
|
3061
3061
|
label: r("form.fields.sentinel_master.label"),
|
|
3062
3062
|
tooltip: r("form.fields.sentinel_master.tooltip")
|
|
3063
3063
|
},
|
|
3064
3064
|
sentinel_nodes: {
|
|
3065
|
-
type:
|
|
3066
|
-
section:
|
|
3065
|
+
type: A.JsonArray,
|
|
3066
|
+
section: P.Basic,
|
|
3067
3067
|
tooltip: r("form.fields.sentinel_nodes.tooltip")
|
|
3068
3068
|
},
|
|
3069
3069
|
sentinel_password: {
|
|
3070
|
-
type:
|
|
3071
|
-
section:
|
|
3070
|
+
type: A.Redacted,
|
|
3071
|
+
section: P.Basic,
|
|
3072
3072
|
label: r("form.fields.sentinel_password.label"),
|
|
3073
3073
|
tooltip: r("form.fields.sentinel_password.tooltip")
|
|
3074
3074
|
},
|
|
3075
3075
|
sentinel_role: {
|
|
3076
|
-
type:
|
|
3077
|
-
section:
|
|
3076
|
+
type: A.Text,
|
|
3077
|
+
section: P.Basic,
|
|
3078
3078
|
label: r("form.fields.sentinel_role.label"),
|
|
3079
3079
|
tooltip: r("form.fields.sentinel_role.tooltip")
|
|
3080
3080
|
},
|
|
3081
3081
|
sentinel_username: {
|
|
3082
|
-
type:
|
|
3083
|
-
section:
|
|
3082
|
+
type: A.Text,
|
|
3083
|
+
section: P.Basic,
|
|
3084
3084
|
label: r("form.fields.sentinel_username.label"),
|
|
3085
3085
|
tooltip: r("form.fields.sentinel_username.tooltip")
|
|
3086
3086
|
},
|
|
3087
3087
|
server_name: {
|
|
3088
|
-
type:
|
|
3089
|
-
section:
|
|
3088
|
+
type: A.Text,
|
|
3089
|
+
section: P.Basic,
|
|
3090
3090
|
label: r("form.fields.server_name.label"),
|
|
3091
3091
|
tooltip: r("form.fields.server_name.tooltip")
|
|
3092
3092
|
},
|
|
3093
3093
|
ssl_verify: {
|
|
3094
|
-
type:
|
|
3095
|
-
section:
|
|
3094
|
+
type: A.Text,
|
|
3095
|
+
section: P.Basic,
|
|
3096
3096
|
label: r("form.fields.ssl_verify.label"),
|
|
3097
3097
|
tooltip: r("form.fields.ssl_verify.tooltip")
|
|
3098
3098
|
},
|
|
3099
3099
|
ssl: {
|
|
3100
|
-
type:
|
|
3101
|
-
section:
|
|
3100
|
+
type: A.Text,
|
|
3101
|
+
section: P.Basic,
|
|
3102
3102
|
label: r("form.fields.ssl.label"),
|
|
3103
3103
|
tooltip: r("form.fields.ssl.tooltip")
|
|
3104
3104
|
},
|
|
3105
3105
|
timeout: {
|
|
3106
|
-
type:
|
|
3107
|
-
section:
|
|
3106
|
+
type: A.Text,
|
|
3107
|
+
section: P.Basic,
|
|
3108
3108
|
label: r("form.fields.timeout.label"),
|
|
3109
3109
|
tooltip: r("form.fields.timeout.tooltip")
|
|
3110
3110
|
},
|
|
3111
3111
|
username: {
|
|
3112
|
-
type:
|
|
3113
|
-
section:
|
|
3112
|
+
type: A.Text,
|
|
3113
|
+
section: P.Basic,
|
|
3114
3114
|
label: r("form.fields.username.label"),
|
|
3115
3115
|
tooltip: r("form.fields.username.tooltip")
|
|
3116
3116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(x,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared/dist/style.css"),require("@kong-ui-public/entities-vaults/dist/style.css"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/entities-vaults"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-plugins-icon")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared/dist/style.css","@kong-ui-public/entities-vaults/dist/style.css","@kong-ui-public/entities-shared","@kong-ui-public/entities-vaults","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-plugins-icon"],e):(x=typeof globalThis<"u"?globalThis:x||self,e(x["kong-ui-public-entities-redis-configurations"]={},x.Vue,null,null,x["kong-ui-public-entities-shared"],x["kong-ui-public-entities-vaults"],x.VueRouter,x.KongIcons,x["kong-ui-public-i18n"],x["kong-ui-public-entities-plugins-icon"]))})(this,function(x,e,xi,Ii,u,ue,Qe,ee,Xe,Ze){"use strict";var h=(t=>(t[t.HOST_PORT_CE=0]="HOST_PORT_CE",t[t.HOST_PORT_EE=1]="HOST_PORT_EE",t[t.SENTINEL=2]="SENTINEL",t[t.CLUSTER=3]="CLUSTER",t))(h||{}),M=(t=>(t.REDIS_CE="redis-ce",t.REDIS_EE="redis-ee",t))(M||{}),et=typeof global=="object"&&global&&global.Object===Object&&global,zt=typeof self=="object"&&self&&self.Object===Object&&self,F=et||zt||Function("return this")(),ie=F.Symbol,tt=Object.prototype,Wt=tt.hasOwnProperty,Gt=tt.toString,pe=ie?ie.toStringTag:void 0;function Jt(t){var n=Wt.call(t,pe),r=t[pe];try{t[pe]=void 0;var i=!0}catch{}var o=Gt.call(t);return i&&(n?t[pe]=r:delete t[pe]),o}var Yt=Object.prototype,Qt=Yt.toString;function Xt(t){return Qt.call(t)}var Zt="[object Null]",en="[object Undefined]",nt=ie?ie.toStringTag:void 0;function me(t){return t==null?t===void 0?en:Zt:nt&&nt in Object(t)?Jt(t):Xt(t)}function ge(t){return t!=null&&typeof t=="object"}var we=Array.isArray;function rt(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}var tn="[object AsyncFunction]",nn="[object Function]",rn="[object GeneratorFunction]",on="[object Proxy]";function ot(t){if(!rt(t))return!1;var n=me(t);return n==nn||n==rn||n==tn||n==on}var $e=F["__core-js_shared__"],it=function(){var t=/[^.]+$/.exec($e&&$e.keys&&$e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function an(t){return!!it&&it in t}var ln=Function.prototype,sn=ln.toString;function te(t){if(t!=null){try{return sn.call(t)}catch{}try{return t+""}catch{}}return""}var dn=/[\\^$.*+?()[\]{}|]/g,cn=/^\[object .+?Constructor\]$/,fn=Function.prototype,un=Object.prototype,pn=fn.toString,mn=un.hasOwnProperty,gn=RegExp("^"+pn.call(mn).replace(dn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _n(t){if(!rt(t)||an(t))return!1;var n=ot(t)?gn:cn;return n.test(te(t))}function yn(t,n){return t==null?void 0:t[n]}function ae(t,n){var r=yn(t,n);return _n(r)?r:void 0}var Be=ae(F,"WeakMap"),bn=9007199254740991,hn=/^(?:0|[1-9]\d*)$/;function Cn(t,n){var r=typeof t;return n=n??bn,!!n&&(r=="number"||r!="symbol"&&hn.test(t))&&t>-1&&t%1==0&&t<n}function at(t,n){return t===n||t!==t&&n!==n}var Tn=9007199254740991;function lt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Tn}function wn(t){return t!=null&<(t.length)&&!ot(t)}var En=Object.prototype;function kn(t){var n=t&&t.constructor,r=typeof n=="function"&&n.prototype||En;return t===r}function Sn(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}var Vn="[object Arguments]";function st(t){return ge(t)&&me(t)==Vn}var dt=Object.prototype,xn=dt.hasOwnProperty,In=dt.propertyIsEnumerable,Rn=st(function(){return arguments}())?st:function(t){return ge(t)&&xn.call(t,"callee")&&!In.call(t,"callee")};function On(){return!1}var ct=typeof x=="object"&&x&&!x.nodeType&&x,ft=ct&&typeof module=="object"&&module&&!module.nodeType&&module,Nn=ft&&ft.exports===ct,ut=Nn?F.Buffer:void 0,Pn=ut?ut.isBuffer:void 0,De=Pn||On,An="[object Arguments]",$n="[object Array]",Bn="[object Boolean]",Dn="[object Date]",Ln="[object Error]",Mn="[object Function]",Un="[object Map]",vn="[object Number]",jn="[object Object]",Fn="[object RegExp]",Hn="[object Set]",Kn="[object String]",qn="[object WeakMap]",zn="[object ArrayBuffer]",Wn="[object DataView]",Gn="[object Float32Array]",Jn="[object Float64Array]",Yn="[object Int8Array]",Qn="[object Int16Array]",Xn="[object Int32Array]",Zn="[object Uint8Array]",er="[object Uint8ClampedArray]",tr="[object Uint16Array]",nr="[object Uint32Array]",I={};I[Gn]=I[Jn]=I[Yn]=I[Qn]=I[Xn]=I[Zn]=I[er]=I[tr]=I[nr]=!0,I[An]=I[$n]=I[zn]=I[Bn]=I[Wn]=I[Dn]=I[Ln]=I[Mn]=I[Un]=I[vn]=I[jn]=I[Fn]=I[Hn]=I[Kn]=I[qn]=!1;function rr(t){return ge(t)&<(t.length)&&!!I[me(t)]}function or(t){return function(n){return t(n)}}var pt=typeof x=="object"&&x&&!x.nodeType&&x,_e=pt&&typeof module=="object"&&module&&!module.nodeType&&module,ir=_e&&_e.exports===pt,Le=ir&&et.process,mt=function(){try{var t=_e&&_e.require&&_e.require("util").types;return t||Le&&Le.binding&&Le.binding("util")}catch{}}(),gt=mt&&mt.isTypedArray,_t=gt?or(gt):rr,ar=Object.prototype,lr=ar.hasOwnProperty;function sr(t,n){var r=we(t),i=!r&&Rn(t),o=!r&&!i&&De(t),a=!r&&!i&&!o&&_t(t),p=r||i||o||a,g=p?Sn(t.length,String):[],l=g.length;for(var c in t)lr.call(t,c)&&!(p&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Cn(c,l)))&&g.push(c);return g}function dr(t,n){return function(r){return t(n(r))}}var cr=dr(Object.keys,Object),fr=Object.prototype,ur=fr.hasOwnProperty;function pr(t){if(!kn(t))return cr(t);var n=[];for(var r in Object(t))ur.call(t,r)&&r!="constructor"&&n.push(r);return n}function mr(t){return wn(t)?sr(t):pr(t)}var ye=ae(Object,"create");function gr(){this.__data__=ye?ye(null):{},this.size=0}function _r(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}var yr="__lodash_hash_undefined__",br=Object.prototype,hr=br.hasOwnProperty;function Cr(t){var n=this.__data__;if(ye){var r=n[t];return r===yr?void 0:r}return hr.call(n,t)?n[t]:void 0}var Tr=Object.prototype,wr=Tr.hasOwnProperty;function Er(t){var n=this.__data__;return ye?n[t]!==void 0:wr.call(n,t)}var kr="__lodash_hash_undefined__";function Sr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ye&&n===void 0?kr:n,this}function ne(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}ne.prototype.clear=gr,ne.prototype.delete=_r,ne.prototype.get=Cr,ne.prototype.has=Er,ne.prototype.set=Sr;function Vr(){this.__data__=[],this.size=0}function Ee(t,n){for(var r=t.length;r--;)if(at(t[r][0],n))return r;return-1}var xr=Array.prototype,Ir=xr.splice;function Rr(t){var n=this.__data__,r=Ee(n,t);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():Ir.call(n,r,1),--this.size,!0}function Or(t){var n=this.__data__,r=Ee(n,t);return r<0?void 0:n[r][1]}function Nr(t){return Ee(this.__data__,t)>-1}function Pr(t,n){var r=this.__data__,i=Ee(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}function H(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}H.prototype.clear=Vr,H.prototype.delete=Rr,H.prototype.get=Or,H.prototype.has=Nr,H.prototype.set=Pr;var be=ae(F,"Map");function Ar(){this.size=0,this.__data__={hash:new ne,map:new(be||H),string:new ne}}function $r(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}function ke(t,n){var r=t.__data__;return $r(n)?r[typeof n=="string"?"string":"hash"]:r.map}function Br(t){var n=ke(this,t).delete(t);return this.size-=n?1:0,n}function Dr(t){return ke(this,t).get(t)}function Lr(t){return ke(this,t).has(t)}function Mr(t,n){var r=ke(this,t),i=r.size;return r.set(t,n),this.size+=r.size==i?0:1,this}function re(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}re.prototype.clear=Ar,re.prototype.delete=Br,re.prototype.get=Dr,re.prototype.has=Lr,re.prototype.set=Mr;function Ur(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}function vr(){this.__data__=new H,this.size=0}function jr(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}function Fr(t){return this.__data__.get(t)}function Hr(t){return this.__data__.has(t)}var Kr=200;function qr(t,n){var r=this.__data__;if(r instanceof H){var i=r.__data__;if(!be||i.length<Kr-1)return i.push([t,n]),this.size=++r.size,this;r=this.__data__=new re(i)}return r.set(t,n),this.size=r.size,this}function G(t){var n=this.__data__=new H(t);this.size=n.size}G.prototype.clear=vr,G.prototype.delete=jr,G.prototype.get=Fr,G.prototype.has=Hr,G.prototype.set=qr;function zr(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var p=t[r];n(p,r,t)&&(a[o++]=p)}return a}function Wr(){return[]}var Gr=Object.prototype,Jr=Gr.propertyIsEnumerable,yt=Object.getOwnPropertySymbols,Yr=yt?function(t){return t==null?[]:(t=Object(t),zr(yt(t),function(n){return Jr.call(t,n)}))}:Wr;function Qr(t,n,r){var i=n(t);return we(t)?i:Ur(i,r(t))}function bt(t){return Qr(t,mr,Yr)}var Me=ae(F,"DataView"),Ue=ae(F,"Promise"),ve=ae(F,"Set"),ht="[object Map]",Xr="[object Object]",Ct="[object Promise]",Tt="[object Set]",wt="[object WeakMap]",Et="[object DataView]",Zr=te(Me),eo=te(be),to=te(Ue),no=te(ve),ro=te(Be),J=me;(Me&&J(new Me(new ArrayBuffer(1)))!=Et||be&&J(new be)!=ht||Ue&&J(Ue.resolve())!=Ct||ve&&J(new ve)!=Tt||Be&&J(new Be)!=wt)&&(J=function(t){var n=me(t),r=n==Xr?t.constructor:void 0,i=r?te(r):"";if(i)switch(i){case Zr:return Et;case eo:return ht;case to:return Ct;case no:return Tt;case ro:return wt}return n});var kt=F.Uint8Array,oo="__lodash_hash_undefined__";function io(t){return this.__data__.set(t,oo),this}function ao(t){return this.__data__.has(t)}function Se(t){var n=-1,r=t==null?0:t.length;for(this.__data__=new re;++n<r;)this.add(t[n])}Se.prototype.add=Se.prototype.push=io,Se.prototype.has=ao;function lo(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}function so(t,n){return t.has(n)}var co=1,fo=2;function St(t,n,r,i,o,a){var p=r&co,g=t.length,l=n.length;if(g!=l&&!(p&&l>g))return!1;var c=a.get(t),_=a.get(n);if(c&&_)return c==n&&_==t;var w=-1,y=!0,E=r&fo?new Se:void 0;for(a.set(t,n),a.set(n,t);++w<g;){var b=t[w],s=n[w];if(i)var S=p?i(s,b,w,n,t,a):i(b,s,w,t,n,a);if(S!==void 0){if(S)continue;y=!1;break}if(E){if(!lo(n,function(N,d){if(!so(E,d)&&(b===N||o(b,N,r,i,a)))return E.push(d)})){y=!1;break}}else if(!(b===s||o(b,s,r,i,a))){y=!1;break}}return a.delete(t),a.delete(n),y}function uo(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}function po(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}var mo=1,go=2,_o="[object Boolean]",yo="[object Date]",bo="[object Error]",ho="[object Map]",Co="[object Number]",To="[object RegExp]",wo="[object Set]",Eo="[object String]",ko="[object Symbol]",So="[object ArrayBuffer]",Vo="[object DataView]",Vt=ie?ie.prototype:void 0,je=Vt?Vt.valueOf:void 0;function xo(t,n,r,i,o,a,p){switch(r){case Vo:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case So:return!(t.byteLength!=n.byteLength||!a(new kt(t),new kt(n)));case _o:case yo:case Co:return at(+t,+n);case bo:return t.name==n.name&&t.message==n.message;case To:case Eo:return t==n+"";case ho:var g=uo;case wo:var l=i&mo;if(g||(g=po),t.size!=n.size&&!l)return!1;var c=p.get(t);if(c)return c==n;i|=go,p.set(t,n);var _=St(g(t),g(n),i,o,a,p);return p.delete(t),_;case ko:if(je)return je.call(t)==je.call(n)}return!1}var Io=1,Ro=Object.prototype,Oo=Ro.hasOwnProperty;function No(t,n,r,i,o,a){var p=r&Io,g=bt(t),l=g.length,c=bt(n),_=c.length;if(l!=_&&!p)return!1;for(var w=l;w--;){var y=g[w];if(!(p?y in n:Oo.call(n,y)))return!1}var E=a.get(t),b=a.get(n);if(E&&b)return E==n&&b==t;var s=!0;a.set(t,n),a.set(n,t);for(var S=p;++w<l;){y=g[w];var N=t[y],d=n[y];if(i)var T=p?i(d,N,y,n,t,a):i(N,d,y,t,n,a);if(!(T===void 0?N===d||o(N,d,r,i,a):T)){s=!1;break}S||(S=y=="constructor")}if(s&&!S){var B=t.constructor,R=n.constructor;B!=R&&"constructor"in t&&"constructor"in n&&!(typeof B=="function"&&B instanceof B&&typeof R=="function"&&R instanceof R)&&(s=!1)}return a.delete(t),a.delete(n),s}var Po=1,xt="[object Arguments]",It="[object Array]",Ve="[object Object]",Ao=Object.prototype,Rt=Ao.hasOwnProperty;function $o(t,n,r,i,o,a){var p=we(t),g=we(n),l=p?It:J(t),c=g?It:J(n);l=l==xt?Ve:l,c=c==xt?Ve:c;var _=l==Ve,w=c==Ve,y=l==c;if(y&&De(t)){if(!De(n))return!1;p=!0,_=!1}if(y&&!_)return a||(a=new G),p||_t(t)?St(t,n,r,i,o,a):xo(t,n,l,r,i,o,a);if(!(r&Po)){var E=_&&Rt.call(t,"__wrapped__"),b=w&&Rt.call(n,"__wrapped__");if(E||b){var s=E?t.value():t,S=b?n.value():n;return a||(a=new G),o(s,S,r,i,a)}}return y?(a||(a=new G),No(t,n,r,i,o,a)):!1}function Ot(t,n,r,i,o){return t===n?!0:t==null||n==null||!ge(t)&&!ge(n)?t!==t&&n!==n:$o(t,n,r,i,Ot,o)}function Bo(t,n){return Ot(t,n)}for(var D=[],Fe=0;Fe<256;++Fe)D.push((Fe+256).toString(16).slice(1));function Do(t,n=0){return(D[t[n+0]]+D[t[n+1]]+D[t[n+2]]+D[t[n+3]]+"-"+D[t[n+4]]+D[t[n+5]]+"-"+D[t[n+6]]+D[t[n+7]]+"-"+D[t[n+8]]+D[t[n+9]]+"-"+D[t[n+10]]+D[t[n+11]]+D[t[n+12]]+D[t[n+13]]+D[t[n+14]]+D[t[n+15]]).toLowerCase()}var xe,Lo=new Uint8Array(16);function Mo(){if(!xe&&(xe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xe(Lo)}var Uo=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Nt={randomUUID:Uo};function vo(t,n,r){if(Nt.randomUUID&&!n&&!t)return Nt.randomUUID();t=t||{};var i=t.random||(t.rng||Mo)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Do(i)}const Pt={ip:"127.0.0.1",port:6379},At={host:"127.0.0.1",port:6379},le=h.HOST_PORT_EE,$t={port:6379,host:"127.0.0.1",database:0,username:"",password:"",ssl:!1,ssl_verify:!1,server_name:"",connect_timeout:2e3,send_timeout:2e3,read_timeout:2e3,sentinel_username:"",sentinel_password:"",keepalive_pool_size:256,keepalive_backlog:0,sentinel_master:"",sentinel_nodes:[],cluster_nodes:[],cluster_max_redirections:0,connection_is_proxied:!1,timeout:2e3},jo=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_CLUSTER_NODE:Pt,DEFAULT_FIELDS:$t,DEFAULT_REDIS_TYPE:le,DEFAULT_SENTINEL_NODE:At},Symbol.toStringTag,{value:"Module"})),he=t=>({...t,id:vo()}),He=t=>{const{id:n,...r}=t;return r},Bt=()=>he(At),Dt=()=>he(Pt),Ie=t=>{var n,r;return t.type===M.REDIS_CE?h.HOST_PORT_CE:(n=t.config.sentinel_nodes)!=null&&n.length?h.SENTINEL:(r=t.config.cluster_nodes)!=null&&r.length?h.CLUSTER:h.HOST_PORT_EE},Re=t=>t===h.HOST_PORT_CE?M.REDIS_CE:M.REDIS_EE,C={int(t,n){return t==null?n:parseInt(t.toString(),10)},str(t,n){return t==null||t===""?n:t.toString()},removeIdClusterNodes(t){return t.map(n=>({...He(n),port:C.int(n.port)}))},removeIdFromSentinelNodes(t){return t.map(n=>({...He(n),port:C.int(n.port)}))},addIdToClusterNodes(t){return t.map(he)},addIdToSentinelNodes(t){return t.map(he)},removeNullValues(t){const n={...t};for(const r in n)n[r]===null&&delete n[r];return n},stringToArray(t,n=","){return t?t.split(n).map(r=>String(r||"").trim()).filter(r=>r!==""):[]},arrayToString(t,n=", "){return t?t.join(n):""}},Fo=Object.freeze(Object.defineProperty({__proto__:null,genDefaultClusterNode:Dt,genDefaultSentinelNode:Bt,getRedisType:Ie,mapRedisTypeToPartialType:Re,shallowCopyWithId:he,shallowCopyWithoutId:He,standardize:C},Symbol.toStringTag,{value:"Module"})),Oe="/v2/control-planes/{controlPlaneId}/core-entities",Ne="/{workspace}",Ce={list:{konnect:`${Oe}/partials`,kongManager:`${Ne}/partials`},form:{konnect:{create:`${Oe}/partials`,edit:`${Oe}/partials/{id}`},kongManager:{create:`${Ne}/partials`,edit:`${Ne}/partials/{id}`}},links:{konnect:`${Oe}/partials/{id}/links`,kongManager:`${Ne}/partials/{id}/links`}},Ho=t=>{const{partialId:n,config:r,defaultRedisType:i=le}=t,o=!!n,{axiosInstance:a}=u.useAxios(r.axiosRequestConfig),{getMessageFromError:p}=u.useErrors(),g=e.computed(()=>n?u.EntityBaseFormType.Edit:u.EntityBaseFormType.Create),l=e.reactive({fields:{name:"",tags:"",type:Re(i),config:JSON.parse(JSON.stringify($t))},readonly:!1,errorMessage:""}),c=e.ref(),_=e.ref(i),w=e.computed(()=>_.value===h.HOST_PORT_EE||_.value===h.CLUSTER||_.value===h.SENTINEL);e.watch(_,d=>{l.fields.type=Re(d)});const y=e.computed(()=>{var T;if(o&&Bo(c.value,E.value)||!l.fields.name.length)return!1;const{config:d}=l.fields;switch(_.value){case h.HOST_PORT_CE:case h.HOST_PORT_EE:return!!d.host&&d.host.length>0&&!!d.port&&d.port>0;case h.CLUSTER:return!!d.cluster_nodes.length&&d.cluster_nodes.every(B=>B.ip.length>0);case h.SENTINEL:return!!d.sentinel_nodes.length&&d.sentinel_nodes.every(B=>B.host.length>0)&&!!((T=d.sentinel_master)!=null&&T.length)&&d.sentinel_role&&!!d.sentinel_role.length;default:throw new Error("Invalid redis type")}}),E=e.computed(()=>{switch(_.value){case h.HOST_PORT_CE:return{name:l.fields.name,type:l.fields.type,tags:C.stringToArray(l.fields.tags),config:{host:l.fields.config.host,port:C.int(l.fields.config.port),timeout:C.int(l.fields.config.timeout),username:C.str(l.fields.config.username,null),database:C.int(l.fields.config.database),password:C.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:C.str(l.fields.config.server_name,null)}};case h.HOST_PORT_EE:return{name:l.fields.name,type:l.fields.type,tags:C.stringToArray(l.fields.tags),config:{connect_timeout:C.int(l.fields.config.connect_timeout),connection_is_proxied:l.fields.config.connection_is_proxied,database:C.int(l.fields.config.database),host:l.fields.config.host,keepalive_backlog:C.int(l.fields.config.keepalive_backlog),keepalive_pool_size:C.int(l.fields.config.keepalive_pool_size),password:C.str(l.fields.config.password,null),port:C.int(l.fields.config.port),read_timeout:C.int(l.fields.config.read_timeout),send_timeout:C.int(l.fields.config.send_timeout),server_name:C.str(l.fields.config.server_name,null),ssl_verify:l.fields.config.ssl_verify,ssl:l.fields.config.ssl,username:C.str(l.fields.config.username,null),cluster_nodes:null,cluster_max_redirections:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null}};case h.CLUSTER:return{name:l.fields.name,type:l.fields.type,tags:C.stringToArray(l.fields.tags),config:{cluster_nodes:C.removeIdClusterNodes(l.fields.config.cluster_nodes),cluster_max_redirections:C.int(l.fields.config.cluster_max_redirections),username:C.str(l.fields.config.username,null),password:C.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:C.str(l.fields.config.server_name,null),connect_timeout:C.int(l.fields.config.connect_timeout),database:C.int(l.fields.config.database),send_timeout:C.int(l.fields.config.send_timeout),read_timeout:C.int(l.fields.config.read_timeout),keepalive_pool_size:C.int(l.fields.config.keepalive_pool_size),keepalive_backlog:C.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null,host:null,port:null}};case h.SENTINEL:return{name:l.fields.name,type:l.fields.type,tags:C.stringToArray(l.fields.tags),config:{sentinel_master:C.str(l.fields.config.sentinel_master,null),sentinel_nodes:C.removeIdFromSentinelNodes(l.fields.config.sentinel_nodes),sentinel_role:C.str(l.fields.config.sentinel_role,null),sentinel_username:C.str(l.fields.config.sentinel_username,null),sentinel_password:C.str(l.fields.config.sentinel_password,null),username:C.str(l.fields.config.username,null),password:C.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:C.str(l.fields.config.server_name,null),database:C.int(l.fields.config.database),connect_timeout:C.int(l.fields.config.connect_timeout),send_timeout:C.int(l.fields.config.send_timeout),read_timeout:C.int(l.fields.config.read_timeout),keepalive_pool_size:C.int(l.fields.config.keepalive_pool_size),keepalive_backlog:C.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,cluster_nodes:null,cluster_max_redirections:null,host:null,port:null}};default:throw new Error("Invalid redis type")}}),b=e.computed(()=>{let d=`${r.apiBaseUrl}${Ce.form[r.app][g.value]}`;return r.app==="konnect"?d=d.replace(/{controlPlaneId}/gi,(r==null?void 0:r.controlPlaneId)||""):r.app==="kongManager"&&(d=d.replace(/\/{workspace}/gi,r!=null&&r.workspace?`/${r.workspace}`:"")),d=d.replace(/{id}/gi,n||""),d}),s=e.computed(()=>{var d;return(d=Ce.form[r==null?void 0:r.app])==null?void 0:d.edit});return{form:l,canSubmit:y,payload:E,isEdit:o,redisType:_,redisTypeIsEnterprise:w,formType:g,fetchUrl:s,submit:async()=>{try{l.readonly=!0,l.errorMessage="";let d=E.value;return r.app==="konnect"&&(d={...d,config:C.removeNullValues(d.config)}),g.value===u.EntityBaseFormType.Create?await a.post(b.value,d):r.app==="konnect"?await a.put(b.value,d):await a.patch(b.value,d)}catch(d){throw l.errorMessage=p(d),l.readonly=!1,d}},setInitialFormValues:d=>{l.fields.config=Object.assign({},l.fields.config,C.removeNullValues(d.config)),l.fields.config.sentinel_nodes=C.addIdToSentinelNodes(d.config.sentinel_nodes??[]),l.fields.config.cluster_nodes=C.addIdToClusterNodes(d.config.cluster_nodes??[]),l.fields.name=d.name,l.fields.type=d.type,l.fields.tags=C.arrayToString(d.tags),_.value=Ie(d),c.value=JSON.parse(JSON.stringify(E.value))}}},Ko={class:"array-card-container"},qo=e.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0},disabled:{type:Boolean,default:!1}},emits:["remove-item"],setup(t){return(n,r)=>{const i=e.resolveComponent("KCard"),o=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",Ko,[e.createVNode(i,{class:"card"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),e.createVNode(o,{appearance:"tertiary",class:"array-card-remove-button",disabled:t.disabled,onClick:r[0]||(r[0]=a=>n.$emit("remove-item"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.TrashIcon))]),_:1},8,["disabled"])])}}}),K=(t,n)=>{const r=t.__vccOpts||t;for(const[i,o]of n)r[i]=o;return r},Lt=K(qo,[["__scopeId","data-v-a0b2e4fb"]]),zo={actions:{create:"New Redis Configuration",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",done:"Done",view:"View Details",loading:"Loading...",view_plugin:"View Plugin",close:"Close"},search:{placeholder:"Filter by name",placeholder_for_exact_match:"Filter by exact ID",no_results:"No results found"},delete:{title:"Delete Redis configuration",description:"You’re about to delete this item. Are you sure you want to proceed?",warning:"To delete this configuration, first remove it from all associated plugins."},errors:{copy:"Failed to copy to clipboard",general:"Redis configuration could not be retrieved",delete:"The redis configuration could not be deleted at this time."},copy:{success:"Copied {val} to clipboard"},form:{sections:{type:{title:"Redis type",description:"Both Enterprise and Open Source plugins support Redis. Enterprise plugins can connect to a standalone Redis instance (host/port), Cluster, or Sentinel, while Open Source plugins support only a simplified host/port configuration."},general:{title:"General information",description:"Name your Redis configuration."},connection:{title:"Connection settings",description:"Define the Redis server’s host, port, authentication, and timeout options for establishing a connection."},cluster:{title:"Cluster configuration",description:"Enables data sharding and distribution across multiple Redis nodes, allowing for scalability and load balancing."},tls:{title:"TLS settings",description:"Configure secure connections to Redis, including SSL and verification options."},keepalive:{title:"Keepalive configuration",description:"Keepalive reuses active connections to Redis, improving performance and efficiency."},read_write_configuration:{title:"Read/Write configuration",description:"Set timeouts for reading from and writing to the Redis server to control data transmission reliability."},sentinel_configuration:{title:"Sentinel configuration",description:"Manages Redis failover and high availability by connecting to Sentinel nodes that monitor and switch masters."}},fields:{type:{label:"Redis type"},name:{label:"Name",placeholder:"Enter unique name"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Route for grouping and filtering."},host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},database:{label:"Database",tooltip:"Database to use for the Redis connection."},password:{label:"Password",tooltip:"Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis."},username:{label:"Username",tooltip:"Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`."},ssl:{label:"SSL",description:"If set to true, uses SSL to connect to Redis.",tooltip:"If set to true, uses SSL to connect to Redis."},ssl_verify:{label:"SSL Verify",description:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong. conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ss1_verify_depth accordingly.",tooltip:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong.conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly."},server_name:{label:"Server name",tooltip:"A string representing an SNI (server name indication) value for TLS."},keepalive_backlog:{label:"Keepalive backlog",tooltip:"Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`."},keepalive_pool_size:{label:"Keepalive pool size",tooltip:"The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low."},read_timeout:{label:"Read timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},send_timeout:{label:"Send timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},connect_timeout:{label:"Connect timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},sentinel_master:{label:"Sentinel master",tooltip:"Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel."},sentinel_role:{label:"Sentinel role",tooltip:"Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel."},sentinel_username:{label:"Sentinel username",tooltip:"Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+."},sentinel_password:{label:"Sentinel password",tooltip:"Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels."},cluster_node_ip:{label:"IP",tooltip:"A string representing a host name, such as example.com."},cluster_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},cluster_max_redirections:{label:"Cluster max redirections",tooltip:"Maximum retry attempts for redirection."},timeout:{label:"Timeout",tooltip:"redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`"},connection_is_proxied:{label:"Connection is proxied",tooltip:"If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address."},cluster_nodes:{title:"Cluster nodes",tooltip:"Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_nodes:{title:"Sentinel nodes",tooltip:"Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_node_host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},sentinel_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."}},options:{type:{host_port:"Host/Port",cluster:"Cluster",sentinel:"Sentinel",open_source:"Open Source",enterprise:"Enterprise",suffix_open_source:" (Open Source)",suffix_enterprise:" (Enterprise)"},sentinel_role:{master:"master",slave:"slave",any:"any"}},edit_warning_modal:{title:"Edit Redis configuration",description:"This Redis configuration is connected to {pluginCount}. Any updates will take effect across all associated instances.",plugin_count:"{count} plugin(s)",confirm:"Confirm"}},linked_plugins_modal:{title:"Associated plugins ({count})",headers:{plugin:"Plugin",instance_name:"Name"}},redis:{title:"Redis Configurations",empty_state:{title:"Configure a Redis Configuration",description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing."}},list:{action:"New configuration",table_headers:{name:"Name",type:"Type",plugins:"Plugins",tags:"Tags"},empty_state:{description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing.",feature_1:{title:"Store your Redis configurations",description:"Define a Redis configuration once and use it across multiple plugins."},feature_2:{title:"Sync across plugins",description:"Edits to your configuration will be cascaded automatically to all associated plugins."}}}};function Wo(){const t=Xe.createI18n("en-us",zo);return{i18n:t,i18nT:Xe.i18nTComponent(t)}}const Y={useI18n:Wo},Go={class:"cluster-node-items"},Jo=K(e.defineComponent({__name:"ClusterNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=Y.useI18n(),i=()=>{n.value.push(Dt())},o=a=>{n.value.splice(a,1)};return(a,p)=>{const g=e.resolveComponent("KLabel"),l=e.resolveComponent("KInput"),c=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g,{class:"required",info:e.unref(r)("form.fields.cluster_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(_,w)=>(e.openBlock(),e.createBlock(Lt,{key:`${w}`,"data-testid":"redis-cluster-nodes",disabled:a.readonly,onRemoveItem:y=>o(w)},{default:e.withCtx(()=>[e.createElementVNode("div",Go,[e.createVNode(l,{modelValue:_.ip,"onUpdate:modelValue":y=>_.ip=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.cluster_node_ip.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_ip.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"ip",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(l,{modelValue:_.port,"onUpdate:modelValue":y=>_.port=y,label:e.unref(r)("form.fields.cluster_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(c,{appearance:"tertiary","data-testid":"redis-add-cluster-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-776a626d"]]),Yo={class:"sentinel-node-items"},Qo=K(e.defineComponent({__name:"SentinelNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=Y.useI18n(),i=()=>{n.value.push(Bt())},o=a=>{n.value.splice(a,1)};return(a,p)=>{const g=e.resolveComponent("KLabel"),l=e.resolveComponent("KInput"),c=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g,{class:"required",info:e.unref(r)("form.fields.sentinel_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(_,w)=>(e.openBlock(),e.createBlock(Lt,{key:_.id,"data-testid":"redis-sentinel-nodes",disabled:a.readonly,onRemoveItem:y=>o(w)},{default:e.withCtx(()=>[e.createElementVNode("div",Yo,[e.createVNode(l,{modelValue:_.host,"onUpdate:modelValue":y=>_.host=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.sentinel_node_host.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(l,{modelValue:_.port,"onUpdate:modelValue":y=>_.port=y,label:e.unref(r)("form.fields.sentinel_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(c,{appearance:"tertiary","data-testid":"redis-add-sentinel-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-cd1c07e2"]]);var Ke=new WeakMap,Mt=0;function Xo(t){if(!t.length)return"";for(var n="arg",r=0;r<t.length;++r){var i=void 0;t[r]===null||typeof t[r]!="object"&&typeof t[r]!="function"?typeof t[r]=="string"?i='"'+t[r]+'"':i=String(t[r]):Ke.has(t[r])?i=Ke.get(t[r]):(i=Mt,Ke.set(t[r],Mt++)),n+="@"+i}return n}function Zo(t){if(typeof t=="function")try{t=t()}catch{t=""}return Array.isArray(t)?t=Xo(t):t=String(t||""),t}var qe=function(){function t(n){n===void 0&&(n=0),this.items=new Map,this.ttl=n}return t.prototype.serializeKey=function(n){return Zo(n)},t.prototype.get=function(n){var r=this.serializeKey(n);return this.items.get(r)},t.prototype.set=function(n,r,i){var o=this.serializeKey(n),a=i||this.ttl,p=Date.now(),g={data:r,createdAt:p,expiresAt:a?p+a:1/0};this.dispatchExpire(a,g,o),this.items.set(o,g)},t.prototype.dispatchExpire=function(n,r,i){var o=this;n&&setTimeout(function(){var a=Date.now(),p=a>=r.expiresAt;p&&o.delete(i)},n)},t.prototype.delete=function(n){this.items.delete(n)},t}();function ei(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function ti(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var ni=function(t){return fetch(t).then(function(n){return n.json()})};const ze={isOnline:ei,isDocumentVisible:ti,fetcher:ni};var q=function(){return q=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},q.apply(this,arguments)},se=function(t,n,r,i){function o(a){return a instanceof r?a:new r(function(p){p(a)})}return new(r||(r=Promise))(function(a,p){function g(_){try{c(i.next(_))}catch(w){p(w)}}function l(_){try{c(i.throw(_))}catch(w){p(w)}}function c(_){_.done?a(_.value):o(_.value).then(g,l)}c((i=i.apply(t,n||[])).next())})},de=function(t,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return l([c,_])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,o&&(a=c[0]&2?o.return:c[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;switch(o=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=n.call(t,r)}catch(_){c=[6,_],o=0}finally{i=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ri=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i=r.call(t),o,a=[],p;try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(g){p={error:g}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(p)throw p.error}}return a},oi=function(t,n,r){if(r||arguments.length===2)for(var i=0,o=n.length,a;i<o;i++)(a||!(i in n))&&(a||(a=Array.prototype.slice.call(n,0,i)),a[i]=n[i]);return t.concat(a||Array.prototype.slice.call(n))},Ut=new qe,Pe=new qe,We=new qe,vt={cache:Ut,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:ze.fetcher,isOnline:ze.isOnline,isDocumentVisible:ze.isDocumentVisible};function ii(t,n,r){var i=Pe.get(t);if(i)i.data.push(n);else{var o=5e3;Pe.set(t,[n],r>0?r+o:r)}}function ai(t,n,r){if(r.isDocumentVisible()&&!(r.errorRetryCount!==void 0&&n>r.errorRetryCount)){var i=Math.min(n||0,r.errorRetryCount),o=i*r.errorRetryInterval;setTimeout(function(){t(null,{errorRetryCount:i+1,shouldRetryOnError:!0})},o)}}var jt=function(t,n,r,i){return r===void 0&&(r=Ut),i===void 0&&(i=vt.ttl),se(void 0,void 0,void 0,function(){var o,a,p,g,l,c,_;return de(this,function(w){switch(w.label){case 0:if(!si(n))return[3,5];w.label=1;case 1:return w.trys.push([1,3,,4]),[4,n];case 2:return o=w.sent(),[3,4];case 3:return g=w.sent(),a=g,[3,4];case 4:return[3,6];case 5:o=n,w.label=6;case 6:if(p=!1,l={data:o,error:a,isValidating:p},typeof o<"u")try{r.set(t,l,i)}catch(y){console.error("swrv(mutate): failed to set cache",y)}return c=Pe.get(t),c&&c.data.length&&(_=c.data.filter(function(y){return y.key===t}),_.forEach(function(y,E){typeof l.data<"u"&&(y.data=l.data),y.error=l.error,y.isValidating=l.isValidating;var b=E===_.length-1;b||delete _[E]}),_=_.filter(Boolean)),[2,l]}})})};function li(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o,a=q({},vt),p=!1,g=!1,l=e.getCurrentInstance(),c=(l==null?void 0:l.proxy)||l;if(!c)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var _=(c==null?void 0:c.$isServer)||!1;n.length>=1&&(i=n[0]),n.length>=2&&(o=n[1]),n.length>2&&(a=q(q({},a),n[2]));var w=_?a.serverTTL:a.ttl,y=typeof i=="function"?i:e.ref(i);typeof o>"u"&&(o=a.fetcher);var E=null;E||(E=e.reactive({data:void 0,error:void 0,isValidating:!0,key:null}));var b=function(d,T){return se(t,void 0,void 0,function(){var B,R,z,W,U,v,Q,j=this;return de(this,function(X){switch(X.label){case 0:return B=E.data===void 0,R=y.value,R?(z=a.cache.get(R),W=z&&z.data,E.isValidating=!0,W&&(E.data=W.data,E.error=W.error),U=d||o,!U||!a.isDocumentVisible()&&!B||(T==null?void 0:T.forceRevalidate)!==void 0&&!(T!=null&&T.forceRevalidate)?(E.isValidating=!1,[2]):z&&(v=!!(Date.now()-z.createdAt>=a.dedupingInterval||T!=null&&T.forceRevalidate),!v)?(E.isValidating=!1,[2]):(Q=function(){return se(j,void 0,void 0,function(){var L,ce,oe,fe;return de(this,function(Z){switch(Z.label){case 0:return L=We.get(R),L?[3,2]:(ce=Array.isArray(R)?R:[R],oe=U.apply(void 0,oi([],ri(ce),!1)),We.set(R,oe,a.dedupingInterval),[4,jt(R,oe,a.cache,w)]);case 1:return Z.sent(),[3,4];case 2:return[4,jt(R,L.data,a.cache,w)];case 3:Z.sent(),Z.label=4;case 4:return E.isValidating=!1,We.delete(R),E.error!==void 0&&(fe=!p&&a.shouldRetryOnError&&(T?T.shouldRetryOnError:!0),fe&&ai(b,T?T.errorRetryCount:1,a)),[2]}})})},W&&a.revalidateDebounce?(setTimeout(function(){return se(j,void 0,void 0,function(){return de(this,function(L){switch(L.label){case 0:return p?[3,2]:[4,Q()];case 1:L.sent(),L.label=2;case 2:return[2]}})})},a.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,Q()];case 2:X.sent(),X.label=3;case 3:return[2]}})})},s=function(){return se(t,void 0,void 0,function(){return de(this,function(d){return[2,b(null,{shouldRetryOnError:!1})]})})},S=null;e.onMounted(function(){var d=function(){return se(t,void 0,void 0,function(){return de(this,function(T){switch(T.label){case 0:return!E.error&&a.isOnline()?[4,b()]:[3,2];case 1:return T.sent(),[3,3];case 2:S&&clearTimeout(S),T.label=3;case 3:return a.refreshInterval&&!p&&(S=setTimeout(d,a.refreshInterval)),[2]}})})};a.refreshInterval&&(S=setTimeout(d,a.refreshInterval)),a.revalidateOnFocus&&(document.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1))}),e.onUnmounted(function(){p=!0,S&&clearTimeout(S),a.revalidateOnFocus&&(document.removeEventListener("visibilitychange",s,!1),window.removeEventListener("focus",s,!1));var d=Pe.get(y.value);d&&(d.data=d.data.filter(function(T){return T!==E}))});try{e.watch(y,function(d){e.isReadonly(y)||(y.value=d),E.key=d,E.isValidating=!!d,ii(y.value,E,w),!_&&!g&&y.value&&b(),g=!1},{immediate:!0})}catch{}var N=q(q({},e.toRefs(E)),{mutate:function(d,T){return b(d,q(q({},T),{forceRevalidate:!0}))}});return N}function si(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}function Ft(t){return`redis-partial-links-${t}`}const Te=t=>{const{axiosInstance:n}=u.useAxios(t.axiosRequestConfig);return{fetcher:async r=>{const{partialId:i,size:o,offset:a,query:p}=r;let g=`${t.apiBaseUrl}${Ce.links[t.app]}`;t.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:"")),g=g.replace(/{id}/gi,i||""),p&&(g=`${g}?${p}`);const{data:l}=await n.get(g,{params:{size:o,offset:a}});return l}}},Ht=t=>{const{partialId:n,config:r}=t,{fetcher:i}=Te(r),o=e.ref([]),{data:a}=li(Ft(n),()=>i({partialId:n}),{revalidateOnFocus:!1});return e.watch(a,()=>{var p;o.value=((p=a.value)==null?void 0:p.data)??[]}),o},di={class:"kong-ui-entities-redis-configurations-form"},ci=K(e.defineComponent({__name:"RedisConfigurationForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string")},partialId:{type:String,required:!1,default:""},actionTeleportTarget:{type:String},slidoutTopOffset:{type:Number,default:60},disabledPartialType:{type:String,default:""}},emits:["update","error","loading","cancel"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o},i18nT:a}=Y.useI18n(),p=Qe.useRouter(),g=e.ref(),l=e.ref(),c=(P,m)=>{g.value=P??"",l.value=m},_=P=>{var m;(m=l.value)==null||m.call(l,P),g.value=!1},w=e.computed(()=>[{label:o("form.options.type.host_port"),group:o("form.options.type.enterprise"),value:h.HOST_PORT_EE,selected:T.value===h.HOST_PORT_EE,disabled:!d&&r.disabledPartialType===M.REDIS_EE},{label:o("form.options.type.cluster"),group:o("form.options.type.enterprise"),value:h.CLUSTER,selected:T.value===h.CLUSTER,disabled:!d&&r.disabledPartialType===M.REDIS_EE},{label:o("form.options.type.sentinel"),group:o("form.options.type.enterprise"),value:h.SENTINEL,selected:T.value===h.SENTINEL,disabled:!d&&r.disabledPartialType===M.REDIS_EE},{label:o("form.options.type.host_port"),group:o("form.options.type.open_source"),value:h.HOST_PORT_CE,selected:T.value===h.HOST_PORT_CE,disabled:d&&B.value||!d&&r.disabledPartialType===M.REDIS_CE}]),y=[{label:o("form.options.sentinel_role.master"),value:"master"},{label:o("form.options.sentinel_role.slave"),value:"slave"},{label:o("form.options.sentinel_role.any"),value:"any"}],E=P=>{const m=P.value===h.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");return`${P.label}${m}`},b=()=>r.disabledPartialType&&Re(le)===r.disabledPartialType?r.disabledPartialType===M.REDIS_CE?h.HOST_PORT_EE:h.HOST_PORT_CE:le,{form:s,canSubmit:S,payload:N,isEdit:d,redisType:T,redisTypeIsEnterprise:B,fetchUrl:R,submit:z,setInitialFormValues:W}=Ho({partialId:r.partialId,defaultRedisType:b(),config:r.config}),{fetcher:U}=Te(r.config),v=e.ref(!1),Q=e.ref(!1),j=e.ref(0),X=async()=>{try{if(d&&!Q.value){const{count:m}=await U({partialId:r.partialId});if(j.value=m,m>0){v.value=!0;return}}const{data:P}=await z();i("update",P)}catch(P){i("error",P)}},L=()=>{v.value=!1,Q.value=!0,X()},ce=()=>{r.config.cancelRoute&&p.push(r.config.cancelRoute),i("cancel")},oe=P=>{i("loading",P)},fe=P=>{i("error",P)},Z=P=>{W(P)};return e.onBeforeMount(async()=>{if(d){const{count:P}=await U({partialId:r.partialId});j.value=P}}),(P,m)=>{const Je=e.resolveComponent("KAlert"),Ae=e.resolveComponent("KSelect"),A=e.resolveComponent("KInput"),k=e.resolveComponent("KCheckbox"),V=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",di,[e.createVNode(e.unref(u.EntityBaseForm),{"action-teleport-target":t.actionTeleportTarget,"can-submit":e.unref(S),config:t.config,"edit-id":t.partialId,"entity-type":e.unref(u.SupportedEntityType).RedisConfiguration,"error-message":e.unref(s).errorMessage,"fetch-url":e.unref(R),"form-fields":e.unref(N),"is-readonly":e.unref(s).readonly,"slidout-top-offset":t.slidoutTopOffset,onCancel:ce,"onFetch:error":fe,"onFetch:success":Z,onLoading:oe,onSubmit:X},{default:e.withCtx(()=>[j.value>0&&e.unref(d)?(e.openBlock(),e.createBlock(Je,{key:0,appearance:"warning",class:"warning-alert","data-testid":"redis-update-warning-alert"},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:j.value})),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-type-section",description:e.unref(o)("form.sections.type.description"),title:e.unref(o)("form.sections.type.title")},{default:e.withCtx(()=>[e.createVNode(Ae,{modelValue:e.unref(T),"onUpdate:modelValue":m[0]||(m[0]=f=>e.isRef(T)?T.value=f:null),"data-testid":"redis-type-select",disabled:e.unref(d)&&e.unref(T)===e.unref(h).HOST_PORT_CE,items:w.value,"kpop-attributes":{"data-testid":"redis-type-select-popover"},label:e.unref(o)("form.fields.type.label"),readonly:e.unref(s).readonly,required:""},{"selected-item-template":e.withCtx(({item:f})=>[e.createTextVNode(e.toDisplayString(E(f)),1)]),_:1},8,["modelValue","disabled","items","label","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-general-section",description:e.unref(o)("form.sections.general.description"),title:e.unref(o)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.name,"onUpdate:modelValue":m[1]||(m[1]=f=>e.unref(s).fields.name=f),modelModifiers:{trim:!0},"data-testid":"redis-name-input",disabled:e.unref(d),label:e.unref(o)("form.fields.name.label"),placeholder:e.unref(o)("form.fields.name.placeholder"),readonly:e.unref(s).readonly,required:""},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.tags,"onUpdate:modelValue":m[2]||(m[2]=f=>e.unref(s).fields.tags=f),modelModifiers:{trim:!0},"data-testid":"redis-tags-input",help:e.unref(o)("form.fields.tags.help"),label:e.unref(o)("form.fields.tags.label"),"label-attributes":{info:e.unref(o)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(o)("form.fields.tags.placeholder"),readonly:e.unref(s).readonly},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.unref(T)===e.unref(h).SENTINEL?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:1,"data-testid":"redis-sentinel-configuration-section",description:e.unref(o)("form.sections.sentinel_configuration.description"),title:e.unref(o)("form.sections.sentinel_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_master,"onUpdate:modelValue":m[3]||(m[3]=f=>e.unref(s).fields.config.sentinel_master=f),"data-testid":"redis-sentinel-master-input",label:e.unref(o)("form.fields.sentinel_master.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_master.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(Ae,{modelValue:e.unref(s).fields.config.sentinel_role,"onUpdate:modelValue":m[4]||(m[4]=f=>e.unref(s).fields.config.sentinel_role=f),"data-testid":"redis-sentinel-role-select",items:y,"kpop-attributes":{"data-testid":"redis-sentinel-role-select-popover"},label:e.unref(o)("form.fields.sentinel_role.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(Qo,{modelValue:e.unref(s).fields.config.sentinel_nodes,"onUpdate:modelValue":m[5]||(m[5]=f=>e.unref(s).fields.config.sentinel_nodes=f),readonly:e.unref(s).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_username,"onUpdate:modelValue":m[6]||(m[6]=f=>e.unref(s).fields.config.sentinel_username=f),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_username.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(ue.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:f=>e.unref(s).fields.config.sentinel_username=f,value:e.unref(s).fields.config.sentinel_username,onOpen:m[7]||(m[7]=(f,$)=>c(f,$))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_password,"onUpdate:modelValue":m[8]||(m[8]=f=>e.unref(s).fields.config.sentinel_password=f),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_password.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(ue.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:f=>e.unref(s).fields.config.sentinel_password=f,value:e.unref(s).fields.config.sentinel_password,onOpen:m[9]||(m[9]=(f,$)=>c(f,$))},null,8,["disabled","update","value"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(T)===e.unref(h).CLUSTER?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:2,"data-testid":"redis-cluster-configuration-section",description:e.unref(o)("form.sections.cluster.description"),title:e.unref(o)("form.sections.cluster.title")},{default:e.withCtx(()=>[e.createVNode(Jo,{modelValue:e.unref(s).fields.config.cluster_nodes,"onUpdate:modelValue":m[10]||(m[10]=f=>e.unref(s).fields.config.cluster_nodes=f),readonly:e.unref(s).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.cluster_max_redirections,"onUpdate:modelValue":m[11]||(m[11]=f=>e.unref(s).fields.config.cluster_max_redirections=f),"data-testid":"redis-cluster-max-redirections-input",label:e.unref(o)("form.fields.cluster_max_redirections.label"),"label-attributes":{info:e.unref(o)("form.fields.cluster_max_redirections.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-connection-configuration-section",description:e.unref(o)("form.sections.connection.description"),title:e.unref(o)("form.sections.connection.title")},{default:e.withCtx(()=>[e.unref(T)===e.unref(h).HOST_PORT_CE||e.unref(T)===e.unref(h).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:0,modelValue:e.unref(s).fields.config.host,"onUpdate:modelValue":m[12]||(m[12]=f=>e.unref(s).fields.config.host=f),modelModifiers:{trim:!0},"data-testid":"redis-host-input",label:e.unref(o)("form.fields.host.label"),"label-attributes":{info:e.unref(o)("form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(T)===e.unref(h).HOST_PORT_CE||e.unref(T)===e.unref(h).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:1,modelValue:e.unref(s).fields.config.port,"onUpdate:modelValue":m[13]||(m[13]=f=>e.unref(s).fields.config.port=f),modelModifiers:{trim:!0},"data-testid":"redis-port-input",label:e.unref(o)("form.fields.port.label"),"label-attributes":{info:e.unref(o)("form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(T)===e.unref(h).HOST_PORT_EE?(e.openBlock(),e.createBlock(k,{key:2,modelValue:e.unref(s).fields.config.connection_is_proxied,"onUpdate:modelValue":m[14]||(m[14]=f=>e.unref(s).fields.config.connection_is_proxied=f),"data-testid":"redis-connection-is-proxied-checkbox",disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.connection_is_proxied.label"),"label-attributes":{info:e.unref(o)("form.fields.connection_is_proxied.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","disabled","label","label-attributes"])):e.createCommentVNode("",!0),e.unref(T)===e.unref(h).HOST_PORT_CE?(e.openBlock(),e.createBlock(A,{key:3,modelValue:e.unref(s).fields.config.timeout,"onUpdate:modelValue":m[15]||(m[15]=f=>e.unref(s).fields.config.timeout=f),modelModifiers:{trim:!0},"data-testid":"redis-timeout-input",label:e.unref(o)("form.fields.timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.createVNode(A,{modelValue:e.unref(s).fields.config.database,"onUpdate:modelValue":m[16]||(m[16]=f=>e.unref(s).fields.config.database=f),modelModifiers:{trim:!0},"data-testid":"redis-database-input",label:e.unref(o)("form.fields.database.label"),"label-attributes":{info:e.unref(o)("form.fields.database.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.username,"onUpdate:modelValue":m[17]||(m[17]=f=>e.unref(s).fields.config.username=f),modelModifiers:{trim:!0},"data-testid":"redis-username-input",label:e.unref(o)("form.fields.username.label"),"label-attributes":{info:e.unref(o)("form.fields.username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(ue.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:f=>e.unref(s).fields.config.username=f,value:e.unref(s).fields.config.username,onOpen:m[18]||(m[18]=(f,$)=>c(f,$))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.password,"onUpdate:modelValue":m[19]||(m[19]=f=>e.unref(s).fields.config.password=f),modelModifiers:{trim:!0},"data-testid":"redis-password-input",label:e.unref(o)("form.fields.password.label"),"label-attributes":{info:e.unref(o)("form.fields.password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(ue.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:f=>e.unref(s).fields.config.password=f,value:e.unref(s).fields.config.password,onOpen:m[20]||(m[20]=(f,$)=>c(f,$))},null,8,["disabled","update","value"])]),_:1},8,["description","title"]),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-tls-configuration-section",description:e.unref(o)("form.sections.tls.description"),title:e.unref(o)("form.sections.tls.title")},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).fields.config.ssl,"onUpdate:modelValue":m[21]||(m[21]=f=>e.unref(s).fields.config.ssl=f),"data-testid":"redis-ssl-checkbox",description:e.unref(o)("form.fields.ssl.description"),disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.ssl.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(k,{modelValue:e.unref(s).fields.config.ssl_verify,"onUpdate:modelValue":m[22]||(m[22]=f=>e.unref(s).fields.config.ssl_verify=f),"data-testid":"redis-ssl-verify-checkbox",description:e.unref(o)("form.fields.ssl_verify.description"),disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.ssl_verify.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl_verify.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.server_name,"onUpdate:modelValue":m[23]||(m[23]=f=>e.unref(s).fields.config.server_name=f),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.server_name.label"),"label-attributes":{info:e.unref(o)("form.fields.server_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"]),e.unref(T)!==e.unref(h).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:3,"data-testid":"redis-keepalive-section",description:e.unref(o)("form.sections.keepalive.description"),title:e.unref(o)("form.sections.keepalive.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.keepalive_backlog,"onUpdate:modelValue":m[24]||(m[24]=f=>e.unref(s).fields.config.keepalive_backlog=f),"data-testid":"redis-keepalive-backlog-input",label:e.unref(o)("form.fields.keepalive_backlog.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_backlog.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.keepalive_pool_size,"onUpdate:modelValue":m[25]||(m[25]=f=>e.unref(s).fields.config.keepalive_pool_size=f),"data-testid":"redis-keepalive-pool-size-input",label:e.unref(o)("form.fields.keepalive_pool_size.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_pool_size.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(T)!==e.unref(h).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:4,"data-testid":"redis-read-write-configuration-section",description:e.unref(o)("form.sections.read_write_configuration.description"),title:e.unref(o)("form.sections.read_write_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.read_timeout,"onUpdate:modelValue":m[26]||(m[26]=f=>e.unref(s).fields.config.read_timeout=f),"data-testid":"redis-read-timeout-input",label:e.unref(o)("form.fields.read_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.send_timeout,"onUpdate:modelValue":m[27]||(m[27]=f=>e.unref(s).fields.config.send_timeout=f),"data-testid":"redis-send-timeout-input",label:e.unref(o)("form.fields.send_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.send_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.connect_timeout,"onUpdate:modelValue":m[28]||(m[28]=f=>e.unref(s).fields.config.connect_timeout=f),"data-testid":"redis-connect-timeout-input",label:e.unref(o)("form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0)]),_:1},8,["action-teleport-target","can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","slidout-top-offset"])]),e.createVNode(e.unref(ue.VaultSecretPicker),{config:r.config,setup:g.value,onCancel:m[29]||(m[29]=()=>g.value=!1),onProceed:_},null,8,["config","setup"]),e.createVNode(V,{"action-button-text":e.unref(o)("form.edit_warning_modal.confirm"),"data-testid":"redis-update-warning-modal","hide-cancel-button":"","max-width":"640",title:e.unref(o)("form.edit_warning_modal.title"),visible:v.value,onCancel:m[30]||(m[30]=f=>v.value=!1),onProceed:L},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:j.value})),1)]),_:1})]),_:1},8,["action-button-text","title","visible"])],64)}}}),[["__scopeId","data-v-6f2877e0"]]),fi="#00abd2",ui="24px",pi={class:"linked-plugins","data-testid":"linked-plugins-inline"},Ge=7,mi=K(e.defineComponent({__name:"LinkedPluginsInline",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},partialId:{type:String,required:!0}},setup(t){const n=t,r=Ht({config:n.config,partialId:n.partialId});return(i,o)=>{const a=e.resolveComponent("KBadge");return e.openBlock(),e.createElementBlock("div",pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).slice(0,Ge),p=>(e.openBlock(),e.createBlock(e.unref(Ze.PluginIcon),{key:p.id,name:p.name,size:24},null,8,["name"]))),128)),e.unref(r).length-Ge>0?(e.openBlock(),e.createBlock(a,{key:0,appearance:"info"},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(e.unref(r).length-Ge),1)]),_:1})):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-c39556bc"]]),gi={class:"plugin-item"},_i=K(e.defineComponent({__name:"PluginItem",props:{pluginName:{}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createVNode(e.unref(Ze.PluginIcon),{name:n.pluginName,size:24},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(n.pluginName),1)]))}}),[["__scopeId","data-v-de964dc4"]]),yi={class:"toolbar-container"},Kt=K(e.defineComponent({__name:"LinkedPluginList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},isExactMatch:{type:Boolean,default:!1},filterBarEnabled:{type:Boolean,default:!1},partialId:{type:String,required:!0}},emits:["view-plugin","load"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=Y.useI18n(),a=[{key:"name",label:o("linked_plugins_modal.headers.plugin")},{key:"instance_name",label:o("linked_plugins_modal.headers.instance_name")},{key:"actions",hideLabel:!0}],{fetcher:p}=Te(r.config),g=e.ref(0),l=async y=>{const{data:E,count:b}=await p({partialId:r.partialId,size:y.pageSize,offset:y.offset,query:y.query});g.value=b;const s={total:b,data:E};return i("load",s),s},c=e.ref(""),_=e.computed(()=>r.config.app==="konnect"||r.isExactMatch?{isExactMatch:!0}:{isExactMatch:!1,fields:{name:{searchable:!0}},schema:{name:{type:"text"}}}),w=y=>{i("view-plugin",{id:y.id,plugin:y.name})};return(y,E)=>{const b=e.resolveComponent("KDropdownItem"),s=e.resolveComponent("KTableData");return e.openBlock(),e.createBlock(s,{"cache-identifier":e.unref(Ft)(t.partialId),fetcher:l,headers:a,"hide-pagination-when-optional":"","pagination-attributes":{totalCount:g.value,disablePageJump:!0},"search-input":c.value},e.createSlots({name:e.withCtx(({rowValue:S})=>[e.createVNode(_i,{"plugin-name":S},null,8,["plugin-name"])]),"action-items":e.withCtx(({row:S})=>[e.createVNode(b,{onClick:N=>w(S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("actions.view_plugin")),1)]),_:2},1032,["onClick"])]),_:2},[t.filterBarEnabled?{name:"toolbar",fn:e.withCtx(()=>[e.createElementVNode("div",yi,[e.createVNode(e.unref(u.EntityFilter),{modelValue:c.value,"onUpdate:modelValue":E[0]||(E[0]=S=>c.value=S),config:_.value},null,8,["modelValue","config"])])]),key:"0"}:void 0]),1032,["cache-identifier","pagination-attributes","search-input"])}}}),[["__scopeId","data-v-50856d03"]]),bi={class:"linked-plugins-modal","data-testid":"linked-plugins-modal"},hi=K(e.defineComponent({__name:"LinkedPluginListModal",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},redisConfigurationId:{type:String,required:!0},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","proceed","view-plugin"],setup(t,{emit:n}){const r=n,{i18n:{t:i}}=Y.useI18n(),o=e.ref(0),a=e.computed(()=>i("linked_plugins_modal.title",{count:o.value})),p=()=>{r("cancel")},g=()=>{r("proceed")};return(l,c)=>{const _=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock("div",bi,[e.createVNode(_,{"action-button-text":e.unref(i)("actions.done"),"hide-cancel-button":"",title:a.value,visible:t.visible,onCancel:p,onProceed:g},{default:e.withCtx(()=>[e.createVNode(Kt,{config:t.config,"partial-id":t.redisConfigurationId,onLoad:c[0]||(c[0]=({total:w})=>o.value=w),onViewPlugin:c[1]||(c[1]=w=>r("view-plugin",w))},null,8,["config","partial-id"])]),_:1},8,["action-button-text","title","visible"])])}}}),[["__scopeId","data-v-6148b8bd"]]),qt=e.defineComponent({__name:"DeleteWarningModal",props:{visible:{type:Boolean,required:!0}},emits:["close"],setup(t,{emit:n}){const{i18n:{t:r}}=Y.useI18n(),i=n,o=()=>{i("close")};return(a,p)=>{const g=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(g,{"action-button-text":e.unref(r)("actions.close"),"data-testid":"remove-links-modal","hide-cancel-button":"","max-width":"640",title:e.unref(r)("delete.title"),visible:t.visible,onCancel:o,onProceed:o},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("delete.warning")),1)]),_:1},8,["action-button-text","title","visible"])}}}),Ci={class:"kong-ui-entities-partials-list"},Ti={class:"empty-state-icon-gateway"},wi=K(e.defineComponent({__name:"RedisConfigurationList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute)},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},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["click:learn-more","click:plugin","copy:error","copy:success","delete:success","error"],setup(t,{emit:n}){var A;const r=n,i=t,o=e.computed(()=>{var V,f;let k=`${i.config.apiBaseUrl}${Ce.list[i.config.app]}`;return i.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((V=i.config)==null?void 0:V.controlPlaneId)||""):i.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(f=i.config)!=null&&f.workspace?`/${i.config.workspace}`:"")),k}),a=e.ref(!1),p=e.ref(""),g=e.ref(null),l=e.ref(void 0),c=e.ref(!1),_=e.ref(!1),w=e.ref(""),y=e.ref(!1),E=u.useDeleteUrlBuilder(i.config,o.value),b=e.ref(1),s=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),{fetcher:S,fetcherState:N}=u.useFetcher(i.config,o),{i18n:{t:d}}=Y.useI18n(),{axiosInstance:T}=u.useAxios((A=i.config)==null?void 0:A.axiosRequestConfig),B=Qe.useRouter(),R=e.ref(""),z=e.computed(()=>{const k=i.config.app==="konnect"||i.config.isExactMatch;if(k)return{isExactMatch:!0,placeholder:d("search.placeholder_for_exact_match")};const{name:V}=v;return{isExactMatch:k,fields:{name:V},schema:i.config.filterSchema}}),{fetcher:W}=Te(i.config),U=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${d("redis.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:d("redis.title")}),v={name:{label:d("list.table_headers.name"),searchable:!0,hidable:!1,sortable:!0},type:{label:d("list.table_headers.type")},tags:{label:d("list.table_headers.tags")},plugins:{label:d("list.table_headers.plugins")}},Q=k=>({label:d("actions.view"),to:i.config.getViewRoute(k)}),j=k=>({label:d("actions.edit"),to:i.config.getEditRoute(k)}),X=async k=>{const{count:V}=await W({partialId:k.id});V>0?y.value=!0:(l.value=k,c.value=!0)},L=()=>{R.value=""},ce=async k=>{var f;await((f=i.canRetrieve)==null?void 0:f.call(i,k))&&B.push(i.config.getViewRoute(k.id))},oe=()=>{c.value=!1},fe=k=>{p.value=k,a.value=!0},Z=async()=>{var k,V,f;if((k=l.value)!=null&&k.id){_.value=!0;try{await T.delete(E(l.value.id)),_.value=!1,c.value=!1,P(),r("delete:success",l.value)}catch($){w.value=((f=(V=$.response)==null?void 0:V.data)==null?void 0:f.message)||$.message||d("errors.delete"),r("error",$)}finally{_.value=!1}}},P=()=>{b.value++},m=k=>{switch(Ie(k)){case h.HOST_PORT_CE:return`${d("form.options.type.host_port")}${d("form.options.type.suffix_open_source")}`;case h.HOST_PORT_EE:return`${d("form.options.type.host_port")}${d("form.options.type.suffix_enterprise")}`;case h.SENTINEL:return`${d("form.options.type.sentinel")}${d("form.options.type.suffix_enterprise")}`;case h.CLUSTER:return`${d("form.options.type.cluster")}${d("form.options.type.suffix_enterprise")}`}},Je=()=>{B.push(i.config.createRoute)},Ae=async(k,V)=>{const f=k.id;if(!await V(f)){r("copy:error",{entity:k,field:"id",message:d("errors.copy")});return}r("copy:success",{entity:k,field:"id",message:d("copy.success",{val:f})})};return e.watch(N,k=>{var V,f,$;if(k.status===u.FetcherStatus.Error){g.value={title:d("errors.general")},($=(f=(V=k.error)==null?void 0:V.response)==null?void 0:f.data)!=null&&$.message&&(g.value.message=k.error.response.data.message),r("error",k.error);return}g.value=null}),e.watch(i.canCreate,async k=>{await k?U.value.ctaText=d("actions.create"):U.value.ctaText=void 0},{immediate:!0}),(k,V)=>{const f=e.resolveComponent("KButton"),$=e.resolveComponent("KDropdownItem"),Vi=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Ci,[e.createVNode(e.unref(u.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":s.value,"empty-state-options":U.value,"enable-entity-actions":"","error-message":g.value,fetcher:e.unref(S),"fetcher-cache-key":b.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-redis-configuration-list",query:R.value,"table-headers":v,onClearSearchInput:L,"onClick:row":V[2]||(V[2]=O=>ce(O)),onSort:P},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(u.EntityFilter),{modelValue:R.value,"onUpdate:modelValue":V[0]||(V[0]=O=>R.value=O),config:z.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":t.canCreate},{default:e.withCtx(()=>[e.createVNode(f,{appearance:"primary","data-testid":"toolbar-add-redis-configuration",size:"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(d)("actions.create")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:O})=>[e.createElementVNode("b",null,e.toDisplayString(O??"-"),1)]),type:e.withCtx(({row:O})=>[e.createTextVNode(e.toDisplayString(m(O)),1)]),tags:e.withCtx(({rowValue:O})=>[e.createVNode(e.unref(u.TableTags),{tags:O},null,8,["tags"])]),plugins:e.withCtx(({row:O})=>[e.createVNode(mi,{config:t.config,"partial-id":O.id,onClick:e.withModifiers(Ye=>fe(O.id),["stop"])},null,8,["config","partial-id","onClick"])]),actions:e.withCtx(({row:O})=>[e.createVNode(Vi,null,{default:e.withCtx(({copyToClipboard:Ye})=>[e.createVNode($,{"data-testid":"action-entity-copy-id",onClick:qi=>Ae(O,Ye)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(O)},{default:e.withCtx(()=>[e.createVNode($,{"data-testid":"action-entity-view","has-divider":"",item:Q(O.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canEdit(O)},{default:e.withCtx(()=>[e.createVNode($,{"data-testid":"action-entity-edit",item:j(O.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canDelete(O)},{default:e.withCtx(()=>[e.createVNode($,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:Ye=>X(O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[t.enableV2EmptyStates?{name:"empty-state",fn:e.withCtx(()=>[e.createVNode(e.unref(u.EntityEmptyState),{"action-button-text":e.unref(d)("list.action"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":"redis-entity-empty-state",description:e.unref(d)("list.empty_state.description"),features:[{title:e.unref(d)("list.empty_state.feature_1.title"),description:e.unref(d)("list.empty_state.feature_1.description")},{title:e.unref(d)("list.empty_state.feature_2.title"),description:e.unref(d)("list.empty_state.feature_2.description")}],title:e.unref(d)("redis.title"),"onClick:create":Je,"onClick:learnMore":V[1]||(V[1]=()=>r("click:learn-more"))},{image:e.withCtx(()=>[e.createElementVNode("div",Ti,[e.createVNode(e.unref(ee.DeployIcon),{color:e.unref(fi),size:e.unref(ui)},null,8,["color","size"])])]),"feature-0-icon":e.withCtx(()=>[e.createVNode(e.unref(ee.ClipboardIcon))]),"feature-1-icon":e.withCtx(()=>[e.createVNode(e.unref(ee.RefreshIcon))]),_:1},8,["action-button-text","can-create","description","features","title"])]),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query"]),e.createVNode(qt,{visible:y.value,onClose:V[3]||(V[3]=O=>y.value=!1)},null,8,["visible"]),e.createVNode(e.unref(u.EntityDeleteModal),{"action-pending":_.value,description:e.unref(d)("delete.description"),"entity-name":l.value&&(l.value.name||l.value.id),"entity-type":e.unref(u.EntityTypes).RedisConfiguration,error:w.value,"need-confirmation":!0,title:e.unref(d)("delete.title"),visible:c.value,onCancel:oe,onProceed:Z},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),e.createVNode(hi,{config:t.config,"redis-configuration-id":p.value,visible:a.value,onCancel:V[4]||(V[4]=O=>a.value=!1),onProceed:V[5]||(V[5]=O=>a.value=!1),onViewPlugin:V[6]||(V[6]=O=>r("click:plugin",O))},null,8,["config","redis-configuration-id","visible"])])}}}),[["__scopeId","data-v-dc83ade9"]]),Ei={class:"kong-ui-consumer-group-entity-config-card"},ki=e.defineComponent({__name:"RedisConfigurationConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!0}},emits:["loading","fetch:error","fetch:success"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=Y.useI18n(),a=e.computed(()=>Ce.form[r.config.app].edit),p=e.ref(le),g=b=>{p.value=Ie(b),i("fetch:success",b)},l=e.computed(()=>{const b=p.value===h.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");let s="";switch(p.value){case h.HOST_PORT_CE:s=o("form.options.type.host_port");break;case h.HOST_PORT_EE:s=o("form.options.type.host_port");break;case h.CLUSTER:s=o("form.options.type.cluster");break;case h.SENTINEL:s=o("form.options.type.sentinel");break}return`${s}${b}`}),c=b=>({id:b.id,name:b.name,tags:b.tags,created_at:b.created_at,updated_at:b.updated_at,type:b.type,...b.config}),_=b=>{const{id:s,name:S,created_at:N,updated_at:d,type:T,tags:B,...R}=b;return{id:s,name:S,tags:B,created_at:N,updated_at:d,type:T,config:R}},w={id:{},name:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.name.label")},tags:{type:u.ConfigurationSchemaType.BadgeTag,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.tags.label"),tooltip:o("form.fields.tags.tooltip")},updated_at:{},created_at:{},type:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.type.label")},cluster_max_redirections:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.cluster_max_redirections.tooltip"),label:o("form.fields.cluster_max_redirections.label")},cluster_nodes:{type:u.ConfigurationSchemaType.JsonArray,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.cluster_nodes.title"),tooltip:o("form.fields.cluster_nodes.tooltip")},connect_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.connect_timeout.label"),tooltip:o("form.fields.connect_timeout.tooltip")},connection_is_proxied:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.connection_is_proxied.label"),tooltip:o("form.fields.connection_is_proxied.tooltip")},database:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.database.label"),tooltip:o("form.fields.database.tooltip")},host:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.host.label"),tooltip:o("form.fields.host.tooltip")},keepalive_backlog:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_backlog.label"),tooltip:o("form.fields.keepalive_backlog.tooltip")},keepalive_pool_size:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_pool_size.label"),tooltip:o("form.fields.keepalive_pool_size.tooltip")},password:{type:u.ConfigurationSchemaType.Redacted,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.password.label"),tooltip:o("form.fields.password.tooltip")},port:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.port.label"),tooltip:o("form.fields.port.tooltip")},read_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.read_timeout.label"),tooltip:o("form.fields.read_timeout.tooltip")},send_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.send_timeout.label"),tooltip:o("form.fields.send_timeout.tooltip")},sentinel_master:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_master.label"),tooltip:o("form.fields.sentinel_master.tooltip")},sentinel_nodes:{type:u.ConfigurationSchemaType.JsonArray,section:u.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.sentinel_nodes.tooltip")},sentinel_password:{type:u.ConfigurationSchemaType.Redacted,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_password.label"),tooltip:o("form.fields.sentinel_password.tooltip")},sentinel_role:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_role.label"),tooltip:o("form.fields.sentinel_role.tooltip")},sentinel_username:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_username.label"),tooltip:o("form.fields.sentinel_username.tooltip")},server_name:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.server_name.label"),tooltip:o("form.fields.server_name.tooltip")},ssl_verify:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl_verify.label"),tooltip:o("form.fields.ssl_verify.tooltip")},ssl:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl.label"),tooltip:o("form.fields.ssl.tooltip")},timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.timeout.label"),tooltip:o("form.fields.timeout.tooltip")},username:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.username.label"),tooltip:o("form.fields.username.tooltip")}},y=b=>{const s={},S=Object.keys(w);for(const N of S)b.includes(N)?s[N]={...w[N],order:b.indexOf(N)+1}:s[N]={...w[N],hidden:!0};return s},E=e.computed(()=>{const b=["id","name","tags","type","updated_at","created_at"];switch(p.value){case h.HOST_PORT_CE:return y([...b,"host","port","timeout","database","username","password","ssl","ssl_verify","server_name"]);case h.HOST_PORT_EE:return y([...b,"host","port","connection_is_proxied","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case h.CLUSTER:return y([...b,"cluster_nodes","cluster_max_redirections","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case h.SENTINEL:return y([...b,"sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);default:throw new Error("Invalid Redis type")}});return(b,s)=>(e.openBlock(),e.createElementBlock("div",Ei,[e.createVNode(e.unref(u.EntityBaseConfigCard),{"code-block-record-formatter":_,config:t.config,"config-card-doc":t.configCardDoc,"config-schema":E.value,"entity-type":e.unref(u.SupportedEntityType).RedisConfiguration,"fetch-url":a.value,"hide-title":t.hideTitle,"record-resolver":c,"onFetch:error":s[0]||(s[0]=S=>b.$emit("fetch:error",S)),"onFetch:success":g,onLoading:s[1]||(s[1]=S=>b.$emit("loading",S))},{type:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(l.value),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),Si={useLinkedPlugins:Ht,useLinkedPluginsFetcher:Te};x.DeleteWarningModal=qt,x.LinkedPlugins=Kt,x.PartialType=M,x.RedisConfigurationConfigCard=ki,x.RedisConfigurationForm=ci,x.RedisConfigurationList=wi,x.RedisType=h,x.composables=Si,x.constants=jo,x.helpers=Fo,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(x,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared/dist/style.css"),require("@kong-ui-public/entities-vaults/dist/style.css"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/entities-vaults"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-plugins-icon")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared/dist/style.css","@kong-ui-public/entities-vaults/dist/style.css","@kong-ui-public/entities-shared","@kong-ui-public/entities-vaults","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-plugins-icon"],e):(x=typeof globalThis<"u"?globalThis:x||self,e(x["kong-ui-public-entities-redis-configurations"]={},x.Vue,null,null,x["kong-ui-public-entities-shared"],x["kong-ui-public-entities-vaults"],x.VueRouter,x.KongIcons,x["kong-ui-public-i18n"],x["kong-ui-public-entities-plugins-icon"]))})(this,function(x,e,xi,Ii,u,ue,Qe,ee,Xe,Ze){"use strict";var h=(t=>(t[t.HOST_PORT_CE=0]="HOST_PORT_CE",t[t.HOST_PORT_EE=1]="HOST_PORT_EE",t[t.SENTINEL=2]="SENTINEL",t[t.CLUSTER=3]="CLUSTER",t))(h||{}),M=(t=>(t.REDIS_CE="redis-ce",t.REDIS_EE="redis-ee",t))(M||{}),et=typeof global=="object"&&global&&global.Object===Object&&global,zt=typeof self=="object"&&self&&self.Object===Object&&self,F=et||zt||Function("return this")(),ie=F.Symbol,tt=Object.prototype,Wt=tt.hasOwnProperty,Gt=tt.toString,pe=ie?ie.toStringTag:void 0;function Jt(t){var n=Wt.call(t,pe),r=t[pe];try{t[pe]=void 0;var i=!0}catch{}var o=Gt.call(t);return i&&(n?t[pe]=r:delete t[pe]),o}var Yt=Object.prototype,Qt=Yt.toString;function Xt(t){return Qt.call(t)}var Zt="[object Null]",en="[object Undefined]",nt=ie?ie.toStringTag:void 0;function me(t){return t==null?t===void 0?en:Zt:nt&&nt in Object(t)?Jt(t):Xt(t)}function ge(t){return t!=null&&typeof t=="object"}var we=Array.isArray;function rt(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}var tn="[object AsyncFunction]",nn="[object Function]",rn="[object GeneratorFunction]",on="[object Proxy]";function ot(t){if(!rt(t))return!1;var n=me(t);return n==nn||n==rn||n==tn||n==on}var $e=F["__core-js_shared__"],it=function(){var t=/[^.]+$/.exec($e&&$e.keys&&$e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function an(t){return!!it&&it in t}var ln=Function.prototype,sn=ln.toString;function te(t){if(t!=null){try{return sn.call(t)}catch{}try{return t+""}catch{}}return""}var dn=/[\\^$.*+?()[\]{}|]/g,cn=/^\[object .+?Constructor\]$/,fn=Function.prototype,un=Object.prototype,pn=fn.toString,mn=un.hasOwnProperty,gn=RegExp("^"+pn.call(mn).replace(dn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _n(t){if(!rt(t)||an(t))return!1;var n=ot(t)?gn:cn;return n.test(te(t))}function yn(t,n){return t==null?void 0:t[n]}function ae(t,n){var r=yn(t,n);return _n(r)?r:void 0}var Be=ae(F,"WeakMap"),bn=9007199254740991,hn=/^(?:0|[1-9]\d*)$/;function Cn(t,n){var r=typeof t;return n=n??bn,!!n&&(r=="number"||r!="symbol"&&hn.test(t))&&t>-1&&t%1==0&&t<n}function at(t,n){return t===n||t!==t&&n!==n}var Tn=9007199254740991;function lt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Tn}function wn(t){return t!=null&<(t.length)&&!ot(t)}var En=Object.prototype;function kn(t){var n=t&&t.constructor,r=typeof n=="function"&&n.prototype||En;return t===r}function Sn(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}var Vn="[object Arguments]";function st(t){return ge(t)&&me(t)==Vn}var dt=Object.prototype,xn=dt.hasOwnProperty,In=dt.propertyIsEnumerable,Rn=st(function(){return arguments}())?st:function(t){return ge(t)&&xn.call(t,"callee")&&!In.call(t,"callee")};function On(){return!1}var ct=typeof x=="object"&&x&&!x.nodeType&&x,ft=ct&&typeof module=="object"&&module&&!module.nodeType&&module,Nn=ft&&ft.exports===ct,ut=Nn?F.Buffer:void 0,Pn=ut?ut.isBuffer:void 0,De=Pn||On,An="[object Arguments]",$n="[object Array]",Bn="[object Boolean]",Dn="[object Date]",Ln="[object Error]",Mn="[object Function]",Un="[object Map]",vn="[object Number]",jn="[object Object]",Fn="[object RegExp]",Hn="[object Set]",Kn="[object String]",qn="[object WeakMap]",zn="[object ArrayBuffer]",Wn="[object DataView]",Gn="[object Float32Array]",Jn="[object Float64Array]",Yn="[object Int8Array]",Qn="[object Int16Array]",Xn="[object Int32Array]",Zn="[object Uint8Array]",er="[object Uint8ClampedArray]",tr="[object Uint16Array]",nr="[object Uint32Array]",I={};I[Gn]=I[Jn]=I[Yn]=I[Qn]=I[Xn]=I[Zn]=I[er]=I[tr]=I[nr]=!0,I[An]=I[$n]=I[zn]=I[Bn]=I[Wn]=I[Dn]=I[Ln]=I[Mn]=I[Un]=I[vn]=I[jn]=I[Fn]=I[Hn]=I[Kn]=I[qn]=!1;function rr(t){return ge(t)&<(t.length)&&!!I[me(t)]}function or(t){return function(n){return t(n)}}var pt=typeof x=="object"&&x&&!x.nodeType&&x,_e=pt&&typeof module=="object"&&module&&!module.nodeType&&module,ir=_e&&_e.exports===pt,Le=ir&&et.process,mt=function(){try{var t=_e&&_e.require&&_e.require("util").types;return t||Le&&Le.binding&&Le.binding("util")}catch{}}(),gt=mt&&mt.isTypedArray,_t=gt?or(gt):rr,ar=Object.prototype,lr=ar.hasOwnProperty;function sr(t,n){var r=we(t),i=!r&&Rn(t),o=!r&&!i&&De(t),a=!r&&!i&&!o&&_t(t),p=r||i||o||a,g=p?Sn(t.length,String):[],l=g.length;for(var c in t)lr.call(t,c)&&!(p&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Cn(c,l)))&&g.push(c);return g}function dr(t,n){return function(r){return t(n(r))}}var cr=dr(Object.keys,Object),fr=Object.prototype,ur=fr.hasOwnProperty;function pr(t){if(!kn(t))return cr(t);var n=[];for(var r in Object(t))ur.call(t,r)&&r!="constructor"&&n.push(r);return n}function mr(t){return wn(t)?sr(t):pr(t)}var ye=ae(Object,"create");function gr(){this.__data__=ye?ye(null):{},this.size=0}function _r(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}var yr="__lodash_hash_undefined__",br=Object.prototype,hr=br.hasOwnProperty;function Cr(t){var n=this.__data__;if(ye){var r=n[t];return r===yr?void 0:r}return hr.call(n,t)?n[t]:void 0}var Tr=Object.prototype,wr=Tr.hasOwnProperty;function Er(t){var n=this.__data__;return ye?n[t]!==void 0:wr.call(n,t)}var kr="__lodash_hash_undefined__";function Sr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ye&&n===void 0?kr:n,this}function ne(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}ne.prototype.clear=gr,ne.prototype.delete=_r,ne.prototype.get=Cr,ne.prototype.has=Er,ne.prototype.set=Sr;function Vr(){this.__data__=[],this.size=0}function Ee(t,n){for(var r=t.length;r--;)if(at(t[r][0],n))return r;return-1}var xr=Array.prototype,Ir=xr.splice;function Rr(t){var n=this.__data__,r=Ee(n,t);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():Ir.call(n,r,1),--this.size,!0}function Or(t){var n=this.__data__,r=Ee(n,t);return r<0?void 0:n[r][1]}function Nr(t){return Ee(this.__data__,t)>-1}function Pr(t,n){var r=this.__data__,i=Ee(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}function H(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}H.prototype.clear=Vr,H.prototype.delete=Rr,H.prototype.get=Or,H.prototype.has=Nr,H.prototype.set=Pr;var be=ae(F,"Map");function Ar(){this.size=0,this.__data__={hash:new ne,map:new(be||H),string:new ne}}function $r(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}function ke(t,n){var r=t.__data__;return $r(n)?r[typeof n=="string"?"string":"hash"]:r.map}function Br(t){var n=ke(this,t).delete(t);return this.size-=n?1:0,n}function Dr(t){return ke(this,t).get(t)}function Lr(t){return ke(this,t).has(t)}function Mr(t,n){var r=ke(this,t),i=r.size;return r.set(t,n),this.size+=r.size==i?0:1,this}function re(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}re.prototype.clear=Ar,re.prototype.delete=Br,re.prototype.get=Dr,re.prototype.has=Lr,re.prototype.set=Mr;function Ur(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}function vr(){this.__data__=new H,this.size=0}function jr(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}function Fr(t){return this.__data__.get(t)}function Hr(t){return this.__data__.has(t)}var Kr=200;function qr(t,n){var r=this.__data__;if(r instanceof H){var i=r.__data__;if(!be||i.length<Kr-1)return i.push([t,n]),this.size=++r.size,this;r=this.__data__=new re(i)}return r.set(t,n),this.size=r.size,this}function G(t){var n=this.__data__=new H(t);this.size=n.size}G.prototype.clear=vr,G.prototype.delete=jr,G.prototype.get=Fr,G.prototype.has=Hr,G.prototype.set=qr;function zr(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var p=t[r];n(p,r,t)&&(a[o++]=p)}return a}function Wr(){return[]}var Gr=Object.prototype,Jr=Gr.propertyIsEnumerable,yt=Object.getOwnPropertySymbols,Yr=yt?function(t){return t==null?[]:(t=Object(t),zr(yt(t),function(n){return Jr.call(t,n)}))}:Wr;function Qr(t,n,r){var i=n(t);return we(t)?i:Ur(i,r(t))}function bt(t){return Qr(t,mr,Yr)}var Me=ae(F,"DataView"),Ue=ae(F,"Promise"),ve=ae(F,"Set"),ht="[object Map]",Xr="[object Object]",Ct="[object Promise]",Tt="[object Set]",wt="[object WeakMap]",Et="[object DataView]",Zr=te(Me),eo=te(be),to=te(Ue),no=te(ve),ro=te(Be),J=me;(Me&&J(new Me(new ArrayBuffer(1)))!=Et||be&&J(new be)!=ht||Ue&&J(Ue.resolve())!=Ct||ve&&J(new ve)!=Tt||Be&&J(new Be)!=wt)&&(J=function(t){var n=me(t),r=n==Xr?t.constructor:void 0,i=r?te(r):"";if(i)switch(i){case Zr:return Et;case eo:return ht;case to:return Ct;case no:return Tt;case ro:return wt}return n});var kt=F.Uint8Array,oo="__lodash_hash_undefined__";function io(t){return this.__data__.set(t,oo),this}function ao(t){return this.__data__.has(t)}function Se(t){var n=-1,r=t==null?0:t.length;for(this.__data__=new re;++n<r;)this.add(t[n])}Se.prototype.add=Se.prototype.push=io,Se.prototype.has=ao;function lo(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}function so(t,n){return t.has(n)}var co=1,fo=2;function St(t,n,r,i,o,a){var p=r&co,g=t.length,l=n.length;if(g!=l&&!(p&&l>g))return!1;var c=a.get(t),_=a.get(n);if(c&&_)return c==n&&_==t;var w=-1,y=!0,E=r&fo?new Se:void 0;for(a.set(t,n),a.set(n,t);++w<g;){var b=t[w],s=n[w];if(i)var S=p?i(s,b,w,n,t,a):i(b,s,w,t,n,a);if(S!==void 0){if(S)continue;y=!1;break}if(E){if(!lo(n,function(N,d){if(!so(E,d)&&(b===N||o(b,N,r,i,a)))return E.push(d)})){y=!1;break}}else if(!(b===s||o(b,s,r,i,a))){y=!1;break}}return a.delete(t),a.delete(n),y}function uo(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}function po(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}var mo=1,go=2,_o="[object Boolean]",yo="[object Date]",bo="[object Error]",ho="[object Map]",Co="[object Number]",To="[object RegExp]",wo="[object Set]",Eo="[object String]",ko="[object Symbol]",So="[object ArrayBuffer]",Vo="[object DataView]",Vt=ie?ie.prototype:void 0,je=Vt?Vt.valueOf:void 0;function xo(t,n,r,i,o,a,p){switch(r){case Vo:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case So:return!(t.byteLength!=n.byteLength||!a(new kt(t),new kt(n)));case _o:case yo:case Co:return at(+t,+n);case bo:return t.name==n.name&&t.message==n.message;case To:case Eo:return t==n+"";case ho:var g=uo;case wo:var l=i&mo;if(g||(g=po),t.size!=n.size&&!l)return!1;var c=p.get(t);if(c)return c==n;i|=go,p.set(t,n);var _=St(g(t),g(n),i,o,a,p);return p.delete(t),_;case ko:if(je)return je.call(t)==je.call(n)}return!1}var Io=1,Ro=Object.prototype,Oo=Ro.hasOwnProperty;function No(t,n,r,i,o,a){var p=r&Io,g=bt(t),l=g.length,c=bt(n),_=c.length;if(l!=_&&!p)return!1;for(var w=l;w--;){var y=g[w];if(!(p?y in n:Oo.call(n,y)))return!1}var E=a.get(t),b=a.get(n);if(E&&b)return E==n&&b==t;var s=!0;a.set(t,n),a.set(n,t);for(var S=p;++w<l;){y=g[w];var N=t[y],d=n[y];if(i)var T=p?i(d,N,y,n,t,a):i(N,d,y,t,n,a);if(!(T===void 0?N===d||o(N,d,r,i,a):T)){s=!1;break}S||(S=y=="constructor")}if(s&&!S){var B=t.constructor,R=n.constructor;B!=R&&"constructor"in t&&"constructor"in n&&!(typeof B=="function"&&B instanceof B&&typeof R=="function"&&R instanceof R)&&(s=!1)}return a.delete(t),a.delete(n),s}var Po=1,xt="[object Arguments]",It="[object Array]",Ve="[object Object]",Ao=Object.prototype,Rt=Ao.hasOwnProperty;function $o(t,n,r,i,o,a){var p=we(t),g=we(n),l=p?It:J(t),c=g?It:J(n);l=l==xt?Ve:l,c=c==xt?Ve:c;var _=l==Ve,w=c==Ve,y=l==c;if(y&&De(t)){if(!De(n))return!1;p=!0,_=!1}if(y&&!_)return a||(a=new G),p||_t(t)?St(t,n,r,i,o,a):xo(t,n,l,r,i,o,a);if(!(r&Po)){var E=_&&Rt.call(t,"__wrapped__"),b=w&&Rt.call(n,"__wrapped__");if(E||b){var s=E?t.value():t,S=b?n.value():n;return a||(a=new G),o(s,S,r,i,a)}}return y?(a||(a=new G),No(t,n,r,i,o,a)):!1}function Ot(t,n,r,i,o){return t===n?!0:t==null||n==null||!ge(t)&&!ge(n)?t!==t&&n!==n:$o(t,n,r,i,Ot,o)}function Bo(t,n){return Ot(t,n)}for(var D=[],Fe=0;Fe<256;++Fe)D.push((Fe+256).toString(16).slice(1));function Do(t,n=0){return(D[t[n+0]]+D[t[n+1]]+D[t[n+2]]+D[t[n+3]]+"-"+D[t[n+4]]+D[t[n+5]]+"-"+D[t[n+6]]+D[t[n+7]]+"-"+D[t[n+8]]+D[t[n+9]]+"-"+D[t[n+10]]+D[t[n+11]]+D[t[n+12]]+D[t[n+13]]+D[t[n+14]]+D[t[n+15]]).toLowerCase()}var xe,Lo=new Uint8Array(16);function Mo(){if(!xe&&(xe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xe(Lo)}var Uo=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Nt={randomUUID:Uo};function vo(t,n,r){if(Nt.randomUUID&&!t)return Nt.randomUUID();t=t||{};var i=t.random||(t.rng||Mo)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Do(i)}const Pt={ip:"127.0.0.1",port:6379},At={host:"127.0.0.1",port:6379},le=h.HOST_PORT_EE,$t={port:6379,host:"127.0.0.1",database:0,username:"",password:"",ssl:!1,ssl_verify:!1,server_name:"",connect_timeout:2e3,send_timeout:2e3,read_timeout:2e3,sentinel_username:"",sentinel_password:"",keepalive_pool_size:256,keepalive_backlog:0,sentinel_master:"",sentinel_nodes:[],cluster_nodes:[],cluster_max_redirections:0,connection_is_proxied:!1,timeout:2e3},jo=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_CLUSTER_NODE:Pt,DEFAULT_FIELDS:$t,DEFAULT_REDIS_TYPE:le,DEFAULT_SENTINEL_NODE:At},Symbol.toStringTag,{value:"Module"})),he=t=>({...t,id:vo()}),He=t=>{const{id:n,...r}=t;return r},Bt=()=>he(At),Dt=()=>he(Pt),Ie=t=>{var n,r;return t.type===M.REDIS_CE?h.HOST_PORT_CE:(n=t.config.sentinel_nodes)!=null&&n.length?h.SENTINEL:(r=t.config.cluster_nodes)!=null&&r.length?h.CLUSTER:h.HOST_PORT_EE},Re=t=>t===h.HOST_PORT_CE?M.REDIS_CE:M.REDIS_EE,C={int(t,n){return t==null?n:parseInt(t.toString(),10)},str(t,n){return t==null||t===""?n:t.toString()},removeIdClusterNodes(t){return t.map(n=>({...He(n),port:C.int(n.port)}))},removeIdFromSentinelNodes(t){return t.map(n=>({...He(n),port:C.int(n.port)}))},addIdToClusterNodes(t){return t.map(he)},addIdToSentinelNodes(t){return t.map(he)},removeNullValues(t){const n={...t};for(const r in n)n[r]===null&&delete n[r];return n},stringToArray(t,n=","){return t?t.split(n).map(r=>String(r||"").trim()).filter(r=>r!==""):[]},arrayToString(t,n=", "){return t?t.join(n):""}},Fo=Object.freeze(Object.defineProperty({__proto__:null,genDefaultClusterNode:Dt,genDefaultSentinelNode:Bt,getRedisType:Ie,mapRedisTypeToPartialType:Re,shallowCopyWithId:he,shallowCopyWithoutId:He,standardize:C},Symbol.toStringTag,{value:"Module"})),Oe="/v2/control-planes/{controlPlaneId}/core-entities",Ne="/{workspace}",Ce={list:{konnect:`${Oe}/partials`,kongManager:`${Ne}/partials`},form:{konnect:{create:`${Oe}/partials`,edit:`${Oe}/partials/{id}`},kongManager:{create:`${Ne}/partials`,edit:`${Ne}/partials/{id}`}},links:{konnect:`${Oe}/partials/{id}/links`,kongManager:`${Ne}/partials/{id}/links`}},Ho=t=>{const{partialId:n,config:r,defaultRedisType:i=le}=t,o=!!n,{axiosInstance:a}=u.useAxios(r.axiosRequestConfig),{getMessageFromError:p}=u.useErrors(),g=e.computed(()=>n?u.EntityBaseFormType.Edit:u.EntityBaseFormType.Create),l=e.reactive({fields:{name:"",tags:"",type:Re(i),config:JSON.parse(JSON.stringify($t))},readonly:!1,errorMessage:""}),c=e.ref(),_=e.ref(i),w=e.computed(()=>_.value===h.HOST_PORT_EE||_.value===h.CLUSTER||_.value===h.SENTINEL);e.watch(_,d=>{l.fields.type=Re(d)});const y=e.computed(()=>{var T;if(o&&Bo(c.value,E.value)||!l.fields.name.length)return!1;const{config:d}=l.fields;switch(_.value){case h.HOST_PORT_CE:case h.HOST_PORT_EE:return!!d.host&&d.host.length>0&&!!d.port&&d.port>0;case h.CLUSTER:return!!d.cluster_nodes.length&&d.cluster_nodes.every(B=>B.ip.length>0);case h.SENTINEL:return!!d.sentinel_nodes.length&&d.sentinel_nodes.every(B=>B.host.length>0)&&!!((T=d.sentinel_master)!=null&&T.length)&&d.sentinel_role&&!!d.sentinel_role.length;default:throw new Error("Invalid redis type")}}),E=e.computed(()=>{switch(_.value){case h.HOST_PORT_CE:return{name:l.fields.name,type:l.fields.type,tags:C.stringToArray(l.fields.tags),config:{host:l.fields.config.host,port:C.int(l.fields.config.port),timeout:C.int(l.fields.config.timeout),username:C.str(l.fields.config.username,null),database:C.int(l.fields.config.database),password:C.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:C.str(l.fields.config.server_name,null)}};case h.HOST_PORT_EE:return{name:l.fields.name,type:l.fields.type,tags:C.stringToArray(l.fields.tags),config:{connect_timeout:C.int(l.fields.config.connect_timeout),connection_is_proxied:l.fields.config.connection_is_proxied,database:C.int(l.fields.config.database),host:l.fields.config.host,keepalive_backlog:C.int(l.fields.config.keepalive_backlog),keepalive_pool_size:C.int(l.fields.config.keepalive_pool_size),password:C.str(l.fields.config.password,null),port:C.int(l.fields.config.port),read_timeout:C.int(l.fields.config.read_timeout),send_timeout:C.int(l.fields.config.send_timeout),server_name:C.str(l.fields.config.server_name,null),ssl_verify:l.fields.config.ssl_verify,ssl:l.fields.config.ssl,username:C.str(l.fields.config.username,null),cluster_nodes:null,cluster_max_redirections:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null}};case h.CLUSTER:return{name:l.fields.name,type:l.fields.type,tags:C.stringToArray(l.fields.tags),config:{cluster_nodes:C.removeIdClusterNodes(l.fields.config.cluster_nodes),cluster_max_redirections:C.int(l.fields.config.cluster_max_redirections),username:C.str(l.fields.config.username,null),password:C.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:C.str(l.fields.config.server_name,null),connect_timeout:C.int(l.fields.config.connect_timeout),database:C.int(l.fields.config.database),send_timeout:C.int(l.fields.config.send_timeout),read_timeout:C.int(l.fields.config.read_timeout),keepalive_pool_size:C.int(l.fields.config.keepalive_pool_size),keepalive_backlog:C.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null,host:null,port:null}};case h.SENTINEL:return{name:l.fields.name,type:l.fields.type,tags:C.stringToArray(l.fields.tags),config:{sentinel_master:C.str(l.fields.config.sentinel_master,null),sentinel_nodes:C.removeIdFromSentinelNodes(l.fields.config.sentinel_nodes),sentinel_role:C.str(l.fields.config.sentinel_role,null),sentinel_username:C.str(l.fields.config.sentinel_username,null),sentinel_password:C.str(l.fields.config.sentinel_password,null),username:C.str(l.fields.config.username,null),password:C.str(l.fields.config.password,null),ssl:l.fields.config.ssl,ssl_verify:l.fields.config.ssl_verify,server_name:C.str(l.fields.config.server_name,null),database:C.int(l.fields.config.database),connect_timeout:C.int(l.fields.config.connect_timeout),send_timeout:C.int(l.fields.config.send_timeout),read_timeout:C.int(l.fields.config.read_timeout),keepalive_pool_size:C.int(l.fields.config.keepalive_pool_size),keepalive_backlog:C.int(l.fields.config.keepalive_backlog),connection_is_proxied:null,cluster_nodes:null,cluster_max_redirections:null,host:null,port:null}};default:throw new Error("Invalid redis type")}}),b=e.computed(()=>{let d=`${r.apiBaseUrl}${Ce.form[r.app][g.value]}`;return r.app==="konnect"?d=d.replace(/{controlPlaneId}/gi,(r==null?void 0:r.controlPlaneId)||""):r.app==="kongManager"&&(d=d.replace(/\/{workspace}/gi,r!=null&&r.workspace?`/${r.workspace}`:"")),d=d.replace(/{id}/gi,n||""),d}),s=e.computed(()=>{var d;return(d=Ce.form[r==null?void 0:r.app])==null?void 0:d.edit});return{form:l,canSubmit:y,payload:E,isEdit:o,redisType:_,redisTypeIsEnterprise:w,formType:g,fetchUrl:s,submit:async()=>{try{l.readonly=!0,l.errorMessage="";let d=E.value;return r.app==="konnect"&&(d={...d,config:C.removeNullValues(d.config)}),g.value===u.EntityBaseFormType.Create?await a.post(b.value,d):r.app==="konnect"?await a.put(b.value,d):await a.patch(b.value,d)}catch(d){throw l.errorMessage=p(d),l.readonly=!1,d}},setInitialFormValues:d=>{l.fields.config=Object.assign({},l.fields.config,C.removeNullValues(d.config)),l.fields.config.sentinel_nodes=C.addIdToSentinelNodes(d.config.sentinel_nodes??[]),l.fields.config.cluster_nodes=C.addIdToClusterNodes(d.config.cluster_nodes??[]),l.fields.name=d.name,l.fields.type=d.type,l.fields.tags=C.arrayToString(d.tags),_.value=Ie(d),c.value=JSON.parse(JSON.stringify(E.value))}}},Ko={class:"array-card-container"},qo=e.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0},disabled:{type:Boolean,default:!1}},emits:["remove-item"],setup(t){return(n,r)=>{const i=e.resolveComponent("KCard"),o=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",Ko,[e.createVNode(i,{class:"card"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),e.createVNode(o,{appearance:"tertiary",class:"array-card-remove-button",disabled:t.disabled,onClick:r[0]||(r[0]=a=>n.$emit("remove-item"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.TrashIcon))]),_:1},8,["disabled"])])}}}),K=(t,n)=>{const r=t.__vccOpts||t;for(const[i,o]of n)r[i]=o;return r},Lt=K(qo,[["__scopeId","data-v-a0b2e4fb"]]),zo={actions:{create:"New Redis Configuration",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",done:"Done",view:"View Details",loading:"Loading...",view_plugin:"View Plugin",close:"Close"},search:{placeholder:"Filter by name",placeholder_for_exact_match:"Filter by exact ID",no_results:"No results found"},delete:{title:"Delete Redis configuration",description:"You’re about to delete this item. Are you sure you want to proceed?",warning:"To delete this configuration, first remove it from all associated plugins."},errors:{copy:"Failed to copy to clipboard",general:"Redis configuration could not be retrieved",delete:"The redis configuration could not be deleted at this time."},copy:{success:"Copied {val} to clipboard"},form:{sections:{type:{title:"Redis type",description:"Both Enterprise and Open Source plugins support Redis. Enterprise plugins can connect to a standalone Redis instance (host/port), Cluster, or Sentinel, while Open Source plugins support only a simplified host/port configuration."},general:{title:"General information",description:"Name your Redis configuration."},connection:{title:"Connection settings",description:"Define the Redis server’s host, port, authentication, and timeout options for establishing a connection."},cluster:{title:"Cluster configuration",description:"Enables data sharding and distribution across multiple Redis nodes, allowing for scalability and load balancing."},tls:{title:"TLS settings",description:"Configure secure connections to Redis, including SSL and verification options."},keepalive:{title:"Keepalive configuration",description:"Keepalive reuses active connections to Redis, improving performance and efficiency."},read_write_configuration:{title:"Read/Write configuration",description:"Set timeouts for reading from and writing to the Redis server to control data transmission reliability."},sentinel_configuration:{title:"Sentinel configuration",description:"Manages Redis failover and high availability by connecting to Sentinel nodes that monitor and switch masters."}},fields:{type:{label:"Redis type"},name:{label:"Name",placeholder:"Enter unique name"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Route for grouping and filtering."},host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},database:{label:"Database",tooltip:"Database to use for the Redis connection."},password:{label:"Password",tooltip:"Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis."},username:{label:"Username",tooltip:"Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`."},ssl:{label:"SSL",description:"If set to true, uses SSL to connect to Redis.",tooltip:"If set to true, uses SSL to connect to Redis."},ssl_verify:{label:"SSL Verify",description:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong. conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ss1_verify_depth accordingly.",tooltip:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong.conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly."},server_name:{label:"Server name",tooltip:"A string representing an SNI (server name indication) value for TLS."},keepalive_backlog:{label:"Keepalive backlog",tooltip:"Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`."},keepalive_pool_size:{label:"Keepalive pool size",tooltip:"The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low."},read_timeout:{label:"Read timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},send_timeout:{label:"Send timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},connect_timeout:{label:"Connect timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},sentinel_master:{label:"Sentinel master",tooltip:"Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel."},sentinel_role:{label:"Sentinel role",tooltip:"Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel."},sentinel_username:{label:"Sentinel username",tooltip:"Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+."},sentinel_password:{label:"Sentinel password",tooltip:"Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels."},cluster_node_ip:{label:"IP",tooltip:"A string representing a host name, such as example.com."},cluster_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},cluster_max_redirections:{label:"Cluster max redirections",tooltip:"Maximum retry attempts for redirection."},timeout:{label:"Timeout",tooltip:"redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`"},connection_is_proxied:{label:"Connection is proxied",tooltip:"If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address."},cluster_nodes:{title:"Cluster nodes",tooltip:"Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_nodes:{title:"Sentinel nodes",tooltip:"Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_node_host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},sentinel_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."}},options:{type:{host_port:"Host/Port",cluster:"Cluster",sentinel:"Sentinel",open_source:"Open Source",enterprise:"Enterprise",suffix_open_source:" (Open Source)",suffix_enterprise:" (Enterprise)"},sentinel_role:{master:"master",slave:"slave",any:"any"}},edit_warning_modal:{title:"Edit Redis configuration",description:"This Redis configuration is connected to {pluginCount}. Any updates will take effect across all associated instances.",plugin_count:"{count} plugin(s)",confirm:"Confirm"}},linked_plugins_modal:{title:"Associated plugins ({count})",headers:{plugin:"Plugin",instance_name:"Name"}},redis:{title:"Redis Configurations",empty_state:{title:"Configure a Redis Configuration",description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing."}},list:{action:"New configuration",table_headers:{name:"Name",type:"Type",plugins:"Plugins",tags:"Tags"},empty_state:{description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing.",feature_1:{title:"Store your Redis configurations",description:"Define a Redis configuration once and use it across multiple plugins."},feature_2:{title:"Sync across plugins",description:"Edits to your configuration will be cascaded automatically to all associated plugins."}}}};function Wo(){const t=Xe.createI18n("en-us",zo);return{i18n:t,i18nT:Xe.i18nTComponent(t)}}const Y={useI18n:Wo},Go={class:"cluster-node-items"},Jo=K(e.defineComponent({__name:"ClusterNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=Y.useI18n(),i=()=>{n.value.push(Dt())},o=a=>{n.value.splice(a,1)};return(a,p)=>{const g=e.resolveComponent("KLabel"),l=e.resolveComponent("KInput"),c=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g,{class:"required",info:e.unref(r)("form.fields.cluster_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(_,w)=>(e.openBlock(),e.createBlock(Lt,{key:`${w}`,"data-testid":"redis-cluster-nodes",disabled:a.readonly,onRemoveItem:y=>o(w)},{default:e.withCtx(()=>[e.createElementVNode("div",Go,[e.createVNode(l,{modelValue:_.ip,"onUpdate:modelValue":y=>_.ip=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.cluster_node_ip.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_ip.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"ip",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(l,{modelValue:_.port,"onUpdate:modelValue":y=>_.port=y,label:e.unref(r)("form.fields.cluster_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(c,{appearance:"tertiary","data-testid":"redis-add-cluster-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-776a626d"]]),Yo={class:"sentinel-node-items"},Qo=K(e.defineComponent({__name:"SentinelNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=Y.useI18n(),i=()=>{n.value.push(Bt())},o=a=>{n.value.splice(a,1)};return(a,p)=>{const g=e.resolveComponent("KLabel"),l=e.resolveComponent("KInput"),c=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g,{class:"required",info:e.unref(r)("form.fields.sentinel_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(_,w)=>(e.openBlock(),e.createBlock(Lt,{key:_.id,"data-testid":"redis-sentinel-nodes",disabled:a.readonly,onRemoveItem:y=>o(w)},{default:e.withCtx(()=>[e.createElementVNode("div",Yo,[e.createVNode(l,{modelValue:_.host,"onUpdate:modelValue":y=>_.host=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.sentinel_node_host.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(l,{modelValue:_.port,"onUpdate:modelValue":y=>_.port=y,label:e.unref(r)("form.fields.sentinel_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(c,{appearance:"tertiary","data-testid":"redis-add-sentinel-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-cd1c07e2"]]);var Ke=new WeakMap,Mt=0;function Xo(t){if(!t.length)return"";for(var n="arg",r=0;r<t.length;++r){var i=void 0;t[r]===null||typeof t[r]!="object"&&typeof t[r]!="function"?typeof t[r]=="string"?i='"'+t[r]+'"':i=String(t[r]):Ke.has(t[r])?i=Ke.get(t[r]):(i=Mt,Ke.set(t[r],Mt++)),n+="@"+i}return n}function Zo(t){if(typeof t=="function")try{t=t()}catch{t=""}return Array.isArray(t)?t=Xo(t):t=String(t||""),t}var qe=function(){function t(n){n===void 0&&(n=0),this.items=new Map,this.ttl=n}return t.prototype.serializeKey=function(n){return Zo(n)},t.prototype.get=function(n){var r=this.serializeKey(n);return this.items.get(r)},t.prototype.set=function(n,r,i){var o=this.serializeKey(n),a=i||this.ttl,p=Date.now(),g={data:r,createdAt:p,expiresAt:a?p+a:1/0};this.dispatchExpire(a,g,o),this.items.set(o,g)},t.prototype.dispatchExpire=function(n,r,i){var o=this;n&&setTimeout(function(){var a=Date.now(),p=a>=r.expiresAt;p&&o.delete(i)},n)},t.prototype.delete=function(n){this.items.delete(n)},t}();function ei(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function ti(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var ni=function(t){return fetch(t).then(function(n){return n.json()})};const ze={isOnline:ei,isDocumentVisible:ti,fetcher:ni};var q=function(){return q=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},q.apply(this,arguments)},se=function(t,n,r,i){function o(a){return a instanceof r?a:new r(function(p){p(a)})}return new(r||(r=Promise))(function(a,p){function g(_){try{c(i.next(_))}catch(w){p(w)}}function l(_){try{c(i.throw(_))}catch(w){p(w)}}function c(_){_.done?a(_.value):o(_.value).then(g,l)}c((i=i.apply(t,n||[])).next())})},de=function(t,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return l([c,_])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,o&&(a=c[0]&2?o.return:c[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;switch(o=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=n.call(t,r)}catch(_){c=[6,_],o=0}finally{i=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ri=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i=r.call(t),o,a=[],p;try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(g){p={error:g}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(p)throw p.error}}return a},oi=function(t,n,r){if(r||arguments.length===2)for(var i=0,o=n.length,a;i<o;i++)(a||!(i in n))&&(a||(a=Array.prototype.slice.call(n,0,i)),a[i]=n[i]);return t.concat(a||Array.prototype.slice.call(n))},Ut=new qe,Pe=new qe,We=new qe,vt={cache:Ut,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:ze.fetcher,isOnline:ze.isOnline,isDocumentVisible:ze.isDocumentVisible};function ii(t,n,r){var i=Pe.get(t);if(i)i.data.push(n);else{var o=5e3;Pe.set(t,[n],r>0?r+o:r)}}function ai(t,n,r){if(r.isDocumentVisible()&&!(r.errorRetryCount!==void 0&&n>r.errorRetryCount)){var i=Math.min(n||0,r.errorRetryCount),o=i*r.errorRetryInterval;setTimeout(function(){t(null,{errorRetryCount:i+1,shouldRetryOnError:!0})},o)}}var jt=function(t,n,r,i){return r===void 0&&(r=Ut),i===void 0&&(i=vt.ttl),se(void 0,void 0,void 0,function(){var o,a,p,g,l,c,_;return de(this,function(w){switch(w.label){case 0:if(!si(n))return[3,5];w.label=1;case 1:return w.trys.push([1,3,,4]),[4,n];case 2:return o=w.sent(),[3,4];case 3:return g=w.sent(),a=g,[3,4];case 4:return[3,6];case 5:o=n,w.label=6;case 6:if(p=!1,l={data:o,error:a,isValidating:p},typeof o<"u")try{r.set(t,l,i)}catch(y){console.error("swrv(mutate): failed to set cache",y)}return c=Pe.get(t),c&&c.data.length&&(_=c.data.filter(function(y){return y.key===t}),_.forEach(function(y,E){typeof l.data<"u"&&(y.data=l.data),y.error=l.error,y.isValidating=l.isValidating;var b=E===_.length-1;b||delete _[E]}),_=_.filter(Boolean)),[2,l]}})})};function li(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o,a=q({},vt),p=!1,g=!1,l=e.getCurrentInstance(),c=(l==null?void 0:l.proxy)||l;if(!c)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var _=(c==null?void 0:c.$isServer)||!1;n.length>=1&&(i=n[0]),n.length>=2&&(o=n[1]),n.length>2&&(a=q(q({},a),n[2]));var w=_?a.serverTTL:a.ttl,y=typeof i=="function"?i:e.ref(i);typeof o>"u"&&(o=a.fetcher);var E=null;E||(E=e.reactive({data:void 0,error:void 0,isValidating:!0,key:null}));var b=function(d,T){return se(t,void 0,void 0,function(){var B,R,z,W,U,v,Q,j=this;return de(this,function(X){switch(X.label){case 0:return B=E.data===void 0,R=y.value,R?(z=a.cache.get(R),W=z&&z.data,E.isValidating=!0,W&&(E.data=W.data,E.error=W.error),U=d||o,!U||!a.isDocumentVisible()&&!B||(T==null?void 0:T.forceRevalidate)!==void 0&&!(T!=null&&T.forceRevalidate)?(E.isValidating=!1,[2]):z&&(v=!!(Date.now()-z.createdAt>=a.dedupingInterval||T!=null&&T.forceRevalidate),!v)?(E.isValidating=!1,[2]):(Q=function(){return se(j,void 0,void 0,function(){var L,ce,oe,fe;return de(this,function(Z){switch(Z.label){case 0:return L=We.get(R),L?[3,2]:(ce=Array.isArray(R)?R:[R],oe=U.apply(void 0,oi([],ri(ce),!1)),We.set(R,oe,a.dedupingInterval),[4,jt(R,oe,a.cache,w)]);case 1:return Z.sent(),[3,4];case 2:return[4,jt(R,L.data,a.cache,w)];case 3:Z.sent(),Z.label=4;case 4:return E.isValidating=!1,We.delete(R),E.error!==void 0&&(fe=!p&&a.shouldRetryOnError&&(T?T.shouldRetryOnError:!0),fe&&ai(b,T?T.errorRetryCount:1,a)),[2]}})})},W&&a.revalidateDebounce?(setTimeout(function(){return se(j,void 0,void 0,function(){return de(this,function(L){switch(L.label){case 0:return p?[3,2]:[4,Q()];case 1:L.sent(),L.label=2;case 2:return[2]}})})},a.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,Q()];case 2:X.sent(),X.label=3;case 3:return[2]}})})},s=function(){return se(t,void 0,void 0,function(){return de(this,function(d){return[2,b(null,{shouldRetryOnError:!1})]})})},S=null;e.onMounted(function(){var d=function(){return se(t,void 0,void 0,function(){return de(this,function(T){switch(T.label){case 0:return!E.error&&a.isOnline()?[4,b()]:[3,2];case 1:return T.sent(),[3,3];case 2:S&&clearTimeout(S),T.label=3;case 3:return a.refreshInterval&&!p&&(S=setTimeout(d,a.refreshInterval)),[2]}})})};a.refreshInterval&&(S=setTimeout(d,a.refreshInterval)),a.revalidateOnFocus&&(document.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1))}),e.onUnmounted(function(){p=!0,S&&clearTimeout(S),a.revalidateOnFocus&&(document.removeEventListener("visibilitychange",s,!1),window.removeEventListener("focus",s,!1));var d=Pe.get(y.value);d&&(d.data=d.data.filter(function(T){return T!==E}))});try{e.watch(y,function(d){e.isReadonly(y)||(y.value=d),E.key=d,E.isValidating=!!d,ii(y.value,E,w),!_&&!g&&y.value&&b(),g=!1},{immediate:!0})}catch{}var N=q(q({},e.toRefs(E)),{mutate:function(d,T){return b(d,q(q({},T),{forceRevalidate:!0}))}});return N}function si(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}function Ft(t){return`redis-partial-links-${t}`}const Te=t=>{const{axiosInstance:n}=u.useAxios(t.axiosRequestConfig);return{fetcher:async r=>{const{partialId:i,size:o,offset:a,query:p}=r;let g=`${t.apiBaseUrl}${Ce.links[t.app]}`;t.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:"")),g=g.replace(/{id}/gi,i||""),p&&(g=`${g}?${p}`);const{data:l}=await n.get(g,{params:{size:o,offset:a}});return l}}},Ht=t=>{const{partialId:n,config:r}=t,{fetcher:i}=Te(r),o=e.ref([]),{data:a}=li(Ft(n),()=>i({partialId:n}),{revalidateOnFocus:!1});return e.watch(a,()=>{var p;o.value=((p=a.value)==null?void 0:p.data)??[]}),o},di={class:"kong-ui-entities-redis-configurations-form"},ci=K(e.defineComponent({__name:"RedisConfigurationForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string")},partialId:{type:String,required:!1,default:""},actionTeleportTarget:{type:String},slidoutTopOffset:{type:Number,default:60},disabledPartialType:{type:String,default:""}},emits:["update","error","loading","cancel"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o},i18nT:a}=Y.useI18n(),p=Qe.useRouter(),g=e.ref(),l=e.ref(),c=(P,m)=>{g.value=P??"",l.value=m},_=P=>{var m;(m=l.value)==null||m.call(l,P),g.value=!1},w=e.computed(()=>[{label:o("form.options.type.host_port"),group:o("form.options.type.enterprise"),value:h.HOST_PORT_EE,selected:T.value===h.HOST_PORT_EE,disabled:!d&&r.disabledPartialType===M.REDIS_EE},{label:o("form.options.type.cluster"),group:o("form.options.type.enterprise"),value:h.CLUSTER,selected:T.value===h.CLUSTER,disabled:!d&&r.disabledPartialType===M.REDIS_EE},{label:o("form.options.type.sentinel"),group:o("form.options.type.enterprise"),value:h.SENTINEL,selected:T.value===h.SENTINEL,disabled:!d&&r.disabledPartialType===M.REDIS_EE},{label:o("form.options.type.host_port"),group:o("form.options.type.open_source"),value:h.HOST_PORT_CE,selected:T.value===h.HOST_PORT_CE,disabled:d&&B.value||!d&&r.disabledPartialType===M.REDIS_CE}]),y=[{label:o("form.options.sentinel_role.master"),value:"master"},{label:o("form.options.sentinel_role.slave"),value:"slave"},{label:o("form.options.sentinel_role.any"),value:"any"}],E=P=>{const m=P.value===h.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");return`${P.label}${m}`},b=()=>r.disabledPartialType&&Re(le)===r.disabledPartialType?r.disabledPartialType===M.REDIS_CE?h.HOST_PORT_EE:h.HOST_PORT_CE:le,{form:s,canSubmit:S,payload:N,isEdit:d,redisType:T,redisTypeIsEnterprise:B,fetchUrl:R,submit:z,setInitialFormValues:W}=Ho({partialId:r.partialId,defaultRedisType:b(),config:r.config}),{fetcher:U}=Te(r.config),v=e.ref(!1),Q=e.ref(!1),j=e.ref(0),X=async()=>{try{if(d&&!Q.value){const{count:m}=await U({partialId:r.partialId});if(j.value=m,m>0){v.value=!0;return}}const{data:P}=await z();i("update",P)}catch(P){i("error",P)}},L=()=>{v.value=!1,Q.value=!0,X()},ce=()=>{r.config.cancelRoute&&p.push(r.config.cancelRoute),i("cancel")},oe=P=>{i("loading",P)},fe=P=>{i("error",P)},Z=P=>{W(P)};return e.onBeforeMount(async()=>{if(d){const{count:P}=await U({partialId:r.partialId});j.value=P}}),(P,m)=>{const Je=e.resolveComponent("KAlert"),Ae=e.resolveComponent("KSelect"),A=e.resolveComponent("KInput"),k=e.resolveComponent("KCheckbox"),V=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",di,[e.createVNode(e.unref(u.EntityBaseForm),{"action-teleport-target":t.actionTeleportTarget,"can-submit":e.unref(S),config:t.config,"edit-id":t.partialId,"entity-type":e.unref(u.SupportedEntityType).RedisConfiguration,"error-message":e.unref(s).errorMessage,"fetch-url":e.unref(R),"form-fields":e.unref(N),"is-readonly":e.unref(s).readonly,"slidout-top-offset":t.slidoutTopOffset,onCancel:ce,"onFetch:error":fe,"onFetch:success":Z,onLoading:oe,onSubmit:X},{default:e.withCtx(()=>[j.value>0&&e.unref(d)?(e.openBlock(),e.createBlock(Je,{key:0,appearance:"warning",class:"warning-alert","data-testid":"redis-update-warning-alert"},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:j.value})),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-type-section",description:e.unref(o)("form.sections.type.description"),title:e.unref(o)("form.sections.type.title")},{default:e.withCtx(()=>[e.createVNode(Ae,{modelValue:e.unref(T),"onUpdate:modelValue":m[0]||(m[0]=f=>e.isRef(T)?T.value=f:null),"data-testid":"redis-type-select",disabled:e.unref(d)&&e.unref(T)===e.unref(h).HOST_PORT_CE,items:w.value,"kpop-attributes":{"data-testid":"redis-type-select-popover"},label:e.unref(o)("form.fields.type.label"),readonly:e.unref(s).readonly,required:""},{"selected-item-template":e.withCtx(({item:f})=>[e.createTextVNode(e.toDisplayString(E(f)),1)]),_:1},8,["modelValue","disabled","items","label","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-general-section",description:e.unref(o)("form.sections.general.description"),title:e.unref(o)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.name,"onUpdate:modelValue":m[1]||(m[1]=f=>e.unref(s).fields.name=f),modelModifiers:{trim:!0},"data-testid":"redis-name-input",disabled:e.unref(d),label:e.unref(o)("form.fields.name.label"),placeholder:e.unref(o)("form.fields.name.placeholder"),readonly:e.unref(s).readonly,required:""},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.tags,"onUpdate:modelValue":m[2]||(m[2]=f=>e.unref(s).fields.tags=f),modelModifiers:{trim:!0},"data-testid":"redis-tags-input",help:e.unref(o)("form.fields.tags.help"),label:e.unref(o)("form.fields.tags.label"),"label-attributes":{info:e.unref(o)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(o)("form.fields.tags.placeholder"),readonly:e.unref(s).readonly},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.unref(T)===e.unref(h).SENTINEL?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:1,"data-testid":"redis-sentinel-configuration-section",description:e.unref(o)("form.sections.sentinel_configuration.description"),title:e.unref(o)("form.sections.sentinel_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_master,"onUpdate:modelValue":m[3]||(m[3]=f=>e.unref(s).fields.config.sentinel_master=f),"data-testid":"redis-sentinel-master-input",label:e.unref(o)("form.fields.sentinel_master.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_master.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(Ae,{modelValue:e.unref(s).fields.config.sentinel_role,"onUpdate:modelValue":m[4]||(m[4]=f=>e.unref(s).fields.config.sentinel_role=f),"data-testid":"redis-sentinel-role-select",items:y,"kpop-attributes":{"data-testid":"redis-sentinel-role-select-popover"},label:e.unref(o)("form.fields.sentinel_role.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(Qo,{modelValue:e.unref(s).fields.config.sentinel_nodes,"onUpdate:modelValue":m[5]||(m[5]=f=>e.unref(s).fields.config.sentinel_nodes=f),readonly:e.unref(s).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_username,"onUpdate:modelValue":m[6]||(m[6]=f=>e.unref(s).fields.config.sentinel_username=f),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_username.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(ue.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:f=>e.unref(s).fields.config.sentinel_username=f,value:e.unref(s).fields.config.sentinel_username,onOpen:m[7]||(m[7]=(f,$)=>c(f,$))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.sentinel_password,"onUpdate:modelValue":m[8]||(m[8]=f=>e.unref(s).fields.config.sentinel_password=f),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_password.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(ue.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:f=>e.unref(s).fields.config.sentinel_password=f,value:e.unref(s).fields.config.sentinel_password,onOpen:m[9]||(m[9]=(f,$)=>c(f,$))},null,8,["disabled","update","value"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(T)===e.unref(h).CLUSTER?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:2,"data-testid":"redis-cluster-configuration-section",description:e.unref(o)("form.sections.cluster.description"),title:e.unref(o)("form.sections.cluster.title")},{default:e.withCtx(()=>[e.createVNode(Jo,{modelValue:e.unref(s).fields.config.cluster_nodes,"onUpdate:modelValue":m[10]||(m[10]=f=>e.unref(s).fields.config.cluster_nodes=f),readonly:e.unref(s).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.cluster_max_redirections,"onUpdate:modelValue":m[11]||(m[11]=f=>e.unref(s).fields.config.cluster_max_redirections=f),"data-testid":"redis-cluster-max-redirections-input",label:e.unref(o)("form.fields.cluster_max_redirections.label"),"label-attributes":{info:e.unref(o)("form.fields.cluster_max_redirections.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-connection-configuration-section",description:e.unref(o)("form.sections.connection.description"),title:e.unref(o)("form.sections.connection.title")},{default:e.withCtx(()=>[e.unref(T)===e.unref(h).HOST_PORT_CE||e.unref(T)===e.unref(h).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:0,modelValue:e.unref(s).fields.config.host,"onUpdate:modelValue":m[12]||(m[12]=f=>e.unref(s).fields.config.host=f),modelModifiers:{trim:!0},"data-testid":"redis-host-input",label:e.unref(o)("form.fields.host.label"),"label-attributes":{info:e.unref(o)("form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(T)===e.unref(h).HOST_PORT_CE||e.unref(T)===e.unref(h).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:1,modelValue:e.unref(s).fields.config.port,"onUpdate:modelValue":m[13]||(m[13]=f=>e.unref(s).fields.config.port=f),modelModifiers:{trim:!0},"data-testid":"redis-port-input",label:e.unref(o)("form.fields.port.label"),"label-attributes":{info:e.unref(o)("form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(T)===e.unref(h).HOST_PORT_EE?(e.openBlock(),e.createBlock(k,{key:2,modelValue:e.unref(s).fields.config.connection_is_proxied,"onUpdate:modelValue":m[14]||(m[14]=f=>e.unref(s).fields.config.connection_is_proxied=f),"data-testid":"redis-connection-is-proxied-checkbox",disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.connection_is_proxied.label"),"label-attributes":{info:e.unref(o)("form.fields.connection_is_proxied.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","disabled","label","label-attributes"])):e.createCommentVNode("",!0),e.unref(T)===e.unref(h).HOST_PORT_CE?(e.openBlock(),e.createBlock(A,{key:3,modelValue:e.unref(s).fields.config.timeout,"onUpdate:modelValue":m[15]||(m[15]=f=>e.unref(s).fields.config.timeout=f),modelModifiers:{trim:!0},"data-testid":"redis-timeout-input",label:e.unref(o)("form.fields.timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.createVNode(A,{modelValue:e.unref(s).fields.config.database,"onUpdate:modelValue":m[16]||(m[16]=f=>e.unref(s).fields.config.database=f),modelModifiers:{trim:!0},"data-testid":"redis-database-input",label:e.unref(o)("form.fields.database.label"),"label-attributes":{info:e.unref(o)("form.fields.database.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.username,"onUpdate:modelValue":m[17]||(m[17]=f=>e.unref(s).fields.config.username=f),modelModifiers:{trim:!0},"data-testid":"redis-username-input",label:e.unref(o)("form.fields.username.label"),"label-attributes":{info:e.unref(o)("form.fields.username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(ue.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:f=>e.unref(s).fields.config.username=f,value:e.unref(s).fields.config.username,onOpen:m[18]||(m[18]=(f,$)=>c(f,$))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.password,"onUpdate:modelValue":m[19]||(m[19]=f=>e.unref(s).fields.config.password=f),modelModifiers:{trim:!0},"data-testid":"redis-password-input",label:e.unref(o)("form.fields.password.label"),"label-attributes":{info:e.unref(o)("form.fields.password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(ue.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(s).readonly,update:f=>e.unref(s).fields.config.password=f,value:e.unref(s).fields.config.password,onOpen:m[20]||(m[20]=(f,$)=>c(f,$))},null,8,["disabled","update","value"])]),_:1},8,["description","title"]),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-tls-configuration-section",description:e.unref(o)("form.sections.tls.description"),title:e.unref(o)("form.sections.tls.title")},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:e.unref(s).fields.config.ssl,"onUpdate:modelValue":m[21]||(m[21]=f=>e.unref(s).fields.config.ssl=f),"data-testid":"redis-ssl-checkbox",description:e.unref(o)("form.fields.ssl.description"),disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.ssl.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(k,{modelValue:e.unref(s).fields.config.ssl_verify,"onUpdate:modelValue":m[22]||(m[22]=f=>e.unref(s).fields.config.ssl_verify=f),"data-testid":"redis-ssl-verify-checkbox",description:e.unref(o)("form.fields.ssl_verify.description"),disabled:e.unref(s).readonly,label:e.unref(o)("form.fields.ssl_verify.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl_verify.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.server_name,"onUpdate:modelValue":m[23]||(m[23]=f=>e.unref(s).fields.config.server_name=f),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.server_name.label"),"label-attributes":{info:e.unref(o)("form.fields.server_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"]),e.unref(T)!==e.unref(h).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:3,"data-testid":"redis-keepalive-section",description:e.unref(o)("form.sections.keepalive.description"),title:e.unref(o)("form.sections.keepalive.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.keepalive_backlog,"onUpdate:modelValue":m[24]||(m[24]=f=>e.unref(s).fields.config.keepalive_backlog=f),"data-testid":"redis-keepalive-backlog-input",label:e.unref(o)("form.fields.keepalive_backlog.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_backlog.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.keepalive_pool_size,"onUpdate:modelValue":m[25]||(m[25]=f=>e.unref(s).fields.config.keepalive_pool_size=f),"data-testid":"redis-keepalive-pool-size-input",label:e.unref(o)("form.fields.keepalive_pool_size.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_pool_size.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(T)!==e.unref(h).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:4,"data-testid":"redis-read-write-configuration-section",description:e.unref(o)("form.sections.read_write_configuration.description"),title:e.unref(o)("form.sections.read_write_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(s).fields.config.read_timeout,"onUpdate:modelValue":m[26]||(m[26]=f=>e.unref(s).fields.config.read_timeout=f),"data-testid":"redis-read-timeout-input",label:e.unref(o)("form.fields.read_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.send_timeout,"onUpdate:modelValue":m[27]||(m[27]=f=>e.unref(s).fields.config.send_timeout=f),"data-testid":"redis-send-timeout-input",label:e.unref(o)("form.fields.send_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.send_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(s).fields.config.connect_timeout,"onUpdate:modelValue":m[28]||(m[28]=f=>e.unref(s).fields.config.connect_timeout=f),"data-testid":"redis-connect-timeout-input",label:e.unref(o)("form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(s).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0)]),_:1},8,["action-teleport-target","can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","slidout-top-offset"])]),e.createVNode(e.unref(ue.VaultSecretPicker),{config:r.config,setup:g.value,onCancel:m[29]||(m[29]=()=>g.value=!1),onProceed:_},null,8,["config","setup"]),e.createVNode(V,{"action-button-text":e.unref(o)("form.edit_warning_modal.confirm"),"data-testid":"redis-update-warning-modal","hide-cancel-button":"","max-width":"640",title:e.unref(o)("form.edit_warning_modal.title"),visible:v.value,onCancel:m[30]||(m[30]=f=>v.value=!1),onProceed:L},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:j.value})),1)]),_:1})]),_:1},8,["action-button-text","title","visible"])],64)}}}),[["__scopeId","data-v-6f2877e0"]]),fi="#00abd2",ui="24px",pi={class:"linked-plugins","data-testid":"linked-plugins-inline"},Ge=7,mi=K(e.defineComponent({__name:"LinkedPluginsInline",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},partialId:{type:String,required:!0}},setup(t){const n=t,r=Ht({config:n.config,partialId:n.partialId});return(i,o)=>{const a=e.resolveComponent("KBadge");return e.openBlock(),e.createElementBlock("div",pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).slice(0,Ge),p=>(e.openBlock(),e.createBlock(e.unref(Ze.PluginIcon),{key:p.id,name:p.name,size:24},null,8,["name"]))),128)),e.unref(r).length-Ge>0?(e.openBlock(),e.createBlock(a,{key:0,appearance:"info"},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(e.unref(r).length-Ge),1)]),_:1})):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-c39556bc"]]),gi={class:"plugin-item"},_i=K(e.defineComponent({__name:"PluginItem",props:{pluginName:{}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createVNode(e.unref(Ze.PluginIcon),{name:n.pluginName,size:24},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(n.pluginName),1)]))}}),[["__scopeId","data-v-de964dc4"]]),yi={class:"toolbar-container"},Kt=K(e.defineComponent({__name:"LinkedPluginList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},isExactMatch:{type:Boolean,default:!1},filterBarEnabled:{type:Boolean,default:!1},partialId:{type:String,required:!0}},emits:["view-plugin","load"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=Y.useI18n(),a=[{key:"name",label:o("linked_plugins_modal.headers.plugin")},{key:"instance_name",label:o("linked_plugins_modal.headers.instance_name")},{key:"actions",hideLabel:!0}],{fetcher:p}=Te(r.config),g=e.ref(0),l=async y=>{const{data:E,count:b}=await p({partialId:r.partialId,size:y.pageSize,offset:y.offset,query:y.query});g.value=b;const s={total:b,data:E};return i("load",s),s},c=e.ref(""),_=e.computed(()=>r.config.app==="konnect"||r.isExactMatch?{isExactMatch:!0}:{isExactMatch:!1,fields:{name:{searchable:!0}},schema:{name:{type:"text"}}}),w=y=>{i("view-plugin",{id:y.id,plugin:y.name})};return(y,E)=>{const b=e.resolveComponent("KDropdownItem"),s=e.resolveComponent("KTableData");return e.openBlock(),e.createBlock(s,{"cache-identifier":e.unref(Ft)(t.partialId),fetcher:l,headers:a,"hide-pagination-when-optional":"","pagination-attributes":{totalCount:g.value,disablePageJump:!0},"search-input":c.value},e.createSlots({name:e.withCtx(({rowValue:S})=>[e.createVNode(_i,{"plugin-name":S},null,8,["plugin-name"])]),"action-items":e.withCtx(({row:S})=>[e.createVNode(b,{onClick:N=>w(S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("actions.view_plugin")),1)]),_:2},1032,["onClick"])]),_:2},[t.filterBarEnabled?{name:"toolbar",fn:e.withCtx(()=>[e.createElementVNode("div",yi,[e.createVNode(e.unref(u.EntityFilter),{modelValue:c.value,"onUpdate:modelValue":E[0]||(E[0]=S=>c.value=S),config:_.value},null,8,["modelValue","config"])])]),key:"0"}:void 0]),1032,["cache-identifier","pagination-attributes","search-input"])}}}),[["__scopeId","data-v-50856d03"]]),bi={class:"linked-plugins-modal","data-testid":"linked-plugins-modal"},hi=K(e.defineComponent({__name:"LinkedPluginListModal",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},redisConfigurationId:{type:String,required:!0},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","proceed","view-plugin"],setup(t,{emit:n}){const r=n,{i18n:{t:i}}=Y.useI18n(),o=e.ref(0),a=e.computed(()=>i("linked_plugins_modal.title",{count:o.value})),p=()=>{r("cancel")},g=()=>{r("proceed")};return(l,c)=>{const _=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock("div",bi,[e.createVNode(_,{"action-button-text":e.unref(i)("actions.done"),"hide-cancel-button":"",title:a.value,visible:t.visible,onCancel:p,onProceed:g},{default:e.withCtx(()=>[e.createVNode(Kt,{config:t.config,"partial-id":t.redisConfigurationId,onLoad:c[0]||(c[0]=({total:w})=>o.value=w),onViewPlugin:c[1]||(c[1]=w=>r("view-plugin",w))},null,8,["config","partial-id"])]),_:1},8,["action-button-text","title","visible"])])}}}),[["__scopeId","data-v-6148b8bd"]]),qt=e.defineComponent({__name:"DeleteWarningModal",props:{visible:{type:Boolean,required:!0}},emits:["close"],setup(t,{emit:n}){const{i18n:{t:r}}=Y.useI18n(),i=n,o=()=>{i("close")};return(a,p)=>{const g=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(g,{"action-button-text":e.unref(r)("actions.close"),"data-testid":"remove-links-modal","hide-cancel-button":"","max-width":"640",title:e.unref(r)("delete.title"),visible:t.visible,onCancel:o,onProceed:o},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("delete.warning")),1)]),_:1},8,["action-button-text","title","visible"])}}}),Ci={class:"kong-ui-entities-partials-list"},Ti={class:"empty-state-icon-gateway"},wi=K(e.defineComponent({__name:"RedisConfigurationList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute)},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},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["click:learn-more","click:plugin","copy:error","copy:success","delete:success","error"],setup(t,{emit:n}){var A;const r=n,i=t,o=e.computed(()=>{var V,f;let k=`${i.config.apiBaseUrl}${Ce.list[i.config.app]}`;return i.config.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,((V=i.config)==null?void 0:V.controlPlaneId)||""):i.config.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,(f=i.config)!=null&&f.workspace?`/${i.config.workspace}`:"")),k}),a=e.ref(!1),p=e.ref(""),g=e.ref(null),l=e.ref(void 0),c=e.ref(!1),_=e.ref(!1),w=e.ref(""),y=e.ref(!1),E=u.useDeleteUrlBuilder(i.config,o.value),b=e.ref(1),s=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),{fetcher:S,fetcherState:N}=u.useFetcher(i.config,o),{i18n:{t:d}}=Y.useI18n(),{axiosInstance:T}=u.useAxios((A=i.config)==null?void 0:A.axiosRequestConfig),B=Qe.useRouter(),R=e.ref(""),z=e.computed(()=>{const k=i.config.app==="konnect"||i.config.isExactMatch;if(k)return{isExactMatch:!0,placeholder:d("search.placeholder_for_exact_match")};const{name:V}=v;return{isExactMatch:k,fields:{name:V},schema:i.config.filterSchema}}),{fetcher:W}=Te(i.config),U=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${d("redis.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:d("redis.title")}),v={name:{label:d("list.table_headers.name"),searchable:!0,hidable:!1,sortable:!0},type:{label:d("list.table_headers.type")},tags:{label:d("list.table_headers.tags")},plugins:{label:d("list.table_headers.plugins")}},Q=k=>({label:d("actions.view"),to:i.config.getViewRoute(k)}),j=k=>({label:d("actions.edit"),to:i.config.getEditRoute(k)}),X=async k=>{const{count:V}=await W({partialId:k.id});V>0?y.value=!0:(l.value=k,c.value=!0)},L=()=>{R.value=""},ce=async k=>{var f;await((f=i.canRetrieve)==null?void 0:f.call(i,k))&&B.push(i.config.getViewRoute(k.id))},oe=()=>{c.value=!1},fe=k=>{p.value=k,a.value=!0},Z=async()=>{var k,V,f;if((k=l.value)!=null&&k.id){_.value=!0;try{await T.delete(E(l.value.id)),_.value=!1,c.value=!1,P(),r("delete:success",l.value)}catch($){w.value=((f=(V=$.response)==null?void 0:V.data)==null?void 0:f.message)||$.message||d("errors.delete"),r("error",$)}finally{_.value=!1}}},P=()=>{b.value++},m=k=>{switch(Ie(k)){case h.HOST_PORT_CE:return`${d("form.options.type.host_port")}${d("form.options.type.suffix_open_source")}`;case h.HOST_PORT_EE:return`${d("form.options.type.host_port")}${d("form.options.type.suffix_enterprise")}`;case h.SENTINEL:return`${d("form.options.type.sentinel")}${d("form.options.type.suffix_enterprise")}`;case h.CLUSTER:return`${d("form.options.type.cluster")}${d("form.options.type.suffix_enterprise")}`}},Je=()=>{B.push(i.config.createRoute)},Ae=async(k,V)=>{const f=k.id;if(!await V(f)){r("copy:error",{entity:k,field:"id",message:d("errors.copy")});return}r("copy:success",{entity:k,field:"id",message:d("copy.success",{val:f})})};return e.watch(N,k=>{var V,f,$;if(k.status===u.FetcherStatus.Error){g.value={title:d("errors.general")},($=(f=(V=k.error)==null?void 0:V.response)==null?void 0:f.data)!=null&&$.message&&(g.value.message=k.error.response.data.message),r("error",k.error);return}g.value=null}),e.watch(i.canCreate,async k=>{await k?U.value.ctaText=d("actions.create"):U.value.ctaText=void 0},{immediate:!0}),(k,V)=>{const f=e.resolveComponent("KButton"),$=e.resolveComponent("KDropdownItem"),Vi=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Ci,[e.createVNode(e.unref(u.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":s.value,"empty-state-options":U.value,"enable-entity-actions":"","error-message":g.value,fetcher:e.unref(S),"fetcher-cache-key":b.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-redis-configuration-list",query:R.value,"table-headers":v,onClearSearchInput:L,"onClick:row":V[2]||(V[2]=O=>ce(O)),onSort:P},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(u.EntityFilter),{modelValue:R.value,"onUpdate:modelValue":V[0]||(V[0]=O=>R.value=O),config:z.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!t.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":t.canCreate},{default:e.withCtx(()=>[e.createVNode(f,{appearance:"primary","data-testid":"toolbar-add-redis-configuration",size:"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(d)("actions.create")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:O})=>[e.createElementVNode("b",null,e.toDisplayString(O??"-"),1)]),type:e.withCtx(({row:O})=>[e.createTextVNode(e.toDisplayString(m(O)),1)]),tags:e.withCtx(({rowValue:O})=>[e.createVNode(e.unref(u.TableTags),{tags:O},null,8,["tags"])]),plugins:e.withCtx(({row:O})=>[e.createVNode(mi,{config:t.config,"partial-id":O.id,onClick:e.withModifiers(Ye=>fe(O.id),["stop"])},null,8,["config","partial-id","onClick"])]),actions:e.withCtx(({row:O})=>[e.createVNode(Vi,null,{default:e.withCtx(({copyToClipboard:Ye})=>[e.createVNode($,{"data-testid":"action-entity-copy-id",onClick:qi=>Ae(O,Ye)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(O)},{default:e.withCtx(()=>[e.createVNode($,{"data-testid":"action-entity-view","has-divider":"",item:Q(O.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canEdit(O)},{default:e.withCtx(()=>[e.createVNode($,{"data-testid":"action-entity-edit",item:j(O.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canDelete(O)},{default:e.withCtx(()=>[e.createVNode($,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:Ye=>X(O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[t.enableV2EmptyStates?{name:"empty-state",fn:e.withCtx(()=>[e.createVNode(e.unref(u.EntityEmptyState),{"action-button-text":e.unref(d)("list.action"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":"redis-entity-empty-state",description:e.unref(d)("list.empty_state.description"),features:[{title:e.unref(d)("list.empty_state.feature_1.title"),description:e.unref(d)("list.empty_state.feature_1.description")},{title:e.unref(d)("list.empty_state.feature_2.title"),description:e.unref(d)("list.empty_state.feature_2.description")}],title:e.unref(d)("redis.title"),"onClick:create":Je,"onClick:learnMore":V[1]||(V[1]=()=>r("click:learn-more"))},{image:e.withCtx(()=>[e.createElementVNode("div",Ti,[e.createVNode(e.unref(ee.DeployIcon),{color:e.unref(fi),size:e.unref(ui)},null,8,["color","size"])])]),"feature-0-icon":e.withCtx(()=>[e.createVNode(e.unref(ee.ClipboardIcon))]),"feature-1-icon":e.withCtx(()=>[e.createVNode(e.unref(ee.RefreshIcon))]),_:1},8,["action-button-text","can-create","description","features","title"])]),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query"]),e.createVNode(qt,{visible:y.value,onClose:V[3]||(V[3]=O=>y.value=!1)},null,8,["visible"]),e.createVNode(e.unref(u.EntityDeleteModal),{"action-pending":_.value,description:e.unref(d)("delete.description"),"entity-name":l.value&&(l.value.name||l.value.id),"entity-type":e.unref(u.EntityTypes).RedisConfiguration,error:w.value,"need-confirmation":!0,title:e.unref(d)("delete.title"),visible:c.value,onCancel:oe,onProceed:Z},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),e.createVNode(hi,{config:t.config,"redis-configuration-id":p.value,visible:a.value,onCancel:V[4]||(V[4]=O=>a.value=!1),onProceed:V[5]||(V[5]=O=>a.value=!1),onViewPlugin:V[6]||(V[6]=O=>r("click:plugin",O))},null,8,["config","redis-configuration-id","visible"])])}}}),[["__scopeId","data-v-dc83ade9"]]),Ei={class:"kong-ui-consumer-group-entity-config-card"},ki=e.defineComponent({__name:"RedisConfigurationConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!0}},emits:["loading","fetch:error","fetch:success"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=Y.useI18n(),a=e.computed(()=>Ce.form[r.config.app].edit),p=e.ref(le),g=b=>{p.value=Ie(b),i("fetch:success",b)},l=e.computed(()=>{const b=p.value===h.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");let s="";switch(p.value){case h.HOST_PORT_CE:s=o("form.options.type.host_port");break;case h.HOST_PORT_EE:s=o("form.options.type.host_port");break;case h.CLUSTER:s=o("form.options.type.cluster");break;case h.SENTINEL:s=o("form.options.type.sentinel");break}return`${s}${b}`}),c=b=>({id:b.id,name:b.name,tags:b.tags,created_at:b.created_at,updated_at:b.updated_at,type:b.type,...b.config}),_=b=>{const{id:s,name:S,created_at:N,updated_at:d,type:T,tags:B,...R}=b;return{id:s,name:S,tags:B,created_at:N,updated_at:d,type:T,config:R}},w={id:{},name:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.name.label")},tags:{type:u.ConfigurationSchemaType.BadgeTag,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.tags.label"),tooltip:o("form.fields.tags.tooltip")},updated_at:{},created_at:{},type:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.type.label")},cluster_max_redirections:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.cluster_max_redirections.tooltip"),label:o("form.fields.cluster_max_redirections.label")},cluster_nodes:{type:u.ConfigurationSchemaType.JsonArray,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.cluster_nodes.title"),tooltip:o("form.fields.cluster_nodes.tooltip")},connect_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.connect_timeout.label"),tooltip:o("form.fields.connect_timeout.tooltip")},connection_is_proxied:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.connection_is_proxied.label"),tooltip:o("form.fields.connection_is_proxied.tooltip")},database:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.database.label"),tooltip:o("form.fields.database.tooltip")},host:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.host.label"),tooltip:o("form.fields.host.tooltip")},keepalive_backlog:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_backlog.label"),tooltip:o("form.fields.keepalive_backlog.tooltip")},keepalive_pool_size:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_pool_size.label"),tooltip:o("form.fields.keepalive_pool_size.tooltip")},password:{type:u.ConfigurationSchemaType.Redacted,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.password.label"),tooltip:o("form.fields.password.tooltip")},port:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.port.label"),tooltip:o("form.fields.port.tooltip")},read_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.read_timeout.label"),tooltip:o("form.fields.read_timeout.tooltip")},send_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.send_timeout.label"),tooltip:o("form.fields.send_timeout.tooltip")},sentinel_master:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_master.label"),tooltip:o("form.fields.sentinel_master.tooltip")},sentinel_nodes:{type:u.ConfigurationSchemaType.JsonArray,section:u.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.sentinel_nodes.tooltip")},sentinel_password:{type:u.ConfigurationSchemaType.Redacted,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_password.label"),tooltip:o("form.fields.sentinel_password.tooltip")},sentinel_role:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_role.label"),tooltip:o("form.fields.sentinel_role.tooltip")},sentinel_username:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_username.label"),tooltip:o("form.fields.sentinel_username.tooltip")},server_name:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.server_name.label"),tooltip:o("form.fields.server_name.tooltip")},ssl_verify:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl_verify.label"),tooltip:o("form.fields.ssl_verify.tooltip")},ssl:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl.label"),tooltip:o("form.fields.ssl.tooltip")},timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.timeout.label"),tooltip:o("form.fields.timeout.tooltip")},username:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.username.label"),tooltip:o("form.fields.username.tooltip")}},y=b=>{const s={},S=Object.keys(w);for(const N of S)b.includes(N)?s[N]={...w[N],order:b.indexOf(N)+1}:s[N]={...w[N],hidden:!0};return s},E=e.computed(()=>{const b=["id","name","tags","type","updated_at","created_at"];switch(p.value){case h.HOST_PORT_CE:return y([...b,"host","port","timeout","database","username","password","ssl","ssl_verify","server_name"]);case h.HOST_PORT_EE:return y([...b,"host","port","connection_is_proxied","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case h.CLUSTER:return y([...b,"cluster_nodes","cluster_max_redirections","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case h.SENTINEL:return y([...b,"sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);default:throw new Error("Invalid Redis type")}});return(b,s)=>(e.openBlock(),e.createElementBlock("div",Ei,[e.createVNode(e.unref(u.EntityBaseConfigCard),{"code-block-record-formatter":_,config:t.config,"config-card-doc":t.configCardDoc,"config-schema":E.value,"entity-type":e.unref(u.SupportedEntityType).RedisConfiguration,"fetch-url":a.value,"hide-title":t.hideTitle,"record-resolver":c,"onFetch:error":s[0]||(s[0]=S=>b.$emit("fetch:error",S)),"onFetch:success":g,onLoading:s[1]||(s[1]=S=>b.$emit("loading",S))},{type:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(l.value),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),Si={useLinkedPlugins:Ht,useLinkedPluginsFetcher:Te};x.DeleteWarningModal=qt,x.LinkedPlugins=Kt,x.PartialType=M,x.RedisConfigurationConfigCard=ki,x.RedisConfigurationForm=ci,x.RedisConfigurationList=wi,x.RedisType=h,x.composables=Si,x.constants=jo,x.helpers=Fo,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-redis-configurations",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-redis-configurations.umd.js",
|
|
6
6
|
"module": "./dist/entities-redis-configurations.es.js",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"axios": "^1.7.7",
|
|
29
29
|
"vue": "^3.5.12",
|
|
30
30
|
"vue-router": "^4.4.5",
|
|
31
|
+
"@kong-ui-public/entities-shared": "^3.26.3",
|
|
31
32
|
"@kong-ui-public/entities-plugins-icon": "^1.1.0",
|
|
32
|
-
"@kong-ui-public/entities-
|
|
33
|
-
"@kong-ui-public/entities-vaults": "^3.22.7",
|
|
33
|
+
"@kong-ui-public/entities-vaults": "^3.22.9",
|
|
34
34
|
"@kong-ui-public/i18n": "^2.3.2"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@kong/icons": "^1.31.0",
|
|
55
55
|
"@kong/kongponents": "9.34.2",
|
|
56
|
-
"axios": "^1.
|
|
56
|
+
"axios": "^1.11.0",
|
|
57
57
|
"vue": ">= 3.3.13 < 4",
|
|
58
58
|
"vue-router": "^4.4.5",
|
|
59
|
-
"@kong-ui-public/entities-shared": "^3.26.1",
|
|
60
|
-
"@kong-ui-public/entities-vaults": "^3.22.7",
|
|
61
59
|
"@kong-ui-public/entities-plugins-icon": "^1.1.0",
|
|
60
|
+
"@kong-ui-public/entities-shared": "^3.26.3",
|
|
61
|
+
"@kong-ui-public/entities-vaults": "^3.22.9",
|
|
62
62
|
"@kong-ui-public/i18n": "^2.3.2"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|