@kong-ui-public/entities-key-sets 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
- (function(G,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","axios","@kong/kongponents"],e):(G=typeof globalThis<"u"?globalThis:G||self,e(G["kong-ui-public-entities-key-sets"]={},G.Vue,G.VueRouter,G["kong-ui-public-i18n"],G.axios,G.Kongponents))})(this,function(G,e,At,ut,kn,bn){"use strict";const Cn={keySets:{title:"Key Sets",list:{toolbar_actions:{new_key_set:"New Key Set"},table_headers:{name:"Name",id:"ID",tags:"Tags"},empty_state:{title:"Configure a New Key Set",description:"A Key Set object holds a collection of asymmetric key objects. This entity allows to logically group keys by their purpose."}},actions:{create:"New Key Set",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact name or ID"},delete:{title:"Delete a Key Set",description:"Deleting this key set will also delete keys associated. This action cannot be reversed so make sure to check the key set usage before deleting."},errors:{general:"Key sets could not be retrieved",delete:"The key set 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"},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this key set."}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this key set"},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."}}}}};function wn(){const t=ut.createI18n("en-us",Cn);return{i18n:t,i18nT:ut.i18nTComponent(t)}}const _t={useI18n:wn},bt={list:{konnect:"/api/runtime_groups/{controlPlaneId}/key-sets",kongManager:"/{workspace}/key-sets"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/key-sets",edit:"/api/runtime_groups/{controlPlaneId}/key-sets/{id}"},kongManager:{create:"/{workspace}/key-sets",edit:"/{workspace}/key-sets/{id}"}}};var Wt=(t=>(t.GatewayService="service",t.Route="route",t.Consumer="consumer",t.ConsumerGroup="consumer group",t.Plugin="plugin",t.Upstream="upstream",t.Certificate="certificate",t.CACertificate="ca certificate",t.SNI="SNI",t.Key="key",t.KeySet="key set",t.Vault="vault",t.Application="application",t.Developer="developer",t.acls="ACL Credential",t["basic-auth"]="Basic Auth Credential",t["key-auth"]="Key Auth Credential",t["key-auth-enc"]="Key Auth Encrypted Credential",t.oauth2="OAuth 2.0 Credential",t["hmac-auth"]="HMAC Credential",t.jwt="JWT Credential",t.Target="target",t.Policy="policy",t))(Wt||{}),Tt=(t=>(t.Edit="edit",t.Create="create",t))(Tt||{}),rt=(t=>(t[t.Loading=0]="Loading",t[t.Idle=1]="Idle",t[t.NoResults=2]="NoResults",t[t.Error=3]="Error",t))(rt||{}),j=(t=>(t.ID="id",t.IdArray="id-array",t.Text="plain-text",t.Date="date",t.Redacted="redacted",t.RedactedArray="redacted-array",t.Json="json",t.JsonArray="json-array",t.BadgeTag="badge-tag",t.BadgeStatus="badge-status",t.BadgeMethod="badge-method",t.LinkInternal="link-internal",t.LinkExternal="link-external",t))(j||{}),Z=(t=>(t.Basic="basic",t.Advanced="advanced",t.Plugin="plugin",t))(Z||{});function Et(t={}){return{axiosInstance:kn.create({withCredentials:!0,timeout:3e4,...t})}}function Sn(){return{debounce:(t,o)=>{let n;return(...r)=>{clearTimeout(n),n=window==null?void 0:window.setTimeout(()=>{t(...r)},o)}}}}const Vt="khcp-user-table-preferences",xn={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function Bn(){const t=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch(r){console.error("useTablePreferences(tryParseJson)",r);return}},o=()=>{const n=t(localStorage.getItem(Vt));return!n||!Object.keys(n).length?new Map:new Map(Object.entries(n))};return{setTablePreferences:(n,r)=>{try{const a=o();a.set(n,r),localStorage.setItem(Vt,JSON.stringify(Object.fromEntries(a.entries())))}catch(a){console.error("useTablePreferences(setTablePreferences)",a)}},getTablePreferences:n=>{const r=o();return(r==null?void 0:r.get(n))||void 0||xn},deleteAllTablePreferences:()=>{localStorage.removeItem(Vt)}}}const Nn={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},In={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},An={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},_n={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},Tn={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"}},En={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},Vn={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},$n={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},jn={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"}},On={global:Nn,deleteModal:In,baseForm:An,baseTable:_n,baseConfigCard:Tn,filter:En,debouncedFilter:Vn,errors:$n,toggleModal:jn};function $t(){const t=ut.createI18n("en-us",On);return{i18n:t,i18nT:ut.i18nTComponent(t)}}function Gt(){const t=(n,r)=>(r==null?void 0:r[n])??void 0,o=(n,r)=>{if(n.length!==r.length)return!1;const a=new Set([...n,...r]);for(const i of a){const l=n.filter(c=>c===i).length,s=r.filter(c=>c===i).length;if(l!==s)return!1}return!0};return{getPropValue:t,objectsAreEqual:(n,r,a)=>{if(a){if(Object.keys(n).length===Object.keys(r).length)for(const i in n)if(Array.isArray(n[i])&&Array.isArray(r[i])){if(o(n[i],r[i]))continue;return!1}else{if(n[i]===r[i])continue;return!1}else return!1;return!0}try{return JSON.stringify(n)===JSON.stringify(r)}catch{return!1}},sortAlpha:n=>(r,a)=>{let i=r[n]===void 0||r[n]===null?"":r[n],l=a[n]===void 0||a[n]===null?"":a[n];return Array.isArray(r[n])&&(i=r[n][0]),Array.isArray(a[n])&&(l=a[n][0]),i.localeCompare(l)},isValidUuid:n=>n?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(n):!1}}function Fn(t,o,n,r={fetchedItemsKey:"data",searchKeys:["id"]}){n||(n="100");const{axiosInstance:a}=Et({headers:t.requestHeaders}),{i18n:{t:i}}=$t(),{debounce:l}=Sn(),s=l(async w=>{await b(w)},200),c=e.ref(!1),d=e.ref(""),u=e.ref(""),p=e.ref([]),y=e.ref([]),m=e.ref(void 0),S=e.unref(o);let k=`${t.apiBaseUrl}${S}`;t.app==="konnect"?k=k.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(k=k.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:""));const{isValidUuid:f}=Gt(),h=async()=>{try{c.value=!0;const{data:w}=await a.get(`${k}?size=${n}`);w!=null&&w.next||(m.value=r.fetchedItemsKey in w?w[r.fetchedItemsKey]:[]),y.value=r.fetchedItemsKey in w?w[r.fetchedItemsKey]:[],p.value=y.value}catch{p.value=[],d.value=i("debouncedFilter.errors.fetch")}finally{c.value=!1}},g=e.ref(""),b=async w=>{var K,D,T;if(g.value!==w)if(g.value=w||"",m.value===void 0)try{if(c.value=!0,d.value="",u.value="",t.app==="konnect"){let C=k+"";w&&(C+=`/${w}`);const{data:A}=await a.get(`${C}?size=${n}`);r.fetchedItemsKey in A?p.value=A[r.fetchedItemsKey]:A!=null&&A.id?p.value=[A]:p.value=[]}else if(w){const C=[];f(w)&&r.searchKeys.includes("id")?C.push((async()=>{const{data:N}=await a.get(`${k}/${w}`);return[N[r.fetchedItemsKey]??N]})()):C.push(...r.searchKeys.filter(N=>N!=="id").map(async N=>{const{data:_}=await a.get(`${k}?${N}=${w}`);return _[r.fetchedItemsKey]}));const A=await Promise.all(C),B=new Set;p.value=[],(K=A==null?void 0:A.forEach)==null||K.call(A,N=>{var _;(_=N==null?void 0:N.forEach)==null||_.call(N,E=>{B.has(E.id)||(B.add(E.id),p.value.push(E))})})}else p.value=y.value}catch(C){((D=C==null?void 0:C.response)==null?void 0:D.status)===404?u.value=i("debouncedFilter.errors.invalid"):(p.value=[],d.value=i("debouncedFilter.errors.fetch"))}finally{c.value=!1}else c.value=!0,u.value="",w?(p.value=(T=m.value)==null?void 0:T.filter(C=>{var A;let B=!1;for(const N of r.searchKeys){const _=typeof C[N]=="string"?(A=C[N])==null?void 0:A.toLowerCase():C[N];_!=null&&_.includes(w.toLowerCase())&&(B=!0)}return B}),(!p.value||!p.value.length)&&(u.value=i("debouncedFilter.errors.invalid"))):p.value=m.value,c.value=!1};return{loading:c,error:d,validationError:u,results:p,allRecords:m,loadItems:h,debouncedQueryChange:s}}function Mn(t,o){const n=e.unref(o),r=e.computed(()=>t.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${n}`):new URL(n));return r.value.search="",a=>`${r.value.href}/${a}`}function Kn(){const{i18n:{t}}=$t();return{getMessageFromError:o=>{var n,r,a;if(!o)return t("errors.unexpected");if((n=o==null?void 0:o.response)!=null&&n.data){if(o.response.data.detail)return o.response.data.detail;if((r=o.response.data.details)!=null&&r.length)return o.response.data.details.map(i=>{let l=t("errors.unexpected");return i.messages&&typeof i.messages=="object"&&i.messages.length&&(l=i.messages.join(", ")),i.field?`${i.field} - ${l}`:l}).join("; ");if(o.response.data.message){const{message:i}=o.response.data;return Array.isArray(i)?(a=i[0])!=null&&a.constraints?Object.values(i[0].constraints)[0]:i[0]:i}if(typeof o.response.data=="string")return o.response.data;if(typeof o.response.data=="object")return Object.keys(o.response.data).map(i=>`${i} ${o.response.data[i]}`).join(", ")}return o.message||t("errors.unexpected")}}}function Dn(t){const o=window.location.origin,n=o.endsWith("/")?o:`${o}/`;try{const r=t.join("/"),a=`${n}${r}`,i=t.some(l=>l.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a)&&!i&&new URL(a))return`${n}${r}`;throw new Error("Invalid url")}catch(r){return console.warn("Failed to build valid URL:",r),""}}function Zt(t,o){const n=e.ref(e.unref(t)),r=e.ref(e.unref(o)),a=e.computed(()=>!!(n.value.app==="konnect"||n.value.isExactMatch)),i=e.computed(()=>r.value.startsWith("/")?new URL(`${window.location.origin}${r.value}`):new URL(r.value));return l=>{const{page:s,pageSize:c,offset:d,sortColumnKey:u,sortColumnOrder:p,query:y}=l;try{let m=new URL(i.value.href);return a.value&&y?(m.search="",m=new URL(`${m.href}/${y}/`)):(a.value||new URLSearchParams(y).forEach((S,k)=>{m.searchParams.append(k,S)}),u&&m.searchParams.append("sort_by",u),p==="desc"&&m.searchParams.append("sort_desc","1"),m.searchParams.append("size",String(c))),d&&s!==1&&m.searchParams.append("offset",String(d)),m.href}catch(m){return console.error("RouteList(fetcher)",m),r.value}}}function Ln(t,o,n="data"){const r=e.unref(o),{axiosInstance:a}=Et({headers:t.requestHeaders}),i=Zt(t,r),l=e.ref({status:rt.Idle});return{fetcher:async s=>{try{l.value={status:rt.Loading};const c=i(s),{data:d}=await a.get(c),u=n&&n.replace(/[^\w-_]/gi,"");let p;d[u]&&Array.isArray(d[u])?p=d[u]:p=Object.keys(d).length?[d]:[];const y={data:p,total:p.length,...d.offset?{pagination:{offset:d.offset}}:null};return l.value={status:rt.Idle,response:y},y}catch(c){const d={data:[],total:0};return s.query&&c.response.status===404?(l.value={status:rt.NoResults,response:d,error:c},d):(l.value={status:rt.Error,response:d,error:c},d)}},fetcherState:l}}function qn(){const t=(n,r="_")=>n?n.split(r).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):"",o=/(?:^|[\s-:'"])\w/g;return{capitalize:n=>n?n.replace(o,r=>r.toUpperCase()):"",convertKeyToTitle:t}}const Xt=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Qt=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const o=t.match(Xt);if(!o)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return o.shift(),o},te=t=>t==="*"||t==="x"||t==="X",ee=t=>{const o=parseInt(t,10);return isNaN(o)?t:o},vn=(t,o)=>typeof t!=typeof o?[String(t),String(o)]:[t,o],Pn=(t,o)=>{if(te(t)||te(o))return 0;const[n,r]=vn(ee(t),ee(o));return n>r?1:n<r?-1:0},ne=(t,o)=>{for(let n=0;n<Math.max(t.length,o.length);n++){const r=Pn(t[n]||"0",o[n]||"0");if(r!==0)return r}return 0},Rn=(t,o)=>{const n=Qt(t),r=Qt(o),a=n.pop(),i=r.pop(),l=ne(n,r);return l!==0?l:a&&i?ne(a.split("."),i.split(".")):a||i?a?-1:1:0},oe=(t,o,n)=>{Un(n);const r=Rn(t,o);return re[n].includes(r)},re={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ae=Object.keys(re),Un=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(ae.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${ae.join("|")}`)},zn=t=>typeof t=="string"&&/^[v\d]/.test(t)&&Xt.test(t);function Hn(t){const{gatewayInfo:o,supportedRange:n}=t;if(!o)return!0;const{edition:r,version:a}=o;if(!zn(a))return console.error("Invalid version"),!1;const i=n[r];if(!i)return!1;const[l,s]=i;return!(l&&oe(a,l,"<")||s&&oe(a,s,">"))}function Jn(t){const o=e.ref(0),n=e.ref(0),r=e.ref(!1);return e.watch(t,a=>{a&&!r.value&&(o.value=a.offsetWidth,n.value=a.scrollWidth,r.value=!0)}),{isTruncated:e.computed(()=>o.value<n.value)}}const P={useAxios:Et,useDebouncedFilter:Fn,useDeleteUrlBuilder:Mn,useErrors:Kn,useExternalLinkCreator:Dn,useFetcher:Ln,useFetchUrlBuilder:Zt,useHelpers:Gt,useStringHelpers:qn,useI18n:$t,useGatewayFeatureSupported:Hn,useTruncationDetector:Jn},Yn={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},Wn="Copy to clipboard",Gn={message:Yn,iconTitle:Wn},Zn="kong-ui-copy-uuid-notify",ie="24px",Xn=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},Qn=t=>(e.pushScopeId("data-v-9971cc79"),t=t(),e.popScopeId(),t),to=["aria-hidden"],eo={key:0,"data-testid":"kui-icon-svg-title"},no=Qn(()=>e.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),oo=e.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ie,validator:t=>{if(typeof t=="number"&&t>0)return!0;if(typeof t=="string"){const o=String(t).replace(/px/gi,""),n=Number(o);if(n&&!isNaN(n)&&Number.isInteger(n)&&n>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(t){const o=t,n=e.computed(()=>{if(typeof o.size=="number"&&o.size>0)return`${o.size}px`;if(typeof o.size=="string"){const a=String(o.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return ie}),r=e.computed(()=>({boxSizing:"border-box",color:o.color,display:o.display,height:n.value,lineHeight:"0",width:n.value}));return(a,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.as),{"aria-hidden":t.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:e.normalizeStyle(r.value)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":t.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[t.title?(e.openBlock(),e.createElementBlock("title",eo,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),no],8,to))]),_:1},8,["aria-hidden","style"]))}}),ro=Xn(oo,[["__scopeId","data-v-9971cc79"]]),ao="16px",io={class:"kong-ui-copy-uuid"},lo=["onClick"],le=15,so=e.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:t=>["uuid","hidden","redacted","deleted"].includes(t)}},emits:["success","error"],setup(t,{emit:o}){const n=t,{t:r}=ut.createI18n("en-us",Gn),a=n.notify||e.inject(Zn,()=>{}),i=e.computed(()=>n.idTooltip?{label:n.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:n.uuid}),l=e.computed(()=>!!(n.tooltip&&n.successTooltip)),s=e.ref(n.tooltip),c=e.computed(()=>n.tooltip?{label:s.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),d=e.computed(()=>{var y;return n.format==="redacted"?"*****":n.format==="deleted"?`*${(y=n.uuid)==null?void 0:y.substring(0,5)}`:n.uuid}),u=y=>{s.value=y,setTimeout(()=>{s.value=n.tooltip},1800)},p=y=>{var m,S;if(!y(n.uuid)){typeof a=="function"&&a({type:"error",message:r("message.fail")}),l.value?u(r("message.fail")):o("error",n.uuid);return}const k=((m=n.uuid)==null?void 0:m.length)>le,f=n.format==="hidden"||n.format==="redacted"?r("message.success.prefix"):`"${((S=n.uuid)==null?void 0:S.substring(0,le))+(k?"...":"")}"`;typeof a=="function"&&a({type:"success",message:`${f}${r("message.success.content")}`}),l.value?u(n.successTooltip):o("success",n.uuid)};return(y,m)=>{const S=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",io,[t.format!=="hidden"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.idTooltip?"KTooltip":"div"),e.mergeProps({key:0},i.value,{"data-testid":"copy-id"}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["uuid-container",t.truncated?"truncated-uuid":null,t.useMono?"mono":null])},e.toDisplayString(d.value),3)]),_:1},16)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tooltip?"KTooltip":"div"),e.mergeProps(c.value,{class:"uuid-icon-wrapper"}),{default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(({copyToClipboard:k})=>[e.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:e.withModifiers(f=>p(k),["stop"])},[e.createVNode(e.unref(ro),{class:"uuid-icon",color:t.iconColor,decorative:!!t.tooltip,size:e.unref(ao),title:e.unref(r)("iconTitle")},null,8,["color","decorative","size","title"])],8,lo)]),_:1})]),_:1},16))])}}}),co=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},se=co(so,[["__scopeId","data-v-0c07874b"]]),po={key:0,class:"config-card-fieldset-title"},uo=e.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(t){const o=t,{i18n:{t:n}}=P.useI18n(),{convertKeyToTitle:r}=P.useStringHelpers(),a=e.computed(()=>o.item.key??"json-array-item"),i=e.computed(()=>o.item.value??o.item),l=e.computed(()=>{const c=JSON.parse(JSON.stringify(i.value));return o.isArrayItem&&delete c.name,c}),s=e.computed(()=>{var c;return o.isArrayItem?(c=i.value)!=null&&c.name?r(i.value.name,"_"):n("baseConfigCard.general.entryTitle",{index:o.index}):""});return(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.isArrayItem?"fieldset":"div"),{class:e.normalizeClass(t.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:e.withCtx(()=>[t.isArrayItem?(e.openBlock(),e.createElementBlock("legend",po,[e.createElementVNode("b",null,e.toDisplayString(s.value),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(l.value),(u,p)=>(e.openBlock(),e.createBlock(jt,{key:`${a.value}-property-${p}`,item:{key:u,label:e.unref(r)(u),value:l.value[u]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),X=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},ce=X(uo,[["__scopeId","data-v-68ca83ec"]]),fo=X(e.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(t){const{i18n:{t:o}}=P.useI18n();return(n,r)=>{const a=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(a,{appearance:"tertiary",class:"navigation-button",onClick:r[0]||(r[0]=i=>n.$emit("navigation-click",t.item))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.value||e.unref(o)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),mo=e.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(t){const{i18n:{t:o}}=P.useI18n();return(n,r)=>{const a=e.resolveComponent("KBadge");return e.openBlock(),e.createBlock(a,{appearance:t.status?"success":"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.status?e.unref(o)("baseConfigCard.statusBadge.enabledLabel"):e.unref(o)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),yo="#0044f4",go="#e0e4ea",ho="#3a3f51",ko="1px",bo="20px",Co={class:"config-card-details-row"},wo=["data-testid"],So=["data-testid"],xo=["data-testid"],Bo=["data-testid"],No={key:1},Io=["data-testid"],Ao=["data-testid"],_o=["data-testid"],To=["data-testid"],Eo={name:"ConfigCardItem",components:{CopyUuid:se,JsonCardItem:ce,StatusBadge:mo,InternalLinkItem:fo}},Vo=e.defineComponent({...Eo,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(t,{emit:o}){const n=t;e.useCssVars(m=>({"1df60db4":d.value?"none":`solid ${e.unref(ko)} ${e.unref(go)}`,"21d1d34e":c.value&&l.value?"block":"flex","4d3dc7e7":c.value&&l.value?"100%":n.slim?"50%":"25%","4d400dc2":c.value&&l.value?"100%":n.slim?"50%":"75%"}));const r=e.useSlots(),{i18n:{t:a,formatUnixTimeStamp:i}}=P.useI18n(),l=e.computed(()=>n.item.value!==void 0&&n.item.value!==null&&n.item.value!==""),s=e.computed(()=>!!(n.item.tooltip||r["label-tooltip"])),c=e.computed(()=>n.item.type===j.Json||n.item.type===j.JsonArray),d=e.computed(()=>n.item.type===j.JsonArray),u=e.computed(()=>{switch(n.item.type){case j.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${n.item.key}-copy-uuid`,"success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,uuid:n.item.value,notify:()=>{}}};case j.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,notify:()=>{}}};case j.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${n.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,uuid:n.item.value,notify:()=>{}}};case j.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,notify:()=>{}}};case j.Date:return{tag:"div",attrs:{"data-testid":`${n.item.key}-date`},text:i(n.item.value)};case j.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${n.item.key}-badge-status`,status:n.item.value}};case j.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case j.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case j.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${n.item.key}-internal-link`,item:n.item,onNavigationClick:m=>{o("navigation-click",m)}}};case j.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${n.item.key}-external-link`,href:n.item.value},text:n.item.value};case j.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-content`,item:n.item}};case j.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-array-content`,item:n.item}};default:return{tag:"div",attrs:{"data-testid":`${n.item.key}-plain-text`},text:n.item.value}}}),p=e.ref(),{isTruncated:y}=P.useTruncationDetector(p);return(m,S)=>{const k=e.resolveComponent("KLabel"),f=e.resolveComponent("KBadge"),h=e.resolveComponent("KMethodBadge"),g=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("div",Co,[e.createElementVNode("div",{class:"config-card-details-label","data-testid":`${t.item.key}-label`},[e.renderSlot(m.$slots,"label",{item:t.item},()=>[e.createVNode(k,{"tooltip-attributes":{maxWidth:"500px"}},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.label)+" ",1)]),_:2},[s.value?{name:"tooltip",fn:e.withCtx(()=>[e.createElementVNode("div",{"data-testid":`${t.item.key}-label-tooltip`},[e.renderSlot(m.$slots,"label-tooltip",{},()=>[e.createTextVNode(e.toDisplayString(t.item.tooltip),1)],!0)],8,So)]),key:"0"}:void 0]),1024)],!0)],8,wo),e.createElementVNode("div",{class:"config-card-details-value","data-testid":`${t.item.key}-property-value`},[e.renderSlot(m.$slots,t.item.key,{rowValue:t.item.value},()=>[l.value?(e.openBlock(),e.createElementBlock("div",No,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value.tag),e.normalizeProps(e.guardReactiveProps(u.value.attrs)),{default:e.withCtx(()=>[u.value.additionalComponent==="KBadge"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-badge-tags`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(b,w)=>(e.openBlock(),e.createBlock(f,{key:`${t.item.key}-badge-tag-${w}`,class:"config-badge","data-testid":`${t.item.key}-badge-tag-${w}`,"truncation-tooltip":b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,Io)):e.createCommentVNode("",!0),u.value.additionalComponent==="CopyUuid"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${t.item.key}-copy-uuid-array`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(b,w)=>(e.openBlock(),e.createBlock(e.unref(se),e.mergeProps(u.value.childAttrs,{key:`${t.item.key}-copy-uuid-${w}`,"data-testid":`${t.item.key}-copy-uuid-${w}`,uuid:b}),null,16,["data-testid","uuid"]))),128))],8,Ao)):u.value.additionalComponent==="KMethodBadge"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${t.item.key}-badge-methods`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(b,w)=>(e.openBlock(),e.createBlock(h,{key:`${t.item.key}-badge-method-${w}`,class:"config-badge","data-testid":`${t.item.key}-badge-method-${w}`,"is-rounded":"",label:b,method:e.unref(bn.MethodsArray).includes(b.toLowerCase())?b.toLowerCase():"custom"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,_o)):e.createCommentVNode("",!0),u.value.additionalComponent==="JsonCardItem"?(e.openBlock(),e.createElementBlock("div",{key:3,"data-testid":`${n.item.key}-json-array-content`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(b,w)=>(e.openBlock(),e.createBlock(ce,{key:`json-array-item-${w}`,index:w,"is-array-item":"",item:b},null,8,["index","item"]))),128))],8,To)):(e.openBlock(),e.createBlock(g,{key:4,label:e.unref(y)?t.item.value:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:p,class:e.normalizeClass(["attrs-data-text",{truncated:t.truncated}])},e.toDisplayString(u.value.text),3)]),_:1},8,["label"]))]),_:1},16))])):(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-no-value`}," – ",8,Bo))],!0)],8,xo)])}}}),jt=X(Vo,[["__scopeId","data-v-307ab96d"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function de(t){return typeof t>"u"||t===null}function $o(t){return typeof t=="object"&&t!==null}function jo(t){return Array.isArray(t)?t:de(t)?[]:[t]}function Oo(t,o){var n,r,a,i;if(o)for(i=Object.keys(o),n=0,r=i.length;n<r;n+=1)a=i[n],t[a]=o[a];return t}function Fo(t,o){var n="",r;for(r=0;r<o;r+=1)n+=t;return n}function Mo(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Ko=de,Do=$o,Lo=jo,qo=Fo,vo=Mo,Po=Oo,q={isNothing:Ko,isObject:Do,toArray:Lo,repeat:qo,isNegativeZero:vo,extend:Po};function pe(t,o){var n="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!o&&t.mark.snippet&&(n+=`
1
+ (function(Z,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","axios","@kong/kongponents"],e):(Z=typeof globalThis<"u"?globalThis:Z||self,e(Z["kong-ui-public-entities-key-sets"]={},Z.Vue,Z.VueRouter,Z["kong-ui-public-i18n"],Z.axios,Z.Kongponents))})(this,function(Z,e,Nt,ut,kn,bn){"use strict";const Cn={keySets:{title:"Key Sets",list:{toolbar_actions:{new_key_set:"New Key Set"},table_headers:{name:"Name",id:"ID",tags:"Tags"},empty_state:{title:"Configure a New Key Set",description:"A Key Set object holds a collection of asymmetric key objects. This entity allows to logically group keys by their purpose."}},actions:{create:"New Key Set",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact name or ID"},delete:{title:"Delete a Key Set",description:"Deleting this key set will also delete keys associated. This action cannot be reversed so make sure to check the key set usage before deleting."},errors:{general:"Key sets could not be retrieved",delete:"The key set 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"},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this key set."}},fields:{name:{label:"Name",placeholder:"Enter a unique name for this key set"},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."}}}}};function wn(){const t=ut.createI18n("en-us",Cn);return{i18n:t,i18nT:ut.i18nTComponent(t)}}const _t={useI18n:wn},bt={list:{konnect:"/api/runtime_groups/{controlPlaneId}/key-sets",kongManager:"/{workspace}/key-sets"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/key-sets",edit:"/api/runtime_groups/{controlPlaneId}/key-sets/{id}"},kongManager:{create:"/{workspace}/key-sets",edit:"/{workspace}/key-sets/{id}"}}};var Wt=(t=>(t.GatewayService="service",t.Route="route",t.Consumer="consumer",t.ConsumerGroup="consumer group",t.Plugin="plugin",t.Upstream="upstream",t.Certificate="certificate",t.CACertificate="ca certificate",t.SNI="SNI",t.Key="key",t.KeySet="key set",t.Vault="vault",t.Application="application",t.Developer="developer",t.acls="ACL Credential",t["basic-auth"]="Basic Auth Credential",t["key-auth"]="Key Auth Credential",t["key-auth-enc"]="Key Auth Encrypted Credential",t.oauth2="OAuth 2.0 Credential",t["hmac-auth"]="HMAC Credential",t.jwt="JWT Credential",t.Target="target",t.Policy="policy",t))(Wt||{}),Et=(t=>(t.Edit="edit",t.Create="create",t))(Et||{}),at=(t=>(t[t.Loading=0]="Loading",t[t.Idle=1]="Idle",t[t.NoResults=2]="NoResults",t[t.Error=3]="Error",t))(at||{}),$=(t=>(t.ID="id",t.IdArray="id-array",t.Text="plain-text",t.Date="date",t.Redacted="redacted",t.RedactedArray="redacted-array",t.Json="json",t.JsonArray="json-array",t.BadgeTag="badge-tag",t.BadgeStatus="badge-status",t.BadgeMethod="badge-method",t.LinkInternal="link-internal",t.LinkExternal="link-external",t))($||{}),G=(t=>(t.Basic="basic",t.Advanced="advanced",t.Plugin="plugin",t))(G||{});function Tt(t={}){return{axiosInstance:kn.create({withCredentials:!0,timeout:3e4,...t})}}function Sn(){return{debounce:(t,o)=>{let n;return(...r)=>{clearTimeout(n),n=window==null?void 0:window.setTimeout(()=>{t(...r)},o)}}}}const Vt="khcp-user-table-preferences",xn={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function Bn(){const t=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch(r){console.error("useTablePreferences(tryParseJson)",r);return}},o=()=>{const n=t(localStorage.getItem(Vt));return!n||!Object.keys(n).length?new Map:new Map(Object.entries(n))};return{setTablePreferences:(n,r)=>{try{const a=o();a.set(n,r),localStorage.setItem(Vt,JSON.stringify(Object.fromEntries(a.entries())))}catch(a){console.error("useTablePreferences(setTablePreferences)",a)}},getTablePreferences:n=>{const r=o();return(r==null?void 0:r.get(n))||void 0||xn},deleteAllTablePreferences:()=>{localStorage.removeItem(Vt)}}}const In={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},An={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},Nn={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},_n={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},En={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"}},Tn={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},Vn={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},jn={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},$n={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"}},Mn={global:In,deleteModal:An,baseForm:Nn,baseTable:_n,baseConfigCard:En,filter:Tn,debouncedFilter:Vn,errors:jn,toggleModal:$n};function jt(){const t=ut.createI18n("en-us",Mn);return{i18n:t,i18nT:ut.i18nTComponent(t)}}function Zt(){const t=(n,r)=>(r==null?void 0:r[n])??void 0,o=(n,r)=>{if(n.length!==r.length)return!1;const a=new Set([...n,...r]);for(const i of a){const l=n.filter(c=>c===i).length,s=r.filter(c=>c===i).length;if(l!==s)return!1}return!0};return{getPropValue:t,objectsAreEqual:(n,r,a)=>{if(a){if(Object.keys(n).length===Object.keys(r).length)for(const i in n)if(Array.isArray(n[i])&&Array.isArray(r[i])){if(o(n[i],r[i]))continue;return!1}else{if(n[i]===r[i])continue;return!1}else return!1;return!0}try{return JSON.stringify(n)===JSON.stringify(r)}catch{return!1}},sortAlpha:n=>(r,a)=>{let i=r[n]===void 0||r[n]===null?"":r[n],l=a[n]===void 0||a[n]===null?"":a[n];return Array.isArray(r[n])&&(i=r[n][0]),Array.isArray(a[n])&&(l=a[n][0]),i.localeCompare(l)},isValidUuid:n=>n?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(n):!1}}function On(t,o,n,r={fetchedItemsKey:"data",searchKeys:["id"]}){n||(n="100");const{axiosInstance:a}=Tt({headers:t.requestHeaders}),{i18n:{t:i}}=jt(),{debounce:l}=Sn(),s=l(async k=>{await x(k)},200),c=e.ref(!1),d=e.ref(""),u=e.ref(""),p=e.ref([]),y=e.ref([]),m=e.ref(void 0),w=e.unref(o);let b=`${t.apiBaseUrl}${w}`;t.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:""));const{isValidUuid:f}=Zt(),h=async()=>{try{c.value=!0;const{data:k}=await a.get(`${b}?size=${n}`);k!=null&&k.next||(m.value=r.fetchedItemsKey in k?k[r.fetchedItemsKey]:[]),y.value=r.fetchedItemsKey in k?k[r.fetchedItemsKey]:[],p.value=y.value}catch{p.value=[],d.value=i("debouncedFilter.errors.fetch")}finally{c.value=!1}},g=e.ref(""),x=async k=>{var T,M,V;if(g.value!==k)if(g.value=k||"",m.value===void 0)try{if(c.value=!0,d.value="",u.value="",t.app==="konnect"){let C=b+"";k&&(C+=`/${k}`);const{data:A}=await a.get(`${C}?size=${n}`);r.fetchedItemsKey in A?p.value=A[r.fetchedItemsKey]:A!=null&&A.id?p.value=[A]:p.value=[]}else if(k){const C=[];f(k)&&r.searchKeys.includes("id")?C.push((async()=>{const{data:B}=await a.get(`${b}/${k}`);return[B[r.fetchedItemsKey]??B]})()):C.push(...r.searchKeys.filter(B=>B!=="id").map(async B=>{const{data:_}=await a.get(`${b}?${B}=${k}`);return _[r.fetchedItemsKey]}));const A=await Promise.all(C),N=new Set;p.value=[],(T=A==null?void 0:A.forEach)==null||T.call(A,B=>{var _;(_=B==null?void 0:B.forEach)==null||_.call(B,E=>{N.has(E.id)||(N.add(E.id),p.value.push(E))})})}else p.value=y.value}catch(C){((M=C==null?void 0:C.response)==null?void 0:M.status)===404?u.value=i("debouncedFilter.errors.invalid"):(p.value=[],d.value=i("debouncedFilter.errors.fetch"))}finally{c.value=!1}else c.value=!0,u.value="",k?(p.value=(V=m.value)==null?void 0:V.filter(C=>{var A;let N=!1;for(const B of r.searchKeys){const _=typeof C[B]=="string"?(A=C[B])==null?void 0:A.toLowerCase():C[B];_!=null&&_.includes(k.toLowerCase())&&(N=!0)}return N}),(!p.value||!p.value.length)&&(u.value=i("debouncedFilter.errors.invalid"))):p.value=m.value,c.value=!1};return{loading:c,error:d,validationError:u,results:p,allRecords:m,loadItems:h,debouncedQueryChange:s}}function Fn(t,o){const n=e.unref(o),r=e.computed(()=>t.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${n}`):new URL(n));return r.value.search="",a=>`${r.value.href}/${a}`}function Kn(){const{i18n:{t}}=jt();return{getMessageFromError:o=>{var n,r,a;if(!o)return t("errors.unexpected");if((n=o==null?void 0:o.response)!=null&&n.data){if(o.response.data.detail)return o.response.data.detail;if((r=o.response.data.details)!=null&&r.length)return o.response.data.details.map(i=>{let l=t("errors.unexpected");return i.messages&&typeof i.messages=="object"&&i.messages.length&&(l=i.messages.join(", ")),i.field?`${i.field} - ${l}`:l}).join("; ");if(o.response.data.message){const{message:i}=o.response.data;return Array.isArray(i)?(a=i[0])!=null&&a.constraints?Object.values(i[0].constraints)[0]:i[0]:i}if(typeof o.response.data=="string")return o.response.data;if(typeof o.response.data=="object")return Object.keys(o.response.data).map(i=>`${i} ${o.response.data[i]}`).join(", ")}return o.message||t("errors.unexpected")}}}function Dn(t){const o=window.location.origin,n=o.endsWith("/")?o:`${o}/`;try{const r=t.join("/"),a=`${n}${r}`,i=t.some(l=>l.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a)&&!i&&new URL(a))return`${n}${r}`;throw new Error("Invalid url")}catch(r){return console.warn("Failed to build valid URL:",r),""}}function Gt(t,o){const n=e.ref(e.unref(t)),r=e.ref(e.unref(o)),a=e.computed(()=>!!(n.value.app==="konnect"||n.value.isExactMatch)),i=e.computed(()=>r.value.startsWith("/")?new URL(`${window.location.origin}${r.value}`):new URL(r.value));return l=>{const{page:s,pageSize:c,offset:d,sortColumnKey:u,sortColumnOrder:p,query:y}=l;try{let m=new URL(i.value.href);return a.value&&y?(m.search="",m=new URL(`${m.href}/${y}/`)):(a.value||new URLSearchParams(y).forEach((w,b)=>{m.searchParams.append(b,w)}),u&&m.searchParams.append("sort_by",u),p==="desc"&&m.searchParams.append("sort_desc","1"),m.searchParams.append("size",String(c))),d&&s!==1&&m.searchParams.append("offset",String(d)),m.href}catch(m){return console.error("RouteList(fetcher)",m),r.value}}}function Ln(t,o,n="data"){const r=e.unref(o),{axiosInstance:a}=Tt({headers:t.requestHeaders}),i=Gt(t,r),l=e.ref({status:at.Idle});return{fetcher:async s=>{try{l.value={status:at.Loading};const c=i(s),{data:d}=await a.get(c),u=n&&n.replace(/[^\w-_]/gi,"");let p;d[u]&&Array.isArray(d[u])?p=d[u]:p=Object.keys(d).length?[d]:[];const y={data:p,total:p.length,...d.offset?{pagination:{offset:d.offset}}:null};return l.value={status:at.Idle,response:y},y}catch(c){const d={data:[],total:0};return s.query&&c.response.status===404?(l.value={status:at.NoResults,response:d,error:c},d):(l.value={status:at.Error,response:d,error:c},d)}},fetcherState:l}}function qn(){const t=(n,r="_")=>n?n.split(r).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):"",o=/(?:^|[\s-:'"])\w/g;return{capitalize:n=>n?n.replace(o,r=>r.toUpperCase()):"",convertKeyToTitle:t}}const Qt=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Xt=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");const o=t.match(Qt);if(!o)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return o.shift(),o},te=t=>t==="*"||t==="x"||t==="X",ee=t=>{const o=parseInt(t,10);return isNaN(o)?t:o},vn=(t,o)=>typeof t!=typeof o?[String(t),String(o)]:[t,o],Rn=(t,o)=>{if(te(t)||te(o))return 0;const[n,r]=vn(ee(t),ee(o));return n>r?1:n<r?-1:0},ne=(t,o)=>{for(let n=0;n<Math.max(t.length,o.length);n++){const r=Rn(t[n]||"0",o[n]||"0");if(r!==0)return r}return 0},Pn=(t,o)=>{const n=Xt(t),r=Xt(o),a=n.pop(),i=r.pop(),l=ne(n,r);return l!==0?l:a&&i?ne(a.split("."),i.split(".")):a||i?a?-1:1:0},oe=(t,o,n)=>{Un(n);const r=Pn(t,o);return re[n].includes(r)},re={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ae=Object.keys(re),Un=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(ae.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${ae.join("|")}`)},zn=t=>typeof t=="string"&&/^[v\d]/.test(t)&&Qt.test(t);function Hn(t){const{gatewayInfo:o,supportedRange:n}=t;if(!o)return!0;const{edition:r,version:a}=o;if(!zn(a))return console.error("Invalid version"),!1;const i=n[r];if(!i)return!1;const[l,s]=i;return!(l&&oe(a,l,"<")||s&&oe(a,s,">"))}function Jn(t){const o=e.ref(0),n=e.ref(0),r=e.ref(!1);return e.watch(t,a=>{a&&!r.value&&(o.value=a.offsetWidth,n.value=a.scrollWidth,r.value=!0)}),{isTruncated:e.computed(()=>o.value<n.value)}}const P={useAxios:Tt,useDebouncedFilter:On,useDeleteUrlBuilder:Fn,useErrors:Kn,useExternalLinkCreator:Dn,useFetcher:Ln,useFetchUrlBuilder:Gt,useHelpers:Zt,useStringHelpers:qn,useI18n:jt,useGatewayFeatureSupported:Hn,useTruncationDetector:Jn},Yn={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},Wn="Copy to clipboard",Zn={message:Yn,iconTitle:Wn},Gn="kong-ui-copy-uuid-notify",ie="24px",Qn=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},Xn=t=>(e.pushScopeId("data-v-9971cc79"),t=t(),e.popScopeId(),t),to=["aria-hidden"],eo={key:0,"data-testid":"kui-icon-svg-title"},no=Xn(()=>e.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),oo=e.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ie,validator:t=>{if(typeof t=="number"&&t>0)return!0;if(typeof t=="string"){const o=String(t).replace(/px/gi,""),n=Number(o);if(n&&!isNaN(n)&&Number.isInteger(n)&&n>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(t){const o=t,n=e.computed(()=>{if(typeof o.size=="number"&&o.size>0)return`${o.size}px`;if(typeof o.size=="string"){const a=String(o.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return ie}),r=e.computed(()=>({boxSizing:"border-box",color:o.color,display:o.display,height:n.value,lineHeight:"0",width:n.value}));return(a,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.as),{"aria-hidden":t.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:e.normalizeStyle(r.value)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":t.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[t.title?(e.openBlock(),e.createElementBlock("title",eo,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),no],8,to))]),_:1},8,["aria-hidden","style"]))}}),ro=Qn(oo,[["__scopeId","data-v-9971cc79"]]),ao="16px",io={class:"kong-ui-copy-uuid"},lo=["onClick"],le=15,so=e.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:t=>["uuid","hidden","redacted","deleted"].includes(t)}},emits:["success","error"],setup(t,{emit:o}){const n=t,{t:r}=ut.createI18n("en-us",Zn),a=n.notify||e.inject(Gn,()=>{}),i=e.computed(()=>n.idTooltip?{label:n.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:n.uuid}),l=e.computed(()=>!!(n.tooltip&&n.successTooltip)),s=e.ref(n.tooltip),c=e.computed(()=>n.tooltip?{label:s.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),d=e.computed(()=>{var y;return n.format==="redacted"?"*****":n.format==="deleted"?`*${(y=n.uuid)==null?void 0:y.substring(0,5)}`:n.uuid}),u=y=>{s.value=y,setTimeout(()=>{s.value=n.tooltip},1800)},p=y=>{var m,w;if(!y(n.uuid)){typeof a=="function"&&a({type:"error",message:r("message.fail")}),l.value?u(r("message.fail")):o("error",n.uuid);return}const b=((m=n.uuid)==null?void 0:m.length)>le,f=n.format==="hidden"||n.format==="redacted"?r("message.success.prefix"):`"${((w=n.uuid)==null?void 0:w.substring(0,le))+(b?"...":"")}"`;typeof a=="function"&&a({type:"success",message:`${f}${r("message.success.content")}`}),l.value?u(n.successTooltip):o("success",n.uuid)};return(y,m)=>{const w=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",io,[t.format!=="hidden"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.idTooltip?"KTooltip":"div"),e.mergeProps({key:0},i.value,{"data-testid":"copy-id"}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["uuid-container",t.truncated?"truncated-uuid":null,t.useMono?"mono":null])},e.toDisplayString(d.value),3)]),_:1},16)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tooltip?"KTooltip":"div"),e.mergeProps(c.value,{class:"uuid-icon-wrapper"}),{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(({copyToClipboard:b})=>[e.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:e.withModifiers(f=>p(b),["stop"])},[e.createVNode(e.unref(ro),{class:"uuid-icon",color:t.iconColor,decorative:!!t.tooltip,size:e.unref(ao),title:e.unref(r)("iconTitle")},null,8,["color","decorative","size","title"])],8,lo)]),_:1})]),_:1},16))])}}}),co=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},se=co(so,[["__scopeId","data-v-0c07874b"]]),po={key:0,class:"config-card-fieldset-title"},uo=e.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(t){const o=t,{i18n:{t:n}}=P.useI18n(),{convertKeyToTitle:r}=P.useStringHelpers(),a=e.computed(()=>o.item.key??"json-array-item"),i=e.computed(()=>o.item.value??o.item),l=e.computed(()=>{const c=JSON.parse(JSON.stringify(i.value));return o.isArrayItem&&delete c.name,c}),s=e.computed(()=>{var c;return o.isArrayItem?(c=i.value)!=null&&c.name?r(i.value.name,"_"):n("baseConfigCard.general.entryTitle",{index:o.index}):""});return(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.isArrayItem?"fieldset":"div"),{class:e.normalizeClass(t.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:e.withCtx(()=>[t.isArrayItem?(e.openBlock(),e.createElementBlock("legend",po,[e.createElementVNode("b",null,e.toDisplayString(s.value),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(l.value),(u,p)=>(e.openBlock(),e.createBlock($t,{key:`${a.value}-property-${p}`,item:{key:u,label:e.unref(r)(u),value:l.value[u]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),Q=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},ce=Q(uo,[["__scopeId","data-v-68ca83ec"]]),fo=Q(e.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(t){const{i18n:{t:o}}=P.useI18n();return(n,r)=>{const a=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(a,{appearance:"tertiary",class:"navigation-button",onClick:r[0]||(r[0]=i=>n.$emit("navigation-click",t.item))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.value||e.unref(o)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),mo=e.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(t){const{i18n:{t:o}}=P.useI18n();return(n,r)=>{const a=e.resolveComponent("KBadge");return e.openBlock(),e.createBlock(a,{appearance:t.status?"success":"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.status?e.unref(o)("baseConfigCard.statusBadge.enabledLabel"):e.unref(o)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),yo="#0044f4",go="#e0e4ea",ho="#3a3f51",ko="1px",bo="20px",Co={class:"config-card-details-row"},wo=["data-testid"],So=["data-testid"],xo=["data-testid"],Bo=["data-testid"],Io={key:1},Ao=["data-testid"],No=["data-testid"],_o=["data-testid"],Eo=["data-testid"],To={name:"ConfigCardItem",components:{CopyUuid:se,JsonCardItem:ce,StatusBadge:mo,InternalLinkItem:fo}},Vo=e.defineComponent({...To,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(t,{emit:o}){const n=t;e.useCssVars(m=>({"1df60db4":d.value?"none":`solid ${e.unref(ko)} ${e.unref(go)}`,"21d1d34e":c.value&&l.value?"block":"flex","4d3dc7e7":c.value&&l.value?"100%":n.slim?"50%":"25%","4d400dc2":c.value&&l.value?"100%":n.slim?"50%":"75%"}));const r=e.useSlots(),{i18n:{t:a,formatUnixTimeStamp:i}}=P.useI18n(),l=e.computed(()=>n.item.value!==void 0&&n.item.value!==null&&n.item.value!==""),s=e.computed(()=>!!(n.item.tooltip||r["label-tooltip"])),c=e.computed(()=>n.item.type===$.Json||n.item.type===$.JsonArray),d=e.computed(()=>n.item.type===$.JsonArray),u=e.computed(()=>{switch(n.item.type){case $.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${n.item.key}-copy-uuid`,"success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,uuid:n.item.value,notify:()=>{}}};case $.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,notify:()=>{}}};case $.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${n.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,uuid:n.item.value,notify:()=>{}}};case $.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":a("baseConfigCard.copy.success"),tooltip:a("baseConfigCard.copy.tooltip",{label:n.item.label}),truncated:!1,notify:()=>{}}};case $.Date:return{tag:"div",attrs:{"data-testid":`${n.item.key}-date`},text:i(n.item.value)};case $.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${n.item.key}-badge-status`,status:n.item.value}};case $.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case $.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case $.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${n.item.key}-internal-link`,item:n.item,onNavigationClick:m=>{o("navigation-click",m)}}};case $.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${n.item.key}-external-link`,href:n.item.value},text:n.item.value};case $.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-content`,item:n.item}};case $.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-array-content`,item:n.item}};default:return{tag:"div",attrs:{"data-testid":`${n.item.key}-plain-text`},text:n.item.value}}}),p=e.ref(),{isTruncated:y}=P.useTruncationDetector(p);return(m,w)=>{const b=e.resolveComponent("KLabel"),f=e.resolveComponent("KBadge"),h=e.resolveComponent("KMethodBadge"),g=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("div",Co,[e.createElementVNode("div",{class:"config-card-details-label","data-testid":`${t.item.key}-label`},[e.renderSlot(m.$slots,"label",{item:t.item},()=>[e.createVNode(b,{"tooltip-attributes":{maxWidth:"500px"}},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.label)+" ",1)]),_:2},[s.value?{name:"tooltip",fn:e.withCtx(()=>[e.createElementVNode("div",{"data-testid":`${t.item.key}-label-tooltip`},[e.renderSlot(m.$slots,"label-tooltip",{},()=>[e.createTextVNode(e.toDisplayString(t.item.tooltip),1)],!0)],8,So)]),key:"0"}:void 0]),1024)],!0)],8,wo),e.createElementVNode("div",{class:"config-card-details-value","data-testid":`${t.item.key}-property-value`},[e.renderSlot(m.$slots,t.item.key,{rowValue:t.item.value},()=>[l.value?(e.openBlock(),e.createElementBlock("div",Io,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value.tag),e.normalizeProps(e.guardReactiveProps(u.value.attrs)),{default:e.withCtx(()=>[u.value.additionalComponent==="KBadge"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-badge-tags`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(x,k)=>(e.openBlock(),e.createBlock(f,{key:`${t.item.key}-badge-tag-${k}`,class:"config-badge","data-testid":`${t.item.key}-badge-tag-${k}`,"truncation-tooltip":x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,Ao)):e.createCommentVNode("",!0),u.value.additionalComponent==="CopyUuid"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${t.item.key}-copy-uuid-array`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(x,k)=>(e.openBlock(),e.createBlock(e.unref(se),e.mergeProps(u.value.childAttrs,{key:`${t.item.key}-copy-uuid-${k}`,"data-testid":`${t.item.key}-copy-uuid-${k}`,uuid:x}),null,16,["data-testid","uuid"]))),128))],8,No)):u.value.additionalComponent==="KMethodBadge"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${t.item.key}-badge-methods`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(x,k)=>(e.openBlock(),e.createBlock(h,{key:`${t.item.key}-badge-method-${k}`,class:"config-badge","data-testid":`${t.item.key}-badge-method-${k}`,"is-rounded":"",label:x,method:e.unref(bn.MethodsArray).includes(x.toLowerCase())?x.toLowerCase():"custom"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,_o)):e.createCommentVNode("",!0),u.value.additionalComponent==="JsonCardItem"?(e.openBlock(),e.createElementBlock("div",{key:3,"data-testid":`${n.item.key}-json-array-content`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.item.value,(x,k)=>(e.openBlock(),e.createBlock(ce,{key:`json-array-item-${k}`,index:k,"is-array-item":"",item:x},null,8,["index","item"]))),128))],8,Eo)):(e.openBlock(),e.createBlock(g,{key:4,label:e.unref(y)?t.item.value:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:p,class:e.normalizeClass(["attrs-data-text",{truncated:t.truncated}])},e.toDisplayString(u.value.text),3)]),_:1},8,["label"]))]),_:1},16))])):(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${t.item.key}-no-value`}," – ",8,Bo))],!0)],8,xo)])}}}),$t=Q(Vo,[["__scopeId","data-v-307ab96d"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function de(t){return typeof t>"u"||t===null}function jo(t){return typeof t=="object"&&t!==null}function $o(t){return Array.isArray(t)?t:de(t)?[]:[t]}function Mo(t,o){var n,r,a,i;if(o)for(i=Object.keys(o),n=0,r=i.length;n<r;n+=1)a=i[n],t[a]=o[a];return t}function Oo(t,o){var n="",r;for(r=0;r<o;r+=1)n+=t;return n}function Fo(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Ko=de,Do=jo,Lo=$o,qo=Oo,vo=Fo,Ro=Mo,R={isNothing:Ko,isObject:Do,toArray:Lo,repeat:qo,isNegativeZero:vo,extend:Ro};function pe(t,o){var n="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!o&&t.mark.snippet&&(n+=`
2
2
 
3
- `+t.mark.snippet),r+" "+n):r}function ft(t,o){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=o,this.message=pe(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ft.prototype=Object.create(Error.prototype),ft.prototype.constructor=ft,ft.prototype.toString=function(t){return this.name+": "+pe(this,t)};var J=ft;function Ot(t,o,n,r,a){var i="",l="",s=Math.floor(a/2)-1;return r-o>s&&(i=" ... ",o=r-s+i.length),n-r>s&&(l=" ...",n=r+s-l.length),{str:i+t.slice(o,n).replace(/\t/g,"→")+l,pos:r-o+i.length}}function Ft(t,o){return q.repeat(" ",o-t.length)+t}function Ro(t,o){if(o=Object.create(o||null),!t.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],a=[],i,l=-1;i=n.exec(t.buffer);)a.push(i.index),r.push(i.index+i[0].length),t.position<=i.index&&l<0&&(l=r.length-2);l<0&&(l=r.length-1);var s="",c,d,u=Math.min(t.line+o.linesAfter,a.length).toString().length,p=o.maxLength-(o.indent+u+3);for(c=1;c<=o.linesBefore&&!(l-c<0);c++)d=Ot(t.buffer,r[l-c],a[l-c],t.position-(r[l]-r[l-c]),p),s=q.repeat(" ",o.indent)+Ft((t.line-c+1).toString(),u)+" | "+d.str+`
4
- `+s;for(d=Ot(t.buffer,r[l],a[l],t.position,p),s+=q.repeat(" ",o.indent)+Ft((t.line+1).toString(),u)+" | "+d.str+`
5
- `,s+=q.repeat("-",o.indent+u+3+d.pos)+`^
6
- `,c=1;c<=o.linesAfter&&!(l+c>=a.length);c++)d=Ot(t.buffer,r[l+c],a[l+c],t.position-(r[l]-r[l+c]),p),s+=q.repeat(" ",o.indent)+Ft((t.line+c+1).toString(),u)+" | "+d.str+`
7
- `;return s.replace(/\n$/,"")}var Uo=Ro,zo=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ho=["scalar","sequence","mapping"];function Jo(t){var o={};return t!==null&&Object.keys(t).forEach(function(n){t[n].forEach(function(r){o[String(r)]=n})}),o}function Yo(t,o){if(o=o||{},Object.keys(o).forEach(function(n){if(zo.indexOf(n)===-1)throw new J('Unknown option "'+n+'" is met in definition of "'+t+'" YAML type.')}),this.options=o,this.tag=t,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(n){return n},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=Jo(o.styleAliases||null),Ho.indexOf(this.kind)===-1)throw new J('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var U=Yo;function ue(t,o){var n=[];return t[o].forEach(function(r){var a=n.length;n.forEach(function(i,l){i.tag===r.tag&&i.kind===r.kind&&i.multi===r.multi&&(a=l)}),n[a]=r}),n}function Wo(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},o,n;function r(a){a.multi?(t.multi[a.kind].push(a),t.multi.fallback.push(a)):t[a.kind][a.tag]=t.fallback[a.tag]=a}for(o=0,n=arguments.length;o<n;o+=1)arguments[o].forEach(r);return t}function Mt(t){return this.extend(t)}Mt.prototype.extend=function(t){var o=[],n=[];if(t instanceof U)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(o=o.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new J("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.forEach(function(a){if(!(a instanceof U))throw new J("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new J("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new J("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof U))throw new J("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(Mt.prototype);return r.implicit=(this.implicit||[]).concat(o),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=ue(r,"implicit"),r.compiledExplicit=ue(r,"explicit"),r.compiledTypeMap=Wo(r.compiledImplicit,r.compiledExplicit),r};var fe=Mt,me=new U("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),ye=new U("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),ge=new U("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),he=new fe({explicit:[me,ye,ge]});function Go(t){if(t===null)return!0;var o=t.length;return o===1&&t==="~"||o===4&&(t==="null"||t==="Null"||t==="NULL")}function Zo(){return null}function Xo(t){return t===null}var ke=new U("tag:yaml.org,2002:null",{kind:"scalar",resolve:Go,construct:Zo,predicate:Xo,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Qo(t){if(t===null)return!1;var o=t.length;return o===4&&(t==="true"||t==="True"||t==="TRUE")||o===5&&(t==="false"||t==="False"||t==="FALSE")}function tr(t){return t==="true"||t==="True"||t==="TRUE"}function er(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var be=new U("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Qo,construct:tr,predicate:er,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function nr(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function or(t){return 48<=t&&t<=55}function rr(t){return 48<=t&&t<=57}function ar(t){if(t===null)return!1;var o=t.length,n=0,r=!1,a;if(!o)return!1;if(a=t[n],(a==="-"||a==="+")&&(a=t[++n]),a==="0"){if(n+1===o)return!0;if(a=t[++n],a==="b"){for(n++;n<o;n++)if(a=t[n],a!=="_"){if(a!=="0"&&a!=="1")return!1;r=!0}return r&&a!=="_"}if(a==="x"){for(n++;n<o;n++)if(a=t[n],a!=="_"){if(!nr(t.charCodeAt(n)))return!1;r=!0}return r&&a!=="_"}if(a==="o"){for(n++;n<o;n++)if(a=t[n],a!=="_"){if(!or(t.charCodeAt(n)))return!1;r=!0}return r&&a!=="_"}}if(a==="_")return!1;for(;n<o;n++)if(a=t[n],a!=="_"){if(!rr(t.charCodeAt(n)))return!1;r=!0}return!(!r||a==="_")}function ir(t){var o=t,n=1,r;if(o.indexOf("_")!==-1&&(o=o.replace(/_/g,"")),r=o[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),o=o.slice(1),r=o[0]),o==="0")return 0;if(r==="0"){if(o[1]==="b")return n*parseInt(o.slice(2),2);if(o[1]==="x")return n*parseInt(o.slice(2),16);if(o[1]==="o")return n*parseInt(o.slice(2),8)}return n*parseInt(o,10)}function lr(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!q.isNegativeZero(t)}var Ce=new U("tag:yaml.org,2002:int",{kind:"scalar",resolve:ar,construct:ir,predicate:lr,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),sr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function cr(t){return!(t===null||!sr.test(t)||t[t.length-1]==="_")}function dr(t){var o,n;return o=t.replace(/_/g,"").toLowerCase(),n=o[0]==="-"?-1:1,"+-".indexOf(o[0])>=0&&(o=o.slice(1)),o===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:o===".nan"?NaN:n*parseFloat(o,10)}var pr=/^[-+]?[0-9]+e/;function ur(t,o){var n;if(isNaN(t))switch(o){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(o){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(o){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(q.isNegativeZero(t))return"-0.0";return n=t.toString(10),pr.test(n)?n.replace("e",".e"):n}function fr(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||q.isNegativeZero(t))}var we=new U("tag:yaml.org,2002:float",{kind:"scalar",resolve:cr,construct:dr,predicate:fr,represent:ur,defaultStyle:"lowercase"}),Se=he.extend({implicit:[ke,be,Ce,we]}),xe=Se,Be=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ne=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function mr(t){return t===null?!1:Be.exec(t)!==null||Ne.exec(t)!==null}function yr(t){var o,n,r,a,i,l,s,c=0,d=null,u,p,y;if(o=Be.exec(t),o===null&&(o=Ne.exec(t)),o===null)throw new Error("Date resolve error");if(n=+o[1],r=+o[2]-1,a=+o[3],!o[4])return new Date(Date.UTC(n,r,a));if(i=+o[4],l=+o[5],s=+o[6],o[7]){for(c=o[7].slice(0,3);c.length<3;)c+="0";c=+c}return o[9]&&(u=+o[10],p=+(o[11]||0),d=(u*60+p)*6e4,o[9]==="-"&&(d=-d)),y=new Date(Date.UTC(n,r,a,i,l,s,c)),d&&y.setTime(y.getTime()-d),y}function gr(t){return t.toISOString()}var Ie=new U("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:mr,construct:yr,instanceOf:Date,represent:gr});function hr(t){return t==="<<"||t===null}var Ae=new U("tag:yaml.org,2002:merge",{kind:"scalar",resolve:hr}),Kt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8
- \r`;function kr(t){if(t===null)return!1;var o,n,r=0,a=t.length,i=Kt;for(n=0;n<a;n++)if(o=i.indexOf(t.charAt(n)),!(o>64)){if(o<0)return!1;r+=6}return r%8===0}function br(t){var o,n,r=t.replace(/[\r\n=]/g,""),a=r.length,i=Kt,l=0,s=[];for(o=0;o<a;o++)o%4===0&&o&&(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)),l=l<<6|i.indexOf(r.charAt(o));return n=a%4*6,n===0?(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)):n===18?(s.push(l>>10&255),s.push(l>>2&255)):n===12&&s.push(l>>4&255),new Uint8Array(s)}function Cr(t){var o="",n=0,r,a,i=t.length,l=Kt;for(r=0;r<i;r++)r%3===0&&r&&(o+=l[n>>18&63],o+=l[n>>12&63],o+=l[n>>6&63],o+=l[n&63]),n=(n<<8)+t[r];return a=i%3,a===0?(o+=l[n>>18&63],o+=l[n>>12&63],o+=l[n>>6&63],o+=l[n&63]):a===2?(o+=l[n>>10&63],o+=l[n>>4&63],o+=l[n<<2&63],o+=l[64]):a===1&&(o+=l[n>>2&63],o+=l[n<<4&63],o+=l[64],o+=l[64]),o}function wr(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var _e=new U("tag:yaml.org,2002:binary",{kind:"scalar",resolve:kr,construct:br,predicate:wr,represent:Cr}),Sr=Object.prototype.hasOwnProperty,xr=Object.prototype.toString;function Br(t){if(t===null)return!0;var o=[],n,r,a,i,l,s=t;for(n=0,r=s.length;n<r;n+=1){if(a=s[n],l=!1,xr.call(a)!=="[object Object]")return!1;for(i in a)if(Sr.call(a,i))if(!l)l=!0;else return!1;if(!l)return!1;if(o.indexOf(i)===-1)o.push(i);else return!1}return!0}function Nr(t){return t!==null?t:[]}var Te=new U("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Br,construct:Nr}),Ir=Object.prototype.toString;function Ar(t){if(t===null)return!0;var o,n,r,a,i,l=t;for(i=new Array(l.length),o=0,n=l.length;o<n;o+=1){if(r=l[o],Ir.call(r)!=="[object Object]"||(a=Object.keys(r),a.length!==1))return!1;i[o]=[a[0],r[a[0]]]}return!0}function _r(t){if(t===null)return[];var o,n,r,a,i,l=t;for(i=new Array(l.length),o=0,n=l.length;o<n;o+=1)r=l[o],a=Object.keys(r),i[o]=[a[0],r[a[0]]];return i}var Ee=new U("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ar,construct:_r}),Tr=Object.prototype.hasOwnProperty;function Er(t){if(t===null)return!0;var o,n=t;for(o in n)if(Tr.call(n,o)&&n[o]!==null)return!1;return!0}function Vr(t){return t!==null?t:{}}var Ve=new U("tag:yaml.org,2002:set",{kind:"mapping",resolve:Er,construct:Vr}),Dt=xe.extend({implicit:[Ie,Ae],explicit:[_e,Te,Ee,Ve]}),nt=Object.prototype.hasOwnProperty,Ct=1,$e=2,je=3,wt=4,Lt=1,$r=2,Oe=3,jr=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Or=/[\x85\u2028\u2029]/,Fr=/[,\[\]\{\}]/,Fe=/^(?:!|!!|![a-z\-]+!)$/i,Me=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ke(t){return Object.prototype.toString.call(t)}function Q(t){return t===10||t===13}function at(t){return t===9||t===32}function W(t){return t===9||t===32||t===10||t===13}function lt(t){return t===44||t===91||t===93||t===123||t===125}function Mr(t){var o;return 48<=t&&t<=57?t-48:(o=t|32,97<=o&&o<=102?o-97+10:-1)}function Kr(t){return t===120?2:t===117?4:t===85?8:0}function Dr(t){return 48<=t&&t<=57?t-48:-1}function De(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
9
- `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function Lr(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}for(var Le=new Array(256),qe=new Array(256),st=0;st<256;st++)Le[st]=De(st)?1:0,qe[st]=De(st);function qr(t,o){this.input=t,this.filename=o.filename||null,this.schema=o.schema||Dt,this.onWarning=o.onWarning||null,this.legacy=o.legacy||!1,this.json=o.json||!1,this.listener=o.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ve(t,o){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=Uo(n),new J(o,n)}function x(t,o){throw ve(t,o)}function St(t,o){t.onWarning&&t.onWarning.call(null,ve(t,o))}var Pe={YAML:function(t,o,n){var r,a,i;t.version!==null&&x(t,"duplication of %YAML directive"),n.length!==1&&x(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&x(t,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),i=parseInt(r[2],10),a!==1&&x(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=i<2,i!==1&&i!==2&&St(t,"unsupported YAML version of the document")},TAG:function(t,o,n){var r,a;n.length!==2&&x(t,"TAG directive accepts exactly two arguments"),r=n[0],a=n[1],Fe.test(r)||x(t,"ill-formed tag handle (first argument) of the TAG directive"),nt.call(t.tagMap,r)&&x(t,'there is a previously declared suffix for "'+r+'" tag handle'),Me.test(a)||x(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{x(t,"tag prefix is malformed: "+a)}t.tagMap[r]=a}};function ot(t,o,n,r){var a,i,l,s;if(o<n){if(s=t.input.slice(o,n),r)for(a=0,i=s.length;a<i;a+=1)l=s.charCodeAt(a),l===9||32<=l&&l<=1114111||x(t,"expected valid JSON character");else jr.test(s)&&x(t,"the stream contains non-printable characters");t.result+=s}}function Re(t,o,n,r){var a,i,l,s;for(q.isObject(n)||x(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(n),l=0,s=a.length;l<s;l+=1)i=a[l],nt.call(o,i)||(o[i]=n[i],r[i]=!0)}function ct(t,o,n,r,a,i,l,s,c){var d,u;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),d=0,u=a.length;d<u;d+=1)Array.isArray(a[d])&&x(t,"nested arrays are not supported inside keys"),typeof a=="object"&&Ke(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&Ke(a)==="[object Object]"&&(a="[object Object]"),a=String(a),o===null&&(o={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(d=0,u=i.length;d<u;d+=1)Re(t,o,i[d],n);else Re(t,o,i,n);else!t.json&&!nt.call(n,a)&&nt.call(o,a)&&(t.line=l||t.line,t.lineStart=s||t.lineStart,t.position=c||t.position,x(t,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(o,a,{configurable:!0,enumerable:!0,writable:!0,value:i}):o[a]=i,delete n[a];return o}function qt(t){var o;o=t.input.charCodeAt(t.position),o===10?t.position++:o===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):x(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function M(t,o,n){for(var r=0,a=t.input.charCodeAt(t.position);a!==0;){for(;at(a);)a===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),a=t.input.charCodeAt(++t.position);if(o&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(Q(a))for(qt(t),a=t.input.charCodeAt(t.position),r++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return n!==-1&&r!==0&&t.lineIndent<n&&St(t,"deficient indentation"),r}function xt(t){var o=t.position,n;return n=t.input.charCodeAt(o),!!((n===45||n===46)&&n===t.input.charCodeAt(o+1)&&n===t.input.charCodeAt(o+2)&&(o+=3,n=t.input.charCodeAt(o),n===0||W(n)))}function vt(t,o){o===1?t.result+=" ":o>1&&(t.result+=q.repeat(`
10
- `,o-1))}function vr(t,o,n){var r,a,i,l,s,c,d,u,p=t.kind,y=t.result,m;if(m=t.input.charCodeAt(t.position),W(m)||lt(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(a=t.input.charCodeAt(t.position+1),W(a)||n&&lt(a)))return!1;for(t.kind="scalar",t.result="",i=l=t.position,s=!1;m!==0;){if(m===58){if(a=t.input.charCodeAt(t.position+1),W(a)||n&&lt(a))break}else if(m===35){if(r=t.input.charCodeAt(t.position-1),W(r))break}else{if(t.position===t.lineStart&&xt(t)||n&&lt(m))break;if(Q(m))if(c=t.line,d=t.lineStart,u=t.lineIndent,M(t,!1,-1),t.lineIndent>=o){s=!0,m=t.input.charCodeAt(t.position);continue}else{t.position=l,t.line=c,t.lineStart=d,t.lineIndent=u;break}}s&&(ot(t,i,l,!1),vt(t,t.line-c),i=l=t.position,s=!1),at(m)||(l=t.position+1),m=t.input.charCodeAt(++t.position)}return ot(t,i,l,!1),t.result?!0:(t.kind=p,t.result=y,!1)}function Pr(t,o){var n,r,a;if(n=t.input.charCodeAt(t.position),n!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=a=t.position;(n=t.input.charCodeAt(t.position))!==0;)if(n===39)if(ot(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),n===39)r=t.position,t.position++,a=t.position;else return!0;else Q(n)?(ot(t,r,a,!0),vt(t,M(t,!1,o)),r=a=t.position):t.position===t.lineStart&&xt(t)?x(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);x(t,"unexpected end of the stream within a single quoted scalar")}function Rr(t,o){var n,r,a,i,l,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return ot(t,n,t.position,!0),t.position++,!0;if(s===92){if(ot(t,n,t.position,!0),s=t.input.charCodeAt(++t.position),Q(s))M(t,!1,o);else if(s<256&&Le[s])t.result+=qe[s],t.position++;else if((l=Kr(s))>0){for(a=l,i=0;a>0;a--)s=t.input.charCodeAt(++t.position),(l=Mr(s))>=0?i=(i<<4)+l:x(t,"expected hexadecimal character");t.result+=Lr(i),t.position++}else x(t,"unknown escape sequence");n=r=t.position}else Q(s)?(ot(t,n,r,!0),vt(t,M(t,!1,o)),n=r=t.position):t.position===t.lineStart&&xt(t)?x(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}x(t,"unexpected end of the stream within a double quoted scalar")}function Ur(t,o){var n=!0,r,a,i,l=t.tag,s,c=t.anchor,d,u,p,y,m,S=Object.create(null),k,f,h,g;if(g=t.input.charCodeAt(t.position),g===91)u=93,m=!1,s=[];else if(g===123)u=125,m=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),g=t.input.charCodeAt(++t.position);g!==0;){if(M(t,!0,o),g=t.input.charCodeAt(t.position),g===u)return t.position++,t.tag=l,t.anchor=c,t.kind=m?"mapping":"sequence",t.result=s,!0;n?g===44&&x(t,"expected the node content, but found ','"):x(t,"missed comma between flow collection entries"),f=k=h=null,p=y=!1,g===63&&(d=t.input.charCodeAt(t.position+1),W(d)&&(p=y=!0,t.position++,M(t,!0,o))),r=t.line,a=t.lineStart,i=t.position,dt(t,o,Ct,!1,!0),f=t.tag,k=t.result,M(t,!0,o),g=t.input.charCodeAt(t.position),(y||t.line===r)&&g===58&&(p=!0,g=t.input.charCodeAt(++t.position),M(t,!0,o),dt(t,o,Ct,!1,!0),h=t.result),m?ct(t,s,S,f,k,h,r,a,i):p?s.push(ct(t,null,S,f,k,h,r,a,i)):s.push(k),M(t,!0,o),g=t.input.charCodeAt(t.position),g===44?(n=!0,g=t.input.charCodeAt(++t.position)):n=!1}x(t,"unexpected end of the stream within a flow collection")}function zr(t,o){var n,r,a=Lt,i=!1,l=!1,s=o,c=0,d=!1,u,p;if(p=t.input.charCodeAt(t.position),p===124)r=!1;else if(p===62)r=!0;else return!1;for(t.kind="scalar",t.result="";p!==0;)if(p=t.input.charCodeAt(++t.position),p===43||p===45)Lt===a?a=p===43?Oe:$r:x(t,"repeat of a chomping mode identifier");else if((u=Dr(p))>=0)u===0?x(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?x(t,"repeat of an indentation width identifier"):(s=o+u-1,l=!0);else break;if(at(p)){do p=t.input.charCodeAt(++t.position);while(at(p));if(p===35)do p=t.input.charCodeAt(++t.position);while(!Q(p)&&p!==0)}for(;p!==0;){for(qt(t),t.lineIndent=0,p=t.input.charCodeAt(t.position);(!l||t.lineIndent<s)&&p===32;)t.lineIndent++,p=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>s&&(s=t.lineIndent),Q(p)){c++;continue}if(t.lineIndent<s){a===Oe?t.result+=q.repeat(`
3
+ `+t.mark.snippet),r+" "+n):r}function ft(t,o){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=o,this.message=pe(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ft.prototype=Object.create(Error.prototype),ft.prototype.constructor=ft,ft.prototype.toString=function(t){return this.name+": "+pe(this,t)};var J=ft;function Mt(t,o,n,r,a){var i="",l="",s=Math.floor(a/2)-1;return r-o>s&&(i=" ... ",o=r-s+i.length),n-r>s&&(l=" ...",n=r+s-l.length),{str:i+t.slice(o,n).replace(/\t/g,"→")+l,pos:r-o+i.length}}function Ot(t,o){return R.repeat(" ",o-t.length)+t}function Po(t,o){if(o=Object.create(o||null),!t.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],a=[],i,l=-1;i=n.exec(t.buffer);)a.push(i.index),r.push(i.index+i[0].length),t.position<=i.index&&l<0&&(l=r.length-2);l<0&&(l=r.length-1);var s="",c,d,u=Math.min(t.line+o.linesAfter,a.length).toString().length,p=o.maxLength-(o.indent+u+3);for(c=1;c<=o.linesBefore&&!(l-c<0);c++)d=Mt(t.buffer,r[l-c],a[l-c],t.position-(r[l]-r[l-c]),p),s=R.repeat(" ",o.indent)+Ot((t.line-c+1).toString(),u)+" | "+d.str+`
4
+ `+s;for(d=Mt(t.buffer,r[l],a[l],t.position,p),s+=R.repeat(" ",o.indent)+Ot((t.line+1).toString(),u)+" | "+d.str+`
5
+ `,s+=R.repeat("-",o.indent+u+3+d.pos)+`^
6
+ `,c=1;c<=o.linesAfter&&!(l+c>=a.length);c++)d=Mt(t.buffer,r[l+c],a[l+c],t.position-(r[l]-r[l+c]),p),s+=R.repeat(" ",o.indent)+Ot((t.line+c+1).toString(),u)+" | "+d.str+`
7
+ `;return s.replace(/\n$/,"")}var Uo=Po,zo=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ho=["scalar","sequence","mapping"];function Jo(t){var o={};return t!==null&&Object.keys(t).forEach(function(n){t[n].forEach(function(r){o[String(r)]=n})}),o}function Yo(t,o){if(o=o||{},Object.keys(o).forEach(function(n){if(zo.indexOf(n)===-1)throw new J('Unknown option "'+n+'" is met in definition of "'+t+'" YAML type.')}),this.options=o,this.tag=t,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(n){return n},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=Jo(o.styleAliases||null),Ho.indexOf(this.kind)===-1)throw new J('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var z=Yo;function ue(t,o){var n=[];return t[o].forEach(function(r){var a=n.length;n.forEach(function(i,l){i.tag===r.tag&&i.kind===r.kind&&i.multi===r.multi&&(a=l)}),n[a]=r}),n}function Wo(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},o,n;function r(a){a.multi?(t.multi[a.kind].push(a),t.multi.fallback.push(a)):t[a.kind][a.tag]=t.fallback[a.tag]=a}for(o=0,n=arguments.length;o<n;o+=1)arguments[o].forEach(r);return t}function Ft(t){return this.extend(t)}Ft.prototype.extend=function(t){var o=[],n=[];if(t instanceof z)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(o=o.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new J("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.forEach(function(a){if(!(a instanceof z))throw new J("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new J("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new J("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof z))throw new J("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(Ft.prototype);return r.implicit=(this.implicit||[]).concat(o),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=ue(r,"implicit"),r.compiledExplicit=ue(r,"explicit"),r.compiledTypeMap=Wo(r.compiledImplicit,r.compiledExplicit),r};var fe=Ft,me=new z("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),ye=new z("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),ge=new z("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),he=new fe({explicit:[me,ye,ge]});function Zo(t){if(t===null)return!0;var o=t.length;return o===1&&t==="~"||o===4&&(t==="null"||t==="Null"||t==="NULL")}function Go(){return null}function Qo(t){return t===null}var ke=new z("tag:yaml.org,2002:null",{kind:"scalar",resolve:Zo,construct:Go,predicate:Qo,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Xo(t){if(t===null)return!1;var o=t.length;return o===4&&(t==="true"||t==="True"||t==="TRUE")||o===5&&(t==="false"||t==="False"||t==="FALSE")}function tr(t){return t==="true"||t==="True"||t==="TRUE"}function er(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var be=new z("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Xo,construct:tr,predicate:er,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function nr(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function or(t){return 48<=t&&t<=55}function rr(t){return 48<=t&&t<=57}function ar(t){if(t===null)return!1;var o=t.length,n=0,r=!1,a;if(!o)return!1;if(a=t[n],(a==="-"||a==="+")&&(a=t[++n]),a==="0"){if(n+1===o)return!0;if(a=t[++n],a==="b"){for(n++;n<o;n++)if(a=t[n],a!=="_"){if(a!=="0"&&a!=="1")return!1;r=!0}return r&&a!=="_"}if(a==="x"){for(n++;n<o;n++)if(a=t[n],a!=="_"){if(!nr(t.charCodeAt(n)))return!1;r=!0}return r&&a!=="_"}if(a==="o"){for(n++;n<o;n++)if(a=t[n],a!=="_"){if(!or(t.charCodeAt(n)))return!1;r=!0}return r&&a!=="_"}}if(a==="_")return!1;for(;n<o;n++)if(a=t[n],a!=="_"){if(!rr(t.charCodeAt(n)))return!1;r=!0}return!(!r||a==="_")}function ir(t){var o=t,n=1,r;if(o.indexOf("_")!==-1&&(o=o.replace(/_/g,"")),r=o[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),o=o.slice(1),r=o[0]),o==="0")return 0;if(r==="0"){if(o[1]==="b")return n*parseInt(o.slice(2),2);if(o[1]==="x")return n*parseInt(o.slice(2),16);if(o[1]==="o")return n*parseInt(o.slice(2),8)}return n*parseInt(o,10)}function lr(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!R.isNegativeZero(t)}var Ce=new z("tag:yaml.org,2002:int",{kind:"scalar",resolve:ar,construct:ir,predicate:lr,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),sr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function cr(t){return!(t===null||!sr.test(t)||t[t.length-1]==="_")}function dr(t){var o,n;return o=t.replace(/_/g,"").toLowerCase(),n=o[0]==="-"?-1:1,"+-".indexOf(o[0])>=0&&(o=o.slice(1)),o===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:o===".nan"?NaN:n*parseFloat(o,10)}var pr=/^[-+]?[0-9]+e/;function ur(t,o){var n;if(isNaN(t))switch(o){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(o){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(o){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(R.isNegativeZero(t))return"-0.0";return n=t.toString(10),pr.test(n)?n.replace("e",".e"):n}function fr(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||R.isNegativeZero(t))}var we=new z("tag:yaml.org,2002:float",{kind:"scalar",resolve:cr,construct:dr,predicate:fr,represent:ur,defaultStyle:"lowercase"}),Se=he.extend({implicit:[ke,be,Ce,we]}),xe=Se,Be=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ie=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function mr(t){return t===null?!1:Be.exec(t)!==null||Ie.exec(t)!==null}function yr(t){var o,n,r,a,i,l,s,c=0,d=null,u,p,y;if(o=Be.exec(t),o===null&&(o=Ie.exec(t)),o===null)throw new Error("Date resolve error");if(n=+o[1],r=+o[2]-1,a=+o[3],!o[4])return new Date(Date.UTC(n,r,a));if(i=+o[4],l=+o[5],s=+o[6],o[7]){for(c=o[7].slice(0,3);c.length<3;)c+="0";c=+c}return o[9]&&(u=+o[10],p=+(o[11]||0),d=(u*60+p)*6e4,o[9]==="-"&&(d=-d)),y=new Date(Date.UTC(n,r,a,i,l,s,c)),d&&y.setTime(y.getTime()-d),y}function gr(t){return t.toISOString()}var Ae=new z("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:mr,construct:yr,instanceOf:Date,represent:gr});function hr(t){return t==="<<"||t===null}var Ne=new z("tag:yaml.org,2002:merge",{kind:"scalar",resolve:hr}),Kt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8
+ \r`;function kr(t){if(t===null)return!1;var o,n,r=0,a=t.length,i=Kt;for(n=0;n<a;n++)if(o=i.indexOf(t.charAt(n)),!(o>64)){if(o<0)return!1;r+=6}return r%8===0}function br(t){var o,n,r=t.replace(/[\r\n=]/g,""),a=r.length,i=Kt,l=0,s=[];for(o=0;o<a;o++)o%4===0&&o&&(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)),l=l<<6|i.indexOf(r.charAt(o));return n=a%4*6,n===0?(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)):n===18?(s.push(l>>10&255),s.push(l>>2&255)):n===12&&s.push(l>>4&255),new Uint8Array(s)}function Cr(t){var o="",n=0,r,a,i=t.length,l=Kt;for(r=0;r<i;r++)r%3===0&&r&&(o+=l[n>>18&63],o+=l[n>>12&63],o+=l[n>>6&63],o+=l[n&63]),n=(n<<8)+t[r];return a=i%3,a===0?(o+=l[n>>18&63],o+=l[n>>12&63],o+=l[n>>6&63],o+=l[n&63]):a===2?(o+=l[n>>10&63],o+=l[n>>4&63],o+=l[n<<2&63],o+=l[64]):a===1&&(o+=l[n>>2&63],o+=l[n<<4&63],o+=l[64],o+=l[64]),o}function wr(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var _e=new z("tag:yaml.org,2002:binary",{kind:"scalar",resolve:kr,construct:br,predicate:wr,represent:Cr}),Sr=Object.prototype.hasOwnProperty,xr=Object.prototype.toString;function Br(t){if(t===null)return!0;var o=[],n,r,a,i,l,s=t;for(n=0,r=s.length;n<r;n+=1){if(a=s[n],l=!1,xr.call(a)!=="[object Object]")return!1;for(i in a)if(Sr.call(a,i))if(!l)l=!0;else return!1;if(!l)return!1;if(o.indexOf(i)===-1)o.push(i);else return!1}return!0}function Ir(t){return t!==null?t:[]}var Ee=new z("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Br,construct:Ir}),Ar=Object.prototype.toString;function Nr(t){if(t===null)return!0;var o,n,r,a,i,l=t;for(i=new Array(l.length),o=0,n=l.length;o<n;o+=1){if(r=l[o],Ar.call(r)!=="[object Object]"||(a=Object.keys(r),a.length!==1))return!1;i[o]=[a[0],r[a[0]]]}return!0}function _r(t){if(t===null)return[];var o,n,r,a,i,l=t;for(i=new Array(l.length),o=0,n=l.length;o<n;o+=1)r=l[o],a=Object.keys(r),i[o]=[a[0],r[a[0]]];return i}var Te=new z("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Nr,construct:_r}),Er=Object.prototype.hasOwnProperty;function Tr(t){if(t===null)return!0;var o,n=t;for(o in n)if(Er.call(n,o)&&n[o]!==null)return!1;return!0}function Vr(t){return t!==null?t:{}}var Ve=new z("tag:yaml.org,2002:set",{kind:"mapping",resolve:Tr,construct:Vr}),Dt=xe.extend({implicit:[Ae,Ne],explicit:[_e,Ee,Te,Ve]}),ot=Object.prototype.hasOwnProperty,Ct=1,je=2,$e=3,wt=4,Lt=1,jr=2,Me=3,$r=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Mr=/[\x85\u2028\u2029]/,Or=/[,\[\]\{\}]/,Oe=/^(?:!|!!|![a-z\-]+!)$/i,Fe=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ke(t){return Object.prototype.toString.call(t)}function X(t){return t===10||t===13}function it(t){return t===9||t===32}function W(t){return t===9||t===32||t===10||t===13}function lt(t){return t===44||t===91||t===93||t===123||t===125}function Fr(t){var o;return 48<=t&&t<=57?t-48:(o=t|32,97<=o&&o<=102?o-97+10:-1)}function Kr(t){return t===120?2:t===117?4:t===85?8:0}function Dr(t){return 48<=t&&t<=57?t-48:-1}function De(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
9
+ `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function Lr(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}for(var Le=new Array(256),qe=new Array(256),st=0;st<256;st++)Le[st]=De(st)?1:0,qe[st]=De(st);function qr(t,o){this.input=t,this.filename=o.filename||null,this.schema=o.schema||Dt,this.onWarning=o.onWarning||null,this.legacy=o.legacy||!1,this.json=o.json||!1,this.listener=o.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ve(t,o){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=Uo(n),new J(o,n)}function S(t,o){throw ve(t,o)}function St(t,o){t.onWarning&&t.onWarning.call(null,ve(t,o))}var Re={YAML:function(t,o,n){var r,a,i;t.version!==null&&S(t,"duplication of %YAML directive"),n.length!==1&&S(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&S(t,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),i=parseInt(r[2],10),a!==1&&S(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=i<2,i!==1&&i!==2&&St(t,"unsupported YAML version of the document")},TAG:function(t,o,n){var r,a;n.length!==2&&S(t,"TAG directive accepts exactly two arguments"),r=n[0],a=n[1],Oe.test(r)||S(t,"ill-formed tag handle (first argument) of the TAG directive"),ot.call(t.tagMap,r)&&S(t,'there is a previously declared suffix for "'+r+'" tag handle'),Fe.test(a)||S(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{S(t,"tag prefix is malformed: "+a)}t.tagMap[r]=a}};function rt(t,o,n,r){var a,i,l,s;if(o<n){if(s=t.input.slice(o,n),r)for(a=0,i=s.length;a<i;a+=1)l=s.charCodeAt(a),l===9||32<=l&&l<=1114111||S(t,"expected valid JSON character");else $r.test(s)&&S(t,"the stream contains non-printable characters");t.result+=s}}function Pe(t,o,n,r){var a,i,l,s;for(R.isObject(n)||S(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(n),l=0,s=a.length;l<s;l+=1)i=a[l],ot.call(o,i)||(o[i]=n[i],r[i]=!0)}function ct(t,o,n,r,a,i,l,s,c){var d,u;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),d=0,u=a.length;d<u;d+=1)Array.isArray(a[d])&&S(t,"nested arrays are not supported inside keys"),typeof a=="object"&&Ke(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&Ke(a)==="[object Object]"&&(a="[object Object]"),a=String(a),o===null&&(o={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(d=0,u=i.length;d<u;d+=1)Pe(t,o,i[d],n);else Pe(t,o,i,n);else!t.json&&!ot.call(n,a)&&ot.call(o,a)&&(t.line=l||t.line,t.lineStart=s||t.lineStart,t.position=c||t.position,S(t,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(o,a,{configurable:!0,enumerable:!0,writable:!0,value:i}):o[a]=i,delete n[a];return o}function qt(t){var o;o=t.input.charCodeAt(t.position),o===10?t.position++:o===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):S(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function L(t,o,n){for(var r=0,a=t.input.charCodeAt(t.position);a!==0;){for(;it(a);)a===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),a=t.input.charCodeAt(++t.position);if(o&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(X(a))for(qt(t),a=t.input.charCodeAt(t.position),r++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return n!==-1&&r!==0&&t.lineIndent<n&&St(t,"deficient indentation"),r}function xt(t){var o=t.position,n;return n=t.input.charCodeAt(o),!!((n===45||n===46)&&n===t.input.charCodeAt(o+1)&&n===t.input.charCodeAt(o+2)&&(o+=3,n=t.input.charCodeAt(o),n===0||W(n)))}function vt(t,o){o===1?t.result+=" ":o>1&&(t.result+=R.repeat(`
10
+ `,o-1))}function vr(t,o,n){var r,a,i,l,s,c,d,u,p=t.kind,y=t.result,m;if(m=t.input.charCodeAt(t.position),W(m)||lt(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(a=t.input.charCodeAt(t.position+1),W(a)||n&&lt(a)))return!1;for(t.kind="scalar",t.result="",i=l=t.position,s=!1;m!==0;){if(m===58){if(a=t.input.charCodeAt(t.position+1),W(a)||n&&lt(a))break}else if(m===35){if(r=t.input.charCodeAt(t.position-1),W(r))break}else{if(t.position===t.lineStart&&xt(t)||n&&lt(m))break;if(X(m))if(c=t.line,d=t.lineStart,u=t.lineIndent,L(t,!1,-1),t.lineIndent>=o){s=!0,m=t.input.charCodeAt(t.position);continue}else{t.position=l,t.line=c,t.lineStart=d,t.lineIndent=u;break}}s&&(rt(t,i,l,!1),vt(t,t.line-c),i=l=t.position,s=!1),it(m)||(l=t.position+1),m=t.input.charCodeAt(++t.position)}return rt(t,i,l,!1),t.result?!0:(t.kind=p,t.result=y,!1)}function Rr(t,o){var n,r,a;if(n=t.input.charCodeAt(t.position),n!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=a=t.position;(n=t.input.charCodeAt(t.position))!==0;)if(n===39)if(rt(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),n===39)r=t.position,t.position++,a=t.position;else return!0;else X(n)?(rt(t,r,a,!0),vt(t,L(t,!1,o)),r=a=t.position):t.position===t.lineStart&&xt(t)?S(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);S(t,"unexpected end of the stream within a single quoted scalar")}function Pr(t,o){var n,r,a,i,l,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return rt(t,n,t.position,!0),t.position++,!0;if(s===92){if(rt(t,n,t.position,!0),s=t.input.charCodeAt(++t.position),X(s))L(t,!1,o);else if(s<256&&Le[s])t.result+=qe[s],t.position++;else if((l=Kr(s))>0){for(a=l,i=0;a>0;a--)s=t.input.charCodeAt(++t.position),(l=Fr(s))>=0?i=(i<<4)+l:S(t,"expected hexadecimal character");t.result+=Lr(i),t.position++}else S(t,"unknown escape sequence");n=r=t.position}else X(s)?(rt(t,n,r,!0),vt(t,L(t,!1,o)),n=r=t.position):t.position===t.lineStart&&xt(t)?S(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}S(t,"unexpected end of the stream within a double quoted scalar")}function Ur(t,o){var n=!0,r,a,i,l=t.tag,s,c=t.anchor,d,u,p,y,m,w=Object.create(null),b,f,h,g;if(g=t.input.charCodeAt(t.position),g===91)u=93,m=!1,s=[];else if(g===123)u=125,m=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),g=t.input.charCodeAt(++t.position);g!==0;){if(L(t,!0,o),g=t.input.charCodeAt(t.position),g===u)return t.position++,t.tag=l,t.anchor=c,t.kind=m?"mapping":"sequence",t.result=s,!0;n?g===44&&S(t,"expected the node content, but found ','"):S(t,"missed comma between flow collection entries"),f=b=h=null,p=y=!1,g===63&&(d=t.input.charCodeAt(t.position+1),W(d)&&(p=y=!0,t.position++,L(t,!0,o))),r=t.line,a=t.lineStart,i=t.position,dt(t,o,Ct,!1,!0),f=t.tag,b=t.result,L(t,!0,o),g=t.input.charCodeAt(t.position),(y||t.line===r)&&g===58&&(p=!0,g=t.input.charCodeAt(++t.position),L(t,!0,o),dt(t,o,Ct,!1,!0),h=t.result),m?ct(t,s,w,f,b,h,r,a,i):p?s.push(ct(t,null,w,f,b,h,r,a,i)):s.push(b),L(t,!0,o),g=t.input.charCodeAt(t.position),g===44?(n=!0,g=t.input.charCodeAt(++t.position)):n=!1}S(t,"unexpected end of the stream within a flow collection")}function zr(t,o){var n,r,a=Lt,i=!1,l=!1,s=o,c=0,d=!1,u,p;if(p=t.input.charCodeAt(t.position),p===124)r=!1;else if(p===62)r=!0;else return!1;for(t.kind="scalar",t.result="";p!==0;)if(p=t.input.charCodeAt(++t.position),p===43||p===45)Lt===a?a=p===43?Me:jr:S(t,"repeat of a chomping mode identifier");else if((u=Dr(p))>=0)u===0?S(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?S(t,"repeat of an indentation width identifier"):(s=o+u-1,l=!0);else break;if(it(p)){do p=t.input.charCodeAt(++t.position);while(it(p));if(p===35)do p=t.input.charCodeAt(++t.position);while(!X(p)&&p!==0)}for(;p!==0;){for(qt(t),t.lineIndent=0,p=t.input.charCodeAt(t.position);(!l||t.lineIndent<s)&&p===32;)t.lineIndent++,p=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>s&&(s=t.lineIndent),X(p)){c++;continue}if(t.lineIndent<s){a===Me?t.result+=R.repeat(`
11
11
  `,i?1+c:c):a===Lt&&i&&(t.result+=`
12
- `);break}for(r?at(p)?(d=!0,t.result+=q.repeat(`
13
- `,i?1+c:c)):d?(d=!1,t.result+=q.repeat(`
14
- `,c+1)):c===0?i&&(t.result+=" "):t.result+=q.repeat(`
15
- `,c):t.result+=q.repeat(`
16
- `,i?1+c:c),i=!0,l=!0,c=0,n=t.position;!Q(p)&&p!==0;)p=t.input.charCodeAt(++t.position);ot(t,n,t.position,!1)}return!0}function Ue(t,o){var n,r=t.tag,a=t.anchor,i=[],l,s=!1,c;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=i),c=t.input.charCodeAt(t.position);c!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,x(t,"tab characters must not be used in indentation")),!(c!==45||(l=t.input.charCodeAt(t.position+1),!W(l))));){if(s=!0,t.position++,M(t,!0,-1)&&t.lineIndent<=o){i.push(null),c=t.input.charCodeAt(t.position);continue}if(n=t.line,dt(t,o,je,!1,!0),i.push(t.result),M(t,!0,-1),c=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>o)&&c!==0)x(t,"bad indentation of a sequence entry");else if(t.lineIndent<o)break}return s?(t.tag=r,t.anchor=a,t.kind="sequence",t.result=i,!0):!1}function Hr(t,o,n){var r,a,i,l,s,c,d=t.tag,u=t.anchor,p={},y=Object.create(null),m=null,S=null,k=null,f=!1,h=!1,g;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=p),g=t.input.charCodeAt(t.position);g!==0;){if(!f&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,x(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),i=t.line,(g===63||g===58)&&W(r))g===63?(f&&(ct(t,p,y,m,S,null,l,s,c),m=S=k=null),h=!0,f=!0,a=!0):f?(f=!1,a=!0):x(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,g=r;else{if(l=t.line,s=t.lineStart,c=t.position,!dt(t,n,$e,!1,!0))break;if(t.line===i){for(g=t.input.charCodeAt(t.position);at(g);)g=t.input.charCodeAt(++t.position);if(g===58)g=t.input.charCodeAt(++t.position),W(g)||x(t,"a whitespace character is expected after the key-value separator within a block mapping"),f&&(ct(t,p,y,m,S,null,l,s,c),m=S=k=null),h=!0,f=!1,a=!1,m=t.tag,S=t.result;else if(h)x(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=d,t.anchor=u,!0}else if(h)x(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=d,t.anchor=u,!0}if((t.line===i||t.lineIndent>o)&&(f&&(l=t.line,s=t.lineStart,c=t.position),dt(t,o,wt,!0,a)&&(f?S=t.result:k=t.result),f||(ct(t,p,y,m,S,k,l,s,c),m=S=k=null),M(t,!0,-1),g=t.input.charCodeAt(t.position)),(t.line===i||t.lineIndent>o)&&g!==0)x(t,"bad indentation of a mapping entry");else if(t.lineIndent<o)break}return f&&ct(t,p,y,m,S,null,l,s,c),h&&(t.tag=d,t.anchor=u,t.kind="mapping",t.result=p),h}function Jr(t){var o,n=!1,r=!1,a,i,l;if(l=t.input.charCodeAt(t.position),l!==33)return!1;if(t.tag!==null&&x(t,"duplication of a tag property"),l=t.input.charCodeAt(++t.position),l===60?(n=!0,l=t.input.charCodeAt(++t.position)):l===33?(r=!0,a="!!",l=t.input.charCodeAt(++t.position)):a="!",o=t.position,n){do l=t.input.charCodeAt(++t.position);while(l!==0&&l!==62);t.position<t.length?(i=t.input.slice(o,t.position),l=t.input.charCodeAt(++t.position)):x(t,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!W(l);)l===33&&(r?x(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(o-1,t.position+1),Fe.test(a)||x(t,"named tag handle cannot contain such characters"),r=!0,o=t.position+1)),l=t.input.charCodeAt(++t.position);i=t.input.slice(o,t.position),Fr.test(i)&&x(t,"tag suffix cannot contain flow indicator characters")}i&&!Me.test(i)&&x(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{x(t,"tag name is malformed: "+i)}return n?t.tag=i:nt.call(t.tagMap,a)?t.tag=t.tagMap[a]+i:a==="!"?t.tag="!"+i:a==="!!"?t.tag="tag:yaml.org,2002:"+i:x(t,'undeclared tag handle "'+a+'"'),!0}function Yr(t){var o,n;if(n=t.input.charCodeAt(t.position),n!==38)return!1;for(t.anchor!==null&&x(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),o=t.position;n!==0&&!W(n)&&!lt(n);)n=t.input.charCodeAt(++t.position);return t.position===o&&x(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(o,t.position),!0}function Wr(t){var o,n,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),o=t.position;r!==0&&!W(r)&&!lt(r);)r=t.input.charCodeAt(++t.position);return t.position===o&&x(t,"name of an alias node must contain at least one character"),n=t.input.slice(o,t.position),nt.call(t.anchorMap,n)||x(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],M(t,!0,-1),!0}function dt(t,o,n,r,a){var i,l,s,c=1,d=!1,u=!1,p,y,m,S,k,f;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,i=l=s=wt===n||je===n,r&&M(t,!0,-1)&&(d=!0,t.lineIndent>o?c=1:t.lineIndent===o?c=0:t.lineIndent<o&&(c=-1)),c===1)for(;Jr(t)||Yr(t);)M(t,!0,-1)?(d=!0,s=i,t.lineIndent>o?c=1:t.lineIndent===o?c=0:t.lineIndent<o&&(c=-1)):s=!1;if(s&&(s=d||a),(c===1||wt===n)&&(Ct===n||$e===n?k=o:k=o+1,f=t.position-t.lineStart,c===1?s&&(Ue(t,f)||Hr(t,f,k))||Ur(t,k)?u=!0:(l&&zr(t,k)||Pr(t,k)||Rr(t,k)?u=!0:Wr(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&x(t,"alias node should not have any properties")):vr(t,k,Ct===n)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):c===0&&(u=s&&Ue(t,f))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&x(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),p=0,y=t.implicitTypes.length;p<y;p+=1)if(S=t.implicitTypes[p],S.resolve(t.result)){t.result=S.construct(t.result),t.tag=S.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(nt.call(t.typeMap[t.kind||"fallback"],t.tag))S=t.typeMap[t.kind||"fallback"][t.tag];else for(S=null,m=t.typeMap.multi[t.kind||"fallback"],p=0,y=m.length;p<y;p+=1)if(t.tag.slice(0,m[p].tag.length)===m[p].tag){S=m[p];break}S||x(t,"unknown tag !<"+t.tag+">"),t.result!==null&&S.kind!==t.kind&&x(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+S.kind+'", not "'+t.kind+'"'),S.resolve(t.result,t.tag)?(t.result=S.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):x(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function Gr(t){var o=t.position,n,r,a,i=!1,l;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(l=t.input.charCodeAt(t.position))!==0&&(M(t,!0,-1),l=t.input.charCodeAt(t.position),!(t.lineIndent>0||l!==37));){for(i=!0,l=t.input.charCodeAt(++t.position),n=t.position;l!==0&&!W(l);)l=t.input.charCodeAt(++t.position);for(r=t.input.slice(n,t.position),a=[],r.length<1&&x(t,"directive name must not be less than one character in length");l!==0;){for(;at(l);)l=t.input.charCodeAt(++t.position);if(l===35){do l=t.input.charCodeAt(++t.position);while(l!==0&&!Q(l));break}if(Q(l))break;for(n=t.position;l!==0&&!W(l);)l=t.input.charCodeAt(++t.position);a.push(t.input.slice(n,t.position))}l!==0&&qt(t),nt.call(Pe,r)?Pe[r](t,r,a):St(t,'unknown document directive "'+r+'"')}if(M(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,M(t,!0,-1)):i&&x(t,"directives end mark is expected"),dt(t,t.lineIndent-1,wt,!1,!0),M(t,!0,-1),t.checkLineBreaks&&Or.test(t.input.slice(o,t.position))&&St(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&xt(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,M(t,!0,-1));return}if(t.position<t.length-1)x(t,"end of the stream or a document separator is expected");else return}function ze(t,o){t=String(t),o=o||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
17
- `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var n=new qr(t,o),r=t.indexOf("\0");for(r!==-1&&(n.position=r,x(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Gr(n);return n.documents}function Zr(t,o,n){o!==null&&typeof o=="object"&&typeof n>"u"&&(n=o,o=null);var r=ze(t,n);if(typeof o!="function")return r;for(var a=0,i=r.length;a<i;a+=1)o(r[a])}function Xr(t,o){var n=ze(t,o);if(n.length!==0){if(n.length===1)return n[0];throw new J("expected a single document in the stream, but found more")}}var Qr=Zr,ta=Xr,He={loadAll:Qr,load:ta},Je=Object.prototype.toString,Ye=Object.prototype.hasOwnProperty,Pt=65279,ea=9,mt=10,na=13,oa=32,ra=33,aa=34,Rt=35,ia=37,la=38,sa=39,ca=42,We=44,da=45,Bt=58,pa=61,ua=62,fa=63,ma=64,Ge=91,Ze=93,ya=96,Xe=123,ga=124,Qe=125,H={};H[0]="\\0",H[7]="\\a",H[8]="\\b",H[9]="\\t",H[10]="\\n",H[11]="\\v",H[12]="\\f",H[13]="\\r",H[27]="\\e",H[34]='\\"',H[92]="\\\\",H[133]="\\N",H[160]="\\_",H[8232]="\\L",H[8233]="\\P";var ha=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ka=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ba(t,o){var n,r,a,i,l,s,c;if(o===null)return{};for(n={},r=Object.keys(o),a=0,i=r.length;a<i;a+=1)l=r[a],s=String(o[l]),l.slice(0,2)==="!!"&&(l="tag:yaml.org,2002:"+l.slice(2)),c=t.compiledTypeMap.fallback[l],c&&Ye.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[l]=s;return n}function Ca(t){var o,n,r;if(o=t.toString(16).toUpperCase(),t<=255)n="x",r=2;else if(t<=65535)n="u",r=4;else if(t<=4294967295)n="U",r=8;else throw new J("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+q.repeat("0",r-o.length)+o}var wa=1,yt=2;function Sa(t){this.schema=t.schema||Dt,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=q.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=ba(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?yt:wa,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function tn(t,o){for(var n=q.repeat(" ",o),r=0,a=-1,i="",l,s=t.length;r<s;)a=t.indexOf(`
12
+ `);break}for(r?it(p)?(d=!0,t.result+=R.repeat(`
13
+ `,i?1+c:c)):d?(d=!1,t.result+=R.repeat(`
14
+ `,c+1)):c===0?i&&(t.result+=" "):t.result+=R.repeat(`
15
+ `,c):t.result+=R.repeat(`
16
+ `,i?1+c:c),i=!0,l=!0,c=0,n=t.position;!X(p)&&p!==0;)p=t.input.charCodeAt(++t.position);rt(t,n,t.position,!1)}return!0}function Ue(t,o){var n,r=t.tag,a=t.anchor,i=[],l,s=!1,c;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=i),c=t.input.charCodeAt(t.position);c!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,S(t,"tab characters must not be used in indentation")),!(c!==45||(l=t.input.charCodeAt(t.position+1),!W(l))));){if(s=!0,t.position++,L(t,!0,-1)&&t.lineIndent<=o){i.push(null),c=t.input.charCodeAt(t.position);continue}if(n=t.line,dt(t,o,$e,!1,!0),i.push(t.result),L(t,!0,-1),c=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>o)&&c!==0)S(t,"bad indentation of a sequence entry");else if(t.lineIndent<o)break}return s?(t.tag=r,t.anchor=a,t.kind="sequence",t.result=i,!0):!1}function Hr(t,o,n){var r,a,i,l,s,c,d=t.tag,u=t.anchor,p={},y=Object.create(null),m=null,w=null,b=null,f=!1,h=!1,g;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=p),g=t.input.charCodeAt(t.position);g!==0;){if(!f&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,S(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),i=t.line,(g===63||g===58)&&W(r))g===63?(f&&(ct(t,p,y,m,w,null,l,s,c),m=w=b=null),h=!0,f=!0,a=!0):f?(f=!1,a=!0):S(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,g=r;else{if(l=t.line,s=t.lineStart,c=t.position,!dt(t,n,je,!1,!0))break;if(t.line===i){for(g=t.input.charCodeAt(t.position);it(g);)g=t.input.charCodeAt(++t.position);if(g===58)g=t.input.charCodeAt(++t.position),W(g)||S(t,"a whitespace character is expected after the key-value separator within a block mapping"),f&&(ct(t,p,y,m,w,null,l,s,c),m=w=b=null),h=!0,f=!1,a=!1,m=t.tag,w=t.result;else if(h)S(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=d,t.anchor=u,!0}else if(h)S(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=d,t.anchor=u,!0}if((t.line===i||t.lineIndent>o)&&(f&&(l=t.line,s=t.lineStart,c=t.position),dt(t,o,wt,!0,a)&&(f?w=t.result:b=t.result),f||(ct(t,p,y,m,w,b,l,s,c),m=w=b=null),L(t,!0,-1),g=t.input.charCodeAt(t.position)),(t.line===i||t.lineIndent>o)&&g!==0)S(t,"bad indentation of a mapping entry");else if(t.lineIndent<o)break}return f&&ct(t,p,y,m,w,null,l,s,c),h&&(t.tag=d,t.anchor=u,t.kind="mapping",t.result=p),h}function Jr(t){var o,n=!1,r=!1,a,i,l;if(l=t.input.charCodeAt(t.position),l!==33)return!1;if(t.tag!==null&&S(t,"duplication of a tag property"),l=t.input.charCodeAt(++t.position),l===60?(n=!0,l=t.input.charCodeAt(++t.position)):l===33?(r=!0,a="!!",l=t.input.charCodeAt(++t.position)):a="!",o=t.position,n){do l=t.input.charCodeAt(++t.position);while(l!==0&&l!==62);t.position<t.length?(i=t.input.slice(o,t.position),l=t.input.charCodeAt(++t.position)):S(t,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!W(l);)l===33&&(r?S(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(o-1,t.position+1),Oe.test(a)||S(t,"named tag handle cannot contain such characters"),r=!0,o=t.position+1)),l=t.input.charCodeAt(++t.position);i=t.input.slice(o,t.position),Or.test(i)&&S(t,"tag suffix cannot contain flow indicator characters")}i&&!Fe.test(i)&&S(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{S(t,"tag name is malformed: "+i)}return n?t.tag=i:ot.call(t.tagMap,a)?t.tag=t.tagMap[a]+i:a==="!"?t.tag="!"+i:a==="!!"?t.tag="tag:yaml.org,2002:"+i:S(t,'undeclared tag handle "'+a+'"'),!0}function Yr(t){var o,n;if(n=t.input.charCodeAt(t.position),n!==38)return!1;for(t.anchor!==null&&S(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),o=t.position;n!==0&&!W(n)&&!lt(n);)n=t.input.charCodeAt(++t.position);return t.position===o&&S(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(o,t.position),!0}function Wr(t){var o,n,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),o=t.position;r!==0&&!W(r)&&!lt(r);)r=t.input.charCodeAt(++t.position);return t.position===o&&S(t,"name of an alias node must contain at least one character"),n=t.input.slice(o,t.position),ot.call(t.anchorMap,n)||S(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],L(t,!0,-1),!0}function dt(t,o,n,r,a){var i,l,s,c=1,d=!1,u=!1,p,y,m,w,b,f;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,i=l=s=wt===n||$e===n,r&&L(t,!0,-1)&&(d=!0,t.lineIndent>o?c=1:t.lineIndent===o?c=0:t.lineIndent<o&&(c=-1)),c===1)for(;Jr(t)||Yr(t);)L(t,!0,-1)?(d=!0,s=i,t.lineIndent>o?c=1:t.lineIndent===o?c=0:t.lineIndent<o&&(c=-1)):s=!1;if(s&&(s=d||a),(c===1||wt===n)&&(Ct===n||je===n?b=o:b=o+1,f=t.position-t.lineStart,c===1?s&&(Ue(t,f)||Hr(t,f,b))||Ur(t,b)?u=!0:(l&&zr(t,b)||Rr(t,b)||Pr(t,b)?u=!0:Wr(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&S(t,"alias node should not have any properties")):vr(t,b,Ct===n)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):c===0&&(u=s&&Ue(t,f))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&S(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),p=0,y=t.implicitTypes.length;p<y;p+=1)if(w=t.implicitTypes[p],w.resolve(t.result)){t.result=w.construct(t.result),t.tag=w.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(ot.call(t.typeMap[t.kind||"fallback"],t.tag))w=t.typeMap[t.kind||"fallback"][t.tag];else for(w=null,m=t.typeMap.multi[t.kind||"fallback"],p=0,y=m.length;p<y;p+=1)if(t.tag.slice(0,m[p].tag.length)===m[p].tag){w=m[p];break}w||S(t,"unknown tag !<"+t.tag+">"),t.result!==null&&w.kind!==t.kind&&S(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+w.kind+'", not "'+t.kind+'"'),w.resolve(t.result,t.tag)?(t.result=w.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):S(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function Zr(t){var o=t.position,n,r,a,i=!1,l;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(l=t.input.charCodeAt(t.position))!==0&&(L(t,!0,-1),l=t.input.charCodeAt(t.position),!(t.lineIndent>0||l!==37));){for(i=!0,l=t.input.charCodeAt(++t.position),n=t.position;l!==0&&!W(l);)l=t.input.charCodeAt(++t.position);for(r=t.input.slice(n,t.position),a=[],r.length<1&&S(t,"directive name must not be less than one character in length");l!==0;){for(;it(l);)l=t.input.charCodeAt(++t.position);if(l===35){do l=t.input.charCodeAt(++t.position);while(l!==0&&!X(l));break}if(X(l))break;for(n=t.position;l!==0&&!W(l);)l=t.input.charCodeAt(++t.position);a.push(t.input.slice(n,t.position))}l!==0&&qt(t),ot.call(Re,r)?Re[r](t,r,a):St(t,'unknown document directive "'+r+'"')}if(L(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,L(t,!0,-1)):i&&S(t,"directives end mark is expected"),dt(t,t.lineIndent-1,wt,!1,!0),L(t,!0,-1),t.checkLineBreaks&&Mr.test(t.input.slice(o,t.position))&&St(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&xt(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,L(t,!0,-1));return}if(t.position<t.length-1)S(t,"end of the stream or a document separator is expected");else return}function ze(t,o){t=String(t),o=o||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
17
+ `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var n=new qr(t,o),r=t.indexOf("\0");for(r!==-1&&(n.position=r,S(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Zr(n);return n.documents}function Gr(t,o,n){o!==null&&typeof o=="object"&&typeof n>"u"&&(n=o,o=null);var r=ze(t,n);if(typeof o!="function")return r;for(var a=0,i=r.length;a<i;a+=1)o(r[a])}function Qr(t,o){var n=ze(t,o);if(n.length!==0){if(n.length===1)return n[0];throw new J("expected a single document in the stream, but found more")}}var Xr=Gr,ta=Qr,He={loadAll:Xr,load:ta},Je=Object.prototype.toString,Ye=Object.prototype.hasOwnProperty,Rt=65279,ea=9,mt=10,na=13,oa=32,ra=33,aa=34,Pt=35,ia=37,la=38,sa=39,ca=42,We=44,da=45,Bt=58,pa=61,ua=62,fa=63,ma=64,Ze=91,Ge=93,ya=96,Qe=123,ga=124,Xe=125,H={};H[0]="\\0",H[7]="\\a",H[8]="\\b",H[9]="\\t",H[10]="\\n",H[11]="\\v",H[12]="\\f",H[13]="\\r",H[27]="\\e",H[34]='\\"',H[92]="\\\\",H[133]="\\N",H[160]="\\_",H[8232]="\\L",H[8233]="\\P";var ha=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ka=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ba(t,o){var n,r,a,i,l,s,c;if(o===null)return{};for(n={},r=Object.keys(o),a=0,i=r.length;a<i;a+=1)l=r[a],s=String(o[l]),l.slice(0,2)==="!!"&&(l="tag:yaml.org,2002:"+l.slice(2)),c=t.compiledTypeMap.fallback[l],c&&Ye.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[l]=s;return n}function Ca(t){var o,n,r;if(o=t.toString(16).toUpperCase(),t<=255)n="x",r=2;else if(t<=65535)n="u",r=4;else if(t<=4294967295)n="U",r=8;else throw new J("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+R.repeat("0",r-o.length)+o}var wa=1,yt=2;function Sa(t){this.schema=t.schema||Dt,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=R.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=ba(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?yt:wa,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function tn(t,o){for(var n=R.repeat(" ",o),r=0,a=-1,i="",l,s=t.length;r<s;)a=t.indexOf(`
18
18
  `,r),a===-1?(l=t.slice(r),r=s):(l=t.slice(r,a+1),r=a+1),l.length&&l!==`
19
19
  `&&(i+=n),i+=l;return i}function Ut(t,o){return`
20
- `+q.repeat(" ",t.indent*o)}function xa(t,o){var n,r,a;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(a=t.implicitTypes[n],a.resolve(o))return!0;return!1}function Nt(t){return t===oa||t===ea}function gt(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==Pt||65536<=t&&t<=1114111}function en(t){return gt(t)&&t!==Pt&&t!==na&&t!==mt}function nn(t,o,n){var r=en(t),a=r&&!Nt(t);return(n?r:r&&t!==We&&t!==Ge&&t!==Ze&&t!==Xe&&t!==Qe)&&t!==Rt&&!(o===Bt&&!a)||en(o)&&!Nt(o)&&t===Rt||o===Bt&&a}function Ba(t){return gt(t)&&t!==Pt&&!Nt(t)&&t!==da&&t!==fa&&t!==Bt&&t!==We&&t!==Ge&&t!==Ze&&t!==Xe&&t!==Qe&&t!==Rt&&t!==la&&t!==ca&&t!==ra&&t!==ga&&t!==pa&&t!==ua&&t!==sa&&t!==aa&&t!==ia&&t!==ma&&t!==ya}function Na(t){return!Nt(t)&&t!==Bt}function ht(t,o){var n=t.charCodeAt(o),r;return n>=55296&&n<=56319&&o+1<t.length&&(r=t.charCodeAt(o+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function on(t){var o=/^\n* /;return o.test(t)}var rn=1,zt=2,an=3,ln=4,pt=5;function Ia(t,o,n,r,a,i,l,s){var c,d=0,u=null,p=!1,y=!1,m=r!==-1,S=-1,k=Ba(ht(t,0))&&Na(ht(t,t.length-1));if(o||l)for(c=0;c<t.length;d>=65536?c+=2:c++){if(d=ht(t,c),!gt(d))return pt;k=k&&nn(d,u,s),u=d}else{for(c=0;c<t.length;d>=65536?c+=2:c++){if(d=ht(t,c),d===mt)p=!0,m&&(y=y||c-S-1>r&&t[S+1]!==" ",S=c);else if(!gt(d))return pt;k=k&&nn(d,u,s),u=d}y=y||m&&c-S-1>r&&t[S+1]!==" "}return!p&&!y?k&&!l&&!a(t)?rn:i===yt?pt:zt:n>9&&on(t)?pt:l?i===yt?pt:zt:y?ln:an}function Aa(t,o,n,r,a){t.dump=function(){if(o.length===0)return t.quotingType===yt?'""':"''";if(!t.noCompatMode&&(ha.indexOf(o)!==-1||ka.test(o)))return t.quotingType===yt?'"'+o+'"':"'"+o+"'";var i=t.indent*Math.max(1,n),l=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-i),s=r||t.flowLevel>-1&&n>=t.flowLevel;function c(d){return xa(t,d)}switch(Ia(o,s,t.indent,l,c,t.quotingType,t.forceQuotes&&!r,a)){case rn:return o;case zt:return"'"+o.replace(/'/g,"''")+"'";case an:return"|"+sn(o,t.indent)+cn(tn(o,i));case ln:return">"+sn(o,t.indent)+cn(tn(_a(o,l),i));case pt:return'"'+Ta(o)+'"';default:throw new J("impossible error: invalid scalar style")}}()}function sn(t,o){var n=on(t)?String(o):"",r=t[t.length-1]===`
20
+ `+R.repeat(" ",t.indent*o)}function xa(t,o){var n,r,a;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(a=t.implicitTypes[n],a.resolve(o))return!0;return!1}function It(t){return t===oa||t===ea}function gt(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==Rt||65536<=t&&t<=1114111}function en(t){return gt(t)&&t!==Rt&&t!==na&&t!==mt}function nn(t,o,n){var r=en(t),a=r&&!It(t);return(n?r:r&&t!==We&&t!==Ze&&t!==Ge&&t!==Qe&&t!==Xe)&&t!==Pt&&!(o===Bt&&!a)||en(o)&&!It(o)&&t===Pt||o===Bt&&a}function Ba(t){return gt(t)&&t!==Rt&&!It(t)&&t!==da&&t!==fa&&t!==Bt&&t!==We&&t!==Ze&&t!==Ge&&t!==Qe&&t!==Xe&&t!==Pt&&t!==la&&t!==ca&&t!==ra&&t!==ga&&t!==pa&&t!==ua&&t!==sa&&t!==aa&&t!==ia&&t!==ma&&t!==ya}function Ia(t){return!It(t)&&t!==Bt}function ht(t,o){var n=t.charCodeAt(o),r;return n>=55296&&n<=56319&&o+1<t.length&&(r=t.charCodeAt(o+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function on(t){var o=/^\n* /;return o.test(t)}var rn=1,zt=2,an=3,ln=4,pt=5;function Aa(t,o,n,r,a,i,l,s){var c,d=0,u=null,p=!1,y=!1,m=r!==-1,w=-1,b=Ba(ht(t,0))&&Ia(ht(t,t.length-1));if(o||l)for(c=0;c<t.length;d>=65536?c+=2:c++){if(d=ht(t,c),!gt(d))return pt;b=b&&nn(d,u,s),u=d}else{for(c=0;c<t.length;d>=65536?c+=2:c++){if(d=ht(t,c),d===mt)p=!0,m&&(y=y||c-w-1>r&&t[w+1]!==" ",w=c);else if(!gt(d))return pt;b=b&&nn(d,u,s),u=d}y=y||m&&c-w-1>r&&t[w+1]!==" "}return!p&&!y?b&&!l&&!a(t)?rn:i===yt?pt:zt:n>9&&on(t)?pt:l?i===yt?pt:zt:y?ln:an}function Na(t,o,n,r,a){t.dump=function(){if(o.length===0)return t.quotingType===yt?'""':"''";if(!t.noCompatMode&&(ha.indexOf(o)!==-1||ka.test(o)))return t.quotingType===yt?'"'+o+'"':"'"+o+"'";var i=t.indent*Math.max(1,n),l=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-i),s=r||t.flowLevel>-1&&n>=t.flowLevel;function c(d){return xa(t,d)}switch(Aa(o,s,t.indent,l,c,t.quotingType,t.forceQuotes&&!r,a)){case rn:return o;case zt:return"'"+o.replace(/'/g,"''")+"'";case an:return"|"+sn(o,t.indent)+cn(tn(o,i));case ln:return">"+sn(o,t.indent)+cn(tn(_a(o,l),i));case pt:return'"'+Ea(o)+'"';default:throw new J("impossible error: invalid scalar style")}}()}function sn(t,o){var n=on(t)?String(o):"",r=t[t.length-1]===`
21
21
  `,a=r&&(t[t.length-2]===`
22
22
  `||t===`
23
23
  `),i=a?"+":r?"":"-";return n+i+`
@@ -28,5 +28,5 @@
28
28
  `:"")+dn(c,o),a=i}return r}function dn(t,o){if(t===""||t[0]===" ")return t;for(var n=/ [^ ]/g,r,a=0,i,l=0,s=0,c="";r=n.exec(t);)s=r.index,s-a>o&&(i=l>a?l:s,c+=`
29
29
  `+t.slice(a,i),a=i+1),l=s;return c+=`
30
30
  `,t.length-a>o&&l>a?c+=t.slice(a,l)+`
31
- `+t.slice(l+1):c+=t.slice(a),c.slice(1)}function Ta(t){for(var o="",n=0,r,a=0;a<t.length;n>=65536?a+=2:a++)n=ht(t,a),r=H[n],!r&&gt(n)?(o+=t[a],n>=65536&&(o+=t[a+1])):o+=r||Ca(n);return o}function Ea(t,o,n){var r="",a=t.tag,i,l,s;for(i=0,l=n.length;i<l;i+=1)s=n[i],t.replacer&&(s=t.replacer.call(n,String(i),s)),(tt(t,o,s,!1,!1)||typeof s>"u"&&tt(t,o,null,!1,!1))&&(r!==""&&(r+=","+(t.condenseFlow?"":" ")),r+=t.dump);t.tag=a,t.dump="["+r+"]"}function pn(t,o,n,r){var a="",i=t.tag,l,s,c;for(l=0,s=n.length;l<s;l+=1)c=n[l],t.replacer&&(c=t.replacer.call(n,String(l),c)),(tt(t,o+1,c,!0,!0,!1,!0)||typeof c>"u"&&tt(t,o+1,null,!0,!0,!1,!0))&&((!r||a!=="")&&(a+=Ut(t,o)),t.dump&&mt===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=i,t.dump=a||"[]"}function Va(t,o,n){var r="",a=t.tag,i=Object.keys(n),l,s,c,d,u;for(l=0,s=i.length;l<s;l+=1)u="",r!==""&&(u+=", "),t.condenseFlow&&(u+='"'),c=i[l],d=n[c],t.replacer&&(d=t.replacer.call(n,c,d)),tt(t,o,c,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),tt(t,o,d,!1,!1)&&(u+=t.dump,r+=u));t.tag=a,t.dump="{"+r+"}"}function $a(t,o,n,r){var a="",i=t.tag,l=Object.keys(n),s,c,d,u,p,y;if(t.sortKeys===!0)l.sort();else if(typeof t.sortKeys=="function")l.sort(t.sortKeys);else if(t.sortKeys)throw new J("sortKeys must be a boolean or a function");for(s=0,c=l.length;s<c;s+=1)y="",(!r||a!=="")&&(y+=Ut(t,o)),d=l[s],u=n[d],t.replacer&&(u=t.replacer.call(n,d,u)),tt(t,o+1,d,!0,!0,!0)&&(p=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,p&&(t.dump&&mt===t.dump.charCodeAt(0)?y+="?":y+="? "),y+=t.dump,p&&(y+=Ut(t,o)),tt(t,o+1,u,!0,p)&&(t.dump&&mt===t.dump.charCodeAt(0)?y+=":":y+=": ",y+=t.dump,a+=y));t.tag=i,t.dump=a||"{}"}function un(t,o,n){var r,a,i,l,s,c;for(a=n?t.explicitTypes:t.implicitTypes,i=0,l=a.length;i<l;i+=1)if(s=a[i],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof o=="object"&&o instanceof s.instanceOf)&&(!s.predicate||s.predicate(o))){if(n?s.multi&&s.representName?t.tag=s.representName(o):t.tag=s.tag:t.tag="?",s.represent){if(c=t.styleMap[s.tag]||s.defaultStyle,Je.call(s.represent)==="[object Function]")r=s.represent(o,c);else if(Ye.call(s.represent,c))r=s.represent[c](o,c);else throw new J("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');t.dump=r}return!0}return!1}function tt(t,o,n,r,a,i,l){t.tag=null,t.dump=n,un(t,n,!1)||un(t,n,!0);var s=Je.call(t.dump),c=r,d;r&&(r=t.flowLevel<0||t.flowLevel>o);var u=s==="[object Object]"||s==="[object Array]",p,y;if(u&&(p=t.duplicates.indexOf(n),y=p!==-1),(t.tag!==null&&t.tag!=="?"||y||t.indent!==2&&o>0)&&(a=!1),y&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(u&&y&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),s==="[object Object]")r&&Object.keys(t.dump).length!==0?($a(t,o,t.dump,a),y&&(t.dump="&ref_"+p+t.dump)):(Va(t,o,t.dump),y&&(t.dump="&ref_"+p+" "+t.dump));else if(s==="[object Array]")r&&t.dump.length!==0?(t.noArrayIndent&&!l&&o>0?pn(t,o-1,t.dump,a):pn(t,o,t.dump,a),y&&(t.dump="&ref_"+p+t.dump)):(Ea(t,o,t.dump),y&&(t.dump="&ref_"+p+" "+t.dump));else if(s==="[object String]")t.tag!=="?"&&Aa(t,t.dump,o,i,c);else{if(s==="[object Undefined]"||t.skipInvalid)return!1;throw new J("unacceptable kind of an object to dump "+s)}t.tag!==null&&t.tag!=="?"&&(d=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",t.dump=d+" "+t.dump)}return!0}function ja(t,o){var n=[],r=[],a,i;for(Ht(t,n,r),a=0,i=r.length;a<i;a+=1)o.duplicates.push(n[r[a]]);o.usedDuplicates=new Array(i)}function Ht(t,o,n){var r,a,i;if(t!==null&&typeof t=="object")if(a=o.indexOf(t),a!==-1)n.indexOf(a)===-1&&n.push(a);else if(o.push(t),Array.isArray(t))for(a=0,i=t.length;a<i;a+=1)Ht(t[a],o,n);else for(r=Object.keys(t),a=0,i=r.length;a<i;a+=1)Ht(t[r[a]],o,n)}function Oa(t,o){o=o||{};var n=new Sa(o);n.noRefs||ja(t,n);var r=t;return n.replacer&&(r=n.replacer.call({"":r},"",r)),tt(n,0,r,!0,!0)?n.dump+`
32
- `:""}var Fa=Oa,Ma={dump:Fa};function Jt(t,o){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}var Ka=U,Da=fe,La=he,qa=Se,va=xe,Pa=Dt,Ra=He.load,Ua=He.loadAll,za=Ma.dump,Ha=J,Ja={binary:_e,float:we,map:ge,null:ke,pairs:Ee,set:Ve,timestamp:Ie,bool:be,int:Ce,merge:Ae,omap:Te,seq:ye,str:me},Ya=Jt("safeLoad","load"),Wa=Jt("safeLoadAll","loadAll"),Ga=Jt("safeDump","dump"),Za={Type:Ka,Schema:Da,FAILSAFE_SCHEMA:La,JSON_SCHEMA:qa,CORE_SCHEMA:va,DEFAULT_SCHEMA:Pa,load:Ra,loadAll:Ua,dump:za,YAMLException:Ha,types:Ja,safeLoad:Ya,safeLoadAll:Wa,safeDump:Ga};const Xa={key:0,class:"config-card-display-form"},Qa=["data-testid"],ti={key:0,class:"config-card-prop-section-title"},ei={key:1,class:"config-card-display-json"},ni={key:2,class:"config-card-display-yaml"},oi=X(e.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:t=>["structured","yaml","json"].includes(t)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(t){const o=t,n=e.useSlots(),{i18n:{t:r}}=P.useI18n(),a=s=>!!(s.tooltip||n[`${s.key}-label-tooltip`]),i=e.ref(""),l=e.ref("");return e.watch(()=>o.format,s=>{s==="json"?i.value=JSON.stringify(o.record,null,2):s==="yaml"&&(l.value=Za.dump(o.record))},{immediate:!0}),(s,c)=>{const d=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.format==="structured"?(e.openBlock(),e.createElementBlock("div",Xa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.propListTypes,u=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${u}-props`,class:e.normalizeClass(`config-card-details-${u}-props`),"data-testid":`config-card-details-${u}-props`},[u!=="basic"?(e.openBlock(),e.createElementBlock("div",ti,e.toDisplayString(u==="advanced"?e.unref(r)("baseConfigCard.sections.advanced"):e.unref(r)("baseConfigCard.sections.plugin")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.propertyCollections[u],p=>(e.openBlock(),e.createBlock(jt,{key:p.key,item:p},e.createSlots({label:e.withCtx(()=>[e.renderSlot(s.$slots,`${p.key}-label`,{row:p},void 0,!0)]),[p.key]:e.withCtx(({rowValue:y})=>[e.renderSlot(s.$slots,p.key,{row:p,rowValue:y},void 0,!0)]),_:2},[a(p)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(s.$slots,`${p.key}-label-tooltip`,{row:p},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Qa))),128))])):e.createCommentVNode("",!0),t.format==="json"?(e.openBlock(),e.createElementBlock("div",ei,[e.createVNode(d,{id:"config-card-codeblock",code:i.value,language:"json",theme:"dark"},null,8,["code"])])):e.createCommentVNode("",!0),t.format==="yaml"?(e.openBlock(),e.createElementBlock("div",ni,[e.createVNode(d,{id:"config-card-codeblock",code:l.value,language:"yaml",theme:"dark"},null,8,["code"])])):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-6c45e9e4"]]),fn="24px",ri=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},ai=t=>(e.pushScopeId("data-v-dd88a2bb"),t=t(),e.popScopeId(),t),ii=["aria-hidden"],li={key:0,"data-testid":"kui-icon-svg-title"},si=ai(()=>e.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),ci=e.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:fn,validator:t=>{if(typeof t=="number"&&t>0)return!0;if(typeof t=="string"){const o=String(t).replace(/px/gi,""),n=Number(o);if(n&&!isNaN(n)&&Number.isInteger(n)&&n>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(t){const o=t,n=e.computed(()=>{if(typeof o.size=="number"&&o.size>0)return`${o.size}px`;if(typeof o.size=="string"){const a=String(o.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return fn}),r=e.computed(()=>({boxSizing:"border-box",color:o.color,display:o.display,height:n.value,lineHeight:"0",width:n.value}));return(a,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.as),{"aria-hidden":t.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:e.normalizeStyle(r.value)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":t.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[t.title?(e.openBlock(),e.createElementBlock("title",li,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),si],8,ii))]),_:1},8,["aria-hidden","style"]))}}),di=ri(ci,[["__scopeId","data-v-dd88a2bb"]]),pi={"data-testid":"config-card-title"},ui={class:"config-card-actions"},fi=["href"],mi={key:2,class:"config-card-details-section"},yi={key:3,class:"config-card-details-section"},gi=["data-testid"],hi={key:0,class:"config-card-prop-section-title"},ki=X(e.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(t,{emit:o}){var n;const r=t,a=e.useSlots(),{i18n:{t:i}}=P.useI18n(),{getMessageFromError:l}=P.useErrors(),{convertKeyToTitle:s}=P.useStringHelpers(),{axiosInstance:c}=P.useAxios({headers:(n=r.config)==null?void 0:n.requestHeaders}),d=[{label:i("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],u=e.ref("structured"),p=C=>{u.value=C==null?void 0:C.value},y={id:{type:j.ID,label:i("baseConfigCard.commonFields.id_label"),order:0,section:Z.Basic},name:{order:1,section:Z.Basic},enabled:{type:j.BadgeStatus,order:2,section:Z.Basic},updated_at:{type:j.Date,label:i("baseConfigCard.commonFields.updated_at_label"),order:3,section:Z.Basic},created_at:{type:j.Date,label:i("baseConfigCard.commonFields.created_at_label"),order:4,section:Z.Basic},tags:{type:j.BadgeTag,order:-1,section:Z.Basic}},m=e.ref(!1),S=e.ref(!1),k=e.ref(""),f=e.ref(),h=e.computed(()=>{var C,A,B;if(!f.value)return[];const N=[],_=Object.keys(f.value).length;for(const E in f.value){const $=(A=(C=r.configSchema)==null?void 0:C[E])==null?void 0:A.order,v=(B=y[E])==null?void 0:B.order;let R=_;(v||v===0)&&(R=v===-1?_+1:v),$&&(R=$===-1?_+1:$),N.push([E,R])}return N.sort(function(E,$){return E[1]-$[1]}),N.map(E=>{var $,v;const R=E[0],L=($=f.value)==null?void 0:$[R],O=((v=r.configSchema)==null?void 0:v[R])||{},Y=y[R];return{key:R,value:L,hidden:O.hidden||!1,type:O.type??((Y==null?void 0:Y.type)||j.Text),label:O.label??((Y==null?void 0:Y.label)||s(R)),tooltip:O.tooltip??((Y==null?void 0:Y.tooltip)||void 0),section:O.section??((Y==null?void 0:Y.section)||Z.Advanced)}}).filter(E=>!E.hidden&&E.key!==r.pluginConfigKey)}),g=e.computed(()=>{var C,A;if(!f.value||!r.pluginConfigKey)return[];const B=f.value[r.pluginConfigKey]||{},N=Object.keys(B).length,_=[];for(const E in B){const $=(A=(C=r.pluginConfigSchema)==null?void 0:C[E])==null?void 0:A.order,v=B[E];let R=v!=null&&v!==""?N-1:N;$&&(R=$===-1?N+1:$),_.push([E,R])}return _.sort(function(E,$){return E[1]-$[1]}),_.map(E=>{var $;const v=E[0],R=B[v],L=(($=r.pluginConfigSchema)==null?void 0:$[v])||{};return{key:v,value:R,hidden:L.hidden||!1,type:L.type??j.Text,label:L.label??s(v),tooltip:L.tooltip??void 0,section:Z.Plugin}}).filter(E=>!E.hidden)}),b=e.computed(()=>{var C,A,B,N;return{basic:(C=h.value)==null?void 0:C.filter(_=>_.section===Z.Basic),advanced:(A=h.value)==null?void 0:A.filter(_=>_.section===Z.Advanced),plugin:(N=g.value)==null?void 0:N.concat((B=h.value)==null?void 0:B.filter(_=>_.section===Z.Plugin))}}),w=e.computed(()=>{const C=[];return b.value.basic.length&&C.push("basic"),b.value.advanced.length&&C.push("advanced"),b.value.plugin.length&&C.push("plugin"),C}),K=C=>!!(C.tooltip||a[`${C.key}-label-tooltip`]),D=e.computed(()=>{var C,A;let B=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?B=B.replace(/{controlPlaneId}/gi,((C=r.config)==null?void 0:C.controlPlaneId)||""):r.config.app==="kongManager"&&(B=B.replace(/\/{workspace}/gi,(A=r.config)!=null&&A.workspace?`/${r.config.workspace}`:"")),B=B.replace(/{id}/gi,r.config.entityId),B}),T=C=>{f.value&&C(JSON.stringify(f.value))?o("copy:success",f.value):o("copy:error")};return e.watch(m,C=>{o("loading",C)},{immediate:!0}),e.onBeforeMount(async()=>{S.value=!1,m.value=!0;try{const{data:C}=await c.get(D.value);if(r.dataKey)if(typeof C[r.dataKey]<"u")f.value={...C[r.dataKey]};else throw new Error(i("errors.dataKeyUndefined",{dataKey:r.dataKey}));else f.value={...C};Object.keys(r.configSchema).filter(A=>r.configSchema[A].forceShow).forEach(A=>{f.value&&typeof f.value[A]>"u"&&(f.value[A]=null)}),o("fetch:success",C)}catch(C){const A=l(C);k.value=A.startsWith("code")?i("baseConfigCard.errors.load"):A,S.value=!0,o("fetch:error",C)}finally{m.value=!1}}),(C,A)=>{const B=e.resolveComponent("KLabel"),N=e.resolveComponent("KSelect"),_=e.resolveComponent("KButton"),E=e.resolveComponent("KClipboardProvider"),$=e.resolveComponent("KSkeleton"),v=e.resolveComponent("KEmptyState"),R=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(R,{class:"kong-ui-entity-base-config-card"},e.createSlots({actions:e.withCtx(()=>[e.createElementVNode("div",ui,[e.renderSlot(C.$slots,"actions",{},void 0,!0),t.config.jsonYamlEnabled?(e.openBlock(),e.createBlock(B,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1})):e.createCommentVNode("",!0),t.config.jsonYamlEnabled?(e.openBlock(),e.createBlock(N,{key:1,appearance:"select","data-testid":"select-config-format",items:d,onChange:p})):e.createCommentVNode("",!0),r.config.jsonYamlEnabled&&t.configCardDoc?(e.openBlock(),e.createBlock(_,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.configCardDoc,rel:"noopener",target:"_blank"},[e.createVNode(e.unref(di),{size:e.unref(bo)},null,8,["size"])],8,fi)]),_:1})):e.createCommentVNode("",!0),t.config.jsonYamlEnabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E,{key:3},{default:e.withCtx(({copyToClipboard:L})=>[!m.value&&!S.value?(e.openBlock(),e.createBlock(_,{key:0,appearance:"tertiary","data-testid":"json-copy-button",onClick:O=>T(L)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:1}))])]),body:e.withCtx(()=>[m.value?(e.openBlock(),e.createBlock($,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):S.value?(e.openBlock(),e.createBlock(v,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(k.value),1)]),_:1})):e.createCommentVNode("",!0),t.config.jsonYamlEnabled?(e.openBlock(),e.createElementBlock("div",mi,[e.createVNode(oi,{format:u.value,"prop-list-types":w.value,"property-collections":b.value,record:f.value},e.createSlots({_:2},[e.renderList(Object.keys(C.$slots),L=>({name:L,fn:e.withCtx(({row:O,rowValue:Y})=>[e.renderSlot(C.$slots,L,{row:O,rowValue:Y},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(e.openBlock(),e.createElementBlock("div",yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,L=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${L}-props`,class:e.normalizeClass(`config-card-details-${L}-props`),"data-testid":`config-card-details-${L}-props`},[L!=="basic"?(e.openBlock(),e.createElementBlock("div",hi,e.toDisplayString(L==="advanced"?e.unref(i)("baseConfigCard.sections.advanced"):e.unref(i)("baseConfigCard.sections.plugin")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value[L],O=>(e.openBlock(),e.createBlock(jt,{key:O.key,item:O},e.createSlots({label:e.withCtx(()=>[e.renderSlot(C.$slots,`${O.key}-label`,{row:O},void 0,!0)]),[O.key]:e.withCtx(({rowValue:Y})=>[e.renderSlot(C.$slots,O.key,{row:O,rowValue:Y},void 0,!0)]),_:2},[K(O)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(C.$slots,`${O.key}-label-tooltip`,{row:O},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,gi))),128))]))]),_:2},[t.hideTitle?void 0:{name:"title",fn:e.withCtx(()=>[e.createElementVNode("div",pi,[e.renderSlot(C.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-24515123"]]),bi=["onReset","onSubmit"],Ci={class:"form-actions","data-testid":"form-actions"},wi=X(e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(t,{emit:o}){var n;const r=t,a=At.useRouter(),{i18n:{t:i}}=P.useI18n(),{getMessageFromError:l}=P.useErrors(),{axiosInstance:s}=P.useAxios({headers:(n=r.config)==null?void 0:n.requestHeaders}),c=e.ref(!1),d=e.ref(!1),u=e.ref(""),p=e.computed(()=>r.canSubmit===!1||r.isReadonly),y=e.computed(()=>{var f,h;if(!r.editId)return"";let g=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,((f=r.config)==null?void 0:f.controlPlaneId)||""):r.config.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(h=r.config)!=null&&h.workspace?`/${r.config.workspace}`:"")),g=g.replace(/{id}/gi,r.editId),g}),m=()=>{r.config.cancelRoute?a.push(r.config.cancelRoute):S()},S=()=>{o("cancel")},k=()=>{p.value||o("submit")};return e.watch(()=>c.value,f=>{o("loading",f)},{immediate:!0}),e.onBeforeMount(async()=>{if(r.editId)try{d.value=!1,c.value=!0;const{data:f}=await s.get(y.value);o("fetch:success",f)}catch(f){const h=l(f);u.value=h.startsWith("code")?i("baseForm.errors.edit"):h,d.value=!0,o("fetch:error",f)}finally{c.value=!1}}),(f,h)=>{const g=e.resolveComponent("KSkeleton"),b=e.resolveComponent("KEmptyState"),w=e.resolveComponent("KAlert"),K=e.resolveComponent("KButton"),D=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(D,{class:"kong-ui-entity-base-form"},{body:e.withCtx(()=>[c.value?(e.openBlock(),e.createBlock(g,{key:0,type:"form"})):d.value?(e.openBlock(),e.createBlock(b,{key:1,"cta-text":e.unref(i)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":m,"is-error":!0},{message:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(u.value),1)]),_:1},8,["cta-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:e.withModifiers(S,["prevent"]),onSubmit:e.withModifiers(k,["prevent"])},[e.renderSlot(f.$slots,"default",{},void 0,!0),t.errorMessage?(e.openBlock(),e.createBlock(w,{key:0,"alert-message":t.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ci,[e.renderSlot(f.$slots,"form-actions",{},()=>[e.createVNode(K,{appearance:"secondary","data-testid":"form-cancel",disabled:t.isReadonly,type:"reset"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),e.createVNode(K,{appearance:"primary","data-testid":"form-submit",disabled:p.value,type:"submit"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,bi))]),_:3})}}}),[["__scopeId","data-v-81612aef"]]),Si={key:0,"data-testid":"first-col"},xi=X(e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(t){const o=t,n=e.computed(()=>{var k;return((k=o.rowEl)==null?void 0:k.querySelector(`[data-testid="${o.keyName}"]`))||null}),r=e.computed(()=>{var k;return((k=n.value)==null?void 0:k.querySelector('[data-testid="first-col"]'))||null}),a=e.computed(()=>{var k,f;const h=(k=o.rowEl)==null?void 0:k.querySelectorAll("td");return h?((f=h[0])==null?void 0:f.getAttribute("data-testid"))===o.keyName:!1});let i;const l=()=>{i&&(i.disconnect(),i=void 0)},s=()=>{var k,f,h;d.value=((k=r.value)==null?void 0:k.getBoundingClientRect().width)||0,u.value=((f=n.value)==null?void 0:f.clientWidth)||0,p.value=((h=c.value)==null?void 0:h.innerText)||""},c=e.ref({}),d=e.ref(0),u=e.ref(0),p=e.ref(""),y=e.computed(()=>[r.value,n.value]),m=e.watch(y,k=>{if(a.value&&(l(),"ResizeObserver"in window&&window)){i=new ResizeObserver(f=>{window.requestAnimationFrame(()=>{!Array.isArray(f)||!f.length||s()})});for(const f of k)f&&i.observe(f)}},{immediate:!0,flush:"post",deep:!0}),S=e.computed(()=>a.value?d.value>u.value:!1);return e.onMounted(()=>{s()}),e.onUnmounted(()=>{m()}),(k,f)=>{const h=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:c,class:"content-wrapper"},[a.value?(e.openBlock(),e.createElementBlock("span",Si,[e.createVNode(h,{label:S.value?p.value:"","max-width":"300",placement:"bottomStart"},{default:e.withCtx(()=>[e.renderSlot(k.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):e.renderSlot(k.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),Bi={class:"toolbar-container"},Ni={key:0,class:"toolbar-button-container"},Ii=["data-testid"],Ai=X(e.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:String,default:""},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(t,{emit:o}){const n=t,{i18n:{t:r}}=P.useI18n(),a=e.computed(()=>n.cacheIdentifier||n.preferencesStorageKey),i=b=>b.hasData||!!n.query,l=e.computed(()=>{const b=[];return Object.keys(n.tableHeaders).forEach(w=>{const K=n.tableHeaders[w];b.push({label:K.label??w,key:w,sortable:K.sortable??!1})}),n.enableEntityActions&&b.push({key:"actions",hideLabel:!0}),b}),s=b=>({"data-rowid":b.id,"data-testid":b.name,...n.rowAttributes(b)}),c=e.ref({}),d=b=>{var w;return(w=c.value)==null?void 0:w.$el.querySelector(`[data-rowid="${b.id}"]`)},u=b=>{const w={"data-testid":b.headerKey,...n.cellAttributes(b)};return b.colIndex===0&&(w.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),w},p=()=>{o("empty-state-cta-clicked"),y()},y=()=>{o("clear-search-input")},m=e.computed(()=>n.disableRowClick?void 0:(b,w)=>{o("click:row",w)}),S=b=>{o("sort",b)},{setTablePreferences:k,getTablePreferences:f}=Bn(),h=e.computed(()=>{const b=f(n.preferencesStorageKey);return{...n.initialFetcherParams,...b}}),g=b=>{n.preferencesStorageKey&&k(n.preferencesStorageKey,b)};return(b,w)=>{const K=e.resolveComponent("KIcon"),D=e.resolveComponent("KButton"),T=e.resolveComponent("KDropdown"),C=e.resolveComponent("KTable"),A=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(A,{class:"kong-ui-entity-base-table",title:t.title},{body:e.withCtx(()=>[e.createVNode(C,{ref_key:"tableRefs",ref:c,"cache-identifier":a.value,"cell-attrs":u,"disable-pagination-page-jump":t.disablePaginationPageJump,"disable-sorting":t.disableSorting,"empty-state-action-button-icon":t.query?"":"plus","empty-state-action-message":t.query?e.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):t.emptyStateOptions.ctaText,"empty-state-action-route":t.query?"":t.emptyStateOptions.ctaPath,"empty-state-icon":t.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":t.query?e.unref(r)("baseTable.emptyState.noSearchResultsMessage"):t.emptyStateOptions.message,"empty-state-title":t.query?e.unref(r)("baseTable.emptyState.noSearchResultsTitle"):t.emptyStateOptions.title,"enable-client-sort":t.enableClientSort,"error-state-title":t.errorMessage,fetcher:t.fetcher,"fetcher-cache-key":String(t.fetcherCacheKey),"has-error":!!t.errorMessage,headers:l.value,"hide-pagination-when-optional":"","initial-fetcher-params":h.value,"is-loading":t.isLoading,"pagination-type":t.paginationType,"row-attrs":s,"search-input":t.query,onKtableEmptyStateCtaClicked:p,"onRow:click":m.value,onSort:w[0]||(w[0]=B=>S(B)),"onUpdate:tablePreferences":g},e.createSlots({toolbar:e.withCtx(({state:B})=>[e.withDirectives(e.createElementVNode("div",Bi,[e.renderSlot(b.$slots,"toolbar-filter",{},void 0,!0),b.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",Ni,[e.renderSlot(b.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)],512),[[e.vShow,i(B)]])]),actions:e.withCtx(({row:B,rowKey:N,rowValue:_})=>[e.createElementVNode("div",{class:"actions-container","data-testid":B.name},[e.createVNode(T,{"kpop-attributes":{placement:"bottomEnd"},width:t.dropdownMenuWidth},{items:e.withCtx(()=>[e.renderSlot(b.$slots,"actions",{row:B,rowKey:N,rowValue:_},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(D,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:e.withCtx(()=>[e.createVNode(K,{color:e.unref(ho),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,Ii)]),_:2},[e.renderList(t.tableHeaders,(B,N)=>({name:N,fn:e.withCtx(({row:_,rowKey:E,rowValue:$})=>[e.createVNode(xi,{"key-name":String(N),"row-el":d(_)},{default:e.withCtx(()=>[e.renderSlot(b.$slots,N,{row:_,rowKey:E,rowValue:$},()=>[e.createTextVNode(e.toDisplayString($),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-86d2d2a3"]]),_i={key:0,class:"kong-ui-entity-delete-error"},Ti={key:1,class:"description"},Ei=X(e.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(t,{emit:o}){const n=t,{i18nT:r}=P.useI18n(),a=e.computed(()=>n.needConfirm?n.entityName:""),i=()=>{o("cancel")},l=()=>{o("proceed")};return(s,c)=>{const d=e.resolveComponent("KAlert"),u=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(u,{"action-button-text":"Yes, delete","action-pending":t.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":a.value,"is-visible":t.visible,title:t.title,type:"danger",onCanceled:i,onProceed:l},{"body-content":e.withCtx(()=>[t.error?(e.openBlock(),e.createElementBlock("div",_i,[e.createVNode(d,{appearance:"danger"},{alertMessage:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(r),{class:"message",keypath:n.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.entityType),1)]),_:2},[n.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(n.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),n.description||s.$slots.description?(e.openBlock(),e.createElementBlock("div",Ti,[e.renderSlot(s.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),Vi={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},$i={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},ji=["fill"],Oi={mask:"url(#mask0_180_20349)"},Fi=["fill"],mn=e.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${yo})`}},setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("svg",Vi,[e.createElementVNode("mask",$i,[e.createElementVNode("rect",{fill:t.color,height:"20",width:"20"},null,8,ji)]),e.createElementVNode("g",Oi,[e.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:t.color},null,8,Fi)])]))}}),Mi={key:1,class:"kong-ui-entity-filter"},Ki={class:"menu-item-title"},Di={class:"menu-item-indicator"},Li={class:"menu-item-body"},qi=["for"],vi={class:"menu-item-buttons"},Pi={class:"filter-clear-button-container"},Ri=X(e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,{i18n:{t:r}}=P.useI18n(),a=e.ref(!1),i=e.ref({}),l=e.computed(()=>{const f=[];return new URLSearchParams(n.modelValue).forEach((h,g)=>{h!==""&&f.push(g)}),f}),s=e.computed(()=>{const f=n.config.fields;return Object.keys(f).filter(h=>f[h].searchable).map(h=>({label:f[h].label||h,value:h}))});e.watch(()=>n.modelValue,f=>{i.value={},new URLSearchParams(f).forEach((h,g)=>{i.value[g]=h})});const c=()=>{a.value=!a.value},d=f=>{o("update:modelValue",f)},u=f=>`filter-${f}`,p=f=>{var h,g;return(((g=(h=n.config.schema)==null?void 0:h[f])==null?void 0:g.values)??[]).map(b=>({value:b,label:b}))},y=f=>{var h,g;return((g=(h=n.config.schema)==null?void 0:h[f])==null?void 0:g.type)??"text"},m=f=>{i.value={...i.value,[f]:""},k()},S=()=>{i.value={},k(!0)},k=(f=!1)=>{const h=Object.keys(i.value).reduce((g,b)=>(i.value[b]&&(g[b]=`${i.value[b]}`),g),{});f&&(a.value=!1),o("update:modelValue",new URLSearchParams(h).toString())};return(f,h)=>{const g=e.resolveComponent("KInput"),b=e.resolveComponent("KButton"),w=e.resolveComponent("KSelect"),K=e.resolveComponent("KMenuItem"),D=e.resolveComponent("KMenu");return t.config.isExactMatch?(e.openBlock(),e.createBlock(g,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":t.modelValue,placeholder:t.config.placeholder,"onUpdate:modelValue":d},{before:e.withCtx(()=>[e.createVNode(mn)]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",Mi,[e.createVNode(b,{appearance:"tertiary","data-testid":"filter-button",onClick:c},{default:e.withCtx(()=>[e.createVNode(mn),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("filter.filterButtonText"))+" "+e.toDisplayString(l.value.length>0?`(${l.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:c},null,512),[[e.vShow,a.value]]),e.withDirectives(e.createVNode(D,{class:"kong-ui-entity-filter-menu"},{body:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(T,C)=>(e.openBlock(),e.createBlock(K,{key:T.value,"data-testid":T.value,expandable:"","last-menu-item":C===s.value.length-1},{itemTitle:e.withCtx(()=>[e.createElementVNode("span",Ki,[e.createTextVNode(e.toDisplayString(T.label)+" ",1),e.withDirectives(e.createElementVNode("span",Di,null,512),[[e.vShow,l.value.includes(T.value)]])])]),itemBody:e.withCtx(()=>{var A,B;return[e.createElementVNode("div",Li,[e.createElementVNode("label",{class:"menu-item-label",for:u(T.value)},e.toDisplayString(e.unref(r)("filter.fieldLabel")),9,qi),((B=(A=t.config.schema)==null?void 0:A[T.value])==null?void 0:B.type)==="select"?(e.openBlock(),e.createBlock(w,{key:0,id:u(T.value),modelValue:i.value[T.value],"onUpdate:modelValue":N=>i.value[T.value]=N,appearance:"select",items:p(T.value),placeholder:e.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(e.openBlock(),e.createBlock(g,{key:1,id:u(T.value),modelValue:i.value[T.value],"onUpdate:modelValue":N=>i.value[T.value]=N,autocomplete:"off",placeholder:e.unref(r)("filter.inputPlaceholder"),type:y(T.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),e.createElementVNode("div",vi,[e.createVNode(b,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:h[0]||(h[0]=N=>k(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.applyButtonText")),1)]),_:1}),e.createVNode(b,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:N=>m(T.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:e.withCtx(()=>[e.createElementVNode("div",Pi,[e.createVNode(b,{size:"small",onClick:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.clearAllButtonText")),1)]),_:1})])]),_:1},512),[[e.vShow,a.value]])]))}}}),[["__scopeId","data-v-4ea260f0"]]),It=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(t){const o=t,n=e.ref(void 0),r=e.computed(()=>n.value===!0||n.value!==void 0&&o.forceShow===!0);return e.watch(()=>o.authFunction,async()=>{n.value=await o.authFunction()},{immediate:!0}),(a,i)=>r.value?e.renderSlot(a.$slots,"default",{key:0,isAllowed:n.value}):e.createCommentVNode("",!0)}}),Ui={class:"form-section-wrapper"},zi={key:0,class:"form-section-title"},Hi={key:1,class:"form-section-description"},Ji={key:2,class:"form-section-footer"},Yi={class:"form-section-content"},Wi=X(e.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(t){const o=e.useSlots();return(n,r)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":t.hasDivider}])},[e.createElementVNode("div",Ui,[t.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:t.stickyInfoHeader}])},[t.title?(e.openBlock(),e.createElementBlock("h4",zi,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.description||e.unref(o).description?(e.openBlock(),e.createElementBlock("div",Hi,[e.renderSlot(n.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(o).footer?(e.openBlock(),e.createElementBlock("div",Ji,[e.renderSlot(n.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",Yi,[e.renderSlot(n.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:yn,useDeleteUrlBuilder:Gi,useErrors:Zi,useExternalLinkCreator:Cl,useFetchUrlBuilder:wl,useFetcher:Xi,useDebouncedFilter:Sl,useStringHelpers:xl,useHelpers:Bl,useGatewayFeatureSupported:Nl,useTruncationDetector:Il}=P,Al="",Qi={class:"kong-ui-entities-key-sets-list"},tl={key:1},el=e.defineComponent({__name:"KeySetList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success"],setup(t,{emit:o}){var Y;const n=t,{i18n:{t:r}}=_t.useI18n(),a=At.useRouter(),{axiosInstance:i}=yn({headers:(Y=n.config)==null?void 0:Y.requestHeaders}),l=e.ref(1),s=e.computed(()=>n.config.app!=="kongManager"||!!n.config.disableSorting),c={name:{label:r("keySets.list.table_headers.name"),searchable:!0,sortable:!0},tags:{label:r("keySets.list.table_headers.tags")},id:{label:r("keySets.list.table_headers.id"),sortable:!0}},d=c,u=e.computed(()=>{var V,z;let I=`${n.config.apiBaseUrl}${bt.list[n.config.app]}`;return n.config.app==="konnect"?I=I.replace(/{controlPlaneId}/gi,((V=n.config)==null?void 0:V.controlPlaneId)||""):n.config.app==="kongManager"&&(I=I.replace(/\/{workspace}/gi,(z=n.config)!=null&&z.workspace?`/${n.config.workspace}`:"")),I}),p=e.ref(""),y=e.computed(()=>{const I=n.config.app==="konnect"||n.config.isExactMatch;if(I)return{isExactMatch:I,placeholder:r("keySets.search.placeholder")};const V={name:c.name};return{isExactMatch:I,fields:V,schema:n.config.filterSchema}}),{fetcher:m,fetcherState:S}=Xi(n.config,u.value),k=()=>{p.value=""},f=()=>{l.value++},h=e.ref(""),g=(I,V)=>{const z=I.id;if(!V(z)){D(I,"id");return}K(I,"id")},b=(I,V)=>{const z=JSON.stringify(I);if(!V(z)){o("copy:error",{entity:I,message:r("keySets.errors.copy")});return}o("copy:success",{entity:I,message:r("keySets.copy.success_brief")})},w=(I,V,z)=>{const{type:it}=I;it==="success"?K(V,z):D(V,z)},K=(I,V)=>{o("copy:success",{entity:I,field:V,message:r("keySets.copy.success",{val:I[V]})})},D=(I,V)=>{o("copy:error",{entity:I,field:V,message:r("keySets.errors.copy")})},T=async I=>{var z;await((z=n.canRetrieve)==null?void 0:z.call(n,I))&&a.push(n.config.getViewRoute(I.id))},C=I=>({label:r("keySets.actions.view"),to:n.config.getViewRoute(I)}),A=I=>({label:r("keySets.actions.edit"),to:n.config.getEditRoute(I)}),B=e.ref(void 0),N=e.ref(!1),_=e.ref(!1),E=e.ref(""),$=Gi(n.config,u.value),v=I=>{B.value=I,N.value=!0},R=()=>{N.value=!1},L=async()=>{var I,V,z;if((I=B.value)!=null&&I.id){_.value=!0;try{await i.delete($(B.value.id)),_.value=!1,N.value=!1,l.value++,o("delete:success",B.value)}catch(it){E.value=((z=(V=it.response)==null?void 0:V.data)==null?void 0:z.message)||it.message||r("keySets.errors.delete"),o("error",it)}finally{_.value=!1}}};e.watch(S,I=>{if(I.status===rt.Error){h.value=r("keySets.errors.general"),o("error",I.error);return}h.value=""});const O=e.ref({ctaPath:n.config.createRoute,ctaText:void 0,message:r("keySets.list.empty_state.description"),title:r("keySets.title")});return e.onBeforeMount(async()=>{await n.canCreate()&&(O.value.title=r("keySets.list.empty_state.title"),O.value.ctaText=r("keySets.actions.create"))}),(I,V)=>{const z=e.resolveComponent("KButton"),it=e.resolveComponent("KBadge"),sl=e.resolveComponent("KTruncate"),cl=e.resolveComponent("CopyUuid"),kt=e.resolveComponent("KDropdownItem"),hn=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Qi,[e.createVNode(e.unref(Ai),{"cache-identifier":t.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":s.value,"empty-state-options":O.value,"enable-entity-actions":"","error-message":h.value,fetcher:e.unref(m),"fetcher-cache-key":l.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-key-sets-list",query:p.value,"table-headers":e.unref(d),onClearSearchInput:k,"onClick:row":V[2]||(V[2]=F=>T(F)),onSort:f},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(Ri),{modelValue:p.value,"onUpdate:modelValue":V[0]||(V[0]=F=>p.value=F),config:y.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(It),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(z,{appearance:"primary","data-testid":"toolbar-add-key-set",icon:"plus",to:t.config.createRoute},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("keySets.list.toolbar_actions.new_key_set")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:e.withCtx(({rowValue:F})=>[e.createElementVNode("b",null,e.toDisplayString(F??"-"),1)]),tags:e.withCtx(({rowValue:F})=>[(F==null?void 0:F.length)>0?(e.openBlock(),e.createBlock(sl,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F,et=>(e.openBlock(),e.createBlock(it,{key:et,onClick:V[1]||(V[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(et),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",tl,"-"))]),id:e.withCtx(({row:F,rowValue:et})=>[e.createVNode(cl,{notify:Yt=>w(Yt,F,"id"),truncated:!1,uuid:et},null,8,["notify","uuid"])]),actions:e.withCtx(({row:F})=>[e.createVNode(hn,null,{default:e.withCtx(({copyToClipboard:et})=>[e.createVNode(kt,{"data-testid":"action-entity-copy-id",onClick:Yt=>g(F,et)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("keySets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(hn,null,{default:e.withCtx(({copyToClipboard:et})=>[e.createVNode(kt,{"data-testid":"action-entity-copy-json",onClick:Yt=>b(F,et)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("keySets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(It),{"auth-function":()=>t.canRetrieve(F)},{default:e.withCtx(()=>[e.createVNode(kt,{"data-testid":"action-entity-view","has-divider":"",item:C(F.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(It),{"auth-function":()=>t.canEdit(F)},{default:e.withCtx(()=>[e.createVNode(kt,{"data-testid":"action-entity-edit",item:A(F.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(It),{"auth-function":()=>t.canDelete(F)},{default:e.withCtx(()=>[e.createVNode(kt,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:et=>v(F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("keySets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),e.createVNode(e.unref(Ei),{"action-pending":_.value,description:e.unref(r)("keySets.delete.description"),"entity-name":B.value&&(B.value.name||B.value.id),"entity-type":e.unref(Wt).KeySet,error:E.value,title:e.unref(r)("keySets.delete.title"),visible:N.value,onCancel:R,onProceed:L},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),_l="",gn=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},nl=gn(el,[["__scopeId","data-v-82f21705"]]),ol={class:"kong-ui-entities-key-sets-form"},rl=e.defineComponent({__name:"KeySetForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.cancelRoute)},keySetId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:o}){var f;const n=t,r=At.useRouter(),{i18n:{t:a}}=_t.useI18n(),{getMessageFromError:i}=Zi(),{axiosInstance:l}=yn({headers:(f=n.config)==null?void 0:f.requestHeaders}),s=e.computed(()=>bt.form[n.config.app].edit),c=e.computed(()=>n.keySetId?Tt.Edit:Tt.Create),d=e.reactive({fields:{name:"",tags:""},isReadonly:!1,errorMessage:""}),u=e.reactive({name:"",tags:""}),p=e.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(u)&&!!d.fields.name),y=h=>{var g;d.fields.name=(h==null?void 0:h.name)||"",d.fields.tags=((g=h==null?void 0:h.tags)==null?void 0:g.join(", "))||"",Object.assign(u,d.fields)},m=()=>{r.push(n.config.cancelRoute)},S=e.computed(()=>{var g,b;let h=`${n.config.apiBaseUrl}${bt.form[n.config.app][c.value]}`;return n.config.app==="konnect"?h=h.replace(/{controlPlaneId}/gi,((g=n.config)==null?void 0:g.controlPlaneId)||""):n.config.app==="kongManager"&&(h=h.replace(/\/{workspace}/gi,(b=n.config)!=null&&b.workspace?`/${n.config.workspace}`:"")),h=h.replace(/{id}/gi,n.keySetId),h}),k=async()=>{var h,g,b,w,K;try{d.isReadonly=!0;const D={name:d.fields.name,tags:((b=(g=(h=d.fields.tags)==null?void 0:h.split(","))==null?void 0:g.map(C=>String(C||"").trim()))==null?void 0:b.filter(C=>C!==""))||""};let T;if(c.value==="create"?T=await l.post(S.value,D):c.value==="edit"&&(T=((w=n.config)==null?void 0:w.app)==="konnect"?await l.put(S.value,D):await l.patch(S.value,D)),T){const{data:C}=T;d.fields.name=(C==null?void 0:C.name)||"",d.fields.tags=((K=C==null?void 0:C.tags)==null?void 0:K.join(", "))||"",Object.assign(u,d.fields),o("update",T==null?void 0:T.data)}}catch(D){d.errorMessage=i(D),o("error",D)}finally{d.isReadonly=!1}};return(h,g)=>{const b=e.resolveComponent("KInput");return e.openBlock(),e.createElementBlock("div",ol,[e.createVNode(e.unref(wi),{"can-submit":p.value,config:t.config,"edit-id":t.keySetId,"error-message":d.errorMessage,"fetch-url":s.value,"is-readonly":d.isReadonly,onCancel:m,"onFetch:error":g[2]||(g[2]=w=>h.$emit("error",w)),"onFetch:success":y,onLoading:g[3]||(g[3]=w=>h.$emit("loading",w)),onSubmit:k},{default:e.withCtx(()=>[e.createVNode(e.unref(Wi),{description:e.unref(a)("keySets.form.sections.general.description"),"has-divider":"",title:e.unref(a)("keySets.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(b,{modelValue:d.fields.name,"onUpdate:modelValue":g[0]||(g[0]=w=>d.fields.name=w),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-set-form-name",label:e.unref(a)("keySets.form.fields.name.label"),placeholder:e.unref(a)("keySets.form.fields.name.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(b,{modelValue:d.fields.tags,"onUpdate:modelValue":g[1]||(g[1]=w=>d.fields.tags=w),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-set-form-tags",help:e.unref(a)("keySets.form.fields.tags.help"),label:e.unref(a)("keySets.form.fields.tags.label"),"label-attributes":{info:e.unref(a)("keySets.form.fields.tags.tooltip")},placeholder:e.unref(a)("keySets.form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])])}}}),Tl="",al=gn(rl,[["__scopeId","data-v-29df09d7"]]),il={class:"kong-ui-entities-keys-entity-config-card"},ll=e.defineComponent({__name:"KeySetConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(t){const o=t,{i18n:{t:n}}=_t.useI18n(),r=e.computed(()=>bt.form[o.config.app].edit),a=e.ref({id:{},name:{},last_updated:{},created:{},tags:{tooltip:n("keySets.form.fields.tags.tooltip")}});return(i,l)=>(e.openBlock(),e.createElementBlock("div",il,[e.createVNode(e.unref(ki),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":a.value,"fetch-url":r.value,"hide-title":t.hideTitle,"onCopy:success":l[0]||(l[0]=s=>i.$emit("copy:success",s)),"onFetch:error":l[1]||(l[1]=s=>i.$emit("fetch:error",s)),"onFetch:success":l[2]||(l[2]=s=>i.$emit("fetch:success",s)),onLoading:l[3]||(l[3]=s=>i.$emit("loading",s))},null,8,["config","config-card-doc","config-schema","fetch-url","hide-title"])]))}});G.KeySetConfigCard=ll,G.KeySetForm=al,G.KeySetList=nl,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})});
31
+ `+t.slice(l+1):c+=t.slice(a),c.slice(1)}function Ea(t){for(var o="",n=0,r,a=0;a<t.length;n>=65536?a+=2:a++)n=ht(t,a),r=H[n],!r&&gt(n)?(o+=t[a],n>=65536&&(o+=t[a+1])):o+=r||Ca(n);return o}function Ta(t,o,n){var r="",a=t.tag,i,l,s;for(i=0,l=n.length;i<l;i+=1)s=n[i],t.replacer&&(s=t.replacer.call(n,String(i),s)),(et(t,o,s,!1,!1)||typeof s>"u"&&et(t,o,null,!1,!1))&&(r!==""&&(r+=","+(t.condenseFlow?"":" ")),r+=t.dump);t.tag=a,t.dump="["+r+"]"}function pn(t,o,n,r){var a="",i=t.tag,l,s,c;for(l=0,s=n.length;l<s;l+=1)c=n[l],t.replacer&&(c=t.replacer.call(n,String(l),c)),(et(t,o+1,c,!0,!0,!1,!0)||typeof c>"u"&&et(t,o+1,null,!0,!0,!1,!0))&&((!r||a!=="")&&(a+=Ut(t,o)),t.dump&&mt===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=i,t.dump=a||"[]"}function Va(t,o,n){var r="",a=t.tag,i=Object.keys(n),l,s,c,d,u;for(l=0,s=i.length;l<s;l+=1)u="",r!==""&&(u+=", "),t.condenseFlow&&(u+='"'),c=i[l],d=n[c],t.replacer&&(d=t.replacer.call(n,c,d)),et(t,o,c,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),et(t,o,d,!1,!1)&&(u+=t.dump,r+=u));t.tag=a,t.dump="{"+r+"}"}function ja(t,o,n,r){var a="",i=t.tag,l=Object.keys(n),s,c,d,u,p,y;if(t.sortKeys===!0)l.sort();else if(typeof t.sortKeys=="function")l.sort(t.sortKeys);else if(t.sortKeys)throw new J("sortKeys must be a boolean or a function");for(s=0,c=l.length;s<c;s+=1)y="",(!r||a!=="")&&(y+=Ut(t,o)),d=l[s],u=n[d],t.replacer&&(u=t.replacer.call(n,d,u)),et(t,o+1,d,!0,!0,!0)&&(p=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,p&&(t.dump&&mt===t.dump.charCodeAt(0)?y+="?":y+="? "),y+=t.dump,p&&(y+=Ut(t,o)),et(t,o+1,u,!0,p)&&(t.dump&&mt===t.dump.charCodeAt(0)?y+=":":y+=": ",y+=t.dump,a+=y));t.tag=i,t.dump=a||"{}"}function un(t,o,n){var r,a,i,l,s,c;for(a=n?t.explicitTypes:t.implicitTypes,i=0,l=a.length;i<l;i+=1)if(s=a[i],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof o=="object"&&o instanceof s.instanceOf)&&(!s.predicate||s.predicate(o))){if(n?s.multi&&s.representName?t.tag=s.representName(o):t.tag=s.tag:t.tag="?",s.represent){if(c=t.styleMap[s.tag]||s.defaultStyle,Je.call(s.represent)==="[object Function]")r=s.represent(o,c);else if(Ye.call(s.represent,c))r=s.represent[c](o,c);else throw new J("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');t.dump=r}return!0}return!1}function et(t,o,n,r,a,i,l){t.tag=null,t.dump=n,un(t,n,!1)||un(t,n,!0);var s=Je.call(t.dump),c=r,d;r&&(r=t.flowLevel<0||t.flowLevel>o);var u=s==="[object Object]"||s==="[object Array]",p,y;if(u&&(p=t.duplicates.indexOf(n),y=p!==-1),(t.tag!==null&&t.tag!=="?"||y||t.indent!==2&&o>0)&&(a=!1),y&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(u&&y&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),s==="[object Object]")r&&Object.keys(t.dump).length!==0?(ja(t,o,t.dump,a),y&&(t.dump="&ref_"+p+t.dump)):(Va(t,o,t.dump),y&&(t.dump="&ref_"+p+" "+t.dump));else if(s==="[object Array]")r&&t.dump.length!==0?(t.noArrayIndent&&!l&&o>0?pn(t,o-1,t.dump,a):pn(t,o,t.dump,a),y&&(t.dump="&ref_"+p+t.dump)):(Ta(t,o,t.dump),y&&(t.dump="&ref_"+p+" "+t.dump));else if(s==="[object String]")t.tag!=="?"&&Na(t,t.dump,o,i,c);else{if(s==="[object Undefined]"||t.skipInvalid)return!1;throw new J("unacceptable kind of an object to dump "+s)}t.tag!==null&&t.tag!=="?"&&(d=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",t.dump=d+" "+t.dump)}return!0}function $a(t,o){var n=[],r=[],a,i;for(Ht(t,n,r),a=0,i=r.length;a<i;a+=1)o.duplicates.push(n[r[a]]);o.usedDuplicates=new Array(i)}function Ht(t,o,n){var r,a,i;if(t!==null&&typeof t=="object")if(a=o.indexOf(t),a!==-1)n.indexOf(a)===-1&&n.push(a);else if(o.push(t),Array.isArray(t))for(a=0,i=t.length;a<i;a+=1)Ht(t[a],o,n);else for(r=Object.keys(t),a=0,i=r.length;a<i;a+=1)Ht(t[r[a]],o,n)}function Ma(t,o){o=o||{};var n=new Sa(o);n.noRefs||$a(t,n);var r=t;return n.replacer&&(r=n.replacer.call({"":r},"",r)),et(n,0,r,!0,!0)?n.dump+`
32
+ `:""}var Oa=Ma,Fa={dump:Oa};function Jt(t,o){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}var Ka=z,Da=fe,La=he,qa=Se,va=xe,Ra=Dt,Pa=He.load,Ua=He.loadAll,za=Fa.dump,Ha=J,Ja={binary:_e,float:we,map:ge,null:ke,pairs:Te,set:Ve,timestamp:Ae,bool:be,int:Ce,merge:Ne,omap:Ee,seq:ye,str:me},Ya=Jt("safeLoad","load"),Wa=Jt("safeLoadAll","loadAll"),Za=Jt("safeDump","dump"),Ga={Type:Ka,Schema:Da,FAILSAFE_SCHEMA:La,JSON_SCHEMA:qa,CORE_SCHEMA:va,DEFAULT_SCHEMA:Ra,load:Pa,loadAll:Ua,dump:za,YAMLException:Ha,types:Ja,safeLoad:Ya,safeLoadAll:Wa,safeDump:Za};const Qa={key:0,class:"config-card-display-form"},Xa=["data-testid"],ti={key:0,class:"config-card-prop-section-title"},ei={key:1,class:"config-card-display-json"},ni={key:2,class:"config-card-display-yaml"},oi=Q(e.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:t=>["structured","yaml","json"].includes(t)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(t){const o=t,n=e.useSlots(),{i18n:{t:r}}=P.useI18n(),a=s=>!!(s.tooltip||n[`${s.key}-label-tooltip`]),i=e.ref(""),l=e.ref("");return e.watch(()=>o.format,s=>{s==="json"?i.value=JSON.stringify(o.record,null,2):s==="yaml"&&(l.value=Ga.dump(o.record))},{immediate:!0}),(s,c)=>{const d=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.format==="structured"?(e.openBlock(),e.createElementBlock("div",Qa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.propListTypes,u=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${u}-props`,class:e.normalizeClass(`config-card-details-${u}-props`),"data-testid":`config-card-details-${u}-props`},[u!=="basic"?(e.openBlock(),e.createElementBlock("div",ti,e.toDisplayString(u==="advanced"?e.unref(r)("baseConfigCard.sections.advanced"):e.unref(r)("baseConfigCard.sections.plugin")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.propertyCollections[u],p=>(e.openBlock(),e.createBlock($t,{key:p.key,item:p},e.createSlots({label:e.withCtx(()=>[e.renderSlot(s.$slots,`${p.key}-label`,{row:p},void 0,!0)]),[p.key]:e.withCtx(({rowValue:y})=>[e.renderSlot(s.$slots,p.key,{row:p,rowValue:y},void 0,!0)]),_:2},[a(p)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(s.$slots,`${p.key}-label-tooltip`,{row:p},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Xa))),128))])):e.createCommentVNode("",!0),t.format==="json"?(e.openBlock(),e.createElementBlock("div",ei,[e.createVNode(d,{id:"config-card-codeblock",code:i.value,language:"json",theme:"dark"},null,8,["code"])])):e.createCommentVNode("",!0),t.format==="yaml"?(e.openBlock(),e.createElementBlock("div",ni,[e.createVNode(d,{id:"config-card-codeblock",code:l.value,language:"yaml",theme:"dark"},null,8,["code"])])):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-6c45e9e4"]]),fn="24px",ri=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},ai=t=>(e.pushScopeId("data-v-dd88a2bb"),t=t(),e.popScopeId(),t),ii=["aria-hidden"],li={key:0,"data-testid":"kui-icon-svg-title"},si=ai(()=>e.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),ci=e.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:fn,validator:t=>{if(typeof t=="number"&&t>0)return!0;if(typeof t=="string"){const o=String(t).replace(/px/gi,""),n=Number(o);if(n&&!isNaN(n)&&Number.isInteger(n)&&n>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(t){const o=t,n=e.computed(()=>{if(typeof o.size=="number"&&o.size>0)return`${o.size}px`;if(typeof o.size=="string"){const a=String(o.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return fn}),r=e.computed(()=>({boxSizing:"border-box",color:o.color,display:o.display,height:n.value,lineHeight:"0",width:n.value}));return(a,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.as),{"aria-hidden":t.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:e.normalizeStyle(r.value)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":t.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[t.title?(e.openBlock(),e.createElementBlock("title",li,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),si],8,ii))]),_:1},8,["aria-hidden","style"]))}}),di=ri(ci,[["__scopeId","data-v-dd88a2bb"]]),pi={"data-testid":"config-card-title"},ui={class:"config-card-actions"},fi=["href"],mi={key:2,class:"config-card-details-section"},yi={key:3,class:"config-card-details-section"},gi=["data-testid"],hi={key:0,class:"config-card-prop-section-title"},ki=Q(e.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(t,{emit:o}){var n;const r=t,a=e.useSlots(),{i18n:{t:i}}=P.useI18n(),{getMessageFromError:l}=P.useErrors(),{convertKeyToTitle:s}=P.useStringHelpers(),{axiosInstance:c}=P.useAxios({headers:(n=r.config)==null?void 0:n.requestHeaders}),d=[{label:i("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],u=e.ref("structured"),p=C=>{u.value=C==null?void 0:C.value},y={id:{type:$.ID,label:i("baseConfigCard.commonFields.id_label"),order:0,section:G.Basic},name:{order:1,section:G.Basic},enabled:{type:$.BadgeStatus,order:2,section:G.Basic},updated_at:{type:$.Date,label:i("baseConfigCard.commonFields.updated_at_label"),order:3,section:G.Basic},created_at:{type:$.Date,label:i("baseConfigCard.commonFields.created_at_label"),order:4,section:G.Basic},tags:{type:$.BadgeTag,order:-1,section:G.Basic}},m=e.ref(!1),w=e.ref(!1),b=e.ref(""),f=e.ref(),h=e.computed(()=>{var C,A,N;if(!f.value)return[];const B=[],_=Object.keys(f.value).length;for(const E in f.value){const O=(A=(C=r.configSchema)==null?void 0:C[E])==null?void 0:A.order,K=(N=y[E])==null?void 0:N.order;let U=_;(K||K===0)&&(U=K===-1?_+1:K),O&&(U=O===-1?_+1:O),B.push([E,U])}return B.sort(function(E,O){return E[1]-O[1]}),B.map(E=>{var O,K;const U=E[0],q=(O=f.value)==null?void 0:O[U],F=((K=r.configSchema)==null?void 0:K[U])||{},Y=y[U];return{key:U,value:q,hidden:F.hidden||!1,type:F.type??((Y==null?void 0:Y.type)||$.Text),label:F.label??((Y==null?void 0:Y.label)||s(U)),tooltip:F.tooltip??((Y==null?void 0:Y.tooltip)||void 0),section:F.section??((Y==null?void 0:Y.section)||G.Advanced)}}).filter(E=>!E.hidden&&E.key!==r.pluginConfigKey)}),g=e.computed(()=>{var C,A;if(!f.value||!r.pluginConfigKey)return[];const N=f.value[r.pluginConfigKey]||{},B=Object.keys(N).length,_=[];for(const E in N){const O=(A=(C=r.pluginConfigSchema)==null?void 0:C[E])==null?void 0:A.order,K=N[E];let U=K!=null&&K!==""?B-1:B;O&&(U=O===-1?B+1:O),_.push([E,U])}return _.sort(function(E,O){return E[1]-O[1]}),_.map(E=>{var O;const K=E[0],U=N[K],q=((O=r.pluginConfigSchema)==null?void 0:O[K])||{};return{key:K,value:U,hidden:q.hidden||!1,type:q.type??$.Text,label:q.label??s(K),tooltip:q.tooltip??void 0,section:G.Plugin}}).filter(E=>!E.hidden)}),x=e.computed(()=>{var C,A,N,B;return{basic:(C=h.value)==null?void 0:C.filter(_=>_.section===G.Basic),advanced:(A=h.value)==null?void 0:A.filter(_=>_.section===G.Advanced),plugin:(B=g.value)==null?void 0:B.concat((N=h.value)==null?void 0:N.filter(_=>_.section===G.Plugin))}}),k=e.computed(()=>{const C=[];return x.value.basic.length&&C.push("basic"),x.value.advanced.length&&C.push("advanced"),x.value.plugin.length&&C.push("plugin"),C}),T=C=>!!(C.tooltip||a[`${C.key}-label-tooltip`]),M=e.computed(()=>{var C,A;let N=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?N=N.replace(/{controlPlaneId}/gi,((C=r.config)==null?void 0:C.controlPlaneId)||""):r.config.app==="kongManager"&&(N=N.replace(/\/{workspace}/gi,(A=r.config)!=null&&A.workspace?`/${r.config.workspace}`:"")),N=N.replace(/{id}/gi,r.config.entityId),N}),V=C=>{f.value&&C(JSON.stringify(f.value))?o("copy:success",f.value):o("copy:error")};return e.watch(m,C=>{o("loading",C)},{immediate:!0}),e.onBeforeMount(async()=>{w.value=!1,m.value=!0;try{const{data:C}=await c.get(M.value);if(r.dataKey)if(typeof C[r.dataKey]<"u")f.value={...C[r.dataKey]};else throw new Error(i("errors.dataKeyUndefined",{dataKey:r.dataKey}));else f.value={...C};Object.keys(r.configSchema).filter(A=>r.configSchema[A].forceShow).forEach(A=>{f.value&&typeof f.value[A]>"u"&&(f.value[A]=null)}),o("fetch:success",C)}catch(C){const A=l(C);b.value=A.startsWith("code")?i("baseConfigCard.errors.load"):A,w.value=!0,o("fetch:error",C)}finally{m.value=!1}}),(C,A)=>{const N=e.resolveComponent("KLabel"),B=e.resolveComponent("KSelect"),_=e.resolveComponent("KButton"),E=e.resolveComponent("KClipboardProvider"),O=e.resolveComponent("KSkeleton"),K=e.resolveComponent("KEmptyState"),U=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(U,{class:"kong-ui-entity-base-config-card"},e.createSlots({actions:e.withCtx(()=>[e.createElementVNode("div",ui,[e.renderSlot(C.$slots,"actions",{},void 0,!0),t.config.jsonYamlEnabled?(e.openBlock(),e.createBlock(N,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1})):e.createCommentVNode("",!0),t.config.jsonYamlEnabled?(e.openBlock(),e.createBlock(B,{key:1,appearance:"select","data-testid":"select-config-format",items:d,onChange:p})):e.createCommentVNode("",!0),r.config.jsonYamlEnabled&&t.configCardDoc?(e.openBlock(),e.createBlock(_,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.configCardDoc,rel:"noopener",target:"_blank"},[e.createVNode(e.unref(di),{size:e.unref(bo)},null,8,["size"])],8,fi)]),_:1})):e.createCommentVNode("",!0),t.config.jsonYamlEnabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E,{key:3},{default:e.withCtx(({copyToClipboard:q})=>[!m.value&&!w.value?(e.openBlock(),e.createBlock(_,{key:0,appearance:"tertiary","data-testid":"json-copy-button",onClick:F=>V(q)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:1}))])]),body:e.withCtx(()=>[m.value?(e.openBlock(),e.createBlock(O,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):w.value?(e.openBlock(),e.createBlock(K,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(b.value),1)]),_:1})):e.createCommentVNode("",!0),t.config.jsonYamlEnabled?(e.openBlock(),e.createElementBlock("div",mi,[e.createVNode(oi,{format:u.value,"prop-list-types":k.value,"property-collections":x.value,record:f.value},e.createSlots({_:2},[e.renderList(Object.keys(C.$slots),q=>({name:q,fn:e.withCtx(({row:F,rowValue:Y})=>[e.renderSlot(C.$slots,q,{row:F,rowValue:Y},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(e.openBlock(),e.createElementBlock("div",yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,q=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${q}-props`,class:e.normalizeClass(`config-card-details-${q}-props`),"data-testid":`config-card-details-${q}-props`},[q!=="basic"?(e.openBlock(),e.createElementBlock("div",hi,e.toDisplayString(q==="advanced"?e.unref(i)("baseConfigCard.sections.advanced"):e.unref(i)("baseConfigCard.sections.plugin")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value[q],F=>(e.openBlock(),e.createBlock($t,{key:F.key,item:F},e.createSlots({label:e.withCtx(()=>[e.renderSlot(C.$slots,`${F.key}-label`,{row:F},void 0,!0)]),[F.key]:e.withCtx(({rowValue:Y})=>[e.renderSlot(C.$slots,F.key,{row:F,rowValue:Y},void 0,!0)]),_:2},[T(F)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(C.$slots,`${F.key}-label-tooltip`,{row:F},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,gi))),128))]))]),_:2},[t.hideTitle?void 0:{name:"title",fn:e.withCtx(()=>[e.createElementVNode("div",pi,[e.renderSlot(C.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-24515123"]]),bi=["onReset","onSubmit"],Ci={class:"form-actions","data-testid":"form-actions"},wi=Q(e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(t,{emit:o}){var n;const r=t,a=Nt.useRouter(),{i18n:{t:i}}=P.useI18n(),{getMessageFromError:l}=P.useErrors(),{axiosInstance:s}=P.useAxios({headers:(n=r.config)==null?void 0:n.requestHeaders}),c=e.ref(!1),d=e.ref(!1),u=e.ref(""),p=e.computed(()=>r.canSubmit===!1||r.isReadonly),y=e.computed(()=>{var f,h;if(!r.editId)return"";let g=`${r.config.apiBaseUrl}${r.fetchUrl}`;return r.config.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,((f=r.config)==null?void 0:f.controlPlaneId)||""):r.config.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(h=r.config)!=null&&h.workspace?`/${r.config.workspace}`:"")),g=g.replace(/{id}/gi,r.editId),g}),m=()=>{r.config.cancelRoute?a.push(r.config.cancelRoute):w()},w=()=>{o("cancel")},b=()=>{p.value||o("submit")};return e.watch(()=>c.value,f=>{o("loading",f)},{immediate:!0}),e.onBeforeMount(async()=>{if(r.editId)try{d.value=!1,c.value=!0;const{data:f}=await s.get(y.value);o("fetch:success",f)}catch(f){const h=l(f);u.value=h.startsWith("code")?i("baseForm.errors.edit"):h,d.value=!0,o("fetch:error",f)}finally{c.value=!1}}),(f,h)=>{const g=e.resolveComponent("KSkeleton"),x=e.resolveComponent("KEmptyState"),k=e.resolveComponent("KAlert"),T=e.resolveComponent("KButton"),M=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(M,{class:"kong-ui-entity-base-form"},{body:e.withCtx(()=>[c.value?(e.openBlock(),e.createBlock(g,{key:0,type:"form"})):d.value?(e.openBlock(),e.createBlock(x,{key:1,"cta-text":e.unref(i)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":m,"is-error":!0},{message:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(u.value),1)]),_:1},8,["cta-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:e.withModifiers(w,["prevent"]),onSubmit:e.withModifiers(b,["prevent"])},[e.renderSlot(f.$slots,"default",{},void 0,!0),t.errorMessage?(e.openBlock(),e.createBlock(k,{key:0,"alert-message":t.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ci,[e.renderSlot(f.$slots,"form-actions",{},()=>[e.createVNode(T,{appearance:"secondary","data-testid":"form-cancel",disabled:t.isReadonly,type:"reset"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),e.createVNode(T,{appearance:"primary","data-testid":"form-submit",disabled:p.value,type:"submit"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,bi))]),_:3})}}}),[["__scopeId","data-v-81612aef"]]),Si={key:0,"data-testid":"first-col"},xi=Q(e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(t){const o=t,n=e.computed(()=>{var b;return((b=o.rowEl)==null?void 0:b.querySelector(`[data-testid="${o.keyName}"]`))||null}),r=e.computed(()=>{var b;return((b=n.value)==null?void 0:b.querySelector('[data-testid="first-col"]'))||null}),a=e.computed(()=>{var b,f;const h=(b=o.rowEl)==null?void 0:b.querySelectorAll("td");return h?((f=h[0])==null?void 0:f.getAttribute("data-testid"))===o.keyName:!1});let i;const l=()=>{i&&(i.disconnect(),i=void 0)},s=()=>{var b,f,h;d.value=((b=r.value)==null?void 0:b.getBoundingClientRect().width)||0,u.value=((f=n.value)==null?void 0:f.clientWidth)||0,p.value=((h=c.value)==null?void 0:h.innerText)||""},c=e.ref({}),d=e.ref(0),u=e.ref(0),p=e.ref(""),y=e.computed(()=>[r.value,n.value]),m=e.watch(y,b=>{if(a.value&&(l(),"ResizeObserver"in window&&window)){i=new ResizeObserver(f=>{window.requestAnimationFrame(()=>{!Array.isArray(f)||!f.length||s()})});for(const f of b)f&&i.observe(f)}},{immediate:!0,flush:"post",deep:!0}),w=e.computed(()=>a.value?d.value>u.value:!1);return e.onMounted(()=>{s()}),e.onUnmounted(()=>{m()}),(b,f)=>{const h=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:c,class:"content-wrapper"},[a.value?(e.openBlock(),e.createElementBlock("span",Si,[e.createVNode(h,{label:w.value?p.value:"","max-width":"300",placement:"bottomStart"},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):e.renderSlot(b.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),Bi={class:"toolbar-container"},Ii={key:0,class:"toolbar-button-container"},Ai=["data-testid"],Ni=Q(e.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(t,{emit:o}){const n=t,{i18n:{t:r}}=P.useI18n(),a=e.computed(()=>{var k,T;return typeof n.errorMessage=="string"?{hasError:!!n.errorMessage,title:n.errorMessage,message:void 0}:{hasError:!!n.errorMessage,title:(k=n.errorMessage)==null?void 0:k.title,message:(T=n.errorMessage)==null?void 0:T.message}}),i=e.computed(()=>n.cacheIdentifier||n.preferencesStorageKey),l=k=>k.hasData||!!n.query,s=e.computed(()=>{const k=[];return Object.keys(n.tableHeaders).forEach(T=>{const M=n.tableHeaders[T];k.push({label:M.label??T,key:T,sortable:M.sortable??!1})}),n.enableEntityActions&&k.push({key:"actions",hideLabel:!0}),k}),c=k=>({"data-rowid":k.id,"data-testid":k.name,...n.rowAttributes(k)}),d=e.ref({}),u=k=>{var T;return(T=d.value)==null?void 0:T.$el.querySelector(`[data-rowid="${k.id}"]`)},p=k=>{const T={"data-testid":k.headerKey,...n.cellAttributes(k)};return k.colIndex===0&&(T.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),T},y=()=>{o("empty-state-cta-clicked"),m()},m=()=>{o("clear-search-input")},w=e.computed(()=>n.disableRowClick?void 0:(k,T)=>{o("click:row",T)}),b=k=>{o("sort",k)},{setTablePreferences:f,getTablePreferences:h}=Bn(),g=e.computed(()=>{const k=h(n.preferencesStorageKey);return{...n.initialFetcherParams,...k}}),x=k=>{n.preferencesStorageKey&&f(n.preferencesStorageKey,k)};return(k,T)=>{const M=e.resolveComponent("KIcon"),V=e.resolveComponent("KButton"),C=e.resolveComponent("KDropdown"),A=e.resolveComponent("KTable"),N=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(N,{class:"kong-ui-entity-base-table",title:t.title},{body:e.withCtx(()=>[e.createVNode(A,{ref_key:"tableRefs",ref:d,"cache-identifier":i.value,"cell-attrs":p,"disable-pagination-page-jump":t.disablePaginationPageJump,"disable-sorting":t.disableSorting,"empty-state-action-button-icon":t.query?"":"plus","empty-state-action-message":t.query?e.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):t.emptyStateOptions.ctaText,"empty-state-action-route":t.query?"":t.emptyStateOptions.ctaPath,"empty-state-icon":t.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":t.query?e.unref(r)("baseTable.emptyState.noSearchResultsMessage"):t.emptyStateOptions.message,"empty-state-title":t.query?e.unref(r)("baseTable.emptyState.noSearchResultsTitle"):t.emptyStateOptions.title,"enable-client-sort":t.enableClientSort,"error-state-message":a.value.message,"error-state-title":a.value.title,fetcher:t.fetcher,"fetcher-cache-key":String(t.fetcherCacheKey),"has-error":a.value.hasError,headers:s.value,"hide-pagination-when-optional":"","initial-fetcher-params":g.value,"is-loading":t.isLoading,"pagination-type":t.paginationType,"row-attrs":c,"search-input":t.query,onKtableEmptyStateCtaClicked:y,"onRow:click":w.value,onSort:T[0]||(T[0]=B=>b(B)),"onUpdate:tablePreferences":x},e.createSlots({toolbar:e.withCtx(({state:B})=>[e.withDirectives(e.createElementVNode("div",Bi,[e.renderSlot(k.$slots,"toolbar-filter",{},void 0,!0),k.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",Ii,[e.renderSlot(k.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)],512),[[e.vShow,l(B)]])]),actions:e.withCtx(({row:B,rowKey:_,rowValue:E})=>[e.createElementVNode("div",{class:"actions-container","data-testid":B.name},[e.createVNode(C,{"kpop-attributes":{placement:"bottomEnd"},width:t.dropdownMenuWidth},{items:e.withCtx(()=>[e.renderSlot(k.$slots,"actions",{row:B,rowKey:_,rowValue:E},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(V,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:e.withCtx(()=>[e.createVNode(M,{color:e.unref(ho),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,Ai)]),_:2},[e.renderList(t.tableHeaders,(B,_)=>({name:_,fn:e.withCtx(({row:E,rowKey:O,rowValue:K})=>[e.createVNode(xi,{"key-name":String(_),"row-el":u(E)},{default:e.withCtx(()=>[e.renderSlot(k.$slots,_,{row:E,rowKey:O,rowValue:K},()=>[e.createTextVNode(e.toDisplayString(K),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-message","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-499a771c"]]),_i={key:0,class:"kong-ui-entity-delete-error"},Ei={key:1,class:"description"},Ti=Q(e.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(t,{emit:o}){const n=t,{i18nT:r}=P.useI18n(),a=e.computed(()=>n.needConfirm?n.entityName:""),i=()=>{o("cancel")},l=()=>{o("proceed")};return(s,c)=>{const d=e.resolveComponent("KAlert"),u=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(u,{"action-button-text":"Yes, delete","action-pending":t.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":a.value,"is-visible":t.visible,title:t.title,type:"danger",onCanceled:i,onProceed:l},{"body-content":e.withCtx(()=>[t.error?(e.openBlock(),e.createElementBlock("div",_i,[e.createVNode(d,{appearance:"danger"},{alertMessage:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(r),{class:"message",keypath:n.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.entityType),1)]),_:2},[n.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(n.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),n.description||s.$slots.description?(e.openBlock(),e.createElementBlock("div",Ei,[e.renderSlot(s.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),Vi={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},ji={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},$i=["fill"],Mi={mask:"url(#mask0_180_20349)"},Oi=["fill"],mn=e.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${yo})`}},setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("svg",Vi,[e.createElementVNode("mask",ji,[e.createElementVNode("rect",{fill:t.color,height:"20",width:"20"},null,8,$i)]),e.createElementVNode("g",Mi,[e.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:t.color},null,8,Oi)])]))}}),Fi={key:1,class:"kong-ui-entity-filter"},Ki={class:"menu-item-title"},Di={class:"menu-item-indicator"},Li={class:"menu-item-body"},qi=["for"],vi={class:"menu-item-buttons"},Ri={class:"filter-clear-button-container"},Pi=Q(e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,{i18n:{t:r}}=P.useI18n(),a=e.ref(!1),i=e.ref({}),l=e.computed(()=>{const f=[];return new URLSearchParams(n.modelValue).forEach((h,g)=>{h!==""&&f.push(g)}),f}),s=e.computed(()=>{const f=n.config.fields;return Object.keys(f).filter(h=>f[h].searchable).map(h=>({label:f[h].label||h,value:h}))});e.watch(()=>n.modelValue,f=>{i.value={},new URLSearchParams(f).forEach((h,g)=>{i.value[g]=h})});const c=()=>{a.value=!a.value},d=f=>{o("update:modelValue",f)},u=f=>`filter-${f}`,p=f=>{var h,g;return(((g=(h=n.config.schema)==null?void 0:h[f])==null?void 0:g.values)??[]).map(x=>({value:x,label:x}))},y=f=>{var h,g;return((g=(h=n.config.schema)==null?void 0:h[f])==null?void 0:g.type)??"text"},m=f=>{i.value={...i.value,[f]:""},b()},w=()=>{i.value={},b(!0)},b=(f=!1)=>{const h=Object.keys(i.value).reduce((g,x)=>(i.value[x]&&(g[x]=`${i.value[x]}`),g),{});f&&(a.value=!1),o("update:modelValue",new URLSearchParams(h).toString())};return(f,h)=>{const g=e.resolveComponent("KInput"),x=e.resolveComponent("KButton"),k=e.resolveComponent("KSelect"),T=e.resolveComponent("KMenuItem"),M=e.resolveComponent("KMenu");return t.config.isExactMatch?(e.openBlock(),e.createBlock(g,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":t.modelValue,placeholder:t.config.placeholder,"onUpdate:modelValue":d},{before:e.withCtx(()=>[e.createVNode(mn)]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",Fi,[e.createVNode(x,{appearance:"tertiary","data-testid":"filter-button",onClick:c},{default:e.withCtx(()=>[e.createVNode(mn),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("filter.filterButtonText"))+" "+e.toDisplayString(l.value.length>0?`(${l.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:c},null,512),[[e.vShow,a.value]]),e.withDirectives(e.createVNode(M,{class:"kong-ui-entity-filter-menu"},{body:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(V,C)=>(e.openBlock(),e.createBlock(T,{key:V.value,"data-testid":V.value,expandable:"","last-menu-item":C===s.value.length-1},{itemTitle:e.withCtx(()=>[e.createElementVNode("span",Ki,[e.createTextVNode(e.toDisplayString(V.label)+" ",1),e.withDirectives(e.createElementVNode("span",Di,null,512),[[e.vShow,l.value.includes(V.value)]])])]),itemBody:e.withCtx(()=>{var A,N;return[e.createElementVNode("div",Li,[e.createElementVNode("label",{class:"menu-item-label",for:u(V.value)},e.toDisplayString(e.unref(r)("filter.fieldLabel")),9,qi),((N=(A=t.config.schema)==null?void 0:A[V.value])==null?void 0:N.type)==="select"?(e.openBlock(),e.createBlock(k,{key:0,id:u(V.value),modelValue:i.value[V.value],"onUpdate:modelValue":B=>i.value[V.value]=B,appearance:"select",items:p(V.value),placeholder:e.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(e.openBlock(),e.createBlock(g,{key:1,id:u(V.value),modelValue:i.value[V.value],"onUpdate:modelValue":B=>i.value[V.value]=B,autocomplete:"off",placeholder:e.unref(r)("filter.inputPlaceholder"),type:y(V.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),e.createElementVNode("div",vi,[e.createVNode(x,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:h[0]||(h[0]=B=>b(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.applyButtonText")),1)]),_:1}),e.createVNode(x,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:B=>m(V.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:e.withCtx(()=>[e.createElementVNode("div",Ri,[e.createVNode(x,{size:"small",onClick:w},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.clearAllButtonText")),1)]),_:1})])]),_:1},512),[[e.vShow,a.value]])]))}}}),[["__scopeId","data-v-4ea260f0"]]),At=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(t){const o=t,n=e.ref(void 0),r=e.computed(()=>n.value===!0||n.value!==void 0&&o.forceShow===!0);return e.watch(()=>o.authFunction,async()=>{n.value=await o.authFunction()},{immediate:!0}),(a,i)=>r.value?e.renderSlot(a.$slots,"default",{key:0,isAllowed:n.value}):e.createCommentVNode("",!0)}}),Ui={class:"form-section-wrapper"},zi={key:0,class:"form-section-title"},Hi={key:1,class:"form-section-description"},Ji={key:2,class:"form-section-footer"},Yi={class:"form-section-content"},Wi=Q(e.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(t){const o=e.useSlots();return(n,r)=>(e.openBlock(),e.createElementBlock("fieldset",{class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":t.hasDivider}])},[e.createElementVNode("div",Ui,[t.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:t.stickyInfoHeader}])},[t.title?(e.openBlock(),e.createElementBlock("h4",zi,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.description||e.unref(o).description?(e.openBlock(),e.createElementBlock("div",Hi,[e.renderSlot(n.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(o).footer?(e.openBlock(),e.createElementBlock("div",Ji,[e.renderSlot(n.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",Yi,[e.renderSlot(n.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:yn,useDeleteUrlBuilder:Zi,useErrors:Gi,useExternalLinkCreator:Cl,useFetchUrlBuilder:wl,useFetcher:Qi,useDebouncedFilter:Sl,useStringHelpers:xl,useHelpers:Bl,useGatewayFeatureSupported:Il,useTruncationDetector:Al}=P,Nl="",Xi={class:"kong-ui-entities-key-sets-list"},tl={key:1},el=e.defineComponent({__name:"KeySetList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute||t.app==="kongManager"&&!t.isExactMatch&&!t.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0}},emits:["error","copy:success","copy:error","delete:success"],setup(t,{emit:o}){var Y;const n=t,{i18n:{t:r}}=_t.useI18n(),a=Nt.useRouter(),{axiosInstance:i}=yn({headers:(Y=n.config)==null?void 0:Y.requestHeaders}),l=e.ref(1),s=e.computed(()=>n.config.app!=="kongManager"||!!n.config.disableSorting),c={name:{label:r("keySets.list.table_headers.name"),searchable:!0,sortable:!0},tags:{label:r("keySets.list.table_headers.tags")},id:{label:r("keySets.list.table_headers.id"),sortable:!0}},d=c,u=e.computed(()=>{var j,v;let I=`${n.config.apiBaseUrl}${bt.list[n.config.app]}`;return n.config.app==="konnect"?I=I.replace(/{controlPlaneId}/gi,((j=n.config)==null?void 0:j.controlPlaneId)||""):n.config.app==="kongManager"&&(I=I.replace(/\/{workspace}/gi,(v=n.config)!=null&&v.workspace?`/${n.config.workspace}`:"")),I}),p=e.ref(""),y=e.computed(()=>{const I=n.config.app==="konnect"||n.config.isExactMatch;if(I)return{isExactMatch:I,placeholder:r("keySets.search.placeholder")};const j={name:c.name};return{isExactMatch:I,fields:j,schema:n.config.filterSchema}}),{fetcher:m,fetcherState:w}=Qi(n.config,u.value),b=()=>{p.value=""},f=()=>{l.value++},h=e.ref(null),g=(I,j)=>{const v=I.id;if(!j(v)){M(I,"id");return}T(I,"id")},x=(I,j)=>{const v=JSON.stringify(I);if(!j(v)){o("copy:error",{entity:I,message:r("keySets.errors.copy")});return}o("copy:success",{entity:I,message:r("keySets.copy.success_brief")})},k=(I,j,v)=>{const{type:tt}=I;tt==="success"?T(j,v):M(j,v)},T=(I,j)=>{o("copy:success",{entity:I,field:j,message:r("keySets.copy.success",{val:I[j]})})},M=(I,j)=>{o("copy:error",{entity:I,field:j,message:r("keySets.errors.copy")})},V=async I=>{var v;await((v=n.canRetrieve)==null?void 0:v.call(n,I))&&a.push(n.config.getViewRoute(I.id))},C=I=>({label:r("keySets.actions.view"),to:n.config.getViewRoute(I)}),A=I=>({label:r("keySets.actions.edit"),to:n.config.getEditRoute(I)}),N=e.ref(void 0),B=e.ref(!1),_=e.ref(!1),E=e.ref(""),O=Zi(n.config,u.value),K=I=>{N.value=I,B.value=!0},U=()=>{B.value=!1},q=async()=>{var I,j,v;if((I=N.value)!=null&&I.id){_.value=!0;try{await i.delete(O(N.value.id)),_.value=!1,B.value=!1,l.value++,o("delete:success",N.value)}catch(tt){E.value=((v=(j=tt.response)==null?void 0:j.data)==null?void 0:v.message)||tt.message||r("keySets.errors.delete"),o("error",tt)}finally{_.value=!1}}};e.watch(w,I=>{var j,v,tt;if(I.status===at.Error){h.value={title:r("keySets.errors.general")},(tt=(v=(j=I.error)==null?void 0:j.response)==null?void 0:v.data)!=null&&tt.message&&(h.value.message=I.error.response.data.message),o("error",I.error);return}h.value=null});const F=e.ref({ctaPath:n.config.createRoute,ctaText:void 0,message:r("keySets.list.empty_state.description"),title:r("keySets.title")});return e.onBeforeMount(async()=>{await n.canCreate()&&(F.value.title=r("keySets.list.empty_state.title"),F.value.ctaText=r("keySets.actions.create"))}),(I,j)=>{const v=e.resolveComponent("KButton"),tt=e.resolveComponent("KBadge"),sl=e.resolveComponent("KTruncate"),cl=e.resolveComponent("CopyUuid"),kt=e.resolveComponent("KDropdownItem"),hn=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Xi,[e.createVNode(e.unref(Ni),{"cache-identifier":t.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":s.value,"empty-state-options":F.value,"enable-entity-actions":"","error-message":h.value,fetcher:e.unref(m),"fetcher-cache-key":l.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-key-sets-list",query:p.value,"table-headers":e.unref(d),onClearSearchInput:b,"onClick:row":j[2]||(j[2]=D=>V(D)),onSort:f},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(Pi),{modelValue:p.value,"onUpdate:modelValue":j[0]||(j[0]=D=>p.value=D),config:y.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(At),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(v,{appearance:"primary","data-testid":"toolbar-add-key-set",icon:"plus",to:t.config.createRoute},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("keySets.list.toolbar_actions.new_key_set")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:e.withCtx(({rowValue:D})=>[e.createElementVNode("b",null,e.toDisplayString(D??"-"),1)]),tags:e.withCtx(({rowValue:D})=>[(D==null?void 0:D.length)>0?(e.openBlock(),e.createBlock(sl,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D,nt=>(e.openBlock(),e.createBlock(tt,{key:nt,onClick:j[1]||(j[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(nt),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",tl,"-"))]),id:e.withCtx(({row:D,rowValue:nt})=>[e.createVNode(cl,{notify:Yt=>k(Yt,D,"id"),truncated:!1,uuid:nt},null,8,["notify","uuid"])]),actions:e.withCtx(({row:D})=>[e.createVNode(hn,null,{default:e.withCtx(({copyToClipboard:nt})=>[e.createVNode(kt,{"data-testid":"action-entity-copy-id",onClick:Yt=>g(D,nt)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("keySets.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(hn,null,{default:e.withCtx(({copyToClipboard:nt})=>[e.createVNode(kt,{"data-testid":"action-entity-copy-json",onClick:Yt=>x(D,nt)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("keySets.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(At),{"auth-function":()=>t.canRetrieve(D)},{default:e.withCtx(()=>[e.createVNode(kt,{"data-testid":"action-entity-view","has-divider":"",item:C(D.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(At),{"auth-function":()=>t.canEdit(D)},{default:e.withCtx(()=>[e.createVNode(kt,{"data-testid":"action-entity-edit",item:A(D.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(At),{"auth-function":()=>t.canDelete(D)},{default:e.withCtx(()=>[e.createVNode(kt,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:nt=>K(D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("keySets.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),e.createVNode(e.unref(Ti),{"action-pending":_.value,description:e.unref(r)("keySets.delete.description"),"entity-name":N.value&&(N.value.name||N.value.id),"entity-type":e.unref(Wt).KeySet,error:E.value,title:e.unref(r)("keySets.delete.title"),visible:B.value,onCancel:U,onProceed:q},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),_l="",gn=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},nl=gn(el,[["__scopeId","data-v-aeec2847"]]),ol={class:"kong-ui-entities-key-sets-form"},rl=e.defineComponent({__name:"KeySetForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.cancelRoute)},keySetId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(t,{emit:o}){var f;const n=t,r=Nt.useRouter(),{i18n:{t:a}}=_t.useI18n(),{getMessageFromError:i}=Gi(),{axiosInstance:l}=yn({headers:(f=n.config)==null?void 0:f.requestHeaders}),s=e.computed(()=>bt.form[n.config.app].edit),c=e.computed(()=>n.keySetId?Et.Edit:Et.Create),d=e.reactive({fields:{name:"",tags:""},isReadonly:!1,errorMessage:""}),u=e.reactive({name:"",tags:""}),p=e.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(u)&&!!d.fields.name),y=h=>{var g;d.fields.name=(h==null?void 0:h.name)||"",d.fields.tags=((g=h==null?void 0:h.tags)==null?void 0:g.join(", "))||"",Object.assign(u,d.fields)},m=()=>{r.push(n.config.cancelRoute)},w=e.computed(()=>{var g,x;let h=`${n.config.apiBaseUrl}${bt.form[n.config.app][c.value]}`;return n.config.app==="konnect"?h=h.replace(/{controlPlaneId}/gi,((g=n.config)==null?void 0:g.controlPlaneId)||""):n.config.app==="kongManager"&&(h=h.replace(/\/{workspace}/gi,(x=n.config)!=null&&x.workspace?`/${n.config.workspace}`:"")),h=h.replace(/{id}/gi,n.keySetId),h}),b=async()=>{var h,g,x,k,T;try{d.isReadonly=!0;const M={name:d.fields.name,tags:((x=(g=(h=d.fields.tags)==null?void 0:h.split(","))==null?void 0:g.map(C=>String(C||"").trim()))==null?void 0:x.filter(C=>C!==""))||""};let V;if(c.value==="create"?V=await l.post(w.value,M):c.value==="edit"&&(V=((k=n.config)==null?void 0:k.app)==="konnect"?await l.put(w.value,M):await l.patch(w.value,M)),V){const{data:C}=V;d.fields.name=(C==null?void 0:C.name)||"",d.fields.tags=((T=C==null?void 0:C.tags)==null?void 0:T.join(", "))||"",Object.assign(u,d.fields),o("update",V==null?void 0:V.data)}}catch(M){d.errorMessage=i(M),o("error",M)}finally{d.isReadonly=!1}};return(h,g)=>{const x=e.resolveComponent("KInput");return e.openBlock(),e.createElementBlock("div",ol,[e.createVNode(e.unref(wi),{"can-submit":p.value,config:t.config,"edit-id":t.keySetId,"error-message":d.errorMessage,"fetch-url":s.value,"is-readonly":d.isReadonly,onCancel:m,"onFetch:error":g[2]||(g[2]=k=>h.$emit("error",k)),"onFetch:success":y,onLoading:g[3]||(g[3]=k=>h.$emit("loading",k)),onSubmit:b},{default:e.withCtx(()=>[e.createVNode(e.unref(Wi),{description:e.unref(a)("keySets.form.sections.general.description"),"has-divider":"",title:e.unref(a)("keySets.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:d.fields.name,"onUpdate:modelValue":g[0]||(g[0]=k=>d.fields.name=k),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-set-form-name",label:e.unref(a)("keySets.form.fields.name.label"),placeholder:e.unref(a)("keySets.form.fields.name.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(x,{modelValue:d.fields.tags,"onUpdate:modelValue":g[1]||(g[1]=k=>d.fields.tags=k),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-set-form-tags",help:e.unref(a)("keySets.form.fields.tags.help"),label:e.unref(a)("keySets.form.fields.tags.label"),"label-attributes":{info:e.unref(a)("keySets.form.fields.tags.tooltip")},placeholder:e.unref(a)("keySets.form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])])}}}),El="",al=gn(rl,[["__scopeId","data-v-29df09d7"]]),il={class:"kong-ui-entities-keys-entity-config-card"},ll=e.defineComponent({__name:"KeySetConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(t){const o=t,{i18n:{t:n}}=_t.useI18n(),r=e.computed(()=>bt.form[o.config.app].edit),a=e.ref({id:{},name:{},last_updated:{},created:{},tags:{tooltip:n("keySets.form.fields.tags.tooltip")}});return(i,l)=>(e.openBlock(),e.createElementBlock("div",il,[e.createVNode(e.unref(ki),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":a.value,"fetch-url":r.value,"hide-title":t.hideTitle,"onCopy:success":l[0]||(l[0]=s=>i.$emit("copy:success",s)),"onFetch:error":l[1]||(l[1]=s=>i.$emit("fetch:error",s)),"onFetch:success":l[2]||(l[2]=s=>i.$emit("fetch:success",s)),onLoading:l[3]||(l[3]=s=>i.$emit("loading",s))},null,8,["config","config-card-doc","config-schema","fetch-url","hide-title"])]))}});Z.KeySetConfigCard=ll,Z.KeySetForm=al,Z.KeySetList=nl,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});