From ce22e49f71e643473c080727c470cfe333f47f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Fri, 24 Apr 2026 10:43:52 +0200 Subject: [PATCH] Fix style of accordions --- .gitignore | 1 + config/reference.php | 1683 ----------------- .../assets/styles/_accordion.scss | 35 +- src/BootstrapAdminUi/package.json | 2 +- src/BootstrapAdminUi/public/app.css | 2 +- src/BootstrapAdminUi/public/app.rtl.css | 2 +- src/BootstrapAdminUi/public/symfony_ux.js | 2 +- .../public/symfony_ux.js.LICENSE.txt | 2 - 8 files changed, 30 insertions(+), 1699 deletions(-) delete mode 100644 config/reference.php diff --git a/.gitignore b/.gitignore index eb1a7ab3..44cac802 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +config/reference.php /src/**/.phpunit.result.cache /src/**/vendor composer.lock diff --git a/config/reference.php b/config/reference.php deleted file mode 100644 index 6fa1c2eb..00000000 --- a/config/reference.php +++ /dev/null @@ -1,1683 +0,0 @@ - [ - * 'App\\' => [ - * 'resource' => '../src/', - * ], - * ], - * ]); - * ``` - * - * @psalm-type ImportsConfig = list - * @psalm-type ParametersConfig = array|Param|null>|Param|null> - * @psalm-type ArgumentsType = list|array - * @psalm-type CallType = array|array{0:string, 1?:ArgumentsType, 2?:bool}|array{method:string, arguments?:ArgumentsType, returns_clone?:bool} - * @psalm-type TagsType = list>> // arrays inside the list must have only one element, with the tag name as the key - * @psalm-type CallbackType = string|array{0:string|ReferenceConfigurator,1:string}|\Closure|ReferenceConfigurator|ExpressionConfigurator - * @psalm-type DeprecationType = array{package: string, version: string, message?: string} - * @psalm-type DefaultsType = array{ - * public?: bool, - * tags?: TagsType, - * resource_tags?: TagsType, - * autowire?: bool, - * autoconfigure?: bool, - * bind?: array, - * } - * @psalm-type InstanceofType = array{ - * shared?: bool, - * lazy?: bool|string, - * public?: bool, - * properties?: array, - * configurator?: CallbackType, - * calls?: list, - * tags?: TagsType, - * resource_tags?: TagsType, - * autowire?: bool, - * bind?: array, - * constructor?: string, - * } - * @psalm-type DefinitionType = array{ - * class?: string, - * file?: string, - * parent?: string, - * shared?: bool, - * synthetic?: bool, - * lazy?: bool|string, - * public?: bool, - * abstract?: bool, - * deprecated?: DeprecationType, - * factory?: CallbackType, - * configurator?: CallbackType, - * arguments?: ArgumentsType, - * properties?: array, - * calls?: list, - * tags?: TagsType, - * resource_tags?: TagsType, - * decorates?: string, - * decoration_inner_name?: string, - * decoration_priority?: int, - * decoration_on_invalid?: 'exception'|'ignore'|null, - * autowire?: bool, - * autoconfigure?: bool, - * bind?: array, - * constructor?: string, - * from_callable?: CallbackType, - * } - * @psalm-type AliasType = string|array{ - * alias: string, - * public?: bool, - * deprecated?: DeprecationType, - * } - * @psalm-type PrototypeType = array{ - * resource: string, - * namespace?: string, - * exclude?: string|list, - * parent?: string, - * shared?: bool, - * lazy?: bool|string, - * public?: bool, - * abstract?: bool, - * deprecated?: DeprecationType, - * factory?: CallbackType, - * arguments?: ArgumentsType, - * properties?: array, - * configurator?: CallbackType, - * calls?: list, - * tags?: TagsType, - * resource_tags?: TagsType, - * autowire?: bool, - * autoconfigure?: bool, - * bind?: array, - * constructor?: string, - * } - * @psalm-type StackType = array{ - * stack: list>, - * public?: bool, - * deprecated?: DeprecationType, - * } - * @psalm-type ServicesConfig = array{ - * _defaults?: DefaultsType, - * _instanceof?: InstanceofType, - * ... - * } - * @psalm-type ExtensionType = array - * @psalm-type FrameworkConfig = array{ - * secret?: scalar|Param|null, - * http_method_override?: bool|Param, // Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. // Default: false - * allowed_http_method_override?: list|null, - * trust_x_sendfile_type_header?: scalar|Param|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" - * ide?: scalar|Param|null, // Default: "%env(default::SYMFONY_IDE)%" - * test?: bool|Param, - * default_locale?: scalar|Param|null, // Default: "en" - * set_locale_from_accept_language?: bool|Param, // Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed). // Default: false - * set_content_language_from_locale?: bool|Param, // Whether to set the Content-Language HTTP header on the Response using the Request locale. // Default: false - * enabled_locales?: list, - * trusted_hosts?: list, - * trusted_proxies?: mixed, // Default: ["%env(default::SYMFONY_TRUSTED_PROXIES)%"] - * trusted_headers?: list, - * error_controller?: scalar|Param|null, // Default: "error_controller" - * handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true - * csrf_protection?: bool|array{ - * enabled?: scalar|Param|null, // Default: null - * stateless_token_ids?: list, - * check_header?: scalar|Param|null, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false - * cookie_name?: scalar|Param|null, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" - * }, - * form?: bool|array{ // Form configuration - * enabled?: bool|Param, // Default: true - * csrf_protection?: bool|array{ - * enabled?: scalar|Param|null, // Default: null - * token_id?: scalar|Param|null, // Default: null - * field_name?: scalar|Param|null, // Default: "_token" - * field_attr?: array, - * }, - * }, - * http_cache?: bool|array{ // HTTP cache configuration - * enabled?: bool|Param, // Default: false - * debug?: bool|Param, // Default: "%kernel.debug%" - * trace_level?: "none"|"short"|"full"|Param, - * trace_header?: scalar|Param|null, - * default_ttl?: int|Param, - * private_headers?: list, - * skip_response_headers?: list, - * allow_reload?: bool|Param, - * allow_revalidate?: bool|Param, - * stale_while_revalidate?: int|Param, - * stale_if_error?: int|Param, - * terminate_on_cache_hit?: bool|Param, - * }, - * esi?: bool|array{ // ESI configuration - * enabled?: bool|Param, // Default: false - * }, - * ssi?: bool|array{ // SSI configuration - * enabled?: bool|Param, // Default: false - * }, - * fragments?: bool|array{ // Fragments configuration - * enabled?: bool|Param, // Default: false - * hinclude_default_template?: scalar|Param|null, // Default: null - * path?: scalar|Param|null, // Default: "/_fragment" - * }, - * profiler?: bool|array{ // Profiler configuration - * enabled?: bool|Param, // Default: false - * collect?: bool|Param, // Default: true - * collect_parameter?: scalar|Param|null, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null - * only_exceptions?: bool|Param, // Default: false - * only_main_requests?: bool|Param, // Default: false - * dsn?: scalar|Param|null, // Default: "file:%kernel.cache_dir%/profiler" - * collect_serializer_data?: true|Param, // Default: true - * }, - * workflows?: bool|array{ - * enabled?: bool|Param, // Default: false - * workflows?: array, - * definition_validators?: list, - * support_strategy?: scalar|Param|null, - * initial_marking?: list, - * events_to_dispatch?: list|null, - * places?: list, - * }>, - * transitions: list, - * to?: list, - * weight?: int|Param, // Default: 1 - * metadata?: list, - * }>, - * metadata?: list, - * }>, - * }, - * router?: bool|array{ // Router configuration - * enabled?: bool|Param, // Default: false - * resource: scalar|Param|null, - * type?: scalar|Param|null, - * default_uri?: scalar|Param|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null - * http_port?: scalar|Param|null, // Default: 80 - * https_port?: scalar|Param|null, // Default: 443 - * strict_requirements?: scalar|Param|null, // set to true to throw an exception when a parameter does not match the requirements set to false to disable exceptions when a parameter does not match the requirements (and return null instead) set to null to disable parameter checks against requirements 'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production // Default: true - * utf8?: bool|Param, // Default: true - * }, - * session?: bool|array{ // Session configuration - * enabled?: bool|Param, // Default: false - * storage_factory_id?: scalar|Param|null, // Default: "session.storage.factory.native" - * handler_id?: scalar|Param|null, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. - * name?: scalar|Param|null, - * cookie_lifetime?: scalar|Param|null, - * cookie_path?: scalar|Param|null, - * cookie_domain?: scalar|Param|null, - * cookie_secure?: true|false|"auto"|Param, // Default: "auto" - * cookie_httponly?: bool|Param, // Default: true - * cookie_samesite?: null|"lax"|"strict"|"none"|Param, // Default: "lax" - * use_cookies?: bool|Param, - * gc_divisor?: scalar|Param|null, - * gc_probability?: scalar|Param|null, - * gc_maxlifetime?: scalar|Param|null, - * save_path?: scalar|Param|null, // Defaults to "%kernel.cache_dir%/sessions" if the "handler_id" option is not null. - * metadata_update_threshold?: int|Param, // Seconds to wait between 2 session metadata updates. // Default: 0 - * }, - * request?: bool|array{ // Request configuration - * enabled?: bool|Param, // Default: false - * formats?: array>, - * }, - * assets?: bool|array{ // Assets configuration - * enabled?: bool|Param, // Default: true - * strict_mode?: bool|Param, // Throw an exception if an entry is missing from the manifest.json. // Default: false - * version_strategy?: scalar|Param|null, // Default: null - * version?: scalar|Param|null, // Default: null - * version_format?: scalar|Param|null, // Default: "%%s?%%s" - * json_manifest_path?: scalar|Param|null, // Default: null - * base_path?: scalar|Param|null, // Default: "" - * base_urls?: list, - * packages?: array, - * }>, - * }, - * asset_mapper?: bool|array{ // Asset Mapper configuration - * enabled?: bool|Param, // Default: true - * paths?: array, - * excluded_patterns?: list, - * exclude_dotfiles?: bool|Param, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true - * server?: bool|Param, // If true, a "dev server" will return the assets from the public directory (true in "debug" mode only by default). // Default: true - * public_prefix?: scalar|Param|null, // The public path where the assets will be written to (and served from when "server" is true). // Default: "/assets/" - * missing_import_mode?: "strict"|"warn"|"ignore"|Param, // Behavior if an asset cannot be found when imported from JavaScript or CSS files - e.g. "import './non-existent.js'". "strict" means an exception is thrown, "warn" means a warning is logged, "ignore" means the import is left as-is. // Default: "warn" - * extensions?: array, - * importmap_path?: scalar|Param|null, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" - * importmap_polyfill?: scalar|Param|null, // The importmap name that will be used to load the polyfill. Set to false to disable. // Default: "es-module-shims" - * importmap_script_attributes?: array, - * vendor_dir?: scalar|Param|null, // The directory to store JavaScript vendors. // Default: "%kernel.project_dir%/assets/vendor" - * precompress?: bool|array{ // Precompress assets with Brotli, Zstandard and gzip. - * enabled?: bool|Param, // Default: false - * formats?: list, - * extensions?: list, - * }, - * }, - * translator?: bool|array{ // Translator configuration - * enabled?: bool|Param, // Default: true - * fallbacks?: list, - * logging?: bool|Param, // Default: false - * formatter?: scalar|Param|null, // Default: "translator.formatter.default" - * cache_dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/translations" - * default_path?: scalar|Param|null, // The default path used to load translations. // Default: "%kernel.project_dir%/translations" - * paths?: list, - * pseudo_localization?: bool|array{ - * enabled?: bool|Param, // Default: false - * accents?: bool|Param, // Default: true - * expansion_factor?: float|Param, // Default: 1.0 - * brackets?: bool|Param, // Default: true - * parse_html?: bool|Param, // Default: false - * localizable_html_attributes?: list, - * }, - * providers?: array, - * locales?: list, - * }>, - * globals?: array, - * domain?: string|Param, - * }>, - * }, - * validation?: bool|array{ // Validation configuration - * enabled?: bool|Param, // Default: true - * enable_attributes?: bool|Param, // Default: true - * static_method?: list, - * translation_domain?: scalar|Param|null, // Default: "validators" - * email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|Param, // Default: "html5" - * mapping?: array{ - * paths?: list, - * }, - * not_compromised_password?: bool|array{ - * enabled?: bool|Param, // When disabled, compromised passwords will be accepted as valid. // Default: true - * endpoint?: scalar|Param|null, // API endpoint for the NotCompromisedPassword Validator. // Default: null - * }, - * disable_translation?: bool|Param, // Default: false - * auto_mapping?: array, - * }>, - * }, - * serializer?: bool|array{ // Serializer configuration - * enabled?: bool|Param, // Default: false - * enable_attributes?: bool|Param, // Default: true - * name_converter?: scalar|Param|null, - * circular_reference_handler?: scalar|Param|null, - * max_depth_handler?: scalar|Param|null, - * mapping?: array{ - * paths?: list, - * }, - * default_context?: list, - * named_serializers?: array, - * include_built_in_normalizers?: bool|Param, // Whether to include the built-in normalizers // Default: true - * include_built_in_encoders?: bool|Param, // Whether to include the built-in encoders // Default: true - * }>, - * }, - * property_access?: bool|array{ // Property access configuration - * enabled?: bool|Param, // Default: true - * magic_call?: bool|Param, // Default: false - * magic_get?: bool|Param, // Default: true - * magic_set?: bool|Param, // Default: true - * throw_exception_on_invalid_index?: bool|Param, // Default: false - * throw_exception_on_invalid_property_path?: bool|Param, // Default: true - * }, - * type_info?: bool|array{ // Type info configuration - * enabled?: bool|Param, // Default: true - * aliases?: array, - * }, - * property_info?: bool|array{ // Property info configuration - * enabled?: bool|Param, // Default: true - * with_constructor_extractor?: bool|Param, // Registers the constructor extractor. // Default: true - * }, - * cache?: array{ // Cache configuration - * prefix_seed?: scalar|Param|null, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" - * app?: scalar|Param|null, // App related cache pools configuration. // Default: "cache.adapter.filesystem" - * system?: scalar|Param|null, // System related cache pools configuration. // Default: "cache.adapter.system" - * directory?: scalar|Param|null, // Default: "%kernel.share_dir%/pools/app" - * default_psr6_provider?: scalar|Param|null, - * default_redis_provider?: scalar|Param|null, // Default: "redis://localhost" - * default_valkey_provider?: scalar|Param|null, // Default: "valkey://localhost" - * default_memcached_provider?: scalar|Param|null, // Default: "memcached://localhost" - * default_doctrine_dbal_provider?: scalar|Param|null, // Default: "database_connection" - * default_pdo_provider?: scalar|Param|null, // Default: null - * pools?: array, - * tags?: scalar|Param|null, // Default: null - * public?: bool|Param, // Default: false - * default_lifetime?: scalar|Param|null, // Default lifetime of the pool. - * provider?: scalar|Param|null, // Overwrite the setting from the default provider for this adapter. - * early_expiration_message_bus?: scalar|Param|null, - * clearer?: scalar|Param|null, - * }>, - * }, - * php_errors?: array{ // PHP errors handling configuration - * log?: mixed, // Use the application logger instead of the PHP logger for logging PHP errors. // Default: true - * throw?: bool|Param, // Throw PHP errors as \ErrorException instances. // Default: true - * }, - * exceptions?: array, - * web_link?: bool|array{ // Web links configuration - * enabled?: bool|Param, // Default: false - * }, - * lock?: bool|string|array{ // Lock configuration - * enabled?: bool|Param, // Default: false - * resources?: array>, - * }, - * semaphore?: bool|string|array{ // Semaphore configuration - * enabled?: bool|Param, // Default: false - * resources?: array, - * }, - * messenger?: bool|array{ // Messenger configuration - * enabled?: bool|Param, // Default: false - * routing?: array, - * }>, - * serializer?: array{ - * default_serializer?: scalar|Param|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" - * symfony_serializer?: array{ - * format?: scalar|Param|null, // Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default). // Default: "json" - * context?: array, - * }, - * }, - * transports?: array, - * failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null - * retry_strategy?: string|array{ - * service?: scalar|Param|null, // Service id to override the retry strategy entirely. // Default: null - * max_retries?: int|Param, // Default: 3 - * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 - * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). // Default: 2 - * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 - * jitter?: float|Param, // Randomness to apply to the delay (between 0 and 1). // Default: 0.1 - * }, - * rate_limiter?: scalar|Param|null, // Rate limiter name to use when processing messages. // Default: null - * }>, - * failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null - * stop_worker_on_signals?: list, - * default_bus?: scalar|Param|null, // Default: null - * buses?: array, - * }>, - * }>, - * }, - * scheduler?: bool|array{ // Scheduler configuration - * enabled?: bool|Param, // Default: false - * }, - * disallow_search_engine_index?: bool|Param, // Enabled by default when debug is enabled. // Default: true - * http_client?: bool|array{ // HTTP Client configuration - * enabled?: bool|Param, // Default: true - * max_host_connections?: int|Param, // The maximum number of connections to a single host. - * default_options?: array{ - * headers?: array, - * vars?: array, - * max_redirects?: int|Param, // The maximum number of redirects to follow. - * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. - * resolve?: array, - * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. - * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. - * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. - * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. - * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. - * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. - * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. - * cafile?: scalar|Param|null, // A certificate authority file. - * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. - * local_cert?: scalar|Param|null, // A PEM formatted certificate file. - * local_pk?: scalar|Param|null, // A private key file. - * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. - * ciphers?: scalar|Param|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...) - * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). - * sha1?: mixed, - * pin-sha256?: mixed, - * md5?: mixed, - * }, - * crypto_method?: scalar|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. - * extra?: array, - * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null - * caching?: bool|array{ // Caching configuration. - * enabled?: bool|Param, // Default: false - * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" - * shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true - * max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null - * }, - * retry_failed?: bool|array{ - * enabled?: bool|Param, // Default: false - * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null - * http_codes?: array, - * }>, - * max_retries?: int|Param, // Default: 3 - * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 - * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 - * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 - * jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 - * }, - * }, - * mock_response_factory?: scalar|Param|null, // The id of the service that should generate mock responses. It should be either an invokable or an iterable. - * scoped_clients?: array, - * headers?: array, - * max_redirects?: int|Param, // The maximum number of redirects to follow. - * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. - * resolve?: array, - * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. - * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. - * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. - * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. - * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. - * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. - * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. - * cafile?: scalar|Param|null, // A certificate authority file. - * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. - * local_cert?: scalar|Param|null, // A PEM formatted certificate file. - * local_pk?: scalar|Param|null, // A private key file. - * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. - * ciphers?: scalar|Param|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...). - * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). - * sha1?: mixed, - * pin-sha256?: mixed, - * md5?: mixed, - * }, - * crypto_method?: scalar|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. - * extra?: array, - * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null - * caching?: bool|array{ // Caching configuration. - * enabled?: bool|Param, // Default: false - * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" - * shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true - * max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null - * }, - * retry_failed?: bool|array{ - * enabled?: bool|Param, // Default: false - * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null - * http_codes?: array, - * }>, - * max_retries?: int|Param, // Default: 3 - * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 - * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 - * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 - * jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 - * }, - * }>, - * }, - * mailer?: bool|array{ // Mailer configuration - * enabled?: bool|Param, // Default: false - * message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null - * dsn?: scalar|Param|null, // Default: null - * transports?: array, - * envelope?: array{ // Mailer Envelope configuration - * sender?: scalar|Param|null, - * recipients?: list, - * allowed_recipients?: list, - * }, - * headers?: array, - * dkim_signer?: bool|array{ // DKIM signer configuration - * enabled?: bool|Param, // Default: false - * key?: scalar|Param|null, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" - * domain?: scalar|Param|null, // Default: "" - * select?: scalar|Param|null, // Default: "" - * passphrase?: scalar|Param|null, // The private key passphrase // Default: "" - * options?: array, - * }, - * smime_signer?: bool|array{ // S/MIME signer configuration - * enabled?: bool|Param, // Default: false - * key?: scalar|Param|null, // Path to key (in PEM format) // Default: "" - * certificate?: scalar|Param|null, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" - * passphrase?: scalar|Param|null, // The private key passphrase // Default: null - * extra_certificates?: scalar|Param|null, // Default: null - * sign_options?: int|Param, // Default: null - * }, - * smime_encrypter?: bool|array{ // S/MIME encrypter configuration - * enabled?: bool|Param, // Default: false - * repository?: scalar|Param|null, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: "" - * cipher?: int|Param, // A set of algorithms used to encrypt the message // Default: null - * }, - * }, - * secrets?: bool|array{ - * enabled?: bool|Param, // Default: true - * vault_directory?: scalar|Param|null, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" - * local_dotenv_file?: scalar|Param|null, // Default: "%kernel.project_dir%/.env.%kernel.environment%.local" - * decryption_env_var?: scalar|Param|null, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" - * }, - * notifier?: bool|array{ // Notifier configuration - * enabled?: bool|Param, // Default: false - * message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null - * chatter_transports?: array, - * texter_transports?: array, - * notification_on_failed_messages?: bool|Param, // Default: false - * channel_policy?: array>, - * admin_recipients?: list, - * }, - * rate_limiter?: bool|array{ // Rate limiter configuration - * enabled?: bool|Param, // Default: false - * limiters?: array, - * limit?: int|Param, // The maximum allowed hits in a fixed interval or burst. - * interval?: scalar|Param|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). - * rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket". - * interval?: scalar|Param|null, // Configures the rate interval. The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). - * amount?: int|Param, // Amount of tokens to add each interval. // Default: 1 - * }, - * }>, - * }, - * uid?: bool|array{ // Uid configuration - * enabled?: bool|Param, // Default: false - * default_uuid_version?: 7|6|4|1|Param, // Default: 7 - * name_based_uuid_version?: 5|3|Param, // Default: 5 - * name_based_uuid_namespace?: scalar|Param|null, - * time_based_uuid_version?: 7|6|1|Param, // Default: 7 - * time_based_uuid_node?: scalar|Param|null, - * }, - * html_sanitizer?: bool|array{ // HtmlSanitizer configuration - * enabled?: bool|Param, // Default: false - * sanitizers?: array, - * block_elements?: list, - * drop_elements?: list, - * allow_attributes?: array, - * drop_attributes?: array, - * force_attributes?: array>, - * force_https_urls?: bool|Param, // Transforms URLs using the HTTP scheme to use the HTTPS scheme instead. // Default: false - * allowed_link_schemes?: list, - * allowed_link_hosts?: list|null, - * allow_relative_links?: bool|Param, // Allows relative URLs to be used in links href attributes. // Default: false - * allowed_media_schemes?: list, - * allowed_media_hosts?: list|null, - * allow_relative_medias?: bool|Param, // Allows relative URLs to be used in media source attributes (img, audio, video, ...). // Default: false - * with_attribute_sanitizers?: list, - * without_attribute_sanitizers?: list, - * max_input_length?: int|Param, // The maximum length allowed for the sanitized input. // Default: 0 - * }>, - * }, - * webhook?: bool|array{ // Webhook configuration - * enabled?: bool|Param, // Default: false - * message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus" - * routing?: array, - * }, - * remote-event?: bool|array{ // RemoteEvent configuration - * enabled?: bool|Param, // Default: false - * }, - * json_streamer?: bool|array{ // JSON streamer configuration - * enabled?: bool|Param, // Default: false - * }, - * } - * @psalm-type TwigConfig = array{ - * form_themes?: list, - * globals?: array, - * autoescape_service?: scalar|Param|null, // Default: null - * autoescape_service_method?: scalar|Param|null, // Default: null - * cache?: scalar|Param|null, // Default: true - * charset?: scalar|Param|null, // Default: "%kernel.charset%" - * debug?: bool|Param, // Default: "%kernel.debug%" - * strict_variables?: bool|Param, // Default: "%kernel.debug%" - * auto_reload?: scalar|Param|null, - * optimizations?: int|Param, - * default_path?: scalar|Param|null, // The default path used to load templates. // Default: "%kernel.project_dir%/templates" - * file_name_pattern?: list, - * paths?: array, - * date?: array{ // The default format options used by the date filter. - * format?: scalar|Param|null, // Default: "F j, Y H:i" - * interval_format?: scalar|Param|null, // Default: "%d days" - * timezone?: scalar|Param|null, // The timezone used when formatting dates, when set to null, the timezone returned by date_default_timezone_get() is used. // Default: null - * }, - * number_format?: array{ // The default format options for the number_format filter. - * decimals?: int|Param, // Default: 0 - * decimal_point?: scalar|Param|null, // Default: "." - * thousands_separator?: scalar|Param|null, // Default: "," - * }, - * mailer?: array{ - * html_to_text_converter?: scalar|Param|null, // A service implementing the "Symfony\Component\Mime\HtmlToTextConverter\HtmlToTextConverterInterface". // Default: null - * }, - * } - * @psalm-type TwigComponentConfig = array{ - * defaults?: array, - * anonymous_template_directory?: scalar|Param|null, // Defaults to `components` - * profiler?: bool|array{ // Enables the profiler for Twig Component - * enabled?: bool|Param, // Default: "%kernel.debug%" - * collect_components?: bool|Param, // Collect components instances // Default: true - * }, - * controllers_json?: scalar|Param|null, // Deprecated: The "twig_component.controllers_json" config option is deprecated, and will be removed in 3.0. // Default: null - * } - * @psalm-type SyliusTwigHooksConfig = array{ - * enable_autoprefixing?: bool|Param, // Default: false - * hook_name_section_separator?: scalar|Param|null, // Default: false - * supported_hookable_types?: array, - * hooks?: array, - * props?: array, - * configuration?: array, - * priority?: int|Param, // Default: null - * }>>, - * } - * @psalm-type SyliusTwigExtraConfig = array{ - * twig_ux?: array{ - * anonymous_component_template_prefixes?: array, - * }, - * } - * @psalm-type SyliusAdminUiConfig = array{ - * routing?: array, - * } - * @psalm-type WebProfilerConfig = array{ - * toolbar?: bool|array{ // Profiler toolbar configuration - * enabled?: bool|Param, // Default: false - * ajax_replace?: bool|Param, // Replace toolbar on AJAX requests // Default: false - * }, - * intercept_redirects?: bool|Param, // Default: false - * excluded_ajax_paths?: scalar|Param|null, // Default: "^/((index|app(_[\\w]+)?)\\.php/)?_wdt" - * } - * @psalm-type DebugConfig = array{ - * max_items?: int|Param, // Max number of displayed items past the first level, -1 means no limit. // Default: 2500 - * min_depth?: int|Param, // Minimum tree depth to clone all the items, 1 is default. // Default: 1 - * max_string_length?: int|Param, // Max length of displayed strings, -1 means no limit. // Default: -1 - * dump_destination?: scalar|Param|null, // A stream URL where dumps should be written to. // Default: null - * theme?: "dark"|"light"|Param, // Changes the color of the dump() output when rendered directly on the templating. "dark" (default) or "light". // Default: "dark" - * } - * @psalm-type LiveComponentConfig = array{ - * secret?: scalar|Param|null, // The secret used to compute fingerprints and checksums // Default: "%kernel.secret%" - * fetch_credentials?: "same-origin"|"include"|"omit"|Param, // The default fetch credentials mode for all Live Components ('same-origin', 'include', 'omit') // Default: "same-origin" - * } - * @psalm-type StimulusConfig = array{ - * controller_paths?: list, - * controllers_json?: scalar|Param|null, // Default: "%kernel.project_dir%/assets/controllers.json" - * } - * @psalm-type DoctrineConfig = array{ - * dbal?: array{ - * default_connection?: scalar|Param|null, - * types?: array, - * driver_schemes?: array, - * connections?: array, - * mapping_types?: array, - * default_table_options?: array, - * schema_manager_factory?: scalar|Param|null, // Default: "doctrine.dbal.default_schema_manager_factory" - * result_cache?: scalar|Param|null, - * replicas?: array, - * }>, - * }, - * orm?: array{ - * default_entity_manager?: scalar|Param|null, - * enable_native_lazy_objects?: bool|Param, // Deprecated: The "enable_native_lazy_objects" option is deprecated and will be removed in DoctrineBundle 4.0, as native lazy objects are now always enabled. // Default: true - * controller_resolver?: bool|array{ - * enabled?: bool|Param, // Default: true - * auto_mapping?: bool|Param, // Deprecated: The "doctrine.orm.controller_resolver.auto_mapping.auto_mapping" option is deprecated and will be removed in DoctrineBundle 4.0, as it only accepts `false` since 3.0. // Set to true to enable using route placeholders as lookup criteria when the primary key doesn't match the argument name // Default: false - * evict_cache?: bool|Param, // Set to true to fetch the entity from the database instead of using the cache, if any // Default: false - * }, - * entity_managers?: array, - * }>, - * }>, - * }, - * connection?: scalar|Param|null, - * class_metadata_factory_name?: scalar|Param|null, // Default: "Doctrine\\ORM\\Mapping\\ClassMetadataFactory" - * default_repository_class?: scalar|Param|null, // Default: "Doctrine\\ORM\\EntityRepository" - * auto_mapping?: scalar|Param|null, // Default: false - * naming_strategy?: scalar|Param|null, // Default: "doctrine.orm.naming_strategy.default" - * quote_strategy?: scalar|Param|null, // Default: "doctrine.orm.quote_strategy.default" - * typed_field_mapper?: scalar|Param|null, // Default: "doctrine.orm.typed_field_mapper.default" - * entity_listener_resolver?: scalar|Param|null, // Default: null - * fetch_mode_subselect_batch_size?: scalar|Param|null, - * repository_factory?: scalar|Param|null, // Default: "doctrine.orm.container_repository_factory" - * schema_ignore_classes?: list, - * validate_xml_mapping?: bool|Param, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/6728. // Default: false - * second_level_cache?: array{ - * region_cache_driver?: string|array{ - * type?: scalar|Param|null, // Default: null - * id?: scalar|Param|null, - * pool?: scalar|Param|null, - * }, - * region_lock_lifetime?: scalar|Param|null, // Default: 60 - * log_enabled?: bool|Param, // Default: true - * region_lifetime?: scalar|Param|null, // Default: 3600 - * enabled?: bool|Param, // Default: true - * factory?: scalar|Param|null, - * regions?: array, - * loggers?: array, - * }, - * hydrators?: array, - * mappings?: array, - * dql?: array{ - * string_functions?: array, - * numeric_functions?: array, - * datetime_functions?: array, - * }, - * filters?: array, - * }>, - * identity_generation_preferences?: array, - * }>, - * resolve_target_entities?: array, - * }, - * } - * @psalm-type BabdevPagerfantaConfig = array{ - * default_view?: scalar|Param|null, // Default: "default" - * default_twig_template?: scalar|Param|null, // Default: "@BabDevPagerfanta/default.html.twig" - * exceptions_strategy?: array{ - * out_of_range_page?: "to_http_not_found"|"custom"|Param, // Default: "to_http_not_found" - * not_valid_current_page?: "to_http_not_found"|"custom"|Param, // Default: "to_http_not_found" - * }, - * } - * @psalm-type SyliusResourceConfig = array{ - * resources?: array, - * settings?: array{ - * paginate?: mixed, // Default: null - * limit?: mixed, // Default: null - * allowed_paginate?: list, - * default_page_size?: int|Param, // Default: 10 - * default_templates_dir?: scalar|Param|null, // Default: null - * sortable?: bool|Param, // Default: false - * sorting?: mixed, // Default: null - * filterable?: bool|Param, // Default: false - * criteria?: mixed, // Default: null - * state_machine_component?: scalar|Param|null, // Default: null - * }, - * translation?: bool|array{ - * enabled?: bool|Param, // Default: true - * locale_provider?: scalar|Param|null, // Default: "sylius.translation_locale_provider.immutable" - * }, - * drivers?: list<"doctrine/orm"|"doctrine/mongodb-odm"|"doctrine/phpcr-odm"|Param>, - * mapping?: array{ - * imports?: list, - * paths?: list, - * }, - * authorization_checker?: scalar|Param|null, // Default: "sylius.resource_controller.authorization_checker.disabled" - * routing_path_bc_layer?: bool|Param, - * path_segment_name_generator?: scalar|Param|null, // Specify a path name generator to use. // Default: "sylius.metadata.path_segment_name_generator.dash" - * } - * @psalm-type ZenstruckFoundryConfig = array{ - * auto_refresh_proxies?: bool|Param|null, // Deprecated: Since 2.0 auto_refresh_proxies defaults to true and this configuration has no effect. // Whether to auto-refresh proxies by default (https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#auto-refresh) // Default: null - * enable_auto_refresh_with_lazy_objects?: bool|Param|null, // Enable auto-refresh using PHP 8.4 lazy objects (cannot be enabled if PHP < 8.4). // Default: null - * faker?: array{ // Configure the faker used by your factories. - * locale?: scalar|Param|null, // The default locale to use for faker. // Default: null - * seed?: scalar|Param|null, // Deprecated: The "faker.seed" configuration is deprecated and will be removed in 3.0. Use environment variable "FOUNDRY_FAKER_SEED" instead. // Random number generator seed to produce the same fake values every run. // Default: null - * manage_seed?: bool|Param, // Automatically manage faker seed to ensure consistent data between test runs. // Default: true - * service?: scalar|Param|null, // Service id for custom faker instance. // Default: null - * }, - * instantiator?: array{ // Configure the default instantiator used by your object factories. - * use_constructor?: bool|Param, // Use the constructor to instantiate objects. // Default: true - * allow_extra_attributes?: bool|Param, // Whether or not to skip attributes that do not correspond to properties. // Default: false - * always_force_properties?: bool|Param, // Whether or not to skip setters and force set object properties (public/private/protected) directly. // Default: false - * service?: scalar|Param|null, // Service id of your custom instantiator. // Default: null - * }, - * global_state?: list, - * persistence?: array{ - * flush_once?: bool|Param, // Flush only once per call of `PersistentObjectFactory::create()` in userland. // Default: false - * }, - * orm?: array{ - * auto_persist?: bool|Param, // Deprecated: Since 2.4 auto_persist defaults to true and this configuration has no effect. // Automatically persist entities when created. // Default: true - * reset?: array{ - * connections?: list, - * entity_managers?: list, - * mode?: \Zenstruck\Foundry\ORM\ResetDatabase\ResetDatabaseMode::SCHEMA|\Zenstruck\Foundry\ORM\ResetDatabase\ResetDatabaseMode::MIGRATE|Param, // Reset mode to use with ResetDatabase trait // Default: "schema" - * migrations?: array{ - * configurations?: list, - * }, - * }, - * }, - * mongo?: array{ - * auto_persist?: bool|Param, // Deprecated: Since 2.4 auto_persist defaults to true and this configuration has no effect. // Automatically persist documents when created. // Default: true - * reset?: array{ - * document_managers?: list, - * }, - * }, - * make_factory?: array{ - * default_namespace?: scalar|Param|null, // Default namespace where factories will be created by maker. // Default: "Factory" - * add_hints?: bool|Param, // Add "beginner" hints in the created factory. // Default: true - * }, - * make_story?: array{ - * default_namespace?: scalar|Param|null, // Default namespace where stories will be created by maker. // Default: "Story" - * }, - * } - * @psalm-type KnpMenuConfig = array{ - * providers?: array{ - * builder_alias?: bool|Param, // Default: true - * }, - * twig?: array{ - * template?: scalar|Param|null, // Default: "@KnpMenu/menu.html.twig" - * }, - * templating?: bool|Param, // Default: false - * default_renderer?: scalar|Param|null, // Default: "twig" - * } - * @psalm-type SyliusGridConfig = array{ - * drivers?: list<"doctrine/orm"|"doctrine/phpcr-odm"|Param>, - * templates?: array{ - * filter?: array, - * action?: array, - * bulk_action?: array, - * }, - * grids?: array, - * }, - * sorting?: array, - * limits?: list, - * fields?: array, - * }>, - * filters?: array, - * form_options?: list, - * default_value?: mixed, - * }>, - * actions?: array, - * }>>, - * removals?: array, - * }>, - * } - * @psalm-type VichUploaderConfig = array{ - * default_filename_attribute_suffix?: scalar|Param|null, // Default: "_name" - * db_driver: scalar|Param|null, - * storage?: scalar|Param|null, // Default: "file_system" - * use_flysystem_to_resolve_uri?: bool|Param, // Default: false - * twig?: scalar|Param|null, // twig requires templating // Default: true - * form?: scalar|Param|null, // Default: true - * metadata?: array{ - * cache?: scalar|Param|null, // Default: "file" - * type?: scalar|Param|null, // Default: "attribute" - * file_cache?: array{ - * dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/vich_uploader" - * }, - * auto_detection?: bool|Param, // Default: true - * directories?: list, - * }, - * mappings?: array, - * } - * @psalm-type MakerConfig = array{ - * root_namespace?: scalar|Param|null, // Default: "App" - * generate_final_classes?: bool|Param, // Default: true - * generate_final_entities?: bool|Param, // Default: false - * } - * @psalm-type SecurityConfig = array{ - * access_denied_url?: scalar|Param|null, // Default: null - * session_fixation_strategy?: "none"|"migrate"|"invalidate"|Param, // Default: "migrate" - * expose_security_errors?: \Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::None|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::AccountStatus|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::All|Param, // Default: "none" - * erase_credentials?: bool|Param, // Default: true - * access_decision_manager?: array{ - * strategy?: "affirmative"|"consensus"|"unanimous"|"priority"|Param, - * service?: scalar|Param|null, - * strategy_service?: scalar|Param|null, - * allow_if_all_abstain?: bool|Param, // Default: false - * allow_if_equal_granted_denied?: bool|Param, // Default: true - * }, - * password_hashers?: array, - * hash_algorithm?: scalar|Param|null, // Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms. // Default: "sha512" - * key_length?: scalar|Param|null, // Default: 40 - * ignore_case?: bool|Param, // Default: false - * encode_as_base64?: bool|Param, // Default: true - * iterations?: scalar|Param|null, // Default: 5000 - * cost?: int|Param, // Default: null - * memory_cost?: scalar|Param|null, // Default: null - * time_cost?: scalar|Param|null, // Default: null - * id?: scalar|Param|null, - * }>, - * providers?: array, - * }, - * entity?: array{ - * class: scalar|Param|null, // The full entity class name of your user class. - * property?: scalar|Param|null, // Default: null - * manager_name?: scalar|Param|null, // Default: null - * }, - * memory?: array{ - * users?: array, - * }>, - * }, - * ldap?: array{ - * service: scalar|Param|null, - * base_dn: scalar|Param|null, - * search_dn?: scalar|Param|null, // Default: null - * search_password?: scalar|Param|null, // Default: null - * extra_fields?: list, - * default_roles?: list, - * role_fetcher?: scalar|Param|null, // Default: null - * uid_key?: scalar|Param|null, // Default: "sAMAccountName" - * filter?: scalar|Param|null, // Default: "({uid_key}={user_identifier})" - * password_attribute?: scalar|Param|null, // Default: null - * }, - * }>, - * firewalls: array, - * security?: bool|Param, // Default: true - * user_checker?: scalar|Param|null, // The UserChecker to use when authenticating users in this firewall. // Default: "security.user_checker" - * request_matcher?: scalar|Param|null, - * access_denied_url?: scalar|Param|null, - * access_denied_handler?: scalar|Param|null, - * entry_point?: scalar|Param|null, // An enabled authenticator name or a service id that implements "Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface". - * provider?: scalar|Param|null, - * stateless?: bool|Param, // Default: false - * lazy?: bool|Param, // Default: false - * context?: scalar|Param|null, - * logout?: array{ - * enable_csrf?: bool|Param|null, // Default: null - * csrf_token_id?: scalar|Param|null, // Default: "logout" - * csrf_parameter?: scalar|Param|null, // Default: "_csrf_token" - * csrf_token_manager?: scalar|Param|null, - * path?: scalar|Param|null, // Default: "/logout" - * target?: scalar|Param|null, // Default: "/" - * invalidate_session?: bool|Param, // Default: true - * clear_site_data?: list<"*"|"cache"|"cookies"|"storage"|"executionContexts"|Param>, - * delete_cookies?: array, - * }, - * switch_user?: array{ - * provider?: scalar|Param|null, - * parameter?: scalar|Param|null, // Default: "_switch_user" - * role?: scalar|Param|null, // Default: "ROLE_ALLOWED_TO_SWITCH" - * target_route?: scalar|Param|null, // Default: null - * }, - * required_badges?: list, - * custom_authenticators?: list, - * login_throttling?: array{ - * limiter?: scalar|Param|null, // A service id implementing "Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface". - * max_attempts?: int|Param, // Default: 5 - * interval?: scalar|Param|null, // Default: "1 minute" - * lock_factory?: scalar|Param|null, // The service ID of the lock factory used by the login rate limiter (or null to disable locking). // Default: null - * cache_pool?: string|Param, // The cache pool to use for storing the limiter state // Default: "cache.rate_limiter" - * storage_service?: string|Param, // The service ID of a custom storage implementation, this precedes any configured "cache_pool" // Default: null - * }, - * x509?: array{ - * provider?: scalar|Param|null, - * user?: scalar|Param|null, // Default: "SSL_CLIENT_S_DN_Email" - * credentials?: scalar|Param|null, // Default: "SSL_CLIENT_S_DN" - * user_identifier?: scalar|Param|null, // Default: "emailAddress" - * }, - * remote_user?: array{ - * provider?: scalar|Param|null, - * user?: scalar|Param|null, // Default: "REMOTE_USER" - * }, - * login_link?: array{ - * check_route: scalar|Param|null, // Route that will validate the login link - e.g. "app_login_link_verify". - * check_post_only?: scalar|Param|null, // If true, only HTTP POST requests to "check_route" will be handled by the authenticator. // Default: false - * signature_properties: list, - * lifetime?: int|Param, // The lifetime of the login link in seconds. // Default: 600 - * max_uses?: int|Param, // Max number of times a login link can be used - null means unlimited within lifetime. // Default: null - * used_link_cache?: scalar|Param|null, // Cache service id used to expired links of max_uses is set. - * success_handler?: scalar|Param|null, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface. - * failure_handler?: scalar|Param|null, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface. - * provider?: scalar|Param|null, // The user provider to load users from. - * secret?: scalar|Param|null, // Default: "%kernel.secret%" - * always_use_default_target_path?: bool|Param, // Default: false - * default_target_path?: scalar|Param|null, // Default: "/" - * login_path?: scalar|Param|null, // Default: "/login" - * target_path_parameter?: scalar|Param|null, // Default: "_target_path" - * use_referer?: bool|Param, // Default: false - * failure_path?: scalar|Param|null, // Default: null - * failure_forward?: bool|Param, // Default: false - * failure_path_parameter?: scalar|Param|null, // Default: "_failure_path" - * }, - * form_login?: array{ - * provider?: scalar|Param|null, - * remember_me?: bool|Param, // Default: true - * success_handler?: scalar|Param|null, - * failure_handler?: scalar|Param|null, - * check_path?: scalar|Param|null, // Default: "/login_check" - * use_forward?: bool|Param, // Default: false - * login_path?: scalar|Param|null, // Default: "/login" - * username_parameter?: scalar|Param|null, // Default: "_username" - * password_parameter?: scalar|Param|null, // Default: "_password" - * csrf_parameter?: scalar|Param|null, // Default: "_csrf_token" - * csrf_token_id?: scalar|Param|null, // Default: "authenticate" - * enable_csrf?: bool|Param, // Default: false - * post_only?: bool|Param, // Default: true - * form_only?: bool|Param, // Default: false - * always_use_default_target_path?: bool|Param, // Default: false - * default_target_path?: scalar|Param|null, // Default: "/" - * target_path_parameter?: scalar|Param|null, // Default: "_target_path" - * use_referer?: bool|Param, // Default: false - * failure_path?: scalar|Param|null, // Default: null - * failure_forward?: bool|Param, // Default: false - * failure_path_parameter?: scalar|Param|null, // Default: "_failure_path" - * }, - * form_login_ldap?: array{ - * provider?: scalar|Param|null, - * remember_me?: bool|Param, // Default: true - * success_handler?: scalar|Param|null, - * failure_handler?: scalar|Param|null, - * check_path?: scalar|Param|null, // Default: "/login_check" - * use_forward?: bool|Param, // Default: false - * login_path?: scalar|Param|null, // Default: "/login" - * username_parameter?: scalar|Param|null, // Default: "_username" - * password_parameter?: scalar|Param|null, // Default: "_password" - * csrf_parameter?: scalar|Param|null, // Default: "_csrf_token" - * csrf_token_id?: scalar|Param|null, // Default: "authenticate" - * enable_csrf?: bool|Param, // Default: false - * post_only?: bool|Param, // Default: true - * form_only?: bool|Param, // Default: false - * always_use_default_target_path?: bool|Param, // Default: false - * default_target_path?: scalar|Param|null, // Default: "/" - * target_path_parameter?: scalar|Param|null, // Default: "_target_path" - * use_referer?: bool|Param, // Default: false - * failure_path?: scalar|Param|null, // Default: null - * failure_forward?: bool|Param, // Default: false - * failure_path_parameter?: scalar|Param|null, // Default: "_failure_path" - * service?: scalar|Param|null, // Default: "ldap" - * dn_string?: scalar|Param|null, // Default: "{user_identifier}" - * query_string?: scalar|Param|null, - * search_dn?: scalar|Param|null, // Default: "" - * search_password?: scalar|Param|null, // Default: "" - * }, - * json_login?: array{ - * provider?: scalar|Param|null, - * remember_me?: bool|Param, // Default: true - * success_handler?: scalar|Param|null, - * failure_handler?: scalar|Param|null, - * check_path?: scalar|Param|null, // Default: "/login_check" - * use_forward?: bool|Param, // Default: false - * login_path?: scalar|Param|null, // Default: "/login" - * username_path?: scalar|Param|null, // Default: "username" - * password_path?: scalar|Param|null, // Default: "password" - * }, - * json_login_ldap?: array{ - * provider?: scalar|Param|null, - * remember_me?: bool|Param, // Default: true - * success_handler?: scalar|Param|null, - * failure_handler?: scalar|Param|null, - * check_path?: scalar|Param|null, // Default: "/login_check" - * use_forward?: bool|Param, // Default: false - * login_path?: scalar|Param|null, // Default: "/login" - * username_path?: scalar|Param|null, // Default: "username" - * password_path?: scalar|Param|null, // Default: "password" - * service?: scalar|Param|null, // Default: "ldap" - * dn_string?: scalar|Param|null, // Default: "{user_identifier}" - * query_string?: scalar|Param|null, - * search_dn?: scalar|Param|null, // Default: "" - * search_password?: scalar|Param|null, // Default: "" - * }, - * access_token?: array{ - * provider?: scalar|Param|null, - * remember_me?: bool|Param, // Default: true - * success_handler?: scalar|Param|null, - * failure_handler?: scalar|Param|null, - * realm?: scalar|Param|null, // Default: null - * token_extractors?: list, - * token_handler: string|array{ - * id?: scalar|Param|null, - * oidc_user_info?: string|array{ - * base_uri: scalar|Param|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured). - * discovery?: array{ // Enable the OIDC discovery. - * cache?: array{ - * id: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration. - * }, - * }, - * claim?: scalar|Param|null, // Claim which contains the user identifier (e.g. sub, email, etc.). // Default: "sub" - * client?: scalar|Param|null, // HttpClient service id to use to call the OIDC server. - * }, - * oidc?: array{ - * discovery?: array{ // Enable the OIDC discovery. - * base_uri: list, - * cache?: array{ - * id: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration. - * }, - * }, - * claim?: scalar|Param|null, // Claim which contains the user identifier (e.g.: sub, email..). // Default: "sub" - * audience: scalar|Param|null, // Audience set in the token, for validation purpose. - * issuers: list, - * algorithms: list, - * keyset?: scalar|Param|null, // JSON-encoded JWKSet used to sign the token (must contain a list of valid public keys). - * encryption?: bool|array{ - * enabled?: bool|Param, // Default: false - * enforce?: bool|Param, // When enabled, the token shall be encrypted. // Default: false - * algorithms: list, - * keyset: scalar|Param|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys). - * }, - * }, - * cas?: array{ - * validation_url: scalar|Param|null, // CAS server validation URL - * prefix?: scalar|Param|null, // CAS prefix // Default: "cas" - * http_client?: scalar|Param|null, // HTTP Client service // Default: null - * }, - * oauth2?: scalar|Param|null, - * }, - * }, - * http_basic?: array{ - * provider?: scalar|Param|null, - * realm?: scalar|Param|null, // Default: "Secured Area" - * }, - * http_basic_ldap?: array{ - * provider?: scalar|Param|null, - * realm?: scalar|Param|null, // Default: "Secured Area" - * service?: scalar|Param|null, // Default: "ldap" - * dn_string?: scalar|Param|null, // Default: "{user_identifier}" - * query_string?: scalar|Param|null, - * search_dn?: scalar|Param|null, // Default: "" - * search_password?: scalar|Param|null, // Default: "" - * }, - * remember_me?: array{ - * secret?: scalar|Param|null, // Default: "%kernel.secret%" - * service?: scalar|Param|null, - * user_providers?: list, - * catch_exceptions?: bool|Param, // Default: true - * signature_properties?: list, - * token_provider?: string|array{ - * service?: scalar|Param|null, // The service ID of a custom remember-me token provider. - * doctrine?: bool|array{ - * enabled?: bool|Param, // Default: false - * connection?: scalar|Param|null, // Default: null - * }, - * }, - * token_verifier?: scalar|Param|null, // The service ID of a custom rememberme token verifier. - * name?: scalar|Param|null, // Default: "REMEMBERME" - * lifetime?: int|Param, // Default: 31536000 - * path?: scalar|Param|null, // Default: "/" - * domain?: scalar|Param|null, // Default: null - * secure?: true|false|"auto"|Param, // Default: null - * httponly?: bool|Param, // Default: true - * samesite?: null|"lax"|"strict"|"none"|Param, // Default: "lax" - * always_remember_me?: bool|Param, // Default: false - * remember_me_parameter?: scalar|Param|null, // Default: "_remember_me" - * }, - * }>, - * access_control?: list, - * attributes?: array, - * route?: scalar|Param|null, // Default: null - * methods?: list, - * allow_if?: scalar|Param|null, // Default: null - * roles?: list, - * }>, - * role_hierarchy?: array>, - * } - * @psalm-type UxIconsConfig = array{ - * icon_dir?: scalar|Param|null, // The local directory where icons are stored. // Default: "%kernel.project_dir%/assets/icons" - * default_icon_attributes?: array, - * icon_sets?: array, - * suffixes?: array, - * }>, - * }>, - * aliases?: array, - * iconify?: bool|array{ // Configuration for the remote icon service. - * enabled?: bool|Param, // Default: true - * on_demand?: bool|Param, // Whether to download icons "on demand". // Default: true - * endpoint?: scalar|Param|null, // The endpoint for the Iconify icons API. // Default: "https://api.iconify.design" - * }, - * ignore_not_found?: bool|Param, // Ignore error when an icon is not found. Set to 'true' to fail silently. // Default: false - * } - * @psalm-type WhiteOctoberPagerfantaConfig = array{ // Deprecated: The "white_october_pagerfanta" configuration node is deprecated, migrate your configuration to the "babdev_pagerfanta" configuration node. - * exceptions_strategy?: array{ - * out_of_range_page?: scalar|Param|null, // Default: "to_http_not_found" - * not_valid_current_page?: scalar|Param|null, // Default: "to_http_not_found" - * }, - * default_view?: scalar|Param|null, // Default: "default" - * } - * @psalm-type ConfigType = array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * twig?: TwigConfig, - * twig_component?: TwigComponentConfig, - * sylius_twig_hooks?: SyliusTwigHooksConfig, - * sylius_twig_extra?: SyliusTwigExtraConfig, - * sylius_admin_ui?: SyliusAdminUiConfig, - * live_component?: LiveComponentConfig, - * stimulus?: StimulusConfig, - * doctrine?: DoctrineConfig, - * babdev_pagerfanta?: BabdevPagerfantaConfig, - * sylius_resource?: SyliusResourceConfig, - * knp_menu?: KnpMenuConfig, - * sylius_grid?: SyliusGridConfig, - * vich_uploader?: VichUploaderConfig, - * security?: SecurityConfig, - * ux_icons?: UxIconsConfig, - * white_october_pagerfanta?: WhiteOctoberPagerfantaConfig, - * "when@dev"?: array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * twig?: TwigConfig, - * twig_component?: TwigComponentConfig, - * sylius_twig_hooks?: SyliusTwigHooksConfig, - * sylius_twig_extra?: SyliusTwigExtraConfig, - * sylius_admin_ui?: SyliusAdminUiConfig, - * web_profiler?: WebProfilerConfig, - * debug?: DebugConfig, - * live_component?: LiveComponentConfig, - * stimulus?: StimulusConfig, - * doctrine?: DoctrineConfig, - * babdev_pagerfanta?: BabdevPagerfantaConfig, - * sylius_resource?: SyliusResourceConfig, - * zenstruck_foundry?: ZenstruckFoundryConfig, - * knp_menu?: KnpMenuConfig, - * sylius_grid?: SyliusGridConfig, - * vich_uploader?: VichUploaderConfig, - * maker?: MakerConfig, - * security?: SecurityConfig, - * ux_icons?: UxIconsConfig, - * }, - * "when@prod"?: array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * twig?: TwigConfig, - * twig_component?: TwigComponentConfig, - * sylius_twig_hooks?: SyliusTwigHooksConfig, - * sylius_twig_extra?: SyliusTwigExtraConfig, - * sylius_admin_ui?: SyliusAdminUiConfig, - * live_component?: LiveComponentConfig, - * stimulus?: StimulusConfig, - * doctrine?: DoctrineConfig, - * babdev_pagerfanta?: BabdevPagerfantaConfig, - * sylius_resource?: SyliusResourceConfig, - * knp_menu?: KnpMenuConfig, - * sylius_grid?: SyliusGridConfig, - * vich_uploader?: VichUploaderConfig, - * security?: SecurityConfig, - * ux_icons?: UxIconsConfig, - * }, - * "when@test"?: array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * twig?: TwigConfig, - * twig_component?: TwigComponentConfig, - * sylius_twig_hooks?: SyliusTwigHooksConfig, - * sylius_twig_extra?: SyliusTwigExtraConfig, - * sylius_admin_ui?: SyliusAdminUiConfig, - * web_profiler?: WebProfilerConfig, - * live_component?: LiveComponentConfig, - * stimulus?: StimulusConfig, - * doctrine?: DoctrineConfig, - * babdev_pagerfanta?: BabdevPagerfantaConfig, - * sylius_resource?: SyliusResourceConfig, - * zenstruck_foundry?: ZenstruckFoundryConfig, - * knp_menu?: KnpMenuConfig, - * sylius_grid?: SyliusGridConfig, - * vich_uploader?: VichUploaderConfig, - * security?: SecurityConfig, - * ux_icons?: UxIconsConfig, - * }, - * ..., - * }> - * } - */ -final class App -{ - /** - * @param ConfigType $config - * - * @psalm-return ConfigType - */ - public static function config(array $config): array - { - return AppReference::config($config); - } -} - -namespace Symfony\Component\Routing\Loader\Configurator; - -/** - * This class provides array-shapes for configuring the routes of an application. - * - * Example: - * - * ```php - * // config/routes.php - * namespace Symfony\Component\Routing\Loader\Configurator; - * - * return Routes::config([ - * 'controllers' => [ - * 'resource' => 'routing.controllers', - * ], - * ]); - * ``` - * - * @psalm-type RouteConfig = array{ - * path: string|array, - * controller?: string, - * methods?: string|list, - * requirements?: array, - * defaults?: array, - * options?: array, - * host?: string|array, - * schemes?: string|list, - * condition?: string, - * locale?: string, - * format?: string, - * utf8?: bool, - * stateless?: bool, - * } - * @psalm-type ImportConfig = array{ - * resource: string, - * type?: string, - * exclude?: string|list, - * prefix?: string|array, - * name_prefix?: string, - * trailing_slash_on_root?: bool, - * controller?: string, - * methods?: string|list, - * requirements?: array, - * defaults?: array, - * options?: array, - * host?: string|array, - * schemes?: string|list, - * condition?: string, - * locale?: string, - * format?: string, - * utf8?: bool, - * stateless?: bool, - * } - * @psalm-type AliasConfig = array{ - * alias: string, - * deprecated?: array{package:string, version:string, message?:string}, - * } - * @psalm-type RoutesConfig = array{ - * "when@dev"?: array, - * "when@prod"?: array, - * "when@test"?: array, - * ... - * } - */ -final class Routes -{ - /** - * @param RoutesConfig $config - * - * @psalm-return RoutesConfig - */ - public static function config(array $config): array - { - return $config; - } -} diff --git a/src/BootstrapAdminUi/assets/styles/_accordion.scss b/src/BootstrapAdminUi/assets/styles/_accordion.scss index 93863526..00c628ed 100644 --- a/src/BootstrapAdminUi/assets/styles/_accordion.scss +++ b/src/BootstrapAdminUi/assets/styles/_accordion.scss @@ -8,15 +8,30 @@ */ .accordion { - .accordion-item { - .accordion-header { - &:hover { - background: var(--tblr-bg-surface); - } - } - .accordion-body { - color: var(--tblr-body-color); - padding: var(--tblr-accordion-body-padding-y) var(--tblr-accordion-body-padding-x); + .accordion-item { + .accordion-header { + line-height: 28px; + + &:hover { + background: $gray-100; + } + + &:not(.collapsed) { + font-weight: var(--tblr-font-weight-bold); + } + } + + .accordion-body { + color: var(--tblr-body-color); + padding: var(--tblr-accordion-body-padding-y) var(--tblr-accordion-body-padding-x); + } + + .accordion-button { + font-size: .875rem; + + &:not(.collapsed) { + font-weight: bold; + } + } } - } } diff --git a/src/BootstrapAdminUi/package.json b/src/BootstrapAdminUi/package.json index f746efc9..4a334773 100644 --- a/src/BootstrapAdminUi/package.json +++ b/src/BootstrapAdminUi/package.json @@ -29,7 +29,7 @@ "webpack-rtl-plugin": "^2.0.0" }, "engines": { - "node": "^20" + "node": "^24" }, "license": "UNLICENSED", "private": true, diff --git a/src/BootstrapAdminUi/public/app.css b/src/BootstrapAdminUi/public/app.css index f0dd4f02..e192fde9 100644 --- a/src/BootstrapAdminUi/public/app.css +++ b/src/BootstrapAdminUi/public/app.css @@ -27,7 +27,7 @@ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. - */.accordion .accordion-item .accordion-header:hover{background:var(--tblr-bg-surface)}.accordion .accordion-item .accordion-body{color:var(--tblr-body-color);padding:var(--tblr-accordion-body-padding-y) var(--tblr-accordion-body-padding-x)}/*! + */.accordion .accordion-item .accordion-header{line-height:28px}.accordion .accordion-item .accordion-header:hover{background:#f8f9fa}.accordion .accordion-item .accordion-header:not(.collapsed){font-weight:var(--tblr-font-weight-bold)}.accordion .accordion-item .accordion-body{color:var(--tblr-body-color);padding:var(--tblr-accordion-body-padding-y) var(--tblr-accordion-body-padding-x)}.accordion .accordion-item .accordion-button{font-size:.875rem}.accordion .accordion-item .accordion-button:not(.collapsed){font-weight:700}/*! * This file is part of the Sylius package. * * (c) Sylius Sp. z o.o. diff --git a/src/BootstrapAdminUi/public/app.rtl.css b/src/BootstrapAdminUi/public/app.rtl.css index f5e2ba8e..0868c220 100644 --- a/src/BootstrapAdminUi/public/app.rtl.css +++ b/src/BootstrapAdminUi/public/app.rtl.css @@ -27,7 +27,7 @@ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. - */.accordion .accordion-item .accordion-header:hover{background:var(--tblr-bg-surface)}.accordion .accordion-item .accordion-body{color:var(--tblr-body-color);padding:var(--tblr-accordion-body-padding-y) var(--tblr-accordion-body-padding-x)}/*! + */.accordion .accordion-item .accordion-header{line-height:28px}.accordion .accordion-item .accordion-header:hover{background:#f8f9fa}.accordion .accordion-item .accordion-header:not(.collapsed){font-weight:var(--tblr-font-weight-bold)}.accordion .accordion-item .accordion-body{color:var(--tblr-body-color);padding:var(--tblr-accordion-body-padding-y) var(--tblr-accordion-body-padding-x)}.accordion .accordion-item .accordion-button{font-size:.875rem}.accordion .accordion-item .accordion-button:not(.collapsed){font-weight:700}/*! * This file is part of the Sylius package. * * (c) Sylius Sp. z o.o. diff --git a/src/BootstrapAdminUi/public/symfony_ux.js b/src/BootstrapAdminUi/public/symfony_ux.js index 1a415b92..f5821d96 100644 --- a/src/BootstrapAdminUi/public/symfony_ux.js +++ b/src/BootstrapAdminUi/public/symfony_ux.js @@ -1,2 +1,2 @@ /*! For license information please see symfony_ux.js.LICENSE.txt */ -(()=>{var e={490:(e,t,n)=>{var r={"./theme-switcher-controller.js":431};function i(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=s,e.exports=i,i.id=490},891:(e,t,n)=>{"use strict";n.d(t,{lg:()=>Z,xI:()=>ce});class r{constructor(e,t,n){this.eventTarget=e,this.eventName=t,this.eventOptions=n,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){const t=function(e){if("immediatePropagationStopped"in e)return e;{const{stopImmediatePropagation:t}=e;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}(e);for(const e of this.bindings){if(t.immediatePropagationStopped)break;e.handleEvent(t)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort(((e,t)=>{const n=e.index,r=t.index;return nr?1:0}))}}class i{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach((e=>e.connect())))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach((e=>e.disconnect())))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce(((e,t)=>e.concat(Array.from(t.values()))),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,t=!1){this.fetchEventListenerForBinding(e).bindingDisconnected(e),t&&this.clearEventListenersForBinding(e)}handleError(e,t,n={}){this.application.handleError(e,`Error ${t}`,n)}clearEventListenersForBinding(e){const t=this.fetchEventListenerForBinding(e);t.hasBindings()||(t.disconnect(),this.removeMappedEventListenerFor(e))}removeMappedEventListenerFor(e){const{eventTarget:t,eventName:n,eventOptions:r}=e,i=this.fetchEventListenerMapForEventTarget(t),s=this.cacheKey(n,r);i.delete(s),0==i.size&&this.eventListenerMaps.delete(t)}fetchEventListenerForBinding(e){const{eventTarget:t,eventName:n,eventOptions:r}=e;return this.fetchEventListener(t,n,r)}fetchEventListener(e,t,n){const r=this.fetchEventListenerMapForEventTarget(e),i=this.cacheKey(t,n);let s=r.get(i);return s||(s=this.createEventListener(e,t,n),r.set(i,s)),s}createEventListener(e,t,n){const i=new r(e,t,n);return this.started&&i.connect(),i}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){const n=[e];return Object.keys(t).sort().forEach((e=>{n.push(`${t[e]?"":"!"}${e}`)})),n.join(":")}}const s={stop:({event:e,value:t})=>(t&&e.stopPropagation(),!0),prevent:({event:e,value:t})=>(t&&e.preventDefault(),!0),self:({event:e,value:t,element:n})=>!t||n===e.target},o=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function a(e){return"window"==e?window:"document"==e?document:void 0}function l(e){return e.replace(/(?:[_-])([a-z0-9])/g,((e,t)=>t.toUpperCase()))}function c(e){return l(e.replace(/--/g,"-").replace(/__/g,"_"))}function u(e){return e.charAt(0).toUpperCase()+e.slice(1)}function d(e){return e.replace(/([A-Z])/g,((e,t)=>`-${t.toLowerCase()}`))}function h(e){return null!=e}function p(e,t){return Object.prototype.hasOwnProperty.call(e,t)}const f=["meta","ctrl","alt","shift"];class m{constructor(e,t,n,r){this.element=e,this.index=t,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||function(e){const t=e.tagName.toLowerCase();if(t in v)return v[t](e)}(e)||g("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||g("missing identifier"),this.methodName=n.methodName||g("missing method name"),this.keyFilter=n.keyFilter||"",this.schema=r}static forToken(e,t){return new this(e.element,e.index,function(e){const t=e.trim().match(o)||[];let n=t[2],r=t[3];return r&&!["keydown","keyup","keypress"].includes(n)&&(n+=`.${r}`,r=""),{eventTarget:a(t[4]),eventName:n,eventOptions:t[7]?(i=t[7],i.split(":").reduce(((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)})),{})):{},identifier:t[5],methodName:t[6],keyFilter:t[1]||r};var i}(e.content),t)}toString(){const e=this.keyFilter?`.${this.keyFilter}`:"",t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}${t}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(e){if(!this.keyFilter)return!1;const t=this.keyFilter.split("+");if(this.keyFilterDissatisfied(e,t))return!0;const n=t.filter((e=>!f.includes(e)))[0];return!!n&&(p(this.keyMappings,n)||g(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[n].toLowerCase()!==e.key.toLowerCase())}shouldIgnoreMouseEvent(e){if(!this.keyFilter)return!1;const t=[this.keyFilter];return!!this.keyFilterDissatisfied(e,t)}get params(){const e={},t=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:n,value:r}of Array.from(this.element.attributes)){const i=n.match(t),s=i&&i[1];s&&(e[l(s)]=y(r))}return e}get eventTargetName(){return(e=this.eventTarget)==window?"window":e==document?"document":void 0;var e}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(e,t){const[n,r,i,s]=f.map((e=>t.includes(e)));return e.metaKey!==n||e.ctrlKey!==r||e.altKey!==i||e.shiftKey!==s}}const v={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:e=>"submit"==e.getAttribute("type")?"click":"input",select:()=>"change",textarea:()=>"input"};function g(e){throw new Error(e)}function y(e){try{return JSON.parse(e)}catch(t){return e}}class b{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){const t=this.prepareActionEvent(e);this.willBeInvokedByEvent(e)&&this.applyEventModifiers(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){const e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){const{element:t}=this.action,{actionDescriptorFilters:n}=this.context.application,{controller:r}=this.context;let i=!0;for(const[s,o]of Object.entries(this.eventOptions))if(s in n){const a=n[s];i=i&&a({name:s,value:o,event:e,element:t,controller:r})}return i}prepareActionEvent(e){return Object.assign(e,{params:this.action.params})}invokeWithEvent(e){const{target:t,currentTarget:n}=e;try{this.method.call(this.controller,e),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:n,action:this.methodName})}catch(t){const{identifier:n,controller:r,element:i,index:s}=this,o={identifier:n,controller:r,element:i,index:s,event:e};this.context.handleError(t,`invoking action "${this.action}"`,o)}}willBeInvokedByEvent(e){const t=e.target;return!(e instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(e))&&(!(e instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(e))&&(this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class O{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const e=new Set(this.matchElementsInTree());for(const t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(const t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){this.elements.has(e)?this.delegate.elementAttributeChanged&&this.matchElement(e)?this.delegate.elementAttributeChanged(e,t):this.removeElement(e):this.matchElement(e)&&this.addElement(e)}processRemovedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.processTree(e,this.removeElement)}}processAddedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.elementIsActive(e)&&this.processTree(e,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(const n of this.matchElementsInTree(e))t.call(this,n)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}}class w{constructor(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new O(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}}function E(e,t,n){A(e,t).add(n)}function k(e,t,n){A(e,t).delete(n),function(e,t){const n=e.get(t);null!=n&&0==n.size&&e.delete(t)}(e,t)}function A(e,t){let n=e.get(t);return n||(n=new Set,e.set(t,n)),n}class S{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce(((e,t)=>e.concat(Array.from(t))),[])}get size(){return Array.from(this.valuesByKey.values()).reduce(((e,t)=>e+t.size),0)}add(e,t){E(this.valuesByKey,e,t)}delete(e,t){k(this.valuesByKey,e,t)}has(e,t){const n=this.valuesByKey.get(e);return null!=n&&n.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some((t=>t.has(e)))}getValuesForKey(e){const t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter((([t,n])=>n.has(e))).map((([e,t])=>e))}}class C{constructor(e,t,n,r){this._selector=t,this.details=r,this.elementObserver=new O(e,this),this.delegate=n,this.matchesByElement=new S}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(e){this._selector=e,this.refresh()}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(e){const{selector:t}=this;if(t){const n=e.matches(t);return this.delegate.selectorMatchElement?n&&this.delegate.selectorMatchElement(e,this.details):n}return!1}matchElementsInTree(e){const{selector:t}=this;if(t){const n=this.matchElement(e)?[e]:[],r=Array.from(e.querySelectorAll(t)).filter((e=>this.matchElement(e)));return n.concat(r)}return[]}elementMatched(e){const{selector:t}=this;t&&this.selectorMatched(e,t)}elementUnmatched(e){const t=this.matchesByElement.getKeysForValue(e);for(const n of t)this.selectorUnmatched(e,n)}elementAttributeChanged(e,t){const{selector:n}=this;if(n){const t=this.matchElement(e),r=this.matchesByElement.has(n,e);t&&!r?this.selectorMatched(e,n):!t&&r&&this.selectorUnmatched(e,n)}}selectorMatched(e,t){this.delegate.selectorMatched(e,t,this.details),this.matchesByElement.add(t,e)}selectorUnmatched(e,t){this.delegate.selectorUnmatched(e,t,this.details),this.matchesByElement.delete(t,e)}}class M{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){const t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){const n=this.delegate.getStringMapKeyForAttribute(e);if(null!=n){this.stringMap.has(e)||this.stringMapKeyAdded(n,e);const r=this.element.getAttribute(e);if(this.stringMap.get(e)!=r&&this.stringMapValueChanged(r,n,t),null==r){const t=this.stringMap.get(e);this.stringMap.delete(e),t&&this.stringMapKeyRemoved(n,e,t)}else this.stringMap.set(e,r)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,n){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,n)}stringMapKeyRemoved(e,t,n){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,n)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map((e=>e.name))}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class T{constructor(e,t,n){this.attributeObserver=new w(e,t,this),this.delegate=n,this.tokensByElement=new S}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){const[t,n]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(n)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach((e=>this.tokenMatched(e)))}tokensUnmatched(e){e.forEach((e=>this.tokenUnmatched(e)))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){const t=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),r=function(e,t){const n=Math.max(e.length,t.length);return Array.from({length:n},((n,r)=>[e[r],t[r]]))}(t,n).findIndex((([e,t])=>{return r=t,!((n=e)&&r&&n.index==r.index&&n.content==r.content);var n,r}));return-1==r?[[],[]]:[t.slice(r),n.slice(r)]}readTokensForElement(e){const t=this.attributeName;return function(e,t,n){return e.trim().split(/\s+/).filter((e=>e.length)).map(((e,r)=>({element:t,attributeName:n,content:e,index:r})))}(e.getAttribute(t)||"",e,t)}}class x{constructor(e,t,n){this.tokenListObserver=new T(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){const{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))}tokenUnmatched(e){const{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}}}class F{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new x(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){const t=new b(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){const t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}disconnectAllActions(){this.bindings.forEach((e=>this.delegate.bindingDisconnected(e,!0))),this.bindingsByAction.clear()}parseValueForToken(e){const t=m.forToken(e,this.schema);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}}class L{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new M(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){const n=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,n.writer(this.receiver[e]),n.writer(n.defaultValue))}stringMapValueChanged(e,t,n){const r=this.valueDescriptorNameMap[t];null!==e&&(null===n&&(n=r.writer(r.defaultValue)),this.invokeChangedCallback(t,e,n))}stringMapKeyRemoved(e,t,n){const r=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,r.writer(this.receiver[e]),n):this.invokeChangedCallback(e,r.writer(r.defaultValue),n)}invokeChangedCallbacksForDefaultValues(){for(const{key:e,name:t,defaultValue:n,writer:r}of this.valueDescriptors)null==n||this.controller.data.has(e)||this.invokeChangedCallback(t,r(n),void 0)}invokeChangedCallback(e,t,n){const r=`${e}Changed`,i=this.receiver[r];if("function"==typeof i){const r=this.valueDescriptorNameMap[e];try{const e=r.reader(t);let s=n;n&&(s=r.reader(n)),i.call(this.receiver,e,s)}catch(e){throw e instanceof TypeError&&(e.message=`Stimulus Value "${this.context.identifier}.${r.name}" - ${e.message}`),e}}}get valueDescriptors(){const{valueDescriptorMap:e}=this;return Object.keys(e).map((t=>e[t]))}get valueDescriptorNameMap(){const e={};return Object.keys(this.valueDescriptorMap).forEach((t=>{const n=this.valueDescriptorMap[t];e[n.name]=n})),e}hasValue(e){const t=`has${u(this.valueDescriptorNameMap[e].name)}`;return this.receiver[t]}}class I{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new S}start(){this.tokenListObserver||(this.tokenListObserver=new T(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var n;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetConnected(e,t))))}disconnectTarget(e,t){var n;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetDisconnected(e,t))))}disconnectAllTargets(){for(const e of this.targetsByName.keys)for(const t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function N(e,t){const n=_(e);return Array.from(n.reduce(((e,n)=>(function(e,t){const n=e[t];return Array.isArray(n)?n:[]}(n,t).forEach((t=>e.add(t))),e)),new Set))}function P(e,t){return _(e).reduce(((e,n)=>(e.push(...function(e,t){const n=e[t];return n?Object.keys(n).map((e=>[e,n[e]])):[]}(n,t)),e)),[])}function _(e){const t=[];for(;e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}class j{constructor(e,t){this.started=!1,this.context=e,this.delegate=t,this.outletsByName=new S,this.outletElementsByName=new S,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach((e=>{this.setupSelectorObserverForOutlet(e),this.setupAttributeObserverForOutlet(e)})),this.started=!0,this.dependentContexts.forEach((e=>e.refresh())))}refresh(){this.selectorObserverMap.forEach((e=>e.refresh())),this.attributeObserverMap.forEach((e=>e.refresh()))}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach((e=>e.stop())),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach((e=>e.stop())),this.attributeObserverMap.clear())}selectorMatched(e,t,{outletName:n}){const r=this.getOutlet(e,n);r&&this.connectOutlet(r,e,n)}selectorUnmatched(e,t,{outletName:n}){const r=this.getOutletFromMap(e,n);r&&this.disconnectOutlet(r,e,n)}selectorMatchElement(e,{outletName:t}){const n=this.selector(t),r=this.hasOutlet(e,t),i=e.matches(`[${this.schema.controllerAttribute}~=${t}]`);return!!n&&(r&&i&&e.matches(n))}elementMatchedAttribute(e,t){const n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}elementAttributeValueChanged(e,t){const n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}elementUnmatchedAttribute(e,t){const n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}connectOutlet(e,t,n){var r;this.outletElementsByName.has(n,t)||(this.outletsByName.add(n,e),this.outletElementsByName.add(n,t),null===(r=this.selectorObserverMap.get(n))||void 0===r||r.pause((()=>this.delegate.outletConnected(e,t,n))))}disconnectOutlet(e,t,n){var r;this.outletElementsByName.has(n,t)&&(this.outletsByName.delete(n,e),this.outletElementsByName.delete(n,t),null===(r=this.selectorObserverMap.get(n))||void 0===r||r.pause((()=>this.delegate.outletDisconnected(e,t,n))))}disconnectAllOutlets(){for(const e of this.outletElementsByName.keys)for(const t of this.outletElementsByName.getValuesForKey(e))for(const n of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(n,t,e)}updateSelectorObserverForOutlet(e){const t=this.selectorObserverMap.get(e);t&&(t.selector=this.selector(e))}setupSelectorObserverForOutlet(e){const t=this.selector(e),n=new C(document.body,t,this,{outletName:e});this.selectorObserverMap.set(e,n),n.start()}setupAttributeObserverForOutlet(e){const t=this.attributeNameForOutletName(e),n=new w(this.scope.element,t,this);this.attributeObserverMap.set(e,n),n.start()}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}attributeNameForOutletName(e){return this.scope.schema.outletAttributeForScope(this.identifier,e)}getOutletNameFromOutletAttributeName(e){return this.outletDefinitions.find((t=>this.attributeNameForOutletName(t)===e))}get outletDependencies(){const e=new S;return this.router.modules.forEach((t=>{N(t.definition.controllerConstructor,"outlets").forEach((n=>e.add(n,t.identifier)))})),e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const e=this.dependentControllerIdentifiers;return this.router.contexts.filter((t=>e.includes(t.identifier)))}hasOutlet(e,t){return!!this.getOutlet(e,t)||!!this.getOutletFromMap(e,t)}getOutlet(e,t){return this.application.getControllerForElementAndIdentifier(e,t)}getOutletFromMap(e,t){return this.outletsByName.getValuesForKey(t).find((t=>t.element===e))}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class D{constructor(e,t){this.logDebugActivity=(e,t={})=>{const{identifier:n,controller:r,element:i}=this;t=Object.assign({identifier:n,controller:r,element:i},t),this.application.logDebugActivity(this.identifier,e,t)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new F(this,this.dispatcher),this.valueObserver=new L(this,this.controller),this.targetObserver=new I(this,this),this.outletObserver=new j(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(e){this.handleError(e,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,n={}){const{identifier:r,controller:i,element:s}=this;n=Object.assign({identifier:r,controller:i,element:s},n),this.application.handleError(e,`Error ${t}`,n)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}outletConnected(e,t,n){this.invokeControllerMethod(`${c(n)}OutletConnected`,e,t)}outletDisconnected(e,t,n){this.invokeControllerMethod(`${c(n)}OutletDisconnected`,e,t)}invokeControllerMethod(e,...t){const n=this.controller;"function"==typeof n[e]&&n[e](...t)}}function V(e){return function(e,t){const n=R(e),r=function(e,t){return B(t).reduce(((n,r)=>{const i=function(e,t,n){const r=Object.getOwnPropertyDescriptor(e,n);if(!r||!("value"in r)){const e=Object.getOwnPropertyDescriptor(t,n).value;return r&&(e.get=r.get||e.get,e.set=r.set||e.set),e}}(e,t,r);return i&&Object.assign(n,{[r]:i}),n}),{})}(e.prototype,t);return Object.defineProperties(n.prototype,r),n}(e,function(e){const t=N(e,"blessings");return t.reduce(((t,n)=>{const r=n(e);for(const e in r){const n=t[e]||{};t[e]=Object.assign(n,r[e])}return t}),{})}(e))}const B="function"==typeof Object.getOwnPropertySymbols?e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]:Object.getOwnPropertyNames,R=(()=>{function e(e){function t(){return Reflect.construct(e,arguments,new.target)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}try{return function(){const t=e((function(){this.a.call(this)}));t.prototype.a=function(){},new t}(),e}catch(e){return e=>class extends e{}}})();class ${constructor(e,t){this.application=e,this.definition=function(e){return{identifier:e.identifier,controllerConstructor:V(e.controllerConstructor)}}(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){const t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){const t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new D(this,e),this.contextsByScope.set(e,t)),t}}class q{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){const t=this.data.get(this.getDataKey(e))||"";return t.match(/[^\s]+/g)||[]}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}}class H{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){const t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){const n=this.getAttributeNameForKey(e);return this.element.setAttribute(n,t),this.get(e)}has(e){const t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){const t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${d(e)}`}}class U{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,n){let r=this.warnedKeysByObject.get(e);r||(r=new Set,this.warnedKeysByObject.set(e,r)),r.has(t)||(r.add(t),this.logger.warn(n,e))}}function K(e,t){return`[${e}~="${t}"]`}class z{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce(((e,t)=>e||this.findTarget(t)||this.findLegacyTarget(t)),void 0)}findAll(...e){return e.reduce(((e,t)=>[...e,...this.findAllTargets(t),...this.findAllLegacyTargets(t)]),[])}findTarget(e){const t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){const t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){return K(this.schema.targetAttributeForScope(this.identifier),e)}findLegacyTarget(e){const t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){const t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map((t=>this.deprecate(t,e)))}getLegacySelectorForTargetName(e){const t=`${this.identifier}.${e}`;return K(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:n}=this,r=this.schema.targetAttribute,i=this.schema.targetAttributeForScope(n);this.guide.warn(e,`target:${t}`,`Please replace ${r}="${n}.${t}" with ${i}="${t}". The ${r} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}}class W{constructor(e,t){this.scope=e,this.controllerElement=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce(((e,t)=>e||this.findOutlet(t)),void 0)}findAll(...e){return e.reduce(((e,t)=>[...e,...this.findAllOutlets(t)]),[])}getSelectorForOutletName(e){const t=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(t)}findOutlet(e){const t=this.getSelectorForOutletName(e);if(t)return this.findElement(t,e)}findAllOutlets(e){const t=this.getSelectorForOutletName(e);return t?this.findAllElements(t,e):[]}findElement(e,t){return this.scope.queryElements(e).filter((n=>this.matchesElement(n,e,t)))[0]}findAllElements(e,t){return this.scope.queryElements(e).filter((n=>this.matchesElement(n,e,t)))}matchesElement(e,t,n){const r=e.getAttribute(this.scope.schema.controllerAttribute)||"";return e.matches(t)&&r.split(" ").includes(n)}}class G{constructor(e,t,n,r){this.targets=new z(this),this.classes=new q(this),this.data=new H(this),this.containsElement=e=>e.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=n,this.guide=new U(r),this.outlets=new W(this.documentScope,t)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return K(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new G(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class J{constructor(e,t,n){this.element=e,this.schema=t,this.delegate=n,this.valueListObserver=new x(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){const{element:t,content:n}=e;return this.parseValueForElementAndIdentifier(t,n)}parseValueForElementAndIdentifier(e,t){const n=this.fetchScopesByIdentifierForElement(e);let r=n.get(t);return r||(r=this.delegate.createScopeForElementAndIdentifier(e,t),n.set(t,r)),r}elementMatchedValue(e,t){const n=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,n),1==n&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){const n=this.scopeReferenceCounts.get(t);n&&(this.scopeReferenceCounts.set(t,n-1),1==n&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}}class Q{constructor(e){this.application=e,this.scopeObserver=new J(this.element,this.schema,this),this.scopesByIdentifier=new S,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce(((e,t)=>e.concat(t.contexts)),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);const t=new $(this.application,e);this.connectModule(t);const n=e.controllerConstructor.afterLoad;n&&n.call(e.controllerConstructor,e.identifier,this.application)}unloadIdentifier(e){const t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){const n=this.modulesByIdentifier.get(t);if(n)return n.contexts.find((t=>t.element==e))}proposeToConnectScopeForElementAndIdentifier(e,t){const n=this.scopeObserver.parseValueForElementAndIdentifier(e,t);n?this.scopeObserver.elementMatchedValue(n.element,n):console.error(`Couldn't find or create scope for identifier: "${t}" and element:`,e)}handleError(e,t,n){this.application.handleError(e,t,n)}createScopeForElementAndIdentifier(e,t){return new G(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((t=>e.connectContextForScope(t)))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((t=>e.disconnectContextForScope(t)))}}const X={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:e=>`data-${e}-target`,outletAttributeForScope:(e,t)=>`data-${e}-${t}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},Y("abcdefghijklmnopqrstuvwxyz".split("").map((e=>[e,e])))),Y("0123456789".split("").map((e=>[e,e]))))};function Y(e){return e.reduce(((e,[t,n])=>Object.assign(Object.assign({},e),{[t]:n})),{})}class Z{constructor(e=document.documentElement,t=X){this.logger=console,this.debug=!1,this.logDebugActivity=(e,t,n={})=>{this.debug&&this.logFormattedMessage(e,t,n)},this.element=e,this.schema=t,this.dispatcher=new i(this),this.router=new Q(this),this.actionDescriptorFilters=Object.assign({},s)}static start(e,t){const n=new this(e,t);return n.start(),n}async start(){await new Promise((e=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>e())):e()})),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,t){this.load({identifier:e,controllerConstructor:t})}registerActionOption(e,t){this.actionDescriptorFilters[e]=t}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach((e=>{e.controllerConstructor.shouldLoad&&this.router.loadDefinition(e)}))}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach((e=>this.router.unloadIdentifier(e)))}get controllers(){return this.router.contexts.map((e=>e.controller))}getControllerForElementAndIdentifier(e,t){const n=this.router.getContextForElementAndIdentifier(e,t);return n?n.controller:null}handleError(e,t,n){var r;this.logger.error("%s\n\n%o\n\n%o",t,e,n),null===(r=window.onerror)||void 0===r||r.call(window,t,"",0,0,e)}logFormattedMessage(e,t,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}}function ee(e,t,n){return e.application.getControllerForElementAndIdentifier(t,n)}function te(e,t,n){let r=ee(e,t,n);return r||(e.application.router.proposeToConnectScopeForElementAndIdentifier(t,n),r=ee(e,t,n),r||void 0)}function ne([e,t],n){return function(e){const{token:t,typeDefinition:n}=e,r=`${d(t)}-value`,i=function(e){const{controller:t,token:n,typeDefinition:r}=e,i={controller:t,token:n,typeObject:r},s=function(e){const{controller:t,token:n,typeObject:r}=e,i=h(r.type),s=h(r.default),o=i&&s,a=i&&!s,l=!i&&s,c=re(r.type),u=ie(e.typeObject.default);if(a)return c;if(l)return u;if(c!==u){throw new Error(`The specified default value for the Stimulus Value "${t?`${t}.${n}`:n}" must match the defined type "${c}". The provided default value of "${r.default}" is of type "${u}".`)}if(o)return c}(i),o=ie(r),a=re(r),l=s||o||a;if(l)return l;const c=t?`${t}.${r}`:n;throw new Error(`Unknown value type "${c}" for "${n}" value`)}(e);return{type:i,key:r,name:l(r),get defaultValue(){return function(e){const t=re(e);if(t)return se[t];const n=p(e,"default"),r=p(e,"type"),i=e;if(n)return i.default;if(r){const{type:e}=i,t=re(e);if(t)return se[t]}return e}(n)},get hasCustomDefaultValue(){return void 0!==ie(n)},reader:oe[i],writer:ae[i]||ae.default}}({controller:n,token:e,typeDefinition:t})}function re(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function ie(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(e)?"array":"[object Object]"===Object.prototype.toString.call(e)?"object":void 0}const se={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},oe={array(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${e}" of type "${ie(t)}"`);return t},boolean:e=>!("0"==e||"false"==String(e).toLowerCase()),number:e=>Number(e.replace(/_/g,"")),object(e){const t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${e}" of type "${ie(t)}"`);return t},string:e=>e},ae={default:function(e){return`${e}`},array:le,object:le};function le(e){return JSON.stringify(e)}class ce{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:n={},prefix:r=this.identifier,bubbles:i=!0,cancelable:s=!0}={}){const o=new CustomEvent(r?`${r}:${e}`:e,{detail:n,bubbles:i,cancelable:s});return t.dispatchEvent(o),o}}ce.blessings=[function(e){return N(e,"classes").reduce(((e,t)=>{return Object.assign(e,(n=t,{[`${n}Class`]:{get(){const{classes:e}=this;if(e.has(n))return e.get(n);{const t=e.getAttributeName(n);throw new Error(`Missing attribute "${t}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${u(n)}Class`]:{get(){return this.classes.has(n)}}}));var n}),{})},function(e){return N(e,"targets").reduce(((e,t)=>{return Object.assign(e,(n=t,{[`${n}Target`]:{get(){const e=this.targets.find(n);if(e)return e;throw new Error(`Missing target element "${n}" for "${this.identifier}" controller`)}},[`${n}Targets`]:{get(){return this.targets.findAll(n)}},[`has${u(n)}Target`]:{get(){return this.targets.has(n)}}}));var n}),{})},function(e){const t=P(e,"values"),n={valueDescriptorMap:{get(){return t.reduce(((e,t)=>{const n=ne(t,this.identifier),r=this.data.getAttributeNameForKey(n.key);return Object.assign(e,{[r]:n})}),{})}}};return t.reduce(((e,t)=>Object.assign(e,function(e,t){const n=ne(e,t),{key:r,name:i,reader:s,writer:o}=n;return{[i]:{get(){const e=this.data.get(r);return null!==e?s(e):n.defaultValue},set(e){void 0===e?this.data.delete(r):this.data.set(r,o(e))}},[`has${u(i)}`]:{get(){return this.data.has(r)||n.hasCustomDefaultValue}}}}(t))),n)},function(e){return N(e,"outlets").reduce(((e,t)=>Object.assign(e,function(e){const t=c(e);return{[`${t}Outlet`]:{get(){const t=this.outlets.find(e),n=this.outlets.getSelectorForOutletName(e);if(t){const n=te(this,t,e);if(n)return n;throw new Error(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${n}".`)}},[`${t}Outlets`]:{get(){const t=this.outlets.findAll(e);return t.length>0?t.map((t=>{const n=te(this,t,e);if(n)return n;console.warn(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`,t)})).filter((e=>e)):[]}},[`${t}OutletElement`]:{get(){const t=this.outlets.find(e),n=this.outlets.getSelectorForOutletName(e);if(t)return t;throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${n}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(e)}},[`has${u(t)}Outlet`]:{get(){return this.outlets.has(e)}}}}(t))),{})}],ce.targets=[],ce.outlets=[],ce.values={}},431:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;nu});var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),n=t,(r=[{key:"toggle",value:function(){var e="dark"===(document.documentElement.getAttribute("data-bs-theme")||"light")?"light":"dark";localStorage.setItem("sylius-theme",e),document.documentElement.setAttribute("data-bs-theme",e)}}])&&i(n.prototype,r),s&&i(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,s}(n(891).xI)},371:function(e){e.exports=function(){"use strict";function e(e,t){e.split(/\s+/).forEach((e=>{t(e)}))}class t{constructor(){this._events=void 0,this._events={}}on(t,n){e(t,(e=>{const t=this._events[e]||[];t.push(n),this._events[e]=t}))}off(t,n){var r=arguments.length;0!==r?e(t,(e=>{if(1===r)return void delete this._events[e];const t=this._events[e];void 0!==t&&(t.splice(t.indexOf(n),1),this._events[e]=t)})):this._events={}}trigger(t,...n){var r=this;e(t,(e=>{const t=r._events[e];void 0!==t&&t.forEach((e=>{e.apply(r,n)}))}))}}function n(e){return e.plugins={},class extends e{constructor(...e){super(...e),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(t,n){e.plugins[t]={name:t,fn:n}}initializePlugins(e){var t,n;const r=this,i=[];if(Array.isArray(e))e.forEach((e=>{"string"==typeof e?i.push(e):(r.plugins.settings[e.name]=e.options,i.push(e.name))}));else if(e)for(t in e)e.hasOwnProperty(t)&&(r.plugins.settings[t]=e[t],i.push(t));for(;n=i.shift();)r.require(n)}loadPlugin(t){var n=this,r=n.plugins,i=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');r.requested[t]=!0,r.loaded[t]=i.fn.apply(n,[n.plugins.settings[t]||{}]),r.names.push(t)}require(e){var t=this,n=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(n.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return n.loaded[e]}}}const r=e=>(e=e.filter(Boolean)).length<2?e[0]||"":1==l(e)?"["+e.join("")+"]":"(?:"+e.join("|")+")",i=e=>{if(!o(e))return e.join("");let t="",n=0;const r=()=>{n>1&&(t+="{"+n+"}")};return e.forEach(((i,s)=>{i!==e[s-1]?(r(),t+=i,n=1):n++})),r(),t},s=e=>{let t=u(e);return r(t)},o=e=>new Set(e).size!==e.length,a=e=>(e+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),l=e=>e.reduce(((e,t)=>Math.max(e,c(t))),0),c=e=>u(e).length,u=e=>Array.from(e),d=e=>{if(1===e.length)return[[e]];let t=[];const n=e.substring(1);return d(n).forEach((function(n){let r=n.slice(0);r[0]=e.charAt(0)+r[0],t.push(r),r=n.slice(0),r.unshift(e.charAt(0)),t.push(r)})),t},h=[[0,65535]],p="[̀-ͯ·ʾʼ]";let f,m;const v=3,g={},y={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let e in y){let t=y[e]||"";for(let n=0;n{void 0===f&&(f=C(e||h))},w=(e,t="NFKD")=>e.normalize(t),E=e=>u(e).reduce(((e,t)=>e+k(t)),""),k=e=>(e=w(e).toLowerCase().replace(b,(e=>g[e]||"")),w(e,"NFC"));function*A(e){for(const[t,n]of e)for(let e=t;e<=n;e++){let t=String.fromCharCode(e),n=E(t);n!=t.toLowerCase()&&(n.length>v||0!=n.length&&(yield{folded:n,composed:t,code_point:e}))}}const S=e=>{const t={},n=(e,n)=>{const r=t[e]||new Set,i=new RegExp("^"+s(r)+"$","iu");n.match(i)||(r.add(a(n)),t[e]=r)};for(let t of A(e))n(t.folded,t.folded),n(t.folded,t.composed);return t},C=e=>{const t=S(e),n={};let i=[];for(let e in t){let r=t[e];r&&(n[e]=s(r)),e.length>1&&i.push(a(e))}i.sort(((e,t)=>t.length-e.length));const o=r(i);return m=new RegExp("^"+o,"u"),n},M=(e,t=1)=>{let n=0;return e=e.map((e=>(f[e]&&(n+=e.length),f[e]||e))),n>=t?i(e):""},T=(e,t=1)=>(t=Math.max(t,e.length-1),r(d(e).map((e=>M(e,t))))),x=(e,t=!0)=>{let n=e.length>1?1:0;return r(e.map((e=>{let r=[];const s=t?e.length():e.length()-1;for(let t=0;t{for(const n of t){if(n.start!=e.start||n.end!=e.end)continue;if(n.substrs.join("")!==e.substrs.join(""))continue;let t=e.parts;const r=e=>{for(const n of t){if(n.start===e.start&&n.substr===e.substr)return!1;if(1!=e.length&&1!=n.length){if(e.startn.start)return!0;if(n.starte.start)return!0}}return!1};if(!(n.parts.filter(r).length>0))return!0}return!1};class L{constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(e){e&&(this.parts.push(e),this.substrs.push(e.substr),this.start=Math.min(e.start,this.start),this.end=Math.max(e.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(e,t){let n=new L,r=JSON.parse(JSON.stringify(this.parts)),i=r.pop();for(const e of r)n.add(e);let s=t.substr.substring(0,e-i.start),o=s.length;return n.add({start:i.start,end:i.start+o,length:o,substr:s}),n}}const I=e=>{O(),e=E(e);let t="",n=[new L];for(let r=0;r0){a=a.sort(((e,t)=>e.length()-t.length()));for(let e of a)F(e,n)||n.push(e)}else if(r>0&&1==l.size&&!l.has("3")){t+=x(n,!1);let e=new L;const r=n[0];r&&e.add(r.last()),n=[e]}}return t+=x(n,!0),t},N=(e,t)=>{if(e)return e[t]},P=(e,t)=>{if(e){for(var n,r=t.split(".");(n=r.shift())&&(e=e[n]););return e}},_=(e,t,n)=>{var r,i;return e?(e+="",null==t.regex||-1===(i=e.search(t.regex))?0:(r=t.string.length/e.length,0===i&&(r+=.5),r*n)):0},j=(e,t)=>{var n=e[t];if("function"==typeof n)return n;n&&!Array.isArray(n)&&(e[t]=[n])},D=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},V=(e,t)=>"number"==typeof e&&"number"==typeof t?e>t?1:e(t=E(t+"").toLowerCase())?1:t>e?-1:0;class B{constructor(e,t){this.items=void 0,this.settings=void 0,this.items=e,this.settings=t||{diacritics:!0}}tokenize(e,t,n){if(!e||!e.length)return[];const r=[],i=e.split(/\s+/);var s;return n&&(s=new RegExp("^("+Object.keys(n).map(a).join("|")+"):(.*)$")),i.forEach((e=>{let n,i=null,o=null;s&&(n=e.match(s))&&(i=n[1],e=n[2]),e.length>0&&(o=this.settings.diacritics?I(e)||null:a(e),o&&t&&(o="\\b"+o)),r.push({string:e,regex:o?new RegExp(o,"iu"):null,field:i})})),r}getScoreFunction(e,t){var n=this.prepareSearch(e,t);return this._getScoreFunction(n)}_getScoreFunction(e){const t=e.tokens,n=t.length;if(!n)return function(){return 0};const r=e.options.fields,i=e.weights,s=r.length,o=e.getAttrFn;if(!s)return function(){return 1};const a=1===s?function(e,t){const n=r[0].field;return _(o(t,n),e,i[n]||1)}:function(e,t){var n=0;if(e.field){const r=o(t,e.field);!e.regex&&r?n+=1/s:n+=_(r,e,1)}else D(i,((r,i)=>{n+=_(o(t,i),e,r)}));return n/s};return 1===n?function(e){return a(t[0],e)}:"and"===e.options.conjunction?function(e){var r,i=0;for(let n of t){if((r=a(n,e))<=0)return 0;i+=r}return i/n}:function(e){var r=0;return D(t,(t=>{r+=a(t,e)})),r/n}}getSortFunction(e,t){var n=this.prepareSearch(e,t);return this._getSortFunction(n)}_getSortFunction(e){var t,n=[];const r=this,i=e.options,s=!e.query&&i.sort_empty?i.sort_empty:i.sort;if("function"==typeof s)return s.bind(this);const o=function(t,n){return"$score"===t?n.score:e.getAttrFn(r.items[n.id],t)};if(s)for(let t of s)(e.query||"$score"!==t.field)&&n.push(t);if(e.query){t=!0;for(let e of n)if("$score"===e.field){t=!1;break}t&&n.unshift({field:"$score",direction:"desc"})}else n=n.filter((e=>"$score"!==e.field));return n.length?function(e,t){var r,i;for(let s of n)if(i=s.field,r=("desc"===s.direction?-1:1)*V(o(i,e),o(i,t)))return r;return 0}:null}prepareSearch(e,t){const n={};var r=Object.assign({},t);if(j(r,"sort"),j(r,"sort_empty"),r.fields){j(r,"fields");const e=[];r.fields.forEach((t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),n[t.field]="weight"in t?t.weight:1})),r.fields=e}return{options:r,query:e.toLowerCase().trim(),tokens:this.tokenize(e,r.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:r.nesting?P:N}}search(e,t){var n,r,i=this;r=this.prepareSearch(e,t),t=r.options,e=r.query;const s=t.score||i._getScoreFunction(r);e.length?D(i.items,((e,i)=>{n=s(e),(!1===t.filter||n>0)&&r.items.push({score:n,id:i})})):D(i.items,((e,t)=>{r.items.push({score:1,id:t})}));const o=i._getSortFunction(r);return o&&r.items.sort(o),r.total=r.items.length,"number"==typeof t.limit&&(r.items=r.items.slice(0,t.limit)),r}}const R=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},$=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(q(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},q=e=>"string"==typeof e&&e.indexOf("<")>-1,H=e=>e.replace(/['"\\]/g,"\\$&"),U=(e,t)=>{var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!1),e.dispatchEvent(n)},K=(e,t)=>{Object.assign(e.style,t)},z=(e,...t)=>{var n=G(t);(e=J(e)).map((e=>{n.map((t=>{e.classList.add(t)}))}))},W=(e,...t)=>{var n=G(t);(e=J(e)).map((e=>{n.map((t=>{e.classList.remove(t)}))}))},G=e=>{var t=[];return R(e,(e=>{"string"==typeof e&&(e=e.trim().split(/[\11\12\14\15\40]/)),Array.isArray(e)&&(t=t.concat(e))})),t.filter(Boolean)},J=e=>(Array.isArray(e)||(e=[e]),e),Q=(e,t,n)=>{if(!n||n.contains(e))for(;e&&e.matches;){if(e.matches(t))return e;e=e.parentNode}},X=(e,t=0)=>t>0?e[e.length-1]:e[0],Y=e=>0===Object.keys(e).length,Z=(e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var n=0;e=e.previousElementSibling;)e.matches(t)&&n++;return n},ee=(e,t)=>{R(t,((t,n)=>{null==t?e.removeAttribute(n):e.setAttribute(n,""+t)}))},te=(e,t)=>{e.parentNode&&e.parentNode.replaceChild(t,e)},ne=(e,t)=>{if(null===t)return;if("string"==typeof t){if(!t.length)return;t=new RegExp(t,"i")}const n=e=>{var n=e.data.match(t);if(n&&e.data.length>0){var r=document.createElement("span");r.className="highlight";var i=e.splitText(n.index);i.splitText(n[0].length);var s=i.cloneNode(!0);return r.appendChild(s),te(i,r),1}return 0},r=e=>{1!==e.nodeType||!e.childNodes||/(script|style)/i.test(e.tagName)||"highlight"===e.className&&"SPAN"===e.tagName||Array.from(e.childNodes).forEach((e=>{i(e)}))},i=e=>3===e.nodeType?n(e):(r(e),0);i(e)},re=e=>{var t=e.querySelectorAll("span.highlight");Array.prototype.forEach.call(t,(function(e){var t=e.parentNode;t.replaceChild(e.firstChild,e),t.normalize()}))},ie=65,se=13,oe=27,ae=37,le=38,ce=39,ue=40,de=8,he=46,pe=9,fe="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var me={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(e){return e.length>0},render:{}};const ve=e=>null==e?null:ge(e),ge=e=>"boolean"==typeof e?e?"1":"0":e+"",ye=e=>(e+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),be=(e,t)=>t>0?setTimeout(e,t):(e.call(null),null),Oe=(e,t)=>{var n;return function(r,i){var s=this;n&&(s.loading=Math.max(s.loading-1,0),clearTimeout(n)),n=setTimeout((function(){n=null,s.loadedSearches[r]=!0,e.call(s,r,i)}),t)}},we=(e,t,n)=>{var r,i=e.trigger,s={};for(r of(e.trigger=function(){var n=arguments[0];if(-1===t.indexOf(n))return i.apply(e,arguments);s[n]=arguments},n.apply(e,[]),e.trigger=i,t))r in s&&i.apply(e,s[r])},Ee=e=>({start:e.selectionStart||0,length:(e.selectionEnd||0)-(e.selectionStart||0)}),ke=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},Ae=(e,t,n,r)=>{e.addEventListener(t,n,r)},Se=(e,t)=>!!t&&!!t[e]&&1==(t.altKey?1:0)+(t.ctrlKey?1:0)+(t.shiftKey?1:0)+(t.metaKey?1:0),Ce=(e,t)=>{const n=e.getAttribute("id");return n||(e.setAttribute("id",t),t)},Me=e=>e.replace(/[\\"']/g,"\\$&"),Te=(e,t)=>{t&&e.append(t)};function xe(e,t){var n=Object.assign({},me,t),r=n.dataAttr,i=n.labelField,s=n.valueField,o=n.disabledField,a=n.optgroupField,l=n.optgroupLabelField,c=n.optgroupValueField,u=e.tagName.toLowerCase(),d=e.getAttribute("placeholder")||e.getAttribute("data-placeholder");if(!d&&!n.allowEmptyOption){let t=e.querySelector('option[value=""]');t&&(d=t.textContent)}var h={placeholder:d,options:[],optgroups:[],items:[],maxItems:null},p=()=>{const t=e.getAttribute(r);if(t)h.options=JSON.parse(t),R(h.options,(e=>{h.items.push(e[s])}));else{var o=e.value.trim()||"";if(!n.allowEmptyOption&&!o.length)return;const t=o.split(n.delimiter);R(t,(e=>{const t={};t[i]=e,t[s]=e,h.options.push(t)})),h.items=t}};return"select"===u?(()=>{var t,u=h.options,d={},p=1;let f=0;var m=e=>{var t=Object.assign({},e.dataset),n=r&&t[r];return"string"==typeof n&&n.length&&(t=Object.assign(t,JSON.parse(n))),t},v=(e,t)=>{var r=ve(e.value);if(null!=r&&(r||n.allowEmptyOption)){if(d.hasOwnProperty(r)){if(t){var l=d[r][a];l?Array.isArray(l)?l.push(t):d[r][a]=[l,t]:d[r][a]=t}}else{var c=m(e);c[i]=c[i]||e.textContent,c[s]=c[s]||r,c[o]=c[o]||e.disabled,c[a]=c[a]||t,c.$option=e,c.$order=c.$order||++f,d[r]=c,u.push(c)}e.selected&&h.items.push(r)}},g=e=>{var t,n;(n=m(e))[l]=n[l]||e.getAttribute("label")||"",n[c]=n[c]||p++,n[o]=n[o]||e.disabled,n.$order=n.$order||++f,h.optgroups.push(n),t=n[c],R(e.children,(e=>{v(e,t)}))};h.maxItems=e.hasAttribute("multiple")?null:1,R(e.children,(e=>{"optgroup"===(t=e.tagName.toLowerCase())?g(e):"option"===t&&v(e)}))})():p(),Object.assign({},me,h,t)}var Fe=0;class Le extends(n(t)){constructor(e,t){var n;super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,Fe++;var r=$(e);if(r.tomselect)throw new Error("Tom Select already initialized on this element");r.tomselect=this,n=(window.getComputedStyle&&window.getComputedStyle(r,null)).getPropertyValue("direction");const i=xe(r,t);this.settings=i,this.input=r,this.tabIndex=r.tabIndex||0,this.is_select_tag="select"===r.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=Ce(r,"tomselect-"+Fe),this.isRequired=r.required,this.sifter=new B(this.options,{diacritics:i.diacritics}),i.mode=i.mode||(1===i.maxItems?"single":"multi"),"boolean"!=typeof i.hideSelected&&(i.hideSelected="multi"===i.mode),"boolean"!=typeof i.hidePlaceholder&&(i.hidePlaceholder="multi"!==i.mode);var s=i.createFilter;"function"!=typeof s&&("string"==typeof s&&(s=new RegExp(s)),s instanceof RegExp?i.createFilter=e=>s.test(e):i.createFilter=e=>this.settings.duplicates||!this.options[e]),this.initializePlugins(i.plugins),this.setupCallbacks(),this.setupTemplates();const o=$("
"),a=$("
"),l=this._render("dropdown"),c=$('
'),u=this.input.getAttribute("class")||"",d=i.mode;var h;z(o,i.wrapperClass,u,d),z(a,i.controlClass),Te(o,a),z(l,i.dropdownClass,d),i.copyClassesToDropdown&&z(l,u),z(c,i.dropdownContentClass),Te(l,c),$(i.dropdownParent||o).appendChild(l),q(i.controlInput)?(h=$(i.controlInput),D(["autocorrect","autocapitalize","autocomplete","spellcheck"],(e=>{r.getAttribute(e)&&ee(h,{[e]:r.getAttribute(e)})})),h.tabIndex=-1,a.appendChild(h),this.focus_node=h):i.controlInput?(h=$(i.controlInput),this.focus_node=h):(h=$(""),this.focus_node=a),this.wrapper=o,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const e=this,t=e.settings,n=e.control_input,r=e.dropdown,i=e.dropdown_content,s=e.wrapper,o=e.control,l=e.input,c=e.focus_node,u={passive:!0},d=e.inputId+"-ts-dropdown";ee(i,{id:d}),ee(c,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":d});const h=Ce(c,e.inputId+"-ts-control"),p="label[for='"+H(e.inputId)+"']",f=document.querySelector(p),m=e.focus.bind(e);if(f){Ae(f,"click",m),ee(f,{for:h});const t=Ce(f,e.inputId+"-ts-label");ee(c,{"aria-labelledby":t}),ee(i,{"aria-labelledby":t})}if(s.style.width=l.style.width,e.plugins.names.length){const t="plugin-"+e.plugins.names.join(" plugin-");z([s,r],t)}(null===t.maxItems||t.maxItems>1)&&e.is_select_tag&&ee(l,{multiple:"multiple"}),t.placeholder&&ee(n,{placeholder:t.placeholder}),!t.splitOn&&t.delimiter&&(t.splitOn=new RegExp("\\s*"+a(t.delimiter)+"+\\s*")),t.load&&t.loadThrottle&&(t.load=Oe(t.load,t.loadThrottle)),Ae(r,"mousemove",(()=>{e.ignoreHover=!1})),Ae(r,"mouseenter",(t=>{var n=Q(t.target,"[data-selectable]",r);n&&e.onOptionHover(t,n)}),{capture:!0}),Ae(r,"click",(t=>{const n=Q(t.target,"[data-selectable]");n&&(e.onOptionSelect(t,n),ke(t,!0))})),Ae(o,"click",(t=>{var r=Q(t.target,"[data-ts-item]",o);r&&e.onItemSelect(t,r)?ke(t,!0):""==n.value&&(e.onClick(),ke(t,!0))})),Ae(c,"keydown",(t=>e.onKeyDown(t))),Ae(n,"keypress",(t=>e.onKeyPress(t))),Ae(n,"input",(t=>e.onInput(t))),Ae(c,"blur",(t=>e.onBlur(t))),Ae(c,"focus",(t=>e.onFocus(t))),Ae(n,"paste",(t=>e.onPaste(t)));const v=t=>{const i=t.composedPath()[0];if(!s.contains(i)&&!r.contains(i))return e.isFocused&&e.blur(),void e.inputState();i==n&&e.isOpen?t.stopPropagation():ke(t,!0)},g=()=>{e.isOpen&&e.positionDropdown()};Ae(document,"mousedown",v),Ae(window,"scroll",g,u),Ae(window,"resize",g,u),this._destroy=()=>{document.removeEventListener("mousedown",v),window.removeEventListener("scroll",g),window.removeEventListener("resize",g),f&&f.removeEventListener("click",m)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",e.wrapper),e.sync(!1),t.items=[],delete t.optgroups,delete t.options,Ae(l,"invalid",(()=>{e.isValid&&(e.isValid=!1,e.isInvalid=!0,e.refreshState())})),e.updateOriginalInput(),e.refreshItems(),e.close(!1),e.inputState(),e.isSetup=!0,l.disabled?e.disable():l.readOnly?e.setReadOnly(!0):e.enable(),e.on("change",this.onChange),z(l,"tomselected","ts-hidden-accessible"),e.trigger("initialize"),!0===t.preload&&e.preload()}setupOptions(e=[],t=[]){this.addOptions(e),D(t,(e=>{this.registerOptionGroup(e)}))}setupTemplates(){var e=this,t=e.settings.labelField,n=e.settings.optgroupLabelField,r={optgroup:e=>{let t=document.createElement("div");return t.className="optgroup",t.appendChild(e.options),t},optgroup_header:(e,t)=>'
'+t(e[n])+"
",option:(e,n)=>"
"+n(e[t])+"
",item:(e,n)=>"
"+n(e[t])+"
",option_create:(e,t)=>'
Add '+t(e.input)+"
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};e.settings.render=Object.assign({},r,e.settings.render)}setupCallbacks(){var e,t,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(e in n)(t=this.settings[n[e]])&&this.on(e,t)}sync(e=!0){const t=this,n=e?xe(t.input,{delimiter:t.settings.delimiter}):t.settings;t.setupOptions(n.options,n.optgroups),t.setValue(n.items||[],!0),t.lastQuery=null}onClick(){var e=this;if(e.activeItems.length>0)return e.clearActiveItems(),void e.focus();e.isFocused&&e.isOpen?e.blur():e.focus()}onMouseDown(){}onChange(){U(this.input,"input"),U(this.input,"change")}onPaste(e){var t=this;t.isInputHidden||t.isLocked?ke(e):t.settings.splitOn&&setTimeout((()=>{var e=t.inputValue();if(e.match(t.settings.splitOn)){var n=e.trim().split(t.settings.splitOn);D(n,(e=>{ve(e)&&(this.options[e]?t.addItem(e):t.createItem(e))}))}}),0)}onKeyPress(e){var t=this;if(!t.isLocked){var n=String.fromCharCode(e.keyCode||e.which);return t.settings.create&&"multi"===t.settings.mode&&n===t.settings.delimiter?(t.createItem(),void ke(e)):void 0}ke(e)}onKeyDown(e){var t=this;if(t.ignoreHover=!0,t.isLocked)e.keyCode!==pe&&ke(e);else{switch(e.keyCode){case ie:if(Se(fe,e)&&""==t.control_input.value)return ke(e),void t.selectAll();break;case oe:return t.isOpen&&(ke(e,!0),t.close()),void t.clearActiveItems();case ue:if(!t.isOpen&&t.hasOptions)t.open();else if(t.activeOption){let e=t.getAdjacent(t.activeOption,1);e&&t.setActiveOption(e)}return void ke(e);case le:if(t.activeOption){let e=t.getAdjacent(t.activeOption,-1);e&&t.setActiveOption(e)}return void ke(e);case se:return void(t.canSelect(t.activeOption)?(t.onOptionSelect(e,t.activeOption),ke(e)):(t.settings.create&&t.createItem()||document.activeElement==t.control_input&&t.isOpen)&&ke(e));case ae:return void t.advanceSelection(-1,e);case ce:return void t.advanceSelection(1,e);case pe:return void(t.settings.selectOnTab&&(t.canSelect(t.activeOption)&&(t.onOptionSelect(e,t.activeOption),ke(e)),t.settings.create&&t.createItem()&&ke(e)));case de:case he:return void t.deleteSelection(e)}t.isInputHidden&&!Se(fe,e)&&ke(e)}}onInput(e){if(this.isLocked)return;const t=this.inputValue();this.lastValue!==t&&(this.lastValue=t,""!=t?(this.refreshTimeout&&clearTimeout(this.refreshTimeout),this.refreshTimeout=be((()=>{this.refreshTimeout=null,this._onInput()}),this.settings.refreshThrottle)):this._onInput())}_onInput(){const e=this.lastValue;this.settings.shouldLoad.call(this,e)&&this.load(e),this.refreshOptions(),this.trigger("type",e)}onOptionHover(e,t){this.ignoreHover||this.setActiveOption(t,!1)}onFocus(e){var t=this,n=t.isFocused;if(t.isDisabled||t.isReadOnly)return t.blur(),void ke(e);t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.preload(),n||t.trigger("focus"),t.activeItems.length||(t.inputState(),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())}onBlur(e){if(!1!==document.hasFocus()){var t=this;if(t.isFocused){t.isFocused=!1,t.ignoreFocus=!1;var n=()=>{t.close(),t.setActiveItem(),t.setCaret(t.items.length),t.trigger("blur")};t.settings.create&&t.settings.createOnBlur?t.createItem(null,n):n()}}}onOptionSelect(e,t){var n,r=this;t.parentElement&&t.parentElement.matches("[data-disabled]")||(t.classList.contains("create")?r.createItem(null,(()=>{r.settings.closeAfterSelect&&r.close()})):void 0!==(n=t.dataset.value)&&(r.lastQuery=null,r.addItem(n),r.settings.closeAfterSelect&&r.close(),!r.settings.hideSelected&&e.type&&/click/.test(e.type)&&r.setActiveOption(t)))}canSelect(e){return!!(this.isOpen&&e&&this.dropdown_content.contains(e))}onItemSelect(e,t){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(ke(e),n.setActiveItem(t,e),!0)}canLoad(e){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(e)}load(e){const t=this;if(!t.canLoad(e))return;z(t.wrapper,t.settings.loadingClass),t.loading++;const n=t.loadCallback.bind(t);t.settings.load.call(t,e,n)}loadCallback(e,t){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(e,t),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||W(n.wrapper,n.settings.loadingClass),n.trigger("load",e,t)}preload(){var e=this.wrapper.classList;e.contains("preloaded")||(e.add("preloaded"),this.load(""))}setTextboxValue(e=""){var t=this.control_input;t.value!==e&&(t.value=e,U(t,"update"),this.lastValue=e)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(e,t){we(this,t?[]:["change"],(()=>{this.clear(t),this.addItems(e,t)}))}setMaxItems(e){0===e&&(e=null),this.settings.maxItems=e,this.refreshState()}setActiveItem(e,t){var n,r,i,s,o,a,l=this;if("single"!==l.settings.mode){if(!e)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=t&&t.type.toLowerCase())&&Se("shiftKey",t)&&l.activeItems.length){for(a=l.getLastActive(),(i=Array.prototype.indexOf.call(l.control.children,a))>(s=Array.prototype.indexOf.call(l.control.children,e))&&(o=i,i=s,s=o),r=i;r<=s;r++)e=l.control.children[r],-1===l.activeItems.indexOf(e)&&l.setActiveItemClass(e);ke(t)}else"click"===n&&Se(fe,t)||"keydown"===n&&Se("shiftKey",t)?e.classList.contains("active")?l.removeActiveItem(e):l.setActiveItemClass(e):(l.clearActiveItems(),l.setActiveItemClass(e));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(e){const t=this,n=t.control.querySelector(".last-active");n&&W(n,"last-active"),z(e,"active last-active"),t.trigger("item_select",e),-1==t.activeItems.indexOf(e)&&t.activeItems.push(e)}removeActiveItem(e){var t=this.activeItems.indexOf(e);this.activeItems.splice(t,1),W(e,"active")}clearActiveItems(){W(this.activeItems,"active"),this.activeItems=[]}setActiveOption(e,t=!0){e!==this.activeOption&&(this.clearActiveOption(),e&&(this.activeOption=e,ee(this.focus_node,{"aria-activedescendant":e.getAttribute("id")}),ee(e,{"aria-selected":"true"}),z(e,"active"),t&&this.scrollToOption(e)))}scrollToOption(e,t){if(!e)return;const n=this.dropdown_content,r=n.clientHeight,i=n.scrollTop||0,s=e.offsetHeight,o=e.getBoundingClientRect().top-n.getBoundingClientRect().top+i;o+s>r+i?this.scroll(o-r+s,t):o{e.setActiveItemClass(t)})))}inputState(){var e=this;e.control.contains(e.control_input)&&(ee(e.control_input,{placeholder:e.settings.placeholder}),e.activeItems.length>0||!e.isFocused&&e.settings.hidePlaceholder&&e.items.length>0?(e.setTextboxValue(),e.isInputHidden=!0):(e.settings.hidePlaceholder&&e.items.length>0&&ee(e.control_input,{placeholder:""}),e.isInputHidden=!1),e.wrapper.classList.toggle("input-hidden",e.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var e=this;e.isDisabled||e.isReadOnly||(e.ignoreFocus=!0,e.control_input.offsetWidth?e.control_input.focus():e.focus_node.focus(),setTimeout((()=>{e.ignoreFocus=!1,e.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())}getSearchOptions(){var e=this.settings,t=e.sortField;return"string"==typeof e.sortField&&(t=[{field:e.sortField}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting}}search(e){var t,n,r=this,i=this.getSearchOptions();if(r.settings.score&&"function"!=typeof(n=r.settings.score.call(r,e)))throw new Error('Tom Select "score" setting must be a function that returns a function');return e!==r.lastQuery?(r.lastQuery=e,t=r.sifter.search(e,Object.assign(i,{score:n})),r.currentResults=t):t=Object.assign({},r.currentResults),r.settings.hideSelected&&(t.items=t.items.filter((e=>{let t=ve(e.id);return!(t&&-1!==r.items.indexOf(t))}))),t}refreshOptions(e=!0){var t,n,r,i,s,o,a,l,c,u;const d={},h=[];var p=this,f=p.inputValue();const m=f===p.lastQuery||""==f&&null==p.lastQuery;var v=p.search(f),g=null,y=p.settings.shouldOpen||!1,b=p.dropdown_content;m&&(g=p.activeOption)&&(c=g.closest("[data-group]")),i=v.items.length,"number"==typeof p.settings.maxOptions&&(i=Math.min(i,p.settings.maxOptions)),i>0&&(y=!0);const O=(e,t)=>{let n=d[e];if(void 0!==n){let e=h[n];if(void 0!==e)return[n,e.fragment]}let r=document.createDocumentFragment();return n=h.length,h.push({fragment:r,order:t,optgroup:e}),[n,r]};for(t=0;t0&&(u=u.cloneNode(!0),ee(u,{id:a.$id+"-clone-"+n,"aria-selected":null}),u.classList.add("ts-cloned"),W(u,"active"),p.activeOption&&p.activeOption.dataset.value==i&&c&&c.dataset.group===s.toString()&&(g=u)),l.appendChild(u),""!=s&&(d[s]=r)}}p.settings.lockOptgroupOrder&&h.sort(((e,t)=>e.order-t.order)),a=document.createDocumentFragment(),D(h,(e=>{let t=e.fragment,n=e.optgroup;if(!t||!t.children.length)return;let r=p.optgroups[n];if(void 0!==r){let e=document.createDocumentFragment(),n=p.render("optgroup_header",r);Te(e,n),Te(e,t);let i=p.render("optgroup",{group:r,options:e});Te(a,i)}else Te(a,t)})),b.innerHTML="",Te(b,a),p.settings.highlight&&(re(b),v.query.length&&v.tokens.length&&D(v.tokens,(e=>{ne(b,e.regex)})));var w=e=>{let t=p.render(e,{input:f});return t&&(y=!0,b.insertBefore(t,b.firstChild)),t};if(p.loading?w("loading"):p.settings.shouldLoad.call(p,f)?0===v.items.length&&w("no_results"):w("not_loading"),(l=p.canCreate(f))&&(u=w("option_create")),p.hasOptions=v.items.length>0||l,y){if(v.items.length>0){if(g||"single"!==p.settings.mode||null==p.items[0]||(g=p.getOption(p.items[0])),!b.contains(g)){let e=0;u&&!p.settings.addPrecedence&&(e=1),g=p.selectable()[e]}}else u&&(g=u);e&&!p.isOpen&&(p.open(),p.scrollToOption(g,"auto")),p.setActiveOption(g)}else p.clearActiveOption(),e&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(e,t=!1){const n=this;if(Array.isArray(e))return n.addOptions(e,t),!1;const r=ve(e[n.settings.valueField]);return null!==r&&!n.options.hasOwnProperty(r)&&(e.$order=e.$order||++n.order,e.$id=n.inputId+"-opt-"+e.$order,n.options[r]=e,n.lastQuery=null,t&&(n.userOptions[r]=t,n.trigger("option_add",r,e)),r)}addOptions(e,t=!1){D(e,(e=>{this.addOption(e,t)}))}registerOption(e){return this.addOption(e)}registerOptionGroup(e){var t=ve(e[this.settings.optgroupValueField]);return null!==t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)}addOptionGroup(e,t){var n;t[this.settings.optgroupValueField]=e,(n=this.registerOptionGroup(t))&&this.trigger("optgroup_add",n,t)}removeOptionGroup(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.clearCache(),this.trigger("optgroup_remove",e))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(e,t){const n=this;var r,i;const s=ve(e),o=ve(t[n.settings.valueField]);if(null===s)return;const a=n.options[s];if(null==a)return;if("string"!=typeof o)throw new Error("Value must be set in option data");const l=n.getOption(s),c=n.getItem(s);if(t.$order=t.$order||a.$order,delete n.options[s],n.uncacheValue(o),n.options[o]=t,l){if(n.dropdown_content.contains(l)){const e=n._render("option",t);te(l,e),n.activeOption===l&&n.setActiveOption(e)}l.remove()}c&&(-1!==(i=n.items.indexOf(s))&&n.items.splice(i,1,o),r=n._render("item",t),c.classList.contains("active")&&z(r,"active"),te(c,r)),n.lastQuery=null}removeOption(e,t){const n=this;e=ge(e),n.uncacheValue(e),delete n.userOptions[e],delete n.options[e],n.lastQuery=null,n.trigger("option_remove",e),n.removeItem(e,t)}clearOptions(e){const t=(e||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};D(this.options,((e,r)=>{t(e,r)&&(n[r]=e)})),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(e,t){return this.items.indexOf(t)>=0}getOption(e,t=!1){const n=ve(e);if(null===n)return null;const r=this.options[n];if(null!=r){if(r.$div)return r.$div;if(t)return this._render("option",r)}return null}getAdjacent(e,t,n="option"){var r,i=this;if(!e)return null;r="item"==n?i.controlChildren():i.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n0?r[n+1]:r[n-1];return null}getItem(e){if("object"==typeof e)return e;var t=ve(e);return null!==t?this.control.querySelector(`[data-value="${Me(t)}"]`):null}addItems(e,t){var n=this,r=Array.isArray(e)?e:[e];const i=(r=r.filter((e=>-1===n.items.indexOf(e))))[r.length-1];r.forEach((e=>{n.isPending=e!==i,n.addItem(e,t)}))}addItem(e,t){we(this,t?[]:["change","dropdown_close"],(()=>{var n,r;const i=this,s=i.settings.mode,o=ve(e);if((!o||-1===i.items.indexOf(o)||("single"===s&&i.close(),"single"!==s&&i.settings.duplicates))&&null!==o&&i.options.hasOwnProperty(o)&&("single"===s&&i.clear(t),"multi"!==s||!i.isFull())){if(n=i._render("item",i.options[o]),i.control.contains(n)&&(n=n.cloneNode(!0)),r=i.isFull(),i.items.splice(i.caretPos,0,o),i.insertAtCaret(n),i.isSetup){if(!i.isPending&&i.settings.hideSelected){let e=i.getOption(o),t=i.getAdjacent(e,1);t&&i.setActiveOption(t)}i.isPending||i.settings.closeAfterSelect||i.refreshOptions(i.isFocused&&"single"!==s),0!=i.settings.closeAfterSelect&&i.isFull()?i.close():i.isPending||i.positionDropdown(),i.trigger("item_add",o,n),i.isPending||i.updateOriginalInput({silent:t})}(!i.isPending||!r&&i.isFull())&&(i.inputState(),i.refreshState())}}))}removeItem(e=null,t){const n=this;if(!(e=n.getItem(e)))return;var r,i;const s=e.dataset.value;r=Z(e),e.remove(),e.classList.contains("active")&&(i=n.activeItems.indexOf(e),n.activeItems.splice(i,1),W(e,"active")),n.items.splice(r,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(s)&&n.removeOption(s,t),r{}){3===arguments.length&&(t=arguments[2]),"function"!=typeof t&&(t=()=>{});var n,r=this,i=r.caretPos;if(e=e||r.inputValue(),!r.canCreate(e))return t(),!1;r.lock();var s=!1,o=e=>{if(r.unlock(),!e||"object"!=typeof e)return t();var n=ve(e[r.settings.valueField]);if("string"!=typeof n)return t();r.setTextboxValue(),r.addOption(e,!0),r.setCaret(i),r.addItem(n),t(e),s=!0};return n="function"==typeof r.settings.create?r.settings.create.call(this,e,o):{[r.settings.labelField]:e,[r.settings.valueField]:e},s||o(n),!0}refreshItems(){var e=this;e.lastQuery=null,e.isSetup&&e.addItems(e.items),e.updateOriginalInput(),e.refreshState()}refreshState(){const e=this;e.refreshValidityState();const t=e.isFull(),n=e.isLocked;e.wrapper.classList.toggle("rtl",e.rtl);const r=e.wrapper.classList;r.toggle("focus",e.isFocused),r.toggle("disabled",e.isDisabled),r.toggle("readonly",e.isReadOnly),r.toggle("required",e.isRequired),r.toggle("invalid",!e.isValid),r.toggle("locked",n),r.toggle("full",t),r.toggle("input-active",e.isFocused&&!e.isInputHidden),r.toggle("dropdown-active",e.isOpen),r.toggle("has-options",Y(e.options)),r.toggle("has-items",e.items.length>0)}refreshValidityState(){var e=this;e.input.validity&&(e.isValid=e.input.validity.valid,e.isInvalid=!e.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(e={}){const t=this;var n,r;const i=t.input.querySelector('option[value=""]');if(t.is_select_tag){const s=[],o=t.input.querySelectorAll("option:checked").length;function a(e,n,r){return e||(e=$('")),e!=i&&t.input.append(e),s.push(e),(e!=i||o>0)&&(e.selected=!0),e}t.input.querySelectorAll("option:checked").forEach((e=>{e.selected=!1})),0==t.items.length&&"single"==t.settings.mode?a(i,"",""):t.items.forEach((e=>{n=t.options[e],r=n[t.settings.labelField]||"",s.includes(n.$option)?a(t.input.querySelector(`option[value="${Me(e)}"]:not(:checked)`),e,r):n.$option=a(n.$option,e,r)}))}else t.input.value=t.getValue();t.isSetup&&(e.silent||t.trigger("change",t.getValue()))}open(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.isOpen=!0,ee(e.focus_node,{"aria-expanded":"true"}),e.refreshState(),K(e.dropdown,{visibility:"hidden",display:"block"}),e.positionDropdown(),K(e.dropdown,{visibility:"visible",display:"block"}),e.focus(),e.trigger("dropdown_open",e.dropdown))}close(e=!0){var t=this,n=t.isOpen;e&&(t.setTextboxValue(),"single"===t.settings.mode&&t.items.length&&t.inputState()),t.isOpen=!1,ee(t.focus_node,{"aria-expanded":"false"}),K(t.dropdown,{display:"none"}),t.settings.hideSelected&&t.clearActiveOption(),t.refreshState(),n&&t.trigger("dropdown_close",t.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var e=this.control,t=e.getBoundingClientRect(),n=e.offsetHeight+t.top+window.scrollY,r=t.left+window.scrollX;K(this.dropdown,{width:t.width+"px",top:n+"px",left:r+"px"})}}clear(e){var t=this;if(t.items.length){var n=t.controlChildren();D(n,(e=>{t.removeItem(e,!0)})),t.inputState(),e||t.updateOriginalInput(),t.trigger("clear")}}insertAtCaret(e){const t=this,n=t.caretPos,r=t.control;r.insertBefore(e,r.children[n]||null),t.setCaret(n+1)}deleteSelection(e){var t,n,r,i,s=this;t=e&&e.keyCode===de?-1:1,n=Ee(s.control_input);const o=[];if(s.activeItems.length)i=X(s.activeItems,t),r=Z(i),t>0&&r++,D(s.activeItems,(e=>o.push(e)));else if((s.isFocused||"single"===s.settings.mode)&&s.items.length){const e=s.controlChildren();let r;t<0&&0===n.start&&0===n.length?r=e[s.caretPos-1]:t>0&&n.start===s.inputValue().length&&(r=e[s.caretPos]),void 0!==r&&o.push(r)}if(!s.shouldDelete(o,e))return!1;for(ke(e,!0),void 0!==r&&s.setCaret(r);o.length;)s.removeItem(o.pop());return s.inputState(),s.positionDropdown(),s.refreshOptions(!1),!0}shouldDelete(e,t){const n=e.map((e=>e.dataset.value));return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(n,t))}advanceSelection(e,t){var n,r,i=this;i.rtl&&(e*=-1),i.inputValue().length||(Se(fe,t)||Se("shiftKey",t)?(r=(n=i.getLastActive(e))?n.classList.contains("active")?i.getAdjacent(n,e,"item"):n:e>0?i.control_input.nextElementSibling:i.control_input.previousElementSibling)&&(r.classList.contains("active")&&i.removeActiveItem(n),i.setActiveItemClass(r)):i.moveCaret(e))}moveCaret(e){}getLastActive(e){let t=this.control.querySelector(".last-active");if(t)return t;var n=this.control.querySelectorAll(".active");return n?X(n,e):void 0}setCaret(e){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(e=this.isReadOnly||this.isDisabled){this.isLocked=e,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(e){this.focus_node.tabIndex=e?-1:this.tabIndex,this.isDisabled=e,this.input.disabled=e,this.control_input.disabled=e,this.setLocked()}setReadOnly(e){this.isReadOnly=e,this.input.readOnly=e,this.control_input.readOnly=e,this.setLocked()}destroy(){var e=this,t=e.revertSettings;e.trigger("destroy"),e.off(),e.wrapper.remove(),e.dropdown.remove(),e.input.innerHTML=t.innerHTML,e.input.tabIndex=t.tabIndex,W(e.input,"tomselected","ts-hidden-accessible"),e._destroy(),delete e.input.tomselect}render(e,t){var n,r;const i=this;if("function"!=typeof this.settings.render[e])return null;if(!(r=i.settings.render[e].call(this,t,ye)))return null;if(r=$(r),"option"===e||"option_create"===e?t[i.settings.disabledField]?ee(r,{"aria-disabled":"true"}):ee(r,{"data-selectable":""}):"optgroup"===e&&(n=t.group[i.settings.optgroupValueField],ee(r,{"data-group":n}),t.group[i.settings.disabledField]&&ee(r,{"data-disabled":""})),"option"===e||"item"===e){const n=ge(t[i.settings.valueField]);ee(r,{"data-value":n}),"item"===e?(z(r,i.settings.itemClass),ee(r,{"data-ts-item":""})):(z(r,i.settings.optionClass),ee(r,{role:"option",id:t.$id}),t.$div=r,i.options[n]=t)}return r}_render(e,t){const n=this.render(e,t);if(null==n)throw"HTMLElement expected";return n}clearCache(){D(this.options,(e=>{e.$div&&(e.$div.remove(),delete e.$div)}))}uncacheValue(e){const t=this.getOption(e);t&&t.remove()}canCreate(e){return this.settings.create&&e.length>0&&this.settings.createFilter.call(this,e)}hook(e,t,n){var r=this,i=r[t];r[t]=function(){var t,s;return"after"===e&&(t=i.apply(r,arguments)),s=n.apply(r,arguments),"instead"===e?s:("before"===e&&(t=i.apply(r,arguments)),t)}}}function Ie(){Ae(this.input,"change",(()=>{this.sync()}))}function Ne(e){var t=this,n=t.onOptionSelect;t.settings.hideSelected=!1;const r=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},e);var i=function(e,t){t?(e.checked=!0,r.uncheckedClassNames&&e.classList.remove(...r.uncheckedClassNames),r.checkedClassNames&&e.classList.add(...r.checkedClassNames)):(e.checked=!1,r.checkedClassNames&&e.classList.remove(...r.checkedClassNames),r.uncheckedClassNames&&e.classList.add(...r.uncheckedClassNames))},s=function(e){setTimeout((()=>{var t=e.querySelector("input."+r.className);t instanceof HTMLInputElement&&i(t,e.classList.contains("selected"))}),1)};t.hook("after","setupTemplates",(()=>{var e=t.settings.render.option;t.settings.render.option=(n,s)=>{var o=$(e.call(t,n,s)),a=document.createElement("input");r.className&&a.classList.add(r.className),a.addEventListener("click",(function(e){ke(e)})),a.type="checkbox";const l=ve(n[t.settings.valueField]);return i(a,!!(l&&t.items.indexOf(l)>-1)),o.prepend(a),o}})),t.on("item_remove",(e=>{var n=t.getOption(e);n&&(n.classList.remove("selected"),s(n))})),t.on("item_add",(e=>{var n=t.getOption(e);n&&s(n)})),t.hook("instead","onOptionSelect",((e,r)=>{if(r.classList.contains("selected"))return r.classList.remove("selected"),t.removeItem(r.dataset.value),t.refreshOptions(),void ke(e,!0);n.call(t,e,r),s(r)}))}function Pe(e){const t=this,n=Object.assign({className:"clear-button",title:"Clear All",html:e=>`
`},e);t.on("initialize",(()=>{var e=$(n.html(n));e.addEventListener("click",(e=>{t.isLocked||(t.clear(),"single"===t.settings.mode&&t.settings.allowEmptyOption&&t.addItem(""),e.preventDefault(),e.stopPropagation())})),t.control.appendChild(e)}))}const _e=(e,t)=>{var n;null==(n=e.parentNode)||n.insertBefore(t,e.nextSibling)},je=(e,t)=>{var n;null==(n=e.parentNode)||n.insertBefore(t,e)},De=(e,t)=>{do{var n;if(e==(t=null==(n=t)?void 0:n.previousElementSibling))return!0}while(t&&t.previousElementSibling);return!1};function Ve(){var e=this;if("multi"!==e.settings.mode)return;var t=e.lock,n=e.unlock;let r,i=!0;e.hook("after","setupTemplates",(()=>{var t=e.settings.render.item;e.settings.render.item=(n,s)=>{const o=$(t.call(e,n,s));ee(o,{draggable:"true"});const a=e=>{r=o,setTimeout((()=>{o.classList.add("ts-dragging")}),0)},l=e=>{e.preventDefault(),o.classList.add("ts-drag-over"),u(o,r)},c=()=>{o.classList.remove("ts-drag-over")},u=(e,t)=>{void 0!==t&&(De(t,o)?_e(e,t):je(e,t))},d=()=>{var t;document.querySelectorAll(".ts-drag-over").forEach((e=>e.classList.remove("ts-drag-over"))),null==(t=r)||t.classList.remove("ts-dragging"),r=void 0;var n=[];e.control.querySelectorAll("[data-value]").forEach((e=>{if(e.dataset.value){let t=e.dataset.value;t&&n.push(t)}})),e.setValue(n)};return Ae(o,"mousedown",(e=>{i||ke(e),e.stopPropagation()})),Ae(o,"dragstart",a),Ae(o,"dragenter",l),Ae(o,"dragover",l),Ae(o,"dragleave",c),Ae(o,"dragend",d),o}})),e.hook("instead","lock",(()=>(i=!1,t.call(e)))),e.hook("instead","unlock",(()=>(i=!0,n.call(e))))}function Be(e){const t=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:e=>'
'+e.title+'×
'},e);t.on("initialize",(()=>{var e=$(n.html(n)),r=e.querySelector("."+n.closeClass);r&&r.addEventListener("click",(e=>{ke(e,!0),t.close()})),t.dropdown.insertBefore(e,t.dropdown.firstChild)}))}function Re(){var e=this;e.hook("instead","setCaret",(t=>{"single"!==e.settings.mode&&e.control.contains(e.control_input)?(t=Math.max(0,Math.min(e.items.length,t)))==e.caretPos||e.isPending||e.controlChildren().forEach(((n,r)=>{r{if(!e.isFocused)return;const n=e.getLastActive(t);if(n){const r=Z(n);e.setCaret(t>0?r+1:r),e.setActiveItem(),W(n,"last-active")}else e.setCaret(e.caretPos+t)}))}function $e(){const e=this;e.settings.shouldOpen=!0,e.hook("before","setup",(()=>{e.focus_node=e.control,z(e.control_input,"dropdown-input");const t=$('