@kong-ui-public/entities-plugins 9.205.0 → 9.205.1
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.
|
@@ -14669,7 +14669,7 @@ function $O(e) {
|
|
|
14669
14669
|
}
|
|
14670
14670
|
function PO(e, t, n) {
|
|
14671
14671
|
let i = `${e.apiBaseUrl}${ft.form[e.app].entityGetOne}`;
|
|
14672
|
-
return e.app === "konnect"
|
|
14672
|
+
return e.app === "konnect" && (i = i.replace(/{controlPlaneId}/gi, e.controlPlaneId || "")), i = i.replace(/\/{workspace}/gi, e.workspace ? `/${e.workspace}` : "").replace(/{entity}/gi, t).replace(/{id}/gi, n), i;
|
|
14673
14673
|
}
|
|
14674
14674
|
function RO(e) {
|
|
14675
14675
|
const t = Number(e);
|
|
@@ -176,7 +176,7 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
|
|
|
176
176
|
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
177
177
|
`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){var r;const o=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,o.value){const i="end"in o.value?o.value.end:void 0,a=Array.isArray(i)?i[i.length-1]:void 0;(a==null?void 0:a.type)==="comment"?i==null||i.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else o.sep?o.sep.push(this.sourceToken):o.start.push(this.sourceToken);return;case"space":case"comment":if(o.value)n.items.push({start:[this.sourceToken]});else if(o.sep)o.sep.push(this.sourceToken);else{if(this.atIndentedComment(o.start,n.indent)){const i=n.items[n.items.length-2],a=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(a)){Array.prototype.push.apply(a,o.start),a.push(this.sourceToken),n.items.pop();return}}o.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const i=!this.onKeyLine&&this.indent===n.indent,a=i&&(o.sep||o.explicitKey)&&this.type!=="seq-item-ind";let s=[];if(a&&o.sep&&!o.value){const l=[];for(let c=0;c<o.sep.length;++c){const u=o.sep[c];switch(u.type){case"newline":l.push(c);break;case"space":break;case"comment":u.indent>n.indent&&(l.length=0);break;default:l.length=0}}l.length>=2&&(s=o.sep.splice(l[1]))}switch(this.type){case"anchor":case"tag":a||o.value?(s.push(this.sourceToken),n.items.push({start:s}),this.onKeyLine=!0):o.sep?o.sep.push(this.sourceToken):o.start.push(this.sourceToken);return;case"explicit-key-ind":!o.sep&&!o.explicitKey?(o.start.push(this.sourceToken),o.explicitKey=!0):a||o.value?(s.push(this.sourceToken),n.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(o.explicitKey)if(o.sep)if(o.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(So(o.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(a0(o.key)&&!So(o.sep,"newline")){const l=ea(o.start),c=o.key,u=o.sep;u.push(this.sourceToken),delete o.key,delete o.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:c,sep:u}]})}else s.length>0?o.sep=o.sep.concat(s,this.sourceToken):o.sep.push(this.sourceToken);else if(So(o.start,"newline"))Object.assign(o,{key:null,sep:[this.sourceToken]});else{const l=ea(o.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]})}else o.sep?o.value||a?n.items.push({start:s,key:null,sep:[this.sourceToken]}):So(o.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):o.sep.push(this.sourceToken):Object.assign(o,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);a||o.value?(n.items.push({start:s,key:l,sep:[]}),this.onKeyLine=!0):o.sep?this.stack.push(l):(Object.assign(o,{key:l,sep:[]}),this.onKeyLine=!0);return}default:{const l=this.startBlockValue(n);if(l){if(l.type==="block-seq"){if(!o.explicitKey&&o.sep&&!So(o.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&n.items.push({start:s});this.stack.push(l);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){var r;const o=n.items[n.items.length-1];switch(this.type){case"newline":if(o.value){const i="end"in o.value?o.value.end:void 0,a=Array.isArray(i)?i[i.length-1]:void 0;(a==null?void 0:a.type)==="comment"?i==null||i.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else o.start.push(this.sourceToken);return;case"space":case"comment":if(o.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(o.start,n.indent)){const i=n.items[n.items.length-2],a=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(a)){Array.prototype.push.apply(a,o.start),a.push(this.sourceToken),n.items.pop();return}}o.start.push(this.sourceToken)}return;case"anchor":case"tag":if(o.value||this.indent<=n.indent)break;o.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;o.value||So(o.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):o.start.push(this.sourceToken);return}if(this.indent>n.indent){const i=this.startBlockValue(n);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const r=n.items[n.items.length-1];if(this.type==="flow-error-end"){let o;do yield*this.pop(),o=this.peek(1);while((o==null?void 0:o.type)==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?n.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?n.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!r||r.value?n.items.push({start:[],key:i,sep:[]}):r.sep?this.stack.push(i):Object.assign(r,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":n.end.push(this.sourceToken);return}const o=this.startBlockValue(n);o?this.stack.push(o):(yield*this.pop(),yield*this.step())}else{const o=this.peek(2);if(o.type==="block-map"&&(this.type==="map-value-ind"&&o.indent===n.indent||this.type==="newline"&&!o.items[o.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&o.type!=="flow-collection"){const i=Uc(o),a=ea(i);s0(n);const s=n.end.splice(1,n.end.length);s.push(this.sourceToken);const l={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:a,key:n,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(n)}}flowScalar(n){if(this.onNewLine){let r=this.source.indexOf(`
|
|
178
178
|
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
179
|
-
`,r)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=Uc(n),o=ea(r);return o.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=Uc(n),o=ea(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,r){return this.type!=="comment"||this.indent<=r?!1:n.every(o=>o.type==="newline"||o.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Q$(e){const n=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||n&&new X$||null,prettyErrors:n}}function eL(e,n={}){const{lineCounter:r,prettyErrors:o}=Q$(n),i=new Z$(r==null?void 0:r.addNewLine),a=new H$(n);let s=null;for(const l of a.compose(i.parse(e),!0,e.length))if(!s)s=l;else if(s.options.logLevel!=="silent"){s.errors.push(new vs(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return o&&r&&(s.errors.forEach(Ww(e,r)),s.warnings.forEach(Ww(e,r))),s}function l0(e,n){const r=e.range;if(!r)return;const o=Math.max(0,r[0]),i=typeof r[1]=="number"?r[1]:typeof r[2]=="number"?r[2]:r[0],a=Math.max(o,i),s=n.getPositionAt(o),l=n.getPositionAt(a);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:l.lineNumber,endColumn:l.column}}function tL(e){return At(e)?e.value:e.toJSON()}function nL(e){if(!At(e))return;const{value:n}=e;return typeof n=="string"||typeof n=="number"?n:void 0}function c0(e,n){const r=nL(n);return r===void 0?e:[...e,r]}function rL(e,n){const r=[{node:e,keyPath:[]}];for(;r.length>0;){const o=r.pop();if(!o)continue;const{node:i,keyPath:a}=o;if(n(i,a),Ui(i)){for(let s=i.items.length-1;s>=0;s--){const l=i.items[s];Tt(l.value)&&r.push({node:l.value,keyPath:c0(a,l.key)}),Tt(l.key)&&r.push({node:l.key,keyPath:a})}continue}if(Ki(i))for(let s=i.items.length-1;s>=0;s--){const l=i.items[s],c=[...a,s];if(Ut(l)){Tt(l.value)&&r.push({node:l.value,keyPath:c0(c,l.key)}),Tt(l.key)&&r.push({node:l.key,keyPath:c});continue}Tt(l)&&r.push({node:l,keyPath:c})}}}function oL(e,n){const r=e.getIn(n,!0);return Tt(r)?r:void 0}function u0(e,n){return{provideCodeLenses:async(r,o)=>{if(r.getLanguageId()!=="yaml")return Jr();const i=await mw(r);if(i.isDefault||i.language!=="yaml")return Jr();const a=i.document,s=a==null?void 0:a.contents;return!a||!s?Jr():e(s,r,o)}}}function d0(e,n){return u0((r,o,i)=>{const a=[];return rL(r,(s,l)=>{if(i.isCancellationRequested||!At(s)||typeof s.value!="string"||!MR.test(s.value))return;const c=l0(s,o);c&&a.push({value:s.value,range:c,context:{keyPath:l,node:s}})}),i.isCancellationRequested?Jr():typeof e=="function"?e(a):{lenses:a.map(({value:s,range:l})=>jR(s,l,e)),dispose:()=>{}}})}function Dp(e,n,r){return{provideCodeLenses:async(o,i)=>{if(o.getLanguageId()!=="yaml")return Jr();const a=await mw(o);if(a.isDefault||a.language!=="yaml"||i.isCancellationRequested)return Jr();const s=a.document,l=s==null?void 0:s.contents;if(!s||!l)return Jr();const c=oL(s,e);if(!c)return Jr();const u=l0(c,o);return u?n(tL(c),u,{keyPath:e,node:c}):Jr()}}}function iL(e,n){const r=eL(e);return{language:"yaml",altVersionId:n,document:r}}const aL=Object.freeze(Object.defineProperty({__proto__:null,createYAMLCodeLensProvider:u0,createYAMLCopyUUIDCodeLensProvider:d0,createYAMLValueCodeLensProvider:Dp,parseIntoYAMLContext:iL},Symbol.toStringTag,{value:"Module"}));let sL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",lL=(e=21)=>{let n="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)n+=sL[r[e]&63];return n};const cL="/v2/control-planes/{controlPlaneId}/core-entities/v1",zn="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",Vr="/v2/control-planes/{controlPlaneId}/core-entities",Sn="/{workspace}",ta="",ct={list:{konnect:{all:`${zn}/plugins`,forEntity:`${zn}/{entityType}/{entityId}/plugins`},kongManager:{all:`${Sn}/plugins`,forEntity:`${Sn}/{entityType}/{entityId}/plugins`}},select:{konnect:{availablePlugins:`${cL}/available-plugins`,streamingCustomPlugins:`${Vr}/custom-plugins`,clonedPlugins:`${Vr}/cloned-plugins`,schemaCustomPluginItem:`${Vr}/plugin-schemas/{pluginId}`,streamingCustomPluginItem:`${Vr}/custom-plugins/{pluginId}`},kongManager:{availablePlugins:`${Sn}/kong`,availablePluginsForOss:"/",streamingCustomPlugins:`${ta}/custom-plugins`,clonedPlugins:`${ta}/cloned-plugins`}},form:{konnect:{create:{all:`${zn}/plugins`,forEntity:`${zn}/{entityType}/{entityId}/plugins`},edit:{all:`${zn}/plugins/{id}`,forEntity:`${zn}/{entityType}/{entityId}/plugins/{id}`},pluginSchema:"/v2/control-planes/{controlPlaneId}/schemas/core-entities/plugins/{plugin}",credential:{create:`${zn}/{resourceEndpoint}`,edit:`${zn}/{resourceEndpoint}/{id}`},credentialSchema:"/v2/control-planes/{controlPlaneId}/schemas/core-entities/{plugin}",entityGetOne:`${zn}/{entity}/{id}`,entityGetAll:`${zn}/{entity}`,entityPeek:`${zn}/{entity}?size={amount}`},kongManager:{create:{all:`${Sn}/plugins`,forEntity:`${Sn}/{entityType}/{entityId}/plugins`},edit:{all:`${Sn}/plugins/{id}`,forEntity:`${Sn}/{entityType}/{entityId}/plugins/{id}`},pluginSchema:`${Sn}/schemas/plugins/{plugin}`,credential:{create:`${Sn}/{resourceEndpoint}`,edit:`${Sn}/{resourceEndpoint}/{id}`},credentialSchema:`${Sn}/schemas/{plugin}`,entityGetOne:`${Sn}/{entity}/{id}`,entityGetAll:`${Sn}/{entity}`}},customPlugin:{konnect:{installed:{create:`${Vr}/plugin-schemas`,edit:`${Vr}/plugin-schemas/{pluginId}`},streamed:{create:`${Vr}/custom-plugins`,edit:`${Vr}/custom-plugins/{pluginId}`},cloned:{create:`${Vr}/cloned-plugins`,edit:`${Vr}/cloned-plugins/{pluginId}`}},kongManager:{streamed:{create:`${ta}/custom-plugins`,edit:`${ta}/custom-plugins/{pluginId}`},cloned:{create:`${ta}/cloned-plugins`,edit:`${ta}/cloned-plugins/{pluginId}`}}},item:{konnect:{all:`${zn}/plugins/{id}`,forEntity:`${zn}/{entityType}/{entityId}/plugins/{id}`},kongManager:{all:`${Sn}/plugins/{id}`,forEntity:`${Sn}/{entityType}/{entityId}/plugins/{id}`}}},Mp=new WeakMap,f0=Object.fromEntries(["service","route","consumer","consumer_group","certificate"].map(e=>[`${e}s`,e]));function uL(){const{i18n:{t:e}}=et(),n=o=>e(`plugins.free-form.code-lens.entity.${o}`),r=(o,i)=>e("plugins.free-form.code-lens.field.name",{value:o,entity:i});return{service:{title:n("service"),fields:[{id:"field/name",resolve:o=>o.data.name?r(o.data.name,n("service")):void 0}]},route:{title:n("route"),fields:[{id:"field/name",resolve:o=>o.data.name?r(o.data.name,n("route")):void 0}]},consumer_group:{title:n("consumer_group"),fields:[{id:"field/name",resolve:o=>o.data.name?r(o.data.name,n("consumer_group")):void 0}]},consumer:{title:n("consumer"),fields:[{id:"field/username",resolve:o=>o.data.username?e("plugins.free-form.code-lens.field.username",{value:o.data.username}):void 0},{id:"field/customId",resolve:o=>o.data.custom_id?e("plugins.free-form.code-lens.field.custom_id",{value:o.data.custom_id}):void 0}]},certificate:{title:n("certificate"),fields:[{id:"field/subject",resolve:o=>{if(o)return e("plugins.free-form.code-lens.field.subject",{value:o.cert.subject})}},{id:"field/notAfter",resolve:o=>{if(o)return e("plugins.free-form.code-lens.field.expires_after",{value:o.cert.notAfter.toLocaleString("en")})}}],commands:[{id:"cmd/copyCert",resolve:(o,i)=>o.cert?{id:i,title:e("plugins.free-form.code-lens.action.copy_certificate"),arguments:[o.cert]}:void 0}]}}}function dL(e){const n=[];for(const[r,o]of Object.entries(e)){if(o.type!=="foreign")continue;const i=o.reference;Object.prototype.hasOwnProperty.call(f0,i)&&n.push({entity:f0[i],keyPath:r.split(".")})}return n}function fL(e,n,r){let o=`${e.apiBaseUrl}${ct.form[e.app].entityGetOne}`;return e.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,e.controlPlaneId||""):e.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,e.workspace?`/${e.workspace}`:"")),o=o.replace(/{entity}/gi,n).replace(/{id}/gi,r),o}function pL(e){const n=Number(e);return Number.isFinite(n)&&Math.abs(n)<1e12?n*1e3:n}function p0(e){return Dp([e],(n,r)=>({lenses:[{range:r,command:{id:"",title:`$(calendar) ${new Date(pL(n)).toLocaleString("en",{dateStyle:"full",timeStyle:"full"})}`}}],dispose:()=>{}}))}function mL(e,n){const r=`kong.entities-plugins.codeEditor.command.${lL()}`,o=`${r}.copy`,i=`${r}.viewEntity`,{axiosInstance:a}=Ee.useAxios(n??e.axiosRequestConfig),s=qr.useRouter(),{i18n:{t:l}}=et(),{getSchemaMap:c}=Nt(),u=uL();function p(m,f){const h=new Map,g=new jo.Emitter,y=`${r}.${m}.reloadCodeLensProvider`,b=Dp(f??[m],async(w,E)=>{const k=w==null?void 0:w.id;if(!k)return Kl.emptyCodeLensList();h.has(k)||h.set(k,(async()=>{var N,O;const M=fL(e,`${m}s`,k),v=await a.get(M);if(v.status<200||v.status>=300)throw new Error(v.statusText);if(m==="consumer_group"&&((N=v.data)!=null&&N.consumer_group))return{data:v.data.consumer_group};if(m==="certificate"){const B=(O=v.data)==null?void 0:O.cert;if(!B)throw new Error("Missing certificate");await Promise.resolve().then(()=>NG);const{X509Certificate:A}=await Promise.resolve().then(()=>m4);return{data:v.data,cert:new A(B)}}return{data:v.data}})());const S=u[m];return{lenses:[...S.fields.map(M=>({id:`${k}:${M.id}`,range:E})),{range:E,command:{id:i,title:`${l("plugins.free-form.code-lens.action.view_entity",{title:S.title})} $(link-external)`,arguments:[m,k]}},...(S.commands??[]).map(M=>({id:`${k}:${M.id}`,range:E}))],dispose:()=>{}}}),_={provideCodeLenses:b.provideCodeLenses,resolveCodeLens:async(w,E,k)=>{var N;if(E=(b.resolveCodeLens&&await b.resolveCodeLens(w,E,k))??E,!E.id)return E;const S=E.id.indexOf(":"),T=E.id.indexOf("/"),M=E.id.substring(0,S),v=E.id.substring(S+1,T);try{const O=await h.get(M);if(!O)throw new Error("Expected the cached entity to be non-empty");const B=u[m],A=E.id.substring(S+1);switch(v){case"field":{const G=B.fields.find(Y=>Y.id===A),z=await(G==null?void 0:G.resolve(O));z&&(E.command={id:"",title:z});break}case"cmd":{const G=(N=B.commands)==null?void 0:N.find(Y=>Y.id===A),z=await(G==null?void 0:G.resolve(O,o));z&&(E.command=z);break}}}catch(O){console.error("Error resolving code lens:",O),E.command={id:y,title:`$(warning) ${l("plugins.free-form.code-lens.action.retry_fetch")}`,arguments:[M],tooltip:O instanceof Error?O.message:l("plugins.free-form.code-lens.unknown_error")}}return E},onDidChange:g.event},C=jo.editor.registerCommand(y,(w,E)=>{h.delete(E),g.fire(_)});return{provider:_,dispose:()=>{g.dispose(),C.dispose()}}}function d(m){var b;(b=Mp.get(m))==null||b();const f=[jo.languages.registerCodeLensProvider({language:"yaml",scheme:m.uri.scheme,pattern:m.uri.path},Kl.collectCodeLensProviders([d0({copyCommandId:o,title:l("plugins.free-form.code-lens.action.copy_uuid")}),p0("created_at"),p0("updated_at")]))],h=dL(c());for(const{entity:_,keyPath:C}of h){const w=p(_,C);f.push(jo.languages.registerCodeLensProvider({language:"yaml",scheme:m.uri.scheme,pattern:m.uri.path},w.provider),{dispose:w.dispose})}const g={service:e.viewServiceRoute,route:e.viewRouteRoute,consumer:e.viewConsumerRoute,consumer_group:e.viewConsumerGroupRoute,certificate:e.viewCertificateRoute};f.push(jo.editor.registerCommand(o,(_,C)=>{var E;const w=String(C);if(!((E=navigator.clipboard)!=null&&E.writeText)){console.warn("[useCodeLensProviders] Clipboard API is unavailable");return}navigator.clipboard.writeText(w).catch(k=>{console.warn("[useCodeLensProviders] Failed to copy to clipboard:",k)})}),jo.editor.registerCommand(i,(_,C,w)=>{var k;const E=(k=g[C])==null?void 0:k.call(g,w);E&&window.open(s.resolve(E).href,"_blank","noopener")}));const y=()=>{Mp.delete(m),f.splice(0,f.length).forEach(_=>{try{_.dispose()}catch(C){console.warn("[useCodeLensProviders] Failed to dispose:",C)}})};return Mp.set(m,y),m.onWillDispose(y),y}return{setup:d}}const hL={class:"plugin-code-editor","data-testid":"plugin-code-editor"},gL="YAML Syntax",yL=Re(t.defineComponent({__name:"CodeEditor",emits:["change","sourceChange","error"],setup(e,{emit:n}){const r=t.inject(ot.FORMS_CONFIG),{formData:o,setValue:i}=Nt(),a=n,s=t.shallowRef(null),{setup:l}=mL(r,{validateStatus:f=>f>=200&&f<500});function c(){return Br.dump(bo(t.toRaw(o),["__ui_data"]),{schema:No,noArrayIndent:!0})}const u=t.shallowRef(c()),p={scrollbar:{alwaysConsumeMouseWheel:!1},autoIndent:"keep",editContext:!1};function d(f){const h=f.getModel();h&&(l(h),s.value=f,f.onDidChangeModelContent(()=>{try{const g=Br.load(f.getValue()||"",{schema:No,json:!0});if(a("sourceChange",f.getValue()),typeof g!="object"||g===null)return;ql.editor.setModelMarkers(h,gL,[]),i(g),a("change",g)}catch(g){const y=g instanceof Error?g.message:String(g);a("error",y)}}),m())}function m(){const f=s.value,h=f==null?void 0:f.getModel();!f||!h||(f.setPosition(h.getFullModelRange().getEndPosition()),f.focus())}return(f,h)=>(t.openBlock(),t.createElementBlock("div",hL,[t.createVNode(t.unref(Kl.MonacoEditor),{ref:"editor",modelValue:u.value,"onUpdate:modelValue":h[0]||(h[0]=g=>u.value=g),class:"editor",language:"yaml",options:p,theme:"light",onReady:d},null,8,["modelValue"])]))}}),[["__scopeId","data-v-a076c960"]]),Bs={jqlang:"https://jqlang.org/manual/",condition:"https://developer.konghq.com/gateway/routing/expressions/",customPluginSandboxing:"https://developer.konghq.com/gateway/sandboxing/",pluginPriority:"https://developer.konghq.com/gateway/entities/plugin/#plugin-priority"},_L={class:"label-content"},bL=Re(t.defineComponent({__name:"ConditionField",setup(e){const n=t.useId(),{i18n:{t:r},i18nT:o}=et();return(i,a)=>{const s=t.resolveComponent("KBadge"),l=t.resolveComponent("KLabel"),c=t.resolveComponent("KExternalLink");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(l,{for:t.unref(n),label:t.unref(r)("plugins.form.fields.condition.label")},{default:t.withCtx(()=>[t.createElementVNode("div",_L,[t.createTextVNode(t.toDisplayString(t.unref(r)("plugins.form.fields.condition.label"))+" ",1),t.createVNode(t.unref(We.KTooltip),{class:"label-tooltip"},{content:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("plugins.form.fields.condition.tooltip")),1)]),default:t.withCtx(()=>[t.createVNode(t.unref(Oe.InfoIcon),{class:"tooltip-trigger-icon",tabindex:"0"})]),_:1}),t.createVNode(s,{appearance:"decorative",size:"small"},{default:t.withCtx(()=>[...a[0]||(a[0]=[t.createTextVNode(" Beta ",-1)])]),_:1})])]),_:1},8,["for","label"]),t.createVNode(_t,{"input-id":t.unref(n),label:"",name:"condition",placeholder:t.unref(r)("plugins.form.fields.condition.placeholder")},{help:t.withCtx(()=>[t.createVNode(t.unref(o),{keypath:"plugins.form.fields.condition.help.about"},{link:t.withCtx(()=>[t.createVNode(c,{"hide-icon":"",href:t.unref(Bs).condition},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("plugins.form.fields.condition.help.learn")),1)]),_:1},8,["href"])]),_:1})]),_:1},8,["input-id","placeholder"])])}}}),[["__scopeId","data-v-ebaf84a5"]]),wL={class:"radio-group"},kL={key:0,class:"scope-detail"},Qr=Re(t.defineComponent({__name:"StandardLayout",props:t.mergeModels({generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},isEditing:{type:Boolean},onFormChange:{type:Function},onValidityChange:{type:Function},hideEditorModeSwitcher:{type:Boolean,default:!1},formConfig:{},renderRules:{},fieldRenderers:{},pluginName:{},isKonnectManagedRedisEnabled:{type:Boolean},developer:{type:Boolean}},{editorMode:{},editorModeModifiers:{}}),emits:["update:editorMode"],setup(e){const n=["config","partials","__ui_data","enabled","protocols","instance_name","condition","tags","consumer","consumer_group","route","service"],r=t.useId(),{i18n:{t:o}}=et(),i=t.createPropsRestProxy(e,["hideEditorModeSwitcher"]),a=t.computed(()=>i.fieldRenderers??[]),s=t.inject(Xo.KM_2262_CODE_MODE,!1),l=Lt.useLocalStorage("plugin-editor-mode","form"),c=t.useModel(e,"editorMode"),u=t.computed({get:()=>c.value??(s?l.value:"form"),set:U=>{c.value=U}}),p=t.computed(()=>s&&!e.hideEditorModeSwitcher),d=[{label:o("plugins.free-form.editor_mode.visual"),value:"form"},{label:o("plugins.free-form.editor_mode.code"),value:"code"}];function m(U){u.value=U,l.value=U}const f=t.inject(ys),h=t.useSlots(),g=t.computed(()=>i.formConfig??{hasValue:U=>!!U&&Object.keys(U).length>0,prepareFormData:U=>i.isEditing?U:{...U,...R()}}),y=t.computed(()=>{var U;return(U=_.value)!=null&&U.disabled?{class:"disabled-scope",maxWidth:"300",text:o("plugins.form.scoping.disable_global_radio")}:{class:"scope"}}),b=t.computed(()=>{var U,L;return(U=i.formSchema)!=null&&U.groups?i.formSchema.groups.reduce((x,P)=>{var re,ie;const V=P.fields,W=(ie=(re=P.collapsible)==null?void 0:re.nestedCollapsible)!=null&&ie.fields?V.concat(P.collapsible.nestedCollapsible.fields):V;return x.concat(W)},[]):((L=i.formSchema)==null?void 0:L.fields)||[]}),_=t.computed(()=>b.value.find(U=>U.type==="selectionGroup")),C=t.computed(()=>{var U;return(((U=_.value)==null?void 0:U.fields)||[]).map(({label:L,description:x})=>({label:L,description:x}))}),w=t.computed(()=>{var U,L;return(L=(U=_.value)==null?void 0:U.fields)==null?void 0:L[1]}),E=t.computed(()=>{var U;return(((U=w.value)==null?void 0:U.fields)??[]).map(L=>{var x;return{name:L.model.split("-")[0],entity:L.entity,fields:(x=L.inputValues)==null?void 0:x.fields,label:L.label,placeholder:L.placeholder,help:L.help,disabled:L.disabled,disabledTooltip:L.disabledTooltip,labelField:L.labelField}})}),k=["instance_name","protocols","tags","condition"],S=["config"],T=t.computed(()=>{var P;const U={type:"record",fields:i.schema.fields.filter(V=>S.includes(Object.keys(V)[0]))},L=b.value.find(V=>V.model==="enabled");return[...L?[L]:[],...((P=w.value)==null?void 0:P.fields)??[],...b.value.filter(V=>k.includes(V.model))].forEach(V=>{if(V.type==="AutoSuggest")U.fields.push({[V.model.split("-")[0]]:{type:"foreign",reference:V.entity,description:V.help}});else if(V.model==="enabled")U.fields.push({[V.model]:{type:"boolean",default:!0}});else if(V.model==="instance_name"||V.model==="condition")U.fields.push({[V.model]:{type:"string",description:V.help}});else if(V.model==="protocols")U.fields.push({[V.model]:{type:"set",elements:{type:"string",one_of:V.values.map(W=>W.value)},default:[...V.default],required:V.required,description:V.help,help:V.default?o("plugins.form.fields.protocols.placeholderWithDefaultValues",{protocols:V.default.join(", ")}):o("plugins.form.fields.protocols.placeholder")}});else if(V.model==="tags")U.fields.push({[V.model]:{type:"set",elements:{type:"string"},description:V.help,default:V.default||[]}});else throw new Error(`Unsupported VFG field type '${V.type}' for model '${V.model}'`)}),U}),M=t.computed(()=>new Set(T.value.fields.map(U=>Object.keys(U)[0]))),v=t.computed(()=>B_(i.model,n)),N=t.computed(()=>{var U;return((U=w.value)==null?void 0:U.fields.map(L=>L.model))??[]}),O=t.computed(()=>N.value.map(U=>U.split("-")[0])),B=t.ref(i.isEditing?B_(v.value,O.value):R()),A=t.ref(Object.values(B.value).some(j)),G=t.useTemplateRef("form");let z=!1;function Y(){if(!G.value)return;const{getRawValue:U,setValue:L}=G.value,P={...U()};A.value?O.value.forEach(V=>{P[V]=B.value[V]??null}):O.value.forEach(V=>{P[V]=null}),z=!0,L(P),t.nextTick(()=>{z=!1})}function K(U){if(z||F(U),u.value==="code"){const L=O.value.some(x=>j(U[x]));L!==A.value&&(A.value=L)}i.onFormChange(U,n)}function F(U){O.value.forEach(L=>{const x=U[L];ac(x,"id")&&x.id!=null?B.value[L]=x:B.value[L]=null})}function j(U){return ac(U,"id")&&U.id!=null}function R(){const U={};return N.value.forEach(L=>{if(i.formModel[L]){const x=L.split("-")[0];if(!x)return;U[x]={id:i.formModel[L]}}}),U}wB(T,r);const q=t.ref(!0);return(U,L)=>{const x=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock(t.Fragment,null,[p.value?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:"#plugin-form-page-actions"},[t.createVNode(t.unref(We.KSegmentedControl),{"data-testid":"plugin-editor-mode-switcher","model-value":u.value,options:d,"onUpdate:modelValue":m},null,8,["model-value"])])):t.createCommentVNode("",!0),t.createVNode(dn,{ref:"form",class:"ff-standard-layout",config:g.value,data:v.value,"data-instance-id":t.unref(r),"data-plugin-name":e.pluginName,"data-testid":"ff-standard-layout-form","render-rules":e.renderRules,schema:T.value,tag:"div",onChange:K},{[t.unref(Oi)]:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(P,V)=>(t.openBlock(),t.createBlock(Ht,{key:`${e.pluginName}-${V}`,match:t.unref(VO)(P.match)},{default:t.withCtx(W=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(P.component),t.mergeProps({ref_for:!0},{...W,...(typeof P.propsOverrides=="function"?P.propsOverrides(W):P.propsOverrides)??{}}),null,16))]),_:2},1032,["match"]))),128)),t.createVNode(Ht,{match:({path:P})=>{var V,W;return P===((W=(V=t.unref(f))==null?void 0:V.redisPath)==null?void 0:W.value)}},{default:t.withCtx(()=>[t.createVNode(Wf,{"is-konnect-managed-redis-enabled":i.isKonnectManagedRedisEnabled??!1},null,8,["is-konnect-managed-redis-enabled"])]),_:1},8,["match"]),t.renderSlot(U.$slots,"field-renderers",{},void 0,!0)]),default:t.withCtx(()=>[u.value==="form"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(t.unref(Ee.EntityFormBlock),{"data-testid":"form-section-plugin-scope",description:e.generalInfoDescription??t.unref(o)("plugins.form.sections.plugin_scope.description"),step:1,title:e.generalInfoTitle??t.unref(o)("plugins.form.sections.plugin_scope.title")},t.createSlots({default:t.withCtx(()=>{var P;return[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((P=_.value)!=null&&P.disabled?t.unref(We.KTooltip):"div"),t.normalizeProps(t.guardReactiveProps(y.value)),{default:t.withCtx(()=>{var V,W;return[t.createElementVNode("div",wL,[t.createVNode(t.unref(We.KRadio),t.mergeProps({modelValue:A.value,"onUpdate:modelValue":L[0]||(L[0]=re=>A.value=re),card:"","card-orientation":"horizontal"},C.value[0],{disabled:(V=_.value)==null?void 0:V.disabled,"selected-value":!1,"onUpdate:modelValue":Y}),null,16,["modelValue","disabled"]),C.value[1]?(t.openBlock(),t.createBlock(t.unref(We.KRadio),t.mergeProps({key:0,modelValue:A.value,"onUpdate:modelValue":L[1]||(L[1]=re=>A.value=re),card:"","card-orientation":"horizontal"},C.value[1],{disabled:(W=_.value)==null?void 0:W.disabled,"selected-value":!0,"onUpdate:modelValue":Y}),null,16,["modelValue","disabled"])):t.createCommentVNode("",!0)])]}),_:1},16)),w.value?t.withDirectives((t.openBlock(),t.createElementBlock("div",kL,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(E.value,V=>(t.openBlock(),t.createBlock(iP,{key:V.name,developer:e.developer,disabled:V.disabled,"disabled-tooltip":V.disabledTooltip,entity:V.entity,fields:V.fields,help:V.help,label:V.label,"label-field":V.labelField,name:V.name,placeholder:V.placeholder},null,8,["developer","disabled","disabled-tooltip","entity","fields","help","label","label-field","name","placeholder"]))),128))],512)),[[t.vShow,A.value]]):t.createCommentVNode("",!0)]}),_:2},[h["general-info-title"]?{name:"title",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"general-info-title",{},void 0,!0)]),key:"0"}:void 0,h["general-info-description"]?{name:"description",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"general-info-description",{},void 0,!0)]),key:"1"}:void 0,h["general-info-extra"]?{name:"extra",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"general-info-extra",{},void 0,!0)]),key:"2"}:void 0]),1032,["description","title"]),t.createVNode(t.unref(Ee.EntityFormBlock),{"data-testid":"form-section-plugin-config",description:e.pluginConfigDescription??t.unref(o)("plugins.form.sections.plugin_config.description"),step:2,title:e.pluginConfigTitle??t.unref(o)("plugins.form.sections.plugin_config.title")},t.createSlots({default:t.withCtx(()=>[t.renderSlot(U.$slots,"default",{},void 0,!0)]),_:2},[h["plugin-config-title"]?{name:"title",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"plugin-config-title",{},void 0,!0)]),key:"0"}:void 0,h["plugin-config-description"]?{name:"description",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"plugin-config-description",{},void 0,!0)]),key:"1"}:void 0,h["plugin-config-extra"]?{name:"extra",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"plugin-config-extra",{},void 0,!0)]),key:"2"}:void 0]),1032,["description","title"]),t.createVNode(t.unref(Ee.EntityFormBlock),{"data-testid":"form-section-general-info",description:t.unref(o)("plugins.form.sections.plugin_general_info.description"),step:3,title:t.unref(o)("plugins.form.sections.general_info.title")},{default:t.withCtx(()=>[M.value.has("enabled")?(t.openBlock(),t.createBlock(nP,{key:0,"disabled-text":t.unref(o)("plugins.form.fields.plugin_status.text_off"),"enabled-text":t.unref(o)("plugins.form.fields.plugin_status.text_on"),label:t.unref(o)("plugins.form.fields.plugin_status.label"),name:"enabled"},null,8,["disabled-text","enabled-text","label"])):t.createCommentVNode("",!0),M.value.has("instance_name")?(t.openBlock(),t.createBlock(_t,{key:1,label:t.unref(o)("plugins.form.fields.instance_name.label"),name:"instance_name",placeholder:t.unref(o)("plugins.form.fields.instance_name.placeholder")},null,8,["label","placeholder"])):t.createCommentVNode("",!0),M.value.has("tags")?(t.openBlock(),t.createBlock(gs,{key:2,help:t.unref(o)("plugins.form.fields.tags.help"),name:"tags",placeholder:t.unref(o)("plugins.form.fields.tags.placeholder")},null,8,["help","placeholder"])):t.createCommentVNode("",!0),M.value.has("protocols")?(t.openBlock(),t.createBlock(lt,{key:3,name:"protocols"})):t.createCommentVNode("",!0),T.value.fields.find(P=>Object.keys(P)[0]==="condition")?(t.openBlock(),t.createBlock(x,{key:4,modelValue:q.value,"onUpdate:modelValue":L[2]||(L[2]=P=>q.value=P),"data-testid":"view-general-info-additional-settings","trigger-label":q.value?t.unref(o)("plugins.form.grouping.advanced_parameters.view"):t.unref(o)("plugins.form.grouping.advanced_parameters.hide")},{default:t.withCtx(()=>[t.createVNode(bL)]),_:1},8,["modelValue","trigger-label"])):t.createCommentVNode("",!0)]),_:1},8,["description","title"])],64)):t.createCommentVNode("",!0),u.value==="code"?(t.openBlock(),t.createBlock(t.unref(Ee.EntityFormBlock),{key:1,description:t.unref(o)("plugins.form.sections.code_mode.description"),title:t.unref(o)("plugins.form.sections.code_mode.title")},{default:t.withCtx(()=>[t.renderSlot(U.$slots,"code-editor",{},()=>[t.createVNode(yL)],!0)]),_:3},8,["description","title"])):t.createCommentVNode("",!0)]),_:2},1032,["config","data","data-instance-id","data-plugin-name","render-rules","schema"])],64)}}}),[["__scopeId","data-v-f229e1e8"]]),CL={class:"ff-acl-mode"},EL=Re(t.defineComponent({__name:"ACLModeCard",setup(e){const{formData:n}=Nt(),{i18n:{t:r}}=et(),o=t.ref("allow"),i=t.ref(!1),a=t.ref({});t.watch(()=>n.config,l=>{if(i.value||!l)return;const c=l.deny,u=l.allow;Array.isArray(c)&&c.length>0?o.value="deny":Array.isArray(u)&&u.length>0&&(o.value="allow")},{deep:!0,immediate:!0});function s(){i.value=!0,n.config&&(o.value==="allow"?(n.config.deny&&(a.value.deny=[...n.config.deny]),n.config.deny=null,a.value.allow&&(n.config.allow=[...a.value.allow])):(n.config.allow&&(a.value.allow=[...n.config.allow]),n.config.allow=null,a.value.deny&&(n.config.deny=[...a.value.deny])))}return(l,c)=>(t.openBlock(),t.createBlock(t.unref(We.KCard),{class:"ff-acl-mode-card"},{default:t.withCtx(()=>[t.createElementVNode("div",CL,[t.createVNode(t.unref(We.KRadio),{modelValue:o.value,"onUpdate:modelValue":[c[0]||(c[0]=u=>o.value=u),s],"data-testid":"ff-acl-mode-allow",label:t.unref(r)("plugins.free-form.acl.mode.allow"),"selected-value":"allow"},null,8,["modelValue","label"]),t.createVNode(t.unref(We.KRadio),{modelValue:o.value,"onUpdate:modelValue":[c[1]||(c[1]=u=>o.value=u),s],"data-testid":"ff-acl-mode-deny",label:t.unref(r)("plugins.free-form.acl.mode.deny"),"selected-value":"deny"},null,8,["modelValue","label"])]),o.value==="allow"?(t.openBlock(),t.createBlock(lt,{key:0,name:"config.allow"})):(t.openBlock(),t.createBlock(lt,{key:1,name:"config.deny"}))]),_:1}))}}),[["__scopeId","data-v-fd5c7165"]]),NL=t.defineComponent({__name:"ACLForm",props:{generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},isEditing:{type:Boolean},onFormChange:{type:Function},onValidityChange:{type:Function},hideEditorModeSwitcher:{type:Boolean},formConfig:{},renderRules:{},fieldRenderers:{},pluginName:{},isKonnectManagedRedisEnabled:{type:Boolean},developer:{type:Boolean}},setup(e){const n=e,r=t.useSlots();return t.provide(ot.AUTOFILL_SLOT,r==null?void 0:r[ot.AUTOFILL_SLOT_NAME]),(o,i)=>(t.openBlock(),t.createBlock(Qr,t.normalizeProps(t.guardReactiveProps(n)),{default:t.withCtx(()=>[t.createVNode(EL),t.createVNode(sn,{"as-child":"",name:"config",omit:["allow","deny"],"reset-label-path":"reset"})]),_:1},16))}}),xL={class:"ff-advanced-fields"},Kc=Re(t.defineComponent({__name:"AdvancedFields",props:{hideGeneralFields:{type:Boolean}},setup(e){const{t:n}=en.createI18n("en-us",an),{getSchema:r}=Nt(),o=t.ref(!0);return(i,a)=>(t.openBlock(),t.createBlock(t.unref(We.KCollapse),{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=s=>o.value=s),"data-testid":"view-advanced","trigger-label":o.value?t.unref(n)("plugins.form.grouping.advanced_parameters.view"):t.unref(n)("plugins.form.grouping.advanced_parameters.hide")},{default:t.withCtx(()=>[t.createElementVNode("div",xL,[e.hideGeneralFields?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.unref(r)("instance_name")?(t.openBlock(),t.createBlock(lt,{key:0,name:"instance_name"})):t.createCommentVNode("",!0),t.unref(r)("protocols")?(t.openBlock(),t.createBlock(lt,{key:1,name:"protocols"})):t.createCommentVNode("",!0),t.unref(r)("tags")?(t.openBlock(),t.createBlock(gs,{key:2,help:"e.g. tag1, tag2, tag3",name:"tags",placeholder:t.unref(n)("plugins.form.fields.tags.placeholder")},null,8,["placeholder"])):t.createCommentVNode("",!0),t.unref(r)("condition")?(t.openBlock(),t.createBlock(_t,{key:3,name:"condition",placeholder:t.unref(n)("plugins.form.fields.condition.placeholder")},null,8,["placeholder"])):t.createCommentVNode("",!0)],64)),t.renderSlot(i.$slots,"default",{},void 0,!0)])]),_:3},8,["modelValue","trigger-label"]))}}),[["__scopeId","data-v-baa317ec"]]),m0=Re(t.defineComponent({__name:"ConfigForm",setup(e){const{getSchema:n,createComputedRenderRules:r}=Nt(),o=r("config"),i=t.computed(()=>{var y;const s=[],l=[],c=new Set,p=n().fields.find(b=>Object.keys(b)[0]==="config");if(!p||!("config"in p))return{defaultVisible:s,advanced:l};const d=p.config;d.entity_checks&&d.entity_checks.forEach(b=>{var C,w;let _;"at_least_one_of"in b?_=b.at_least_one_of:"conditional"in b&&((C=n(Et("config",b.conditional.if_field)))!=null&&C.required)&&b.conditional.then_match.required?_=[b.conditional.if_field,b.conditional.then_field]:"conditional_at_least_one_of"in b&&((w=n(Et("config",b.conditional_at_least_one_of.if_field)))!=null&&w.required)&&(_=[b.conditional_at_least_one_of.if_field,...b.conditional_at_least_one_of.then_at_least_one_of]),_==null||_.forEach(E=>c.add(E.split(".")[0]))});const m=((y=o.value)==null?void 0:y.bundles)??[],f=new Map;for(const b of m)for(let _=1;_<b.length;_++)f.set(b[_],b[_-1]);const h=b=>{const _=f.get(b);return _?h(_):b},g=new Map;for(const b of d.fields){const _=Object.keys(b)[0];g.set(_,h(_))}for(const b of d.fields){const _=Object.keys(b)[0];if(g.get(_)!==_)continue;let w;b[_].required||c.has(_)?w=s:w=l,w.push(_)}for(const b of d.fields){const _=Object.keys(b)[0],C=g.get(_);C!==_&&(s.includes(C)?s:l).push(_)}return{defaultVisible:s,advanced:l}}),a=t.computed(()=>i.value.defaultVisible.length===0);return(s,l)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(sn,{"as-child":"",class:"ff-default-visible-fields",name:"config",omit:a.value?[]:i.value.advanced,"reset-label-path":"reset"},null,8,["omit"]),a.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Kc,{key:0,class:"ff-advanced-fields-container","data-testid":"ff-advanced-fields-container","hide-general-fields":""},{default:t.withCtx(()=>[t.createVNode(sn,{"as-child":"",name:"config",omit:i.value.defaultVisible,"reset-label-path":"reset"},null,8,["omit"])]),_:1}))],64))}}),[["__scopeId","data-v-bc82c9e9"]]),h0=t.defineComponent({__name:"CommonForm",props:{generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},isEditing:{type:Boolean},onFormChange:{type:Function},onValidityChange:{type:Function},hideEditorModeSwitcher:{type:Boolean},formConfig:{},renderRules:{},fieldRenderers:{},pluginName:{},isKonnectManagedRedisEnabled:{type:Boolean},developer:{type:Boolean}},setup(e){const n=e,r=t.useSlots();return t.provide(ot.AUTOFILL_SLOT,r==null?void 0:r[ot.AUTOFILL_SLOT_NAME]),(o,i)=>(t.openBlock(),t.createBlock(Qr,t.normalizeProps(t.guardReactiveProps(n)),{default:t.withCtx(()=>[t.createVNode(m0)]),_:1},16))}});function ht(e={}){return{...e,component:e.component??h0}}const SL=ht({experimental:!0,component:NL}),AL=ht({fieldRenderers:[{match:"config.functions",component:ko,propsOverrides:{appearance:{string:{multiline:!0}}}}]}),vL=ht({component:t.defineComponent({__name:"AIMcpProxyForm",props:{generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},isEditing:{type:Boolean},onFormChange:{type:Function},onValidityChange:{type:Function},hideEditorModeSwitcher:{type:Boolean},formConfig:{},renderRules:{},fieldRenderers:{},pluginName:{},isKonnectManagedRedisEnabled:{type:Boolean},developer:{type:Boolean}},setup(e){const n=e,r=t.useSlots();t.provide(ot.AUTOFILL_SLOT,r==null?void 0:r[ot.AUTOFILL_SLOT_NAME]);const{i18n:{t:o}}=pt.useI18n();return(i,a)=>(t.openBlock(),t.createBlock(Qr,t.normalizeProps(t.guardReactiveProps(n)),{"field-renderers":t.withCtx(()=>[t.createVNode(Ht,{match:({path:s})=>s==="config.default_acl"},{default:t.withCtx(s=>[t.createVNode(Wr,t.mergeProps(s,{appearance:"tabs","item-label":(l,c)=>t.unref(o)("plugins.free-form.ai-mcp-proxy.default_acl_item_label",{index:c+1}),"sticky-tabs":""}),null,16,["item-label"])]),_:1},8,["match"]),t.createVNode(Ht,{match:({path:s})=>s==="config.tools"},{default:t.withCtx(s=>[t.createVNode(Wr,t.mergeProps(s,{appearance:"tabs","item-label":(l,c)=>t.unref(o)("plugins.free-form.ai-mcp-proxy.tool_item_label",{index:c+1}),"sticky-tabs":""}),null,16,["item-label"])]),_:1},8,["match"]),t.createVNode(Ht,{match:({genericPath:s})=>s==="config.tools.*.query"||s==="config.tools.*.headers"},{default:t.withCtx(s=>[t.createVNode(ko,t.mergeProps(s,{"one-line":""}),{default:t.withCtx(({keyId:l})=>[t.createVNode(gs,{name:l,placeholder:t.unref(o)("plugins.free-form.tag_helper")},null,8,["name","placeholder"])]),_:1},16)]),_:1},8,["match"])]),default:t.withCtx(()=>[t.createVNode(sn,{"as-child":"",name:"config","reset-label-path":"reset"})]),_:1},16))}})}),IL=ht({experimental:!0}),TL=ht({experimental:!0,renderRules:{dependencies:{"config.brute_force_protection.redis":["config.brute_force_protection.strategy","redis"]}}}),OL=ht({experimental:!0}),BL=ht({experimental:!0,fieldRenderers:[{match:({path:e})=>e==="config.methods"||e==="config.request_method",component:Gt,propsOverrides:{multiple:!0}}]}),g0=Object.entries(Object.assign({"./authenticate-third-party-with-dynamic-url.yaml":`nodes:
|
|
179
|
+
`,r)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=Uc(n),o=ea(r);return o.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=Uc(n),o=ea(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,r){return this.type!=="comment"||this.indent<=r?!1:n.every(o=>o.type==="newline"||o.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Q$(e){const n=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||n&&new X$||null,prettyErrors:n}}function eL(e,n={}){const{lineCounter:r,prettyErrors:o}=Q$(n),i=new Z$(r==null?void 0:r.addNewLine),a=new H$(n);let s=null;for(const l of a.compose(i.parse(e),!0,e.length))if(!s)s=l;else if(s.options.logLevel!=="silent"){s.errors.push(new vs(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return o&&r&&(s.errors.forEach(Ww(e,r)),s.warnings.forEach(Ww(e,r))),s}function l0(e,n){const r=e.range;if(!r)return;const o=Math.max(0,r[0]),i=typeof r[1]=="number"?r[1]:typeof r[2]=="number"?r[2]:r[0],a=Math.max(o,i),s=n.getPositionAt(o),l=n.getPositionAt(a);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:l.lineNumber,endColumn:l.column}}function tL(e){return At(e)?e.value:e.toJSON()}function nL(e){if(!At(e))return;const{value:n}=e;return typeof n=="string"||typeof n=="number"?n:void 0}function c0(e,n){const r=nL(n);return r===void 0?e:[...e,r]}function rL(e,n){const r=[{node:e,keyPath:[]}];for(;r.length>0;){const o=r.pop();if(!o)continue;const{node:i,keyPath:a}=o;if(n(i,a),Ui(i)){for(let s=i.items.length-1;s>=0;s--){const l=i.items[s];Tt(l.value)&&r.push({node:l.value,keyPath:c0(a,l.key)}),Tt(l.key)&&r.push({node:l.key,keyPath:a})}continue}if(Ki(i))for(let s=i.items.length-1;s>=0;s--){const l=i.items[s],c=[...a,s];if(Ut(l)){Tt(l.value)&&r.push({node:l.value,keyPath:c0(c,l.key)}),Tt(l.key)&&r.push({node:l.key,keyPath:c});continue}Tt(l)&&r.push({node:l,keyPath:c})}}}function oL(e,n){const r=e.getIn(n,!0);return Tt(r)?r:void 0}function u0(e,n){return{provideCodeLenses:async(r,o)=>{if(r.getLanguageId()!=="yaml")return Jr();const i=await mw(r);if(i.isDefault||i.language!=="yaml")return Jr();const a=i.document,s=a==null?void 0:a.contents;return!a||!s?Jr():e(s,r,o)}}}function d0(e,n){return u0((r,o,i)=>{const a=[];return rL(r,(s,l)=>{if(i.isCancellationRequested||!At(s)||typeof s.value!="string"||!MR.test(s.value))return;const c=l0(s,o);c&&a.push({value:s.value,range:c,context:{keyPath:l,node:s}})}),i.isCancellationRequested?Jr():typeof e=="function"?e(a):{lenses:a.map(({value:s,range:l})=>jR(s,l,e)),dispose:()=>{}}})}function Dp(e,n,r){return{provideCodeLenses:async(o,i)=>{if(o.getLanguageId()!=="yaml")return Jr();const a=await mw(o);if(a.isDefault||a.language!=="yaml"||i.isCancellationRequested)return Jr();const s=a.document,l=s==null?void 0:s.contents;if(!s||!l)return Jr();const c=oL(s,e);if(!c)return Jr();const u=l0(c,o);return u?n(tL(c),u,{keyPath:e,node:c}):Jr()}}}function iL(e,n){const r=eL(e);return{language:"yaml",altVersionId:n,document:r}}const aL=Object.freeze(Object.defineProperty({__proto__:null,createYAMLCodeLensProvider:u0,createYAMLCopyUUIDCodeLensProvider:d0,createYAMLValueCodeLensProvider:Dp,parseIntoYAMLContext:iL},Symbol.toStringTag,{value:"Module"}));let sL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",lL=(e=21)=>{let n="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)n+=sL[r[e]&63];return n};const cL="/v2/control-planes/{controlPlaneId}/core-entities/v1",zn="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",Vr="/v2/control-planes/{controlPlaneId}/core-entities",Sn="/{workspace}",ta="",ct={list:{konnect:{all:`${zn}/plugins`,forEntity:`${zn}/{entityType}/{entityId}/plugins`},kongManager:{all:`${Sn}/plugins`,forEntity:`${Sn}/{entityType}/{entityId}/plugins`}},select:{konnect:{availablePlugins:`${cL}/available-plugins`,streamingCustomPlugins:`${Vr}/custom-plugins`,clonedPlugins:`${Vr}/cloned-plugins`,schemaCustomPluginItem:`${Vr}/plugin-schemas/{pluginId}`,streamingCustomPluginItem:`${Vr}/custom-plugins/{pluginId}`},kongManager:{availablePlugins:`${Sn}/kong`,availablePluginsForOss:"/",streamingCustomPlugins:`${ta}/custom-plugins`,clonedPlugins:`${ta}/cloned-plugins`}},form:{konnect:{create:{all:`${zn}/plugins`,forEntity:`${zn}/{entityType}/{entityId}/plugins`},edit:{all:`${zn}/plugins/{id}`,forEntity:`${zn}/{entityType}/{entityId}/plugins/{id}`},pluginSchema:"/v2/control-planes/{controlPlaneId}/schemas/core-entities/plugins/{plugin}",credential:{create:`${zn}/{resourceEndpoint}`,edit:`${zn}/{resourceEndpoint}/{id}`},credentialSchema:"/v2/control-planes/{controlPlaneId}/schemas/core-entities/{plugin}",entityGetOne:`${zn}/{entity}/{id}`,entityGetAll:`${zn}/{entity}`,entityPeek:`${zn}/{entity}?size={amount}`},kongManager:{create:{all:`${Sn}/plugins`,forEntity:`${Sn}/{entityType}/{entityId}/plugins`},edit:{all:`${Sn}/plugins/{id}`,forEntity:`${Sn}/{entityType}/{entityId}/plugins/{id}`},pluginSchema:`${Sn}/schemas/plugins/{plugin}`,credential:{create:`${Sn}/{resourceEndpoint}`,edit:`${Sn}/{resourceEndpoint}/{id}`},credentialSchema:`${Sn}/schemas/{plugin}`,entityGetOne:`${Sn}/{entity}/{id}`,entityGetAll:`${Sn}/{entity}`}},customPlugin:{konnect:{installed:{create:`${Vr}/plugin-schemas`,edit:`${Vr}/plugin-schemas/{pluginId}`},streamed:{create:`${Vr}/custom-plugins`,edit:`${Vr}/custom-plugins/{pluginId}`},cloned:{create:`${Vr}/cloned-plugins`,edit:`${Vr}/cloned-plugins/{pluginId}`}},kongManager:{streamed:{create:`${ta}/custom-plugins`,edit:`${ta}/custom-plugins/{pluginId}`},cloned:{create:`${ta}/cloned-plugins`,edit:`${ta}/cloned-plugins/{pluginId}`}}},item:{konnect:{all:`${zn}/plugins/{id}`,forEntity:`${zn}/{entityType}/{entityId}/plugins/{id}`},kongManager:{all:`${Sn}/plugins/{id}`,forEntity:`${Sn}/{entityType}/{entityId}/plugins/{id}`}}},Mp=new WeakMap,f0=Object.fromEntries(["service","route","consumer","consumer_group","certificate"].map(e=>[`${e}s`,e]));function uL(){const{i18n:{t:e}}=et(),n=o=>e(`plugins.free-form.code-lens.entity.${o}`),r=(o,i)=>e("plugins.free-form.code-lens.field.name",{value:o,entity:i});return{service:{title:n("service"),fields:[{id:"field/name",resolve:o=>o.data.name?r(o.data.name,n("service")):void 0}]},route:{title:n("route"),fields:[{id:"field/name",resolve:o=>o.data.name?r(o.data.name,n("route")):void 0}]},consumer_group:{title:n("consumer_group"),fields:[{id:"field/name",resolve:o=>o.data.name?r(o.data.name,n("consumer_group")):void 0}]},consumer:{title:n("consumer"),fields:[{id:"field/username",resolve:o=>o.data.username?e("plugins.free-form.code-lens.field.username",{value:o.data.username}):void 0},{id:"field/customId",resolve:o=>o.data.custom_id?e("plugins.free-form.code-lens.field.custom_id",{value:o.data.custom_id}):void 0}]},certificate:{title:n("certificate"),fields:[{id:"field/subject",resolve:o=>{if(o)return e("plugins.free-form.code-lens.field.subject",{value:o.cert.subject})}},{id:"field/notAfter",resolve:o=>{if(o)return e("plugins.free-form.code-lens.field.expires_after",{value:o.cert.notAfter.toLocaleString("en")})}}],commands:[{id:"cmd/copyCert",resolve:(o,i)=>o.cert?{id:i,title:e("plugins.free-form.code-lens.action.copy_certificate"),arguments:[o.cert]}:void 0}]}}}function dL(e){const n=[];for(const[r,o]of Object.entries(e)){if(o.type!=="foreign")continue;const i=o.reference;Object.prototype.hasOwnProperty.call(f0,i)&&n.push({entity:f0[i],keyPath:r.split(".")})}return n}function fL(e,n,r){let o=`${e.apiBaseUrl}${ct.form[e.app].entityGetOne}`;return e.app==="konnect"&&(o=o.replace(/{controlPlaneId}/gi,e.controlPlaneId||"")),o=o.replace(/\/{workspace}/gi,e.workspace?`/${e.workspace}`:"").replace(/{entity}/gi,n).replace(/{id}/gi,r),o}function pL(e){const n=Number(e);return Number.isFinite(n)&&Math.abs(n)<1e12?n*1e3:n}function p0(e){return Dp([e],(n,r)=>({lenses:[{range:r,command:{id:"",title:`$(calendar) ${new Date(pL(n)).toLocaleString("en",{dateStyle:"full",timeStyle:"full"})}`}}],dispose:()=>{}}))}function mL(e,n){const r=`kong.entities-plugins.codeEditor.command.${lL()}`,o=`${r}.copy`,i=`${r}.viewEntity`,{axiosInstance:a}=Ee.useAxios(n??e.axiosRequestConfig),s=qr.useRouter(),{i18n:{t:l}}=et(),{getSchemaMap:c}=Nt(),u=uL();function p(m,f){const h=new Map,g=new jo.Emitter,y=`${r}.${m}.reloadCodeLensProvider`,b=Dp(f??[m],async(w,E)=>{const k=w==null?void 0:w.id;if(!k)return Kl.emptyCodeLensList();h.has(k)||h.set(k,(async()=>{var N,O;const M=fL(e,`${m}s`,k),v=await a.get(M);if(v.status<200||v.status>=300)throw new Error(v.statusText);if(m==="consumer_group"&&((N=v.data)!=null&&N.consumer_group))return{data:v.data.consumer_group};if(m==="certificate"){const B=(O=v.data)==null?void 0:O.cert;if(!B)throw new Error("Missing certificate");await Promise.resolve().then(()=>NG);const{X509Certificate:A}=await Promise.resolve().then(()=>m4);return{data:v.data,cert:new A(B)}}return{data:v.data}})());const S=u[m];return{lenses:[...S.fields.map(M=>({id:`${k}:${M.id}`,range:E})),{range:E,command:{id:i,title:`${l("plugins.free-form.code-lens.action.view_entity",{title:S.title})} $(link-external)`,arguments:[m,k]}},...(S.commands??[]).map(M=>({id:`${k}:${M.id}`,range:E}))],dispose:()=>{}}}),_={provideCodeLenses:b.provideCodeLenses,resolveCodeLens:async(w,E,k)=>{var N;if(E=(b.resolveCodeLens&&await b.resolveCodeLens(w,E,k))??E,!E.id)return E;const S=E.id.indexOf(":"),T=E.id.indexOf("/"),M=E.id.substring(0,S),v=E.id.substring(S+1,T);try{const O=await h.get(M);if(!O)throw new Error("Expected the cached entity to be non-empty");const B=u[m],A=E.id.substring(S+1);switch(v){case"field":{const G=B.fields.find(Y=>Y.id===A),z=await(G==null?void 0:G.resolve(O));z&&(E.command={id:"",title:z});break}case"cmd":{const G=(N=B.commands)==null?void 0:N.find(Y=>Y.id===A),z=await(G==null?void 0:G.resolve(O,o));z&&(E.command=z);break}}}catch(O){console.error("Error resolving code lens:",O),E.command={id:y,title:`$(warning) ${l("plugins.free-form.code-lens.action.retry_fetch")}`,arguments:[M],tooltip:O instanceof Error?O.message:l("plugins.free-form.code-lens.unknown_error")}}return E},onDidChange:g.event},C=jo.editor.registerCommand(y,(w,E)=>{h.delete(E),g.fire(_)});return{provider:_,dispose:()=>{g.dispose(),C.dispose()}}}function d(m){var b;(b=Mp.get(m))==null||b();const f=[jo.languages.registerCodeLensProvider({language:"yaml",scheme:m.uri.scheme,pattern:m.uri.path},Kl.collectCodeLensProviders([d0({copyCommandId:o,title:l("plugins.free-form.code-lens.action.copy_uuid")}),p0("created_at"),p0("updated_at")]))],h=dL(c());for(const{entity:_,keyPath:C}of h){const w=p(_,C);f.push(jo.languages.registerCodeLensProvider({language:"yaml",scheme:m.uri.scheme,pattern:m.uri.path},w.provider),{dispose:w.dispose})}const g={service:e.viewServiceRoute,route:e.viewRouteRoute,consumer:e.viewConsumerRoute,consumer_group:e.viewConsumerGroupRoute,certificate:e.viewCertificateRoute};f.push(jo.editor.registerCommand(o,(_,C)=>{var E;const w=String(C);if(!((E=navigator.clipboard)!=null&&E.writeText)){console.warn("[useCodeLensProviders] Clipboard API is unavailable");return}navigator.clipboard.writeText(w).catch(k=>{console.warn("[useCodeLensProviders] Failed to copy to clipboard:",k)})}),jo.editor.registerCommand(i,(_,C,w)=>{var k;const E=(k=g[C])==null?void 0:k.call(g,w);E&&window.open(s.resolve(E).href,"_blank","noopener")}));const y=()=>{Mp.delete(m),f.splice(0,f.length).forEach(_=>{try{_.dispose()}catch(C){console.warn("[useCodeLensProviders] Failed to dispose:",C)}})};return Mp.set(m,y),m.onWillDispose(y),y}return{setup:d}}const hL={class:"plugin-code-editor","data-testid":"plugin-code-editor"},gL="YAML Syntax",yL=Re(t.defineComponent({__name:"CodeEditor",emits:["change","sourceChange","error"],setup(e,{emit:n}){const r=t.inject(ot.FORMS_CONFIG),{formData:o,setValue:i}=Nt(),a=n,s=t.shallowRef(null),{setup:l}=mL(r,{validateStatus:f=>f>=200&&f<500});function c(){return Br.dump(bo(t.toRaw(o),["__ui_data"]),{schema:No,noArrayIndent:!0})}const u=t.shallowRef(c()),p={scrollbar:{alwaysConsumeMouseWheel:!1},autoIndent:"keep",editContext:!1};function d(f){const h=f.getModel();h&&(l(h),s.value=f,f.onDidChangeModelContent(()=>{try{const g=Br.load(f.getValue()||"",{schema:No,json:!0});if(a("sourceChange",f.getValue()),typeof g!="object"||g===null)return;ql.editor.setModelMarkers(h,gL,[]),i(g),a("change",g)}catch(g){const y=g instanceof Error?g.message:String(g);a("error",y)}}),m())}function m(){const f=s.value,h=f==null?void 0:f.getModel();!f||!h||(f.setPosition(h.getFullModelRange().getEndPosition()),f.focus())}return(f,h)=>(t.openBlock(),t.createElementBlock("div",hL,[t.createVNode(t.unref(Kl.MonacoEditor),{ref:"editor",modelValue:u.value,"onUpdate:modelValue":h[0]||(h[0]=g=>u.value=g),class:"editor",language:"yaml",options:p,theme:"light",onReady:d},null,8,["modelValue"])]))}}),[["__scopeId","data-v-a076c960"]]),Bs={jqlang:"https://jqlang.org/manual/",condition:"https://developer.konghq.com/gateway/routing/expressions/",customPluginSandboxing:"https://developer.konghq.com/gateway/sandboxing/",pluginPriority:"https://developer.konghq.com/gateway/entities/plugin/#plugin-priority"},_L={class:"label-content"},bL=Re(t.defineComponent({__name:"ConditionField",setup(e){const n=t.useId(),{i18n:{t:r},i18nT:o}=et();return(i,a)=>{const s=t.resolveComponent("KBadge"),l=t.resolveComponent("KLabel"),c=t.resolveComponent("KExternalLink");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(l,{for:t.unref(n),label:t.unref(r)("plugins.form.fields.condition.label")},{default:t.withCtx(()=>[t.createElementVNode("div",_L,[t.createTextVNode(t.toDisplayString(t.unref(r)("plugins.form.fields.condition.label"))+" ",1),t.createVNode(t.unref(We.KTooltip),{class:"label-tooltip"},{content:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("plugins.form.fields.condition.tooltip")),1)]),default:t.withCtx(()=>[t.createVNode(t.unref(Oe.InfoIcon),{class:"tooltip-trigger-icon",tabindex:"0"})]),_:1}),t.createVNode(s,{appearance:"decorative",size:"small"},{default:t.withCtx(()=>[...a[0]||(a[0]=[t.createTextVNode(" Beta ",-1)])]),_:1})])]),_:1},8,["for","label"]),t.createVNode(_t,{"input-id":t.unref(n),label:"",name:"condition",placeholder:t.unref(r)("plugins.form.fields.condition.placeholder")},{help:t.withCtx(()=>[t.createVNode(t.unref(o),{keypath:"plugins.form.fields.condition.help.about"},{link:t.withCtx(()=>[t.createVNode(c,{"hide-icon":"",href:t.unref(Bs).condition},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("plugins.form.fields.condition.help.learn")),1)]),_:1},8,["href"])]),_:1})]),_:1},8,["input-id","placeholder"])])}}}),[["__scopeId","data-v-ebaf84a5"]]),wL={class:"radio-group"},kL={key:0,class:"scope-detail"},Qr=Re(t.defineComponent({__name:"StandardLayout",props:t.mergeModels({generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},isEditing:{type:Boolean},onFormChange:{type:Function},onValidityChange:{type:Function},hideEditorModeSwitcher:{type:Boolean,default:!1},formConfig:{},renderRules:{},fieldRenderers:{},pluginName:{},isKonnectManagedRedisEnabled:{type:Boolean},developer:{type:Boolean}},{editorMode:{},editorModeModifiers:{}}),emits:["update:editorMode"],setup(e){const n=["config","partials","__ui_data","enabled","protocols","instance_name","condition","tags","consumer","consumer_group","route","service"],r=t.useId(),{i18n:{t:o}}=et(),i=t.createPropsRestProxy(e,["hideEditorModeSwitcher"]),a=t.computed(()=>i.fieldRenderers??[]),s=t.inject(Xo.KM_2262_CODE_MODE,!1),l=Lt.useLocalStorage("plugin-editor-mode","form"),c=t.useModel(e,"editorMode"),u=t.computed({get:()=>c.value??(s?l.value:"form"),set:U=>{c.value=U}}),p=t.computed(()=>s&&!e.hideEditorModeSwitcher),d=[{label:o("plugins.free-form.editor_mode.visual"),value:"form"},{label:o("plugins.free-form.editor_mode.code"),value:"code"}];function m(U){u.value=U,l.value=U}const f=t.inject(ys),h=t.useSlots(),g=t.computed(()=>i.formConfig??{hasValue:U=>!!U&&Object.keys(U).length>0,prepareFormData:U=>i.isEditing?U:{...U,...R()}}),y=t.computed(()=>{var U;return(U=_.value)!=null&&U.disabled?{class:"disabled-scope",maxWidth:"300",text:o("plugins.form.scoping.disable_global_radio")}:{class:"scope"}}),b=t.computed(()=>{var U,L;return(U=i.formSchema)!=null&&U.groups?i.formSchema.groups.reduce((x,P)=>{var re,ie;const V=P.fields,W=(ie=(re=P.collapsible)==null?void 0:re.nestedCollapsible)!=null&&ie.fields?V.concat(P.collapsible.nestedCollapsible.fields):V;return x.concat(W)},[]):((L=i.formSchema)==null?void 0:L.fields)||[]}),_=t.computed(()=>b.value.find(U=>U.type==="selectionGroup")),C=t.computed(()=>{var U;return(((U=_.value)==null?void 0:U.fields)||[]).map(({label:L,description:x})=>({label:L,description:x}))}),w=t.computed(()=>{var U,L;return(L=(U=_.value)==null?void 0:U.fields)==null?void 0:L[1]}),E=t.computed(()=>{var U;return(((U=w.value)==null?void 0:U.fields)??[]).map(L=>{var x;return{name:L.model.split("-")[0],entity:L.entity,fields:(x=L.inputValues)==null?void 0:x.fields,label:L.label,placeholder:L.placeholder,help:L.help,disabled:L.disabled,disabledTooltip:L.disabledTooltip,labelField:L.labelField}})}),k=["instance_name","protocols","tags","condition"],S=["config"],T=t.computed(()=>{var P;const U={type:"record",fields:i.schema.fields.filter(V=>S.includes(Object.keys(V)[0]))},L=b.value.find(V=>V.model==="enabled");return[...L?[L]:[],...((P=w.value)==null?void 0:P.fields)??[],...b.value.filter(V=>k.includes(V.model))].forEach(V=>{if(V.type==="AutoSuggest")U.fields.push({[V.model.split("-")[0]]:{type:"foreign",reference:V.entity,description:V.help}});else if(V.model==="enabled")U.fields.push({[V.model]:{type:"boolean",default:!0}});else if(V.model==="instance_name"||V.model==="condition")U.fields.push({[V.model]:{type:"string",description:V.help}});else if(V.model==="protocols")U.fields.push({[V.model]:{type:"set",elements:{type:"string",one_of:V.values.map(W=>W.value)},default:[...V.default],required:V.required,description:V.help,help:V.default?o("plugins.form.fields.protocols.placeholderWithDefaultValues",{protocols:V.default.join(", ")}):o("plugins.form.fields.protocols.placeholder")}});else if(V.model==="tags")U.fields.push({[V.model]:{type:"set",elements:{type:"string"},description:V.help,default:V.default||[]}});else throw new Error(`Unsupported VFG field type '${V.type}' for model '${V.model}'`)}),U}),M=t.computed(()=>new Set(T.value.fields.map(U=>Object.keys(U)[0]))),v=t.computed(()=>B_(i.model,n)),N=t.computed(()=>{var U;return((U=w.value)==null?void 0:U.fields.map(L=>L.model))??[]}),O=t.computed(()=>N.value.map(U=>U.split("-")[0])),B=t.ref(i.isEditing?B_(v.value,O.value):R()),A=t.ref(Object.values(B.value).some(j)),G=t.useTemplateRef("form");let z=!1;function Y(){if(!G.value)return;const{getRawValue:U,setValue:L}=G.value,P={...U()};A.value?O.value.forEach(V=>{P[V]=B.value[V]??null}):O.value.forEach(V=>{P[V]=null}),z=!0,L(P),t.nextTick(()=>{z=!1})}function K(U){if(z||F(U),u.value==="code"){const L=O.value.some(x=>j(U[x]));L!==A.value&&(A.value=L)}i.onFormChange(U,n)}function F(U){O.value.forEach(L=>{const x=U[L];ac(x,"id")&&x.id!=null?B.value[L]=x:B.value[L]=null})}function j(U){return ac(U,"id")&&U.id!=null}function R(){const U={};return N.value.forEach(L=>{if(i.formModel[L]){const x=L.split("-")[0];if(!x)return;U[x]={id:i.formModel[L]}}}),U}wB(T,r);const q=t.ref(!0);return(U,L)=>{const x=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock(t.Fragment,null,[p.value?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:"#plugin-form-page-actions"},[t.createVNode(t.unref(We.KSegmentedControl),{"data-testid":"plugin-editor-mode-switcher","model-value":u.value,options:d,"onUpdate:modelValue":m},null,8,["model-value"])])):t.createCommentVNode("",!0),t.createVNode(dn,{ref:"form",class:"ff-standard-layout",config:g.value,data:v.value,"data-instance-id":t.unref(r),"data-plugin-name":e.pluginName,"data-testid":"ff-standard-layout-form","render-rules":e.renderRules,schema:T.value,tag:"div",onChange:K},{[t.unref(Oi)]:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(P,V)=>(t.openBlock(),t.createBlock(Ht,{key:`${e.pluginName}-${V}`,match:t.unref(VO)(P.match)},{default:t.withCtx(W=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(P.component),t.mergeProps({ref_for:!0},{...W,...(typeof P.propsOverrides=="function"?P.propsOverrides(W):P.propsOverrides)??{}}),null,16))]),_:2},1032,["match"]))),128)),t.createVNode(Ht,{match:({path:P})=>{var V,W;return P===((W=(V=t.unref(f))==null?void 0:V.redisPath)==null?void 0:W.value)}},{default:t.withCtx(()=>[t.createVNode(Wf,{"is-konnect-managed-redis-enabled":i.isKonnectManagedRedisEnabled??!1},null,8,["is-konnect-managed-redis-enabled"])]),_:1},8,["match"]),t.renderSlot(U.$slots,"field-renderers",{},void 0,!0)]),default:t.withCtx(()=>[u.value==="form"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(t.unref(Ee.EntityFormBlock),{"data-testid":"form-section-plugin-scope",description:e.generalInfoDescription??t.unref(o)("plugins.form.sections.plugin_scope.description"),step:1,title:e.generalInfoTitle??t.unref(o)("plugins.form.sections.plugin_scope.title")},t.createSlots({default:t.withCtx(()=>{var P;return[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((P=_.value)!=null&&P.disabled?t.unref(We.KTooltip):"div"),t.normalizeProps(t.guardReactiveProps(y.value)),{default:t.withCtx(()=>{var V,W;return[t.createElementVNode("div",wL,[t.createVNode(t.unref(We.KRadio),t.mergeProps({modelValue:A.value,"onUpdate:modelValue":L[0]||(L[0]=re=>A.value=re),card:"","card-orientation":"horizontal"},C.value[0],{disabled:(V=_.value)==null?void 0:V.disabled,"selected-value":!1,"onUpdate:modelValue":Y}),null,16,["modelValue","disabled"]),C.value[1]?(t.openBlock(),t.createBlock(t.unref(We.KRadio),t.mergeProps({key:0,modelValue:A.value,"onUpdate:modelValue":L[1]||(L[1]=re=>A.value=re),card:"","card-orientation":"horizontal"},C.value[1],{disabled:(W=_.value)==null?void 0:W.disabled,"selected-value":!0,"onUpdate:modelValue":Y}),null,16,["modelValue","disabled"])):t.createCommentVNode("",!0)])]}),_:1},16)),w.value?t.withDirectives((t.openBlock(),t.createElementBlock("div",kL,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(E.value,V=>(t.openBlock(),t.createBlock(iP,{key:V.name,developer:e.developer,disabled:V.disabled,"disabled-tooltip":V.disabledTooltip,entity:V.entity,fields:V.fields,help:V.help,label:V.label,"label-field":V.labelField,name:V.name,placeholder:V.placeholder},null,8,["developer","disabled","disabled-tooltip","entity","fields","help","label","label-field","name","placeholder"]))),128))],512)),[[t.vShow,A.value]]):t.createCommentVNode("",!0)]}),_:2},[h["general-info-title"]?{name:"title",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"general-info-title",{},void 0,!0)]),key:"0"}:void 0,h["general-info-description"]?{name:"description",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"general-info-description",{},void 0,!0)]),key:"1"}:void 0,h["general-info-extra"]?{name:"extra",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"general-info-extra",{},void 0,!0)]),key:"2"}:void 0]),1032,["description","title"]),t.createVNode(t.unref(Ee.EntityFormBlock),{"data-testid":"form-section-plugin-config",description:e.pluginConfigDescription??t.unref(o)("plugins.form.sections.plugin_config.description"),step:2,title:e.pluginConfigTitle??t.unref(o)("plugins.form.sections.plugin_config.title")},t.createSlots({default:t.withCtx(()=>[t.renderSlot(U.$slots,"default",{},void 0,!0)]),_:2},[h["plugin-config-title"]?{name:"title",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"plugin-config-title",{},void 0,!0)]),key:"0"}:void 0,h["plugin-config-description"]?{name:"description",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"plugin-config-description",{},void 0,!0)]),key:"1"}:void 0,h["plugin-config-extra"]?{name:"extra",fn:t.withCtx(()=>[t.renderSlot(U.$slots,"plugin-config-extra",{},void 0,!0)]),key:"2"}:void 0]),1032,["description","title"]),t.createVNode(t.unref(Ee.EntityFormBlock),{"data-testid":"form-section-general-info",description:t.unref(o)("plugins.form.sections.plugin_general_info.description"),step:3,title:t.unref(o)("plugins.form.sections.general_info.title")},{default:t.withCtx(()=>[M.value.has("enabled")?(t.openBlock(),t.createBlock(nP,{key:0,"disabled-text":t.unref(o)("plugins.form.fields.plugin_status.text_off"),"enabled-text":t.unref(o)("plugins.form.fields.plugin_status.text_on"),label:t.unref(o)("plugins.form.fields.plugin_status.label"),name:"enabled"},null,8,["disabled-text","enabled-text","label"])):t.createCommentVNode("",!0),M.value.has("instance_name")?(t.openBlock(),t.createBlock(_t,{key:1,label:t.unref(o)("plugins.form.fields.instance_name.label"),name:"instance_name",placeholder:t.unref(o)("plugins.form.fields.instance_name.placeholder")},null,8,["label","placeholder"])):t.createCommentVNode("",!0),M.value.has("tags")?(t.openBlock(),t.createBlock(gs,{key:2,help:t.unref(o)("plugins.form.fields.tags.help"),name:"tags",placeholder:t.unref(o)("plugins.form.fields.tags.placeholder")},null,8,["help","placeholder"])):t.createCommentVNode("",!0),M.value.has("protocols")?(t.openBlock(),t.createBlock(lt,{key:3,name:"protocols"})):t.createCommentVNode("",!0),T.value.fields.find(P=>Object.keys(P)[0]==="condition")?(t.openBlock(),t.createBlock(x,{key:4,modelValue:q.value,"onUpdate:modelValue":L[2]||(L[2]=P=>q.value=P),"data-testid":"view-general-info-additional-settings","trigger-label":q.value?t.unref(o)("plugins.form.grouping.advanced_parameters.view"):t.unref(o)("plugins.form.grouping.advanced_parameters.hide")},{default:t.withCtx(()=>[t.createVNode(bL)]),_:1},8,["modelValue","trigger-label"])):t.createCommentVNode("",!0)]),_:1},8,["description","title"])],64)):t.createCommentVNode("",!0),u.value==="code"?(t.openBlock(),t.createBlock(t.unref(Ee.EntityFormBlock),{key:1,description:t.unref(o)("plugins.form.sections.code_mode.description"),title:t.unref(o)("plugins.form.sections.code_mode.title")},{default:t.withCtx(()=>[t.renderSlot(U.$slots,"code-editor",{},()=>[t.createVNode(yL)],!0)]),_:3},8,["description","title"])):t.createCommentVNode("",!0)]),_:2},1032,["config","data","data-instance-id","data-plugin-name","render-rules","schema"])],64)}}}),[["__scopeId","data-v-f229e1e8"]]),CL={class:"ff-acl-mode"},EL=Re(t.defineComponent({__name:"ACLModeCard",setup(e){const{formData:n}=Nt(),{i18n:{t:r}}=et(),o=t.ref("allow"),i=t.ref(!1),a=t.ref({});t.watch(()=>n.config,l=>{if(i.value||!l)return;const c=l.deny,u=l.allow;Array.isArray(c)&&c.length>0?o.value="deny":Array.isArray(u)&&u.length>0&&(o.value="allow")},{deep:!0,immediate:!0});function s(){i.value=!0,n.config&&(o.value==="allow"?(n.config.deny&&(a.value.deny=[...n.config.deny]),n.config.deny=null,a.value.allow&&(n.config.allow=[...a.value.allow])):(n.config.allow&&(a.value.allow=[...n.config.allow]),n.config.allow=null,a.value.deny&&(n.config.deny=[...a.value.deny])))}return(l,c)=>(t.openBlock(),t.createBlock(t.unref(We.KCard),{class:"ff-acl-mode-card"},{default:t.withCtx(()=>[t.createElementVNode("div",CL,[t.createVNode(t.unref(We.KRadio),{modelValue:o.value,"onUpdate:modelValue":[c[0]||(c[0]=u=>o.value=u),s],"data-testid":"ff-acl-mode-allow",label:t.unref(r)("plugins.free-form.acl.mode.allow"),"selected-value":"allow"},null,8,["modelValue","label"]),t.createVNode(t.unref(We.KRadio),{modelValue:o.value,"onUpdate:modelValue":[c[1]||(c[1]=u=>o.value=u),s],"data-testid":"ff-acl-mode-deny",label:t.unref(r)("plugins.free-form.acl.mode.deny"),"selected-value":"deny"},null,8,["modelValue","label"])]),o.value==="allow"?(t.openBlock(),t.createBlock(lt,{key:0,name:"config.allow"})):(t.openBlock(),t.createBlock(lt,{key:1,name:"config.deny"}))]),_:1}))}}),[["__scopeId","data-v-fd5c7165"]]),NL=t.defineComponent({__name:"ACLForm",props:{generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},isEditing:{type:Boolean},onFormChange:{type:Function},onValidityChange:{type:Function},hideEditorModeSwitcher:{type:Boolean},formConfig:{},renderRules:{},fieldRenderers:{},pluginName:{},isKonnectManagedRedisEnabled:{type:Boolean},developer:{type:Boolean}},setup(e){const n=e,r=t.useSlots();return t.provide(ot.AUTOFILL_SLOT,r==null?void 0:r[ot.AUTOFILL_SLOT_NAME]),(o,i)=>(t.openBlock(),t.createBlock(Qr,t.normalizeProps(t.guardReactiveProps(n)),{default:t.withCtx(()=>[t.createVNode(EL),t.createVNode(sn,{"as-child":"",name:"config",omit:["allow","deny"],"reset-label-path":"reset"})]),_:1},16))}}),xL={class:"ff-advanced-fields"},Kc=Re(t.defineComponent({__name:"AdvancedFields",props:{hideGeneralFields:{type:Boolean}},setup(e){const{t:n}=en.createI18n("en-us",an),{getSchema:r}=Nt(),o=t.ref(!0);return(i,a)=>(t.openBlock(),t.createBlock(t.unref(We.KCollapse),{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=s=>o.value=s),"data-testid":"view-advanced","trigger-label":o.value?t.unref(n)("plugins.form.grouping.advanced_parameters.view"):t.unref(n)("plugins.form.grouping.advanced_parameters.hide")},{default:t.withCtx(()=>[t.createElementVNode("div",xL,[e.hideGeneralFields?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.unref(r)("instance_name")?(t.openBlock(),t.createBlock(lt,{key:0,name:"instance_name"})):t.createCommentVNode("",!0),t.unref(r)("protocols")?(t.openBlock(),t.createBlock(lt,{key:1,name:"protocols"})):t.createCommentVNode("",!0),t.unref(r)("tags")?(t.openBlock(),t.createBlock(gs,{key:2,help:"e.g. tag1, tag2, tag3",name:"tags",placeholder:t.unref(n)("plugins.form.fields.tags.placeholder")},null,8,["placeholder"])):t.createCommentVNode("",!0),t.unref(r)("condition")?(t.openBlock(),t.createBlock(_t,{key:3,name:"condition",placeholder:t.unref(n)("plugins.form.fields.condition.placeholder")},null,8,["placeholder"])):t.createCommentVNode("",!0)],64)),t.renderSlot(i.$slots,"default",{},void 0,!0)])]),_:3},8,["modelValue","trigger-label"]))}}),[["__scopeId","data-v-baa317ec"]]),m0=Re(t.defineComponent({__name:"ConfigForm",setup(e){const{getSchema:n,createComputedRenderRules:r}=Nt(),o=r("config"),i=t.computed(()=>{var y;const s=[],l=[],c=new Set,p=n().fields.find(b=>Object.keys(b)[0]==="config");if(!p||!("config"in p))return{defaultVisible:s,advanced:l};const d=p.config;d.entity_checks&&d.entity_checks.forEach(b=>{var C,w;let _;"at_least_one_of"in b?_=b.at_least_one_of:"conditional"in b&&((C=n(Et("config",b.conditional.if_field)))!=null&&C.required)&&b.conditional.then_match.required?_=[b.conditional.if_field,b.conditional.then_field]:"conditional_at_least_one_of"in b&&((w=n(Et("config",b.conditional_at_least_one_of.if_field)))!=null&&w.required)&&(_=[b.conditional_at_least_one_of.if_field,...b.conditional_at_least_one_of.then_at_least_one_of]),_==null||_.forEach(E=>c.add(E.split(".")[0]))});const m=((y=o.value)==null?void 0:y.bundles)??[],f=new Map;for(const b of m)for(let _=1;_<b.length;_++)f.set(b[_],b[_-1]);const h=b=>{const _=f.get(b);return _?h(_):b},g=new Map;for(const b of d.fields){const _=Object.keys(b)[0];g.set(_,h(_))}for(const b of d.fields){const _=Object.keys(b)[0];if(g.get(_)!==_)continue;let w;b[_].required||c.has(_)?w=s:w=l,w.push(_)}for(const b of d.fields){const _=Object.keys(b)[0],C=g.get(_);C!==_&&(s.includes(C)?s:l).push(_)}return{defaultVisible:s,advanced:l}}),a=t.computed(()=>i.value.defaultVisible.length===0);return(s,l)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(sn,{"as-child":"",class:"ff-default-visible-fields",name:"config",omit:a.value?[]:i.value.advanced,"reset-label-path":"reset"},null,8,["omit"]),a.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Kc,{key:0,class:"ff-advanced-fields-container","data-testid":"ff-advanced-fields-container","hide-general-fields":""},{default:t.withCtx(()=>[t.createVNode(sn,{"as-child":"",name:"config",omit:i.value.defaultVisible,"reset-label-path":"reset"},null,8,["omit"])]),_:1}))],64))}}),[["__scopeId","data-v-bc82c9e9"]]),h0=t.defineComponent({__name:"CommonForm",props:{generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},isEditing:{type:Boolean},onFormChange:{type:Function},onValidityChange:{type:Function},hideEditorModeSwitcher:{type:Boolean},formConfig:{},renderRules:{},fieldRenderers:{},pluginName:{},isKonnectManagedRedisEnabled:{type:Boolean},developer:{type:Boolean}},setup(e){const n=e,r=t.useSlots();return t.provide(ot.AUTOFILL_SLOT,r==null?void 0:r[ot.AUTOFILL_SLOT_NAME]),(o,i)=>(t.openBlock(),t.createBlock(Qr,t.normalizeProps(t.guardReactiveProps(n)),{default:t.withCtx(()=>[t.createVNode(m0)]),_:1},16))}});function ht(e={}){return{...e,component:e.component??h0}}const SL=ht({experimental:!0,component:NL}),AL=ht({fieldRenderers:[{match:"config.functions",component:ko,propsOverrides:{appearance:{string:{multiline:!0}}}}]}),vL=ht({component:t.defineComponent({__name:"AIMcpProxyForm",props:{generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},isEditing:{type:Boolean},onFormChange:{type:Function},onValidityChange:{type:Function},hideEditorModeSwitcher:{type:Boolean},formConfig:{},renderRules:{},fieldRenderers:{},pluginName:{},isKonnectManagedRedisEnabled:{type:Boolean},developer:{type:Boolean}},setup(e){const n=e,r=t.useSlots();t.provide(ot.AUTOFILL_SLOT,r==null?void 0:r[ot.AUTOFILL_SLOT_NAME]);const{i18n:{t:o}}=pt.useI18n();return(i,a)=>(t.openBlock(),t.createBlock(Qr,t.normalizeProps(t.guardReactiveProps(n)),{"field-renderers":t.withCtx(()=>[t.createVNode(Ht,{match:({path:s})=>s==="config.default_acl"},{default:t.withCtx(s=>[t.createVNode(Wr,t.mergeProps(s,{appearance:"tabs","item-label":(l,c)=>t.unref(o)("plugins.free-form.ai-mcp-proxy.default_acl_item_label",{index:c+1}),"sticky-tabs":""}),null,16,["item-label"])]),_:1},8,["match"]),t.createVNode(Ht,{match:({path:s})=>s==="config.tools"},{default:t.withCtx(s=>[t.createVNode(Wr,t.mergeProps(s,{appearance:"tabs","item-label":(l,c)=>t.unref(o)("plugins.free-form.ai-mcp-proxy.tool_item_label",{index:c+1}),"sticky-tabs":""}),null,16,["item-label"])]),_:1},8,["match"]),t.createVNode(Ht,{match:({genericPath:s})=>s==="config.tools.*.query"||s==="config.tools.*.headers"},{default:t.withCtx(s=>[t.createVNode(ko,t.mergeProps(s,{"one-line":""}),{default:t.withCtx(({keyId:l})=>[t.createVNode(gs,{name:l,placeholder:t.unref(o)("plugins.free-form.tag_helper")},null,8,["name","placeholder"])]),_:1},16)]),_:1},8,["match"])]),default:t.withCtx(()=>[t.createVNode(sn,{"as-child":"",name:"config","reset-label-path":"reset"})]),_:1},16))}})}),IL=ht({experimental:!0}),TL=ht({experimental:!0,renderRules:{dependencies:{"config.brute_force_protection.redis":["config.brute_force_protection.strategy","redis"]}}}),OL=ht({experimental:!0}),BL=ht({experimental:!0,fieldRenderers:[{match:({path:e})=>e==="config.methods"||e==="config.request_method",component:Gt,propsOverrides:{multiple:!0}}]}),g0=Object.entries(Object.assign({"./authenticate-third-party-with-dynamic-url.yaml":`nodes:
|
|
180
180
|
- name: STATIC_INPUTS
|
|
181
181
|
type: static
|
|
182
182
|
values:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-lens-providers.d.ts","sourceRoot":"","sources":["../../../../../../src/components/free-form/shared/composables/code-lens-providers.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,MAAM,EAAsB,MAAM,eAAe,CAAA;AAS1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAI/C,OAAO,KAAK,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAC7F,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAEjG,KAAK,gBAAgB,GAAG,uBAAuB,GAAG,2BAA2B,CAAA;AAI7E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB,CAAA;AAID,QAAA,MAAM,UAAU,4EAA6E,CAAA;AAC7F,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAgHpD,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAC1C,KAAK,CAAC;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAclD;
|
|
1
|
+
{"version":3,"file":"code-lens-providers.d.ts","sourceRoot":"","sources":["../../../../../../src/components/free-form/shared/composables/code-lens-providers.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,MAAM,EAAsB,MAAM,eAAe,CAAA;AAS1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAI/C,OAAO,KAAK,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAC7F,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAEjG,KAAK,gBAAgB,GAAG,uBAAuB,GAAG,2BAA2B,CAAA;AAI7E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB,CAAA;AAID,QAAA,MAAM,UAAU,4EAA6E,CAAA;AAC7F,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAgHpD,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAC1C,KAAK,CAAC;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAclD;AAsCD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,EAAE,WAAW,CAAC,EAAE,kBAAkB;mBA6IvE,MAAM,CAAC,UAAU;EA4ExC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-plugins",
|
|
3
|
-
"version": "9.205.
|
|
3
|
+
"version": "9.205.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-plugins.umd.js",
|
|
6
6
|
"module": "./dist/entities-plugins.es.js",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"vue": ">= 3.3.13 < 4",
|
|
51
51
|
"vue-router": "^4.6.4 || ^5.0.6",
|
|
52
52
|
"zod": ">= 4.1.3 < 5",
|
|
53
|
-
"@kong-ui-public/entities-shared": "^3.47.0",
|
|
54
53
|
"@kong-ui-public/i18n": "^2.4.6",
|
|
55
|
-
"@kong-ui-public/monaco-editor": "^0.22.9"
|
|
54
|
+
"@kong-ui-public/monaco-editor": "^0.22.9",
|
|
55
|
+
"@kong-ui-public/entities-shared": "^3.47.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"@playwright/test": {
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"zod": "^4.3.6",
|
|
89
89
|
"@kong-ui-public/entities-shared": "^3.47.0",
|
|
90
90
|
"@kong-ui-public/i18n": "^2.4.6",
|
|
91
|
-
"@kong-ui-public/
|
|
92
|
-
"@kong-ui-public/
|
|
91
|
+
"@kong-ui-public/monaco-editor": "^0.22.9",
|
|
92
|
+
"@kong-ui-public/entities-vaults": "^4.6.7"
|
|
93
93
|
},
|
|
94
94
|
"repository": {
|
|
95
95
|
"type": "git",
|
|
@@ -108,15 +108,15 @@
|
|
|
108
108
|
"dependencies": {
|
|
109
109
|
"lodash-es": "^4.18.1",
|
|
110
110
|
"marked": "^14.1.4",
|
|
111
|
-
"@kong-ui-public/entities-consumer-groups": "^4.5.9",
|
|
112
|
-
"@kong-ui-public/entities-consumers": "^4.4.9",
|
|
113
111
|
"@kong-ui-public/entities-gateway-services": "^3.20.9",
|
|
112
|
+
"@kong-ui-public/entities-consumers": "^4.4.9",
|
|
114
113
|
"@kong-ui-public/entities-plugins-icon": "^1.6.5",
|
|
115
|
-
"@kong-ui-public/entities-
|
|
114
|
+
"@kong-ui-public/entities-consumer-groups": "^4.5.9",
|
|
116
115
|
"@kong-ui-public/entities-plugins-metadata": "^1.13.3",
|
|
117
|
-
"@kong-ui-public/entities-
|
|
116
|
+
"@kong-ui-public/entities-redis-configurations": "^1.15.8",
|
|
118
117
|
"@kong-ui-public/entities-vaults": "^4.6.7",
|
|
119
|
-
"@kong-ui-public/forms": "^4.24.7"
|
|
118
|
+
"@kong-ui-public/forms": "^4.24.7",
|
|
119
|
+
"@kong-ui-public/entities-routes": "^3.22.10"
|
|
120
120
|
},
|
|
121
121
|
"scripts": {
|
|
122
122
|
"dev": "cross-env USE_SANDBOX=true vite",
|