@kong-ui-public/entities-plugins 9.35.2 → 9.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/entities-plugins.es.js +759 -759
  2. package/dist/entities-plugins.umd.js +4 -4
  3. package/dist/style.css +1 -1
  4. package/dist/types/components/free-form/Datakit/DatakitForm.vue.d.ts.map +1 -1
  5. package/dist/types/components/free-form/Datakit/flow-editor/constants.d.ts.map +1 -0
  6. package/dist/types/components/free-form/Datakit/flow-editor/modal/EditorContent.vue.d.ts.map +1 -0
  7. package/dist/types/components/free-form/Datakit/flow-editor/modal/EditorMain.vue.d.ts.map +1 -0
  8. package/dist/types/components/free-form/Datakit/flow-editor/modal/EditorModal.vue.d.ts.map +1 -0
  9. package/dist/types/components/free-form/Datakit/flow-editor/modal/EditorNav.vue.d.ts.map +1 -0
  10. package/dist/types/components/free-form/Datakit/flow-editor/node/NodePanel.vue.d.ts.map +1 -0
  11. package/dist/types/components/free-form/Datakit/flow-editor/node/NodePanelItem.vue.d.ts.map +1 -0
  12. package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/node/node-meta.d.ts.map +1 -1
  13. package/dist/types/components/free-form/Datakit/flow-editor/node/nodePropertiesPanel.vue.d.ts.map +1 -0
  14. package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/types.d.ts +1 -1
  15. package/dist/types/components/free-form/Datakit/flow-editor/types.d.ts.map +1 -0
  16. package/dist/types/components/free-form/Datakit/types.d.ts +1 -1
  17. package/dist/types/components/free-form/Datakit/types.d.ts.map +1 -1
  18. package/dist/types/constants/index.d.ts +1 -1
  19. package/package.json +8 -8
  20. package/dist/types/components/free-form/Datakit/visual-editor/composables.d.ts +0 -6
  21. package/dist/types/components/free-form/Datakit/visual-editor/composables.d.ts.map +0 -1
  22. package/dist/types/components/free-form/Datakit/visual-editor/constants.d.ts.map +0 -1
  23. package/dist/types/components/free-form/Datakit/visual-editor/modal/EditorContent.vue.d.ts.map +0 -1
  24. package/dist/types/components/free-form/Datakit/visual-editor/modal/EditorMain.vue.d.ts.map +0 -1
  25. package/dist/types/components/free-form/Datakit/visual-editor/modal/EditorModal.vue.d.ts.map +0 -1
  26. package/dist/types/components/free-form/Datakit/visual-editor/modal/EditorNav.vue.d.ts.map +0 -1
  27. package/dist/types/components/free-form/Datakit/visual-editor/node/NodePanel.vue.d.ts.map +0 -1
  28. package/dist/types/components/free-form/Datakit/visual-editor/node/NodePanelItem.vue.d.ts.map +0 -1
  29. package/dist/types/components/free-form/Datakit/visual-editor/node/nodePropertiesPanel.vue.d.ts.map +0 -1
  30. package/dist/types/components/free-form/Datakit/visual-editor/types.d.ts.map +0 -1
  31. /package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/constants.d.ts +0 -0
  32. /package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/modal/EditorContent.vue.d.ts +0 -0
  33. /package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/modal/EditorMain.vue.d.ts +0 -0
  34. /package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/modal/EditorModal.vue.d.ts +0 -0
  35. /package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/modal/EditorNav.vue.d.ts +0 -0
  36. /package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/node/NodePanel.vue.d.ts +0 -0
  37. /package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/node/NodePanelItem.vue.d.ts +0 -0
  38. /package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/node/node-meta.d.ts +0 -0
  39. /package/dist/types/components/free-form/Datakit/{visual-editor → flow-editor}/node/nodePropertiesPanel.vue.d.ts +0 -0
@@ -1,4 +1,4 @@
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&#39;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.
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_flow:"Configure this plugin by using the flow 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"},flow_editor:{mode:"Flow Editor",name:"Datakit Flow Editor",cta:"Go to flow 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&#39;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
2
  If the limit is exceeded and the user receives a 429 error, each additional request within the sliding window (hour)
3
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
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
@@ -10,14 +10,14 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
10
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,
11
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
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)&&gt(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)&&gt(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;/*!
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_FLOW_EDITOR:Symbol("DATAKIT_ENABLE_FLOW_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)&&gt(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)&&gt(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;/*!
14
14
  * tabbable 6.2.0
15
15
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
16
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)};/*!
17
17
  * focus-trap 7.6.5
18
18
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
19
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+=`
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","flow"),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.flow_editor.return_to_config"),icon:he.ArrowLeftIcon,onClick:()=>i("back")}],{sidePanelExpanded:a}=xr(),l=t.computed(()=>a.value?r("plugins.free-form.datakit.flow_editor.collapse_panel"):r("plugins.free-form.datakit.flow_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-4498cfce"]]),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.flow_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.flow_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-1a39ef6e"]]),{t:Ag}=Oe.createI18n("en-us",Be);function en(e){return Ag(`plugins.free-form.datakit.flow_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-f2e188e5"]]),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.flow_editor.node_panel.description")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("plugins.free-form.datakit.flow_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-2e65a82c"]]),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-6f3e4648"]]),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.flow_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-d344e31a"]]),Ug=se(t.defineComponent({__name:"EditorModal",props:{open:{type:Boolean},openModifiers:{}},emits:t.mergeModels(["close"],["update:open"]),setup(e,{emit:n}){t.useCssVars(p=>({b09519cc:t.unref(fg),"7424b402":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-ccb49c2a"]]);/*! 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+=`
21
21
 
22
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
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+`
@@ -123,4 +123,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
123
123
  input: API
124
124
  status: 200
125
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"})});
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_FLOW_EDITOR,!1),{editorMode:o}=xr(),a=t.computed(()=>i?o.value:"code"),l={flow:he.DesignIcon,code:he.CodeblockIcon},s=[{label:n("plugins.free-form.datakit.flow_editor.mode"),value:"flow"},{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"flow":return n("plugins.free-form.datakit.description_flow");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==="flow"?(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.flow_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-5dbe6213"]]),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"})});