@kong-ui-public/entities-plugins 9.34.0 → 9.35.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.
- package/dist/entities-plugins.es.js +5035 -4194
- package/dist/entities-plugins.umd.js +40 -38
- package/dist/style.css +1 -1
- package/dist/types/components/free-form/RequestCallout/RequestCalloutForm.vue.d.ts +2 -2
- package/dist/types/components/free-form/RequestCallout/RequestCalloutForm.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/ServiceProtection/ConfigForm.vue.d.ts +11 -0
- package/dist/types/components/free-form/ServiceProtection/ConfigForm.vue.d.ts.map +1 -0
- package/dist/types/components/free-form/ServiceProtection/ErrorMessageForm.vue.d.ts +3 -0
- package/dist/types/components/free-form/ServiceProtection/ErrorMessageForm.vue.d.ts.map +1 -0
- package/dist/types/components/free-form/ServiceProtection/RedisField.vue.d.ts +3 -0
- package/dist/types/components/free-form/ServiceProtection/RedisField.vue.d.ts.map +1 -0
- package/dist/types/components/free-form/ServiceProtection/RequestLimitsForm.vue.d.ts +3 -0
- package/dist/types/components/free-form/ServiceProtection/RequestLimitsForm.vue.d.ts.map +1 -0
- package/dist/types/components/free-form/ServiceProtection/ServiceProtectionForm.vue.d.ts +18 -1
- package/dist/types/components/free-form/ServiceProtection/ServiceProtectionForm.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/shared/ArrayField.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/shared/PluginFormWrapper.vue.d.ts +4 -4
- package/dist/types/components/free-form/shared/PluginFormWrapper.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/shared/RadioField.vue.d.ts +15 -0
- package/dist/types/components/free-form/shared/RadioField.vue.d.ts.map +1 -0
- package/dist/types/components/free-form/shared/RedisSelector.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/shared/StringField.vue.d.ts.map +1 -1
- package/dist/types/components/free-form/shared/composables.d.ts +3 -0
- package/dist/types/components/free-form/shared/composables.d.ts.map +1 -1
- package/dist/types/types/plugins/form-schema.d.ts +1 -0
- package/dist/types/types/plugins/form-schema.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,52 +1,54 @@
|
|
|
1
|
-
(function(ne,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/entities-shared"),require("marked"),require("vue-router"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-plugins-metadata"),require("@kong-ui-public/forms"),require("@kong-ui-public/entities-vaults"),require("@kong-ui-public/entities-vaults/dist/style.css"),require("@kong/icons"),require("@kong/kongponents"),require("@vueuse/core"),require("monaco-editor"),require("@kong-ui-public/entities-plugins-icon")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared","marked","vue-router","@kong-ui-public/i18n","@kong-ui-public/entities-plugins-metadata","@kong-ui-public/forms","@kong-ui-public/entities-vaults","@kong-ui-public/entities-vaults/dist/style.css","@kong/icons","@kong/kongponents","@vueuse/core","monaco-editor","@kong-ui-public/entities-plugins-icon"],t):(ne=typeof globalThis<"u"?globalThis:ne||self,t(ne["kong-ui-public-entities-plugins"]={},ne.Vue,ne["kong-ui-public-entities-shared"],ne.marked,ne.VueRouter,ne["kong-ui-public-i18n"],ne.entitiesPluginsMetadata,ne.forms,ne.entitiesVaults,null,ne.KongIcons,ne.Kongponents,ne.core$1,ne.monaco,ne.entitiesPluginsIcon))})(this,function(ne,t,D,pn,Kt,Ge,b,ke,fn,Pb,Ce,Ae,rt,Ja,Ut){"use strict";function Xa(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const mn=Xa(Ja),qe={actions:{cancel:"Cancel",view_configuration:"View Configuration",create:"New plugin",create_custom:"Create",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",enable:"Enable",enabled:"Enabled",delete:"Delete",confirm_delete:"Yes, delete",view:"View Details",configure_dynamic_ordering:"Configure Dynamic Ordering",go_to_plugins:"Go to Plugins",save:"Save",add_entity:"Add {entity}",remove_entity:"Remove {entity}"},view_configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML, JSON, or Terraform. This allows for straightforward importing into APIOps tools like decK with YAML, Insomnia and cURL with JSON, or Terraform products with Terraform.",yaml:"YAML",terraform:"Terraform",json:"JSON"},delete:{title:"Delete a Plugin",custom_title:"Delete {name}",custom_plugin:"Custom Plugin",description:"This action cannot be reversed.",description_custom:"Please ensure this plugin is not in use. This action cannot be reversed.",plugin_schema_in_use_title:"Unable to Delete Custom Plugin",plugin_schema_in_use_message:"The custom plugin schema {name} is being used in this control plane, please delete any existing instances before you delete this schema.",confirmModalText1:"Are you sure you want to delete",confirmModalText2:"Please ensure this plugin is not in use. This delete action cannot be reversed.",confirm_text:"Type {name} to confirm your action",success_message:"Successfully deleted custom plugin {name}"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard",tooltip:"Copy {label}",success_tooltip:"Copied!"},errors:{general:"Plugins could not be retrieved",delete:"The plugin could not be deleted at this time.",copy:"Failed to copy to clipboard",load_results:"Error loading available plugins",load_schema:"Error loading plugin schema"},search:{placeholder:{konnect:"Filter by name",exact:"Filter by exact instance name or ID",kongManager:"Filter by exact instance name or ID",select:"Filter plugins"},filter:{field:{enabled:"Enabled"}},no_results:'No results found for "{filter}"'},plugins:{title:"Plugins",list:{toolbar_actions:{new_plugin:"New plugin"},table_headers:{applied_to:"Applied To",applied_to_badges:{consumer:"Consumer",global:"Global",route:"Route",service:"Service",consumer_group:"Consumer Group"},id:"ID",name:"Name",instance_name:"Instance Name",ordering:"Ordering",ordering_badge:{dynamic:"Dynamic",static:"Static"},enabled:"Enabled",tags:"Tags"},empty_state:{title:"Configure a New Plugin",description:"Plugins are used to extend Kong functionality."},empty_state_v2:{title:"Configure your first plugin",description:"Plugins extend gateways functionalities, offering features like authentication, rate limiting, and request transformations to enhance security and performance.",create_cta:"New plugin",group:"Plugins created in gateways within this group will automatically appear here."}},meta:{"basic-auth":{name:"Basic Authentication",credential_name:"Basic Auth Credential",description:"Add Basic Authentication to your Services"},"hmac-auth":{name:"HMAC Authentication",credential_name:"HMAC Credential",description:"Add HMAC Authentication to your Services"},"jwt-signer":{name:"JWT Signer",description:"Verify and (re-)sign one or two tokens in a request"},jwt:{name:"JWT",credential_name:"JWT Credential",description:"Verify and authenticate JSON Web Tokens"},"key-auth":{name:"Key Authentication",credential_name:"Key Auth Credential",description:"Add key authentication to your Services"},"key-auth-enc":{name:"Key Authentication Encrypted",credential_name:"Key Auth Encrypted",description:"Add key authentication to your Services with an encrypted token"},"ldap-auth-advanced":{name:"LDAP Authentication Advanced",description:"Integrate Kong with a LDAP server"},"ldap-auth":{name:"LDAP Authentication",description:"Integrate Kong with a LDAP server"},"oauth2-introspection":{name:"OAuth 2.0 Introspection",description:"Integrate Kong with a third-party OAuth 2.0 Authorization Server"},oauth2:{name:"OAuth 2.0 Authentication",credential_name:"OAuth 2.0 Application",description:"Add OAuth 2.0 authentication to your Services"},"openid-connect":{name:"OpenID Connect",description:"Integrate Kong with a third-party OpenID Connect 1.0 Provider"},"mtls-auth":{name:"Mutual TLS Authentication",description:"Secure routes and services with client certificate and mutual TLS authentication"},"vault-auth":{name:"Vault Authentication",description:"Secure routes and services with an access token and secret token, stored securely via Vault"},"bot-detection":{name:"Bot Detection",description:"Detect and clock bots or custom clients"},cors:{name:"CORS",description:"Allow developers to make requests from the browser"},"ip-restriction":{name:"IP Restriction",description:"Whitelist or blacklist IPs that can make requests"},opa:{name:"OPA",description:"Authorize requests against Open Policy Agent"},"kubernetes-sidecar-injector":{name:"Kubernetes Sidecar Injector",description:"This plugin will inject Kong dataplane nodes and form a service mesh on top of Kubernetes"},"request-validator":{name:"Request Validator",description:"Validate requests before they reach their upstream Service. "},acl:{name:"ACL",credential_name:"Access Control Group",description:"Control which consumers can access Services"},canary:{name:"Canary Release",description:"Methodically roll out software changes to a subset of users"},"forward-proxy":{name:"Forward Proxy",description:"Allow Kong to connect to intermediary transparent HTTP proxies"},"proxy-cache":{name:"Proxy Caching",description:"Cache and serve commonly requested responses in Kong"},"proxy-cache-advanced":{name:"Proxy Caching Advanced",description:"Cache and serve commonly requested responses in Kong"},"graphql-proxy-cache-advanced":{name:"GraphQL Proxy Caching Advanced",description:"Cache and serve commonly requested responses in Kong"},"rate-limiting-advanced":{name:"Rate Limiting Advanced",description:"Rate-limit how many HTTP requests a developer can make"},"rate-limiting":{name:"Rate Limiting",description:"Rate-limit how many HTTP requests a developer can make"},"graphql-rate-limiting-advanced":{name:"GraphQL Rate Limiting Advanced",description:"Rate-limit how many HTTP requests a developer can make"},mocking:{name:"Mocking",description:"Provide mock endpoints to test your APIs in development against your services"},"request-size-limiting":{name:"Request Size Limiting",description:"Block requests with bodies greater than a specific size"},"request-termination":{name:"Request Termination",description:"Terminate all requests with a specific response"},"response-ratelimiting":{name:"Response Rate Limiting",description:"Rate-Limiting based on a custom response header value"},"route-by-header":{name:"Route by Header",description:"Route requests based on request headers"},"ai-proxy":{name:"AI Proxy",description:"Directly call a configured LLM, with mediated security and tuning parameters, and using standardised Kong request and response formats."},"ai-prompt-decorator":{name:"AI Prompt Decorator",description:"Prepend and append chat prompts to AI Proxy plugin LLM requests."},"ai-prompt-template":{name:"AI Prompt Template",description:"Define a set of templates, containing string variable placeholders, that can be consumed by users when used with the AI Proxy plugin."},"ai-prompt-guard":{name:"AI Prompt Guard",description:"Define a set of valid, and a set of invalid, regular expression patterns when calling LLM models with the AI Proxy plugin."},"ai-request-transformer":{name:"AI Request Transformer",description:"Use an LLM to transform API request from a user, before sending to the upstream service."},"ai-response-transformer":{name:"AI Response Transformer",description:"Use an LLM to transform API responses from the upstream service, before returning to the user."},"ai-rate-limiting-advanced":{name:"AI Rate Limiting Advanced",description:"Provides rate limiting for the providers used by any AI plugins."},"ai-azure-content-safety":{name:"AI Azure Content Safety",description:"Allows checking and auditing of AI-Proxy plugin messages, using Azure Cognitive Services, before proxying to upstream large-language model."},"aws-lambda":{name:"AWS Lambda",description:"Invoke and manage AWS Lambda functions from Kong"},"azure-functions":{name:"Azure Functions",description:"Invoke Azure functions"},openwhisk:{name:"OpenWhisk",description:"Invoke and manage OpenWhisk actions from Kong"},"pre-function":{name:"Kong Functions (Pre-Plugins)",description:"Add and manage custom lua functions to run before other plugins"},"post-function":{name:"Kong Functions (Post-Plugins)",description:"Add and manage custom lua functions to run after other plugins"},datadog:{name:"Datadog",description:"Visualize metrics on Datadog"},prometheus:{name:"Prometheus",description:"Export performance metrics to Prometheus"},zipkin:{name:"Zipkin",description:"Propagate zipkin spans and report spans to a zipkin server"},collector:{name:"Collector",description:"Automate spec-driven development & anomaly detection (Early Access)"},"response-transformer-advanced":{name:"Response Transformer Advanced",description:"Transform the response sent by the upstream server on the fly on Kong, before returning the response to the client."},"correlation-id":{name:"Correlation ID",description:"Correlate requests and responses using a unique ID"},"request-transformer-advanced":{name:"Request Transformer Advanced",description:"Use powerful regular expressions, variables and templates to transform API requests"},"request-transformer":{name:"Request Transformer",description:"Modify the request before hitting the upstream server"},"response-transformer":{name:"Response Transformer",description:"Modify the upstream response before returning it to the client"},"route-transformer-advanced":{name:"Route Transformer Advanced",description:"Transforms the routing on the fly in Kong, changing the upstream server/port/path to hit"},"kafka-upstream":{name:"Kafka Upstream",description:"Transform requests into Kafka messages in a topic"},degraphql:{name:"DeGraphQL",description:"Transform a GraphQL upstream into a REST API"},"exit-transformer":{name:"Exit Transformer",description:"Customize Kong exit responses sent downstream"},jq:{name:"jq",description:"Transform JSON objects included in API requests or responses using jq programs"},"file-log":{name:"File Log",description:"Append request and response data to a log file on disk"},"http-log":{name:"HTTP Log",description:"Send request and response logs to an HTTP server"},loggly:{name:"Loggly",description:"Send request and response logs to Loggly"},"statsd-advanced":{name:"StatsD Advanced",description:"Send traffic and Kong performance metrics to StatsD"},statsd:{name:"StatsD",description:"Send request and response logs to StatsD"},syslog:{name:"Syslog",description:"Send request and response logs to Syslog"},"tcp-log":{name:"TCP Log",description:"Send request and response logs to a TCP server"},"udp-log":{name:"UDP Log",description:"Send request and response logs to a UDP server"},"kafka-log":{name:"Kafka Log",description:"Publish request and response logs to a Kafka topic"},session:{name:"Session",description:"Sessions for Kong authentication"},"upstream-tls":{name:"Upstream TLS",description:"Enable TLS on upstream traffic by providing Kong with a list of trusted certificates."},"application-registration":{name:"Portal Application Registration",description:"Allow portal developers to register applications against services"},"konnect-application-auth":{name:"Konnect Application Auth",description:"Allow Konnect portal developers to register applications against services"},acme:{name:"ACME",description:"Let's Encrypt and ACMEv2 integration with Kong"},"grpc-gateway":{name:"gRPC Gateway",description:"Access gRPC services through HTTP REST"},"grpc-web":{name:"gRPC Web",description:"Allow browser clients to call gRPC services"},"upstream-timeout":{name:"Upstream Timeout",description:"Configure read, send and connect timeouts to an upstream"},opentelemetry:{name:"OpenTelemetry",description:"Propagate distributed tracing spans and report low-level spans to a OTLP-compatible server"},"websocket-validator":{name:"WebSocket Validator",description:"Validate individual WebSocket messages against to a user-specified schema before proxying them"},"websocket-size-limit":{name:"WebSocket Size Limit",description:"Allows operators to specify a maximum size for incoming WebSocket messages"},"tls-metadata-headers":{name:"TLS Metadata Headers",description:"Detects client certificates in requests, retrieves the TLS metadata, and proxies this metadata via HTTP headers"},"tls-handshake-modifier":{name:"TLS Handshake Modifier",description:"Requests the client certificate and if it exists, makes it available to other plugins acting on the request"},"oas-validation":{name:"OAS Validation",description:"Validate HTTP requests and responses based on an API Specification."},"jwe-decrypt":{name:"Kong JWE Decrypt",description:"The Kong JWE Decrypt plugin makes it possible to decrypt an inbound token(JWE) in a request."},"xml-threat-protection":{name:"XML Threat Protection",description:"Reduce the risk of XML attacks by checking the structure of XML payloads."},saml:{name:"SAML",description:"Security Assertion Markup Language (SAML) is an open standard for exchanging authentication and authorization data between an identity provider and a service provider."},"app-dynamics":{name:"AppDynamics",description:"This plugin integrates Kong with the AppDynamics APM platform so that proxy requests handled by Kong can be identified and analyzed in AppDynamics."},"json-threat-protection":{name:"JSON Threat Protection",description:"Apply size checks on JSON payload and minimize risk of content-level attacks"},"standard-webhooks":{name:"Standard Webhooks",description:"Validate incoming webhooks adhere to the Standard Webhooks specification, to which Kong is a contributor"},"ai-proxy-advanced":{name:"AI Proxy Advanced",description:"Route across different LLMs and models using advanced load balancing algorithms, including semantic routing."},"ai-semantic-cache":{name:"AI Semantic Cache",description:"Semantically cache AI requests to any LLM to reduce latency, improve end-user experiences and optimize GenAI costs."},"ai-semantic-prompt-guard":{name:"AI Semantic Prompt Guard",description:"Semantically and intelligently create allow and deny lists of topics that can be requested across every LLM."},"header-cert-auth":{name:"Header Certificate Authentication",description:"Authenticate clients with MTLS certificate passed in header by a WAF or load balancer"},"upstream-oauth":{name:"Upstream OAuth",description:"Configure Kong to obtain a OAuth2 token to consume an upstream API"},confluent:{name:"Confluent",description:"Streamlines integration with Confluent Cloud and transforms requests into messages published to a Confluent topic."},"service-protection":{name:"Service Protection",description:"Prevent abuse and protect services with absolute limits on the number of requests reaching the service."},"injection-protection":{name:"Injection Protection",description:"Protect against injection attacks by rejecting requests that match common injections patterns."},redirect:{name:"Redirect",description:"Redirect incoming requests to a new URL"},"kafka-consume":{name:"Kafka Consume",description:"Consume messages from Kafka topics over HTTP protocols."},"confluent-consume":{name:"Confluent Consume",description:"Consume messages from Confluent Kafka topics over HTTP protocols"},"request-callout":{name:"Request Callout",description:"Callout to third party APIs as part of request processing."},"ai-sanitizer":{name:"AI Sanitizer",description:"Sanitize personal or sensitive information from prompts before sending to LLM."},"ai-rag-injector":{name:"AI RAG Injector",description:"Attach contextual knowledge from vector databases with flexible template to LLM prompts."},datakit:{name:"Datakit",description:"Datakit is a workflow engine for working with external APIs."},"ai-prompt-compressor":{name:"AI Prompt Compressor",description:"The AI Prompt Compressor reduces costs associated with LLMs by compressing prompts."},"solace-upstream":{name:"Solace Upstream",description:"Transform requests into Solace messages in a Solace queue or topic."},"ai-aws-guardrails":{name:"AI AWS GuardRails",description:"The AI AWS GuardRails enables enforcement of introspection with the AWS GuardRails service for all requests processed by the AI Proxy plugin."}},fields:{service:"Service ID",route:"Route ID",consumer:"Consumer ID",consumer_group:"Consumer Group ID"},select:{custom_badge_text:"This plugin is data plane node specific",unavailable_tooltip:"This plugin is not available",already_exists:"This plugin is already applied to this resource",misc_plugins:"Other Plugins",view_more:"View more",view_less:"View less",tabs:{kong:{title:"Kong Plugins",description:"Kong plugins are bundled by default with Kong Gateway and are available across all control planes.",empty_title:"No Plugins",empty_description:"No plugins are available."},custom:{title:"Custom Plugins",description:"Custom plugins will be available in this control plane only.",disabled_tooltip:"Custom Plugins are not available with this Gateway. Create a Hybrid or Dedicated Cloud Gateway to leverage Custom Plugins.",empty_title:"No Custom Plugins",empty_description:"No custom plugins have been added to this Control Plane.",create:{name:"Custom Plugin",description:"Upload schema file to create custom plugin"}}},highlighted_plugins:{title:"Highlighted Plugins"}},form:{no_selection:"No selection...",fields:{enabled:{label:"Enabled",on_text:"This plugin is Enabled",off_text:"This plugin is Disabled"},instance_name:{label:"Instance Name",help:"A custom name for this plugin instance to help identifying from the list view."},protocols:{label:"Protocols",placeholder:"Select valid protocols for the plugin",placeholderWithDefaultValues:"Select valid protocols for the plugin. Default protocols: {protocols}",help:"A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type."},tags:{help:"An optional set of strings for grouping and filtering, separated by commas.",placeholder:"Enter list of tags"}},scoping:{label:"Scoped",global:{label:"Global",help:"All services, routes, and consumers"},gateway_service:{label:"Gateway Service",help:"The Gateway Service to which this plugin configuration will apply",placeholder:"Select a Gateway Service",plural:"Gateway Services"},route:{label:"Route",help:"The Route that this Plugin configuration will target",placeholder:"Select a Route",plural:"Routes"},consumer:{label:"Consumer",help:"The Consumer that this plugin configuration will target",placeholder:"Select a Consumer",plural:"Consumers"},consumer_group:{label:"Consumer Group",help:"The Consumer Group that this plugin configuration will target",placeholder:"Select a Consumer Group",plural:"Consumer Groups"}},grouping:{plugin_configuration:{title:"Plugin Configuration",description:"Configuration parameters for this plugin. View advanced parameters for extended configuration.",empty:"This plugin does not have required parameters."},advanced_parameters:{view:"View Advanced Parameters",hide:"Hide Advanced Parameters"}},field_rules:{at_least_one_of:"At least one of these parameters is required: {parameters}",only_one_of:"Exactly one of these parameters is required: {parameters}",mutually_required:"All of these parameters are required: {parameters}",only_one_of_mutually_required:"Exactly one of the following parameter combinations is required (all parameters within a chosen combination are required):"},sections:{general_info:{title:"General information",description:"Add details to help identify and manage your plugin."},plugin_config:{title:"Plugin configuration",description:"Configure parameters for this plugin by using a form or a YAML file."}}},"free-form":{"request-callout":{entity_name:"Request Callout",by_lua_placeholder:"Enter Lua script here..."},redis_partial:{redis_partial_modal_title:"New shared configuration",partial_created_success_message:"Successfully created a new Redis configuration."},datakit:{description_code:"Configure this plugin by using YAML configuration. If you are copy/pasting in examples from the documentation - paste from below the <code>config</code> block.",description_visual:"Configure this plugin by using the visual editor.",description_example:"Start with a use case:",examples:{authenticate:"Authenticate Kong to a third-party service",combine:"Combine multiple API responses",manipulate:"Manipulate request headers"},visual_editor:{mode:"Visual Editor",name:"Datakit Visual Editor",cta:"Go to visual editor",save:"Save",view_docs:"View Docs",expand_panel:"Expand panel",collapse_panel:"Collapse panel",return_to_config:"Return to Plugin configuration",node_panel:{title:"Node types",description:"Drag a node onto the canvas to add it to your data flow."},node_description:{call:"Call a third-party API",jq:"Transform data and cast variables with jq",exit:"Return a response directly to the client",property:"Get and set Kong Gateway configuration data",static:"Define static values to use for call nodes"}},code_editor:{mode:"Code Editor"}},vault_picker:{component_error:"The vault secret picker is not available"}}},redis:{title:"Redis Configuration",shared_configuration:{label:"Use shared configuration",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins.",title:"Shared Redis Configuration",error:"Fetching shared Redis configurations failed.",tooltip:"Only compatible {type} redis configurations will be listed here.",configuration_selector_label:"Select stored Redis configuration",configuration_selector_placeholder:"Pick Redis configuration",create_new_configuration:"New {type} shared configuration",open_source:"open source",enterprise:"enterprise",empty_state:"No shared configurations",badge:"Recommended",selector:{title:"Select a Redis configuration",placeholder:"Filter Configurations",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins."},type_label:{host_port:"Host/Port",sentinel:"Sentinel",cluster:"Cluster"}},dedicated_configuration:{label:"Use dedicated configuration",description:"Create a Redis configuration exclusively for this plugin, with settings that won’t impact other plugins.",title:"Connection Settings"},config_card:{common_fields:{created_at_label:"Created at",updated_at_label:"Last Updated at",type_label:"Redis Type"}},custom_plugin:{alert:"Note: For custom plugins, we cannot determine the correct Redis configuration type. Please ensure you select the appropriate option manually.",tooltip:"To apply a shared redis configuration, the redis fields must defined as Kong plugins in plugin schema."}},glossary:{plugin:"plugin"},custom_field:{key_auth_identity_realms:{cp_label:"Current Control Plane",cp_group_label:"Control Plane",realm_group_label:"Realms (Can only select one)"}}};function it(){const e=Ge.createI18n("en-us",qe);return{i18n:e,i18nT:Ge.i18nTComponent(e)}}function qr(){const{capitalize:e}=D.useStringHelpers(),n=["methods","logout_methods"];return{setFieldType:(c,d,m)=>{var k,_,g;if(!(!c||!d||!m))switch(m.type){case"boolean":c[d]={type:D.ConfigurationSchemaType.BadgeStatus,...c[d]};break;case"string":m.encrypted?c[d]={type:D.ConfigurationSchemaType.Redacted,...c[d]}:c[d]={type:D.ConfigurationSchemaType.Text,...c[d]};break;case"set":((k=m.elements)==null?void 0:k.type)==="string"&&(c[d]={type:D.ConfigurationSchemaType.BadgeTag,...c[d]});break;case"array":n.includes(d)?c[d]={type:D.ConfigurationSchemaType.BadgeMethod,...c[d]}:((_=m.elements)==null?void 0:_.type)==="string"?m.encrypted?c[d]={type:D.ConfigurationSchemaType.RedactedArray,...c[d]}:c[d]={type:D.ConfigurationSchemaType.BadgeTag,...c[d]}:((g=m.elements)==null?void 0:g.type)==="record"&&(c[d]={type:D.ConfigurationSchemaType.Json,...c[d]});break;case"record":c[d]={type:D.ConfigurationSchemaType.Json,...c[d]};break;default:c[d]={type:D.ConfigurationSchemaType.Text,...c[d]};break}},convertToDotNotation:c=>c.replace(/-/g,"."),unFlattenObject:c=>{const d={};for(const m in c){const k=m.split(".");k.reduce((_,g,A)=>_[g]||(_[g]=isNaN(k[A+1])?k.length-1===A?c[m]:{}:[]),d)}return d},dismissField:(c,d,m="redis",k=!1)=>{const _=new RegExp("(?<=-redis-).*");if(typeof c!="object"||c===null)return c;m==="redis"?Object.keys(c).forEach(g=>{g.match(_)&&delete c[g]}):k?c[m]=null:delete c[m],Object.assign(c,d)},isObjectEmpty:c=>Object.keys(c).length===0,unsetNullForeignKey:(c,d)=>{["service.id","route.id","consumer.id","consumer_group.id"].indexOf(c)>-1&&d[c]===null&&(delete d[c],d[c.replace(".id","")]=null)},formatPluginFieldLabel:c=>e(c.replace(/_/g," ")),getTallestPluginCardHeight:c=>{let d=0;if(c.length)for(let m=0;m<c.length;m++){const k=c[m].$el;d=k.offsetHeight>d?k.offsetHeight:d}return d},getToggleVisibility:(c,d)=>{var m,k;if(c&&d){const _=(k=(m=window==null?void 0:window.getComputedStyle(c))==null?void 0:m.getPropertyValue("grid-template-columns"))==null?void 0:k.split(" ").length;return d>_}return!0}}}var gn=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(gn||{});const Hr=[b.PluginGroup.AUTHENTICATION,b.PluginGroup.AI,b.PluginGroup.SECURITY,b.PluginGroup.TRAFFIC_CONTROL,b.PluginGroup.SERVERLESS,b.PluginGroup.ANALYTICS_AND_MONITORING,b.PluginGroup.TRANSFORMATIONS,b.PluginGroup.LOGGING,b.PluginGroup.DEPLOYMENT,b.PluginGroup.WEBSOCKET,b.PluginGroup.CUSTOM_PLUGINS],zr={[b.PluginGroup.AUTHENTICATION]:!1,[b.PluginGroup.AI]:!1,[b.PluginGroup.SECURITY]:!1,[b.PluginGroup.TRAFFIC_CONTROL]:!1,[b.PluginGroup.SERVERLESS]:!1,[b.PluginGroup.ANALYTICS_AND_MONITORING]:!1,[b.PluginGroup.TRANSFORMATIONS]:!1,[b.PluginGroup.LOGGING]:!1,[b.PluginGroup.DEPLOYMENT]:!1,[b.PluginGroup.CUSTOM_PLUGINS]:!1};var ct=(e=>(e.SERVICE="service_id",e.ROUTE="route_id",e.CONSUMER="consumer_id",e.CONSUMER_GROUP="consumer_group_id",e))(ct||{});const ut=e=>{const n=Object.fromEntries(e.fields.map(r=>Object.entries(r)[0]));return"id"in n||(n.id={}),n},dt={label:"Tags",name:"tags",type:"input",inputType:"text",valueType:"array",valueArrayType:"string",placeholder:"Enter list of tags",help:"An optional set of strings for grouping and filtering, separated by commas.",hint:"e.g. tag1, tag2, tag3"},St={getColumnFields:ut,tags:dt,id:{label:"ID"},enabled:{label:"Enabled",indexed:!0,type:"boolean"},created_at:{label:"Created"},updated_at:{label:"Last updated"},fields:{arrayItems(e){const n=e.inputAttributes||{};return delete e.inputAttributes,{type:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"kong-form-array-field",fieldItemsClasses:"kong-form-array-field-item",newElementButtonLabelClasses:"kong-form-new-element-button-label",inputAttributes:{class:"form-control",style:{minWidth:"200px"},...n},removeElementButtonLabel:"remove",styleClasses:"kong-form-field-wrapper",inputType:"text",valueType:"array",valueArrayType:"string",...e}}}},Wr={fields:[{group:{hint:"The arbitrary group name to associate to the consumer."}},{tags:dt}]},Qa={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{group:{required:!0,type:"string",hint:"The arbitrary group name to associate to the consumer."}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},Yr={fields:[{username:{}},{password:{inputType:"password"}},{tags:dt}]},Za={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{username:{required:!0,type:"string",unique:!0}},{password:{type:"string",required:!0,encrypted:!0}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},el={class:"field-wrapper"},tl=t.defineComponent({__name:"KeyAuthIdentityRealms",props:{disabled:{type:Boolean},formOptions:{},model:{},schema:{},vfg:{},errors:{},hint:{}},emits:["modelUpdated"],setup(e,{expose:n,emit:r}){const i=e,o=r,{clearValidationErrors:a,value:l}=ke.composables.useAbstractFields({model:t.toRef(()=>i.model),schema:i.schema,formOptions:i.formOptions,emitModelUpdated:P=>{o("modelUpdated",P.value,P.model)}}),{i18n:s}=Pe.useI18n(),{t:u}=s,f={value:"current-cp",label:u("custom_field.key_auth_identity_realms.cp_label"),group:u("custom_field.key_auth_identity_realms.cp_group_label")},p=t.inject(ke.FORMS_CONFIG),{axiosInstance:c}=D.useAxios(p==null?void 0:p.axiosRequestConfig),d=()=>{if((p==null?void 0:p.app)==="konnect"){const P=/\b(us|eu|au|me|in)\b/.exec((p==null?void 0:p.apiBaseUrl)||"");if(P)return{region:P[1]}}return{}},m=t.ref(!0),k=t.ref([f]),_=async()=>{if((p==null?void 0:p.app)==="konnect")try{m.value=!0;let P=`${p==null?void 0:p.apiBaseUrl}/v1/realms`;const O=[];do{const $=await c.get(P);$&&$.data&&$.data.data&&O.push(...$.data.data.map(U=>({value:U.id,label:U.name,group:u("custom_field.key_auth_identity_realms.realm_group_label")}))),P=$.data.meta.next?`${p==null?void 0:p.apiBaseUrl}${$.data.meta.next}`:null}while(P);k.value=[f,...O]}catch(P){console.error("Failed to fetch Konnect realms",P)}finally{m.value=!1}},g=t.computed(()=>l.value.map(P=>P.id||"current-cp")),A=P=>{const O=P.includes("current-cp")?[{scope:"cp",id:null}]:[],$=l.value.filter(({scope:S})=>S!=="cp").map(({id:S})=>S),U=P.filter(S=>S!=="current-cp"),y=($.length!==U.length||$.some(S=>!U.includes(S))?U.filter(S=>!$.includes(S)):U).map(S=>({...d(),scope:"realm",id:S}));l.value=[...O,...y]};return t.watch(l,()=>{l.value||(l.value=[{scope:"cp",id:null}])}),t.onMounted(()=>{_()}),n({clearValidationErrors:a}),(P,O)=>{const $=t.resolveComponent("KMultiselect");return t.openBlock(),t.createElementBlock("div",el,[t.createVNode($,{items:k.value,loading:m.value,"model-value":g.value,"onUpdate:modelValue":A},null,8,["items","loading","model-value"])])}}}),ue=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},nl=ue(tl,[["__scopeId","data-v-29b128ff"]]),Jr={fields:[{key:{submitWhenNull:!1,hint:`You can optionally set your own unique key to authenticate the
|
|
2
|
-
|
|
1
|
+
(function(te,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/entities-shared"),require("marked"),require("vue-router"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-plugins-metadata"),require("@kong-ui-public/forms"),require("@kong-ui-public/entities-vaults"),require("@kong-ui-public/entities-vaults/dist/style.css"),require("@kong/icons"),require("@kong/kongponents"),require("@kong-ui-public/entities-redis-configurations"),require("@kong-ui-public/entities-redis-configurations/dist/style.css"),require("@vueuse/core"),require("monaco-editor"),require("@kong-ui-public/entities-plugins-icon")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared","marked","vue-router","@kong-ui-public/i18n","@kong-ui-public/entities-plugins-metadata","@kong-ui-public/forms","@kong-ui-public/entities-vaults","@kong-ui-public/entities-vaults/dist/style.css","@kong/icons","@kong/kongponents","@kong-ui-public/entities-redis-configurations","@kong-ui-public/entities-redis-configurations/dist/style.css","@vueuse/core","monaco-editor","@kong-ui-public/entities-plugins-icon"],t):(te=typeof globalThis<"u"?globalThis:te||self,t(te["kong-ui-public-entities-plugins"]={},te.Vue,te["kong-ui-public-entities-shared"],te.marked,te.VueRouter,te["kong-ui-public-i18n"],te.entitiesPluginsMetadata,te.forms,te.entitiesVaults,null,te.KongIcons,te.Kongponents,te.entitiesRedisConfigurations,null,te.core$1,te.monaco,te.entitiesPluginsIcon))})(this,function(te,t,L,mn,Ut,Oe,C,ge,gn,yb,he,Ce,Mt,hb,at,sl,jt){"use strict";function cl(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const yn=cl(sl),Be={actions:{cancel:"Cancel",view_configuration:"View Configuration",create:"New plugin",create_custom:"Create",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",enable:"Enable",enabled:"Enabled",delete:"Delete",confirm_delete:"Yes, delete",view:"View Details",configure_dynamic_ordering:"Configure Dynamic Ordering",go_to_plugins:"Go to Plugins",save:"Save",add_entity:"Add {entity}",remove_entity:"Remove {entity}"},view_configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML, JSON, or Terraform. This allows for straightforward importing into APIOps tools like decK with YAML, Insomnia and cURL with JSON, or Terraform products with Terraform.",yaml:"YAML",terraform:"Terraform",json:"JSON"},delete:{title:"Delete a Plugin",custom_title:"Delete {name}",custom_plugin:"Custom Plugin",description:"This action cannot be reversed.",description_custom:"Please ensure this plugin is not in use. This action cannot be reversed.",plugin_schema_in_use_title:"Unable to Delete Custom Plugin",plugin_schema_in_use_message:"The custom plugin schema {name} is being used in this control plane, please delete any existing instances before you delete this schema.",confirmModalText1:"Are you sure you want to delete",confirmModalText2:"Please ensure this plugin is not in use. This delete action cannot be reversed.",confirm_text:"Type {name} to confirm your action",success_message:"Successfully deleted custom plugin {name}"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard",tooltip:"Copy {label}",success_tooltip:"Copied!"},errors:{general:"Plugins could not be retrieved",delete:"The plugin could not be deleted at this time.",copy:"Failed to copy to clipboard",load_results:"Error loading available plugins",load_schema:"Error loading plugin schema"},search:{placeholder:{konnect:"Filter by name",exact:"Filter by exact instance name or ID",kongManager:"Filter by exact instance name or ID",select:"Filter plugins"},filter:{field:{enabled:"Enabled"}},no_results:'No results found for "{filter}"'},plugins:{title:"Plugins",list:{toolbar_actions:{new_plugin:"New plugin"},table_headers:{applied_to:"Applied To",applied_to_badges:{consumer:"Consumer",global:"Global",route:"Route",service:"Service",consumer_group:"Consumer Group"},id:"ID",name:"Name",instance_name:"Instance Name",ordering:"Ordering",ordering_badge:{dynamic:"Dynamic",static:"Static"},enabled:"Enabled",tags:"Tags"},empty_state:{title:"Configure a New Plugin",description:"Plugins are used to extend Kong functionality."},empty_state_v2:{title:"Configure your first plugin",description:"Plugins extend gateways functionalities, offering features like authentication, rate limiting, and request transformations to enhance security and performance.",create_cta:"New plugin",group:"Plugins created in gateways within this group will automatically appear here."}},meta:{"basic-auth":{name:"Basic Authentication",credential_name:"Basic Auth Credential",description:"Add Basic Authentication to your Services"},"hmac-auth":{name:"HMAC Authentication",credential_name:"HMAC Credential",description:"Add HMAC Authentication to your Services"},"jwt-signer":{name:"JWT Signer",description:"Verify and (re-)sign one or two tokens in a request"},jwt:{name:"JWT",credential_name:"JWT Credential",description:"Verify and authenticate JSON Web Tokens"},"key-auth":{name:"Key Authentication",credential_name:"Key Auth Credential",description:"Add key authentication to your Services"},"key-auth-enc":{name:"Key Authentication Encrypted",credential_name:"Key Auth Encrypted",description:"Add key authentication to your Services with an encrypted token"},"ldap-auth-advanced":{name:"LDAP Authentication Advanced",description:"Integrate Kong with a LDAP server"},"ldap-auth":{name:"LDAP Authentication",description:"Integrate Kong with a LDAP server"},"oauth2-introspection":{name:"OAuth 2.0 Introspection",description:"Integrate Kong with a third-party OAuth 2.0 Authorization Server"},oauth2:{name:"OAuth 2.0 Authentication",credential_name:"OAuth 2.0 Application",description:"Add OAuth 2.0 authentication to your Services"},"openid-connect":{name:"OpenID Connect",description:"Integrate Kong with a third-party OpenID Connect 1.0 Provider"},"mtls-auth":{name:"Mutual TLS Authentication",description:"Secure routes and services with client certificate and mutual TLS authentication"},"vault-auth":{name:"Vault Authentication",description:"Secure routes and services with an access token and secret token, stored securely via Vault"},"bot-detection":{name:"Bot Detection",description:"Detect and clock bots or custom clients"},cors:{name:"CORS",description:"Allow developers to make requests from the browser"},"ip-restriction":{name:"IP Restriction",description:"Whitelist or blacklist IPs that can make requests"},opa:{name:"OPA",description:"Authorize requests against Open Policy Agent"},"kubernetes-sidecar-injector":{name:"Kubernetes Sidecar Injector",description:"This plugin will inject Kong dataplane nodes and form a service mesh on top of Kubernetes"},"request-validator":{name:"Request Validator",description:"Validate requests before they reach their upstream Service. "},acl:{name:"ACL",credential_name:"Access Control Group",description:"Control which consumers can access Services"},canary:{name:"Canary Release",description:"Methodically roll out software changes to a subset of users"},"forward-proxy":{name:"Forward Proxy",description:"Allow Kong to connect to intermediary transparent HTTP proxies"},"proxy-cache":{name:"Proxy Caching",description:"Cache and serve commonly requested responses in Kong"},"proxy-cache-advanced":{name:"Proxy Caching Advanced",description:"Cache and serve commonly requested responses in Kong"},"graphql-proxy-cache-advanced":{name:"GraphQL Proxy Caching Advanced",description:"Cache and serve commonly requested responses in Kong"},"rate-limiting-advanced":{name:"Rate Limiting Advanced",description:"Rate-limit how many HTTP requests a developer can make"},"rate-limiting":{name:"Rate Limiting",description:"Rate-limit how many HTTP requests a developer can make"},"graphql-rate-limiting-advanced":{name:"GraphQL Rate Limiting Advanced",description:"Rate-limit how many HTTP requests a developer can make"},mocking:{name:"Mocking",description:"Provide mock endpoints to test your APIs in development against your services"},"request-size-limiting":{name:"Request Size Limiting",description:"Block requests with bodies greater than a specific size"},"request-termination":{name:"Request Termination",description:"Terminate all requests with a specific response"},"response-ratelimiting":{name:"Response Rate Limiting",description:"Rate-Limiting based on a custom response header value"},"route-by-header":{name:"Route by Header",description:"Route requests based on request headers"},"ai-proxy":{name:"AI Proxy",description:"Directly call a configured LLM, with mediated security and tuning parameters, and using standardised Kong request and response formats."},"ai-prompt-decorator":{name:"AI Prompt Decorator",description:"Prepend and append chat prompts to AI Proxy plugin LLM requests."},"ai-prompt-template":{name:"AI Prompt Template",description:"Define a set of templates, containing string variable placeholders, that can be consumed by users when used with the AI Proxy plugin."},"ai-prompt-guard":{name:"AI Prompt Guard",description:"Define a set of valid, and a set of invalid, regular expression patterns when calling LLM models with the AI Proxy plugin."},"ai-request-transformer":{name:"AI Request Transformer",description:"Use an LLM to transform API request from a user, before sending to the upstream service."},"ai-response-transformer":{name:"AI Response Transformer",description:"Use an LLM to transform API responses from the upstream service, before returning to the user."},"ai-rate-limiting-advanced":{name:"AI Rate Limiting Advanced",description:"Provides rate limiting for the providers used by any AI plugins."},"ai-azure-content-safety":{name:"AI Azure Content Safety",description:"Allows checking and auditing of AI-Proxy plugin messages, using Azure Cognitive Services, before proxying to upstream large-language model."},"aws-lambda":{name:"AWS Lambda",description:"Invoke and manage AWS Lambda functions from Kong"},"azure-functions":{name:"Azure Functions",description:"Invoke Azure functions"},openwhisk:{name:"OpenWhisk",description:"Invoke and manage OpenWhisk actions from Kong"},"pre-function":{name:"Kong Functions (Pre-Plugins)",description:"Add and manage custom lua functions to run before other plugins"},"post-function":{name:"Kong Functions (Post-Plugins)",description:"Add and manage custom lua functions to run after other plugins"},datadog:{name:"Datadog",description:"Visualize metrics on Datadog"},prometheus:{name:"Prometheus",description:"Export performance metrics to Prometheus"},zipkin:{name:"Zipkin",description:"Propagate zipkin spans and report spans to a zipkin server"},collector:{name:"Collector",description:"Automate spec-driven development & anomaly detection (Early Access)"},"response-transformer-advanced":{name:"Response Transformer Advanced",description:"Transform the response sent by the upstream server on the fly on Kong, before returning the response to the client."},"correlation-id":{name:"Correlation ID",description:"Correlate requests and responses using a unique ID"},"request-transformer-advanced":{name:"Request Transformer Advanced",description:"Use powerful regular expressions, variables and templates to transform API requests"},"request-transformer":{name:"Request Transformer",description:"Modify the request before hitting the upstream server"},"response-transformer":{name:"Response Transformer",description:"Modify the upstream response before returning it to the client"},"route-transformer-advanced":{name:"Route Transformer Advanced",description:"Transforms the routing on the fly in Kong, changing the upstream server/port/path to hit"},"kafka-upstream":{name:"Kafka Upstream",description:"Transform requests into Kafka messages in a topic"},degraphql:{name:"DeGraphQL",description:"Transform a GraphQL upstream into a REST API"},"exit-transformer":{name:"Exit Transformer",description:"Customize Kong exit responses sent downstream"},jq:{name:"jq",description:"Transform JSON objects included in API requests or responses using jq programs"},"file-log":{name:"File Log",description:"Append request and response data to a log file on disk"},"http-log":{name:"HTTP Log",description:"Send request and response logs to an HTTP server"},loggly:{name:"Loggly",description:"Send request and response logs to Loggly"},"statsd-advanced":{name:"StatsD Advanced",description:"Send traffic and Kong performance metrics to StatsD"},statsd:{name:"StatsD",description:"Send request and response logs to StatsD"},syslog:{name:"Syslog",description:"Send request and response logs to Syslog"},"tcp-log":{name:"TCP Log",description:"Send request and response logs to a TCP server"},"udp-log":{name:"UDP Log",description:"Send request and response logs to a UDP server"},"kafka-log":{name:"Kafka Log",description:"Publish request and response logs to a Kafka topic"},session:{name:"Session",description:"Sessions for Kong authentication"},"upstream-tls":{name:"Upstream TLS",description:"Enable TLS on upstream traffic by providing Kong with a list of trusted certificates."},"application-registration":{name:"Portal Application Registration",description:"Allow portal developers to register applications against services"},"konnect-application-auth":{name:"Konnect Application Auth",description:"Allow Konnect portal developers to register applications against services"},acme:{name:"ACME",description:"Let's Encrypt and ACMEv2 integration with Kong"},"grpc-gateway":{name:"gRPC Gateway",description:"Access gRPC services through HTTP REST"},"grpc-web":{name:"gRPC Web",description:"Allow browser clients to call gRPC services"},"upstream-timeout":{name:"Upstream Timeout",description:"Configure read, send and connect timeouts to an upstream"},opentelemetry:{name:"OpenTelemetry",description:"Propagate distributed tracing spans and report low-level spans to a OTLP-compatible server"},"websocket-validator":{name:"WebSocket Validator",description:"Validate individual WebSocket messages against to a user-specified schema before proxying them"},"websocket-size-limit":{name:"WebSocket Size Limit",description:"Allows operators to specify a maximum size for incoming WebSocket messages"},"tls-metadata-headers":{name:"TLS Metadata Headers",description:"Detects client certificates in requests, retrieves the TLS metadata, and proxies this metadata via HTTP headers"},"tls-handshake-modifier":{name:"TLS Handshake Modifier",description:"Requests the client certificate and if it exists, makes it available to other plugins acting on the request"},"oas-validation":{name:"OAS Validation",description:"Validate HTTP requests and responses based on an API Specification."},"jwe-decrypt":{name:"Kong JWE Decrypt",description:"The Kong JWE Decrypt plugin makes it possible to decrypt an inbound token(JWE) in a request."},"xml-threat-protection":{name:"XML Threat Protection",description:"Reduce the risk of XML attacks by checking the structure of XML payloads."},saml:{name:"SAML",description:"Security Assertion Markup Language (SAML) is an open standard for exchanging authentication and authorization data between an identity provider and a service provider."},"app-dynamics":{name:"AppDynamics",description:"This plugin integrates Kong with the AppDynamics APM platform so that proxy requests handled by Kong can be identified and analyzed in AppDynamics."},"json-threat-protection":{name:"JSON Threat Protection",description:"Apply size checks on JSON payload and minimize risk of content-level attacks"},"standard-webhooks":{name:"Standard Webhooks",description:"Validate incoming webhooks adhere to the Standard Webhooks specification, to which Kong is a contributor"},"ai-proxy-advanced":{name:"AI Proxy Advanced",description:"Route across different LLMs and models using advanced load balancing algorithms, including semantic routing."},"ai-semantic-cache":{name:"AI Semantic Cache",description:"Semantically cache AI requests to any LLM to reduce latency, improve end-user experiences and optimize GenAI costs."},"ai-semantic-prompt-guard":{name:"AI Semantic Prompt Guard",description:"Semantically and intelligently create allow and deny lists of topics that can be requested across every LLM."},"header-cert-auth":{name:"Header Certificate Authentication",description:"Authenticate clients with MTLS certificate passed in header by a WAF or load balancer"},"upstream-oauth":{name:"Upstream OAuth",description:"Configure Kong to obtain a OAuth2 token to consume an upstream API"},confluent:{name:"Confluent",description:"Streamlines integration with Confluent Cloud and transforms requests into messages published to a Confluent topic."},"service-protection":{name:"Service Protection",description:"Prevent abuse and protect services with absolute limits on the number of requests reaching the service."},"injection-protection":{name:"Injection Protection",description:"Protect against injection attacks by rejecting requests that match common injections patterns."},redirect:{name:"Redirect",description:"Redirect incoming requests to a new URL"},"kafka-consume":{name:"Kafka Consume",description:"Consume messages from Kafka topics over HTTP protocols."},"confluent-consume":{name:"Confluent Consume",description:"Consume messages from Confluent Kafka topics over HTTP protocols"},"request-callout":{name:"Request Callout",description:"Callout to third party APIs as part of request processing."},"ai-sanitizer":{name:"AI Sanitizer",description:"Sanitize personal or sensitive information from prompts before sending to LLM."},"ai-rag-injector":{name:"AI RAG Injector",description:"Attach contextual knowledge from vector databases with flexible template to LLM prompts."},datakit:{name:"Datakit",description:"Datakit is a workflow engine for working with external APIs."},"ai-prompt-compressor":{name:"AI Prompt Compressor",description:"The AI Prompt Compressor reduces costs associated with LLMs by compressing prompts."},"solace-upstream":{name:"Solace Upstream",description:"Transform requests into Solace messages in a Solace queue or topic."},"ai-aws-guardrails":{name:"AI AWS GuardRails",description:"The AI AWS GuardRails enables enforcement of introspection with the AWS GuardRails service for all requests processed by the AI Proxy plugin."}},fields:{service:"Service ID",route:"Route ID",consumer:"Consumer ID",consumer_group:"Consumer Group ID"},select:{custom_badge_text:"This plugin is data plane node specific",unavailable_tooltip:"This plugin is not available",already_exists:"This plugin is already applied to this resource",misc_plugins:"Other Plugins",view_more:"View more",view_less:"View less",tabs:{kong:{title:"Kong Plugins",description:"Kong plugins are bundled by default with Kong Gateway and are available across all control planes.",empty_title:"No Plugins",empty_description:"No plugins are available."},custom:{title:"Custom Plugins",description:"Custom plugins will be available in this control plane only.",disabled_tooltip:"Custom Plugins are not available with this Gateway. Create a Hybrid or Dedicated Cloud Gateway to leverage Custom Plugins.",empty_title:"No Custom Plugins",empty_description:"No custom plugins have been added to this Control Plane.",create:{name:"Custom Plugin",description:"Upload schema file to create custom plugin"}}},highlighted_plugins:{title:"Highlighted Plugins"}},form:{no_selection:"No selection...",fields:{enabled:{label:"Enabled",on_text:"This plugin is Enabled",off_text:"This plugin is Disabled"},instance_name:{label:"Instance Name",help:"A custom name for this plugin instance to help identifying from the list view."},protocols:{label:"Protocols",placeholder:"Select valid protocols for the plugin",placeholderWithDefaultValues:"Select valid protocols for the plugin. Default protocols: {protocols}",help:"A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type."},tags:{help:"An optional set of strings for grouping and filtering, separated by commas.",placeholder:"Enter list of tags"}},scoping:{label:"Scoped",global:{label:"Global",help:"All services, routes, and consumers"},gateway_service:{label:"Gateway Service",help:"The Gateway Service to which this plugin configuration will apply",placeholder:"Select a Gateway Service",plural:"Gateway Services"},route:{label:"Route",help:"The Route that this Plugin configuration will target",placeholder:"Select a Route",plural:"Routes"},consumer:{label:"Consumer",help:"The Consumer that this plugin configuration will target",placeholder:"Select a Consumer",plural:"Consumers"},consumer_group:{label:"Consumer Group",help:"The Consumer Group that this plugin configuration will target",placeholder:"Select a Consumer Group",plural:"Consumer Groups"}},grouping:{plugin_configuration:{title:"Plugin Configuration",description:"Configuration parameters for this plugin. View advanced parameters for extended configuration.",empty:"This plugin does not have required parameters."},advanced_parameters:{view:"View Advanced Parameters",hide:"Hide Advanced Parameters"}},field_rules:{at_least_one_of:"At least one of these parameters is required: {parameters}",only_one_of:"Exactly one of these parameters is required: {parameters}",mutually_required:"All of these parameters are required: {parameters}",only_one_of_mutually_required:"Exactly one of the following parameter combinations is required (all parameters within a chosen combination are required):"},sections:{general_info:{title:"General information",description:"Add details to help identify and manage your plugin."},plugin_config:{title:"Plugin configuration",description:"Configure parameters for this plugin by using a form or a YAML file."}}},"free-form":{"request-callout":{entity_name:"Request Callout",by_lua_placeholder:"Enter Lua script here..."},redis_partial:{redis_partial_modal_title:"New shared configuration",partial_created_success_message:"Successfully created a new Redis configuration."},datakit:{description_code:"Configure this plugin by using YAML configuration. If you are copy/pasting in examples from the documentation - paste from below the <code>config</code> block.",description_visual:"Configure this plugin by using the visual editor.",description_example:"Start with a use case:",examples:{authenticate:"Authenticate Kong to a third-party service",combine:"Combine multiple API responses",manipulate:"Manipulate request headers"},visual_editor:{mode:"Visual Editor",name:"Datakit Visual Editor",cta:"Go to visual editor",save:"Save",view_docs:"View Docs",expand_panel:"Expand panel",collapse_panel:"Collapse panel",return_to_config:"Return to Plugin configuration",node_panel:{title:"Node types",description:"Drag a node onto the canvas to add it to your data flow."},node_description:{call:"Call a third-party API",jq:"Transform data and cast variables with jq",exit:"Return a response directly to the client",property:"Get and set Kong Gateway configuration data",static:"Define static values to use for call nodes"}},code_editor:{mode:"Code Editor"}},vault_picker:{component_error:"The vault secret picker is not available"}}},redis:{title:"Redis Configuration",shared_configuration:{label:"Use shared configuration",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins.",title:"Shared Redis Configuration",error:"Fetching shared Redis configurations failed.",tooltip:"Only compatible {type} redis configurations will be listed here.",configuration_selector_label:"Select stored Redis configuration",configuration_selector_placeholder:"Pick Redis configuration",create_new_configuration:"New {type} shared configuration",open_source:"open source",enterprise:"enterprise",empty_state:"No shared configurations",badge:"Recommended",selector:{title:"Select a Redis configuration",placeholder:"Filter Configurations",description:"Select an existing shared Redis configuration or create a new one. Any updates to this configuration will automatically apply to all associated plugins."},type_label:{host_port:"Host/Port",sentinel:"Sentinel",cluster:"Cluster"}},dedicated_configuration:{label:"Use dedicated configuration",description:"Create a Redis configuration exclusively for this plugin, with settings that won’t impact other plugins.",title:"Connection Settings"},config_card:{common_fields:{created_at_label:"Created at",updated_at_label:"Last Updated at",type_label:"Redis Type"}},custom_plugin:{alert:"Note: For custom plugins, we cannot determine the correct Redis configuration type. Please ensure you select the appropriate option manually.",tooltip:"To apply a shared redis configuration, the redis fields must defined as Kong plugins in plugin schema."}},glossary:{plugin:"plugin"},custom_field:{key_auth_identity_realms:{cp_label:"Current Control Plane",cp_group_label:"Control Plane",realm_group_label:"Realms (Can only select one)"}},sp:{window_type:{label:"Rate Limit Window Type",help:"Sets the time window type to either <code>sliding</code> (default) or <code>fixed</code>.<br><ul><li>Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight.</li><li>Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.</li></ul>",options:{fixed:"Fixed",sliding:"Sliding"}},request_limits:{title:"Request Limits",subtitle:"Set one or more limits on the number of API requests allowed within a defined timeframe.",label:"Limit",label_index:"Limit {index}",request_number:"Request number",time_interval:"Time interval",interval_determiner:"Every",seconds:"Seconds"},error_message:{label:"Error Message",code_placeholder:"Code Message",message_placeholder:"Error Message",help:"Set a custom error code and message to be returned when the rate limit is exceeded."},start_with_a_use_case:"Start with a use case:",use_cases:{fixed:{hourly_500:{label:"500 requests every hour",description:"A fixed limit of 500 requests per hour resetting sharply on the hour, ensuring no user can exceed this limit."},half_hourly_200:{label:"200 requests every 30 minutes",description:"Users are allowed 200 requests per 30 minutes, resetting exactly on the 30 minute mark with no carryover of unused limits."},daily_500:{label:"500 requests every day",description:"A strict limit of 5000 requests per day resetting promptly at midnight, preventing any burst traffic or inconsistent user experiences."}},sliding:{hourly_100:{label:"100 requests every hour",description:"Maximum of 100 requests every rolling hour, continuously adjusting the count over the course of the hour. No hard limit or known reset."},half_hourly_300:{label:"300 requests every 30 minutes",description:"Each user can make up to 300 requests in any rolling 30 minute period, with older requests dropping off as new requests are made."},hourly_500:{label:"500 requests every hour",description:`Each user is allowed 500 requests per hour.
|
|
2
|
+
If the limit is exceeded and the user receives a 429 error, each additional request within the sliding window (hour)
|
|
3
|
+
will extend the wait time by about 12 minutes, continuously adjusting as new requests are made.`}}}}};function lt(){const e=Oe.createI18n("en-us",Be);return{i18n:e,i18nT:Oe.i18nTComponent(e)}}function Xr(){const{capitalize:e}=L.useStringHelpers(),n=["methods","logout_methods"];return{setFieldType:(c,u,m)=>{var _,b,g;if(!(!c||!u||!m))switch(m.type){case"boolean":c[u]={type:L.ConfigurationSchemaType.BadgeStatus,...c[u]};break;case"string":m.encrypted?c[u]={type:L.ConfigurationSchemaType.Redacted,...c[u]}:c[u]={type:L.ConfigurationSchemaType.Text,...c[u]};break;case"set":((_=m.elements)==null?void 0:_.type)==="string"&&(c[u]={type:L.ConfigurationSchemaType.BadgeTag,...c[u]});break;case"array":n.includes(u)?c[u]={type:L.ConfigurationSchemaType.BadgeMethod,...c[u]}:((b=m.elements)==null?void 0:b.type)==="string"?m.encrypted?c[u]={type:L.ConfigurationSchemaType.RedactedArray,...c[u]}:c[u]={type:L.ConfigurationSchemaType.BadgeTag,...c[u]}:((g=m.elements)==null?void 0:g.type)==="record"&&(c[u]={type:L.ConfigurationSchemaType.Json,...c[u]});break;case"record":c[u]={type:L.ConfigurationSchemaType.Json,...c[u]};break;default:c[u]={type:L.ConfigurationSchemaType.Text,...c[u]};break}},convertToDotNotation:c=>c.replace(/-/g,"."),unFlattenObject:c=>{const u={};for(const m in c){const _=m.split(".");_.reduce((b,g,h)=>b[g]||(b[g]=isNaN(_[h+1])?_.length-1===h?c[m]:{}:[]),u)}return u},dismissField:(c,u,m="redis",_=!1)=>{const b=new RegExp("(?<=-redis-).*");if(typeof c!="object"||c===null)return c;m==="redis"?Object.keys(c).forEach(g=>{g.match(b)&&delete c[g]}):_?c[m]=null:delete c[m],Object.assign(c,u)},isObjectEmpty:c=>Object.keys(c).length===0,unsetNullForeignKey:(c,u)=>{["service.id","route.id","consumer.id","consumer_group.id"].indexOf(c)>-1&&u[c]===null&&(delete u[c],u[c.replace(".id","")]=null)},formatPluginFieldLabel:c=>e(c.replace(/_/g," ")),getTallestPluginCardHeight:c=>{let u=0;if(c.length)for(let m=0;m<c.length;m++){const _=c[m].$el;u=_.offsetHeight>u?_.offsetHeight:u}return u},getToggleVisibility:(c,u)=>{var m,_;if(c&&u){const b=(_=(m=window==null?void 0:window.getComputedStyle(c))==null?void 0:m.getPropertyValue("grid-template-columns"))==null?void 0:_.split(" ").length;return u>b}return!0}}}var hn=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(hn||{});const Qr=[C.PluginGroup.AUTHENTICATION,C.PluginGroup.AI,C.PluginGroup.SECURITY,C.PluginGroup.TRAFFIC_CONTROL,C.PluginGroup.SERVERLESS,C.PluginGroup.ANALYTICS_AND_MONITORING,C.PluginGroup.TRANSFORMATIONS,C.PluginGroup.LOGGING,C.PluginGroup.DEPLOYMENT,C.PluginGroup.WEBSOCKET,C.PluginGroup.CUSTOM_PLUGINS],Zr={[C.PluginGroup.AUTHENTICATION]:!1,[C.PluginGroup.AI]:!1,[C.PluginGroup.SECURITY]:!1,[C.PluginGroup.TRAFFIC_CONTROL]:!1,[C.PluginGroup.SERVERLESS]:!1,[C.PluginGroup.ANALYTICS_AND_MONITORING]:!1,[C.PluginGroup.TRANSFORMATIONS]:!1,[C.PluginGroup.LOGGING]:!1,[C.PluginGroup.DEPLOYMENT]:!1,[C.PluginGroup.CUSTOM_PLUGINS]:!1};var ut=(e=>(e.SERVICE="service_id",e.ROUTE="route_id",e.CONSUMER="consumer_id",e.CONSUMER_GROUP="consumer_group_id",e))(ut||{});const pt=e=>{const n=Object.fromEntries(e.fields.map(r=>Object.entries(r)[0]));return"id"in n||(n.id={}),n},ft={label:"Tags",name:"tags",type:"input",inputType:"text",valueType:"array",valueArrayType:"string",placeholder:"Enter list of tags",help:"An optional set of strings for grouping and filtering, separated by commas.",hint:"e.g. tag1, tag2, tag3"},Pt={getColumnFields:pt,tags:ft,id:{label:"ID"},enabled:{label:"Enabled",indexed:!0,type:"boolean"},created_at:{label:"Created"},updated_at:{label:"Last updated"},fields:{arrayItems(e){const n=e.inputAttributes||{};return delete e.inputAttributes,{type:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"kong-form-array-field",fieldItemsClasses:"kong-form-array-field-item",newElementButtonLabelClasses:"kong-form-new-element-button-label",inputAttributes:{class:"form-control",style:{minWidth:"200px"},...n},removeElementButtonLabel:"remove",styleClasses:"kong-form-field-wrapper",inputType:"text",valueType:"array",valueArrayType:"string",...e}}}},ei={fields:[{group:{hint:"The arbitrary group name to associate to the consumer."}},{tags:ft}]},dl={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{group:{required:!0,type:"string",hint:"The arbitrary group name to associate to the consumer."}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},ti={fields:[{username:{}},{password:{inputType:"password"}},{tags:ft}]},ul={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{username:{required:!0,type:"string",unique:!0}},{password:{type:"string",required:!0,encrypted:!0}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},pl={class:"field-wrapper"},fl=t.defineComponent({__name:"KeyAuthIdentityRealms",props:{disabled:{type:Boolean},formOptions:{},model:{},schema:{},vfg:{},errors:{},hint:{}},emits:["modelUpdated"],setup(e,{expose:n,emit:r}){const i=e,o=r,{clearValidationErrors:a,value:l}=ge.composables.useAbstractFields({model:t.toRef(()=>i.model),schema:i.schema,formOptions:i.formOptions,emitModelUpdated:k=>{o("modelUpdated",k.value,k.model)}}),{i18n:s}=Se.useI18n(),{t:d}=s,f={value:"current-cp",label:d("custom_field.key_auth_identity_realms.cp_label"),group:d("custom_field.key_auth_identity_realms.cp_group_label")},p=t.inject(ge.FORMS_CONFIG),{axiosInstance:c}=L.useAxios(p==null?void 0:p.axiosRequestConfig),u=()=>{if((p==null?void 0:p.app)==="konnect"){const k=/\b(us|eu|au|me|in)\b/.exec((p==null?void 0:p.apiBaseUrl)||"");if(k)return{region:k[1]}}return{}},m=t.ref(!0),_=t.ref([f]),b=async()=>{if((p==null?void 0:p.app)==="konnect")try{m.value=!0;let k=`${p==null?void 0:p.apiBaseUrl}/v1/realms`;const P=[];do{const R=await c.get(k);R&&R.data&&R.data.data&&P.push(...R.data.data.map(I=>({value:I.id,label:I.name,group:d("custom_field.key_auth_identity_realms.realm_group_label")}))),k=R.data.meta.next?`${p==null?void 0:p.apiBaseUrl}${R.data.meta.next}`:null}while(k);_.value=[f,...P]}catch(k){console.error("Failed to fetch Konnect realms",k)}finally{m.value=!1}},g=t.computed(()=>l.value.map(k=>k.id||"current-cp")),h=k=>{const P=k.includes("current-cp")?[{scope:"cp",id:null}]:[],R=l.value.filter(({scope:S})=>S!=="cp").map(({id:S})=>S),I=k.filter(S=>S!=="current-cp"),A=(R.length!==I.length||R.some(S=>!I.includes(S))?I.filter(S=>!R.includes(S)):I).map(S=>({...u(),scope:"realm",id:S}));l.value=[...P,...A]};return t.watch(l,()=>{l.value||(l.value=[{scope:"cp",id:null}])}),t.onMounted(()=>{b()}),n({clearValidationErrors:a}),(k,P)=>{const R=t.resolveComponent("KMultiselect");return t.openBlock(),t.createElementBlock("div",pl,[t.createVNode(R,{items:_.value,loading:m.value,"model-value":g.value,"onUpdate:modelValue":h},null,8,["items","loading","model-value"])])}}}),se=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},ml=se(fl,[["__scopeId","data-v-29b128ff"]]),ni={fields:[{key:{submitWhenNull:!1,hint:`You can optionally set your own unique key to authenticate the
|
|
4
|
+
client. If missing, it will be generated for you.`}},{tags:ft}]},gl=e=>{var n;return(e==null?void 0:e.app)==="kongManager"?{fieldsToDelete:["config-identity_realms"]}:{"config-identity_realms":{component:((n=e==null?void 0:e.experimentalRenders)==null?void 0:n.keyAuthIdentityRealms)??!1?t.markRaw(ml):null}}},yl={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{key:{auto:!0,hint:"If left empty, a key will be generated after saving this form.",required:!1,type:"string",unique:!0}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},ri={fields:[{username:{hint:"The username to use in the HMAC Signature verification."}},{secret:{inputType:"text",submitWhenNull:!1,hint:`The secret to use in the HMAC Signature verification. Note that
|
|
3
5
|
if this parameter isn’t provided, Kong will generate a value for you and
|
|
4
|
-
send it as part of the response body.`}},{tags:
|
|
6
|
+
send it as part of the response body.`}},{tags:ft}]},hl={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{username:{required:!0,type:"string",unique:!0,hint:"The username to use in the HMAC Signature verification."}},{secret:{auto:!0,type:"string",hint:"The secret to use in the HMAC Signature verification. Note that if this parameter isn’t provided, Kong will generate a value for you and send it as part of the response body."}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},_l={fields:[{key:{submitWhenNull:!1,hint:`A unique string identifying the credential. If left out, it will
|
|
5
7
|
be auto-generated.`}},{algorithm:{order:1,hint:"The algorithm used to verify the token’s signature."}},{rsa_public_key:{order:2,type:"textArea",label:"RSA public-key",hint:`If algorithm is RSA or ECDSA, the public key (in PEM format) to
|
|
6
8
|
use to verify the token’s signature.`,rows:10,visible:e=>e&&e.algorithm&&/^((RS|PS|ES)(256|384|512)|EdDSA)$/.test(e.algorithm)}},{secret:{inputType:"text",hint:`If algorithm is HMAC, the secret used to sign JWTs for
|
|
7
|
-
this credential. If left out, will be auto-generated.`}},{tags:
|
|
9
|
+
this credential. If left out, will be auto-generated.`}},{tags:ft}]},bl={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{key:{auto:!0,hint:"A unique string identifying the credential. If left out, it will be auto-generated.",required:!1,type:"string",unique:!0}},{secret:{auto:!0,hint:"If algorithm is HS256 or ES256, the secret used to sign JWTs for this credential. If left out, will be auto-generated.",type:"string"}},{rsa_public_key:{type:"string"}},{algorithm:{default:"HS256",type:"string",one_of:["HS256","HS384","HS512","RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512","EdDSA"]}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},ii={fields:[{name:{}},{client_id:{submitWhenNull:!1,hint:`You can optionally set your own unique client_id. If missing, it
|
|
8
10
|
will be generated for you.`,inputType:"text",encrypted:!0}},{client_secret:{submitWhenNull:!1,hint:`You can optionally set your own unique client_secret. If missing,
|
|
9
|
-
it will be generated for you.`,inputType:"password",encrypted:!0}},{redirect_uris:
|
|
10
|
-
authorization (RFC 6742 Section 3.1.2)`,newElementButtonLabel:"+ Add Redirect URI",inputAttributes:{placeholder:"Enter URI"}})},{tags:
|
|
11
|
-
client. If missing, it will be generated for you.`,inputType:"password",encrypted:!0}},{tags:dt}]},cl={fields:[{id:{type:"string",auto:!0,uuid:!0,description:"A string representing a UUID (universally unique identifier)."}},{created_at:{type:"integer",auto:!0,timestamp:!0,description:"An integer representing an automatic Unix timestamp in seconds."}},{consumer:{required:!0,on_delete:"cascade",reference:"consumers",type:"foreign"}},{key:{required:!1,unique:!0,auto:!0,encrypted:!0,type:"string"}},{tags:{type:"set",elements:{type:"string",required:!0,description:"A string representing a tag."},description:"A set of strings representing tags."}}]},Xe={"basic-auth":{descriptionKey:"plugins.meta.basic-auth.description",isEnterprise:!1,nameKey:"plugins.meta.basic-auth.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["basic-auth"]},"hmac-auth":{descriptionKey:"plugins.meta.hmac-auth.description",isEnterprise:!1,nameKey:"plugins.meta.hmac-auth.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["hmac-auth"]},"jwt-signer":{descriptionKey:"plugins.meta.jwt-signer.description",isEnterprise:!0,nameKey:"plugins.meta.jwt-signer.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["jwt-signer"]},jwt:{descriptionKey:"plugins.meta.jwt.description",isEnterprise:!1,nameKey:"plugins.meta.jwt.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.jwt},"key-auth":{descriptionKey:"plugins.meta.key-auth.description",isEnterprise:!1,nameKey:"plugins.meta.key-auth.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["key-auth"]},"key-auth-enc":{descriptionKey:"plugins.meta.key-auth-enc.description",isEnterprise:!1,nameKey:"plugins.meta.key-auth-enc.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["key-auth-enc"]},"ldap-auth-advanced":{descriptionKey:"plugins.meta.ldap-auth-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.ldap-auth-advanced.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["ldap-auth-advanced"]},"ldap-auth":{descriptionKey:"plugins.meta.ldap-auth.description",isEnterprise:!1,nameKey:"plugins.meta.ldap-auth.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["ldap-auth"]},"oauth2-introspection":{descriptionKey:"plugins.meta.oauth2-introspection.description",isEnterprise:!0,nameKey:"plugins.meta.oauth2-introspection.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["oauth2-introspection"]},oauth2:{descriptionKey:"plugins.meta.oauth2.description",isEnterprise:!1,nameKey:"plugins.meta.oauth2.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.oauth2},"openid-connect":{descriptionKey:"plugins.meta.openid-connect.description",isEnterprise:!0,nameKey:"plugins.meta.openid-connect.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["openid-connect"]},"mtls-auth":{descriptionKey:"plugins.meta.mtls-auth.description",isEnterprise:!0,nameKey:"plugins.meta.mtls-auth.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["mtls-auth"]},"vault-auth":{descriptionKey:"plugins.meta.vault-auth.description",isEnterprise:!0,nameKey:"plugins.meta.vault-auth.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["vault-auth"]},"bot-detection":{descriptionKey:"plugins.meta.bot-detection.description",isEnterprise:!1,nameKey:"plugins.meta.bot-detection.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["bot-detection"]},cors:{descriptionKey:"plugins.meta.cors.description",isEnterprise:!1,nameKey:"plugins.meta.cors.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.cors},"ip-restriction":{descriptionKey:"plugins.meta.ip-restriction.description",isEnterprise:!1,nameKey:"plugins.meta.ip-restriction.name",fieldRules:{atLeastOneOf:[["config.allow","config.deny"]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP["ip-restriction"]},opa:{descriptionKey:"plugins.meta.opa.description",isEnterprise:!0,nameKey:"plugins.meta.opa.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.opa},"kubernetes-sidecar-injector":{descriptionKey:"plugins.meta.kubernetes-sidecar-injector.description",isEnterprise:!1,nameKey:"plugins.meta.kubernetes-sidecar-injector.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["kubernetes-sidecar-injector"]},"request-validator":{descriptionKey:"plugins.meta.request-validator.description",isEnterprise:!0,nameKey:"plugins.meta.request-validator.name",fieldRules:{atLeastOneOf:[["config.body_schema","config.parameter_schema"]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP["request-validator"]},acl:{descriptionKey:"plugins.meta.acl.description",isEnterprise:!1,nameKey:"plugins.meta.acl.name",fieldRules:{onlyOneOf:[["config.allow","config.deny"]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP.acl},canary:{descriptionKey:"plugins.meta.canary.description",isEnterprise:!0,nameKey:"plugins.meta.canary.name",fieldRules:{atLeastOneOf:[["config.upstream_uri","config.upstream_host","config.upstream_port"]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP.canary},"forward-proxy":{descriptionKey:"plugins.meta.forward-proxy.description",isEnterprise:!0,nameKey:"plugins.meta.forward-proxy.name",fieldRules:{onlyOneOfMutuallyRequired:[[["config.http_proxy_host","config.http_proxy_port"],["config.https_proxy_host","config.https_proxy_port"]]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP["forward-proxy"]},"proxy-cache":{descriptionKey:"plugins.meta.proxy-cache.description",isEnterprise:!0,nameKey:"plugins.meta.proxy-cache.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["proxy-cache"]},"proxy-cache-advanced":{descriptionKey:"plugins.meta.proxy-cache-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.proxy-cache-advanced.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["proxy-cache-advanced"]},"graphql-proxy-cache-advanced":{descriptionKey:"plugins.meta.graphql-proxy-cache-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.graphql-proxy-cache-advanced.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["graphql-proxy-cache-advanced"]},"rate-limiting-advanced":{descriptionKey:"plugins.meta.rate-limiting-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.rate-limiting-advanced.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["rate-limiting-advanced"]},"rate-limiting":{descriptionKey:"plugins.meta.rate-limiting.description",isEnterprise:!1,nameKey:"plugins.meta.rate-limiting.name",fieldRules:{atLeastOneOf:[["config.second","config.minute","config.hour","config.day","config.month","config.year"]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP["rate-limiting"]},"graphql-rate-limiting-advanced":{descriptionKey:"plugins.meta.graphql-rate-limiting-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.graphql-rate-limiting-advanced.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["graphql-rate-limiting-advanced"]},mocking:{descriptionKey:"plugins.meta.mocking.description",isEnterprise:!0,nameKey:"plugins.meta.mocking.name",fieldRules:{atLeastOneOf:[["config.api_specification_filename","config.api_specification"]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP.mocking},"request-size-limiting":{descriptionKey:"plugins.meta.request-size-limiting.description",isEnterprise:!1,nameKey:"plugins.meta.request-size-limiting.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["request-size-limiting"]},"request-termination":{descriptionKey:"plugins.meta.request-termination.description",isEnterprise:!1,nameKey:"plugins.meta.request-termination.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["request-termination"]},"response-ratelimiting":{descriptionKey:"plugins.meta.response-ratelimiting.description",isEnterprise:!1,nameKey:"plugins.meta.response-ratelimiting.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["response-ratelimiting"]},"route-by-header":{descriptionKey:"plugins.meta.route-by-header.description",isEnterprise:!0,nameKey:"plugins.meta.route-by-header.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["route-by-header"]},"ai-proxy":{descriptionKey:"plugins.meta.ai-proxy.description",isEnterprise:!0,nameKey:"plugins.meta.ai-proxy.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-proxy"]},"ai-prompt-decorator":{descriptionKey:"plugins.meta.ai-prompt-decorator.description",isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-decorator.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-prompt-decorator"]},"ai-prompt-template":{descriptionKey:"plugins.meta.ai-prompt-template.description",isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-template.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-prompt-template"]},"ai-prompt-guard":{descriptionKey:"plugins.meta.ai-prompt-guard.description",isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-guard.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-prompt-guard"]},"ai-request-transformer":{descriptionKey:"plugins.meta.ai-request-transformer.description",isEnterprise:!0,nameKey:"plugins.meta.ai-request-transformer.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-request-transformer"]},"ai-response-transformer":{descriptionKey:"plugins.meta.ai-response-transformer.description",isEnterprise:!0,nameKey:"plugins.meta.ai-response-transformer.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-response-transformer"]},"ai-rate-limiting-advanced":{descriptionKey:"plugins.meta.ai-rate-limiting-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.ai-rate-limiting-advanced.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-rate-limiting-advanced"]},"ai-azure-content-safety":{descriptionKey:"plugins.meta.ai-azure-content-safety.description",isEnterprise:!0,nameKey:"plugins.meta.ai-azure-content-safety.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-azure-content-safety"]},"aws-lambda":{descriptionKey:"plugins.meta.aws-lambda.description",isEnterprise:!1,nameKey:"plugins.meta.aws-lambda.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["aws-lambda"]},"azure-functions":{descriptionKey:"plugins.meta.azure-functions.description",isEnterprise:!0,nameKey:"plugins.meta.azure-functions.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["azure-functions"]},openwhisk:{descriptionKey:"plugins.meta.openwhisk.description",isEnterprise:!1,nameKey:"plugins.meta.openwhisk.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.openwhisk},"pre-function":{descriptionKey:"plugins.meta.pre-function.description",isEnterprise:!0,nameKey:"plugins.meta.pre-function.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["pre-function"]},"post-function":{descriptionKey:"plugins.meta.post-function.description",isEnterprise:!0,nameKey:"plugins.meta.post-function.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["post-function"]},datadog:{descriptionKey:"plugins.meta.datadog.description",isEnterprise:!1,nameKey:"plugins.meta.datadog.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.datadog},prometheus:{descriptionKey:"plugins.meta.prometheus.description",isEnterprise:!0,nameKey:"plugins.meta.prometheus.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.prometheus},zipkin:{descriptionKey:"plugins.meta.zipkin.description",isEnterprise:!0,nameKey:"plugins.meta.zipkin.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.zipkin},collector:{descriptionKey:"plugins.meta.collector.description",isEnterprise:!0,nameKey:"plugins.meta.collector.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.collector},"response-transformer-advanced":{descriptionKey:"plugins.meta.response-transformer-advanced.description",isEnterprise:!1,nameKey:"plugins.meta.response-transformer-advanced.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["response-transformer-advanced"]},"correlation-id":{descriptionKey:"plugins.meta.correlation-id.description",isEnterprise:!1,nameKey:"plugins.meta.correlation-id.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["correlation-id"]},"request-transformer-advanced":{descriptionKey:"plugins.meta.request-transformer-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.request-transformer-advanced.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["request-transformer-advanced"]},"request-transformer":{descriptionKey:"plugins.meta.request-transformer.description",isEnterprise:!1,nameKey:"plugins.meta.request-transformer.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["request-transformer"]},"response-transformer":{descriptionKey:"plugins.meta.response-transformer.description",isEnterprise:!1,nameKey:"plugins.meta.response-transformer.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["response-transformer"]},"route-transformer-advanced":{descriptionKey:"plugins.meta.route-transformer-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.route-transformer-advanced.name",fieldRules:{atLeastOneOf:[["config.path","config.port","config.host"]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP["route-transformer-advanced"]},"kafka-upstream":{descriptionKey:"plugins.meta.kafka-upstream.description",isEnterprise:!0,nameKey:"plugins.meta.kafka-upstream.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["kafka-upstream"]},degraphql:{descriptionKey:"plugins.meta.degraphql.description",isEnterprise:!0,nameKey:"plugins.meta.degraphql.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.degraphql},"exit-transformer":{descriptionKey:"plugins.meta.exit-transformer.description",isEnterprise:!0,nameKey:"plugins.meta.exit-transformer.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["exit-transformer"]},jq:{descriptionKey:"plugins.meta.jq.description",isEnterprise:!0,nameKey:"plugins.meta.jq.name",fieldRules:{atLeastOneOf:[["config.request_jq_program","config.response_jq_program"]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP.jq},"file-log":{descriptionKey:"plugins.meta.file-log.description",isEnterprise:!1,nameKey:"plugins.meta.file-log.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["file-log"]},"http-log":{descriptionKey:"plugins.meta.http-log.description",isEnterprise:!1,nameKey:"plugins.meta.http-log.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["http-log"]},loggly:{descriptionKey:"plugins.meta.loggly.description",isEnterprise:!1,nameKey:"plugins.meta.loggly.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.loggly},"statsd-advanced":{descriptionKey:"plugins.meta.statsd-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.statsd-advanced.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["statsd-advanced"]},statsd:{descriptionKey:"plugins.meta.statsd.description",isEnterprise:!1,nameKey:"plugins.meta.statsd.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.statsd},syslog:{descriptionKey:"plugins.meta.syslog.description",isEnterprise:!1,nameKey:"plugins.meta.syslog.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.syslog},"tcp-log":{descriptionKey:"plugins.meta.tcp-log.description",isEnterprise:!1,nameKey:"plugins.meta.tcp-log.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["tcp-log"]},"udp-log":{descriptionKey:"plugins.meta.udp-log.description",isEnterprise:!1,nameKey:"plugins.meta.udp-log.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["udp-log"]},"kafka-log":{descriptionKey:"plugins.meta.kafka-log.description",isEnterprise:!0,nameKey:"plugins.meta.kafka-log.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["kafka-log"]},session:{descriptionKey:"plugins.meta.session.description",isEnterprise:!1,nameKey:"plugins.meta.session.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.session},"upstream-tls":{descriptionKey:"plugins.meta.upstream-tls.description",isEnterprise:!0,nameKey:"plugins.meta.upstream-tls.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["upstream-tls"]},"application-registration":{descriptionKey:"plugins.meta.application-registration.description",isEnterprise:!0,nameKey:"plugins.meta.application-registration.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["application-registration"]},"konnect-application-auth":{descriptionKey:"plugins.meta.konnect-application-auth.description",isEnterprise:!1,nameKey:"plugins.meta.konnect-application-auth.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["konnect-application-auth"]},acme:{descriptionKey:"plugins.meta.acme.description",isEnterprise:!1,nameKey:"plugins.meta.acme.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.acme},"grpc-gateway":{descriptionKey:"plugins.meta.grpc-gateway.description",isEnterprise:!1,nameKey:"plugins.meta.grpc-gateway.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["grpc-gateway"]},"grpc-web":{descriptionKey:"plugins.meta.grpc-web.description",isEnterprise:!1,nameKey:"plugins.meta.grpc-web.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["grpc-web"]},"upstream-timeout":{descriptionKey:"plugins.meta.upstream-timeout.description",isEnterprise:!0,nameKey:"plugins.meta.upstream-timeout.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["upstream-timeout"]},opentelemetry:{descriptionKey:"plugins.meta.opentelemetry.description",isEnterprise:!1,nameKey:"plugins.meta.opentelemetry.name",fieldRules:{atLeastOneOf:[["config.traces_endpoint","config.logs_endpoint"]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP.opentelemetry},"websocket-validator":{descriptionKey:"plugins.meta.websocket-validator.description",isEnterprise:!0,nameKey:"plugins.meta.websocket-validator.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["websocket-validator"]},"websocket-size-limit":{descriptionKey:"plugins.meta.websocket-size-limit.description",isEnterprise:!0,nameKey:"plugins.meta.websocket-size-limit.name",fieldRules:{atLeastOneOf:[["config.client_max_payload","config.upstream_max_payload"]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP["websocket-size-limit"]},"tls-metadata-headers":{descriptionKey:"plugins.meta.tls-metadata-headers.description",isEnterprise:!0,nameKey:"plugins.meta.tls-metadata-headers.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["tls-metadata-headers"]},"tls-handshake-modifier":{descriptionKey:"plugins.meta.tls-handshake-modifier.description",isEnterprise:!0,nameKey:"plugins.meta.tls-handshake-modifier.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["tls-handshake-modifier"]},"oas-validation":{descriptionKey:"plugins.meta.oas-validation.description",isEnterprise:!0,nameKey:"plugins.meta.oas-validation.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["oas-validation"]},"jwe-decrypt":{descriptionKey:"plugins.meta.jwe-decrypt.description",isEnterprise:!0,nameKey:"plugins.meta.jwe-decrypt.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["jwe-decrypt"]},"xml-threat-protection":{descriptionKey:"plugins.meta.xml-threat-protection.description",isEnterprise:!0,nameKey:"plugins.meta.xml-threat-protection.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["xml-threat-protection"]},saml:{descriptionKey:"plugins.meta.saml.description",isEnterprise:!0,nameKey:"plugins.meta.saml.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.saml},"app-dynamics":{descriptionKey:"plugins.meta.app-dynamics.description",isEnterprise:!0,nameKey:"plugins.meta.app-dynamics.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["app-dynamics"]},"json-threat-protection":{descriptionKey:"plugins.meta.json-threat-protection.description",isEnterprise:!0,nameKey:"plugins.meta.json-threat-protection.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["json-threat-protection"]},"standard-webhooks":{descriptionKey:"plugins.meta.standard-webhooks.description",isEnterprise:!1,nameKey:"plugins.meta.standard-webhooks.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["standard-webhooks"]},"ai-proxy-advanced":{descriptionKey:"plugins.meta.ai-proxy-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.ai-proxy-advanced.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-proxy-advanced"]},"ai-semantic-cache":{descriptionKey:"plugins.meta.ai-semantic-cache.description",isEnterprise:!0,nameKey:"plugins.meta.ai-semantic-cache.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-semantic-cache"]},"ai-semantic-prompt-guard":{descriptionKey:"plugins.meta.ai-semantic-prompt-guard.description",isEnterprise:!0,nameKey:"plugins.meta.ai-semantic-prompt-guard.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-semantic-prompt-guard"]},"header-cert-auth":{descriptionKey:"plugins.meta.header-cert-auth.description",isEnterprise:!0,nameKey:"plugins.meta.header-cert-auth.name",fieldRules:{onlyOneOfMutuallyRequired:[[["config.http_proxy_host","config.http_proxy_port"],["config.https_proxy_host","config.https_proxy_port"]]]},...b.PLUGIN_GROUP_AND_SCOPE_MAP["header-cert-auth"]},"upstream-oauth":{descriptionKey:"plugins.meta.upstream-oauth.description",isEnterprise:!0,nameKey:"plugins.meta.upstream-oauth.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["upstream-oauth"]},confluent:{descriptionKey:"plugins.meta.confluent.description",isEnterprise:!0,nameKey:"plugins.meta.confluent.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.confluent},"service-protection":{descriptionKey:"plugins.meta.service-protection.description",isEnterprise:!0,nameKey:"plugins.meta.service-protection.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["service-protection"]},"injection-protection":{descriptionKey:"plugins.meta.injection-protection.description",isEnterprise:!0,nameKey:"plugins.meta.injection-protection.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["injection-protection"]},redirect:{descriptionKey:"plugins.meta.redirect.description",isEnterprise:!1,nameKey:"plugins.meta.redirect.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.redirect},"kafka-consume":{descriptionKey:"plugins.meta.kafka-consume.description",isEnterprise:!1,nameKey:"plugins.meta.kafka-consume.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["kafka-consume"]},"confluent-consume":{descriptionKey:"plugins.meta.confluent-consume.description",isEnterprise:!1,nameKey:"plugins.meta.confluent-consume.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["confluent-consume"]},"request-callout":{descriptionKey:"plugins.meta.request-callout.description",isEnterprise:!1,nameKey:"plugins.meta.request-callout.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["request-callout"]},"ai-sanitizer":{descriptionKey:"plugins.meta.ai-sanitizer.description",isEnterprise:!1,nameKey:"plugins.meta.ai-sanitizer.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-sanitizer"]},"ai-rag-injector":{descriptionKey:"plugins.meta.ai-rag-injector.description",isEnterprise:!1,nameKey:"plugins.meta.ai-rag-injector.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-rag-injector"]},datakit:{descriptionKey:"plugins.meta.datakit.description",isEnterprise:!1,nameKey:"plugins.meta.datakit.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP.datakit},"ai-prompt-compressor":{descriptionKey:"plugins.meta.ai-prompt-compressor.description",isEnterprise:!1,nameKey:"plugins.meta.ai-prompt-compressor.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-prompt-compressor"]},"solace-upstream":{descriptionKey:"plugins.meta.solace-upstream.description",isEnterprise:!1,nameKey:"plugins.meta.solace-upstream.name",...b.PLUGIN_GROUP_AND_SCOPE_MAP["solace-upstream"]},"ai-aws-guardrails":{descriptionKey:"plugins.meta.ai-aws-guardrails.description",isEnterprise:!1,nameKey:"plugins.meta.ai-aws-guardrails.name",useLegacyForm:!0,...b.PLUGIN_GROUP_AND_SCOPE_MAP["ai-aws-guardrails"]}},Tt={acl:{titleKey:"plugins.meta.acl.name",plugin:"acl",schema:Wr,nameKey:"plugins.meta.acl.credential_name",endpoint:"/acls",schemaEndpoint:"acls",fields:ut(Wr),applyCredentialButtonText:"Add group to consumer"},"basic-auth":{titleKey:"plugins.meta.basic-auth.name",plugin:"basic-auth",schema:Yr,nameKey:"plugins.meta.basic-auth.credential_name",endpoint:"/basic-auth",schemaEndpoint:"basicauth_credentials",fields:ut(Yr)},"key-auth":{titleKey:"plugins.meta.key-auth.name",plugin:"key-auth",schema:Jr,nameKey:"plugins.meta.key-auth.credential_name",endpoint:"/key-auth",schemaEndpoint:"keyauth_credentials",fields:ut(Jr)},"key-auth-enc":{titleKey:"plugins.meta.key-auth-enc.name",plugin:"key-auth-enc",schema:Zr,nameKey:"plugins.meta.key-auth-enc.credential_name",endpoint:"/key-auth-enc",schemaEndpoint:"keyauth_enc_credentials",fields:ut(Zr)},oauth2:{titleKey:"plugins.meta.oauth2.name",plugin:"oauth2",schema:Qr,nameKey:"plugins.meta.oauth2.credential_name",endpoint:"/oauth2",schemaEndpoint:"oauth2_credentials",fields:ut(Qr)},"hmac-auth":{titleKey:"plugins.meta.hmac-auth.name",plugin:"hmac-auth",schema:Xr,nameKey:"plugins.meta.hmac-auth.credential_name",endpoint:"/hmac-auth",schemaEndpoint:"hmacauth_credentials",fields:ut(Xr)},jwt:{titleKey:"plugins.meta.jwt.name",plugin:"jwt",schema:al,nameKey:"plugins.meta.jwt.credential_name",endpoint:"/jwt",schemaEndpoint:"jwt_secrets",fields:{id:{},key:{},algorithm:{}}}},ul={acls:Qa,basicauth_credentials:Za,keyauth_credentials:il,keyauth_enc_credentials:cl,oauth2_credentials:sl,hmacauth_credentials:ol,jwt_secrets:ll},dl=()=>{const{i18n:{t:e}}=it(),n={},r={};for(const[o,a]of Object.entries(Xe))n[o]={...a,name:e(a.nameKey),description:e(a.descriptionKey)};for(const[o,a]of Object.entries(Tt))r[o]={...a,name:e(a.nameKey),title:e(a.titleKey)};return{pluginMetaData:n,credentialMetaData:r,credentialSchemas:Tt,getDisplayName:o=>{var a;return((a=n[o])==null?void 0:a.name)||o}}},jt={type:"array",showRemoveButton:!1,newElementButtonLabelClasses:"kong-form-new-element-button-label",itemContainerComponent:"FieldArrayCardContainer",fieldClasses:"array-card-container-wrapper"},pl={"config-prompts-prepend":{...jt,newElementButtonLabel:"+ Add Message",items:{type:"object",schema:{fields:[{label:"Role",model:"role",help:"LLM message role",type:"select",required:!0,values:["system","assistant","user"]},{label:"Content",model:"content",type:"input",required:!0,help:"LLM message content",inputType:"text"}]}}},"config-prompts-append":{...jt,newElementButtonLabel:"+ Add Message",items:{type:"object",schema:{fields:[{label:"Role",model:"role",help:"LLM message role",type:"select",required:!0,values:["system","assistant","user"]},{label:"Content",model:"content",type:"input",required:!0,help:"LLM message content",inputType:"text"}]}}}},fl={"config-templates":{...jt,newElementButtonLabel:"+ Add Template",items:{type:"object",schema:{fields:[{label:"Template Name",model:"name",help:"Template Name, for reference in user requests",type:"input",required:!0,inputType:"text"},{label:"Template String",model:"template",help:"Template string content, containing {{placeholders}} for variable substitution",type:"textArea",required:!0,inputType:"text"}]}}}},ml={shamefullyTransformPayload:({originalModel:e,model:n,payload:r,schema:i})=>{const o=l=>{var s;return(s=i[l])!=null&&s.required&&n[l]?!0:e[l]===n[l]?!1:e[l]===null?n[l]!==""&&!Number.isNaN(n[l]):!0},a=l=>Object.keys(e).some(s=>s.startsWith(l)&&o(s));a("config-embeddings")||(r.config.embeddings=null),a("config-vectordb")||(r.config.vectordb=null)}},gl={enabled:{type:"switch",model:"enabled",label:"Enabled",textOn:"This plugin is Enabled",textOff:"This plugin is Disabled",inputType:"hidden",styleClasses:"field-switch top-border bottom-border hide-label",default:!0},name:{default:"application-registration",type:"input",inputType:"hidden",styleClasses:"kong-form-hidden-field-wrapper"},"service-id":{type:"AutoSuggest",label:"Gateway Service",styleClasses:"bottom-border",description:"Specific Gateway Service in this workspace",model:"service-id",entity:"services",placeholder:"Select a Gateway Service",inputValues:{fields:["name","id"]},help:"The Gateway Service that this plugin configuration will target"},tags:St.tags,protocols:{id:"protocols",default:[],type:"multiselect",label:"Protocols",values:[{label:"grpc",value:"grpc"},{label:"grpcs",value:"grpcs"},{label:"http",value:"http"},{label:"https",value:"https"},{label:"tcp",value:"tcp"},{label:"tls",value:"tls"},{label:"tls_passthrough",value:"tls_passthrough"},{label:"udp",value:"udp"},{label:"ws",value:"ws"},{label:"wss",value:"wss"}],help:"A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type.",placeholder:"Select valid protocols for the plugin",styleClasses:"plugin-protocols-select"}},Ee={type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"kong-form-array-field",fieldItemsClasses:"kong-form-array-field-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"kong-form-field-wrapper",newElementButtonLabel:"+ Add",newElementButtonLabelClasses:"kong-form-new-element-button-label"},yn={type:"array",showRemoveButton:!1,newElementButtonLabelClasses:"kong-form-new-element-button-label",itemContainerComponent:"FieldMetric",fieldClasses:"metrics-wrapper"},yl={"config-metrics":{...yn,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"Name",type:"select",values:["request_count","request_size","response_size","latency","status_count","unique_users","request_per_user","upstream_latency","kong_latency"]},{model:"stat_type",label:"Stat Type",type:"select",values:["gauge","timer","counter","histogram","meter","set"]},{model:"sample_rate",label:"Sample Rate",type:"input",inputType:"number",id:"sample_rate"},{model:"consumer_identifier",label:"Consumer Identifier",type:"select",values:["consumer_id","custom_id","username"]},{model:"tags",label:"Tags",type:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"kong-form-array-field",fieldItemsClasses:"kong-form-array-field-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},inputType:"text"}]}}}},hl={"config-strategy":{label:"Config.Strategy",type:"select",default:"cluster",values:["cluster","redis"]}},bl={"config-injection_types":{type:"multiselect"},"config-locations":{type:"multiselect"}},_l={"config-api_specification":{label:"Config.API Specification",placeholder:"Enter an API spec",type:"textArea",rows:10,max:!1}},kl={"config-api_spec":{label:"Config.API Spec",placeholder:"Enter an API spec",type:"textArea",rows:15,max:!1}},Cl={"config-access":{},"config-body_filter":{},"config-header_filter":{},"config-certificate":{},"config-functions":{},"config-log":{},"config-rewrite":{}},ei=["config-access","config-body_filter","config-header_filter","config-certificate","config-functions","config-log","config-rewrite"].reduce((e,n)=>({...e,[n]:St.fields.arrayItems({newElementButtonLabel:"Add"})}),Cl),hn={"config-strategy":{label:"Config.Strategy",type:"select",default:"redis",values:["local","redis"]},"config-consumer_groups":{label:"Config.Consumer Groups",type:"input",placeholder:"Enter list of consumer groups",hint:"e.g. group1, group2"}},Al={"config-remove-headers":{},"config-remove.querystring":{},"config-remove-body":{},"config-replace-headers":{},"config-replace-querystring":{},"config-replace-body":{},"config-rename-headers":{},"config-rename-querystring":{},"config-rename-body":{},"config-add-headers":{},"config-add-querystring":{},"config-add-body":{},"config-append-headers":{},"config-append-querystring":{},"config-append-body":{},"config-allow-body":{}},El=["config-remove-headers","config-remove.querystring","config-remove-body","config-replace-headers","config-replace-querystring","config-replace-body","config-rename-headers","config-rename-querystring","config-rename-body","config-add-headers","config-add-querystring","config-add-body","config-append-headers","config-append-querystring","config-append-body","config-allow-body"].reduce((e,n)=>({...e,[n]:St.fields.arrayItems({newElementButtonLabel:"Add"})}),Al),ti={"config-add-json":{...Ee,label:"Config.Add.Json",inputAttributes:{...Ee.inputAttributes,type:"textarea",max:!1}},"config-append-json":{...Ee,label:"Config.Append.Json",inputAttributes:{...Ee.inputAttributes,type:"textarea",max:!1}},"config-remove-json":{...Ee,label:"Config.Remove.Json",inputAttributes:{...Ee.inputAttributes,type:"textarea",max:!1}},"config-rename-json":{...Ee,label:"Config.Rename.Json",inputAttributes:{...Ee.inputAttributes,type:"textarea",max:!1}},"config-replace-json":{...Ee,label:"Config.Replace.Json",inputAttributes:{...Ee.inputAttributes,type:"textarea",max:!1}}},wl={...ti,"config-allow-json":{...Ee,label:"Config.Allow.Json",inputAttributes:{...Ee.inputAttributes,type:"textarea",max:!1}},"config-replace-body":{label:"Config.Replace.Body",type:"textArea",max:!1},"config-transform-functions":{...Ee,label:"Config.Transform.Functions",inputAttributes:{...Ee.inputAttributes,type:"textarea",max:!1}},"config-transform-json":{...Ee,label:"Config.Transform.Json",inputAttributes:{...Ee.inputAttributes,type:"textarea",max:!1}}},Pl={"config-rules":{...jt,newElementButtonLabel:"+ Add Rule",items:{type:"object",schema:{fields:[{label:"Upstream Name",model:"upstream_name",type:"input",help:"Target hostname where traffic will be routed in case of condition match",placeholder:"Hostname",inputType:"text"},{label:"Condition",model:"condition",type:"keyValuePairs",help:"List of headers name and value pairs",newElementButtonLabelClasses:"kong-form-new-element-button-label",newElementButtonLabel:"+ Add Condition",keyInputPlaceholder:"Header name",valueInputPlaceholder:"Header value"}]}}}},Sl={"config-session_redis_cluster_nodes":{...jt,newElementButtonLabel:"+ Add Cluster Node",items:{type:"object",schema:{fields:[{label:"IP",model:"ip",type:"input",inputType:"text"},{label:"Port",model:"port",type:"input",inputType:"number"}]}}}},Tl={"config-metrics":{...yn,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"Name",type:"select",values:["request_count","request_size","response_size","latency","status_count","unique_users","request_per_user","upstream_latency","kong_latency","status_count_per_user","status_count_per_user_per_route","status_count_per_workspace","shdict_usage"]},{model:"stat_type",label:"Stat Type",type:"select",values:["gauge","timer","counter","histogram","meter","set"]},{model:"sample_rate",label:"Sample Rate",type:"input",inputType:"number",id:"sample_rate"},{model:"consumer_identifier",label:"Consumer Identifier",type:"select",values:["consumer_id","custom_id","username"]},{model:"service_identifier",label:"Service Identifier",type:"select",values:["service_id","service_name","service_host","service_name_or_host"]},{model:"workspace_identifier",label:"Workspace Identifier",type:"select",values:["workspace_id","workspace_name"]}]}}}},Nl={"config-metrics":{...yn,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"Name",type:"select",values:["request_count","request_size","response_size","latency","status_count","unique_users","request_per_user","upstream_latency","kong_latency","status_count_per_user","status_count_per_user_per_route","status_count_per_workspace","shdict_usage","cache_datastore_hits_total","cache_datastore_misses_total"]},{model:"stat_type",label:"Stat Type",type:"select",values:["gauge","timer","counter","histogram","meter","set"]},{model:"sample_rate",label:"Sample Rate",type:"input",inputType:"number",id:"sample_rate"},{model:"consumer_identifier",label:"Consumer Identifier",type:"select",values:["consumer_id","custom_id","username"]},{model:"service_identifier",label:"Service Identifier",type:"select",values:["service_id","service_name","service_host","service_name_or_host"]},{model:"workspace_identifier",label:"Workspace Identifier",type:"select",values:["workspace_id","workspace_name"]}]}}}},Ol={"config-behavior-idp_error_response_body_template":{type:"textArea",rows:4}},xl={"config-vault":{type:"AutoSuggest",entity:"vaults",placeholder:"Select a Vault",inputValues:{fields:["prefix","name","id"]},modelTransformer:e=>({id:e}),keyFromObject:"id"}},pt=e=>{var r,i;const n=(i=(r=e==null?void 0:e.confluent)==null?void 0:r.authentication)==null?void 0:i.basic;n&&!n.password&&!n.username&&delete e.confluent.authentication.basic},vl={"config-message_by_lua_functions":{...Ee,inputAttributes:{...Ee.inputAttributes,type:"textarea",max:!1}},shamefullyTransformPayload:({payload:e})=>{var n;pt((n=e.config)==null?void 0:n.schema_registry)}},Il={"config-message_by_lua_functions":{...Ee,inputAttributes:{...Ee.inputAttributes,type:"textarea",max:!1}},shamefullyTransformPayload:({payload:e})=>{var n;pt((n=e.config)==null?void 0:n.schema_registry)}},Rl={shamefullyTransformPayload:({payload:e})=>{var n,r,i;pt((n=e.config)==null?void 0:n.schema_registry),(i=(r=e.config)==null?void 0:r.topics)==null||i.forEach(o=>{pt(o==null?void 0:o.schema_registry)})}},Ll={shamefullyTransformPayload:({payload:e})=>{var n,r,i;pt((n=e.config)==null?void 0:n.schema_registry),(i=(r=e.config)==null?void 0:r.topics)==null||i.forEach(o=>{pt(o==null?void 0:o.schema_registry)})}},Bl={shamefullyTransformPayload:({payload:e})=>{var n;pt((n=e.config)==null?void 0:n.schema_registry)}},Dl={"config-static_tags":{...yn,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"name",type:"input",inputType:"string",id:"schema_name"},{model:"value",label:"value",type:"input",inputType:"string",id:"schema_value"}]}}}},$l={"request-callout":"RequestCalloutForm","service-protection":{experimental:!0,component:"ServiceProtectionForm"},datakit:"DatakitForm"};function ni(e,n){const r=$l[e];if(typeof r=="string")return r;if(n.includes(e))return r.component}const Fn=Symbol("EXPERIMENTAL_FREE_FORM_PROVIDER"),ri={DATAKIT_ENABLE_VISUAL_EDITOR:Symbol("DATAKIT_ENABLE_VISUAL_EDITOR")};function ii(){return t.inject(Fn,[])}function Fl(e){t.provide(Fn,e)}const Vl=(e,n)=>{const r=e.model.startsWith("config-"),i=n.model.startsWith("config-");return r&&!i?1:!r&&i?-1:0},oi=(e,n)=>(e.order??0)-(n.order??0),ai=(e,n)=>Vl(e,n)||oi(e,n)||e.model.localeCompare(n.model),Pe={useI18n:it,usePluginMetaData:dl,usePluginHelpers:qr,useSchemas:e=>{const{capitalize:n}=D.useStringHelpers(),{convertToDotNotation:r}=qr(),{i18n:{t:i}}=it(),o=ii(),a={"application-registration":{overwriteDefault:!0,formSchema:{...gl}},datadog:{...yl},"upstream-tls":{"config-trusted_certificates":{type:"textArea",valueType:"array",rows:4,help:"A comma separated list of certificate values"}},statsd:{...Tl},"statsd-advanced":{...Nl},"route-by-header":{...Pl},"ai-prompt-decorator":{...pl},"ai-prompt-template":{...fl},"ai-proxy-advanced":{...ml},"vault-auth":{...xl},"oas-validation":{...kl},mocking:{..._l},"rate-limiting":{...hn},"rate-limiting-advanced":(e==null?void 0:e.app)==="kongManager"?{"config-consumer_groups":hn["config-consumer_groups"]}:{...hn},"graphql-rate-limiting-advanced":{...hl},"injection-protection":{...bl},"response-ratelimiting":{...hn},"pre-function":{...ei},"post-function":{...ei},"request-transformer-advanced":{...El},"response-transformer":{...ti},"response-transformer-advanced":{...wl},zipkin:{...Dl},"upstream-oauth":{...Ol},saml:{...Sl},"kafka-upstream":{...vl},"key-auth":rl(e),confluent:{...Il},"confluent-consume":{...Rl},"kafka-consume":{...Ll},"kafka-log":{...Bl}},l=()=>["created_at","updated_at","id","_isCustomPlugin","_supported_redis_partial_type","_redis_partial_path"],s=(h,C,y)=>{let S={};(C||h)&&(S=C||(h.fields?h.fields:h));const ie=l().concat(h.blacklist?h.blacklist:[]),J=Object.keys(S).filter(M=>!ie.includes(M)),X=J.indexOf("comparator");X>-1&&J.splice(X,1);let w={fields:[]};const N={};J.forEach(M=>{f(S[M],M,S,N,w,y)});const v=N.name,F=Xe[v],Z=[],re=M=>{const x=["cluster-cache"];for(const R of x)if(M.model.includes(R))return!1;return new RegExp("(?<=-redis-).*").test(M.model)};if(w._supported_redis_partial_type=h._supported_redis_partial_type,w._redis_partial_path=h._redis_partial_path,ke.getSharedFormName(v)||ni(v,o)||F!=null&&F.useLegacyForm||e!=null&&e.credential){if(F!=null&&F.useLegacyForm&&(e!=null&&e.enableRedisPartial)&&h._supported_redis_partial_type){for(const M of w.fields)if(re(M)){Z.push(M);continue}w.fields=w.fields.filter(M=>!re(M)),Z.length&&w.fields.push({id:"_redis",fields:Z,model:"__redis_partial",pluginType:h._isCustomPlugin?"custom":"bundled",redisType:h._supported_redis_partial_type,redisPath:h._redis_partial_path})}w.fields.sort((M,x)=>(M.order=M.order||0,x.order=x.order||0,M.order-x.order))}else{const M=[],x=[],R=[],ae=[],se={};if(F!=null&&F.fieldRules){const V=[...F.fieldRules.atLeastOneOf??[],...F.fieldRules.onlyOneOf??[],...F.fieldRules.mutuallyRequired??[]];if(F.fieldRules.onlyOneOfMutuallyRequired)for(const B of F.fieldRules.onlyOneOfMutuallyRequired)V.push(...B);for(const B of V)for(const q of B)se[q.replace(/-/g,"_").replace(/\./g,"-")]=!1}for(const V of w.fields){if(e!=null&&e.enableRedisPartial&&h._supported_redis_partial_type&&re(V)){ae.push(V);continue}if(V.pinned){M.push(V);continue}if(V.required||se[V.model]!==void 0){se[V.model]===!1&&(se[V.model]=!0),x.push(V);continue}R.push(V)}ae.length&&R.push({id:"_redis",fields:ae,model:"__redis_partial",pluginType:h._isCustomPlugin?"custom":"bundled",redisType:h._supported_redis_partial_type,redisPath:h._redis_partial_path,order:-1});const _e=Object.entries(se).filter(([,V])=>!V).map(([V])=>V.replace(/-/g,".").replace(/_/g,"-"));_e.length>0&&console.warn(`Unknown checked fields for plugin ${v}: ${_e.join(", ")}`);const pe=[];M.length>0&&pe.push({fields:M.sort(oi)}),(x.length>0||R.length>0)&&pe.push({fields:x.sort(ai),collapsible:{title:i("plugins.form.grouping.plugin_configuration.title"),description:i("plugins.form.grouping.plugin_configuration.description"),nestedCollapsible:{fields:R.sort(ai),triggerLabel:{expand:i("plugins.form.grouping.advanced_parameters.view"),collapse:i("plugins.form.grouping.advanced_parameters.hide")}}},slots:{beforeContent:"plugin-config-before-content",emptyState:"plugin-config-empty-state"}}),w={groups:pe}}return{schema:w,model:N,options:{noneSelectedText:"Nothing Selected...",helpAsHtml:!0}}},u=h=>Array.isArray(h.default)||h.default!=null&&typeof h.default!="object"&&h.default!=="function",f=(h,C,y,S,ie,J)=>{const X=u(h);return S[C]=X?h.default:null,h.id=C,h.model=C,h.fields&&h.type==="record"?c(h,C,y,S,ie,J):(y[C]=h,$(h,S),J&&J[C]&&p(y[C],J[C]),ie.fields.push(h)),y},p=(h,C)=>(C&&(Object.assign(h,C),C.label&&(h.label=C.label)),h),c=(h,C,y,S,ie,J)=>{h.fields.forEach(X=>{Object.keys(X).forEach(w=>{const N=X[w];y=f(N,C+"-"+w,y,S,ie,J)})})},d=(h,C)=>{h.type="input",h.inputType="hidden",h.styleClasses="kong-form-hidden-field-wrapper";const y=e==null?void 0:e.entityId;C[h.model]=y?{id:y}:null},m=h=>{h.type="input",h.inputType="number",h.between&&h.between.length===2&&(h.min=h.between[0],h.max=h.between[1])},k=h=>{Object.prototype.hasOwnProperty.call(h,"one_of")?(h.type="select",h.values=h.one_of,h.selectOptions={hideNoneSelectedText:!0}):(h.type="input",h.inputType="text")},_=h=>{h.type="checkbox",h.default=!0,h.required=!1},g=h=>{if(h.type="object-advanced",h.values.type==="array"){const{type:C}=h.values.elements||{};h.schema={fields:[{schema:{fields:[{...Ee,model:h.model,valueArrayType:C==="integer"?"number":C||"string",inputAttributes:{...Ee.inputAttributes,type:C==="integer"?"number":"text",inputMode:C==="integer"?"numeric":"text"}}]}}]}}else h.values.fields&&(h.schema={fields:[{type:"object",model:"object",schema:{fields:h.values.fields.map(C=>{const y=Object.keys(C)[0];return{model:y,type:"input",label:n(y),placeholder:y,inputType:C[y].type}})}}]})},A=h=>h.fields.reduce((C,y)=>(y.fields&&y.fields.forEach(S=>{C[S.model]=S}),y.model&&(C[y.model]=y),C),{}),P=(h,C)=>{if(!ke.customFields.includes(h.model))return;const y=A(h);ke.customFields.forEach(S=>{Object.keys(y).forEach(ie=>{const J=u(y[ie]);C[ie]=J?y[ie].default:null}),delete C[S]})},O=(h,C)=>h.inputType==="hidden"?"":r(n(h.label||C.replace(/_/g," "))),$=(h,C)=>{switch(P(h,C),h.type){case"foreign":d(h,C);break;case"number":m(h),h.attributes={step:"any"};break;case"integer":m(h);break;case"string":k(h);break;case"boolean":_(h);break;case"map":g(h);break}h.inputType==="foreign"&&d(h,C),h.label=O(h,h.model)};function U(h,C){if(C==null||C.type&&C.type!=="record"||typeof h!="object"||h==null)return h;const y={};for(const S of C.fields){const ie=Object.keys(S)[0],J=S[ie];J.type==="record"?y[ie]=U(h[ie],J):J.type==="array"&&Array.isArray(h[ie])&&J.elements.type==="record"?y[ie]=h[ie].map(X=>U(X,J.elements)):y[ie]=h[ie]}return y}return{buildFormSchema:f,parseSchema:s,customSchemas:a,typedefs:St,pruneRecord:U}},useExperimentalFreeForms:ii,useProvideExperimentalFreeForms:Fl},xe="/v2/control-planes/{controlPlaneId}/core-entities",Re="/{workspace}",Se={list:{konnect:{all:`${xe}/plugins`,forEntity:`${xe}/{entityType}/{entityId}/plugins`},kongManager:{all:`${Re}/plugins`,forEntity:`${Re}/{entityType}/{entityId}/plugins`}},select:{konnect:{availablePlugins:`${xe}/v1/available-plugins`,streamingCustomPlugins:`${xe}/custom-plugins`,schemaCustomPluginItem:`${xe}/plugin-schemas/{pluginId}`,streamingCustomPluginItem:`${xe}/custom-plugins/{pluginId}`},kongManager:{availablePlugins:`${Re}/kong`,availablePluginsForOss:"/"}},form:{konnect:{create:{all:`${xe}/plugins`,forEntity:`${xe}/{entityType}/{entityId}/plugins`},edit:{all:`${xe}/plugins/{id}`,forEntity:`${xe}/{entityType}/{entityId}/plugins/{id}`},pluginSchema:"/v2/control-planes/{controlPlaneId}/schemas/core-entities/plugins/{plugin}",credential:{create:`${xe}/{resourceEndpoint}`,edit:`${xe}/{resourceEndpoint}/{id}`},credentialSchema:"/v2/control-planes/{controlPlaneId}/schemas/core-entities/{plugin}",validate:`${xe}/v1/schemas/json/plugin/validate`,entityGetOne:`${xe}/{entity}/{id}`,entityGetAll:`${xe}/{entity}?size=1000`},kongManager:{create:{all:`${Re}/plugins`,forEntity:`${Re}/{entityType}/{entityId}/plugins`},edit:{all:`${Re}/plugins/{id}`,forEntity:`${Re}/{entityType}/{entityId}/plugins/{id}`},pluginSchema:`${Re}/schemas/plugins/{plugin}`,credential:{create:`${Re}/{resourceEndpoint}`,edit:`${Re}/{resourceEndpoint}/{id}`},credentialSchema:`${Re}/schemas/{plugin}`,validate:`${Re}/schemas/plugins/validate`,entityGetOne:`${Re}/{entity}/{id}`,entityGetAll:`${Re}/{entity}`}},item:{konnect:{all:`${xe}/plugins/{id}`,forEntity:`${xe}/{entityType}/{entityId}/plugins/{id}`},kongManager:{all:`${Re}/plugins/{id}`,forEntity:`${Re}/{entityType}/{entityId}/plugins/{id}`}}},Kl={key:0},Ul=ue(t.defineComponent({__name:"PluginFieldRuleAlerts",props:{rules:{}},setup(e){const n=e,{formatPluginFieldLabel:r}=Pe.usePluginHelpers(),{i18n:{t:i}}=Pe.useI18n(),o=s=>s.map(u=>u.replace(/^[cC]onfig\./,"").split(".").map(f=>r(f)).join(".")).join(", "),a=(s,u)=>i(s,{parameters:o(u)}),l=t.computed(()=>{const s=[];if(n.rules.atLeastOneOf)for(const u of n.rules.atLeastOneOf)s.push(a("plugins.form.field_rules.at_least_one_of",u));if(n.rules.onlyOneOf)for(const u of n.rules.onlyOneOf)s.push(a("plugins.form.field_rules.only_one_of",u));if(n.rules.mutuallyRequired)for(const u of n.rules.mutuallyRequired)s.push(a("plugins.form.field_rules.mutually_required",u));return s});return(s,u)=>{const f=t.resolveComponent("KAlert");return t.openBlock(),t.createBlock(f,{class:"plugin-field-rule-alerts"},{default:t.withCtx(()=>[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(p,c)=>(t.openBlock(),t.createElementBlock("li",{key:`simple-alert-${c}`},t.toDisplayString(p),1))),128)),n.rules.onlyOneOfMutuallyRequired&&n.rules.onlyOneOfMutuallyRequired.length>0?(t.openBlock(),t.createElementBlock("li",Kl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.rules.onlyOneOfMutuallyRequired,(p,c)=>(t.openBlock(),t.createElementBlock("div",{key:`only-one-mutually-alert-${c}`},[t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("plugins.form.field_rules.only_one_of_mutually_required")),1),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p,(d,m)=>(t.openBlock(),t.createElementBlock("li",{key:`only-one-mutually-alert-${c}-combination-${m}`},t.toDisplayString(o(d)),1))),128))])]))),128))])):t.createCommentVNode("",!0)])]),_:1})}}}),[["__scopeId","data-v-d8eb79cf"]]);var li=typeof global=="object"&&global&&global.Object===Object&&global,jl=typeof self=="object"&&self&&self.Object===Object&&self,ze=li||jl||Function("return this")(),We=ze.Symbol,si=Object.prototype,Ml=si.hasOwnProperty,Gl=si.toString,Mt=We?We.toStringTag:void 0;function ql(e){var n=Ml.call(e,Mt),r=e[Mt];try{e[Mt]=void 0;var i=!0}catch{}var o=Gl.call(e);return i&&(n?e[Mt]=r:delete e[Mt]),o}var Hl=Object.prototype,zl=Hl.toString;function Wl(e){return zl.call(e)}var Yl="[object Null]",Jl="[object Undefined]",ci=We?We.toStringTag:void 0;function ft(e){return e==null?e===void 0?Jl:Yl:ci&&ci in Object(e)?ql(e):Wl(e)}function mt(e){return e!=null&&typeof e=="object"}var Xl="[object Symbol]";function Vn(e){return typeof e=="symbol"||mt(e)&&ft(e)==Xl}function ui(e,n){for(var r=-1,i=e==null?0:e.length,o=Array(i);++r<i;)o[r]=n(e[r],r,e);return o}var Qe=Array.isArray,Ql=1/0,di=We?We.prototype:void 0,pi=di?di.toString:void 0;function fi(e){if(typeof e=="string")return e;if(Qe(e))return ui(e,fi)+"";if(Vn(e))return pi?pi.call(e):"";var n=e+"";return n=="0"&&1/e==-Ql?"-0":n}function gt(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function Zl(e){return e}var es="[object AsyncFunction]",ts="[object Function]",ns="[object GeneratorFunction]",rs="[object Proxy]";function Kn(e){if(!gt(e))return!1;var n=ft(e);return n==ts||n==ns||n==es||n==rs}var Un=ze["__core-js_shared__"],mi=function(){var e=/[^.]+$/.exec(Un&&Un.keys&&Un.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function is(e){return!!mi&&mi in e}var os=Function.prototype,as=os.toString;function yt(e){if(e!=null){try{return as.call(e)}catch{}try{return e+""}catch{}}return""}var ls=/[\\^$.*+?()[\]{}|]/g,ss=/^\[object .+?Constructor\]$/,cs=Function.prototype,us=Object.prototype,ds=cs.toString,ps=us.hasOwnProperty,fs=RegExp("^"+ds.call(ps).replace(ls,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ms(e){if(!gt(e)||is(e))return!1;var n=Kn(e)?fs:ss;return n.test(yt(e))}function gs(e,n){return e==null?void 0:e[n]}function ht(e,n){var r=gs(e,n);return ms(r)?r:void 0}var jn=ht(ze,"WeakMap"),gi=Object.create,ys=function(){function e(){}return function(n){if(!gt(n))return{};if(gi)return gi(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}}();function hs(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}function bs(e,n){var r=-1,i=e.length;for(n||(n=Array(i));++r<i;)n[r]=e[r];return n}var _s=800,ks=16,Cs=Date.now;function As(e){var n=0,r=0;return function(){var i=Cs(),o=ks-(i-r);if(r=i,o>0){if(++n>=_s)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function Es(e){return function(){return e}}var bn=function(){try{var e=ht(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ws=bn?function(e,n){return bn(e,"toString",{configurable:!0,enumerable:!1,value:Es(n),writable:!0})}:Zl,Ps=As(ws);function Ss(e,n){for(var r=-1,i=e==null?0:e.length;++r<i&&n(e[r],r,e)!==!1;);return e}var Ts=9007199254740991,Ns=/^(?:0|[1-9]\d*)$/;function Mn(e,n){var r=typeof e;return n=n??Ts,!!n&&(r=="number"||r!="symbol"&&Ns.test(e))&&e>-1&&e%1==0&&e<n}function yi(e,n,r){n=="__proto__"&&bn?bn(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}function hi(e,n){return e===n||e!==e&&n!==n}var Os=Object.prototype,xs=Os.hasOwnProperty;function Gn(e,n,r){var i=e[n];(!(xs.call(e,n)&&hi(i,r))||r===void 0&&!(n in e))&&yi(e,n,r)}function Gt(e,n,r,i){var o=!r;r||(r={});for(var a=-1,l=n.length;++a<l;){var s=n[a],u=void 0;u===void 0&&(u=e[s]),o?yi(r,s,u):Gn(r,s,u)}return r}var bi=Math.max;function vs(e,n,r){return n=bi(n===void 0?e.length-1:n,0),function(){for(var i=arguments,o=-1,a=bi(i.length-n,0),l=Array(a);++o<a;)l[o]=i[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=i[o];return s[n]=r(l),hs(e,this,s)}}var Is=9007199254740991;function qn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Is}function Hn(e){return e!=null&&qn(e.length)&&!Kn(e)}var Rs=Object.prototype;function _n(e){var n=e&&e.constructor,r=typeof n=="function"&&n.prototype||Rs;return e===r}function Ls(e,n){for(var r=-1,i=Array(e);++r<e;)i[r]=n(r);return i}var Bs="[object Arguments]";function _i(e){return mt(e)&&ft(e)==Bs}var ki=Object.prototype,Ds=ki.hasOwnProperty,$s=ki.propertyIsEnumerable,kn=_i(function(){return arguments}())?_i:function(e){return mt(e)&&Ds.call(e,"callee")&&!$s.call(e,"callee")};function Fs(){return!1}var Ci=typeof ne=="object"&&ne&&!ne.nodeType&&ne,Ai=Ci&&typeof module=="object"&&module&&!module.nodeType&&module,Vs=Ai&&Ai.exports===Ci,Ei=Vs?ze.Buffer:void 0,Ks=Ei?Ei.isBuffer:void 0,zn=Ks||Fs,Us="[object Arguments]",js="[object Array]",Ms="[object Boolean]",Gs="[object Date]",qs="[object Error]",Hs="[object Function]",zs="[object Map]",Ws="[object Number]",Ys="[object Object]",Js="[object RegExp]",Xs="[object Set]",Qs="[object String]",Zs="[object WeakMap]",ec="[object ArrayBuffer]",tc="[object DataView]",nc="[object Float32Array]",rc="[object Float64Array]",ic="[object Int8Array]",oc="[object Int16Array]",ac="[object Int32Array]",lc="[object Uint8Array]",sc="[object Uint8ClampedArray]",cc="[object Uint16Array]",uc="[object Uint32Array]",we={};we[nc]=we[rc]=we[ic]=we[oc]=we[ac]=we[lc]=we[sc]=we[cc]=we[uc]=!0,we[Us]=we[js]=we[ec]=we[Ms]=we[tc]=we[Gs]=we[qs]=we[Hs]=we[zs]=we[Ws]=we[Ys]=we[Js]=we[Xs]=we[Qs]=we[Zs]=!1;function dc(e){return mt(e)&&qn(e.length)&&!!we[ft(e)]}function Wn(e){return function(n){return e(n)}}var wi=typeof ne=="object"&&ne&&!ne.nodeType&&ne,qt=wi&&typeof module=="object"&&module&&!module.nodeType&&module,pc=qt&&qt.exports===wi,Yn=pc&&li.process,Nt=function(){try{var e=qt&&qt.require&&qt.require("util").types;return e||Yn&&Yn.binding&&Yn.binding("util")}catch{}}(),Pi=Nt&&Nt.isTypedArray,Si=Pi?Wn(Pi):dc,fc=Object.prototype,mc=fc.hasOwnProperty;function Ti(e,n){var r=Qe(e),i=!r&&kn(e),o=!r&&!i&&zn(e),a=!r&&!i&&!o&&Si(e),l=r||i||o||a,s=l?Ls(e.length,String):[],u=s.length;for(var f in e)(n||mc.call(e,f))&&!(l&&(f=="length"||o&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Mn(f,u)))&&s.push(f);return s}function Ni(e,n){return function(r){return e(n(r))}}var gc=Ni(Object.keys,Object),yc=Object.prototype,hc=yc.hasOwnProperty;function Oi(e){if(!_n(e))return gc(e);var n=[];for(var r in Object(e))hc.call(e,r)&&r!="constructor"&&n.push(r);return n}function Jn(e){return Hn(e)?Ti(e):Oi(e)}function bc(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var _c=Object.prototype,kc=_c.hasOwnProperty;function Cc(e){if(!gt(e))return bc(e);var n=_n(e),r=[];for(var i in e)i=="constructor"&&(n||!kc.call(e,i))||r.push(i);return r}function Xn(e){return Hn(e)?Ti(e,!0):Cc(e)}var Ac=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ec=/^\w*$/;function wc(e,n){if(Qe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Vn(e)?!0:Ec.test(e)||!Ac.test(e)||n!=null&&e in Object(n)}var Ht=ht(Object,"create");function Pc(){this.__data__=Ht?Ht(null):{},this.size=0}function Sc(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Tc="__lodash_hash_undefined__",Nc=Object.prototype,Oc=Nc.hasOwnProperty;function xc(e){var n=this.__data__;if(Ht){var r=n[e];return r===Tc?void 0:r}return Oc.call(n,e)?n[e]:void 0}var vc=Object.prototype,Ic=vc.hasOwnProperty;function Rc(e){var n=this.__data__;return Ht?n[e]!==void 0:Ic.call(n,e)}var Lc="__lodash_hash_undefined__";function Bc(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ht&&n===void 0?Lc:n,this}function bt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}bt.prototype.clear=Pc,bt.prototype.delete=Sc,bt.prototype.get=xc,bt.prototype.has=Rc,bt.prototype.set=Bc;function Dc(){this.__data__=[],this.size=0}function Cn(e,n){for(var r=e.length;r--;)if(hi(e[r][0],n))return r;return-1}var $c=Array.prototype,Fc=$c.splice;function Vc(e){var n=this.__data__,r=Cn(n,e);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():Fc.call(n,r,1),--this.size,!0}function Kc(e){var n=this.__data__,r=Cn(n,e);return r<0?void 0:n[r][1]}function Uc(e){return Cn(this.__data__,e)>-1}function jc(e,n){var r=this.__data__,i=Cn(r,e);return i<0?(++this.size,r.push([e,n])):r[i][1]=n,this}function Ze(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}Ze.prototype.clear=Dc,Ze.prototype.delete=Vc,Ze.prototype.get=Kc,Ze.prototype.has=Uc,Ze.prototype.set=jc;var zt=ht(ze,"Map");function Mc(){this.size=0,this.__data__={hash:new bt,map:new(zt||Ze),string:new bt}}function Gc(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function An(e,n){var r=e.__data__;return Gc(n)?r[typeof n=="string"?"string":"hash"]:r.map}function qc(e){var n=An(this,e).delete(e);return this.size-=n?1:0,n}function Hc(e){return An(this,e).get(e)}function zc(e){return An(this,e).has(e)}function Wc(e,n){var r=An(this,e),i=r.size;return r.set(e,n),this.size+=r.size==i?0:1,this}function ot(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}ot.prototype.clear=Mc,ot.prototype.delete=qc,ot.prototype.get=Hc,ot.prototype.has=zc,ot.prototype.set=Wc;var Yc="Expected a function";function Qn(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(Yc);var r=function(){var i=arguments,o=n?n.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);var l=e.apply(this,i);return r.cache=a.set(o,l)||a,l};return r.cache=new(Qn.Cache||ot),r}Qn.Cache=ot;var Jc=500;function Xc(e){var n=Qn(e,function(i){return r.size===Jc&&r.clear(),i}),r=n.cache;return n}var Qc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zc=/\\(\\)?/g,eu=Xc(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(Qc,function(r,i,o,a){n.push(o?a.replace(Zc,"$1"):i||r)}),n});function En(e){return e==null?"":fi(e)}function Ot(e,n){return Qe(e)?e:wc(e,n)?[e]:eu(En(e))}var tu=1/0;function wn(e){if(typeof e=="string"||Vn(e))return e;var n=e+"";return n=="0"&&1/e==-tu?"-0":n}function Zn(e,n){n=Ot(n,e);for(var r=0,i=n.length;e!=null&&r<i;)e=e[wn(n[r++])];return r&&r==i?e:void 0}function nu(e,n,r){var i=e==null?void 0:Zn(e,n);return i===void 0?r:i}function er(e,n){for(var r=-1,i=n.length,o=e.length;++r<i;)e[o+r]=n[r];return e}var xi=We?We.isConcatSpreadable:void 0;function ru(e){return Qe(e)||kn(e)||!!(xi&&e&&e[xi])}function iu(e,n,r,i,o){var a=-1,l=e.length;for(r||(r=ru),o||(o=[]);++a<l;){var s=e[a];r(s)?er(o,s):o[o.length]=s}return o}function ou(e){var n=e==null?0:e.length;return n?iu(e):[]}function vi(e){return Ps(vs(e,void 0,ou),e+"")}var tr=Ni(Object.getPrototypeOf,Object),au="[object Object]",lu=Function.prototype,su=Object.prototype,Ii=lu.toString,cu=su.hasOwnProperty,uu=Ii.call(Object);function du(e){if(!mt(e)||ft(e)!=au)return!1;var n=tr(e);if(n===null)return!0;var r=cu.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&Ii.call(r)==uu}function Ri(e,n,r){var i=-1,o=e.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(o);++i<o;)a[i]=e[i+n];return a}function pu(e,n,r){var i=e.length;return r=r===void 0?i:r,!n&&r>=i?e:Ri(e,n,r)}var fu="\\ud800-\\udfff",mu="\\u0300-\\u036f",gu="\\ufe20-\\ufe2f",yu="\\u20d0-\\u20ff",hu=mu+gu+yu,bu="\\ufe0e\\ufe0f",_u="\\u200d",ku=RegExp("["+_u+fu+hu+bu+"]");function Li(e){return ku.test(e)}function Cu(e){return e.split("")}var Bi="\\ud800-\\udfff",Au="\\u0300-\\u036f",Eu="\\ufe20-\\ufe2f",wu="\\u20d0-\\u20ff",Pu=Au+Eu+wu,Su="\\ufe0e\\ufe0f",Tu="["+Bi+"]",nr="["+Pu+"]",rr="\\ud83c[\\udffb-\\udfff]",Nu="(?:"+nr+"|"+rr+")",Di="[^"+Bi+"]",$i="(?:\\ud83c[\\udde6-\\uddff]){2}",Fi="[\\ud800-\\udbff][\\udc00-\\udfff]",Ou="\\u200d",Vi=Nu+"?",Ki="["+Su+"]?",xu="(?:"+Ou+"(?:"+[Di,$i,Fi].join("|")+")"+Ki+Vi+")*",vu=Ki+Vi+xu,Iu="(?:"+[Di+nr+"?",nr,$i,Fi,Tu].join("|")+")",Ru=RegExp(rr+"(?="+rr+")|"+Iu+vu,"g");function Lu(e){return e.match(Ru)||[]}function Bu(e){return Li(e)?Lu(e):Cu(e)}function Du(e){return function(n){n=En(n);var r=Li(n)?Bu(n):void 0,i=r?r[0]:n.charAt(0),o=r?pu(r,1).join(""):n.slice(1);return i[e]()+o}}var $u=Du("toUpperCase");function Fu(e){return $u(En(e).toLowerCase())}function Vu(){this.__data__=new Ze,this.size=0}function Ku(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}function Uu(e){return this.__data__.get(e)}function ju(e){return this.__data__.has(e)}var Mu=200;function Gu(e,n){var r=this.__data__;if(r instanceof Ze){var i=r.__data__;if(!zt||i.length<Mu-1)return i.push([e,n]),this.size=++r.size,this;r=this.__data__=new ot(i)}return r.set(e,n),this.size=r.size,this}function xt(e){var n=this.__data__=new Ze(e);this.size=n.size}xt.prototype.clear=Vu,xt.prototype.delete=Ku,xt.prototype.get=Uu,xt.prototype.has=ju,xt.prototype.set=Gu;function qu(e,n){return e&&Gt(n,Jn(n),e)}function Hu(e,n){return e&&Gt(n,Xn(n),e)}var Ui=typeof ne=="object"&&ne&&!ne.nodeType&&ne,ji=Ui&&typeof module=="object"&&module&&!module.nodeType&&module,zu=ji&&ji.exports===Ui,Mi=zu?ze.Buffer:void 0,Gi=Mi?Mi.allocUnsafe:void 0;function Wu(e,n){if(n)return e.slice();var r=e.length,i=Gi?Gi(r):new e.constructor(r);return e.copy(i),i}function Yu(e,n){for(var r=-1,i=e==null?0:e.length,o=0,a=[];++r<i;){var l=e[r];n(l,r,e)&&(a[o++]=l)}return a}function qi(){return[]}var Ju=Object.prototype,Xu=Ju.propertyIsEnumerable,Hi=Object.getOwnPropertySymbols,ir=Hi?function(e){return e==null?[]:(e=Object(e),Yu(Hi(e),function(n){return Xu.call(e,n)}))}:qi;function Qu(e,n){return Gt(e,ir(e),n)}var Zu=Object.getOwnPropertySymbols,zi=Zu?function(e){for(var n=[];e;)er(n,ir(e)),e=tr(e);return n}:qi;function ed(e,n){return Gt(e,zi(e),n)}function Wi(e,n,r){var i=n(e);return Qe(e)?i:er(i,r(e))}function td(e){return Wi(e,Jn,ir)}function Yi(e){return Wi(e,Xn,zi)}var or=ht(ze,"DataView"),ar=ht(ze,"Promise"),lr=ht(ze,"Set"),Ji="[object Map]",nd="[object Object]",Xi="[object Promise]",Qi="[object Set]",Zi="[object WeakMap]",eo="[object DataView]",rd=yt(or),id=yt(zt),od=yt(ar),ad=yt(lr),ld=yt(jn),Ye=ft;(or&&Ye(new or(new ArrayBuffer(1)))!=eo||zt&&Ye(new zt)!=Ji||ar&&Ye(ar.resolve())!=Xi||lr&&Ye(new lr)!=Qi||jn&&Ye(new jn)!=Zi)&&(Ye=function(e){var n=ft(e),r=n==nd?e.constructor:void 0,i=r?yt(r):"";if(i)switch(i){case rd:return eo;case id:return Ji;case od:return Xi;case ad:return Qi;case ld:return Zi}return n});var sd=Object.prototype,cd=sd.hasOwnProperty;function ud(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&cd.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var to=ze.Uint8Array;function sr(e){var n=new e.constructor(e.byteLength);return new to(n).set(new to(e)),n}function dd(e,n){var r=n?sr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var pd=/\w*$/;function fd(e){var n=new e.constructor(e.source,pd.exec(e));return n.lastIndex=e.lastIndex,n}var no=We?We.prototype:void 0,ro=no?no.valueOf:void 0;function md(e){return ro?Object(ro.call(e)):{}}function gd(e,n){var r=n?sr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var yd="[object Boolean]",hd="[object Date]",bd="[object Map]",_d="[object Number]",kd="[object RegExp]",Cd="[object Set]",Ad="[object String]",Ed="[object Symbol]",wd="[object ArrayBuffer]",Pd="[object DataView]",Sd="[object Float32Array]",Td="[object Float64Array]",Nd="[object Int8Array]",Od="[object Int16Array]",xd="[object Int32Array]",vd="[object Uint8Array]",Id="[object Uint8ClampedArray]",Rd="[object Uint16Array]",Ld="[object Uint32Array]";function Bd(e,n,r){var i=e.constructor;switch(n){case wd:return sr(e);case yd:case hd:return new i(+e);case Pd:return dd(e,r);case Sd:case Td:case Nd:case Od:case xd:case vd:case Id:case Rd:case Ld:return gd(e,r);case bd:return new i;case _d:case Ad:return new i(e);case kd:return fd(e);case Cd:return new i;case Ed:return md(e)}}function Dd(e){return typeof e.constructor=="function"&&!_n(e)?ys(tr(e)):{}}var $d="[object Map]";function Fd(e){return mt(e)&&Ye(e)==$d}var io=Nt&&Nt.isMap,Vd=io?Wn(io):Fd,Kd="[object Set]";function Ud(e){return mt(e)&&Ye(e)==Kd}var oo=Nt&&Nt.isSet,jd=oo?Wn(oo):Ud,Md=1,Gd=2,qd=4,ao="[object Arguments]",Hd="[object Array]",zd="[object Boolean]",Wd="[object Date]",Yd="[object Error]",lo="[object Function]",Jd="[object GeneratorFunction]",Xd="[object Map]",Qd="[object Number]",so="[object Object]",Zd="[object RegExp]",ep="[object Set]",tp="[object String]",np="[object Symbol]",rp="[object WeakMap]",ip="[object ArrayBuffer]",op="[object DataView]",ap="[object Float32Array]",lp="[object Float64Array]",sp="[object Int8Array]",cp="[object Int16Array]",up="[object Int32Array]",dp="[object Uint8Array]",pp="[object Uint8ClampedArray]",fp="[object Uint16Array]",mp="[object Uint32Array]",be={};be[ao]=be[Hd]=be[ip]=be[op]=be[zd]=be[Wd]=be[ap]=be[lp]=be[sp]=be[cp]=be[up]=be[Xd]=be[Qd]=be[so]=be[Zd]=be[ep]=be[tp]=be[np]=be[dp]=be[pp]=be[fp]=be[mp]=!0,be[Yd]=be[lo]=be[rp]=!1;function Wt(e,n,r,i,o,a){var l,s=n&Md,u=n&Gd,f=n&qd;if(r&&(l=o?r(e,i,o,a):r(e)),l!==void 0)return l;if(!gt(e))return e;var p=Qe(e);if(p){if(l=ud(e),!s)return bs(e,l)}else{var c=Ye(e),d=c==lo||c==Jd;if(zn(e))return Wu(e,s);if(c==so||c==ao||d&&!o){if(l=u||d?{}:Dd(e),!s)return u?ed(e,Hu(l,e)):Qu(e,qu(l,e))}else{if(!be[c])return o?e:{};l=Bd(e,c,s)}}a||(a=new xt);var m=a.get(e);if(m)return m;a.set(e,l),jd(e)?e.forEach(function(g){l.add(Wt(g,n,r,g,e,a))}):Vd(e)&&e.forEach(function(g,A){l.set(A,Wt(g,n,r,A,e,a))});var k=f?u?Yi:td:u?Xn:Jn,_=p?void 0:k(e);return Ss(_||e,function(g,A){_&&(A=g,g=e[A]),Gn(l,A,Wt(g,n,r,A,e,a))}),l}var gp=1,yp=4;function co(e){return Wt(e,gp|yp)}function hp(e,n){return e!=null&&n in Object(e)}function bp(e,n,r){n=Ot(n,e);for(var i=-1,o=n.length,a=!1;++i<o;){var l=wn(n[i]);if(!(a=e!=null&&r(e,l)))break;e=e[l]}return a||++i!=o?a:(o=e==null?0:e.length,!!o&&qn(o)&&Mn(l,o)&&(Qe(e)||kn(e)))}function _p(e,n){return e!=null&&bp(e,n,hp)}function kp(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function Cp(e,n){return n.length<2?e:Zn(e,Ri(n,0,-1))}var Ap="[object Map]",Ep="[object Set]",wp=Object.prototype,Pp=wp.hasOwnProperty;function uo(e){if(e==null)return!0;if(Hn(e)&&(Qe(e)||typeof e=="string"||typeof e.splice=="function"||zn(e)||Si(e)||kn(e)))return!e.length;var n=Ye(e);if(n==Ap||n==Ep)return!e.size;if(_n(e))return!Oi(e).length;for(var r in e)if(Pp.call(e,r))return!1;return!0}function po(e,n){return n=Ot(n,e),e=Cp(e,n),e==null||delete e[wn(kp(n))]}function Sp(e){return du(e)?void 0:e}var Tp=1,Np=2,Op=4,xp=vi(function(e,n){var r={};if(e==null)return r;var i=!1;n=ui(n,function(a){return a=Ot(a,e),i||(i=a.length>1),a}),Gt(e,Yi(e),r),i&&(r=Wt(r,Tp|Np|Op,Sp));for(var o=n.length;o--;)po(r,n[o]);return r});function fo(e,n,r,i){if(!gt(e))return e;n=Ot(n,e);for(var o=-1,a=n.length,l=a-1,s=e;s!=null&&++o<a;){var u=wn(n[o]),f=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(o!=l){var p=s[u];f=void 0,f===void 0&&(f=gt(p)?p:Mn(n[o+1])?[]:{})}Gn(s,u,f),s=s[u]}return e}function vp(e,n,r){for(var i=-1,o=n.length,a={};++i<o;){var l=n[i],s=Zn(e,l);r(s,l)&&fo(a,Ot(l,e),s)}return a}function Ip(e,n){return vp(e,n,function(r,i){return _p(e,i)})}var cr=vi(function(e,n){return e==null?{}:Ip(e,n)});function Rp(e,n,r){return e==null?e:fo(e,n,r)}var Lp=0;function ur(e){var n=++Lp;return En(e)+n}function mo(e,n){return e==null?!0:po(e,n)}const{t:go}=Ge.createI18n("en-us",qe);function yo(e){return e.map(n=>({value:n,label:n}))}const dr="*",ho="$",bo=".";function He(...e){return e.join(bo)}function pr(...e){return He(ho,...e)}function _o(e){return e.startsWith(He(ho,""))}function vt(e){return e.split(bo).filter(n=>n!=="")}function fr(e){const n=vt(e);return n[n.length-1]}go("redis.shared_configuration.open_source"),go("redis.shared_configuration.enterprise");function Bp(e){const n=t.toValue(e);return n?n.type==="set"&&n.elements.type==="string"&&!n.elements.one_of:!1}const ko=Symbol("free-form-data"),Co=Symbol("free-form-schema"),Ao=Symbol("free-form-field-path"),mr=Symbol("free-form-field-renderer-slots"),Pn=Symbol("free-form-field-renderer-matchers-map"),Eo=Symbol("free-form-config"),wo=Symbol("free-form-field-reset-label-path-setting"),It="free-form-field-renderers-slot",Dp={tooltipAttributes:{maxWidth:"300px",placement:"top"}};function gr(e,n=""){const r={},i=e;if(Array.isArray(i.fields))for(const o of i.fields){const a=Object.keys(o)[0],l=o[a],s=n?He(n,a):a;if(r[s]=l,l.type==="record"&&Array.isArray(l.fields)){const u=gr(l,s);Object.assign(r,u)}else if(l.type==="array"&&l.elements){const u=l.elements,f=He(s,dr);if(r[f]=u,u.type==="record"&&Array.isArray(u.fields)){const p=gr(u,f);Object.assign(r,p)}}}return r}function yr(e){const n=vt(e).map(r=>/^\d+$/.test(r)?dr:r);return He(...n)}function $p(e){const n=t.toValue(e),r=t.computed(()=>n?gr(n):{});function i(p){var c;return p==null?n:(c=r.value)==null?void 0:c[yr(p)]}function o(p,c=!1){const d=i(p);return d?d.default!==void 0?d.default:c||d.required?d.type==="record"?a(d,p):d.type==="array"?[]:null:null:null}function a(p,c){const d={};if(Array.isArray(p.fields))for(const m of p.fields){const k=Object.keys(m)[0],_=c?`${c}.${k}`:k,g=o(_,!1);g!==void 0&&(d[k]=g)}return d}function l(p){return p?o(p,!0):a(i(),"")}function s(p){const c=i(p),d=c!=null&&c.description?pn.marked.parse(c.description,{async:!1}):void 0;return{...Dp,"data-testid":`ff-label-${p}`,info:d}}function u(p){var d;const c=i(p);return yo((c==null?void 0:c.one_of)||((d=c.elements)==null?void 0:d.one_of)||[])}function f(p){var m;const c=(m=i(p))==null?void 0:m.default;let d=null;if(c==null||typeof c=="object"||c==="")return null;if(Array.isArray(c)){if(c.length===0)return null;d=c.join(", ")}else d=c.toString();return`Default: ${d}`}return{getSchema:i,getDefault:l,getSelectItems:u,getLabelAttributes:s,getPlaceholder:f}}function je(){const e=t.inject(ko),n=t.inject(Co),r=t.inject(Eo,{});if(!e)throw new Error("useFormShared() called without form data provider.");if(!n)throw new Error("useFormShared() called without schema provider.");return{formData:e,formConfig:r,...n}}const Po=e=>{const n=t.inject(Ao,t.computed(()=>"")),r=t.computed(()=>{const i=t.toValue(e);let o=i;return!_o(i)&&n.value&&(o=He(n.value,i)),_o(i)&&(o=o.slice(pr("").length)),o});return t.provide(Ao,r),r},Fp=e=>{const{getSchema:n}=je(),{default:r,...i}=t.useSlots(),o=t.inject(mr),a=t.inject(Pn),l=t.computed(()=>{const u=t.toValue(o),f=Object.keys(i).filter(p=>p!==It&&p!=="item").reduce((p,c)=>{const d=yr(He(t.toValue(e),c));return{...p,[d]:i[c]}},{});return u?{...u,...f}:f});t.provide(mr,l);const s=t.toValue(e);return t.computed(()=>{if(r)return;const u=l.value[yr(t.toValue(e))];if(u)return u;for(const[f,p]of a)if(f({path:s,schema:n(s)}))return p})},Vp={ip:"IP",ssl:"SSL",ttl:"TTL",url:"URL",http:"HTTP"};function Kp(e){return Vp[e.toLocaleLowerCase()]??e}function Up(e,n){const r=t.inject(wo,{parentPath:null,isolate:!1}),{parentPath:i,isolate:o}=t.toValue(r),a=t.ref(i?He(i,e):e),l=t.ref({parentPath:a.value,isolate:o});return t.watch([t.toRef(n),t.toRef(r)],([s,u])=>{var d;const{parentPath:f,isolate:p}=u,c=f?He(f,e):e;if(s){const m={isolate:()=>{a.value=e,l.value.isolate=!0,l.value.parentPath=null},"isolate-children":()=>{l.value.isolate=!0,l.value.parentPath=null},reset:()=>{a.value=e,l.value.isolate=!1,l.value.parentPath=null},"reset-children":()=>{l.value.isolate=!1,l.value.parentPath=null},inherit:()=>{a.value=c,l.value.isolate=!1,l.value.parentPath=c}};(d=m[s])==null||d.call(m)}else p&&(a.value=e,l.value.isolate=!0,l.value.parentPath=null)},{deep:!0,immediate:!0}),t.provide(wo,l),a}function jp(e){return vt(e).map(r=>r.split("_").map(Fu).map(Kp).join(" ")).join(" › ")}function Mp(e,n){const r=t.toValue(e),i=fr(r),{formConfig:o}=je(),a=Up(i,n),{getSchema:l}=je(),s=So(e);return t.computed(()=>{var d;const u=a.value??i,f=(d=s.value.parent)!=null&&d.path?l(s.value.parent.path):null,c=(f==null?void 0:f.type)==="array"?"":jp(u);return o.transformLabel?o.transformLabel(c,r):c})}function at(e,n){const{getLabelAttributes:r,getPlaceholder:i,getSchema:o}=je(),a=t.toValue(e),l=t.toValue(n),s=Mp(e,t.toRef(()=>t.toValue(n).resetLabelPath));return t.computed(()=>{var u;return{...l,placeholder:l.placeholder??i(a)??void 0,labelAttributes:l.labelAttributes??r(a),label:l.label??s.value,required:l.required??((u=o(a))==null?void 0:u.required)}})}function Gp(e){var i;const n=vt(e);let r={parent:null};for(n.pop();n.length;){const o=n.shift();r.path=(i=r.parent)!=null&&i.path?He(r.parent.path,o):o,r={parent:r}}return r}function So(e){return t.computed(()=>Gp(t.toValue(e)))}function qp(e){const{formData:n}=je(),r=Po(e);return{value:t.computed({get:()=>nu(n,vt(r.value)),set:o=>Rp(n,vt(r.value),o)})}}function et(e){const{getSchema:n}=je(),r=Po(e),i=Fp(r),{value:o}=qp(e),a=t.computed(()=>n(r.value));return a.value?{schema:a,path:r,renderer:i,value:o,ancestors:So(r),error:null}:{error:new Error(`path '${r.value}' is not found in schema.`)}}function hr(e){const{getSchema:n}=je(),r=t.useAttrs();return t.computed(()=>{var o;if(r["data-autofocus"]!==void 0)return!0;if(!e)return!1;const i=t.toValue(e).parent;return i!=null&&i.path?((o=n(i.path))==null?void 0:o.type)==="array":!1})}const Hp="__request_callout_";function To(){return ur(Hp)}const zp={key:1},Wp=["innerHTML"],No=ue(t.defineComponent({inheritAttrs:!1,__name:"StringField",props:{name:{},labelAttributes:{},multiline:{type:Boolean},showVaultSecretPicker:{type:Boolean,default:()=>{}},showPasswordMaskToggle:{type:Boolean,default:()=>{}},type:{}},emits:["update:modelValue"],setup(e,{emit:n}){const r=t.useAttrs(),{i18n:i}=it(),o=t.createPropsRestProxy(e,["showVaultSecretPicker","showPasswordMaskToggle","name"]),a=n,{value:l,...s}=et(t.toRef(()=>e.name)),u=at(s.path,t.toRef({...o,...r})),f=l==null?void 0:l.value;function p(P){f!==void 0&&P===""&&P!==f?(l.value=null,a("update:modelValue",null)):(l.value=P.trim(),a("update:modelValue",P.trim()))}const c=t.computed(()=>{var P;return e.showPasswordMaskToggle!==void 0?e.showPasswordMaskToggle:o.type==="password"?!0:!!((P=s.schema)==null?void 0:P.value).encrypted}),d=t.computed(()=>o.multiline?Ae.KTextArea:Ae.KInput),m=t.inject(ke.AUTOFILL_SLOT,void 0),k=t.computed(()=>{var P;return e.showVaultSecretPicker!==void 0?e.showVaultSecretPicker:!!((P=s.schema.value)!=null&&P.referenceable)}),_=t.computed(()=>({referenceable:k.value})),g=hr(s.ancestors),A=t.computed(()=>r["data-1p-ignore"]!==void 0?r["data-1p-ignore"]:fr(e.name)==="name");return(P,O)=>{var U;const $=t.resolveComponent("KAlert");return s.error?(t.openBlock(),t.createBlock($,{key:0,appearance:"danger",message:s.error.message},null,8,["message"])):(t.openBlock(),t.createElementBlock("div",zp,[t.createVNode(t.unref(d),t.mergeProps({...t.unref(u),showPasswordMaskToggle:c.value,type:c.value?"password":"text"},{class:"ff-string-field","data-1p-ignore":A.value,"data-autofocus":t.unref(g),"data-testid":`ff-${s.path.value}`,"model-value":t.unref(l)??"","onUpdate:modelValue":p}),t.createSlots({_:2},[(U=t.unref(u).labelAttributes)!=null&&U.info?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(P.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(u).labelAttributes.info},null,8,Wp)],!0)]),key:"0"}:void 0]),1040,["data-1p-ignore","data-autofocus","data-testid","model-value"]),t.unref(m)&&k.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(m)),{key:0,schema:_.value,update:p,value:t.unref(l)??""},null,8,["schema","value"])):t.createCommentVNode("",!0),k.value&&!t.unref(m)?(t.openBlock(),t.createBlock($,{key:1,appearance:"warning","data-testid":`ff-vault-secret-picker-warning-${s.path.value}`,message:t.unref(i).t("plugins.free-form.vault_picker.component_error")},null,8,["data-testid","message"])):t.createCommentVNode("",!0)]))}}}),[["__scopeId","data-v-6321a76a"]]),Yp=["innerHTML"],Jp=ue(t.defineComponent({__name:"BooleanField",props:{name:{},labelAttributes:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:n}){const r=t.createPropsRestProxy(e,["name"]),{value:i,...o}=et(t.toRef(()=>e.name)),a=n,l=u=>{i.value=u,a("update:modelValue",u)},s=at(o.path,r);return(u,f)=>{var c;const p=t.resolveComponent("KAlert");return o.error?(t.openBlock(),t.createBlock(p,{key:0,appearance:"danger",message:o.error.message},null,8,["message"])):(t.openBlock(),t.createBlock(t.unref(Ae.KCheckbox),t.mergeProps({key:1},t.unref(s),{class:"ff-boolean-field","data-testid":`ff-${o.path.value}`,"model-value":t.unref(i)??!1,"onUpdate:modelValue":l}),t.createSlots({_:2},[(c=t.unref(s).labelAttributes)!=null&&c.info?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(u.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(s).labelAttributes.info},null,8,Yp)],!0)]),key:"0"}:void 0]),1040,["data-testid","model-value"]))}}}),[["__scopeId","data-v-8a828fad"]]),Xp=ue(t.defineComponent({__name:"SlideTransition",setup(e){const n=["height","padding-top","padding-bottom","margin-top","margin-bottom","border-top-width","border-bottom-width"],r=Object.fromEntries(n.map(d=>[d,""])),i=Object.fromEntries(n.map(d=>[d,"0"]));function o(d){const m=getComputedStyle(d);return Object.fromEntries(n.map(k=>[k,m.getPropertyValue(k)]))}function a(d){["overflow","transition",...n].forEach(m=>d.style.removeProperty(m))}function l(d){Object.assign(d.style,{overflow:"hidden",transition:"none"})}function s(d){const m=d;Object.assign(m.style,r);const k=o(m);Object.assign(m.style,i),requestAnimationFrame(()=>{Object.assign(m.style,{...k,transition:""})})}function u(d){a(d)}function f(d){const m=d;Object.assign(m.style,{...o(m),overflow:"hidden"})}function p(d){Object.assign(d.style,i)}function c(d){a(d)}return(d,m)=>(t.openBlock(),t.createBlock(t.Transition,{"enter-active-class":"ff-slide-active","leave-active-class":"ff-slide-active",onAfterEnter:u,onAfterLeave:c,onBeforeEnter:l,onBeforeLeave:f,onEnter:s,onLeave:p},{default:t.withCtx(()=>[t.renderSlot(d.$slots,"default",{},void 0,!0)]),_:3}))}}),[["__scopeId","data-v-481d7a76"]]),Qp=["data-testid"],Zp=["data-testid"],ef=["data-testid"],tf=["innerHTML"],nf={class:"ff-object-field-actions"},rf=["data-testid"],_t=ue(t.defineComponent({__name:"ObjectField",props:t.mergeModels({name:{},label:{},labelAttributes:{},required:{type:Boolean,default:()=>{}},defaultExpanded:{type:Boolean,default:!0},defaultAdded:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!0},appearance:{},omit:{},asChild:{type:Boolean,default:()=>{}},resetLabelPath:{},fieldsOrder:{}},{added:{type:Boolean,default:void 0},addedModifiers:{},expanded:{type:Boolean,default:void 0},expandedModifiers:{}}),emits:["update:added","update:expanded"],setup(e){t.useSlots();const n=t.createPropsRestProxy(e,["defaultExpanded","defaultAdded","collapsible","omit","required","asChild","resetLabelPath","fieldsOrder"]),{value:r,...i}=et(t.toRef(n,"name")),{getSchema:o,getDefault:a}=je(),l=t.useModel(e,"added"),s=t.useModel(e,"expanded"),u=t.computed(()=>d.value&&(e.collapsible?s.value??e.defaultExpanded:!1)),f=t.computed(()=>{var g,A;if((g=i.ancestors)!=null&&g.value){const P=i.ancestors.value.parent;if(P!=null&&P.path)return((A=o(P.path))==null?void 0:A.type)==="array"}return!1}),p=t.computed(()=>e.resetLabelPath!==void 0?e.resetLabelPath:f.value?"reset":"inherit"),c=at(i.path,t.toRef(()=>({required:e.required,...n,resetLabelPath:p.value}))),d=t.computed(()=>c.value.required?!0:l.value??e.defaultAdded),m=t.computed(()=>e.asChild!==void 0?e.asChild:f.value),k=t.computed(()=>{let g=i.schema.value.fields;return e.omit&&(g=g.filter(A=>!e.omit.includes(Object.keys(A)[0]))),e.fieldsOrder?g.sort((A,P)=>{const O=Object.keys(A)[0],$=Object.keys(P)[0],U=e.fieldsOrder.indexOf(O),h=e.fieldsOrder.indexOf($);return U===-1&&h===-1?0:U===-1?1:h===-1?-1:U-h}):g});function _(){l.value=!l.value,l.value?r.value=a(i.path.value):r.value=null}return t.watch(d,g=>{e.collapsible&&(s.value=g)}),t.onBeforeMount(()=>{l.value=!!(r!=null&&r.value)}),(g,A)=>{var O;const P=t.resolveComponent("KAlert");return t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(g.$slots[t.unref(It)]))),i.error?(t.openBlock(),t.createBlock(P,{key:0,appearance:"danger",message:i.error.message},null,8,["message"])):m.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"ff-object-field ff-object-field-as-child","data-testid":`ff-object-${i.path.value}`},[t.renderSlot(g.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,$=>(t.openBlock(),t.createBlock(kt,{key:Object.keys($)[0],name:Object.keys($)[0]},null,8,["name"]))),128))],!0)],8,Qp)):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["ff-object-field",{"ff-object-field-collapsed":!u.value}]),"data-testid":`ff-object-${i.path.value}`},[t.createElementVNode("header",{class:"ff-object-field-header","data-testid":`ff-object-header-${i.path.value}`},[t.createVNode(t.unref(Ae.KLabel),t.mergeProps({class:"ff-object-field-label","data-testid":`ff-label-${i.path.value}`},{...t.unref(c),required:!1},{"tooltip-attributes":t.unref(c).labelAttributes.tooltipAttributes}),t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(c).label)+" ",1)]),_:2},[(O=t.unref(c).labelAttributes)!=null&&O.info?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(c).labelAttributes.info},null,8,tf)],!0)]),key:"0"}:void 0]),1040,["data-testid","tooltip-attributes"]),t.createElementVNode("div",nf,[g.collapsible&&d.value?(t.openBlock(),t.createBlock(t.unref(Ae.KButton),{key:0,appearance:"tertiary",class:t.normalizeClass(`ff-object-field-button-${u.value?"collapse":"expand"}`),"data-testid":`ff-object-toggle-btn-${i.path.value}`,icon:"",onClick:A[0]||(A[0]=$=>s.value=!u.value)},{default:t.withCtx(()=>[d.value?(t.openBlock(),t.createBlock(t.unref(Ce.ChevronDownIcon),{key:0,class:"ff-object-field-button-icon"})):t.createCommentVNode("",!0)]),_:1},8,["class","data-testid"])):t.createCommentVNode("",!0),t.unref(c).required?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(Ae.KButton),{key:1,appearance:"tertiary",class:t.normalizeClass(`ff-object-field-button-${d.value?"remove":"add"}`),"data-testid":`ff-object-${d.value?"remove":"add"}-btn-${i.path.value}`,icon:"",onClick:_},{default:t.withCtx(()=>[d.value?(t.openBlock(),t.createBlock(t.unref(Ce.TrashIcon),{key:0})):(t.openBlock(),t.createBlock(t.unref(Ce.AddIcon),{key:1}))]),_:1},8,["class","data-testid"]))])],8,ef),t.createVNode(Xp,null,{default:t.withCtx(()=>[u.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"ff-object-field-content","data-testid":`ff-object-content-${i.path.value}`},[t.renderSlot(g.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,$=>(t.openBlock(),t.createBlock(kt,{key:Object.keys($)[0],name:Object.keys($)[0]},null,8,["name"]))),128))],!0)],8,rf)):t.createCommentVNode("",!0)]),_:3})],10,Zp))],64)}}}),[["__scopeId","data-v-b4c8195e"]]),of=["innerHTML"],af=ue(t.defineComponent({__name:"NumberField",props:{name:{},labelAttributes:{},max:{},min:{}},emits:["update:modelValue"],setup(e,{emit:n}){const r=t.createPropsRestProxy(e,["name"]),{value:i,...o}=et(t.toRef(()=>e.name)),a=at(o.path,r),l=t.computed(()=>{var k;const c=(k=o.schema)==null?void 0:k.value;if(c.gt)return{min:c.gt};const[d,m]=c.between??[];return{min:r.min??d,max:r.max??m}}),s=n,u=i.value;function f(c){u!==void 0&&c===""&&Number(c)!==u?(i.value=null,s("update:modelValue",null)):(i.value=Number(c),s("update:modelValue",Number(c)))}const p=hr(o.ancestors);return(c,d)=>{var k;const m=t.resolveComponent("KAlert");return o.error?(t.openBlock(),t.createBlock(m,{key:0,appearance:"danger",message:o.error.message},null,8,["message"])):(t.openBlock(),t.createBlock(t.unref(Ae.KInput),t.mergeProps({key:1,class:"ff-number-field"},{...t.unref(a),min:l.value.min,max:l.value.max},{"data-autofocus":t.unref(p),"data-testid":`ff-${o.path.value}`,"model-value":t.unref(i)??"",type:"number","onUpdate:modelValue":f}),t.createSlots({_:2},[(k=t.unref(a).labelAttributes)!=null&&k.info?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(c.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(a).labelAttributes.info},null,8,of)],!0)]),key:"0"}:void 0]),1040,["data-autofocus","data-testid","model-value"]))}}}),[["__scopeId","data-v-df4195d0"]]),lf=["innerHTML"],Rt=ue(t.defineComponent({__name:"EnumField",props:{name:{},labelAttributes:{},multiple:{type:Boolean,default:()=>{}},items:{},placeholder:{}},setup(e){const n=t.createPropsRestProxy(e,["name","items","multiple"]),{getSelectItems:r}=je(),{value:i,...o}=et(t.toRef(()=>e.name)),a=at(o.path,n),l=t.computed(()=>e.items?e.items:o.path?r(o.path.value):[]),s=t.computed(()=>{var f;return e.multiple!==void 0?e.multiple:((f=o.schema.value)==null?void 0:f.type)==="set"}),u=t.computed(()=>s.value?Ae.KMultiselect:Ae.KSelect);return(f,p)=>{var d;const c=t.resolveComponent("KAlert");return o.error?(t.openBlock(),t.createBlock(c,{key:0,appearance:"danger",message:o.error.message},null,8,["message"])):(t.openBlock(),t.createBlock(t.unref(u),t.mergeProps({key:1},t.unref(a),{modelValue:t.unref(i),"onUpdate:modelValue":p[0]||(p[0]=m=>t.isRef(i)?i.value=m:null),class:"ff-enum-field","data-testid":`ff-${o.path.value}`,items:l.value,"kpop-attributes":{"data-testid":`${o.path.value}-items`}}),t.createSlots({_:2},[(d=t.unref(a).labelAttributes)!=null&&d.info?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(f.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(a).labelAttributes.info},null,8,lf)],!0)]),key:"0"}:void 0]),1040,["modelValue","data-testid","items","kpop-attributes"]))}}}),[["__scopeId","data-v-181f0d06"]]),sf=["data-testid"],cf=["data-testid"],uf=["innerHTML"],df=["data-testid"],pf=ue(t.defineComponent({__name:"KeyValueField",props:{name:{},initialValue:{},label:{},keyPlaceholder:{},valuePlaceholder:{},defaultKey:{},defaultValue:{},labelAttributes:{},showVaultSecretPicker:{type:Boolean,default:()=>{}}},emits:["change"],setup(e,{expose:n,emit:r}){const i=t.createPropsRestProxy(e,["showVaultSecretPicker"]),{value:o,...a}=et(t.toRef(i,"name")),l=at(a.path,t.toRef({...i,...t.useAttrs()})),{i18n:s}=it(),u=r,f=t.ref(c(i.initialValue??(o==null?void 0:o.value)??{}));function p(){return ur("ff-kv-field-")}function c(C){return Object.entries(C).map(([y,S])=>({id:p(),key:y,value:S}))}const d=()=>{f.value.push({id:p(),key:i.defaultKey||"",value:i.defaultValue||""})},m=C=>{const y=f.value.findIndex(S=>S.id===C);y!==-1&&f.value.splice(y,1)},k=()=>{const C=Object.fromEntries(f.value.map(({key:y,value:S})=>[y,S]).filter(([y])=>y));o.value=C,u("change",C)},_=t.useTemplateRef("root");async function g(C,y="key"){var S;_.value&&(await t.nextTick(),(S=_.value.querySelector(`[data-${y}-input="${C}"]`))==null||S.focus())}t.watch(f,k,{deep:!0});function A(){d();const C=f.value.findIndex(({key:y})=>!y);g(C===-1?f.value.length-1:C)}function P(C){C===f.value.length-1&&d(),g(C+1)}const O=t.inject(ke.AUTOFILL_SLOT,void 0),$=t.computed(()=>{var C,y;return e.showVaultSecretPicker??!!((y=(C=a.schema.value)==null?void 0:C.values)!=null&&y.referenceable)}),U=t.computed(()=>({referenceable:$.value}));function h(C,y){f.value[C].value=y}return n({reset:()=>{f.value=c(i.initialValue||{})},setValue:C=>{f.value=c(C)}}),(C,y)=>{var w;const S=t.resolveComponent("KAlert"),ie=t.resolveComponent("KLabel"),J=t.resolveComponent("KButton"),X=t.resolveComponent("KInput");return a.error?(t.openBlock(),t.createBlock(S,{key:0,appearance:"danger",message:a.error.message},null,8,["message"])):(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"root",ref:_,class:"ff-kv-field","data-testid":`ff-kv-${a.path.value}`},[t.createElementVNode("header",{class:"ff-kv-field-header","data-testid":`ff-kv-header-${a.path.value}`},[t.createVNode(ie,t.mergeProps({class:"ff-kv-field-label"},t.unref(l),{"data-testid":`ff-label-${a.path.value}`,"tooltip-attributes":t.unref(l).labelAttributes.tooltipAttributes}),t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l).label)+" ",1)]),_:2},[(w=t.unref(l).labelAttributes)!=null&&w.info?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(C.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(l).labelAttributes.info},null,8,uf)],!0)]),key:"0"}:void 0]),1040,["data-testid","tooltip-attributes"]),t.createVNode(J,{appearance:"tertiary","data-testid":`ff-kv-add-btn-${a.path.value}`,icon:"",onClick:A},{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.AddIcon))]),_:1},8,["data-testid"])],8,cf),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,(N,v)=>(t.openBlock(),t.createElementBlock("div",{key:N.id,class:"ff-kv-field-entry","data-testid":`ff-kv-container-${a.path.value}.${v}`},[t.createVNode(X,{modelValue:N.key,"onUpdate:modelValue":F=>N.key=F,modelModifiers:{trim:!0},class:"ff-kv-field-entry-key","data-key-input":v,"data-testid":`ff-key-${a.path.value}.${v}`,placeholder:C.keyPlaceholder||"Key",onKeydown:t.withKeys(t.withModifiers(F=>g(v,"value"),["prevent"]),["enter"])},null,8,["modelValue","onUpdate:modelValue","data-key-input","data-testid","placeholder","onKeydown"]),t.createVNode(X,{modelValue:N.value,"onUpdate:modelValue":F=>N.value=F,modelModifiers:{trim:!0},class:"ff-kv-field-entry-value","data-testid":`ff-value-${a.path.value}.${v}`,"data-value-input":v,placeholder:C.valuePlaceholder||"Value",onKeydown:t.withKeys(t.withModifiers(F=>P(v),["prevent"]),["enter"])},{after:t.withCtx(()=>[t.unref(O)&&$.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(O)),{key:0,schema:U.value,update:F=>h(v,F),value:N.value},null,8,["schema","update","value"])):t.createCommentVNode("",!0),$.value&&!t.unref(O)?(t.openBlock(),t.createBlock(S,{key:1,appearance:"warning","data-testid":`ff-vault-secret-picker-warning-${a.path.value}`,message:t.unref(s).t("plugins.free-form.vault_picker.component_error")},null,8,["data-testid","message"])):t.createCommentVNode("",!0)]),_:2},1032,["modelValue","onUpdate:modelValue","data-testid","data-value-input","placeholder","onKeydown"]),t.createVNode(J,{appearance:"tertiary","data-testid":`ff-kv-remove-btn-${a.path.value}.${v}`,icon:"",onClick:F=>m(N.id)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.TrashIcon))]),_:2},1032,["data-testid","onClick"])],8,df))),128))],8,sf))}}}),[["__scopeId","data-v-51cf2493"]]),ff=["data-testid"],mf=["innerHTML"],Oo=ue(t.defineComponent({inheritAttrs:!1,__name:"TagField",props:{name:{},labelAttributes:{},multiline:{type:Boolean},type:{}},emits:["update:modelValue"],setup(e,{emit:n}){const r=t.useAttrs(),i=t.createPropsRestProxy(e,["name"]),o=n,{value:a,...l}=et(t.toRef(()=>e.name)),s=at(l.path,t.toRef({...i,...r})),u=t.computed(()=>{var _,g;return((g=(_=l.schema)==null?void 0:_.value)==null?void 0:g.len_min)&&l.schema.value.len_min>0}),f=t.ref("");function p(_){return _.map(g=>g.trim()).filter(Boolean).join(", ")}function c(_){return _.trim().split(",").map(g=>g.trim()).filter(Boolean)}function d(_){f.value=_;const g=c(_),A=!g.length&&u.value?null:g;a.value=A,o("update:modelValue",A)}const m=hr(l.ancestors),k=t.computed(()=>r["data-1p-ignore"]!==void 0?r["data-1p-ignore"]:fr(e.name)==="name");return t.watch(a,_=>{const g=_?p(_):"";p(c(f.value))!==g&&(f.value=g)},{immediate:!0}),(_,g)=>{var P;const A=t.resolveComponent("KAlert");return l.error?(t.openBlock(),t.createBlock(A,{key:0,appearance:"danger",message:l.error.message},null,8,["message"])):(t.openBlock(),t.createElementBlock("div",{key:1,"data-testid":`ff-tag-${l.path.value}`},[t.createVNode(t.unref(Ae.KInput),t.mergeProps(t.unref(s),{class:"ff-tag-field","data-1p-ignore":k.value,"data-autofocus":t.unref(m),"data-testid":`ff-${l.path.value}`,"model-value":f.value??"","onUpdate:modelValue":d}),t.createSlots({_:2},[(P=t.unref(s).labelAttributes)!=null&&P.info?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(_.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(s).labelAttributes.info},null,8,mf)],!0)]),key:"0"}:void 0]),1040,["data-1p-ignore","data-autofocus","data-testid","model-value"])],8,ff))}}}),[["__scopeId","data-v-6836b714"]]),kt=t.defineComponent({name:"AutoField",__name:"Field",props:{name:{}},emits:["globalAction"],setup(e){const n=e,r=et(t.toRef(n,"name")),i=t.computed(()=>{var o,a;switch((a=(o=r.schema)==null?void 0:o.value)==null?void 0:a.type){case"string":return"one_of"in r.schema.value?Rt:No;case"boolean":return"one_of"in r.schema.value?Rt:Jp;case"number":case"integer":return"one_of"in r.schema.value?Rt:af;case"array":return br;case"set":return Bp(r.schema)?Oo:Rt;case"record":return _t;case"map":return pf;default:return}});return(o,a)=>{const l=t.resolveComponent("KAlert");return t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.$slots[t.unref(It)]))),t.unref(r).error?(t.openBlock(),t.createBlock(l,{key:0,appearance:"danger",message:t.unref(r).error.message},null,8,["message"])):t.unref(r).renderer.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(r).renderer.value),{key:1,name:pr(t.unref(r).path.value),onGlobalAction:a[0]||(a[0]=(s,u)=>o.$emit("globalAction",s,u))},null,40,["name"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[i.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.value),{key:0,name:pr(t.unref(r).path.value)},null,8,["name"])):(t.openBlock(),t.createBlock(l,{key:1,appearance:"warning",message:`${t.unref(r).path.value} ${t.unref(r).schema.value.type} (no renderer yet)`},null,8,["message"])),t.renderSlot(o.$slots,"default")],64))],64)}}}),gf=["data-testid"],yf=["data-testid"],hf=["innerHTML"],bf=["data-testid"],_f={class:"ff-array-field-item-content"},kf=["data-index","data-testid"],br=ue(t.defineComponent({__name:"ArrayField",props:{name:{},items:{},label:{},labelAttributes:{},itemLabel:{type:[String,Function]},appearance:{},stickyTabs:{type:[Boolean,String,Number]}},emits:["add","remove"],setup(e,{emit:n}){var h;t.useCssVars(C=>({"17c340e7":U.value}));const r=e,i=n,{i18n:{t:o}}=it(),{getDefault:a}=je(),{value:l,...s}=et(t.toRef(r,"name")),u=at(s.path,t.toRef({...r,...t.useAttrs()})),f=t.reactive(new Map),p=t.computed(()=>r.items??t.toValue(l)??[]),c=t.computed(()=>r.appearance==="card"?Ae.KCard:"div");function d(){return ur("ff-array-field-")}function m(C,y){return C!=null&&typeof C=="object"?f.get(C):`ff-array-field-${y}`}function k(C,y){return typeof r.itemLabel=="function"?r.itemLabel(C,y):r.itemLabel||u.value.label||`Item #${y}`}t.watch(p,C=>{C.forEach(S=>{f.has(S)||f.set(S,d())});const y=new Set(C);[...f.keys()].forEach(S=>{y.has(S)||f.delete(S)})},{immediate:!0,deep:!0});const _=t.computed(()=>p.value.map((C,y)=>({hash:`#${m(C,y)}`,title:""}))),g=t.ref((h=_.value[0])==null?void 0:h.hash),A=async()=>{var y;const C=a(He(s.path.value,dr));Array.isArray(l.value)||(l.value=[]),l.value.push(C),i("add"),r.appearance==="tabs"&&(await t.nextTick(),g.value=(y=_.value[_.value.length-1])==null?void 0:y.hash),await t.nextTick(),$(p.value.length+1)},P=async C=>{var y;Array.isArray(l.value)&&l.value.splice(C,1),i("remove",C),r.appearance==="tabs"&&(g.value=(y=_.value[Math.max(0,C-1)])==null?void 0:y.hash)},O=t.useTemplateRef("root");function $(C){var S;if(!O.value)return;const y=Math.max(0,Math.min(C,p.value.length-1));(S=O.value.querySelector(`[data-index="${y}"] [data-autofocus]`))==null||S.focus()}const U=t.computed(()=>{const{appearance:C,stickyTabs:y}=r;return C!=="tabs"||y==null||y===!1?null:typeof y=="number"?`${r.stickyTabs}px`:typeof y=="string"?y:"0"});return(C,y)=>{var w;const S=t.resolveComponent("KAlert"),ie=t.resolveComponent("KLabel"),J=t.resolveComponent("KButton"),X=t.resolveComponent("KTabs");return s.error?(t.openBlock(),t.createBlock(S,{key:0,appearance:"danger",message:s.error.message},null,8,["message"])):(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"root",ref:O,class:t.normalizeClass(["ff-array-field",{[`ff-array-field-${C.appearance??"default"}`]:!0,"ff-array-field-sticky-tabs":C.stickyTabs}]),"data-testid":`ff-array-${s.path.value}`},[t.createElementVNode("header",{class:"ff-array-field-header","data-testid":`ff-array-header-${s.path.value}`},[t.createVNode(ie,t.mergeProps({class:"ff-array-field-label"},t.unref(u),{"data-testid":`ff-label-${s.path.value}`,"tooltip-attributes":t.unref(u).labelAttributes.tooltipAttributes}),t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(u).label)+" ",1)]),_:2},[(w=t.unref(u).labelAttributes)!=null&&w.info?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(C.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(u).labelAttributes.info},null,8,hf)],!0)]),key:"0"}:void 0]),1040,["data-testid","tooltip-attributes"]),t.createVNode(J,{appearance:"tertiary","aria-label":t.unref(o)("actions.add_entity",{entity:t.unref(o)("plugins.free-form.request-callout.entity_name")}),"data-testid":`ff-add-item-btn-${s.path.value}`,icon:"",onClick:A},{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.AddIcon))]),_:1},8,["aria-label","data-testid"])],8,yf),p.value.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[C.appearance!=="tabs"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"ff-array-field-container","data-testid":`ff-array-basic-container-${s.path.value}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,(N,v)=>(t.openBlock(),t.createBlock(t.unref(c),{key:m(N,v),class:"ff-array-field-item","data-index":v,"data-testid":`ff-array-item-${s.path.value}.${v}`},{default:t.withCtx(()=>[t.createElementVNode("div",_f,[C.$slots.item?t.renderSlot(C.$slots,"item",{key:0,fieldName:String(v),index:v},void 0,!0):(t.openBlock(),t.createBlock(kt,{key:1,name:String(v)},null,8,["name"]))]),t.createVNode(J,{appearance:"tertiary","aria-label":t.unref(o)("actions.remove_entity",{entity:t.unref(o)("plugins.free-form.request-callout.entity_name")}),class:"ff-array-field-item-remove","data-testid":`ff-array-remove-item-btn-${s.path.value}.${v}`,icon:"",onClick:F=>P(v)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.TrashIcon))]),_:2},1032,["aria-label","data-testid","onClick"])]),_:2},1032,["data-index","data-testid"]))),128))],8,bf)):(t.openBlock(),t.createBlock(t.unref(Ae.KCard),{key:1,"data-testid":`ff-array-tab-container-${s.path.value}`},{default:t.withCtx(()=>[t.createVNode(X,{modelValue:g.value,"onUpdate:modelValue":y[0]||(y[0]=N=>g.value=N),"data-testid":`ff-array-tabs-${s.path.value}`,tabs:_.value},t.createSlots({_:2},[t.renderList(p.value,(N,v)=>({name:m(N,v),fn:t.withCtx(()=>[t.createElementVNode("div",{class:"ff-array-field-item","data-index":v,"data-testid":`ff-array-item-${s.path.value}.${v}`},[C.$slots.item?t.renderSlot(C.$slots,"item",{key:0,fieldName:String(v),index:v},void 0,!0):(t.openBlock(),t.createBlock(kt,{key:1,name:String(v)},null,8,["name"]))],8,kf)])})),t.renderList(p.value,(N,v)=>({name:`${m(N,v)}-anchor`,fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k(N,v))+" ",1),t.createVNode(J,{appearance:"tertiary","aria-label":t.unref(o)("actions.remove_entity",{entity:t.unref(o)("plugins.free-form.request-callout.entity_name")}),class:"ff-array-field-item-remove","data-testid":`ff-array-remove-item-btn-${s.path.value}.${v}`,icon:"",onClick:t.withModifiers(F=>P(v),["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.TrashIcon))]),_:2},1032,["aria-label","data-testid","onClick"])])}))]),1032,["modelValue","data-testid","tabs"])]),_:3},8,["data-testid"]))],64)):t.createCommentVNode("",!0)],10,gf))}}}),[["__scopeId","data-v-1219bf57"]]),Yt=Symbol(),Cf=t.defineComponent({__name:"CalloutForm",props:{index:{},fieldName:{}},setup(e){const n=e,{formData:r}=je(),i=t.computed(()=>{const{callouts:l}=r.config;return l==null?[]:l.filter(({name:s})=>{var u;return s&&s!==((u=l[n.index])==null?void 0:u.name)})}),o=t.computed(()=>i.value.map(({[Yt]:l,name:s})=>({value:l,label:s}))),a=t.computed(()=>r.config.callouts[n.index]);return t.watch(o,()=>{a.value.depends_on=a.value.depends_on.filter(l=>o.value.some(s=>s.value===l))}),(l,s)=>(t.openBlock(),t.createBlock(_t,{name:l.fieldName},{depends_on:t.withCtx(u=>[t.createVNode(Rt,t.mergeProps(u,{items:o.value,multiple:"",required:!1}),null,16,["items"])]),request:t.withCtx(u=>[t.createVNode(_t,t.mergeProps(u,{"fields-order":["url","method","headers","query","body","http_opts","error","by_lua"]}),{method:t.withCtx(f=>[t.createVNode(Rt,t.mergeProps(f,{items:t.unref(yo)(["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"])}),null,16,["items"])]),_:2},1040)]),_:1},8,["name"]))}}),Af=t.defineComponent({__name:"CalloutsForm",setup(e){const{formData:n,getDefault:r}=je();function i(){const o=r("config.callouts.*");o.request.body.custom=o.request.body.custom??{};const a=n.config.callouts[n.config.callouts.length-1];a&&(a[Yt]=To())}return(o,a)=>(t.openBlock(),t.createBlock(br,{appearance:"tabs","item-label":l=>l.name||"New callout",name:"callouts",required:"","sticky-tabs":"",onAdd:i},{item:t.withCtx(({index:l,fieldName:s})=>[t.createVNode(Cf,{"field-name":s,index:l},null,8,["field-name","index"])]),_:1},8,["item-label"]))}}),xo=t.defineComponent({__name:"FieldRenderer",props:{match:{type:Function},priority:{}},setup(e){const n=e,{default:r}=t.useSlots(),i=t.inject(Pn);if(!i)throw new Error(Pn.toString()+"not provided");return r&&i.set(n.match,r),(o,a)=>null}}),vo=t.defineComponent({name:"SchemaForm",__name:"Form",props:{tag:{default:"form"},schema:{},data:{},config:{},fieldsOrder:{}},emits:["change","globalAction"],setup(e,{emit:n}){var f;const r=n,i=t.useSlots(),o=$p(e.schema);t.provide(Co,o);const a=p=>{var c;return Kn((c=e.config)==null?void 0:c.hasValue)?e.config.hasValue(p):!!p},l=t.computed(()=>{let p=o.getSchema().fields;return e.fieldsOrder?p.sort((c,d)=>{const m=Object.keys(c)[0],k=Object.keys(d)[0],_=e.fieldsOrder.indexOf(m),g=e.fieldsOrder.indexOf(k);return _===-1&&g===-1?0:_===-1?1:g===-1?-1:_-g}):p}),s=t.reactive((f=e.config)!=null&&f.prepareFormData?e.config.prepareFormData(a(e.data)?e.data:o.getDefault()):a(e.data)?e.data:o.getDefault());t.provide(ko,s),t.provide(mr,xp(i,"default",It));const u=new Map;return t.provide(Pn,u),t.provide(Eo,e.config??{}),t.watch(s,p=>{r("change",t.toValue(p))},{deep:!0,immediate:!0}),(p,c)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(p.tag),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(i)[t.unref(It)]))),t.renderSlot(p.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,d=>(t.openBlock(),t.createBlock(kt,{key:Object.keys(d)[0],name:Object.keys(d)[0],onGlobalAction:c[0]||(c[0]=(m,k)=>r("globalAction",m,k))},null,8,["name"]))),128))])]),_:3}))}}),Ef={class:"ff-advanced-fields"},wf=ue(t.defineComponent({__name:"AdvancedFields",setup(e){const{t:n}=Ge.createI18n("en-us",qe),{getSchema:r}=je(),i=t.ref(!0);return(o,a)=>(t.openBlock(),t.createBlock(t.unref(Ae.KCollapse),{modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=l=>i.value=l),"trigger-label":i.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",Ef,[t.unref(r)("instance_name")?(t.openBlock(),t.createBlock(kt,{key:0,name:"instance_name"})):t.createCommentVNode("",!0),t.unref(r)("protocols")?(t.openBlock(),t.createBlock(kt,{key:1,name:"protocols"})):t.createCommentVNode("",!0),t.unref(r)("tags")?(t.openBlock(),t.createBlock(Oo,{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.renderSlot(o.$slots,"default",{},void 0,!0)])]),_:3},8,["modelValue","trigger-label"]))}}),[["__scopeId","data-v-190b1d21"]]),Pf=t.defineComponent({__name:"ConfigForm",props:{schema:{},data:{},onChange:{type:Function}},emits:["change"],setup(e,{emit:n}){const r=n,i={prepareFormData:l,hasValue:s},{i18n:{t:o}}=it();function a(f,p=!1){return f.reduce((c,{[Yt]:d,name:m})=>(p?c[m]=d:c[d]=m,c),{})}function l(f){var m;const p=co(f);if(!((m=p.config)!=null&&m.callouts))return p;const{callouts:c}=p.config;c.forEach(k=>{k.request.body.custom=k.request.body.custom??{},k[Yt]=To()});const d=a(c,!0);return c.forEach(k=>{k.depends_on=k.depends_on.map(_=>d[_])}),p}function s(f){return!!(f!=null&&f.config)}function u(f){var d;if(!f)return;const p=co(f);if(!((d=p.config)!=null&&d.callouts))throw new Error("data is not correct");const c=a(p.config.callouts);p.config.callouts=p.config.callouts.map(m=>{const{[Yt]:k,depends_on:_,...g}=m;return{depends_on:_.map(A=>c[A]).filter(A=>A!=null),...g}}),r("change",p)}return(f,p)=>(t.openBlock(),t.createBlock(vo,{class:"rc-config-form",config:i,data:f.data,schema:f.schema,tag:"div",onChange:u},{[t.unref(It)]:t.withCtx(()=>[t.createVNode(xo,{match:({path:c})=>c.endsWith("by_lua")},{default:t.withCtx(c=>[t.createVNode(No,t.mergeProps(c,{autosize:"",class:"rc-code",multiline:"",placeholder:t.unref(o)("plugins.free-form.request-callout.by_lua_placeholder")}),null,16,["placeholder"])]),_:1},8,["match"]),t.createVNode(xo,{match:({path:c})=>["cluster_nodes","sentinel_nodes"].some(d=>c.endsWith(d))},{default:t.withCtx(c=>[t.createVNode(br,t.mergeProps(c,{appearance:"card"}),null,16)]),_:1},8,["match"])]),default:t.withCtx(()=>[t.createVNode(_t,{"as-child":"",name:"config","reset-label-path":"reset"},{default:t.withCtx(()=>[t.createVNode(Af),t.createVNode(_t,{appearance:"card","fields-order":["headers","query","body","by_lua"],name:"upstream"}),t.createVNode(_t,{appearance:"card",name:"cache"},{redis:t.withCtx(c=>[t.createVNode(_t,t.mergeProps(c,{"fields-order":["host","port","connection_is_proxied","database","username","password","sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","cluster_nodes","cluster_max_redirections","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]}),null,16)]),_:2},1024)]),_:1}),t.createVNode(wf)]),_:2},1032,["data","schema"]))}}),Sf={class:"sc-form-pinned-fields"},Tf={class:"sc-form-config-form"},Nf=ue(t.defineComponent({__name:"PluginFormWrapper",props:{schema:{},formSchema:{},model:{},formModel:{},formOptions:{},isEditing:{type:Boolean},onModelUpdated:{type:Function},onFormChange:{type:Function}},setup(e){const{t:n}=Ge.createI18n("en-us",qe),r=e;t.useSlots();function i(p){return t.computed(()=>({fields:t.toValue(p).map(c=>{var d;return(d=r.formSchema)==null?void 0:d.fields.find(m=>m.model===c)}).filter(Boolean)}))}const a=i(["enabled","selectionGroup"]),l=["config","protocols"],s=t.computed(()=>{const p=r.schema;p.fields=p.fields.filter(d=>l.includes(Object.keys(d)[0])),p.fields.unshift({instance_name:{type:"string",description:n("plugins.form.fields.instance_name.help")}},{tags:{type:"set",default:[],description:n("plugins.form.fields.tags.help"),elements:{type:"string"}}});const c=p.fields.find(d=>Object.keys(d)[0]==="protocols");return c&&(c.protocols.help=c.protocols.default?n("plugins.form.fields.protocols.placeholderWithDefaultValues",{protocols:c.protocols.default.join(", ")}):n("plugins.form.fields.protocols.placeholder"),c.protocols.description=n("plugins.form.fields.protocols.help")),p}),u=t.ref(!1);function f(p){return cr(p,["config","instance_name","partials","protocols","tags"])}return(p,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Sf,[t.createVNode(t.unref(ke.VueFormGenerator),{model:p.formModel,options:p.formOptions,schema:t.unref(a),onModelUpdated:p.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])]),t.createVNode(t.unref(Ae.KCollapse),{modelValue:u.value,"onUpdate:modelValue":c[1]||(c[1]=d=>u.value=d),class:"sc-form-config-fields"},{title:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.form.grouping.plugin_configuration.title")),1)]),"visible-content":t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.form.grouping.plugin_configuration.description")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",Tf,[t.renderSlot(p.$slots,"default",{data:f(p.model),schema:s.value,onChange:c[0]||(c[0]=(...d)=>p.onFormChange&&p.onFormChange(...d))},void 0,!0)])]),_:3},8,["modelValue"])],64))}}),[["__scopeId","data-v-69e89166"]]),Of=t.defineComponent({__name:"RequestCalloutForm",props:{schema:{},formSchema:{},model:{},formModel:{},formOptions:{},isEditing:{type:Boolean},onModelUpdated:{type:Function},onFormChange:{type:Function}},setup(e){const n=e,r=t.useSlots();return t.provide(ke.AUTOFILL_SLOT,r==null?void 0:r[ke.AUTOFILL_SLOT_NAME]),(i,o)=>(t.openBlock(),t.createBlock(Nf,t.normalizeProps(t.guardReactiveProps(n)),{default:t.withCtx(a=>[t.createVNode(Pf,t.normalizeProps(t.guardReactiveProps(a)),null,16)]),_:1},16))}}),xf={};function vf(e,n){return t.openBlock(),t.createElementBlock("div",null,"TODO")}const If=ue(xf,[["render",vf]]),Rf={class:"ff-standard-layout"},Lf={class:"enabled"},Bf={class:"scope"},Df={key:0,class:"scope-detail"},$f=ue(t.defineComponent({__name:"StandardLayout",props:{generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},formOptions:{},isEditing:{type:Boolean},onModelUpdated:{type:Function},onFormChange:{type:Function},onValidityChange:{type:Function}},setup(e){const{t:n}=Ge.createI18n("en-us",qe),r=e,i=t.useSlots();t.provide(ke.AUTOFILL_SLOT,i==null?void 0:i[ke.AUTOFILL_SLOT_NAME]);const o=t.computed(()=>{var g;return{fields:(g=r.formSchema)==null?void 0:g.fields.filter(A=>A.model==="enabled")}}),a=t.computed(()=>{var g;return(g=r.formSchema)==null?void 0:g.fields.find(A=>A.model==="selectionGroup")}),l=t.computed(()=>(a.value.fields||[]).map(({label:g,description:A})=>({label:g,description:A}))),s=t.computed(()=>a.value.fields[1]),u=t.computed(()=>{var A;const g=["instance_name","protocols","tags"];return{fields:(A=r.formSchema)==null?void 0:A.fields.filter(P=>g.includes(P.model))}}),f=["config"],p=t.computed(()=>{const g=r.schema;return g.fields=g.fields.filter(A=>f.includes(Object.keys(A)[0])),g});function c(g){return cr(g,["config","partials"])}const d=t.ref(!1),m=t.ref(!0),k=cr(r.formModel,["service-id","route-id","consumer-id","consumer_group-id"]);function _(g,A){k[A]=g,r.onModelUpdated(g,A)}return t.watch(d,g=>{g?Object.keys(k).forEach(A=>{r.onModelUpdated(k[A],A)}):Object.keys(k).forEach(A=>{r.onModelUpdated("",A)})}),(g,A)=>{const P=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock("div",Rf,[t.createVNode(t.unref(D.EntityFormBlock),{description:t.unref(n)("plugins.form.sections.general_info.description"),step:1,title:t.unref(n)("plugins.form.sections.general_info.title")},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("div",Lf,[t.createVNode(t.unref(ke.VueFormGenerator),{model:g.formModel,options:g.formOptions,schema:o.value,onModelUpdated:g.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])]),t.createElementVNode("div",Bf,[t.createVNode(t.unref(Ae.KRadio),t.mergeProps({modelValue:d.value,"onUpdate:modelValue":A[0]||(A[0]=O=>d.value=O),card:"","card-orientation":"horizontal"},l.value[0],{"selected-value":!1}),null,16,["modelValue"]),t.createVNode(t.unref(Ae.KRadio),t.mergeProps({modelValue:d.value,"onUpdate:modelValue":A[1]||(A[1]=O=>d.value=O),card:"","card-orientation":"horizontal"},l.value[1],{"selected-value":!0}),null,16,["modelValue"])]),d.value?(t.openBlock(),t.createElementBlock("div",Df,[t.createVNode(t.unref(ke.VueFormGenerator),{model:g.formModel,options:g.formOptions,schema:s.value,onModelUpdated:_},null,8,["model","options","schema"])])):t.createCommentVNode("",!0),t.createVNode(P,{modelValue:m.value,"onUpdate:modelValue":A[2]||(A[2]=O=>m.value=O),"trigger-label":"Show more"},{default:t.withCtx(()=>[t.createVNode(t.unref(ke.VueFormGenerator),{model:g.formModel,options:g.formOptions,schema:u.value,onModelUpdated:g.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])]),_:1},8,["modelValue"])]),_:2},[i["general-info-title"]?{name:"title",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"general-info-title",{},void 0,!0)]),key:"0"}:void 0,i["general-info-description"]?{name:"description",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"general-info-description",{},void 0,!0)]),key:"1"}:void 0,i["general-info-extra"]?{name:"extra",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"general-info-extra",{},void 0,!0)]),key:"2"}:void 0]),1032,["description","title"]),t.createVNode(t.unref(D.EntityFormBlock),{description:t.unref(n)("plugins.form.sections.plugin_config.description"),step:2,title:t.unref(n)("plugins.form.sections.plugin_config.title")},t.createSlots({default:t.withCtx(()=>[t.renderSlot(g.$slots,"default",{data:c(g.model),schema:p.value,onChange:A[3]||(A[3]=(...O)=>g.onFormChange&&g.onFormChange(...O))},void 0,!0)]),_:2},[i["plugin-config-title"]?{name:"title",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"plugin-config-title",{},void 0,!0)]),key:"0"}:void 0,i["plugin-config-description"]?{name:"description",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"plugin-config-description",{},void 0,!0)]),key:"1"}:void 0,i["plugin-config-extra"]?{name:"extra",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"plugin-config-extra",{},void 0,!0)]),key:"2"}:void 0]),1032,["description","title"])])}}}),[["__scopeId","data-v-a727028f"]]);typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ff=e=>e!=null;/*!
|
|
11
|
+
it will be generated for you.`,inputType:"password",encrypted:!0}},{redirect_uris:Pt.fields.arrayItems({label:"Redirect URI(s)",hint:`One or more URLs in your app where users will be sent after
|
|
12
|
+
authorization (RFC 6742 Section 3.1.2)`,newElementButtonLabel:"+ Add Redirect URI",inputAttributes:{placeholder:"Enter URI"}})},{tags:Pt.tags}]},kl={fields:[{id:{uuid:!0,auto:!0,type:"string",description:"A string representing a UUID (universally unique identifier)."}},{created_at:{description:"An integer representing an automatic Unix timestamp in seconds.",timestamp:!0,auto:!0,type:"integer"}},{consumer:{on_delete:"cascade",type:"foreign",reference:"consumers",required:!0}},{name:{required:!0,type:"string"}},{client_id:{required:!1,hint:"You can optionally set your own unique client_id. If missing, it will be generated for you.",unique:!0,auto:!0,type:"string"}},{client_secret:{required:!1,hint:"You can optionally set your own unique client_secret. If missing, it will be generated for you.",auto:!0,type:"string",encrypted:!0}},{hash_secret:{required:!0,type:"boolean",default:!1}},{redirect_uris:{required:!1,hint:"One or more URLs in your app where users will be sent after authorization (RFC 6742 Section 3.1.2)",type:"array",elements:{type:"string"}}},{tags:{elements:{required:!0,type:"string",description:"A string representing a tag."},type:"set",description:"A set of strings representing tags."}},{client_type:{required:!0,default:"confidential",type:"string",one_of:["confidential","public"]}}]},oi={fields:[{key:{submitWhenNull:!1,hint:`You can optionally set your own unique key to authenticate the
|
|
13
|
+
client. If missing, it will be generated for you.`,inputType:"password",encrypted:!0}},{tags:ft}]},Cl={fields:[{id:{type:"string",auto:!0,uuid:!0,description:"A string representing a UUID (universally unique identifier)."}},{created_at:{type:"integer",auto:!0,timestamp:!0,description:"An integer representing an automatic Unix timestamp in seconds."}},{consumer:{required:!0,on_delete:"cascade",reference:"consumers",type:"foreign"}},{key:{required:!1,unique:!0,auto:!0,encrypted:!0,type:"string"}},{tags:{type:"set",elements:{type:"string",required:!0,description:"A string representing a tag."},description:"A set of strings representing tags."}}]},et={"basic-auth":{descriptionKey:"plugins.meta.basic-auth.description",isEnterprise:!1,nameKey:"plugins.meta.basic-auth.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["basic-auth"]},"hmac-auth":{descriptionKey:"plugins.meta.hmac-auth.description",isEnterprise:!1,nameKey:"plugins.meta.hmac-auth.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["hmac-auth"]},"jwt-signer":{descriptionKey:"plugins.meta.jwt-signer.description",isEnterprise:!0,nameKey:"plugins.meta.jwt-signer.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["jwt-signer"]},jwt:{descriptionKey:"plugins.meta.jwt.description",isEnterprise:!1,nameKey:"plugins.meta.jwt.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.jwt},"key-auth":{descriptionKey:"plugins.meta.key-auth.description",isEnterprise:!1,nameKey:"plugins.meta.key-auth.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["key-auth"]},"key-auth-enc":{descriptionKey:"plugins.meta.key-auth-enc.description",isEnterprise:!1,nameKey:"plugins.meta.key-auth-enc.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["key-auth-enc"]},"ldap-auth-advanced":{descriptionKey:"plugins.meta.ldap-auth-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.ldap-auth-advanced.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["ldap-auth-advanced"]},"ldap-auth":{descriptionKey:"plugins.meta.ldap-auth.description",isEnterprise:!1,nameKey:"plugins.meta.ldap-auth.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["ldap-auth"]},"oauth2-introspection":{descriptionKey:"plugins.meta.oauth2-introspection.description",isEnterprise:!0,nameKey:"plugins.meta.oauth2-introspection.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["oauth2-introspection"]},oauth2:{descriptionKey:"plugins.meta.oauth2.description",isEnterprise:!1,nameKey:"plugins.meta.oauth2.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.oauth2},"openid-connect":{descriptionKey:"plugins.meta.openid-connect.description",isEnterprise:!0,nameKey:"plugins.meta.openid-connect.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["openid-connect"]},"mtls-auth":{descriptionKey:"plugins.meta.mtls-auth.description",isEnterprise:!0,nameKey:"plugins.meta.mtls-auth.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["mtls-auth"]},"vault-auth":{descriptionKey:"plugins.meta.vault-auth.description",isEnterprise:!0,nameKey:"plugins.meta.vault-auth.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["vault-auth"]},"bot-detection":{descriptionKey:"plugins.meta.bot-detection.description",isEnterprise:!1,nameKey:"plugins.meta.bot-detection.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["bot-detection"]},cors:{descriptionKey:"plugins.meta.cors.description",isEnterprise:!1,nameKey:"plugins.meta.cors.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.cors},"ip-restriction":{descriptionKey:"plugins.meta.ip-restriction.description",isEnterprise:!1,nameKey:"plugins.meta.ip-restriction.name",fieldRules:{atLeastOneOf:[["config.allow","config.deny"]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP["ip-restriction"]},opa:{descriptionKey:"plugins.meta.opa.description",isEnterprise:!0,nameKey:"plugins.meta.opa.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.opa},"kubernetes-sidecar-injector":{descriptionKey:"plugins.meta.kubernetes-sidecar-injector.description",isEnterprise:!1,nameKey:"plugins.meta.kubernetes-sidecar-injector.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["kubernetes-sidecar-injector"]},"request-validator":{descriptionKey:"plugins.meta.request-validator.description",isEnterprise:!0,nameKey:"plugins.meta.request-validator.name",fieldRules:{atLeastOneOf:[["config.body_schema","config.parameter_schema"]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP["request-validator"]},acl:{descriptionKey:"plugins.meta.acl.description",isEnterprise:!1,nameKey:"plugins.meta.acl.name",fieldRules:{onlyOneOf:[["config.allow","config.deny"]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP.acl},canary:{descriptionKey:"plugins.meta.canary.description",isEnterprise:!0,nameKey:"plugins.meta.canary.name",fieldRules:{atLeastOneOf:[["config.upstream_uri","config.upstream_host","config.upstream_port"]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP.canary},"forward-proxy":{descriptionKey:"plugins.meta.forward-proxy.description",isEnterprise:!0,nameKey:"plugins.meta.forward-proxy.name",fieldRules:{onlyOneOfMutuallyRequired:[[["config.http_proxy_host","config.http_proxy_port"],["config.https_proxy_host","config.https_proxy_port"]]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP["forward-proxy"]},"proxy-cache":{descriptionKey:"plugins.meta.proxy-cache.description",isEnterprise:!0,nameKey:"plugins.meta.proxy-cache.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["proxy-cache"]},"proxy-cache-advanced":{descriptionKey:"plugins.meta.proxy-cache-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.proxy-cache-advanced.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["proxy-cache-advanced"]},"graphql-proxy-cache-advanced":{descriptionKey:"plugins.meta.graphql-proxy-cache-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.graphql-proxy-cache-advanced.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["graphql-proxy-cache-advanced"]},"rate-limiting-advanced":{descriptionKey:"plugins.meta.rate-limiting-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.rate-limiting-advanced.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["rate-limiting-advanced"]},"rate-limiting":{descriptionKey:"plugins.meta.rate-limiting.description",isEnterprise:!1,nameKey:"plugins.meta.rate-limiting.name",fieldRules:{atLeastOneOf:[["config.second","config.minute","config.hour","config.day","config.month","config.year"]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP["rate-limiting"]},"graphql-rate-limiting-advanced":{descriptionKey:"plugins.meta.graphql-rate-limiting-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.graphql-rate-limiting-advanced.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["graphql-rate-limiting-advanced"]},mocking:{descriptionKey:"plugins.meta.mocking.description",isEnterprise:!0,nameKey:"plugins.meta.mocking.name",fieldRules:{atLeastOneOf:[["config.api_specification_filename","config.api_specification"]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP.mocking},"request-size-limiting":{descriptionKey:"plugins.meta.request-size-limiting.description",isEnterprise:!1,nameKey:"plugins.meta.request-size-limiting.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["request-size-limiting"]},"request-termination":{descriptionKey:"plugins.meta.request-termination.description",isEnterprise:!1,nameKey:"plugins.meta.request-termination.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["request-termination"]},"response-ratelimiting":{descriptionKey:"plugins.meta.response-ratelimiting.description",isEnterprise:!1,nameKey:"plugins.meta.response-ratelimiting.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["response-ratelimiting"]},"route-by-header":{descriptionKey:"plugins.meta.route-by-header.description",isEnterprise:!0,nameKey:"plugins.meta.route-by-header.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["route-by-header"]},"ai-proxy":{descriptionKey:"plugins.meta.ai-proxy.description",isEnterprise:!0,nameKey:"plugins.meta.ai-proxy.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-proxy"]},"ai-prompt-decorator":{descriptionKey:"plugins.meta.ai-prompt-decorator.description",isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-decorator.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-prompt-decorator"]},"ai-prompt-template":{descriptionKey:"plugins.meta.ai-prompt-template.description",isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-template.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-prompt-template"]},"ai-prompt-guard":{descriptionKey:"plugins.meta.ai-prompt-guard.description",isEnterprise:!0,nameKey:"plugins.meta.ai-prompt-guard.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-prompt-guard"]},"ai-request-transformer":{descriptionKey:"plugins.meta.ai-request-transformer.description",isEnterprise:!0,nameKey:"plugins.meta.ai-request-transformer.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-request-transformer"]},"ai-response-transformer":{descriptionKey:"plugins.meta.ai-response-transformer.description",isEnterprise:!0,nameKey:"plugins.meta.ai-response-transformer.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-response-transformer"]},"ai-rate-limiting-advanced":{descriptionKey:"plugins.meta.ai-rate-limiting-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.ai-rate-limiting-advanced.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-rate-limiting-advanced"]},"ai-azure-content-safety":{descriptionKey:"plugins.meta.ai-azure-content-safety.description",isEnterprise:!0,nameKey:"plugins.meta.ai-azure-content-safety.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-azure-content-safety"]},"aws-lambda":{descriptionKey:"plugins.meta.aws-lambda.description",isEnterprise:!1,nameKey:"plugins.meta.aws-lambda.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["aws-lambda"]},"azure-functions":{descriptionKey:"plugins.meta.azure-functions.description",isEnterprise:!0,nameKey:"plugins.meta.azure-functions.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["azure-functions"]},openwhisk:{descriptionKey:"plugins.meta.openwhisk.description",isEnterprise:!1,nameKey:"plugins.meta.openwhisk.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.openwhisk},"pre-function":{descriptionKey:"plugins.meta.pre-function.description",isEnterprise:!0,nameKey:"plugins.meta.pre-function.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["pre-function"]},"post-function":{descriptionKey:"plugins.meta.post-function.description",isEnterprise:!0,nameKey:"plugins.meta.post-function.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["post-function"]},datadog:{descriptionKey:"plugins.meta.datadog.description",isEnterprise:!1,nameKey:"plugins.meta.datadog.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.datadog},prometheus:{descriptionKey:"plugins.meta.prometheus.description",isEnterprise:!0,nameKey:"plugins.meta.prometheus.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.prometheus},zipkin:{descriptionKey:"plugins.meta.zipkin.description",isEnterprise:!0,nameKey:"plugins.meta.zipkin.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.zipkin},collector:{descriptionKey:"plugins.meta.collector.description",isEnterprise:!0,nameKey:"plugins.meta.collector.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.collector},"response-transformer-advanced":{descriptionKey:"plugins.meta.response-transformer-advanced.description",isEnterprise:!1,nameKey:"plugins.meta.response-transformer-advanced.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["response-transformer-advanced"]},"correlation-id":{descriptionKey:"plugins.meta.correlation-id.description",isEnterprise:!1,nameKey:"plugins.meta.correlation-id.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["correlation-id"]},"request-transformer-advanced":{descriptionKey:"plugins.meta.request-transformer-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.request-transformer-advanced.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["request-transformer-advanced"]},"request-transformer":{descriptionKey:"plugins.meta.request-transformer.description",isEnterprise:!1,nameKey:"plugins.meta.request-transformer.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["request-transformer"]},"response-transformer":{descriptionKey:"plugins.meta.response-transformer.description",isEnterprise:!1,nameKey:"plugins.meta.response-transformer.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["response-transformer"]},"route-transformer-advanced":{descriptionKey:"plugins.meta.route-transformer-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.route-transformer-advanced.name",fieldRules:{atLeastOneOf:[["config.path","config.port","config.host"]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP["route-transformer-advanced"]},"kafka-upstream":{descriptionKey:"plugins.meta.kafka-upstream.description",isEnterprise:!0,nameKey:"plugins.meta.kafka-upstream.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["kafka-upstream"]},degraphql:{descriptionKey:"plugins.meta.degraphql.description",isEnterprise:!0,nameKey:"plugins.meta.degraphql.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.degraphql},"exit-transformer":{descriptionKey:"plugins.meta.exit-transformer.description",isEnterprise:!0,nameKey:"plugins.meta.exit-transformer.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["exit-transformer"]},jq:{descriptionKey:"plugins.meta.jq.description",isEnterprise:!0,nameKey:"plugins.meta.jq.name",fieldRules:{atLeastOneOf:[["config.request_jq_program","config.response_jq_program"]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP.jq},"file-log":{descriptionKey:"plugins.meta.file-log.description",isEnterprise:!1,nameKey:"plugins.meta.file-log.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["file-log"]},"http-log":{descriptionKey:"plugins.meta.http-log.description",isEnterprise:!1,nameKey:"plugins.meta.http-log.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["http-log"]},loggly:{descriptionKey:"plugins.meta.loggly.description",isEnterprise:!1,nameKey:"plugins.meta.loggly.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.loggly},"statsd-advanced":{descriptionKey:"plugins.meta.statsd-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.statsd-advanced.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["statsd-advanced"]},statsd:{descriptionKey:"plugins.meta.statsd.description",isEnterprise:!1,nameKey:"plugins.meta.statsd.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.statsd},syslog:{descriptionKey:"plugins.meta.syslog.description",isEnterprise:!1,nameKey:"plugins.meta.syslog.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.syslog},"tcp-log":{descriptionKey:"plugins.meta.tcp-log.description",isEnterprise:!1,nameKey:"plugins.meta.tcp-log.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["tcp-log"]},"udp-log":{descriptionKey:"plugins.meta.udp-log.description",isEnterprise:!1,nameKey:"plugins.meta.udp-log.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["udp-log"]},"kafka-log":{descriptionKey:"plugins.meta.kafka-log.description",isEnterprise:!0,nameKey:"plugins.meta.kafka-log.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["kafka-log"]},session:{descriptionKey:"plugins.meta.session.description",isEnterprise:!1,nameKey:"plugins.meta.session.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.session},"upstream-tls":{descriptionKey:"plugins.meta.upstream-tls.description",isEnterprise:!0,nameKey:"plugins.meta.upstream-tls.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["upstream-tls"]},"application-registration":{descriptionKey:"plugins.meta.application-registration.description",isEnterprise:!0,nameKey:"plugins.meta.application-registration.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["application-registration"]},"konnect-application-auth":{descriptionKey:"plugins.meta.konnect-application-auth.description",isEnterprise:!1,nameKey:"plugins.meta.konnect-application-auth.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["konnect-application-auth"]},acme:{descriptionKey:"plugins.meta.acme.description",isEnterprise:!1,nameKey:"plugins.meta.acme.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.acme},"grpc-gateway":{descriptionKey:"plugins.meta.grpc-gateway.description",isEnterprise:!1,nameKey:"plugins.meta.grpc-gateway.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["grpc-gateway"]},"grpc-web":{descriptionKey:"plugins.meta.grpc-web.description",isEnterprise:!1,nameKey:"plugins.meta.grpc-web.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["grpc-web"]},"upstream-timeout":{descriptionKey:"plugins.meta.upstream-timeout.description",isEnterprise:!0,nameKey:"plugins.meta.upstream-timeout.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["upstream-timeout"]},opentelemetry:{descriptionKey:"plugins.meta.opentelemetry.description",isEnterprise:!1,nameKey:"plugins.meta.opentelemetry.name",fieldRules:{atLeastOneOf:[["config.traces_endpoint","config.logs_endpoint"]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP.opentelemetry},"websocket-validator":{descriptionKey:"plugins.meta.websocket-validator.description",isEnterprise:!0,nameKey:"plugins.meta.websocket-validator.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["websocket-validator"]},"websocket-size-limit":{descriptionKey:"plugins.meta.websocket-size-limit.description",isEnterprise:!0,nameKey:"plugins.meta.websocket-size-limit.name",fieldRules:{atLeastOneOf:[["config.client_max_payload","config.upstream_max_payload"]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP["websocket-size-limit"]},"tls-metadata-headers":{descriptionKey:"plugins.meta.tls-metadata-headers.description",isEnterprise:!0,nameKey:"plugins.meta.tls-metadata-headers.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["tls-metadata-headers"]},"tls-handshake-modifier":{descriptionKey:"plugins.meta.tls-handshake-modifier.description",isEnterprise:!0,nameKey:"plugins.meta.tls-handshake-modifier.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["tls-handshake-modifier"]},"oas-validation":{descriptionKey:"plugins.meta.oas-validation.description",isEnterprise:!0,nameKey:"plugins.meta.oas-validation.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["oas-validation"]},"jwe-decrypt":{descriptionKey:"plugins.meta.jwe-decrypt.description",isEnterprise:!0,nameKey:"plugins.meta.jwe-decrypt.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["jwe-decrypt"]},"xml-threat-protection":{descriptionKey:"plugins.meta.xml-threat-protection.description",isEnterprise:!0,nameKey:"plugins.meta.xml-threat-protection.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["xml-threat-protection"]},saml:{descriptionKey:"plugins.meta.saml.description",isEnterprise:!0,nameKey:"plugins.meta.saml.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.saml},"app-dynamics":{descriptionKey:"plugins.meta.app-dynamics.description",isEnterprise:!0,nameKey:"plugins.meta.app-dynamics.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["app-dynamics"]},"json-threat-protection":{descriptionKey:"plugins.meta.json-threat-protection.description",isEnterprise:!0,nameKey:"plugins.meta.json-threat-protection.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["json-threat-protection"]},"standard-webhooks":{descriptionKey:"plugins.meta.standard-webhooks.description",isEnterprise:!1,nameKey:"plugins.meta.standard-webhooks.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["standard-webhooks"]},"ai-proxy-advanced":{descriptionKey:"plugins.meta.ai-proxy-advanced.description",isEnterprise:!0,nameKey:"plugins.meta.ai-proxy-advanced.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-proxy-advanced"]},"ai-semantic-cache":{descriptionKey:"plugins.meta.ai-semantic-cache.description",isEnterprise:!0,nameKey:"plugins.meta.ai-semantic-cache.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-semantic-cache"]},"ai-semantic-prompt-guard":{descriptionKey:"plugins.meta.ai-semantic-prompt-guard.description",isEnterprise:!0,nameKey:"plugins.meta.ai-semantic-prompt-guard.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-semantic-prompt-guard"]},"header-cert-auth":{descriptionKey:"plugins.meta.header-cert-auth.description",isEnterprise:!0,nameKey:"plugins.meta.header-cert-auth.name",fieldRules:{onlyOneOfMutuallyRequired:[[["config.http_proxy_host","config.http_proxy_port"],["config.https_proxy_host","config.https_proxy_port"]]]},...C.PLUGIN_GROUP_AND_SCOPE_MAP["header-cert-auth"]},"upstream-oauth":{descriptionKey:"plugins.meta.upstream-oauth.description",isEnterprise:!0,nameKey:"plugins.meta.upstream-oauth.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["upstream-oauth"]},confluent:{descriptionKey:"plugins.meta.confluent.description",isEnterprise:!0,nameKey:"plugins.meta.confluent.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.confluent},"service-protection":{descriptionKey:"plugins.meta.service-protection.description",isEnterprise:!0,nameKey:"plugins.meta.service-protection.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["service-protection"]},"injection-protection":{descriptionKey:"plugins.meta.injection-protection.description",isEnterprise:!0,nameKey:"plugins.meta.injection-protection.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["injection-protection"]},redirect:{descriptionKey:"plugins.meta.redirect.description",isEnterprise:!1,nameKey:"plugins.meta.redirect.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.redirect},"kafka-consume":{descriptionKey:"plugins.meta.kafka-consume.description",isEnterprise:!1,nameKey:"plugins.meta.kafka-consume.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["kafka-consume"]},"confluent-consume":{descriptionKey:"plugins.meta.confluent-consume.description",isEnterprise:!1,nameKey:"plugins.meta.confluent-consume.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["confluent-consume"]},"request-callout":{descriptionKey:"plugins.meta.request-callout.description",isEnterprise:!1,nameKey:"plugins.meta.request-callout.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["request-callout"]},"ai-sanitizer":{descriptionKey:"plugins.meta.ai-sanitizer.description",isEnterprise:!1,nameKey:"plugins.meta.ai-sanitizer.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-sanitizer"]},"ai-rag-injector":{descriptionKey:"plugins.meta.ai-rag-injector.description",isEnterprise:!1,nameKey:"plugins.meta.ai-rag-injector.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-rag-injector"]},datakit:{descriptionKey:"plugins.meta.datakit.description",isEnterprise:!1,nameKey:"plugins.meta.datakit.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP.datakit},"ai-prompt-compressor":{descriptionKey:"plugins.meta.ai-prompt-compressor.description",isEnterprise:!1,nameKey:"plugins.meta.ai-prompt-compressor.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-prompt-compressor"]},"solace-upstream":{descriptionKey:"plugins.meta.solace-upstream.description",isEnterprise:!1,nameKey:"plugins.meta.solace-upstream.name",...C.PLUGIN_GROUP_AND_SCOPE_MAP["solace-upstream"]},"ai-aws-guardrails":{descriptionKey:"plugins.meta.ai-aws-guardrails.description",isEnterprise:!1,nameKey:"plugins.meta.ai-aws-guardrails.name",useLegacyForm:!0,...C.PLUGIN_GROUP_AND_SCOPE_MAP["ai-aws-guardrails"]}},Tt={acl:{titleKey:"plugins.meta.acl.name",plugin:"acl",schema:ei,nameKey:"plugins.meta.acl.credential_name",endpoint:"/acls",schemaEndpoint:"acls",fields:pt(ei),applyCredentialButtonText:"Add group to consumer"},"basic-auth":{titleKey:"plugins.meta.basic-auth.name",plugin:"basic-auth",schema:ti,nameKey:"plugins.meta.basic-auth.credential_name",endpoint:"/basic-auth",schemaEndpoint:"basicauth_credentials",fields:pt(ti)},"key-auth":{titleKey:"plugins.meta.key-auth.name",plugin:"key-auth",schema:ni,nameKey:"plugins.meta.key-auth.credential_name",endpoint:"/key-auth",schemaEndpoint:"keyauth_credentials",fields:pt(ni)},"key-auth-enc":{titleKey:"plugins.meta.key-auth-enc.name",plugin:"key-auth-enc",schema:oi,nameKey:"plugins.meta.key-auth-enc.credential_name",endpoint:"/key-auth-enc",schemaEndpoint:"keyauth_enc_credentials",fields:pt(oi)},oauth2:{titleKey:"plugins.meta.oauth2.name",plugin:"oauth2",schema:ii,nameKey:"plugins.meta.oauth2.credential_name",endpoint:"/oauth2",schemaEndpoint:"oauth2_credentials",fields:pt(ii)},"hmac-auth":{titleKey:"plugins.meta.hmac-auth.name",plugin:"hmac-auth",schema:ri,nameKey:"plugins.meta.hmac-auth.credential_name",endpoint:"/hmac-auth",schemaEndpoint:"hmacauth_credentials",fields:pt(ri)},jwt:{titleKey:"plugins.meta.jwt.name",plugin:"jwt",schema:_l,nameKey:"plugins.meta.jwt.credential_name",endpoint:"/jwt",schemaEndpoint:"jwt_secrets",fields:{id:{},key:{},algorithm:{}}}},wl={acls:dl,basicauth_credentials:ul,keyauth_credentials:yl,keyauth_enc_credentials:Cl,oauth2_credentials:kl,hmacauth_credentials:hl,jwt_secrets:bl},Al=()=>{const{i18n:{t:e}}=lt(),n={},r={};for(const[o,a]of Object.entries(et))n[o]={...a,name:e(a.nameKey),description:e(a.descriptionKey)};for(const[o,a]of Object.entries(Tt))r[o]={...a,name:e(a.nameKey),title:e(a.titleKey)};return{pluginMetaData:n,credentialMetaData:r,credentialSchemas:Tt,getDisplayName:o=>{var a;return((a=n[o])==null?void 0:a.name)||o}}},qt={type:"array",showRemoveButton:!1,newElementButtonLabelClasses:"kong-form-new-element-button-label",itemContainerComponent:"FieldArrayCardContainer",fieldClasses:"array-card-container-wrapper"},El={"config-prompts-prepend":{...qt,newElementButtonLabel:"+ Add Message",items:{type:"object",schema:{fields:[{label:"Role",model:"role",help:"LLM message role",type:"select",required:!0,values:["system","assistant","user"]},{label:"Content",model:"content",type:"input",required:!0,help:"LLM message content",inputType:"text"}]}}},"config-prompts-append":{...qt,newElementButtonLabel:"+ Add Message",items:{type:"object",schema:{fields:[{label:"Role",model:"role",help:"LLM message role",type:"select",required:!0,values:["system","assistant","user"]},{label:"Content",model:"content",type:"input",required:!0,help:"LLM message content",inputType:"text"}]}}}},Sl={"config-templates":{...qt,newElementButtonLabel:"+ Add Template",items:{type:"object",schema:{fields:[{label:"Template Name",model:"name",help:"Template Name, for reference in user requests",type:"input",required:!0,inputType:"text"},{label:"Template String",model:"template",help:"Template string content, containing {{placeholders}} for variable substitution",type:"textArea",required:!0,inputType:"text"}]}}}},Pl={shamefullyTransformPayload:({originalModel:e,model:n,payload:r,schema:i})=>{const o=l=>{var s;return(s=i[l])!=null&&s.required&&n[l]?!0:e[l]===n[l]?!1:e[l]===null?n[l]!==""&&!Number.isNaN(n[l]):!0},a=l=>Object.keys(e).some(s=>s.startsWith(l)&&o(s));a("config-embeddings")||(r.config.embeddings=null),a("config-vectordb")||(r.config.vectordb=null)}},Tl={enabled:{type:"switch",model:"enabled",label:"Enabled",textOn:"This plugin is Enabled",textOff:"This plugin is Disabled",inputType:"hidden",styleClasses:"field-switch top-border bottom-border hide-label",default:!0},name:{default:"application-registration",type:"input",inputType:"hidden",styleClasses:"kong-form-hidden-field-wrapper"},"service-id":{type:"AutoSuggest",label:"Gateway Service",styleClasses:"bottom-border",description:"Specific Gateway Service in this workspace",model:"service-id",entity:"services",placeholder:"Select a Gateway Service",inputValues:{fields:["name","id"]},help:"The Gateway Service that this plugin configuration will target"},tags:Pt.tags,protocols:{id:"protocols",default:[],type:"multiselect",label:"Protocols",values:[{label:"grpc",value:"grpc"},{label:"grpcs",value:"grpcs"},{label:"http",value:"http"},{label:"https",value:"https"},{label:"tcp",value:"tcp"},{label:"tls",value:"tls"},{label:"tls_passthrough",value:"tls_passthrough"},{label:"udp",value:"udp"},{label:"ws",value:"ws"},{label:"wss",value:"wss"}],help:"A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type.",placeholder:"Select valid protocols for the plugin",styleClasses:"plugin-protocols-select"}},Ae={type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"kong-form-array-field",fieldItemsClasses:"kong-form-array-field-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"kong-form-field-wrapper",newElementButtonLabel:"+ Add",newElementButtonLabelClasses:"kong-form-new-element-button-label"},_n={type:"array",showRemoveButton:!1,newElementButtonLabelClasses:"kong-form-new-element-button-label",itemContainerComponent:"FieldMetric",fieldClasses:"metrics-wrapper"},Nl={"config-metrics":{..._n,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"Name",type:"select",values:["request_count","request_size","response_size","latency","status_count","unique_users","request_per_user","upstream_latency","kong_latency"]},{model:"stat_type",label:"Stat Type",type:"select",values:["gauge","timer","counter","histogram","meter","set"]},{model:"sample_rate",label:"Sample Rate",type:"input",inputType:"number",id:"sample_rate"},{model:"consumer_identifier",label:"Consumer Identifier",type:"select",values:["consumer_id","custom_id","username"]},{model:"tags",label:"Tags",type:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"kong-form-array-field",fieldItemsClasses:"kong-form-array-field-item",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},inputType:"text"}]}}}},xl={"config-strategy":{label:"Config.Strategy",type:"select",default:"cluster",values:["cluster","redis"]}},Ol={"config-injection_types":{type:"multiselect"},"config-locations":{type:"multiselect"}},Il={"config-api_specification":{label:"Config.API Specification",placeholder:"Enter an API spec",type:"textArea",rows:10,max:!1}},vl={"config-api_spec":{label:"Config.API Spec",placeholder:"Enter an API spec",type:"textArea",rows:15,max:!1}},Rl={"config-access":{},"config-body_filter":{},"config-header_filter":{},"config-certificate":{},"config-functions":{},"config-log":{},"config-rewrite":{}},ai=["config-access","config-body_filter","config-header_filter","config-certificate","config-functions","config-log","config-rewrite"].reduce((e,n)=>({...e,[n]:Pt.fields.arrayItems({newElementButtonLabel:"Add"})}),Rl),bn={"config-strategy":{label:"Config.Strategy",type:"select",default:"redis",values:["local","redis"]},"config-consumer_groups":{label:"Config.Consumer Groups",type:"input",placeholder:"Enter list of consumer groups",hint:"e.g. group1, group2"}},Bl={"config-remove-headers":{},"config-remove.querystring":{},"config-remove-body":{},"config-replace-headers":{},"config-replace-querystring":{},"config-replace-body":{},"config-rename-headers":{},"config-rename-querystring":{},"config-rename-body":{},"config-add-headers":{},"config-add-querystring":{},"config-add-body":{},"config-append-headers":{},"config-append-querystring":{},"config-append-body":{},"config-allow-body":{}},Ll=["config-remove-headers","config-remove.querystring","config-remove-body","config-replace-headers","config-replace-querystring","config-replace-body","config-rename-headers","config-rename-querystring","config-rename-body","config-add-headers","config-add-querystring","config-add-body","config-append-headers","config-append-querystring","config-append-body","config-allow-body"].reduce((e,n)=>({...e,[n]:Pt.fields.arrayItems({newElementButtonLabel:"Add"})}),Bl),li={"config-add-json":{...Ae,label:"Config.Add.Json",inputAttributes:{...Ae.inputAttributes,type:"textarea",max:!1}},"config-append-json":{...Ae,label:"Config.Append.Json",inputAttributes:{...Ae.inputAttributes,type:"textarea",max:!1}},"config-remove-json":{...Ae,label:"Config.Remove.Json",inputAttributes:{...Ae.inputAttributes,type:"textarea",max:!1}},"config-rename-json":{...Ae,label:"Config.Rename.Json",inputAttributes:{...Ae.inputAttributes,type:"textarea",max:!1}},"config-replace-json":{...Ae,label:"Config.Replace.Json",inputAttributes:{...Ae.inputAttributes,type:"textarea",max:!1}}},$l={...li,"config-allow-json":{...Ae,label:"Config.Allow.Json",inputAttributes:{...Ae.inputAttributes,type:"textarea",max:!1}},"config-replace-body":{label:"Config.Replace.Body",type:"textArea",max:!1},"config-transform-functions":{...Ae,label:"Config.Transform.Functions",inputAttributes:{...Ae.inputAttributes,type:"textarea",max:!1}},"config-transform-json":{...Ae,label:"Config.Transform.Json",inputAttributes:{...Ae.inputAttributes,type:"textarea",max:!1}}},Dl={"config-rules":{...qt,newElementButtonLabel:"+ Add Rule",items:{type:"object",schema:{fields:[{label:"Upstream Name",model:"upstream_name",type:"input",help:"Target hostname where traffic will be routed in case of condition match",placeholder:"Hostname",inputType:"text"},{label:"Condition",model:"condition",type:"keyValuePairs",help:"List of headers name and value pairs",newElementButtonLabelClasses:"kong-form-new-element-button-label",newElementButtonLabel:"+ Add Condition",keyInputPlaceholder:"Header name",valueInputPlaceholder:"Header value"}]}}}},Vl={"config-session_redis_cluster_nodes":{...qt,newElementButtonLabel:"+ Add Cluster Node",items:{type:"object",schema:{fields:[{label:"IP",model:"ip",type:"input",inputType:"text"},{label:"Port",model:"port",type:"input",inputType:"number"}]}}}},Fl={"config-metrics":{..._n,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"Name",type:"select",values:["request_count","request_size","response_size","latency","status_count","unique_users","request_per_user","upstream_latency","kong_latency","status_count_per_user","status_count_per_user_per_route","status_count_per_workspace","shdict_usage"]},{model:"stat_type",label:"Stat Type",type:"select",values:["gauge","timer","counter","histogram","meter","set"]},{model:"sample_rate",label:"Sample Rate",type:"input",inputType:"number",id:"sample_rate"},{model:"consumer_identifier",label:"Consumer Identifier",type:"select",values:["consumer_id","custom_id","username"]},{model:"service_identifier",label:"Service Identifier",type:"select",values:["service_id","service_name","service_host","service_name_or_host"]},{model:"workspace_identifier",label:"Workspace Identifier",type:"select",values:["workspace_id","workspace_name"]}]}}}},Kl={"config-metrics":{..._n,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"Name",type:"select",values:["request_count","request_size","response_size","latency","status_count","unique_users","request_per_user","upstream_latency","kong_latency","status_count_per_user","status_count_per_user_per_route","status_count_per_workspace","shdict_usage","cache_datastore_hits_total","cache_datastore_misses_total"]},{model:"stat_type",label:"Stat Type",type:"select",values:["gauge","timer","counter","histogram","meter","set"]},{model:"sample_rate",label:"Sample Rate",type:"input",inputType:"number",id:"sample_rate"},{model:"consumer_identifier",label:"Consumer Identifier",type:"select",values:["consumer_id","custom_id","username"]},{model:"service_identifier",label:"Service Identifier",type:"select",values:["service_id","service_name","service_host","service_name_or_host"]},{model:"workspace_identifier",label:"Workspace Identifier",type:"select",values:["workspace_id","workspace_name"]}]}}}},Ul={"config-behavior-idp_error_response_body_template":{type:"textArea",rows:4}},Ml={"config-vault":{type:"AutoSuggest",entity:"vaults",placeholder:"Select a Vault",inputValues:{fields:["prefix","name","id"]},modelTransformer:e=>({id:e}),keyFromObject:"id"}},mt=e=>{var r,i;const n=(i=(r=e==null?void 0:e.confluent)==null?void 0:r.authentication)==null?void 0:i.basic;n&&!n.password&&!n.username&&delete e.confluent.authentication.basic},jl={"config-message_by_lua_functions":{...Ae,inputAttributes:{...Ae.inputAttributes,type:"textarea",max:!1}},shamefullyTransformPayload:({payload:e})=>{var n;mt((n=e.config)==null?void 0:n.schema_registry)}},ql={"config-message_by_lua_functions":{...Ae,inputAttributes:{...Ae.inputAttributes,type:"textarea",max:!1}},shamefullyTransformPayload:({payload:e})=>{var n;mt((n=e.config)==null?void 0:n.schema_registry)}},Gl={shamefullyTransformPayload:({payload:e})=>{var n,r,i;mt((n=e.config)==null?void 0:n.schema_registry),(i=(r=e.config)==null?void 0:r.topics)==null||i.forEach(o=>{mt(o==null?void 0:o.schema_registry)})}},Hl={shamefullyTransformPayload:({payload:e})=>{var n,r,i;mt((n=e.config)==null?void 0:n.schema_registry),(i=(r=e.config)==null?void 0:r.topics)==null||i.forEach(o=>{mt(o==null?void 0:o.schema_registry)})}},zl={shamefullyTransformPayload:({payload:e})=>{var n;mt((n=e.config)==null?void 0:n.schema_registry)}},Wl={"config-static_tags":{..._n,items:{type:"object",default:()=>({}),schema:{fields:[{model:"name",label:"name",type:"input",inputType:"string",id:"schema_name"},{model:"value",label:"value",type:"input",inputType:"string",id:"schema_value"}]}}}},Yl={"request-callout":"RequestCalloutForm","service-protection":{experimental:!0,component:"ServiceProtectionForm"},datakit:"DatakitForm"};function si(e,n){const r=Yl[e];if(typeof r=="string")return r;if(n.includes(e))return r.component}const Un=Symbol("EXPERIMENTAL_FREE_FORM_PROVIDER"),ci={DATAKIT_ENABLE_VISUAL_EDITOR:Symbol("DATAKIT_ENABLE_VISUAL_EDITOR")};function di(){return t.inject(Un,[])}function Jl(e){t.provide(Un,e)}const Xl=(e,n)=>{const r=e.model.startsWith("config-"),i=n.model.startsWith("config-");return r&&!i?1:!r&&i?-1:0},ui=(e,n)=>(e.order??0)-(n.order??0),pi=(e,n)=>Xl(e,n)||ui(e,n)||e.model.localeCompare(n.model),Se={useI18n:lt,usePluginMetaData:Al,usePluginHelpers:Xr,useSchemas:e=>{const{capitalize:n}=L.useStringHelpers(),{convertToDotNotation:r}=Xr(),{i18n:{t:i}}=lt(),o=di(),a={"application-registration":{overwriteDefault:!0,formSchema:{...Tl}},datadog:{...Nl},"upstream-tls":{"config-trusted_certificates":{type:"textArea",valueType:"array",rows:4,help:"A comma separated list of certificate values"}},statsd:{...Fl},"statsd-advanced":{...Kl},"route-by-header":{...Dl},"ai-prompt-decorator":{...El},"ai-prompt-template":{...Sl},"ai-proxy-advanced":{...Pl},"vault-auth":{...Ml},"oas-validation":{...vl},mocking:{...Il},"rate-limiting":{...bn},"rate-limiting-advanced":(e==null?void 0:e.app)==="kongManager"?{"config-consumer_groups":bn["config-consumer_groups"]}:{...bn},"graphql-rate-limiting-advanced":{...xl},"injection-protection":{...Ol},"response-ratelimiting":{...bn},"pre-function":{...ai},"post-function":{...ai},"request-transformer-advanced":{...Ll},"response-transformer":{...li},"response-transformer-advanced":{...$l},zipkin:{...Wl},"upstream-oauth":{...Ul},saml:{...Vl},"kafka-upstream":{...jl},"key-auth":gl(e),confluent:{...ql},"confluent-consume":{...Gl},"kafka-consume":{...Hl},"kafka-log":{...zl}},l=()=>["created_at","updated_at","id","_isCustomPlugin","_supported_redis_partial_type","_redis_partial_path"],s=(y,T,A)=>{let S={};(T||y)&&(S=T||(y.fields?y.fields:y));const ie=l().concat(y.blacklist?y.blacklist:[]),Q=Object.keys(S).filter(v=>!ie.includes(v)),H=Q.indexOf("comparator");H>-1&&Q.splice(H,1);let w={fields:[]};const O={};Q.forEach(v=>{f(S[v],v,S,O,w,A)});const $=O.name,K=et[$],Z=[],q=v=>{const N=["cluster-cache"];for(const B of N)if(v.model.includes(B))return!1;return new RegExp("(?<=-redis-).*").test(v.model)};if(w._supported_redis_partial_type=y._supported_redis_partial_type,w._redis_partial_path=y._redis_partial_path,ge.getSharedFormName($)||si($,o)||K!=null&&K.useLegacyForm||e!=null&&e.credential){if(K!=null&&K.useLegacyForm&&(e!=null&&e.enableRedisPartial)&&y._supported_redis_partial_type){for(const v of w.fields)if(q(v)){Z.push(v);continue}w.fields=w.fields.filter(v=>!q(v)),Z.length&&w.fields.push({id:"_redis",fields:Z,model:"__redis_partial",pluginType:y._isCustomPlugin?"custom":"bundled",redisType:y._supported_redis_partial_type,redisPath:y._redis_partial_path})}w.fields.sort((v,N)=>(v.order=v.order||0,N.order=N.order||0,v.order-N.order))}else{const v=[],N=[],B=[],ae=[],de={};if(K!=null&&K.fieldRules){const U=[...K.fieldRules.atLeastOneOf??[],...K.fieldRules.onlyOneOf??[],...K.fieldRules.mutuallyRequired??[]];if(K.fieldRules.onlyOneOfMutuallyRequired)for(const F of K.fieldRules.onlyOneOfMutuallyRequired)U.push(...F);for(const F of U)for(const z of F)de[z.replace(/-/g,"_").replace(/\./g,"-")]=!1}for(const U of w.fields){if(e!=null&&e.enableRedisPartial&&y._supported_redis_partial_type&&q(U)){ae.push(U);continue}if(U.pinned){v.push(U);continue}if(U.required||de[U.model]!==void 0){de[U.model]===!1&&(de[U.model]=!0),N.push(U);continue}B.push(U)}ae.length&&B.push({id:"_redis",fields:ae,model:"__redis_partial",pluginType:y._isCustomPlugin?"custom":"bundled",redisType:y._supported_redis_partial_type,redisPath:y._redis_partial_path,order:-1});const le=Object.entries(de).filter(([,U])=>!U).map(([U])=>U.replace(/-/g,".").replace(/_/g,"-"));le.length>0&&console.warn(`Unknown checked fields for plugin ${$}: ${le.join(", ")}`);const fe=[];v.length>0&&fe.push({fields:v.sort(ui)}),(N.length>0||B.length>0)&&fe.push({fields:N.sort(pi),collapsible:{title:i("plugins.form.grouping.plugin_configuration.title"),description:i("plugins.form.grouping.plugin_configuration.description"),nestedCollapsible:{fields:B.sort(pi),triggerLabel:{expand:i("plugins.form.grouping.advanced_parameters.view"),collapse:i("plugins.form.grouping.advanced_parameters.hide")}}},slots:{beforeContent:"plugin-config-before-content",emptyState:"plugin-config-empty-state"}}),w={groups:fe}}return{schema:w,model:O,options:{noneSelectedText:"Nothing Selected...",helpAsHtml:!0}}},d=y=>Array.isArray(y.default)||y.default!=null&&typeof y.default!="object"&&y.default!=="function",f=(y,T,A,S,ie,Q)=>{const H=d(y);return S[T]=H?y.default:null,y.id=T,y.model=T,y.fields&&y.type==="record"?c(y,T,A,S,ie,Q):(A[T]=y,R(y,S),Q&&Q[T]&&p(A[T],Q[T]),ie.fields.push(y)),A},p=(y,T)=>(T&&(Object.assign(y,T),T.label&&(y.label=T.label)),y),c=(y,T,A,S,ie,Q)=>{y.fields.forEach(H=>{Object.keys(H).forEach(w=>{const O=H[w];A=f(O,T+"-"+w,A,S,ie,Q)})})},u=(y,T)=>{y.type="input",y.inputType="hidden",y.styleClasses="kong-form-hidden-field-wrapper";const A=e==null?void 0:e.entityId;T[y.model]=A?{id:A}:null},m=y=>{y.type="input",y.inputType="number",y.between&&y.between.length===2&&(y.min=y.between[0],y.max=y.between[1])},_=y=>{Object.prototype.hasOwnProperty.call(y,"one_of")?(y.type="select",y.values=y.one_of,y.selectOptions={hideNoneSelectedText:!0}):(y.type="input",y.inputType="text")},b=y=>{y.type="checkbox",y.default=!0,y.required=!1},g=y=>{if(y.type="object-advanced",y.values.type==="array"){const{type:T}=y.values.elements||{};y.schema={fields:[{schema:{fields:[{...Ae,model:y.model,valueArrayType:T==="integer"?"number":T||"string",inputAttributes:{...Ae.inputAttributes,type:T==="integer"?"number":"text",inputMode:T==="integer"?"numeric":"text"}}]}}]}}else y.values.fields&&(y.schema={fields:[{type:"object",model:"object",schema:{fields:y.values.fields.map(T=>{const A=Object.keys(T)[0];return{model:A,type:"input",label:n(A),placeholder:A,inputType:T[A].type}})}}]})},h=y=>y.fields.reduce((T,A)=>(A.fields&&A.fields.forEach(S=>{T[S.model]=S}),A.model&&(T[A.model]=A),T),{}),k=(y,T)=>{if(!ge.customFields.includes(y.model))return;const A=h(y);ge.customFields.forEach(S=>{Object.keys(A).forEach(ie=>{const Q=d(A[ie]);T[ie]=Q?A[ie].default:null}),delete T[S]})},P=(y,T)=>y.inputType==="hidden"?"":r(n(y.label||T.replace(/_/g," "))),R=(y,T)=>{switch(k(y,T),y.type){case"foreign":u(y,T);break;case"number":m(y),y.attributes={step:"any"};break;case"integer":m(y);break;case"string":_(y);break;case"boolean":b(y);break;case"map":g(y);break}y.inputType==="foreign"&&u(y,T),y.label=P(y,y.model)};function I(y,T){if(T==null||T.type&&T.type!=="record"||typeof y!="object"||y==null)return y;const A={};for(const S of T.fields){const ie=Object.keys(S)[0],Q=S[ie];Q.type==="record"?A[ie]=I(y[ie],Q):Q.type==="array"&&Array.isArray(y[ie])&&Q.elements.type==="record"?A[ie]=y[ie].map(H=>I(H,Q.elements)):A[ie]=y[ie]}return A}return{buildFormSchema:f,parseSchema:s,customSchemas:a,typedefs:Pt,pruneRecord:I}},useExperimentalFreeForms:di,useProvideExperimentalFreeForms:Jl},Ie="/v2/control-planes/{controlPlaneId}/core-entities",Le="/{workspace}",Pe={list:{konnect:{all:`${Ie}/plugins`,forEntity:`${Ie}/{entityType}/{entityId}/plugins`},kongManager:{all:`${Le}/plugins`,forEntity:`${Le}/{entityType}/{entityId}/plugins`}},select:{konnect:{availablePlugins:`${Ie}/v1/available-plugins`,streamingCustomPlugins:`${Ie}/custom-plugins`,schemaCustomPluginItem:`${Ie}/plugin-schemas/{pluginId}`,streamingCustomPluginItem:`${Ie}/custom-plugins/{pluginId}`},kongManager:{availablePlugins:`${Le}/kong`,availablePluginsForOss:"/"}},form:{konnect:{create:{all:`${Ie}/plugins`,forEntity:`${Ie}/{entityType}/{entityId}/plugins`},edit:{all:`${Ie}/plugins/{id}`,forEntity:`${Ie}/{entityType}/{entityId}/plugins/{id}`},pluginSchema:"/v2/control-planes/{controlPlaneId}/schemas/core-entities/plugins/{plugin}",credential:{create:`${Ie}/{resourceEndpoint}`,edit:`${Ie}/{resourceEndpoint}/{id}`},credentialSchema:"/v2/control-planes/{controlPlaneId}/schemas/core-entities/{plugin}",validate:`${Ie}/v1/schemas/json/plugin/validate`,entityGetOne:`${Ie}/{entity}/{id}`,entityGetAll:`${Ie}/{entity}?size=1000`},kongManager:{create:{all:`${Le}/plugins`,forEntity:`${Le}/{entityType}/{entityId}/plugins`},edit:{all:`${Le}/plugins/{id}`,forEntity:`${Le}/{entityType}/{entityId}/plugins/{id}`},pluginSchema:`${Le}/schemas/plugins/{plugin}`,credential:{create:`${Le}/{resourceEndpoint}`,edit:`${Le}/{resourceEndpoint}/{id}`},credentialSchema:`${Le}/schemas/{plugin}`,validate:`${Le}/schemas/plugins/validate`,entityGetOne:`${Le}/{entity}/{id}`,entityGetAll:`${Le}/{entity}`}},item:{konnect:{all:`${Ie}/plugins/{id}`,forEntity:`${Ie}/{entityType}/{entityId}/plugins/{id}`},kongManager:{all:`${Le}/plugins/{id}`,forEntity:`${Le}/{entityType}/{entityId}/plugins/{id}`}}},Ql={key:0},Zl=se(t.defineComponent({__name:"PluginFieldRuleAlerts",props:{rules:{}},setup(e){const n=e,{formatPluginFieldLabel:r}=Se.usePluginHelpers(),{i18n:{t:i}}=Se.useI18n(),o=s=>s.map(d=>d.replace(/^[cC]onfig\./,"").split(".").map(f=>r(f)).join(".")).join(", "),a=(s,d)=>i(s,{parameters:o(d)}),l=t.computed(()=>{const s=[];if(n.rules.atLeastOneOf)for(const d of n.rules.atLeastOneOf)s.push(a("plugins.form.field_rules.at_least_one_of",d));if(n.rules.onlyOneOf)for(const d of n.rules.onlyOneOf)s.push(a("plugins.form.field_rules.only_one_of",d));if(n.rules.mutuallyRequired)for(const d of n.rules.mutuallyRequired)s.push(a("plugins.form.field_rules.mutually_required",d));return s});return(s,d)=>{const f=t.resolveComponent("KAlert");return t.openBlock(),t.createBlock(f,{class:"plugin-field-rule-alerts"},{default:t.withCtx(()=>[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(p,c)=>(t.openBlock(),t.createElementBlock("li",{key:`simple-alert-${c}`},t.toDisplayString(p),1))),128)),n.rules.onlyOneOfMutuallyRequired&&n.rules.onlyOneOfMutuallyRequired.length>0?(t.openBlock(),t.createElementBlock("li",Ql,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.rules.onlyOneOfMutuallyRequired,(p,c)=>(t.openBlock(),t.createElementBlock("div",{key:`only-one-mutually-alert-${c}`},[t.createElementVNode("div",null,t.toDisplayString(t.unref(i)("plugins.form.field_rules.only_one_of_mutually_required")),1),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p,(u,m)=>(t.openBlock(),t.createElementBlock("li",{key:`only-one-mutually-alert-${c}-combination-${m}`},t.toDisplayString(o(u)),1))),128))])]))),128))])):t.createCommentVNode("",!0)])]),_:1})}}}),[["__scopeId","data-v-d8eb79cf"]]);var fi=typeof global=="object"&&global&&global.Object===Object&&global,es=typeof self=="object"&&self&&self.Object===Object&&self,Ye=fi||es||Function("return this")(),Je=Ye.Symbol,mi=Object.prototype,ts=mi.hasOwnProperty,ns=mi.toString,Gt=Je?Je.toStringTag:void 0;function rs(e){var n=ts.call(e,Gt),r=e[Gt];try{e[Gt]=void 0;var i=!0}catch{}var o=ns.call(e);return i&&(n?e[Gt]=r:delete e[Gt]),o}var is=Object.prototype,os=is.toString;function as(e){return os.call(e)}var ls="[object Null]",ss="[object Undefined]",gi=Je?Je.toStringTag:void 0;function gt(e){return e==null?e===void 0?ss:ls:gi&&gi in Object(e)?rs(e):as(e)}function yt(e){return e!=null&&typeof e=="object"}var cs="[object Symbol]";function Mn(e){return typeof e=="symbol"||yt(e)&>(e)==cs}function yi(e,n){for(var r=-1,i=e==null?0:e.length,o=Array(i);++r<i;)o[r]=n(e[r],r,e);return o}var tt=Array.isArray,ds=1/0,hi=Je?Je.prototype:void 0,_i=hi?hi.toString:void 0;function bi(e){if(typeof e=="string")return e;if(tt(e))return yi(e,bi)+"";if(Mn(e))return _i?_i.call(e):"";var n=e+"";return n=="0"&&1/e==-ds?"-0":n}function ht(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function us(e){return e}var ps="[object AsyncFunction]",fs="[object Function]",ms="[object GeneratorFunction]",gs="[object Proxy]";function jn(e){if(!ht(e))return!1;var n=gt(e);return n==fs||n==ms||n==ps||n==gs}var qn=Ye["__core-js_shared__"],ki=function(){var e=/[^.]+$/.exec(qn&&qn.keys&&qn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ys(e){return!!ki&&ki in e}var hs=Function.prototype,_s=hs.toString;function _t(e){if(e!=null){try{return _s.call(e)}catch{}try{return e+""}catch{}}return""}var bs=/[\\^$.*+?()[\]{}|]/g,ks=/^\[object .+?Constructor\]$/,Cs=Function.prototype,ws=Object.prototype,As=Cs.toString,Es=ws.hasOwnProperty,Ss=RegExp("^"+As.call(Es).replace(bs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ps(e){if(!ht(e)||ys(e))return!1;var n=jn(e)?Ss:ks;return n.test(_t(e))}function Ts(e,n){return e==null?void 0:e[n]}function bt(e,n){var r=Ts(e,n);return Ps(r)?r:void 0}var Gn=bt(Ye,"WeakMap"),Ci=Object.create,Ns=function(){function e(){}return function(n){if(!ht(n))return{};if(Ci)return Ci(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}}();function xs(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}function Os(e,n){var r=-1,i=e.length;for(n||(n=Array(i));++r<i;)n[r]=e[r];return n}var Is=800,vs=16,Rs=Date.now;function Bs(e){var n=0,r=0;return function(){var i=Rs(),o=vs-(i-r);if(r=i,o>0){if(++n>=Is)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function Ls(e){return function(){return e}}var kn=function(){try{var e=bt(Object,"defineProperty");return e({},"",{}),e}catch{}}(),$s=kn?function(e,n){return kn(e,"toString",{configurable:!0,enumerable:!1,value:Ls(n),writable:!0})}:us,Ds=Bs($s);function Vs(e,n){for(var r=-1,i=e==null?0:e.length;++r<i&&n(e[r],r,e)!==!1;);return e}var Fs=9007199254740991,Ks=/^(?:0|[1-9]\d*)$/;function Hn(e,n){var r=typeof e;return n=n??Fs,!!n&&(r=="number"||r!="symbol"&&Ks.test(e))&&e>-1&&e%1==0&&e<n}function wi(e,n,r){n=="__proto__"&&kn?kn(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}function Ai(e,n){return e===n||e!==e&&n!==n}var Us=Object.prototype,Ms=Us.hasOwnProperty;function zn(e,n,r){var i=e[n];(!(Ms.call(e,n)&&Ai(i,r))||r===void 0&&!(n in e))&&wi(e,n,r)}function Ht(e,n,r,i){var o=!r;r||(r={});for(var a=-1,l=n.length;++a<l;){var s=n[a],d=void 0;d===void 0&&(d=e[s]),o?wi(r,s,d):zn(r,s,d)}return r}var Ei=Math.max;function js(e,n,r){return n=Ei(n===void 0?e.length-1:n,0),function(){for(var i=arguments,o=-1,a=Ei(i.length-n,0),l=Array(a);++o<a;)l[o]=i[n+o];o=-1;for(var s=Array(n+1);++o<n;)s[o]=i[o];return s[n]=r(l),xs(e,this,s)}}var qs=9007199254740991;function Wn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=qs}function Yn(e){return e!=null&&Wn(e.length)&&!jn(e)}var Gs=Object.prototype;function Cn(e){var n=e&&e.constructor,r=typeof n=="function"&&n.prototype||Gs;return e===r}function Hs(e,n){for(var r=-1,i=Array(e);++r<e;)i[r]=n(r);return i}var zs="[object Arguments]";function Si(e){return yt(e)&>(e)==zs}var Pi=Object.prototype,Ws=Pi.hasOwnProperty,Ys=Pi.propertyIsEnumerable,wn=Si(function(){return arguments}())?Si:function(e){return yt(e)&&Ws.call(e,"callee")&&!Ys.call(e,"callee")};function Js(){return!1}var Ti=typeof te=="object"&&te&&!te.nodeType&&te,Ni=Ti&&typeof module=="object"&&module&&!module.nodeType&&module,Xs=Ni&&Ni.exports===Ti,xi=Xs?Ye.Buffer:void 0,Qs=xi?xi.isBuffer:void 0,Jn=Qs||Js,Zs="[object Arguments]",ec="[object Array]",tc="[object Boolean]",nc="[object Date]",rc="[object Error]",ic="[object Function]",oc="[object Map]",ac="[object Number]",lc="[object Object]",sc="[object RegExp]",cc="[object Set]",dc="[object String]",uc="[object WeakMap]",pc="[object ArrayBuffer]",fc="[object DataView]",mc="[object Float32Array]",gc="[object Float64Array]",yc="[object Int8Array]",hc="[object Int16Array]",_c="[object Int32Array]",bc="[object Uint8Array]",kc="[object Uint8ClampedArray]",Cc="[object Uint16Array]",wc="[object Uint32Array]",Ee={};Ee[mc]=Ee[gc]=Ee[yc]=Ee[hc]=Ee[_c]=Ee[bc]=Ee[kc]=Ee[Cc]=Ee[wc]=!0,Ee[Zs]=Ee[ec]=Ee[pc]=Ee[tc]=Ee[fc]=Ee[nc]=Ee[rc]=Ee[ic]=Ee[oc]=Ee[ac]=Ee[lc]=Ee[sc]=Ee[cc]=Ee[dc]=Ee[uc]=!1;function Ac(e){return yt(e)&&Wn(e.length)&&!!Ee[gt(e)]}function Xn(e){return function(n){return e(n)}}var Oi=typeof te=="object"&&te&&!te.nodeType&&te,zt=Oi&&typeof module=="object"&&module&&!module.nodeType&&module,Ec=zt&&zt.exports===Oi,Qn=Ec&&fi.process,Nt=function(){try{var e=zt&&zt.require&&zt.require("util").types;return e||Qn&&Qn.binding&&Qn.binding("util")}catch{}}(),Ii=Nt&&Nt.isTypedArray,vi=Ii?Xn(Ii):Ac,Sc=Object.prototype,Pc=Sc.hasOwnProperty;function Ri(e,n){var r=tt(e),i=!r&&wn(e),o=!r&&!i&&Jn(e),a=!r&&!i&&!o&&vi(e),l=r||i||o||a,s=l?Hs(e.length,String):[],d=s.length;for(var f in e)(n||Pc.call(e,f))&&!(l&&(f=="length"||o&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Hn(f,d)))&&s.push(f);return s}function Bi(e,n){return function(r){return e(n(r))}}var Tc=Bi(Object.keys,Object),Nc=Object.prototype,xc=Nc.hasOwnProperty;function Li(e){if(!Cn(e))return Tc(e);var n=[];for(var r in Object(e))xc.call(e,r)&&r!="constructor"&&n.push(r);return n}function Zn(e){return Yn(e)?Ri(e):Li(e)}function Oc(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var Ic=Object.prototype,vc=Ic.hasOwnProperty;function Rc(e){if(!ht(e))return Oc(e);var n=Cn(e),r=[];for(var i in e)i=="constructor"&&(n||!vc.call(e,i))||r.push(i);return r}function er(e){return Yn(e)?Ri(e,!0):Rc(e)}var Bc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lc=/^\w*$/;function $c(e,n){if(tt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Mn(e)?!0:Lc.test(e)||!Bc.test(e)||n!=null&&e in Object(n)}var Wt=bt(Object,"create");function Dc(){this.__data__=Wt?Wt(null):{},this.size=0}function Vc(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Fc="__lodash_hash_undefined__",Kc=Object.prototype,Uc=Kc.hasOwnProperty;function Mc(e){var n=this.__data__;if(Wt){var r=n[e];return r===Fc?void 0:r}return Uc.call(n,e)?n[e]:void 0}var jc=Object.prototype,qc=jc.hasOwnProperty;function Gc(e){var n=this.__data__;return Wt?n[e]!==void 0:qc.call(n,e)}var Hc="__lodash_hash_undefined__";function zc(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Wt&&n===void 0?Hc:n,this}function kt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}kt.prototype.clear=Dc,kt.prototype.delete=Vc,kt.prototype.get=Mc,kt.prototype.has=Gc,kt.prototype.set=zc;function Wc(){this.__data__=[],this.size=0}function An(e,n){for(var r=e.length;r--;)if(Ai(e[r][0],n))return r;return-1}var Yc=Array.prototype,Jc=Yc.splice;function Xc(e){var n=this.__data__,r=An(n,e);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():Jc.call(n,r,1),--this.size,!0}function Qc(e){var n=this.__data__,r=An(n,e);return r<0?void 0:n[r][1]}function Zc(e){return An(this.__data__,e)>-1}function ed(e,n){var r=this.__data__,i=An(r,e);return i<0?(++this.size,r.push([e,n])):r[i][1]=n,this}function nt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}nt.prototype.clear=Wc,nt.prototype.delete=Xc,nt.prototype.get=Qc,nt.prototype.has=Zc,nt.prototype.set=ed;var Yt=bt(Ye,"Map");function td(){this.size=0,this.__data__={hash:new kt,map:new(Yt||nt),string:new kt}}function nd(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function En(e,n){var r=e.__data__;return nd(n)?r[typeof n=="string"?"string":"hash"]:r.map}function rd(e){var n=En(this,e).delete(e);return this.size-=n?1:0,n}function id(e){return En(this,e).get(e)}function od(e){return En(this,e).has(e)}function ad(e,n){var r=En(this,e),i=r.size;return r.set(e,n),this.size+=r.size==i?0:1,this}function st(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}st.prototype.clear=td,st.prototype.delete=rd,st.prototype.get=id,st.prototype.has=od,st.prototype.set=ad;var ld="Expected a function";function tr(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(ld);var r=function(){var i=arguments,o=n?n.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);var l=e.apply(this,i);return r.cache=a.set(o,l)||a,l};return r.cache=new(tr.Cache||st),r}tr.Cache=st;var sd=500;function cd(e){var n=tr(e,function(i){return r.size===sd&&r.clear(),i}),r=n.cache;return n}var dd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ud=/\\(\\)?/g,pd=cd(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(dd,function(r,i,o,a){n.push(o?a.replace(ud,"$1"):i||r)}),n});function Sn(e){return e==null?"":bi(e)}function xt(e,n){return tt(e)?e:$c(e,n)?[e]:pd(Sn(e))}var fd=1/0;function Pn(e){if(typeof e=="string"||Mn(e))return e;var n=e+"";return n=="0"&&1/e==-fd?"-0":n}function nr(e,n){n=xt(n,e);for(var r=0,i=n.length;e!=null&&r<i;)e=e[Pn(n[r++])];return r&&r==i?e:void 0}function $i(e,n,r){var i=e==null?void 0:nr(e,n);return i===void 0?r:i}function rr(e,n){for(var r=-1,i=n.length,o=e.length;++r<i;)e[o+r]=n[r];return e}var Di=Je?Je.isConcatSpreadable:void 0;function md(e){return tt(e)||wn(e)||!!(Di&&e&&e[Di])}function gd(e,n,r,i,o){var a=-1,l=e.length;for(r||(r=md),o||(o=[]);++a<l;){var s=e[a];r(s)?rr(o,s):o[o.length]=s}return o}function yd(e){var n=e==null?0:e.length;return n?gd(e):[]}function Vi(e){return Ds(js(e,void 0,yd),e+"")}var ir=Bi(Object.getPrototypeOf,Object),hd="[object Object]",_d=Function.prototype,bd=Object.prototype,Fi=_d.toString,kd=bd.hasOwnProperty,Cd=Fi.call(Object);function wd(e){if(!yt(e)||gt(e)!=hd)return!1;var n=ir(e);if(n===null)return!0;var r=kd.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&Fi.call(r)==Cd}function Ki(e,n,r){var i=-1,o=e.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(o);++i<o;)a[i]=e[i+n];return a}function Ad(e,n,r){var i=e.length;return r=r===void 0?i:r,!n&&r>=i?e:Ki(e,n,r)}var Ed="\\ud800-\\udfff",Sd="\\u0300-\\u036f",Pd="\\ufe20-\\ufe2f",Td="\\u20d0-\\u20ff",Nd=Sd+Pd+Td,xd="\\ufe0e\\ufe0f",Od="\\u200d",Id=RegExp("["+Od+Ed+Nd+xd+"]");function Ui(e){return Id.test(e)}function vd(e){return e.split("")}var Mi="\\ud800-\\udfff",Rd="\\u0300-\\u036f",Bd="\\ufe20-\\ufe2f",Ld="\\u20d0-\\u20ff",$d=Rd+Bd+Ld,Dd="\\ufe0e\\ufe0f",Vd="["+Mi+"]",or="["+$d+"]",ar="\\ud83c[\\udffb-\\udfff]",Fd="(?:"+or+"|"+ar+")",ji="[^"+Mi+"]",qi="(?:\\ud83c[\\udde6-\\uddff]){2}",Gi="[\\ud800-\\udbff][\\udc00-\\udfff]",Kd="\\u200d",Hi=Fd+"?",zi="["+Dd+"]?",Ud="(?:"+Kd+"(?:"+[ji,qi,Gi].join("|")+")"+zi+Hi+")*",Md=zi+Hi+Ud,jd="(?:"+[ji+or+"?",or,qi,Gi,Vd].join("|")+")",qd=RegExp(ar+"(?="+ar+")|"+jd+Md,"g");function Gd(e){return e.match(qd)||[]}function Hd(e){return Ui(e)?Gd(e):vd(e)}function zd(e){return function(n){n=Sn(n);var r=Ui(n)?Hd(n):void 0,i=r?r[0]:n.charAt(0),o=r?Ad(r,1).join(""):n.slice(1);return i[e]()+o}}var Wd=zd("toUpperCase");function Yd(e){return Wd(Sn(e).toLowerCase())}function Jd(){this.__data__=new nt,this.size=0}function Xd(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}function Qd(e){return this.__data__.get(e)}function Zd(e){return this.__data__.has(e)}var eu=200;function tu(e,n){var r=this.__data__;if(r instanceof nt){var i=r.__data__;if(!Yt||i.length<eu-1)return i.push([e,n]),this.size=++r.size,this;r=this.__data__=new st(i)}return r.set(e,n),this.size=r.size,this}function Ot(e){var n=this.__data__=new nt(e);this.size=n.size}Ot.prototype.clear=Jd,Ot.prototype.delete=Xd,Ot.prototype.get=Qd,Ot.prototype.has=Zd,Ot.prototype.set=tu;function nu(e,n){return e&&Ht(n,Zn(n),e)}function ru(e,n){return e&&Ht(n,er(n),e)}var Wi=typeof te=="object"&&te&&!te.nodeType&&te,Yi=Wi&&typeof module=="object"&&module&&!module.nodeType&&module,iu=Yi&&Yi.exports===Wi,Ji=iu?Ye.Buffer:void 0,Xi=Ji?Ji.allocUnsafe:void 0;function ou(e,n){if(n)return e.slice();var r=e.length,i=Xi?Xi(r):new e.constructor(r);return e.copy(i),i}function au(e,n){for(var r=-1,i=e==null?0:e.length,o=0,a=[];++r<i;){var l=e[r];n(l,r,e)&&(a[o++]=l)}return a}function Qi(){return[]}var lu=Object.prototype,su=lu.propertyIsEnumerable,Zi=Object.getOwnPropertySymbols,lr=Zi?function(e){return e==null?[]:(e=Object(e),au(Zi(e),function(n){return su.call(e,n)}))}:Qi;function cu(e,n){return Ht(e,lr(e),n)}var du=Object.getOwnPropertySymbols,eo=du?function(e){for(var n=[];e;)rr(n,lr(e)),e=ir(e);return n}:Qi;function uu(e,n){return Ht(e,eo(e),n)}function to(e,n,r){var i=n(e);return tt(e)?i:rr(i,r(e))}function pu(e){return to(e,Zn,lr)}function no(e){return to(e,er,eo)}var sr=bt(Ye,"DataView"),cr=bt(Ye,"Promise"),dr=bt(Ye,"Set"),ro="[object Map]",fu="[object Object]",io="[object Promise]",oo="[object Set]",ao="[object WeakMap]",lo="[object DataView]",mu=_t(sr),gu=_t(Yt),yu=_t(cr),hu=_t(dr),_u=_t(Gn),Xe=gt;(sr&&Xe(new sr(new ArrayBuffer(1)))!=lo||Yt&&Xe(new Yt)!=ro||cr&&Xe(cr.resolve())!=io||dr&&Xe(new dr)!=oo||Gn&&Xe(new Gn)!=ao)&&(Xe=function(e){var n=gt(e),r=n==fu?e.constructor:void 0,i=r?_t(r):"";if(i)switch(i){case mu:return lo;case gu:return ro;case yu:return io;case hu:return oo;case _u:return ao}return n});var bu=Object.prototype,ku=bu.hasOwnProperty;function Cu(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&ku.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var so=Ye.Uint8Array;function ur(e){var n=new e.constructor(e.byteLength);return new so(n).set(new so(e)),n}function wu(e,n){var r=n?ur(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Au=/\w*$/;function Eu(e){var n=new e.constructor(e.source,Au.exec(e));return n.lastIndex=e.lastIndex,n}var co=Je?Je.prototype:void 0,uo=co?co.valueOf:void 0;function Su(e){return uo?Object(uo.call(e)):{}}function Pu(e,n){var r=n?ur(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Tu="[object Boolean]",Nu="[object Date]",xu="[object Map]",Ou="[object Number]",Iu="[object RegExp]",vu="[object Set]",Ru="[object String]",Bu="[object Symbol]",Lu="[object ArrayBuffer]",$u="[object DataView]",Du="[object Float32Array]",Vu="[object Float64Array]",Fu="[object Int8Array]",Ku="[object Int16Array]",Uu="[object Int32Array]",Mu="[object Uint8Array]",ju="[object Uint8ClampedArray]",qu="[object Uint16Array]",Gu="[object Uint32Array]";function Hu(e,n,r){var i=e.constructor;switch(n){case Lu:return ur(e);case Tu:case Nu:return new i(+e);case $u:return wu(e,r);case Du:case Vu:case Fu:case Ku:case Uu:case Mu:case ju:case qu:case Gu:return Pu(e,r);case xu:return new i;case Ou:case Ru:return new i(e);case Iu:return Eu(e);case vu:return new i;case Bu:return Su(e)}}function zu(e){return typeof e.constructor=="function"&&!Cn(e)?Ns(ir(e)):{}}var Wu="[object Map]";function Yu(e){return yt(e)&&Xe(e)==Wu}var po=Nt&&Nt.isMap,Ju=po?Xn(po):Yu,Xu="[object Set]";function Qu(e){return yt(e)&&Xe(e)==Xu}var fo=Nt&&Nt.isSet,Zu=fo?Xn(fo):Qu,ep=1,tp=2,np=4,mo="[object Arguments]",rp="[object Array]",ip="[object Boolean]",op="[object Date]",ap="[object Error]",go="[object Function]",lp="[object GeneratorFunction]",sp="[object Map]",cp="[object Number]",yo="[object Object]",dp="[object RegExp]",up="[object Set]",pp="[object String]",fp="[object Symbol]",mp="[object WeakMap]",gp="[object ArrayBuffer]",yp="[object DataView]",hp="[object Float32Array]",_p="[object Float64Array]",bp="[object Int8Array]",kp="[object Int16Array]",Cp="[object Int32Array]",wp="[object Uint8Array]",Ap="[object Uint8ClampedArray]",Ep="[object Uint16Array]",Sp="[object Uint32Array]",we={};we[mo]=we[rp]=we[gp]=we[yp]=we[ip]=we[op]=we[hp]=we[_p]=we[bp]=we[kp]=we[Cp]=we[sp]=we[cp]=we[yo]=we[dp]=we[up]=we[pp]=we[fp]=we[wp]=we[Ap]=we[Ep]=we[Sp]=!0,we[ap]=we[go]=we[mp]=!1;function Jt(e,n,r,i,o,a){var l,s=n&ep,d=n&tp,f=n&np;if(r&&(l=o?r(e,i,o,a):r(e)),l!==void 0)return l;if(!ht(e))return e;var p=tt(e);if(p){if(l=Cu(e),!s)return Os(e,l)}else{var c=Xe(e),u=c==go||c==lp;if(Jn(e))return ou(e,s);if(c==yo||c==mo||u&&!o){if(l=d||u?{}:zu(e),!s)return d?uu(e,ru(l,e)):cu(e,nu(l,e))}else{if(!we[c])return o?e:{};l=Hu(e,c,s)}}a||(a=new Ot);var m=a.get(e);if(m)return m;a.set(e,l),Zu(e)?e.forEach(function(g){l.add(Jt(g,n,r,g,e,a))}):Ju(e)&&e.forEach(function(g,h){l.set(h,Jt(g,n,r,h,e,a))});var _=f?d?no:pu:d?er:Zn,b=p?void 0:_(e);return Vs(b||e,function(g,h){b&&(h=g,g=e[h]),zn(l,h,Jt(g,n,r,h,e,a))}),l}var Pp=1,Tp=4;function ho(e){return Jt(e,Pp|Tp)}function Np(e,n){return e!=null&&n in Object(e)}function xp(e,n,r){n=xt(n,e);for(var i=-1,o=n.length,a=!1;++i<o;){var l=Pn(n[i]);if(!(a=e!=null&&r(e,l)))break;e=e[l]}return a||++i!=o?a:(o=e==null?0:e.length,!!o&&Wn(o)&&Hn(l,o)&&(tt(e)||wn(e)))}function Op(e,n){return e!=null&&xp(e,n,Np)}function Ip(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function vp(e,n){return n.length<2?e:nr(e,Ki(n,0,-1))}var Rp="[object Map]",Bp="[object Set]",Lp=Object.prototype,$p=Lp.hasOwnProperty;function _o(e){if(e==null)return!0;if(Yn(e)&&(tt(e)||typeof e=="string"||typeof e.splice=="function"||Jn(e)||vi(e)||wn(e)))return!e.length;var n=Xe(e);if(n==Rp||n==Bp)return!e.size;if(Cn(e))return!Li(e).length;for(var r in e)if($p.call(e,r))return!1;return!0}function bo(e,n){return n=xt(n,e),e=vp(e,n),e==null||delete e[Pn(Ip(n))]}function Dp(e){return wd(e)?void 0:e}var Vp=1,Fp=2,Kp=4,Up=Vi(function(e,n){var r={};if(e==null)return r;var i=!1;n=yi(n,function(a){return a=xt(a,e),i||(i=a.length>1),a}),Ht(e,no(e),r),i&&(r=Jt(r,Vp|Fp|Kp,Dp));for(var o=n.length;o--;)bo(r,n[o]);return r});function ko(e,n,r,i){if(!ht(e))return e;n=xt(n,e);for(var o=-1,a=n.length,l=a-1,s=e;s!=null&&++o<a;){var d=Pn(n[o]),f=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(o!=l){var p=s[d];f=void 0,f===void 0&&(f=ht(p)?p:Hn(n[o+1])?[]:{})}zn(s,d,f),s=s[d]}return e}function Mp(e,n,r){for(var i=-1,o=n.length,a={};++i<o;){var l=n[i],s=nr(e,l);r(s,l)&&ko(a,xt(l,e),s)}return a}function jp(e,n){return Mp(e,n,function(r,i){return Op(e,i)})}var pr=Vi(function(e,n){return e==null?{}:jp(e,n)});function qp(e,n,r){return e==null?e:ko(e,n,r)}var Gp=0;function fr(e){var n=++Gp;return Sn(e)+n}function Co(e,n){return e==null?!0:bo(e,n)}const{t:It}=Oe.createI18n("en-us",Be);function wo(e){return e.map(n=>({value:n,label:n}))}const mr="*",Ao="$",Eo=".";function ze(...e){return e.join(Eo)}function gr(...e){return ze(Ao,...e)}function So(e){return e.startsWith(ze(Ao,""))}function vt(e){return e.split(Eo).filter(n=>n!=="")}function yr(e){const n=vt(e);return n[n.length-1]}const Hp=e=>{var n,r;return e.type==="redis-ce"?It("redis.shared_configuration.type_label.host_port"):(n=e.config.sentinel_nodes)!=null&&n.length?It("redis.shared_configuration.type_label.sentinel"):(r=e.config.cluster_nodes)!=null&&r.length?It("redis.shared_configuration.type_label.cluster"):It("redis.shared_configuration.type_label.host_port")},zp={"redis-ce":It("redis.shared_configuration.open_source"),"redis-ee":It("redis.shared_configuration.enterprise")},Wp=e=>zp[e]??"";function Yp(e,n){const r=new RegExp("(?<=config-redis-).*"),i=/Config\.Redis.*/;return n.filter(a=>{const l=a.model.match(r);return l&&!Object.keys(e).includes(l[0])}).map(a=>{const l=a.label.match(i);return{label:l?l[0]:a.label,key:a.model,value:"N/A",type:"text"}})}function Jp(e){const n=t.toValue(e);return n?n.type==="set"&&n.elements.type==="string"&&!n.elements.one_of:!1}const Po=Symbol("free-form-data"),To=Symbol("free-form-schema"),No=Symbol("free-form-field-path"),hr=Symbol("free-form-field-renderer-slots"),Tn=Symbol("free-form-field-renderer-matchers-map"),xo=Symbol("free-form-config"),Oo=Symbol("free-form-field-reset-label-path-setting"),Rt="free-form-field-renderers-slot",Xp={tooltipAttributes:{maxWidth:"300px",placement:"top"}};function _r(e,n=""){const r={},i=e;if(Array.isArray(i.fields))for(const o of i.fields){const a=Object.keys(o)[0],l=o[a],s=n?ze(n,a):a;if(r[s]=l,l.type==="record"&&Array.isArray(l.fields)){const d=_r(l,s);Object.assign(r,d)}else if(l.type==="array"&&l.elements){const d=l.elements,f=ze(s,mr);if(r[f]=d,d.type==="record"&&Array.isArray(d.fields)){const p=_r(d,f);Object.assign(r,p)}}}return r}function br(e){const n=vt(e).map(r=>/^\d+$/.test(r)?mr:r);return ze(...n)}function Qp(e){const n=t.toValue(e),r=t.computed(()=>n?_r(n):{});function i(p){var c;return p==null?n:(c=r.value)==null?void 0:c[br(p)]}function o(p,c=!1){const u=i(p);return u?u.default!==void 0?u.default:c||u.required?u.type==="record"?a(u,p):u.type==="array"?[]:null:null:null}function a(p,c){const u={};if(Array.isArray(p.fields))for(const m of p.fields){const _=Object.keys(m)[0],b=c?`${c}.${_}`:_,g=o(b,!1);g!==void 0&&(u[_]=g)}return u}function l(p){return p?o(p,!0):a(i(),"")}function s(p){const c=i(p),u=c!=null&&c.description?mn.marked.parse(c.description,{async:!1}):void 0;return{...Xp,"data-testid":`ff-label-${p}`,info:u}}function d(p){var u;const c=i(p);return wo((c==null?void 0:c.one_of)||((u=c.elements)==null?void 0:u.one_of)||[])}function f(p){var m;const c=(m=i(p))==null?void 0:m.default;let u=null;if(c==null||typeof c=="object"||c==="")return null;if(Array.isArray(c)){if(c.length===0)return null;u=c.join(", ")}else u=c.toString();return`Default: ${u}`}return{getSchema:i,getDefault:l,getSelectItems:d,getLabelAttributes:s,getPlaceholder:f}}function $e(){const e=t.inject(Po),n=t.inject(To),r=t.inject(xo,{});if(!e)throw new Error("useFormShared() called without form data provider.");if(!n)throw new Error("useFormShared() called without schema provider.");return{formData:e,formConfig:r,...n}}const Io=e=>{const n=t.inject(No,t.computed(()=>"")),r=t.computed(()=>{const i=t.toValue(e);let o=i;return!So(i)&&n.value&&(o=ze(n.value,i)),So(i)&&(o=o.slice(gr("").length)),o});return t.provide(No,r),r},Zp=e=>{const{getSchema:n}=$e(),{default:r,...i}=t.useSlots(),o=t.inject(hr),a=t.inject(Tn),l=t.computed(()=>{const d=t.toValue(o),f=Object.keys(i).filter(p=>p!==Rt&&p!=="item").reduce((p,c)=>{const u=br(ze(t.toValue(e),c));return{...p,[u]:i[c]}},{});return d?{...d,...f}:f});t.provide(hr,l);const s=t.toValue(e);return t.computed(()=>{if(r)return;const d=l.value[br(t.toValue(e))];if(d)return d;for(const[f,p]of a)if(f({path:s,schema:n(s)}))return p})},ef={ip:"IP",ssl:"SSL",ttl:"TTL",url:"URL",http:"HTTP"};function tf(e){return ef[e.toLocaleLowerCase()]??e}function nf(e,n){const r=t.inject(Oo,{parentPath:null,isolate:!1}),{parentPath:i,isolate:o}=t.toValue(r),a=t.ref(i?ze(i,e):e),l=t.ref({parentPath:a.value,isolate:o});return t.watch([t.toRef(n),t.toRef(r)],([s,d])=>{var u;const{parentPath:f,isolate:p}=d,c=f?ze(f,e):e;if(s){const m={isolate:()=>{a.value=e,l.value.isolate=!0,l.value.parentPath=null},"isolate-children":()=>{l.value.isolate=!0,l.value.parentPath=null},reset:()=>{a.value=e,l.value.isolate=!1,l.value.parentPath=null},"reset-children":()=>{l.value.isolate=!1,l.value.parentPath=null},inherit:()=>{a.value=c,l.value.isolate=!1,l.value.parentPath=c}};(u=m[s])==null||u.call(m)}else p&&(a.value=e,l.value.isolate=!0,l.value.parentPath=null)},{deep:!0,immediate:!0}),t.provide(Oo,l),a}function rf(e){return vt(e).map(r=>r.split("_").map(Yd).map(tf).join(" ")).join(" › ")}function of(e,n){const r=t.toValue(e),i=yr(r),{formConfig:o}=$e(),a=nf(i,n),{getSchema:l}=$e(),s=vo(e);return t.computed(()=>{var u;const d=a.value??i,f=(u=s.value.parent)!=null&&u.path?l(s.value.parent.path):null,c=(f==null?void 0:f.type)==="array"?"":rf(d);return o.transformLabel?o.transformLabel(c,r):c})}function rt(e,n){const{getLabelAttributes:r,getPlaceholder:i,getSchema:o}=$e(),a=t.toValue(e),l=t.toValue(n),s=of(e,t.toRef(()=>t.toValue(n).resetLabelPath));return t.computed(()=>{var d;return{...l,placeholder:l.placeholder??i(a)??void 0,labelAttributes:l.labelAttributes??r(a),label:l.label??s.value,required:l.required??((d=o(a))==null?void 0:d.required)}})}function af(e){var i;const n=vt(e);let r={parent:null};for(n.pop();n.length;){const o=n.shift();r.path=(i=r.parent)!=null&&i.path?ze(r.parent.path,o):o,r={parent:r}}return r}function vo(e){return t.computed(()=>af(t.toValue(e)))}function Ro(e){const{formData:n}=$e(),r=Io(e);return{value:t.computed({get:()=>$i(n,vt(r.value)),set:o=>qp(n,vt(r.value),o)})}}function We(e){const{getSchema:n}=$e(),r=Io(e),i=Zp(r),{value:o}=Ro(e),a=t.computed(()=>n(r.value));return a.value?{schema:a,path:r,renderer:i,value:o,ancestors:vo(r),error:null}:{error:new Error(`path '${r.value}' is not found in schema.`)}}function kr(e){const{getSchema:n}=$e(),r=t.useAttrs();return t.computed(()=>{var o;if(r["data-autofocus"]!==void 0)return!0;if(!e)return!1;const i=t.toValue(e).parent;return i!=null&&i.path?((o=n(i.path))==null?void 0:o.type)==="array":!1})}function Bo(e,n){const r=t.reactive(new Map);function i(){return fr(`${e}-`)}function o(a,l){return a!=null&&typeof a=="object"?r.get(a):`${e}-${l}`}return t.watch(n,a=>{const l=t.toValue(a);l.forEach(d=>{r.has(d)||r.set(d,i())});const s=new Set(l);[...r.keys()].forEach(d=>{s.has(d)||r.delete(d)})},{immediate:!0,deep:!0}),{getKey:o}}const lf="__request_callout_";function Lo(){return fr(lf)}const sf=["innerHTML"],Cr=se(t.defineComponent({inheritAttrs:!1,__name:"StringField",props:{name:{},labelAttributes:{},multiline:{type:Boolean},showVaultSecretPicker:{type:Boolean,default:()=>{}},showPasswordMaskToggle:{type:Boolean,default:()=>{}},type:{}},emits:["update:modelValue"],setup(e,{emit:n}){const r=t.useAttrs(),{i18n:i}=lt(),o=t.createPropsRestProxy(e,["showVaultSecretPicker","showPasswordMaskToggle","name"]),a=n,{value:l,...s}=We(t.toRef(()=>e.name)),d=rt(s.path,t.toRef({...o,...r})),f=l==null?void 0:l.value;function p(k){f!==void 0&&k===""&&k!==f?(l.value=null,a("update:modelValue",null)):(l.value=k.trim(),a("update:modelValue",k.trim()))}const c=t.computed(()=>{var k;return e.showPasswordMaskToggle!==void 0?e.showPasswordMaskToggle:o.type==="password"?!0:!!((k=s.schema)==null?void 0:k.value).encrypted}),u=t.computed(()=>o.multiline?Ce.KTextArea:Ce.KInput),m=t.inject(ge.AUTOFILL_SLOT,void 0),_=t.computed(()=>{var k;return e.showVaultSecretPicker!==void 0?e.showVaultSecretPicker:!!((k=s.schema.value)!=null&&k.referenceable)}),b=t.computed(()=>({referenceable:_.value})),g=kr(s.ancestors),h=t.computed(()=>r["data-1p-ignore"]!==void 0?r["data-1p-ignore"]:yr(e.name)==="name");return(k,P)=>{var I;const R=t.resolveComponent("KAlert");return s.error?(t.openBlock(),t.createBlock(R,{key:0,appearance:"danger",message:s.error.message},null,8,["message"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(t.unref(u),t.mergeProps({...t.unref(d),showPasswordMaskToggle:c.value,type:c.value?"password":"text"},{class:"ff-string-field","data-1p-ignore":h.value,"data-autofocus":t.unref(g),"data-testid":`ff-${s.path.value}`,"model-value":t.unref(l)??"","onUpdate:modelValue":p}),t.createSlots({_:2},[(I=t.unref(d).labelAttributes)!=null&&I.info?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(k.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(d).labelAttributes.info},null,8,sf)],!0)]),key:"0"}:void 0]),1040,["data-1p-ignore","data-autofocus","data-testid","model-value"]),t.unref(m)&&_.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(m)),{key:0,schema:b.value,update:p,value:t.unref(l)??""},null,8,["schema","value"])):t.createCommentVNode("",!0),_.value&&!t.unref(m)?(t.openBlock(),t.createBlock(R,{key:1,appearance:"warning","data-testid":`ff-vault-secret-picker-warning-${s.path.value}`,message:t.unref(i).t("plugins.free-form.vault_picker.component_error")},null,8,["data-testid","message"])):t.createCommentVNode("",!0)],64))}}}),[["__scopeId","data-v-c7f893c7"]]),cf=["innerHTML"],df=se(t.defineComponent({__name:"BooleanField",props:{name:{},labelAttributes:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:n}){const r=t.createPropsRestProxy(e,["name"]),{value:i,...o}=We(t.toRef(()=>e.name)),a=n,l=d=>{i.value=d,a("update:modelValue",d)},s=rt(o.path,r);return(d,f)=>{var c;const p=t.resolveComponent("KAlert");return o.error?(t.openBlock(),t.createBlock(p,{key:0,appearance:"danger",message:o.error.message},null,8,["message"])):(t.openBlock(),t.createBlock(t.unref(Ce.KCheckbox),t.mergeProps({key:1},t.unref(s),{class:"ff-boolean-field","data-testid":`ff-${o.path.value}`,"model-value":t.unref(i)??!1,"onUpdate:modelValue":l}),t.createSlots({_:2},[(c=t.unref(s).labelAttributes)!=null&&c.info?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(d.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(s).labelAttributes.info},null,8,cf)],!0)]),key:"0"}:void 0]),1040,["data-testid","model-value"]))}}}),[["__scopeId","data-v-8a828fad"]]),$o=se(t.defineComponent({__name:"SlideTransition",setup(e){const n=["height","padding-top","padding-bottom","margin-top","margin-bottom","border-top-width","border-bottom-width"],r=Object.fromEntries(n.map(u=>[u,""])),i=Object.fromEntries(n.map(u=>[u,"0"]));function o(u){const m=getComputedStyle(u);return Object.fromEntries(n.map(_=>[_,m.getPropertyValue(_)]))}function a(u){["overflow","transition",...n].forEach(m=>u.style.removeProperty(m))}function l(u){Object.assign(u.style,{overflow:"hidden",transition:"none"})}function s(u){const m=u;Object.assign(m.style,r);const _=o(m);Object.assign(m.style,i),requestAnimationFrame(()=>{Object.assign(m.style,{..._,transition:""})})}function d(u){a(u)}function f(u){const m=u;Object.assign(m.style,{...o(m),overflow:"hidden"})}function p(u){Object.assign(u.style,i)}function c(u){a(u)}return(u,m)=>(t.openBlock(),t.createBlock(t.Transition,{"enter-active-class":"ff-slide-active","leave-active-class":"ff-slide-active",onAfterEnter:d,onAfterLeave:c,onBeforeEnter:l,onBeforeLeave:f,onEnter:s,onLeave:p},{default:t.withCtx(()=>[t.renderSlot(u.$slots,"default",{},void 0,!0)]),_:3}))}}),[["__scopeId","data-v-481d7a76"]]),uf=["data-testid"],pf=["data-testid"],ff=["data-testid"],mf=["innerHTML"],gf={class:"ff-object-field-actions"},yf=["data-testid"],Qe=se(t.defineComponent({__name:"ObjectField",props:t.mergeModels({name:{},label:{},labelAttributes:{},required:{type:Boolean,default:()=>{}},defaultExpanded:{type:Boolean,default:!0},defaultAdded:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!0},appearance:{},omit:{},asChild:{type:Boolean,default:()=>{}},resetLabelPath:{},fieldsOrder:{}},{added:{type:Boolean,default:void 0},addedModifiers:{},expanded:{type:Boolean,default:void 0},expandedModifiers:{}}),emits:["update:added","update:expanded"],setup(e){t.useSlots();const n=t.createPropsRestProxy(e,["defaultExpanded","defaultAdded","collapsible","omit","required","asChild","resetLabelPath","fieldsOrder"]),{value:r,...i}=We(t.toRef(n,"name")),{getSchema:o,getDefault:a}=$e(),l=t.useModel(e,"added"),s=t.useModel(e,"expanded"),d=t.computed(()=>u.value&&(e.collapsible?s.value??e.defaultExpanded:!1)),f=t.computed(()=>{var g,h;if((g=i.ancestors)!=null&&g.value){const k=i.ancestors.value.parent;if(k!=null&&k.path)return((h=o(k.path))==null?void 0:h.type)==="array"}return!1}),p=t.computed(()=>e.resetLabelPath!==void 0?e.resetLabelPath:f.value?"reset":"inherit"),c=rt(i.path,t.toRef(()=>({required:e.required,...n,resetLabelPath:p.value}))),u=t.computed(()=>c.value.required?!0:l.value??e.defaultAdded),m=t.computed(()=>e.asChild!==void 0?e.asChild:f.value),_=t.computed(()=>{let g=i.schema.value.fields;return e.omit&&(g=g.filter(h=>!e.omit.includes(Object.keys(h)[0]))),e.fieldsOrder?g.sort((h,k)=>{const P=Object.keys(h)[0],R=Object.keys(k)[0],I=e.fieldsOrder.indexOf(P),y=e.fieldsOrder.indexOf(R);return I===-1&&y===-1?0:I===-1?1:y===-1?-1:I-y}):g});function b(){l.value=!l.value,l.value?r.value=a(i.path.value):r.value=null}return t.watch(u,g=>{e.collapsible&&(s.value=g)}),t.onBeforeMount(()=>{l.value=!!(r!=null&&r.value)}),(g,h)=>{var P;const k=t.resolveComponent("KAlert");return t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(g.$slots[t.unref(Rt)]))),i.error?(t.openBlock(),t.createBlock(k,{key:0,appearance:"danger",message:i.error.message},null,8,["message"])):m.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"ff-object-field ff-object-field-as-child","data-testid":`ff-object-${i.path.value}`},[t.renderSlot(g.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,R=>(t.openBlock(),t.createBlock(Fe,{key:Object.keys(R)[0],name:Object.keys(R)[0]},null,8,["name"]))),128))],!0)],8,uf)):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["ff-object-field",{"ff-object-field-collapsed":!d.value}]),"data-testid":`ff-object-${i.path.value}`},[t.createElementVNode("header",{class:"ff-object-field-header","data-testid":`ff-object-header-${i.path.value}`},[t.createVNode(t.unref(Ce.KLabel),t.mergeProps({class:"ff-object-field-label","data-testid":`ff-label-${i.path.value}`},{...t.unref(c),required:!1},{"tooltip-attributes":t.unref(c).labelAttributes.tooltipAttributes}),t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(c).label)+" ",1)]),_:2},[(P=t.unref(c).labelAttributes)!=null&&P.info?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(c).labelAttributes.info},null,8,mf)],!0)]),key:"0"}:void 0]),1040,["data-testid","tooltip-attributes"]),t.createElementVNode("div",gf,[g.collapsible&&u.value?(t.openBlock(),t.createBlock(t.unref(Ce.KButton),{key:0,appearance:"tertiary",class:t.normalizeClass(`ff-object-field-button-${d.value?"collapse":"expand"}`),"data-testid":`ff-object-toggle-btn-${i.path.value}`,icon:"",onClick:h[0]||(h[0]=R=>s.value=!d.value)},{default:t.withCtx(()=>[u.value?(t.openBlock(),t.createBlock(t.unref(he.ChevronDownIcon),{key:0,class:"ff-object-field-button-icon"})):t.createCommentVNode("",!0)]),_:1},8,["class","data-testid"])):t.createCommentVNode("",!0),t.unref(c).required?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(Ce.KButton),{key:1,appearance:"tertiary",class:t.normalizeClass(`ff-object-field-button-${u.value?"remove":"add"}`),"data-testid":`ff-object-${u.value?"remove":"add"}-btn-${i.path.value}`,icon:"",onClick:b},{default:t.withCtx(()=>[u.value?(t.openBlock(),t.createBlock(t.unref(he.TrashIcon),{key:0})):(t.openBlock(),t.createBlock(t.unref(he.AddIcon),{key:1}))]),_:1},8,["class","data-testid"]))])],8,ff),t.createVNode($o,null,{default:t.withCtx(()=>[d.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"ff-object-field-content","data-testid":`ff-object-content-${i.path.value}`},[t.renderSlot(g.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,R=>(t.openBlock(),t.createBlock(Fe,{key:Object.keys(R)[0],name:Object.keys(R)[0]},null,8,["name"]))),128))],!0)],8,yf)):t.createCommentVNode("",!0)]),_:3})],10,pf))],64)}}}),[["__scopeId","data-v-b4c8195e"]]),hf=["innerHTML"],Nn=se(t.defineComponent({__name:"NumberField",props:{name:{},labelAttributes:{},max:{},min:{}},emits:["update:modelValue"],setup(e,{emit:n}){const r=t.createPropsRestProxy(e,["name"]),{value:i,...o}=We(t.toRef(()=>e.name)),a=rt(o.path,r),l=t.computed(()=>{var _;const c=(_=o.schema)==null?void 0:_.value;if(c.gt)return{min:c.gt};const[u,m]=c.between??[];return{min:r.min??u,max:r.max??m}}),s=n,d=i.value;function f(c){d!==void 0&&c===""&&Number(c)!==d?(i.value=null,s("update:modelValue",null)):(i.value=c===""?null:Number(c),s("update:modelValue",c===""?null:Number(c)))}const p=kr(o.ancestors);return(c,u)=>{var _;const m=t.resolveComponent("KAlert");return o.error?(t.openBlock(),t.createBlock(m,{key:0,appearance:"danger",message:o.error.message},null,8,["message"])):(t.openBlock(),t.createBlock(t.unref(Ce.KInput),t.mergeProps({key:1,class:"ff-number-field"},{...t.unref(a),min:l.value.min,max:l.value.max},{"data-autofocus":t.unref(p),"data-testid":`ff-${o.path.value}`,"model-value":t.unref(i)??"",type:"number","onUpdate:modelValue":f}),t.createSlots({_:2},[(_=t.unref(a).labelAttributes)!=null&&_.info?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(c.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(a).labelAttributes.info},null,8,hf)],!0)]),key:"0"}:void 0]),1040,["data-autofocus","data-testid","model-value"]))}}}),[["__scopeId","data-v-f071bf9b"]]),_f=["innerHTML"],Bt=se(t.defineComponent({__name:"EnumField",props:{name:{},labelAttributes:{},multiple:{type:Boolean,default:()=>{}},items:{},placeholder:{}},setup(e){const n=t.createPropsRestProxy(e,["name","items","multiple"]),{getSelectItems:r}=$e(),{value:i,...o}=We(t.toRef(()=>e.name)),a=rt(o.path,n),l=t.computed(()=>e.items?e.items:o.path?r(o.path.value):[]),s=t.computed(()=>{var f;return e.multiple!==void 0?e.multiple:((f=o.schema.value)==null?void 0:f.type)==="set"}),d=t.computed(()=>s.value?Ce.KMultiselect:Ce.KSelect);return(f,p)=>{var u;const c=t.resolveComponent("KAlert");return o.error?(t.openBlock(),t.createBlock(c,{key:0,appearance:"danger",message:o.error.message},null,8,["message"])):(t.openBlock(),t.createBlock(t.unref(d),t.mergeProps({key:1},t.unref(a),{modelValue:t.unref(i),"onUpdate:modelValue":p[0]||(p[0]=m=>t.isRef(i)?i.value=m:null),class:"ff-enum-field","data-testid":`ff-${o.path.value}`,items:l.value,"kpop-attributes":{"data-testid":`${o.path.value}-items`}}),t.createSlots({_:2},[(u=t.unref(a).labelAttributes)!=null&&u.info?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(f.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(a).labelAttributes.info},null,8,_f)],!0)]),key:"0"}:void 0]),1040,["modelValue","data-testid","items","kpop-attributes"]))}}}),[["__scopeId","data-v-181f0d06"]]),bf=["data-testid"],kf=["data-testid"],Cf=["innerHTML"],wf=["data-testid"],Af=se(t.defineComponent({__name:"KeyValueField",props:{name:{},initialValue:{},label:{},keyPlaceholder:{},valuePlaceholder:{},defaultKey:{},defaultValue:{},labelAttributes:{},showVaultSecretPicker:{type:Boolean,default:()=>{}}},emits:["change"],setup(e,{expose:n,emit:r}){const i=t.createPropsRestProxy(e,["showVaultSecretPicker"]),{value:o,...a}=We(t.toRef(i,"name")),l=rt(a.path,t.toRef({...i,...t.useAttrs()})),{i18n:s}=lt(),d=r,f=t.ref(c(i.initialValue??(o==null?void 0:o.value)??{}));function p(){return fr("ff-kv-field-")}function c(T){return Object.entries(T).map(([A,S])=>({id:p(),key:A,value:S}))}const u=()=>{f.value.push({id:p(),key:i.defaultKey||"",value:i.defaultValue||""})},m=T=>{const A=f.value.findIndex(S=>S.id===T);A!==-1&&f.value.splice(A,1)},_=()=>{const T=Object.fromEntries(f.value.map(({key:A,value:S})=>[A,S]).filter(([A])=>A));o.value=T,d("change",T)},b=t.useTemplateRef("root");async function g(T,A="key"){var S;b.value&&(await t.nextTick(),(S=b.value.querySelector(`[data-${A}-input="${T}"]`))==null||S.focus())}t.watch(f,_,{deep:!0});function h(){u();const T=f.value.findIndex(({key:A})=>!A);g(T===-1?f.value.length-1:T)}function k(T){T===f.value.length-1&&u(),g(T+1)}const P=t.inject(ge.AUTOFILL_SLOT,void 0),R=t.computed(()=>{var T,A;return e.showVaultSecretPicker??!!((A=(T=a.schema.value)==null?void 0:T.values)!=null&&A.referenceable)}),I=t.computed(()=>({referenceable:R.value}));function y(T,A){f.value[T].value=A}return n({reset:()=>{f.value=c(i.initialValue||{})},setValue:T=>{f.value=c(T)}}),(T,A)=>{var w;const S=t.resolveComponent("KAlert"),ie=t.resolveComponent("KLabel"),Q=t.resolveComponent("KButton"),H=t.resolveComponent("KInput");return a.error?(t.openBlock(),t.createBlock(S,{key:0,appearance:"danger",message:a.error.message},null,8,["message"])):(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"root",ref:b,class:"ff-kv-field","data-testid":`ff-kv-${a.path.value}`},[t.createElementVNode("header",{class:"ff-kv-field-header","data-testid":`ff-kv-header-${a.path.value}`},[t.createVNode(ie,t.mergeProps({class:"ff-kv-field-label"},t.unref(l),{"data-testid":`ff-label-${a.path.value}`,"tooltip-attributes":t.unref(l).labelAttributes.tooltipAttributes}),t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l).label)+" ",1)]),_:2},[(w=t.unref(l).labelAttributes)!=null&&w.info?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(T.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(l).labelAttributes.info},null,8,Cf)],!0)]),key:"0"}:void 0]),1040,["data-testid","tooltip-attributes"]),t.createVNode(Q,{appearance:"tertiary","data-testid":`ff-kv-add-btn-${a.path.value}`,icon:"",onClick:h},{default:t.withCtx(()=>[t.createVNode(t.unref(he.AddIcon))]),_:1},8,["data-testid"])],8,kf),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,(O,$)=>(t.openBlock(),t.createElementBlock("div",{key:O.id,class:"ff-kv-field-entry","data-testid":`ff-kv-container-${a.path.value}.${$}`},[t.createVNode(H,{modelValue:O.key,"onUpdate:modelValue":K=>O.key=K,modelModifiers:{trim:!0},class:"ff-kv-field-entry-key","data-key-input":$,"data-testid":`ff-key-${a.path.value}.${$}`,placeholder:T.keyPlaceholder||"Key",onKeydown:t.withKeys(t.withModifiers(K=>g($,"value"),["prevent"]),["enter"])},null,8,["modelValue","onUpdate:modelValue","data-key-input","data-testid","placeholder","onKeydown"]),t.createVNode(H,{modelValue:O.value,"onUpdate:modelValue":K=>O.value=K,modelModifiers:{trim:!0},class:"ff-kv-field-entry-value","data-testid":`ff-value-${a.path.value}.${$}`,"data-value-input":$,placeholder:T.valuePlaceholder||"Value",onKeydown:t.withKeys(t.withModifiers(K=>k($),["prevent"]),["enter"])},{after:t.withCtx(()=>[t.unref(P)&&R.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(P)),{key:0,schema:I.value,update:K=>y($,K),value:O.value},null,8,["schema","update","value"])):t.createCommentVNode("",!0),R.value&&!t.unref(P)?(t.openBlock(),t.createBlock(S,{key:1,appearance:"warning","data-testid":`ff-vault-secret-picker-warning-${a.path.value}`,message:t.unref(s).t("plugins.free-form.vault_picker.component_error")},null,8,["data-testid","message"])):t.createCommentVNode("",!0)]),_:2},1032,["modelValue","onUpdate:modelValue","data-testid","data-value-input","placeholder","onKeydown"]),t.createVNode(Q,{appearance:"tertiary","data-testid":`ff-kv-remove-btn-${a.path.value}.${$}`,icon:"",onClick:K=>m(O.id)},{default:t.withCtx(()=>[t.createVNode(t.unref(he.TrashIcon))]),_:2},1032,["data-testid","onClick"])],8,wf))),128))],8,bf))}}}),[["__scopeId","data-v-51cf2493"]]),Ef=["data-testid"],Sf=["innerHTML"],Do=se(t.defineComponent({inheritAttrs:!1,__name:"TagField",props:{name:{},labelAttributes:{},multiline:{type:Boolean},type:{}},emits:["update:modelValue"],setup(e,{emit:n}){const r=t.useAttrs(),i=t.createPropsRestProxy(e,["name"]),o=n,{value:a,...l}=We(t.toRef(()=>e.name)),s=rt(l.path,t.toRef({...i,...r})),d=t.computed(()=>{var b,g;return((g=(b=l.schema)==null?void 0:b.value)==null?void 0:g.len_min)&&l.schema.value.len_min>0}),f=t.ref("");function p(b){return b.map(g=>g.trim()).filter(Boolean).join(", ")}function c(b){return b.trim().split(",").map(g=>g.trim()).filter(Boolean)}function u(b){f.value=b;const g=c(b),h=!g.length&&d.value?null:g;a.value=h,o("update:modelValue",h)}const m=kr(l.ancestors),_=t.computed(()=>r["data-1p-ignore"]!==void 0?r["data-1p-ignore"]:yr(e.name)==="name");return t.watch(a,b=>{const g=b?p(b):"";p(c(f.value))!==g&&(f.value=g)},{immediate:!0}),(b,g)=>{var k;const h=t.resolveComponent("KAlert");return l.error?(t.openBlock(),t.createBlock(h,{key:0,appearance:"danger",message:l.error.message},null,8,["message"])):(t.openBlock(),t.createElementBlock("div",{key:1,"data-testid":`ff-tag-${l.path.value}`},[t.createVNode(t.unref(Ce.KInput),t.mergeProps(t.unref(s),{class:"ff-tag-field","data-1p-ignore":_.value,"data-autofocus":t.unref(m),"data-testid":`ff-${l.path.value}`,"model-value":f.value??"","onUpdate:modelValue":u}),t.createSlots({_:2},[(k=t.unref(s).labelAttributes)!=null&&k.info?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(b.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(s).labelAttributes.info},null,8,Sf)],!0)]),key:"0"}:void 0]),1040,["data-1p-ignore","data-autofocus","data-testid","model-value"])],8,Ef))}}}),[["__scopeId","data-v-6836b714"]]),Fe=t.defineComponent({name:"AutoField",__name:"Field",props:{name:{}},emits:["globalAction"],setup(e){const n=e,r=We(t.toRef(n,"name")),i=t.computed(()=>{var o,a;switch((a=(o=r.schema)==null?void 0:o.value)==null?void 0:a.type){case"string":return"one_of"in r.schema.value?Bt:Cr;case"boolean":return"one_of"in r.schema.value?Bt:df;case"number":case"integer":return"one_of"in r.schema.value?Bt:Nn;case"array":return wr;case"set":return Jp(r.schema)?Do:Bt;case"record":return Qe;case"map":return Af;default:return}});return(o,a)=>{const l=t.resolveComponent("KAlert");return t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.$slots[t.unref(Rt)]))),t.unref(r).error?(t.openBlock(),t.createBlock(l,{key:0,appearance:"danger",message:t.unref(r).error.message},null,8,["message"])):t.unref(r).renderer.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(r).renderer.value),{key:1,name:gr(t.unref(r).path.value),onGlobalAction:a[0]||(a[0]=(s,d)=>o.$emit("globalAction",s,d))},null,40,["name"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[i.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.value),{key:0,name:gr(t.unref(r).path.value)},null,8,["name"])):(t.openBlock(),t.createBlock(l,{key:1,appearance:"warning",message:`${t.unref(r).path.value} ${t.unref(r).schema.value.type} (no renderer yet)`},null,8,["message"])),t.renderSlot(o.$slots,"default")],64))],64)}}}),Pf=["data-testid"],Tf=["data-testid"],Nf=["innerHTML"],xf=["data-testid"],Of={class:"ff-array-field-item-content"},If=["data-index","data-testid"],wr=se(t.defineComponent({__name:"ArrayField",props:{name:{},items:{},label:{},labelAttributes:{},itemLabel:{type:[String,Function]},appearance:{},stickyTabs:{type:[Boolean,String,Number]}},emits:["add","remove"],setup(e,{emit:n}){var R;t.useCssVars(I=>({"6954cf1c":P.value}));const r=e,i=n,{i18n:{t:o}}=lt(),{getDefault:a}=$e(),{value:l,...s}=We(t.toRef(r,"name")),d=rt(s.path,t.toRef({...r,...t.useAttrs()})),f=t.computed(()=>r.items??t.toValue(l)??[]),{getKey:p}=Bo("ff-array-field",f),c=t.computed(()=>r.appearance==="card"?Ce.KCard:"div");function u(I,y){return typeof r.itemLabel=="function"?r.itemLabel(I,y):r.itemLabel||d.value.label||`Item #${y}`}const m=t.computed(()=>f.value.map((I,y)=>({hash:`#${p(I,y)}`,title:""}))),_=t.ref((R=m.value[0])==null?void 0:R.hash),b=async()=>{var y;const I=a(ze(s.path.value,mr));Array.isArray(l.value)||(l.value=[]),l.value.push(I),i("add"),r.appearance==="tabs"&&(await t.nextTick(),_.value=(y=m.value[m.value.length-1])==null?void 0:y.hash),await t.nextTick(),k(f.value.length+1)},g=async I=>{var y;Array.isArray(l.value)&&l.value.splice(I,1),i("remove",I),r.appearance==="tabs"&&(_.value=(y=m.value[Math.max(0,I-1)])==null?void 0:y.hash)},h=t.useTemplateRef("root");function k(I){var T;if(!h.value)return;const y=Math.max(0,Math.min(I,f.value.length-1));(T=h.value.querySelector(`[data-index="${y}"] [data-autofocus]`))==null||T.focus()}const P=t.computed(()=>{const{appearance:I,stickyTabs:y}=r;return I!=="tabs"||y==null||y===!1?null:typeof y=="number"?`${r.stickyTabs}px`:typeof y=="string"?y:"0"});return(I,y)=>{var Q;const T=t.resolveComponent("KAlert"),A=t.resolveComponent("KLabel"),S=t.resolveComponent("KButton"),ie=t.resolveComponent("KTabs");return s.error?(t.openBlock(),t.createBlock(T,{key:0,appearance:"danger",message:s.error.message},null,8,["message"])):(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"root",ref:h,class:t.normalizeClass(["ff-array-field",{[`ff-array-field-${I.appearance??"default"}`]:!0,"ff-array-field-sticky-tabs":I.stickyTabs}]),"data-testid":`ff-array-${s.path.value}`},[t.createElementVNode("header",{class:"ff-array-field-header","data-testid":`ff-array-header-${s.path.value}`},[t.createVNode(A,t.mergeProps({class:"ff-array-field-label"},t.unref(d),{"data-testid":`ff-label-${s.path.value}`,"tooltip-attributes":t.unref(d).labelAttributes.tooltipAttributes}),t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d).label)+" ",1)]),_:2},[(Q=t.unref(d).labelAttributes)!=null&&Q.info?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(I.$slots,"tooltip",{},()=>[t.createElementVNode("div",{innerHTML:t.unref(d).labelAttributes.info},null,8,Nf)],!0)]),key:"0"}:void 0]),1040,["data-testid","tooltip-attributes"]),t.createVNode(S,{appearance:"tertiary","aria-label":t.unref(o)("actions.add_entity",{entity:t.unref(o)("plugins.free-form.request-callout.entity_name")}),"data-testid":`ff-add-item-btn-${s.path.value}`,icon:"",onClick:b},{default:t.withCtx(()=>[t.createVNode(t.unref(he.AddIcon))]),_:1},8,["aria-label","data-testid"])],8,Tf),f.value.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[I.appearance!=="tabs"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"ff-array-field-container","data-testid":`ff-array-basic-container-${s.path.value}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,(H,w)=>(t.openBlock(),t.createBlock(t.unref(c),{key:t.unref(p)(H,w),class:"ff-array-field-item","data-index":w,"data-testid":`ff-array-item-${s.path.value}.${w}`},{default:t.withCtx(()=>[t.createElementVNode("div",Of,[I.$slots.item?t.renderSlot(I.$slots,"item",{key:0,fieldName:String(w),index:w},void 0,!0):(t.openBlock(),t.createBlock(Fe,{key:1,name:String(w)},null,8,["name"]))]),t.createVNode(S,{appearance:"tertiary","aria-label":t.unref(o)("actions.remove_entity",{entity:t.unref(o)("plugins.free-form.request-callout.entity_name")}),class:"ff-array-field-item-remove","data-testid":`ff-array-remove-item-btn-${s.path.value}.${w}`,icon:"",onClick:O=>g(w)},{default:t.withCtx(()=>[t.createVNode(t.unref(he.TrashIcon))]),_:2},1032,["aria-label","data-testid","onClick"])]),_:2},1032,["data-index","data-testid"]))),128))],8,xf)):(t.openBlock(),t.createBlock(t.unref(Ce.KCard),{key:1,"data-testid":`ff-array-tab-container-${s.path.value}`},{default:t.withCtx(()=>[t.createVNode(ie,{modelValue:_.value,"onUpdate:modelValue":y[0]||(y[0]=H=>_.value=H),"data-testid":`ff-array-tabs-${s.path.value}`,tabs:m.value},t.createSlots({_:2},[t.renderList(f.value,(H,w)=>({name:t.unref(p)(H,w),fn:t.withCtx(()=>[t.createElementVNode("div",{class:"ff-array-field-item","data-index":w,"data-testid":`ff-array-item-${s.path.value}.${w}`},[I.$slots.item?t.renderSlot(I.$slots,"item",{key:0,fieldName:String(w),index:w},void 0,!0):(t.openBlock(),t.createBlock(Fe,{key:1,name:String(w)},null,8,["name"]))],8,If)])})),t.renderList(f.value,(H,w)=>({name:`${t.unref(p)(H,w)}-anchor`,fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u(H,w))+" ",1),t.createVNode(S,{appearance:"tertiary","aria-label":t.unref(o)("actions.remove_entity",{entity:t.unref(o)("plugins.free-form.request-callout.entity_name")}),class:"ff-array-field-item-remove","data-testid":`ff-array-remove-item-btn-${s.path.value}.${w}`,icon:"",onClick:t.withModifiers(O=>g(w),["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(he.TrashIcon))]),_:2},1032,["aria-label","data-testid","onClick"])])}))]),1032,["modelValue","data-testid","tabs"])]),_:3},8,["data-testid"]))],64)):t.createCommentVNode("",!0)],10,Pf))}}}),[["__scopeId","data-v-463d07bb"]]),Xt=Symbol(),vf=t.defineComponent({__name:"CalloutForm",props:{index:{},fieldName:{}},setup(e){const n=e,{formData:r}=$e(),i=t.computed(()=>{const{callouts:l}=r.config;return l==null?[]:l.filter(({name:s})=>{var d;return s&&s!==((d=l[n.index])==null?void 0:d.name)})}),o=t.computed(()=>i.value.map(({[Xt]:l,name:s})=>({value:l,label:s}))),a=t.computed(()=>r.config.callouts[n.index]);return t.watch(o,()=>{a.value.depends_on=a.value.depends_on.filter(l=>o.value.some(s=>s.value===l))}),(l,s)=>(t.openBlock(),t.createBlock(Qe,{name:l.fieldName},{depends_on:t.withCtx(d=>[t.createVNode(Bt,t.mergeProps(d,{items:o.value,multiple:"",required:!1}),null,16,["items"])]),request:t.withCtx(d=>[t.createVNode(Qe,t.mergeProps(d,{"fields-order":["url","method","headers","query","body","http_opts","error","by_lua"]}),{method:t.withCtx(f=>[t.createVNode(Bt,t.mergeProps(f,{items:t.unref(wo)(["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"])}),null,16,["items"])]),_:2},1040)]),_:1},8,["name"]))}}),Rf=t.defineComponent({__name:"CalloutsForm",setup(e){const{formData:n,getDefault:r}=$e();function i(){const o=r("config.callouts.*");o.request.body.custom=o.request.body.custom??{};const a=n.config.callouts[n.config.callouts.length-1];a&&(a[Xt]=Lo())}return(o,a)=>(t.openBlock(),t.createBlock(wr,{appearance:"tabs","item-label":l=>l.name||"New callout",name:"callouts",required:"","sticky-tabs":"",onAdd:i},{item:t.withCtx(({index:l,fieldName:s})=>[t.createVNode(vf,{"field-name":s,index:l},null,8,["field-name","index"])]),_:1},8,["item-label"]))}}),Vo=t.defineComponent({__name:"FieldRenderer",props:{match:{type:Function},priority:{}},setup(e){const n=e,{default:r}=t.useSlots(),i=t.inject(Tn);if(!i)throw new Error(Tn.toString()+"not provided");return r&&i.set(n.match,r),(o,a)=>null}}),Ar=t.defineComponent({name:"SchemaForm",__name:"Form",props:{tag:{default:"form"},schema:{},data:{},config:{},fieldsOrder:{}},emits:["change","globalAction"],setup(e,{emit:n}){var f;const r=n,i=t.useSlots(),o=Qp(e.schema);t.provide(To,o);const a=p=>{var c;return jn((c=e.config)==null?void 0:c.hasValue)?e.config.hasValue(p):!!p},l=t.computed(()=>{let p=o.getSchema().fields;return e.fieldsOrder?p.sort((c,u)=>{const m=Object.keys(c)[0],_=Object.keys(u)[0],b=e.fieldsOrder.indexOf(m),g=e.fieldsOrder.indexOf(_);return b===-1&&g===-1?0:b===-1?1:g===-1?-1:b-g}):p}),s=t.reactive((f=e.config)!=null&&f.prepareFormData?e.config.prepareFormData(a(e.data)?e.data:o.getDefault()):a(e.data)?e.data:o.getDefault());t.provide(Po,s),t.provide(hr,Up(i,"default",Rt));const d=new Map;return t.provide(Tn,d),t.provide(xo,e.config??{}),t.watch(s,p=>{r("change",t.toValue(p))},{deep:!0,immediate:!0}),(p,c)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(p.tag),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(i)[t.unref(Rt)]))),t.renderSlot(p.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,u=>(t.openBlock(),t.createBlock(Fe,{key:Object.keys(u)[0],name:Object.keys(u)[0],onGlobalAction:c[0]||(c[0]=(m,_)=>r("globalAction",m,_))},null,8,["name"]))),128))])]),_:3}))}}),Bf={class:"ff-advanced-fields"},Fo=se(t.defineComponent({__name:"AdvancedFields",setup(e){const{t:n}=Oe.createI18n("en-us",Be),{getSchema:r}=$e(),i=t.ref(!0);return(o,a)=>(t.openBlock(),t.createBlock(t.unref(Ce.KCollapse),{modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=l=>i.value=l),"trigger-label":i.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",Bf,[t.unref(r)("instance_name")?(t.openBlock(),t.createBlock(Fe,{key:0,name:"instance_name"})):t.createCommentVNode("",!0),t.unref(r)("protocols")?(t.openBlock(),t.createBlock(Fe,{key:1,name:"protocols"})):t.createCommentVNode("",!0),t.unref(r)("tags")?(t.openBlock(),t.createBlock(Do,{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.renderSlot(o.$slots,"default",{},void 0,!0)])]),_:3},8,["modelValue","trigger-label"]))}}),[["__scopeId","data-v-190b1d21"]]),Lf=t.defineComponent({__name:"ConfigForm",props:{schema:{},data:{},onChange:{type:Function}},emits:["change"],setup(e,{emit:n}){const r=n,i={prepareFormData:l,hasValue:s},{i18n:{t:o}}=lt();function a(f,p=!1){return f.reduce((c,{[Xt]:u,name:m})=>(p?c[m]=u:c[u]=m,c),{})}function l(f){var m;const p=ho(f);if(!((m=p.config)!=null&&m.callouts))return p;const{callouts:c}=p.config;c.forEach(_=>{_.request.body.custom=_.request.body.custom??{},_[Xt]=Lo()});const u=a(c,!0);return c.forEach(_=>{_.depends_on=_.depends_on.map(b=>u[b])}),p}function s(f){return!!(f!=null&&f.config)}function d(f){var u;if(!f)return;const p=ho(f);if(!((u=p.config)!=null&&u.callouts))throw new Error("data is not correct");const c=a(p.config.callouts);p.config.callouts=p.config.callouts.map(m=>{const{[Xt]:_,depends_on:b,...g}=m;return{depends_on:b.map(h=>c[h]).filter(h=>h!=null),...g}}),r("change",p)}return(f,p)=>(t.openBlock(),t.createBlock(Ar,{class:"rc-config-form",config:i,data:f.data,schema:f.schema,tag:"div",onChange:d},{[t.unref(Rt)]:t.withCtx(()=>[t.createVNode(Vo,{match:({path:c})=>c.endsWith("by_lua")},{default:t.withCtx(c=>[t.createVNode(Cr,t.mergeProps(c,{autosize:"",class:"rc-code",multiline:"",placeholder:t.unref(o)("plugins.free-form.request-callout.by_lua_placeholder")}),null,16,["placeholder"])]),_:1},8,["match"]),t.createVNode(Vo,{match:({path:c})=>["cluster_nodes","sentinel_nodes"].some(u=>c.endsWith(u))},{default:t.withCtx(c=>[t.createVNode(wr,t.mergeProps(c,{appearance:"card"}),null,16)]),_:1},8,["match"])]),default:t.withCtx(()=>[t.createVNode(Qe,{"as-child":"",name:"config","reset-label-path":"reset"},{default:t.withCtx(()=>[t.createVNode(Rf),t.createVNode(Qe,{appearance:"card","fields-order":["headers","query","body","by_lua"],name:"upstream"}),t.createVNode(Qe,{appearance:"card",name:"cache"},{redis:t.withCtx(c=>[t.createVNode(Qe,t.mergeProps(c,{"fields-order":["host","port","connection_is_proxied","database","username","password","sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","cluster_nodes","cluster_max_redirections","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]}),null,16)]),_:2},1024)]),_:1}),t.createVNode(Fo)]),_:2},1032,["data","schema"]))}}),$f={class:"sc-form-pinned-fields"},Df={class:"sc-form-config-form"},Ko=se(t.defineComponent({__name:"PluginFormWrapper",props:{schema:{},formSchema:{},model:{},formModel:{},formOptions:{},isEditing:{type:Boolean},onModelUpdated:{type:Function},onFormChange:{type:Function}},setup(e){const{t:n}=Oe.createI18n("en-us",Be),r=e;t.useSlots();function i(p){return t.computed(()=>({fields:t.toValue(p).map(c=>{var u;return(u=r.formSchema)==null?void 0:u.fields.find(m=>m.model===c)}).filter(Boolean)}))}const a=i(["enabled","selectionGroup"]),l=["config","protocols"],s=t.computed(()=>{const p=r.schema;p.fields=p.fields.filter(u=>l.includes(Object.keys(u)[0])),p.fields.unshift({instance_name:{type:"string",description:n("plugins.form.fields.instance_name.help")}},{tags:{type:"set",default:[],description:n("plugins.form.fields.tags.help"),elements:{type:"string"}}});const c=p.fields.find(u=>Object.keys(u)[0]==="protocols");return c&&(c.protocols.help=c.protocols.default?n("plugins.form.fields.protocols.placeholderWithDefaultValues",{protocols:c.protocols.default.join(", ")}):n("plugins.form.fields.protocols.placeholder"),c.protocols.description=n("plugins.form.fields.protocols.help")),p}),d=t.ref(!1);function f(p){return pr(p,["config","instance_name","partials","protocols","tags"])}return(p,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",$f,[t.createVNode(t.unref(ge.VueFormGenerator),{model:p.formModel,options:p.formOptions,schema:t.unref(a),onModelUpdated:p.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])]),t.createVNode(t.unref(Ce.KCollapse),{modelValue:d.value,"onUpdate:modelValue":c[1]||(c[1]=u=>d.value=u),class:"sc-form-config-fields"},{title:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.form.grouping.plugin_configuration.title")),1)]),"visible-content":t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.form.grouping.plugin_configuration.description")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",Df,[t.renderSlot(p.$slots,"default",{data:f(p.model),schema:s.value,onChange:c[0]||(c[0]=(...u)=>p.onFormChange&&p.onFormChange(...u))},void 0,!0)])]),_:3},8,["modelValue"])],64))}}),[["__scopeId","data-v-175fd883"]]),Vf=t.defineComponent({__name:"RequestCalloutForm",props:{schema:{},formSchema:{},model:{},formModel:{},formOptions:{},isEditing:{type:Boolean},onModelUpdated:{type:Function},onFormChange:{type:Function}},setup(e){const n=e,r=t.useSlots();return t.provide(ge.AUTOFILL_SLOT,r==null?void 0:r[ge.AUTOFILL_SLOT_NAME]),(i,o)=>(t.openBlock(),t.createBlock(Ko,t.normalizeProps(t.guardReactiveProps(n)),{default:t.withCtx(a=>[t.createVNode(Lf,t.normalizeProps(t.guardReactiveProps(a)),null,16)]),_:1},16))}}),Ff={key:1},Kf=["innerHTML"],Uf={class:"horizontal-container"},Mf=se(t.defineComponent({__name:"RadioField",props:{name:{},labelAttributes:{},multiple:{type:Boolean},items:{},label:{}},emits:["update:modelValue"],setup(e,{emit:n}){const r=n,i=t.createPropsRestProxy(e,["name","items"]),{getSelectItems:o}=$e(),a=We(t.toRef(()=>e.name)),l=rt(a.path,i),s=t.computed(()=>e.items?e.items:a.path?o(a.path.value):[]),d=f=>{a.value&&(a.value.value=f),r("update:modelValue",f)};return(f,p)=>{var m;const c=t.resolveComponent("KAlert"),u=t.resolveComponent("KLabel");return t.unref(a).error?(t.openBlock(),t.createBlock(c,{key:0,appearance:"danger",message:t.unref(a).error.message},null,8,["message"])):(t.openBlock(),t.createElementBlock("div",Ff,[t.createVNode(u,t.normalizeProps(t.guardReactiveProps(t.unref(l).labelAttributes)),t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l).label)+" ",1)]),_:2},[(m=t.unref(l).labelAttributes)!=null&&m.info?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{innerHTML:t.unref(l).labelAttributes.info},null,8,Kf)]),key:"0"}:void 0]),1040),t.createElementVNode("div",Uf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,_=>(t.openBlock(),t.createBlock(t.unref(Ce.KRadio),{key:_.value,"model-value":t.unref(a).value.value,"onUpdate:modelValue":[p[0]||(p[0]=b=>t.unref(a).value.value=b),d],"card-orientation":"horizontal",label:_.label,"selected-value":_.value},null,8,["model-value","label","selected-value"]))),128))])]))}}}),[["__scopeId","data-v-b5a23a0b"]]),jf={class:"sp-form-request-limits-subtitle"},qf={class:"sp-form-request-limits-content"},Gf={class:"sp-form-window-type"},Hf={class:"sp-form-request-limits-items"},zf={class:"sp-form-request-limits-row"},Wf=["id"],Yf={class:"sp-form-request-limits-actions"},Jf={key:0,class:"sp-form-request-limits-examples"},Xf={class:"sp-form-request-limits-examples-badges"},Er="config.window_type",Qf=se(t.defineComponent({__name:"RequestLimitsForm",setup(e){var g;const{t:n}=Oe.createI18n("en-us",Be),{formData:r,getSelectItems:i,getSchema:o}=$e(),a=t.computed(()=>{var k,P;const h=(P=(k=r.config)==null?void 0:k.limit)==null?void 0:P.map((R,I)=>{var y,T;return{limit:R,windowSize:(T=(y=r.config)==null?void 0:y.window_size)==null?void 0:T[I]}});return!Array.isArray(h)||h.length===0?[{limit:null,windowSize:null}]:h}),{getKey:l}=Bo("request-limits",a),s=h=>{var k,P;u.value=void 0,r.config&&((k=r.config.limit)!=null&&k.length||(r.config.limit=[null]),(P=r.config.window_size)!=null&&P.length||(r.config.window_size=[null]),r.config.limit.splice(h+1,0,null),r.config.window_size.splice(h+1,0,null))},d=h=>{r.config&&(r.config.limit.splice(h,1),r.config.window_size.splice(h,1))},f=(g=o(Er))==null?void 0:g.default,p=t.computed(()=>$i(r,Er)),c=t.computed(()=>i(Er).sort((h,k)=>h.value===f?-1:k.value===f?1:0)),u=t.ref(),m={fixed:[{label:n("sp.use_cases.fixed.hourly_500.label"),description:n("sp.use_cases.fixed.hourly_500.description"),config:{limit:500,window_size:3600}},{label:n("sp.use_cases.fixed.half_hourly_200.label"),description:n("sp.use_cases.fixed.half_hourly_200.description"),config:{limit:200,window_size:1800}},{label:n("sp.use_cases.fixed.daily_500.label"),description:n("sp.use_cases.fixed.daily_500.description"),config:{limit:500,window_size:86400}}],sliding:[{label:n("sp.use_cases.sliding.hourly_100.label"),description:n("sp.use_cases.sliding.hourly_100.description"),config:{limit:100,window_size:3600}},{label:n("sp.use_cases.sliding.half_hourly_300.label"),description:n("sp.use_cases.sliding.half_hourly_300.description"),config:{limit:300,window_size:1800}},{label:n("sp.use_cases.sliding.hourly_500.label"),description:n("sp.use_cases.sliding.hourly_500.description"),config:{limit:500,window_size:3600}}]},_=t.computed(()=>Object.prototype.hasOwnProperty.call(m,p.value)?m[p.value]:[]),b=(h,k)=>{if(k===u.value){t.nextTick(()=>{u.value=void 0}),r.config.limit=[],r.config.window_size=[];return}t.nextTick(()=>{u.value=k}),r.config.limit=[h.config.limit],r.config.window_size=[h.config.window_size]};return(h,k)=>{const P=t.resolveComponent("KLabel"),R=t.resolveComponent("KButton"),I=t.resolveComponent("KBadge"),y=t.resolveComponent("KTooltip"),T=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(T,{class:"sp-form-request-limits"},{title:t.withCtx(()=>[t.createVNode(P,{class:"sp-form-request-limits-title",for:"sp-form-request-limits-legend",required:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("sp.request_limits.title")),1)]),_:1}),t.createElementVNode("div",jf,t.toDisplayString(t.unref(n)("sp.request_limits.subtitle")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",qf,[t.createElementVNode("div",Gf,[t.createVNode(Mf,{items:c.value,label:t.unref(n)("sp.window_type.label"),name:"window_type","onUpdate:modelValue":k[0]||(k[0]=A=>u.value=void 0)},null,8,["items","label"])]),t.createElementVNode("div",Hf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(A,S)=>(t.openBlock(),t.createElementBlock("div",{key:t.unref(l)(A,S)},[t.createVNode(P,{for:`sp-form-request-limits-item-${S}-legend`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("sp.request_limits.label_index",{index:S+1})),1)]),_:2},1032,["for"]),t.createElementVNode("div",zf,[t.createElementVNode("legend",{id:`sp-form-request-limits-item-${S}-legend`,class:"sp-form-request-limits-inputs"},[t.createVNode(Nn,{name:`$.config.limit.${S}`,placeholder:t.unref(n)("sp.request_limits.request_number")},null,8,["name","placeholder"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(n)("sp.request_limits.interval_determiner")),1),t.createVNode(Nn,{name:`$.config.window_size.${S}`,placeholder:t.unref(n)("sp.request_limits.time_interval")},null,8,["name","placeholder"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(n)("sp.request_limits.seconds")),1)],8,Wf),t.createElementVNode("div",Yf,[t.createVNode(R,{appearance:"tertiary",disabled:a.value.length<=1,onClick:()=>d(S)},{default:t.withCtx(()=>[t.createVNode(t.unref(he.RemoveIcon))]),_:2},1032,["disabled","onClick"]),t.createVNode(R,{appearance:"tertiary",onClick:()=>s(S)},{default:t.withCtx(()=>[t.createVNode(t.unref(he.AddIcon))]),_:2},1032,["onClick"])])])]))),128))]),_.value.length>0?(t.openBlock(),t.createElementBlock("div",Jf,[t.createElementVNode("div",null,t.toDisplayString(t.unref(n)("sp.start_with_a_use_case")),1),t.createElementVNode("div",Xf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,(A,S)=>(t.openBlock(),t.createBlock(y,{key:`use-case-${S}`,"max-width":"300"},{content:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(A.description),1),k[1]||(k[1]=t.createElementVNode("br",null,null,-1)),t.createElementVNode("div",null,t.toDisplayString(t.unref(n)("sp.request_limits.label"))+": "+t.toDisplayString(A.config.limit),1),t.createElementVNode("div",null,t.toDisplayString(t.unref(n)("sp.request_limits.time_interval"))+": "+t.toDisplayString(A.config.window_size),1)]),default:t.withCtx(()=>[t.createVNode(I,{appearance:u.value===`${p.value}-${S}`?"info":"decorative",class:"sp-form-request-limits-examples-badge",onClick:()=>b(A,`${p.value}-${S}`)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(A.label),1)]),_:2},1032,["appearance","onClick"])]),_:2},1024))),128))])])):t.createCommentVNode("",!0)])]),_:1})}}}),[["__scopeId","data-v-f3727aa3"]]),Zf={id:"sp-form-error-legend",class:"sp-form-error-inputs"},em=se(t.defineComponent({__name:"ErrorMessageForm",setup(e){const{t:n}=Oe.createI18n("en-us",Be);return(r,i)=>{const o=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{for:"sp-form-error-legend",info:t.unref(n)("sp.error_message.help"),required:"","tooltip-attributes":{maxWidth:"300",placement:"top"}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("sp.error_message.label")),1)]),_:1},8,["info"]),t.createElementVNode("legend",Zf,[t.createVNode(Nn,{class:"input-error-code",label:"",name:"error_code",placeholder:t.unref(n)("sp.error_message.code_placeholder")},null,8,["placeholder"]),i[0]||(i[0]=t.createElementVNode("div",null,":",-1)),t.createVNode(Cr,{class:"input-error-message",label:"",name:"error_message",placeholder:t.unref(n)("sp.error_message.message_placeholder")},null,8,["placeholder"])])])}}}),[["__scopeId","data-v-25eb297d"]]),tm={class:"partial-config-card"},nm={class:"config-card-row-label"},rm={class:"label-text"},im=["data-testid"],om=["data-testid"],am={key:1},lm=["data-testid"],sm=["data-testid"],cm=se(t.defineComponent({__name:"RedisConfigCard",props:{configFields:{},pluginRedisFields:{}},setup(e){const{t:n,formatUnixTimeStamp:r}=Oe.createI18n("en-us",Be),i={id:{order:1},name:{order:1},type:{label:n("redis.config_card.common_fields.type_label"),hidden:!0,type:"hidden"},created_at:{label:n("redis.config_card.common_fields.created_at_label"),formatter:r,order:2},updated_at:{label:n("redis.config_card.common_fields.updated_at_label"),formatter:r,order:3}},o=e,a=c=>c!=null,l=(c,u)=>a(u)&&["password","sentinel_password"].includes(c)?"password":"text",{convertKeyToTitle:s}=L.useStringHelpers(),d=t.computed(()=>Object.entries(o.configFields).map(([c,u])=>{var m,_,b,g;return{key:c,label:((m=i[c])==null?void 0:m.label)??s(c),value:(_=i[c])!=null&&_.formatter?i[c].formatter(u):u,type:((b=i[c])==null?void 0:b.type)??l(c,u),order:((g=i[c])==null?void 0:g.order)??100}}).sort((c,u)=>c.order-u.order).filter(c=>c.type!=="hidden")),f=Yp(o.configFields,o.pluginRedisFields||[]),p=t.computed(()=>d.value.concat(f));return(c,u)=>{const m=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",tm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,({key:_,label:b,value:g,type:h})=>(t.openBlock(),t.createElementBlock("div",{key:_,class:"partial-config-card-row"},[t.createElementVNode("div",nm,[t.createElementVNode("div",rm,t.toDisplayString(b),1)]),t.createElementVNode("div",{class:"config-card-row-value","data-testid":`${_}-property-value`},[a(g)?(t.openBlock(),t.createElementBlock("div",am,[h==="password"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${_}-copy-password`},[t.createVNode(m,{format:"redacted",text:String(g)},null,8,["text"])],8,lm)):(t.openBlock(),t.createElementBlock("div",{key:1,"data-testid":`${_}-plain-text`},t.toDisplayString(g),9,sm))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${_}-no-value`}," – ",8,om))],8,im)]))),128))])}}}),[["__scopeId","data-v-836def53"]]),dm=se(t.defineComponent({__name:"NewRedisPartialModal",props:{visible:{type:Boolean,default:!1},partialType:{type:String,default:""}},emits:["partialUpdated","partialUpdateFailed","modalClose"],setup(e,{emit:n}){const r=e,{t:i}=Oe.createI18n("en-us",Be),o=t.inject(ge.FORMS_CONFIG),a=n,{getMessageFromError:l}=L.useErrors(),s=t.computed(()=>{switch(r.partialType){case Mt.PartialType.REDIS_CE:return Mt.PartialType.REDIS_EE;case Mt.PartialType.REDIS_EE:return Mt.PartialType.REDIS_CE;default:return}}),d=t.ref(!1),f=t.ref(),p=m=>{a("partialUpdateFailed",{message:l(m),appearance:"danger"})},c=()=>{a("partialUpdated",{message:i("plugins.free-form.redis_partial.partial_created_success_message"),appearance:"success"}),u()},u=()=>{f.value=void 0,a("modalClose"),t.nextTick(()=>{d.value=!1})};return t.watch(()=>r.visible,m=>{m&&(d.value=!0,t.nextTick(()=>{f.value="#km-modal-footer"}))}),(m,_)=>{const b=t.resolveComponent("KModal");return t.openBlock(),t.createBlock(b,{class:"plugin-redis-partial-form","data-testid":"redis-partial-form-modal","full-screen":"",title:t.unref(i)("plugins.free-form.redis_partial.redis_partial_modal_title"),visible:d.value,onCancel:u},{footer:t.withCtx(()=>_[0]||(_[0]=[t.createElementVNode("div",{id:"km-modal-footer"},null,-1)])),default:t.withCtx(()=>[t.createVNode(t.unref(Mt.RedisConfigurationForm),{"action-teleport-target":f.value,config:t.unref(o),"disabled-partial-type":s.value,"slidout-top-offset":0,onCancel:u,onError:p,onUpdate:c},null,8,["action-teleport-target","config","disabled-partial-type"])]),_:1},8,["title","visible"])}}}),[["__scopeId","data-v-ac12474e"]]),um="#00abd2",pm="12px",fm="16px",Sr="20px",mm="24px",Uo=Symbol("redis-partial-info"),Mo={konnect:{getOne:"/v2/control-planes/{controlPlaneId}/core-entities/partials/{id}",getAll:"/v2/control-planes/{controlPlaneId}/core-entities/partials"},kongManager:{getOne:"/{workspace}/partials/{id}",getAll:"/{workspace}/partials"}},jo=["host","port","connection_is_proxied","database","username","password","sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","cluster_nodes","cluster_max_redirections","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"],gm={class:"redis-config-radio-group","data-testid":"redis-config-radio-group"},ym={key:0,class:"shared-redis-config"},hm={class:"shared-redis-config-title"},_m={class:"redis-config-select","data-testid":"redis-config-select"},bm={class:"selected-redis-config"},km=["data-testid"],Cm={class:"select-item-name","data-testid":"selected-redis-config"},wm={class:"empty-redis-config","data-testid":"empty-redis-config"},Am={key:1,class:"redis-shared-config-error-message","data-testid":"redis-config-fetch-error"},Em=se(t.defineComponent({__name:"RedisSelector",props:{defaultRedisConfigItem:{},redisType:{},redisPath:{}},emits:["showNewPartialModal","globalAction"],setup(e,{emit:n}){var Z;const r=n,{t:i}=Oe.createI18n("en-us",Be),o=e,a=t.inject(Uo),l=(a==null?void 0:a.isEditing)||!1,s=t.computed(()=>{var q;return o.redisPath?o.redisPath:(q=a==null?void 0:a.redisPath)!=null&&q.value?"$."+a.redisPath.value:"$.config.redis"}),d=o.redisType||((Z=a==null?void 0:a.redisType)==null?void 0:Z.value)||"all",f=t.computed(()=>{var q;return!!((q=a==null?void 0:a.redisType)!=null&&q.value)}),p=t.ref(!1),c=t.ref(null),u=t.ref(!l),{getMessageFromError:m}=L.useErrors(),_=t.ref(o.defaultRedisConfigItem),b=t.ref({}),g=t.ref(),{value:h}=Ro("$.partials"),{value:k}=We(s),P=t.inject(ge.FORMS_CONFIG),{debouncedQueryChange:R,loading:I,error:y,loadItems:T,results:A}=L.useDebouncedFilter(P,Mo[P.app].getAll,void 0,{fetchedItemsKey:"data",searchKeys:["id","name"]}),S=t.computed(()=>y.value?m(y.value):""),ie=q=>{let v=`${P.apiBaseUrl}${Mo[P.app].getOne}`;return P.app==="konnect"?v=v.replace(/{controlPlaneId}/gi,(P==null?void 0:P.controlPlaneId)||""):P.app==="kongManager"&&(v=v.replace(/\/{workspace}/gi,P!=null&&P.workspace?`/${P.workspace}`:"")),v=v.replace(/{id}/gi,String(q)),v},Q=t.computed(()=>{var v;const q=((v=A.value)==null?void 0:v.map(N=>({label:N.id,name:N.name,value:N.id,type:N.type,tag:Hp(N)})))||[];return d!=="all"?q.filter(N=>N.type===d):q}),{axiosInstance:H}=L.useAxios(P==null?void 0:P.axiosRequestConfig),w=()=>{u.value?(g.value&&(h.value=g.value,_.value=g.value[0].id,k.value=void 0),k!=null&&k.value&&(b.value=k.value)):(Object.keys(b.value).length&&(k.value=b.value),h!=null&&h.value&&(g.value=h.value),h.value=l?null:void 0)},O=q=>{T(),r("globalAction","notify",q)},$=q=>{r("globalAction","notify",q)},K=async q=>{if(q){_.value=q,h.value=[{id:q}],g.value=[{id:q}],k.value=void 0;try{const v=await H.get(ie(q));if(v.data.config){const N=Object.assign(v.data,v.data.config);delete N.config,c.value=N}}catch(v){console.error(v)}}};return t.watch(()=>u.value,()=>{w()}),t.onBeforeMount(()=>{var q;if(T(),o.defaultRedisConfigItem||h!=null&&h.value){const v=o.defaultRedisConfigItem||((q=h==null?void 0:h.value)==null?void 0:q[0].id);K(v),u.value=!0}else k!=null&&k.value&&(b.value=k.value)}),(q,v)=>{const N=t.resolveComponent("KBadge"),B=t.resolveComponent("KRadio"),ae=t.resolveComponent("KSelect"),de=t.resolveComponent("KCard");return f.value?(t.openBlock(),t.createBlock(de,{key:0,class:"redis-config-card","data-testid":"redis-config-card",title:t.unref(i)("redis.title")},{default:t.withCtx(()=>[t.createElementVNode("div",gm,[t.createVNode(B,{modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=le=>u.value=le),card:"","card-orientation":"horizontal","data-testid":"shared-redis-config-radio",description:t.unref(i)("redis.shared_configuration.description"),label:t.unref(i)("redis.shared_configuration.label"),"selected-value":!0},{default:t.withCtx(()=>[t.createVNode(N,{appearance:"success"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("redis.shared_configuration.badge")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),t.createVNode(B,{modelValue:u.value,"onUpdate:modelValue":v[1]||(v[1]=le=>u.value=le),card:"","card-orientation":"horizontal","data-testid":"dedicated-redis-config-radio",description:t.unref(i)("redis.dedicated_configuration.description"),label:t.unref(i)("redis.dedicated_configuration.label"),"selected-value":!1},null,8,["modelValue","description","label"])]),u.value?(t.openBlock(),t.createElementBlock("div",ym,[t.createElementVNode("div",hm,t.toDisplayString(t.unref(i)("redis.shared_configuration.title")),1),t.createElementVNode("div",_m,[t.createVNode(ae,{class:"redis-config-select-trigger","data-testid":"redis-config-select-trigger","enable-filtering":"","filter-function":()=>!0,items:Q.value,loading:t.unref(I),"model-value":_.value,placeholder:t.unref(i)("redis.shared_configuration.selector.placeholder"),onChange:v[3]||(v[3]=le=>K(le==null?void 0:le.value)),onQueryChange:t.unref(R)},{"selected-item-template":t.withCtx(({item:le})=>[t.createElementVNode("div",bm,t.toDisplayString(le.name),1)]),"item-template":t.withCtx(({item:le})=>[t.createElementVNode("div",{class:"plugin-form-redis-configuration-dropdown-item","data-testid":`redis-configuration-dropdown-item-${le.name}`},[t.createElementVNode("span",Cm,t.toDisplayString(le.name),1),t.createVNode(N,{appearance:"info",class:"select-item-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(le.tag),1)]),_:2},1024)],8,km)]),empty:t.withCtx(()=>[t.createElementVNode("div",wm,t.toDisplayString(t.unref(i)("redis.shared_configuration.empty_state")),1)]),"dropdown-footer-text":t.withCtx(()=>[t.createElementVNode("div",{class:"new-redis-config-area","data-testid":"new-redis-config-area",onClick:v[2]||(v[2]=()=>p.value=!0)},[t.createVNode(t.unref(he.AddIcon),{size:t.unref(pm)},null,8,["size"]),t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("redis.shared_configuration.create_new_configuration",{type:t.unref(Wp)(t.unref(d))})),1)])]),_:1},8,["items","loading","model-value","placeholder","onQueryChange"])]),c.value?(t.openBlock(),t.createBlock(cm,{key:0,"config-fields":c.value},null,8,["config-fields"])):t.createCommentVNode("",!0),S.value?(t.openBlock(),t.createElementBlock("p",Am,t.toDisplayString(S.value||t.unref(i)("redis.shared_configuration.error")),1)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createBlock(Qe,t.mergeProps({key:1},o,{"as-child":"","fields-order":t.unref(jo),name:s.value,"reset-label-path":"reset"}),null,16,["fields-order","name"])),t.createVNode(dm,{"partial-type":t.unref(d),visible:p.value,onModalClose:v[4]||(v[4]=le=>p.value=!1),onPartialUpdateFailed:$,onPartialUpdated:O},null,8,["partial-type","visible"])]),_:1},8,["title"])):(t.openBlock(),t.createBlock(Qe,t.mergeProps({key:1},o,{"fields-order":t.unref(jo),"hide-required-asterisk":"",name:s.value}),null,16,["fields-order","name"]))}}}),[["__scopeId","data-v-de362563"]]),Sm=t.defineComponent({__name:"RedisField",setup(e){const{formData:n}=$e();return t.watchEffect(()=>{n.config&&n.config.strategy!=="redis"&&(n.partials=void 0)}),(r,i)=>(t.openBlock(),t.createBlock($o,null,{default:t.withCtx(()=>{var o;return[((o=t.unref(n).config)==null?void 0:o.strategy)==="redis"?(t.openBlock(),t.createBlock(Em,{key:0})):t.createCommentVNode("",!0)]}),_:1}))}}),Pm=t.defineComponent({__name:"ConfigForm",props:{schema:{},data:{}},setup(e){const n={hasValue:r=>!!(r!=null&&r.config)};return(r,i)=>(t.openBlock(),t.createBlock(Ar,{class:"rc-config-form",config:n,data:r.data,schema:r.schema,tag:"div",onChange:i[0]||(i[0]=o=>r.$emit("change",o))},{default:t.withCtx(()=>[t.createVNode(Qe,{"as-child":"",name:"config","reset-label-path":"reset"},{default:t.withCtx(()=>[t.createVNode(Qf),t.createVNode(em)]),_:1}),t.createVNode(Fo,null,{default:t.withCtx(()=>[t.createVNode(Fe,{name:"config.dictionary_name"}),t.createVNode(Fe,{name:"config.lock_dictionary_name"}),t.createVNode(Fe,{name:"config.strategy"}),t.createVNode(Sm),t.createVNode(Fe,{name:"config.namespace"}),t.createVNode(Fe,{name:"config.hide_client_headers"}),t.createVNode(Fe,{name:"config.disable_penalty"}),t.createVNode(Fe,{name:"config.retry_after_jitter_max"}),t.createVNode(Fe,{name:"config.sync_rate"})]),_:1})]),_:1},8,["data","schema"]))}}),Tm=t.defineComponent({__name:"ServiceProtectionForm",props:{schema:{},formSchema:{},model:{},formModel:{},formOptions:{},isEditing:{type:Boolean},onModelUpdated:{type:Function},onFormChange:{type:Function}},setup(e){const n=e,r=t.useSlots();return t.provide(ge.AUTOFILL_SLOT,r==null?void 0:r[ge.AUTOFILL_SLOT_NAME]),(i,o)=>(t.openBlock(),t.createBlock(Ko,t.normalizeProps(t.guardReactiveProps(n)),{default:t.withCtx(a=>[t.createVNode(Pm,t.normalizeProps(t.guardReactiveProps(a)),null,16)]),_:1},16))}}),Nm={class:"ff-standard-layout"},xm={class:"enabled"},Om={class:"scope"},Im={key:0,class:"scope-detail"},vm=se(t.defineComponent({__name:"StandardLayout",props:{generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},formOptions:{},isEditing:{type:Boolean},onModelUpdated:{type:Function},onFormChange:{type:Function},onValidityChange:{type:Function}},setup(e){const{t:n}=Oe.createI18n("en-us",Be),r=e,i=t.useSlots();t.provide(ge.AUTOFILL_SLOT,i==null?void 0:i[ge.AUTOFILL_SLOT_NAME]);const o=t.computed(()=>{var g;return{fields:(g=r.formSchema)==null?void 0:g.fields.filter(h=>h.model==="enabled")}}),a=t.computed(()=>{var g;return(g=r.formSchema)==null?void 0:g.fields.find(h=>h.model==="selectionGroup")}),l=t.computed(()=>(a.value.fields||[]).map(({label:g,description:h})=>({label:g,description:h}))),s=t.computed(()=>a.value.fields[1]),d=t.computed(()=>{var h;const g=["instance_name","protocols","tags"];return{fields:(h=r.formSchema)==null?void 0:h.fields.filter(k=>g.includes(k.model))}}),f=["config"],p=t.computed(()=>{const g=r.schema;return g.fields=g.fields.filter(h=>f.includes(Object.keys(h)[0])),g});function c(g){return pr(g,["config","partials"])}const u=t.ref(!1),m=t.ref(!0),_=pr(r.formModel,["service-id","route-id","consumer-id","consumer_group-id"]);function b(g,h){_[h]=g,r.onModelUpdated(g,h)}return t.watch(u,g=>{g?Object.keys(_).forEach(h=>{r.onModelUpdated(_[h],h)}):Object.keys(_).forEach(h=>{r.onModelUpdated("",h)})}),(g,h)=>{const k=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock("div",Nm,[t.createVNode(t.unref(L.EntityFormBlock),{description:t.unref(n)("plugins.form.sections.general_info.description"),step:1,title:t.unref(n)("plugins.form.sections.general_info.title")},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("div",xm,[t.createVNode(t.unref(ge.VueFormGenerator),{model:g.formModel,options:g.formOptions,schema:o.value,onModelUpdated:g.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])]),t.createElementVNode("div",Om,[t.createVNode(t.unref(Ce.KRadio),t.mergeProps({modelValue:u.value,"onUpdate:modelValue":h[0]||(h[0]=P=>u.value=P),card:"","card-orientation":"horizontal"},l.value[0],{"selected-value":!1}),null,16,["modelValue"]),t.createVNode(t.unref(Ce.KRadio),t.mergeProps({modelValue:u.value,"onUpdate:modelValue":h[1]||(h[1]=P=>u.value=P),card:"","card-orientation":"horizontal"},l.value[1],{"selected-value":!0}),null,16,["modelValue"])]),u.value?(t.openBlock(),t.createElementBlock("div",Im,[t.createVNode(t.unref(ge.VueFormGenerator),{model:g.formModel,options:g.formOptions,schema:s.value,onModelUpdated:b},null,8,["model","options","schema"])])):t.createCommentVNode("",!0),t.createVNode(k,{modelValue:m.value,"onUpdate:modelValue":h[2]||(h[2]=P=>m.value=P),"trigger-label":"Show more"},{default:t.withCtx(()=>[t.createVNode(t.unref(ge.VueFormGenerator),{model:g.formModel,options:g.formOptions,schema:d.value,onModelUpdated:g.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])]),_:1},8,["modelValue"])]),_:2},[i["general-info-title"]?{name:"title",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"general-info-title",{},void 0,!0)]),key:"0"}:void 0,i["general-info-description"]?{name:"description",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"general-info-description",{},void 0,!0)]),key:"1"}:void 0,i["general-info-extra"]?{name:"extra",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"general-info-extra",{},void 0,!0)]),key:"2"}:void 0]),1032,["description","title"]),t.createVNode(t.unref(L.EntityFormBlock),{description:t.unref(n)("plugins.form.sections.plugin_config.description"),step:2,title:t.unref(n)("plugins.form.sections.plugin_config.title")},t.createSlots({default:t.withCtx(()=>[t.renderSlot(g.$slots,"default",{data:c(g.model),schema:p.value,onChange:h[3]||(h[3]=(...P)=>g.onFormChange&&g.onFormChange(...P))},void 0,!0)]),_:2},[i["plugin-config-title"]?{name:"title",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"plugin-config-title",{},void 0,!0)]),key:"0"}:void 0,i["plugin-config-description"]?{name:"description",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"plugin-config-description",{},void 0,!0)]),key:"1"}:void 0,i["plugin-config-extra"]?{name:"extra",fn:t.withCtx(()=>[t.renderSlot(g.$slots,"plugin-config-extra",{},void 0,!0)]),key:"2"}:void 0]),1032,["description","title"])])}}}),[["__scopeId","data-v-a727028f"]]);typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Rm=e=>e!=null;/*!
|
|
12
14
|
* tabbable 6.2.0
|
|
13
15
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
14
|
-
*/var
|
|
16
|
+
*/var qo=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],xn=qo.join(","),Go=typeof Element>"u",Ct=Go?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,On=!Go&&Element.prototype.getRootNode?function(e){var n;return e==null||(n=e.getRootNode)===null||n===void 0?void 0:n.call(e)}:function(e){return e==null?void 0:e.ownerDocument},In=function e(n,r){var i;r===void 0&&(r=!0);var o=n==null||(i=n.getAttribute)===null||i===void 0?void 0:i.call(n,"inert"),a=o===""||o==="true",l=a||r&&n&&e(n.parentNode);return l},Bm=function(n){var r,i=n==null||(r=n.getAttribute)===null||r===void 0?void 0:r.call(n,"contenteditable");return i===""||i==="true"},Ho=function(n,r,i){if(In(n))return[];var o=Array.prototype.slice.apply(n.querySelectorAll(xn));return r&&Ct.call(n,xn)&&o.unshift(n),o=o.filter(i),o},zo=function e(n,r,i){for(var o=[],a=Array.from(n);a.length;){var l=a.shift();if(!In(l,!1))if(l.tagName==="SLOT"){var s=l.assignedElements(),d=s.length?s:l.children,f=e(d,!0,i);i.flatten?o.push.apply(o,f):o.push({scopeParent:l,candidates:f})}else{var p=Ct.call(l,xn);p&&i.filter(l)&&(r||!n.includes(l))&&o.push(l);var c=l.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(l),u=!In(c,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(l));if(c&&u){var m=e(c===!0?l.children:c.children,!0,i);i.flatten?o.push.apply(o,m):o.push({scopeParent:l,candidates:m})}else a.unshift.apply(a,l.children)}}return o},Wo=function(n){return!isNaN(parseInt(n.getAttribute("tabindex"),10))},wt=function(n){if(!n)throw new Error("No node provided");return n.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(n.tagName)||Bm(n))&&!Wo(n)?0:n.tabIndex},Lm=function(n,r){var i=wt(n);return i<0&&r&&!Wo(n)?0:i},$m=function(n,r){return n.tabIndex===r.tabIndex?n.documentOrder-r.documentOrder:n.tabIndex-r.tabIndex},Yo=function(n){return n.tagName==="INPUT"},Dm=function(n){return Yo(n)&&n.type==="hidden"},Vm=function(n){var r=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(i){return i.tagName==="SUMMARY"});return r},Fm=function(n,r){for(var i=0;i<n.length;i++)if(n[i].checked&&n[i].form===r)return n[i]},Km=function(n){if(!n.name)return!0;var r=n.form||On(n),i=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(n.name));else try{o=i(n.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var a=Fm(o,n.form);return!a||a===n},Um=function(n){return Yo(n)&&n.type==="radio"},Mm=function(n){return Um(n)&&!Km(n)},jm=function(n){var r,i=n&&On(n),o=(r=i)===null||r===void 0?void 0:r.host,a=!1;if(i&&i!==n){var l,s,d;for(a=!!((l=o)!==null&&l!==void 0&&(s=l.ownerDocument)!==null&&s!==void 0&&s.contains(o)||n!=null&&(d=n.ownerDocument)!==null&&d!==void 0&&d.contains(n));!a&&o;){var f,p,c;i=On(o),o=(f=i)===null||f===void 0?void 0:f.host,a=!!((p=o)!==null&&p!==void 0&&(c=p.ownerDocument)!==null&&c!==void 0&&c.contains(o))}}return a},Jo=function(n){var r=n.getBoundingClientRect(),i=r.width,o=r.height;return i===0&&o===0},qm=function(n,r){var i=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(n).visibility==="hidden")return!0;var a=Ct.call(n,"details>summary:first-of-type"),l=a?n.parentElement:n;if(Ct.call(l,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof o=="function"){for(var s=n;n;){var d=n.parentElement,f=On(n);if(d&&!d.shadowRoot&&o(d)===!0)return Jo(n);n.assignedSlot?n=n.assignedSlot:!d&&f!==n.ownerDocument?n=f.host:n=d}n=s}if(jm(n))return!n.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Jo(n);return!1},Gm=function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var r=n.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var o=r.children.item(i);if(o.tagName==="LEGEND")return Ct.call(r,"fieldset[disabled] *")?!0:!o.contains(n)}return!0}r=r.parentElement}return!1},vn=function(n,r){return!(r.disabled||In(r)||Dm(r)||qm(r,n)||Vm(r)||Gm(r))},Pr=function(n,r){return!(Mm(r)||wt(r)<0||!vn(n,r))},Hm=function(n){var r=parseInt(n.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},zm=function e(n){var r=[],i=[];return n.forEach(function(o,a){var l=!!o.scopeParent,s=l?o.scopeParent:o,d=Lm(s,l),f=l?e(o.candidates):s;d===0?l?r.push.apply(r,f):r.push(s):i.push({documentOrder:a,tabIndex:d,item:o,isScope:l,content:f})}),i.sort($m).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concat(r)},Wm=function(n,r){r=r||{};var i;return r.getShadowRoot?i=zo([n],r.includeContainer,{filter:Pr.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Hm}):i=Ho(n,r.includeContainer,Pr.bind(null,r)),zm(i)},Ym=function(n,r){r=r||{};var i;return r.getShadowRoot?i=zo([n],r.includeContainer,{filter:vn.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):i=Ho(n,r.includeContainer,vn.bind(null,r)),i},Lt=function(n,r){if(r=r||{},!n)throw new Error("No node provided");return Ct.call(n,xn)===!1?!1:Pr(r,n)},Jm=qo.concat("iframe").join(","),Tr=function(n,r){if(r=r||{},!n)throw new Error("No node provided");return Ct.call(n,Jm)===!1?!1:vn(r,n)};/*!
|
|
15
17
|
* focus-trap 7.6.5
|
|
16
18
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
17
|
-
*/function
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vo(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Ko(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Vo(Object(r),!0).forEach(function(i){rm(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vo(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function am(e){return nm(e)||im(e)||cm(e)||om()}function lm(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function sm(e){var n=lm(e,"string");return typeof n=="symbol"?n:n+""}function cm(e,n){if(e){if(typeof e=="string")return Cr(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cr(e,n):void 0}}var Uo={activateTrap:function(n,r){if(n.length>0){var i=n[n.length-1];i!==r&&i._setPausedState(!0)}var o=n.indexOf(r);o===-1||n.splice(o,1),n.push(r)},deactivateTrap:function(n,r){var i=n.indexOf(r);i!==-1&&n.splice(i,1),n.length>0&&!n[n.length-1]._isManuallyPaused()&&n[n.length-1]._setPausedState(!1)}},um=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},dm=function(n){return(n==null?void 0:n.key)==="Escape"||(n==null?void 0:n.key)==="Esc"||(n==null?void 0:n.keyCode)===27},Jt=function(n){return(n==null?void 0:n.key)==="Tab"||(n==null?void 0:n.keyCode)===9},pm=function(n){return Jt(n)&&!n.shiftKey},fm=function(n){return Jt(n)&&n.shiftKey},jo=function(n){return setTimeout(n,0)},Xt=function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return typeof n=="function"?n.apply(void 0,i):n},xn=function(n){return n.target.shadowRoot&&typeof n.composedPath=="function"?n.composedPath()[0]:n.target},mm=[],gm=function(n,r){var i=(r==null?void 0:r.document)||document,o=(r==null?void 0:r.trapStack)||mm,a=Ko({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:pm,isKeyBackward:fm},r),l={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,u=function(w,N,v){return w&&w[N]!==void 0?w[N]:a[v||N]},f=function(w,N){var v=typeof(N==null?void 0:N.composedPath)=="function"?N.composedPath():void 0;return l.containerGroups.findIndex(function(F){var Z=F.container,re=F.tabbableNodes;return Z.contains(w)||(v==null?void 0:v.includes(Z))||re.find(function(M){return M===w})})},p=function(w){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=N.hasFallback,F=v===void 0?!1:v,Z=N.params,re=Z===void 0?[]:Z,M=a[w];if(typeof M=="function"&&(M=M.apply(void 0,am(re))),M===!0&&(M=void 0),!M){if(M===void 0||M===!1)return M;throw new Error("`".concat(w,"` was specified but was not a node, or did not return a node"))}var x=M;if(typeof M=="string"){try{x=i.querySelector(M)}catch(R){throw new Error("`".concat(w,'` appears to be an invalid selector; error="').concat(R.message,'"'))}if(!x&&!F)throw new Error("`".concat(w,"` as selector refers to no known node"))}return x},c=function(){var w=p("initialFocus",{hasFallback:!0});if(w===!1)return!1;if(w===void 0||w&&!kr(w,a.tabbableOptions))if(f(i.activeElement)>=0)w=i.activeElement;else{var N=l.tabbableGroups[0],v=N&&N.firstTabbableNode;w=v||p("fallbackFocus")}else w===null&&(w=p("fallbackFocus"));if(!w)throw new Error("Your focus-trap needs to have at least one focusable element");return w},d=function(){if(l.containerGroups=l.containers.map(function(w){var N=Zf(w,a.tabbableOptions),v=em(w,a.tabbableOptions),F=N.length>0?N[0]:void 0,Z=N.length>0?N[N.length-1]:void 0,re=v.find(function(R){return Lt(R)}),M=v.slice().reverse().find(function(R){return Lt(R)}),x=!!N.find(function(R){return At(R)>0});return{container:w,tabbableNodes:N,focusableNodes:v,posTabIndexesFound:x,firstTabbableNode:F,lastTabbableNode:Z,firstDomTabbableNode:re,lastDomTabbableNode:M,nextTabbableNode:function(ae){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,_e=N.indexOf(ae);return _e<0?se?v.slice(v.indexOf(ae)+1).find(function(pe){return Lt(pe)}):v.slice(0,v.indexOf(ae)).reverse().find(function(pe){return Lt(pe)}):N[_e+(se?1:-1)]}}}),l.tabbableGroups=l.containerGroups.filter(function(w){return w.tabbableNodes.length>0}),l.tabbableGroups.length<=0&&!p("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(l.containerGroups.find(function(w){return w.posTabIndexesFound})&&l.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(w){var N=w.activeElement;if(N)return N.shadowRoot&&N.shadowRoot.activeElement!==null?m(N.shadowRoot):N},k=function(w){if(w!==!1&&w!==m(document)){if(!w||!w.focus){k(c());return}w.focus({preventScroll:!!a.preventScroll}),l.mostRecentlyFocusedNode=w,um(w)&&w.select()}},_=function(w){var N=p("setReturnFocus",{params:[w]});return N||(N===!1?!1:w)},g=function(w){var N=w.target,v=w.event,F=w.isBackward,Z=F===void 0?!1:F;N=N||xn(v),d();var re=null;if(l.tabbableGroups.length>0){var M=f(N,v),x=M>=0?l.containerGroups[M]:void 0;if(M<0)Z?re=l.tabbableGroups[l.tabbableGroups.length-1].lastTabbableNode:re=l.tabbableGroups[0].firstTabbableNode;else if(Z){var R=l.tabbableGroups.findIndex(function(B){var q=B.firstTabbableNode;return N===q});if(R<0&&(x.container===N||kr(N,a.tabbableOptions)&&!Lt(N,a.tabbableOptions)&&!x.nextTabbableNode(N,!1))&&(R=M),R>=0){var ae=R===0?l.tabbableGroups.length-1:R-1,se=l.tabbableGroups[ae];re=At(N)>=0?se.lastTabbableNode:se.lastDomTabbableNode}else Jt(v)||(re=x.nextTabbableNode(N,!1))}else{var _e=l.tabbableGroups.findIndex(function(B){var q=B.lastTabbableNode;return N===q});if(_e<0&&(x.container===N||kr(N,a.tabbableOptions)&&!Lt(N,a.tabbableOptions)&&!x.nextTabbableNode(N))&&(_e=M),_e>=0){var pe=_e===l.tabbableGroups.length-1?0:_e+1,V=l.tabbableGroups[pe];re=At(N)>=0?V.firstTabbableNode:V.firstDomTabbableNode}else Jt(v)||(re=x.nextTabbableNode(N))}}else re=p("fallbackFocus");return re},A=function(w){var N=xn(w);if(!(f(N,w)>=0)){if(Xt(a.clickOutsideDeactivates,w)){s.deactivate({returnFocus:a.returnFocusOnDeactivate});return}Xt(a.allowOutsideClick,w)||w.preventDefault()}},P=function(w){var N=xn(w),v=f(N,w)>=0;if(v||N instanceof Document)v&&(l.mostRecentlyFocusedNode=N);else{w.stopImmediatePropagation();var F,Z=!0;if(l.mostRecentlyFocusedNode)if(At(l.mostRecentlyFocusedNode)>0){var re=f(l.mostRecentlyFocusedNode),M=l.containerGroups[re].tabbableNodes;if(M.length>0){var x=M.findIndex(function(R){return R===l.mostRecentlyFocusedNode});x>=0&&(a.isKeyForward(l.recentNavEvent)?x+1<M.length&&(F=M[x+1],Z=!1):x-1>=0&&(F=M[x-1],Z=!1))}}else l.containerGroups.some(function(R){return R.tabbableNodes.some(function(ae){return At(ae)>0})})||(Z=!1);else Z=!1;Z&&(F=g({target:l.mostRecentlyFocusedNode,isBackward:a.isKeyBackward(l.recentNavEvent)})),k(F||l.mostRecentlyFocusedNode||c())}l.recentNavEvent=void 0},O=function(w){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;l.recentNavEvent=w;var v=g({event:w,isBackward:N});v&&(Jt(w)&&w.preventDefault(),k(v))},$=function(w){(a.isKeyForward(w)||a.isKeyBackward(w))&&O(w,a.isKeyBackward(w))},U=function(w){dm(w)&&Xt(a.escapeDeactivates,w)!==!1&&(w.preventDefault(),s.deactivate())},h=function(w){var N=xn(w);f(N,w)>=0||Xt(a.clickOutsideDeactivates,w)||Xt(a.allowOutsideClick,w)||(w.preventDefault(),w.stopImmediatePropagation())},C=function(){if(l.active)return Uo.activateTrap(o,s),l.delayInitialFocusTimer=a.delayInitialFocus?jo(function(){k(c())}):k(c()),i.addEventListener("focusin",P,!0),i.addEventListener("mousedown",A,{capture:!0,passive:!1}),i.addEventListener("touchstart",A,{capture:!0,passive:!1}),i.addEventListener("click",h,{capture:!0,passive:!1}),i.addEventListener("keydown",$,{capture:!0,passive:!1}),i.addEventListener("keydown",U),s},y=function(){if(l.active)return i.removeEventListener("focusin",P,!0),i.removeEventListener("mousedown",A,!0),i.removeEventListener("touchstart",A,!0),i.removeEventListener("click",h,!0),i.removeEventListener("keydown",$,!0),i.removeEventListener("keydown",U),s},S=function(w){var N=w.some(function(v){var F=Array.from(v.removedNodes);return F.some(function(Z){return Z===l.mostRecentlyFocusedNode})});N&&k(c())},ie=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(S):void 0,J=function(){ie&&(ie.disconnect(),l.active&&!l.paused&&l.containers.map(function(w){ie.observe(w,{subtree:!0,childList:!0})}))};return s={get active(){return l.active},get paused(){return l.paused},activate:function(w){if(l.active)return this;var N=u(w,"onActivate"),v=u(w,"onPostActivate"),F=u(w,"checkCanFocusTrap");F||d(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=m(i),N==null||N();var Z=function(){F&&d(),C(),J(),v==null||v()};return F?(F(l.containers.concat()).then(Z,Z),this):(Z(),this)},deactivate:function(w){if(!l.active)return this;var N=Ko({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},w);clearTimeout(l.delayInitialFocusTimer),l.delayInitialFocusTimer=void 0,y(),l.active=!1,l.paused=!1,J(),Uo.deactivateTrap(o,s);var v=u(N,"onDeactivate"),F=u(N,"onPostDeactivate"),Z=u(N,"checkCanReturnFocus"),re=u(N,"returnFocus","returnFocusOnDeactivate");v==null||v();var M=function(){jo(function(){re&&k(_(l.nodeFocusedBeforeActivation)),F==null||F()})};return re&&Z?(Z(_(l.nodeFocusedBeforeActivation)).then(M,M),this):(M(),this)},pause:function(w){return l.active?(l.manuallyPaused=!0,this._setPausedState(!0,w)):this},unpause:function(w){return l.active?(l.manuallyPaused=!1,o[o.length-1]!==this?this:this._setPausedState(!1,w)):this},updateContainerElements:function(w){var N=[].concat(w).filter(Boolean);return l.containers=N.map(function(v){return typeof v=="string"?i.querySelector(v):v}),l.active&&d(),J(),this}},Object.defineProperties(s,{_isManuallyPaused:{value:function(){return l.manuallyPaused}},_setPausedState:{value:function(w,N){if(l.paused===w)return this;if(l.paused=w,w){var v=u(N,"onPause"),F=u(N,"onPostPause");v==null||v(),y(),J(),F==null||F()}else{var Z=u(N,"onUnpause"),re=u(N,"onPostUnpause");Z==null||Z(),d(),C(),J(),re==null||re()}return this}}}),s.updateContainerElements(n),s};function ym(e,n={}){let r;const{immediate:i,...o}=n,a=t.shallowRef(!1),l=t.shallowRef(!1),s=d=>r&&r.activate(d),u=d=>r&&r.deactivate(d),f=()=>{r&&(r.pause(),l.value=!0)},p=()=>{r&&(r.unpause(),l.value=!1)},c=t.computed(()=>{const d=t.toValue(e);return rt.toArray(d).map(m=>{const k=t.toValue(m);return typeof k=="string"?k:rt.unrefElement(k)}).filter(Ff)});return t.watch(c,d=>{d.length&&(r=gm(d,{...o,onActivate(){a.value=!0,n.onActivate&&n.onActivate()},onDeactivate(){a.value=!1,n.onDeactivate&&n.onDeactivate()}}),i&&s())},{flush:"post"}),rt.tryOnScopeDispose(()=>u()),{hasFocus:a,isPaused:l,activate:s,deactivate:u,pause:f,unpause:p}}const hm="44px",bm="220px",_m="366px",km="#00abd2",Cm="16px",Ar="20px",Am="24px",Er=rt.createGlobalState(()=>{const e=rt.useLocalStorage("datakit-editor-mode","visual"),n=rt.useLocalStorage("datakit-editor-sidebar-expanded",!0);return{editorMode:e,sidePanelExpanded:n}});rt.createInjectionState(()=>({}));const Em={class:"dk-editor-nav"},wm={class:"top"},Pm={class:"bottom"},Sm=ue(t.defineComponent({__name:"EditorNav",emits:["back"],setup(e,{emit:n}){const{t:r}=Ge.createI18n("en-us",qe),i=n,o=[{label:r("plugins.free-form.datakit.visual_editor.return_to_config"),icon:Ce.ArrowLeftIcon,onClick:()=>i("back")}],{sidePanelExpanded:a}=Er(),l=t.computed(()=>a.value?r("plugins.free-form.datakit.visual_editor.collapse_panel"):r("plugins.free-form.datakit.visual_editor.expand_panel")),s=t.ref(!1);function u(){a.value=!a.value}return(f,p)=>(t.openBlock(),t.createElementBlock("nav",Em,[t.createElementVNode("div",wm,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(o,({label:c,to:d,icon:m,onClick:k})=>t.createVNode(t.unref(Ae.KTooltip),{key:c,"kpop-attributes":{offset:"10px"},label:c,placement:"right"},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.unref(Ae.KButton),{key:c,appearance:"none",class:"nav-item",icon:"",to:d,onClick:k},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m),{decorative:"",size:t.unref(Ar)},null,8,["size"]))]),_:2},1032,["to","onClick"]))]),_:2},1032,["label"])),64))]),t.createElementVNode("div",Pm,[t.createElementVNode("div",{class:t.normalizeClass(["side-panel-toggle",{expanded:t.unref(a)}]),onTransitionend:p[0]||(p[0]=t.withModifiers(c=>s.value=!1,["self"])),onTransitionstart:p[1]||(p[1]=t.withModifiers(c=>s.value=!0,["self"]))},[t.createVNode(t.unref(Ae.KTooltip),{label:s.value?void 0:l.value,placement:t.unref(a)?"left":"right"},{default:t.withCtx(()=>[t.createVNode(t.unref(Ae.KButton),{appearance:"none",class:"nav-item nav-item-toggle",icon:"",size:"large",onClick:u},{default:t.withCtx(()=>[t.unref(a)?(t.openBlock(),t.createBlock(t.unref(Ce.ChevronDoubleLeftIcon),{key:0,decorative:"",size:t.unref(Ar)},null,8,["size"])):(t.openBlock(),t.createBlock(t.unref(Ce.ChevronDoubleRightIcon),{key:1,decorative:"",size:t.unref(Ar)},null,8,["size"]))]),_:1})]),_:1},8,["label","placement"])],34)])]))}}),[["__scopeId","data-v-bbf1c4a2"]]),Tm={class:"dk-editor-main"},Nm={class:"header"},Om={class:"actions"},xm=ue(t.defineComponent({__name:"EditorMain",emits:["click:node","click:backdrop"],setup(e,{emit:n}){const{t:r}=Ge.createI18n("en-us",qe),i=n;return(o,a)=>(t.openBlock(),t.createElementBlock("div",Tm,[t.createElementVNode("header",Nm,[t.createElementVNode("div",Om,[t.createVNode(t.unref(Ae.KButton),{appearance:"tertiary",target:"_blank",to:"https://developer.konghq.com/plugins/datakit/"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("plugins.free-form.datakit.visual_editor.view_docs"))+" ",1),t.createVNode(t.unref(Ce.ExternalLinkIcon))]),_:1}),t.createVNode(t.unref(Ae.KButton),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("plugins.free-form.datakit.visual_editor.save")),1)]),_:1})])]),t.createElementVNode("div",{class:"body",onClick:a[2]||(a[2]=l=>i("click:backdrop"))},[t.createElementVNode("button",{onClick:a[0]||(a[0]=t.withModifiers(l=>i("click:node",{id:"node-a",name:"Node A"}),["stop"]))}," Mock Node A "),t.createElementVNode("button",{onClick:a[1]||(a[1]=t.withModifiers(l=>i("click:node",{id:"node-b",name:"Node b"}),["stop"]))}," Mock Node B "),t.renderSlot(o.$slots,"default",{},void 0,!0)])]))}}),[["__scopeId","data-v-0d5be5b5"]]),{t:vm}=Ge.createI18n("en-us",qe);function Qt(e){return vm(`plugins.free-form.datakit.visual_editor.node_description.${e}`)}const Mo={call:{type:"call",description:Qt("call"),icon:Ce.NetworkIcon},jq:{type:"jq",description:Qt("jq"),icon:Ce.CodeblockIcon},exit:{type:"exit",description:Qt("exit"),icon:Ce.GatewayIcon},property:{type:"property",description:Qt("property"),icon:Ce.StackIcon},static:{type:"static",description:Qt("static"),icon:Ce.VitalsIcon}},Im={class:"icon"},Rm={class:"content"},Lm={class:"title"},Bm={class:"description"},Dm=ue(t.defineComponent({__name:"NodePanelItem",props:{type:{}},setup(e){const{description:n,icon:r}=Mo[e.type];return(i,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["dk-node-panel-item",{[`node-type-${i.type}`]:!0}])},[t.createElementVNode("div",Im,[t.createVNode(t.unref(r),{size:16})]),t.createElementVNode("div",Rm,[t.createElementVNode("div",Lm,t.toDisplayString(i.type),1),t.createElementVNode("div",Bm,t.toDisplayString(t.unref(n)),1)])],2))}}),[["__scopeId","data-v-da9fb467"]]),$m={class:"dk-node-panel"},Fm={class:"title"},Vm={class:"node-list"},Km=ue(t.defineComponent({__name:"NodePanel",setup(e){const{t:n}=Ge.createI18n("en-us",qe);return(r,i)=>{const o=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("div",$m,[t.createElementVNode("h3",Fm,[t.createVNode(o,{class:"label",info:t.unref(n)("plugins.free-form.datakit.visual_editor.node_panel.description")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.free-form.datakit.visual_editor.node_panel.title")),1)]),_:1},8,["info"])]),t.createElementVNode("div",Vm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(t.unref(Mo)),a=>(t.openBlock(),t.createBlock(Dm,{key:a,type:a},null,8,["type"]))),128))])])}}}),[["__scopeId","data-v-d4299888"]]),Um=ue(t.defineComponent({__name:"nodePropertiesPanel",props:{maxWidth:{default:()=>_m},offsetTop:{default:"52px"},visible:{type:Boolean},node:{}},emits:["close"],setup(e){return(n,r)=>(t.openBlock(),t.createBlock(t.unref(Ae.KSlideout),{class:"dk-node-properties-panel","close-on-blur":!1,"has-overlay":!1,"max-width":n.maxWidth,"offset-top":n.offsetTop,visible:n.visible,onClose:r[0]||(r[0]=i=>n.$emit("close"))},{default:t.withCtx(()=>{var i;return[t.createTextVNode(t.toDisplayString((i=n.node)==null?void 0:i.id),1)]}),_:1},8,["max-width","offset-top","visible"]))}}),[["__scopeId","data-v-83e0b80b"]]),jm={class:"dk-editor-content"},Mm={class:"header"},Gm={class:"title"},qm={class:"body"},Hm={class:"node-selection-panel"},zm={class:"main"},Wm=ue(t.defineComponent({__name:"EditorContent",setup(e){const{t:n}=Ge.createI18n("en-us",qe),{sidePanelExpanded:r}=Er(),i=t.ref(!1),o=t.ref(null),a=s=>{i.value=!0,o.value=s},l=()=>{i.value=!1,o.value=null};return(s,u)=>(t.openBlock(),t.createElementBlock("div",jm,[t.createElementVNode("aside",{class:t.normalizeClass(["side-panel",{expanded:t.unref(r)}])},[t.createElementVNode("header",Mm,[t.createElementVNode("h2",Gm,t.toDisplayString(t.unref(n)("plugins.free-form.datakit.visual_editor.name")),1)]),t.createElementVNode("div",qm,[t.createElementVNode("div",Hm,[t.createVNode(Km)])])],2),t.createElementVNode("div",zm,[t.createVNode(xm,{"onClick:backdrop":l,"onClick:node":a})]),t.createVNode(Um,{node:o.value,visible:i.value,onClose:u[0]||(u[0]=f=>i.value=!1)},null,8,["node","visible"])]))}}),[["__scopeId","data-v-e506e8e3"]]),Ym=ue(t.defineComponent({__name:"EditorModal",props:{open:{type:Boolean},openModifiers:{}},emits:t.mergeModels(["close"],["update:open"]),setup(e,{emit:n}){t.useCssVars(p=>({"6aa6c909":t.unref(bm),fa2c871a:t.unref(hm)}));const r=t.useTemplateRef("modal"),i=t.useModel(e,"open"),o=n,a=t.useTemplateRef("content"),l=rt.useScrollLock(document),{activate:s,deactivate:u}=ym(r,{returnFocusOnDeactivate:!0,initialFocus:()=>{var p;return(p=a.value)==null?void 0:p.$el}});t.watch(i,async p=>{l.value=!!p,await t.nextTick(),p?s():u()},{immediate:!0});function f(){i.value=!1,o("close")}return(p,c)=>i.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"modal",ref:r,class:"dk-editor-modal"},[t.createVNode(Sm,{class:"nav",onBack:f}),t.createVNode(Wm,{ref_key:"content",ref:a,class:"content",tabindex:"0"},null,512)],512)):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-c8344db8"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Go(e){return typeof e>"u"||e===null}function Jm(e){return typeof e=="object"&&e!==null}function Xm(e){return Array.isArray(e)?e:Go(e)?[]:[e]}function Qm(e,n){var r,i,o,a;if(n)for(a=Object.keys(n),r=0,i=a.length;r<i;r+=1)o=a[r],e[o]=n[o];return e}function Zm(e,n){var r="",i;for(i=0;i<n;i+=1)r+=e;return r}function eg(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var tg=Go,ng=Jm,rg=Xm,ig=Zm,og=eg,ag=Qm,Oe={isNothing:tg,isObject:ng,toArray:rg,repeat:ig,isNegativeZero:og,extend:ag};function qo(e,n){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(r+=`
|
|
19
|
+
*/function Nr(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Xm(e){if(Array.isArray(e))return Nr(e)}function Qm(e,n,r){return(n=rg(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Zm(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eg(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
20
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xo(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Qo(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Xo(Object(r),!0).forEach(function(i){Qm(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xo(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function tg(e){return Xm(e)||Zm(e)||ig(e)||eg()}function ng(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function rg(e){var n=ng(e,"string");return typeof n=="symbol"?n:n+""}function ig(e,n){if(e){if(typeof e=="string")return Nr(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nr(e,n):void 0}}var Zo={activateTrap:function(n,r){if(n.length>0){var i=n[n.length-1];i!==r&&i._setPausedState(!0)}var o=n.indexOf(r);o===-1||n.splice(o,1),n.push(r)},deactivateTrap:function(n,r){var i=n.indexOf(r);i!==-1&&n.splice(i,1),n.length>0&&!n[n.length-1]._isManuallyPaused()&&n[n.length-1]._setPausedState(!1)}},og=function(n){return n.tagName&&n.tagName.toLowerCase()==="input"&&typeof n.select=="function"},ag=function(n){return(n==null?void 0:n.key)==="Escape"||(n==null?void 0:n.key)==="Esc"||(n==null?void 0:n.keyCode)===27},Qt=function(n){return(n==null?void 0:n.key)==="Tab"||(n==null?void 0:n.keyCode)===9},lg=function(n){return Qt(n)&&!n.shiftKey},sg=function(n){return Qt(n)&&n.shiftKey},ea=function(n){return setTimeout(n,0)},Zt=function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return typeof n=="function"?n.apply(void 0,i):n},Rn=function(n){return n.target.shadowRoot&&typeof n.composedPath=="function"?n.composedPath()[0]:n.target},cg=[],dg=function(n,r){var i=(r==null?void 0:r.document)||document,o=(r==null?void 0:r.trapStack)||cg,a=Qo({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:lg,isKeyBackward:sg},r),l={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,d=function(w,O,$){return w&&w[O]!==void 0?w[O]:a[$||O]},f=function(w,O){var $=typeof(O==null?void 0:O.composedPath)=="function"?O.composedPath():void 0;return l.containerGroups.findIndex(function(K){var Z=K.container,q=K.tabbableNodes;return Z.contains(w)||($==null?void 0:$.includes(Z))||q.find(function(v){return v===w})})},p=function(w){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=O.hasFallback,K=$===void 0?!1:$,Z=O.params,q=Z===void 0?[]:Z,v=a[w];if(typeof v=="function"&&(v=v.apply(void 0,tg(q))),v===!0&&(v=void 0),!v){if(v===void 0||v===!1)return v;throw new Error("`".concat(w,"` was specified but was not a node, or did not return a node"))}var N=v;if(typeof v=="string"){try{N=i.querySelector(v)}catch(B){throw new Error("`".concat(w,'` appears to be an invalid selector; error="').concat(B.message,'"'))}if(!N&&!K)throw new Error("`".concat(w,"` as selector refers to no known node"))}return N},c=function(){var w=p("initialFocus",{hasFallback:!0});if(w===!1)return!1;if(w===void 0||w&&!Tr(w,a.tabbableOptions))if(f(i.activeElement)>=0)w=i.activeElement;else{var O=l.tabbableGroups[0],$=O&&O.firstTabbableNode;w=$||p("fallbackFocus")}else w===null&&(w=p("fallbackFocus"));if(!w)throw new Error("Your focus-trap needs to have at least one focusable element");return w},u=function(){if(l.containerGroups=l.containers.map(function(w){var O=Wm(w,a.tabbableOptions),$=Ym(w,a.tabbableOptions),K=O.length>0?O[0]:void 0,Z=O.length>0?O[O.length-1]:void 0,q=$.find(function(B){return Lt(B)}),v=$.slice().reverse().find(function(B){return Lt(B)}),N=!!O.find(function(B){return wt(B)>0});return{container:w,tabbableNodes:O,focusableNodes:$,posTabIndexesFound:N,firstTabbableNode:K,lastTabbableNode:Z,firstDomTabbableNode:q,lastDomTabbableNode:v,nextTabbableNode:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,le=O.indexOf(ae);return le<0?de?$.slice($.indexOf(ae)+1).find(function(fe){return Lt(fe)}):$.slice(0,$.indexOf(ae)).reverse().find(function(fe){return Lt(fe)}):O[le+(de?1:-1)]}}}),l.tabbableGroups=l.containerGroups.filter(function(w){return w.tabbableNodes.length>0}),l.tabbableGroups.length<=0&&!p("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(l.containerGroups.find(function(w){return w.posTabIndexesFound})&&l.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(w){var O=w.activeElement;if(O)return O.shadowRoot&&O.shadowRoot.activeElement!==null?m(O.shadowRoot):O},_=function(w){if(w!==!1&&w!==m(document)){if(!w||!w.focus){_(c());return}w.focus({preventScroll:!!a.preventScroll}),l.mostRecentlyFocusedNode=w,og(w)&&w.select()}},b=function(w){var O=p("setReturnFocus",{params:[w]});return O||(O===!1?!1:w)},g=function(w){var O=w.target,$=w.event,K=w.isBackward,Z=K===void 0?!1:K;O=O||Rn($),u();var q=null;if(l.tabbableGroups.length>0){var v=f(O,$),N=v>=0?l.containerGroups[v]:void 0;if(v<0)Z?q=l.tabbableGroups[l.tabbableGroups.length-1].lastTabbableNode:q=l.tabbableGroups[0].firstTabbableNode;else if(Z){var B=l.tabbableGroups.findIndex(function(F){var z=F.firstTabbableNode;return O===z});if(B<0&&(N.container===O||Tr(O,a.tabbableOptions)&&!Lt(O,a.tabbableOptions)&&!N.nextTabbableNode(O,!1))&&(B=v),B>=0){var ae=B===0?l.tabbableGroups.length-1:B-1,de=l.tabbableGroups[ae];q=wt(O)>=0?de.lastTabbableNode:de.lastDomTabbableNode}else Qt($)||(q=N.nextTabbableNode(O,!1))}else{var le=l.tabbableGroups.findIndex(function(F){var z=F.lastTabbableNode;return O===z});if(le<0&&(N.container===O||Tr(O,a.tabbableOptions)&&!Lt(O,a.tabbableOptions)&&!N.nextTabbableNode(O))&&(le=v),le>=0){var fe=le===l.tabbableGroups.length-1?0:le+1,U=l.tabbableGroups[fe];q=wt(O)>=0?U.firstTabbableNode:U.firstDomTabbableNode}else Qt($)||(q=N.nextTabbableNode(O))}}else q=p("fallbackFocus");return q},h=function(w){var O=Rn(w);if(!(f(O,w)>=0)){if(Zt(a.clickOutsideDeactivates,w)){s.deactivate({returnFocus:a.returnFocusOnDeactivate});return}Zt(a.allowOutsideClick,w)||w.preventDefault()}},k=function(w){var O=Rn(w),$=f(O,w)>=0;if($||O instanceof Document)$&&(l.mostRecentlyFocusedNode=O);else{w.stopImmediatePropagation();var K,Z=!0;if(l.mostRecentlyFocusedNode)if(wt(l.mostRecentlyFocusedNode)>0){var q=f(l.mostRecentlyFocusedNode),v=l.containerGroups[q].tabbableNodes;if(v.length>0){var N=v.findIndex(function(B){return B===l.mostRecentlyFocusedNode});N>=0&&(a.isKeyForward(l.recentNavEvent)?N+1<v.length&&(K=v[N+1],Z=!1):N-1>=0&&(K=v[N-1],Z=!1))}}else l.containerGroups.some(function(B){return B.tabbableNodes.some(function(ae){return wt(ae)>0})})||(Z=!1);else Z=!1;Z&&(K=g({target:l.mostRecentlyFocusedNode,isBackward:a.isKeyBackward(l.recentNavEvent)})),_(K||l.mostRecentlyFocusedNode||c())}l.recentNavEvent=void 0},P=function(w){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;l.recentNavEvent=w;var $=g({event:w,isBackward:O});$&&(Qt(w)&&w.preventDefault(),_($))},R=function(w){(a.isKeyForward(w)||a.isKeyBackward(w))&&P(w,a.isKeyBackward(w))},I=function(w){ag(w)&&Zt(a.escapeDeactivates,w)!==!1&&(w.preventDefault(),s.deactivate())},y=function(w){var O=Rn(w);f(O,w)>=0||Zt(a.clickOutsideDeactivates,w)||Zt(a.allowOutsideClick,w)||(w.preventDefault(),w.stopImmediatePropagation())},T=function(){if(l.active)return Zo.activateTrap(o,s),l.delayInitialFocusTimer=a.delayInitialFocus?ea(function(){_(c())}):_(c()),i.addEventListener("focusin",k,!0),i.addEventListener("mousedown",h,{capture:!0,passive:!1}),i.addEventListener("touchstart",h,{capture:!0,passive:!1}),i.addEventListener("click",y,{capture:!0,passive:!1}),i.addEventListener("keydown",R,{capture:!0,passive:!1}),i.addEventListener("keydown",I),s},A=function(){if(l.active)return i.removeEventListener("focusin",k,!0),i.removeEventListener("mousedown",h,!0),i.removeEventListener("touchstart",h,!0),i.removeEventListener("click",y,!0),i.removeEventListener("keydown",R,!0),i.removeEventListener("keydown",I),s},S=function(w){var O=w.some(function($){var K=Array.from($.removedNodes);return K.some(function(Z){return Z===l.mostRecentlyFocusedNode})});O&&_(c())},ie=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(S):void 0,Q=function(){ie&&(ie.disconnect(),l.active&&!l.paused&&l.containers.map(function(w){ie.observe(w,{subtree:!0,childList:!0})}))};return s={get active(){return l.active},get paused(){return l.paused},activate:function(w){if(l.active)return this;var O=d(w,"onActivate"),$=d(w,"onPostActivate"),K=d(w,"checkCanFocusTrap");K||u(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=m(i),O==null||O();var Z=function(){K&&u(),T(),Q(),$==null||$()};return K?(K(l.containers.concat()).then(Z,Z),this):(Z(),this)},deactivate:function(w){if(!l.active)return this;var O=Qo({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},w);clearTimeout(l.delayInitialFocusTimer),l.delayInitialFocusTimer=void 0,A(),l.active=!1,l.paused=!1,Q(),Zo.deactivateTrap(o,s);var $=d(O,"onDeactivate"),K=d(O,"onPostDeactivate"),Z=d(O,"checkCanReturnFocus"),q=d(O,"returnFocus","returnFocusOnDeactivate");$==null||$();var v=function(){ea(function(){q&&_(b(l.nodeFocusedBeforeActivation)),K==null||K()})};return q&&Z?(Z(b(l.nodeFocusedBeforeActivation)).then(v,v),this):(v(),this)},pause:function(w){return l.active?(l.manuallyPaused=!0,this._setPausedState(!0,w)):this},unpause:function(w){return l.active?(l.manuallyPaused=!1,o[o.length-1]!==this?this:this._setPausedState(!1,w)):this},updateContainerElements:function(w){var O=[].concat(w).filter(Boolean);return l.containers=O.map(function($){return typeof $=="string"?i.querySelector($):$}),l.active&&u(),Q(),this}},Object.defineProperties(s,{_isManuallyPaused:{value:function(){return l.manuallyPaused}},_setPausedState:{value:function(w,O){if(l.paused===w)return this;if(l.paused=w,w){var $=d(O,"onPause"),K=d(O,"onPostPause");$==null||$(),A(),Q(),K==null||K()}else{var Z=d(O,"onUnpause"),q=d(O,"onPostUnpause");Z==null||Z(),u(),T(),Q(),q==null||q()}return this}}}),s.updateContainerElements(n),s};function ug(e,n={}){let r;const{immediate:i,...o}=n,a=t.shallowRef(!1),l=t.shallowRef(!1),s=u=>r&&r.activate(u),d=u=>r&&r.deactivate(u),f=()=>{r&&(r.pause(),l.value=!0)},p=()=>{r&&(r.unpause(),l.value=!1)},c=t.computed(()=>{const u=t.toValue(e);return at.toArray(u).map(m=>{const _=t.toValue(m);return typeof _=="string"?_:at.unrefElement(_)}).filter(Rm)});return t.watch(c,u=>{u.length&&(r=dg(u,{...o,onActivate(){a.value=!0,n.onActivate&&n.onActivate()},onDeactivate(){a.value=!1,n.onDeactivate&&n.onDeactivate()}}),i&&s())},{flush:"post"}),at.tryOnScopeDispose(()=>d()),{hasFocus:a,isPaused:l,activate:s,deactivate:d,pause:f,unpause:p}}const pg="44px",fg="220px",mg="366px",xr=at.createGlobalState(()=>{const e=at.useLocalStorage("datakit-editor-mode","visual"),n=at.useLocalStorage("datakit-editor-sidebar-expanded",!0);return{editorMode:e,sidePanelExpanded:n}});at.createInjectionState(()=>({}));const gg={class:"dk-editor-nav"},yg={class:"top"},hg={class:"bottom"},_g=se(t.defineComponent({__name:"EditorNav",emits:["back"],setup(e,{emit:n}){const{t:r}=Oe.createI18n("en-us",Be),i=n,o=[{label:r("plugins.free-form.datakit.visual_editor.return_to_config"),icon:he.ArrowLeftIcon,onClick:()=>i("back")}],{sidePanelExpanded:a}=xr(),l=t.computed(()=>a.value?r("plugins.free-form.datakit.visual_editor.collapse_panel"):r("plugins.free-form.datakit.visual_editor.expand_panel")),s=t.ref(!1);function d(){a.value=!a.value}return(f,p)=>(t.openBlock(),t.createElementBlock("nav",gg,[t.createElementVNode("div",yg,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(o,({label:c,to:u,icon:m,onClick:_})=>t.createVNode(t.unref(Ce.KTooltip),{key:c,"kpop-attributes":{offset:"10px"},label:c,placement:"right"},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.unref(Ce.KButton),{key:c,appearance:"none",class:"nav-item",icon:"",to:u,onClick:_},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m),{decorative:"",size:t.unref(Sr)},null,8,["size"]))]),_:2},1032,["to","onClick"]))]),_:2},1032,["label"])),64))]),t.createElementVNode("div",hg,[t.createElementVNode("div",{class:t.normalizeClass(["side-panel-toggle",{expanded:t.unref(a)}]),onTransitionend:p[0]||(p[0]=t.withModifiers(c=>s.value=!1,["self"])),onTransitionstart:p[1]||(p[1]=t.withModifiers(c=>s.value=!0,["self"]))},[t.createVNode(t.unref(Ce.KTooltip),{label:s.value?void 0:l.value,placement:t.unref(a)?"left":"right"},{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.KButton),{appearance:"none",class:"nav-item nav-item-toggle",icon:"",size:"large",onClick:d},{default:t.withCtx(()=>[t.unref(a)?(t.openBlock(),t.createBlock(t.unref(he.ChevronDoubleLeftIcon),{key:0,decorative:"",size:t.unref(Sr)},null,8,["size"])):(t.openBlock(),t.createBlock(t.unref(he.ChevronDoubleRightIcon),{key:1,decorative:"",size:t.unref(Sr)},null,8,["size"]))]),_:1})]),_:1},8,["label","placement"])],34)])]))}}),[["__scopeId","data-v-bbf1c4a2"]]),bg={class:"dk-editor-main"},kg={class:"header"},Cg={class:"actions"},wg=se(t.defineComponent({__name:"EditorMain",emits:["click:node","click:backdrop"],setup(e,{emit:n}){const{t:r}=Oe.createI18n("en-us",Be),i=n;return(o,a)=>(t.openBlock(),t.createElementBlock("div",bg,[t.createElementVNode("header",kg,[t.createElementVNode("div",Cg,[t.createVNode(t.unref(Ce.KButton),{appearance:"tertiary",target:"_blank",to:"https://developer.konghq.com/plugins/datakit/"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("plugins.free-form.datakit.visual_editor.view_docs"))+" ",1),t.createVNode(t.unref(he.ExternalLinkIcon))]),_:1}),t.createVNode(t.unref(Ce.KButton),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("plugins.free-form.datakit.visual_editor.save")),1)]),_:1})])]),t.createElementVNode("div",{class:"body",onClick:a[2]||(a[2]=l=>i("click:backdrop"))},[t.createElementVNode("button",{onClick:a[0]||(a[0]=t.withModifiers(l=>i("click:node",{id:"node-a",name:"Node A"}),["stop"]))}," Mock Node A "),t.createElementVNode("button",{onClick:a[1]||(a[1]=t.withModifiers(l=>i("click:node",{id:"node-b",name:"Node b"}),["stop"]))}," Mock Node B "),t.renderSlot(o.$slots,"default",{},void 0,!0)])]))}}),[["__scopeId","data-v-0d5be5b5"]]),{t:Ag}=Oe.createI18n("en-us",Be);function en(e){return Ag(`plugins.free-form.datakit.visual_editor.node_description.${e}`)}const ta={call:{type:"call",description:en("call"),icon:he.NetworkIcon},jq:{type:"jq",description:en("jq"),icon:he.CodeblockIcon},exit:{type:"exit",description:en("exit"),icon:he.GatewayIcon},property:{type:"property",description:en("property"),icon:he.StackIcon},static:{type:"static",description:en("static"),icon:he.VitalsIcon}},Eg={class:"icon"},Sg={class:"content"},Pg={class:"title"},Tg={class:"description"},Ng=se(t.defineComponent({__name:"NodePanelItem",props:{type:{}},setup(e){const{description:n,icon:r}=ta[e.type];return(i,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["dk-node-panel-item",{[`node-type-${i.type}`]:!0}])},[t.createElementVNode("div",Eg,[t.createVNode(t.unref(r),{size:16})]),t.createElementVNode("div",Sg,[t.createElementVNode("div",Pg,t.toDisplayString(i.type),1),t.createElementVNode("div",Tg,t.toDisplayString(t.unref(n)),1)])],2))}}),[["__scopeId","data-v-da9fb467"]]),xg={class:"dk-node-panel"},Og={class:"title"},Ig={class:"node-list"},vg=se(t.defineComponent({__name:"NodePanel",setup(e){const{t:n}=Oe.createI18n("en-us",Be);return(r,i)=>{const o=t.resolveComponent("KLabel");return t.openBlock(),t.createElementBlock("div",xg,[t.createElementVNode("h3",Og,[t.createVNode(o,{class:"label",info:t.unref(n)("plugins.free-form.datakit.visual_editor.node_panel.description")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.free-form.datakit.visual_editor.node_panel.title")),1)]),_:1},8,["info"])]),t.createElementVNode("div",Ig,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(t.unref(ta)),a=>(t.openBlock(),t.createBlock(Ng,{key:a,type:a},null,8,["type"]))),128))])])}}}),[["__scopeId","data-v-d4299888"]]),Rg=se(t.defineComponent({__name:"nodePropertiesPanel",props:{maxWidth:{default:()=>mg},offsetTop:{default:"52px"},visible:{type:Boolean},node:{}},emits:["close"],setup(e){return(n,r)=>(t.openBlock(),t.createBlock(t.unref(Ce.KSlideout),{class:"dk-node-properties-panel","close-on-blur":!1,"has-overlay":!1,"max-width":n.maxWidth,"offset-top":n.offsetTop,visible:n.visible,onClose:r[0]||(r[0]=i=>n.$emit("close"))},{default:t.withCtx(()=>{var i;return[t.createTextVNode(t.toDisplayString((i=n.node)==null?void 0:i.id),1)]}),_:1},8,["max-width","offset-top","visible"]))}}),[["__scopeId","data-v-83e0b80b"]]),Bg={class:"dk-editor-content"},Lg={class:"header"},$g={class:"title"},Dg={class:"body"},Vg={class:"node-selection-panel"},Fg={class:"main"},Kg=se(t.defineComponent({__name:"EditorContent",setup(e){const{t:n}=Oe.createI18n("en-us",Be),{sidePanelExpanded:r}=xr(),i=t.ref(!1),o=t.ref(null),a=s=>{i.value=!0,o.value=s},l=()=>{i.value=!1,o.value=null};return(s,d)=>(t.openBlock(),t.createElementBlock("div",Bg,[t.createElementVNode("aside",{class:t.normalizeClass(["side-panel",{expanded:t.unref(r)}])},[t.createElementVNode("header",Lg,[t.createElementVNode("h2",$g,t.toDisplayString(t.unref(n)("plugins.free-form.datakit.visual_editor.name")),1)]),t.createElementVNode("div",Dg,[t.createElementVNode("div",Vg,[t.createVNode(vg)])])],2),t.createElementVNode("div",Fg,[t.createVNode(wg,{"onClick:backdrop":l,"onClick:node":a})]),t.createVNode(Rg,{node:o.value,visible:i.value,onClose:d[0]||(d[0]=f=>i.value=!1)},null,8,["node","visible"])]))}}),[["__scopeId","data-v-e506e8e3"]]),Ug=se(t.defineComponent({__name:"EditorModal",props:{open:{type:Boolean},openModifiers:{}},emits:t.mergeModels(["close"],["update:open"]),setup(e,{emit:n}){t.useCssVars(p=>({"6aa6c909":t.unref(fg),fa2c871a:t.unref(pg)}));const r=t.useTemplateRef("modal"),i=t.useModel(e,"open"),o=n,a=t.useTemplateRef("content"),l=at.useScrollLock(document),{activate:s,deactivate:d}=ug(r,{returnFocusOnDeactivate:!0,initialFocus:()=>{var p;return(p=a.value)==null?void 0:p.$el}});t.watch(i,async p=>{l.value=!!p,await t.nextTick(),p?s():d()},{immediate:!0});function f(){i.value=!1,o("close")}return(p,c)=>i.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"modal",ref:r,class:"dk-editor-modal"},[t.createVNode(_g,{class:"nav",onBack:f}),t.createVNode(Kg,{ref_key:"content",ref:a,class:"content",tabindex:"0"},null,512)],512)):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-c8344db8"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function na(e){return typeof e>"u"||e===null}function Mg(e){return typeof e=="object"&&e!==null}function jg(e){return Array.isArray(e)?e:na(e)?[]:[e]}function qg(e,n){var r,i,o,a;if(n)for(a=Object.keys(n),r=0,i=a.length;r<i;r+=1)o=a[r],e[o]=n[o];return e}function Gg(e,n){var r="",i;for(i=0;i<n;i+=1)r+=e;return r}function Hg(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var zg=na,Wg=Mg,Yg=jg,Jg=Gg,Xg=Hg,Qg=qg,xe={isNothing:zg,isObject:Wg,toArray:Yg,repeat:Jg,isNegativeZero:Xg,extend:Qg};function ra(e,n){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(r+=`
|
|
19
21
|
|
|
20
|
-
`+e.mark.snippet),i+" "+r):i}function
|
|
21
|
-
`+s;for(f=
|
|
22
|
-
`,s+=
|
|
23
|
-
`,
|
|
24
|
-
`;return s.replace(/\n$/,"")}var
|
|
25
|
-
\r`;function
|
|
26
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function
|
|
27
|
-
`,n-1))}function
|
|
28
|
-
`,a?1+
|
|
29
|
-
`);break}for(i?
|
|
30
|
-
`,a?1+
|
|
31
|
-
`,
|
|
32
|
-
`,
|
|
33
|
-
`,a?1+
|
|
34
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new
|
|
22
|
+
`+e.mark.snippet),i+" "+r):i}function tn(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=ra(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}tn.prototype=Object.create(Error.prototype),tn.prototype.constructor=tn,tn.prototype.toString=function(n){return this.name+": "+ra(this,n)};var Ke=tn;function Or(e,n,r,i,o){var a="",l="",s=Math.floor(o/2)-1;return i-n>s&&(a=" ... ",n=i-s+a.length),r-i>s&&(l=" ...",r=i+s-l.length),{str:a+e.slice(n,r).replace(/\t/g,"→")+l,pos:i-n+a.length}}function Ir(e,n){return xe.repeat(" ",n-e.length)+e}function Zg(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],a,l=-1;a=r.exec(e.buffer);)o.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&l<0&&(l=i.length-2);l<0&&(l=i.length-1);var s="",d,f,p=Math.min(e.line+n.linesAfter,o.length).toString().length,c=n.maxLength-(n.indent+p+3);for(d=1;d<=n.linesBefore&&!(l-d<0);d++)f=Or(e.buffer,i[l-d],o[l-d],e.position-(i[l]-i[l-d]),c),s=xe.repeat(" ",n.indent)+Ir((e.line-d+1).toString(),p)+" | "+f.str+`
|
|
23
|
+
`+s;for(f=Or(e.buffer,i[l],o[l],e.position,c),s+=xe.repeat(" ",n.indent)+Ir((e.line+1).toString(),p)+" | "+f.str+`
|
|
24
|
+
`,s+=xe.repeat("-",n.indent+p+3+f.pos)+`^
|
|
25
|
+
`,d=1;d<=n.linesAfter&&!(l+d>=o.length);d++)f=Or(e.buffer,i[l+d],o[l+d],e.position-(i[l]-i[l+d]),c),s+=xe.repeat(" ",n.indent)+Ir((e.line+d+1).toString(),p)+" | "+f.str+`
|
|
26
|
+
`;return s.replace(/\n$/,"")}var ey=Zg,ty=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ny=["scalar","sequence","mapping"];function ry(e){var n={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){n[String(i)]=r})}),n}function iy(e,n){if(n=n||{},Object.keys(n).forEach(function(r){if(ty.indexOf(r)===-1)throw new Ke('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=ry(n.styleAliases||null),ny.indexOf(this.kind)===-1)throw new Ke('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var ve=iy;function ia(e,n){var r=[];return e[n].forEach(function(i){var o=r.length;r.forEach(function(a,l){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(o=l)}),r[o]=i}),r}function oy(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,r;function i(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(n=0,r=arguments.length;n<r;n+=1)arguments[n].forEach(i);return e}function vr(e){return this.extend(e)}vr.prototype.extend=function(n){var r=[],i=[];if(n instanceof ve)i.push(n);else if(Array.isArray(n))i=i.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(r=r.concat(n.implicit)),n.explicit&&(i=i.concat(n.explicit));else throw new Ke("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof ve))throw new Ke("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Ke("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 Ke("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof ve))throw new Ke("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(vr.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(i),o.compiledImplicit=ia(o,"implicit"),o.compiledExplicit=ia(o,"explicit"),o.compiledTypeMap=oy(o.compiledImplicit,o.compiledExplicit),o};var oa=vr,aa=new ve("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),la=new ve("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),sa=new ve("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),ca=new oa({explicit:[aa,la,sa]});function ay(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function ly(){return null}function sy(e){return e===null}var da=new ve("tag:yaml.org,2002:null",{kind:"scalar",resolve:ay,construct:ly,predicate:sy,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function cy(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function dy(e){return e==="true"||e==="True"||e==="TRUE"}function uy(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var ua=new ve("tag:yaml.org,2002:bool",{kind:"scalar",resolve:cy,construct:dy,predicate:uy,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function py(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function fy(e){return 48<=e&&e<=55}function my(e){return 48<=e&&e<=57}function gy(e){if(e===null)return!1;var n=e.length,r=0,i=!1,o;if(!n)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===n)return!0;if(o=e[++r],o==="b"){for(r++;r<n;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;i=!0}return i&&o!=="_"}if(o==="x"){for(r++;r<n;r++)if(o=e[r],o!=="_"){if(!py(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}if(o==="o"){for(r++;r<n;r++)if(o=e[r],o!=="_"){if(!fy(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}}if(o==="_")return!1;for(;r<n;r++)if(o=e[r],o!=="_"){if(!my(e.charCodeAt(r)))return!1;i=!0}return!(!i||o==="_")}function yy(e){var n=e,r=1,i;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),i=n[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),n=n.slice(1),i=n[0]),n==="0")return 0;if(i==="0"){if(n[1]==="b")return r*parseInt(n.slice(2),2);if(n[1]==="x")return r*parseInt(n.slice(2),16);if(n[1]==="o")return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)}function hy(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!xe.isNegativeZero(e)}var pa=new ve("tag:yaml.org,2002:int",{kind:"scalar",resolve:gy,construct:yy,predicate:hy,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),_y=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function by(e){return!(e===null||!_y.test(e)||e[e.length-1]==="_")}function ky(e){var n,r;return n=e.replace(/_/g,"").toLowerCase(),r=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:r*parseFloat(n,10)}var Cy=/^[-+]?[0-9]+e/;function wy(e,n){var r;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(xe.isNegativeZero(e))return"-0.0";return r=e.toString(10),Cy.test(r)?r.replace("e",".e"):r}function Ay(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||xe.isNegativeZero(e))}var fa=new ve("tag:yaml.org,2002:float",{kind:"scalar",resolve:by,construct:ky,predicate:Ay,represent:wy,defaultStyle:"lowercase"}),ma=ca.extend({implicit:[da,ua,pa,fa]}),ga=ma,ya=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ha=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 Ey(e){return e===null?!1:ya.exec(e)!==null||ha.exec(e)!==null}function Sy(e){var n,r,i,o,a,l,s,d=0,f=null,p,c,u;if(n=ya.exec(e),n===null&&(n=ha.exec(e)),n===null)throw new Error("Date resolve error");if(r=+n[1],i=+n[2]-1,o=+n[3],!n[4])return new Date(Date.UTC(r,i,o));if(a=+n[4],l=+n[5],s=+n[6],n[7]){for(d=n[7].slice(0,3);d.length<3;)d+="0";d=+d}return n[9]&&(p=+n[10],c=+(n[11]||0),f=(p*60+c)*6e4,n[9]==="-"&&(f=-f)),u=new Date(Date.UTC(r,i,o,a,l,s,d)),f&&u.setTime(u.getTime()-f),u}function Py(e){return e.toISOString()}var _a=new ve("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ey,construct:Sy,instanceOf:Date,represent:Py});function Ty(e){return e==="<<"||e===null}var ba=new ve("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ty}),Rr=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
27
|
+
\r`;function Ny(e){if(e===null)return!1;var n,r,i=0,o=e.length,a=Rr;for(r=0;r<o;r++)if(n=a.indexOf(e.charAt(r)),!(n>64)){if(n<0)return!1;i+=6}return i%8===0}function xy(e){var n,r,i=e.replace(/[\r\n=]/g,""),o=i.length,a=Rr,l=0,s=[];for(n=0;n<o;n++)n%4===0&&n&&(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)),l=l<<6|a.indexOf(i.charAt(n));return r=o%4*6,r===0?(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)):r===18?(s.push(l>>10&255),s.push(l>>2&255)):r===12&&s.push(l>>4&255),new Uint8Array(s)}function Oy(e){var n="",r=0,i,o,a=e.length,l=Rr;for(i=0;i<a;i++)i%3===0&&i&&(n+=l[r>>18&63],n+=l[r>>12&63],n+=l[r>>6&63],n+=l[r&63]),r=(r<<8)+e[i];return o=a%3,o===0?(n+=l[r>>18&63],n+=l[r>>12&63],n+=l[r>>6&63],n+=l[r&63]):o===2?(n+=l[r>>10&63],n+=l[r>>4&63],n+=l[r<<2&63],n+=l[64]):o===1&&(n+=l[r>>2&63],n+=l[r<<4&63],n+=l[64],n+=l[64]),n}function Iy(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var ka=new ve("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ny,construct:xy,predicate:Iy,represent:Oy}),vy=Object.prototype.hasOwnProperty,Ry=Object.prototype.toString;function By(e){if(e===null)return!0;var n=[],r,i,o,a,l,s=e;for(r=0,i=s.length;r<i;r+=1){if(o=s[r],l=!1,Ry.call(o)!=="[object Object]")return!1;for(a in o)if(vy.call(o,a))if(!l)l=!0;else return!1;if(!l)return!1;if(n.indexOf(a)===-1)n.push(a);else return!1}return!0}function Ly(e){return e!==null?e:[]}var Ca=new ve("tag:yaml.org,2002:omap",{kind:"sequence",resolve:By,construct:Ly}),$y=Object.prototype.toString;function Dy(e){if(e===null)return!0;var n,r,i,o,a,l=e;for(a=new Array(l.length),n=0,r=l.length;n<r;n+=1){if(i=l[n],$y.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;a[n]=[o[0],i[o[0]]]}return!0}function Vy(e){if(e===null)return[];var n,r,i,o,a,l=e;for(a=new Array(l.length),n=0,r=l.length;n<r;n+=1)i=l[n],o=Object.keys(i),a[n]=[o[0],i[o[0]]];return a}var wa=new ve("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Dy,construct:Vy}),Fy=Object.prototype.hasOwnProperty;function Ky(e){if(e===null)return!0;var n,r=e;for(n in r)if(Fy.call(r,n)&&r[n]!==null)return!1;return!0}function Uy(e){return e!==null?e:{}}var Aa=new ve("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ky,construct:Uy}),Br=ga.extend({implicit:[_a,ba],explicit:[ka,Ca,wa,Aa]}),ct=Object.prototype.hasOwnProperty,Bn=1,Ea=2,Sa=3,Ln=4,Lr=1,My=2,Pa=3,jy=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,qy=/[\x85\u2028\u2029]/,Gy=/[,\[\]\{\}]/,Ta=/^(?:!|!!|![a-z\-]+!)$/i,Na=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function xa(e){return Object.prototype.toString.call(e)}function Ze(e){return e===10||e===13}function At(e){return e===9||e===32}function Ue(e){return e===9||e===32||e===10||e===13}function $t(e){return e===44||e===91||e===93||e===123||e===125}function Hy(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function zy(e){return e===120?2:e===117?4:e===85?8:0}function Wy(e){return 48<=e&&e<=57?e-48:-1}function Oa(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
28
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function Yy(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var Ia=new Array(256),va=new Array(256),Dt=0;Dt<256;Dt++)Ia[Dt]=Oa(Dt)?1:0,va[Dt]=Oa(Dt);function Jy(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Br,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ra(e,n){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=ey(r),new Ke(n,r)}function X(e,n){throw Ra(e,n)}function $n(e,n){e.onWarning&&e.onWarning.call(null,Ra(e,n))}var Ba={YAML:function(n,r,i){var o,a,l;n.version!==null&&X(n,"duplication of %YAML directive"),i.length!==1&&X(n,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),o===null&&X(n,"ill-formed argument of the YAML directive"),a=parseInt(o[1],10),l=parseInt(o[2],10),a!==1&&X(n,"unacceptable YAML version of the document"),n.version=i[0],n.checkLineBreaks=l<2,l!==1&&l!==2&&$n(n,"unsupported YAML version of the document")},TAG:function(n,r,i){var o,a;i.length!==2&&X(n,"TAG directive accepts exactly two arguments"),o=i[0],a=i[1],Ta.test(o)||X(n,"ill-formed tag handle (first argument) of the TAG directive"),ct.call(n.tagMap,o)&&X(n,'there is a previously declared suffix for "'+o+'" tag handle'),Na.test(a)||X(n,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{X(n,"tag prefix is malformed: "+a)}n.tagMap[o]=a}};function dt(e,n,r,i){var o,a,l,s;if(n<r){if(s=e.input.slice(n,r),i)for(o=0,a=s.length;o<a;o+=1)l=s.charCodeAt(o),l===9||32<=l&&l<=1114111||X(e,"expected valid JSON character");else jy.test(s)&&X(e,"the stream contains non-printable characters");e.result+=s}}function La(e,n,r,i){var o,a,l,s;for(xe.isObject(r)||X(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),l=0,s=o.length;l<s;l+=1)a=o[l],ct.call(n,a)||(n[a]=r[a],i[a]=!0)}function Vt(e,n,r,i,o,a,l,s,d){var f,p;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),f=0,p=o.length;f<p;f+=1)Array.isArray(o[f])&&X(e,"nested arrays are not supported inside keys"),typeof o=="object"&&xa(o[f])==="[object Object]"&&(o[f]="[object Object]");if(typeof o=="object"&&xa(o)==="[object Object]"&&(o="[object Object]"),o=String(o),n===null&&(n={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(f=0,p=a.length;f<p;f+=1)La(e,n,a[f],r);else La(e,n,a,r);else!e.json&&!ct.call(r,o)&&ct.call(n,o)&&(e.line=l||e.line,e.lineStart=s||e.lineStart,e.position=d||e.position,X(e,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(n,o,{configurable:!0,enumerable:!0,writable:!0,value:a}):n[o]=a,delete r[o];return n}function $r(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):X(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Te(e,n,r){for(var i=0,o=e.input.charCodeAt(e.position);o!==0;){for(;At(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(n&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(Ze(o))for($r(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&$n(e,"deficient indentation"),i}function Dn(e){var n=e.position,r;return r=e.input.charCodeAt(n),!!((r===45||r===46)&&r===e.input.charCodeAt(n+1)&&r===e.input.charCodeAt(n+2)&&(n+=3,r=e.input.charCodeAt(n),r===0||Ue(r)))}function Dr(e,n){n===1?e.result+=" ":n>1&&(e.result+=xe.repeat(`
|
|
29
|
+
`,n-1))}function Xy(e,n,r){var i,o,a,l,s,d,f,p,c=e.kind,u=e.result,m;if(m=e.input.charCodeAt(e.position),Ue(m)||$t(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)&&(o=e.input.charCodeAt(e.position+1),Ue(o)||r&&$t(o)))return!1;for(e.kind="scalar",e.result="",a=l=e.position,s=!1;m!==0;){if(m===58){if(o=e.input.charCodeAt(e.position+1),Ue(o)||r&&$t(o))break}else if(m===35){if(i=e.input.charCodeAt(e.position-1),Ue(i))break}else{if(e.position===e.lineStart&&Dn(e)||r&&$t(m))break;if(Ze(m))if(d=e.line,f=e.lineStart,p=e.lineIndent,Te(e,!1,-1),e.lineIndent>=n){s=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=d,e.lineStart=f,e.lineIndent=p;break}}s&&(dt(e,a,l,!1),Dr(e,e.line-d),a=l=e.position,s=!1),At(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return dt(e,a,l,!1),e.result?!0:(e.kind=c,e.result=u,!1)}function Qy(e,n){var r,i,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(dt(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,o=e.position;else return!0;else Ze(r)?(dt(e,i,o,!0),Dr(e,Te(e,!1,n)),i=o=e.position):e.position===e.lineStart&&Dn(e)?X(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);X(e,"unexpected end of the stream within a single quoted scalar")}function Zy(e,n){var r,i,o,a,l,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return dt(e,r,e.position,!0),e.position++,!0;if(s===92){if(dt(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),Ze(s))Te(e,!1,n);else if(s<256&&Ia[s])e.result+=va[s],e.position++;else if((l=zy(s))>0){for(o=l,a=0;o>0;o--)s=e.input.charCodeAt(++e.position),(l=Hy(s))>=0?a=(a<<4)+l:X(e,"expected hexadecimal character");e.result+=Yy(a),e.position++}else X(e,"unknown escape sequence");r=i=e.position}else Ze(s)?(dt(e,r,i,!0),Dr(e,Te(e,!1,n)),r=i=e.position):e.position===e.lineStart&&Dn(e)?X(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}X(e,"unexpected end of the stream within a double quoted scalar")}function eh(e,n){var r=!0,i,o,a,l=e.tag,s,d=e.anchor,f,p,c,u,m,_=Object.create(null),b,g,h,k;if(k=e.input.charCodeAt(e.position),k===91)p=93,m=!1,s=[];else if(k===123)p=125,m=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),k=e.input.charCodeAt(++e.position);k!==0;){if(Te(e,!0,n),k=e.input.charCodeAt(e.position),k===p)return e.position++,e.tag=l,e.anchor=d,e.kind=m?"mapping":"sequence",e.result=s,!0;r?k===44&&X(e,"expected the node content, but found ','"):X(e,"missed comma between flow collection entries"),g=b=h=null,c=u=!1,k===63&&(f=e.input.charCodeAt(e.position+1),Ue(f)&&(c=u=!0,e.position++,Te(e,!0,n))),i=e.line,o=e.lineStart,a=e.position,Ft(e,n,Bn,!1,!0),g=e.tag,b=e.result,Te(e,!0,n),k=e.input.charCodeAt(e.position),(u||e.line===i)&&k===58&&(c=!0,k=e.input.charCodeAt(++e.position),Te(e,!0,n),Ft(e,n,Bn,!1,!0),h=e.result),m?Vt(e,s,_,g,b,h,i,o,a):c?s.push(Vt(e,null,_,g,b,h,i,o,a)):s.push(b),Te(e,!0,n),k=e.input.charCodeAt(e.position),k===44?(r=!0,k=e.input.charCodeAt(++e.position)):r=!1}X(e,"unexpected end of the stream within a flow collection")}function th(e,n){var r,i,o=Lr,a=!1,l=!1,s=n,d=0,f=!1,p,c;if(c=e.input.charCodeAt(e.position),c===124)i=!1;else if(c===62)i=!0;else return!1;for(e.kind="scalar",e.result="";c!==0;)if(c=e.input.charCodeAt(++e.position),c===43||c===45)Lr===o?o=c===43?Pa:My:X(e,"repeat of a chomping mode identifier");else if((p=Wy(c))>=0)p===0?X(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?X(e,"repeat of an indentation width identifier"):(s=n+p-1,l=!0);else break;if(At(c)){do c=e.input.charCodeAt(++e.position);while(At(c));if(c===35)do c=e.input.charCodeAt(++e.position);while(!Ze(c)&&c!==0)}for(;c!==0;){for($r(e),e.lineIndent=0,c=e.input.charCodeAt(e.position);(!l||e.lineIndent<s)&&c===32;)e.lineIndent++,c=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>s&&(s=e.lineIndent),Ze(c)){d++;continue}if(e.lineIndent<s){o===Pa?e.result+=xe.repeat(`
|
|
30
|
+
`,a?1+d:d):o===Lr&&a&&(e.result+=`
|
|
31
|
+
`);break}for(i?At(c)?(f=!0,e.result+=xe.repeat(`
|
|
32
|
+
`,a?1+d:d)):f?(f=!1,e.result+=xe.repeat(`
|
|
33
|
+
`,d+1)):d===0?a&&(e.result+=" "):e.result+=xe.repeat(`
|
|
34
|
+
`,d):e.result+=xe.repeat(`
|
|
35
|
+
`,a?1+d:d),a=!0,l=!0,d=0,r=e.position;!Ze(c)&&c!==0;)c=e.input.charCodeAt(++e.position);dt(e,r,e.position,!1)}return!0}function $a(e,n){var r,i=e.tag,o=e.anchor,a=[],l,s=!1,d;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),d=e.input.charCodeAt(e.position);d!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,X(e,"tab characters must not be used in indentation")),!(d!==45||(l=e.input.charCodeAt(e.position+1),!Ue(l))));){if(s=!0,e.position++,Te(e,!0,-1)&&e.lineIndent<=n){a.push(null),d=e.input.charCodeAt(e.position);continue}if(r=e.line,Ft(e,n,Sa,!1,!0),a.push(e.result),Te(e,!0,-1),d=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>n)&&d!==0)X(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return s?(e.tag=i,e.anchor=o,e.kind="sequence",e.result=a,!0):!1}function nh(e,n,r){var i,o,a,l,s,d,f=e.tag,p=e.anchor,c={},u=Object.create(null),m=null,_=null,b=null,g=!1,h=!1,k;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),k=e.input.charCodeAt(e.position);k!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,X(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(k===63||k===58)&&Ue(i))k===63?(g&&(Vt(e,c,u,m,_,null,l,s,d),m=_=b=null),h=!0,g=!0,o=!0):g?(g=!1,o=!0):X(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,k=i;else{if(l=e.line,s=e.lineStart,d=e.position,!Ft(e,r,Ea,!1,!0))break;if(e.line===a){for(k=e.input.charCodeAt(e.position);At(k);)k=e.input.charCodeAt(++e.position);if(k===58)k=e.input.charCodeAt(++e.position),Ue(k)||X(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(Vt(e,c,u,m,_,null,l,s,d),m=_=b=null),h=!0,g=!1,o=!1,m=e.tag,_=e.result;else if(h)X(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=f,e.anchor=p,!0}else if(h)X(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=f,e.anchor=p,!0}if((e.line===a||e.lineIndent>n)&&(g&&(l=e.line,s=e.lineStart,d=e.position),Ft(e,n,Ln,!0,o)&&(g?_=e.result:b=e.result),g||(Vt(e,c,u,m,_,b,l,s,d),m=_=b=null),Te(e,!0,-1),k=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>n)&&k!==0)X(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return g&&Vt(e,c,u,m,_,null,l,s,d),h&&(e.tag=f,e.anchor=p,e.kind="mapping",e.result=c),h}function rh(e){var n,r=!1,i=!1,o,a,l;if(l=e.input.charCodeAt(e.position),l!==33)return!1;if(e.tag!==null&&X(e,"duplication of a tag property"),l=e.input.charCodeAt(++e.position),l===60?(r=!0,l=e.input.charCodeAt(++e.position)):l===33?(i=!0,o="!!",l=e.input.charCodeAt(++e.position)):o="!",n=e.position,r){do l=e.input.charCodeAt(++e.position);while(l!==0&&l!==62);e.position<e.length?(a=e.input.slice(n,e.position),l=e.input.charCodeAt(++e.position)):X(e,"unexpected end of the stream within a verbatim tag")}else{for(;l!==0&&!Ue(l);)l===33&&(i?X(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(n-1,e.position+1),Ta.test(o)||X(e,"named tag handle cannot contain such characters"),i=!0,n=e.position+1)),l=e.input.charCodeAt(++e.position);a=e.input.slice(n,e.position),Gy.test(a)&&X(e,"tag suffix cannot contain flow indicator characters")}a&&!Na.test(a)&&X(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{X(e,"tag name is malformed: "+a)}return r?e.tag=a:ct.call(e.tagMap,o)?e.tag=e.tagMap[o]+a:o==="!"?e.tag="!"+a:o==="!!"?e.tag="tag:yaml.org,2002:"+a:X(e,'undeclared tag handle "'+o+'"'),!0}function ih(e){var n,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&X(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!Ue(r)&&!$t(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&X(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function oh(e){var n,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!Ue(i)&&!$t(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&X(e,"name of an alias node must contain at least one character"),r=e.input.slice(n,e.position),ct.call(e.anchorMap,r)||X(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Te(e,!0,-1),!0}function Ft(e,n,r,i,o){var a,l,s,d=1,f=!1,p=!1,c,u,m,_,b,g;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=l=s=Ln===r||Sa===r,i&&Te(e,!0,-1)&&(f=!0,e.lineIndent>n?d=1:e.lineIndent===n?d=0:e.lineIndent<n&&(d=-1)),d===1)for(;rh(e)||ih(e);)Te(e,!0,-1)?(f=!0,s=a,e.lineIndent>n?d=1:e.lineIndent===n?d=0:e.lineIndent<n&&(d=-1)):s=!1;if(s&&(s=f||o),(d===1||Ln===r)&&(Bn===r||Ea===r?b=n:b=n+1,g=e.position-e.lineStart,d===1?s&&($a(e,g)||nh(e,g,b))||eh(e,b)?p=!0:(l&&th(e,b)||Qy(e,b)||Zy(e,b)?p=!0:oh(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&X(e,"alias node should not have any properties")):Xy(e,b,Bn===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):d===0&&(p=s&&$a(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&X(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,u=e.implicitTypes.length;c<u;c+=1)if(_=e.implicitTypes[c],_.resolve(e.result)){e.result=_.construct(e.result),e.tag=_.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ct.call(e.typeMap[e.kind||"fallback"],e.tag))_=e.typeMap[e.kind||"fallback"][e.tag];else for(_=null,m=e.typeMap.multi[e.kind||"fallback"],c=0,u=m.length;c<u;c+=1)if(e.tag.slice(0,m[c].tag.length)===m[c].tag){_=m[c];break}_||X(e,"unknown tag !<"+e.tag+">"),e.result!==null&&_.kind!==e.kind&&X(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+_.kind+'", not "'+e.kind+'"'),_.resolve(e.result,e.tag)?(e.result=_.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):X(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function ah(e){var n=e.position,r,i,o,a=!1,l;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(l=e.input.charCodeAt(e.position))!==0&&(Te(e,!0,-1),l=e.input.charCodeAt(e.position),!(e.lineIndent>0||l!==37));){for(a=!0,l=e.input.charCodeAt(++e.position),r=e.position;l!==0&&!Ue(l);)l=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),o=[],i.length<1&&X(e,"directive name must not be less than one character in length");l!==0;){for(;At(l);)l=e.input.charCodeAt(++e.position);if(l===35){do l=e.input.charCodeAt(++e.position);while(l!==0&&!Ze(l));break}if(Ze(l))break;for(r=e.position;l!==0&&!Ue(l);)l=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}l!==0&&$r(e),ct.call(Ba,i)?Ba[i](e,i,o):$n(e,'unknown document directive "'+i+'"')}if(Te(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Te(e,!0,-1)):a&&X(e,"directives end mark is expected"),Ft(e,e.lineIndent-1,Ln,!1,!0),Te(e,!0,-1),e.checkLineBreaks&&qy.test(e.input.slice(n,e.position))&&$n(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Dn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Te(e,!0,-1));return}if(e.position<e.length-1)X(e,"end of the stream or a document separator is expected");else return}function Da(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
36
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Jy(e,n),i=e.indexOf("\0");for(i!==-1&&(r.position=i,X(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ah(r);return r.documents}function lh(e,n,r){n!==null&&typeof n=="object"&&typeof r>"u"&&(r=n,n=null);var i=Da(e,r);if(typeof n!="function")return i;for(var o=0,a=i.length;o<a;o+=1)n(i[o])}function sh(e,n){var r=Da(e,n);if(r.length!==0){if(r.length===1)return r[0];throw new Ke("expected a single document in the stream, but found more")}}var ch=lh,dh=sh,Va={loadAll:ch,load:dh},Fa=Object.prototype.toString,Ka=Object.prototype.hasOwnProperty,Vr=65279,uh=9,nn=10,ph=13,fh=32,mh=33,gh=34,Fr=35,yh=37,hh=38,_h=39,bh=42,Ua=44,kh=45,Vn=58,Ch=61,wh=62,Ah=63,Eh=64,Ma=91,ja=93,Sh=96,qa=123,Ph=124,Ga=125,De={};De[0]="\\0",De[7]="\\a",De[8]="\\b",De[9]="\\t",De[10]="\\n",De[11]="\\v",De[12]="\\f",De[13]="\\r",De[27]="\\e",De[34]='\\"',De[92]="\\\\",De[133]="\\N",De[160]="\\_",De[8232]="\\L",De[8233]="\\P";var Th=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Nh=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function xh(e,n){var r,i,o,a,l,s,d;if(n===null)return{};for(r={},i=Object.keys(n),o=0,a=i.length;o<a;o+=1)l=i[o],s=String(n[l]),l.slice(0,2)==="!!"&&(l="tag:yaml.org,2002:"+l.slice(2)),d=e.compiledTypeMap.fallback[l],d&&Ka.call(d.styleAliases,s)&&(s=d.styleAliases[s]),r[l]=s;return r}function Oh(e){var n,r,i;if(n=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Ke("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+xe.repeat("0",i-n.length)+n}var Ih=1,rn=2;function vh(e){this.schema=e.schema||Br,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=xe.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=xh(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?rn:Ih,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ha(e,n){for(var r=xe.repeat(" ",n),i=0,o=-1,a="",l,s=e.length;i<s;)o=e.indexOf(`
|
|
35
37
|
`,i),o===-1?(l=e.slice(i),i=s):(l=e.slice(i,o+1),i=o+1),l.length&&l!==`
|
|
36
|
-
`&&(a+=r),a+=l;return a}function
|
|
37
|
-
`+
|
|
38
|
+
`&&(a+=r),a+=l;return a}function Kr(e,n){return`
|
|
39
|
+
`+xe.repeat(" ",e.indent*n)}function Rh(e,n){var r,i,o;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(o=e.implicitTypes[r],o.resolve(n))return!0;return!1}function Fn(e){return e===fh||e===uh}function on(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Vr||65536<=e&&e<=1114111}function za(e){return on(e)&&e!==Vr&&e!==ph&&e!==nn}function Wa(e,n,r){var i=za(e),o=i&&!Fn(e);return(r?i:i&&e!==Ua&&e!==Ma&&e!==ja&&e!==qa&&e!==Ga)&&e!==Fr&&!(n===Vn&&!o)||za(n)&&!Fn(n)&&e===Fr||n===Vn&&o}function Bh(e){return on(e)&&e!==Vr&&!Fn(e)&&e!==kh&&e!==Ah&&e!==Vn&&e!==Ua&&e!==Ma&&e!==ja&&e!==qa&&e!==Ga&&e!==Fr&&e!==hh&&e!==bh&&e!==mh&&e!==Ph&&e!==Ch&&e!==wh&&e!==_h&&e!==gh&&e!==yh&&e!==Eh&&e!==Sh}function Lh(e){return!Fn(e)&&e!==Vn}function an(e,n){var r=e.charCodeAt(n),i;return r>=55296&&r<=56319&&n+1<e.length&&(i=e.charCodeAt(n+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function Ya(e){var n=/^\n* /;return n.test(e)}var Ja=1,Ur=2,Xa=3,Qa=4,Kt=5;function $h(e,n,r,i,o,a,l,s){var d,f=0,p=null,c=!1,u=!1,m=i!==-1,_=-1,b=Bh(an(e,0))&&Lh(an(e,e.length-1));if(n||l)for(d=0;d<e.length;f>=65536?d+=2:d++){if(f=an(e,d),!on(f))return Kt;b=b&&Wa(f,p,s),p=f}else{for(d=0;d<e.length;f>=65536?d+=2:d++){if(f=an(e,d),f===nn)c=!0,m&&(u=u||d-_-1>i&&e[_+1]!==" ",_=d);else if(!on(f))return Kt;b=b&&Wa(f,p,s),p=f}u=u||m&&d-_-1>i&&e[_+1]!==" "}return!c&&!u?b&&!l&&!o(e)?Ja:a===rn?Kt:Ur:r>9&&Ya(e)?Kt:l?a===rn?Kt:Ur:u?Qa:Xa}function Dh(e,n,r,i,o){e.dump=function(){if(n.length===0)return e.quotingType===rn?'""':"''";if(!e.noCompatMode&&(Th.indexOf(n)!==-1||Nh.test(n)))return e.quotingType===rn?'"'+n+'"':"'"+n+"'";var a=e.indent*Math.max(1,r),l=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&r>=e.flowLevel;function d(f){return Rh(e,f)}switch($h(n,s,e.indent,l,d,e.quotingType,e.forceQuotes&&!i,o)){case Ja:return n;case Ur:return"'"+n.replace(/'/g,"''")+"'";case Xa:return"|"+Za(n,e.indent)+el(Ha(n,a));case Qa:return">"+Za(n,e.indent)+el(Ha(Vh(n,l),a));case Kt:return'"'+Fh(n)+'"';default:throw new Ke("impossible error: invalid scalar style")}}()}function Za(e,n){var r=Ya(e)?String(n):"",i=e[e.length-1]===`
|
|
38
40
|
`,o=i&&(e[e.length-2]===`
|
|
39
41
|
`||e===`
|
|
40
42
|
`),a=o?"+":i?"":"-";return r+a+`
|
|
41
|
-
`}function
|
|
42
|
-
`?e.slice(0,-1):e}function
|
|
43
|
-
`);return f=f!==-1?f:e.length,r.lastIndex=f,
|
|
44
|
-
`||e[0]===" ",a,l;l=r.exec(e);){var s=l[1],
|
|
45
|
-
`:"")+
|
|
46
|
-
`+e.slice(o,a),o=a+1),l=s;return
|
|
47
|
-
`,e.length-o>n&&l>o?
|
|
48
|
-
`+e.slice(l+1):
|
|
49
|
-
`:""}var
|
|
43
|
+
`}function el(e){return e[e.length-1]===`
|
|
44
|
+
`?e.slice(0,-1):e}function Vh(e,n){for(var r=/(\n+)([^\n]*)/g,i=function(){var f=e.indexOf(`
|
|
45
|
+
`);return f=f!==-1?f:e.length,r.lastIndex=f,tl(e.slice(0,f),n)}(),o=e[0]===`
|
|
46
|
+
`||e[0]===" ",a,l;l=r.exec(e);){var s=l[1],d=l[2];a=d[0]===" ",i+=s+(!o&&!a&&d!==""?`
|
|
47
|
+
`:"")+tl(d,n),o=a}return i}function tl(e,n){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,o=0,a,l=0,s=0,d="";i=r.exec(e);)s=i.index,s-o>n&&(a=l>o?l:s,d+=`
|
|
48
|
+
`+e.slice(o,a),o=a+1),l=s;return d+=`
|
|
49
|
+
`,e.length-o>n&&l>o?d+=e.slice(o,l)+`
|
|
50
|
+
`+e.slice(l+1):d+=e.slice(o),d.slice(1)}function Fh(e){for(var n="",r=0,i,o=0;o<e.length;r>=65536?o+=2:o++)r=an(e,o),i=De[r],!i&&on(r)?(n+=e[o],r>=65536&&(n+=e[o+1])):n+=i||Oh(r);return n}function Kh(e,n,r){var i="",o=e.tag,a,l,s;for(a=0,l=r.length;a<l;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(it(e,n,s,!1,!1)||typeof s>"u"&&it(e,n,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=o,e.dump="["+i+"]"}function nl(e,n,r,i){var o="",a=e.tag,l,s,d;for(l=0,s=r.length;l<s;l+=1)d=r[l],e.replacer&&(d=e.replacer.call(r,String(l),d)),(it(e,n+1,d,!0,!0,!1,!0)||typeof d>"u"&&it(e,n+1,null,!0,!0,!1,!0))&&((!i||o!=="")&&(o+=Kr(e,n)),e.dump&&nn===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=a,e.dump=o||"[]"}function Uh(e,n,r){var i="",o=e.tag,a=Object.keys(r),l,s,d,f,p;for(l=0,s=a.length;l<s;l+=1)p="",i!==""&&(p+=", "),e.condenseFlow&&(p+='"'),d=a[l],f=r[d],e.replacer&&(f=e.replacer.call(r,d,f)),it(e,n,d,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),it(e,n,f,!1,!1)&&(p+=e.dump,i+=p));e.tag=o,e.dump="{"+i+"}"}function Mh(e,n,r,i){var o="",a=e.tag,l=Object.keys(r),s,d,f,p,c,u;if(e.sortKeys===!0)l.sort();else if(typeof e.sortKeys=="function")l.sort(e.sortKeys);else if(e.sortKeys)throw new Ke("sortKeys must be a boolean or a function");for(s=0,d=l.length;s<d;s+=1)u="",(!i||o!=="")&&(u+=Kr(e,n)),f=l[s],p=r[f],e.replacer&&(p=e.replacer.call(r,f,p)),it(e,n+1,f,!0,!0,!0)&&(c=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,c&&(e.dump&&nn===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=Kr(e,n)),it(e,n+1,p,!0,c)&&(e.dump&&nn===e.dump.charCodeAt(0)?u+=":":u+=": ",u+=e.dump,o+=u));e.tag=a,e.dump=o||"{}"}function rl(e,n,r){var i,o,a,l,s,d;for(o=r?e.explicitTypes:e.implicitTypes,a=0,l=o.length;a<l;a+=1)if(s=o[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof n=="object"&&n instanceof s.instanceOf)&&(!s.predicate||s.predicate(n))){if(r?s.multi&&s.representName?e.tag=s.representName(n):e.tag=s.tag:e.tag="?",s.represent){if(d=e.styleMap[s.tag]||s.defaultStyle,Fa.call(s.represent)==="[object Function]")i=s.represent(n,d);else if(Ka.call(s.represent,d))i=s.represent[d](n,d);else throw new Ke("!<"+s.tag+'> tag resolver accepts not "'+d+'" style');e.dump=i}return!0}return!1}function it(e,n,r,i,o,a,l){e.tag=null,e.dump=r,rl(e,r,!1)||rl(e,r,!0);var s=Fa.call(e.dump),d=i,f;i&&(i=e.flowLevel<0||e.flowLevel>n);var p=s==="[object Object]"||s==="[object Array]",c,u;if(p&&(c=e.duplicates.indexOf(r),u=c!==-1),(e.tag!==null&&e.tag!=="?"||u||e.indent!==2&&n>0)&&(o=!1),u&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(p&&u&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(Mh(e,n,e.dump,o),u&&(e.dump="&ref_"+c+e.dump)):(Uh(e,n,e.dump),u&&(e.dump="&ref_"+c+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!l&&n>0?nl(e,n-1,e.dump,o):nl(e,n,e.dump,o),u&&(e.dump="&ref_"+c+e.dump)):(Kh(e,n,e.dump),u&&(e.dump="&ref_"+c+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&Dh(e,e.dump,n,a,d);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ke("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",e.dump=f+" "+e.dump)}return!0}function jh(e,n){var r=[],i=[],o,a;for(Mr(e,r,i),o=0,a=i.length;o<a;o+=1)n.duplicates.push(r[i[o]]);n.usedDuplicates=new Array(a)}function Mr(e,n,r){var i,o,a;if(e!==null&&typeof e=="object")if(o=n.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(n.push(e),Array.isArray(e))for(o=0,a=e.length;o<a;o+=1)Mr(e[o],n,r);else for(i=Object.keys(e),o=0,a=i.length;o<a;o+=1)Mr(e[i[o]],n,r)}function qh(e,n){n=n||{};var r=new vh(n);r.noRefs||jh(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),it(r,0,i,!0,!0)?r.dump+`
|
|
51
|
+
`:""}var Gh=qh,Hh={dump:Gh};function jr(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var zh=ve,Wh=oa,Yh=ca,qr=ma,Jh=ga,Xh=Br,Qh=Va.load,Zh=Va.loadAll,e_=Hh.dump,t_=Ke,n_={binary:ka,float:fa,map:sa,null:da,pairs:wa,set:Aa,timestamp:_a,bool:ua,int:pa,merge:ba,omap:Ca,seq:la,str:aa},r_=jr("safeLoad","load"),i_=jr("safeLoadAll","loadAll"),o_=jr("safeDump","dump"),il={Type:zh,Schema:Wh,FAILSAFE_SCHEMA:Yh,JSON_SCHEMA:qr,CORE_SCHEMA:Jh,DEFAULT_SCHEMA:Xh,load:Qh,loadAll:Zh,dump:e_,YAMLException:t_,types:n_,safeLoad:r_,safeLoadAll:i_,safeDump:o_};const ol=Object.freeze(Object.defineProperty({__proto__:null,authenticate:`nodes:
|
|
50
52
|
- name: STATIC_INPUTS
|
|
51
53
|
type: static
|
|
52
54
|
values:
|
|
@@ -120,5 +122,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
120
122
|
type: exit
|
|
121
123
|
input: API
|
|
122
124
|
status: 200
|
|
123
|
-
`},Symbol.toStringTag,{value:"Module"})),
|
|
124
|
-
`)[0],g=[{startLineNumber:m+1,startColumn:k+1,endLineNumber:m+1,endColumn:k+2,message:_,severity:mn.MarkerSeverity.Error,source:Vr}];mn.editor.setModelMarkers(u,Vr,g),i("error",_)}})}),t.onBeforeUnmount(()=>{var s;(s=a.value)==null||s.dispose()}),n({setExampleCode:l}),(s,u)=>(t.openBlock(),t.createElementBlock("div",mh,null,512))}}),[["__scopeId","data-v-e5fcb32d"]]),hh={key:0},bh={class:"examples-content"},_h=["innerHTML"],Wa=Object.freeze(Object.defineProperty({__proto__:null,DatakitForm:ue(t.defineComponent({__name:"DatakitForm",props:{generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},formOptions:{},isEditing:{type:Boolean},onModelUpdated:{type:Function},onFormChange:{type:Function},onValidityChange:{type:Function}},setup(e){const{t:n}=Ge.createI18n("en-us",qe),r=e,i=t.inject(ri.DATAKIT_ENABLE_VISUAL_EDITOR,!1),{editorMode:o}=Er(),a=t.computed(()=>i?o.value:"code"),l={visual:Ce.DesignIcon,code:Ce.CodeblockIcon},s=[{label:n("plugins.free-form.datakit.visual_editor.mode"),value:"visual"},{label:n("plugins.free-form.datakit.code_editor.mode"),value:"code"}],u=t.computed(()=>{switch(o.value){case"code":return n("plugins.free-form.datakit.description_code");case"visual":return n("plugins.free-form.datakit.description_visual");default:return""}}),f=t.ref(!1),p=t.useTemplateRef("code-editor");function c(k){var _;(_=p.value)==null||_.setExampleCode(k)}function d(k){var _;r.onFormChange({config:k}),(_=r.onValidityChange)==null||_.call(r,{model:"config",valid:!0})}function m(k){var _;(_=r.onValidityChange)==null||_.call(r,{model:"config",valid:!1,error:k})}return(k,_)=>{const g=t.resolveComponent("KButton");return t.openBlock(),t.createBlock($f,t.mergeProps(r,{class:"dk-form"}),t.createSlots({default:t.withCtx(A=>[a.value==="visual"?(t.openBlock(),t.createElementBlock("div",hh,[t.createVNode(g,{appearance:"secondary",onClick:_[1]||(_[1]=P=>f.value=!0)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.free-form.datakit.visual_editor.cta")),1)]),_:1}),t.createVNode(Ym,{open:f.value,"onUpdate:open":_[2]||(_[2]=P=>f.value=P)},null,8,["open"])])):a.value==="code"?(t.openBlock(),t.createBlock(vo,t.mergeProps({key:1},A,{tag:"div"}),{default:t.withCtx(()=>[t.createVNode(t.unref(Ae.KAlert),{class:"examples"},{icon:t.withCtx(()=>[t.createVNode(t.unref(Ce.SparklesIcon))]),default:t.withCtx(()=>[t.createElementVNode("div",bh,[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.free-form.datakit.description_example"))+" ",1),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(za,(P,O)=>t.createVNode(g,{key:O,appearance:"secondary",size:"small",onClick:$=>c(O)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)(`plugins.free-form.datakit.examples.${O}`)),1)]),_:2},1032,["onClick"])),64))])]),_:1}),t.createVNode(yh,{ref:"code-editor",class:"editor",config:r.model.config,editing:r.isEditing,onChange:d,onError:m},null,8,["config","editing"])]),_:2},1040)):t.createCommentVNode("",!0)]),"plugin-config-description":t.withCtx(()=>[t.createElementVNode("span",{innerHTML:u.value},null,8,_h)]),_:2},[t.unref(i)?{name:"plugin-config-extra",fn:t.withCtx(()=>[t.createVNode(t.unref(Ae.KSegmentedControl),{modelValue:t.unref(o),"onUpdate:modelValue":_[0]||(_[0]=A=>t.isRef(o)?o.value=A:null),options:s},{"option-label":t.withCtx(({option:A})=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l[A.value]))),t.createTextVNode(" "+t.toDisplayString(A.label),1)]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1040)}}}),[["__scopeId","data-v-42a0216c"]]),RequestCalloutForm:Of,ServiceProtectionForm:If},Symbol.toStringTag,{value:"Module"})),kh={class:"kong-ui-entities-plugin-form"},Ch={key:1,class:"entity-form"},Ah={class:"plugin-config-empty-state"},Eh=ue(t.defineComponent({__name:"PluginEntityForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},entityMap:{type:Object,default:()=>({})},record:{type:Object,default:()=>({})},schema:{type:Object,default:()=>({})},rawSchema:{type:Object,default:()=>({})},editing:{type:Boolean,default:!1},credential:{type:Boolean,default:!1},enableVaultSecretPicker:{type:Boolean,default:!1},enableRedisPartial:{type:Boolean,default:!1}},emits:["loading","model-updated","showNewPartialModal","globalAction","validity-change"],setup(e,{emit:n}){var _e,pe;const r=Object.keys(ke.sharedForms),i=Object.keys(Wa);if(new Set([...r,...i]).size!==r.length+i.length)throw new Error("Duplicate form component names found in `sharedForms` and `freeForm`");const o=n,a=e,{axiosInstance:l}=D.useAxios((_e=a.config)==null?void 0:_e.axiosRequestConfig),{parseSchema:s}=Pe.useSchemas({entityId:((pe=a.entityMap.focusedEntity)==null?void 0:pe.id)||void 0,credential:a.credential,enableRedisPartial:a.enableRedisPartial,experimentalRenders:a.config.app==="konnect"?a.config.experimentalRenders:void 0}),{convertToDotNotation:u,unFlattenObject:f,dismissField:p,isObjectEmpty:c,unsetNullForeignKey:d}=Pe.usePluginHelpers(),m=Pe.useExperimentalFreeForms(),{objectsAreEqual:k}=D.useHelpers(),{i18n:{t:_}}=it(),g=(V,B)=>{let q=`${a.config.apiBaseUrl}${Se.form[a.config.app].entityGetOne}`;return a.config.app==="konnect"?q=q.replace(/{controlPlaneId}/gi,a.config.controlPlaneId||""):a.config.app==="kongManager"&&(q=q.replace(/\/{workspace}/gi,a.config.workspace?`/${a.config.workspace}`:"")),q=q.replace(/{entity}/gi,V),q=q.replace(/{id}/gi,B),q},A=V=>{let B=`${a.config.apiBaseUrl}${Se.form[a.config.app].entityGetAll}`;return a.config.app==="konnect"?B=B.replace(/{controlPlaneId}/gi,a.config.controlPlaneId||""):a.config.app==="kongManager"&&(B=B.replace(/\/{workspace}/gi,a.config.workspace?`/${a.config.workspace}`:"")),B=B.replace(/{entity}/gi,V),B},P=(V,B)=>{const q=g(V,B);return l.get(q)},O=(V,B)=>{const q=A(V);return a.config.app==="konnect"?l.get(q).then(le=>{const{data:{data:ee}}=le;if(delete B.size,delete B.offset,ee.length&&Object.keys(B).length===1){const de=Object.keys(B)[0],Fe=ee.filter(Ve=>Ve[de]?!!Ve[de].toLowerCase().includes(B[de].toLowerCase()):!1);le.data.data=Fe}return le}):l.get(q,{params:B})};t.provide(ke.FORMS_API_KEY,{getOne:P,getAll:O}),t.provide(ke.FORMS_CONFIG,a.config);const $=t.ref(""),U=t.ref(""),h=t.ref(null),C=t.ref({}),y=t.reactive({}),S=t.reactive({}),ie=t.computed(()=>{var V;return(V=h.value)==null?void 0:V.options}),J=t.ref(!1),X=t.ref(),w=(V,B)=>{J.value=V??"",X.value=B},N=V=>{var B;(B=X.value)==null||B.call(X,V),J.value=!1},v=()=>{var Fe,Ve;const V={...a.schema},B=S,q=y,le=Object.keys(B),ee={};if(!c(C.value))for(let ge=0;ge<((Ve=(Fe=C.value)==null?void 0:Fe.fields)==null?void 0:Ve.length);ge++)V[C.value.fields[ge].model]=C.value.fields[ge];ke.customFields.forEach(ge=>{V[ge]&&(V[ge].fields.forEach(fe=>{fe.fields&&fe.fields.forEach(Q=>{V[Q.model]=Q}),fe.model&&(V[fe.model]=fe)}),delete V[ge])}),le.forEach(ge=>{var E;if(!V[ge]){ge==="partials"&&(ee[ge]=B[ge]);return}const fe=V[ge];let Q=B[ge];const nt=q[ge],Ke=Array.isArray(Q)?"array":typeof Q,j=fe?fe.valueType:null,z=fe?fe.valueArrayType:null,T=fe?fe.transform:null;if(Q==null&&nt==null&&!fe.submitWhenNull)return;if(fe){if(j&&Ke!==j)switch(j){case"array":Ke==="string"&&Q.length&&(Q=Q.split(",").map(W=>{if(W=W.trim(),z==="string")return String(W);if(z==="number")return Number(W);if(z==="boolean"){if(typeof W=="string")return W.toLowerCase()==="true"||W==="1";if(typeof W=="number")return W===1}return W})),(!Q||!Q.length)&&(Q=fe.submitWhenNull?null:[]);break;case"number":Q=Number(Q);break;case"boolean":Ke==="string"&&(Q=Q.toLowerCase()==="true"||Q==="1"),Ke==="number"&&(Q=Q===1);break;case"string":Q=Q==null?"":String(Q);break}else j==="array"&&(!Q||!Q.length?Q=fe.submitWhenNull?null:[]:((E=fe.inputAttributes)==null?void 0:E.type)==="number"&&(Q=Q.map(W=>Number(W))));if(fe.type==="array"&&fe.nestedFields){const W=G=>{Object.keys(G).forEach(oe=>{G[oe]&&typeof G[oe]=="object"&&!Array.isArray(G[oe])&&G[oe]!==null?W(G[oe]):(G[oe]===void 0||G[oe]===null||typeof G[oe]=="number"&&isNaN(G[oe])||typeof G[oe]=="string"&&G[oe].trim().length===0)&&delete G[oe]})};Q&&typeof Q=="object"&&W(Q)}fe.type==="object-advanced"&&fe.fields&&Q!==null&&(Object.entries(Q).length===0?Q=null:Object.keys(Q).forEach(W=>{Array.isArray(Q[W])||(Q[W]=Q[W].split(","))}))}let I=u(ge);if(fe.fieldNameHasDashes){const[W,...G]=I.split(".").reverse();I=[W.replace(/_/g,"-"),...G].reverse().join(".")}if(j==="object-expand"){let W;[I,W]=I.split(".");let G={};ee[I]&&(G=ee[I]),G[W]=Q,Q=G}nt!==void 0&&Q===""&&Q!==nt?ee[I]=j==="object"?{}:null:fe.type==="checklist"&&Q===""?ee[I]=[]:Q!==""&&(ee[I]=Q),ee[I]=T?T(Q):ee[I],d(I,ee)});const de=f(ee);return U.value&&Object.assign(de,x.value),de},F=(V,B={})=>{p(S,B,V,a.editing),o("model-updated",{model:S,originalModel:y,data:v()})},Z=(V,B)=>{var ee;const q={[B]:V};typeof((ee=a.schema[B])==null?void 0:ee.modelTransformer)=="function"&&(q[B]=a.schema[B].modelTransformer(V));const le=Object.assign({},S,q);Object.assign(S,le),o("model-updated",{model:S,originalModel:y,data:v()})},re=V=>{o("validity-change",V)},M=(V,B)=>{Object.keys(V).forEach(q=>{var Ve,ge;let le=B?`${B}-${q}`:q,ee=a.schema[le];if(!ee){const fe=B?`${B}-${q.replace(/-/g,"_")}`:q.replace(/-/g,"_");(Ve=a.schema[fe])!=null&&Ve.fieldNameHasDashes&&(le=fe,ee=a.schema[le]),B&&((ge=a.schema[B])==null?void 0:ge.keyFromObject)===q&&(le=B,ee=a.schema[le])}const de=V[q],Fe=typeof de;if(ee&&ee.type==="object-advanced"&&!de){S[le]={},y[le]={};return}if(Array.isArray(de)){S[le]=JSON.parse(JSON.stringify(de)),y[le]=JSON.parse(JSON.stringify(de));return}if(Fe==="object"&&de&&!de.length)return M(de,le);if(Fe==="object"&&de&&de.length&&ee.type==="input"){S[le]=de.join(", "),y[le]=de.join(", ");return}S[le]=de,y[le]=de}),o("model-updated",{model:S,originalModel:y,data:v()})},x=t.shallowRef(a.record),R=V=>{x.value=V,o("model-updated",{model:{...S,...V},originalModel:y,data:v()})},ae=t.ref(!0),se=()=>{var V;if(a.record&&a.schema&&(M({enabled:a.record.enabled??!0,...a.record.instance_name&&{instance_name:a.record.instance_name||""},...a.record.protocols&&{protocols:a.record.protocols},...a.record.tags&&{tags:a.record.tags}}),a.credential?((a.record.consumer_id||a.record.consumer)&&M({consumer_id:a.record.consumer_id||a.record.consumer}),M(a.record)):a.record.config&&((a.record.consumer_id||a.record.consumer||a.record.service_id||a.record.service||a.record.route_id||a.record.route||a.record.consumer_group_id||a.record.consumer_group)&&M({service_id:a.record.service_id||a.record.service,route_id:a.record.route_id||a.record.route,consumer_id:a.record.consumer_id||a.record.consumer,consumer_group_id:a.record.consumer_group_id||a.record.consumer_group}),a.record.partials&&F("redis",{partials:a.record.partials}),U.value?R(a.record):M(a.record.config,"config"))),Object.keys(a.entityMap).length&&!a.entityMap.global&&a.schema){const B={};for(const q in a.entityMap){const le=a.entityMap[q].id,ee=a.entityMap[q].idField,de=ee==="consumer_group_id"?"consumer_group-id":JSON.parse(JSON.stringify(ee).replace("_","-"));Object.prototype.hasOwnProperty.call(S,de)&&(B[de]=le)}M(B)}if((V=a.entityMap.consumer)!=null&&V.id&&a.schema&&a.credential){const B={};Object.prototype.hasOwnProperty.call(S,"consumer")&&(B.consumer=a.entityMap.consumer.id),M(B)}ae.value=!1};return t.watch(ae,V=>{o("loading",V)}),t.watch(()=>a.schema,(V,B)=>{var le,ee;if(k(V||{},B||{}))return;const q=s(V);Object.assign(S,q.model),C.value={fields:(ee=(le=C.value)==null?void 0:le.fields)==null?void 0:ee.map(de=>({...de,disabled:de.disabled||!1}))},Object.assign(y,JSON.parse(JSON.stringify(q.model))),U.value=ni(q.model.name,m),$.value=ke.getSharedFormName(q.model.name),se()},{immediate:!0,deep:!0}),t.onBeforeMount(()=>{var V,B;h.value=s(a.schema),Object.assign(S,((V=h.value)==null?void 0:V.model)||{}),C.value=((B=h.value)==null?void 0:B.schema)||{},se()}),(V,B)=>{var le;const q=t.resolveComponent("KSkeleton");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",kh,[ae.value?(t.openBlock(),t.createBlock(q,{key:0,type:"form"})):S.id&&e.editing||!e.editing?(t.openBlock(),t.createElementBlock("div",Ch,[U.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(Wa[U.value]),{key:0,"form-model":S,"form-options":ie.value,"form-schema":C.value,"is-editing":e.editing,model:e.record,"on-form-change":R,"on-model-updated":Z,"on-validity-change":re,schema:e.rawSchema,onGlobalAction:B[0]||(B[0]=(ee,de)=>V.$emit("globalAction",ee,de))},t.createSlots({_:2},[e.enableVaultSecretPicker?{name:t.unref(ke.AUTOFILL_SLOT_NAME),fn:t.withCtx(ee=>[ee.schema.referenceable?(t.openBlock(),t.createBlock(t.unref(fn.VaultSecretPickerProvider),t.mergeProps({key:0},ee,{onOpen:w}),null,16)):t.createCommentVNode("",!0)]),key:"0"}:void 0]),1064,["form-model","form-options","form-schema","is-editing","model","schema"])):$.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(ke.sharedForms)[$.value]),{key:1,"enable-redis-partial":e.enableRedisPartial,"form-model":S,"form-options":ie.value,"form-schema":C.value,"is-editing":e.editing,"on-model-updated":Z,"on-partial-toggled":F,"show-new-partial-modal":ee=>V.$emit("showNewPartialModal",ee)},t.createSlots({_:2},[e.enableVaultSecretPicker?{name:t.unref(ke.AUTOFILL_SLOT_NAME),fn:t.withCtx(ee=>[ee.schema.referenceable?(t.openBlock(),t.createBlock(t.unref(fn.VaultSecretPickerProvider),t.mergeProps({key:0},ee,{onOpen:w}),null,16)):t.createCommentVNode("",!0)]),key:"0"}:void 0]),1064,["enable-redis-partial","form-model","form-options","form-schema","is-editing","show-new-partial-modal"])):(t.openBlock(),t.createBlock(t.unref(ke.VueFormGenerator),{key:2,"enable-redis-partial":e.enableRedisPartial,"is-editing":e.editing,model:S,options:ie.value,schema:C.value,onModelUpdated:Z,onPartialToggled:F,onRefreshModel:v,onShowNewPartialModal:B[1]||(B[1]=ee=>V.$emit("showNewPartialModal",ee))},t.createSlots({"plugin-config-empty-state":t.withCtx(()=>[t.createElementVNode("div",Ah,t.toDisplayString(t.unref(_)("plugins.form.grouping.plugin_configuration.empty")),1)]),_:2},[(le=t.unref(Xe)[S.name])!=null&&le.fieldRules&&(a.config.isNewOtelSchema||S.name!=="opentelemetry")?{name:"plugin-config-before-content",fn:t.withCtx(()=>[t.createVNode(Ul,{rules:t.unref(Xe)[S.name].fieldRules},null,8,["rules"])]),key:"0"}:void 0,e.enableVaultSecretPicker?{name:t.unref(ke.AUTOFILL_SLOT_NAME),fn:t.withCtx(ee=>[ee.schema.referenceable?(t.openBlock(),t.createBlock(t.unref(fn.VaultSecretPickerProvider),t.mergeProps({key:0},ee,{onOpen:w}),null,16)):t.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["enable-redis-partial","is-editing","model","options","schema"]))])):t.createCommentVNode("",!0)]),t.createVNode(t.unref(fn.VaultSecretPicker),{config:a.config,setup:J.value,onCancel:B[2]||(B[2]=()=>J.value=!1),onProceed:N},null,8,["config","setup"])],64)}}}),[["__scopeId","data-v-780e65cb"]]),wh={key:1},Ph=t.defineComponent({__name:"PluginFormActionsWrapper",props:{teleportTarget:{type:String,default:""}},setup(e){return(n,r)=>e.teleportTarget?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:e.teleportTarget},[t.renderSlot(n.$slots,"default")],8,["to"])):(t.openBlock(),t.createElementBlock("div",wh,[t.renderSlot(n.$slots,"default")]))}}),Sh=Symbol("redis-partial-info"),Th={class:"kong-ui-entities-plugin-form-container"},Nh={key:0},Oh={class:"plugin-form-actions"},xh=ue(t.defineComponent({__name:"PluginForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},pluginType:{type:String,required:!0},pluginId:{type:String,default:""},hideScopeSelection:{type:Boolean,default:!1},disableScopeSelection:{type:Boolean,default:!1},credential:{type:Boolean,default:!1},developer:{type:Boolean,default:!1},isWizardStep:{type:Boolean,default:!1},actionsTeleportTarget:{type:String,default:""},noCardWrapper:{type:Boolean,default:!1},hideViewConfigAction:{type:Boolean,default:!1},enableVaultSecretPicker:{type:Boolean,default:!1},schema:{type:Object,default:null},enableRedisPartial:{type:Boolean,default:!1}},emits:["cancel","error:fetch-schema","error","loading","update","model-updated","showNewPartialModal","globalAction"],setup(e,{emit:n}){var z;const r=n,i=e,o=Kt.useRouter(),{i18n:{t:a}}=Pe.useI18n(),{customSchemas:l,typedefs:s}=Pe.useSchemas({app:i.config.app,credential:i.credential,experimentalRenders:i.config.app==="konnect"?i.config.experimentalRenders:void 0}),{formatPluginFieldLabel:u}=Pe.usePluginHelpers(),{getMessageFromError:f}=D.useErrors(),{capitalize:p}=D.useStringHelpers(),{objectsAreEqual:c}=D.useHelpers(),{axiosInstance:d}=D.useAxios((z=i.config)==null?void 0:z.axiosRequestConfig),m=t.ref(!1),k=t.computed(()=>!!i.pluginId),_=t.computed(()=>i.pluginId?D.EntityBaseFormType.Edit:D.EntityBaseFormType.Create),g=t.ref(void 0),A=t.ref(void 0),P=t.computed(()=>!!(i.credential&&i.config.entityId)),O=t.ref(void 0),$=t.ref({}),U=t.ref(),h=t.ref();t.provide(Sh,{redisType:U,redisPath:h,isEditing:k.value});const C=t.ref(!1),y=t.reactive({enabled:!0,protocols:[],tags:[]}),S=t.reactive({fields:{enabled:!0,protocols:[],tags:[]},isReadonly:!1,clientErrorMessage:"",serverErrorMessage:""}),ie=t.ref([{title:a("view_configuration.json"),hash:"#json"},{title:a("view_configuration.yaml"),hash:"#yaml"}]);i.config.app==="konnect"&&ie.value.splice(1,0,{title:a("view_configuration.terraform"),hash:"#terraform"});const J=t.ref(""),X=t.computed(()=>{if(P.value){let T=Se.form[i.config.app].credential[_.value];return T=T.replace(/{resourceEndpoint}/gi,F.value),T}return i.config.entityType&&i.config.entityId?Se.form[i.config.app].edit.forEntity.replace(/{entityType}/gi,i.config.entityType).replace(/{entityId}/gi,i.config.entityId):Se.form[i.config.app].edit.all}),w=()=>{m.value=!m.value},N=t.computed(()=>{var oe,H,te,ye,he,K,L,Ue;const T=i.config.entityType==="consumers"&&i.config.entityId||((H=(oe=O.value)==null?void 0:oe.consumer)==null?void 0:H.id),I=i.config.entityType==="consumer_groups"&&i.config.entityId||((ye=(te=O.value)==null?void 0:te.consumer_group)==null?void 0:ye.id),E=i.config.entityType==="services"&&i.config.entityId||((K=(he=O.value)==null?void 0:he.service)==null?void 0:K.id),W=i.config.entityType==="routes"&&i.config.entityId||((Ue=(L=O.value)==null?void 0:L.route)==null?void 0:Ue.id);if(!(T||I||E||W))return{global:{entity:b.PluginScope.GLOBAL,entityEndpoint:"plugins"}};const G={};return E&&(G.service={entity:b.PluginScope.SERVICE,entityEndpoint:"services",id:E,idField:ct.SERVICE}),W&&(G.route={entity:b.PluginScope.ROUTE,entityEndpoint:"routes",id:W,idField:ct.ROUTE}),T&&(G.consumer={entity:b.PluginScope.CONSUMER,entityEndpoint:"consumers",id:T,idField:ct.CONSUMER}),I&&(G.consumer_group={entity:b.PluginScope.CONSUMER_GROUP,entityEndpoint:"consumer_groups",id:I,idField:ct.CONSUMER_GROUP}),i.config.entityType&&(G.focusedEntity={entity:b.PluginScope[i.config.entityType.substring(0,i.config.entityType.length-1).toUpperCase()],entityEndpoint:i.config.entityType,id:i.config.entityId,idField:ct[i.config.entityType.substring(0,i.config.entityType.length-1).toUpperCase()]}),G}),v=t.reactive({name:{default:i.pluginType,type:"input",inputType:"hidden",styleClasses:"d-none hidden-field",pinned:!0},enabled:{type:"switch",model:"enabled",label:a("plugins.form.fields.enabled.label"),textOn:a("plugins.form.fields.enabled.on_text"),textOff:a("plugins.form.fields.enabled.off_text"),styleClasses:"field-switch hide-label",default:!0,pinned:!0},selectionGroup:{type:i.hideScopeSelection&&(i.hideScopeSelection||_.value===D.EntityBaseFormType.Create&&i.config.entityId)?"foreign":"selectionGroup",disabled:i.disableScopeSelection,inputType:"hidden",styleClasses:"hide-label",fields:[{label:a("plugins.form.scoping.global.label"),description:a("plugins.form.scoping.global.help")}],pinned:!0},protocols:{id:"protocols",default:[],help:a("plugins.form.fields.protocols.help"),label:a("plugins.form.fields.protocols.label"),required:!0,styleClasses:"plugin-protocols-select",type:"multiselect",values:[{label:"grpc",value:"grpc"},{label:"grpcs",value:"grpcs"},{label:"http",value:"http"},{label:"https",value:"https"},{label:"tcp",value:"tcp"},{label:"tls",value:"tls"},{label:"tls_passthrough",value:"tls_passthrough"},{label:"udp",value:"udp"},{label:"ws",value:"ws"},{label:"wss",value:"wss"}]},instance_name:{default:"",type:"input",label:a("plugins.form.fields.instance_name.label"),inputType:"text",help:a("plugins.form.fields.instance_name.help")},tags:s.tags}),F=t.computed(()=>{var E;const T=i.developer?"developers":"consumers",I=((E=Tt[i.pluginType])==null?void 0:E.endpoint)||"/plugins";return`${T}/${i.config.entityId}${i.developer?"/credentials":""}${I}`}),Z=T=>{const I=Array.from(new Set(T.map(E=>typeof E)));return I.length>1?"string":I[0]},re=(T,I,E,W)=>{var te,ye;let G=I&&I.fields||[];const oe=l[i.pluginType],H=(ye=(te=Tt[i.pluginType])==null?void 0:te.schema)==null?void 0:ye.fields;return Array.isArray(G)&&(G=G.reduce((he,K)=>{const L=Object.keys(K)[0];return L.match(/-/g)?he[L.replace(/-/g,"_")]={...K[L],fieldNameHasDashes:!0}:he[L]=K[L],he},{})),Object.keys(G).sort().forEach(he=>{var on,an,ln,sn,cn,un,dn;const K=G[he];K.type==="set"&&(K.type="array");const L=T?`${T}-${he}`:`${he}`;if((on=oe==null?void 0:oe.fieldsToDelete)!=null&&on.includes(L)){mo(E,L);return}if(Object.prototype.hasOwnProperty.call(K,"overwrite")||K.hidden)return;if(K.type==="table")return re(L,K.schema,E);if(K.fields)return W&&K.type==="record"?(E[L]={type:"object",model:he,schema:{fields:Object.values(re(L,K,{},!0))}},E):re(L,K,E);if(E[L]={id:L,model:he},E[L].type=K.type==="boolean"?"checkbox":"input",E[L].required=K.required,E[L].referenceable=K.referenceable,L.startsWith("config-"))if(!W&&K.type==="array"&&(J.value=L),W&&J.value&&L.startsWith(J.value)){const ce=L.slice(J.value.length+1);E[L].label=ce.split("-").map(u).join(".")}else E[L].label=u(L);if((T==="config"||T.startsWith("config-"))&&(an=G[he])!=null&&an.description&&(E[L].help=pn.marked.parse(G[he].description,{mangle:!1,headerIds:!1})),K.type==="map"){if(E[L].type="object-advanced",E[L].values=K.values,K.values.type==="array"){const{type:ce}=K.values.elements||{};E[L].schema={fields:[{schema:{fields:[{...Ee,model:L,valueArrayType:ce==="integer"?"number":ce||"string",inputAttributes:{...Ee.inputAttributes,type:ce==="integer"?"number":"text",inputMode:ce==="integer"?"numeric":"text"}}]}}]}}else K.values.fields&&(E[L].schema={fields:[{type:"object",model:"object",schema:{fields:K.values.fields.map(ce=>{const Ie=Object.keys(ce)[0];return{model:Ie,type:"input",label:p(Ie),placeholder:Ie,inputType:ce[Ie].type}})}}]});return E}if(K.enum&&K.type==="array"&&(E[L].type="checklist",E[L].values=K.enum,E[L].multi=!0,E[L].multiSelect=!0),K.one_of&&K.type!=="array"&&(E[L].type="select",E[L].values=K.one_of,E[L].selectOptions={noneSelectedText:a("plugins.form.no_selection")}),K.elements&&K.type==="array"){const ce=K.elements;if(E[L].referenceable=ce.referenceable,E[L].elements=ce,["string","integer","number"].includes(ce.type)&&!ce.one_of){const{id:Ie,help:Ne,label:me,hint:Be,values:Me,referenceable:wt,model:Pt}=E[L],{inputAttributes:$n,...wb}=JSON.parse(JSON.stringify(Ee));$n.type=ce.type==="string"?"text":"number",E[L]={id:Ie,help:Ne,label:me,hint:Be,values:Me,referenceable:wt,model:Pt,inputAttributes:$n,...wb}}}if(K.hint&&(E[L].hint=K.hint),oe&&!oe.overwriteDefault&&Object.keys(oe).forEach(ce=>{if(ce===L){const{help:Ie,label:Ne,hint:me,values:Be,referenceable:Me,elements:wt}=E[L],{help:Pt,...$n}=oe[ce];E[L]={help:Ie,label:Ne,hint:me,values:Be,referenceable:Me,elements:wt,...$n},typeof Pt=="string"&&(E[L].help=pn.marked.parse(Pt,{mangle:!1,headerIds:!1}))}}),K.type==="array"&&((ln=K.elements)==null?void 0:ln.type)==="record"&&Array.isArray(K.elements.fields)){let ce={};for(const Ne of K.elements.fields)ce={...ce,...Ne};const Ie=(un=(cn=(sn=E[L])==null?void 0:sn.items)==null?void 0:cn.schema)==null?void 0:un.fields;if(Array.isArray(Ie))for(const Ne of E[L].items.schema.fields){const me=(dn=ce[Ne.model])==null?void 0:dn.description;Ne.help===void 0&&typeof me=="string"&&(Ne.help=pn.marked.parse(me,{mangle:!1,headerIds:!1}))}if(Ie||(E[L].type="array",E[L].newElementButtonLabelClasses="kong-form-new-element-button-label",E[L].fieldClasses="array-card-container-wrapper",E[L].itemContainerComponent="FieldArrayCardContainer",E[L].items={type:"object",schema:{fields:Object.values(re(L,K.elements,{},!0))}},E[L].items.schema.fields.forEach(Ne=>{var me,Be;for(const Me of K.elements.fields){const wt=Object.keys(Me)[0],Pt=((Be=(me=Ne.id)==null?void 0:me.split)==null?void 0:Be.call(me,"-"))??[];if(Pt[Pt.length-1]===wt){Ne.model=wt,Ne.label=u(wt);break}}}),K.elements.type==="record"&&(E[L].nestedFields=!0)),!E[L].nestedFields)E[L].items.default=()=>K.elements.fields.reduce((Ne,me)=>{const Be=Object.keys(me)[0];return Ne[Be]=me[Be].default,Ne},{});else{const Ne=(me,Be)=>{if(me.type==="object"){me.model&&(Be[me.model]={});for(const Me of me.schema.fields)Ne(Me,me.model?Be[me.model]:Be)}else me.model&&(Be[me.model]=me.default)};E[L].items.default=()=>{const me={};return Ne(E[L].items,me),me}}}if(P.value&&H){for(let ce=0;ce<H.length;ce++)if(H[ce][L]){E[L]={...E[L],...H[ce][L]};break}}if(K.required&&K.type!=="boolean"&&(E[L].required=!0,E[L].selectOptions={hideNoneSelectedText:!0}),K.required&&K.type==="boolean"&&(E[L].default=K.default??!1),K.default!=null&&typeof K.default!="object"&&K.default!=="function"&&(E[L].default=K.default),E[L].type==="input"){["string","number"].includes(typeof E[L].default)&&i.config.app==="konnect"&&(E[L].placeholder=`Default: ${E[L].default===""?"<empty string>":E[L].default}`);const{type:ce}=K.elements||{};ce&&(E[L].valueArrayType=ce==="integer"?"number":ce),E[L].inputType=K.type==="array"||K.type==="string"?K.encrypted?"password":"text":K.type}let Ue="string";K.enum?Ue=Z(K.enum):K.type==="boolean"?Ue="boolean":K.type==="number"||K.type==="integer"?(Ue="number",E[L].inputType="number"):K.type==="array"?(Ue="array",E[L].default=K.default,K.len_min>0&&(E[L].submitWhenNull=!0)):K.type==="foreign"?Ue="object":K.default&&Array.isArray(K.default)?(Ue="array",E[L].valueArrayType=Z(K.default)):K.default&&(Ue=typeof K.default),E[L].valueType=Ue,K.fieldNameHasDashes&&(E[L].fieldNameHasDashes=!0)}),E},M=()=>{var he,K,L,Ue,on,an,ln,sn,cn,un,dn,ce;const T=((he=Xe[i.pluginType])==null?void 0:he.scope.includes(b.PluginScope.SERVICE))??!0,I=((K=Xe[i.pluginType])==null?void 0:K.scope.includes(b.PluginScope.ROUTE))??!0,E=((L=Xe[i.pluginType])==null?void 0:L.scope.includes(b.PluginScope.CONSUMER))??!0,W=i.config.disableConsumerGroupScope?!1:((Ue=Xe[i.pluginType])==null?void 0:Ue.scope.includes(b.PluginScope.CONSUMER_GROUP))??!0,G=i.config.entityType==="consumers"&&!!i.config.entityId||!!((an=(on=O.value)==null?void 0:on.consumer)!=null&&an.id),oe=i.config.entityType==="consumer_groups"&&!!i.config.entityId||!!((sn=(ln=O.value)==null?void 0:ln.consumer_group)!=null&&sn.id),H=i.config.entityType==="services"&&!!i.config.entityId||!!((un=(cn=O.value)==null?void 0:cn.service)!=null&&un.id),te=i.config.entityType==="routes"&&!!i.config.entityId||!!((ce=(dn=O.value)==null?void 0:dn.route)!=null&&ce.id),ye=[];if(T&&ye.push({id:"service-id",model:"service-id",label:a("plugins.form.scoping.gateway_service.label"),placeholder:a("plugins.form.scoping.gateway_service.placeholder"),type:"AutoSuggest",entity:"services",inputValues:{fields:["name","id"]},help:a("plugins.form.scoping.gateway_service.help"),disabled:H&&i.disableScopeSelection}),I&&ye.push({id:"route-id",model:"route-id",label:a("plugins.form.scoping.route.label"),placeholder:a("plugins.form.scoping.route.placeholder"),type:"AutoSuggest",entity:"routes",inputValues:{fields:["name","id"],primaryField:"id"},help:a("plugins.form.scoping.route.help"),disabled:te&&i.disableScopeSelection}),E&&ye.push({model:"consumer-id",label:a("plugins.form.scoping.consumer.label"),placeholder:a("plugins.form.scoping.consumer.placeholder"),type:"AutoSuggest",entity:"consumers",inputValues:{fields:["username","custom_id","id"],primaryField:"username"},help:a("plugins.form.scoping.consumer.help"),disabled:G&&i.disableScopeSelection}),W&&ye.push({model:"consumer_group-id",label:a("plugins.form.scoping.consumer_group.label"),placeholder:a("plugins.form.scoping.consumer_group.placeholder"),type:"AutoSuggest",entity:"consumer_groups",entityDataKey:"consumer_group",inputValues:{fields:["name","id"],primaryField:"name"},help:a("plugins.form.scoping.consumer_group.help"),disabled:oe&&i.disableScopeSelection}),ye.length){const Ie=[...T?["service"]:[],...I?["route"]:[],...E?["consumer"]:[],...W?["consumer_group"]:[]],me=Ie.splice(Ie.length-2,2).map(Me=>a(Me==="service"?"plugins.form.scoping.gateway_service.plural":`plugins.form.scoping.${Me}.plural`)).join(`${Ie.length>0?",":""} and/or `),Be=["Specific",[...Ie.length>0?[Ie.map(Me=>a(Me==="service"?"plugins.form.scoping.gateway_service.plural":`plugins.form.scoping.${Me}.plural`)).join(", ")]:[],me].join(", ")].join(" ");v.selectionGroup.fields.push({label:a("plugins.form.scoping.label"),description:Be,fields:[]}),v.selectionGroup.fields[1].fields=ye}l[i.pluginType]&&l[i.pluginType].overwriteDefault&&Object.hasOwnProperty.call(l[i.pluginType],"formSchema")&&Object.assign(v,l[i.pluginType].formSchema)},x=t.computed(()=>!c(S.fields,y,!0)),R=t.computed(()=>!Ke.value&&!C.value&&(_.value===D.EntityBaseFormType.Create||x.value)),ae=t.ref(!1),se=t.ref(),_e=T=>{i.credential&&T.password&&(T.password=""),S.fields.id=(T==null?void 0:T.id)||void 0,se.value=T==null?void 0:T.ordering,Object.assign(y,S.fields),O.value=T,ae.value=!0},pe=t.ref({}),V=T=>{var I;S.fields=T.model,S.fields.id=((I=O.value)==null?void 0:I.id)||void 0,Object.assign(y,T.originalModel),pe.value=T.data,i.isWizardStep&&r("model-updated",{model:S.fields,data:T.data,resourceEndpoint:F.value})},B=t.ref(new Map),q=t.computed(()=>[S.clientErrorMessage,S.serverErrorMessage].filter(Boolean).join("; ")),le=T=>{T.valid?B.value.delete(T.model):B.value.set(T.model,T.error),S.clientErrorMessage=[...B.value.entries()].map(([I,E])=>`${I}: ${typeof E=="string"?E:f(E)}`).join("; "),S.clientErrorMessage&&(S.serverErrorMessage="")};t.watch([N,ae],(T,I)=>{const E=T[0]!==I[0],W=T[1],G=I[1];if(!P.value&&_.value===D.EntityBaseFormType.Edit&&(E||W&&W!==G)){const oe=re("config",$.value,v);Ve.value&&(oe._isCustomPlugin=!0),U.value&&(oe._supported_redis_partial_type=U.value),A.value=oe}},{deep:!0});const ee=()=>{i.config.cancelRoute?o.push(i.config.cancelRoute):r("cancel")},de=t.computed(()=>{let T=`${i.config.apiBaseUrl}${Se.form[i.config.app].validate}`;return i.config.app==="konnect"?T=T.replace(/{controlPlaneId}/gi,i.config.controlPlaneId||""):i.config.app==="kongManager"&&(T=T.replace(/\/{workspace}/gi,i.config.workspace?`/${i.config.workspace}`:"")),T=T.replace(/{id}/gi,i.pluginId),T}),Fe=t.computed(()=>{const T=i.config.entityType&&i.config.entityId&&!i.developer,I=P.value?Se.form[i.config.app].credential[_.value]:Se.form[i.config.app][_.value][T?"forEntity":"all"];let E=`${i.config.apiBaseUrl}${I}`;return i.config.app==="konnect"?E=E.replace(/{controlPlaneId}/gi,i.config.controlPlaneId||""):i.config.app==="kongManager"&&(E=E.replace(/\/{workspace}/gi,i.config.workspace?`/${i.config.workspace}`:"")),E=E.replace(/{resourceEndpoint}/gi,F.value),E=E.replace(/{id}/gi,i.pluginId),E=E.replace(/{entityType}/gi,i.config.entityType||""),E=E.replace(/{entityId}/gi,i.config.entityId||""),E}),Ve=t.computed(()=>!Object.keys(Xe).includes(i.pluginType)),ge=t.computed(()=>{const T=pe.value;if(P.value){for(const I in b.PluginScope){const E=b.PluginScope[I];T[E]&&!T[E].id&&(T[E]={id:i.config.entityId})}delete T.created_at}return pe.value.partials&&h.value&&mo(T,h.value),T}),fe=async()=>{if(!S.clientErrorMessage&&!i.isWizardStep)try{S.isReadonly=!0;let T;const I=JSON.parse(JSON.stringify(ge.value)),E=l[i.pluginType];typeof(E==null?void 0:E.shamefullyTransformPayload)=="function"&&E.shamefullyTransformPayload({originalModel:y,model:S.fields,payload:I,schema:A.value}),!P.value&&!Ve.value&&await d.post(de.value,I),_.value==="create"?T=await d.post(Fe.value,I):_.value==="edit"&&(T=i.config.app==="konnect"||U.value&&I.partials?await d.put(Fe.value,Object.assign({ordering:se.value},I)):await d.patch(Fe.value,I)),Object.assign(y,S.fields),r("update",T==null?void 0:T.data)}catch(T){S.serverErrorMessage=f(T),r("error",T)}finally{S.isReadonly=!1}},Q=t.computed(()=>{var W;const T=P.value?(W=Tt[i.pluginType])==null?void 0:W.schemaEndpoint:i.pluginType,I=P.value?Se.form[i.config.app].credentialSchema:Se.form[i.config.app].pluginSchema;let E=`${i.config.apiBaseUrl}${I}`;return i.config.app==="konnect"?E=E.replace(/{controlPlaneId}/gi,i.config.controlPlaneId||""):i.config.app==="kongManager"&&(E=E.replace(/\/{workspace}/gi,i.config.workspace?`/${i.config.workspace}`:"")),E=E.replace(/{plugin}/gi,T),E}),nt=t.ref(""),Ke=t.ref(!1),j=t.ref("");return t.onBeforeMount(async()=>{var T,I,E,W;Ke.value=!0;try{if(P.value&&i.config.app==="konnect"){const G=(T=Tt[i.pluginType])==null?void 0:T.schemaEndpoint,oe=ul[G];nt.value=G,A.value=re("",oe,{}),Ke.value=!1}else{const G=i.schema??(await d.get(Q.value)).data;if(g.value=G,G)if(P.value)A.value=re("",G,{}),Ke.value=!1;else{const oe=G.fields.find(te=>te.config);$.value=oe?oe.config:G,G.supported_partials&&(U.value=Object.keys(G.supported_partials).find(te=>[gn.REDIS_CE,gn.REDIS_EE].includes(te)),h.value=(I=G.supported_partials[U.value])==null?void 0:I[0]),M();const H=(E=G.fields.find(te=>te.protocols))==null?void 0:E.protocols;if(H){const{default:te=[],elements:ye={}}=H;v.protocols.default=te,v.protocols.placeholder=i.config.app==="konnect"?a("plugins.form.fields.protocols.placeholderWithDefaultValues",{protocols:te.join(", ")}):a("plugins.form.fields.protocols.placeholder"),(W=ye.one_of)!=null&&W.length&&(v.protocols.values=ye.one_of.map(he=>({label:he,value:he})))}if(ae.value||_.value===D.EntityBaseFormType.Create){const te=re("config",$.value,v);U.value&&(te._supported_redis_partial_type=U.value),Ve.value&&(te._isCustomPlugin=!0),A.value=te}}}}catch(G){console.error(G),j.value=f(G),r("error:fetch-schema",G)}finally{Ke.value=!1}}),(T,I)=>{const E=t.resolveComponent("KSkeleton"),W=t.resolveComponent("KEmptyState"),G=t.resolveComponent("KButton"),oe=t.resolveComponent("KTabs"),H=t.resolveComponent("KSlideout");return t.openBlock(),t.createElementBlock("div",Th,[Ke.value?(t.openBlock(),t.createBlock(E,{key:0,type:"form"})):j.value?(t.openBlock(),t.createBlock(W,{key:1,"action-button-visible":!1,"data-testid":"plugin-form-schema-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(t.unref(a)("errors.load_schema")),1)]),_:1})):(t.openBlock(),t.createBlock(t.unref(D.EntityBaseForm),{key:2,"can-submit":R.value,config:e.config,"edit-id":e.pluginId,"entity-type":t.unref(D.SupportedEntityType).Plugin,"error-message":q.value,"fetch-url":X.value,"form-fields":ge.value,"is-readonly":S.isReadonly,"no-validate":"","wrapper-component":e.noCardWrapper?"div":void 0,onCancel:ee,"onFetch:error":I[4]||(I[4]=te=>T.$emit("error",te)),"onFetch:success":_e,onLoading:I[5]||(I[5]=te=>T.$emit("loading",te))},{"form-actions":t.withCtx(()=>[e.isWizardStep?(t.openBlock(),t.createElementBlock("div",Nh)):(t.openBlock(),t.createBlock(Ph,{key:1,"teleport-target":e.actionsTeleportTarget},{default:t.withCtx(()=>[t.createElementVNode("div",Oh,[e.hideViewConfigAction?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(G,{key:0,appearance:"tertiary","data-testid":`plugin-${k.value?"edit":"create"}-form-view-configuration`,onClick:I[3]||(I[3]=te=>w())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.view_configuration")),1)]),_:1},8,["data-testid"])),t.createVNode(G,{appearance:"secondary",class:"form-action-button","data-testid":`plugin-${k.value?"edit":"create"}-form-cancel`,disabled:S.isReadonly,onClick:ee},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),t.createVNode(G,{appearance:"primary","data-testid":`plugin-${k.value?"edit":"create"}-form-submit`,disabled:!R.value||S.isReadonly,type:"submit",onClick:fe},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.save")),1)]),_:1},8,["data-testid","disabled"])])]),_:1},8,["teleport-target"]))]),default:t.withCtx(()=>[t.createElementVNode("form",{hidden:"",onSubmit:fe},null,32),t.createVNode(Eh,{config:e.config,credential:P.value,editing:_.value===t.unref(D.EntityBaseFormType).Edit,"enable-redis-partial":e.enableRedisPartial,"enable-vault-secret-picker":i.enableVaultSecretPicker,"entity-map":N.value,"raw-schema":g.value,record:O.value,schema:A.value,onGlobalAction:I[0]||(I[0]=(te,ye)=>T.$emit("globalAction",te,ye)),onLoading:I[1]||(I[1]=te=>C.value=te),onModelUpdated:V,onShowNewPartialModal:I[2]||(I[2]=te=>T.$emit("showNewPartialModal",te)),onValidityChange:le},null,8,["config","credential","editing","enable-redis-partial","enable-vault-secret-picker","entity-map","raw-schema","record","schema"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","wrapper-component"])),t.createVNode(H,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":60,title:t.unref(a)("view_configuration.title"),visible:m.value,onClose:w},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(t.unref(a)("view_configuration.message")),1),t.createVNode(oe,{"data-testid":"form-view-configuration-slideout-tabs",tabs:ie.value},{json:t.withCtx(()=>[t.createVNode(t.unref(D.JsonCodeBlock),{config:e.config,"entity-record":ge.value,"fetcher-url":Fe.value,"request-method":i.pluginId?"put":"post"},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:t.withCtx(()=>[t.createVNode(t.unref(D.YamlCodeBlock),{"entity-record":ge.value},null,8,["entity-record"])]),terraform:t.withCtx(()=>[t.createVNode(t.unref(D.TerraformCodeBlock),{"credential-type":nt.value,"entity-record":ge.value,"entity-type":t.unref(D.SupportedEntityType).Plugin},null,8,["credential-type","entity-record","entity-type"])]),_:1},8,["tabs"])]),_:1},8,["title","visible"])])}}}),[["__scopeId","data-v-420ab237"]]),vh={class:"kong-ui-entities-plugins-list"},Ih={class:"button-row"},Rh={class:"empty-state-icon-gateway"},Lh={class:"name-cell-wrapper"},Bh={class:"info-wrapper"},Dh={key:0,class:"info-name"},$h={key:1,class:"info-name"},Fh={key:2,class:"info-type"},Vh={key:1},Kh=ue(t.defineComponent({__name:"PluginList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||!e.getConfigureDynamicOrderingRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.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},canToggle:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},canRetrieveScopedEntity:{type:Function,required:!1,default:async()=>!0},canConfigureDynamicOrdering:{type:Function,required:!1,default:async()=>!0},title:{type:String,default:""},titleTag:{type:String,default:"h2"},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","toggle-enabled"],setup(e,{emit:n}){var nt,Ke;const r=Pe.usePluginMetaData(),i=n,o=e,{i18n:{t:a}}=Pe.useI18n(),l=Kt.useRouter(),{axiosInstance:s}=D.useAxios((nt=o.config)==null?void 0:nt.axiosRequestConfig),{hasRecords:u,handleStateChange:f}=D.useTableState(()=>$.value),p=t.computed(()=>u.value&&o.config.app==="konnect"),c=t.computed(()=>!o.enableV2EmptyStates&&o.config.app==="konnect"),d=t.computed(()=>!!o.config.entityId),m=t.computed(()=>{var j;return((j=o.config)==null?void 0:j.entityType)==="consumers"}),k=t.computed(()=>{var j;return((j=o.config)==null?void 0:j.entityType)==="consumer_groups"}),_=o.config.app==="konnect"||D.useGatewayFeatureSupported({gatewayInfo:o.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),g=t.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),A={name:{label:a("plugins.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1}};(Ke=o.config)!=null&&Ke.entityId||(A.appliedTo={label:a("plugins.list.table_headers.applied_to"),sortable:!1}),A.enabled={label:a("plugins.list.table_headers.enabled"),searchable:!0,sortable:!0},_&&(A.ordering={label:a("plugins.list.table_headers.ordering"),sortable:!0}),A.tags={label:a("plugins.list.table_headers.tags"),sortable:!1};const P=A,O=t.computed(()=>{var z,T,I,E;let j=o.config.entityType?`${o.config.apiBaseUrl}${Se.list[o.config.app].forEntity}`:`${o.config.apiBaseUrl}${Se.list[o.config.app].all}`;return o.config.app==="konnect"?j=j.replace(/{controlPlaneId}/gi,((z=o.config)==null?void 0:z.controlPlaneId)||""):o.config.app==="kongManager"&&(j=j.replace(/\/{workspace}/gi,(T=o.config)!=null&&T.workspace?`/${o.config.workspace}`:"")),j.replace(/{entityType}/gi,((I=o.config)==null?void 0:I.entityType)||"").replace(/{entityId}/gi,((E=o.config)==null?void 0:E.entityId)||"")}),$=t.ref(""),U=t.computed(()=>o.config.app==="konnect"||o.config.isExactMatch?{isExactMatch:!0,fields:{name:A.name,id:{label:a("plugins.list.table_headers.id"),sortable:!0}},placeholder:a(`search.placeholder.${o.config.isExactMatch?"exact":o.config.app}`)}:{isExactMatch:!1,fields:{enabled:{...A.enabled,label:a("search.filter.field.enabled")},name:A.name,instance_name:{label:a("plugins.list.table_headers.instance_name"),searchable:!0}},schema:o.config.filterSchema}),{fetcher:h,fetcherState:C,fetcherCacheKey:y}=D.useFetcher(t.computed(()=>({...o.config,cacheIdentifier:o.cacheIdentifier})),O),S=()=>{$.value=""},ie=()=>{y.value++},J=t.ref(null),X=j=>{var T,I,E,W;const z=[];return((T=j.route)!=null&&T.id||j.route_id)&&z.push({type:"route",badgeText:a("plugins.list.table_headers.applied_to_badges.route")}),((I=j.service)!=null&&I.id||j.service_id)&&z.push({type:"service",badgeText:a("plugins.list.table_headers.applied_to_badges.service")}),((E=j.consumer)!=null&&E.id||j.consumer_id)&&z.push({type:"consumer",badgeText:a("plugins.list.table_headers.applied_to_badges.consumer")}),((W=j.consumer_group)!=null&&W.id||j.consumer_group_id)&&z.push({type:"consumer_group",badgeText:a("plugins.list.table_headers.applied_to_badges.consumer_group")}),z.length?z:[{type:null,badgeText:a("plugins.list.table_headers.applied_to_badges.global")}]},w=async(j,z)=>{var T;return j===null?!1:await((T=o.canRetrieveScopedEntity)==null?void 0:T.call(o,j,z.id))},N=(j,z)=>{var I,E,W,G,oe;let T=null;switch(j){case"route":T=(I=z.route)==null?void 0:I.id;break;case"service":T=(E=z.service)==null?void 0:E.id;break;case"consumer":T=(W=z.consumer)==null?void 0:W.id;break;case"consumer_group":T=(G=z.consumer_group)==null?void 0:G.id;break}T&&((oe=o.config)!=null&&oe.getScopedEntityViewRoute)&&l.push(o.config.getScopedEntityViewRoute(j,T))},v=t.ref(!1),F=t.ref(null),Z=t.computed(()=>{const j={action:"disable",id:"",name:""};if(F.value){const{enabled:z,id:T,name:I}=F.value;j.action=z?"disable":"enable",j.id=T,j.name=r.getDisplayName(I)||T}return j}),re=j=>{v.value=!0,F.value=j},M=()=>{v.value=!1,F.value=null},x=async()=>{var I,E,W,G,oe,H,te,ye;if(!await((I=o.canEdit)==null?void 0:I.call(o,F.value))||!F.value)return;let z=`${o.config.apiBaseUrl}${(oe=Se.item[o.config.app])==null?void 0:oe[(E=o.config)!=null&&E.entityType?"forEntity":"all"].replace(/{entityType}/gi,((W=o.config)==null?void 0:W.entityType)||"").replace(/{entityId}/gi,((G=o.config)==null?void 0:G.entityId)||"")}`.replace(/{id}/gi,F.value.id||"");o.config.app==="konnect"?z=z.replace(/{controlPlaneId}/gi,((H=o.config)==null?void 0:H.controlPlaneId)||""):o.config.app==="kongManager"&&(z=z.replace(/\/{workspace}/gi,(te=o.config)!=null&&te.workspace?`/${o.config.workspace}`:""));const T=!F.value.enabled;try{const{data:he}=((ye=o.config)==null?void 0:ye.app)==="konnect"?await s.put(z,{...F.value,enabled:T},{timeout:12e4}):await s.patch(z,{...F.value,enabled:T},{timeout:12e4});i("toggle-enabled",T,he),F.value.enabled=T}catch(he){i("error",he)}},R=async(j,z)=>{const T=j.id;if(!await z(T)){i("copy:error",{entity:j,field:"id",message:a("errors.copy")});return}i("copy:success",{entity:j,field:"id",message:a("copy.success",{val:T})})},ae=async(j,z)=>{const T=JSON.stringify(j);if(!await z(T)){i("copy:error",{entity:j,message:a("errors.copy")});return}i("copy:success",{entity:j,message:a("copy.success_brief")})},se=async j=>{var T;await((T=o.canRetrieve)==null?void 0:T.call(o,j))&&l.push(o.config.getViewRoute(j))},_e=j=>({label:a("actions.view"),to:o.config.getViewRoute(j)}),pe=j=>({label:a("actions.edit"),to:o.config.getEditRoute(j)}),V=j=>({label:a("actions.configure_dynamic_ordering"),to:o.config.getConfigureDynamicOrderingRoute(j)}),B=t.ref(void 0),q=t.ref(!1),le=t.ref(!1),ee=t.ref(""),de=D.useDeleteUrlBuilder(o.config,O.value),Fe=j=>{B.value=j,q.value=!0},Ve=()=>{q.value=!1},ge=async()=>{var j,z,T;if((j=B.value)!=null&&j.id){le.value=!0;try{await s.delete(de(B.value.id)),le.value=!1,q.value=!1,y.value++,i("delete:success",B.value)}catch(I){ee.value=((T=(z=I.response)==null?void 0:z.data)==null?void 0:T.message)||I.message||a("errors.delete"),i("error",I)}finally{le.value=!1}}},fe=()=>{l.push(o.config.createRoute)};t.watch(C,j=>{var z,T,I;if(j.status===D.FetcherStatus.Error){J.value={title:a("errors.general")},(I=(T=(z=j.error)==null?void 0:z.response)==null?void 0:T.data)!=null&&I.message&&(J.value.message=j.error.response.data.message),i("error",j.error);return}J.value=null});const Q=t.ref({ctaPath:o.config.createRoute,ctaText:void 0,message:`${a("plugins.list.empty_state.description")}${o.config.additionMessageForEmptyState?` ${o.config.additionMessageForEmptyState}`:""}`,title:a("plugins.title")});return t.onBeforeMount(async()=>{await o.canCreate()&&(Q.value.title=a("plugins.list.empty_state.title"),Q.value.ctaText=a("actions.create"))}),(j,z)=>{const T=t.resolveComponent("KButton"),I=t.resolveComponent("KBadge"),E=t.resolveComponent("KTruncate"),W=t.resolveComponent("KInputSwitch"),G=t.resolveComponent("KDropdownItem"),oe=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",vh,[t.createVNode(t.unref(D.EntityBaseTable),{"cache-identifier":e.cacheIdentifier,"disable-sorting":g.value,"empty-state-options":Q.value,"enable-entity-actions":"","error-message":J.value,fetcher:t.unref(h),"fetcher-cache-key":t.unref(y),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-plugins-list",query:$.value,"table-headers":t.unref(P),title:e.title,"title-tag":e.titleTag,onClearSearchInput:S,"onClick:row":z[5]||(z[5]=H=>se(H)),onSort:ie,onState:t.unref(f)},t.createSlots({"toolbar-filter":t.withCtx(()=>[t.createVNode(t.unref(D.EntityFilter),{modelValue:$.value,"onUpdate:modelValue":z[0]||(z[0]=H=>$.value=H),config:U.value},null,8,["modelValue","config"])]),"toolbar-button":t.withCtx(()=>[(t.openBlock(),t.createBlock(t.Teleport,{disabled:!e.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[t.createElementVNode("div",Ih,[!d.value&&p.value?(t.openBlock(),t.createBlock(T,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"plugins-learn-more-button",icon:"",onClick:z[1]||(z[1]=H=>j.$emit("click:learn-more"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.BookIcon),{decorative:""})]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(D.PermissionsWrapper),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(T,{appearance:"primary","data-testid":"toolbar-add-plugin",size:e.useActionOutside?"medium":"large",to:e.config.createRoute},{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.AddIcon)),t.createTextVNode(" "+t.toDisplayString(t.unref(a)("plugins.list.toolbar_actions.new_plugin")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:t.withCtx(({row:H})=>[t.createElementVNode("div",Lh,[t.createVNode(t.unref(Ut.PluginIcon),{class:"plugin-icon",name:H.name,size:24},null,8,["name"]),t.createElementVNode("div",Bh,[H.instance_name?(t.openBlock(),t.createElementBlock("span",Dh,t.toDisplayString(H.instance_name),1)):(t.openBlock(),t.createElementBlock("span",$h,t.toDisplayString(t.unref(r).getDisplayName(H.name)),1)),H.instance_name?(t.openBlock(),t.createElementBlock("span",Fh,t.toDisplayString(t.unref(r).getDisplayName(H.name)),1)):t.createCommentVNode("",!0)])])]),appliedTo:t.withCtx(({row:H})=>[X(H).length>0?(t.openBlock(),t.createBlock(E,{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(X(H),te=>(t.openBlock(),t.createBlock(t.unref(D.PermissionsWrapper),{key:te.badgeText,"auth-function":()=>w(te.type,H),"force-show":""},{default:t.withCtx(({isAllowed:ye})=>[t.createVNode(I,{class:t.normalizeClass(ye||"disabled"),onClick:t.withModifiers(he=>ye&&te.type&&N(te.type,H),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(te.badgeText),1)]),_:2},1032,["class","onClick"])]),_:2},1032,["auth-function"]))),128))]),_:2},1024)):(t.openBlock(),t.createElementBlock("span",Vh,"-"))]),enabled:t.withCtx(({row:H})=>[t.createVNode(t.unref(D.PermissionsWrapper),{"auth-function":async()=>!!(await e.canEdit(H)&&await e.canToggle(H)),"force-show":""},{default:t.withCtx(({isAllowed:te})=>{var ye,he;return[t.createElementVNode("div",{onClick:z[4]||(z[4]=t.withModifiers(()=>{},["stop"]))},[t.createVNode(W,{disabled:!te,"disabled-tooltip-text":!te&&((he=(ye=e.config).getToggleDisabledTooltip)==null?void 0:he.call(ye,H))||void 0,"model-value":H.enabled,onClick:t.withModifiers(K=>te&&re(H),["stop","prevent"])},null,8,["disabled","disabled-tooltip-text","model-value","onClick"])])]}),_:2},1032,["auth-function"])]),ordering:t.withCtx(({rowValue:H})=>[t.createVNode(I,{appearance:t.unref(uo)(H)?"info":"warning"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(uo)(H)?t.unref(a)("plugins.list.table_headers.ordering_badge.static"):t.unref(a)("plugins.list.table_headers.ordering_badge.dynamic")),1)]),_:2},1032,["appearance"])]),tags:t.withCtx(({rowValue:H})=>[t.createVNode(t.unref(D.TableTags),{tags:H},null,8,["tags"])]),actions:t.withCtx(({row:H})=>[t.createVNode(oe,null,{default:t.withCtx(({copyToClipboard:te})=>[t.createVNode(G,{"data-testid":"action-entity-copy-id",onClick:ye=>R(H,te)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(oe,null,{default:t.withCtx(({copyToClipboard:te})=>[t.createVNode(G,{"data-testid":"action-entity-copy-json",onClick:ye=>ae(H,te)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(D.PermissionsWrapper),{"auth-function":()=>e.canRetrieve(H)},{default:t.withCtx(()=>[t.createVNode(G,{"data-testid":"action-entity-view","has-divider":"",item:_e(H)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(D.PermissionsWrapper),{"auth-function":()=>e.canEdit(H)},{default:t.withCtx(()=>[t.createVNode(G,{"data-testid":"action-entity-edit",item:pe(H)},null,8,["item"])]),_:2},1032,["auth-function"]),!m.value&&!k.value&&t.unref(_)?(t.openBlock(),t.createBlock(t.unref(D.PermissionsWrapper),{key:0,"auth-function":()=>e.canConfigureDynamicOrdering(H)},{default:t.withCtx(()=>[V(H)?(t.openBlock(),t.createBlock(G,{key:0,"data-testid":"action-entity-config-dyn-order",item:V(H)},null,8,["item"])):t.createCommentVNode("",!0)]),_:2},1032,["auth-function"])):t.createCommentVNode("",!0),t.createVNode(t.unref(D.PermissionsWrapper),{"auth-function":()=>e.canDelete(H)},{default:t.withCtx(()=>[t.createVNode(G,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:te=>Fe(H)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!t.unref(u)&&c.value?{name:"outside-actions",fn:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.Teleport,{disabled:!e.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[t.createVNode(T,{appearance:"secondary",class:"open-learning-hub","data-testid":"plugins-learn-more-button",icon:"",onClick:z[2]||(z[2]=H=>j.$emit("click:learn-more"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!$.value&&e.enableV2EmptyStates&&e.config.app==="konnect"?{name:"empty-state",fn:t.withCtx(()=>{var H;return[t.createVNode(t.unref(D.EntityEmptyState),{"action-button-text":t.unref(a)("plugins.list.empty_state_v2.create_cta"),appearance:"secondary","can-create":()=>e.canCreate(),"data-testid":e.config.entityId?"nested-plugins-entity-empty-state":"plugins-entity-empty-state",description:t.unref(a)("plugins.list.empty_state_v2.description"),"learn-more":e.config.app==="konnect",title:t.unref(a)("plugins.list.empty_state_v2.title"),"onClick:create":fe,"onClick:learnMore":z[3]||(z[3]=te=>j.$emit("click:learn-more"))},t.createSlots({image:t.withCtx(()=>[t.createElementVNode("div",Rh,[t.createVNode(t.unref(Ce.PlugIcon),{color:t.unref(km),size:t.unref(Am)},null,8,["color","size"])])]),_:2},[(H=e.config)!=null&&H.isControlPlaneGroup?{name:"message",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("plugins.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","data-testid","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","title","title-tag","onState"]),t.createVNode(t.unref(D.EntityToggleModal),{action:Z.value.action,"entity-id":Z.value.id,"entity-name":Z.value.name,"entity-type":t.unref(a)("glossary.plugin"),"on-confirm":x,visible:v.value,onCancel:M,onProceed:M},null,8,["action","entity-id","entity-name","entity-type","visible"]),t.createVNode(t.unref(D.EntityDeleteModal),{"action-pending":le.value,description:t.unref(a)("delete.description"),"entity-name":B.value&&(B.value.instance_name||B.value.name||B.value.id),"entity-type":t.unref(D.EntityTypes).Plugin,error:ee.value,title:t.unref(a)("delete.title"),visible:q.value,onCancel:Ve,onProceed:ge},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),[["__scopeId","data-v-a33ca66d"]]),Uh={class:"plugin-select-card-wrapper"},jh=["data-testid"],Mh={class:"plugin-card-header"},Gh={class:"plugin-card-title"},qh={key:0,class:"plugin-card-actions"},Hh=["data-testid","title"],zh={key:0,class:"plugin-card-text"},Wh={key:0},Yh=["title"],Kr=ue(t.defineComponent({__name:"PluginSelectCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.getCreateRoute)},canDeleteCustomPlugin:{type:Boolean,default:!1},canEditCustomPlugin:{type:Boolean,default:!1},plugin:{type:Object,required:!0},navigateOnClick:{type:Boolean,default:!0}},emits:["plugin-clicked","custom-plugin-delete"],setup(e,{emit:n}){const r=n,i=e,o=Kt.useRouter(),{i18n:{t:a}}=Pe.useI18n(),l=t.computed(()=>i.config.app==="konnect"?i.config.controlPlaneId:""),s=t.computed(()=>!!(!i.plugin.available||i.plugin.disabledMessage)),u=t.computed(()=>!!(m.value&&!d.value&&i.navigateOnClick&&l.value&&(i.canDeleteCustomPlugin||i.canEditCustomPlugin))),f=()=>{o.push(i.config.getCreateRoute(i.plugin.id))},p=()=>{i.navigateOnClick?f():c()},c=()=>{r("plugin-clicked",i.plugin)},d=t.computed(()=>i.plugin.id==="custom-plugin-create"),m=t.computed(()=>i.config.app==="konnect"&&i.plugin.group===b.PluginGroup.CUSTOM_PLUGINS),k=()=>{i.config.app==="konnect"&&r("custom-plugin-delete")},_=(A,P)=>{const O=i.config;i.config.app==="konnect"&&typeof O.getCustomEditRoute=="function"&&O.getCustomEditRoute&&o.push(O.getCustomEditRoute(A,P))},g=()=>{if(!s.value&&i.config.app==="konnect"){const A=i.config;d.value&&A.createCustomRoute?o.push(A.createCustomRoute):m.value&&f()}};return(A,P)=>{const O=t.resolveComponent("KButton"),$=t.resolveComponent("KDropdownItem"),U=t.resolveComponent("KDropdownMenu"),h=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("div",Uh,[t.createVNode(h,{text:e.plugin.disabledMessage},{default:t.withCtx(()=>[t.createElementVNode("a",{class:t.normalizeClass(["plugin-select-card",{disabled:s.value}]),"data-testid":`${e.plugin.id}-card`,role:"button",onClick:P[1]||(P[1]=C=>s.value||m.value?void 0:p())},[t.createElementVNode("div",Mh,[t.createElementVNode("div",Gh,[t.createElementVNode("span",{class:t.normalizeClass({"non-custom-title":!m.value})},t.toDisplayString(e.plugin.name),3)]),u.value?(t.openBlock(),t.createElementBlock("div",qh,[t.createVNode(U,{"data-testid":"custom-plugin-actions","kpop-attributes":{placement:"bottom-end"},width:"150"},{default:t.withCtx(()=>[t.createVNode(O,{appearance:"tertiary",class:"actions-trigger","data-testid":"overflow-actions-button",icon:"",size:"small"},{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.MoreIcon),{size:t.unref(Cm)},null,8,["size"])]),_:1})]),items:t.withCtx(()=>[e.canDeleteCustomPlugin?(t.openBlock(),t.createBlock($,{key:0,"data-testid":"edit-plugin-schema",onClick:P[0]||(P[0]=t.withModifiers(C=>_(e.plugin.name,e.plugin.customPluginType),["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.edit")),1)]),_:1})):t.createCommentVNode("",!0),e.canDeleteCustomPlugin?(t.openBlock(),t.createBlock($,{key:1,danger:"","data-testid":"delete-plugin-schema","has-divider":"",onClick:t.withModifiers(k,["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.delete")),1)]),_:1})):t.createCommentVNode("",!0)]),_:1})])):t.createCommentVNode("",!0)]),t.createElementVNode("div",{class:t.normalizeClass(["plugin-card-body",{"custom-plugin":m.value}]),"data-testid":e.plugin.name,title:e.plugin.available?e.plugin.name:t.unref(a)("plugins.select.unavailable_tooltip"),onClick:g},[t.createVNode(t.unref(Ut.PluginIcon),{alt:e.plugin.name,class:"plugin-card-icon",name:e.plugin.id,size:55},null,8,["alt","name"]),e.plugin.description||m.value&&!d.value?(t.openBlock(),t.createElementBlock("div",zh,[m.value&&!d.value?(t.openBlock(),t.createElementBlock("p",Wh,t.toDisplayString(t.unref(a)("plugins.select.custom_badge_text")),1)):t.createCommentVNode("",!0),e.plugin.description?(t.openBlock(),t.createElementBlock("p",{key:1,class:"plugin-card-text",title:e.plugin.description},t.toDisplayString(e.plugin.description),9,Yh)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],10,Hh),t.createElementVNode("div",{class:"plugin-card-footer",onClick:g},t.toDisplayString(d.value?t.unref(a)("actions.create_custom"):e.plugin.exists?t.unref(a)("actions.enabled"):t.unref(a)("actions.enable")),1)],10,jh)]),_:1},8,["text"])])}}}),[["__scopeId","data-v-65d53934"]]),Jh=ue(t.defineComponent({__name:"DeleteCustomPluginSchemaModal",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app))},plugin:{type:Object,required:!0}},emits:["closed","proceed"],setup(e,{emit:n}){var k;const r=e,i=n,{i18nT:o,i18n:{t:a}}=Pe.useI18n(),{getMessageFromError:l}=D.useErrors(),{axiosInstance:s}=D.useAxios((k=r.config)==null?void 0:k.axiosRequestConfig),u=t.computed(()=>{var _;return c.value?a("delete.plugin_schema_in_use_title"):a("delete.title",{name:((_=r.plugin)==null?void 0:_.name)||a("delete.custom_plugin")})}),f=t.ref(!1),p=t.ref(""),c=t.ref(!1),d=t.computed(()=>{if(r.config.app==="konnect"){const _=r.plugin.customPluginType==="streaming"?Se.select[r.config.app].streamingCustomPluginItem:Se.select[r.config.app].schemaCustomPluginItem;let g=`${r.config.apiBaseUrl}${_}`;return g=g.replace(/{controlPlaneId}/gi,r.config.controlPlaneId||""),g=g.replace(/{pluginId}/gi,r.plugin.id),g}return null}),m=async()=>{var _,g,A,P;if(f.value=!0,p.value="",!(!((_=r.plugin)!=null&&_.name)||((g=r.config)==null?void 0:g.app)!=="konnect"))try{d.value&&await s.delete(d.value),i("proceed")}catch(O){const{response:$}=O;($==null?void 0:$.status)===400&&((P=(A=$.data)==null?void 0:A.message)!=null&&P.includes("plugin schema is currently in use"))?c.value=!0:p.value=l(O)}finally{f.value=!1}};return(_,g)=>{const A=t.resolveComponent("KButton"),P=t.resolveComponent("KModal");return!c.value&&e.plugin?(t.openBlock(),t.createBlock(t.unref(D.EntityDeleteModal),{key:0,"action-pending":f.value,class:"delete-custom-plugin-schema-modal","data-testid":"delete-custom-plugin-schema-modal",description:t.unref(a)("delete.description_custom"),"entity-name":e.plugin.name,"entity-type":t.unref(D.EntityTypes).Plugin,error:p.value,"need-confirm":"",title:u.value,visible:"",onCancel:g[0]||(g[0]=O=>_.$emit("closed")),onProceed:m},null,8,["action-pending","description","entity-name","entity-type","error","title"])):e.plugin?(t.openBlock(),t.createBlock(P,{key:1,"action-button-disabled":f.value,class:"delete-custom-plugin-schema-modal","data-testid":"delete-custom-plugin-schema-modal",title:u.value,visible:"",onCancel:g[2]||(g[2]=O=>_.$emit("closed"))},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(o),{keypath:"delete.plugin_schema_in_use_message",tag:"p"},{name:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(e.plugin.name),1)]),_:1})])]),"footer-actions":t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(A,{appearance:"tertiary",class:"cancel-button","data-testid":"delete-custom-plugin-form-cancel",onClick:g[1]||(g[1]=O=>_.$emit("closed"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.cancel")),1)]),_:1})])]),_:1},8,["action-button-disabled","title"])):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-9e0dee7f"]]),Xh={class:"custom-plugins-grid"},Qh={class:"empty-state-title"},Zh={class:"empty-state-description"},Ur=310,eb=ue(t.defineComponent({__name:"PluginCustomGrid",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.getCreateRoute)},canCreateCustomPlugin:{type:Boolean,default:!1},canDeleteCustomPlugin:{type:Boolean,default:!1},canEditCustomPlugin:{type:Boolean,default:!1},pluginList:{type:Object,default:()=>({})},navigateOnClick:{type:Boolean,default:!0}},emits:["plugin-clicked","revalidate","delete:success"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=Pe.useI18n(),{getTallestPluginCardHeight:a,getToggleVisibility:l}=Pe.usePluginHelpers(),s=t.ref(!0),u=U=>{i("plugin-clicked",U)},f=t.computed(()=>{if(r.config.app==="kongManager")return[];const U=JSON.parse(JSON.stringify(r.pluginList))[b.PluginGroup.CUSTOM_PLUGINS]||[];return r.canCreateCustomPlugin&&r.navigateOnClick&&r.config.createCustomRoute?[{id:"custom-plugin-create",name:o("plugins.select.tabs.custom.create.name"),available:!0,group:b.PluginGroup.CUSTOM_PLUGINS,description:o("plugins.select.tabs.custom.create.description")}].concat(U):U}),p=t.ref(!1),c=t.ref(null),d=U=>{p.value=!0,c.value={id:U.id,name:U.name,customPluginType:U.customPluginType}},m=U=>{var h;U&&(i("revalidate"),i("delete:success",((h=c.value)==null?void 0:h.name)||"")),p.value=!1,c.value=null},k=t.ref(Ur),_=t.ref(null),g=t.ref(null),A=t.computed(()=>s.value?{overflowY:"hidden",maxHeight:`${k.value}px`}:{}),P=t.ref(!1),O=()=>{k.value=Math.max(a(g.value),Ur),$()},$=()=>{var U,h;(U=g.value)!=null&&U.length&&(P.value=l(_.value,(h=g.value)==null?void 0:h.length))};return t.onMounted(async()=>{await t.nextTick(),k.value=Math.max(a(g.value),Ur),$(),window==null||window.addEventListener("resize",O)}),t.onUnmounted(()=>{window==null||window.removeEventListener("resize",O)}),(U,h)=>{const C=t.resolveComponent("KEmptyState"),y=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock("div",Xh,[f.value.length?(t.openBlock(),t.createBlock(y,{key:1,modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=S=>s.value=S),class:"custom-plugins-collapse","data-testid":`${t.unref(b.PluginGroup).CUSTOM_PLUGINS}-collapse`,title:t.unref(b.PluginGroup).CUSTOM_PLUGINS,"trigger-label":s.value?t.unref(o)("plugins.select.view_more"):t.unref(o)("plugins.select.view_less")},t.createSlots({"visible-content":t.withCtx(()=>[t.createElementVNode("div",{ref_key:"pluginCardContainerRef",ref:_,class:"plugin-card-container",style:t.normalizeStyle(A.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,(S,ie)=>(t.openBlock(),t.createBlock(Kr,{key:`plugin-card-${ie}`,ref_for:!0,ref_key:"pluginCardRef",ref:g,"can-delete-custom-plugin":e.canDeleteCustomPlugin,"can-edit-custom-plugin":e.canEditCustomPlugin,config:e.config,"navigate-on-click":e.navigateOnClick,plugin:S,onCustomPluginDelete:J=>d(S),onPluginClicked:u},null,8,["can-delete-custom-plugin","can-edit-custom-plugin","config","navigate-on-click","plugin","onCustomPluginDelete"]))),128))],4)]),_:2},[P.value?void 0:{name:"trigger",fn:t.withCtx(()=>[h[2]||(h[2]=t.createTextVNode(" "))]),key:"0"}]),1032,["modelValue","data-testid","title","trigger-label"])):(t.openBlock(),t.createBlock(C,{key:0,"action-button-visible":!1,class:"custom-plugins-empty-state","icon-variant":"kong"},{title:t.withCtx(()=>[t.createElementVNode("span",Qh,t.toDisplayString(t.unref(o)("plugins.select.tabs.custom.empty_title")),1)]),default:t.withCtx(()=>[t.createElementVNode("span",Zh,t.toDisplayString(t.unref(o)("plugins.select.tabs.custom.empty_description")),1)]),_:1})),p.value&&c.value?(t.openBlock(),t.createBlock(Jh,{key:2,config:e.config,plugin:c.value,onClosed:m,onProceed:h[1]||(h[1]=S=>m(!0))},null,8,["config","plugin"])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-f4b90f47"]]),jr=310,Ya=ue(t.defineComponent({__name:"PluginSelectGroup",props:t.mergeModels({config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.getCreateRoute)},name:{type:String,required:!0},plugins:{type:Array,required:!0},navigateOnClick:{type:Boolean,default:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["plugin-clicked"],["update:modelValue"]),setup(e,{emit:n}){const r=t.useModel(e,"modelValue"),i=e,o=n,{i18n:{t:a}}=Pe.useI18n(),{getTallestPluginCardHeight:l,getToggleVisibility:s}=Pe.usePluginHelpers(),u=t.ref(jr),f=t.ref(null),p=t.ref(null),c=t.computed(()=>r.value?{overflowY:"hidden",maxHeight:`${u.value}px`}:{}),d=t.ref(!1),m=()=>{u.value=Math.max(l(p.value),jr),k()},k=()=>{var _,g;(_=p.value)!=null&&_.length&&(d.value=s(f.value,(g=p.value)==null?void 0:g.length))};return t.onMounted(async()=>{await t.nextTick(),u.value=Math.max(l(p.value),jr),k(),window==null||window.addEventListener("resize",m)}),t.onUnmounted(()=>{window==null||window.removeEventListener("resize",m)}),(_,g)=>{const A=t.resolveComponent("KCollapse");return t.openBlock(),t.createBlock(A,{modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=P=>r.value=P),class:"plugins-collapse","data-testid":`${i.name}-collapse`,title:i.name,"trigger-label":r.value?t.unref(a)("plugins.select.view_more"):t.unref(a)("plugins.select.view_less")},t.createSlots({"visible-content":t.withCtx(()=>[t.createElementVNode("div",{ref_key:"pluginCardContainerRef",ref:f,class:"plugin-card-container",style:t.normalizeStyle(c.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.plugins,P=>(t.openBlock(),t.createBlock(Kr,{key:`plugin-card-${P.id}`,ref_for:!0,ref_key:"pluginCardRef",ref:p,config:e.config,"navigate-on-click":e.navigateOnClick,plugin:P,onPluginClicked:O=>o("plugin-clicked",P)},null,8,["config","navigate-on-click","plugin","onPluginClicked"]))),128))],4)]),_:2},[d.value?void 0:{name:"trigger",fn:t.withCtx(()=>[g[1]||(g[1]=t.createTextVNode(" "))]),key:"0"}]),1032,["modelValue","data-testid","title","trigger-label"])}}}),[["__scopeId","data-v-a1074120"]]),tb={class:"plugin-select-grid"},nb={class:"empty-state-title"},rb={class:"empty-state-description"},Mr=t.defineComponent({__name:"PluginSelectGrid",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.getCreateRoute)},pluginList:{type:Object,default:()=>({})},navigateOnClick:{type:Boolean,default:!0},highlightedPlugins:{type:Array,default:()=>[]},highlightedPluginsTitle:{type:String,default:""},hideHighlightedPlugins:{type:Boolean,default:!1}},emits:["plugin-clicked"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=Pe.useI18n(),a=t.ref(!1),l=t.ref(zr),s=f=>{i("plugin-clicked",f)},u=t.computed(()=>{const f=JSON.parse(JSON.stringify(r.pluginList));return r.config.app==="konnect"&&delete f[b.PluginGroup.CUSTOM_PLUGINS],f});return(f,p)=>{const c=t.resolveComponent("KEmptyState");return t.openBlock(),t.createElementBlock("div",tb,[Object.keys(u.value).length?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:0,"action-button-visible":!1,class:"plugins-empty-state","data-testid":"plugins-empty-state","icon-variant":"kong"},{title:t.withCtx(()=>[t.createElementVNode("span",nb,t.toDisplayString(t.unref(o)("plugins.select.tabs.kong.empty_title")),1)]),default:t.withCtx(()=>[t.createElementVNode("span",rb,t.toDisplayString(t.unref(o)("plugins.select.tabs.kong.empty_description")),1)]),_:1})),!r.hideHighlightedPlugins&&r.highlightedPlugins.length>0?(t.openBlock(),t.createBlock(Ya,{key:1,modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=d=>a.value=d),config:e.config,name:r.highlightedPluginsTitle||t.unref(o)("plugins.select.highlighted_plugins.title"),"navigate-on-click":e.navigateOnClick,plugins:r.highlightedPlugins,onPluginClicked:p[1]||(p[1]=d=>s(d))},null,8,["modelValue","config","name","navigate-on-click","plugins"])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(Hr),d=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[u.value[d]?(t.openBlock(),t.createElementBlock("div",{key:d},[t.createVNode(Ya,{modelValue:l.value[d],"onUpdate:modelValue":m=>l.value[d]=m,config:e.config,name:d,"navigate-on-click":e.navigateOnClick,plugins:u.value[d]||[],onPluginClicked:p[2]||(p[2]=m=>s(m))},null,8,["modelValue","onUpdate:modelValue","config","name","navigate-on-click","plugins"])])):t.createCommentVNode("",!0)],64))),256))])}}}),ib={class:"kong-ui-entities-plugin-select-form"},ob={class:"plugins-filter-input-container"},ab={key:0},lb={key:3,"aria-live":"polite",class:"plugins-results-container"},sb={"data-testid":"kong-tab"},cb={class:"tab-description"},ub={"data-testid":"custom-tab"},db={class:"tab-description"},pb=ue(t.defineComponent({__name:"PluginSelect",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.getCreateRoute)},customPluginSupport:{type:String,default:"none"},canCreateCustomPlugin:{type:Function,required:!1,default:async()=>!0},canDeleteCustomPlugin:{type:Function,required:!1,default:async()=>!0},canEditCustomPlugin:{type:Function,required:!1,default:async()=>!0},navigateOnClick:{type:Boolean,default:!0},availableOnServer:{type:Boolean,default:!0},ignoredPlugins:{type:Array,default:()=>[]},disabledPlugins:{type:Object,default:()=>({})},highlightedPluginIds:{type:Array,default:()=>[]},highlightedPluginsTitle:{type:String,default:""}},emits:["loading","plugin-clicked","delete-custom:success"],setup(e,{emit:n}){var M;const r=e,i=n,o=Kt.useRoute(),a=Kt.useRouter(),{i18n:{t:l}}=Pe.useI18n(),{pluginMetaData:s}=Pe.usePluginMetaData(),{getMessageFromError:u}=D.useErrors(),{sortAlpha:f,objectsAreEqual:p}=D.useHelpers(),c=t.ref(""),d=t.ref(!0),m=t.ref(!1),k=t.ref(""),_=t.ref([]),g=t.ref([]),A=t.ref({}),P=t.ref([]),{axiosInstance:O}=D.useAxios((M=r.config)==null?void 0:M.axiosRequestConfig),$=t.computed(()=>A.value?Object.entries(A.value).filter(([x])=>x!==b.PluginGroup.CUSTOM_PLUGINS).reduce((x,[,R])=>{for(const ae of R)x[ae.id]=ae;return x},{}):{}),U=t.computed(()=>{var ae;if(!A.value)return{};const x=c.value.toLowerCase(),R=JSON.parse(JSON.stringify(A.value));for(const se in A.value){const _e=((ae=A.value[se])==null?void 0:ae.filter(pe=>pe.name.toLowerCase().includes(x)||pe.id.toLowerCase().includes(x)||pe.group.toLowerCase().includes(x)))||[];_e.length?R[se]=_e:delete R[se]}return R}),h=t.computed(()=>r.highlightedPluginIds.reduce((x,R)=>{const ae=$.value[R];return ae&&x.push(ae),x},[])),C=t.computed(()=>Object.keys(U.value).length>0),y=t.computed(()=>Object.keys(A.value).length>0&&!C.value),S=t.computed(()=>r.config.app==="konnect"?[{hash:"#kong",title:l("plugins.select.tabs.kong.title")},{hash:"#custom",title:l("plugins.select.tabs.custom.title"),disabled:["none","disabled"].includes(r.customPluginSupport)}]:[]),ie=t.computed(()=>{var R;let x=S.value.length&&((o==null?void 0:o.hash)||((R=S.value[0])==null?void 0:R.hash))||"";return x==="#custom"&&["none","disabled"].includes(r.customPluginSupport)&&(x="#kong"),x}),J=()=>[...new Set([...Object.keys({...r.availableOnServer?{}:s}),..._.value])].filter(x=>!r.ignoredPlugins.includes(x)).filter(x=>r.config.entityType&&(r.config.entityType==="services"&&s[x]&&!s[x].scope.includes(b.PluginScope.SERVICE)||r.config.entityType==="routes"&&s[x]&&!s[x].scope.includes(b.PluginScope.ROUTE)||r.config.entityType==="consumer_groups"&&s[x]&&!s[x].scope.includes(b.PluginScope.CONSUMER_GROUP)||r.config.entityType==="consumers"&&s[x]&&!s[x].scope.includes(b.PluginScope.CONSUMER))?!1:x).reduce((x,R)=>{var V;const ae=s[R]&&s[R].name||R,se={...s[R],id:R,name:ae,available:_.value.includes(R),disabledMessage:"",group:((V=s[R])==null?void 0:V.group)||b.PluginGroup.CUSTOM_PLUGINS};se.group===b.PluginGroup.CUSTOM_PLUGINS&&(se.customPluginType=g.value.find(B=>B.name===R)?"streaming":"schema"),r.disabledPlugins&&(se.disabledMessage=r.disabledPlugins[R]);const _e=se.group||l("plugins.select.misc_plugins");let pe=x[_e];return pe||(pe=[]),pe.push(se),pe.sort(f("name")),x[_e]=pe,x},{}),X=t.computed(()=>{var R;let x=`${r.config.apiBaseUrl}${Se.select[r.config.app].availablePlugins}`;return r.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,r.config.controlPlaneId||""):r.config.app==="kongManager"&&(x=((R=r.config.gatewayInfo)==null?void 0:R.edition)==="community"?`${r.config.apiBaseUrl}${Se.select[r.config.app].availablePluginsForOss}`:x.replace(/\/{workspace}/gi,r.config.workspace?`/${r.config.workspace}`:"")),x}),w=t.computed(()=>{if(r.config.app==="konnect"&&r.customPluginSupport==="streaming"){let x=`${r.config.apiBaseUrl}${Se.select[r.config.app].streamingCustomPlugins}`;return x=x.replace(/{controlPlaneId}/gi,r.config.controlPlaneId||""),x}return null}),N=t.computed(()=>{if(r.config.entityType&&r.config.entityId){let x=`${r.config.apiBaseUrl}${Se.list[r.config.app].forEntity}`;return r.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,r.config.controlPlaneId||""):r.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,r.config.workspace?`/${r.config.workspace}`:"")),x.replace(/{entityType}/gi,r.config.entityType||"").replace(/{entityId}/gi,r.config.entityId||"")}return""}),v=x=>{a.replace({hash:x,query:o.query})};t.watch(()=>r.disabledPlugins,(x,R)=>{!p(x,R)&&!d.value&&(A.value=J())}),t.watch(()=>r.ignoredPlugins,(x,R)=>{!p(x,R)&&!d.value&&(A.value=J())}),t.watch(d,x=>{i("loading",x)});const F=t.ref(!1),Z=t.ref(!1),re=t.ref(!1);return t.onBeforeMount(async()=>{F.value=await r.canCreateCustomPlugin(),Z.value=await r.canEditCustomPlugin(),re.value=await r.canDeleteCustomPlugin()}),t.onMounted(async()=>{try{const{data:x}=await O.get(X.value);if(r.config.app==="konnect"){const{names:R}=x;if(_.value=R||[],w.value){const{data:ae}=await O.get(w.value);g.value=ae.data||[]}}else if(r.config.app==="kongManager"){const{plugins:{available_on_server:R}}=x;_.value=R?Object.keys(R):[]}}catch(x){m.value=!0,k.value=u(x)}if(N.value)try{const{data:{data:x}}=await O.get(N.value);if(x!=null&&x.length){const R=x.reduce((ae,se)=>(se.name&&ae.push(se.name),ae),[]);P.value=P.value.concat(R)}}catch{}m.value||(A.value=J()),d.value=!1}),(x,R)=>{const ae=t.resolveComponent("KInput"),se=t.resolveComponent("KSkeletonBox"),_e=t.resolveComponent("KSkeleton"),pe=t.resolveComponent("KEmptyState"),V=t.resolveComponent("KTooltip"),B=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",ib,[t.createElementVNode("div",ob,[t.createVNode(ae,{modelValue:c.value,"onUpdate:modelValue":R[0]||(R[0]=q=>c.value=q),modelModifiers:{trim:!0},class:"plugins-filter-input","data-testid":"plugins-filter",placeholder:t.unref(l)("search.placeholder.select"),type:"search"},null,8,["modelValue","placeholder"])]),d.value?(t.openBlock(),t.createElementBlock("section",ab,[t.createVNode(se,{class:"plugins-skeleton-title",width:"10"}),t.createVNode(_e,{"card-count":8,class:"plugins-skeleton-cards",type:"card"})])):m.value?(t.openBlock(),t.createBlock(pe,{key:1,"action-button-visible":!1,"data-testid":"plugins-fetch-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(k.value),1)]),_:1})):y.value&&c.value?(t.openBlock(),t.createBlock(pe,{key:2,"action-button-visible":!1,"data-testid":"plugins-empty-state","icon-variant":"search"},{default:t.withCtx(()=>[t.createElementVNode("h5",null,t.toDisplayString(t.unref(l)("search.no_results",{filter:c.value})),1)]),_:1})):(t.openBlock(),t.createElementBlock("section",lb,[S.value.length&&e.customPluginSupport!=="none"?(t.openBlock(),t.createBlock(B,{key:0,modelValue:ie.value,"onUpdate:modelValue":R[5]||(R[5]=q=>ie.value=q),"data-testid":"plugins-tabs",tabs:S.value,onChange:v},t.createSlots({kong:t.withCtx(()=>[t.createElementVNode("div",sb,[t.createElementVNode("p",cb,t.toDisplayString(t.unref(l)("plugins.select.tabs.kong.description")),1),t.createVNode(Mr,{config:e.config,"hide-highlighted-plugins":c.value.length>0,"highlighted-plugins":h.value,"highlighted-plugins-title":r.highlightedPluginsTitle,"navigate-on-click":e.navigateOnClick,"plugin-list":U.value,onPluginClicked:R[1]||(R[1]=q=>x.$emit("plugin-clicked",q))},null,8,["config","hide-highlighted-plugins","highlighted-plugins","highlighted-plugins-title","navigate-on-click","plugin-list"])])]),custom:t.withCtx(()=>[t.createElementVNode("div",ub,[t.createElementVNode("p",db,t.toDisplayString(t.unref(l)("plugins.select.tabs.custom.description")),1),t.createVNode(eb,{"can-create-custom-plugin":F.value,"can-delete-custom-plugin":re.value,"can-edit-custom-plugin":Z.value,config:e.config,"navigate-on-click":e.navigateOnClick,"plugin-list":U.value,"onDelete:success":R[2]||(R[2]=q=>x.$emit("delete-custom:success",q)),onPluginClicked:R[3]||(R[3]=q=>x.$emit("plugin-clicked",q)),onRevalidate:R[4]||(R[4]=()=>A.value=J())},null,8,["can-create-custom-plugin","can-delete-custom-plugin","can-edit-custom-plugin","config","navigate-on-click","plugin-list"])])]),_:2},[e.customPluginSupport==="disabled"?{name:"custom-anchor",fn:t.withCtx(()=>[t.createVNode(V,{"max-width":"300",text:t.unref(l)("plugins.select.tabs.custom.disabled_tooltip")},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(t.unref(l)("plugins.select.tabs.custom.title")),1)]),_:1},8,["text"])]),key:"0"}:void 0]),1032,["modelValue","tabs"])):(t.openBlock(),t.createBlock(Mr,{key:1,config:e.config,"hide-highlighted-plugins":c.value.length>0,"highlighted-plugins":h.value,"highlighted-plugins-title":r.highlightedPluginsTitle,"navigate-on-click":e.navigateOnClick,"plugin-list":U.value,onPluginClicked:R[6]||(R[6]=q=>x.$emit("plugin-clicked",q))},null,8,["config","hide-highlighted-plugins","highlighted-plugins","highlighted-plugins-title","navigate-on-click","plugin-list"]))]))])}}}),[["__scopeId","data-v-d2065987"]]),fb={class:"kong-ui-entity-plugin-config-card"},mb={class:"name-cell-wrapper"},gb={class:"info-name"},yb={key:0},hb={key:0},bb={key:0},_b={key:0},kb={key:0},Gr="config",Cb=ue(t.defineComponent({__name:"PluginConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId||!e.pluginType)},configCardDoc:{type:String,default:"",required:!1},showIdAsLink:{type:Boolean,default:!1},hideTitle:{type:Boolean,default:!1},scopedEntityType:{type:String,required:!1,default:""},scopedEntityId:{type:String,required:!1,default:""},expandPartial:{type:Boolean,default:!0}},emits:["loading","fetch:error","error:fetch-schema","fetch:success","navigation-click"],setup(e,{emit:n}){var P;const r=n,i=e,{i18n:{t:o}}=Pe.useI18n(),a=Pe.usePluginMetaData(),{setFieldType:l}=Pe.usePluginHelpers(),{getPropValue:s}=D.useHelpers(),u=t.computed(()=>{var O;return(O=Se.item[i.config.app])==null?void 0:O[i.scopedEntityType?"forEntity":"all"].replace(/{entityType}/gi,i.scopedEntityType).replace(/{entityId}/gi,i.scopedEntityId).concat(i.expandPartial?"?expand_partials=true":"")}),f=t.computed(()=>{var U,h;const O={},$=((U=_.value)==null?void 0:U.fields)||[];for(let C=0;C<$.length;C++){const y=_.value.fields[C],S=(h=Object.keys(y))==null?void 0:h[0];l(O,S,y[S])}return{...O,instance_name:{section:D.ConfigurationSchemaSection.Basic,order:1.5},consumer:{label:o("plugins.fields.consumer"),section:D.ConfigurationSchemaSection.Basic,order:6},route:{label:o("plugins.fields.route"),section:D.ConfigurationSchemaSection.Basic,order:6},service:{label:o("plugins.fields.service"),section:D.ConfigurationSchemaSection.Basic,order:6},consumer_group:{label:o("plugins.fields.consumer_group"),section:D.ConfigurationSchemaSection.Basic,order:6},protocols:{type:D.ConfigurationSchemaType.BadgeTag,section:D.ConfigurationSchemaSection.Basic,order:7}}}),p=t.computed(()=>{var $,U,h;if(!(($=_.value)!=null&&$.fields))return[];const O=(U=_.value.fields)==null?void 0:U.find(C=>{var S;return((S=Object.keys(C))==null?void 0:S[0])===Gr});return((h=O==null?void 0:O[Gr])==null?void 0:h.fields)||[]}),c=t.computed(()=>{var $,U;const O={};if(!p.value)return O;for(let h=0;h<(($=p.value)==null?void 0:$.length);h++){const C=p.value[h],y=(U=Object.keys(C))==null?void 0:U[0],S=C[y];S.required&&(O[y]={order:1}),l(O,y,S)}return O}),{getMessageFromError:d}=D.useErrors(),{axiosInstance:m}=D.useAxios((P=i.config)==null?void 0:P.axiosRequestConfig),k=t.computed(()=>{var $,U;let O=`${i.config.apiBaseUrl}${Se.form[i.config.app].pluginSchema}`;return i.config.app==="konnect"?O=O.replace(/{controlPlaneId}/gi,(($=i.config)==null?void 0:$.controlPlaneId)||""):i.config.app==="kongManager"&&(O=O.replace(/\/{workspace}/gi,(U=i.config)!=null&&U.workspace?`/${i.config.workspace}`:"")),O=O.replace(/{plugin}/gi,i.config.pluginType),O}),_=t.ref({});D.useSchemaProvider(_);const g=t.ref(!1),A=t.ref("");return t.onBeforeMount(async()=>{g.value=!0;try{const{data:O}=await m.get(k.value);_.value=O}catch(O){A.value=d(O),r("error:fetch-schema",O)}finally{g.value=!1}}),(O,$)=>{const U=t.resolveComponent("KSkeleton"),h=t.resolveComponent("KEmptyState"),C=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",fb,[g.value?(t.openBlock(),t.createBlock(U,{key:0,"data-testid":"plugin-config-card-loader","table-columns":2,type:"table"})):A.value?(t.openBlock(),t.createBlock(h,{key:1,"data-testid":"plugin-config-card-schema-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(A.value),1)]),_:1})):(t.openBlock(),t.createBlock(t.unref(D.EntityBaseConfigCard),{key:2,config:e.config,"config-card-doc":e.configCardDoc,"config-schema":f.value,"entity-type":t.unref(D.SupportedEntityType).Plugin,"fetch-url":u.value,"hide-title":e.hideTitle,"plugin-config-key":Gr,"plugin-config-schema":c.value,"onFetch:error":$[0]||($[0]=y=>O.$emit("fetch:error",y)),"onFetch:success":$[1]||($[1]=y=>O.$emit("fetch:success",y)),onLoading:$[2]||($[2]=y=>O.$emit("loading",y))},{name:t.withCtx(y=>[t.createElementVNode("div",mb,[t.createVNode(t.unref(Ut.PluginIcon),{class:"plugin-icon",name:t.unref(s)("rowValue",y),size:24},null,8,["name"]),t.createElementVNode("span",gb,t.toDisplayString(t.unref(a).getDisplayName(t.unref(s)("rowValue",y))),1)])]),consumer:t.withCtx(y=>[t.unref(s)("rowValue",y)?e.showIdAsLink?(t.openBlock(),t.createBlock(t.unref(D.InternalLinkItem),{key:1,item:{key:t.unref(s)("rowValue",y).id,value:t.unref(s)("rowValue",y).id,type:t.unref(D.ConfigurationSchemaType).LinkInternal},onNavigationClick:()=>O.$emit("navigation-click",t.unref(s)("rowValue",y).id,"consumer")},null,8,["item","onNavigationClick"])):(t.openBlock(),t.createBlock(C,{key:2,"copy-tooltip":t.unref(o)("copy.tooltip",{label:t.unref(s)("row",y).label}),"data-testid":"consumer-copy-uuid",text:t.unref(s)("rowValue",y).id},null,8,["copy-tooltip","text"])):(t.openBlock(),t.createElementBlock("span",yb,"–"))]),route:t.withCtx(y=>[t.unref(s)("rowValue",y)?e.showIdAsLink?(t.openBlock(),t.createBlock(t.unref(D.InternalLinkItem),{key:1,item:{key:t.unref(s)("rowValue",y).id,value:t.unref(s)("rowValue",y).id,type:t.unref(D.ConfigurationSchemaType).LinkInternal},onNavigationClick:()=>O.$emit("navigation-click",t.unref(s)("rowValue",y).id,"route")},null,8,["item","onNavigationClick"])):(t.openBlock(),t.createBlock(C,{key:2,"copy-tooltip":t.unref(o)("copy.tooltip",{label:t.unref(s)("row",y).label}),"data-testid":"route-copy-uuid",text:t.unref(s)("rowValue",y).id},null,8,["copy-tooltip","text"])):(t.openBlock(),t.createElementBlock("span",hb,"–"))]),service:t.withCtx(y=>[t.unref(s)("rowValue",y)?e.showIdAsLink?(t.openBlock(),t.createBlock(t.unref(D.InternalLinkItem),{key:1,item:{key:t.unref(s)("rowValue",y).id,value:t.unref(s)("rowValue",y).id,type:t.unref(D.ConfigurationSchemaType).LinkInternal},onNavigationClick:()=>O.$emit("navigation-click",t.unref(s)("rowValue",y).id,"service")},null,8,["item","onNavigationClick"])):(t.openBlock(),t.createBlock(C,{key:2,"copy-tooltip":t.unref(o)("copy.tooltip",{label:t.unref(s)("row",y).label}),"data-testid":"service-copy-uuid",text:t.unref(s)("rowValue",y).id},null,8,["copy-tooltip","text"])):(t.openBlock(),t.createElementBlock("span",bb,"–"))]),consumer_group:t.withCtx(y=>[t.unref(s)("rowValue",y)?e.showIdAsLink?(t.openBlock(),t.createBlock(t.unref(D.InternalLinkItem),{key:1,item:{key:t.unref(s)("rowValue",y).id,value:t.unref(s)("rowValue",y).id,type:t.unref(D.ConfigurationSchemaType).LinkInternal},onNavigationClick:()=>O.$emit("navigation-click",t.unref(s)("rowValue",y).id,"consumer_group")},null,8,["item","onNavigationClick"])):(t.openBlock(),t.createBlock(C,{key:2,"copy-tooltip":t.unref(o)("copy.tooltip",{label:t.unref(s)("row",y).label}),"data-testid":"consumer-group-copy-uuid",text:t.unref(s)("rowValue",y).id},null,8,["copy-tooltip","text"])):(t.openBlock(),t.createElementBlock("span",_b,"–"))]),partials:t.withCtx(y=>{var S,ie,J,X,w,N,v,F,Z;return[t.unref(s)("rowValue",y)?e.showIdAsLink?(t.openBlock(),t.createBlock(t.unref(D.InternalLinkItem),{key:1,item:{key:(ie=(S=t.unref(s)("rowValue",y))==null?void 0:S[0])==null?void 0:ie.id,value:((X=(J=t.unref(s)("rowValue",y))==null?void 0:J[0])==null?void 0:X.id)+((N=(w=t.unref(s)("rowValue",y))==null?void 0:w[0])!=null&&N.name?"/"+((F=(v=t.unref(s)("rowValue",y))==null?void 0:v[0])==null?void 0:F.name):""),type:t.unref(D.ConfigurationSchemaType).LinkInternal},onNavigationClick:()=>{var re,M;return O.$emit("navigation-click",(M=(re=t.unref(s)("rowValue",y))==null?void 0:re[0])==null?void 0:M.id,"partial")}},null,8,["item","onNavigationClick"])):(t.openBlock(),t.createBlock(C,{key:2,"copy-tooltip":t.unref(o)("copy.tooltip",{label:t.unref(s)("row",y).label}),"data-testid":"partial-copy-uuid",text:(Z=t.unref(s)("rowValue",y))==null?void 0:Z[0].id},null,8,["copy-tooltip","text"])):(t.openBlock(),t.createElementBlock("span",kb,"–"))]}),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title","plugin-config-schema"]))])}}}),[["__scopeId","data-v-c314449c"]]),{usePluginMetaData:Ab,useProvideExperimentalFreeForms:Eb}=Pe;Object.defineProperty(ne,"PluginGroup",{enumerable:!0,get:()=>b.PluginGroup}),Object.defineProperty(ne,"PluginScope",{enumerable:!0,get:()=>b.PluginScope}),Object.defineProperty(ne,"PluginIcon",{enumerable:!0,get:()=>Ut.PluginIcon}),Object.defineProperty(ne,"getPluginIconURL",{enumerable:!0,get:()=>Ut.getPluginIconURL}),ne.EXPERIMENTAL_FREE_FORM_PROVIDER=Fn,ne.EntityTypeIdField=ct,ne.FEATURE_FLAGS=ri,ne.PLUGIN_GROUPS_COLLAPSE_STATUS=zr,ne.PluginConfigCard=Cb,ne.PluginForm=xh,ne.PluginGroupArray=Hr,ne.PluginList=Kh,ne.PluginPartialType=gn,ne.PluginSelect=pb,ne.PluginSelectCard=Kr,ne.PluginSelectGrid=Mr,ne.pluginEndpoints=Se,ne.usePluginMetaData=Ab,ne.useProvideExperimentalFreeForms=Eb,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|
|
125
|
+
`},Symbol.toStringTag,{value:"Module"})),a_={ref:"editor-root",class:"dk-editor"},Gr="YAML Syntax",l_="datakit.insert-example",s_=se(t.defineComponent({__name:"CodeEditor",props:{editing:{type:Boolean},config:{}},emits:["change","error"],setup(e,{expose:n,emit:r}){const i=r,o=t.useTemplateRef("editor-root"),a=t.shallowRef(null);function l(s){const d=a.value,f=d==null?void 0:d.getModel();if(!d||!f)return;const p=ol[s];if(d.getValue()!==p){const c=f.getFullModelRange();d.pushUndoStop(),d.executeEdits(l_,[{range:c,text:p}]),d.pushUndoStop()}d.focus()}return t.onMounted(()=>{const s=yn.editor.create(o.value,{language:"yaml",automaticLayout:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,tabSize:2,scrollbar:{alwaysConsumeMouseWheel:!1},autoIndent:"keep"});a.value=s,e.editing&&s.setValue(il.dump(t.toRaw(e.config),{schema:qr,noArrayIndent:!0})),s.onDidChangeModelContent(()=>{const d=s.getModel(),f=s.getValue()||"";try{const p=il.load(f,{schema:qr,json:!0});yn.editor.setModelMarkers(d,Gr,[]),i("change",p)}catch(p){const{message:c,mark:u}=p,{line:m,column:_}=u||{line:0,column:0},b=c.split(`
|
|
126
|
+
`)[0],g=[{startLineNumber:m+1,startColumn:_+1,endLineNumber:m+1,endColumn:_+2,message:b,severity:yn.MarkerSeverity.Error,source:Gr}];yn.editor.setModelMarkers(d,Gr,g),i("error",b)}})}),t.onBeforeUnmount(()=>{var s;(s=a.value)==null||s.dispose()}),n({setExampleCode:l}),(s,d)=>(t.openBlock(),t.createElementBlock("div",a_,null,512))}}),[["__scopeId","data-v-e5fcb32d"]]),c_={key:0},d_={class:"examples-content"},u_=["innerHTML"],al=Object.freeze(Object.defineProperty({__proto__:null,DatakitForm:se(t.defineComponent({__name:"DatakitForm",props:{generalInfoTitle:{},generalInfoDescription:{},pluginConfigTitle:{},pluginConfigDescription:{},schema:{},formSchema:{},model:{},formModel:{},formOptions:{},isEditing:{type:Boolean},onModelUpdated:{type:Function},onFormChange:{type:Function},onValidityChange:{type:Function}},setup(e){const{t:n}=Oe.createI18n("en-us",Be),r=e,i=t.inject(ci.DATAKIT_ENABLE_VISUAL_EDITOR,!1),{editorMode:o}=xr(),a=t.computed(()=>i?o.value:"code"),l={visual:he.DesignIcon,code:he.CodeblockIcon},s=[{label:n("plugins.free-form.datakit.visual_editor.mode"),value:"visual"},{label:n("plugins.free-form.datakit.code_editor.mode"),value:"code"}],d=t.computed(()=>{switch(o.value){case"code":return n("plugins.free-form.datakit.description_code");case"visual":return n("plugins.free-form.datakit.description_visual");default:return""}}),f=t.ref(!1),p=t.useTemplateRef("code-editor");function c(_){var b;(b=p.value)==null||b.setExampleCode(_)}function u(_){var b;r.onFormChange({config:_}),(b=r.onValidityChange)==null||b.call(r,{model:"config",valid:!0})}function m(_){var b;(b=r.onValidityChange)==null||b.call(r,{model:"config",valid:!1,error:_})}return(_,b)=>{const g=t.resolveComponent("KButton");return t.openBlock(),t.createBlock(vm,t.mergeProps(r,{class:"dk-form"}),t.createSlots({default:t.withCtx(h=>[a.value==="visual"?(t.openBlock(),t.createElementBlock("div",c_,[t.createVNode(g,{appearance:"secondary",onClick:b[1]||(b[1]=k=>f.value=!0)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.free-form.datakit.visual_editor.cta")),1)]),_:1}),t.createVNode(Ug,{open:f.value,"onUpdate:open":b[2]||(b[2]=k=>f.value=k)},null,8,["open"])])):a.value==="code"?(t.openBlock(),t.createBlock(Ar,t.mergeProps({key:1},h,{tag:"div"}),{default:t.withCtx(()=>[t.createVNode(t.unref(Ce.KAlert),{class:"examples"},{icon:t.withCtx(()=>[t.createVNode(t.unref(he.SparklesIcon))]),default:t.withCtx(()=>[t.createElementVNode("div",d_,[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.free-form.datakit.description_example"))+" ",1),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(ol,(k,P)=>t.createVNode(g,{key:P,appearance:"secondary",size:"small",onClick:R=>c(P)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)(`plugins.free-form.datakit.examples.${P}`)),1)]),_:2},1032,["onClick"])),64))])]),_:1}),t.createVNode(s_,{ref:"code-editor",class:"editor",config:r.model.config,editing:r.isEditing,onChange:u,onError:m},null,8,["config","editing"])]),_:2},1040)):t.createCommentVNode("",!0)]),"plugin-config-description":t.withCtx(()=>[t.createElementVNode("span",{innerHTML:d.value},null,8,u_)]),_:2},[t.unref(i)?{name:"plugin-config-extra",fn:t.withCtx(()=>[t.createVNode(t.unref(Ce.KSegmentedControl),{modelValue:t.unref(o),"onUpdate:modelValue":b[0]||(b[0]=h=>t.isRef(o)?o.value=h:null),options:s},{"option-label":t.withCtx(({option:h})=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l[h.value]))),t.createTextVNode(" "+t.toDisplayString(h.label),1)]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1040)}}}),[["__scopeId","data-v-42a0216c"]]),RequestCalloutForm:Vf,ServiceProtectionForm:Tm},Symbol.toStringTag,{value:"Module"})),p_={class:"kong-ui-entities-plugin-form"},f_={key:1,class:"entity-form"},m_={class:"plugin-config-empty-state"},g_=se(t.defineComponent({__name:"PluginEntityForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},entityMap:{type:Object,default:()=>({})},record:{type:Object,default:()=>({})},schema:{type:Object,default:()=>({})},rawSchema:{type:Object,default:()=>({})},editing:{type:Boolean,default:!1},credential:{type:Boolean,default:!1},enableVaultSecretPicker:{type:Boolean,default:!1},enableRedisPartial:{type:Boolean,default:!1}},emits:["loading","model-updated","showNewPartialModal","globalAction","validity-change"],setup(e,{emit:n}){var le,fe;const r=Object.keys(ge.sharedForms),i=Object.keys(al);if(new Set([...r,...i]).size!==r.length+i.length)throw new Error("Duplicate form component names found in `sharedForms` and `freeForm`");const o=n,a=e,{axiosInstance:l}=L.useAxios((le=a.config)==null?void 0:le.axiosRequestConfig),{parseSchema:s}=Se.useSchemas({entityId:((fe=a.entityMap.focusedEntity)==null?void 0:fe.id)||void 0,credential:a.credential,enableRedisPartial:a.enableRedisPartial,experimentalRenders:a.config.app==="konnect"?a.config.experimentalRenders:void 0}),{convertToDotNotation:d,unFlattenObject:f,dismissField:p,isObjectEmpty:c,unsetNullForeignKey:u}=Se.usePluginHelpers(),m=Se.useExperimentalFreeForms(),{objectsAreEqual:_}=L.useHelpers(),{i18n:{t:b}}=lt(),g=(U,F)=>{let z=`${a.config.apiBaseUrl}${Pe.form[a.config.app].entityGetOne}`;return a.config.app==="konnect"?z=z.replace(/{controlPlaneId}/gi,a.config.controlPlaneId||""):a.config.app==="kongManager"&&(z=z.replace(/\/{workspace}/gi,a.config.workspace?`/${a.config.workspace}`:"")),z=z.replace(/{entity}/gi,U),z=z.replace(/{id}/gi,F),z},h=U=>{let F=`${a.config.apiBaseUrl}${Pe.form[a.config.app].entityGetAll}`;return a.config.app==="konnect"?F=F.replace(/{controlPlaneId}/gi,a.config.controlPlaneId||""):a.config.app==="kongManager"&&(F=F.replace(/\/{workspace}/gi,a.config.workspace?`/${a.config.workspace}`:"")),F=F.replace(/{entity}/gi,U),F},k=(U,F)=>{const z=g(U,F);return l.get(z)},P=(U,F)=>{const z=h(U);return a.config.app==="konnect"?l.get(z).then(ce=>{const{data:{data:ne}}=ce;if(delete F.size,delete F.offset,ne.length&&Object.keys(F).length===1){const pe=Object.keys(F)[0],Me=ne.filter(je=>je[pe]?!!je[pe].toLowerCase().includes(F[pe].toLowerCase()):!1);ce.data.data=Me}return ce}):l.get(z,{params:F})};t.provide(ge.FORMS_API_KEY,{getOne:k,getAll:P}),t.provide(ge.FORMS_CONFIG,a.config);const R=t.ref(""),I=t.ref(""),y=t.ref(null),T=t.ref({}),A=t.reactive({}),S=t.reactive({}),ie=t.computed(()=>{var U;return(U=y.value)==null?void 0:U.options}),Q=t.ref(!1),H=t.ref(),w=(U,F)=>{Q.value=U??"",H.value=F},O=U=>{var F;(F=H.value)==null||F.call(H,U),Q.value=!1},$=()=>{var Me,je;const U={...a.schema},F=S,z=A,ce=Object.keys(F),ne={};if(!c(T.value))for(let _e=0;_e<((je=(Me=T.value)==null?void 0:Me.fields)==null?void 0:je.length);_e++)U[T.value.fields[_e].model]=T.value.fields[_e];ge.customFields.forEach(_e=>{U[_e]&&(U[_e].fields.forEach(me=>{me.fields&&me.fields.forEach(ee=>{U[ee.model]=ee}),me.model&&(U[me.model]=me)}),delete U[_e])}),ce.forEach(_e=>{var E;if(!U[_e]){_e==="partials"&&(ne[_e]=F[_e]);return}const me=U[_e];let ee=F[_e];const ot=z[_e],qe=Array.isArray(ee)?"array":typeof ee,j=me?me.valueType:null,Y=me?me.valueArrayType:null,x=me?me.transform:null;if(ee==null&&ot==null&&!me.submitWhenNull)return;if(me){if(j&&qe!==j)switch(j){case"array":qe==="string"&&ee.length&&(ee=ee.split(",").map(J=>{if(J=J.trim(),Y==="string")return String(J);if(Y==="number")return Number(J);if(Y==="boolean"){if(typeof J=="string")return J.toLowerCase()==="true"||J==="1";if(typeof J=="number")return J===1}return J})),(!ee||!ee.length)&&(ee=me.submitWhenNull?null:[]);break;case"number":ee=Number(ee);break;case"boolean":qe==="string"&&(ee=ee.toLowerCase()==="true"||ee==="1"),qe==="number"&&(ee=ee===1);break;case"string":ee=ee==null?"":String(ee);break}else j==="array"&&(!ee||!ee.length?ee=me.submitWhenNull?null:[]:((E=me.inputAttributes)==null?void 0:E.type)==="number"&&(ee=ee.map(J=>Number(J))));if(me.type==="array"&&me.nestedFields){const J=G=>{Object.keys(G).forEach(oe=>{G[oe]&&typeof G[oe]=="object"&&!Array.isArray(G[oe])&&G[oe]!==null?J(G[oe]):(G[oe]===void 0||G[oe]===null||typeof G[oe]=="number"&&isNaN(G[oe])||typeof G[oe]=="string"&&G[oe].trim().length===0)&&delete G[oe]})};ee&&typeof ee=="object"&&J(ee)}me.type==="object-advanced"&&me.fields&&ee!==null&&(Object.entries(ee).length===0?ee=null:Object.keys(ee).forEach(J=>{Array.isArray(ee[J])||(ee[J]=ee[J].split(","))}))}let D=d(_e);if(me.fieldNameHasDashes){const[J,...G]=D.split(".").reverse();D=[J.replace(/_/g,"-"),...G].reverse().join(".")}if(j==="object-expand"){let J;[D,J]=D.split(".");let G={};ne[D]&&(G=ne[D]),G[J]=ee,ee=G}ot!==void 0&&ee===""&&ee!==ot?ne[D]=j==="object"?{}:null:me.type==="checklist"&&ee===""?ne[D]=[]:ee!==""&&(ne[D]=ee),ne[D]=x?x(ee):ne[D],u(D,ne)});const pe=f(ne);return I.value&&Object.assign(pe,N.value),pe},K=(U,F={})=>{p(S,F,U,a.editing),o("model-updated",{model:S,originalModel:A,data:$()})},Z=(U,F)=>{var ne;const z={[F]:U};typeof((ne=a.schema[F])==null?void 0:ne.modelTransformer)=="function"&&(z[F]=a.schema[F].modelTransformer(U));const ce=Object.assign({},S,z);Object.assign(S,ce),o("model-updated",{model:S,originalModel:A,data:$()})},q=U=>{o("validity-change",U)},v=(U,F)=>{Object.keys(U).forEach(z=>{var je,_e;let ce=F?`${F}-${z}`:z,ne=a.schema[ce];if(!ne){const me=F?`${F}-${z.replace(/-/g,"_")}`:z.replace(/-/g,"_");(je=a.schema[me])!=null&&je.fieldNameHasDashes&&(ce=me,ne=a.schema[ce]),F&&((_e=a.schema[F])==null?void 0:_e.keyFromObject)===z&&(ce=F,ne=a.schema[ce])}const pe=U[z],Me=typeof pe;if(ne&&ne.type==="object-advanced"&&!pe){S[ce]={},A[ce]={};return}if(Array.isArray(pe)){S[ce]=JSON.parse(JSON.stringify(pe)),A[ce]=JSON.parse(JSON.stringify(pe));return}if(Me==="object"&&pe&&!pe.length)return v(pe,ce);if(Me==="object"&&pe&&pe.length&&ne.type==="input"){S[ce]=pe.join(", "),A[ce]=pe.join(", ");return}S[ce]=pe,A[ce]=pe}),o("model-updated",{model:S,originalModel:A,data:$()})},N=t.shallowRef(a.record),B=U=>{N.value=U,o("model-updated",{model:{...S,...U},originalModel:A,data:$()})},ae=t.ref(!0),de=()=>{var U;if(a.record&&a.schema&&(v({enabled:a.record.enabled??!0,...a.record.instance_name&&{instance_name:a.record.instance_name||""},...a.record.protocols&&{protocols:a.record.protocols},...a.record.tags&&{tags:a.record.tags}}),a.credential?((a.record.consumer_id||a.record.consumer)&&v({consumer_id:a.record.consumer_id||a.record.consumer}),v(a.record)):a.record.config&&((a.record.consumer_id||a.record.consumer||a.record.service_id||a.record.service||a.record.route_id||a.record.route||a.record.consumer_group_id||a.record.consumer_group)&&v({service_id:a.record.service_id||a.record.service,route_id:a.record.route_id||a.record.route,consumer_id:a.record.consumer_id||a.record.consumer,consumer_group_id:a.record.consumer_group_id||a.record.consumer_group}),a.record.partials&&K("redis",{partials:a.record.partials}),I.value?B(a.record):v(a.record.config,"config"))),Object.keys(a.entityMap).length&&!a.entityMap.global&&a.schema){const F={};for(const z in a.entityMap){const ce=a.entityMap[z].id,ne=a.entityMap[z].idField,pe=ne==="consumer_group_id"?"consumer_group-id":JSON.parse(JSON.stringify(ne).replace("_","-"));Object.prototype.hasOwnProperty.call(S,pe)&&(F[pe]=ce)}v(F)}if((U=a.entityMap.consumer)!=null&&U.id&&a.schema&&a.credential){const F={};Object.prototype.hasOwnProperty.call(S,"consumer")&&(F.consumer=a.entityMap.consumer.id),v(F)}ae.value=!1};return t.watch(ae,U=>{o("loading",U)}),t.watch(()=>a.schema,(U,F)=>{var ce,ne;if(_(U||{},F||{}))return;const z=s(U);Object.assign(S,z.model),T.value={fields:(ne=(ce=T.value)==null?void 0:ce.fields)==null?void 0:ne.map(pe=>({...pe,disabled:pe.disabled||!1}))},Object.assign(A,JSON.parse(JSON.stringify(z.model))),I.value=si(z.model.name,m),R.value=ge.getSharedFormName(z.model.name),de()},{immediate:!0,deep:!0}),t.onBeforeMount(()=>{var U,F;y.value=s(a.schema),Object.assign(S,((U=y.value)==null?void 0:U.model)||{}),T.value=((F=y.value)==null?void 0:F.schema)||{},de()}),(U,F)=>{var ce;const z=t.resolveComponent("KSkeleton");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",p_,[ae.value?(t.openBlock(),t.createBlock(z,{key:0,type:"form"})):S.id&&e.editing||!e.editing?(t.openBlock(),t.createElementBlock("div",f_,[I.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(al[I.value]),{key:0,"form-model":S,"form-options":ie.value,"form-schema":T.value,"is-editing":e.editing,model:e.record,"on-form-change":B,"on-model-updated":Z,"on-validity-change":q,schema:e.rawSchema,onGlobalAction:F[0]||(F[0]=(ne,pe)=>U.$emit("globalAction",ne,pe))},t.createSlots({_:2},[e.enableVaultSecretPicker?{name:t.unref(ge.AUTOFILL_SLOT_NAME),fn:t.withCtx(ne=>[ne.schema.referenceable?(t.openBlock(),t.createBlock(t.unref(gn.VaultSecretPickerProvider),t.mergeProps({key:0},ne,{onOpen:w}),null,16)):t.createCommentVNode("",!0)]),key:"0"}:void 0]),1064,["form-model","form-options","form-schema","is-editing","model","schema"])):R.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(ge.sharedForms)[R.value]),{key:1,"enable-redis-partial":e.enableRedisPartial,"form-model":S,"form-options":ie.value,"form-schema":T.value,"is-editing":e.editing,"on-model-updated":Z,"on-partial-toggled":K,"show-new-partial-modal":ne=>U.$emit("showNewPartialModal",ne)},t.createSlots({_:2},[e.enableVaultSecretPicker?{name:t.unref(ge.AUTOFILL_SLOT_NAME),fn:t.withCtx(ne=>[ne.schema.referenceable?(t.openBlock(),t.createBlock(t.unref(gn.VaultSecretPickerProvider),t.mergeProps({key:0},ne,{onOpen:w}),null,16)):t.createCommentVNode("",!0)]),key:"0"}:void 0]),1064,["enable-redis-partial","form-model","form-options","form-schema","is-editing","show-new-partial-modal"])):(t.openBlock(),t.createBlock(t.unref(ge.VueFormGenerator),{key:2,"enable-redis-partial":e.enableRedisPartial,"is-editing":e.editing,model:S,options:ie.value,schema:T.value,onModelUpdated:Z,onPartialToggled:K,onRefreshModel:$,onShowNewPartialModal:F[1]||(F[1]=ne=>U.$emit("showNewPartialModal",ne))},t.createSlots({"plugin-config-empty-state":t.withCtx(()=>[t.createElementVNode("div",m_,t.toDisplayString(t.unref(b)("plugins.form.grouping.plugin_configuration.empty")),1)]),_:2},[(ce=t.unref(et)[S.name])!=null&&ce.fieldRules&&(a.config.isNewOtelSchema||S.name!=="opentelemetry")?{name:"plugin-config-before-content",fn:t.withCtx(()=>[t.createVNode(Zl,{rules:t.unref(et)[S.name].fieldRules},null,8,["rules"])]),key:"0"}:void 0,e.enableVaultSecretPicker?{name:t.unref(ge.AUTOFILL_SLOT_NAME),fn:t.withCtx(ne=>[ne.schema.referenceable?(t.openBlock(),t.createBlock(t.unref(gn.VaultSecretPickerProvider),t.mergeProps({key:0},ne,{onOpen:w}),null,16)):t.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["enable-redis-partial","is-editing","model","options","schema"]))])):t.createCommentVNode("",!0)]),t.createVNode(t.unref(gn.VaultSecretPicker),{config:a.config,setup:Q.value,onCancel:F[2]||(F[2]=()=>Q.value=!1),onProceed:O},null,8,["config","setup"])],64)}}}),[["__scopeId","data-v-780e65cb"]]),y_={key:1},h_=t.defineComponent({__name:"PluginFormActionsWrapper",props:{teleportTarget:{type:String,default:""}},setup(e){return(n,r)=>e.teleportTarget?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:e.teleportTarget},[t.renderSlot(n.$slots,"default")],8,["to"])):(t.openBlock(),t.createElementBlock("div",y_,[t.renderSlot(n.$slots,"default")]))}}),__={class:"kong-ui-entities-plugin-form-container"},b_={key:0},k_={class:"plugin-form-actions"},C_=se(t.defineComponent({__name:"PluginForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},pluginType:{type:String,required:!0},pluginId:{type:String,default:""},hideScopeSelection:{type:Boolean,default:!1},disableScopeSelection:{type:Boolean,default:!1},credential:{type:Boolean,default:!1},developer:{type:Boolean,default:!1},isWizardStep:{type:Boolean,default:!1},actionsTeleportTarget:{type:String,default:""},noCardWrapper:{type:Boolean,default:!1},hideViewConfigAction:{type:Boolean,default:!1},enableVaultSecretPicker:{type:Boolean,default:!1},schema:{type:Object,default:null},enableRedisPartial:{type:Boolean,default:!1}},emits:["cancel","error:fetch-schema","error","loading","update","model-updated","showNewPartialModal","globalAction"],setup(e,{emit:n}){var Y;const r=n,i=e,o=Ut.useRouter(),{i18n:{t:a}}=Se.useI18n(),{customSchemas:l,typedefs:s}=Se.useSchemas({app:i.config.app,credential:i.credential,experimentalRenders:i.config.app==="konnect"?i.config.experimentalRenders:void 0}),{formatPluginFieldLabel:d}=Se.usePluginHelpers(),{getMessageFromError:f}=L.useErrors(),{capitalize:p}=L.useStringHelpers(),{objectsAreEqual:c}=L.useHelpers(),{axiosInstance:u}=L.useAxios((Y=i.config)==null?void 0:Y.axiosRequestConfig),m=t.ref(!1),_=t.computed(()=>!!i.pluginId),b=t.computed(()=>i.pluginId?L.EntityBaseFormType.Edit:L.EntityBaseFormType.Create),g=t.ref(void 0),h=t.ref(void 0),k=t.computed(()=>!!(i.credential&&i.config.entityId)),P=t.ref(void 0),R=t.ref({}),I=t.ref(),y=t.ref();t.provide(Uo,{redisType:I,redisPath:y,isEditing:_.value});const T=t.ref(!1),A=t.reactive({enabled:!0,protocols:[],tags:[]}),S=t.reactive({fields:{enabled:!0,protocols:[],tags:[]},isReadonly:!1,clientErrorMessage:"",serverErrorMessage:""}),ie=t.ref([{title:a("view_configuration.json"),hash:"#json"},{title:a("view_configuration.yaml"),hash:"#yaml"}]);i.config.app==="konnect"&&ie.value.splice(1,0,{title:a("view_configuration.terraform"),hash:"#terraform"});const Q=t.ref(""),H=t.computed(()=>{if(k.value){let x=Pe.form[i.config.app].credential[b.value];return x=x.replace(/{resourceEndpoint}/gi,K.value),x}return i.config.entityType&&i.config.entityId?Pe.form[i.config.app].edit.forEntity.replace(/{entityType}/gi,i.config.entityType).replace(/{entityId}/gi,i.config.entityId):Pe.form[i.config.app].edit.all}),w=()=>{m.value=!m.value},O=t.computed(()=>{var oe,W,re,be,ke,M,V,Ge;const x=i.config.entityType==="consumers"&&i.config.entityId||((W=(oe=P.value)==null?void 0:oe.consumer)==null?void 0:W.id),D=i.config.entityType==="consumer_groups"&&i.config.entityId||((be=(re=P.value)==null?void 0:re.consumer_group)==null?void 0:be.id),E=i.config.entityType==="services"&&i.config.entityId||((M=(ke=P.value)==null?void 0:ke.service)==null?void 0:M.id),J=i.config.entityType==="routes"&&i.config.entityId||((Ge=(V=P.value)==null?void 0:V.route)==null?void 0:Ge.id);if(!(x||D||E||J))return{global:{entity:C.PluginScope.GLOBAL,entityEndpoint:"plugins"}};const G={};return E&&(G.service={entity:C.PluginScope.SERVICE,entityEndpoint:"services",id:E,idField:ut.SERVICE}),J&&(G.route={entity:C.PluginScope.ROUTE,entityEndpoint:"routes",id:J,idField:ut.ROUTE}),x&&(G.consumer={entity:C.PluginScope.CONSUMER,entityEndpoint:"consumers",id:x,idField:ut.CONSUMER}),D&&(G.consumer_group={entity:C.PluginScope.CONSUMER_GROUP,entityEndpoint:"consumer_groups",id:D,idField:ut.CONSUMER_GROUP}),i.config.entityType&&(G.focusedEntity={entity:C.PluginScope[i.config.entityType.substring(0,i.config.entityType.length-1).toUpperCase()],entityEndpoint:i.config.entityType,id:i.config.entityId,idField:ut[i.config.entityType.substring(0,i.config.entityType.length-1).toUpperCase()]}),G}),$=t.reactive({name:{default:i.pluginType,type:"input",inputType:"hidden",styleClasses:"d-none hidden-field",pinned:!0},enabled:{type:"switch",model:"enabled",label:a("plugins.form.fields.enabled.label"),textOn:a("plugins.form.fields.enabled.on_text"),textOff:a("plugins.form.fields.enabled.off_text"),styleClasses:"field-switch hide-label",default:!0,pinned:!0},selectionGroup:{type:i.hideScopeSelection&&(i.hideScopeSelection||b.value===L.EntityBaseFormType.Create&&i.config.entityId)?"foreign":"selectionGroup",disabled:i.disableScopeSelection,inputType:"hidden",styleClasses:"hide-label",fields:[{label:a("plugins.form.scoping.global.label"),description:a("plugins.form.scoping.global.help")}],pinned:!0},protocols:{id:"protocols",default:[],help:a("plugins.form.fields.protocols.help"),label:a("plugins.form.fields.protocols.label"),required:!0,styleClasses:"plugin-protocols-select",type:"multiselect",values:[{label:"grpc",value:"grpc"},{label:"grpcs",value:"grpcs"},{label:"http",value:"http"},{label:"https",value:"https"},{label:"tcp",value:"tcp"},{label:"tls",value:"tls"},{label:"tls_passthrough",value:"tls_passthrough"},{label:"udp",value:"udp"},{label:"ws",value:"ws"},{label:"wss",value:"wss"}]},instance_name:{default:"",type:"input",label:a("plugins.form.fields.instance_name.label"),inputType:"text",help:a("plugins.form.fields.instance_name.help")},tags:s.tags}),K=t.computed(()=>{var E;const x=i.developer?"developers":"consumers",D=((E=Tt[i.pluginType])==null?void 0:E.endpoint)||"/plugins";return`${x}/${i.config.entityId}${i.developer?"/credentials":""}${D}`}),Z=x=>{const D=Array.from(new Set(x.map(E=>typeof E)));return D.length>1?"string":D[0]},q=(x,D,E,J)=>{var re,be;let G=D&&D.fields||[];const oe=l[i.pluginType],W=(be=(re=Tt[i.pluginType])==null?void 0:re.schema)==null?void 0:be.fields;return Array.isArray(G)&&(G=G.reduce((ke,M)=>{const V=Object.keys(M)[0];return V.match(/-/g)?ke[V.replace(/-/g,"_")]={...M[V],fieldNameHasDashes:!0}:ke[V]=M[V],ke},{})),Object.keys(G).sort().forEach(ke=>{var ln,sn,cn,dn,un,pn,fn;const M=G[ke];M.type==="set"&&(M.type="array");const V=x?`${x}-${ke}`:`${ke}`;if((ln=oe==null?void 0:oe.fieldsToDelete)!=null&&ln.includes(V)){Co(E,V);return}if(Object.prototype.hasOwnProperty.call(M,"overwrite")||M.hidden)return;if(M.type==="table")return q(V,M.schema,E);if(M.fields)return J&&M.type==="record"?(E[V]={type:"object",model:ke,schema:{fields:Object.values(q(V,M,{},!0))}},E):q(V,M,E);if(E[V]={id:V,model:ke},E[V].type=M.type==="boolean"?"checkbox":"input",E[V].required=M.required,E[V].referenceable=M.referenceable,V.startsWith("config-"))if(!J&&M.type==="array"&&(Q.value=V),J&&Q.value&&V.startsWith(Q.value)){const ue=V.slice(Q.value.length+1);E[V].label=ue.split("-").map(d).join(".")}else E[V].label=d(V);if((x==="config"||x.startsWith("config-"))&&(sn=G[ke])!=null&&sn.description&&(E[V].help=mn.marked.parse(G[ke].description,{mangle:!1,headerIds:!1})),M.type==="map"){if(E[V].type="object-advanced",E[V].values=M.values,M.values.type==="array"){const{type:ue}=M.values.elements||{};E[V].schema={fields:[{schema:{fields:[{...Ae,model:V,valueArrayType:ue==="integer"?"number":ue||"string",inputAttributes:{...Ae.inputAttributes,type:ue==="integer"?"number":"text",inputMode:ue==="integer"?"numeric":"text"}}]}}]}}else M.values.fields&&(E[V].schema={fields:[{type:"object",model:"object",schema:{fields:M.values.fields.map(ue=>{const Re=Object.keys(ue)[0];return{model:Re,type:"input",label:p(Re),placeholder:Re,inputType:ue[Re].type}})}}]});return E}if(M.enum&&M.type==="array"&&(E[V].type="checklist",E[V].values=M.enum,E[V].multi=!0,E[V].multiSelect=!0),M.one_of&&M.type!=="array"&&(E[V].type="select",E[V].values=M.one_of,E[V].selectOptions={noneSelectedText:a("plugins.form.no_selection")}),M.elements&&M.type==="array"){const ue=M.elements;if(E[V].referenceable=ue.referenceable,E[V].elements=ue,["string","integer","number"].includes(ue.type)&&!ue.one_of){const{id:Re,help:Ne,label:ye,hint:Ve,values:He,referenceable:Et,model:St}=E[V],{inputAttributes:Kn,...gb}=JSON.parse(JSON.stringify(Ae));Kn.type=ue.type==="string"?"text":"number",E[V]={id:Re,help:Ne,label:ye,hint:Ve,values:He,referenceable:Et,model:St,inputAttributes:Kn,...gb}}}if(M.hint&&(E[V].hint=M.hint),oe&&!oe.overwriteDefault&&Object.keys(oe).forEach(ue=>{if(ue===V){const{help:Re,label:Ne,hint:ye,values:Ve,referenceable:He,elements:Et}=E[V],{help:St,...Kn}=oe[ue];E[V]={help:Re,label:Ne,hint:ye,values:Ve,referenceable:He,elements:Et,...Kn},typeof St=="string"&&(E[V].help=mn.marked.parse(St,{mangle:!1,headerIds:!1}))}}),M.type==="array"&&((cn=M.elements)==null?void 0:cn.type)==="record"&&Array.isArray(M.elements.fields)){let ue={};for(const Ne of M.elements.fields)ue={...ue,...Ne};const Re=(pn=(un=(dn=E[V])==null?void 0:dn.items)==null?void 0:un.schema)==null?void 0:pn.fields;if(Array.isArray(Re))for(const Ne of E[V].items.schema.fields){const ye=(fn=ue[Ne.model])==null?void 0:fn.description;Ne.help===void 0&&typeof ye=="string"&&(Ne.help=mn.marked.parse(ye,{mangle:!1,headerIds:!1}))}if(Re||(E[V].type="array",E[V].newElementButtonLabelClasses="kong-form-new-element-button-label",E[V].fieldClasses="array-card-container-wrapper",E[V].itemContainerComponent="FieldArrayCardContainer",E[V].items={type:"object",schema:{fields:Object.values(q(V,M.elements,{},!0))}},E[V].items.schema.fields.forEach(Ne=>{var ye,Ve;for(const He of M.elements.fields){const Et=Object.keys(He)[0],St=((Ve=(ye=Ne.id)==null?void 0:ye.split)==null?void 0:Ve.call(ye,"-"))??[];if(St[St.length-1]===Et){Ne.model=Et,Ne.label=d(Et);break}}}),M.elements.type==="record"&&(E[V].nestedFields=!0)),!E[V].nestedFields)E[V].items.default=()=>M.elements.fields.reduce((Ne,ye)=>{const Ve=Object.keys(ye)[0];return Ne[Ve]=ye[Ve].default,Ne},{});else{const Ne=(ye,Ve)=>{if(ye.type==="object"){ye.model&&(Ve[ye.model]={});for(const He of ye.schema.fields)Ne(He,ye.model?Ve[ye.model]:Ve)}else ye.model&&(Ve[ye.model]=ye.default)};E[V].items.default=()=>{const ye={};return Ne(E[V].items,ye),ye}}}if(k.value&&W){for(let ue=0;ue<W.length;ue++)if(W[ue][V]){E[V]={...E[V],...W[ue][V]};break}}if(M.required&&M.type!=="boolean"&&(E[V].required=!0,E[V].selectOptions={hideNoneSelectedText:!0}),M.required&&M.type==="boolean"&&(E[V].default=M.default??!1),M.default!=null&&typeof M.default!="object"&&M.default!=="function"&&(E[V].default=M.default),E[V].type==="input"){["string","number"].includes(typeof E[V].default)&&i.config.app==="konnect"&&(E[V].placeholder=`Default: ${E[V].default===""?"<empty string>":E[V].default}`);const{type:ue}=M.elements||{};ue&&(E[V].valueArrayType=ue==="integer"?"number":ue),E[V].inputType=M.type==="array"||M.type==="string"?M.encrypted?"password":"text":M.type}let Ge="string";M.enum?Ge=Z(M.enum):M.type==="boolean"?Ge="boolean":M.type==="number"||M.type==="integer"?(Ge="number",E[V].inputType="number"):M.type==="array"?(Ge="array",E[V].default=M.default,M.len_min>0&&(E[V].submitWhenNull=!0)):M.type==="foreign"?Ge="object":M.default&&Array.isArray(M.default)?(Ge="array",E[V].valueArrayType=Z(M.default)):M.default&&(Ge=typeof M.default),E[V].valueType=Ge,M.fieldNameHasDashes&&(E[V].fieldNameHasDashes=!0)}),E},v=()=>{var ke,M,V,Ge,ln,sn,cn,dn,un,pn,fn,ue;const x=((ke=et[i.pluginType])==null?void 0:ke.scope.includes(C.PluginScope.SERVICE))??!0,D=((M=et[i.pluginType])==null?void 0:M.scope.includes(C.PluginScope.ROUTE))??!0,E=((V=et[i.pluginType])==null?void 0:V.scope.includes(C.PluginScope.CONSUMER))??!0,J=i.config.disableConsumerGroupScope?!1:((Ge=et[i.pluginType])==null?void 0:Ge.scope.includes(C.PluginScope.CONSUMER_GROUP))??!0,G=i.config.entityType==="consumers"&&!!i.config.entityId||!!((sn=(ln=P.value)==null?void 0:ln.consumer)!=null&&sn.id),oe=i.config.entityType==="consumer_groups"&&!!i.config.entityId||!!((dn=(cn=P.value)==null?void 0:cn.consumer_group)!=null&&dn.id),W=i.config.entityType==="services"&&!!i.config.entityId||!!((pn=(un=P.value)==null?void 0:un.service)!=null&&pn.id),re=i.config.entityType==="routes"&&!!i.config.entityId||!!((ue=(fn=P.value)==null?void 0:fn.route)!=null&&ue.id),be=[];if(x&&be.push({id:"service-id",model:"service-id",label:a("plugins.form.scoping.gateway_service.label"),placeholder:a("plugins.form.scoping.gateway_service.placeholder"),type:"AutoSuggest",entity:"services",inputValues:{fields:["name","id"]},help:a("plugins.form.scoping.gateway_service.help"),disabled:W&&i.disableScopeSelection}),D&&be.push({id:"route-id",model:"route-id",label:a("plugins.form.scoping.route.label"),placeholder:a("plugins.form.scoping.route.placeholder"),type:"AutoSuggest",entity:"routes",inputValues:{fields:["name","id"],primaryField:"id"},help:a("plugins.form.scoping.route.help"),disabled:re&&i.disableScopeSelection}),E&&be.push({model:"consumer-id",label:a("plugins.form.scoping.consumer.label"),placeholder:a("plugins.form.scoping.consumer.placeholder"),type:"AutoSuggest",entity:"consumers",inputValues:{fields:["username","custom_id","id"],primaryField:"username"},help:a("plugins.form.scoping.consumer.help"),disabled:G&&i.disableScopeSelection}),J&&be.push({model:"consumer_group-id",label:a("plugins.form.scoping.consumer_group.label"),placeholder:a("plugins.form.scoping.consumer_group.placeholder"),type:"AutoSuggest",entity:"consumer_groups",entityDataKey:"consumer_group",inputValues:{fields:["name","id"],primaryField:"name"},help:a("plugins.form.scoping.consumer_group.help"),disabled:oe&&i.disableScopeSelection}),be.length){const Re=[...x?["service"]:[],...D?["route"]:[],...E?["consumer"]:[],...J?["consumer_group"]:[]],ye=Re.splice(Re.length-2,2).map(He=>a(He==="service"?"plugins.form.scoping.gateway_service.plural":`plugins.form.scoping.${He}.plural`)).join(`${Re.length>0?",":""} and/or `),Ve=["Specific",[...Re.length>0?[Re.map(He=>a(He==="service"?"plugins.form.scoping.gateway_service.plural":`plugins.form.scoping.${He}.plural`)).join(", ")]:[],ye].join(", ")].join(" ");$.selectionGroup.fields.push({label:a("plugins.form.scoping.label"),description:Ve,fields:[]}),$.selectionGroup.fields[1].fields=be}l[i.pluginType]&&l[i.pluginType].overwriteDefault&&Object.hasOwnProperty.call(l[i.pluginType],"formSchema")&&Object.assign($,l[i.pluginType].formSchema)},N=t.computed(()=>!c(S.fields,A,!0)),B=t.computed(()=>!qe.value&&!T.value&&(b.value===L.EntityBaseFormType.Create||N.value)),ae=t.ref(!1),de=t.ref(),le=x=>{i.credential&&x.password&&(x.password=""),S.fields.id=(x==null?void 0:x.id)||void 0,de.value=x==null?void 0:x.ordering,Object.assign(A,S.fields),P.value=x,ae.value=!0},fe=t.ref({}),U=x=>{var D;S.fields=x.model,S.fields.id=((D=P.value)==null?void 0:D.id)||void 0,Object.assign(A,x.originalModel),fe.value=x.data,i.isWizardStep&&r("model-updated",{model:S.fields,data:x.data,resourceEndpoint:K.value})},F=t.ref(new Map),z=t.computed(()=>[S.clientErrorMessage,S.serverErrorMessage].filter(Boolean).join("; ")),ce=x=>{x.valid?F.value.delete(x.model):F.value.set(x.model,x.error),S.clientErrorMessage=[...F.value.entries()].map(([D,E])=>`${D}: ${typeof E=="string"?E:f(E)}`).join("; "),S.clientErrorMessage&&(S.serverErrorMessage="")};t.watch([O,ae],(x,D)=>{const E=x[0]!==D[0],J=x[1],G=D[1];if(!k.value&&b.value===L.EntityBaseFormType.Edit&&(E||J&&J!==G)){const oe=q("config",R.value,$);je.value&&(oe._isCustomPlugin=!0),I.value&&(oe._supported_redis_partial_type=I.value),h.value=oe}},{deep:!0});const ne=()=>{i.config.cancelRoute?o.push(i.config.cancelRoute):r("cancel")},pe=t.computed(()=>{let x=`${i.config.apiBaseUrl}${Pe.form[i.config.app].validate}`;return i.config.app==="konnect"?x=x.replace(/{controlPlaneId}/gi,i.config.controlPlaneId||""):i.config.app==="kongManager"&&(x=x.replace(/\/{workspace}/gi,i.config.workspace?`/${i.config.workspace}`:"")),x=x.replace(/{id}/gi,i.pluginId),x}),Me=t.computed(()=>{const x=i.config.entityType&&i.config.entityId&&!i.developer,D=k.value?Pe.form[i.config.app].credential[b.value]:Pe.form[i.config.app][b.value][x?"forEntity":"all"];let E=`${i.config.apiBaseUrl}${D}`;return i.config.app==="konnect"?E=E.replace(/{controlPlaneId}/gi,i.config.controlPlaneId||""):i.config.app==="kongManager"&&(E=E.replace(/\/{workspace}/gi,i.config.workspace?`/${i.config.workspace}`:"")),E=E.replace(/{resourceEndpoint}/gi,K.value),E=E.replace(/{id}/gi,i.pluginId),E=E.replace(/{entityType}/gi,i.config.entityType||""),E=E.replace(/{entityId}/gi,i.config.entityId||""),E}),je=t.computed(()=>!Object.keys(et).includes(i.pluginType)),_e=t.computed(()=>{const x=fe.value;if(k.value){for(const D in C.PluginScope){const E=C.PluginScope[D];x[E]&&!x[E].id&&(x[E]={id:i.config.entityId})}delete x.created_at}return fe.value.partials&&y.value&&Co(x,y.value),x}),me=async()=>{if(!S.clientErrorMessage&&!i.isWizardStep)try{S.isReadonly=!0;let x;const D=JSON.parse(JSON.stringify(_e.value)),E=l[i.pluginType];typeof(E==null?void 0:E.shamefullyTransformPayload)=="function"&&E.shamefullyTransformPayload({originalModel:A,model:S.fields,payload:D,schema:h.value}),!k.value&&!je.value&&await u.post(pe.value,D),b.value==="create"?x=await u.post(Me.value,D):b.value==="edit"&&(x=i.config.app==="konnect"||I.value&&D.partials?await u.put(Me.value,Object.assign({ordering:de.value},D)):await u.patch(Me.value,D)),Object.assign(A,S.fields),r("update",x==null?void 0:x.data)}catch(x){S.serverErrorMessage=f(x),r("error",x)}finally{S.isReadonly=!1}},ee=t.computed(()=>{var J;const x=k.value?(J=Tt[i.pluginType])==null?void 0:J.schemaEndpoint:i.pluginType,D=k.value?Pe.form[i.config.app].credentialSchema:Pe.form[i.config.app].pluginSchema;let E=`${i.config.apiBaseUrl}${D}`;return i.config.app==="konnect"?E=E.replace(/{controlPlaneId}/gi,i.config.controlPlaneId||""):i.config.app==="kongManager"&&(E=E.replace(/\/{workspace}/gi,i.config.workspace?`/${i.config.workspace}`:"")),E=E.replace(/{plugin}/gi,x),E}),ot=t.ref(""),qe=t.ref(!1),j=t.ref("");return t.onBeforeMount(async()=>{var x,D,E,J;qe.value=!0;try{if(k.value&&i.config.app==="konnect"){const G=(x=Tt[i.pluginType])==null?void 0:x.schemaEndpoint,oe=wl[G];ot.value=G,h.value=q("",oe,{}),qe.value=!1}else{const G=i.schema??(await u.get(ee.value)).data;if(g.value=G,G)if(k.value)h.value=q("",G,{}),qe.value=!1;else{const oe=G.fields.find(re=>re.config);R.value=oe?oe.config:G,G.supported_partials&&(I.value=Object.keys(G.supported_partials).find(re=>[hn.REDIS_CE,hn.REDIS_EE].includes(re)),y.value=(D=G.supported_partials[I.value])==null?void 0:D[0]),v();const W=(E=G.fields.find(re=>re.protocols))==null?void 0:E.protocols;if(W){const{default:re=[],elements:be={}}=W;$.protocols.default=re,$.protocols.placeholder=i.config.app==="konnect"?a("plugins.form.fields.protocols.placeholderWithDefaultValues",{protocols:re.join(", ")}):a("plugins.form.fields.protocols.placeholder"),(J=be.one_of)!=null&&J.length&&($.protocols.values=be.one_of.map(ke=>({label:ke,value:ke})))}if(ae.value||b.value===L.EntityBaseFormType.Create){const re=q("config",R.value,$);I.value&&(re._supported_redis_partial_type=I.value),je.value&&(re._isCustomPlugin=!0),h.value=re}}}}catch(G){console.error(G),j.value=f(G),r("error:fetch-schema",G)}finally{qe.value=!1}}),(x,D)=>{const E=t.resolveComponent("KSkeleton"),J=t.resolveComponent("KEmptyState"),G=t.resolveComponent("KButton"),oe=t.resolveComponent("KTabs"),W=t.resolveComponent("KSlideout");return t.openBlock(),t.createElementBlock("div",__,[qe.value?(t.openBlock(),t.createBlock(E,{key:0,type:"form"})):j.value?(t.openBlock(),t.createBlock(J,{key:1,"action-button-visible":!1,"data-testid":"plugin-form-schema-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(t.unref(a)("errors.load_schema")),1)]),_:1})):(t.openBlock(),t.createBlock(t.unref(L.EntityBaseForm),{key:2,"can-submit":B.value,config:e.config,"edit-id":e.pluginId,"entity-type":t.unref(L.SupportedEntityType).Plugin,"error-message":z.value,"fetch-url":H.value,"form-fields":_e.value,"is-readonly":S.isReadonly,"no-validate":"","wrapper-component":e.noCardWrapper?"div":void 0,onCancel:ne,"onFetch:error":D[4]||(D[4]=re=>x.$emit("error",re)),"onFetch:success":le,onLoading:D[5]||(D[5]=re=>x.$emit("loading",re))},{"form-actions":t.withCtx(()=>[e.isWizardStep?(t.openBlock(),t.createElementBlock("div",b_)):(t.openBlock(),t.createBlock(h_,{key:1,"teleport-target":e.actionsTeleportTarget},{default:t.withCtx(()=>[t.createElementVNode("div",k_,[e.hideViewConfigAction?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(G,{key:0,appearance:"tertiary","data-testid":`plugin-${_.value?"edit":"create"}-form-view-configuration`,onClick:D[3]||(D[3]=re=>w())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.view_configuration")),1)]),_:1},8,["data-testid"])),t.createVNode(G,{appearance:"secondary",class:"form-action-button","data-testid":`plugin-${_.value?"edit":"create"}-form-cancel`,disabled:S.isReadonly,onClick:ne},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),t.createVNode(G,{appearance:"primary","data-testid":`plugin-${_.value?"edit":"create"}-form-submit`,disabled:!B.value||S.isReadonly,type:"submit",onClick:me},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.save")),1)]),_:1},8,["data-testid","disabled"])])]),_:1},8,["teleport-target"]))]),default:t.withCtx(()=>[t.createElementVNode("form",{hidden:"",onSubmit:me},null,32),t.createVNode(g_,{config:e.config,credential:k.value,editing:b.value===t.unref(L.EntityBaseFormType).Edit,"enable-redis-partial":e.enableRedisPartial,"enable-vault-secret-picker":i.enableVaultSecretPicker,"entity-map":O.value,"raw-schema":g.value,record:P.value,schema:h.value,onGlobalAction:D[0]||(D[0]=(re,be)=>x.$emit("globalAction",re,be)),onLoading:D[1]||(D[1]=re=>T.value=re),onModelUpdated:U,onShowNewPartialModal:D[2]||(D[2]=re=>x.$emit("showNewPartialModal",re)),onValidityChange:ce},null,8,["config","credential","editing","enable-redis-partial","enable-vault-secret-picker","entity-map","raw-schema","record","schema"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","wrapper-component"])),t.createVNode(W,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":60,title:t.unref(a)("view_configuration.title"),visible:m.value,onClose:w},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(t.unref(a)("view_configuration.message")),1),t.createVNode(oe,{"data-testid":"form-view-configuration-slideout-tabs",tabs:ie.value},{json:t.withCtx(()=>[t.createVNode(t.unref(L.JsonCodeBlock),{config:e.config,"entity-record":_e.value,"fetcher-url":Me.value,"request-method":i.pluginId?"put":"post"},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:t.withCtx(()=>[t.createVNode(t.unref(L.YamlCodeBlock),{"entity-record":_e.value},null,8,["entity-record"])]),terraform:t.withCtx(()=>[t.createVNode(t.unref(L.TerraformCodeBlock),{"credential-type":ot.value,"entity-record":_e.value,"entity-type":t.unref(L.SupportedEntityType).Plugin},null,8,["credential-type","entity-record","entity-type"])]),_:1},8,["tabs"])]),_:1},8,["title","visible"])])}}}),[["__scopeId","data-v-420ab237"]]),w_={class:"kong-ui-entities-plugins-list"},A_={class:"button-row"},E_={class:"empty-state-icon-gateway"},S_={class:"name-cell-wrapper"},P_={class:"info-wrapper"},T_={key:0,class:"info-name"},N_={key:1,class:"info-name"},x_={key:2,class:"info-type"},O_={key:1},I_=se(t.defineComponent({__name:"PluginList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||!e.getConfigureDynamicOrderingRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.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},canToggle:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},canRetrieveScopedEntity:{type:Function,required:!1,default:async()=>!0},canConfigureDynamicOrdering:{type:Function,required:!1,default:async()=>!0},title:{type:String,default:""},titleTag:{type:String,default:"h2"},useActionOutside:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","toggle-enabled"],setup(e,{emit:n}){var ot,qe;const r=Se.usePluginMetaData(),i=n,o=e,{i18n:{t:a}}=Se.useI18n(),l=Ut.useRouter(),{axiosInstance:s}=L.useAxios((ot=o.config)==null?void 0:ot.axiosRequestConfig),{hasRecords:d,handleStateChange:f}=L.useTableState(()=>R.value),p=t.computed(()=>d.value&&o.config.app==="konnect"),c=t.computed(()=>!o.enableV2EmptyStates&&o.config.app==="konnect"),u=t.computed(()=>!!o.config.entityId),m=t.computed(()=>{var j;return((j=o.config)==null?void 0:j.entityType)==="consumers"}),_=t.computed(()=>{var j;return((j=o.config)==null?void 0:j.entityType)==="consumer_groups"}),b=o.config.app==="konnect"||L.useGatewayFeatureSupported({gatewayInfo:o.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),g=t.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),h={name:{label:a("plugins.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1}};(qe=o.config)!=null&&qe.entityId||(h.appliedTo={label:a("plugins.list.table_headers.applied_to"),sortable:!1}),h.enabled={label:a("plugins.list.table_headers.enabled"),searchable:!0,sortable:!0},b&&(h.ordering={label:a("plugins.list.table_headers.ordering"),sortable:!0}),h.tags={label:a("plugins.list.table_headers.tags"),sortable:!1};const k=h,P=t.computed(()=>{var Y,x,D,E;let j=o.config.entityType?`${o.config.apiBaseUrl}${Pe.list[o.config.app].forEntity}`:`${o.config.apiBaseUrl}${Pe.list[o.config.app].all}`;return o.config.app==="konnect"?j=j.replace(/{controlPlaneId}/gi,((Y=o.config)==null?void 0:Y.controlPlaneId)||""):o.config.app==="kongManager"&&(j=j.replace(/\/{workspace}/gi,(x=o.config)!=null&&x.workspace?`/${o.config.workspace}`:"")),j.replace(/{entityType}/gi,((D=o.config)==null?void 0:D.entityType)||"").replace(/{entityId}/gi,((E=o.config)==null?void 0:E.entityId)||"")}),R=t.ref(""),I=t.computed(()=>o.config.app==="konnect"||o.config.isExactMatch?{isExactMatch:!0,fields:{name:h.name,id:{label:a("plugins.list.table_headers.id"),sortable:!0}},placeholder:a(`search.placeholder.${o.config.isExactMatch?"exact":o.config.app}`)}:{isExactMatch:!1,fields:{enabled:{...h.enabled,label:a("search.filter.field.enabled")},name:h.name,instance_name:{label:a("plugins.list.table_headers.instance_name"),searchable:!0}},schema:o.config.filterSchema}),{fetcher:y,fetcherState:T,fetcherCacheKey:A}=L.useFetcher(t.computed(()=>({...o.config,cacheIdentifier:o.cacheIdentifier})),P),S=()=>{R.value=""},ie=()=>{A.value++},Q=t.ref(null),H=j=>{var x,D,E,J;const Y=[];return((x=j.route)!=null&&x.id||j.route_id)&&Y.push({type:"route",badgeText:a("plugins.list.table_headers.applied_to_badges.route")}),((D=j.service)!=null&&D.id||j.service_id)&&Y.push({type:"service",badgeText:a("plugins.list.table_headers.applied_to_badges.service")}),((E=j.consumer)!=null&&E.id||j.consumer_id)&&Y.push({type:"consumer",badgeText:a("plugins.list.table_headers.applied_to_badges.consumer")}),((J=j.consumer_group)!=null&&J.id||j.consumer_group_id)&&Y.push({type:"consumer_group",badgeText:a("plugins.list.table_headers.applied_to_badges.consumer_group")}),Y.length?Y:[{type:null,badgeText:a("plugins.list.table_headers.applied_to_badges.global")}]},w=async(j,Y)=>{var x;return j===null?!1:await((x=o.canRetrieveScopedEntity)==null?void 0:x.call(o,j,Y.id))},O=(j,Y)=>{var D,E,J,G,oe;let x=null;switch(j){case"route":x=(D=Y.route)==null?void 0:D.id;break;case"service":x=(E=Y.service)==null?void 0:E.id;break;case"consumer":x=(J=Y.consumer)==null?void 0:J.id;break;case"consumer_group":x=(G=Y.consumer_group)==null?void 0:G.id;break}x&&((oe=o.config)!=null&&oe.getScopedEntityViewRoute)&&l.push(o.config.getScopedEntityViewRoute(j,x))},$=t.ref(!1),K=t.ref(null),Z=t.computed(()=>{const j={action:"disable",id:"",name:""};if(K.value){const{enabled:Y,id:x,name:D}=K.value;j.action=Y?"disable":"enable",j.id=x,j.name=r.getDisplayName(D)||x}return j}),q=j=>{$.value=!0,K.value=j},v=()=>{$.value=!1,K.value=null},N=async()=>{var D,E,J,G,oe,W,re,be;if(!await((D=o.canEdit)==null?void 0:D.call(o,K.value))||!K.value)return;let Y=`${o.config.apiBaseUrl}${(oe=Pe.item[o.config.app])==null?void 0:oe[(E=o.config)!=null&&E.entityType?"forEntity":"all"].replace(/{entityType}/gi,((J=o.config)==null?void 0:J.entityType)||"").replace(/{entityId}/gi,((G=o.config)==null?void 0:G.entityId)||"")}`.replace(/{id}/gi,K.value.id||"");o.config.app==="konnect"?Y=Y.replace(/{controlPlaneId}/gi,((W=o.config)==null?void 0:W.controlPlaneId)||""):o.config.app==="kongManager"&&(Y=Y.replace(/\/{workspace}/gi,(re=o.config)!=null&&re.workspace?`/${o.config.workspace}`:""));const x=!K.value.enabled;try{const{data:ke}=((be=o.config)==null?void 0:be.app)==="konnect"?await s.put(Y,{...K.value,enabled:x},{timeout:12e4}):await s.patch(Y,{...K.value,enabled:x},{timeout:12e4});i("toggle-enabled",x,ke),K.value.enabled=x}catch(ke){i("error",ke)}},B=async(j,Y)=>{const x=j.id;if(!await Y(x)){i("copy:error",{entity:j,field:"id",message:a("errors.copy")});return}i("copy:success",{entity:j,field:"id",message:a("copy.success",{val:x})})},ae=async(j,Y)=>{const x=JSON.stringify(j);if(!await Y(x)){i("copy:error",{entity:j,message:a("errors.copy")});return}i("copy:success",{entity:j,message:a("copy.success_brief")})},de=async j=>{var x;await((x=o.canRetrieve)==null?void 0:x.call(o,j))&&l.push(o.config.getViewRoute(j))},le=j=>({label:a("actions.view"),to:o.config.getViewRoute(j)}),fe=j=>({label:a("actions.edit"),to:o.config.getEditRoute(j)}),U=j=>({label:a("actions.configure_dynamic_ordering"),to:o.config.getConfigureDynamicOrderingRoute(j)}),F=t.ref(void 0),z=t.ref(!1),ce=t.ref(!1),ne=t.ref(""),pe=L.useDeleteUrlBuilder(o.config,P.value),Me=j=>{F.value=j,z.value=!0},je=()=>{z.value=!1},_e=async()=>{var j,Y,x;if((j=F.value)!=null&&j.id){ce.value=!0;try{await s.delete(pe(F.value.id)),ce.value=!1,z.value=!1,A.value++,i("delete:success",F.value)}catch(D){ne.value=((x=(Y=D.response)==null?void 0:Y.data)==null?void 0:x.message)||D.message||a("errors.delete"),i("error",D)}finally{ce.value=!1}}},me=()=>{l.push(o.config.createRoute)};t.watch(T,j=>{var Y,x,D;if(j.status===L.FetcherStatus.Error){Q.value={title:a("errors.general")},(D=(x=(Y=j.error)==null?void 0:Y.response)==null?void 0:x.data)!=null&&D.message&&(Q.value.message=j.error.response.data.message),i("error",j.error);return}Q.value=null});const ee=t.ref({ctaPath:o.config.createRoute,ctaText:void 0,message:`${a("plugins.list.empty_state.description")}${o.config.additionMessageForEmptyState?` ${o.config.additionMessageForEmptyState}`:""}`,title:a("plugins.title")});return t.onBeforeMount(async()=>{await o.canCreate()&&(ee.value.title=a("plugins.list.empty_state.title"),ee.value.ctaText=a("actions.create"))}),(j,Y)=>{const x=t.resolveComponent("KButton"),D=t.resolveComponent("KBadge"),E=t.resolveComponent("KTruncate"),J=t.resolveComponent("KInputSwitch"),G=t.resolveComponent("KDropdownItem"),oe=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",w_,[t.createVNode(t.unref(L.EntityBaseTable),{"cache-identifier":e.cacheIdentifier,"disable-sorting":g.value,"empty-state-options":ee.value,"enable-entity-actions":"","error-message":Q.value,fetcher:t.unref(y),"fetcher-cache-key":t.unref(A),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-plugins-list",query:R.value,"table-headers":t.unref(k),title:e.title,"title-tag":e.titleTag,onClearSearchInput:S,"onClick:row":Y[5]||(Y[5]=W=>de(W)),onSort:ie,onState:t.unref(f)},t.createSlots({"toolbar-filter":t.withCtx(()=>[t.createVNode(t.unref(L.EntityFilter),{modelValue:R.value,"onUpdate:modelValue":Y[0]||(Y[0]=W=>R.value=W),config:I.value},null,8,["modelValue","config"])]),"toolbar-button":t.withCtx(()=>[(t.openBlock(),t.createBlock(t.Teleport,{disabled:!e.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[t.createElementVNode("div",A_,[!u.value&&p.value?(t.openBlock(),t.createBlock(x,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"plugins-learn-more-button",icon:"",onClick:Y[1]||(Y[1]=W=>j.$emit("click:learn-more"))},{default:t.withCtx(()=>[t.createVNode(t.unref(he.BookIcon),{decorative:""})]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(L.PermissionsWrapper),{"auth-function":()=>e.canCreate()},{default:t.withCtx(()=>[t.createVNode(x,{appearance:"primary","data-testid":"toolbar-add-plugin",size:e.useActionOutside?"medium":"large",to:e.config.createRoute},{default:t.withCtx(()=>[t.createVNode(t.unref(he.AddIcon)),t.createTextVNode(" "+t.toDisplayString(t.unref(a)("plugins.list.toolbar_actions.new_plugin")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:t.withCtx(({row:W})=>[t.createElementVNode("div",S_,[t.createVNode(t.unref(jt.PluginIcon),{class:"plugin-icon",name:W.name,size:24},null,8,["name"]),t.createElementVNode("div",P_,[W.instance_name?(t.openBlock(),t.createElementBlock("span",T_,t.toDisplayString(W.instance_name),1)):(t.openBlock(),t.createElementBlock("span",N_,t.toDisplayString(t.unref(r).getDisplayName(W.name)),1)),W.instance_name?(t.openBlock(),t.createElementBlock("span",x_,t.toDisplayString(t.unref(r).getDisplayName(W.name)),1)):t.createCommentVNode("",!0)])])]),appliedTo:t.withCtx(({row:W})=>[H(W).length>0?(t.openBlock(),t.createBlock(E,{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(H(W),re=>(t.openBlock(),t.createBlock(t.unref(L.PermissionsWrapper),{key:re.badgeText,"auth-function":()=>w(re.type,W),"force-show":""},{default:t.withCtx(({isAllowed:be})=>[t.createVNode(D,{class:t.normalizeClass(be||"disabled"),onClick:t.withModifiers(ke=>be&&re.type&&O(re.type,W),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(re.badgeText),1)]),_:2},1032,["class","onClick"])]),_:2},1032,["auth-function"]))),128))]),_:2},1024)):(t.openBlock(),t.createElementBlock("span",O_,"-"))]),enabled:t.withCtx(({row:W})=>[t.createVNode(t.unref(L.PermissionsWrapper),{"auth-function":async()=>!!(await e.canEdit(W)&&await e.canToggle(W)),"force-show":""},{default:t.withCtx(({isAllowed:re})=>{var be,ke;return[t.createElementVNode("div",{onClick:Y[4]||(Y[4]=t.withModifiers(()=>{},["stop"]))},[t.createVNode(J,{disabled:!re,"disabled-tooltip-text":!re&&((ke=(be=e.config).getToggleDisabledTooltip)==null?void 0:ke.call(be,W))||void 0,"model-value":W.enabled,onClick:t.withModifiers(M=>re&&q(W),["stop","prevent"])},null,8,["disabled","disabled-tooltip-text","model-value","onClick"])])]}),_:2},1032,["auth-function"])]),ordering:t.withCtx(({rowValue:W})=>[t.createVNode(D,{appearance:t.unref(_o)(W)?"info":"warning"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(_o)(W)?t.unref(a)("plugins.list.table_headers.ordering_badge.static"):t.unref(a)("plugins.list.table_headers.ordering_badge.dynamic")),1)]),_:2},1032,["appearance"])]),tags:t.withCtx(({rowValue:W})=>[t.createVNode(t.unref(L.TableTags),{tags:W},null,8,["tags"])]),actions:t.withCtx(({row:W})=>[t.createVNode(oe,null,{default:t.withCtx(({copyToClipboard:re})=>[t.createVNode(G,{"data-testid":"action-entity-copy-id",onClick:be=>B(W,re)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(oe,null,{default:t.withCtx(({copyToClipboard:re})=>[t.createVNode(G,{"data-testid":"action-entity-copy-json",onClick:be=>ae(W,re)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),t.createVNode(t.unref(L.PermissionsWrapper),{"auth-function":()=>e.canRetrieve(W)},{default:t.withCtx(()=>[t.createVNode(G,{"data-testid":"action-entity-view","has-divider":"",item:le(W)},null,8,["item"])]),_:2},1032,["auth-function"]),t.createVNode(t.unref(L.PermissionsWrapper),{"auth-function":()=>e.canEdit(W)},{default:t.withCtx(()=>[t.createVNode(G,{"data-testid":"action-entity-edit",item:fe(W)},null,8,["item"])]),_:2},1032,["auth-function"]),!m.value&&!_.value&&t.unref(b)?(t.openBlock(),t.createBlock(t.unref(L.PermissionsWrapper),{key:0,"auth-function":()=>e.canConfigureDynamicOrdering(W)},{default:t.withCtx(()=>[U(W)?(t.openBlock(),t.createBlock(G,{key:0,"data-testid":"action-entity-config-dyn-order",item:U(W)},null,8,["item"])):t.createCommentVNode("",!0)]),_:2},1032,["auth-function"])):t.createCommentVNode("",!0),t.createVNode(t.unref(L.PermissionsWrapper),{"auth-function":()=>e.canDelete(W)},{default:t.withCtx(()=>[t.createVNode(G,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:re=>Me(W)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!t.unref(d)&&c.value?{name:"outside-actions",fn:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.Teleport,{disabled:!e.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[t.createVNode(x,{appearance:"secondary",class:"open-learning-hub","data-testid":"plugins-learn-more-button",icon:"",onClick:Y[2]||(Y[2]=W=>j.$emit("click:learn-more"))},{default:t.withCtx(()=>[t.createVNode(t.unref(he.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!R.value&&e.enableV2EmptyStates&&e.config.app==="konnect"?{name:"empty-state",fn:t.withCtx(()=>{var W;return[t.createVNode(t.unref(L.EntityEmptyState),{"action-button-text":t.unref(a)("plugins.list.empty_state_v2.create_cta"),appearance:"secondary","can-create":()=>e.canCreate(),"data-testid":e.config.entityId?"nested-plugins-entity-empty-state":"plugins-entity-empty-state",description:t.unref(a)("plugins.list.empty_state_v2.description"),"learn-more":e.config.app==="konnect",title:t.unref(a)("plugins.list.empty_state_v2.title"),"onClick:create":me,"onClick:learnMore":Y[3]||(Y[3]=re=>j.$emit("click:learn-more"))},t.createSlots({image:t.withCtx(()=>[t.createElementVNode("div",E_,[t.createVNode(t.unref(he.PlugIcon),{color:t.unref(um),size:t.unref(mm)},null,8,["color","size"])])]),_:2},[(W=e.config)!=null&&W.isControlPlaneGroup?{name:"message",fn:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("plugins.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","data-testid","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","title","title-tag","onState"]),t.createVNode(t.unref(L.EntityToggleModal),{action:Z.value.action,"entity-id":Z.value.id,"entity-name":Z.value.name,"entity-type":t.unref(a)("glossary.plugin"),"on-confirm":N,visible:$.value,onCancel:v,onProceed:v},null,8,["action","entity-id","entity-name","entity-type","visible"]),t.createVNode(t.unref(L.EntityDeleteModal),{"action-pending":ce.value,description:t.unref(a)("delete.description"),"entity-name":F.value&&(F.value.instance_name||F.value.name||F.value.id),"entity-type":t.unref(L.EntityTypes).Plugin,error:ne.value,title:t.unref(a)("delete.title"),visible:z.value,onCancel:je,onProceed:_e},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),[["__scopeId","data-v-a33ca66d"]]),v_={class:"plugin-select-card-wrapper"},R_=["data-testid"],B_={class:"plugin-card-header"},L_={class:"plugin-card-title"},$_={key:0,class:"plugin-card-actions"},D_=["data-testid","title"],V_={key:0,class:"plugin-card-text"},F_={key:0},K_=["title"],Hr=se(t.defineComponent({__name:"PluginSelectCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.getCreateRoute)},canDeleteCustomPlugin:{type:Boolean,default:!1},canEditCustomPlugin:{type:Boolean,default:!1},plugin:{type:Object,required:!0},navigateOnClick:{type:Boolean,default:!0}},emits:["plugin-clicked","custom-plugin-delete"],setup(e,{emit:n}){const r=n,i=e,o=Ut.useRouter(),{i18n:{t:a}}=Se.useI18n(),l=t.computed(()=>i.config.app==="konnect"?i.config.controlPlaneId:""),s=t.computed(()=>!!(!i.plugin.available||i.plugin.disabledMessage)),d=t.computed(()=>!!(m.value&&!u.value&&i.navigateOnClick&&l.value&&(i.canDeleteCustomPlugin||i.canEditCustomPlugin))),f=()=>{o.push(i.config.getCreateRoute(i.plugin.id))},p=()=>{i.navigateOnClick?f():c()},c=()=>{r("plugin-clicked",i.plugin)},u=t.computed(()=>i.plugin.id==="custom-plugin-create"),m=t.computed(()=>i.config.app==="konnect"&&i.plugin.group===C.PluginGroup.CUSTOM_PLUGINS),_=()=>{i.config.app==="konnect"&&r("custom-plugin-delete")},b=(h,k)=>{const P=i.config;i.config.app==="konnect"&&typeof P.getCustomEditRoute=="function"&&P.getCustomEditRoute&&o.push(P.getCustomEditRoute(h,k))},g=()=>{if(!s.value&&i.config.app==="konnect"){const h=i.config;u.value&&h.createCustomRoute?o.push(h.createCustomRoute):m.value&&f()}};return(h,k)=>{const P=t.resolveComponent("KButton"),R=t.resolveComponent("KDropdownItem"),I=t.resolveComponent("KDropdownMenu"),y=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("div",v_,[t.createVNode(y,{text:e.plugin.disabledMessage},{default:t.withCtx(()=>[t.createElementVNode("a",{class:t.normalizeClass(["plugin-select-card",{disabled:s.value}]),"data-testid":`${e.plugin.id}-card`,role:"button",onClick:k[1]||(k[1]=T=>s.value||m.value?void 0:p())},[t.createElementVNode("div",B_,[t.createElementVNode("div",L_,[t.createElementVNode("span",{class:t.normalizeClass({"non-custom-title":!m.value})},t.toDisplayString(e.plugin.name),3)]),d.value?(t.openBlock(),t.createElementBlock("div",$_,[t.createVNode(I,{"data-testid":"custom-plugin-actions","kpop-attributes":{placement:"bottom-end"},width:"150"},{default:t.withCtx(()=>[t.createVNode(P,{appearance:"tertiary",class:"actions-trigger","data-testid":"overflow-actions-button",icon:"",size:"small"},{default:t.withCtx(()=>[t.createVNode(t.unref(he.MoreIcon),{size:t.unref(fm)},null,8,["size"])]),_:1})]),items:t.withCtx(()=>[e.canDeleteCustomPlugin?(t.openBlock(),t.createBlock(R,{key:0,"data-testid":"edit-plugin-schema",onClick:k[0]||(k[0]=t.withModifiers(T=>b(e.plugin.name,e.plugin.customPluginType),["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.edit")),1)]),_:1})):t.createCommentVNode("",!0),e.canDeleteCustomPlugin?(t.openBlock(),t.createBlock(R,{key:1,danger:"","data-testid":"delete-plugin-schema","has-divider":"",onClick:t.withModifiers(_,["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.delete")),1)]),_:1})):t.createCommentVNode("",!0)]),_:1})])):t.createCommentVNode("",!0)]),t.createElementVNode("div",{class:t.normalizeClass(["plugin-card-body",{"custom-plugin":m.value}]),"data-testid":e.plugin.name,title:e.plugin.available?e.plugin.name:t.unref(a)("plugins.select.unavailable_tooltip"),onClick:g},[t.createVNode(t.unref(jt.PluginIcon),{alt:e.plugin.name,class:"plugin-card-icon",name:e.plugin.id,size:55},null,8,["alt","name"]),e.plugin.description||m.value&&!u.value?(t.openBlock(),t.createElementBlock("div",V_,[m.value&&!u.value?(t.openBlock(),t.createElementBlock("p",F_,t.toDisplayString(t.unref(a)("plugins.select.custom_badge_text")),1)):t.createCommentVNode("",!0),e.plugin.description?(t.openBlock(),t.createElementBlock("p",{key:1,class:"plugin-card-text",title:e.plugin.description},t.toDisplayString(e.plugin.description),9,K_)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],10,D_),t.createElementVNode("div",{class:"plugin-card-footer",onClick:g},t.toDisplayString(u.value?t.unref(a)("actions.create_custom"):e.plugin.exists?t.unref(a)("actions.enabled"):t.unref(a)("actions.enable")),1)],10,R_)]),_:1},8,["text"])])}}}),[["__scopeId","data-v-65d53934"]]),U_=se(t.defineComponent({__name:"DeleteCustomPluginSchemaModal",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app))},plugin:{type:Object,required:!0}},emits:["closed","proceed"],setup(e,{emit:n}){var _;const r=e,i=n,{i18nT:o,i18n:{t:a}}=Se.useI18n(),{getMessageFromError:l}=L.useErrors(),{axiosInstance:s}=L.useAxios((_=r.config)==null?void 0:_.axiosRequestConfig),d=t.computed(()=>{var b;return c.value?a("delete.plugin_schema_in_use_title"):a("delete.title",{name:((b=r.plugin)==null?void 0:b.name)||a("delete.custom_plugin")})}),f=t.ref(!1),p=t.ref(""),c=t.ref(!1),u=t.computed(()=>{if(r.config.app==="konnect"){const b=r.plugin.customPluginType==="streaming"?Pe.select[r.config.app].streamingCustomPluginItem:Pe.select[r.config.app].schemaCustomPluginItem;let g=`${r.config.apiBaseUrl}${b}`;return g=g.replace(/{controlPlaneId}/gi,r.config.controlPlaneId||""),g=g.replace(/{pluginId}/gi,r.plugin.id),g}return null}),m=async()=>{var b,g,h,k;if(f.value=!0,p.value="",!(!((b=r.plugin)!=null&&b.name)||((g=r.config)==null?void 0:g.app)!=="konnect"))try{u.value&&await s.delete(u.value),i("proceed")}catch(P){const{response:R}=P;(R==null?void 0:R.status)===400&&((k=(h=R.data)==null?void 0:h.message)!=null&&k.includes("plugin schema is currently in use"))?c.value=!0:p.value=l(P)}finally{f.value=!1}};return(b,g)=>{const h=t.resolveComponent("KButton"),k=t.resolveComponent("KModal");return!c.value&&e.plugin?(t.openBlock(),t.createBlock(t.unref(L.EntityDeleteModal),{key:0,"action-pending":f.value,class:"delete-custom-plugin-schema-modal","data-testid":"delete-custom-plugin-schema-modal",description:t.unref(a)("delete.description_custom"),"entity-name":e.plugin.name,"entity-type":t.unref(L.EntityTypes).Plugin,error:p.value,"need-confirm":"",title:d.value,visible:"",onCancel:g[0]||(g[0]=P=>b.$emit("closed")),onProceed:m},null,8,["action-pending","description","entity-name","entity-type","error","title"])):e.plugin?(t.openBlock(),t.createBlock(k,{key:1,"action-button-disabled":f.value,class:"delete-custom-plugin-schema-modal","data-testid":"delete-custom-plugin-schema-modal",title:d.value,visible:"",onCancel:g[2]||(g[2]=P=>b.$emit("closed"))},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(o),{keypath:"delete.plugin_schema_in_use_message",tag:"p"},{name:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(e.plugin.name),1)]),_:1})])]),"footer-actions":t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(h,{appearance:"tertiary",class:"cancel-button","data-testid":"delete-custom-plugin-form-cancel",onClick:g[1]||(g[1]=P=>b.$emit("closed"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("actions.cancel")),1)]),_:1})])]),_:1},8,["action-button-disabled","title"])):t.createCommentVNode("",!0)}}}),[["__scopeId","data-v-9e0dee7f"]]),M_={class:"custom-plugins-grid"},j_={class:"empty-state-title"},q_={class:"empty-state-description"},zr=310,G_=se(t.defineComponent({__name:"PluginCustomGrid",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.getCreateRoute)},canCreateCustomPlugin:{type:Boolean,default:!1},canDeleteCustomPlugin:{type:Boolean,default:!1},canEditCustomPlugin:{type:Boolean,default:!1},pluginList:{type:Object,default:()=>({})},navigateOnClick:{type:Boolean,default:!0}},emits:["plugin-clicked","revalidate","delete:success"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=Se.useI18n(),{getTallestPluginCardHeight:a,getToggleVisibility:l}=Se.usePluginHelpers(),s=t.ref(!0),d=I=>{i("plugin-clicked",I)},f=t.computed(()=>{if(r.config.app==="kongManager")return[];const I=JSON.parse(JSON.stringify(r.pluginList))[C.PluginGroup.CUSTOM_PLUGINS]||[];return r.canCreateCustomPlugin&&r.navigateOnClick&&r.config.createCustomRoute?[{id:"custom-plugin-create",name:o("plugins.select.tabs.custom.create.name"),available:!0,group:C.PluginGroup.CUSTOM_PLUGINS,description:o("plugins.select.tabs.custom.create.description")}].concat(I):I}),p=t.ref(!1),c=t.ref(null),u=I=>{p.value=!0,c.value={id:I.id,name:I.name,customPluginType:I.customPluginType}},m=I=>{var y;I&&(i("revalidate"),i("delete:success",((y=c.value)==null?void 0:y.name)||"")),p.value=!1,c.value=null},_=t.ref(zr),b=t.ref(null),g=t.ref(null),h=t.computed(()=>s.value?{overflowY:"hidden",maxHeight:`${_.value}px`}:{}),k=t.ref(!1),P=()=>{_.value=Math.max(a(g.value),zr),R()},R=()=>{var I,y;(I=g.value)!=null&&I.length&&(k.value=l(b.value,(y=g.value)==null?void 0:y.length))};return t.onMounted(async()=>{await t.nextTick(),_.value=Math.max(a(g.value),zr),R(),window==null||window.addEventListener("resize",P)}),t.onUnmounted(()=>{window==null||window.removeEventListener("resize",P)}),(I,y)=>{const T=t.resolveComponent("KEmptyState"),A=t.resolveComponent("KCollapse");return t.openBlock(),t.createElementBlock("div",M_,[f.value.length?(t.openBlock(),t.createBlock(A,{key:1,modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=S=>s.value=S),class:"custom-plugins-collapse","data-testid":`${t.unref(C.PluginGroup).CUSTOM_PLUGINS}-collapse`,title:t.unref(C.PluginGroup).CUSTOM_PLUGINS,"trigger-label":s.value?t.unref(o)("plugins.select.view_more"):t.unref(o)("plugins.select.view_less")},t.createSlots({"visible-content":t.withCtx(()=>[t.createElementVNode("div",{ref_key:"pluginCardContainerRef",ref:b,class:"plugin-card-container",style:t.normalizeStyle(h.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.value,(S,ie)=>(t.openBlock(),t.createBlock(Hr,{key:`plugin-card-${ie}`,ref_for:!0,ref_key:"pluginCardRef",ref:g,"can-delete-custom-plugin":e.canDeleteCustomPlugin,"can-edit-custom-plugin":e.canEditCustomPlugin,config:e.config,"navigate-on-click":e.navigateOnClick,plugin:S,onCustomPluginDelete:Q=>u(S),onPluginClicked:d},null,8,["can-delete-custom-plugin","can-edit-custom-plugin","config","navigate-on-click","plugin","onCustomPluginDelete"]))),128))],4)]),_:2},[k.value?void 0:{name:"trigger",fn:t.withCtx(()=>[y[2]||(y[2]=t.createTextVNode(" "))]),key:"0"}]),1032,["modelValue","data-testid","title","trigger-label"])):(t.openBlock(),t.createBlock(T,{key:0,"action-button-visible":!1,class:"custom-plugins-empty-state","icon-variant":"kong"},{title:t.withCtx(()=>[t.createElementVNode("span",j_,t.toDisplayString(t.unref(o)("plugins.select.tabs.custom.empty_title")),1)]),default:t.withCtx(()=>[t.createElementVNode("span",q_,t.toDisplayString(t.unref(o)("plugins.select.tabs.custom.empty_description")),1)]),_:1})),p.value&&c.value?(t.openBlock(),t.createBlock(U_,{key:2,config:e.config,plugin:c.value,onClosed:m,onProceed:y[1]||(y[1]=S=>m(!0))},null,8,["config","plugin"])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-f4b90f47"]]),Wr=310,ll=se(t.defineComponent({__name:"PluginSelectGroup",props:t.mergeModels({config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.getCreateRoute)},name:{type:String,required:!0},plugins:{type:Array,required:!0},navigateOnClick:{type:Boolean,default:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["plugin-clicked"],["update:modelValue"]),setup(e,{emit:n}){const r=t.useModel(e,"modelValue"),i=e,o=n,{i18n:{t:a}}=Se.useI18n(),{getTallestPluginCardHeight:l,getToggleVisibility:s}=Se.usePluginHelpers(),d=t.ref(Wr),f=t.ref(null),p=t.ref(null),c=t.computed(()=>r.value?{overflowY:"hidden",maxHeight:`${d.value}px`}:{}),u=t.ref(!1),m=()=>{d.value=Math.max(l(p.value),Wr),_()},_=()=>{var b,g;(b=p.value)!=null&&b.length&&(u.value=s(f.value,(g=p.value)==null?void 0:g.length))};return t.onMounted(async()=>{await t.nextTick(),d.value=Math.max(l(p.value),Wr),_(),window==null||window.addEventListener("resize",m)}),t.onUnmounted(()=>{window==null||window.removeEventListener("resize",m)}),(b,g)=>{const h=t.resolveComponent("KCollapse");return t.openBlock(),t.createBlock(h,{modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=k=>r.value=k),class:"plugins-collapse","data-testid":`${i.name}-collapse`,title:i.name,"trigger-label":r.value?t.unref(a)("plugins.select.view_more"):t.unref(a)("plugins.select.view_less")},t.createSlots({"visible-content":t.withCtx(()=>[t.createElementVNode("div",{ref_key:"pluginCardContainerRef",ref:f,class:"plugin-card-container",style:t.normalizeStyle(c.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.plugins,k=>(t.openBlock(),t.createBlock(Hr,{key:`plugin-card-${k.id}`,ref_for:!0,ref_key:"pluginCardRef",ref:p,config:e.config,"navigate-on-click":e.navigateOnClick,plugin:k,onPluginClicked:P=>o("plugin-clicked",k)},null,8,["config","navigate-on-click","plugin","onPluginClicked"]))),128))],4)]),_:2},[u.value?void 0:{name:"trigger",fn:t.withCtx(()=>[g[1]||(g[1]=t.createTextVNode(" "))]),key:"0"}]),1032,["modelValue","data-testid","title","trigger-label"])}}}),[["__scopeId","data-v-a1074120"]]),H_={class:"plugin-select-grid"},z_={class:"empty-state-title"},W_={class:"empty-state-description"},Yr=t.defineComponent({__name:"PluginSelectGrid",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.getCreateRoute)},pluginList:{type:Object,default:()=>({})},navigateOnClick:{type:Boolean,default:!0},highlightedPlugins:{type:Array,default:()=>[]},highlightedPluginsTitle:{type:String,default:""},hideHighlightedPlugins:{type:Boolean,default:!1}},emits:["plugin-clicked"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=Se.useI18n(),a=t.ref(!1),l=t.ref(Zr),s=f=>{i("plugin-clicked",f)},d=t.computed(()=>{const f=JSON.parse(JSON.stringify(r.pluginList));return r.config.app==="konnect"&&delete f[C.PluginGroup.CUSTOM_PLUGINS],f});return(f,p)=>{const c=t.resolveComponent("KEmptyState");return t.openBlock(),t.createElementBlock("div",H_,[Object.keys(d.value).length?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:0,"action-button-visible":!1,class:"plugins-empty-state","data-testid":"plugins-empty-state","icon-variant":"kong"},{title:t.withCtx(()=>[t.createElementVNode("span",z_,t.toDisplayString(t.unref(o)("plugins.select.tabs.kong.empty_title")),1)]),default:t.withCtx(()=>[t.createElementVNode("span",W_,t.toDisplayString(t.unref(o)("plugins.select.tabs.kong.empty_description")),1)]),_:1})),!r.hideHighlightedPlugins&&r.highlightedPlugins.length>0?(t.openBlock(),t.createBlock(ll,{key:1,modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=u=>a.value=u),config:e.config,name:r.highlightedPluginsTitle||t.unref(o)("plugins.select.highlighted_plugins.title"),"navigate-on-click":e.navigateOnClick,plugins:r.highlightedPlugins,onPluginClicked:p[1]||(p[1]=u=>s(u))},null,8,["modelValue","config","name","navigate-on-click","plugins"])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(Qr),u=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[d.value[u]?(t.openBlock(),t.createElementBlock("div",{key:u},[t.createVNode(ll,{modelValue:l.value[u],"onUpdate:modelValue":m=>l.value[u]=m,config:e.config,name:u,"navigate-on-click":e.navigateOnClick,plugins:d.value[u]||[],onPluginClicked:p[2]||(p[2]=m=>s(m))},null,8,["modelValue","onUpdate:modelValue","config","name","navigate-on-click","plugins"])])):t.createCommentVNode("",!0)],64))),256))])}}}),Y_={class:"kong-ui-entities-plugin-select-form"},J_={class:"plugins-filter-input-container"},X_={key:0},Q_={key:3,"aria-live":"polite",class:"plugins-results-container"},Z_={"data-testid":"kong-tab"},eb={class:"tab-description"},tb={"data-testid":"custom-tab"},nb={class:"tab-description"},rb=se(t.defineComponent({__name:"PluginSelect",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.getCreateRoute)},customPluginSupport:{type:String,default:"none"},canCreateCustomPlugin:{type:Function,required:!1,default:async()=>!0},canDeleteCustomPlugin:{type:Function,required:!1,default:async()=>!0},canEditCustomPlugin:{type:Function,required:!1,default:async()=>!0},navigateOnClick:{type:Boolean,default:!0},availableOnServer:{type:Boolean,default:!0},ignoredPlugins:{type:Array,default:()=>[]},disabledPlugins:{type:Object,default:()=>({})},highlightedPluginIds:{type:Array,default:()=>[]},highlightedPluginsTitle:{type:String,default:""}},emits:["loading","plugin-clicked","delete-custom:success"],setup(e,{emit:n}){var v;const r=e,i=n,o=Ut.useRoute(),a=Ut.useRouter(),{i18n:{t:l}}=Se.useI18n(),{pluginMetaData:s}=Se.usePluginMetaData(),{getMessageFromError:d}=L.useErrors(),{sortAlpha:f,objectsAreEqual:p}=L.useHelpers(),c=t.ref(""),u=t.ref(!0),m=t.ref(!1),_=t.ref(""),b=t.ref([]),g=t.ref([]),h=t.ref({}),k=t.ref([]),{axiosInstance:P}=L.useAxios((v=r.config)==null?void 0:v.axiosRequestConfig),R=t.computed(()=>h.value?Object.entries(h.value).filter(([N])=>N!==C.PluginGroup.CUSTOM_PLUGINS).reduce((N,[,B])=>{for(const ae of B)N[ae.id]=ae;return N},{}):{}),I=t.computed(()=>{var ae;if(!h.value)return{};const N=c.value.toLowerCase(),B=JSON.parse(JSON.stringify(h.value));for(const de in h.value){const le=((ae=h.value[de])==null?void 0:ae.filter(fe=>fe.name.toLowerCase().includes(N)||fe.id.toLowerCase().includes(N)||fe.group.toLowerCase().includes(N)))||[];le.length?B[de]=le:delete B[de]}return B}),y=t.computed(()=>r.highlightedPluginIds.reduce((N,B)=>{const ae=R.value[B];return ae&&N.push(ae),N},[])),T=t.computed(()=>Object.keys(I.value).length>0),A=t.computed(()=>Object.keys(h.value).length>0&&!T.value),S=t.computed(()=>r.config.app==="konnect"?[{hash:"#kong",title:l("plugins.select.tabs.kong.title")},{hash:"#custom",title:l("plugins.select.tabs.custom.title"),disabled:["none","disabled"].includes(r.customPluginSupport)}]:[]),ie=t.computed(()=>{var B;let N=S.value.length&&((o==null?void 0:o.hash)||((B=S.value[0])==null?void 0:B.hash))||"";return N==="#custom"&&["none","disabled"].includes(r.customPluginSupport)&&(N="#kong"),N}),Q=()=>[...new Set([...Object.keys({...r.availableOnServer?{}:s}),...b.value])].filter(N=>!r.ignoredPlugins.includes(N)).filter(N=>r.config.entityType&&(r.config.entityType==="services"&&s[N]&&!s[N].scope.includes(C.PluginScope.SERVICE)||r.config.entityType==="routes"&&s[N]&&!s[N].scope.includes(C.PluginScope.ROUTE)||r.config.entityType==="consumer_groups"&&s[N]&&!s[N].scope.includes(C.PluginScope.CONSUMER_GROUP)||r.config.entityType==="consumers"&&s[N]&&!s[N].scope.includes(C.PluginScope.CONSUMER))?!1:N).reduce((N,B)=>{var U;const ae=s[B]&&s[B].name||B,de={...s[B],id:B,name:ae,available:b.value.includes(B),disabledMessage:"",group:((U=s[B])==null?void 0:U.group)||C.PluginGroup.CUSTOM_PLUGINS};de.group===C.PluginGroup.CUSTOM_PLUGINS&&(de.customPluginType=g.value.find(F=>F.name===B)?"streaming":"schema"),r.disabledPlugins&&(de.disabledMessage=r.disabledPlugins[B]);const le=de.group||l("plugins.select.misc_plugins");let fe=N[le];return fe||(fe=[]),fe.push(de),fe.sort(f("name")),N[le]=fe,N},{}),H=t.computed(()=>{var B;let N=`${r.config.apiBaseUrl}${Pe.select[r.config.app].availablePlugins}`;return r.config.app==="konnect"?N=N.replace(/{controlPlaneId}/gi,r.config.controlPlaneId||""):r.config.app==="kongManager"&&(N=((B=r.config.gatewayInfo)==null?void 0:B.edition)==="community"?`${r.config.apiBaseUrl}${Pe.select[r.config.app].availablePluginsForOss}`:N.replace(/\/{workspace}/gi,r.config.workspace?`/${r.config.workspace}`:"")),N}),w=t.computed(()=>{if(r.config.app==="konnect"&&r.customPluginSupport==="streaming"){let N=`${r.config.apiBaseUrl}${Pe.select[r.config.app].streamingCustomPlugins}`;return N=N.replace(/{controlPlaneId}/gi,r.config.controlPlaneId||""),N}return null}),O=t.computed(()=>{if(r.config.entityType&&r.config.entityId){let N=`${r.config.apiBaseUrl}${Pe.list[r.config.app].forEntity}`;return r.config.app==="konnect"?N=N.replace(/{controlPlaneId}/gi,r.config.controlPlaneId||""):r.config.app==="kongManager"&&(N=N.replace(/\/{workspace}/gi,r.config.workspace?`/${r.config.workspace}`:"")),N.replace(/{entityType}/gi,r.config.entityType||"").replace(/{entityId}/gi,r.config.entityId||"")}return""}),$=N=>{a.replace({hash:N,query:o.query})};t.watch(()=>r.disabledPlugins,(N,B)=>{!p(N,B)&&!u.value&&(h.value=Q())}),t.watch(()=>r.ignoredPlugins,(N,B)=>{!p(N,B)&&!u.value&&(h.value=Q())}),t.watch(u,N=>{i("loading",N)});const K=t.ref(!1),Z=t.ref(!1),q=t.ref(!1);return t.onBeforeMount(async()=>{K.value=await r.canCreateCustomPlugin(),Z.value=await r.canEditCustomPlugin(),q.value=await r.canDeleteCustomPlugin()}),t.onMounted(async()=>{try{const{data:N}=await P.get(H.value);if(r.config.app==="konnect"){const{names:B}=N;if(b.value=B||[],w.value){const{data:ae}=await P.get(w.value);g.value=ae.data||[]}}else if(r.config.app==="kongManager"){const{plugins:{available_on_server:B}}=N;b.value=B?Object.keys(B):[]}}catch(N){m.value=!0,_.value=d(N)}if(O.value)try{const{data:{data:N}}=await P.get(O.value);if(N!=null&&N.length){const B=N.reduce((ae,de)=>(de.name&&ae.push(de.name),ae),[]);k.value=k.value.concat(B)}}catch{}m.value||(h.value=Q()),u.value=!1}),(N,B)=>{const ae=t.resolveComponent("KInput"),de=t.resolveComponent("KSkeletonBox"),le=t.resolveComponent("KSkeleton"),fe=t.resolveComponent("KEmptyState"),U=t.resolveComponent("KTooltip"),F=t.resolveComponent("KTabs");return t.openBlock(),t.createElementBlock("div",Y_,[t.createElementVNode("div",J_,[t.createVNode(ae,{modelValue:c.value,"onUpdate:modelValue":B[0]||(B[0]=z=>c.value=z),modelModifiers:{trim:!0},class:"plugins-filter-input","data-testid":"plugins-filter",placeholder:t.unref(l)("search.placeholder.select"),type:"search"},null,8,["modelValue","placeholder"])]),u.value?(t.openBlock(),t.createElementBlock("section",X_,[t.createVNode(de,{class:"plugins-skeleton-title",width:"10"}),t.createVNode(le,{"card-count":8,class:"plugins-skeleton-cards",type:"card"})])):m.value?(t.openBlock(),t.createBlock(fe,{key:1,"action-button-visible":!1,"data-testid":"plugins-fetch-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(_.value),1)]),_:1})):A.value&&c.value?(t.openBlock(),t.createBlock(fe,{key:2,"action-button-visible":!1,"data-testid":"plugins-empty-state","icon-variant":"search"},{default:t.withCtx(()=>[t.createElementVNode("h5",null,t.toDisplayString(t.unref(l)("search.no_results",{filter:c.value})),1)]),_:1})):(t.openBlock(),t.createElementBlock("section",Q_,[S.value.length&&e.customPluginSupport!=="none"?(t.openBlock(),t.createBlock(F,{key:0,modelValue:ie.value,"onUpdate:modelValue":B[5]||(B[5]=z=>ie.value=z),"data-testid":"plugins-tabs",tabs:S.value,onChange:$},t.createSlots({kong:t.withCtx(()=>[t.createElementVNode("div",Z_,[t.createElementVNode("p",eb,t.toDisplayString(t.unref(l)("plugins.select.tabs.kong.description")),1),t.createVNode(Yr,{config:e.config,"hide-highlighted-plugins":c.value.length>0,"highlighted-plugins":y.value,"highlighted-plugins-title":r.highlightedPluginsTitle,"navigate-on-click":e.navigateOnClick,"plugin-list":I.value,onPluginClicked:B[1]||(B[1]=z=>N.$emit("plugin-clicked",z))},null,8,["config","hide-highlighted-plugins","highlighted-plugins","highlighted-plugins-title","navigate-on-click","plugin-list"])])]),custom:t.withCtx(()=>[t.createElementVNode("div",tb,[t.createElementVNode("p",nb,t.toDisplayString(t.unref(l)("plugins.select.tabs.custom.description")),1),t.createVNode(G_,{"can-create-custom-plugin":K.value,"can-delete-custom-plugin":q.value,"can-edit-custom-plugin":Z.value,config:e.config,"navigate-on-click":e.navigateOnClick,"plugin-list":I.value,"onDelete:success":B[2]||(B[2]=z=>N.$emit("delete-custom:success",z)),onPluginClicked:B[3]||(B[3]=z=>N.$emit("plugin-clicked",z)),onRevalidate:B[4]||(B[4]=()=>h.value=Q())},null,8,["can-create-custom-plugin","can-delete-custom-plugin","can-edit-custom-plugin","config","navigate-on-click","plugin-list"])])]),_:2},[e.customPluginSupport==="disabled"?{name:"custom-anchor",fn:t.withCtx(()=>[t.createVNode(U,{"max-width":"300",text:t.unref(l)("plugins.select.tabs.custom.disabled_tooltip")},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(t.unref(l)("plugins.select.tabs.custom.title")),1)]),_:1},8,["text"])]),key:"0"}:void 0]),1032,["modelValue","tabs"])):(t.openBlock(),t.createBlock(Yr,{key:1,config:e.config,"hide-highlighted-plugins":c.value.length>0,"highlighted-plugins":y.value,"highlighted-plugins-title":r.highlightedPluginsTitle,"navigate-on-click":e.navigateOnClick,"plugin-list":I.value,onPluginClicked:B[6]||(B[6]=z=>N.$emit("plugin-clicked",z))},null,8,["config","hide-highlighted-plugins","highlighted-plugins","highlighted-plugins-title","navigate-on-click","plugin-list"]))]))])}}}),[["__scopeId","data-v-d2065987"]]),ib={class:"kong-ui-entity-plugin-config-card"},ob={class:"name-cell-wrapper"},ab={class:"info-name"},lb={key:0},sb={key:0},cb={key:0},db={key:0},ub={key:0},Jr="config",pb=se(t.defineComponent({__name:"PluginConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId||!e.pluginType)},configCardDoc:{type:String,default:"",required:!1},showIdAsLink:{type:Boolean,default:!1},hideTitle:{type:Boolean,default:!1},scopedEntityType:{type:String,required:!1,default:""},scopedEntityId:{type:String,required:!1,default:""},expandPartial:{type:Boolean,default:!0}},emits:["loading","fetch:error","error:fetch-schema","fetch:success","navigation-click"],setup(e,{emit:n}){var k;const r=n,i=e,{i18n:{t:o}}=Se.useI18n(),a=Se.usePluginMetaData(),{setFieldType:l}=Se.usePluginHelpers(),{getPropValue:s}=L.useHelpers(),d=t.computed(()=>{var P;return(P=Pe.item[i.config.app])==null?void 0:P[i.scopedEntityType?"forEntity":"all"].replace(/{entityType}/gi,i.scopedEntityType).replace(/{entityId}/gi,i.scopedEntityId).concat(i.expandPartial?"?expand_partials=true":"")}),f=t.computed(()=>{var I,y;const P={},R=((I=b.value)==null?void 0:I.fields)||[];for(let T=0;T<R.length;T++){const A=b.value.fields[T],S=(y=Object.keys(A))==null?void 0:y[0];l(P,S,A[S])}return{...P,instance_name:{section:L.ConfigurationSchemaSection.Basic,order:1.5},consumer:{label:o("plugins.fields.consumer"),section:L.ConfigurationSchemaSection.Basic,order:6},route:{label:o("plugins.fields.route"),section:L.ConfigurationSchemaSection.Basic,order:6},service:{label:o("plugins.fields.service"),section:L.ConfigurationSchemaSection.Basic,order:6},consumer_group:{label:o("plugins.fields.consumer_group"),section:L.ConfigurationSchemaSection.Basic,order:6},protocols:{type:L.ConfigurationSchemaType.BadgeTag,section:L.ConfigurationSchemaSection.Basic,order:7}}}),p=t.computed(()=>{var R,I,y;if(!((R=b.value)!=null&&R.fields))return[];const P=(I=b.value.fields)==null?void 0:I.find(T=>{var S;return((S=Object.keys(T))==null?void 0:S[0])===Jr});return((y=P==null?void 0:P[Jr])==null?void 0:y.fields)||[]}),c=t.computed(()=>{var R,I;const P={};if(!p.value)return P;for(let y=0;y<((R=p.value)==null?void 0:R.length);y++){const T=p.value[y],A=(I=Object.keys(T))==null?void 0:I[0],S=T[A];S.required&&(P[A]={order:1}),l(P,A,S)}return P}),{getMessageFromError:u}=L.useErrors(),{axiosInstance:m}=L.useAxios((k=i.config)==null?void 0:k.axiosRequestConfig),_=t.computed(()=>{var R,I;let P=`${i.config.apiBaseUrl}${Pe.form[i.config.app].pluginSchema}`;return i.config.app==="konnect"?P=P.replace(/{controlPlaneId}/gi,((R=i.config)==null?void 0:R.controlPlaneId)||""):i.config.app==="kongManager"&&(P=P.replace(/\/{workspace}/gi,(I=i.config)!=null&&I.workspace?`/${i.config.workspace}`:"")),P=P.replace(/{plugin}/gi,i.config.pluginType),P}),b=t.ref({});L.useSchemaProvider(b);const g=t.ref(!1),h=t.ref("");return t.onBeforeMount(async()=>{g.value=!0;try{const{data:P}=await m.get(_.value);b.value=P}catch(P){h.value=u(P),r("error:fetch-schema",P)}finally{g.value=!1}}),(P,R)=>{const I=t.resolveComponent("KSkeleton"),y=t.resolveComponent("KEmptyState"),T=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",ib,[g.value?(t.openBlock(),t.createBlock(I,{key:0,"data-testid":"plugin-config-card-loader","table-columns":2,type:"table"})):h.value?(t.openBlock(),t.createBlock(y,{key:1,"data-testid":"plugin-config-card-schema-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(h.value),1)]),_:1})):(t.openBlock(),t.createBlock(t.unref(L.EntityBaseConfigCard),{key:2,config:e.config,"config-card-doc":e.configCardDoc,"config-schema":f.value,"entity-type":t.unref(L.SupportedEntityType).Plugin,"fetch-url":d.value,"hide-title":e.hideTitle,"plugin-config-key":Jr,"plugin-config-schema":c.value,"onFetch:error":R[0]||(R[0]=A=>P.$emit("fetch:error",A)),"onFetch:success":R[1]||(R[1]=A=>P.$emit("fetch:success",A)),onLoading:R[2]||(R[2]=A=>P.$emit("loading",A))},{name:t.withCtx(A=>[t.createElementVNode("div",ob,[t.createVNode(t.unref(jt.PluginIcon),{class:"plugin-icon",name:t.unref(s)("rowValue",A),size:24},null,8,["name"]),t.createElementVNode("span",ab,t.toDisplayString(t.unref(a).getDisplayName(t.unref(s)("rowValue",A))),1)])]),consumer:t.withCtx(A=>[t.unref(s)("rowValue",A)?e.showIdAsLink?(t.openBlock(),t.createBlock(t.unref(L.InternalLinkItem),{key:1,item:{key:t.unref(s)("rowValue",A).id,value:t.unref(s)("rowValue",A).id,type:t.unref(L.ConfigurationSchemaType).LinkInternal},onNavigationClick:()=>P.$emit("navigation-click",t.unref(s)("rowValue",A).id,"consumer")},null,8,["item","onNavigationClick"])):(t.openBlock(),t.createBlock(T,{key:2,"copy-tooltip":t.unref(o)("copy.tooltip",{label:t.unref(s)("row",A).label}),"data-testid":"consumer-copy-uuid",text:t.unref(s)("rowValue",A).id},null,8,["copy-tooltip","text"])):(t.openBlock(),t.createElementBlock("span",lb,"–"))]),route:t.withCtx(A=>[t.unref(s)("rowValue",A)?e.showIdAsLink?(t.openBlock(),t.createBlock(t.unref(L.InternalLinkItem),{key:1,item:{key:t.unref(s)("rowValue",A).id,value:t.unref(s)("rowValue",A).id,type:t.unref(L.ConfigurationSchemaType).LinkInternal},onNavigationClick:()=>P.$emit("navigation-click",t.unref(s)("rowValue",A).id,"route")},null,8,["item","onNavigationClick"])):(t.openBlock(),t.createBlock(T,{key:2,"copy-tooltip":t.unref(o)("copy.tooltip",{label:t.unref(s)("row",A).label}),"data-testid":"route-copy-uuid",text:t.unref(s)("rowValue",A).id},null,8,["copy-tooltip","text"])):(t.openBlock(),t.createElementBlock("span",sb,"–"))]),service:t.withCtx(A=>[t.unref(s)("rowValue",A)?e.showIdAsLink?(t.openBlock(),t.createBlock(t.unref(L.InternalLinkItem),{key:1,item:{key:t.unref(s)("rowValue",A).id,value:t.unref(s)("rowValue",A).id,type:t.unref(L.ConfigurationSchemaType).LinkInternal},onNavigationClick:()=>P.$emit("navigation-click",t.unref(s)("rowValue",A).id,"service")},null,8,["item","onNavigationClick"])):(t.openBlock(),t.createBlock(T,{key:2,"copy-tooltip":t.unref(o)("copy.tooltip",{label:t.unref(s)("row",A).label}),"data-testid":"service-copy-uuid",text:t.unref(s)("rowValue",A).id},null,8,["copy-tooltip","text"])):(t.openBlock(),t.createElementBlock("span",cb,"–"))]),consumer_group:t.withCtx(A=>[t.unref(s)("rowValue",A)?e.showIdAsLink?(t.openBlock(),t.createBlock(t.unref(L.InternalLinkItem),{key:1,item:{key:t.unref(s)("rowValue",A).id,value:t.unref(s)("rowValue",A).id,type:t.unref(L.ConfigurationSchemaType).LinkInternal},onNavigationClick:()=>P.$emit("navigation-click",t.unref(s)("rowValue",A).id,"consumer_group")},null,8,["item","onNavigationClick"])):(t.openBlock(),t.createBlock(T,{key:2,"copy-tooltip":t.unref(o)("copy.tooltip",{label:t.unref(s)("row",A).label}),"data-testid":"consumer-group-copy-uuid",text:t.unref(s)("rowValue",A).id},null,8,["copy-tooltip","text"])):(t.openBlock(),t.createElementBlock("span",db,"–"))]),partials:t.withCtx(A=>{var S,ie,Q,H,w,O,$,K,Z;return[t.unref(s)("rowValue",A)?e.showIdAsLink?(t.openBlock(),t.createBlock(t.unref(L.InternalLinkItem),{key:1,item:{key:(ie=(S=t.unref(s)("rowValue",A))==null?void 0:S[0])==null?void 0:ie.id,value:((H=(Q=t.unref(s)("rowValue",A))==null?void 0:Q[0])==null?void 0:H.id)+((O=(w=t.unref(s)("rowValue",A))==null?void 0:w[0])!=null&&O.name?"/"+((K=($=t.unref(s)("rowValue",A))==null?void 0:$[0])==null?void 0:K.name):""),type:t.unref(L.ConfigurationSchemaType).LinkInternal},onNavigationClick:()=>{var q,v;return P.$emit("navigation-click",(v=(q=t.unref(s)("rowValue",A))==null?void 0:q[0])==null?void 0:v.id,"partial")}},null,8,["item","onNavigationClick"])):(t.openBlock(),t.createBlock(T,{key:2,"copy-tooltip":t.unref(o)("copy.tooltip",{label:t.unref(s)("row",A).label}),"data-testid":"partial-copy-uuid",text:(Z=t.unref(s)("rowValue",A))==null?void 0:Z[0].id},null,8,["copy-tooltip","text"])):(t.openBlock(),t.createElementBlock("span",ub,"–"))]}),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title","plugin-config-schema"]))])}}}),[["__scopeId","data-v-c314449c"]]),{usePluginMetaData:fb,useProvideExperimentalFreeForms:mb}=Se;Object.defineProperty(te,"PluginGroup",{enumerable:!0,get:()=>C.PluginGroup}),Object.defineProperty(te,"PluginScope",{enumerable:!0,get:()=>C.PluginScope}),Object.defineProperty(te,"PluginIcon",{enumerable:!0,get:()=>jt.PluginIcon}),Object.defineProperty(te,"getPluginIconURL",{enumerable:!0,get:()=>jt.getPluginIconURL}),te.EXPERIMENTAL_FREE_FORM_PROVIDER=Un,te.EntityTypeIdField=ut,te.FEATURE_FLAGS=ci,te.PLUGIN_GROUPS_COLLAPSE_STATUS=Zr,te.PluginConfigCard=pb,te.PluginForm=C_,te.PluginGroupArray=Qr,te.PluginList=I_,te.PluginPartialType=hn,te.PluginSelect=rb,te.PluginSelectCard=Hr,te.PluginSelectGrid=Yr,te.pluginEndpoints=Pe,te.usePluginMetaData=fb,te.useProvideExperimentalFreeForms=mb,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|