@kong-ui-public/forms 4.23.13 → 4.23.15-pr.2755.4df3622f7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/forms.es.js +2 -2
- package/dist/forms.umd.js +1 -1
- package/package.json +5 -5
package/dist/forms.es.js
CHANGED
|
@@ -402,7 +402,7 @@ const Ne = "kong-ui-forms-api", ll = "kong-ui-forms-config", dl = "redis-partial
|
|
|
402
402
|
UPDATE_ENTITY: "UPDATE_ENTITY",
|
|
403
403
|
SET_REFERRAL_VALUE: "SET_REFERRAL_VALUE"
|
|
404
404
|
}, ul = "—";
|
|
405
|
-
/*! @license DOMPurify 3.3.
|
|
405
|
+
/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
|
|
406
406
|
const {
|
|
407
407
|
entries: za,
|
|
408
408
|
setPrototypeOf: qi,
|
|
@@ -555,7 +555,7 @@ const Vt = {
|
|
|
555
555
|
function Ya() {
|
|
556
556
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Rl();
|
|
557
557
|
const t = (K) => Ya(K);
|
|
558
|
-
if (t.version = "3.3.
|
|
558
|
+
if (t.version = "3.3.3", t.removed = [], !e || !e.document || e.document.nodeType !== Vt.document || !e.Element)
|
|
559
559
|
return t.isSupported = !1, t;
|
|
560
560
|
let {
|
|
561
561
|
document: n
|
package/dist/forms.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(D,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/i18n"),require("@kong/icons"),require("axios"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","@kong/icons","axios","@kong-ui-public/entities-shared"],t):(D=typeof globalThis<"u"?globalThis:D||self,t(D["kong-ui-public-forms"]={},D.Vue,D["kong-ui-public-i18n"],D.KongIcons,D.axios,D["kong-ui-public-entities-shared"]))})(this,function(D,t,me,Te,oi,Mt){"use strict";function Un(e,n){for(var o=-1,a=e==null?0:e.length;++o<a&&n(e[o],o,e)!==!1;);return e}function ai(e){return function(n,o,a){for(var i=-1,r=Object(n),l=a(n),s=l.length;s--;){var c=l[++i];if(o(r[c],c,r)===!1)break}return n}}var ii=ai();function ri(e,n){for(var o=-1,a=Array(e);++o<e;)a[o]=n(o);return a}var Pn=typeof global=="object"&&global&&global.Object===Object&&global,li=typeof self=="object"&&self&&self.Object===Object&&self,ye=Pn||li||Function("return this")(),Le=ye.Symbol,$n=Object.prototype,si=$n.hasOwnProperty,di=$n.toString,ct=Le?Le.toStringTag:void 0;function ci(e){var n=si.call(e,ct),o=e[ct];try{e[ct]=void 0;var a=!0}catch{}var i=di.call(e);return a&&(n?e[ct]=o:delete e[ct]),i}var mi=Object.prototype,ui=mi.toString;function fi(e){return ui.call(e)}var hi="[object Null]",pi="[object Undefined]",vn=Le?Le.toStringTag:void 0;function Ue(e){return e==null?e===void 0?pi:hi:vn&&vn in Object(e)?ci(e):fi(e)}function Pe(e){return e!=null&&typeof e=="object"}var gi="[object Arguments]";function xn(e){return Pe(e)&&Ue(e)==gi}var jn=Object.prototype,yi=jn.hasOwnProperty,bi=jn.propertyIsEnumerable,_i=xn(function(){return arguments}())?xn:function(e){return Pe(e)&&yi.call(e,"callee")&&!bi.call(e,"callee")},$e=Array.isArray;function Ei(){return!1}var Kn=typeof D=="object"&&D&&!D.nodeType&&D,qn=Kn&&typeof module=="object"&&module&&!module.nodeType&&module,Ti=qn&&qn.exports===Kn,zn=Ti?ye.Buffer:void 0,Si=zn?zn.isBuffer:void 0,Hn=Si||Ei,Ci=9007199254740991,wi=/^(?:0|[1-9]\d*)$/;function Gn(e,n){var o=typeof e;return n=n??Ci,!!n&&(o=="number"||o!="symbol"&&wi.test(e))&&e>-1&&e%1==0&&e<n}var ki=9007199254740991;function Yn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ki}var Mi="[object Arguments]",Ai="[object Array]",Ni="[object Boolean]",Ii="[object Date]",Oi="[object Error]",Vi="[object Function]",Bi="[object Map]",Fi="[object Number]",Ri="[object Object]",Di="[object RegExp]",Li="[object Set]",Ui="[object String]",Pi="[object WeakMap]",$i="[object ArrayBuffer]",vi="[object DataView]",xi="[object Float32Array]",ji="[object Float64Array]",Ki="[object Int8Array]",qi="[object Int16Array]",zi="[object Int32Array]",Hi="[object Uint8Array]",Gi="[object Uint8ClampedArray]",Yi="[object Uint16Array]",Wi="[object Uint32Array]",K={};K[xi]=K[ji]=K[Ki]=K[qi]=K[zi]=K[Hi]=K[Gi]=K[Yi]=K[Wi]=!0,K[Mi]=K[Ai]=K[$i]=K[Ni]=K[vi]=K[Ii]=K[Oi]=K[Vi]=K[Bi]=K[Fi]=K[Ri]=K[Di]=K[Li]=K[Ui]=K[Pi]=!1;function Zi(e){return Pe(e)&&Yn(e.length)&&!!K[Ue(e)]}function Jt(e){return function(n){return e(n)}}var Wn=typeof D=="object"&&D&&!D.nodeType&&D,mt=Wn&&typeof module=="object"&&module&&!module.nodeType&&module,Xi=mt&&mt.exports===Wn,Qt=Xi&&Pn.process,Je=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||Qt&&Qt.binding&&Qt.binding("util")}catch{}}(),Zn=Je&&Je.isTypedArray,Ji=Zn?Jt(Zn):Zi,Qi=Object.prototype,er=Qi.hasOwnProperty;function Xn(e,n){var o=$e(e),a=!o&&_i(e),i=!o&&!a&&Hn(e),r=!o&&!a&&!i&&Ji(e),l=o||a||i||r,s=l?ri(e.length,String):[],c=s.length;for(var m in e)(n||er.call(e,m))&&!(l&&(m=="length"||i&&(m=="offset"||m=="parent")||r&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Gn(m,c)))&&s.push(m);return s}var tr=Object.prototype;function en(e){var n=e&&e.constructor,o=typeof n=="function"&&n.prototype||tr;return e===o}function Jn(e,n){return function(o){return e(n(o))}}var nr=Jn(Object.keys,Object),or=Object.prototype,ar=or.hasOwnProperty;function ir(e){if(!en(e))return nr(e);var n=[];for(var o in Object(e))ar.call(e,o)&&o!="constructor"&&n.push(o);return n}function ue(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var rr="[object AsyncFunction]",lr="[object Function]",sr="[object GeneratorFunction]",dr="[object Proxy]";function x(e){if(!ue(e))return!1;var n=Ue(e);return n==lr||n==sr||n==rr||n==dr}function At(e){return e!=null&&Yn(e.length)&&!x(e)}function Nt(e){return At(e)?Xn(e):ir(e)}function cr(e,n){return e&&ii(e,n,Nt)}function mr(e,n){return function(o,a){if(o==null)return o;if(!At(o))return e(o,a);for(var i=o.length,r=-1,l=Object(o);++r<i&&a(l[r],r,l)!==!1;);return o}}var ur=mr(cr);function tn(e){return e}function fr(e){return typeof e=="function"?e:tn}function ie(e,n){var o=$e(e)?Un:ur;return o(e,fr(n))}var hr="[object Symbol]";function It(e){return typeof e=="symbol"||Pe(e)&&Ue(e)==hr}var pr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gr=/^\w*$/;function yr(e,n){if($e(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||It(e)?!0:gr.test(e)||!pr.test(e)||n!=null&&e in Object(n)}var nn=ye["__core-js_shared__"],Qn=function(){var e=/[^.]+$/.exec(nn&&nn.keys&&nn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function br(e){return!!Qn&&Qn in e}var _r=Function.prototype,Er=_r.toString;function Ke(e){if(e!=null){try{return Er.call(e)}catch{}try{return e+""}catch{}}return""}var Tr=/[\\^$.*+?()[\]{}|]/g,Sr=/^\[object .+?Constructor\]$/,Cr=Function.prototype,wr=Object.prototype,kr=Cr.toString,Mr=wr.hasOwnProperty,Ar=RegExp("^"+kr.call(Mr).replace(Tr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nr(e){if(!ue(e)||br(e))return!1;var n=x(e)?Ar:Sr;return n.test(Ke(e))}function Ir(e,n){return e==null?void 0:e[n]}function qe(e,n){var o=Ir(e,n);return Nr(o)?o:void 0}var ut=qe(Object,"create");function Or(){this.__data__=ut?ut(null):{},this.size=0}function Vr(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Br="__lodash_hash_undefined__",Fr=Object.prototype,Rr=Fr.hasOwnProperty;function Dr(e){var n=this.__data__;if(ut){var o=n[e];return o===Br?void 0:o}return Rr.call(n,e)?n[e]:void 0}var Lr=Object.prototype,Ur=Lr.hasOwnProperty;function Pr(e){var n=this.__data__;return ut?n[e]!==void 0:Ur.call(n,e)}var $r="__lodash_hash_undefined__";function vr(e,n){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=ut&&n===void 0?$r:n,this}function ze(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}ze.prototype.clear=Or,ze.prototype.delete=Vr,ze.prototype.get=Dr,ze.prototype.has=Pr,ze.prototype.set=vr;function xr(){this.__data__=[],this.size=0}function Ot(e,n){return e===n||e!==e&&n!==n}function Vt(e,n){for(var o=e.length;o--;)if(Ot(e[o][0],n))return o;return-1}var jr=Array.prototype,Kr=jr.splice;function qr(e){var n=this.__data__,o=Vt(n,e);if(o<0)return!1;var a=n.length-1;return o==a?n.pop():Kr.call(n,o,1),--this.size,!0}function zr(e){var n=this.__data__,o=Vt(n,e);return o<0?void 0:n[o][1]}function Hr(e){return Vt(this.__data__,e)>-1}function Gr(e,n){var o=this.__data__,a=Vt(o,e);return a<0?(++this.size,o.push([e,n])):o[a][1]=n,this}function Ae(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}Ae.prototype.clear=xr,Ae.prototype.delete=qr,Ae.prototype.get=zr,Ae.prototype.has=Hr,Ae.prototype.set=Gr;var ft=qe(ye,"Map");function Yr(){this.size=0,this.__data__={hash:new ze,map:new(ft||Ae),string:new ze}}function Wr(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Bt(e,n){var o=e.__data__;return Wr(n)?o[typeof n=="string"?"string":"hash"]:o.map}function Zr(e){var n=Bt(this,e).delete(e);return this.size-=n?1:0,n}function Xr(e){return Bt(this,e).get(e)}function Jr(e){return Bt(this,e).has(e)}function Qr(e,n){var o=Bt(this,e),a=o.size;return o.set(e,n),this.size+=o.size==a?0:1,this}function Ne(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}Ne.prototype.clear=Yr,Ne.prototype.delete=Zr,Ne.prototype.get=Xr,Ne.prototype.has=Jr,Ne.prototype.set=Qr;var el="Expected a function";function on(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(el);var o=function(){var a=arguments,i=n?n.apply(this,a):a[0],r=o.cache;if(r.has(i))return r.get(i);var l=e.apply(this,a);return o.cache=r.set(i,l)||r,l};return o.cache=new(on.Cache||Ne),o}on.Cache=Ne;var tl=500;function nl(e){var n=on(e,function(a){return o.size===tl&&o.clear(),a}),o=n.cache;return n}var ol=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,al=/\\(\\)?/g,il=nl(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(ol,function(o,a,i,r){n.push(i?r.replace(al,"$1"):a||o)}),n});function rl(e,n){for(var o=-1,a=e==null?0:e.length,i=Array(a);++o<a;)i[o]=n(e[o],o,e);return i}var eo=Le?Le.prototype:void 0,to=eo?eo.toString:void 0;function no(e){if(typeof e=="string")return e;if($e(e))return rl(e,no)+"";if(It(e))return to?to.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function oo(e){return e==null?"":no(e)}function ll(e,n){return $e(e)?e:yr(e,n)?[e]:il(oo(e))}function sl(e){if(typeof e=="string"||It(e))return e;var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function dl(e,n){n=ll(n,e);for(var o=0,a=n.length;e!=null&&o<a;)e=e[sl(n[o++])];return o&&o==a?e:void 0}function v(e,n,o){var a=e==null?void 0:dl(e,n);return a===void 0?o:a}function Y(e){return e==null}const fe="kong-ui-forms-api",ao="kong-ui-forms-config",io="redis-partial-list-fetcher-key",cl="redis-partial-info",He="autofill",he="autofillSlot",Se={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"},ro="—";/*! @license DOMPurify 3.3.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.2/LICENSE */const{entries:lo,setPrototypeOf:so,isFrozen:ml,getPrototypeOf:ul,getOwnPropertyDescriptor:fl}=Object;let{freeze:re,seal:be,create:Ft}=Object,{apply:an,construct:rn}=typeof Reflect<"u"&&Reflect;re||(re=function(n){return n}),be||(be=function(n){return n}),an||(an=function(n,o){for(var a=arguments.length,i=new Array(a>2?a-2:0),r=2;r<a;r++)i[r-2]=arguments[r];return n.apply(o,i)}),rn||(rn=function(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return new n(...a)});const Rt=se(Array.prototype.forEach),hl=se(Array.prototype.lastIndexOf),co=se(Array.prototype.pop),ht=se(Array.prototype.push),pl=se(Array.prototype.splice),Dt=se(String.prototype.toLowerCase),ln=se(String.prototype.toString),sn=se(String.prototype.match),pt=se(String.prototype.replace),gl=se(String.prototype.indexOf),yl=se(String.prototype.trim),pe=se(Object.prototype.hasOwnProperty),le=se(RegExp.prototype.test),gt=bl(TypeError);function se(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return an(e,n,a)}}function bl(e){return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return rn(e,o)}}function L(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Dt;so&&so(e,null);let a=n.length;for(;a--;){let i=n[a];if(typeof i=="string"){const r=o(i);r!==i&&(ml(n)||(n[a]=r),i=r)}e[i]=!0}return e}function _l(e){for(let n=0;n<e.length;n++)pe(e,n)||(e[n]=null);return e}function we(e){const n=Ft(null);for(const[o,a]of lo(e))pe(e,o)&&(Array.isArray(a)?n[o]=_l(a):a&&typeof a=="object"&&a.constructor===Object?n[o]=we(a):n[o]=a);return n}function yt(e,n){for(;e!==null;){const a=fl(e,n);if(a){if(a.get)return se(a.get);if(typeof a.value=="function")return se(a.value)}e=ul(e)}function o(){return null}return o}const mo=re(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dn=re(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),cn=re(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),El=re(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mn=re(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Tl=re(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),uo=re(["#text"]),fo=re(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),un=re(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ho=re(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lt=re(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Sl=be(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Cl=be(/<%[\w\W]*|[\w\W]*%>/gm),wl=be(/\$\{[\w\W]*/gm),kl=be(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ml=be(/^aria-[\-\w]+$/),po=be(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Al=be(/^(?:\w+script|data):/i),Nl=be(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),go=be(/^html$/i),Il=be(/^[a-z][.\w]*(-[.\w]+)+$/i);var yo=Object.freeze({__proto__:null,ARIA_ATTR:Ml,ATTR_WHITESPACE:Nl,CUSTOM_ELEMENT:Il,DATA_ATTR:kl,DOCTYPE_NAME:go,ERB_EXPR:Cl,IS_ALLOWED_URI:po,IS_SCRIPT_OR_DATA:Al,MUSTACHE_EXPR:Sl,TMPLIT_EXPR:wl});const bt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ol=function(){return typeof window>"u"?null:window},Vl=function(n,o){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let a=null;const i="data-tt-policy-suffix";o&&o.hasAttribute(i)&&(a=o.getAttribute(i));const r="dompurify"+(a?"#"+a:"");try{return n.createPolicy(r,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},bo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _o(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ol();const n=F=>_o(F);if(n.version="3.3.2",n.removed=[],!e||!e.document||e.document.nodeType!==bt.document||!e.Element)return n.isSupported=!1,n;let{document:o}=e;const a=o,i=a.currentScript,{DocumentFragment:r,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:m,NamedNodeMap:g=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:_}=e,M=c.prototype,y=yt(M,"cloneNode"),I=yt(M,"remove"),N=yt(M,"nextSibling"),U=yt(M,"childNodes"),V=yt(M,"parentNode");if(typeof l=="function"){const F=o.createElement("template");F.content&&F.content.ownerDocument&&(o=F.content.ownerDocument)}let C,k="";const{implementation:T,createNodeIterator:b,createDocumentFragment:w,getElementsByTagName:A}=o,{importNode:u}=a;let p=bo();n.isSupported=typeof lo=="function"&&typeof V=="function"&&T&&T.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:S,ERB_EXPR:O,TMPLIT_EXPR:P,DATA_ATTR:te,ARIA_ATTR:Ve,IS_SCRIPT_OR_DATA:J,ATTR_WHITESPACE:Be,CUSTOM_ELEMENT:kn}=yo;let{IS_ALLOWED_URI:Kt}=yo,R=null;const H=L({},[...mo,...dn,...cn,...mn,...uo]);let Z=null;const La=L({},[...fo,...un,...ho,...Lt]);let X=Object.seal(Ft(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ct=null,qt=null;const je=Object.seal(Ft(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ua=!0,Mn=!0,Pa=!1,$a=!0,at=!1,zt=!0,Ze=!1,An=!1,Nn=!1,it=!1,Ht=!1,Gt=!1,va=!0,xa=!1;const xf="user-content-";let In=!0,wt=!1,rt={},ke=null;const On=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ja=null;const Ka=L({},["audio","video","img","source","image","track"]);let Vn=null;const qa=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Yt="http://www.w3.org/1998/Math/MathML",Wt="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let lt=Fe,Bn=!1,Fn=null;const jf=L({},[Yt,Wt,Fe],ln);let Zt=L({},["mi","mo","mn","ms","mtext"]),Xt=L({},["annotation-xml"]);const Kf=L({},["title","style","font","a","script"]);let kt=null;const qf=["application/xhtml+xml","text/html"],zf="text/html";let ee=null,st=null;const Hf=o.createElement("form"),za=function(d){return d instanceof RegExp||d instanceof Function},Rn=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(st&&st===d)){if((!d||typeof d!="object")&&(d={}),d=we(d),kt=qf.indexOf(d.PARSER_MEDIA_TYPE)===-1?zf:d.PARSER_MEDIA_TYPE,ee=kt==="application/xhtml+xml"?ln:Dt,R=pe(d,"ALLOWED_TAGS")?L({},d.ALLOWED_TAGS,ee):H,Z=pe(d,"ALLOWED_ATTR")?L({},d.ALLOWED_ATTR,ee):La,Fn=pe(d,"ALLOWED_NAMESPACES")?L({},d.ALLOWED_NAMESPACES,ln):jf,Vn=pe(d,"ADD_URI_SAFE_ATTR")?L(we(qa),d.ADD_URI_SAFE_ATTR,ee):qa,ja=pe(d,"ADD_DATA_URI_TAGS")?L(we(Ka),d.ADD_DATA_URI_TAGS,ee):Ka,ke=pe(d,"FORBID_CONTENTS")?L({},d.FORBID_CONTENTS,ee):On,Ct=pe(d,"FORBID_TAGS")?L({},d.FORBID_TAGS,ee):we({}),qt=pe(d,"FORBID_ATTR")?L({},d.FORBID_ATTR,ee):we({}),rt=pe(d,"USE_PROFILES")?d.USE_PROFILES:!1,Ua=d.ALLOW_ARIA_ATTR!==!1,Mn=d.ALLOW_DATA_ATTR!==!1,Pa=d.ALLOW_UNKNOWN_PROTOCOLS||!1,$a=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=d.SAFE_FOR_TEMPLATES||!1,zt=d.SAFE_FOR_XML!==!1,Ze=d.WHOLE_DOCUMENT||!1,it=d.RETURN_DOM||!1,Ht=d.RETURN_DOM_FRAGMENT||!1,Gt=d.RETURN_TRUSTED_TYPE||!1,Nn=d.FORCE_BODY||!1,va=d.SANITIZE_DOM!==!1,xa=d.SANITIZE_NAMED_PROPS||!1,In=d.KEEP_CONTENT!==!1,wt=d.IN_PLACE||!1,Kt=d.ALLOWED_URI_REGEXP||po,lt=d.NAMESPACE||Fe,Zt=d.MATHML_TEXT_INTEGRATION_POINTS||Zt,Xt=d.HTML_INTEGRATION_POINTS||Xt,X=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&za(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(X.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&za(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(X.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(X.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),at&&(Mn=!1),Ht&&(it=!0),rt&&(R=L({},uo),Z=Ft(null),rt.html===!0&&(L(R,mo),L(Z,fo)),rt.svg===!0&&(L(R,dn),L(Z,un),L(Z,Lt)),rt.svgFilters===!0&&(L(R,cn),L(Z,un),L(Z,Lt)),rt.mathMl===!0&&(L(R,mn),L(Z,ho),L(Z,Lt))),pe(d,"ADD_TAGS")||(je.tagCheck=null),pe(d,"ADD_ATTR")||(je.attributeCheck=null),d.ADD_TAGS&&(typeof d.ADD_TAGS=="function"?je.tagCheck=d.ADD_TAGS:(R===H&&(R=we(R)),L(R,d.ADD_TAGS,ee))),d.ADD_ATTR&&(typeof d.ADD_ATTR=="function"?je.attributeCheck=d.ADD_ATTR:(Z===La&&(Z=we(Z)),L(Z,d.ADD_ATTR,ee))),d.ADD_URI_SAFE_ATTR&&L(Vn,d.ADD_URI_SAFE_ATTR,ee),d.FORBID_CONTENTS&&(ke===On&&(ke=we(ke)),L(ke,d.FORBID_CONTENTS,ee)),d.ADD_FORBID_CONTENTS&&(ke===On&&(ke=we(ke)),L(ke,d.ADD_FORBID_CONTENTS,ee)),In&&(R["#text"]=!0),Ze&&L(R,["html","head","body"]),R.table&&(L(R,["tbody"]),delete Ct.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw gt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw gt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=d.TRUSTED_TYPES_POLICY,k=C.createHTML("")}else C===void 0&&(C=Vl(_,i)),C!==null&&typeof k=="string"&&(k=C.createHTML(""));re&&re(d),st=d}},Ha=L({},[...dn,...cn,...El]),Ga=L({},[...mn,...Tl]),Gf=function(d){let E=V(d);(!E||!E.tagName)&&(E={namespaceURI:lt,tagName:"template"});const B=Dt(d.tagName),q=Dt(E.tagName);return Fn[d.namespaceURI]?d.namespaceURI===Wt?E.namespaceURI===Fe?B==="svg":E.namespaceURI===Yt?B==="svg"&&(q==="annotation-xml"||Zt[q]):!!Ha[B]:d.namespaceURI===Yt?E.namespaceURI===Fe?B==="math":E.namespaceURI===Wt?B==="math"&&Xt[q]:!!Ga[B]:d.namespaceURI===Fe?E.namespaceURI===Wt&&!Xt[q]||E.namespaceURI===Yt&&!Zt[q]?!1:!Ga[B]&&(Kf[B]||!Ha[B]):!!(kt==="application/xhtml+xml"&&Fn[d.namespaceURI]):!1},Me=function(d){ht(n.removed,{element:d});try{V(d).removeChild(d)}catch{I(d)}},Xe=function(d,E){try{ht(n.removed,{attribute:E.getAttributeNode(d),from:E})}catch{ht(n.removed,{attribute:null,from:E})}if(E.removeAttribute(d),d==="is")if(it||Ht)try{Me(E)}catch{}else try{E.setAttribute(d,"")}catch{}},Ya=function(d){let E=null,B=null;if(Nn)d="<remove></remove>"+d;else{const Q=sn(d,/^[\r\n\t ]+/);B=Q&&Q[0]}kt==="application/xhtml+xml"&<===Fe&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");const q=C?C.createHTML(d):d;if(lt===Fe)try{E=new h().parseFromString(q,kt)}catch{}if(!E||!E.documentElement){E=T.createDocument(lt,"template",null);try{E.documentElement.innerHTML=Bn?k:q}catch{}}const ae=E.body||E.documentElement;return d&&B&&ae.insertBefore(o.createTextNode(B),ae.childNodes[0]||null),lt===Fe?A.call(E,Ze?"html":"body")[0]:Ze?E.documentElement:ae},Wa=function(d){return b.call(d.ownerDocument||d,d,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},Dn=function(d){return d instanceof f&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof g)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},Za=function(d){return typeof s=="function"&&d instanceof s};function Re(F,d,E){Rt(F,B=>{B.call(n,d,E,st)})}const Xa=function(d){let E=null;if(Re(p.beforeSanitizeElements,d,null),Dn(d))return Me(d),!0;const B=ee(d.nodeName);if(Re(p.uponSanitizeElement,d,{tagName:B,allowedTags:R}),zt&&d.hasChildNodes()&&!Za(d.firstElementChild)&&le(/<[/\w!]/g,d.innerHTML)&&le(/<[/\w!]/g,d.textContent)||d.nodeType===bt.progressingInstruction||zt&&d.nodeType===bt.comment&&le(/<[/\w]/g,d.data))return Me(d),!0;if(!(je.tagCheck instanceof Function&&je.tagCheck(B))&&(!R[B]||Ct[B])){if(!Ct[B]&&Qa(B)&&(X.tagNameCheck instanceof RegExp&&le(X.tagNameCheck,B)||X.tagNameCheck instanceof Function&&X.tagNameCheck(B)))return!1;if(In&&!ke[B]){const q=V(d)||d.parentNode,ae=U(d)||d.childNodes;if(ae&&q){const Q=ae.length;for(let ce=Q-1;ce>=0;--ce){const De=y(ae[ce],!0);De.__removalCount=(d.__removalCount||0)+1,q.insertBefore(De,N(d))}}}return Me(d),!0}return d instanceof c&&!Gf(d)||(B==="noscript"||B==="noembed"||B==="noframes")&&le(/<\/no(script|embed|frames)/i,d.innerHTML)?(Me(d),!0):(at&&d.nodeType===bt.text&&(E=d.textContent,Rt([S,O,P],q=>{E=pt(E,q," ")}),d.textContent!==E&&(ht(n.removed,{element:d.cloneNode()}),d.textContent=E)),Re(p.afterSanitizeElements,d,null),!1)},Ja=function(d,E,B){if(qt[E]||va&&(E==="id"||E==="name")&&(B in o||B in Hf))return!1;if(!(Mn&&!qt[E]&&le(te,E))){if(!(Ua&&le(Ve,E))){if(!(je.attributeCheck instanceof Function&&je.attributeCheck(E,d))){if(!Z[E]||qt[E]){if(!(Qa(d)&&(X.tagNameCheck instanceof RegExp&&le(X.tagNameCheck,d)||X.tagNameCheck instanceof Function&&X.tagNameCheck(d))&&(X.attributeNameCheck instanceof RegExp&&le(X.attributeNameCheck,E)||X.attributeNameCheck instanceof Function&&X.attributeNameCheck(E,d))||E==="is"&&X.allowCustomizedBuiltInElements&&(X.tagNameCheck instanceof RegExp&&le(X.tagNameCheck,B)||X.tagNameCheck instanceof Function&&X.tagNameCheck(B))))return!1}else if(!Vn[E]){if(!le(Kt,pt(B,Be,""))){if(!((E==="src"||E==="xlink:href"||E==="href")&&d!=="script"&&gl(B,"data:")===0&&ja[d])){if(!(Pa&&!le(J,pt(B,Be,"")))){if(B)return!1}}}}}}}return!0},Qa=function(d){return d!=="annotation-xml"&&sn(d,kn)},ei=function(d){Re(p.beforeSanitizeAttributes,d,null);const{attributes:E}=d;if(!E||Dn(d))return;const B={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0};let q=E.length;for(;q--;){const ae=E[q],{name:Q,namespaceURI:ce,value:De}=ae,dt=ee(Q),Ln=De;let oe=Q==="value"?Ln:yl(Ln);if(B.attrName=dt,B.attrValue=oe,B.keepAttr=!0,B.forceKeepAttr=void 0,Re(p.uponSanitizeAttribute,d,B),oe=B.attrValue,xa&&(dt==="id"||dt==="name")&&(Xe(Q,d),oe=xf+oe),zt&&le(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,oe)){Xe(Q,d);continue}if(dt==="attributename"&&sn(oe,"href")){Xe(Q,d);continue}if(B.forceKeepAttr)continue;if(!B.keepAttr){Xe(Q,d);continue}if(!$a&&le(/\/>/i,oe)){Xe(Q,d);continue}at&&Rt([S,O,P],ni=>{oe=pt(oe,ni," ")});const ti=ee(d.nodeName);if(!Ja(ti,dt,oe)){Xe(Q,d);continue}if(C&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!ce)switch(_.getAttributeType(ti,dt)){case"TrustedHTML":{oe=C.createHTML(oe);break}case"TrustedScriptURL":{oe=C.createScriptURL(oe);break}}if(oe!==Ln)try{ce?d.setAttributeNS(ce,Q,oe):d.setAttribute(Q,oe),Dn(d)?Me(d):co(n.removed)}catch{Xe(Q,d)}}Re(p.afterSanitizeAttributes,d,null)},Yf=function F(d){let E=null;const B=Wa(d);for(Re(p.beforeSanitizeShadowDOM,d,null);E=B.nextNode();)Re(p.uponSanitizeShadowNode,E,null),Xa(E),ei(E),E.content instanceof r&&F(E.content);Re(p.afterSanitizeShadowDOM,d,null)};return n.sanitize=function(F){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,B=null,q=null,ae=null;if(Bn=!F,Bn&&(F="<!-->"),typeof F!="string"&&!Za(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw gt("dirty is not a string, aborting")}else throw gt("toString is not a function");if(!n.isSupported)return F;if(An||Rn(d),n.removed=[],typeof F=="string"&&(wt=!1),wt){if(F.nodeName){const De=ee(F.nodeName);if(!R[De]||Ct[De])throw gt("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof s)E=Ya("<!---->"),B=E.ownerDocument.importNode(F,!0),B.nodeType===bt.element&&B.nodeName==="BODY"||B.nodeName==="HTML"?E=B:E.appendChild(B);else{if(!it&&!at&&!Ze&&F.indexOf("<")===-1)return C&&Gt?C.createHTML(F):F;if(E=Ya(F),!E)return it?null:Gt?k:""}E&&Nn&&Me(E.firstChild);const Q=Wa(wt?F:E);for(;q=Q.nextNode();)Xa(q),ei(q),q.content instanceof r&&Yf(q.content);if(wt)return F;if(it){if(Ht)for(ae=w.call(E.ownerDocument);E.firstChild;)ae.appendChild(E.firstChild);else ae=E;return(Z.shadowroot||Z.shadowrootmode)&&(ae=u.call(a,ae,!0)),ae}let ce=Ze?E.outerHTML:E.innerHTML;return Ze&&R["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&le(go,E.ownerDocument.doctype.name)&&(ce="<!DOCTYPE "+E.ownerDocument.doctype.name+`>
|
|
1
|
+
(function(D,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/i18n"),require("@kong/icons"),require("axios"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","@kong/icons","axios","@kong-ui-public/entities-shared"],t):(D=typeof globalThis<"u"?globalThis:D||self,t(D["kong-ui-public-forms"]={},D.Vue,D["kong-ui-public-i18n"],D.KongIcons,D.axios,D["kong-ui-public-entities-shared"]))})(this,function(D,t,me,Te,oi,Mt){"use strict";function Un(e,n){for(var o=-1,a=e==null?0:e.length;++o<a&&n(e[o],o,e)!==!1;);return e}function ai(e){return function(n,o,a){for(var i=-1,r=Object(n),l=a(n),s=l.length;s--;){var c=l[++i];if(o(r[c],c,r)===!1)break}return n}}var ii=ai();function ri(e,n){for(var o=-1,a=Array(e);++o<e;)a[o]=n(o);return a}var Pn=typeof global=="object"&&global&&global.Object===Object&&global,li=typeof self=="object"&&self&&self.Object===Object&&self,ye=Pn||li||Function("return this")(),Le=ye.Symbol,$n=Object.prototype,si=$n.hasOwnProperty,di=$n.toString,ct=Le?Le.toStringTag:void 0;function ci(e){var n=si.call(e,ct),o=e[ct];try{e[ct]=void 0;var a=!0}catch{}var i=di.call(e);return a&&(n?e[ct]=o:delete e[ct]),i}var mi=Object.prototype,ui=mi.toString;function fi(e){return ui.call(e)}var hi="[object Null]",pi="[object Undefined]",vn=Le?Le.toStringTag:void 0;function Ue(e){return e==null?e===void 0?pi:hi:vn&&vn in Object(e)?ci(e):fi(e)}function Pe(e){return e!=null&&typeof e=="object"}var gi="[object Arguments]";function xn(e){return Pe(e)&&Ue(e)==gi}var jn=Object.prototype,yi=jn.hasOwnProperty,bi=jn.propertyIsEnumerable,_i=xn(function(){return arguments}())?xn:function(e){return Pe(e)&&yi.call(e,"callee")&&!bi.call(e,"callee")},$e=Array.isArray;function Ei(){return!1}var Kn=typeof D=="object"&&D&&!D.nodeType&&D,qn=Kn&&typeof module=="object"&&module&&!module.nodeType&&module,Ti=qn&&qn.exports===Kn,zn=Ti?ye.Buffer:void 0,Si=zn?zn.isBuffer:void 0,Hn=Si||Ei,Ci=9007199254740991,wi=/^(?:0|[1-9]\d*)$/;function Gn(e,n){var o=typeof e;return n=n??Ci,!!n&&(o=="number"||o!="symbol"&&wi.test(e))&&e>-1&&e%1==0&&e<n}var ki=9007199254740991;function Yn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ki}var Mi="[object Arguments]",Ai="[object Array]",Ni="[object Boolean]",Ii="[object Date]",Oi="[object Error]",Vi="[object Function]",Bi="[object Map]",Fi="[object Number]",Ri="[object Object]",Di="[object RegExp]",Li="[object Set]",Ui="[object String]",Pi="[object WeakMap]",$i="[object ArrayBuffer]",vi="[object DataView]",xi="[object Float32Array]",ji="[object Float64Array]",Ki="[object Int8Array]",qi="[object Int16Array]",zi="[object Int32Array]",Hi="[object Uint8Array]",Gi="[object Uint8ClampedArray]",Yi="[object Uint16Array]",Wi="[object Uint32Array]",K={};K[xi]=K[ji]=K[Ki]=K[qi]=K[zi]=K[Hi]=K[Gi]=K[Yi]=K[Wi]=!0,K[Mi]=K[Ai]=K[$i]=K[Ni]=K[vi]=K[Ii]=K[Oi]=K[Vi]=K[Bi]=K[Fi]=K[Ri]=K[Di]=K[Li]=K[Ui]=K[Pi]=!1;function Zi(e){return Pe(e)&&Yn(e.length)&&!!K[Ue(e)]}function Jt(e){return function(n){return e(n)}}var Wn=typeof D=="object"&&D&&!D.nodeType&&D,mt=Wn&&typeof module=="object"&&module&&!module.nodeType&&module,Xi=mt&&mt.exports===Wn,Qt=Xi&&Pn.process,Je=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||Qt&&Qt.binding&&Qt.binding("util")}catch{}}(),Zn=Je&&Je.isTypedArray,Ji=Zn?Jt(Zn):Zi,Qi=Object.prototype,er=Qi.hasOwnProperty;function Xn(e,n){var o=$e(e),a=!o&&_i(e),i=!o&&!a&&Hn(e),r=!o&&!a&&!i&&Ji(e),l=o||a||i||r,s=l?ri(e.length,String):[],c=s.length;for(var m in e)(n||er.call(e,m))&&!(l&&(m=="length"||i&&(m=="offset"||m=="parent")||r&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Gn(m,c)))&&s.push(m);return s}var tr=Object.prototype;function en(e){var n=e&&e.constructor,o=typeof n=="function"&&n.prototype||tr;return e===o}function Jn(e,n){return function(o){return e(n(o))}}var nr=Jn(Object.keys,Object),or=Object.prototype,ar=or.hasOwnProperty;function ir(e){if(!en(e))return nr(e);var n=[];for(var o in Object(e))ar.call(e,o)&&o!="constructor"&&n.push(o);return n}function ue(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var rr="[object AsyncFunction]",lr="[object Function]",sr="[object GeneratorFunction]",dr="[object Proxy]";function x(e){if(!ue(e))return!1;var n=Ue(e);return n==lr||n==sr||n==rr||n==dr}function At(e){return e!=null&&Yn(e.length)&&!x(e)}function Nt(e){return At(e)?Xn(e):ir(e)}function cr(e,n){return e&&ii(e,n,Nt)}function mr(e,n){return function(o,a){if(o==null)return o;if(!At(o))return e(o,a);for(var i=o.length,r=-1,l=Object(o);++r<i&&a(l[r],r,l)!==!1;);return o}}var ur=mr(cr);function tn(e){return e}function fr(e){return typeof e=="function"?e:tn}function ie(e,n){var o=$e(e)?Un:ur;return o(e,fr(n))}var hr="[object Symbol]";function It(e){return typeof e=="symbol"||Pe(e)&&Ue(e)==hr}var pr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gr=/^\w*$/;function yr(e,n){if($e(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||It(e)?!0:gr.test(e)||!pr.test(e)||n!=null&&e in Object(n)}var nn=ye["__core-js_shared__"],Qn=function(){var e=/[^.]+$/.exec(nn&&nn.keys&&nn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function br(e){return!!Qn&&Qn in e}var _r=Function.prototype,Er=_r.toString;function Ke(e){if(e!=null){try{return Er.call(e)}catch{}try{return e+""}catch{}}return""}var Tr=/[\\^$.*+?()[\]{}|]/g,Sr=/^\[object .+?Constructor\]$/,Cr=Function.prototype,wr=Object.prototype,kr=Cr.toString,Mr=wr.hasOwnProperty,Ar=RegExp("^"+kr.call(Mr).replace(Tr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nr(e){if(!ue(e)||br(e))return!1;var n=x(e)?Ar:Sr;return n.test(Ke(e))}function Ir(e,n){return e==null?void 0:e[n]}function qe(e,n){var o=Ir(e,n);return Nr(o)?o:void 0}var ut=qe(Object,"create");function Or(){this.__data__=ut?ut(null):{},this.size=0}function Vr(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Br="__lodash_hash_undefined__",Fr=Object.prototype,Rr=Fr.hasOwnProperty;function Dr(e){var n=this.__data__;if(ut){var o=n[e];return o===Br?void 0:o}return Rr.call(n,e)?n[e]:void 0}var Lr=Object.prototype,Ur=Lr.hasOwnProperty;function Pr(e){var n=this.__data__;return ut?n[e]!==void 0:Ur.call(n,e)}var $r="__lodash_hash_undefined__";function vr(e,n){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=ut&&n===void 0?$r:n,this}function ze(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}ze.prototype.clear=Or,ze.prototype.delete=Vr,ze.prototype.get=Dr,ze.prototype.has=Pr,ze.prototype.set=vr;function xr(){this.__data__=[],this.size=0}function Ot(e,n){return e===n||e!==e&&n!==n}function Vt(e,n){for(var o=e.length;o--;)if(Ot(e[o][0],n))return o;return-1}var jr=Array.prototype,Kr=jr.splice;function qr(e){var n=this.__data__,o=Vt(n,e);if(o<0)return!1;var a=n.length-1;return o==a?n.pop():Kr.call(n,o,1),--this.size,!0}function zr(e){var n=this.__data__,o=Vt(n,e);return o<0?void 0:n[o][1]}function Hr(e){return Vt(this.__data__,e)>-1}function Gr(e,n){var o=this.__data__,a=Vt(o,e);return a<0?(++this.size,o.push([e,n])):o[a][1]=n,this}function Ae(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}Ae.prototype.clear=xr,Ae.prototype.delete=qr,Ae.prototype.get=zr,Ae.prototype.has=Hr,Ae.prototype.set=Gr;var ft=qe(ye,"Map");function Yr(){this.size=0,this.__data__={hash:new ze,map:new(ft||Ae),string:new ze}}function Wr(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Bt(e,n){var o=e.__data__;return Wr(n)?o[typeof n=="string"?"string":"hash"]:o.map}function Zr(e){var n=Bt(this,e).delete(e);return this.size-=n?1:0,n}function Xr(e){return Bt(this,e).get(e)}function Jr(e){return Bt(this,e).has(e)}function Qr(e,n){var o=Bt(this,e),a=o.size;return o.set(e,n),this.size+=o.size==a?0:1,this}function Ne(e){var n=-1,o=e==null?0:e.length;for(this.clear();++n<o;){var a=e[n];this.set(a[0],a[1])}}Ne.prototype.clear=Yr,Ne.prototype.delete=Zr,Ne.prototype.get=Xr,Ne.prototype.has=Jr,Ne.prototype.set=Qr;var el="Expected a function";function on(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(el);var o=function(){var a=arguments,i=n?n.apply(this,a):a[0],r=o.cache;if(r.has(i))return r.get(i);var l=e.apply(this,a);return o.cache=r.set(i,l)||r,l};return o.cache=new(on.Cache||Ne),o}on.Cache=Ne;var tl=500;function nl(e){var n=on(e,function(a){return o.size===tl&&o.clear(),a}),o=n.cache;return n}var ol=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,al=/\\(\\)?/g,il=nl(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(ol,function(o,a,i,r){n.push(i?r.replace(al,"$1"):a||o)}),n});function rl(e,n){for(var o=-1,a=e==null?0:e.length,i=Array(a);++o<a;)i[o]=n(e[o],o,e);return i}var eo=Le?Le.prototype:void 0,to=eo?eo.toString:void 0;function no(e){if(typeof e=="string")return e;if($e(e))return rl(e,no)+"";if(It(e))return to?to.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function oo(e){return e==null?"":no(e)}function ll(e,n){return $e(e)?e:yr(e,n)?[e]:il(oo(e))}function sl(e){if(typeof e=="string"||It(e))return e;var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function dl(e,n){n=ll(n,e);for(var o=0,a=n.length;e!=null&&o<a;)e=e[sl(n[o++])];return o&&o==a?e:void 0}function v(e,n,o){var a=e==null?void 0:dl(e,n);return a===void 0?o:a}function Y(e){return e==null}const fe="kong-ui-forms-api",ao="kong-ui-forms-config",io="redis-partial-list-fetcher-key",cl="redis-partial-info",He="autofill",he="autofillSlot",Se={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"},ro="—";/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:lo,setPrototypeOf:so,isFrozen:ml,getPrototypeOf:ul,getOwnPropertyDescriptor:fl}=Object;let{freeze:re,seal:be,create:Ft}=Object,{apply:an,construct:rn}=typeof Reflect<"u"&&Reflect;re||(re=function(n){return n}),be||(be=function(n){return n}),an||(an=function(n,o){for(var a=arguments.length,i=new Array(a>2?a-2:0),r=2;r<a;r++)i[r-2]=arguments[r];return n.apply(o,i)}),rn||(rn=function(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return new n(...a)});const Rt=se(Array.prototype.forEach),hl=se(Array.prototype.lastIndexOf),co=se(Array.prototype.pop),ht=se(Array.prototype.push),pl=se(Array.prototype.splice),Dt=se(String.prototype.toLowerCase),ln=se(String.prototype.toString),sn=se(String.prototype.match),pt=se(String.prototype.replace),gl=se(String.prototype.indexOf),yl=se(String.prototype.trim),pe=se(Object.prototype.hasOwnProperty),le=se(RegExp.prototype.test),gt=bl(TypeError);function se(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return an(e,n,a)}}function bl(e){return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return rn(e,o)}}function L(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Dt;so&&so(e,null);let a=n.length;for(;a--;){let i=n[a];if(typeof i=="string"){const r=o(i);r!==i&&(ml(n)||(n[a]=r),i=r)}e[i]=!0}return e}function _l(e){for(let n=0;n<e.length;n++)pe(e,n)||(e[n]=null);return e}function we(e){const n=Ft(null);for(const[o,a]of lo(e))pe(e,o)&&(Array.isArray(a)?n[o]=_l(a):a&&typeof a=="object"&&a.constructor===Object?n[o]=we(a):n[o]=a);return n}function yt(e,n){for(;e!==null;){const a=fl(e,n);if(a){if(a.get)return se(a.get);if(typeof a.value=="function")return se(a.value)}e=ul(e)}function o(){return null}return o}const mo=re(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dn=re(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),cn=re(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),El=re(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mn=re(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Tl=re(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),uo=re(["#text"]),fo=re(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),un=re(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ho=re(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lt=re(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Sl=be(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Cl=be(/<%[\w\W]*|[\w\W]*%>/gm),wl=be(/\$\{[\w\W]*/gm),kl=be(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ml=be(/^aria-[\-\w]+$/),po=be(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Al=be(/^(?:\w+script|data):/i),Nl=be(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),go=be(/^html$/i),Il=be(/^[a-z][.\w]*(-[.\w]+)+$/i);var yo=Object.freeze({__proto__:null,ARIA_ATTR:Ml,ATTR_WHITESPACE:Nl,CUSTOM_ELEMENT:Il,DATA_ATTR:kl,DOCTYPE_NAME:go,ERB_EXPR:Cl,IS_ALLOWED_URI:po,IS_SCRIPT_OR_DATA:Al,MUSTACHE_EXPR:Sl,TMPLIT_EXPR:wl});const bt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ol=function(){return typeof window>"u"?null:window},Vl=function(n,o){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let a=null;const i="data-tt-policy-suffix";o&&o.hasAttribute(i)&&(a=o.getAttribute(i));const r="dompurify"+(a?"#"+a:"");try{return n.createPolicy(r,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},bo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _o(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ol();const n=F=>_o(F);if(n.version="3.3.3",n.removed=[],!e||!e.document||e.document.nodeType!==bt.document||!e.Element)return n.isSupported=!1,n;let{document:o}=e;const a=o,i=a.currentScript,{DocumentFragment:r,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:m,NamedNodeMap:g=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:_}=e,M=c.prototype,y=yt(M,"cloneNode"),I=yt(M,"remove"),N=yt(M,"nextSibling"),U=yt(M,"childNodes"),V=yt(M,"parentNode");if(typeof l=="function"){const F=o.createElement("template");F.content&&F.content.ownerDocument&&(o=F.content.ownerDocument)}let C,k="";const{implementation:T,createNodeIterator:b,createDocumentFragment:w,getElementsByTagName:A}=o,{importNode:u}=a;let p=bo();n.isSupported=typeof lo=="function"&&typeof V=="function"&&T&&T.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:S,ERB_EXPR:O,TMPLIT_EXPR:P,DATA_ATTR:te,ARIA_ATTR:Ve,IS_SCRIPT_OR_DATA:J,ATTR_WHITESPACE:Be,CUSTOM_ELEMENT:kn}=yo;let{IS_ALLOWED_URI:Kt}=yo,R=null;const H=L({},[...mo,...dn,...cn,...mn,...uo]);let Z=null;const La=L({},[...fo,...un,...ho,...Lt]);let X=Object.seal(Ft(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ct=null,qt=null;const je=Object.seal(Ft(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ua=!0,Mn=!0,Pa=!1,$a=!0,at=!1,zt=!0,Ze=!1,An=!1,Nn=!1,it=!1,Ht=!1,Gt=!1,va=!0,xa=!1;const xf="user-content-";let In=!0,wt=!1,rt={},ke=null;const On=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ja=null;const Ka=L({},["audio","video","img","source","image","track"]);let Vn=null;const qa=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Yt="http://www.w3.org/1998/Math/MathML",Wt="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let lt=Fe,Bn=!1,Fn=null;const jf=L({},[Yt,Wt,Fe],ln);let Zt=L({},["mi","mo","mn","ms","mtext"]),Xt=L({},["annotation-xml"]);const Kf=L({},["title","style","font","a","script"]);let kt=null;const qf=["application/xhtml+xml","text/html"],zf="text/html";let ee=null,st=null;const Hf=o.createElement("form"),za=function(d){return d instanceof RegExp||d instanceof Function},Rn=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(st&&st===d)){if((!d||typeof d!="object")&&(d={}),d=we(d),kt=qf.indexOf(d.PARSER_MEDIA_TYPE)===-1?zf:d.PARSER_MEDIA_TYPE,ee=kt==="application/xhtml+xml"?ln:Dt,R=pe(d,"ALLOWED_TAGS")?L({},d.ALLOWED_TAGS,ee):H,Z=pe(d,"ALLOWED_ATTR")?L({},d.ALLOWED_ATTR,ee):La,Fn=pe(d,"ALLOWED_NAMESPACES")?L({},d.ALLOWED_NAMESPACES,ln):jf,Vn=pe(d,"ADD_URI_SAFE_ATTR")?L(we(qa),d.ADD_URI_SAFE_ATTR,ee):qa,ja=pe(d,"ADD_DATA_URI_TAGS")?L(we(Ka),d.ADD_DATA_URI_TAGS,ee):Ka,ke=pe(d,"FORBID_CONTENTS")?L({},d.FORBID_CONTENTS,ee):On,Ct=pe(d,"FORBID_TAGS")?L({},d.FORBID_TAGS,ee):we({}),qt=pe(d,"FORBID_ATTR")?L({},d.FORBID_ATTR,ee):we({}),rt=pe(d,"USE_PROFILES")?d.USE_PROFILES:!1,Ua=d.ALLOW_ARIA_ATTR!==!1,Mn=d.ALLOW_DATA_ATTR!==!1,Pa=d.ALLOW_UNKNOWN_PROTOCOLS||!1,$a=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=d.SAFE_FOR_TEMPLATES||!1,zt=d.SAFE_FOR_XML!==!1,Ze=d.WHOLE_DOCUMENT||!1,it=d.RETURN_DOM||!1,Ht=d.RETURN_DOM_FRAGMENT||!1,Gt=d.RETURN_TRUSTED_TYPE||!1,Nn=d.FORCE_BODY||!1,va=d.SANITIZE_DOM!==!1,xa=d.SANITIZE_NAMED_PROPS||!1,In=d.KEEP_CONTENT!==!1,wt=d.IN_PLACE||!1,Kt=d.ALLOWED_URI_REGEXP||po,lt=d.NAMESPACE||Fe,Zt=d.MATHML_TEXT_INTEGRATION_POINTS||Zt,Xt=d.HTML_INTEGRATION_POINTS||Xt,X=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&za(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(X.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&za(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(X.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(X.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),at&&(Mn=!1),Ht&&(it=!0),rt&&(R=L({},uo),Z=Ft(null),rt.html===!0&&(L(R,mo),L(Z,fo)),rt.svg===!0&&(L(R,dn),L(Z,un),L(Z,Lt)),rt.svgFilters===!0&&(L(R,cn),L(Z,un),L(Z,Lt)),rt.mathMl===!0&&(L(R,mn),L(Z,ho),L(Z,Lt))),pe(d,"ADD_TAGS")||(je.tagCheck=null),pe(d,"ADD_ATTR")||(je.attributeCheck=null),d.ADD_TAGS&&(typeof d.ADD_TAGS=="function"?je.tagCheck=d.ADD_TAGS:(R===H&&(R=we(R)),L(R,d.ADD_TAGS,ee))),d.ADD_ATTR&&(typeof d.ADD_ATTR=="function"?je.attributeCheck=d.ADD_ATTR:(Z===La&&(Z=we(Z)),L(Z,d.ADD_ATTR,ee))),d.ADD_URI_SAFE_ATTR&&L(Vn,d.ADD_URI_SAFE_ATTR,ee),d.FORBID_CONTENTS&&(ke===On&&(ke=we(ke)),L(ke,d.FORBID_CONTENTS,ee)),d.ADD_FORBID_CONTENTS&&(ke===On&&(ke=we(ke)),L(ke,d.ADD_FORBID_CONTENTS,ee)),In&&(R["#text"]=!0),Ze&&L(R,["html","head","body"]),R.table&&(L(R,["tbody"]),delete Ct.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw gt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw gt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=d.TRUSTED_TYPES_POLICY,k=C.createHTML("")}else C===void 0&&(C=Vl(_,i)),C!==null&&typeof k=="string"&&(k=C.createHTML(""));re&&re(d),st=d}},Ha=L({},[...dn,...cn,...El]),Ga=L({},[...mn,...Tl]),Gf=function(d){let E=V(d);(!E||!E.tagName)&&(E={namespaceURI:lt,tagName:"template"});const B=Dt(d.tagName),q=Dt(E.tagName);return Fn[d.namespaceURI]?d.namespaceURI===Wt?E.namespaceURI===Fe?B==="svg":E.namespaceURI===Yt?B==="svg"&&(q==="annotation-xml"||Zt[q]):!!Ha[B]:d.namespaceURI===Yt?E.namespaceURI===Fe?B==="math":E.namespaceURI===Wt?B==="math"&&Xt[q]:!!Ga[B]:d.namespaceURI===Fe?E.namespaceURI===Wt&&!Xt[q]||E.namespaceURI===Yt&&!Zt[q]?!1:!Ga[B]&&(Kf[B]||!Ha[B]):!!(kt==="application/xhtml+xml"&&Fn[d.namespaceURI]):!1},Me=function(d){ht(n.removed,{element:d});try{V(d).removeChild(d)}catch{I(d)}},Xe=function(d,E){try{ht(n.removed,{attribute:E.getAttributeNode(d),from:E})}catch{ht(n.removed,{attribute:null,from:E})}if(E.removeAttribute(d),d==="is")if(it||Ht)try{Me(E)}catch{}else try{E.setAttribute(d,"")}catch{}},Ya=function(d){let E=null,B=null;if(Nn)d="<remove></remove>"+d;else{const Q=sn(d,/^[\r\n\t ]+/);B=Q&&Q[0]}kt==="application/xhtml+xml"&<===Fe&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");const q=C?C.createHTML(d):d;if(lt===Fe)try{E=new h().parseFromString(q,kt)}catch{}if(!E||!E.documentElement){E=T.createDocument(lt,"template",null);try{E.documentElement.innerHTML=Bn?k:q}catch{}}const ae=E.body||E.documentElement;return d&&B&&ae.insertBefore(o.createTextNode(B),ae.childNodes[0]||null),lt===Fe?A.call(E,Ze?"html":"body")[0]:Ze?E.documentElement:ae},Wa=function(d){return b.call(d.ownerDocument||d,d,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},Dn=function(d){return d instanceof f&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof g)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},Za=function(d){return typeof s=="function"&&d instanceof s};function Re(F,d,E){Rt(F,B=>{B.call(n,d,E,st)})}const Xa=function(d){let E=null;if(Re(p.beforeSanitizeElements,d,null),Dn(d))return Me(d),!0;const B=ee(d.nodeName);if(Re(p.uponSanitizeElement,d,{tagName:B,allowedTags:R}),zt&&d.hasChildNodes()&&!Za(d.firstElementChild)&&le(/<[/\w!]/g,d.innerHTML)&&le(/<[/\w!]/g,d.textContent)||d.nodeType===bt.progressingInstruction||zt&&d.nodeType===bt.comment&&le(/<[/\w]/g,d.data))return Me(d),!0;if(!(je.tagCheck instanceof Function&&je.tagCheck(B))&&(!R[B]||Ct[B])){if(!Ct[B]&&Qa(B)&&(X.tagNameCheck instanceof RegExp&&le(X.tagNameCheck,B)||X.tagNameCheck instanceof Function&&X.tagNameCheck(B)))return!1;if(In&&!ke[B]){const q=V(d)||d.parentNode,ae=U(d)||d.childNodes;if(ae&&q){const Q=ae.length;for(let ce=Q-1;ce>=0;--ce){const De=y(ae[ce],!0);De.__removalCount=(d.__removalCount||0)+1,q.insertBefore(De,N(d))}}}return Me(d),!0}return d instanceof c&&!Gf(d)||(B==="noscript"||B==="noembed"||B==="noframes")&&le(/<\/no(script|embed|frames)/i,d.innerHTML)?(Me(d),!0):(at&&d.nodeType===bt.text&&(E=d.textContent,Rt([S,O,P],q=>{E=pt(E,q," ")}),d.textContent!==E&&(ht(n.removed,{element:d.cloneNode()}),d.textContent=E)),Re(p.afterSanitizeElements,d,null),!1)},Ja=function(d,E,B){if(qt[E]||va&&(E==="id"||E==="name")&&(B in o||B in Hf))return!1;if(!(Mn&&!qt[E]&&le(te,E))){if(!(Ua&&le(Ve,E))){if(!(je.attributeCheck instanceof Function&&je.attributeCheck(E,d))){if(!Z[E]||qt[E]){if(!(Qa(d)&&(X.tagNameCheck instanceof RegExp&&le(X.tagNameCheck,d)||X.tagNameCheck instanceof Function&&X.tagNameCheck(d))&&(X.attributeNameCheck instanceof RegExp&&le(X.attributeNameCheck,E)||X.attributeNameCheck instanceof Function&&X.attributeNameCheck(E,d))||E==="is"&&X.allowCustomizedBuiltInElements&&(X.tagNameCheck instanceof RegExp&&le(X.tagNameCheck,B)||X.tagNameCheck instanceof Function&&X.tagNameCheck(B))))return!1}else if(!Vn[E]){if(!le(Kt,pt(B,Be,""))){if(!((E==="src"||E==="xlink:href"||E==="href")&&d!=="script"&&gl(B,"data:")===0&&ja[d])){if(!(Pa&&!le(J,pt(B,Be,"")))){if(B)return!1}}}}}}}return!0},Qa=function(d){return d!=="annotation-xml"&&sn(d,kn)},ei=function(d){Re(p.beforeSanitizeAttributes,d,null);const{attributes:E}=d;if(!E||Dn(d))return;const B={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0};let q=E.length;for(;q--;){const ae=E[q],{name:Q,namespaceURI:ce,value:De}=ae,dt=ee(Q),Ln=De;let oe=Q==="value"?Ln:yl(Ln);if(B.attrName=dt,B.attrValue=oe,B.keepAttr=!0,B.forceKeepAttr=void 0,Re(p.uponSanitizeAttribute,d,B),oe=B.attrValue,xa&&(dt==="id"||dt==="name")&&(Xe(Q,d),oe=xf+oe),zt&&le(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,oe)){Xe(Q,d);continue}if(dt==="attributename"&&sn(oe,"href")){Xe(Q,d);continue}if(B.forceKeepAttr)continue;if(!B.keepAttr){Xe(Q,d);continue}if(!$a&&le(/\/>/i,oe)){Xe(Q,d);continue}at&&Rt([S,O,P],ni=>{oe=pt(oe,ni," ")});const ti=ee(d.nodeName);if(!Ja(ti,dt,oe)){Xe(Q,d);continue}if(C&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!ce)switch(_.getAttributeType(ti,dt)){case"TrustedHTML":{oe=C.createHTML(oe);break}case"TrustedScriptURL":{oe=C.createScriptURL(oe);break}}if(oe!==Ln)try{ce?d.setAttributeNS(ce,Q,oe):d.setAttribute(Q,oe),Dn(d)?Me(d):co(n.removed)}catch{Xe(Q,d)}}Re(p.afterSanitizeAttributes,d,null)},Yf=function F(d){let E=null;const B=Wa(d);for(Re(p.beforeSanitizeShadowDOM,d,null);E=B.nextNode();)Re(p.uponSanitizeShadowNode,E,null),Xa(E),ei(E),E.content instanceof r&&F(E.content);Re(p.afterSanitizeShadowDOM,d,null)};return n.sanitize=function(F){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,B=null,q=null,ae=null;if(Bn=!F,Bn&&(F="<!-->"),typeof F!="string"&&!Za(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw gt("dirty is not a string, aborting")}else throw gt("toString is not a function");if(!n.isSupported)return F;if(An||Rn(d),n.removed=[],typeof F=="string"&&(wt=!1),wt){if(F.nodeName){const De=ee(F.nodeName);if(!R[De]||Ct[De])throw gt("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof s)E=Ya("<!---->"),B=E.ownerDocument.importNode(F,!0),B.nodeType===bt.element&&B.nodeName==="BODY"||B.nodeName==="HTML"?E=B:E.appendChild(B);else{if(!it&&!at&&!Ze&&F.indexOf("<")===-1)return C&&Gt?C.createHTML(F):F;if(E=Ya(F),!E)return it?null:Gt?k:""}E&&Nn&&Me(E.firstChild);const Q=Wa(wt?F:E);for(;q=Q.nextNode();)Xa(q),ei(q),q.content instanceof r&&Yf(q.content);if(wt)return F;if(it){if(Ht)for(ae=w.call(E.ownerDocument);E.firstChild;)ae.appendChild(E.firstChild);else ae=E;return(Z.shadowroot||Z.shadowrootmode)&&(ae=u.call(a,ae,!0)),ae}let ce=Ze?E.outerHTML:E.innerHTML;return Ze&&R["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&le(go,E.ownerDocument.doctype.name)&&(ce="<!DOCTYPE "+E.ownerDocument.doctype.name+`>
|
|
2
2
|
`+ce),at&&Rt([S,O,P],De=>{ce=pt(ce,De," ")}),C&&Gt?C.createHTML(ce):ce},n.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Rn(F),An=!0},n.clearConfig=function(){st=null,An=!1},n.isValidAttribute=function(F,d,E){st||Rn({});const B=ee(F),q=ee(d);return Ja(B,q,E)},n.addHook=function(F,d){typeof d=="function"&&ht(p[F],d)},n.removeHook=function(F,d){if(d!==void 0){const E=hl(p[F],d);return E===-1?void 0:pl(p[F],E,1)[0]}return co(p[F])},n.removeHooks=function(F){p[F]=[]},n.removeAllHooks=function(){p=bo()},n}var Bl=_o();function Fl(){this.__data__=new Ae,this.size=0}function Rl(e){var n=this.__data__,o=n.delete(e);return this.size=n.size,o}function Dl(e){return this.__data__.get(e)}function Ll(e){return this.__data__.has(e)}var Ul=200;function Pl(e,n){var o=this.__data__;if(o instanceof Ae){var a=o.__data__;if(!ft||a.length<Ul-1)return a.push([e,n]),this.size=++o.size,this;o=this.__data__=new Ne(a)}return o.set(e,n),this.size=o.size,this}function Qe(e){var n=this.__data__=new Ae(e);this.size=n.size}Qe.prototype.clear=Fl,Qe.prototype.delete=Rl,Qe.prototype.get=Dl,Qe.prototype.has=Ll,Qe.prototype.set=Pl;var Ut=function(){try{var e=qe(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Eo(e,n,o){n=="__proto__"&&Ut?Ut(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}var $l=Object.prototype,vl=$l.hasOwnProperty;function To(e,n,o){var a=e[n];(!(vl.call(e,n)&&Ot(a,o))||o===void 0&&!(n in e))&&Eo(e,n,o)}function Pt(e,n,o,a){var i=!o;o||(o={});for(var r=-1,l=n.length;++r<l;){var s=n[r],c=void 0;c===void 0&&(c=e[s]),i?Eo(o,s,c):To(o,s,c)}return o}function xl(e,n){return e&&Pt(n,Nt(n),e)}function jl(e){var n=[];if(e!=null)for(var o in Object(e))n.push(o);return n}var Kl=Object.prototype,ql=Kl.hasOwnProperty;function zl(e){if(!ue(e))return jl(e);var n=en(e),o=[];for(var a in e)a=="constructor"&&(n||!ql.call(e,a))||o.push(a);return o}function $t(e){return At(e)?Xn(e,!0):zl(e)}function Hl(e,n){return e&&Pt(n,$t(n),e)}var So=typeof D=="object"&&D&&!D.nodeType&&D,Co=So&&typeof module=="object"&&module&&!module.nodeType&&module,Gl=Co&&Co.exports===So,wo=Gl?ye.Buffer:void 0,ko=wo?wo.allocUnsafe:void 0;function Yl(e,n){if(n)return e.slice();var o=e.length,a=ko?ko(o):new e.constructor(o);return e.copy(a),a}function Wl(e,n){var o=-1,a=e.length;for(n||(n=Array(a));++o<a;)n[o]=e[o];return n}function Zl(e,n){for(var o=-1,a=e==null?0:e.length,i=0,r=[];++o<a;){var l=e[o];n(l,o,e)&&(r[i++]=l)}return r}function Mo(){return[]}var Xl=Object.prototype,Jl=Xl.propertyIsEnumerable,Ao=Object.getOwnPropertySymbols,fn=Ao?function(e){return e==null?[]:(e=Object(e),Zl(Ao(e),function(n){return Jl.call(e,n)}))}:Mo;function Ql(e,n){return Pt(e,fn(e),n)}function No(e,n){for(var o=-1,a=n.length,i=e.length;++o<a;)e[i+o]=n[o];return e}var Io=Jn(Object.getPrototypeOf,Object),es=Object.getOwnPropertySymbols,Oo=es?function(e){for(var n=[];e;)No(n,fn(e)),e=Io(e);return n}:Mo;function ts(e,n){return Pt(e,Oo(e),n)}function Vo(e,n,o){var a=n(e);return $e(e)?a:No(a,o(e))}function ns(e){return Vo(e,Nt,fn)}function os(e){return Vo(e,$t,Oo)}var hn=qe(ye,"DataView"),pn=qe(ye,"Promise"),et=qe(ye,"Set"),gn=qe(ye,"WeakMap"),Bo="[object Map]",as="[object Object]",Fo="[object Promise]",Ro="[object Set]",Do="[object WeakMap]",Lo="[object DataView]",is=Ke(hn),rs=Ke(ft),ls=Ke(pn),ss=Ke(et),ds=Ke(gn),Ie=Ue;(hn&&Ie(new hn(new ArrayBuffer(1)))!=Lo||ft&&Ie(new ft)!=Bo||pn&&Ie(pn.resolve())!=Fo||et&&Ie(new et)!=Ro||gn&&Ie(new gn)!=Do)&&(Ie=function(e){var n=Ue(e),o=n==as?e.constructor:void 0,a=o?Ke(o):"";if(a)switch(a){case is:return Lo;case rs:return Bo;case ls:return Fo;case ss:return Ro;case ds:return Do}return n});var cs=Object.prototype,ms=cs.hasOwnProperty;function us(e){var n=e.length,o=new e.constructor(n);return n&&typeof e[0]=="string"&&ms.call(e,"index")&&(o.index=e.index,o.input=e.input),o}var Uo=ye.Uint8Array;function yn(e){var n=new e.constructor(e.byteLength);return new Uo(n).set(new Uo(e)),n}function fs(e,n){var o=n?yn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}var hs=/\w*$/;function ps(e){var n=new e.constructor(e.source,hs.exec(e));return n.lastIndex=e.lastIndex,n}var Po=Le?Le.prototype:void 0,$o=Po?Po.valueOf:void 0;function gs(e){return $o?Object($o.call(e)):{}}function ys(e,n){var o=n?yn(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var bs="[object Boolean]",_s="[object Date]",Es="[object Map]",Ts="[object Number]",Ss="[object RegExp]",Cs="[object Set]",ws="[object String]",ks="[object Symbol]",Ms="[object ArrayBuffer]",As="[object DataView]",Ns="[object Float32Array]",Is="[object Float64Array]",Os="[object Int8Array]",Vs="[object Int16Array]",Bs="[object Int32Array]",Fs="[object Uint8Array]",Rs="[object Uint8ClampedArray]",Ds="[object Uint16Array]",Ls="[object Uint32Array]";function Us(e,n,o){var a=e.constructor;switch(n){case Ms:return yn(e);case bs:case _s:return new a(+e);case As:return fs(e,o);case Ns:case Is:case Os:case Vs:case Bs:case Fs:case Rs:case Ds:case Ls:return ys(e,o);case Es:return new a;case Ts:case ws:return new a(e);case Ss:return ps(e);case Cs:return new a;case ks:return gs(e)}}var vo=Object.create,Ps=function(){function e(){}return function(n){if(!ue(n))return{};if(vo)return vo(n);e.prototype=n;var o=new e;return e.prototype=void 0,o}}();function $s(e){return typeof e.constructor=="function"&&!en(e)?Ps(Io(e)):{}}var vs="[object Map]";function xs(e){return Pe(e)&&Ie(e)==vs}var xo=Je&&Je.isMap,js=xo?Jt(xo):xs,Ks="[object Set]";function qs(e){return Pe(e)&&Ie(e)==Ks}var jo=Je&&Je.isSet,zs=jo?Jt(jo):qs,Hs=1,Gs=2,Ys=4,Ko="[object Arguments]",Ws="[object Array]",Zs="[object Boolean]",Xs="[object Date]",Js="[object Error]",qo="[object Function]",Qs="[object GeneratorFunction]",ed="[object Map]",td="[object Number]",zo="[object Object]",nd="[object RegExp]",od="[object Set]",ad="[object String]",id="[object Symbol]",rd="[object WeakMap]",ld="[object ArrayBuffer]",sd="[object DataView]",dd="[object Float32Array]",cd="[object Float64Array]",md="[object Int8Array]",ud="[object Int16Array]",fd="[object Int32Array]",hd="[object Uint8Array]",pd="[object Uint8ClampedArray]",gd="[object Uint16Array]",yd="[object Uint32Array]",j={};j[Ko]=j[Ws]=j[ld]=j[sd]=j[Zs]=j[Xs]=j[dd]=j[cd]=j[md]=j[ud]=j[fd]=j[ed]=j[td]=j[zo]=j[nd]=j[od]=j[ad]=j[id]=j[hd]=j[pd]=j[gd]=j[yd]=!0,j[Js]=j[qo]=j[rd]=!1;function _t(e,n,o,a,i,r){var l,s=n&Hs,c=n&Gs,m=n&Ys;if(l!==void 0)return l;if(!ue(e))return e;var g=$e(e);if(g){if(l=us(e),!s)return Wl(e,l)}else{var f=Ie(e),h=f==qo||f==Qs;if(Hn(e))return Yl(e,s);if(f==zo||f==Ko||h&&!i){if(l=c||h?{}:$s(e),!s)return c?ts(e,Hl(l,e)):Ql(e,xl(l,e))}else{if(!j[f])return i?e:{};l=Us(e,f,s)}}r||(r=new Qe);var _=r.get(e);if(_)return _;r.set(e,l),zs(e)?e.forEach(function(I){l.add(_t(I,n,o,I,e,r))}):js(e)&&e.forEach(function(I,N){l.set(N,_t(I,n,o,N,e,r))});var M=m?c?os:ns:c?$t:Nt,y=g?void 0:M(e);return Un(y||e,function(I,N){y&&(N=I,I=e[N]),To(l,N,_t(I,n,o,N,e,r))}),l}var bd=1,_d=4;function Oe(e){return _t(e,bd|_d)}const bn=(e,n="")=>typeof e.id<"u"?n+e.id+"":n+(e.inputName||e.label||e.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,""),Ho=(e="")=>e.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var Ed="[object String]";function Ge(e){return typeof e=="string"||!$e(e)&&Pe(e)&&Ue(e)==Ed}const Go={methods:{getFieldRowClasses(e){const n=this.fieldErrors(e).length>0,o={[v(this.options,"validationErrorClass","error")]:n,[v(this.options,"validationSuccessClass","valid")]:!n,disabled:this.fieldDisabled(e),readonly:this.fieldReadonly(e),featured:this.fieldFeatured(e),required:this.fieldRequired(e)};return Array.isArray(e.styleClasses)?ie(e.styleClasses,a=>o[a]=!0):Ge(e.styleClasses)&&(o[e.styleClasses]=!0),Y(e.type)||(o["field-"+e.type]=!0),o},fieldErrors(e){return this.errors.filter(o=>o.field.fieldName===e.fieldName).map(o=>o.error)},fieldDisabled(e){return x(e.disabled)?e.disabled.call(this,this.model,e,this):Y(e.disabled)?!1:e.disabled},fieldReadonly(e){return x(e.readonly)?e.readonly.call(this,this.model,e,this):Y(e.readonly)?!1:e.readonly},fieldFeatured(e){return x(e.featured)?e.featured.call(this,this.model,e,this):Y(e.featured)?!1:e.featured},fieldRequired(e){return x(e.required)?e.required.call(this,this.model,e,this):Y(e.required)?!1:e.required}}};var _n=function(){return ye.Date.now()},Td=/\s/;function Sd(e){for(var n=e.length;n--&&Td.test(e.charAt(n)););return n}var Cd=/^\s+/;function wd(e){return e&&e.slice(0,Sd(e)+1).replace(Cd,"")}var Yo=NaN,kd=/^[-+]0x[0-9a-f]+$/i,Md=/^0b[01]+$/i,Ad=/^0o[0-7]+$/i,Nd=parseInt;function En(e){if(typeof e=="number")return e;if(It(e))return Yo;if(ue(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=ue(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=wd(e);var o=Md.test(e);return o||Ad.test(e)?Nd(e.slice(2),o?2:8):kd.test(e)?Yo:+e}var Id="Expected a function",Od=Math.max,Vd=Math.min;function tt(e,n,o){var a,i,r,l,s,c,m=0,g=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Id);n=En(n)||0,ue(o)&&(g=!!o.leading,f="maxWait"in o,r=f?Od(En(o.maxWait)||0,n):r,h="trailing"in o?!!o.trailing:h);function _(T){var b=a,w=i;return a=i=void 0,m=T,l=e.apply(w,b),l}function M(T){return m=T,s=setTimeout(N,n),g?_(T):l}function y(T){var b=T-c,w=T-m,A=n-b;return f?Vd(A,r-w):A}function I(T){var b=T-c,w=T-m;return c===void 0||b>=n||b<0||f&&w>=r}function N(){var T=_n();if(I(T))return U(T);s=setTimeout(N,y(T))}function U(T){return s=void 0,h&&a?_(T):(a=i=void 0,l)}function V(){s!==void 0&&clearTimeout(s),m=0,a=c=i=s=void 0}function C(){return s===void 0?l:U(_n())}function k(){var T=_n(),b=I(T);if(a=arguments,i=this,c=T,b){if(s===void 0)return M(c);if(f)return clearTimeout(s),s=setTimeout(N,n),_(c)}return s===void 0&&(s=setTimeout(N,n)),l}return k.cancel=V,k.flush=C,k}var Bd="__lodash_hash_undefined__";function Fd(e){return this.__data__.set(e,Bd),this}function Rd(e){return this.__data__.has(e)}function vt(e){var n=-1,o=e==null?0:e.length;for(this.__data__=new Ne;++n<o;)this.add(e[n])}vt.prototype.add=vt.prototype.push=Fd,vt.prototype.has=Rd;function Dd(e,n,o,a){for(var i=e.length,r=o+-1;++r<i;)if(n(e[r],r,e))return r;return-1}function Ld(e){return e!==e}function Ud(e,n,o){for(var a=o-1,i=e.length;++a<i;)if(e[a]===n)return a;return-1}function Pd(e,n,o){return n===n?Ud(e,n,o):Dd(e,Ld,o)}function $d(e,n){var o=e==null?0:e.length;return!!o&&Pd(e,n,0)>-1}function vd(e,n){return e.has(n)}function xd(){}function Wo(e){var n=-1,o=Array(e.size);return e.forEach(function(a){o[++n]=a}),o}var jd=1/0,Kd=et&&1/Wo(new et([,-0]))[1]==jd?function(e){return new et(e)}:xd,qd=200;function zd(e,n,o){var a=-1,i=$d,r=e.length,l=!0,s=[],c=s;if(r>=qd){var m=Kd(e);if(m)return Wo(m);l=!1,i=vd,c=new vt}else c=s;e:for(;++a<r;){var g=e[a],f=g;if(g=g!==0?g:0,l&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;s.push(g)}else i(c,f,o)||(c!==s&&c.push(f),s.push(g))}return s}function Zo(e){return e&&e.length?zd(e):[]}var Hd=0;function Xo(e){var n=++Hd;return oo(e)+n}var Jo=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ve="\\d\\d?",xe="\\d\\d",Gd="\\d{3}",Yd="\\d{4}",Et="[^\\s]+",Qo=/\[([^]*?)\]/gm;function ea(e,n){for(var o=[],a=0,i=e.length;a<i;a++)o.push(e[a].substr(0,n));return o}var ta=function(e){return function(n,o){var a=o[e].map(function(r){return r.toLowerCase()}),i=a.indexOf(n.toLowerCase());return i>-1?i:null}};function Ye(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];for(var a=0,i=n;a<i.length;a++){var r=i[a];for(var l in r)e[l]=r[l]}return e}var na=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],oa=["January","February","March","April","May","June","July","August","September","October","November","December"],Wd=ea(oa,3),Zd=ea(na,3),aa={dayNamesShort:Zd,dayNames:na,monthNamesShort:Wd,monthNames:oa,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},xt=Ye({},aa),Xd=function(e){return xt=Ye(xt,e)},ia=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},de=function(e,n){for(n===void 0&&(n=2),e=String(e);e.length<n;)e="0"+e;return e},Jd={D:function(e){return String(e.getDate())},DD:function(e){return de(e.getDate())},Do:function(e,n){return n.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return de(e.getDay())},ddd:function(e,n){return n.dayNamesShort[e.getDay()]},dddd:function(e,n){return n.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return de(e.getMonth()+1)},MMM:function(e,n){return n.monthNamesShort[e.getMonth()]},MMMM:function(e,n){return n.monthNames[e.getMonth()]},YY:function(e){return de(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return de(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return de(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return de(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return de(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return de(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return de(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return de(e.getMilliseconds(),3)},a:function(e,n){return e.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(e,n){return e.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+de(Math.floor(Math.abs(n)/60)*100+Math.abs(n)%60,4)},Z:function(e){var n=e.getTimezoneOffset();return(n>0?"-":"+")+de(Math.floor(Math.abs(n)/60),2)+":"+de(Math.abs(n)%60,2)}},ra=function(e){return+e-1},la=[null,ve],sa=[null,Et],da=["isPm",Et,function(e,n){var o=e.toLowerCase();return o===n.amPm[0]?0:o===n.amPm[1]?1:null}],ca=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var n=(e+"").match(/([+-]|\d\d)/gi);if(n){var o=+n[1]*60+parseInt(n[2],10);return n[0]==="+"?o:-o}return 0}],Qd={D:["day",ve],DD:["day",xe],Do:["day",ve+Et,function(e){return parseInt(e,10)}],M:["month",ve,ra],MM:["month",xe,ra],YY:["year",xe,function(e){var n=new Date,o=+(""+n.getFullYear()).substr(0,2);return+(""+(+e>68?o-1:o)+e)}],h:["hour",ve,void 0,"isPm"],hh:["hour",xe,void 0,"isPm"],H:["hour",ve],HH:["hour",xe],m:["minute",ve],mm:["minute",xe],s:["second",ve],ss:["second",xe],YYYY:["year",Yd],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",xe,function(e){return+e*10}],SSS:["millisecond",Gd],d:la,dd:la,ddd:sa,dddd:sa,MMM:["month",Et,ta("monthNamesShort")],MMMM:["month",Et,ta("monthNames")],a:da,A:da,ZZ:ca,Z:ca},jt={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},ec=function(e){return Ye(jt,e)},tc=function(e,n,o){if(n===void 0&&(n=jt.default),o===void 0&&(o={}),typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");n=jt[n]||n;var a=[];n=n.replace(Qo,function(r,l){return a.push(l),"@@@"});var i=Ye(Ye({},xt),o);return n=n.replace(Jo,function(r){return Jd[r](e,i)}),n.replace(/@@@/g,function(){return a.shift()})};function nc(e,n,o){if(o===void 0&&(o={}),typeof n!="string")throw new Error("Invalid format in fecha parse");if(n=jt[n]||n,e.length>1e3)return null;var a=new Date,i={year:a.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],l=[],s=n.replace(Qo,function(C,k){return l.push(ia(k)),"@@@"}),c={},m={};s=ia(s).replace(Jo,function(C){var k=Qd[C],T=k[0],b=k[1],w=k[3];if(c[T])throw new Error("Invalid format. "+T+" specified twice in format");return c[T]=!0,w&&(m[w]=!0),r.push(k),"("+b+")"}),Object.keys(m).forEach(function(C){if(!c[C])throw new Error("Invalid format. "+C+" is required in specified format")}),s=s.replace(/@@@/g,function(){return l.shift()});var g=e.match(new RegExp(s,"i"));if(!g)return null;for(var f=Ye(Ye({},xt),o),h=1;h<g.length;h++){var _=r[h-1],M=_[0],y=_[2],I=y?y(g[h],f):+g[h];if(I==null)return null;i[M]=I}i.isPm===1&&i.hour!=null&&+i.hour!=12?i.hour=+i.hour+12:i.isPm===0&&+i.hour==12&&(i.hour=0);var N;if(i.timezoneOffset==null){N=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var U=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],h=0,V=U.length;h<V;h++)if(c[U[h][0]]&&i[U[h][0]]!==N[U[h][1]]())return null}else if(N=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return N}var nt={format:tc,parse:nc,defaultI18n:aa,setGlobalDateI18n:Xd,setGlobalDateMasks:ec};function oc(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}var ma=Math.max;function ac(e,n,o){return n=ma(n===void 0?e.length-1:n,0),function(){for(var a=arguments,i=-1,r=ma(a.length-n,0),l=Array(r);++i<r;)l[i]=a[n+i];i=-1;for(var s=Array(n+1);++i<n;)s[i]=a[i];return s[n]=o(l),oc(e,this,s)}}function ic(e){return function(){return e}}var rc=Ut?function(e,n){return Ut(e,"toString",{configurable:!0,enumerable:!1,value:ic(n),writable:!0})}:tn,lc=800,sc=16,dc=Date.now;function cc(e){var n=0,o=0;return function(){var a=dc(),i=sc-(a-o);if(o=a,i>0){if(++n>=lc)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}var mc=cc(rc);function uc(e,n){return mc(ac(e,n,tn),e+"")}function fc(e,n,o){if(!ue(o))return!1;var a=typeof n;return(a=="number"?At(o)&&Gn(n,o.length):a=="string"&&n in o)?Ot(o[n],e):!1}var ua=Object.prototype,hc=ua.hasOwnProperty,pc=uc(function(e,n){e=Object(e);var o=-1,a=n.length,i=a>2?n[2]:void 0;for(i&&fc(n[0],n[1],i)&&(a=1);++o<a;)for(var r=n[o],l=$t(r),s=-1,c=l.length;++s<c;){var m=l[s],g=e[m];(g===void 0||Ot(g,ua[m])&&!hc.call(e,m))&&(e[m]=r[m])}return e}),gc=ye.isFinite;function fa(e){return typeof e=="number"&&gc(e)}var ha=1/0,yc=17976931348623157e292;function bc(e){if(!e)return e===0?e:0;if(e=En(e),e===ha||e===-ha){var n=e<0?-1:1;return n*yc}return e===e?e:0}function _c(e){var n=bc(e),o=n%1;return n===n?o?n-o:n:0}function Ec(e){return typeof e=="number"&&e==_c(e)}var Tc="[object Number]";function Tn(e){return typeof e=="number"||Pe(e)&&Ue(e)==Tc}const ge={general:{packageName:"forms",disable_global_radio:"The plugin is set to 'Scoped' by default when configured under a {scope}. To configure a global plugin, navigate to the global plugin list page.",disable_source_scope_change:"Changing the {scope} is not allowed when configuring a plugin under it."},"post-function":{tags:{hint:"e.g. tag1, tag2, tag3",newElementButtonLabel:"+ Add"},enabled:{newElementButtonLabel:"+ Add"},selectionGroup:{newElementButtonLabel:"+ Add"},instance_name:{newElementButtonLabel:"+ Add"},name:{newElementButtonLabel:"+ Add"},"config-certificate":{help:"Array of stringified Lua code to be cached and run in sequence during the certificate phase.",newElementButtonLabel:"+ Add"},"config-access":{help:"Array of stringified Lua code to be cached and run in sequence during the access phase.",newElementButtonLabel:"+ Add"},"config-body_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the body_filter phase.",newElementButtonLabel:"+ Add"},"config-header_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the header_filter phase.",newElementButtonLabel:"+ Add"},"config-functions":{newElementButtonLabel:"+ Add"},"config-log":{newElementButtonLabel:"+ Add"},"config-rewrite":{newElementButtonLabel:"+ Add"},"config-ws_client_frame":{newElementButtonLabel:"+ Add"},"config-ws_close":{newElementButtonLabel:"+ Add"},"config-ws_handshake":{newElementButtonLabel:"+ Add"},"config-ws_upstream_frame":{newElementButtonLabel:"+ Add"}},"exit-transformer":{"config-functions":{newElementButtonLabel:"+ Add"}},rla:{view_advanced:"View advanced parameters",window_type:{label:"Rate Limit Window Type",help:"Sets the time window type to either <code>sliding</code> (default) or <code>fixed</code>.<br><ul><li>Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight.</li><li>Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.</li></ul>",options:{fixed:"Fixed",sliding:"Sliding"}},request_limits:{title:"Request Limits",subtitle:"Set one or more limits on the number of API requests allowed within a defined timeframe.",label:"Limit",label_index:"Limit {index}",request_number:"Request number",time_interval:"Time interval",interval_determiner:"Every",seconds:"Seconds"},start_with_a_use_case:"Start with a use case:",use_case_index:"Use case {index}",error_message:{label:"Error Message",code_placeholder:"Code Message",message_placeholder:"Error Message",help:"Set a custom error code and message to be returned when the rate limit is exceeded."},identifiers:{label:"Identifiers",options:{ip:"IP",credential:"Credential",consumer:"Consumer",service:"Service",header:"Header",path:"Path","consumer-group":"Consumer Group",route:"Route"}},redis:{title:"Configure your Redis",address_example:"e.g. localhost:6379"}},validators:{field_is_required:"This field is required",invalid_format:"Invalid format",number_too_small:"The number is too small. Minimum: {0}",number_too_large:"The number is too large. Maximum: {0}",invalid_number:"Invalid number",invalid_integer:"The value is not an integer",text_too_short:"The length of text is too short. Current: {0}, Minimum: {1}",text_too_long:"The length of text is too long. Current: {0}, Maximum: {1}",this_not_text:"This is not a text",this_not_array:"This is not an array",select_min_items:"Select minimum {0} items",select_max_items:"Select maximum {0} items",invalid_date:"Invalid date",date_is_early:"The date is too early. Current: {0}, Minimum: {1}",date_is_late:"The date is too late. Current: {0}, Maximum: {1}",invalid_email:"Invalid e-mail address",invalid_url:"Invalid URL",invalid_card:"Invalid card format",invalid_card_number:"Invalid card number",invalid_text_contain_number:"Invalid text - cannot contains numbers or special characters",invalid_tex_contain_spec:"Invalid text - cannot contains special characters"},redis:{title:"Redis Configuration",managed_ui:{title:"Redis",groups:{self_managed:"Self-managed Redis",konnect_managed:"Konnect-managed Redis"},shared_configuration:{label:"Use shared configuration",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins.",badge:"Recommended",title:"Shared Redis Configuration",create_new_configuration:"New Redis",selector:{placeholder:"Filter Redis configurations..."}},dedicated_configuration:{label:"Use locally-scoped configuration",description:"Create and use a Redis configuration specifically for this plugin."}},shared_configuration:{label:"Use shared configuration",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins.",title:"Shared Redis Configuration",error:"Fetching shared Redis configurations failed.",tooltip:"Only compatible {type} redis configurations will be listed here.",configuration_selector_label:"Select stored Redis configuration",configuration_selector_placeholder:"Pick Redis configuration",create_new_configuration:"New {type} shared configuration",empty_state:"No shared configurations",selector:{title:"Select a Redis configuration",placeholder:"Filter Configurations",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins."}},dedicated_configuration:{label:"Use dedicated configuration",description:"Create a Redis configuration exclusively for this plugin, with settings that won’t impact other plugins.",title:"Connection Settings"},config_card:{common_fields:{created_at_label:"Created at",updated_at_label:"Last Updated at",type_label:"Redis Type"}},custom_plugin:{alert:"Note: For custom plugins, we cannot determine the correct Redis configuration type. Please ensure you select the appropriate option manually.",tooltip:"To apply a shared redis configuration, the redis fields must defined as Kong plugins in plugin schema."}},fields:{auto_suggest:{error:{load_entity:"There was an error loading {entity}"},recently_created:"Recently created {entity}",items_count:"Currently showing {count} {count, plural, =1 {item} other {items}}, type to search",no_results:"No results",loading:"Loading..."}},vfg:{labels:{on:"On",off:"Off"}}},{t:W}=me.createI18n("en-us",ge),ne={fieldIsRequired:W("validators.field_is_required"),invalidFormat:W("validators.invalid_format"),numberTooSmall:W("validators.number_too_small"),numberTooBig:W("validators.number_too_large"),invalidNumber:W("validators.invalid_number"),invalidInteger:W("validators.invalid_integer"),textTooSmall:W("validators.text_too_short"),textTooBig:W("validators.text_too_long"),thisNotText:W("validators.this_not_text"),thisNotArray:W("validators.this_not_array"),selectMinItems:W("validators.select_min_items"),selectMaxItems:W("validators.select_max_items"),invalidDate:W("validators.invalid_date"),dateIsEarly:W("validators.date_is_early"),dateIsLate:W("validators.date_is_late"),invalidEmail:W("validators.invalid_email"),invalidURL:W("validators.invalid_url"),invalidCard:W("validators.invalid_card"),invalidCardNumber:W("validators.invalid_card_number"),invalidTextContainNumber:W("validators.invalid_text_contain_number"),invalidTextContainSpec:W("validators.invalid_tex_contain_spec")},z=(e,...n)=>{if(e&&n.length>0)for(let o=0;o<n.length;o++)e=e.replace("{"+(o-1)+"}",String(n[o]||""));return e},_e=(e,n,o=ne)=>Y(e)||e===""?n?[z(o.fieldIsRequired)]:[]:null,We={required:(e,n,o,a=ne)=>_e(e,n.required,a)||[],number:(e,n,o,a=ne)=>{let i=_e(e,n.required,a);return i!=null||(i=[],fa(e)?(!Y(n.min)&&e<n.min,(a=ne)&&i.push(z(a.numberTooSmall,n.min)),!Y(n.max)&&e>n.max,(a=ne)&&i.push(z(a.numberTooBig,n.max))):i.push(z(a.invalidNumber))),i},integer:(e,n,o,a=ne)=>{let i=_e(e,n.required,a);return i!=null||(i=[],i.concat(We.number(e,n,o,a)),Ec(e)||i.push(z(a.invalidInteger))),i},double:(e,n,o,a=ne)=>{const i=_e(e,n.required,a);return i??(!Tn(e)||isNaN(e)?[z(a.invalidNumber)]:[])},string:(e,n,o,a=ne)=>{let i=_e(e,n.required,a);return i!=null||(i=[],Ge(e)?(!Y(n.min)&&e.length<n.min&&i.push(z(a.textTooSmall,e.length,n.min)),!Y(n.max)&&e.length>n.max&&i.push(z(a.textTooBig,e.length,n.max))):i.push(z(a.thisNotText))),i},array:(e,n,o,a=ne)=>{if(n.required){if(!Array.isArray(e))return[z(a.thisNotArray)];if(e.length===0)return[z(a.fieldIsRequired)]}if(!Y(e)){if(!Y(n.min)&&e.length<n.min)return[z(a.selectMinItems,n.min)];if(!Y(n.max)&&e.length>n.max)return[z(a.selectMaxItems,n.max)]}return[]},date:(e,n,o,a=ne)=>{let i=_e(e,n.required,a);if(i!=null)return i;i=[];const r=new Date(e);if(isNaN(r.getDate()))return[z(a.invalidDate)];if(!Y(n.min)){const l=new Date(n.min);r.valueOf()<l.valueOf()&&i.push(z(a.dateIsEarly,nt.format(r),nt.format(l)))}if(!Y(n.max)){const l=new Date(n.max);r.valueOf()>l.valueOf()&&i.push(z(a.dateIsLate,nt.format(r),nt.format(l)))}return i},regexp:(e,n,o,a=ne)=>{const i=_e(e,n.required,a);return i??(!Y(n.pattern)&&!new RegExp(n.pattern).test(e)?[z(a.invalidFormat)]:[])},email:(e,n,o,a=ne)=>{const i=_e(e,n.required,a);return i??(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)?[]:[z(a.invalidEmail)])},url:(e,n,o,a=ne)=>{const i=_e(e,n.required,a);return i??(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(e)?[]:[z(a.invalidURL)])},creditCard:(e,n,o,a=ne)=>{const i=_e(e,n.required,a);if(i!=null)return i;const r=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,l=e.replace(/[^0-9]+/g,"");if(!r.test(l))return[z(a.invalidCard)];let s=0,c,m,g;for(let f=l.length-1;f>=0;f--)c=l.substring(f,f+1),m=parseInt(c,10),g?(m*=2,m>=10?s+=m%10+1:s+=m):s+=m,g=!g;return s%10===0&&l?[]:[z(a.invalidCardNumber)]},alpha:(e,n,o,a=ne)=>{const i=_e(e,n.required,a);return i??(/^[a-zA-Z]*$/.test(e)?[]:[z(a.invalidTextContainNumber)])},alphaNumeric:(e,n,o,a=ne)=>{const i=_e(e,n.required,a);return i??(/^[a-zA-Z0-9]*$/.test(e)?[]:[z(a.invalidTextContainSpec)])}};Object.keys(We).forEach(e=>{const n=We[e];x(n)&&(n.locale=o=>(a,i,r)=>n(a,i,r,pc(o,ne)))});function pa(e){return Ge(e)?We[e]!=null?We[e]:(console.warn(`'${e}' is not a validator function!`),null):e}function Sn(e,n,o){let a=v(o.context,"schema.attributes",{});const i=n.value||"input";Ge(i)&&(a=v(a,i)||a),ie(a,(r,l)=>{e.setAttribute(l,r)})}const Ce={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:Sn,updated:Sn,componentUpdated:Sn}},computed:{value:{cache:!1,get(){let e;return x(v(this.schema,"get"))?e=this.schema.get(this.model):e=v(this.model,this.schema.model),this.formatValueToField(e)},set(e){const n=this.value;e=this.formatValueToModel(e),x(e)?e(e,n):this.updateModelValue(e,n)}}},methods:{validate(e){this.clearValidationErrors();const n=v(this.formOptions,"validateAsync",!1);let o=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const i=[];Array.isArray(this.schema.validator)?ie(this.schema.validator,r=>{i.push(pa(r).bind(this))}):i.push(pa(this.schema.validator).bind(this)),ie(i,r=>{if(n)o.push(r(this.value,this.schema,this.model));else{const l=r(this.value,this.schema,this.model);l&&x(l.then)?l.then(s=>{s&&(this.errors=this.errors.concat(s));const c=this.errors.length===0;this.$emit("validated",c,this.errors,this)}):l&&(o=o.concat(l))}})}const a=i=>{let r=[];ie(Zo(i),s=>{Array.isArray(s)&&s.length>0?r=r.concat(s):Ge(s)&&r.push(s)}),x(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,r,this.schema);const l=r.length===0;return e||this.$emit("validated",l,r,this),this.errors=r,r};return n?Promise.all(o).then(a):a(o)},debouncedValidate(){x(this.debouncedValidateFunc)||(this.debouncedValidateFunc=tt(this.validate.bind(this),v(this.schema,"validateDebounceTime",v(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(e,n){let o=!1;x(this.schema.set)?(this.schema.set(this.model,e),o=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,e),o=!0),o&&(this.$emit("modelUpdated",e,this.schema.model),x(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,e,n,this.schema),v(this.formOptions,"validateAfterChanged",!1)===!0&&(v(this.schema,"validateDebounceTime",v(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors(){this.errors.splice(0)},setModelValueByPath(e,n){let o=e.replace(/\[(\w+)\]/g,".$1");o=o.replace(/^\./,"");let a=this.model;const i=o.split(".");let r=0;const l=i.length;for(;r<l;){const s=i[r];if(r<l-1)a[s]!==void 0||(a[s]={}),a=a[s];else{a[s]=n;return}++r}},getFieldID(e,n=!1){const o=v(this.formOptions,"fieldIdPrefix","");return bn(e,o)+(n?"-"+Xo():"")},getLabelId(e){return`${this.getFieldID(e)}-label`},getFieldClasses(){return v(this.schema,"fieldClasses",[])},formatValueToField(e){return e},formatValueToModel(e){return e}}},Sc=Object.freeze(Object.defineProperty({__proto__:null,default:Ce},Symbol.toStringTag,{value:"Module"})),$=(e,n)=>{const o=e.__vccOpts||e;for(const[a,i]of n)o[a]=i;return o},Cc={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},wc={class:"material-icons"},kc=$(Object.assign({mixins:[Ce],emits:["model-updated"],expose:["validate","clearValidationErrors","schema"],data(){return{isOpen:!1}},computed:{openClass(){return this.isOpen?"open":"closed"},fieldCount(){return this.schema.fields.length},titleText(){return`${this.isOpen?"Hide":"View"} ${this.fieldCount} Advanced Fields`}},methods:{handleOpen(){this.isOpen=!this.isOpen},updateModel(e,n){this.$emit("model-updated",e,n)}}},{__name:"FieldAdvanced",setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",Cc,[t.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:o[0]||(o[0]=(...a)=>n.handleOpen&&n.handleOpen(...a))},[t.createElementVNode("i",wc,t.toDisplayString(n.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),t.createElementVNode("span",null,t.toDisplayString(n.titleText),1)]),t.createElementVNode("div",{class:t.normalizeClass(["advanced-field-dropdown",n.openClass])},[t.createVNode(G,{model:n.model,options:{helpAsHtml:!0},schema:n.schema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])],2)]))}}),[["__scopeId","data-v-e8f66c8a"]]),Mc={class:"array-card-container"},ga=$(t.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0}},emits:["remove-item"],setup(e){const n=e;return t.provide("vfg-array-item-index",n.index),(o,a)=>{const i=t.resolveComponent("KCard"),r=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Mc,[t.createVNode(i,{class:"card"},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3}),t.createVNode(r,{appearance:"tertiary",class:"array-card-remove-button",onClick:a[0]||(a[0]=l=>o.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Te.TrashIcon))]),_:1})])}}}),[["__scopeId","data-v-a8366ec5"]]),Ac={class:"array-item-wrapper"},Nc={class:"array-item"},Ic={class:"array-item-after"},ya=$(t.defineComponent({__name:"FieldArrayItem",props:{model:{type:String,default:""}},emits:["remove-item"],setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Ac,[t.createElementVNode("div",Nc,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"tertiary",class:"delete",onClick:o[0]||(o[0]=i=>n.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Te.TrashIcon))]),_:1})]),t.createElementVNode("div",Ic,[t.renderSlot(n.$slots,"after",{},void 0,!0)])])}}}),[["__scopeId","data-v-e6b6837c"]]),Oc={class:"multi-item-wrapper"},ba=$(t.defineComponent({__name:"FieldArrayMultiItem",emits:["remove-item"],setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Oc,[t.renderSlot(n.$slots,"default",{},void 0,!0),t.createVNode(a,{appearance:"danger",class:"delete",onClick:o[0]||(o[0]=i=>n.$emit("remove-item"))},{default:t.withCtx(()=>[...o[1]||(o[1]=[t.createTextVNode(" - Remove Field ",-1)])]),_:1}),o[2]||(o[2]=t.createElementVNode("hr",null,null,-1))])}}}),[["__scopeId","data-v-b4fcf731"]]);var Vc=4;function _a(e){return _t(e,Vc)}const Bc="#6c7489",Fc="12px",Rc="20px",Dc=["data-testid","data-testlabel"],Lc={class:"item-label"},Uc={class:"autosuggest__results_message"},Pc=$(t.defineComponent({__name:"AutoSuggest",props:t.mergeModels({placeholder:{default:""},suggestions:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},emptyMessage:{default:""},domId:{},error:{default:null}},{id:{required:!0},idModifiers:{}}),emits:t.mergeModels(["change","query-change"],["update:id"]),setup(e){const{t:n}=me.createI18n("en-us",ge),o=t.useModel(e,"id");return(a,i)=>{const r=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(r,{id:e.domId,ref:"suggestion",modelValue:o.value,"onUpdate:modelValue":i[0]||(i[0]=l=>o.value=l),clearable:"",disabled:e.disabled,"enable-filtering":"",error:e.error!==null,"filter-function":()=>!0,help:e.error!==null?e.error:void 0,items:e.suggestions,loading:e.loading,placeholder:e.placeholder,width:"100%",onChange:i[1]||(i[1]=l=>a.$emit("change",l)),onQueryChange:i[2]||(i[2]=l=>a.$emit("query-change",l))},t.createSlots({"item-template":t.withCtx(({item:l})=>[t.renderSlot(a.$slots,"item",{item:l},()=>[t.createElementVNode("span",{class:"item-label","data-testid":l.id&&`${l.id}-0`,"data-testlabel":l.label},t.toDisplayString(l.label),9,Dc)],!0)]),"selected-item-template":t.withCtx(({item:l})=>[t.renderSlot(a.$slots,"selected-item",{item:l},()=>[t.createElementVNode("span",Lc,t.toDisplayString(l.label),1)],!0)]),empty:t.withCtx(()=>[t.createElementVNode("div",Uc,[t.createElementVNode("span",null,t.toDisplayString(e.emptyMessage||t.unref(n)("fields.auto_suggest.no_results")),1)])]),_:2},[a.$slots.before?{name:"before",fn:t.withCtx(()=>[t.renderSlot(a.$slots,"before",{},void 0,!0)]),key:"0"}:void 0]),1032,["id","modelValue","disabled","error","help","items","loading","placeholder"])}}}),[["__scopeId","data-v-1e9151dd"]]),$c="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",Cn=e=>e?e.length===36&&new RegExp(`^${$c}$`).test(e):!1,vc={class:"selected-entity-item"},xc={class:"selected-entity-label"},jc={class:"entity-suggestion-item"},Kc={class:"entity-label"},qc={class:"entity-id"},zc=500,Hc=50,Gc=1e3,Ea=$(t.defineComponent({__name:"FieldScopedEntitySelect",props:{transformItem:{type:Function},allowUuidSearch:{type:Boolean,default:!1},placeholder:{},fields:{default:()=>[]},selectedItem:{},selectedItemLoading:{type:Boolean},domId:{},id:{},entity:{},disabled:{type:Boolean},fieldDisabled:{type:Boolean},error:{},labelField:{default:"name"}},emits:["change"],setup(e){const n=t.inject(fe,void 0),o=async(u,p)=>{if(!n)return console.warn("[@kong-ui-public/forms] No API service provided"),[];const{data:S}=await n.getAllV2(e.entity,{name:u,size:Gc},p);return S.data},a=async u=>n?n.peek(e.entity,u):(console.warn("[@kong-ui-public/forms] No API service provided"),Promise.resolve({data:{data:[]}})),i=async u=>{if(!n)return console.warn("[@kong-ui-public/forms] No API service provided"),{id:u};const p=await n.getOne(e.entity,u,{validateStatus:S=>S>=200&&S<300||S===404});if(p.status===404)throw new Error(`Entity of type ${e.entity} with id ${u} not found`);return p.data},r=e.transformItem??(u=>({...u,label:u[e.labelField],value:u.id})),l=t.ref(""),s=t.ref(!1),c=t.ref(!1),m=t.ref(""),g=t.ref([]),f=t.ref([]),h=t.ref([]),{t:_}=me.createI18n("en-us",ge),M=t.ref(null);let y=null;const I=async(u,p)=>{if(!e.fieldDisabled){clearTimeout(y),y=setTimeout(()=>{s.value=!0},1500);try{const S=await u();f.value=S,g.value=f.value.map(r)}catch(S){if(p!=null&&p.aborted)return;if(g.value=[],oi.isAxiosError(S)&&S.status===404){console.warn("unable to search with UUID",m.value,"for entity type",e.entity);return}l.value=S.message}finally{clearTimeout(y),s.value=!1}}},N=tt(u=>{if(u=u||"",m.value=u,!u.trim()&&!c.value){g.value=b(h.value);return}M.value&&M.value.abort();const p=new AbortController;if(M.value=p,c.value){A(u);return}k(u,p)},zc,{leading:!0}),U=async(u,p)=>await o(u,p),V=async()=>{const{data:{data:u,next:p,offset:S}}=await a(Hc);return(!p||!S)&&(c.value=!0),f.value=u,h.value=u.map(O=>({...r(O),group:_("fields.auto_suggest.recently_created",{entity:e.entity})})),u},C=async u=>[await i(u)],k=(u,p)=>{Cn(u)&&e.allowUuidSearch?I(async()=>await C(u)):I(async()=>await U(u,p.signal),p.signal)},T=u=>{let p=[];p=b(h.value),u!=null&&u.trim()?g.value=p.filter(S=>e.fields.some(O=>(S[O]||"").includes(u))):g.value=p},b=u=>e.selectedItem?u.some(p=>p.value===e.selectedItem.value)?u:[e.selectedItem,...u]:u,w=u=>{g.value=h.value.filter(p=>p.id===u)},A=u=>{Cn(u)&&e.allowUuidSearch?w(u):T(u)};return t.onMounted(async()=>{await I(V);const u=t.watch(()=>e.selectedItem,p=>{p&&(g.value=b(h.value)),u()});g.value=b(h.value)}),(u,p)=>(t.openBlock(),t.createBlock(Pc,{id:e.id,disabled:e.fieldDisabled,"dom-id":e.domId,"empty-message":l.value,error:e.error,loading:e.selectedItemLoading||s.value,placeholder:e.placeholder,readonly:e.disabled,suggestions:g.value,onChange:p[0]||(p[0]=S=>u.$emit("change",S)),onQueryChange:t.unref(N)},{before:t.withCtx(()=>[t.renderSlot(u.$slots,"before",{},()=>[t.createVNode(t.unref(Te.SearchIcon),{color:t.unref(Bc),size:t.unref(Rc)},null,8,["color","size"])],!0)]),"selected-item":t.withCtx(({item:S})=>[t.renderSlot(u.$slots,"selected-item",{item:S},()=>[t.createElementVNode("span",vc,[t.createElementVNode("span",xc,t.toDisplayString(S.label??S.id),1)])],!0)]),item:t.withCtx(({item:S})=>[t.renderSlot(u.$slots,"item",{item:S},()=>[t.createElementVNode("div",jc,[t.createElementVNode("span",Kc,t.toDisplayString(S.label??t.unref(ro)),1),t.createElementVNode("span",qc,t.toDisplayString(S.id),1)])],!0)]),_:3},8,["id","disabled","dom-id","empty-message","error","loading","placeholder","readonly","suggestions","onQueryChange"]))}}),[["__scopeId","data-v-28628e7b"]]);function Ta(e,n,o){return o?Se.SET_REFERRAL_VALUE:e&&!n||!e&&n?Se.UPDATE_ENTITY:e&&n?Se.CREATE_FROM_ENTITY:Se.CREATE_NOT_FROM_ENTITY}const Yc={components:{FieldScopedEntitySelect:Ea},mixins:[Ce],inject:[fe],emits:["model-updated"],setup(){const{t:e}=me.createI18n("en-us",ge);return{t:e}},data(){return{idValue:"",error:null,initialItem:null,selectedItem:null,loading:!1}},computed:{fieldState(){return Ta(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search},inputFields(){var e,n;return((n=(e=this.schema)==null?void 0:e.inputValues)==null?void 0:n.fields)||[]},allowUuidSearch(){return this.inputFields.includes("id")},inputFieldsWithoutId(){return this.inputFields.filter(e=>e!=="id")},initialValueSelected(){var e;return this.idValue===((e=this.initialItem)==null?void 0:e.id)}},async created(){await this.$nextTick();let e,n;this.error=null;try{switch(this.fieldState){case Se.UPDATE_ENTITY:if(!this[fe]){console.warn("[@kong-ui-public/forms] No API service provided");break}this.loading=!0,n=await this.getOne(this.model[this.schema.model]),e=this.getItem(this.schema.entityDataKey?n[this.schema.entityDataKey]:n),this.idValue=e.id;break;case Se.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Se.SET_REFERRAL_VALUE:this.idValue=this.value}e&&(this.initialItem=this.transformItem(e),this.selectedItem=this.initialItem)}catch(o){this.error=o.message||this.t("fields.auto_suggest.error.load_entity",{entity:this.schema.entity}),console.error("err!",o)}finally{this.loading=!1}},methods:{async getOne(e){if(!this[fe])return console.warn("[@kong-ui-public/forms] No API service provided"),{};const n=await this[fe].getOne(this.entity,e,{validateStatus:o=>o>=200&&o<300||o===404});if(n.status===404)throw new Error(`Entity of type ${this.entity} with id ${e} not found`);return n.data},transformItem(e){var o;const n=((o=this.schema)==null?void 0:o.labelField)||"id";return{...e,label:n&&e?e[n]:"",value:e.id}},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},updateModel(e){this.$emit("model-updated",e!=null&&e.length?e:null,this.schema.model)},onSelected(e){this.error=null,this.idValue=e&&e.id,this.selectedItem=e,this.updateModel(this.getReturnValue(e||{}))},getReturnValue(e){var o;const n=(o=this.schema)==null?void 0:o.returnKey;return n?e[n]:e.id}}};function Wc(e,n,o,a,i,r){const l=t.resolveComponent("FieldScopedEntitySelect");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.disabled?"k-tooltip":"div"),{class:"field-wrap autosuggest","max-width":"300",text:e.schema.disabledTooltip},{default:t.withCtx(()=>[t.createVNode(l,{id:i.idValue,"allow-uuid-search":r.allowUuidSearch,disabled:i.loading,"dom-id":e.schema.model,entity:r.entity,error:i.error,"field-disabled":e.schema.disabled,fields:r.inputFieldsWithoutId,"initial-item-selected":r.initialValueSelected,"label-field":e.schema.labelField||"id",placeholder:i.loading?a.t("fields.auto_suggest.loading"):e.schema.placeholder,"selected-item":i.selectedItem,"selected-item-loading":i.loading,onChange:r.onSelected},null,8,["id","allow-uuid-search","disabled","dom-id","entity","error","field-disabled","fields","initial-item-selected","label-field","placeholder","selected-item","selected-item-loading","onChange"])]),_:1},8,["text"])}const Sa=$(Yc,[["render",Wc],["__scopeId","data-v-9ab50e80"]]),wn=50,Zc={mixins:[Ce],inject:[fe],emits:["model-updated"],setup(){const{t:e}=me.createI18n("en-us",ge);return{t:e}},data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return Ta(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},scope(){return this.schema.label.toLowerCase()},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search}},async created(){await this.$nextTick();let e,n;switch(this.fieldState){case Se.UPDATE_ENTITY:if(!this[fe]){console.warn("[@kong-ui-public/forms] No API service provided");break}n=(await this[fe].getOne(this.entity,this.model[this.schema.model])).data,e=this.getItem(this.schema.entityDataKey?n[this.schema.entityDataKey]:n),this.idValue=e.id;break;case Se.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Se.SET_REFERRAL_VALUE:this.idValue=this.value}try{e&&(this.initialItems=[{...e,label:this.getSuggestionLabel(e),value:e.id}]),this.items=this.initialItems}catch(o){this.message=`There was an error loading ${this.schema.entity}`,console.error("err!",o)}},methods:{onQueryChange(e){e.trim().length===0&&(this.items=[],this.message="Type something to search"),typeof this.performSearch!="function"&&(this.performSearch=tt(this.search,500)),this.performSearch(e)},async search(e){if(e.trim().length===0)return;this.loading=!0;const n=[],o=[],a=this.getInputFields(),i=new Set;Cn(e)&&a.includes("id")?o.push((async()=>{const r=await this.fetchExact(e);n.push({...r,label:this.getSuggestionLabel(r),value:r.id})})()):o.push(...a.filter(r=>r!=="id").map(async r=>{(await this.fetchSuggestions(e,r)).forEach(s=>{i.has(s.id)||(i.add(s.id),n.push({...s,label:this.getSuggestionLabel(s),value:s.id}))})})),await Promise.all(o),this.items=n,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(e){return e.data?e.data.length>0?e.data[0]:[]:e},async fetchUntilLimit(e){const n=[];let o=null;if(!this[fe])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;n.length<wn;){const a=await this[fe].getAll(this.entity,{size:wn,offset:o,...e});if(n.push(...a.data.data),o=a.data.offset,!o)break}return n.slice(0,wn)},async fetchSuggestions(e,n){return this.fetchUntilLimit({[n]:e})},async fetchExact(e){return this[fe]?(await this[fe].getOne(this.entity,e)).data:(console.warn("[@kong-ui-public/forms] No API service provided"),{})},getInputFields(){var e,n;return((n=(e=this.schema)==null?void 0:e.inputValues)==null?void 0:n.fields)||[]},getSuggestionLabel(e){const n=this.getInputFields();return n.length&&e?n.map(o=>e[o]).filter(Boolean).join(" - "):""},updateModel(e){this.$emit("model-updated",e!=null&&e.length?e:null,this.schema.model)},onSelected(e){this.idValue=e&&e.id,this.updateModel(this.getReturnValue(e||{}))},getReturnValue(e){var o;const n=(o=this.schema)==null?void 0:o.returnKey;return n?e[n]:e.id}}},Xc=["data-testid","data-testlabel"],Jc=["data-testid"],Qc={class:"autosuggest__results_message"};function em(e,n,o,a,i,r){const l=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.disabled?"k-tooltip":"div"),{class:"field-wrap autosuggest","max-width":"300",text:a.t("general.disable_source_scope_change",{scope:r.scope})},{default:t.withCtx(()=>[t.createVNode(l,{id:e.schema.model,ref:"suggestion",modelValue:i.idValue,"onUpdate:modelValue":n[0]||(n[0]=s=>i.idValue=s),clearable:"",disabled:e.schema.disabled,"enable-filtering":"","filter-function":()=>!0,items:i.items,loading:i.loading,placeholder:e.schema.placeholder,width:"100%",onChange:r.onSelected,onQueryChange:r.onQueryChange},{"item-template":t.withCtx(({item:s})=>[t.createElementVNode("span",{class:"first-part","data-testid":s.id&&`${s.id}-0`,"data-testlabel":s.label},t.toDisplayString(r.getSuggestionLabel(s).split(" - ")[0]),9,Xc),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.getSuggestionLabel(s).split(" - ").slice(1),(c,m)=>(t.openBlock(),t.createElementBlock("span",{key:m,class:"field-span","data-testid":s.id&&`${s.id}-${m+1}`||m+1},t.toDisplayString(c),9,Jc))),128))]),empty:t.withCtx(()=>[t.createElementVNode("div",Qc,[t.createElementVNode("span",null,t.toDisplayString(i.message),1)])]),_:1},8,["id","modelValue","disabled","items","loading","placeholder","onChange","onQueryChange"])]),_:1},8,["text"])}const Ca=$(Zc,[["render",em],["__scopeId","data-v-433129a3"]]);function tm(e){const n=t.ref([]),o=t.ref(null),a=y=>Ge(y)?We[y]!=null?We[y]:(console.warn(`'${y}' is not a validator function!`),null):y,i=t.computed({get(){var I,N;let y;return x(v(e.schema,"get"))?y=e.schema.get((I=e.model)==null?void 0:I.value):y=v((N=e.model)==null?void 0:N.value,e.schema.model),_(y)},set(y){const I=i;y=M(y),x(y)?y(y,I):s(y,I)}}),r=y=>{var V;c();const I=v(e.formOptions,"validateAsync",!1);let N=[];if(e.schema.readonly!==!0&&e.disabled!==!0){const C=[],k=(V=e.schema)==null?void 0:V.validator;k&&(Array.isArray(k)?ie(k,T=>{C.push(a(T))}):C.push(a(k))),x(e.externalValidator)&&C.push(e.externalValidator),ie(C,T=>{var b,w;if(I)N.push(T(i.value,e.schema,(b=e.model)==null?void 0:b.value));else{const A=T(i.value,e.schema,(w=e.model)==null?void 0:w.value);A&&x(A.then)?A.then(u=>{u&&(n.value=n.value.concat(u));const p=n.value.length===0;e.emitValidated&&e.emitValidated({isValid:p,errors:n.value,field:e.schema})}):A&&(N=N.concat(A))}})}const U=C=>{var T,b;let k=[];if(ie(Zo(C),w=>{Array.isArray(w)&&w.length>0?k=k.concat(w):Ge(w)&&k.push(w)}),x((T=e.schema)==null?void 0:T.onValidated)&&e.schema.onValidated((b=e.model)==null?void 0:b.value,k,e.schema),!y){const w=k.length===0;e.emitValidated&&e.emitValidated({isValid:w,errors:k,field:e.schema})}return C=k,k};return I?Promise.all(N).then(U):U(N)},l=()=>{x(o.value)?o.value():o.value=tt(r,v(e.schema,"validateDebounceTime",v(e.formOptions,"validateDebounceTime",500)))},s=(y,I)=>{var U,V,C;let N=!1;x(e.schema.set)?(e.schema.set((U=e.model)==null?void 0:U.value,y),N=!0):e.schema.model&&(m(e.schema.model,y),N=!0),N&&(e.emitModelUpdated&&((V=e.model)!=null&&V.value)&&e.emitModelUpdated({value:y,model:e.schema.model}),x(e.schema.onChanged)&&e.schema.onChanged((C=e.model)==null?void 0:C.value,y,I,e.schema),v(e.formOptions,"validateAfterChanged",!1)===!0&&(v(e.schema,"validateDebounceTime",v(e.formOptions,"validateDebounceTime",0))>0?l():r()))},c=()=>{n.value.splice(0)},m=(y,I)=>{var T;let N=y.replace(/\[(\w+)\]/g,".$1");N=N.replace(/^\./,"");let U=((T=e.model)==null?void 0:T.value)||{},V=0;const C=N.split("."),k=C.length;for(;V<k;){const b=C[V];if(V<k-1)U[b]!==void 0||(U[b]={}),U=U[b];else{U[b]=I;return}++V}},g=(y,I=!1)=>{const N=v(e.formOptions,"fieldIdPrefix","");return bn(y,N)+(I?"-"+Xo():"")},f=y=>`${g(y)}-label`,h=()=>v(e.schema,"fieldClasses",[]),_=y=>e.formatValueToField&&typeof e.formatValueToField=="function"?e.formatValueToField(y):y,M=y=>e.formatValueToModel&&typeof e.formatValueToModel=="function"?e.formatValueToModel(y):y;return{value:i,clearValidationErrors:c,getFieldID:g,getLabelId:f,getFieldClasses:h,updateModelValue:s}}function nm(e){const n=[],o=a=>{const i=["cluster-cache","cluster_cache"];for(const r of i)if(a.model.includes(r))return!1;return new RegExp("(?<=-redis-).*").test(a.model)};return e.fields.forEach(a=>{o(a)&&n.push(a)}),{redis:{id:"_redis",fields:n,model:"__redis_partial",redisType:e._supported_redis_partial_type,redisPath:e._redis_partial_path},redisModels:n.map(a=>a.model)}}function om(e,n){const o=new RegExp("(?<=config-redis-).*"),a=/Config\.Redis.*/;return n.filter(r=>{const l=r.model.match(o);return l&&!Object.keys(e).includes(l[0])}).map(r=>{const l=r.label.match(a);return{label:l?l[0]:r.label,key:r.model,value:"N/A",type:"text"}})}const Ee={useAbstractFields:tm,useRedisPartial:nm,useRedisNonStandardFields:om},am={class:"form-field-wrapper"},wa=$(t.defineComponent({__name:"FieldInput",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,i=o,r=t.toRefs(a),l=t.inject(he,void 0),{updateModelValue:s,getFieldID:c,clearValidationErrors:m,value:g}=Ee.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:V=>{i("modelUpdated",V.value,V.model)}});n({clearValidationErrors:m});const f=t.computed(()=>{var C,k;const V=(C=a.schema)==null?void 0:C.inputType.toLowerCase();if(V==="number"&&((k=a.schema)==null?void 0:k.referenceable)===!0)return"text";switch(V){case"string":return"text";case"datetime":return"datetime-local";default:return V||"text"}}),h={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},_=(V,C)=>{var w,A;let k=V;const T=h[f.value]||"",b=nt.parse(V,T);b&&((w=a.schema)!=null&&w.format?k=nt.format(b,(A=a.schema)==null?void 0:A.format):k=b.valueOf()),s(k,C)},M=(V,C)=>{Tn(V)||(V=NaN),s(V,C)},y=V=>{let C=V;switch(a.schema.inputType){case"number":case"range":fa(parseFloat(V))&&(C=parseFloat(V));break}g.value=C,s(C,V)},I=V=>{g.value=V,s(V,V)},N=t.ref(null),U=()=>{var V;x(N.value)&&((V=N.value)==null||V.flush())};return t.onMounted(()=>{switch(f.value){case"number":case"range":N.value=tt((V,C)=>{M(V,C)},parseInt(v(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":N.value=tt((V,C)=>{_(V,C)},parseInt(v(a.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}}),t.onBeforeMount(()=>{f.value==="checkbox"?console.warn("The use of 'checkbox' inputType with 'input' type fields is deprecated. Use 'checkbox' type instead."):f.value==="radio"?console.warn("The use of 'radio' inputType with 'input' type fields is deprecated. Use 'radio' type instead."):f.value==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")}),(V,C)=>{const k=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",am,[t.createVNode(k,t.mergeProps(V.$attrs,{id:t.unref(c)(e.schema),autocomplete:e.schema.autocomplete,class:e.schema.fieldClasses,disabled:e.disabled||void 0,help:e.hint?e.hint:f.value==="color"||f.value==="range"?t.unref(g):void 0,max:e.schema.max,maxlength:e.schema.maxlength,min:e.schema.min,minlength:e.schema.minlength,"model-value":t.unref(g),name:e.schema.inputName,pattern:e.schema.pattern,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,"show-password-mask-toggle":f.value==="password",type:f.value,width:e.schema.width,onBlur:U,"onUpdate:modelValue":y}),null,16,["id","autocomplete","class","disabled","help","max","maxlength","min","minlength","model-value","name","pattern","placeholder","readonly","required","show-password-mask-toggle","type","width"]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(l)),{schema:e.schema,update:I,value:t.unref(g)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-c9bb165e"]]),im={name:"FieldMetric",components:{AddIcon:Te.AddIcon,TrashIcon:Te.TrashIcon},mixins:[Ce],emits:["remove-item"],data(){return{contentVisible:!1}}},rm={key:0,class:"content"};function lm(e,n,o,a,i,r){const l=t.resolveComponent("AddIcon"),s=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field-dropdown",{active:i.contentVisible}])},[t.createElementVNode("div",{class:"title",onClick:n[0]||(n[0]=m=>i.contentVisible=!i.contentVisible)},[t.createTextVNode(t.toDisplayString(e.model.name?e.model.name:"New Item")+" ",1),t.createVNode(l,{class:"metric-add-icon"})]),t.createVNode(t.Transition,{name:"slide-fade"},{default:t.withCtx(()=>[i.contentVisible?(t.openBlock(),t.createElementBlock("div",rm,[t.renderSlot(e.$slots,"default"),t.createVNode(c,{appearance:"tertiary",class:"metric-remove-button",onClick:n[1]||(n[1]=m=>e.$emit("remove-item"))},{default:t.withCtx(()=>[t.createVNode(s)]),_:1})])):t.createCommentVNode("",!0)]),_:3})],2)}const ka=$(im,[["render",lm]]),sm={class:"field-object-container"},dm={key:1},cm=["id"],mm={key:0},um=["onUpdate:modelValue"],fm={key:1},hm=["onUpdate:modelValue"],pm={key:2},gm=["onUpdate:modelValue"],ym=["onClick"],Ma=$(Object.assign({mixins:[Ce],emits:["modelUpdated"],expose:["validate","clearValidationErrors","schema"],data(){return{attributes:this.schema?this.schema.attributes:void 0,newKeyType:"string",newKeyName:"",keyTypes:{}}},created(){this.value||(this.value={})},mounted(){if(!this.value)return;const e=Object.keys(this.value),n={};for(let o=0;o<e.length;o++){const a=e[o];n[a]=typeof this.value[a]}this.keyTypes=n},methods:{removeElement(e){const n=this.value;delete n[e],this.value=JSON.parse(JSON.stringify(n));const o=this.keyTypes;delete o[e],this.keyTypes=JSON.parse(JSON.stringify(o))},addKey(){this.value[this.newKeyName]=void 0,this.value={...this.value},this.keyTypes[this.newKeyName]=this.newKeyType,this.keyTypes={...this.keyTypes},this.newKeyName=""},updateModel(e,n){this.$emit("modelUpdated",e,n)}}},{__name:"FieldObject",setup(e){return(n,o)=>{const a=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",sm,[n.schema.schema?(t.openBlock(),t.createBlock(G,{key:0,model:n.value,options:n.formOptions,schema:n.schema.schema,onModelUpdated:n.updateModel},null,8,["model","options","schema","onModelUpdated"])):(t.openBlock(),t.createElementBlock("div",dm,[t.createElementVNode("table",{id:n.getFieldID(n.schema),class:t.normalizeClass(n.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(i,r)=>(t.openBlock(),t.createElementBlock("tr",{key:r},[t.createElementVNode("td",null,t.toDisplayString(r),1),n.keyTypes[r]==="string"?(t.openBlock(),t.createElementBlock("td",mm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":l=>n.value[r]=l,type:"text"},null,8,um),[[t.vModelText,n.value[r]]])])):t.createCommentVNode("",!0),n.keyTypes[r]==="boolean"?(t.openBlock(),t.createElementBlock("td",fm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":l=>n.value[r]=l,type:"checkbox"},null,8,hm),[[t.vModelCheckbox,n.value[r]]])])):t.createCommentVNode("",!0),n.keyTypes[r]==="number"?(t.openBlock(),t.createElementBlock("td",pm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":l=>n.value[r]=l,type:"number"},null,8,gm),[[t.vModelText,n.value[r]]])])):t.createCommentVNode("",!0),t.createElementVNode("td",null,[t.createElementVNode("input",{type:"button",value:"x",onClick:l=>n.removeElement(r)},null,8,ym)])]))),128))],10,cm),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=i=>n.newKeyType=i)},[...o[3]||(o[3]=[t.createElementVNode("option",{value:"string"}," String ",-1),t.createElementVNode("option",{value:"number"}," Number ",-1),t.createElementVNode("option",{value:"boolean"}," Boolean ",-1)])],512),[[t.vModelSelect,n.newKeyType]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=i=>n.newKeyName=i),type:"text"},null,512),[[t.vModelText,n.newKeyName]]),t.createElementVNode("input",{type:"button",value:"Add key",onClick:o[2]||(o[2]=(...i)=>n.addKey&&n.addKey(...i))})]))])),[[a,n.attributes]])}}}),[["__scopeId","data-v-6eddb0ed"]]),bm=["id"],_m=["data-testid"],Em={class:"item-wrapper"},Tm={class:"index-wrapper"},Sm={key:0},Cm={key:1},wm=["onUpdate:modelValue","placeholder","type","onInput"],km={key:0,class:"hint"},Mm={class:"input-item"},Am=["placeholder"],Nm={key:0,class:"hint"},Aa=$(Object.assign({mixins:[Ce],inject:{autofillSlot:{from:he,default:void 0}},emits:["model-updated"],expose:["validate","clearValidationErrors","schema"],data(){return{newKeyName:""}},computed:{subSchema(){return this.schema.schema&&this.schema.schema.fields[0].schema},subFields(){return!this.subSchema&&this.schema.fields},hasObjectKeys(){return this.value&&Object.keys(this.value).length>0},transformedModel(){return this.subSchema&&this.subSchema.fields.length>=1&&this.subSchema.fields[0].type==="array"?new Proxy(this.model[this.schema.model],{get:(e,n)=>({[this.schema.model]:e[n]}),set:(e,n,o)=>e[n]=o[this.schema.model]}):this.model[this.schema.model]},valueInputType(){var e;return["number","integer"].includes((e=this.schema.values)==null?void 0:e.type)?"number":"text"}},mounted(){this.value||(this.value={});let e=[];this.subSchema?e=this.subSchema.fields:this.subFields&&(e=this.schema.fields[0].schema),this.value=this.transformMapModelValuesToObject(this.model,e,this.schema.model)},methods:{removeElement(e){const n=this.value;delete n[e],this.value={...n}},transformMapModelValuesToObject(e,n,o){let a={};try{a=JSON.parse(JSON.stringify(e??{}))[o]??{}}catch{}return Object.keys(e).map(i=>{const r=i.indexOf(o+"-");if(r>-1&&Array.isArray(n))if(n.length>0){const s=i.split("-").filter(m=>n.find(g=>g.model===m)),c=i.split(`-${s}`)[0].split(`${o}-`)[1];s.length?a[c]={...a[c],[s]:e[i]}:a[i.substring(r+`${o}-`.length)]=e[i]}else a[i.substring(`${o}-`.length)]=e[i];else{const s=i.split("-").filter(m=>m===this.schema.model),c=i.split(`-${s}`)[0].split(`${o}-`)[1];c&&(a[c]=e[i])}return i}),a},addKey(){var a;const e=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",n=((a=this.schema.values)==null?void 0:a.default)??(this.valueInputType==="number"?0:""),o=this.subSchema?e?[""]:{}:n;this.value[this.newKeyName]=o,this.newKeyName=""},updateModel(e,n){this.$emit("model-updated",this.model[this.schema.model],n)}}},{__name:"FieldObjectAdvanced",setup(e){return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{id:n.getFieldID(n.schema),class:t.normalizeClass(["object-advanced-wrapper",n.schema.fieldClasses])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(i,r)=>(t.openBlock(),t.createElementBlock("div",{key:r,"data-testid":`field-object-key-${r}`},[t.createElementVNode("div",null,[t.createElementVNode("div",Em,[t.createElementVNode("div",Tm,[t.createElementVNode("strong",null,t.toDisplayString(r),1),t.createElementVNode("div",null,[t.createVNode(a,{appearance:"tertiary",class:"delete",icon:"",type:"button",onClick:l=>n.removeElement(r)},{default:t.withCtx(()=>[t.createVNode(t.unref(Te.TrashIcon))]),_:1},8,["onClick"])])]),o[1]||(o[1]=t.createElementVNode("hr",{class:"divider"},null,-1)),n.subSchema?(t.openBlock(),t.createElementBlock("div",Sm,[t.createVNode(G,{model:n.transformedModel[r],options:{helpAsHtml:!0},schema:n.subSchema,onModelUpdated:n.updateModel},null,8,["model","schema","onModelUpdated"])])):(t.openBlock(),t.createElementBlock("div",Cm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":l=>n.value[r]=l,class:"form-control",placeholder:n.schema.fields&&n.schema.fields[0].schema.placeholder,type:n.valueInputType,onInput:l=>n.updateModel(n.value[r],n.model[n.schema.model])},null,40,wm),[[t.vModelDynamic,n.value[r]]]),n.schema.fields&&n.schema.fields[0].schema.hint?(t.openBlock(),t.createElementBlock("p",km,t.toDisplayString(n.schema.fields[0].schema.hint),1)):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.autofillSlot),{schema:n.schema.fields&&n.schema.fields[0].schema||n.schema.values,update:l=>n.value[r]=l,value:n.value[r]},null,8,["schema","update","value"]))])),o[2]||(o[2]=t.createElementVNode("hr",{class:"wide-divider"},null,-1))])])],8,_m))),128)),t.createElementVNode("div",{class:t.normalizeClass(["input-wrapper",{indent:n.hasObjectKeys}])},[t.createElementVNode("div",Mm,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>n.newKeyName=i),class:"form-control","data-testid":"keyname-input",placeholder:n.schema.placeholder,type:"text"},null,8,Am),[[t.vModelText,n.newKeyName]]),t.createVNode(a,{appearance:"tertiary","data-testid":"add-key",disabled:!n.newKeyName,onClick:n.addKey},{default:t.withCtx(()=>[t.createTextVNode(" + Add "+t.toDisplayString(n.schema.buttonLabel||n.schema.label),1)]),_:1},8,["disabled","onClick"])]),n.schema.hintText?(t.openBlock(),t.createElementBlock("p",Nm,t.toDisplayString(n.schema.hintText),1)):t.createCommentVNode("",!0)],2)],10,bm)}}}),[["__scopeId","data-v-0faeec4d"]]),Im={class:"radio-selection-group"},Na=$(t.defineComponent({__name:"FieldRadio",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,i=o,r=t.toRefs(a),{updateModelValue:l,value:s,clearValidationErrors:c}=Ee.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:g=>{i("modelUpdated",g.value,g.model)}});n({clearValidationErrors:c});const m=g=>{let f=g;typeof g=="string"&&(f=g.split(","),a.schema.array||(f=f.toString())),l(f,g)};return(g,f)=>{const h=t.resolveComponent("KRadio");return t.openBlock(),t.createElementBlock("div",Im,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.schema.values,(_,M)=>(t.openBlock(),t.createBlock(h,{id:e.schema.name+"-"+M,key:_.value,modelValue:t.unref(s),"onUpdate:modelValue":f[0]||(f[0]=y=>t.isRef(s)?s.value=y:null),label:_.name,"label-attributes":{info:e.schema.help},name:e.schema.name,required:e.schema.required||void 0,"selected-value":_.value,onChange:m},null,8,["id","modelValue","label","label-attributes","name","required","selected-value"]))),128))])}}}),[["__scopeId","data-v-a070103e"]]),Ia=t.defineComponent({__name:"FieldSelect",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,i=o,r=t.computed(()=>a.schema.selectOptions||{}),l=y=>Y(y)?null:y,s=t.toRefs(a),{getFieldID:c,clearValidationErrors:m,value:g}=Ee.useAbstractFields({model:s.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:l,emitModelUpdated:y=>{i("modelUpdated",y.value,y.model)}});n({clearValidationErrors:m});const f=t.computed(()=>{const y=a.schema.values;return h(typeof y=="function"?y.apply(this,[a.model,a.schema]):y)}),h=y=>{const I=[];return y.forEach(N=>{I.push({label:M(N),value:_(N),disabled:typeof N=="object"&&N.disabled||void 0,group:typeof N=="object"&&String(N.group||"").toUpperCase()||void 0})}),I},_=y=>{if(ue(y)){if(r.value&&typeof r.value.value<"u")return y[r.value.value];if(typeof y.id<"u")return String(y.id);throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return y},M=y=>{if(ue(y)){if(r.value&&typeof r.value.name<"u")return y[r.value.name];if(typeof y.name<"u")return String(y.name);throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return String(y)};return(y,I)=>{const N=t.resolveComponent("KSelect");return t.openBlock(),t.createBlock(N,{id:t.unref(c)(e.schema),modelValue:t.unref(g),"onUpdate:modelValue":I[0]||(I[0]=U=>t.isRef(g)?g.value=U:null),class:t.normalizeClass(e.schema.fieldClasses),clearable:!e.schema.required,disabled:e.disabled||void 0,items:f.value,"kpop-attributes":{"data-testid":`${t.unref(c)(e.schema)}-items`},"label-attributes":{info:e.schema.help},name:e.schema.inputName,placeholder:r.value.hideNoneSelectedText?void 0:r.value.noneSelectedText||"Nothing Selected",required:e.schema.required||void 0,width:"100%"},null,8,["id","modelValue","class","clearable","disabled","items","kpop-attributes","label-attributes","name","placeholder","required"])}}}),Om={class:"field-string-array"},Oa=$(t.defineComponent({__name:"FieldStringArray",props:{formOptions:{},model:{},schema:{}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=o,{updateModelValue:i,getFieldID:r,getLabelId:l,clearValidationErrors:s,value:c}=Ee.useAbstractFields({model:t.toRef(()=>e.model),schema:e.schema,formOptions:e.formOptions,emitModelUpdated:_=>{a("modelUpdated",_.value,_.model)}});n({clearValidationErrors:s});const m=t.ref("");function g(_){return Array.isArray(_)?_.map(M=>String(M).trim()).filter(Boolean).join(", "):""}function f(_){return _?_.trim().split(",").map(M=>M.trim()).filter(Boolean):[]}function h(_){m.value=_;const M=f(_);i(M,c.value)}return t.watch(c,_=>{const M=_?g(_):"";g(f(m.value))!==M&&(m.value=M)},{immediate:!0}),(_,M)=>{const y=t.resolveComponent("KInput");return t.openBlock(),t.createElementBlock("div",Om,[t.createVNode(y,t.mergeProps(_.$attrs,{id:t.unref(r)(e.schema),"aria-labelledby":t.unref(l)(e.schema),class:e.schema.fieldClasses,help:"Use comma to separate values. eg: value1, value2","model-value":m.value,placeholder:e.schema.placeholder||"Comma separated values",type:"text","onUpdate:modelValue":h}),null,16,["id","aria-labelledby","class","model-value","placeholder"])])}}}),[["__scopeId","data-v-cf2eff67"]]),Vm={name:"FieldArray",components:{FieldArrayItem:ya,FieldArrayMultiItem:ba,FieldSelect:Ia,FieldMetric:ka,FieldObject:Ma,FieldObjectAdvanced:Aa,FieldAutoSuggest:Sa,FieldAutoSuggestLegacy:Ca,FieldRadio:Na,FieldArrayCardContainer:ga,FieldInput:wa,FieldStringArray:Oa,TrashIcon:Te.TrashIcon},mixins:[Ce],inject:{autofillSlot:{from:he,default:void 0}},props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},emits:["refreshModel"],methods:{generateSchema(e,n,o){var i,r,l;let a;return n&&(a=JSON.parse(JSON.stringify(n)),(l=(r=(i=a.schema)==null?void 0:i.fields)==null?void 0:r.map)==null||l.call(r,s=>(s.id=`${s.id||s.model}-${o}`,s))),{...a,set(s,c){e[o]=c},get(){return e[o]}}},newElement(){let e=this.value,n;(!e||!e.push)&&(e=[]),this.schema.items&&this.schema.items.default&&(typeof this.schema.items.default=="function"?n=this.schema.items.default():n=this.schema.items.default),e.push(n),this.value=[...e]},removeElement(e){this.value=this.value.filter((n,o)=>o!==e)},getFieldComponent(e){return e.component?e.component:"field-"+e.type},modelUpdated(){this.$emit("refreshModel")},handleInput(e,n){var a,i;let o=e;((i=(a=this.schema)==null?void 0:a.inputAttributes)==null?void 0:i.type)==="number"&&Tn(parseFloat(e))&&(o=parseFloat(e)),this.value=this.value.map((r,l)=>l===n?o:r)},isStringArrayItems(){var n,o;const e=(n=this.schema)==null?void 0:n.elements;return e?e.type==="array"&&((o=e.elements)==null?void 0:o.type)==="string":!1},generateStringArraySchema(e){var n;return{model:String(e),id:`${this.schema.id||this.schema.model}-${e}`,placeholder:this.schema.placeholder,help:this.schema.help,fieldClasses:(n=this.schema.inputAttributes)==null?void 0:n.class,get:()=>this.value[e]}},handleStringArrayUpdate(e,n){this.value=this.value.map((o,a)=>a===n?e:o),this.$emit("refreshModel")}}},Bm=["id"],Fm={key:0,class:"string-array-item"},Rm={key:2},Dm=["onUpdate:modelValue","aria-labelledby","type"],Lm=["onUpdate:modelValue","aria-labelledby"];function Um(e,n,o,a,i,r){const l=t.resolveComponent("FieldStringArray"),s=t.resolveComponent("TrashIcon"),c=t.resolveComponent("KButton"),m=t.resolveComponent("KTextArea"),g=t.resolveComponent("KInput");return e.schema?(t.openBlock(),t.createElementBlock("div",{key:0,id:e.getFieldID(e.schema),class:t.normalizeClass(e.schema.fieldClasses)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(f,h)=>(t.openBlock(),t.createElementBlock("div",{key:h,class:t.normalizeClass(e.schema.fieldItemsClasses)},[r.isStringArrayItems()?(t.openBlock(),t.createElementBlock("div",Fm,[t.createVNode(l,{"form-options":e.formOptions,model:e.value,schema:r.generateStringArraySchema(h),onModelUpdated:_=>r.handleStringArrayUpdate(_,h)},null,8,["form-options","model","schema","onModelUpdated"]),t.createVNode(c,{appearance:"tertiary",class:"string-array-remove-btn",icon:"",onClick:_=>r.removeElement(h)},{default:t.withCtx(()=>[t.createVNode(s,{decorative:""})]),_:1},8,["onClick"])])):e.schema.items&&e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:1,index:h,model:f,schema:r.generateSchema(e.value,e.schema.items,h),onRemoveItem:_=>r.removeElement(h)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldComponent(e.schema.items)),{"form-options":e.formOptions,model:f,schema:r.generateSchema(e.value,e.schema.items,h),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["index","model","schema","onRemoveItem"])):e.schema.items?(t.openBlock(),t.createElementBlock("span",Rm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldComponent(e.schema.items)),{"form-options":e.formOptions,model:f,schema:r.generateSchema(e.value,e.schema.items,h),onModelUpdated:r.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):e.schema.itemContainerComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.schema.itemContainerComponent),{key:3,"data-testid":`${e.getFieldID(e.schema)}-item-${h}`,model:f,schema:r.generateSchema(e.value,e.schema.items,h),onRemoveItem:_=>r.removeElement(h)},{after:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:_=>e.value[h]=_,value:e.value[h]},null,8,["schema","update","value"]))]),default:t.withCtx(()=>{var _;return[e.schema.inputAttributes&&e.schema.inputAttributes.type==="textarea"?(t.openBlock(),t.createBlock(m,t.mergeProps({key:0,ref_for:!0},e.schema.inputAttributes,{id:e.getFieldID(e.schema),modelValue:e.value[h],"onUpdate:modelValue":M=>e.value[h]=M,"aria-labelledby":e.getLabelId(e.schema),autosize:"","character-limit":e.schema.inputAttributes.max,class:e.schema.fieldClasses,maxlength:e.schema.max,minlength:e.schema.min,name:e.schema.inputName,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,resizable:"",rows:e.schema.rows||3}),null,16,["id","modelValue","onUpdate:modelValue","aria-labelledby","character-limit","class","maxlength","minlength","name","placeholder","readonly","required","rows"])):!e.schema.inputAttributes||!e.schema.inputAttributes.type||e.schema.inputAttributes.type==="text"||e.schema.inputAttributes.type==="number"?(t.openBlock(),t.createBlock(g,t.mergeProps({key:1,"aria-labelledby":e.getLabelId(e.schema)},{ref_for:!0},e.schema.inputAttributes,{"model-value":e.value[h],type:e.schema.inputAttributes&&e.schema.inputAttributes.type||"text",onInput:M=>{r.handleInput(M,h)}}),null,16,["aria-labelledby","model-value","type","onInput"])):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:2,"onUpdate:modelValue":M=>e.value[h]=M,"aria-labelledby":e.getLabelId(e.schema)},{ref_for:!0},e.schema.inputAttributes,{type:((_=e.schema.inputAttributes)==null?void 0:_.type)||"text"}),null,16,Dm)),[[t.vModelDynamic,e.value[h]]])]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.withDirectives(t.createElementVNode("input",t.mergeProps({ref_for:!0},e.schema.inputAttributes,{"onUpdate:modelValue":_=>e.value[h]=_,"aria-labelledby":e.getLabelId(e.schema),type:"text"}),null,16,Lm),[[t.vModelText,e.value[h]]]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:_=>e.value[h]=_,value:e.value[h]},null,8,["schema","update","value"]))],64))],2))),128)),t.createVNode(c,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`add-${e.getFieldID(e.schema)}`,type:"button",onClick:r.newElement},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel||o.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,Bm)):t.createCommentVNode("",!0)}const Pm=$(Vm,[["render",Um],["__scopeId","data-v-7633b3a8"]]),$m={class:"form-field-wrapper field-checkbox"},vm=$(t.defineComponent({__name:"FieldCheckbox",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,i=o,r=t.toRefs(a),{getFieldID:l,value:s,clearValidationErrors:c}=Ee.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:m=>{i("modelUpdated",m.value,m.model)}});return n({clearValidationErrors:c}),(m,g)=>{const f=t.resolveComponent("KCheckbox");return t.openBlock(),t.createElementBlock("div",$m,[t.createVNode(f,t.mergeProps(m.$attrs,{id:t.unref(l)(e.schema),modelValue:t.unref(s),"onUpdate:modelValue":g[0]||(g[0]=h=>t.isRef(s)?s.value=h:null),autocomplete:e.schema.autocomplete,class:e.schema.fieldClasses,disabled:e.disabled||void 0,help:e.hint?e.hint:void 0,name:e.schema.inputName,readonly:e.schema.readonly,required:e.schema.required,width:e.schema.width}),null,16,["id","modelValue","autocomplete","class","disabled","help","name","readonly","required","width"])])}}}),[["__scopeId","data-v-6811d435"]]),xm={class:"wrapper"},jm=["disabled"],Km=["id","checked","disabled","onChange","name"],qm=["disabled"],zm={class:"info"},Hm={class:"dropList"},Gm=["id","checked","disabled","onChange","name"];function Ym(e,n,o,a,i,r){const l=t.resolveDirective("attributes");return t.withDirectives((t.openBlock(),t.createElementBlock("div",xm,[e.schema.listBox?(t.openBlock(),t.createElementBlock("div",{key:0,class:"listbox form-control",disabled:e.disabled||null},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,s=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(s)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(s)||null,disabled:e.disabled||null,onChange:c=>r.onChanged(c,s),name:r.getInputName(s)},null,40,Km),[[l,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(s)),1)])],2))),256))],8,jm)):t.createCommentVNode("",!0),e.schema.listBox?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,class:"combobox form-control",disabled:e.disabled||null},[t.createElementVNode("div",{class:t.normalizeClass(["mainRow",{expanded:i.comboExpanded}]),onClick:n[0]||(n[0]=(...s)=>r.onExpandCombo&&r.onExpandCombo(...s))},[t.createElementVNode("div",zm,t.toDisplayString(r.selectedCount)+" selected",1),n[1]||(n[1]=t.createElementVNode("div",{class:"arrow"},null,-1))],2),t.createElementVNode("div",Hm,[i.comboExpanded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.items,s=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["list-row",{"is-checked":r.isItemChecked(s)}])},[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{id:e.getFieldID(e.schema,!0),type:"checkbox",checked:r.isItemChecked(s)||null,disabled:e.disabled||null,onChange:c=>r.onChanged(c,s),name:r.getInputName(s)},null,40,Gm),[[l,"input"]]),t.createTextVNode(t.toDisplayString(r.getItemName(s)),1)])],2))),256)):t.createCommentVNode("",!0)])],8,qm))])),[[l,"wrapper"]])}const Wm=$({mixins:[Ce],data(){return{comboExpanded:!1}},computed:{items(){const e=this.schema.values;return typeof e=="function"?e.apply(this,[this.model,this.schema]):e},selectedCount(){return this.value?this.value.length:0}},methods:{getInputName(e){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?Ho(this.schema.inputName+"_"+this.getItemValue(e)):Ho(this.getItemValue(e))},getItemValue(e){if(ue(e)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.value<"u")return e[this.schema.checklistOptions.value];if(typeof e.value<"u")return e.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return e},getItemName(e){if(ue(e)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.name<"u")return e[this.schema.checklistOptions.name];if(typeof e.name<"u")return e.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return e},isItemChecked(e){return this.value&&this.value.indexOf(this.getItemValue(e))!==-1},onChanged(e,n){if((Y(this.value)||!Array.isArray(this.value))&&(this.value=[]),e.target.checked){const o=_a(this.value);o.push(this.getItemValue(n)),this.value=o}else{const o=_a(this.value);o.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=o}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",Ym]]),Zm={name:"FieldKeyValuePairs",components:{TrashIcon:Te.TrashIcon},mixins:[Ce],inject:{autofillSlot:{from:he,default:void 0}},data(){return{pairs:[]}},watch:{pairs:{handler(){this.updateValue()},deep:!0}},created(){var n,o;this.value||(this.value={});const e=((o=this.model)==null?void 0:o[(n=this.schema)==null?void 0:n.model])??{};Object.keys(e).forEach(a=>{this.pairs.push({key:a,value:e[a]})})},methods:{onInput(e,n,o){this.pairs[n][o]=e.target.value},updateValue(){this.value=this.pairs.reduce((e,{key:n,value:o})=>({...e,...n&&o?{[n]:o}:null}),{})},addPair(){this.pairs.push({key:"",value:""})},removePair(e){this.pairs.splice(e,1)}}},Xm={class:"key-value-pairs-editor"},Jm={class:"pair-item-cell"},Qm=["data-testid","placeholder","value","onInput"],eu={class:"pair-item-cell"},tu=["data-testid","placeholder","value","onInput"];function nu(e,n,o,a,i,r){const l=t.resolveComponent("TrashIcon"),s=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",Xm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.pairs,(c,m)=>(t.openBlock(),t.createElementBlock("div",{key:m,class:"pair-item"},[t.createElementVNode("div",Jm,[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-key-${m}`,placeholder:e.schema.keyInputPlaceholder??"Key",type:"text",value:c.key,onInput:g=>{r.onInput(g,m,"key")}},null,40,Qm),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:g=>r.onInput({target:{value:g}},m,"key"),value:c.key},null,8,["schema","update","value"]))]),t.createElementVNode("div",eu,[t.createElementVNode("input",{class:"form-control","data-testid":`${e.getFieldID(e.schema)}-pair-value-${m}`,placeholder:e.schema.valueInputPlaceholder??"Value",type:"text",value:c.value,onInput:g=>{r.onInput(g,m,"value")}},null,40,tu),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.autofillSlot),{schema:e.schema,update:g=>r.onInput({target:{value:g}},m,"value"),value:c.value},null,8,["schema","update","value"]))]),t.createVNode(s,{appearance:"tertiary","data-testid":`${e.getFieldID(e.schema)}-remove-pair-${m}`,onClick:()=>{r.removePair(m)}},{default:t.withCtx(()=>[t.createVNode(l)]),_:1},8,["data-testid","onClick"])]))),128)),t.createVNode(s,{appearance:"tertiary",class:t.normalizeClass(e.schema.newElementButtonLabelClasses),"data-testid":`${e.getFieldID(e.schema)}-add-pair`,type:"button",onClick:r.addPair},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.schema.newElementButtonLabel??"+ Add Pair"),1)]),_:1},8,["class","data-testid","onClick"])])}const ou=$(Zm,[["render",nu],["__scopeId","data-v-be99d00c"]]),au=$(t.defineComponent({__name:"FieldLabel",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0}},setup(e){const n=e,o=t.toRefs(n),{getFieldID:a,value:i}=Ee.useAbstractFields({model:o.model,schema:n.schema,formOptions:n.formOptions});return(r,l)=>{const s=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["field-label",e.schema.fieldClasses])},[t.createVNode(s,{id:t.unref(a)(e.schema)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)),1)]),_:1},8,["id"])],2)}}}),[["__scopeId","data-v-e3423a11"]]),iu=t.defineComponent({__name:"FieldMultiselect",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,i=o,r=t.toRef(a,"model"),{getLabelId:l,getFieldID:s,clearValidationErrors:c,value:m}=Ee.useAbstractFields({model:r,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:f=>{i("modelUpdated",f.value,f.model)}});n({clearValidationErrors:c});const g=t.computed(()=>{var f,h;return a.schema.values?a.schema.values:(h=(f=a.schema.elements)==null?void 0:f.one_of)!=null&&h.length?a.schema.elements.one_of.map(_=>({label:String(_),value:String(_)})):[]});return(f,h)=>{const _=t.resolveComponent("KMultiselect");return t.openBlock(),t.createBlock(_,{id:t.unref(s)(e.schema),modelValue:t.unref(m),"onUpdate:modelValue":h[0]||(h[0]=M=>t.isRef(m)?m.value=M:null),"aria-labelledby":t.unref(l)(e.schema),class:t.normalizeClass(e.schema.fieldClasses),"data-testid":"field-multiselect",disabled:e.disabled||void 0,items:g.value,"kpop-attributes":{"data-testid":`${t.unref(s)(e.schema)}-items`},"label-attributes":{info:e.schema.help},name:e.schema.inputName,placeholder:e.schema.placeholder,required:e.schema.required||void 0,width:"100%"},null,8,["id","modelValue","aria-labelledby","class","disabled","items","kpop-attributes","label-attributes","name","placeholder","required"])}}}),ru={class:"selection-group"},lu={class:"form-group horizontal-radios"},su={class:"radio-group"},du=["disabled","value"],cu={class:"control-help"},mu={key:0,class:"option-field"},uu={class:"option-field-container"},fu=$(Object.assign({mixins:[Ce],emits:["model-updated"],expose:["validate","clearValidationErrors","schema"],data(){return{checkedGroup:null,fieldModel:{...this.model},renderedTrack:[],fieldSchema:[],scope:"scope"}},watch:{checkedGroup:{handler(e,n){if(this.renderedTrack[e]=!0,n===null){this.fieldModel={...this.model};return}const o=this.schema.fields[e].fields,a=this.schema.fields[n].fields;a&&a.forEach(i=>this.updateModel("",i.model)),o&&o.forEach(i=>this.updateModel(this.fieldModel[i.model],i.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((e,n)=>{this.renderedTrack.push(!1),e.fields&&e.fields.forEach(o=>{var a;this.model[o.model]&&(this.checkedGroup=n,this.fieldSchema.push(o.model),this.scope=(a=o.label)==null?void 0:a.toLowerCase())})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(e,n){this.$emit("model-updated",e,n)}}},{__name:"FieldSelectionGroup",setup(e){const{t:n}=me.createI18n("en-us",ge);return(o,a)=>(t.openBlock(),t.createElementBlock("div",ru,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.$props.disabled?"k-tooltip":"div"),{"max-width":"300",text:t.unref(n)("general.disable_global_radio",{scope:o.scope})},{default:t.withCtx(()=>[t.createElementVNode("div",lu,[t.createElementVNode("div",su,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.schema.fields,(i,r)=>(t.openBlock(),t.createElementBlock("div",{key:r,class:t.normalizeClass(["option-group",{"radio-disabled":o.$props.disabled}])},[t.createElementVNode("label",{class:t.normalizeClass(["k-label",`${i.label}-check`])},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>o.checkedGroup=l),class:"k-input",disabled:o.$props.disabled,type:"radio",value:r},null,8,du),[[t.vModelRadio,o.checkedGroup]]),t.createTextVNode(" "+t.toDisplayString(i.label)+" ",1),t.createElementVNode("div",cu,t.toDisplayString(i.description),1)],2)],2))),128))])])]),_:1},8,["text"])),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.schema.fields,(i,r)=>(t.openBlock(),t.createElementBlock("div",{key:r,class:"option-group"},[o.renderedTrack[r]?t.withDirectives((t.openBlock(),t.createElementBlock("div",mu,[t.createElementVNode("div",uu,[t.createVNode(G,{model:o.model,options:{helpAsHtml:!0},schema:{fields:i.fields},onModelUpdated:o.updateModel},null,8,["model","schema","onModelUpdated"])])],512)),[[t.vShow,i.fields&&o.checkedGroup===r]]):t.createCommentVNode("",!0)]))),128))]))}}),[["__scopeId","data-v-0b44571b"]]),hu={class:"form-field-wrapper"},pu=t.defineComponent({__name:"FieldSwitch",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,i=o,{t:r}=me.createI18n("en-us",ge),l=h=>h!=null&&a.schema.valueOn?h===a.schema.valueOn:h,s=h=>h!=null&&a.schema.valueOn?h?a.schema.valueOn:a.schema.valueOff:h,c=t.toRefs(a),{getFieldID:m,value:g,clearValidationErrors:f}=Ee.useAbstractFields({model:c.model,schema:a.schema,formOptions:a.formOptions,formatValueToField:l,formatValueToModel:s,emitModelUpdated:h=>{i("modelUpdated",h.value,h.model)}});return n({clearValidationErrors:f}),(h,_)=>{const M=t.resolveComponent("KInputSwitch");return t.openBlock(),t.createElementBlock("div",hu,[t.createVNode(M,{id:t.unref(m)(e.schema),modelValue:t.unref(g),"onUpdate:modelValue":_[0]||(_[0]=y=>t.isRef(g)?g.value=y:null),autocomplete:e.schema.autocomplete,class:t.normalizeClass(e.schema.fieldClasses),disabled:e.disabled||void 0,label:t.unref(g)?e.schema.textOn||t.unref(r)("vfg.labels.on"):e.schema.textOff||t.unref(r)("vfg.labels.off"),"label-attributes":{info:e.schema.help},name:e.schema.inputName,required:e.schema.required||void 0},null,8,["id","modelValue","autocomplete","class","disabled","label","label-attributes","name","required"])])}}}),gu={class:"field-textarea"},yu={name:"FormGroup",components:Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:kc,FieldArray:Pm,FieldArrayCardContainer:ga,FieldArrayItem:ya,FieldArrayMultiItem:ba,FieldAutoSuggest:Sa,FieldAutoSuggestLegacy:Ca,FieldCheckbox:vm,FieldChecklist:Wm,FieldInput:wa,FieldKeyValuePairs:ou,FieldLabel:au,FieldMetric:ka,FieldMultiselect:iu,FieldObject:Ma,FieldObjectAdvanced:Aa,FieldRadio:Na,FieldSelect:Ia,FieldSelectionGroup:fu,FieldStringArray:Oa,FieldSwitch:pu,FieldTextArea:$(t.defineComponent({__name:"FieldTextArea",props:{disabled:{type:Boolean,default:!1},formOptions:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},schema:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default:()=>[]},hint:{type:String,default:""}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const a=e,i=o,r=t.toRefs(a),l=t.inject(he,void 0),{updateModelValue:s,getFieldID:c,clearValidationErrors:m,value:g}=Ee.useAbstractFields({model:r.model,schema:a.schema,formOptions:a.formOptions,emitModelUpdated:h=>{i("modelUpdated",h.value,h.model)}});n({clearValidationErrors:m});const f=h=>{g.value=h,s(h,h)};return(h,_)=>{const M=t.resolveComponent("KTextArea");return t.openBlock(),t.createElementBlock("div",gu,[t.createVNode(M,t.mergeProps(h.$attrs,{id:t.unref(c)(e.schema),modelValue:t.unref(g),"onUpdate:modelValue":_[0]||(_[0]=y=>t.isRef(g)?g.value=y:null),autosize:"","character-limit":e.schema.max??!1,class:e.schema.fieldClasses,disabled:e.disabled||void 0,help:e.hint||void 0,minlength:e.schema.min,name:e.schema.inputName,placeholder:e.schema.placeholder,readonly:e.schema.readonly,required:e.schema.required,resizable:"",rows:e.schema.rows||3}),null,16,["id","modelValue","character-limit","class","disabled","help","minlength","name","placeholder","readonly","required","rows"]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(l)),{schema:e.schema,update:f,value:t.unref(g)},null,8,["schema","value"]))])}}}),[["__scopeId","data-v-609c18d6"]])},Symbol.toStringTag,{value:"Module"})),mixins:[Go],inject:{"vfg-array-item-index":{default:void 0}},props:{vfg:{type:Object,required:!0},model:{type:Object,default:()=>{}},options:{type:Object,default:()=>{}},field:{type:Object,required:!0},errors:{type:Array,default(){return[]}}},emits:["validated","modelUpdated","refreshModel"],data(){return{child:t.ref()}},computed:{schema(){var n;if(!((n=this.field)!=null&&n.schema)||!Array.isArray(this.field.schema.fields))return this.field;const e=this["vfg-array-item-index"];return typeof e!="number"||Number.isNaN(e)?this.field:{...this.field,schema:{...this.field.schema,fields:this.field.schema.fields.map(o=>({...o,...o.id?{id:`${o.id}-${e}`}:void 0}))}}}},methods:{sanitize(e){return Bl.sanitize(e)},fieldTypeHasLabel(e){if(Y(e.label))return!1;let n="";switch(e.type==="input"?n=e.inputType:n=e.type,n){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID(e){const n=v(this.options,"fieldIdPrefix","");return bn(e,n)},getTooltipId(e){return`${this.getFieldID(e)}-tooltip`},getFieldComponent(e){return e.component?e.component:"field-"+e.type},getButtonType(e){return v(e,"type","button")},onFieldValidated(e,n,o){this.$emit("validated",e,n,o)},buttonVisibility(e){return e.buttons&&e.buttons.length>0},buttonClickHandler(e,n,o){return e.onclick.call(this,this.model,n,o,this)},fieldHint(e){return x(e.hint)?e.hint.call(this,this.model,e,this):e.hint},fieldErrors(e){return this.errors.filter(n=>n.field.fieldName===e.fieldName).map(n=>n.error)},onRefreshModel(){this.$emit("refreshModel")},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},validate(e){return this.$refs.child.validate(e)},clearValidationErrors(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()},formattedLabel(e){return e?e.replace(/^[cC]onfig\./,""):""}}},bu=["innerHTML"],_u={class:"icon-wrapper"},Eu={key:0,class:"link-wrapper"},Tu={class:"field-wrap"},Su={key:0,class:"buttons"},Cu=["type","onClick","textContent"],wu={key:1,class:"hint"},ku={key:2,class:"errors help-block"};function Mu(e,n,o,a,i,r){const l=t.resolveComponent("KExternalLink"),s=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["form-group",e.getFieldRowClasses(o.field)])},[r.fieldTypeHasLabel(o.field)?(t.openBlock(),t.createBlock(s,{key:0,"aria-describedby":o.field.help?r.getTooltipId(o.field):void 0,class:t.normalizeClass([o.field.labelClasses,"form-group-label"]),for:r.getFieldID(o.field),info:!o.options.helpAsHtml&&o.field.help?o.field.help:void 0,"tooltip-attributes":o.field.help?{maxWidth:"300",placement:"top",tooltipId:r.getTooltipId(o.field)}:void 0},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("div",_u,[t.createElementVNode("span",null,t.toDisplayString(r.formattedLabel(o.field.label)),1)]),o.field.link?(t.openBlock(),t.createElementBlock("div",Eu,[t.createVNode(l,{href:o.field.link},{default:t.withCtx(()=>[...n[0]||(n[0]=[t.createElementVNode("span",{class:"section-header"},"More info",-1)])]),_:1},8,["href"])])):t.createCommentVNode("",!0)]),_:2},[o.options.helpAsHtml&&o.field.help?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:r.sanitize(o.field.help)},null,8,bu)]),key:"0"}:void 0]),1032,["aria-describedby","class","for","info","tooltip-attributes"])):t.createCommentVNode("",!0),t.createElementVNode("div",Tu,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getFieldComponent(o.field)),t.mergeProps(e.$attrs,{ref:"child",disabled:e.fieldDisabled(o.field)||null,"form-options":o.options,hint:o.field.hint&&o.field.type==="input"?r.fieldHint(o.field):void 0,model:o.model,schema:r.schema,vfg:o.vfg,onModelUpdated:r.onModelUpdated,onRefreshModel:r.onRefreshModel,onValidated:r.onFieldValidated}),null,16,["disabled","form-options","hint","model","schema","vfg","onModelUpdated","onRefreshModel","onValidated"])),r.buttonVisibility(o.field)?(t.openBlock(),t.createElementBlock("div",Su,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.field.buttons,(c,m)=>(t.openBlock(),t.createElementBlock("button",{key:m,class:t.normalizeClass(c.classes),type:r.getButtonType(c),onClick:g=>r.buttonClickHandler(c,o.field,g),textContent:t.toDisplayString(c.label)},null,10,Cu))),128))])):t.createCommentVNode("",!0)]),o.field.hint&&o.field.type!=="input"?(t.openBlock(),t.createElementBlock("div",wu,t.toDisplayString(r.fieldHint(o.field)),1)):t.createCommentVNode("",!0),r.fieldErrors(o.field).length>0?(t.openBlock(),t.createElementBlock("div",ku,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.fieldErrors(o.field),(c,m)=>(t.openBlock(),t.createElementBlock("span",{key:m},t.toDisplayString(c),1))),128))])):t.createCommentVNode("",!0)],2)}const Va=$(yu,[["render",Mu],["__scopeId","data-v-87df5b50"]]);var Tt=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(Tt||{});const Au=e=>{var n,o;return e.type===Tt.REDIS_CE?"Host/Port":(n=e.config.sentinel_nodes)!=null&&n.length?"Sentinel":(o=e.config.cluster_nodes)!=null&&o.length?"Cluster":"Host/Port"},Nu={[Tt.REDIS_CE]:"open source",[Tt.REDIS_EE]:"enterprise"},Ba=e=>Nu[e]??"",ot={KONNECT_MANAGED:"konnect-managed",SELF_MANAGED:"self-managed"},Iu="managed_cache.v0";function Ou(e){const o=(Array.isArray(e.tags)?e.tags:[]).filter(a=>typeof a=="string").map(a=>a.toLowerCase());return o.includes(ot.KONNECT_MANAGED)||o.includes(Iu)?ot.KONNECT_MANAGED:ot.SELF_MANAGED}const Vu={class:"partial-config-card"},Bu={class:"config-card-row-label"},Fu={class:"label-text"},Ru=["data-testid"],Du=["data-testid"],Lu={key:1},Uu=["data-testid"],Pu=["data-testid"],$u=$(t.defineComponent({__name:"RedisConfigCard",props:{configFields:{type:Object,required:!0},pluginRedisFields:{type:Array,required:!0}},setup(e){const{t:n,formatUnixTimeStamp:o}=me.createI18n("en-us",ge),a={id:{order:1},name:{order:1},type:{label:n("redis.config_card.common_fields.type_label"),hidden:!0,type:"hidden"},created_at:{label:n("redis.config_card.common_fields.created_at_label"),formatter:o,order:2},updated_at:{label:n("redis.config_card.common_fields.updated_at_label"),formatter:o,order:3}},i=e,r=f=>f!=null,l=(f,h)=>r(h)&&["password","sentinel_password"].includes(f)?"password":"text",{convertKeyToTitle:s}=Mt.useStringHelpers(),c=t.computed(()=>Object.entries(i.configFields).map(([f,h])=>{var _,M,y,I;return{key:f,label:((_=a[f])==null?void 0:_.label)??s(f),value:(M=a[f])!=null&&M.formatter?a[f].formatter(h):h,type:((y=a[f])==null?void 0:y.type)??l(f,h),order:((I=a[f])==null?void 0:I.order)??100}}).sort((f,h)=>f.order-h.order).filter(f=>f.type!=="hidden")),m=Ee.useRedisNonStandardFields(i.configFields,i.pluginRedisFields),g=t.computed(()=>c.value.concat(m));return(f,h)=>{const _=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",Vu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,({key:M,label:y,value:I,type:N})=>(t.openBlock(),t.createElementBlock("div",{key:M,class:"partial-config-card-row"},[t.createElementVNode("div",Bu,[t.createElementVNode("div",Fu,t.toDisplayString(y),1)]),t.createElementVNode("div",{class:"config-card-row-value","data-testid":`${M}-property-value`},[r(I)?(t.openBlock(),t.createElementBlock("div",Lu,[N==="password"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${M}-copy-password`},[t.createVNode(_,{format:"redacted",text:String(I)},null,8,["text"])],8,Uu)):(t.openBlock(),t.createElementBlock("div",{key:1,"data-testid":`${M}-plain-text`},t.toDisplayString(I),9,Pu))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${M}-no-value`}," – ",8,Du))],8,Ru)]))),128))])}}}),[["__scopeId","data-v-57f78095"]]),vu={class:"redis-config-select","data-testid":"redis-config-select"},xu={class:"selected-redis-config"},ju=["data-testid"],Ku={class:"select-item-name","data-testid":"selected-redis-config"},qu={class:"empty-redis-config","data-testid":"empty-redis-config"},zu={key:1,class:"redis-shared-config-error-message","data-testid":"redis-config-fetch-error"},Hu="1000",Fa=$(t.defineComponent({__name:"RedisConfigSelect",props:{defaultRedisConfigItem:{type:String,required:!1,default:""},updateRedisModel:{type:Function,required:!0},pluginRedisFields:{type:Array,required:!0},redisType:{type:String,default:"all"},isCustomPlugin:{type:Boolean,default:!1},isKonnectManagedRedisEnabled:{type:Boolean,default:!1}},emits:["showNewPartialModal"],setup(e){const{t:n}=me.createI18n("en-us",ge),o=t.inject(io),a={konnect:{getOne:"/v2/control-planes/{controlPlaneId}/core-entities/partials/{id}",getAll:"/v2/control-planes/{controlPlaneId}/core-entities/partials"},kongManager:{getOne:"/{workspace}/partials/{id}",getAll:"/{workspace}/partials"}},i=e,r=t.ref(null),{getMessageFromError:l}=Mt.useErrors(),s=t.inject(ao),{debouncedQueryChange:c,loading:m,error:g,loadItems:f,results:h}=Mt.useDebouncedFilter(s,a[s.app].getAll,Hu,{fetchedItemsKey:"data",searchKeys:["id","name"]}),_=t.computed(()=>g.value?l(g.value):""),M=t.computed(()=>i.isCustomPlugin?n("redis.custom_plugin.tooltip"):n("redis.shared_configuration.tooltip",{type:Ba(i.redisType)})),y=t.computed(()=>i.isKonnectManagedRedisEnabled?n("redis.managed_ui.shared_configuration.title"):n("redis.shared_configuration.title")),I=t.computed(()=>i.isKonnectManagedRedisEnabled?n("redis.managed_ui.shared_configuration.selector.placeholder"):n("redis.shared_configuration.selector.placeholder")),N=t.computed(()=>i.isKonnectManagedRedisEnabled?n("redis.managed_ui.shared_configuration.create_new_configuration"):n("redis.shared_configuration.create_new_configuration",{type:Ba(i.redisType)})),U=t.computed(()=>_.value||n("redis.shared_configuration.error")),V=w=>{let A=`${s.apiBaseUrl}${a[s.app].getOne}`;return s.app==="konnect"?A=A.replace(/{controlPlaneId}/gi,(s==null?void 0:s.controlPlaneId)||""):s.app==="kongManager"&&(A=A.replace(/\/{workspace}/gi,s!=null&&s.workspace?`/${s.workspace}`:"")),A=A.replace(/{id}/gi,String(w)),A},C=t.computed(()=>{const w=(h.value||[]).map(A=>{const u=A,p=i.isKonnectManagedRedisEnabled?Ou(u):void 0,S=p===ot.KONNECT_MANAGED;return{...i.isKonnectManagedRedisEnabled&&p?{source:p}:{},label:A.id,name:A.name,value:A.id,type:A.type,tag:i.isKonnectManagedRedisEnabled&&S?void 0:Au(u)}}).filter(A=>A.type==="redis-ce"||A.type==="redis-ee");return i.redisType!=="all"?w.filter(A=>A.type===i.redisType):w}),k=t.computed(()=>{const w=C.value;if(!i.isKonnectManagedRedisEnabled)return w;const A=w.filter(S=>S.source===ot.KONNECT_MANAGED),u=w.filter(S=>S.source===ot.SELF_MANAGED),p=[];return A.length>0&&p.push({label:n("redis.managed_ui.groups.konnect_managed"),items:A}),u.length>0&&p.push({label:n("redis.managed_ui.groups.self_managed"),items:u}),p}),{axiosInstance:T}=Mt.useAxios(s==null?void 0:s.axiosRequestConfig),b=async w=>{if(w){i.updateRedisModel(w);try{const A=await T.get(V(w));if(A.data.config){const u=Object.assign(A.data,A.data.config);delete u.config,r.value=u}}catch(A){console.error(A)}}};return t.watch(()=>o==null?void 0:o.value,async w=>{w&&await f()}),t.onBeforeMount(()=>{f(),i.defaultRedisConfigItem&&b(i.defaultRedisConfigItem)}),(w,A)=>{const u=t.resolveComponent("KLabel"),p=t.resolveComponent("KBadge"),S=t.resolveComponent("KSelect");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",vu,[t.createVNode(u,{info:M.value,"tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(y.value),1)]),_:1},8,["info"]),A[2]||(A[2]=t.createElementVNode("div",{class:"shared-redis-config-title"},null,-1)),t.createVNode(S,{class:"redis-config-select-trigger","data-testid":"redis-config-select-trigger","enable-filtering":"","filter-function":()=>!0,items:k.value,loading:t.unref(m),"model-value":e.defaultRedisConfigItem,placeholder:I.value,onChange:A[1]||(A[1]=O=>b(O==null?void 0:O.value)),onQueryChange:t.unref(c)},{"selected-item-template":t.withCtx(({item:O})=>[t.createElementVNode("div",xu,t.toDisplayString(O.name),1)]),"item-template":t.withCtx(({item:O})=>[t.createElementVNode("div",{class:"plugin-form-redis-configuration-dropdown-item","data-testid":`redis-configuration-dropdown-item-${O.name}`},[t.createElementVNode("span",Ku,t.toDisplayString(O.name),1),O.tag?(t.openBlock(),t.createBlock(p,{key:0,appearance:"info",class:"select-item-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(O.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,ju)]),empty:t.withCtx(()=>[t.createElementVNode("div",qu,t.toDisplayString(t.unref(n)("redis.shared_configuration.empty_state")),1)]),"dropdown-footer-text":t.withCtx(()=>[t.createElementVNode("div",{class:"new-redis-config-area","data-testid":"new-redis-config-area",onClick:A[0]||(A[0]=O=>w.$emit("showNewPartialModal"))},[t.createVNode(t.unref(Te.AddIcon),{size:t.unref(Fc)},null,8,["size"]),t.createElementVNode("span",null,t.toDisplayString(N.value),1)])]),_:1},8,["items","loading","model-value","placeholder","onQueryChange"])]),r.value?(t.openBlock(),t.createBlock($u,{key:0,"config-fields":r.value,"plugin-redis-fields":e.pluginRedisFields},null,8,["config-fields","plugin-redis-fields"])):t.createCommentVNode("",!0),_.value?(t.openBlock(),t.createElementBlock("p",zu,t.toDisplayString(U.value),1)):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-03885614"]]),Gu={key:0},Yu={class:"redis-config-radio-group","data-testid":"redis-config-radio-group"},Wu={key:0,class:"shared-redis-config"},Zu={key:1,class:"dedicated-redis-config"},Xu={class:"dedicated-redis-config-title"},Ju={name:"VueFormGenerator",components:{formGroup:Va,formRedis:$(t.defineComponent({__name:"FormRedis",props:{tag:{type:String,default:"fieldset",validator:function(e){return e.length>0}},model:{type:Object,default:()=>{}},options:{type:Object,required:!0},field:{type:Object,required:!0},vfg:{type:Object,required:!0},errors:{type:Array,default(){return[]}},redisPath:{type:String,default:void 0,required:!1},isEditing:{type:Boolean,default:!1},isKonnectManagedRedisEnabled:{type:Boolean,default:!1}},emits:["modelUpdated","partialToggled","showNewPartialModal","refreshModel","validated"],setup(e,{emit:n}){const o=e,a=n,{t:i}=me.createI18n("en-us",ge),r=t.computed(()=>o.isKonnectManagedRedisEnabled?i("redis.managed_ui.title"):i("redis.title")),l=t.computed(()=>o.isKonnectManagedRedisEnabled?i("redis.managed_ui.shared_configuration.description"):i("redis.shared_configuration.description")),s=t.computed(()=>o.isKonnectManagedRedisEnabled?i("redis.managed_ui.shared_configuration.label"):i("redis.shared_configuration.label")),c=t.computed(()=>o.isKonnectManagedRedisEnabled?i("redis.managed_ui.dedicated_configuration.description"):i("redis.dedicated_configuration.description")),m=t.computed(()=>o.isKonnectManagedRedisEnabled?i("redis.managed_ui.dedicated_configuration.label"):i("redis.dedicated_configuration.label")),g=t.computed(()=>o.field.pluginType==="custom"),f=t.ref(!o.isEditing),h=t.ref(),_=t.ref({}),M=t.ref(),y=C=>x(C.visible)?C.visible.call(this,o.model,C,this):Y(C.visible)?!0:C.visible,I=async C=>{a("modelUpdated",[{id:C,path:o.redisPath}],"partials"),M.value=[{id:C,path:o.redisPath}],h.value=C},N=(C,k)=>{_.value={..._.value,[k]:C},a("modelUpdated",C,k)},U=()=>{a("refreshModel")},V=(C,k,T)=>{a("validated",C,k,T)};return t.watch(()=>f.value,C=>{C?M.value&&a("partialToggled","redis",{partials:M.value}):a("partialToggled","partials",_.value)}),t.onBeforeMount(()=>{var C,k,T;if(o.model&&(_.value=o.field.fields.reduce((b,w)=>(Object.keys(o.model).includes(w.model)&&(b[w.model]=o.model[w.model]),b),{})),(T=(k=(C=o==null?void 0:o.model)==null?void 0:C.partials)==null?void 0:k[0])!=null&&T.id){const b=o.model.partials[0].id;f.value=!0,h.value=b}}),(C,k)=>{const T=t.resolveComponent("KAlert"),b=t.resolveComponent("KBadge"),w=t.resolveComponent("KRadio"),A=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",null,[g.value?(t.openBlock(),t.createElementBlock("div",Gu,[t.createVNode(T,{"data-testid":"custom-plugin-redis-config-note",message:t.unref(i)("redis.custom_plugin.alert")},null,8,["message"]),t.createVNode(Fa,{"default-redis-config-item":h.value,"is-custom-plugin":"","is-konnect-managed-redis-enabled":e.isKonnectManagedRedisEnabled,"plugin-redis-fields":e.field.fields,"update-redis-model":I,onShowNewPartialModal:k[0]||(k[0]=u=>C.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","is-konnect-managed-redis-enabled","plugin-redis-fields"])])):(t.openBlock(),t.createBlock(A,{key:1,class:"redis-config-card","data-testid":"redis-config-card",title:r.value},{default:t.withCtx(()=>[t.createElementVNode("div",Yu,[t.createVNode(w,{modelValue:f.value,"onUpdate:modelValue":k[1]||(k[1]=u=>f.value=u),card:"","card-orientation":"horizontal","data-testid":"shared-redis-config-radio",description:l.value,label:s.value,"selected-value":!0},{default:t.withCtx(()=>[e.isKonnectManagedRedisEnabled?(t.openBlock(),t.createBlock(b,{key:0,appearance:"success"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("redis.managed_ui.shared_configuration.badge")),1)]),_:1})):t.createCommentVNode("",!0)]),_:1},8,["modelValue","description","label"]),t.createVNode(w,{modelValue:f.value,"onUpdate:modelValue":k[2]||(k[2]=u=>f.value=u),card:"","card-orientation":"horizontal","data-testid":"dedicated-redis-config-radio",description:c.value,label:m.value,"selected-value":!1},null,8,["modelValue","description","label"])]),f.value?(t.openBlock(),t.createElementBlock("div",Wu,[t.createVNode(Fa,{"default-redis-config-item":h.value,"is-konnect-managed-redis-enabled":e.isKonnectManagedRedisEnabled,"plugin-redis-fields":e.field.fields,"redis-type":e.field.redisType,"update-redis-model":I,onShowNewPartialModal:k[3]||(k[3]=u=>C.$emit("showNewPartialModal"))},null,8,["default-redis-config-item","is-konnect-managed-redis-enabled","plugin-redis-fields","redis-type"])])):(t.openBlock(),t.createElementBlock("div",Zu,[t.createElementVNode("div",Xu,t.toDisplayString(t.unref(i)("redis.dedicated_configuration.title")),1),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.field.fields,u=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:u.model},[y(u)?(t.openBlock(),t.createBlock(Va,{key:0,ref_for:!0,ref:"children",errors:e.errors,field:u,model:e.model,options:e.options,vfg:e.vfg,onModelUpdated:N,onRefreshModel:U,onValidated:V},null,8,["errors","field","model","options","vfg"])):t.createCommentVNode("",!0)],64))),128))]),_:1}))]))]),_:1},8,["title"]))])}}}),[["__scopeId","data-v-58023d89"]])},mixins:[Go],inject:{autofillSlot:{from:he,default:void 0}},provide(){var e;return{...!this.autofillSlot&&{[he]:(e=this.$slots)==null?void 0:e[He]}}},props:{schema:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},options:{type:Object,default(){return{validateAfterLoad:!1,validateAfterChanged:!1,child:t.ref([]),fieldIdPrefix:"",validateAsync:!1,validationErrorClass:"error",validationSuccessClass:"",helpAsHtml:!1}}},multiple:{type:Boolean,default:!1},isNewModel:{type:Boolean,default:!1},tag:{type:String,default:"fieldset",validator:function(e){return e.length>0}},enableRedisPartial:{type:Boolean,default:!1},isKonnectManagedRedisEnabled:{type:Boolean,default:!1},isEditing:{type:Boolean,default:!1}},emits:["validated","modelUpdated","refreshModel","partialToggled","showNewPartialModal"],data(){return{vfg:this,errors:[],children:t.ref([]),collapseStates:{}}},computed:{fields(){const e=[];return this.schema&&this.schema.fields&&ie(this.schema.fields,n=>{(!this.multiple||n.multi===!0)&&e.push(n)}),e},groups(){const e=[];return this.schema&&this.schema.groups&&ie(this.schema.groups.slice(0),n=>{e.push(n)}),e}},watch:{model:{deep:!0,handler(e,n){n!==e&&e!=null&&this.$nextTick(()=>{this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors()})}}},mounted(){this.$nextTick(()=>{this.model&&(this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors())})},methods:{fieldVisible(e){return x(e.visible)?e.visible.call(this,this.model,e,this):Y(e.visible)?!0:e.visible},onFieldValidated(e,n,o){this.errors=this.errors.filter(i=>i.field.fieldName!==o.schema.fieldName),!e&&n&&n.length>0&&ie(n,i=>{this.errors.push({field:o.schema,error:i})});const a=this.errors.length===0;this.$emit("validated",a,this.errors,this)},onRefreshModel(){this.$emit("refreshModel")},onModelUpdated(e,n){this.$emit("modelUpdated",e,n)},onPartialToggled(e,n){this.$emit("partialToggled",e,n)},validate(e=null){e===null&&(e=v(this.options,"validateAsync",!1)),this.clearValidationErrors();const n=[],o=[];ie(this.$refs.children,i=>{x(i.validate)&&(n.push(i.$refs.child),o.push(i.$refs.child.validate(!0)))});const a=i=>{const r=[];ie(i,(s,c)=>{Array.isArray(s)&&s.length>0&&ie(s,m=>{r.push({field:n[c].schema,error:m})})}),this.errors=r;const l=r.length===0;return this.$emit("validated",l,r,this),e?r:l};return e?Promise.all(o).then(a):a(o)},clearValidationErrors(){this.errors.splice(0),ie(this.$refs.children,e=>{e.clearValidationErrors()})}}},Qu={key:0,class:"vue-form-generator"},ef={key:0};function tf(e,n,o,a,i,r){const l=t.resolveComponent("form-redis"),s=t.resolveComponent("form-group"),c=t.resolveComponent("KCollapse");return o.schema!=null?(t.openBlock(),t.createElementBlock("div",Qu,[o.schema.fields?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.fields,m=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m.model},[m.model==="__redis_partial"&&o.enableRedisPartial?(t.openBlock(),t.createBlock(l,{key:0,errors:i.errors,field:m,"is-editing":o.isEditing,"is-konnect-managed-redis-enabled":o.isKonnectManagedRedisEnabled,model:o.model,options:o.options,tag:o.tag,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onPartialToggled:r.onPartialToggled,onShowNewPartialModal:g=>e.$emit("showNewPartialModal",m.redisType),onValidated:r.onFieldValidated},null,8,["errors","field","is-editing","is-konnect-managed-redis-enabled","model","options","tag","vfg","onModelUpdated","onPartialToggled","onShowNewPartialModal","onValidated"])):r.fieldVisible(m)?(t.openBlock(),t.createBlock(s,{key:1,ref_for:!0,ref:"children",errors:i.errors,field:m,model:o.model,options:o.options,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onRefreshModel:r.onRefreshModel,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:1})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,(m,g)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`group-${g}`},[m.collapsible!==void 0&&m.collapsible!==!1?(t.openBlock(),t.createBlock(c,{key:0,class:"root-level-collapse","model-value":!1,title:m.collapsible.title},t.createSlots({default:t.withCtx(()=>{var f,h,_,M;return[(f=m.slots)!=null&&f.beforeContent?t.renderSlot(e.$slots,(h=m.slots)==null?void 0:h.beforeContent,{key:0}):t.createCommentVNode("",!0),m.fields.length===0&&((_=m.slots)!=null&&_.emptyState)?t.renderSlot(e.$slots,(M=m.slots)==null?void 0:M.emptyState,{key:1}):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:2,class:t.normalizeClass(e.getFieldRowClasses(m))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.fields,y=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:y.model},[r.fieldVisible(y)?(t.openBlock(),t.createBlock(s,{key:0,ref_for:!0,ref:"children",errors:i.errors,field:y,model:o.model,options:o.options,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onRefreshModel:r.onRefreshModel,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"])),m.collapsible!==!0&&m.collapsible.nestedCollapsible&&m.collapsible.nestedCollapsible.fields.length>0?(t.openBlock(),t.createBlock(c,{key:3,class:"nested-collapse","model-value":i.collapseStates[`group-${g}-nested`]??!0,"trigger-alignment":"leading","trigger-label":i.collapseStates[`group-${g}-nested`]??!0?m.collapsible.nestedCollapsible.triggerLabel.expand:m.collapsible.nestedCollapsible.triggerLabel.collapse,"onUpdate:modelValue":y=>i.collapseStates[`group-${g}-nested`]=y},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{class:t.normalizeClass(e.getFieldRowClasses(m))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.collapsible.nestedCollapsible.fields,y=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:y.model},[y.model==="__redis_partial"&&o.enableRedisPartial?(t.openBlock(),t.createBlock(l,{key:0,errors:i.errors,field:y,"is-editing":o.isEditing,"is-konnect-managed-redis-enabled":o.isKonnectManagedRedisEnabled,model:o.model,options:o.options,tag:o.tag,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onPartialToggled:r.onPartialToggled,onShowNewPartialModal:I=>e.$emit("showNewPartialModal",y.redisType),onValidated:r.onFieldValidated},null,8,["errors","field","is-editing","is-konnect-managed-redis-enabled","model","options","tag","vfg","onModelUpdated","onPartialToggled","onShowNewPartialModal","onValidated"])):r.fieldVisible(y)?(t.openBlock(),t.createBlock(s,{key:1,ref_for:!0,ref:"children",errors:i.errors,field:y,model:o.model,options:o.options,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onRefreshModel:r.onRefreshModel,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))]),_:2},1032,["model-value","trigger-label","onUpdate:modelValue"])):t.createCommentVNode("",!0)]}),_:2},[m.collapsible.description?{name:"visible-content",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.collapsible.description),1)]),key:"0"}:void 0]),1032,["title"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),{key:1,class:t.normalizeClass(e.getFieldRowClasses(m))},{default:t.withCtx(()=>[m.legend?(t.openBlock(),t.createElementBlock("legend",ef,t.toDisplayString(m.legend),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.fields,f=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:f.model},[r.fieldVisible(f)?(t.openBlock(),t.createBlock(s,{key:0,ref_for:!0,ref:"children",errors:i.errors,field:f,model:o.model,options:o.options,vfg:i.vfg,onModelUpdated:r.onModelUpdated,onRefreshModel:r.onRefreshModel,onValidated:r.onFieldValidated},null,8,["errors","field","model","options","vfg","onModelUpdated","onRefreshModel","onValidated"])):t.createCommentVNode("",!0)],64))),128))]),_:2},1032,["class"]))],64))),128))])):t.createCommentVNode("",!0)}const G=$(Ju,[["render",tf]]),St={openIdConnectDocs:"https://developer.konghq.com/plugins/openid-connect/",openIdConnectJWKDocs:"https://developer.konghq.com/plugins/openid-connect/reference/#schema--config-client-jwk",openIdConnectClusterNodesDocs:"https://developer.konghq.com/plugins/openid-connect/reference/#schema--config-redis-cluster-nodes",openIdConfigurationDocs:"https://developer.konghq.com/plugins/openid-connect/reference/",openIdAuthorizationDocs:"https://developer.konghq.com/plugins/openid-connect/#authorization"},Ra=new Set(["config-client_id","config-client_secret","config-issuer"]),Da=new Set(["config-scopes_claim","config-scopes_required","config-audience_claim","config-audience_required","config-roles_claim","config-roles_required","config-groups_claim","config-groups_required","config-authenticated_groups_claim"]),nf={name:"OIDCForm",components:{VueFormGenerator:G},provide(){var e;return{[he]:(e=this.$slots)==null?void 0:e[He]}},props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},onPartialToggled:{type:Function,required:!0},isEditing:{type:Boolean,required:!0},enableRedisPartial:{type:Boolean,required:!1},isKonnectManagedRedisEnabled:{type:Boolean,default:!1},showNewPartialModal:{type:Function,default:()=>{}}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,openIdConnectLink:St.openIdConnectDocs,openIdConnectJWKLink:St.openIdConnectJWKDocs,openIdConnectClusterNodesLink:St.openIdConnectClusterNodesDocs,openIdConfigurationDocs:St.openIdConfigurationDocs,openIdAuthorizationDocs:St.openIdAuthorizationDocs,advancedFieldsSchema:{fields:[]},advancedFields:null,tabs:[{hash:"#common",title:"Common"},{hash:"#authorization",title:"Authorization"},{hash:"#advanced",title:"Advanced"}]}},computed:{displayForm(){return this.formModel.id&&this.isEditing||!this.isEditing}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){var e;if(!this.init){this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(r=>!r.model.startsWith("config")&&r.model!=="tags")};const n=this.formSchema.fields.reduce((r,l)=>(r[l.model]=l,r),{});this.commonFieldsSchema={fields:Array.from(Ra).reduce((r,l)=>(n[l]&&r.push(n[l]),r),[])},this.authFieldsSchema={fields:Array.from(Da).reduce((r,l)=>(n[l]&&r.push(n[l]),r),[])};const{redis:o,redisModels:a}=Ee.useRedisPartial(this.formSchema);this.advancedFieldsSchema={fields:this.formSchema.fields.filter(r=>r.model.startsWith("config")&&r.model!=="config-auth_methods"&&!Ra.has(r.model)&&!Da.has(r.model)&&(!this.enableRedisPartial||!a.includes(r.model))||r.model==="tags").reduce((r,l)=>{var s,c,m,g;switch(l.model){case"config-client_jwk":{if(Array.isArray((c=(s=l.items)==null?void 0:s.schema)==null?void 0:c.fields))for(const f of l.items.schema.fields)f.label=f.model;r.push({...l,link:this.openIdConnectJWKLink,newElementButtonLabel:"+ Add Client JWK",...Array.isArray((g=(m=l.items)==null?void 0:m.schema)==null?void 0:g.fields)&&l.items.schema.fields.map(f=>({...f,label:f.model}))});break}case"config-session_redis_cluster_nodes":{r.push({...l,link:this.openIdConnectClusterNodesLink,newElementButtonLabel:"+ Add Cluster Node"});break}default:r.push(l)}return r},[])},this.enableRedisPartial&&this.advancedFieldsSchema.fields.unshift(o),this.sessionManagement=this.formModel["config-auth_methods"].includes("session"),this.authMethods=[{label:"Authorization Code Flow",value:"authorization_code",hint:"authorization code flow",prop:this.formModel["config-auth_methods"].includes("authorization_code")},{label:"Bearer Access Token",value:"bearer",hint:"JWT access token verification",prop:this.formModel["config-auth_methods"].includes("bearer")},{label:"Client Credentials Grant",value:"client_credentials",hint:"OAuth client credentials grant",prop:this.formModel["config-auth_methods"].includes("client_credentials")},{label:"Passwords Grant",value:"password",hint:"OAuth legacy password grant",prop:this.formModel["config-auth_methods"].includes("password")},{label:"Introspection",value:"introspection",hint:"OAuth introspection",prop:this.formModel["config-auth_methods"].includes("introspection")},{label:"UserInfo",value:"userinfo",hint:"OpenID Connect user info endpoint authentication",prop:this.formModel["config-auth_methods"].includes("userinfo")},{label:"Kong OAuth",value:"kong_oauth2",hint:"Kong OAuth plugin issued tokens verification",prop:this.formModel["config-auth_methods"].includes("kong_oauth2")},{label:"Refresh Token",value:"refresh_token",hint:"OAuth refresh token grant",prop:this.formModel["config-auth_methods"].includes("refresh_token")}];for(const r of[this.commonFieldsSchema,this.authFieldsSchema,this.advancedFieldsSchema])for(const l of r.fields){const s=(e=n[l.model])==null?void 0:e.help;l.help===void 0&&typeof s=="string"&&(l.help=s)}const i=this.formModel["config-consumer_claim"];if(i!=null&&i!==""&&(!this.formModel["config-consumer_claims"]||this.formModel["config-consumer_claims"].length===0)){const r=Array.isArray(i)?i:[i];this.formModel["config-consumer_claims"]=[r],this.onModelUpdated()}}},getAuthMethodsValue(e,n){const o=[];for(let a=0;a<this.authMethods.length;a++)this.authMethods[a].prop&&this.authMethods[a].value!==e&&o.push(this.authMethods[a].value);return this.sessionManagement&&e&&o.push("session"),n&&(e?o.push(e):o.push("session")),o},handleUpdate(e,n){this.formModel["config-auth_methods"]=this.getAuthMethodsValue(n,e),this.onModelUpdated()}}},of={class:"general-settings"},af={class:"link-wrapper"},rf={class:"auth-method-container"},lf={class:"general-settings"},sf={class:"link-wrapper"},df={class:"general-settings"},cf={class:"link-wrapper"};function mf(e,n,o,a,i,r){const l=t.resolveComponent("VueFormGenerator"),s=t.resolveComponent("KExternalLink"),c=t.resolveComponent("KLabel"),m=t.resolveComponent("KCheckbox"),g=t.resolveComponent("KInputSwitch"),f=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[o.formModel.id&&o.isEditing||!o.isEditing?(t.openBlock(),t.createBlock(l,{key:0,class:"global-fields",model:o.formModel,options:o.formOptions,schema:i.globalFields,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(f,{tabs:i.tabs},{common:t.withCtx(()=>[t.createElementVNode("div",of,[t.createElementVNode("div",af,[t.createVNode(s,{href:i.openIdConfigurationDocs},{default:t.withCtx(()=>[...n[2]||(n[2]=[t.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)])]),_:1},8,["href"])]),n[4]||(n[4]=t.createElementVNode("div",{class:"description"}," Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ",-1)),r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,model:o.formModel,options:o.formOptions,schema:i.commonFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(c,null,{default:t.withCtx(()=>[...n[3]||(n[3]=[t.createTextVNode("Auth Methods",-1)])]),_:1}),t.createElementVNode("div",rf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.authMethods,h=>(t.openBlock(),t.createElementBlock("div",{key:h.value,class:"auth-method"},[t.createVNode(m,{modelValue:h.prop,"onUpdate:modelValue":_=>h.prop=_,onChange:_=>r.handleUpdate(_,h.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t.createVNode(g,{modelValue:i.sessionManagement,"onUpdate:modelValue":n[0]||(n[0]=h=>i.sessionManagement=h),label:"Enable Session Management",onChange:r.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:t.withCtx(()=>[t.createElementVNode("div",lf,[t.createElementVNode("div",sf,[t.createVNode(s,{href:i.openIdAuthorizationDocs},{default:t.withCtx(()=>[...n[5]||(n[5]=[t.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)])]),_:1},8,["href"])]),n[6]||(n[6]=t.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,model:o.formModel,options:o.formOptions,schema:i.authFieldsSchema,onModelUpdated:o.onModelUpdated},{"autofill-provider":t.withCtx(h=>[t.renderSlot(e.$slots,"autofill-provider",t.normalizeProps(t.guardReactiveProps(h)),void 0,!0)]),_:3},8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),advanced:t.withCtx(()=>[t.createElementVNode("div",df,[t.createElementVNode("div",cf,[t.createVNode(s,{href:i.openIdConnectLink},{default:t.withCtx(()=>[...n[7]||(n[7]=[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)])]),_:1},8,["href"])]),n[8]||(n[8]=t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1)),r.displayForm?(t.openBlock(),t.createBlock(l,{key:0,"enable-redis-partial":o.enableRedisPartial,"is-editing":o.isEditing,"is-konnect-managed-redis-enabled":o.isKonnectManagedRedisEnabled,model:o.formModel,options:o.formOptions,schema:i.advancedFieldsSchema,onModelUpdated:o.onModelUpdated,onPartialToggled:o.onPartialToggled,onShowNewPartialModal:n[1]||(n[1]=()=>o.showNewPartialModal(o.formSchema._supported_redis_partial_type))},null,8,["enable-redis-partial","is-editing","is-konnect-managed-redis-enabled","model","options","schema","onModelUpdated","onPartialToggled"])):t.createCommentVNode("",!0)])]),_:3},8,["tabs"])])}const uf=$(nf,[["render",mf],["__scopeId","data-v-681792ad"]]),ff=$(t.defineComponent({__name:"PostFunction",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var l;t.provide(he,(l=t.useSlots())==null?void 0:l[He]);const{t:n,te:o}=me.createI18n("en-us",ge),a=e,i=t.computed(()=>a.formModel.id&&a.isEditing||!a.isEditing),r=t.computed(()=>{const s=a.formSchema;return s.fields.map(c=>{const m=`post-function.${c.model}`;return c.hint=o(`${m}.hint`)&&n(`${m}.hint`)||c.hint,c.help=o(`${m}.help`)&&n(`${m}.help`)||c.help,c.newElementButtonLabel=o(`${m}.newElementButtonLabel`)&&n(`${m}.newElementButtonLabel`)||c.newElementButtonLabel,c.model!=="tags"&&(c.valueType==="array"||c.type==="array")&&(c.type="array",c.valueArrayType="array",c.itemContainerComponent="FieldArrayItem",c.fieldClasses="post-function-array-item-container",c.fieldItemsClasses="post-function-array-item",c.inputAttributes={...c.inputAttributes,type:"textarea"}),c}),s});return(s,c)=>i.value?(t.openBlock(),t.createBlock(G,{key:0,model:e.formModel,options:e.formOptions,schema:r.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-f54f37ae"]]),hf=$(t.defineComponent({__name:"ExitTransformer",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var l;t.provide(he,(l=t.useSlots())==null?void 0:l[He]);const{t:n,te:o}=me.createI18n("en-us",ge),a=e,i=t.computed(()=>a.formModel.id&&a.isEditing||!a.isEditing),r=t.computed(()=>{const s=a.formSchema;return s.fields.map(c=>{const m=`exit-transformer.${c.model}`;return c.hint=o(`${m}.hint`)&&n(`${m}.hint`)||c.hint,c.help=o(`${m}.help`)&&n(`${m}.help`)||c.help,c.newElementButtonLabel=o(`${m}.newElementButtonLabel`)&&n(`${m}.newElementButtonLabel`)||c.newElementButtonLabel,c.model!=="tags"&&(c.valueType==="array"||c.type==="array")&&(c.type="array",c.valueArrayType="array",c.itemContainerComponent="FieldArrayItem",c.fieldClasses="exit-transformer-array-item-container",c.fieldItemsClasses="exit-transformer-array-item",c.inputAttributes={...c.inputAttributes,type:"textarea"}),c}),s});return(s,c)=>i.value?(t.openBlock(),t.createBlock(G,{key:0,model:e.formModel,options:e.formOptions,schema:r.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-0d5c541f"]]),pf={fields:[{inputType:"text",label:"Config.Account Email",model:"config-account_email",required:!0,type:"input"},{inputType:"text",label:"Config.Account Key.Key Id",model:"config-account_key-key_id",required:!0,type:"input"},{type:"input",inputType:"text",valueType:"string",label:"Config.Account Key.Key Set",model:"config-account_key-key_set",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",label:"Config.Allow Any Domain",model:"config-allow_any_domain",order:0,disabled:!1}]},gf={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",model:"config-tos_accepted",label:"Config.Tos Accepted",order:0,disabled:!1}]},yf={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_hmac_key",label:"Config.Eab Hmac Key",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_kid",label:"Config.Eab Kid",order:0,disabled:!1}]},bf={class:"general-settings"},_f={class:"sub-form"},Ef={class:"general-settings"},Tf={class:"sub-form"},Sf={class:"general-settings"},Cf=$(t.defineComponent({__name:"ACMEForm",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(e){var k;t.provide(he,(k=t.useSlots())==null?void 0:k[He]);const n=e,o=t.ref("zeroSsl"),a=t.ref("shm"),i=t.computed(()=>{var b;const T={};if((b=n.formSchema)!=null&&b.fields)for(const w of n.formSchema.fields)T[w.model]=w;return T}),r=t.computed(()=>{var b;const T=Oe(pf);for(const w of T.fields){const A=(b=i.value[w.model])==null?void 0:b.help;w.help===void 0&&typeof A=="string"&&(w.help=A)}return T}),l=t.computed(()=>{var b;const T=Oe(gf);for(const w of T.fields){const A=(b=i.value[w.model])==null?void 0:b.help;w.help===void 0&&typeof A=="string"&&(w.help=A)}return T}),s=t.computed(()=>{var b;const T=Oe(yf);for(const w of T.fields){const A=(b=i.value[w.model])==null?void 0:b.help;w.help===void 0&&typeof A=="string"&&(w.help=A)}return T}),c=t.computed(()=>({fields:n.formSchema.fields.filter(T=>!T.model.startsWith("config")&&T.model!=="tags")})),m=t.computed(()=>({fields:r.value.fields.filter(b=>!l.value.fields.some(w=>w.model===b.model)&&!s.value.fields.some(w=>w.model===b.model))})),g=t.computed(()=>({fields:n.formSchema.fields.filter(b=>b.model.startsWith("config-storage")&&!b.model.startsWith("config-storage_config-consul")&&!b.model.startsWith("config-storage_config-redis")&&!b.model.startsWith("config-storage_config-shm")&&!b.model.startsWith("config-storage_config-vault"))})),f=t.computed(()=>({fields:n.formSchema.fields.filter(b=>b.model.startsWith("config-storage_config-consul"))})),h=t.computed(()=>({fields:n.formSchema.fields.filter(b=>b.model.startsWith("config-storage_config-redis"))})),_=t.computed(()=>({fields:n.formSchema.fields.filter(b=>b.model.startsWith("config-storage_config-shm"))})),M=t.computed(()=>({fields:n.formSchema.fields.filter(b=>b.model.startsWith("config-storage_config-vault"))})),y=t.computed(()=>({fields:n.formSchema.fields.filter(T=>T.model.startsWith("config")&&!m.value.fields.filter(b=>b.model===T.model).length&&!g.value.fields.filter(b=>b.model===T.model).length||T.model==="tags")})),I=t.computed(()=>n.formModel.id&&n.isEditing||!n.isEditing),N=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],U=[{label:"Lets Encrypt",value:"letsEncrypt"},{label:"Zero SSL",value:"zeroSsl",selected:!0},{label:"Other",value:"other"}];t.onMounted(()=>{o.value==="zeroSsl"&&(n.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90")});const V=T=>{o.value=T.value,(T.value==="zeroSsl"||T.value==="other")&&(T.value==="zeroSsl"?n.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90":n.formModel["config-api_uri"]="https://acme.example.com/",n.formModel["config-tos_accepted"]=!1),T.value==="letsEncrypt"&&(n.formModel["config-api_uri"]="https://acme-v02.api.letsencrypt.org/directory",n.formModel["config-eab_hmac_key"]="",n.formModel["config-eab_kid"]=""),n.onModelUpdated()},C=(T,b)=>{b==="config-storage"&&(a.value=T),n.onModelUpdated()};return(T,b)=>{const w=t.resolveComponent("KSelect"),A=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",null,[e.formModel.id&&e.isEditing||!e.isEditing?(t.openBlock(),t.createBlock(G,{key:0,class:"global-fields",model:e.formModel,options:e.formOptions,schema:c.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),t.createVNode(A,{tabs:N},{general:t.withCtx(()=>[t.createElementVNode("div",bf,[b[0]||(b[0]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),b[1]||(b[1]=t.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),I.value?(t.openBlock(),t.createBlock(G,{key:0,model:e.formModel,options:e.formOptions,schema:m.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),b[2]||(b[2]=t.createElementVNode("hr",null,null,-1)),t.createVNode(w,{class:"issuer-select",items:U,label:"Issuer",onChange:V}),t.createElementVNode("div",_f,[o.value==="letsEncrypt"?(t.openBlock(),t.createBlock(G,{key:0,model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),o.value==="zeroSsl"||o.value==="other"?(t.openBlock(),t.createBlock(G,{key:1,model:e.formModel,options:e.formOptions,schema:s.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),storage:t.withCtx(()=>[t.createElementVNode("div",Ef,[b[3]||(b[3]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),b[4]||(b[4]=t.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),I.value?(t.openBlock(),t.createBlock(G,{key:0,model:e.formModel,options:e.formOptions,schema:g.value,onModelUpdated:C},null,8,["model","options","schema"])):t.createCommentVNode("",!0),t.createElementVNode("div",Tf,[a.value==="consul"?(t.openBlock(),t.createBlock(G,{key:0,model:e.formModel,options:e.formOptions,schema:f.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="redis"?(t.openBlock(),t.createBlock(G,{key:1,model:e.formModel,options:e.formOptions,schema:h.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="shm"?(t.openBlock(),t.createBlock(G,{key:2,model:e.formModel,options:e.formOptions,schema:_.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0),a.value==="vault"?(t.openBlock(),t.createBlock(G,{key:3,model:e.formModel,options:e.formOptions,schema:M.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])])]),advanced:t.withCtx(()=>[t.createElementVNode("div",Sf,[b[5]||(b[5]=t.createElementVNode("div",{class:"header-wrapper"},[t.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),b[6]||(b[6]=t.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),I.value?(t.openBlock(),t.createBlock(G,{key:0,model:e.formModel,options:e.formOptions,schema:y.value,onModelUpdated:e.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):t.createCommentVNode("",!0)])]),_:1})])}}}),[["__scopeId","data-v-07cecf5b"]]),wf={class:"rla-form-basic-fields"},kf={class:"rla-form-request-limits-subtitle"},Mf={class:"rla-form-request-limits-content"},Af={class:"rla-form-window-type"},Nf=["innerHTML"],If={class:"rla-form-window-type-radios"},Of={class:"rla-form-request-limits-items"},Vf={class:"rla-form-request-limits-row"},Bf=["id"],Ff={class:"rla-form-request-limits-actions"},Rf={key:0,class:"rla-form-request-limits-examples"},Df={class:"rla-form-request-limits-examples-badges"},Lf=["innerHTML"],Uf={id:"rla-form-error-legend",class:"rla-form-error-inputs"},Pf=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:Cf,ExitTransformer:hf,OIDCForm:uf,PostFunction:ff,RLAForm:$(t.defineComponent({__name:"RLAForm",props:{formSchema:{},formModel:{},formOptions:{},onModelUpdated:{type:Function},onPartialToggled:{type:Function},showNewPartialModal:{type:Function},isEditing:{type:Boolean},enableRedisPartial:{type:Boolean},isKonnectManagedRedisEnabled:{type:Boolean}},setup(e){var A;t.provide(he,(A=t.useSlots())==null?void 0:A[He]);const n={fixed:[{label:"500 requests every hour",description:"A fixed limit of 500 requests per hour resetting sharply on the hour, ensuring no user can exceed this limit.",config:{limit:500,window_size:3600}},{label:"200 requests every 30 minutes",description:"Users are allowed 200 requests per 30 minutes, resetting exactly on the 30 minute mark with no carryover of unused limits.",config:{limit:200,window_size:1800}},{label:"500 requests every day",description:"A strict limit of 5000 requests per day resetting promptly at midnight, preventing any burst traffic or inconsistent user experiences.",config:{limit:500,window_size:86400}}],sliding:[{label:"100 requests every hour",description:"Maximum of 100 requests every rolling hour, continuously adjusting the count over the course of the hour. No hard limit or known reset.",config:{limit:100,window_size:3600}},{label:"300 requests every 30 minutes",description:"Each user can make up to 300 requests in any rolling 30 minute period, with older requests dropping off as new requests are made.",config:{limit:300,window_size:1800}},{label:"500 requests every hour",description:`Each user is allowed 500 requests per hour.
|
|
3
3
|
If the limit is exceeded and the user receives a 429 error, each additional request within the sliding window (hour)
|
|
4
4
|
will extend the wait time by about 12 minutes, continuously adjusting as new requests are made.`,config:{limit:500,window_size:3600}}]},o=new Set(["selectionGroup","enabled",...["identifier","limit","window_size","error_code","error_message"].map(u=>`config-${u}`)]),a=u=>u===void 0?!1:o.has(u),{t:i}=me.createI18n("en-us",ge),r=e,l=t.computed(()=>{var S,O,P;const u=(O=(S=r.formSchema)==null?void 0:S.fields)==null?void 0:O.find(te=>te.type==="selectionGroup"&&te.model==="selectionGroup");return{fields:[(P=r.formSchema)==null?void 0:P.fields.find(te=>te.model==="enabled"),u].filter(Boolean)}}),s=t.computed(()=>{var te,Ve;const u=((Ve=(te=r.formSchema)==null?void 0:te.fields)==null?void 0:Ve.filter(J=>!a(J.model)))??[],p=[],S=[],O=[];let P=!1;for(const J of u){const Be=J.model;if(Be!==void 0){if(Be.startsWith("config-redis-")){(J.model==="config-redis-cluster_addresses"||J.model==="config-redis-sentinel_addresses")&&(J.inputAttributes.help=i("rla.redis.address_example")),S.push(J);continue}P?O.push(J):p.push(J),J.model==="config-strategy"&&(P=!0)}}return{endsWithStrategy:{fields:p},redis:r.enableRedisPartial?{fields:[{fields:S,id:"_redis",model:"__redis_partial",redisType:r.formSchema._supported_redis_partial_type}]}:{fields:S},afterStrategy:{fields:O}}}),c=t.computed(()=>{const u=r.formModel["config-window_type"];return Object.prototype.hasOwnProperty.call(n,u)?n[u]:[]}),m=t.computed(()=>{var u,p;return(p=(u=r.formSchema)==null?void 0:u.fields)==null?void 0:p.find(S=>S.model==="config-identifier")}),g=t.computed(()=>{var u,p,S;return(((S=(p=(u=r.formSchema)==null?void 0:u.fields)==null?void 0:p.find(O=>O.model==="config-identifier"))==null?void 0:S.values)??[]).map(O=>({label:i(`rla.identifiers.options.${O}`),value:O}))}),f=t.ref(),h=t.ref(!0),_=t.computed(()=>{var u,p,S;return r.formModel["config-window_type"]??((S=(p=(u=r.formSchema)==null?void 0:u.fields)==null?void 0:p.find(O=>O.model==="config-window_type"))==null?void 0:S.default)}),M=t.computed(()=>{var p,S,O,P,te,Ve;const u=(O=(S=(p=r.formSchema)==null?void 0:p.fields)==null?void 0:S.find(J=>J.model==="config-window_type"))==null?void 0:O.default;return(((Ve=(te=(P=r.formSchema)==null?void 0:P.fields)==null?void 0:te.find(J=>J.model==="config-window_type"))==null?void 0:Ve.values)??[]).sort((J,Be)=>J===u?-1:Be===u?1:0)}),y=t.computed(()=>{var p;const u=(p=r.formModel["config-limit"])==null?void 0:p.map((S,O)=>{var P,te;return{limit:S,windowSize:(te=(P=r.formModel)==null?void 0:P["config-window_size"])==null?void 0:te[O]}});return!Array.isArray(u)||u.length===0?[{limit:void 0,windowSize:void 0}]:u}),I=t.computed(()=>{var u,p,S,O;return((u=r.formModel)==null?void 0:u["config-identifier"])??((O=(S=(p=r.formSchema)==null?void 0:p.fields)==null?void 0:S.find(P=>P.model==="config-identifier"))==null?void 0:O.default)}),N=t.computed(()=>{var u,p,S,O;return((u=r.formModel)==null?void 0:u["config-error_code"])??((O=(S=(p=r.formSchema)==null?void 0:p.fields)==null?void 0:S.find(P=>P.model==="config-error_code"))==null?void 0:O.default)}),U=t.computed(()=>{var u,p,S,O;return((u=r.formModel)==null?void 0:u["config-error_message"])??((O=(S=(p=r.formSchema)==null?void 0:p.fields)==null?void 0:S.find(P=>P.model==="config-error_message"))==null?void 0:O.default)}),V=(u,p)=>{if(p===f.value){r.onModelUpdated([],"config-limit"),r.onModelUpdated([],"config-window_size"),t.nextTick(()=>{f.value=void 0});return}r.onModelUpdated([u.config.limit],"config-limit"),r.onModelUpdated([u.config.window_size],"config-window_size"),t.nextTick(()=>{f.value=p})},C=u=>{f.value!==void 0&&(f.value=void 0),u!==null&&r.onModelUpdated(u.toString(),"config-window_type")},k=(u,p)=>{var O;f.value!==void 0&&(f.value=void 0);const S=Oe(((O=r.formModel)==null?void 0:O["config-limit"])??[]);S[u]=p,r.onModelUpdated(S,"config-limit")},T=(u,p)=>{var O;f.value!==void 0&&(f.value=void 0);const S=Oe(((O=r.formModel)==null?void 0:O["config-window_size"])??[]);S[u]=p,r.onModelUpdated(S,"config-window_size")},b=u=>{var O,P;f.value!==void 0&&(f.value=void 0);const p=Oe(((O=r.formModel)==null?void 0:O["config-limit"])??[]),S=Oe(((P=r.formModel)==null?void 0:P["config-window_size"])??[]);p.length===0&&p.push(void 0),S.length===0&&S.push(void 0),p.splice(u+1,0,void 0),S.splice(u+1,0,void 0),r.onModelUpdated(p,"config-limit"),r.onModelUpdated(S,"config-window_size")},w=u=>{var p,S;if(y.value.length>1){f.value!==void 0&&(f.value=void 0);const O=Oe(((p=r.formModel)==null?void 0:p["config-limit"])??[]),P=Oe(((S=r.formModel)==null?void 0:S["config-window_size"])??[]);O.length===0&&O.push(void 0),P.length===0&&P.push(void 0),O.splice(u,1),P.splice(u,1),r.onModelUpdated(O,"config-limit"),r.onModelUpdated(P,"config-window_size")}};return t.watch(()=>r.formModel["config-strategy"],u=>{u!=="redis"&&r.formModel.partials&&r.onModelUpdated(void 0,"partials")}),(u,p)=>{const S=t.resolveComponent("KLabel"),O=t.resolveComponent("KRadio"),P=t.resolveComponent("KInput"),te=t.resolveComponent("KButton"),Ve=t.resolveComponent("KBadge"),J=t.resolveComponent("KTooltip"),Be=t.resolveComponent("KCard"),kn=t.resolveComponent("KSelect"),Kt=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",wf,[t.createVNode(G,{model:e.formModel,options:e.formOptions,schema:l.value,onModelUpdated:p[0]||(p[0]=(R,H)=>e.onModelUpdated(R,H))},null,8,["model","options","schema"]),t.createVNode(Be,{class:"rla-form-request-limits"},{title:t.withCtx(()=>[t.createVNode(S,{class:"rla-form-request-limits-title",for:"rla-form-request-limits-legend",required:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("rla.request_limits.title")),1)]),_:1}),t.createElementVNode("div",kf,t.toDisplayString(t.unref(i)("rla.request_limits.subtitle")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",Mf,[t.createElementVNode("div",Af,[t.createVNode(S,{class:"rla-form-window-type-label","tooltip-attributes":{maxWidth:"300",placement:"top"}},{tooltip:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:t.unref(i)("rla.window_type.help")},null,8,Nf)]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("rla.window_type.label"))+" ",1)]),_:1}),t.createElementVNode("div",If,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.value,R=>(t.openBlock(),t.createBlock(O,{key:`window-type-${R}`,"model-value":_.value,name:R,"selected-value":R,"onUpdate:modelValue":C},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)(`rla.window_type.options.${R}`)),1)]),_:2},1032,["model-value","name","selected-value"]))),128))])]),t.createElementVNode("div",Of,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,(R,H)=>(t.openBlock(),t.createElementBlock("div",{key:H.toString()},[t.createVNode(S,{for:`rla-form-request-limits-item-${H}-legend`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("rla.request_limits.label_index",{index:H+1})),1)]),_:2},1032,["for"]),t.createElementVNode("div",Vf,[t.createElementVNode("legend",{id:`rla-form-request-limits-item-${H}-legend`,class:"rla-form-request-limits-inputs"},[t.createVNode(P,{"model-value":R.limit&&R.limit.toString(),placeholder:t.unref(i)("rla.request_limits.request_number"),type:"number","onUpdate:modelValue":Z=>k(H,Number.parseInt(Z))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.request_limits.interval_determiner")),1),t.createVNode(P,{"model-value":R.windowSize&&R.windowSize.toString(),placeholder:t.unref(i)("rla.request_limits.time_interval"),type:"number","onUpdate:modelValue":Z=>T(H,Number.parseInt(Z))},null,8,["model-value","placeholder","onUpdate:modelValue"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.request_limits.seconds")),1)],8,Bf),t.createElementVNode("div",Ff,[t.createVNode(te,{appearance:"tertiary",disabled:y.value.length<=1,onClick:()=>w(H)},{default:t.withCtx(()=>[t.createVNode(t.unref(Te.RemoveIcon))]),_:1},8,["disabled","onClick"]),t.createVNode(te,{appearance:"tertiary",onClick:()=>b(H)},{default:t.withCtx(()=>[t.createVNode(t.unref(Te.AddIcon))]),_:1},8,["onClick"])])])]))),128))]),c.value.length>0?(t.openBlock(),t.createElementBlock("div",Rf,[t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.start_with_a_use_case")),1),t.createElementVNode("div",Df,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(R,H)=>(t.openBlock(),t.createBlock(J,{key:`use-case-${H}`,"max-width":"300"},{content:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(R.description),1),p[10]||(p[10]=t.createElementVNode("br",null,null,-1)),t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.request_limits.label"))+": "+t.toDisplayString(R.config.limit),1),t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("rla.request_limits.time_interval"))+": "+t.toDisplayString(R.config.window_size),1)]),default:t.withCtx(()=>[t.createVNode(Ve,{appearance:f.value===`${_.value}-${H}`?"info":"decorative",class:"rla-form-request-limits-examples-badge",onClick:()=>V(R,`${_.value}-${H}`)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(R.label),1)]),_:2},1032,["appearance","onClick"])]),_:2},1024))),128))])])):t.createCommentVNode("",!0)])]),_:1}),t.createVNode(kn,{modelValue:I.value,"onUpdate:modelValue":p[1]||(p[1]=R=>I.value=R),class:"rla-form-identifiers",items:g.value,label:t.unref(i)("rla.identifiers.label"),"label-attributes":{tooltipAttributes:{maxWidth:"300",placement:"top"}},required:"",onSelected:p[2]||(p[2]=R=>r.onModelUpdated(R.value,"config-identifier"))},{"label-tooltip":t.withCtx(()=>[t.createElementVNode("div",{innerHTML:m.value&&m.value.help},null,8,Lf)]),_:1},8,["modelValue","items","label"]),t.createElementVNode("div",null,[t.createVNode(S,{for:"rla-form-error-legend",info:t.unref(i)("rla.error_message.help"),required:"","tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("rla.error_message.label")),1)]),_:1},8,["info"]),t.createElementVNode("legend",Uf,[t.createVNode(P,{class:"input-error-code","model-value":N.value&&N.value.toString(),placeholder:t.unref(i)("rla.error_message.code_placeholder"),type:"number","onUpdate:modelValue":p[3]||(p[3]=R=>e.onModelUpdated(Number.parseInt(R),"config-error_code"))},null,8,["model-value","placeholder"]),p[11]||(p[11]=t.createElementVNode("div",null,":",-1)),t.createVNode(P,{"model-value":U.value,placeholder:t.unref(i)("rla.error_message.message_placeholder"),"onUpdate:modelValue":p[4]||(p[4]=R=>e.onModelUpdated(R,"config-error_message"))},null,8,["model-value","placeholder"])])])]),t.createVNode(Kt,{modelValue:h.value,"onUpdate:modelValue":p[9]||(p[9]=R=>h.value=R),"data-testid":"view-advanced","trigger-label":t.unref(i)("rla.view_advanced")},{default:t.withCtx(()=>[t.createVNode(G,{model:e.formModel,options:e.formOptions,schema:s.value.endsWithStrategy,onModelUpdated:p[5]||(p[5]=(R,H)=>e.onModelUpdated(R,H))},null,8,["model","options","schema"]),e.formModel["config-strategy"]==="redis"?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.enableRedisPartial?"div":"KCard"),{key:0,class:"rla-form-redis-card",title:t.unref(i)("rla.redis.title")},{default:t.withCtx(()=>[t.createVNode(G,{"enable-redis-partial":e.enableRedisPartial,"is-editing":e.isEditing,"is-konnect-managed-redis-enabled":e.isKonnectManagedRedisEnabled,model:e.formModel,options:e.formOptions,schema:s.value.redis,onModelUpdated:p[6]||(p[6]=(R,H)=>e.onModelUpdated(R,H)),onPartialToggled:e.onPartialToggled,onShowNewPartialModal:p[7]||(p[7]=()=>e.showNewPartialModal(e.formSchema._supported_redis_partial_type))},null,8,["enable-redis-partial","is-editing","is-konnect-managed-redis-enabled","model","options","schema","onPartialToggled"])]),_:1},8,["title"])):t.createCommentVNode("",!0),t.createVNode(G,{class:t.normalizeClass({"rla-last-vfg":e.formModel["config-strategy"]!=="redis"}),model:e.formModel,options:e.formOptions,schema:s.value.afterStrategy,onModelUpdated:p[8]||(p[8]=(R,H)=>e.onModelUpdated(R,H))},null,8,["class","model","options","schema"])]),_:1},8,["modelValue","trigger-label"])],64)}}}),[["__scopeId","data-v-c304263d"]])},Symbol.toStringTag,{value:"Module"})),$f=["array","metric","advanced","selectionGroup","object-advanced"],vf=e=>({"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer","rate-limiting-advanced":"RLAForm"})[e];D.AUTOFILL_SLOT=he,D.AUTOFILL_SLOT_NAME=He,D.EMPTY_VALUE_PLACEHOLDER=ro,D.FIELD_STATES=Se,D.FORMS_API_KEY=fe,D.FORMS_CONFIG=ao,D.FieldScopedEntitySelect=Ea,D.PartialType=Tt,D.REDIS_PARTIAL_FETCHER_KEY=io,D.REDIS_PARTIAL_INFO=cl,D.VueFormGenerator=G,D.abstractField=Sc,D.composables=Ee,D.customFields=$f,D.getSharedFormName=vf,D.sharedForms=Pf,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/forms",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.15-pr.2755.4df3622f7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/forms.umd.js",
|
|
6
6
|
"module": "./dist/forms.es.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@kong/icons": "^1.48.0",
|
|
36
|
-
"dompurify": "^3.3.
|
|
36
|
+
"dompurify": "^3.3.3",
|
|
37
37
|
"fecha": "^4.2.3",
|
|
38
38
|
"lodash-es": "^4.17.23"
|
|
39
39
|
},
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@kong/kongponents": "^9.52.5",
|
|
42
42
|
"axios": "^1.15.0",
|
|
43
43
|
"vue": "^3.5.27",
|
|
44
|
-
"@kong-ui-public/entities-shared": "^3.41.
|
|
44
|
+
"@kong-ui-public/entities-shared": "^3.41.8-pr.2755.4df3622f7.0",
|
|
45
45
|
"@kong-ui-public/i18n": "^2.4.6"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"@types/lodash-es": "^4.17.12",
|
|
51
51
|
"axios": "^1.13.2",
|
|
52
52
|
"pug": "^3.0.3",
|
|
53
|
-
"@kong-ui-public/
|
|
54
|
-
"@kong-ui-public/
|
|
53
|
+
"@kong-ui-public/i18n": "^2.4.6",
|
|
54
|
+
"@kong-ui-public/entities-shared": "^3.41.8-pr.2755.4df3622f7.0"
|
|
55
55
|
},
|
|
56
56
|
"distSizeChecker": {
|
|
57
57
|
"errorLimit": "1.2MB"
|