@kong-ui-public/entities-certificates 3.3.2 → 3.3.3
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.
|
@@ -114,7 +114,7 @@ ${t.join(`
|
|
|
114
114
|
`)}static pad(t=0){return"".padStart(2*t," ")}static serializeObj(t,r=0){const i=[];let o=this.pad(r++),s="";const a=t[ue.VALUE];a&&(s=` ${a}`),i.push(`${o}${t[ue.NAME]}:${s}`),o=this.pad(r);for(const l in t){if(typeof l=="symbol")continue;const c=t[l],d=l?`${l}: `:"";if(typeof c=="string"||typeof c=="number"||typeof c=="boolean")i.push(`${o}${d}${c}`);else if(c instanceof Date)i.push(`${o}${d}${c.toUTCString()}`);else if(Array.isArray(c))for(const y of c)y[ue.NAME]=l,i.push(...this.serializeObj(y,r));else if(c instanceof ue)c[ue.NAME]=l,i.push(...this.serializeObj(c,r));else if(P.isBufferSource(c))l?(i.push(`${o}${d}`),i.push(...this.serializeBufferSource(c,r+1))):i.push(...this.serializeBufferSource(c,r));else if("toTextObject"in c){const y=c.toTextObject();y[ue.NAME]=l,i.push(...this.serializeObj(y,r))}else throw new TypeError("Cannot serialize data in text format. Unsupported type.")}return i}static serializeBufferSource(t,r=0){const i=this.pad(r),o=P.toUint8Array(t),s=[];for(let a=0;a<o.length;){const l=[];for(let c=0;c<16&&a<o.length;c++){c===8&&l.push("");const d=o[a++].toString(16).padStart(2,"0");l.push(d)}s.push(`${i}${l.join(" ")}`)}return s}static serializeAlgorithm(t){return this.algorithmSerializer.toTextObject(t)}}sr.oidSerializer=Rt,sr.algorithmSerializer=Gh;class Ut{constructor(...t){if(t.length===1){const r=t[0];this.rawData=G.serialize(r),this.onInit(r)}else{const r=G.parse(t[0],t[1]);this.rawData=P.toArrayBuffer(t[0]),this.onInit(r)}}equal(t){return t instanceof Ut?ul(t.rawData,this.rawData):!1}toString(t="text"){switch(t){case"asn":return G.toString(this.rawData);case"text":return sr.serialize(this.toTextObject());case"hex":return L.ToHex(this.rawData);case"base64":return L.ToBase64(this.rawData);case"base64url":return L.ToBase64Url(this.rawData);default:throw TypeError("Argument 'format' is unsupported value")}}getTextName(){return this.constructor.NAME}toTextObject(){const t=this.toTextObjectEmpty();return t[""]=this.rawData,t}toTextObjectEmpty(t){return new ue(this.getTextName(),{},t)}}Ut.NAME="ASN";class mt extends Ut{constructor(...t){let r;P.isBufferSource(t[0])?r=P.toArrayBuffer(t[0]):r=G.serialize(new at({extnID:t[0],critical:t[1],extnValue:new ae(P.toArrayBuffer(t[2]))})),super(r,at)}onInit(t){this.type=t.extnID,this.critical=t.critical,this.value=t.extnValue.buffer}toTextObject(){const t=this.toTextObjectWithoutValue();return t[""]=this.value,t}toTextObjectWithoutValue(){const t=this.toTextObjectEmpty(this.critical?"critical":void 0);return t[ue.NAME]===mt.NAME&&(t[ue.NAME]=Rt.toString(this.type)),t}}var cd;class ar{static isCryptoKeyPair(t){return t&&t.privateKey&&t.publicKey}static isCryptoKey(t){return t&&t.usages&&t.type&&t.algorithm&&t.extractable!==void 0}constructor(){this.items=new Map,this[cd]="CryptoProvider",typeof self<"u"&&typeof crypto<"u"&&this.set(ar.DEFAULT,crypto)}clear(){this.items.clear()}delete(t){return this.items.delete(t)}forEach(t,r){return this.items.forEach(t,r)}has(t){return this.items.has(t)}get size(){return this.items.size}entries(){return this.items.entries()}keys(){return this.items.keys()}values(){return this.items.values()}[Symbol.iterator](){return this.items[Symbol.iterator]()}get(t=ar.DEFAULT){const r=this.items.get(t.toLowerCase());if(!r)throw new Error(`Cannot get Crypto by name '${t}'`);return r}set(t,r){if(typeof t=="string"){if(!r)throw new TypeError("Argument 'value' is required");this.items.set(t.toLowerCase(),r)}else this.items.set(ar.DEFAULT,t);return this}}cd=Symbol.toStringTag,ar.DEFAULT="default";const Ye=new ar,Wh=/^[0-2](?:\.[1-9][0-9]*)+$/;function Jh(e){return new RegExp(Wh).test(e)}class ud{constructor(t={}){this.items={};for(const r in t)this.register(r,t[r])}get(t){return this.items[t]||null}findId(t){return Jh(t)?t:this.get(t)}register(t,r){this.items[t]=r,this.items[r]=t}}const ze=new ud;ze.register("CN","2.5.4.3"),ze.register("L","2.5.4.7"),ze.register("ST","2.5.4.8"),ze.register("O","2.5.4.10"),ze.register("OU","2.5.4.11"),ze.register("C","2.5.4.6"),ze.register("DC","0.9.2342.19200300.100.1.25"),ze.register("E","1.2.840.113549.1.9.1"),ze.register("G","2.5.4.42"),ze.register("I","2.5.4.43"),ze.register("SN","2.5.4.4"),ze.register("T","2.5.4.12");function Yh(e,t){return`\\${L.ToHex(L.FromUtf8String(t)).toUpperCase()}`}function Zh(e){return e.replace(/([,+"\\<>;])/g,"\\$1").replace(/^([ #])/,"\\$1").replace(/([ ]$)/,"\\$1").replace(/([\r\n\t])/,Yh)}class Lt{static isASCII(t){for(let r=0;r<t.length;r++)if(t.charCodeAt(r)>255)return!1;return!0}static isPrintableString(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/g.test(t)}constructor(t,r={}){this.extraNames=new ud,this.asn=new we;for(const i in r)if(Object.prototype.hasOwnProperty.call(r,i)){const o=r[i];this.extraNames.register(i,o)}typeof t=="string"?this.asn=this.fromString(t):t instanceof we?this.asn=t:P.isBufferSource(t)?this.asn=G.parse(t,we):this.asn=this.fromJSON(t)}getField(t){const r=this.extraNames.findId(t)||ze.findId(t),i=[];for(const o of this.asn)for(const s of o)s.type===r&&i.push(s.value.toString());return i}getName(t){return this.extraNames.get(t)||ze.get(t)}toString(){return this.asn.map(t=>t.map(r=>{const i=this.getName(r.type)||r.type,o=r.value.anyValue?`#${L.ToHex(r.value.anyValue)}`:Zh(r.value.toString());return`${i}=${o}`}).join("+")).join(", ")}toJSON(){var t;const r=[];for(const i of this.asn){const o={};for(const s of i){const a=this.getName(s.type)||s.type;(t=o[a])!==null&&t!==void 0||(o[a]=[]),o[a].push(s.value.anyValue?`#${L.ToHex(s.value.anyValue)}`:s.value.toString())}r.push(o)}return r}fromString(t){const r=new we,i=/(\d\.[\d.]*\d|[A-Za-z]+)=((?:"")|(?:".*?[^\\]")|(?:[^,+].*?(?:[^\\][,+]))|(?:))([,+])?/g;let o=null,s=",";for(;o=i.exec(`${t},`);){let[,a,l]=o;const c=l[l.length-1];(c===","||c==="+")&&(l=l.slice(0,l.length-1),o[3]=c);const d=o[3];if(/[\d.]+/.test(a)||(a=this.getName(a)||""),!a)throw new Error(`Cannot get OID for name type '${a}'`);const y=new ei({type:a});if(l.charAt(0)==="#")y.value.anyValue=L.FromHex(l.slice(1));else{const p=/"(.*?[^\\])?"/.exec(l);p&&(l=p[1]),l=l.replace(/\\0a/ig,`
|
|
115
115
|
`).replace(/\\0d/ig,"\r").replace(/\\0g/ig," ").replace(/\\(.)/g,"$1"),a===this.getName("E")||a===this.getName("DC")?y.value.ia5String=l:Lt.isPrintableString(l)?y.value.printableString=l:y.value.utf8String=l}s==="+"?r[r.length-1].push(y):r.push(new gr([y])),s=d}return r}fromJSON(t){const r=new we;for(const i of t){const o=new gr;for(const s in i){let a=s;if(/[\d.]+/.test(s)||(a=this.getName(s)||""),!a)throw new Error(`Cannot get OID for name type '${s}'`);const l=i[s];for(const c of l){const d=new ei({type:a});if(typeof c=="object")for(const y in c)switch(y){case"ia5String":d.value.ia5String=c[y];break;case"utf8String":d.value.utf8String=c[y];break;case"universalString":d.value.universalString=c[y];break;case"bmpString":d.value.bmpString=c[y];break;case"printableString":d.value.printableString=c[y];break}else c[0]==="#"?d.value.anyValue=L.FromHex(c.slice(1)):a===this.getName("E")||a===this.getName("DC")?d.value.ia5String=c:d.value.printableString=c;o.push(d)}}r.push(o)}return r}toArrayBuffer(){return G.serialize(this.asn)}async getThumbprint(...t){var r;let i,o="SHA-1";return t.length>=1&&!(!((r=t[0])===null||r===void 0)&&r.subtle)?(o=t[0]||o,i=t[1]||Ye.get()):i=t[0]||Ye.get(),await i.subtle.digest(o,this.toArrayBuffer())}}const dd="Cannot initialize GeneralName from ASN.1 data.",fd=`${dd} Unsupported string format in use.`,Qh=`${dd} Value doesn't match to GUID regular expression.`,pd=/^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i,hd="1.3.6.1.4.1.311.25.1",yd="1.3.6.1.4.1.311.20.2.3",Ba="dns",Ia="dn",Ea="email",Na="ip",Oa="url",_a="guid",Va="upn",io="id";class gd extends Ut{constructor(...t){let r;if(t.length===2)switch(t[0]){case Ia:{const i=new Lt(t[1]).toArrayBuffer(),o=G.parse(i,we);r=new ie({directoryName:o});break}case Ba:r=new ie({dNSName:t[1]});break;case Ea:r=new ie({rfc822Name:t[1]});break;case _a:{const i=new RegExp(pd,"i").exec(t[1]);if(!i)throw new Error("Cannot parse GUID value. Value doesn't match to regular expression");const o=i.slice(1).map((s,a)=>a<3?L.ToHex(new Uint8Array(L.FromHex(s)).reverse()):s).join("");r=new ie({otherName:new ti({typeId:hd,value:G.serialize(new ae(L.FromHex(o)))})});break}case Na:r=new ie({iPAddress:t[1]});break;case io:r=new ie({registeredID:t[1]});break;case Va:{r=new ie({otherName:new ti({typeId:yd,value:G.serialize(fc.toASN(t[1]))})});break}case Oa:r=new ie({uniformResourceIdentifier:t[1]});break;default:throw new Error("Cannot create GeneralName. Unsupported type of the name")}else P.isBufferSource(t[0])?r=G.parse(t[0],ie):r=t[0];super(r)}onInit(t){if(t.dNSName!=null)this.type=Ba,this.value=t.dNSName;else if(t.rfc822Name!=null)this.type=Ea,this.value=t.rfc822Name;else if(t.iPAddress!=null)this.type=Na,this.value=t.iPAddress;else if(t.uniformResourceIdentifier!=null)this.type=Oa,this.value=t.uniformResourceIdentifier;else if(t.registeredID!=null)this.type=io,this.value=t.registeredID;else if(t.directoryName!=null)this.type=Ia,this.value=new Lt(t.directoryName).toString();else if(t.otherName!=null)if(t.otherName.typeId===hd){this.type=_a;const r=G.parse(t.otherName.value,ae),i=new RegExp(pd,"i").exec(L.ToHex(r));if(!i)throw new Error(Qh);this.value=i.slice(1).map((o,s)=>s<3?L.ToHex(new Uint8Array(L.FromHex(o)).reverse()):o).join("-")}else if(t.otherName.typeId===yd)this.type=Va,this.value=G.parse(t.otherName.value,Oe).toString();else throw new Error(fd);else throw new Error(fd)}toJSON(){return{type:this.type,value:this.value}}toTextObject(){let t;switch(this.type){case Ia:case Ba:case _a:case Na:case io:case Va:case Oa:t=this.type.toUpperCase();break;case Ea:t="Email";break;default:throw new Error("Unsupported GeneralName type")}let r=this.value;return this.type===io&&(r=Rt.toString(r)),new ue(t,void 0,r)}}class Si extends Ut{constructor(t){let r;if(t instanceof Pe)r=t;else if(Array.isArray(t)){const i=[];for(const o of t)if(o instanceof ie)i.push(o);else{const s=G.parse(new gd(o.type,o.value).rawData,ie);i.push(s)}r=new Pe(i)}else if(P.isBufferSource(t))r=G.parse(t,Pe);else throw new Error("Cannot initialize GeneralNames. Incorrect incoming arguments");super(r)}onInit(t){const r=[];for(const i of t){let o=null;try{o=new gd(i)}catch{continue}r.push(o)}this.items=r}toJSON(){return this.items.map(t=>t.toJSON())}toTextObject(){const t=super.toTextObjectEmpty();for(const r of this.items){const i=r.toTextObject();let o=t[i[ue.NAME]];Array.isArray(o)||(o=[],t[i[ue.NAME]]=o),o.push(i)}return t}}Si.NAME="GeneralNames";const xi="-{5}",Ai="\\n",Xh=`[^${Ai}]+`,ey=`${xi}BEGIN (${Xh}(?=${xi}))${xi}`,ty=`${xi}END \\1${xi}`,$r="\\n",ry=`[^:${Ai}]+`,iy=`(?:[^${Ai}]+${$r}(?: +[^${Ai}]+${$r})*)`,ny=`(?:[a-zA-Z0-9=+/]+${$r})+`,md=`${ey}${$r}(?:((?:${ry}: ${iy})+))?${$r}?(${ny})${ty}`;class Ze{static isPem(t){return typeof t=="string"&&new RegExp(md,"g").test(t)}static decodeWithHeaders(t){t=t.replace(/\r/g,"");const r=new RegExp(md,"g"),i=[];let o=null;for(;o=r.exec(t);){const s=o[3].replace(new RegExp(`[${Ai}]+`,"g"),""),a={type:o[1],headers:[],rawData:L.FromBase64(s)},l=o[2];if(l){const c=l.split(new RegExp($r,"g"));let d=null;for(const y of c){const[p,E]=y.split(/:(.*)/);if(E===void 0){if(!d)throw new Error("Cannot parse PEM string. Incorrect header value");d.value+=p.trim()}else d&&a.headers.push(d),d={key:p,value:E.trim()}}d&&a.headers.push(d)}i.push(a)}return i}static decode(t){return this.decodeWithHeaders(t).map(i=>i.rawData)}static decodeFirst(t){const r=this.decode(t);if(!r.length)throw new RangeError("PEM string doesn't contain any objects");return r[0]}static encode(t,r){if(Array.isArray(t)){const i=new Array;return r?t.forEach(o=>{if(!P.isBufferSource(o))throw new TypeError("Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource");i.push(this.encodeStruct({type:r,rawData:P.toArrayBuffer(o)}))}):t.forEach(o=>{if(!("type"in o))throw new TypeError("Cannot encode array of PemStruct in PEM format. Not all items of the array are PemStrut");i.push(this.encodeStruct(o))}),i.join(`
|
|
116
116
|
`)}else{if(!r)throw new Error("Required argument 'tag' is missed");return this.encodeStruct({type:r,rawData:P.toArrayBuffer(t)})}}static encodeStruct(t){var r;const i=t.type.toLocaleUpperCase(),o=[];if(o.push(`-----BEGIN ${i}-----`),!((r=t.headers)===null||r===void 0)&&r.length){for(const d of t.headers)o.push(`${d.key}: ${d.value}`);o.push("")}const s=L.ToBase64(t.rawData);let a,l=0;const c=Array();for(;l<s.length&&(s.length-l<64?a=s.substring(l):(a=s.substring(l,l+64),l+=64),a.length!==0);)if(c.push(a),a.length<64)break;return o.push(...c),o.push(`-----END ${i}-----`),o.join(`
|
|
117
|
-
`)}}Ze.CertificateTag="CERTIFICATE",Ze.CrlTag="CRL",Ze.CertificateRequestTag="CERTIFICATE REQUEST",Ze.PublicKeyTag="PUBLIC KEY",Ze.PrivateKeyTag="PRIVATE KEY";class Vt extends Ut{static isAsnEncoded(t){return P.isBufferSource(t)||typeof t=="string"}static toArrayBuffer(t){if(typeof t=="string"){if(Ze.isPem(t))return Ze.decode(t)[0];if(L.isHex(t))return L.FromHex(t);if(L.isBase64(t))return L.FromBase64(t);if(L.isBase64Url(t))return L.FromBase64Url(t);throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url")}else{const r=L.ToBinary(t);return Ze.isPem(r)?Ze.decode(r)[0]:L.isHex(r)?L.FromHex(r):L.isBase64(r)?L.FromBase64(r):L.isBase64Url(r)?L.FromBase64Url(r):P.toArrayBuffer(t)}}constructor(...t){Vt.isAsnEncoded(t[0])?super(Vt.toArrayBuffer(t[0]),t[1]):super(t[0])}toString(t="pem"){switch(t){case"pem":return Ze.encode(this.rawData,this.tag);default:return super.toString(t)}}}class lr extends Vt{constructor(t){Vt.isAsnEncoded(t)?super(t,Nt):super(t),this.tag=Ze.PublicKeyTag}async export(...t){let r,i=["verify"],o={hash:"SHA-256",...this.algorithm};return t.length>1?(o=t[0]||o,i=t[1]||i,r=t[2]||Ye.get()):r=t[0]||Ye.get(),r.subtle.importKey("spki",this.rawData,o,!0,i)}onInit(t){const r=rt.resolve(to),i=this.algorithm=r.toWebAlgorithm(t.algorithm);switch(t.algorithm.algorithm){case Tr:{const o=G.parse(t.subjectPublicKey,ta),s=P.toUint8Array(o.modulus);i.publicExponent=P.toUint8Array(o.publicExponent),i.modulusLength=(s[0]?s:s.slice(1)).byteLength<<3;break}}}async getThumbprint(...t){var r;let i,o="SHA-1";return t.length>=1&&!(!((r=t[0])===null||r===void 0)&&r.subtle)?(o=t[0]||o,i=t[1]||Ye.get()):i=t[0]||Ye.get(),await i.subtle.digest(o,this.rawData)}async getKeyIdentifier(t){t||(t=Ye.get());const r=G.parse(this.rawData,Nt);return await t.subtle.digest("SHA-1",r.subjectPublicKey)}toTextObject(){const t=this.toTextObjectEmpty(),r=G.parse(this.rawData,Nt);switch(t.Algorithm=sr.serializeAlgorithm(r.algorithm),r.algorithm.algorithm){case gi:t["EC Point"]=r.subjectPublicKey;break;case Tr:default:t["Raw Data"]=r.subjectPublicKey}return t}}class bt{static register(t,r){this.items.set(t,r)}static create(t){const r=new mt(t),i=this.items.get(r.type);return i?new i(t):r}}bt.items=new Map;const no="crypto.signatureFormatter";class oy{toAsnSignature(t,r){return P.toArrayBuffer(r)}toWebSignature(t,r){return P.toArrayBuffer(r)}}class oo extends Vt{constructor(t){Vt.isAsnEncoded(t)?super(t,vr):super(t),this.tag=Ze.CertificateTag}onInit(t){const r=t.tbsCertificate;this.tbs=G.serialize(r),this.serialNumber=L.ToHex(r.serialNumber),this.subjectName=new Lt(r.subject),this.subject=new Lt(r.subject).toString(),this.issuerName=new Lt(r.issuer),this.issuer=this.issuerName.toString();const i=rt.resolve(to);this.signatureAlgorithm=i.toWebAlgorithm(t.signatureAlgorithm),this.signature=t.signatureValue;const o=r.validity.notBefore.utcTime||r.validity.notBefore.generalTime;if(!o)throw new Error("Cannot get 'notBefore' value");this.notBefore=o;const s=r.validity.notAfter.utcTime||r.validity.notAfter.generalTime;if(!s)throw new Error("Cannot get 'notAfter' value");this.notAfter=s,this.extensions=[],r.extensions&&(this.extensions=r.extensions.map(a=>bt.create(G.serialize(a)))),this.publicKey=new lr(r.subjectPublicKeyInfo)}getExtension(t){for(const r of this.extensions)if(typeof t=="string"){if(r.type===t)return r}else if(r instanceof t)return r;return null}getExtensions(t){return this.extensions.filter(r=>typeof t=="string"?r.type===t:r instanceof t)}async verify(t={},r=Ye.get()){let i,o;const s=t.publicKey;try{if(!s)i={...this.publicKey.algorithm,...this.signatureAlgorithm},o=await this.publicKey.export(i,["verify"],r);else if("publicKey"in s)i={...s.publicKey.algorithm,...this.signatureAlgorithm},o=await s.publicKey.export(i,["verify"],r);else if(s instanceof lr)i={...s.algorithm,...this.signatureAlgorithm},o=await s.export(i,["verify"],r);else if(P.isBufferSource(s)){const d=new lr(s);i={...d.algorithm,...this.signatureAlgorithm},o=await d.export(i,["verify"],r)}else i={...s.algorithm,...this.signatureAlgorithm},o=s}catch{return!1}const a=rt.resolveAll(no).reverse();let l=null;for(const d of a)if(l=d.toWebSignature(i,this.signature),l)break;if(!l)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");const c=await r.subtle.verify(this.signatureAlgorithm,o,l,this.tbs);if(t.signatureOnly)return c;{const y=(t.date||new Date).getTime();return c&&this.notBefore.getTime()<y&&y<this.notAfter.getTime()}}async getThumbprint(...t){let r,i="SHA-1";return t[0]&&(t[0].subtle?r=t[0]:(i=t[0]||i,r=t[1])),r??(r=Ye.get()),await r.subtle.digest(i,this.rawData)}async isSelfSigned(t=Ye.get()){return this.subject===this.issuer&&await this.verify({signatureOnly:!0},t)}toTextObject(){const t=this.toTextObjectEmpty(),r=G.parse(this.rawData,vr),i=r.tbsCertificate,o=new ue("",{Version:`${wr[i.version]} (${i.version})`,"Serial Number":i.serialNumber,"Signature Algorithm":sr.serializeAlgorithm(i.signature),Issuer:this.issuer,Validity:new ue("",{"Not Before":i.validity.notBefore.getTime(),"Not After":i.validity.notAfter.getTime()}),Subject:this.subject,"Subject Public Key Info":this.publicKey});if(i.issuerUniqueID&&(o["Issuer Unique ID"]=i.issuerUniqueID),i.subjectUniqueID&&(o["Subject Unique ID"]=i.subjectUniqueID),this.extensions.length){const s=new ue("");for(const a of this.extensions){const l=a.toTextObject();s[l[ue.NAME]]=l}o.Extensions=s}return t.Data=o,t.Signature=new ue("",{Algorithm:sr.serializeAlgorithm(r.signatureAlgorithm),"":r.signatureValue}),t}}oo.NAME="Certificate";class Bi extends mt{static async create(t,r=!1,i=Ye.get()){if(t instanceof oo||ar.isCryptoKey(t)){const o=t instanceof oo?await t.publicKey.export(i):t,s=await i.subtle.exportKey("spki",o),l=await new lr(s).getKeyIdentifier(i);return new Bi(L.ToHex(l),r)}else return new Bi(t,r)}constructor(...t){if(P.isBufferSource(t[0]))super(t[0]);else if(typeof t[0]=="string"){const r=new Xt({keyIdentifier:new Yo(L.FromHex(t[0]))});super(Jo,t[1],G.serialize(r))}else{const r=t[0],i=r.name instanceof Si?G.parse(r.name.rawData,Pe):r.name,o=new Xt({authorityCertIssuer:i,authorityCertSerialNumber:L.FromHex(r.serialNumber)});super(Jo,t[1],G.serialize(o))}}onInit(t){super.onInit(t);const r=G.parse(t.extnValue,Xt);r.keyIdentifier&&(this.keyId=L.ToHex(r.keyIdentifier)),r.authorityCertIssuer&&r.authorityCertSerialNumber&&(this.certId={name:r.authorityCertIssuer,serialNumber:L.ToHex(r.authorityCertSerialNumber)})}toTextObject(){const t=this.toTextObjectWithoutValue(),r=G.parse(this.value,Xt);return r.authorityCertIssuer&&(t["Authority Issuer"]=new Si(r.authorityCertIssuer).toTextObject()),r.authorityCertSerialNumber&&(t["Authority Serial Number"]=r.authorityCertSerialNumber),r.keyIdentifier&&(t[""]=r.keyIdentifier),t}}Bi.NAME="Authority Key Identifier";class bd extends mt{constructor(...t){if(P.isBufferSource(t[0])){super(t[0]);const r=G.parse(this.value,on);this.ca=r.cA,this.pathLength=r.pathLenConstraint}else{const r=new on({cA:t[0],pathLenConstraint:t[1]});super(wc,t[2],G.serialize(r)),this.ca=t[0],this.pathLength=t[1]}}toTextObject(){const t=this.toTextObjectWithoutValue();return this.ca&&(t.CA=this.ca),this.pathLength!==void 0&&(t["Path Length"]=this.pathLength),t}}bd.NAME="Basic Constraints";var wd;(function(e){e.serverAuth="1.3.6.1.5.5.7.3.1",e.clientAuth="1.3.6.1.5.5.7.3.2",e.codeSigning="1.3.6.1.5.5.7.3.3",e.emailProtection="1.3.6.1.5.5.7.3.4",e.timeStamping="1.3.6.1.5.5.7.3.8",e.ocspSigning="1.3.6.1.5.5.7.3.9"})(wd||(wd={}));class vd extends mt{constructor(...t){if(P.isBufferSource(t[0])){super(t[0]);const r=G.parse(this.value,un);this.usages=r.map(i=>i)}else{const r=new un(t[0]);super(Ac,t[1],G.serialize(r)),this.usages=t[0]}}toTextObject(){const t=this.toTextObjectWithoutValue();return t[""]=this.usages.map(r=>Rt.toString(r)).join(", "),t}}vd.NAME="Extended Key Usages";var Ta;(function(e){e[e.digitalSignature=1]="digitalSignature",e[e.nonRepudiation=2]="nonRepudiation",e[e.keyEncipherment=4]="keyEncipherment",e[e.dataEncipherment=8]="dataEncipherment",e[e.keyAgreement=16]="keyAgreement",e[e.keyCertSign=32]="keyCertSign",e[e.cRLSign=64]="cRLSign",e[e.encipherOnly=128]="encipherOnly",e[e.decipherOnly=256]="decipherOnly"})(Ta||(Ta={}));class ja extends mt{constructor(...t){if(P.isBufferSource(t[0])){super(t[0]);const r=G.parse(this.value,ds);this.usages=r.toNumber()}else{const r=new ds(t[0]);super(Ic,t[1],G.serialize(r)),this.usages=t[0]}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=G.parse(this.value,ds);return t[""]=r.toJSON().join(", "),t}}ja.NAME="Key Usages";class so extends mt{static async create(t,r=!1,i=Ye.get()){let o;t instanceof lr?o=t.rawData:"publicKey"in t?o=t.publicKey.rawData:P.isBufferSource(t)?o=t:o=await i.subtle.exportKey("spki",t);const a=await new lr(o).getKeyIdentifier(i);return new so(L.ToHex(a),r)}constructor(...t){if(P.isBufferSource(t[0])){super(t[0]);const r=G.parse(this.value,Mt);this.keyId=L.ToHex(r)}else{const r=typeof t[0]=="string"?L.FromHex(t[0]):t[0],i=new Mt(r);super(Tc,t[1],G.serialize(i)),this.keyId=L.ToHex(r)}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=G.parse(this.value,Mt);return t[""]=r,t}}so.NAME="Subject Key Identifier";class Da extends mt{constructor(...t){P.isBufferSource(t[0])?super(t[0]):super(_c,t[1],new Si(t[0]||[]).rawData)}onInit(t){super.onInit(t);const r=G.parse(t.extnValue,gs);this.names=new Si(r)}toTextObject(){const t=this.toTextObjectWithoutValue(),r=this.names.toTextObject();for(const i in r)t[i]=r[i];return t}}Da.NAME="Subject Alternative Name";class kd extends mt{constructor(...t){var r;if(P.isBufferSource(t[0])){super(t[0]);const i=G.parse(this.value,ln);this.policies=i.map(o=>o.policyIdentifier)}else{const i=t[0],o=(r=t[1])!==null&&r!==void 0?r:!1,s=new ln(i.map(a=>new an({policyIdentifier:a})));super(kc,o,G.serialize(s)),this.policies=i}}toTextObject(){const t=this.toTextObjectWithoutValue();return t.Policy=this.policies.map(r=>new ue("",{},Rt.toString(r))),t}}kd.NAME="Certificate Policies",bt.register(kc,kd);class Mr extends Ut{constructor(...t){let r;if(P.isBufferSource(t[0]))r=P.toArrayBuffer(t[0]);else{const i=t[0],o=Array.isArray(t[1])?t[1].map(s=>P.toArrayBuffer(s)):[];r=G.serialize(new Et({type:i,values:o}))}super(r,Et)}onInit(t){this.type=t.type,this.values=t.values}toTextObject(){const t=this.toTextObjectWithoutValue();return t.Value=this.values.map(r=>new ue("",{"":r})),t}toTextObjectWithoutValue(){const t=this.toTextObjectEmpty();return t[ue.NAME]===Mr.NAME&&(t[ue.NAME]=Rt.toString(this.type)),t}}Mr.NAME="Attribute";class Cd extends Mr{constructor(...t){var r;if(P.isBufferSource(t[0]))super(t[0]);else{const i=new Qn({printableString:t[0]});super(wu,[G.serialize(i)])}(r=this.password)!==null&&r!==void 0||(this.password="")}onInit(t){if(super.onInit(t),this.values[0]){const r=G.parse(this.values[0],Qn);this.password=r.toString()}}toTextObject(){const t=this.toTextObjectWithoutValue();return t[ue.VALUE]=this.password,t}}Cd.NAME="Challenge Password";class $a extends Mr{constructor(...t){var r;if(P.isBufferSource(t[0]))super(t[0]);else{const i=t[0],o=new er;for(const s of i)o.push(G.parse(s.rawData,at));super(ma,[G.serialize(o)])}(r=this.items)!==null&&r!==void 0||(this.items=[])}onInit(t){if(super.onInit(t),this.values[0]){const r=G.parse(this.values[0],er);this.items=r.map(i=>bt.create(G.serialize(i)))}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=this.items.map(i=>i.toTextObject());for(const i of r)t[i[ue.NAME]]=i;return t}}$a.NAME="Extensions";class ao{static register(t,r){this.items.set(t,r)}static create(t){const r=new Mr(t),i=this.items.get(r.type);return i?new i(t):r}}ao.items=new Map;let Ma=class{toAsnAlgorithm(t){switch(t.name.toLowerCase()){case"rsassa-pkcs1-v1_5":if("hash"in t){let r;if(typeof t.hash=="string")r=t.hash;else if(t.hash&&typeof t.hash=="object"&&"name"in t.hash&&typeof t.hash.name=="string")r=t.hash.name.toUpperCase();else throw new Error("Cannot get hash algorithm name");switch(r.toLowerCase()){case"sha-1":return new H({algorithm:$n,parameters:null});case"sha-256":return new H({algorithm:Zs,parameters:null});case"sha-384":return new H({algorithm:Mn,parameters:null});case"sha-512":return new H({algorithm:Pn,parameters:null})}}else return new H({algorithm:Tr,parameters:null})}return null}toWebAlgorithm(t){switch(t.algorithm){case Tr:return{name:"RSASSA-PKCS1-v1_5"};case $n:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case Zs:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case Mn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case Pn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}}}return null}};Ma=u([aa()],Ma),rt.registerSingleton(eo,Ma);class it{addPadding(t,r){const i=P.toUint8Array(r),o=new Uint8Array(t);return o.set(i,t-i.length),o}removePadding(t,r=!1){let i=P.toUint8Array(t);for(let o=0;o<i.length;o++)if(i[o]){i=i.slice(o);break}if(r&&i[0]>127){const o=new Uint8Array(i.length+1);return o.set(i,1),o.buffer}return i.buffer}toAsnSignature(t,r){if(t.name==="ECDSA"){const i=t.namedCurve,o=it.namedCurveSize.get(i)||it.defaultNamedCurveSize,s=new Dn,a=P.toUint8Array(r);return s.r=this.removePadding(a.slice(0,o),!0),s.s=this.removePadding(a.slice(o,o+o),!0),G.serialize(s)}return null}toWebSignature(t,r){if(t.name==="ECDSA"){const i=G.parse(r,Dn),o=t.namedCurve,s=it.namedCurveSize.get(o)||it.defaultNamedCurveSize,a=this.addPadding(s,this.removePadding(i.r)),l=this.addPadding(s,this.removePadding(i.s));return kp(a,l)}return null}}it.namedCurveSize=new Map,it.defaultNamedCurveSize=32;const Sd="1.3.101.110",xd="1.3.101.111",Ad="1.3.101.112",Bd="1.3.101.113";let Pa=class{toAsnAlgorithm(t){let r=null;switch(t.name.toLowerCase()){case"eddsa":switch(t.namedCurve.toLowerCase()){case"ed25519":r=Ad;break;case"ed448":r=Bd;break}break;case"ecdh-es":switch(t.namedCurve.toLowerCase()){case"x25519":r=Sd;break;case"x448":r=xd;break}}return r?new H({algorithm:r}):null}toWebAlgorithm(t){switch(t.algorithm){case Ad:return{name:"EdDSA",namedCurve:"Ed25519"};case Bd:return{name:"EdDSA",namedCurve:"Ed448"};case Sd:return{name:"ECDH-ES",namedCurve:"X25519"};case xd:return{name:"ECDH-ES",namedCurve:"X448"}}return null}};Pa=u([aa()],Pa),rt.registerSingleton(eo,Pa);class sy extends Vt{constructor(t){Vt.isAsnEncoded(t)?super(t,ki):super(t),this.tag=Ze.CertificateRequestTag}onInit(t){this.tbs=G.serialize(t.certificationRequestInfo),this.publicKey=new lr(t.certificationRequestInfo.subjectPKInfo);const r=rt.resolve(to);this.signatureAlgorithm=r.toWebAlgorithm(t.signatureAlgorithm),this.signature=t.signature,this.attributes=t.certificationRequestInfo.attributes.map(o=>ao.create(G.serialize(o)));const i=this.getAttribute(ma);this.extensions=[],i instanceof $a&&(this.extensions=i.items),this.subjectName=new Lt(t.certificationRequestInfo.subject),this.subject=this.subjectName.toString()}getAttribute(t){for(const r of this.attributes)if(r.type===t)return r;return null}getAttributes(t){return this.attributes.filter(r=>r.type===t)}getExtension(t){for(const r of this.extensions)if(r.type===t)return r;return null}getExtensions(t){return this.extensions.filter(r=>r.type===t)}async verify(t=Ye.get()){const r={...this.publicKey.algorithm,...this.signatureAlgorithm},i=await this.publicKey.export(r,["verify"],t),o=rt.resolveAll(no).reverse();let s=null;for(const l of o)if(s=l.toWebSignature(r,this.signature),s)break;if(!s)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return await t.subtle.verify(this.signatureAlgorithm,i,s,this.tbs)}toTextObject(){const t=this.toTextObjectEmpty(),r=G.parse(this.rawData,ki),i=r.certificationRequestInfo,o=new ue("",{Version:`${wr[i.version]} (${i.version})`,Subject:this.subject,"Subject Public Key Info":this.publicKey});if(this.attributes.length){const s=new ue("");for(const a of this.attributes){const l=a.toTextObject();s[l[ue.NAME]]=l}o.Attributes=s}return t.Data=o,t.Signature=new ue("",{Algorithm:sr.serializeAlgorithm(r.signatureAlgorithm),"":r.signature}),t}}sy.NAME="PKCS#10 Certificate Request";var Id;(function(e){e[e.unspecified=0]="unspecified",e[e.keyCompromise=1]="keyCompromise",e[e.cACompromise=2]="cACompromise",e[e.affiliationChanged=3]="affiliationChanged",e[e.superseded=4]="superseded",e[e.cessationOfOperation=5]="cessationOfOperation",e[e.certificateHold=6]="certificateHold",e[e.removeFromCRL=8]="removeFromCRL",e[e.privilegeWithdrawn=9]="privilegeWithdrawn",e[e.aACompromise=10]="aACompromise"})(Id||(Id={})),bt.register(wc,bd),bt.register(Ac,vd),bt.register(Ic,ja),bt.register(Tc,so),bt.register(Jo,Bi),bt.register(_c,Da),ao.register(wu,Cd),ao.register(ma,$a),rt.registerSingleton(no,oy),rt.registerSingleton(no,it),it.namedCurveSize.set("P-256",32),it.namedCurveSize.set("K-256",32),it.namedCurveSize.set("P-384",48),it.namedCurveSize.set("P-521",66);function Ed(){return{parseMetaCertificateData:t=>{if(/{vault:\/\/.*}/g.test(t))throw new Error("not a X.509 certificate");const r=new oo(t),i={subject:r.subjectName.toString(),issuer:r.issuer,notAfter:r.notAfter};for(const o of r.extensions)if(o instanceof Da){const s=o.names.toJSON(),l=Object.entries(s).map(c=>({type:c[1].type,value:c[1].value})).reduce((c,d)=>{const y=d.type,p=c[y]??[];return{...c,[y]:[...p,d.value]}},{});for(const c in l)i.subjectAltName=`${c}=${l[c].join(", ")}`}else if(o instanceof ja){const s=Object.values(Ta),a=Array(s.length/2).fill(null).reduce((l,c,d)=>{const y=s[s.length/2+d];if(o.usages&y){const p=s[d];l.push(p)}return l},[]);i.keyUsage=a}return i}}}function ay(){const e=Ed(),t=n.ref({}),r=o=>{if(!(o.id in t.value))try{t.value[o.id]=e.parseMetaCertificateData(o.cert)}catch{t.value[o.id]=void 0}return t.value[o.id]};return{certificateDataCache:t,getCertificateData:o=>{const s=r(o);return{schemaIssuer:(s==null?void 0:s.issuer)||"",schemaSubject:(s==null?void 0:s.subject)||"",schemaExpiry:(s==null?void 0:s.notAfter)instanceof Date?s.notAfter.getTime()/1e3:0,schemaSanNames:(s==null?void 0:s.subjectAltName)||"",schemaKeyUsages:(s==null?void 0:s.keyUsage)||[]}}}}const ly={certificates:{title:"Certificates",list:{toolbar_actions:{new_certificate:"New Certificate"},table_headers:{subject:"Subject",expiry:"Expiry",san:"SAN",cert:"Cert",tags:"Tags",issuer:"Issuer",snis:"SNIs"},empty_state:{title:"Configure a New Certificate",description:"Certificates handle SSL/TLS termination for encrypted requests."}},form:{sections:{ssl:{title:"SSL Key Pair",description:"The PEM-encoded public certificate chain and private key of the SSL key pair and the alternate."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate chain of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key:{label:"Key",tooltip:"PEM-encoded private key of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},cert_alt:{label:"Cert Alt",tooltip:"PEM-encoded public certificate chain of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key_alt:{label:"Key Alt",tooltip:"PEM-encoded private key of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New Certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",addSni:"Add to New SNI",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"Certificates could not be retrieved",delete:"The certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},"ca-certificates":{title:"CA Certificates",list:{toolbar_actions:{new_ca_certificate:"New CA Certificate"},table_headers:{issuer:"Issuer",expiry:"Expiry",tags:"Tags"},empty_state:{title:"Configure a New CA Certificate",description:"CA certificates validate client or server certificates."}},form:{sections:{cert:{title:"Public Certificate",description:"The PEM-encoded public certificate of the CA and it’s SHA256 hex digest."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate of the CA."},cert_digest:{label:"Cert Digest",tooltip:"SHA256 hex digest of the public certificate"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New CA Certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a CA Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"CA Certificates could not be retrieved",delete:"The CA Certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},general:{"key-usages":{KEY_USAGE_TYPE_KEY_CERT_SIGN:"keyCertSign",KEY_USAGE_TYPE_CRL_SIGN:"cRLSign",KEY_USAGE_TYPE_ENCIPHER_ONLY:"encipherOnly",KEY_USAGE_TYPE_DIGITAL_SIGNATURE:"digitalSignature",KEY_USAGE_TYPE_KEY_ENCIPHERMENT:"keyEncipherment",KEY_USAGE_TYPE_DATA_ENCIPHERMENT:"dataEncipherment",KEY_USAGE_TYPE_KEY_AGREEMENT:"keyAgreement",KEY_USAGE_TYPE_CONTENT_COMMITMENT:"nonRepudiation"}}};function cy(){const e=$i.createI18n("en-us",ly);return{i18n:e,i18nT:$i.i18nTComponent(e)}}const wt={useCertificate:ay,useI18n:cy,useX509:Ed},lo="/v2/control-planes/{controlPlaneId}/core-entities",co="/{workspace}",Ii={list:{konnect:`${lo}/certificates`,kongManager:`${co}/certificates`},form:{konnect:{create:`${lo}/certificates`,edit:`${lo}/certificates/{id}`,validate:`${lo}/v1/schemas/json/certificate/validate`},kongManager:{create:`${co}/certificates`,edit:`${co}/certificates/{id}`,validate:`${co}/schemas/certificates/validate`}}};var Ra=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e))(Ra||{}),cr=(e=>(e.Edit="edit",e.Create="create",e))(cr||{}),Ft=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(Ft||{}),le=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(le||{}),fe=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(fe||{});function uy(){return{getAxiosInstance:(e={})=>{try{const t=n.inject("get-axios-instance",void 0);return typeof t=="function"?t(e):ol.create({withCredentials:!0,timeout:3e4,...e})}catch(t){return console.warn("getAxiosInstance:",t.message||t),ol.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var t;return((t=e==null?void 0:e.response)==null?void 0:t.headers["x-datadog-trace-id"])||""}}}function dy(){return{debounce:(e,t)=>{let r;return(...i)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...i)},t)}}}}const Ua="khcp-user-table-preferences",fy={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnWidths:{},columnVisibility:{}};function py(){const e=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(i){console.error("useTablePreferences(tryParseJson)",i);return}},t=()=>{const r=e(localStorage.getItem(Ua));return!r||!Object.keys(r).length?new Map:new Map(Object.entries(r))};return{setTablePreferences:(r,i)=>{try{const o=t();o.set(r,i),localStorage.setItem(Ua,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:r=>{const i=t();return(i==null?void 0:i.get(r))||void 0||fy},deleteAllTablePreferences:()=>{localStorage.removeItem(Ua)}}}function La(e={}){const{getAxiosInstance:t}=uy();return{axiosInstance:t(e)}}const hy={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},yy={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},gy={actions:{viewConfiguration:"View Configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON"},errors:{edit:"The entity could not be edited at this time."}},my={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},by={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},wy={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},vy={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},ky={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Cy={utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},Sy={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},xy={global:hy,deleteModal:yy,baseForm:gy,baseTable:my,baseConfigCard:by,filter:wy,debouncedFilter:vy,errors:ky,validationErrors:Cy,toggleModal:Sy};function uo(){const e=$i.createI18n("en-us",xy);return{i18n:e,i18nT:$i.i18nTComponent(e)}}function Nd(){const e=(r,i)=>(i==null?void 0:i[r])??void 0,t=(r,i)=>{if(r.length!==i.length)return!1;const o=new Set([...r,...i]);for(const s of o){const a=r.filter(c=>c===s).length,l=i.filter(c=>c===s).length;if(a!==l)return!1}return!0};return{getPropValue:e,objectsAreEqual:(r,i,o)=>{if(o){if(Object.keys(r).length===Object.keys(i).length)for(const s in r)if(Array.isArray(r[s])&&Array.isArray(i[s])){if(t(r[s],i[s]))continue;return!1}else{if(r[s]===i[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(r)===JSON.stringify(i)}catch{return!1}},sortAlpha:r=>(i,o)=>{let s=i[r]===void 0||i[r]===null?"":i[r],a=o[r]===void 0||o[r]===null?"":o[r];return Array.isArray(i[r])&&(s=i[r][0]),Array.isArray(o[r])&&(a=o[r][0]),s.localeCompare(a)},isValidUuid:r=>r?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(r):!1}}function Ay(e,t,r,i={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="1000");const{axiosInstance:o}=La(e.axiosRequestConfig),{i18n:{t:s}}=uo(),{debounce:a}=dy(),l=a(async k=>{await I(k)},200),c=n.ref(!1),d=n.ref(""),y=n.ref(""),p=n.ref([]),E=n.ref([]),w=n.ref(void 0),h=n.unref(t);let g=`${e.apiBaseUrl}${h}`;e.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:b}=Nd(),v=async()=>{try{c.value=!0;const{data:k}=await o.get(`${g}?size=${r}`);k!=null&&k.next||(w.value=i.fetchedItemsKey in k?k[i.fetchedItemsKey]:[]),E.value=i.fetchedItemsKey in k?k[i.fetchedItemsKey]:[],p.value=E.value}catch{p.value=[],d.value=s("debouncedFilter.errors.fetch")}finally{c.value=!1}},x=n.ref(""),I=async k=>{var B,S,T;if(x.value!==k)if(x.value=k||"",w.value===void 0)try{if(c.value=!0,d.value="",y.value="",e.app==="konnect"){let O=g+"";k&&(O+=`/${k}`);const{data:N}=await o.get(`${O}?size=${r}`);i.fetchedItemsKey in N?p.value=N[i.fetchedItemsKey]:N!=null&&N.id?p.value=[N]:p.value=[]}else if(k){const O=[];b(k)&&i.searchKeys.includes("id")?O.push((async()=>{const{data:q}=await o.get(`${g}/${k}`);return[q[i.fetchedItemsKey]??q]})()):O.push(...i.searchKeys.filter(q=>q!=="id").map(async q=>{const{data:D}=await o.get(`${g}?${q}=${k}`);return D[i.fetchedItemsKey]}));const N=await Promise.all(O),re=new Set;p.value=[],(B=N==null?void 0:N.forEach)==null||B.call(N,q=>{var D;(D=q==null?void 0:q.forEach)==null||D.call(q,Q=>{re.has(Q.id)||(re.add(Q.id),p.value.push(Q))})})}else p.value=E.value}catch(O){((S=O==null?void 0:O.response)==null?void 0:S.status)===404?y.value=s("debouncedFilter.errors.invalid"):(p.value=[],d.value=s("debouncedFilter.errors.fetch"))}finally{c.value=!1}else c.value=!0,y.value="",k?(p.value=(T=w.value)==null?void 0:T.filter(O=>{var N;let re=!1;for(const q of i.searchKeys){const D=typeof O[q]=="string"?(N=O[q])==null?void 0:N.toLowerCase():O[q];D!=null&&D.includes(k.toLowerCase())&&(re=!0)}return re}),(!p.value||!p.value.length)&&(y.value=s("debouncedFilter.errors.invalid"))):p.value=w.value,c.value=!1};return{loading:c,error:d,validationError:y,results:p,allRecords:w,loadItems:v,debouncedQueryChange:l}}function By(e,t){const r=n.unref(t),i=n.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return i.value.search="",o=>`${i.value.href}/${o}`}function Iy(){const{i18n:{t:e}}=uo();return{getMessageFromError:t=>{var r,i,o,s;if(!t)return e("errors.unexpected");if(((r=t==null?void 0:t.response)==null?void 0:r.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((i=t==null?void 0:t.response)!=null&&i.data){if(t.response.data.detail)return t.response.data.detail;if((o=t.response.data.details)!=null&&o.length)return t.response.data.details.map(a=>{let l=e("errors.unexpected");return a.messages&&typeof a.messages=="object"&&a.messages.length&&(l=a.messages.join(", ")),a.field?`${a.field} - ${l}`:l}).join("; ");if(t.response.data.message){const{message:a}=t.response.data;return Array.isArray(a)?(s=a[0])!=null&&s.constraints?Object.values(a[0].constraints)[0]:a[0]:a}if(typeof t.response.data=="string")return t.response.data;if(typeof t.response.data=="object")return Object.keys(t.response.data).map(a=>`${a} ${t.response.data[a]}`).join(", ")}return t.message||e("errors.unexpected")}}}function Ey(e){const t=window.location.origin,r=t.endsWith("/")?t:`${t}/`;try{const i=e.join("/"),o=`${r}${i}`,s=e.some(a=>a.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!s&&new URL(o))return`${r}${i}`;throw new Error("Invalid url")}catch(i){return console.warn("Failed to build valid URL:",i),""}}function Od(e,t){const r=n.ref(n.unref(e)),i=n.ref(n.unref(t)),o=n.computed(()=>!!(r.value.app==="konnect"||r.value.isExactMatch)),s=n.computed(()=>i.value.startsWith("/")?new URL(`${window.location.origin}${i.value}`):new URL(i.value));return a=>{const{page:l,pageSize:c,offset:d,sortColumnKey:y,sortColumnOrder:p,query:E}=a;try{let w=new URL(s.value.href);return o.value&&E?(w.search="",w=r.value.isExactMatch?new URL(`${w.href}/${E}/`):new URL(`${w.href}?filter[name][contains]=${E}`)):(o.value||new URLSearchParams(E).forEach((h,g)=>{w.searchParams.append(g,h)}),y&&w.searchParams.append("sort_by",y),p==="desc"&&w.searchParams.append("sort_desc","1"),w.searchParams.append("size",String(c))),d&&l!==1&&w.searchParams.append("offset",String(d)),w.href}catch(w){return console.error("RouteList(fetcher)",w),i.value}}}function Ny(e,t,r="data"){const i=n.unref(t),{axiosInstance:o}=La(e.axiosRequestConfig),s=Od(e,i),a=n.ref({status:Ft.Idle});return{fetcher:async l=>{var c;try{a.value={status:Ft.Loading};let d=s(l);d.includes("filter[name]")&&(d=`${d}&page[size]=${l.pageSize}&page[number]=${l.page}`);const y=await o.get(d);if(y.status>=400)throw y;const p=y.data,E=r&&r.replace(/[^\w-_]/gi,"");let w;p[E]&&Array.isArray(p[E])?w=p[E]:Array.isArray(p)?w=p:w=Object.keys(p).length?[p]:[];const h={data:w,total:w.length,...p.offset?{pagination:{offset:p.offset}}:null};return a.value={status:Ft.Idle,response:h},h}catch(d){const y={data:[],total:0};return l.query&&(((c=d.response)==null?void 0:c.status)===404||d.status===404)?(a.value={status:Ft.NoResults,response:y,error:d.response?d:{response:d}},y):(a.value={status:Ft.Error,response:y,error:d.response?d:{response:d}},y)}},fetcherState:a}}function Oy(){const e=(r,i="_")=>r?r.split(i).map(o=>o.toLowerCase()==="id"?o.toUpperCase():o.charAt(0).toUpperCase()+o.substring(1)).join(" "):"",t=/(?:^|[\s-:'"])\w/g;return{capitalize:r=>r?r.replace(t,i=>i.toUpperCase()):"",convertKeyToTitle:e}}const _d=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Vd=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(_d);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Td=e=>e==="*"||e==="x"||e==="X",jd=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},_y=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Vy=(e,t)=>{if(Td(e)||Td(t))return 0;const[r,i]=_y(jd(e),jd(t));return r>i?1:r<i?-1:0},Dd=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const i=Vy(e[r]||"0",t[r]||"0");if(i!==0)return i}return 0},Ty=(e,t)=>{const r=Vd(e),i=Vd(t),o=r.pop(),s=i.pop(),a=Dd(r,i);return a!==0?a:o&&s?Dd(o.split("."),s.split(".")):o||s?o?-1:1:0},$d=(e,t,r)=>{jy(r);const i=Ty(e,t);return Md[r].includes(i)},Md={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Pd=Object.keys(Md),jy=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Pd.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Pd.join("|")}`)},Dy=e=>typeof e=="string"&&/^[v\d]/.test(e)&&_d.test(e);function $y(e){const{gatewayInfo:t,supportedRange:r}=e;if(!t)return!0;const{edition:i,version:o}=t;if(!Dy(o))return console.error("Invalid version"),!1;const s=r[i];if(!s)return!1;const[a,l]=s;return!(a&&$d(o,a,"<")||l&&$d(o,l,">"))}function My(e){const t=n.ref(0),r=n.ref(0),i=n.ref(!1);return n.watch(e,o=>{o&&!i.value&&(t.value=o.offsetWidth,r.value=o.scrollWidth,i.value=!0)}),{isTruncated:n.computed(()=>t.value<r.value)}}function Py(){const{i18n:{t:e}}=uo();return{utf8Name:t=>/^[\p{N}\p{L}.\-_~]*$/u.test(t)?"":e("validationErrors.utf8Name")}}const Be={useAxios:La,useDebouncedFilter:Ay,useDeleteUrlBuilder:By,useErrors:Iy,useExternalLinkCreator:Ey,useFetcher:Ny,useFetchUrlBuilder:Od,useHelpers:Nd,useStringHelpers:Oy,useI18n:uo,useGatewayFeatureSupported:$y,useTruncationDetector:My,useValidators:Py},Ry={key:0,class:"config-card-fieldset-title"},Uy=n.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const t=e,{i18n:{t:r}}=Be.useI18n(),{convertKeyToTitle:i}=Be.useStringHelpers(),o=n.computed(()=>t.item.key??"json-array-item"),s=n.computed(()=>t.item.value??t.item),a=n.computed(()=>{const c=JSON.parse(JSON.stringify(s.value));return t.isArrayItem&&delete c.name,c}),l=n.computed(()=>{var c;return t.isArrayItem?(c=s.value)!=null&&c.name?i(s.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:t.index}):""});return(c,d)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:n.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:n.withCtx(()=>[e.isArrayItem?(n.openBlock(),n.createElementBlock("legend",Ry,[n.createElementVNode("b",null,n.toDisplayString(l.value),1)])):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(a.value),(y,p)=>(n.openBlock(),n.createBlock(fo,{key:`${o.value}-property-${p}`,item:{key:y,label:n.unref(i)(y),value:a.value[y]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),ct=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},Rd=ct(Uy,[["__scopeId","data-v-68ca83ec"]]),Ly=n.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t}}=Be.useI18n();return(r,i)=>{const o=n.resolveComponent("KButton");return n.openBlock(),n.createElementBlock("div",null,[n.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:i[0]||(i[0]=s=>r.$emit("navigation-click",e.item))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.item.value||n.unref(t)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),Fy=ct(Ly,[["__scopeId","data-v-c96811e5"]]),Hy=n.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t}}=Be.useI18n();return(r,i)=>{const o=n.resolveComponent("KBadge");return n.openBlock(),n.createBlock(o,{appearance:e.status?"success":"neutral"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.status?n.unref(t)("baseConfigCard.statusBadge.enabledLabel"):n.unref(t)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),qy="#0044f4",Ky="#e0e4ea",zy="#afb7c5",Gy="1px",Wy="20px",Jy={class:"config-card-details-row"},Yy=["data-testid"],Zy=["data-testid"],Qy=["data-testid"],Xy=["data-testid"],eg={key:1},tg=["data-testid"],rg=["data-testid"],ig=["data-testid"],ng=["data-testid"],og={name:"ConfigCardItem",components:{JsonCardItem:Rd,StatusBadge:Hy,InternalLinkItem:Fy}},sg=n.defineComponent({...og,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:t}){n.useCssVars(h=>({dc1d91a8:y.value?"none":`solid ${n.unref(Gy)} ${n.unref(Ky)}`,"59ccec5f":d.value&&l.value?"block":"flex","29318fbe":d.value&&l.value?"100%":r.slim?"50%":"25%","292d0408":d.value&&l.value?"100%":r.slim?"50%":"75%"}));const r=e,i=t,o=n.useSlots(),{i18n:{t:s,formatUnixTimeStamp:a}}=Be.useI18n(),l=n.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),c=n.computed(()=>!!(r.item.tooltip||o["label-tooltip"])),d=n.computed(()=>r.item.type===le.Json||r.item.type===le.JsonArray),y=n.computed(()=>r.item.type===le.JsonArray),p=n.computed(()=>{switch(r.item.type){case le.ID:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"copy-tooltip":s("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case le.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":s("baseConfigCard.copy.tooltip",{label:r.item.label})}};case le.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":s("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case le.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":s("baseConfigCard.copy.tooltip",{label:r.item.label})}};case le.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:a(r.item.value)};case le.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case le.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case le.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case le.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:h=>{i("navigation-click",h)}}};case le.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case le.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case le.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),E=n.ref(),{isTruncated:w}=Be.useTruncationDetector(E);return(h,g)=>{const b=n.resolveComponent("KLabel"),v=n.resolveComponent("KBadge"),x=n.resolveComponent("KCopy"),I=n.resolveComponent("KTooltip");return n.openBlock(),n.createElementBlock("div",Jy,[n.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[n.renderSlot(h.$slots,"label",{item:e.item},()=>[n.createVNode(b,{"tooltip-attributes":{maxWidth:"500px"}},n.createSlots({default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.item.label)+" ",1)]),_:2},[c.value?{name:"tooltip",fn:n.withCtx(()=>[n.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[n.renderSlot(h.$slots,"label-tooltip",{},()=>[n.createTextVNode(n.toDisplayString(e.item.tooltip),1)],!0)],8,Zy)]),key:"0"}:void 0]),1024)],!0)],8,Yy),n.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[n.renderSlot(h.$slots,e.item.key,{rowValue:e.item.value},()=>[l.value?(n.openBlock(),n.createElementBlock("div",eg,[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(p.value.tag),n.normalizeProps(n.guardReactiveProps(p.value.attrs)),{default:n.withCtx(()=>[p.value.additionalComponent==="KBadge"?(n.openBlock(),n.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(k,B)=>(n.openBlock(),n.createBlock(v,{key:`${e.item.key}-badge-tag-${B}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${B}`,tooltip:k,"truncation-tooltip":""},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(k),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,tg)):n.createCommentVNode("",!0),p.value.additionalComponent==="KCopy"?(n.openBlock(),n.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(k,B)=>(n.openBlock(),n.createBlock(x,n.mergeProps({ref_for:!0},p.value.childAttrs,{key:`${e.item.key}-copy-uuid-${B}`,"data-testid":`${e.item.key}-copy-uuid-${B}`,text:k}),null,16,["data-testid","text"]))),128))],8,rg)):p.value.additionalComponent==="KMethodBadge"?(n.openBlock(),n.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(k,B)=>(n.openBlock(),n.createBlock(v,{key:`${e.item.key}-badge-method-${B}`,appearance:Object.values(n.unref(dp.BadgeMethodAppearances)).includes(k.toLowerCase())?k.toLowerCase():"custom",class:"config-badge","data-testid":`${e.item.key}-badge-method-${B}`},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(k),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,ig)):n.createCommentVNode("",!0),p.value.additionalComponent==="JsonCardItem"?(n.openBlock(),n.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(k,B)=>(n.openBlock(),n.createBlock(Rd,{key:`json-array-item-${B}`,index:B,"is-array-item":"",item:k},null,8,["index","item"]))),128))],8,ng)):(n.openBlock(),n.createBlock(I,{key:4,text:n.unref(w)?e.item.value:""},{default:n.withCtx(()=>[n.createElementVNode("span",{ref_key:"textContent",ref:E,class:n.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},n.toDisplayString(p.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(n.openBlock(),n.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,Xy))],!0)],8,Qy)])}}}),fo=ct(sg,[["__scopeId","data-v-d268261c"]]),ag={class:"json-config"},lg={key:0,class:"json-endpoint"},Ud=n.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},jsonRecord:{type:Object,required:!0},requestMethod:{type:String,required:!1,default:""}},setup(e){n.useCssVars(o=>({"4520e3ec":`${i.value}ch`}));const t=e,r=n.computed(()=>t.jsonRecord),i=n.computed(()=>{var o;if(!t.fetcherUrl)return 0;const s=(o=t.fetcherUrl)==null?void 0:o.split("/");return s.length<2?0:41+(t.requestMethod==="post"?s[s.length-1]:s[s.length-2]).length});return(o,s)=>{const a=n.resolveComponent("KBadge"),l=n.resolveComponent("KCodeBlock");return n.openBlock(),n.createElementBlock("div",ag,[t.fetcherUrl?(n.openBlock(),n.createElementBlock("div",lg,[n.createVNode(a,{appearance:t.requestMethod},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(t.requestMethod),1)]),_:1},8,["appearance"]),n.createVNode(l,{id:"json-endpoint-codeblock",code:t.fetcherUrl,language:"json","single-line":"",theme:"dark"},null,8,["code"])])):n.createCommentVNode("",!0),t.jsonRecord?(n.openBlock(),n.createBlock(l,{key:1,id:"json-codeblock",class:n.normalizeClass({"json-content":t.fetcherUrl}),code:JSON.stringify(r.value,null,2),language:"json",theme:"dark"},null,8,["class","code"])):n.createCommentVNode("",!0)])}}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Ld(e){return typeof e>"u"||e===null}function cg(e){return typeof e=="object"&&e!==null}function ug(e){return Array.isArray(e)?e:Ld(e)?[]:[e]}function dg(e,t){var r,i,o,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)o=s[r],e[o]=t[o];return e}function fg(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function pg(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var hg=Ld,yg=cg,gg=ug,mg=fg,bg=pg,wg=dg,ke={isNothing:hg,isObject:yg,toArray:gg,repeat:mg,isNegativeZero:bg,extend:wg};function Fd(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
117
|
+
`)}}Ze.CertificateTag="CERTIFICATE",Ze.CrlTag="CRL",Ze.CertificateRequestTag="CERTIFICATE REQUEST",Ze.PublicKeyTag="PUBLIC KEY",Ze.PrivateKeyTag="PRIVATE KEY";class Vt extends Ut{static isAsnEncoded(t){return P.isBufferSource(t)||typeof t=="string"}static toArrayBuffer(t){if(typeof t=="string"){if(Ze.isPem(t))return Ze.decode(t)[0];if(L.isHex(t))return L.FromHex(t);if(L.isBase64(t))return L.FromBase64(t);if(L.isBase64Url(t))return L.FromBase64Url(t);throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url")}else{const r=L.ToBinary(t);return Ze.isPem(r)?Ze.decode(r)[0]:L.isHex(r)?L.FromHex(r):L.isBase64(r)?L.FromBase64(r):L.isBase64Url(r)?L.FromBase64Url(r):P.toArrayBuffer(t)}}constructor(...t){Vt.isAsnEncoded(t[0])?super(Vt.toArrayBuffer(t[0]),t[1]):super(t[0])}toString(t="pem"){switch(t){case"pem":return Ze.encode(this.rawData,this.tag);default:return super.toString(t)}}}class lr extends Vt{constructor(t){Vt.isAsnEncoded(t)?super(t,Nt):super(t),this.tag=Ze.PublicKeyTag}async export(...t){let r,i=["verify"],o={hash:"SHA-256",...this.algorithm};return t.length>1?(o=t[0]||o,i=t[1]||i,r=t[2]||Ye.get()):r=t[0]||Ye.get(),r.subtle.importKey("spki",this.rawData,o,!0,i)}onInit(t){const r=rt.resolve(to),i=this.algorithm=r.toWebAlgorithm(t.algorithm);switch(t.algorithm.algorithm){case Tr:{const o=G.parse(t.subjectPublicKey,ta),s=P.toUint8Array(o.modulus);i.publicExponent=P.toUint8Array(o.publicExponent),i.modulusLength=(s[0]?s:s.slice(1)).byteLength<<3;break}}}async getThumbprint(...t){var r;let i,o="SHA-1";return t.length>=1&&!(!((r=t[0])===null||r===void 0)&&r.subtle)?(o=t[0]||o,i=t[1]||Ye.get()):i=t[0]||Ye.get(),await i.subtle.digest(o,this.rawData)}async getKeyIdentifier(t){t||(t=Ye.get());const r=G.parse(this.rawData,Nt);return await t.subtle.digest("SHA-1",r.subjectPublicKey)}toTextObject(){const t=this.toTextObjectEmpty(),r=G.parse(this.rawData,Nt);switch(t.Algorithm=sr.serializeAlgorithm(r.algorithm),r.algorithm.algorithm){case gi:t["EC Point"]=r.subjectPublicKey;break;case Tr:default:t["Raw Data"]=r.subjectPublicKey}return t}}class bt{static register(t,r){this.items.set(t,r)}static create(t){const r=new mt(t),i=this.items.get(r.type);return i?new i(t):r}}bt.items=new Map;const no="crypto.signatureFormatter";class oy{toAsnSignature(t,r){return P.toArrayBuffer(r)}toWebSignature(t,r){return P.toArrayBuffer(r)}}class oo extends Vt{constructor(t){Vt.isAsnEncoded(t)?super(t,vr):super(t),this.tag=Ze.CertificateTag}onInit(t){const r=t.tbsCertificate;this.tbs=G.serialize(r),this.serialNumber=L.ToHex(r.serialNumber),this.subjectName=new Lt(r.subject),this.subject=new Lt(r.subject).toString(),this.issuerName=new Lt(r.issuer),this.issuer=this.issuerName.toString();const i=rt.resolve(to);this.signatureAlgorithm=i.toWebAlgorithm(t.signatureAlgorithm),this.signature=t.signatureValue;const o=r.validity.notBefore.utcTime||r.validity.notBefore.generalTime;if(!o)throw new Error("Cannot get 'notBefore' value");this.notBefore=o;const s=r.validity.notAfter.utcTime||r.validity.notAfter.generalTime;if(!s)throw new Error("Cannot get 'notAfter' value");this.notAfter=s,this.extensions=[],r.extensions&&(this.extensions=r.extensions.map(a=>bt.create(G.serialize(a)))),this.publicKey=new lr(r.subjectPublicKeyInfo)}getExtension(t){for(const r of this.extensions)if(typeof t=="string"){if(r.type===t)return r}else if(r instanceof t)return r;return null}getExtensions(t){return this.extensions.filter(r=>typeof t=="string"?r.type===t:r instanceof t)}async verify(t={},r=Ye.get()){let i,o;const s=t.publicKey;try{if(!s)i={...this.publicKey.algorithm,...this.signatureAlgorithm},o=await this.publicKey.export(i,["verify"],r);else if("publicKey"in s)i={...s.publicKey.algorithm,...this.signatureAlgorithm},o=await s.publicKey.export(i,["verify"],r);else if(s instanceof lr)i={...s.algorithm,...this.signatureAlgorithm},o=await s.export(i,["verify"],r);else if(P.isBufferSource(s)){const d=new lr(s);i={...d.algorithm,...this.signatureAlgorithm},o=await d.export(i,["verify"],r)}else i={...s.algorithm,...this.signatureAlgorithm},o=s}catch{return!1}const a=rt.resolveAll(no).reverse();let l=null;for(const d of a)if(l=d.toWebSignature(i,this.signature),l)break;if(!l)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");const c=await r.subtle.verify(this.signatureAlgorithm,o,l,this.tbs);if(t.signatureOnly)return c;{const y=(t.date||new Date).getTime();return c&&this.notBefore.getTime()<y&&y<this.notAfter.getTime()}}async getThumbprint(...t){let r,i="SHA-1";return t[0]&&(t[0].subtle?r=t[0]:(i=t[0]||i,r=t[1])),r??(r=Ye.get()),await r.subtle.digest(i,this.rawData)}async isSelfSigned(t=Ye.get()){return this.subject===this.issuer&&await this.verify({signatureOnly:!0},t)}toTextObject(){const t=this.toTextObjectEmpty(),r=G.parse(this.rawData,vr),i=r.tbsCertificate,o=new ue("",{Version:`${wr[i.version]} (${i.version})`,"Serial Number":i.serialNumber,"Signature Algorithm":sr.serializeAlgorithm(i.signature),Issuer:this.issuer,Validity:new ue("",{"Not Before":i.validity.notBefore.getTime(),"Not After":i.validity.notAfter.getTime()}),Subject:this.subject,"Subject Public Key Info":this.publicKey});if(i.issuerUniqueID&&(o["Issuer Unique ID"]=i.issuerUniqueID),i.subjectUniqueID&&(o["Subject Unique ID"]=i.subjectUniqueID),this.extensions.length){const s=new ue("");for(const a of this.extensions){const l=a.toTextObject();s[l[ue.NAME]]=l}o.Extensions=s}return t.Data=o,t.Signature=new ue("",{Algorithm:sr.serializeAlgorithm(r.signatureAlgorithm),"":r.signatureValue}),t}}oo.NAME="Certificate";class Bi extends mt{static async create(t,r=!1,i=Ye.get()){if(t instanceof oo||ar.isCryptoKey(t)){const o=t instanceof oo?await t.publicKey.export(i):t,s=await i.subtle.exportKey("spki",o),l=await new lr(s).getKeyIdentifier(i);return new Bi(L.ToHex(l),r)}else return new Bi(t,r)}constructor(...t){if(P.isBufferSource(t[0]))super(t[0]);else if(typeof t[0]=="string"){const r=new Xt({keyIdentifier:new Yo(L.FromHex(t[0]))});super(Jo,t[1],G.serialize(r))}else{const r=t[0],i=r.name instanceof Si?G.parse(r.name.rawData,Pe):r.name,o=new Xt({authorityCertIssuer:i,authorityCertSerialNumber:L.FromHex(r.serialNumber)});super(Jo,t[1],G.serialize(o))}}onInit(t){super.onInit(t);const r=G.parse(t.extnValue,Xt);r.keyIdentifier&&(this.keyId=L.ToHex(r.keyIdentifier)),r.authorityCertIssuer&&r.authorityCertSerialNumber&&(this.certId={name:r.authorityCertIssuer,serialNumber:L.ToHex(r.authorityCertSerialNumber)})}toTextObject(){const t=this.toTextObjectWithoutValue(),r=G.parse(this.value,Xt);return r.authorityCertIssuer&&(t["Authority Issuer"]=new Si(r.authorityCertIssuer).toTextObject()),r.authorityCertSerialNumber&&(t["Authority Serial Number"]=r.authorityCertSerialNumber),r.keyIdentifier&&(t[""]=r.keyIdentifier),t}}Bi.NAME="Authority Key Identifier";class bd extends mt{constructor(...t){if(P.isBufferSource(t[0])){super(t[0]);const r=G.parse(this.value,on);this.ca=r.cA,this.pathLength=r.pathLenConstraint}else{const r=new on({cA:t[0],pathLenConstraint:t[1]});super(wc,t[2],G.serialize(r)),this.ca=t[0],this.pathLength=t[1]}}toTextObject(){const t=this.toTextObjectWithoutValue();return this.ca&&(t.CA=this.ca),this.pathLength!==void 0&&(t["Path Length"]=this.pathLength),t}}bd.NAME="Basic Constraints";var wd;(function(e){e.serverAuth="1.3.6.1.5.5.7.3.1",e.clientAuth="1.3.6.1.5.5.7.3.2",e.codeSigning="1.3.6.1.5.5.7.3.3",e.emailProtection="1.3.6.1.5.5.7.3.4",e.timeStamping="1.3.6.1.5.5.7.3.8",e.ocspSigning="1.3.6.1.5.5.7.3.9"})(wd||(wd={}));class vd extends mt{constructor(...t){if(P.isBufferSource(t[0])){super(t[0]);const r=G.parse(this.value,un);this.usages=r.map(i=>i)}else{const r=new un(t[0]);super(Ac,t[1],G.serialize(r)),this.usages=t[0]}}toTextObject(){const t=this.toTextObjectWithoutValue();return t[""]=this.usages.map(r=>Rt.toString(r)).join(", "),t}}vd.NAME="Extended Key Usages";var Ta;(function(e){e[e.digitalSignature=1]="digitalSignature",e[e.nonRepudiation=2]="nonRepudiation",e[e.keyEncipherment=4]="keyEncipherment",e[e.dataEncipherment=8]="dataEncipherment",e[e.keyAgreement=16]="keyAgreement",e[e.keyCertSign=32]="keyCertSign",e[e.cRLSign=64]="cRLSign",e[e.encipherOnly=128]="encipherOnly",e[e.decipherOnly=256]="decipherOnly"})(Ta||(Ta={}));class ja extends mt{constructor(...t){if(P.isBufferSource(t[0])){super(t[0]);const r=G.parse(this.value,ds);this.usages=r.toNumber()}else{const r=new ds(t[0]);super(Ic,t[1],G.serialize(r)),this.usages=t[0]}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=G.parse(this.value,ds);return t[""]=r.toJSON().join(", "),t}}ja.NAME="Key Usages";class so extends mt{static async create(t,r=!1,i=Ye.get()){let o;t instanceof lr?o=t.rawData:"publicKey"in t?o=t.publicKey.rawData:P.isBufferSource(t)?o=t:o=await i.subtle.exportKey("spki",t);const a=await new lr(o).getKeyIdentifier(i);return new so(L.ToHex(a),r)}constructor(...t){if(P.isBufferSource(t[0])){super(t[0]);const r=G.parse(this.value,Mt);this.keyId=L.ToHex(r)}else{const r=typeof t[0]=="string"?L.FromHex(t[0]):t[0],i=new Mt(r);super(Tc,t[1],G.serialize(i)),this.keyId=L.ToHex(r)}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=G.parse(this.value,Mt);return t[""]=r,t}}so.NAME="Subject Key Identifier";class Da extends mt{constructor(...t){P.isBufferSource(t[0])?super(t[0]):super(_c,t[1],new Si(t[0]||[]).rawData)}onInit(t){super.onInit(t);const r=G.parse(t.extnValue,gs);this.names=new Si(r)}toTextObject(){const t=this.toTextObjectWithoutValue(),r=this.names.toTextObject();for(const i in r)t[i]=r[i];return t}}Da.NAME="Subject Alternative Name";class kd extends mt{constructor(...t){var r;if(P.isBufferSource(t[0])){super(t[0]);const i=G.parse(this.value,ln);this.policies=i.map(o=>o.policyIdentifier)}else{const i=t[0],o=(r=t[1])!==null&&r!==void 0?r:!1,s=new ln(i.map(a=>new an({policyIdentifier:a})));super(kc,o,G.serialize(s)),this.policies=i}}toTextObject(){const t=this.toTextObjectWithoutValue();return t.Policy=this.policies.map(r=>new ue("",{},Rt.toString(r))),t}}kd.NAME="Certificate Policies",bt.register(kc,kd);class Mr extends Ut{constructor(...t){let r;if(P.isBufferSource(t[0]))r=P.toArrayBuffer(t[0]);else{const i=t[0],o=Array.isArray(t[1])?t[1].map(s=>P.toArrayBuffer(s)):[];r=G.serialize(new Et({type:i,values:o}))}super(r,Et)}onInit(t){this.type=t.type,this.values=t.values}toTextObject(){const t=this.toTextObjectWithoutValue();return t.Value=this.values.map(r=>new ue("",{"":r})),t}toTextObjectWithoutValue(){const t=this.toTextObjectEmpty();return t[ue.NAME]===Mr.NAME&&(t[ue.NAME]=Rt.toString(this.type)),t}}Mr.NAME="Attribute";class Cd extends Mr{constructor(...t){var r;if(P.isBufferSource(t[0]))super(t[0]);else{const i=new Qn({printableString:t[0]});super(wu,[G.serialize(i)])}(r=this.password)!==null&&r!==void 0||(this.password="")}onInit(t){if(super.onInit(t),this.values[0]){const r=G.parse(this.values[0],Qn);this.password=r.toString()}}toTextObject(){const t=this.toTextObjectWithoutValue();return t[ue.VALUE]=this.password,t}}Cd.NAME="Challenge Password";class $a extends Mr{constructor(...t){var r;if(P.isBufferSource(t[0]))super(t[0]);else{const i=t[0],o=new er;for(const s of i)o.push(G.parse(s.rawData,at));super(ma,[G.serialize(o)])}(r=this.items)!==null&&r!==void 0||(this.items=[])}onInit(t){if(super.onInit(t),this.values[0]){const r=G.parse(this.values[0],er);this.items=r.map(i=>bt.create(G.serialize(i)))}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=this.items.map(i=>i.toTextObject());for(const i of r)t[i[ue.NAME]]=i;return t}}$a.NAME="Extensions";class ao{static register(t,r){this.items.set(t,r)}static create(t){const r=new Mr(t),i=this.items.get(r.type);return i?new i(t):r}}ao.items=new Map;let Ma=class{toAsnAlgorithm(t){switch(t.name.toLowerCase()){case"rsassa-pkcs1-v1_5":if("hash"in t){let r;if(typeof t.hash=="string")r=t.hash;else if(t.hash&&typeof t.hash=="object"&&"name"in t.hash&&typeof t.hash.name=="string")r=t.hash.name.toUpperCase();else throw new Error("Cannot get hash algorithm name");switch(r.toLowerCase()){case"sha-1":return new H({algorithm:$n,parameters:null});case"sha-256":return new H({algorithm:Zs,parameters:null});case"sha-384":return new H({algorithm:Mn,parameters:null});case"sha-512":return new H({algorithm:Pn,parameters:null})}}else return new H({algorithm:Tr,parameters:null})}return null}toWebAlgorithm(t){switch(t.algorithm){case Tr:return{name:"RSASSA-PKCS1-v1_5"};case $n:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case Zs:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case Mn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case Pn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}}}return null}};Ma=u([aa()],Ma),rt.registerSingleton(eo,Ma);class it{addPadding(t,r){const i=P.toUint8Array(r),o=new Uint8Array(t);return o.set(i,t-i.length),o}removePadding(t,r=!1){let i=P.toUint8Array(t);for(let o=0;o<i.length;o++)if(i[o]){i=i.slice(o);break}if(r&&i[0]>127){const o=new Uint8Array(i.length+1);return o.set(i,1),o.buffer}return i.buffer}toAsnSignature(t,r){if(t.name==="ECDSA"){const i=t.namedCurve,o=it.namedCurveSize.get(i)||it.defaultNamedCurveSize,s=new Dn,a=P.toUint8Array(r);return s.r=this.removePadding(a.slice(0,o),!0),s.s=this.removePadding(a.slice(o,o+o),!0),G.serialize(s)}return null}toWebSignature(t,r){if(t.name==="ECDSA"){const i=G.parse(r,Dn),o=t.namedCurve,s=it.namedCurveSize.get(o)||it.defaultNamedCurveSize,a=this.addPadding(s,this.removePadding(i.r)),l=this.addPadding(s,this.removePadding(i.s));return kp(a,l)}return null}}it.namedCurveSize=new Map,it.defaultNamedCurveSize=32;const Sd="1.3.101.110",xd="1.3.101.111",Ad="1.3.101.112",Bd="1.3.101.113";let Pa=class{toAsnAlgorithm(t){let r=null;switch(t.name.toLowerCase()){case"eddsa":switch(t.namedCurve.toLowerCase()){case"ed25519":r=Ad;break;case"ed448":r=Bd;break}break;case"ecdh-es":switch(t.namedCurve.toLowerCase()){case"x25519":r=Sd;break;case"x448":r=xd;break}}return r?new H({algorithm:r}):null}toWebAlgorithm(t){switch(t.algorithm){case Ad:return{name:"EdDSA",namedCurve:"Ed25519"};case Bd:return{name:"EdDSA",namedCurve:"Ed448"};case Sd:return{name:"ECDH-ES",namedCurve:"X25519"};case xd:return{name:"ECDH-ES",namedCurve:"X448"}}return null}};Pa=u([aa()],Pa),rt.registerSingleton(eo,Pa);class sy extends Vt{constructor(t){Vt.isAsnEncoded(t)?super(t,ki):super(t),this.tag=Ze.CertificateRequestTag}onInit(t){this.tbs=G.serialize(t.certificationRequestInfo),this.publicKey=new lr(t.certificationRequestInfo.subjectPKInfo);const r=rt.resolve(to);this.signatureAlgorithm=r.toWebAlgorithm(t.signatureAlgorithm),this.signature=t.signature,this.attributes=t.certificationRequestInfo.attributes.map(o=>ao.create(G.serialize(o)));const i=this.getAttribute(ma);this.extensions=[],i instanceof $a&&(this.extensions=i.items),this.subjectName=new Lt(t.certificationRequestInfo.subject),this.subject=this.subjectName.toString()}getAttribute(t){for(const r of this.attributes)if(r.type===t)return r;return null}getAttributes(t){return this.attributes.filter(r=>r.type===t)}getExtension(t){for(const r of this.extensions)if(r.type===t)return r;return null}getExtensions(t){return this.extensions.filter(r=>r.type===t)}async verify(t=Ye.get()){const r={...this.publicKey.algorithm,...this.signatureAlgorithm},i=await this.publicKey.export(r,["verify"],t),o=rt.resolveAll(no).reverse();let s=null;for(const l of o)if(s=l.toWebSignature(r,this.signature),s)break;if(!s)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return await t.subtle.verify(this.signatureAlgorithm,i,s,this.tbs)}toTextObject(){const t=this.toTextObjectEmpty(),r=G.parse(this.rawData,ki),i=r.certificationRequestInfo,o=new ue("",{Version:`${wr[i.version]} (${i.version})`,Subject:this.subject,"Subject Public Key Info":this.publicKey});if(this.attributes.length){const s=new ue("");for(const a of this.attributes){const l=a.toTextObject();s[l[ue.NAME]]=l}o.Attributes=s}return t.Data=o,t.Signature=new ue("",{Algorithm:sr.serializeAlgorithm(r.signatureAlgorithm),"":r.signature}),t}}sy.NAME="PKCS#10 Certificate Request";var Id;(function(e){e[e.unspecified=0]="unspecified",e[e.keyCompromise=1]="keyCompromise",e[e.cACompromise=2]="cACompromise",e[e.affiliationChanged=3]="affiliationChanged",e[e.superseded=4]="superseded",e[e.cessationOfOperation=5]="cessationOfOperation",e[e.certificateHold=6]="certificateHold",e[e.removeFromCRL=8]="removeFromCRL",e[e.privilegeWithdrawn=9]="privilegeWithdrawn",e[e.aACompromise=10]="aACompromise"})(Id||(Id={})),bt.register(wc,bd),bt.register(Ac,vd),bt.register(Ic,ja),bt.register(Tc,so),bt.register(Jo,Bi),bt.register(_c,Da),ao.register(wu,Cd),ao.register(ma,$a),rt.registerSingleton(no,oy),rt.registerSingleton(no,it),it.namedCurveSize.set("P-256",32),it.namedCurveSize.set("K-256",32),it.namedCurveSize.set("P-384",48),it.namedCurveSize.set("P-521",66);function Ed(){return{parseMetaCertificateData:t=>{if(/{vault:\/\/.*}/g.test(t))throw new Error("not a X.509 certificate");const r=new oo(t),i={subject:r.subjectName.toString(),issuer:r.issuer,notAfter:r.notAfter};for(const o of r.extensions)if(o instanceof Da){const s=o.names.toJSON(),l=Object.entries(s).map(c=>({type:c[1].type,value:c[1].value})).reduce((c,d)=>{const y=d.type,p=c[y]??[];return{...c,[y]:[...p,d.value]}},{});for(const c in l)i.subjectAltName=`${c}=${l[c].join(", ")}`}else if(o instanceof ja){const s=Object.values(Ta),a=Array(s.length/2).fill(null).reduce((l,c,d)=>{const y=s[s.length/2+d];if(o.usages&y){const p=s[d];l.push(p)}return l},[]);i.keyUsage=a}return i}}}function ay(){const e=Ed(),t=n.ref({}),r=o=>{if(!(o.id in t.value))try{t.value[o.id]=e.parseMetaCertificateData(o.cert)}catch{t.value[o.id]=void 0}return t.value[o.id]};return{certificateDataCache:t,getCertificateData:o=>{const s=r(o);return{schemaIssuer:(s==null?void 0:s.issuer)||"",schemaSubject:(s==null?void 0:s.subject)||"",schemaExpiry:(s==null?void 0:s.notAfter)instanceof Date?s.notAfter.getTime()/1e3:0,schemaSanNames:(s==null?void 0:s.subjectAltName)||"",schemaKeyUsages:(s==null?void 0:s.keyUsage)||[]}}}}const ly={certificates:{title:"Certificates",list:{toolbar_actions:{new_certificate:"New Certificate"},table_headers:{subject:"Subject",expiry:"Expiry",san:"SAN",cert:"Cert",tags:"Tags",issuer:"Issuer",snis:"SNIs"},empty_state:{title:"Configure a New Certificate",description:"Certificates handle SSL/TLS termination for encrypted requests."}},form:{sections:{ssl:{title:"SSL Key Pair",description:"The PEM-encoded public certificate chain and private key of the SSL key pair and the alternate."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate chain of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key:{label:"Key",tooltip:"PEM-encoded private key of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},cert_alt:{label:"Cert Alt",tooltip:"PEM-encoded public certificate chain of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key_alt:{label:"Key Alt",tooltip:"PEM-encoded private key of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New Certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",addSni:"Add to New SNI",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"Certificates could not be retrieved",delete:"The certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},"ca-certificates":{title:"CA Certificates",list:{toolbar_actions:{new_ca_certificate:"New CA Certificate"},table_headers:{issuer:"Issuer",expiry:"Expiry",tags:"Tags"},empty_state:{title:"Configure a New CA Certificate",description:"CA certificates validate client or server certificates."}},form:{sections:{cert:{title:"Public Certificate",description:"The PEM-encoded public certificate of the CA and it’s SHA256 hex digest."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate of the CA."},cert_digest:{label:"Cert Digest",tooltip:"SHA256 hex digest of the public certificate"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New CA Certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a CA Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"CA Certificates could not be retrieved",delete:"The CA Certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},general:{"key-usages":{KEY_USAGE_TYPE_KEY_CERT_SIGN:"keyCertSign",KEY_USAGE_TYPE_CRL_SIGN:"cRLSign",KEY_USAGE_TYPE_ENCIPHER_ONLY:"encipherOnly",KEY_USAGE_TYPE_DIGITAL_SIGNATURE:"digitalSignature",KEY_USAGE_TYPE_KEY_ENCIPHERMENT:"keyEncipherment",KEY_USAGE_TYPE_DATA_ENCIPHERMENT:"dataEncipherment",KEY_USAGE_TYPE_KEY_AGREEMENT:"keyAgreement",KEY_USAGE_TYPE_CONTENT_COMMITMENT:"nonRepudiation"}}};function cy(){const e=$i.createI18n("en-us",ly);return{i18n:e,i18nT:$i.i18nTComponent(e)}}const wt={useCertificate:ay,useI18n:cy,useX509:Ed},lo="/v2/control-planes/{controlPlaneId}/core-entities",co="/{workspace}",Ii={list:{konnect:`${lo}/certificates`,kongManager:`${co}/certificates`},form:{konnect:{create:`${lo}/certificates`,edit:`${lo}/certificates/{id}`,validate:`${lo}/v1/schemas/json/certificate/validate`},kongManager:{create:`${co}/certificates`,edit:`${co}/certificates/{id}`,validate:`${co}/schemas/certificates/validate`}}};var Ra=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e))(Ra||{}),cr=(e=>(e.Edit="edit",e.Create="create",e))(cr||{}),Ft=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(Ft||{}),le=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(le||{}),fe=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(fe||{});function uy(){return{getAxiosInstance:(e={})=>{try{const t=n.inject("get-axios-instance",void 0);return typeof t=="function"?t(e):ol.create({withCredentials:!0,timeout:3e4,...e})}catch(t){return console.warn("getAxiosInstance:",t.message||t),ol.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var t;return((t=e==null?void 0:e.response)==null?void 0:t.headers["x-datadog-trace-id"])||""}}}function dy(){return{debounce:(e,t)=>{let r;return(...i)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...i)},t)}}}}const Ua="khcp-user-table-preferences",fy={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnWidths:{},columnVisibility:{}};function py(){const e=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(i){console.error("useTablePreferences(tryParseJson)",i);return}},t=()=>{const r=e(localStorage.getItem(Ua));return!r||!Object.keys(r).length?new Map:new Map(Object.entries(r))};return{setTablePreferences:(r,i)=>{try{const o=t();o.set(r,i),localStorage.setItem(Ua,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:r=>{const i=t();return(i==null?void 0:i.get(r))||void 0||fy},deleteAllTablePreferences:()=>{localStorage.removeItem(Ua)}}}function La(e={}){const{getAxiosInstance:t}=uy();return{axiosInstance:t(e)}}const hy={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},yy={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},gy={actions:{viewConfiguration:"View Configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON"},errors:{edit:"The entity could not be edited at this time."}},my={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},by={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},wy={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},vy={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},ky={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Cy={utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},Sy={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},xy={global:hy,deleteModal:yy,baseForm:gy,baseTable:my,baseConfigCard:by,filter:wy,debouncedFilter:vy,errors:ky,validationErrors:Cy,toggleModal:Sy};function uo(){const e=$i.createI18n("en-us",xy);return{i18n:e,i18nT:$i.i18nTComponent(e)}}function Nd(){const e=(r,i)=>(i==null?void 0:i[r])??void 0,t=(r,i)=>{if(r.length!==i.length)return!1;const o=new Set([...r,...i]);for(const s of o){const a=r.filter(c=>c===s).length,l=i.filter(c=>c===s).length;if(a!==l)return!1}return!0};return{getPropValue:e,objectsAreEqual:(r,i,o)=>{if(o){if(Object.keys(r).length===Object.keys(i).length)for(const s in r)if(Array.isArray(r[s])&&Array.isArray(i[s])){if(t(r[s],i[s]))continue;return!1}else{if(r[s]===i[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(r)===JSON.stringify(i)}catch{return!1}},sortAlpha:r=>(i,o)=>{let s=i[r]===void 0||i[r]===null?"":i[r],a=o[r]===void 0||o[r]===null?"":o[r];return Array.isArray(i[r])&&(s=i[r][0]),Array.isArray(o[r])&&(a=o[r][0]),s.localeCompare(a)},isValidUuid:r=>r?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(r):!1}}function Ay(e,t,r,i={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="1000");const{axiosInstance:o}=La(e.axiosRequestConfig),{i18n:{t:s}}=uo(),{debounce:a}=dy(),l=a(async k=>{await I(k)},200),c=n.ref(!1),d=n.ref(""),y=n.ref(""),p=n.ref([]),E=n.ref([]),w=n.ref(void 0),h=n.unref(t);let g=`${e.apiBaseUrl}${h}`;e.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:b}=Nd(),v=async()=>{try{c.value=!0;const{data:k}=await o.get(`${g}?size=${r}`);k!=null&&k.next||(w.value=i.fetchedItemsKey in k?k[i.fetchedItemsKey]:[]),E.value=i.fetchedItemsKey in k?k[i.fetchedItemsKey]:[],p.value=E.value}catch{p.value=[],d.value=s("debouncedFilter.errors.fetch")}finally{c.value=!1}},x=n.ref(""),I=async k=>{var B,S,T;if(x.value!==k)if(x.value=k||"",w.value===void 0)try{if(c.value=!0,d.value="",y.value="",e.app==="konnect"){let O=g+"";k&&(O+=`/${k}`);const{data:N}=await o.get(`${O}?size=${r}`);i.fetchedItemsKey in N?p.value=N[i.fetchedItemsKey]:N!=null&&N.id?p.value=[N]:p.value=[]}else if(k){const O=[];b(k)&&i.searchKeys.includes("id")?O.push((async()=>{const{data:q}=await o.get(`${g}/${k}`);return[q[i.fetchedItemsKey]??q]})()):O.push(...i.searchKeys.filter(q=>q!=="id").map(async q=>{const{data:D}=await o.get(`${g}?${q}=${k}`);return D[i.fetchedItemsKey]}));const N=await Promise.all(O),re=new Set;p.value=[],(B=N==null?void 0:N.forEach)==null||B.call(N,q=>{var D;(D=q==null?void 0:q.forEach)==null||D.call(q,Q=>{re.has(Q.id)||(re.add(Q.id),p.value.push(Q))})})}else p.value=E.value}catch(O){((S=O==null?void 0:O.response)==null?void 0:S.status)===404?y.value=s("debouncedFilter.errors.invalid"):(p.value=[],d.value=s("debouncedFilter.errors.fetch"))}finally{c.value=!1}else c.value=!0,y.value="",k?(p.value=(T=w.value)==null?void 0:T.filter(O=>{var N;let re=!1;for(const q of i.searchKeys){const D=typeof O[q]=="string"?(N=O[q])==null?void 0:N.toLowerCase():O[q];D!=null&&D.includes(k.toLowerCase())&&(re=!0)}return re}),(!p.value||!p.value.length)&&(y.value=s("debouncedFilter.errors.invalid"))):p.value=w.value,c.value=!1};return{loading:c,error:d,validationError:y,results:p,allRecords:w,loadItems:v,debouncedQueryChange:l}}function By(e,t){const r=n.unref(t),i=n.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return i.value.search="",o=>`${i.value.href}/${o}`}function Iy(){const{i18n:{t:e}}=uo();return{getMessageFromError:t=>{var r,i,o,s;if(!t)return e("errors.unexpected");if(((r=t==null?void 0:t.response)==null?void 0:r.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((i=t==null?void 0:t.response)!=null&&i.data){if(t.response.data.detail)return t.response.data.detail;if((o=t.response.data.details)!=null&&o.length)return t.response.data.details.map(a=>{let l=e("errors.unexpected");return a.messages&&typeof a.messages=="object"&&a.messages.length&&(l=a.messages.join(", ")),a.field?`${a.field} - ${l}`:l}).join("; ");if(t.response.data.message){const{message:a}=t.response.data;return Array.isArray(a)?(s=a[0])!=null&&s.constraints?Object.values(a[0].constraints)[0]:a[0]:a}if(typeof t.response.data=="string")return t.response.data;if(typeof t.response.data=="object")return Object.keys(t.response.data).map(a=>`${a} ${t.response.data[a]}`).join(", ")}return t.message||e("errors.unexpected")}}}function Ey(e){const t=window.location.origin,r=t.endsWith("/")?t:`${t}/`;try{const i=e.join("/"),o=`${r}${i}`,s=e.some(a=>a.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!s&&new URL(o))return`${r}${i}`;throw new Error("Invalid url")}catch(i){return console.warn("Failed to build valid URL:",i),""}}function Od(e,t){const r=n.ref(n.unref(e)),i=n.ref(n.unref(t)),o=n.computed(()=>!!(r.value.app==="konnect"||r.value.isExactMatch)),s=n.computed(()=>i.value.startsWith("/")?new URL(`${window.location.origin}${i.value}`):new URL(i.value));return a=>{const{page:l,pageSize:c,offset:d,sortColumnKey:y,sortColumnOrder:p,query:E}=a;try{let w=new URL(s.value.href);return o.value&&E?(w.search="",w=r.value.isExactMatch?new URL(`${w.href}/${E}/`):new URL(`${w.href}?filter[name][contains]=${E}`)):(o.value||new URLSearchParams(E).forEach((h,g)=>{w.searchParams.append(g,h)}),y&&w.searchParams.append("sort_by",y),p==="desc"&&w.searchParams.append("sort_desc","1"),w.searchParams.append("size",String(c))),d&&l!==1&&w.searchParams.append("offset",String(d)),w.href}catch(w){return console.error("RouteList(fetcher)",w),i.value}}}function Ny(e,t,r="data"){const i=n.unref(t),{axiosInstance:o}=La(e.axiosRequestConfig),s=Od(e,i),a=n.ref({status:Ft.Idle});return{fetcher:async l=>{var c;try{a.value={status:Ft.Loading};let d=s(l);d.includes("filter[name]")&&(d=`${d}&page[size]=${l.pageSize}&page[number]=${l.page}`);const y=await o.get(d);if(y.status>=400)throw y;const p=y.data,E=r&&r.replace(/[^\w-_]/gi,"");let w;p[E]&&Array.isArray(p[E])?w=p[E]:Array.isArray(p)?w=p:w=Object.keys(p).length?[p]:[];const h={data:w,total:w.length,...p.offset?{pagination:{offset:p.offset}}:null};return a.value={status:Ft.Idle,response:h},h}catch(d){const y={data:[],total:0};return l.query&&(((c=d.response)==null?void 0:c.status)===404||d.status===404)?(a.value={status:Ft.NoResults,response:y,error:d.response?d:{response:d}},y):(a.value={status:Ft.Error,response:y,error:d.response?d:{response:d}},y)}},fetcherState:a}}function Oy(){const e=(r,i="_")=>r?r.split(i).map(o=>o.toLowerCase()==="id"?o.toUpperCase():o.charAt(0).toUpperCase()+o.substring(1)).join(" "):"",t=/(?:^|[\s-:'"])\w/g;return{capitalize:r=>r?r.replace(t,i=>i.toUpperCase()):"",convertKeyToTitle:e}}const _d=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Vd=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(_d);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Td=e=>e==="*"||e==="x"||e==="X",jd=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},_y=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Vy=(e,t)=>{if(Td(e)||Td(t))return 0;const[r,i]=_y(jd(e),jd(t));return r>i?1:r<i?-1:0},Dd=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const i=Vy(e[r]||"0",t[r]||"0");if(i!==0)return i}return 0},Ty=(e,t)=>{const r=Vd(e),i=Vd(t),o=r.pop(),s=i.pop(),a=Dd(r,i);return a!==0?a:o&&s?Dd(o.split("."),s.split(".")):o||s?o?-1:1:0},$d=(e,t,r)=>{jy(r);const i=Ty(e,t);return Md[r].includes(i)},Md={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Pd=Object.keys(Md),jy=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Pd.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Pd.join("|")}`)},Dy=e=>typeof e=="string"&&/^[v\d]/.test(e)&&_d.test(e);function $y(e){const{gatewayInfo:t,supportedRange:r}=e;if(!t)return!0;const{edition:i,version:o}=t;if(!Dy(o))return console.error("Invalid version"),!1;const s=r[i];if(!s)return!1;const[a,l]=s;return!(a&&$d(o,a,"<")||l&&$d(o,l,">"))}function My(e){const t=n.ref(0),r=n.ref(0),i=n.ref(!1);return n.watch(e,o=>{o&&!i.value&&(t.value=o.offsetWidth,r.value=o.scrollWidth,i.value=!0)}),{isTruncated:n.computed(()=>t.value<r.value)}}function Py(){const{i18n:{t:e}}=uo();return{utf8Name:t=>/^[\p{N}\p{L}.\-_~]*$/u.test(t)?"":e("validationErrors.utf8Name")}}const Be={useAxios:La,useDebouncedFilter:Ay,useDeleteUrlBuilder:By,useErrors:Iy,useExternalLinkCreator:Ey,useFetcher:Ny,useFetchUrlBuilder:Od,useHelpers:Nd,useStringHelpers:Oy,useI18n:uo,useGatewayFeatureSupported:$y,useTruncationDetector:My,useValidators:Py},Ry={key:0,class:"config-card-fieldset-title"},Uy=n.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const t=e,{i18n:{t:r}}=Be.useI18n(),{convertKeyToTitle:i}=Be.useStringHelpers(),o=n.computed(()=>t.item.key??"json-array-item"),s=n.computed(()=>t.item.value??t.item),a=n.computed(()=>{const c=JSON.parse(JSON.stringify(s.value));return t.isArrayItem&&delete c.name,c}),l=n.computed(()=>{var c;return t.isArrayItem?(c=s.value)!=null&&c.name?i(s.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:t.index}):""});return(c,d)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:n.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:n.withCtx(()=>[e.isArrayItem?(n.openBlock(),n.createElementBlock("legend",Ry,[n.createElementVNode("b",null,n.toDisplayString(l.value),1)])):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(a.value),(y,p)=>(n.openBlock(),n.createBlock(fo,{key:`${o.value}-property-${p}`,item:{key:y,label:n.unref(i)(y),value:a.value[y]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),ct=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},Rd=ct(Uy,[["__scopeId","data-v-68ca83ec"]]),Ly=n.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t}}=Be.useI18n();return(r,i)=>{const o=n.resolveComponent("KButton");return n.openBlock(),n.createElementBlock("div",null,[n.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:i[0]||(i[0]=s=>r.$emit("navigation-click",e.item))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.item.value||n.unref(t)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),Fy=ct(Ly,[["__scopeId","data-v-c96811e5"]]),Hy=n.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t}}=Be.useI18n();return(r,i)=>{const o=n.resolveComponent("KBadge");return n.openBlock(),n.createBlock(o,{appearance:e.status?"success":"neutral"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.status?n.unref(t)("baseConfigCard.statusBadge.enabledLabel"):n.unref(t)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),qy="#0044f4",Ky="#e0e4ea",zy="#afb7c5",Gy="1px",Wy="20px",Jy={class:"config-card-details-row"},Yy=["data-testid"],Zy=["data-testid"],Qy=["data-testid"],Xy=["data-testid"],eg={key:1},tg=["data-testid"],rg=["data-testid"],ig=["data-testid"],ng=["data-testid"],og={name:"ConfigCardItem",components:{JsonCardItem:Rd,StatusBadge:Hy,InternalLinkItem:Fy}},sg=n.defineComponent({...og,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:t}){n.useCssVars(h=>({dc1d91a8:y.value?"none":`solid ${n.unref(Gy)} ${n.unref(Ky)}`,"59ccec5f":d.value&&l.value?"block":"flex","29318fbe":d.value&&l.value?"100%":r.slim?"50%":"25%","292d0408":d.value&&l.value?"100%":r.slim?"50%":"75%"}));const r=e,i=t,o=n.useSlots(),{i18n:{t:s,formatUnixTimeStamp:a}}=Be.useI18n(),l=n.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),c=n.computed(()=>!!(r.item.tooltip||o["label-tooltip"])),d=n.computed(()=>r.item.type===le.Json||r.item.type===le.JsonArray),y=n.computed(()=>r.item.type===le.JsonArray),p=n.computed(()=>{switch(r.item.type){case le.ID:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"copy-tooltip":s("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case le.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":s("baseConfigCard.copy.tooltip",{label:r.item.label})}};case le.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":s("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case le.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":s("baseConfigCard.copy.tooltip",{label:r.item.label})}};case le.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:a(r.item.value)};case le.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case le.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case le.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case le.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:h=>{i("navigation-click",h)}}};case le.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case le.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case le.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),E=n.ref(),{isTruncated:w}=Be.useTruncationDetector(E);return(h,g)=>{const b=n.resolveComponent("KLabel"),v=n.resolveComponent("KBadge"),x=n.resolveComponent("KCopy"),I=n.resolveComponent("KTooltip");return n.openBlock(),n.createElementBlock("div",Jy,[n.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[n.renderSlot(h.$slots,"label",{item:e.item},()=>[n.createVNode(b,{"tooltip-attributes":{maxWidth:"500px"}},n.createSlots({default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.item.label)+" ",1)]),_:2},[c.value?{name:"tooltip",fn:n.withCtx(()=>[n.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[n.renderSlot(h.$slots,"label-tooltip",{},()=>[n.createTextVNode(n.toDisplayString(e.item.tooltip),1)],!0)],8,Zy)]),key:"0"}:void 0]),1024)],!0)],8,Yy),n.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[n.renderSlot(h.$slots,e.item.key,{rowValue:e.item.value},()=>[l.value?(n.openBlock(),n.createElementBlock("div",eg,[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(p.value.tag),n.normalizeProps(n.guardReactiveProps(p.value.attrs)),{default:n.withCtx(()=>[p.value.additionalComponent==="KBadge"?(n.openBlock(),n.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(k,B)=>(n.openBlock(),n.createBlock(v,{key:`${e.item.key}-badge-tag-${B}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${B}`,tooltip:k,"truncation-tooltip":""},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(k),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,tg)):n.createCommentVNode("",!0),p.value.additionalComponent==="KCopy"?(n.openBlock(),n.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(k,B)=>(n.openBlock(),n.createBlock(x,n.mergeProps({ref_for:!0},p.value.childAttrs,{key:`${e.item.key}-copy-uuid-${B}`,"data-testid":`${e.item.key}-copy-uuid-${B}`,text:k}),null,16,["data-testid","text"]))),128))],8,rg)):p.value.additionalComponent==="KMethodBadge"?(n.openBlock(),n.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(k,B)=>(n.openBlock(),n.createBlock(v,{key:`${e.item.key}-badge-method-${B}`,appearance:Object.values(n.unref(dp.BadgeMethodAppearances)).includes(k.toLowerCase())?k.toLowerCase():"custom",class:"config-badge","data-testid":`${e.item.key}-badge-method-${B}`},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(k),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,ig)):n.createCommentVNode("",!0),p.value.additionalComponent==="JsonCardItem"?(n.openBlock(),n.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(k,B)=>(n.openBlock(),n.createBlock(Rd,{key:`json-array-item-${B}`,index:B,"is-array-item":"",item:k},null,8,["index","item"]))),128))],8,ng)):(n.openBlock(),n.createBlock(I,{key:4,text:n.unref(w)?e.item.value:""},{default:n.withCtx(()=>[n.createElementVNode("span",{ref_key:"textContent",ref:E,class:n.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},n.toDisplayString(p.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(n.openBlock(),n.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,Xy))],!0)],8,Qy)])}}}),fo=ct(sg,[["__scopeId","data-v-d268261c"]]),ag={class:"json-config"},lg={key:0,class:"json-endpoint"},Ud=n.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},jsonRecord:{type:Object,required:!0},requestMethod:{type:String,required:!1,default:""}},setup(e){n.useCssVars(o=>({"090794fe":`${i.value}ch`}));const t=e,r=n.computed(()=>t.jsonRecord),i=n.computed(()=>{var o;if(!t.fetcherUrl)return 0;const s=(o=t.fetcherUrl)==null?void 0:o.split("/");return s.length<2?0:41+(t.requestMethod==="post"?s[s.length-1]:s[s.length-2]).length});return(o,s)=>{const a=n.resolveComponent("KBadge"),l=n.resolveComponent("KCodeBlock");return n.openBlock(),n.createElementBlock("div",ag,[t.fetcherUrl?(n.openBlock(),n.createElementBlock("div",lg,[n.createVNode(a,{appearance:t.requestMethod},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(t.requestMethod),1)]),_:1},8,["appearance"]),n.createVNode(l,{id:"json-endpoint-codeblock",code:t.fetcherUrl,language:"json","single-line":"",theme:"dark"},null,8,["code"])])):n.createCommentVNode("",!0),t.jsonRecord?(n.openBlock(),n.createBlock(l,{key:1,id:"json-codeblock",class:n.normalizeClass({"json-content":t.fetcherUrl}),code:JSON.stringify(r.value,null,2),language:"json",theme:"dark"},null,8,["class","code"])):n.createCommentVNode("",!0)])}}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Ld(e){return typeof e>"u"||e===null}function cg(e){return typeof e=="object"&&e!==null}function ug(e){return Array.isArray(e)?e:Ld(e)?[]:[e]}function dg(e,t){var r,i,o,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)o=s[r],e[o]=t[o];return e}function fg(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function pg(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var hg=Ld,yg=cg,gg=ug,mg=fg,bg=pg,wg=dg,ke={isNothing:hg,isObject:yg,toArray:gg,repeat:mg,isNegativeZero:bg,extend:wg};function Fd(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
118
118
|
|
|
119
119
|
`+e.mark.snippet),i+" "+r):i}function Ei(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Fd(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ei.prototype=Object.create(Error.prototype),Ei.prototype.constructor=Ei,Ei.prototype.toString=function(e){return this.name+": "+Fd(this,e)};var Re=Ei;function Fa(e,t,r,i,o){var s="",a="",l=Math.floor(o/2)-1;return i-t>l&&(s=" ... ",t=i-l+s.length),r-i>l&&(a=" ...",r=i+l-a.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+s.length}}function Ha(e,t){return ke.repeat(" ",t-e.length)+e}function vg(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],s,a=-1;s=r.exec(e.buffer);)o.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var l="",c,d,y=Math.min(e.line+t.linesAfter,o.length).toString().length,p=t.maxLength-(t.indent+y+3);for(c=1;c<=t.linesBefore&&!(a-c<0);c++)d=Fa(e.buffer,i[a-c],o[a-c],e.position-(i[a]-i[a-c]),p),l=ke.repeat(" ",t.indent)+Ha((e.line-c+1).toString(),y)+" | "+d.str+`
|
|
120
120
|
`+l;for(d=Fa(e.buffer,i[a],o[a],e.position,p),l+=ke.repeat(" ",t.indent)+Ha((e.line+1).toString(),y)+" | "+d.str+`
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-d268261c]{align-items:center;border-bottom:var(--dc1d91a8);display:var(--59ccec5f);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-d268261c]{width:var(--29318fbe)}.config-card-details-row .config-card-details-label label[data-v-d268261c]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-d268261c]{width:var(--292d0408)}.config-card-details-row .config-card-details-value .truncated[data-v-d268261c]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-d268261c]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-d268261c] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-d268261c]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-d268261c]{margin-right:4px}.config-card-details-row[data-v-d268261c] .k-label{margin-bottom:0}.config-card-details-row[data-v-d268261c] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-d268261c] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 6px 12px}.json-endpoint .k-badge{height:24px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0}.json-endpoint code{direction:rtl;max-width:var(--4520e3ec);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-2052238b]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-f40a683b]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-f40a683b]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-f40a683b]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-f40a683b] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-f40a683b]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-fd05df8e]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-fd05df8e]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-fd05df8e] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-fd05df8e] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-fd05df8e] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-fd05df8e] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-fd05df8e] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-fd05df8e] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-71b4425a]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-71b4425a]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-71b4425a]{float:right}.kong-ui-entity-base-table .actions-container[data-v-71b4425a] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-94990087]{width:100%}.kong-ui-entity-filter-clear[data-v-94990087]{cursor:pointer}.kong-ui-entity-filter[data-v-94990087]{display:flex;position:relative}.kong-ui-entity-filter[data-v-94990087] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-94990087] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-94990087]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-94990087]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-94990087]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-94990087]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-94990087]{color:#232633}.menu-item-expand-icon[data-v-94990087]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-94990087]{transform:rotate(180deg)}.menu-item-indicator[data-v-94990087]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-94990087]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-94990087] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-94990087] .k-input{width:100%}.menu-item-body[data-v-94990087] .k-select-input .input{font-size:12px}.menu-item-body[data-v-94990087] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-94990087]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-94990087]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-94990087]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-certificates-list[data-v-6537ab9e]{width:100%}.kong-ui-entities-certificates-list .kong-ui-entity-filter-input[data-v-6537ab9e]{margin-right:12px}.kong-ui-entities-certificates-form[data-v-cec1c591],.kong-ui-entities-certificates-form .certificate-form-textarea[data-v-cec1c591]{width:100%}.kong-ui-entities-certificates-form .certificate-form-textarea[data-v-cec1c591] .k-tooltip{max-width:300px}.kong-ui-ca-certificate-entity-config-card[data-v-b34eea10] .config-badge{margin-right:4px}.kong-ui-ca-certificate-entity-config-card .metadata-label[data-v-b34eea10]{font-size:16px}.kong-ui-entities-ca-certificates-list[data-v-0706609f]{width:100%}.kong-ui-entities-ca-certificates-list .kong-ui-entity-filter-input[data-v-0706609f]{margin-right:12px}.kong-ui-entities-ca-certificates-form[data-v-54396784],.kong-ui-entities-ca-certificates-form .certificate-form-textarea[data-v-54396784]{width:100%}.kong-ui-certificate-entity-config-card[data-v-d40682b9] .config-badge{margin-right:4px}.kong-ui-certificate-entity-config-card .metadata-label[data-v-d40682b9]{font-size:16px}
|
|
1
|
+
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-d268261c]{align-items:center;border-bottom:var(--dc1d91a8);display:var(--59ccec5f);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-d268261c]{width:var(--29318fbe)}.config-card-details-row .config-card-details-label label[data-v-d268261c]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-d268261c]{width:var(--292d0408)}.config-card-details-row .config-card-details-value .truncated[data-v-d268261c]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-d268261c]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-d268261c] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-d268261c]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-d268261c]{margin-right:4px}.config-card-details-row[data-v-d268261c] .k-label{margin-bottom:0}.config-card-details-row[data-v-d268261c] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-d268261c] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 6px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--090794fe);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-2052238b]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-f40a683b]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-f40a683b]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-f40a683b]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-f40a683b] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-f40a683b]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-fd05df8e]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-fd05df8e]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-fd05df8e] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-fd05df8e] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-fd05df8e] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-fd05df8e] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-fd05df8e] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-fd05df8e] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-71b4425a]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-71b4425a]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-71b4425a]{float:right}.kong-ui-entity-base-table .actions-container[data-v-71b4425a] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-94990087]{width:100%}.kong-ui-entity-filter-clear[data-v-94990087]{cursor:pointer}.kong-ui-entity-filter[data-v-94990087]{display:flex;position:relative}.kong-ui-entity-filter[data-v-94990087] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-94990087] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-94990087]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-94990087]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-94990087]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-94990087]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-94990087]{color:#232633}.menu-item-expand-icon[data-v-94990087]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-94990087]{transform:rotate(180deg)}.menu-item-indicator[data-v-94990087]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-94990087]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-94990087] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-94990087] .k-input{width:100%}.menu-item-body[data-v-94990087] .k-select-input .input{font-size:12px}.menu-item-body[data-v-94990087] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-94990087]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-94990087]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-94990087]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-certificates-list[data-v-6537ab9e]{width:100%}.kong-ui-entities-certificates-list .kong-ui-entity-filter-input[data-v-6537ab9e]{margin-right:12px}.kong-ui-entities-certificates-form[data-v-cec1c591],.kong-ui-entities-certificates-form .certificate-form-textarea[data-v-cec1c591]{width:100%}.kong-ui-entities-certificates-form .certificate-form-textarea[data-v-cec1c591] .k-tooltip{max-width:300px}.kong-ui-ca-certificate-entity-config-card[data-v-b34eea10] .config-badge{margin-right:4px}.kong-ui-ca-certificate-entity-config-card .metadata-label[data-v-b34eea10]{font-size:16px}.kong-ui-entities-ca-certificates-list[data-v-0706609f]{width:100%}.kong-ui-entities-ca-certificates-list .kong-ui-entity-filter-input[data-v-0706609f]{margin-right:12px}.kong-ui-entities-ca-certificates-form[data-v-54396784],.kong-ui-entities-ca-certificates-form .certificate-form-textarea[data-v-54396784]{width:100%}.kong-ui-certificate-entity-config-card[data-v-d40682b9] .config-badge{margin-right:4px}.kong-ui-certificate-entity-config-card .metadata-label[data-v-d40682b9]{font-size:16px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-certificates",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-certificates.umd.js",
|
|
6
6
|
"module": "./dist/entities-certificates.es.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@kong/icons": "^1.14.2",
|
|
51
51
|
"@peculiar/x509": "^1.9.7",
|
|
52
|
-
"@kong-ui-public/entities-shared": "^3.4.
|
|
52
|
+
"@kong-ui-public/entities-shared": "^3.4.3"
|
|
53
53
|
},
|
|
54
54
|
"distSizeChecker": {
|
|
55
55
|
"errorLimit": "1.5MB"
|