impulse_view_components 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6068f711a96da7104ddc287d32e68ff7a30dc27eb4f0741688a41d49b26c3d7
4
- data.tar.gz: 9cdf5d6266a428e8f956087a8bc0bda50ddec7a572e21ca76bb99deafd0ccd9d
3
+ metadata.gz: ebb8c6d48e92ac9a500392f38f8e637bae37c321f0f9473dae395fb6fc4886c9
4
+ data.tar.gz: 3658dffd8aa76d2ba5f2443fc90168b9c851b10eb8d8255ac032b6370e254dbe
5
5
  SHA512:
6
- metadata.gz: a28bba312d80518e75a0f0fa4ae62dd86a04e8962ad29479a5049f6a5c2e0d177e99f3b80c4b2415b4dba686471d63009ed29a2460b727aa1ae35b691e2ec16b
7
- data.tar.gz: 638cf6abdc550001f364cdc9c6107bce079defc97f53ac0ce031155207742de76824154588d959a367330511291e0618e22cfe0cc432451a22980ad75fbed464
6
+ metadata.gz: 1a67980b688ddb73b8ddb4f94196db0175a93a18c8fd4be6b77999c3c02387bb45bb15a3fdad9a1d7340ac9d970d335a24e7c5d6e47fcfdb443670a1b43f5b09
7
+ data.tar.gz: 6c67e8cc384506565f88f69b697020aa69bef98d74441406da5576460f5a9de4134a6c6677adae51b16fd622acb7c2d84abdcd065d47c95dc3d43e206618e635
data/CHANGELOG.md CHANGED
@@ -6,6 +6,35 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.10.0] - 2026-11-10
10
+
11
+ ### Added
12
+
13
+ - `--awc-` design tokens on `:where(:root)`, which an app overrides from any selector: scales such as `--awc-gray-6`, aliases such as `--awc-neutral-line`, and component tokens such as `--awc-popover-max-width` ([#382](https://github.com/Ambiki/impulse_view_components/pull/382))
14
+
15
+ ### Changed
16
+
17
+ - `<awc-popover>`'s corners are 8px (`--awc-radius-4`), up from 4px ([#383](https://github.com/Ambiki/impulse_view_components/pull/383))
18
+ - `<awc-popover>` is at most `--awc-popover-max-width` (20rem) wide, up from `$popover-max-width` (276px), with a white header (`--awc-popover-header-bg`). `<awc-dialog>`'s margins come from `--awc-dialog-margin-y` and `--awc-dialog-margin-y-sm-up`, not `$modal-dialog-margin`. Borders are `#d2daea`, from `#d0d7de` ([#382](https://github.com/Ambiki/impulse_view_components/pull/382))
19
+ - **Breaking:** `Impulse::PopoverComponent` nests its header and body in a `with_panel` slot, whose arguments reach the panel. `title:` is removed: set the title with the header's `with_title` ([#381](https://github.com/Ambiki/impulse_view_components/pull/381))
20
+ - **Breaking:** `select` and `time_zone_select` in a form without a model take the selected option from the view's instance variable named after the form, such as `@user` for `scope: :user`, as Rails' own fields do ([#368](https://github.com/Ambiki/impulse_view_components/pull/368))
21
+
22
+ ### Deprecated
23
+
24
+ - `--white`, `--n300`, `--color-*`, `--rounded-*`, `--fs-*`, `--fw-*`, `--shadow-*`, `--space-*`, and the autocomplete's custom properties that end in `-color`, `-lh` or `-fw`. They keep working until 1.0; use their `--awc-` replacements, such as `--awc-radius-5` for `--rounded-xl` ([#382](https://github.com/Ambiki/impulse_view_components/pull/382))
25
+
26
+ ### Removed
27
+
28
+ - **Breaking:** Import paths under `@ambiki/impulse-view-components/dist/`, deprecated in 0.9.0. Getting Started lists the paths that replace them ([#372](https://github.com/Ambiki/impulse_view_components/pull/372))
29
+ - **Breaking:** The gem's Sprockets bundle, `impulse_view_components.js` and `impulse_view_components.css`, which the engine added to every app's precompile list. Load the components from the npm package ([#361](https://github.com/Ambiki/impulse_view_components/pull/361))
30
+
31
+ ### Fixed
32
+
33
+ - Fixed `select`, `ajax_select` and `time_zone_select` raising when the object name ends in `[]`, such as `scope: "item[]"` ([#368](https://github.com/Ambiki/impulse_view_components/pull/368))
34
+ - Fixed the search field of `select`, `ajax_select` and `time_zone_select` rendering a `namespace` attribute when `skip_default_ids` is set ([#368](https://github.com/Ambiki/impulse_view_components/pull/368))
35
+ - Fixed `select`, `ajax_select` and `time_zone_select` leaving `index`, such as from `fields_for`, out of their field names and ids ([#363](https://github.com/Ambiki/impulse_view_components/pull/363))
36
+ - Fixed a stopped `<awc-anchor>` jumping to the viewport's top-left corner when its `anchor-id` changed or it reconnected ([#362](https://github.com/Ambiki/impulse_view_components/pull/362))
37
+
9
38
  ## [0.9.1] - 2026-11-06
10
39
 
11
40
  ### Fixed
@@ -265,7 +294,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
265
294
 
266
295
  - Everything!
267
296
 
268
- [unreleased]: https://github.com/Ambiki/impulse_view_components/compare/v0.9.1...HEAD
297
+ [unreleased]: https://github.com/Ambiki/impulse_view_components/compare/v0.10.0...HEAD
298
+ [0.10.0]: https://github.com/Ambiki/impulse_view_components/compare/v0.9.1...v0.10.0
269
299
  [0.9.1]: https://github.com/Ambiki/impulse_view_components/compare/v0.9.0...v0.9.1
270
300
  [0.9.0]: https://github.com/Ambiki/impulse_view_components/compare/v0.8.0...v0.9.0
271
301
  [0.8.0]: https://github.com/Ambiki/impulse_view_components/compare/v0.7.2...v0.8.0
@@ -14,6 +14,11 @@ module Impulse
14
14
  :lg => "awc-autocomplete--lg"
15
15
  }.freeze
16
16
 
17
+ # For rendering the component directly, as Rails' own `select` takes `index`: tells no `index` apart from `index: nil`,
18
+ # which renders as an empty `[]` in the field name. The form builder works out the names itself and passes no `index`.
19
+ NO_INDEX = Object.new.freeze
20
+ private_constant :NO_INDEX
21
+
17
22
  def initialize(
18
23
  object_name,
19
24
  method_name,
@@ -25,6 +30,7 @@ module Impulse
25
30
  include_hidden: true,
26
31
  disabled: false,
27
32
  clearable: true,
33
+ index: NO_INDEX,
28
34
  namespace: nil,
29
35
  skip_default_ids: false,
30
36
  allow_method_names_outside_object: true,
@@ -40,6 +46,7 @@ module Impulse
40
46
  @include_hidden = include_hidden
41
47
  @disabled = disabled
42
48
  @clearable = clearable
49
+ @index = index
43
50
  @namespace = namespace
44
51
  @skip_default_ids = skip_default_ids
45
52
  @allow_method_names_outside_object = allow_method_names_outside_object
@@ -85,6 +92,7 @@ module Impulse
85
92
  {}.tap do |args|
86
93
  args[:id] = @input_id if @input_id
87
94
  args[:placeholder] = @placeholder
95
+ args[:index] = @index unless @index.equal?(NO_INDEX)
88
96
  args[:namespace] = @namespace
89
97
  args[:skip_default_ids] = @skip_default_ids
90
98
  args[:allow_method_names_outside_object] = @allow_method_names_outside_object
@@ -94,6 +102,7 @@ module Impulse
94
102
  def hidden_field_args
95
103
  {}.tap do |args|
96
104
  args[:name] = @name if @name
105
+ args[:index] = @index unless @index.equal?(NO_INDEX)
97
106
  args[:allow_method_names_outside_object] = @allow_method_names_outside_object
98
107
  end
99
108
  end
@@ -1,8 +1,7 @@
1
1
  <%= render(Impulse::BaseRenderer.new(**@system_args)) do %>
2
- <% if content.present? %>
3
- <%= content %>
4
- <% else %>
5
- <%= content_tag(:span, @title, id: @title_id) %>
2
+ <%= title if titled? %>
3
+ <%= content %>
4
+ <% if titled? %>
6
5
  <button type="button" class="close" aria-label="Close" data-action="click->awc-popover#requestHide">
7
6
  &times;
8
7
  </button>
@@ -1,8 +1,15 @@
1
1
  module Impulse
2
2
  module Popover
3
3
  class HeaderComponent < ApplicationComponent
4
- def initialize(title: nil, title_id: nil, **system_args)
5
- @title = title
4
+ # Names the panel, so it always takes the id the panel is labelled by.
5
+ renders_one :title, lambda { |**system_args|
6
+ system_args[:tag] ||= :span
7
+ system_args[:id] = @title_id
8
+
9
+ Impulse::BaseRenderer.new(**system_args)
10
+ }
11
+
12
+ def initialize(title_id:, **system_args)
6
13
  @title_id = title_id
7
14
  @system_args = system_args
8
15
  @system_args[:tag] = :div
@@ -13,7 +20,16 @@ module Impulse
13
20
  end
14
21
 
15
22
  def render?
16
- content.present? || @title.present?
23
+ titled? || content.present?
24
+ end
25
+
26
+ # Whether the header has a title that names the panel. A blank one doesn't, so it leaves the trigger to.
27
+ def titled?
28
+ return false unless title?
29
+
30
+ # The title's content is only set once it renders, which a slot does once.
31
+ title.to_s
32
+ title.content.present?
17
33
  end
18
34
  end
19
35
  end
@@ -0,0 +1,9 @@
1
+ <%= render(Impulse::BaseRenderer.new(**@system_args, "aria-labelledby": label_id)) do %>
2
+ <div class="arrow" data-target="awc-popover.arrow"></div>
3
+ <%= header %>
4
+ <% if content.present? %>
5
+ <%= content %>
6
+ <% else %>
7
+ <%= body %>
8
+ <% end %>
9
+ <% end %>
@@ -0,0 +1,51 @@
1
+ module Impulse
2
+ module Popover
3
+ class PanelComponent < ApplicationComponent
4
+ renders_one :header, lambda { |**system_args|
5
+ Impulse::Popover::HeaderComponent.new(**system_args, title_id: @title_id)
6
+ }
7
+
8
+ renders_one :body, lambda { |**system_args|
9
+ system_args[:tag] ||= :div
10
+ system_args[:class] = class_names(system_args[:class], "popover-body")
11
+
12
+ Impulse::BaseRenderer.new(**system_args)
13
+ }
14
+
15
+ # `trigger_id_reader` returns the trigger's id. It's read when the panel renders, as the trigger may be set after
16
+ # the panel and give its own id.
17
+ def initialize(id:, trigger_id_reader:, **system_args)
18
+ @trigger_id_reader = trigger_id_reader
19
+ @title_id = "#{id}-title"
20
+ @system_args = system_args
21
+ @system_args[:tag] = :div
22
+ @system_args[:id] = id
23
+ @system_args[:role] = :dialog
24
+ @system_args[:popover] = :manual
25
+ @system_args[:tabindex] = -1
26
+ @system_args[:class] = class_names(
27
+ system_args[:class],
28
+ "awc-popover-container",
29
+ "bs-popover-auto"
30
+ )
31
+ @system_args[:data] = merge_attributes(
32
+ system_args[:data],
33
+ target: "awc-popover.panel"
34
+ )
35
+ end
36
+
37
+ def before_render
38
+ with_header unless header?
39
+ end
40
+
41
+ private
42
+
43
+ # The id of what names the panel, which is a dialog and needs an accessible name: the header's title, or the trigger
44
+ # when there is none. The header's title is only set once the header renders, which a slot does once.
45
+ def label_id
46
+ header.to_s
47
+ header.titled? ? @title_id : @trigger_id_reader.call
48
+ end
49
+ end
50
+ end
51
+ end
@@ -1,9 +1,4 @@
1
1
  <%= render(Impulse::BaseRenderer.new(**@system_args)) do %>
2
2
  <%= trigger %>
3
-
4
- <div id="<%= @panel_id %>" class="awc-popover-container bs-popover-auto" role="dialog" popover="manual" tabindex="-1" aria-labelledby="<%= label_id %>" data-target="awc-popover.panel">
5
- <div class="arrow" data-target="awc-popover.arrow"></div>
6
- <%= header %>
7
- <%= body %>
8
- </div>
3
+ <%= panel %>
9
4
  <% end %>
@@ -3,7 +3,7 @@ module Impulse
3
3
  renders_one :trigger, lambda { |**system_args|
4
4
  system_args[:tag] = :button
5
5
  system_args[:type] = system_args.fetch(:type, "button")
6
- # Labels the panel when the popover has no title, so it needs an id even when the caller didn't give one.
6
+ # Labels the panel when it has no title, so it needs an id even when the caller didn't give one.
7
7
  @trigger_id = system_args[:id] ||= "#{@panel_id}-trigger"
8
8
  system_args[:"aria-haspopup"] = :dialog
9
9
  system_args[:"aria-expanded"] = false
@@ -19,23 +19,14 @@ module Impulse
19
19
  Impulse::BaseRenderer.new(**system_args)
20
20
  }
21
21
 
22
- renders_one :header, lambda { |**system_args|
23
- Impulse::Popover::HeaderComponent.new(title: @title, title_id: @title_id, **system_args)
22
+ renders_one :panel, lambda { |**system_args|
23
+ Impulse::Popover::PanelComponent.new(**system_args, id: @panel_id, trigger_id_reader: -> { @trigger_id })
24
24
  }
25
25
 
26
- renders_one :body, lambda { |**system_args|
27
- system_args[:tag] ||= :div
28
- system_args[:class] = class_names(system_args[:class], "popover-body")
29
-
30
- Impulse::BaseRenderer.new(**system_args)
31
- }
32
-
33
- def initialize(title: nil, **system_args)
34
- @title = title
26
+ def initialize(**system_args)
35
27
  @system_args = system_args
36
28
  @system_args[:tag] = :"awc-popover"
37
29
  @panel_id = self.class.generate_id
38
- @title_id = "#{@panel_id}-title"
39
30
 
40
31
  @system_args[:class] = class_names(
41
32
  system_args[:class],
@@ -53,15 +44,7 @@ module Impulse
53
44
  end
54
45
 
55
46
  def before_render
56
- with_header unless header?
57
- end
58
-
59
- private
60
-
61
- # The id of what names the popover, which is a dialog and needs an accessible name: its title, or its trigger when a
62
- # custom header replaces the title or there is none.
63
- def label_id
64
- (header.content? || @title.blank?) ? @trigger_id : @title_id
47
+ with_panel unless panel?
65
48
  end
66
49
  end
67
50
  end
@@ -5,37 +5,19 @@ module Impulse
5
5
  delegate :render, to: :template
6
6
 
7
7
  def select(method_name, choices = [], **system_args, &block)
8
- Tags::Select.new(
9
- object:,
10
- object_name:,
11
- method_name:,
12
- template:,
13
- choices:,
14
- **objectify_options(system_args)
15
- ).render_tag(&block)
8
+ Tags::Select.new(object_name, method_name, template, choices, objectify_options(system_args)).render(&block)
16
9
  end
17
10
 
18
11
  def ajax_select(method_name, value_method, text_method, **system_args, &block)
19
12
  Tags::AjaxSelect.new(
20
- object:,
21
- object_name:,
22
- method_name:,
23
- template:,
24
- value_method:,
25
- text_method:,
26
- **objectify_options(system_args)
27
- ).render_tag(&block)
13
+ object_name, method_name, template, value_method, text_method, objectify_options(system_args)
14
+ ).render(&block)
28
15
  end
29
16
 
30
17
  def time_zone_select(method_name, priority_zones = nil, **system_args, &block)
31
18
  Tags::TimeZoneSelect.new(
32
- object:,
33
- object_name:,
34
- method_name:,
35
- template:,
36
- priority_zones:,
37
- **objectify_options(system_args)
38
- ).render_tag(&block)
19
+ object_name, method_name, template, priority_zones, objectify_options(system_args)
20
+ ).render(&block)
39
21
  end
40
22
  end
41
23
  end
@@ -2,24 +2,19 @@ module Impulse
2
2
  module Forms
3
3
  module Tags
4
4
  class AjaxSelect < Base
5
- def initialize(object:, object_name:, method_name:, template:, value_method:, text_method:, **system_args)
6
- super(object:, object_name:, method_name:, template:, **system_args)
5
+ def initialize(object_name, method_name, template_object, value_method, text_method, options)
7
6
  @value_method = value_method
8
7
  @text_method = text_method
8
+ super(object_name, method_name, template_object, options)
9
9
  end
10
10
 
11
- def render_tag(&block)
12
- if block
13
- render(component) { |c| yield c }
14
- else
15
- render(component)
16
- end
17
- end
18
-
19
- private
20
-
21
- def component
22
- Impulse::AjaxSelectComponent.new(@object_name, @method_name, @value_method, @text_method, **@system_args)
11
+ def render(&block)
12
+ @template_object.render(
13
+ Impulse::AjaxSelectComponent.new(
14
+ @object_name, @method_name, @value_method, @text_method, selected: @options[:selected], **component_options
15
+ ),
16
+ &block
17
+ )
23
18
  end
24
19
  end
25
20
  end
@@ -1,25 +1,32 @@
1
1
  module Impulse
2
2
  module Forms
3
3
  module Tags
4
- class Base
5
- attr_reader :object
6
- delegate :render, to: :@template
4
+ # Builds on Rails' own form tags, so that Rails works out the field names and ids as it does for its own fields.
5
+ class Base < ActionView::Helpers::Tags::Base
6
+ private
7
7
 
8
- def initialize(object:, object_name:, method_name:, template:, **system_args)
9
- @object = object
10
- @object_name = object_name
11
- @method_name = method_name
12
- @template = template
13
- @system_args = system_args
8
+ # The component's options, with the hidden fields' name and the search field's id worked out by Rails.
9
+ def component_options
10
+ @options.except(:index, :namespace, :name, :input_id, :selected).merge(field_options)
14
11
  end
15
12
 
16
- # This is what child classes implement
17
- def render_tag
18
- raise NotImplementedError, "Subclasses must implement a render_tag method"
13
+ def field_options
14
+ field = { "multiple" => @options[:multiple], "namespace" => @options[:namespace] }
15
+ field["name"] = @options[:name] if @options[:name]
16
+ field["id"] = @options[:input_id] if @options[:input_id]
17
+ field["index"] = @options[:index] if @options.key?(:index)
18
+ add_default_name_and_field(field)
19
+ { name: field["name"], input_id: field["id"], skip_default_ids: @skip_default_ids }
19
20
  end
20
21
 
21
- def value
22
- object.public_send(@method_name) if object&.respond_to?(@method_name)
22
+ # Rails' own `value` raises when `allow_method_names_outside_object` is false and the object lacks the method.
23
+ def selected_value
24
+ @options.fetch(:selected) { object.public_send(@method_name) if object&.respond_to?(@method_name) }
25
+ end
26
+
27
+ # Rails before 8.0.3 has only `add_default_name_and_id`.
28
+ def add_default_name_and_field(options, *)
29
+ defined?(super) ? super : add_default_name_and_id(options)
23
30
  end
24
31
  end
25
32
  end
@@ -2,24 +2,16 @@ module Impulse
2
2
  module Forms
3
3
  module Tags
4
4
  class Select < Base
5
- def initialize(object:, object_name:, method_name:, template:, choices:, **system_args)
6
- super(object:, object_name:, method_name:, template:, **system_args)
5
+ def initialize(object_name, method_name, template_object, choices, options)
7
6
  @choices = choices
8
- @value = @system_args.fetch(:selected, value)
7
+ super(object_name, method_name, template_object, options)
9
8
  end
10
9
 
11
- def render_tag(&block)
12
- if block
13
- render(component) { |c| yield c }
14
- else
15
- render(component)
16
- end
17
- end
18
-
19
- private
20
-
21
- def component
22
- Impulse::SelectComponent.new(@object_name, @method_name, @choices, selected: @value, **@system_args)
10
+ def render(&block)
11
+ @template_object.render(
12
+ Impulse::SelectComponent.new(@object_name, @method_name, @choices, selected: selected_value, **component_options),
13
+ &block
14
+ )
23
15
  end
24
16
  end
25
17
  end
@@ -2,24 +2,18 @@ module Impulse
2
2
  module Forms
3
3
  module Tags
4
4
  class TimeZoneSelect < Base
5
- def initialize(object:, object_name:, method_name:, template:, priority_zones:, **system_args)
6
- super(object:, object_name:, method_name:, template:, **system_args)
5
+ def initialize(object_name, method_name, template_object, priority_zones, options)
7
6
  @priority_zones = priority_zones
8
- @value = @system_args.fetch(:selected, value)
7
+ super(object_name, method_name, template_object, options)
9
8
  end
10
9
 
11
- def render_tag(&block)
12
- if block
13
- render(component) { |c| yield c }
14
- else
15
- render(component)
16
- end
17
- end
18
-
19
- private
20
-
21
- def component
22
- Impulse::TimeZoneSelectComponent.new(@object_name, @method_name, @priority_zones, selected: @value, **@system_args)
10
+ def render(&block)
11
+ @template_object.render(
12
+ Impulse::TimeZoneSelectComponent.new(
13
+ @object_name, @method_name, @priority_zones, selected: selected_value, **component_options
14
+ ),
15
+ &block
16
+ )
23
17
  end
24
18
  end
25
19
  end
@@ -9,12 +9,6 @@ module Impulse
9
9
  config.autoload_paths = %W[#{root}/lib]
10
10
  config.eager_load_paths = %W[#{root}/app/components]
11
11
 
12
- initializer "impulse_view_components.assets" do |app|
13
- if app.config.respond_to?(:assets)
14
- app.config.assets.precompile += %w[impulse_view_components.js impulse_view_components.css]
15
- end
16
- end
17
-
18
12
  initializer "impulse_view_components.helpers" do
19
13
  ActiveSupport.on_load :action_controller do
20
14
  require "impulse/helpers/form_helper"
@@ -1,5 +1,5 @@
1
1
  module Impulse
2
2
  module ViewComponents
3
- VERSION = "0.9.1".freeze
3
+ VERSION = "0.10.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: impulse_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - abeidahmed
@@ -108,9 +108,6 @@ files:
108
108
  - CHANGELOG.md
109
109
  - LICENSE.txt
110
110
  - README.md
111
- - app/assets/dist/impulse_view_components.css
112
- - app/assets/dist/impulse_view_components.css.map
113
- - app/assets/dist/impulse_view_components.js
114
111
  - app/components/impulse/ajax_select_component.html.erb
115
112
  - app/components/impulse/ajax_select_component.rb
116
113
  - app/components/impulse/anchor_component.rb
@@ -131,6 +128,8 @@ files:
131
128
  - app/components/impulse/dialog_component.rb
132
129
  - app/components/impulse/popover/header_component.html.erb
133
130
  - app/components/impulse/popover/header_component.rb
131
+ - app/components/impulse/popover/panel_component.html.erb
132
+ - app/components/impulse/popover/panel_component.rb
134
133
  - app/components/impulse/popover_component.html.erb
135
134
  - app/components/impulse/popover_component.rb
136
135
  - app/components/impulse/select_component.rb
@@ -1,3 +0,0 @@
1
- :root{--blue: #007bff;--indigo: #6610f2;--purple: #6f42c1;--pink: #e83e8c;--red: #dc3545;--orange: #fd7e14;--yellow: #ffc107;--green: #28a745;--teal: #20c997;--cyan: #17a2b8;--white: #fff;--gray: #6c757d;--gray-dark: #343a40;--primary: #007bff;--secondary: #6c757d;--success: #28a745;--info: #17a2b8;--warning: #ffc107;--danger: #dc3545;--light: #f8f9fa;--dark: #343a40;--breakpoint-xs: 0;--breakpoint-sm: 576px;--breakpoint-md: 768px;--breakpoint-lg: 992px;--breakpoint-xl: 1200px;--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}:root{--white: #ffffff;--n300: #627291;--color-fg-default: #1c3158;--color-fg-secondary: var(--n300);--color-border-default: #d0d7de;--rounded-sm: 2px;--rounded-default: 4px;--rounded-md: 6px;--rounded-lg: 8px;--rounded-xl: 12px;--rounded-full: 9999px;--fs-sm: 0.8125rem;--fs-default: 0.875rem;--fs-lg: 1rem;--fs-xl: 1.25rem;--fw-default: 400;--fw-medium: 500;--fw-semibold: 600;--fw-bold: 700;--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);--shadow-default: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--space-1: 0.25rem;--space-2: 0.5rem;--space-3: 1rem;--space-4: 1.5rem;--awc-autocomplete-control-min-height: calc(1.5em + 0.75rem + 2px);--awc-autocomplete-control-min-height-sm: calc(1.5em + 0.5rem + 2px);--awc-autocomplete-control-min-height-lg: calc(1.5em + 1rem + 2px);--awc-autocomplete-control-focus-color: #495057;--awc-autocomplete-control-focus-border-color: rgb(50%, 74.1176470588%, 100%);--awc-autocomplete-control-disabled-bg-color: #eef4ff;--awc-autocomplete-control-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);--awc-autocomplete-control-focus-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);--awc-autocomplete-input-min-width: 2rem;--awc-autocomplete-input-height: calc(calc(1.5em + 0.75rem + 2px) - (0.375rem * 2) - (1px * 2));--awc-autocomplete-input-bg-color: #fff;--awc-autocomplete-adornment-item-size: 1.5rem;--awc-autocomplete-listbox-font-size: 0.875rem;--awc-autocomplete-listbox-max-height: 256px;--awc-autocomplete-option-padding-x: 1rem;--awc-autocomplete-option-padding-y: 0.5rem;--awc-autocomplete-option-font-size: 0.875rem;--awc-autocomplete-option-lh: 1.25rem;--awc-autocomplete-option-hover-bg-color: #e9ecef;--awc-autocomplete-option-check-color: #38b57c;--awc-autocomplete-option-check-disabled-color: #afe1cb;--awc-autocomplete-group-header-padding-x: var(--awc-autocomplete-option-padding-x);--awc-autocomplete-group-header-padding-y: 0.25rem;--awc-autocomplete-group-header-color: #384b6e;--awc-autocomplete-group-header-font-size: 0.75rem;--awc-autocomplete-group-header-lh: 18px;--awc-autocomplete-group-header-fw: 500;--awc-autocomplete-tag-padding-x: 0.5rem;--awc-autocomplete-tag-btn-size: 1.25rem;--awc-autocomplete-tag-btn-bg-hover-color: var(--n300);--awc-autocomplete-tag-gap: 0.25rem;--awc-autocomplete-tag-max-width: 24rem;--awc-autocomplete-tag-bg-color: #e0e7f7;--awc-autocomplete-tag-border-color: #c4cdde;--awc-autocomplete-tag-border-radius: 0.125rem;--awc-autocomplete-tag-font-size: 0.75rem;--awc-autocomplete-blankslate-color: #384b6e;--awc-autocomplete-blankslate-padding-x: 1rem;--awc-autocomplete-blankslate-padding-y: 0.5rem;--awc-autocomplete-error-color: #c01303;--awc-autocomplete-input-height-sm: calc( calc(1.5em + 0.5rem + 2px) - (0.25rem * 2) - (1px * 2) );--awc-autocomplete-input-height-lg: calc( calc(1.5em + 1rem + 2px) - (0.5rem * 2) - (1px * 2) );--awc-autocomplete-tag-font-size-lg: 0.875rem;--awc-autocomplete-tag-gap-lg: 0.375rem}[hidden][hidden]{display:none !important}.awc-autocomplete{position:relative;display:block}.awc-autocomplete-control{display:flex;align-items:center;position:relative;cursor:text;padding-right:2.5rem;height:100%;min-height:var(--awc-autocomplete-control-min-height)}.awc-autocomplete:focus-within .awc-autocomplete-control{color:var(--awc-autocomplete-control-focus-color);background-color:#fff;border-color:var(--awc-autocomplete-control-focus-border-color);outline:0;box-shadow:var(--awc-autocomplete-control-focus-box-shadow)}.awc-autocomplete[disabled] .awc-autocomplete-control{cursor:default;background-color:var(--awc-autocomplete-control-disabled-bg-color)}.awc-autocomplete[disabled] .awc-autocomplete-clear-btn{background-color:var(--awc-autocomplete-control-disabled-bg-color);border-color:var(--awc-autocomplete-control-disabled-bg-color)}.awc-autocomplete-input{display:block;min-width:var(--awc-autocomplete-input-min-width);height:var(--awc-autocomplete-input-height);width:100%;margin:0;padding:0;flex:1 1 0%;font:inherit;letter-spacing:inherit;background:none;color:currentColor;border:0;outline:none;background-clip:padding-box}.awc-autocomplete-input::-moz-placeholder{color:#6c757d}.awc-autocomplete-input::placeholder{color:#6c757d}.awc-autocomplete-end-adornment{flex-shrink:0;position:absolute;right:.75rem;top:0;bottom:0;display:flex;align-items:center;margin-right:calc(0.75rem/2*-1)}.awc-autocomplete-adornment-btn,.awc-autocomplete-adornment-decorator{width:var(--awc-autocomplete-adornment-item-size);height:var(--awc-autocomplete-adornment-item-size);padding:0;display:flex;align-items:center;justify-content:center;border-radius:var(--rounded-sm);font-size:var(--fs-sm)}.awc-autocomplete-adornment-btn i,.awc-autocomplete-adornment-decorator i{display:inline-flex;align-items:center;justify-content:center;font-style:normal}.awc-autocomplete-adornment-btn i::before,.awc-autocomplete-adornment-decorator i::before{line-height:inherit}.awc-autocomplete-clear-btn{display:none;background-color:var(--awc-autocomplete-input-bg-color);border-color:var(--awc-autocomplete-input-bg-color)}.awc-autocomplete-adornment-decorator{pointer-events:none}.awc-autocomplete-listbox{font-size:var(--awc-autocomplete-listbox-font-size);max-height:min(var(--awc-autocomplete-listbox-max-height),var(--awc-auto-size-height, var(--awc-autocomplete-listbox-max-height)));overflow:hidden auto;box-shadow:var(--shadow-md)}.awc-autocomplete-options{margin:0;padding:0}.awc-autocomplete-options .awc-autocomplete-group:not([hidden])~:not([hidden]){border-top:1px solid var(--color-border-default);margin-top:var(--space-1)}.awc-autocomplete-group-header{padding:var(--awc-autocomplete-group-header-padding-y) var(--awc-autocomplete-group-header-padding-x);line-height:var(--awc-autocomplete-group-header-lh);font-size:var(--awc-autocomplete-group-header-font-size);font-weight:var(--awc-autocomplete-group-header-fw);color:var(--awc-autocomplete-group-header-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.awc-autocomplete-option-check{color:var(--awc-autocomplete-option-check-color);flex-shrink:0;visibility:hidden;display:inline-flex;align-items:center;justify-content:center;font-size:var(--fs-xl)}.awc-autocomplete-option{position:relative;display:flex;align-items:flex-start;justify-content:space-between;-moz-column-gap:.25rem;column-gap:.25rem;padding:var(--awc-autocomplete-option-padding-y) var(--awc-autocomplete-option-padding-x);line-height:var(--awc-autocomplete-option-lh);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-decoration:none;font-size:var(--awc-autocomplete-option-font-size);white-space:initial}.awc-autocomplete-option[data-active],.awc-autocomplete-option:active,.awc-autocomplete-option .active{color:hsl(210,10.8108108108%,9.5098039216%);background-color:var(--awc-autocomplete-option-hover-bg-color)}.awc-autocomplete-option.disabled{pointer-events:auto;cursor:not-allowed}.awc-autocomplete-option[data-active].disabled{color:#adb5bd}.awc-autocomplete-option.disabled .awc-autocomplete-option-check{color:var(--awc-autocomplete-option-check-disabled-color)}.awc-autocomplete-option:not(.disabled) .awc-autocomplete-option-description{color:var(--color-fg-secondary)}.awc-autocomplete-option[aria-selected=true] .awc-autocomplete-option-check{visibility:visible}.awc-autocomplete-option-content{flex:1 1 0%;display:flex;flex-direction:column;row-gap:2px;word-break:break-word}.awc-autocomplete-option-text{display:block}.awc-autocomplete-option-description{font-size:var(--fs-sm)}.awc-autocomplete-tag{display:flex;align-items:center;-moz-column-gap:.25rem;column-gap:.25rem;padding-inline:var(--awc-autocomplete-tag-padding-x);min-width:0;max-width:var(--awc-autocomplete-tag-max-width);height:var(--awc-autocomplete-input-height);vertical-align:middle;background-color:var(--awc-autocomplete-tag-bg-color);border-radius:var(--awc-autocomplete-tag-border-radius);border:1px solid var(--awc-autocomplete-tag-border-color);-webkit-user-select:none;-moz-user-select:none;user-select:none}.awc-autocomplete-tag-text{display:block;line-height:var(--awc-autocomplete-tag-btn-size);font-size:var(--awc-autocomplete-tag-font-size);text-decoration:none;flex:1 1 0%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.awc-autocomplete-tag-end-adornment{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;margin-right:calc(var(--awc-autocomplete-tag-padding-x)/2*-1)}.awc-autocomplete-tag-dismiss-btn{padding:0;display:inline-flex;align-items:center;justify-content:center;height:var(--awc-autocomplete-tag-btn-size);width:var(--awc-autocomplete-tag-btn-size);border-radius:var(--rounded-sm);font-size:var(--fs-lg)}.awc-autocomplete-tag-dismiss-btn:hover{background-color:var(--awc-autocomplete-tag-btn-bg-hover-color);color:#fff}.awc-autocomplete-tag-dismiss-btn[disabled]{background-color:rgba(0,0,0,0);color:inherit}.awc-autocomplete-tag-dismiss-btn i{display:inline-flex;align-items:center;justify-content:center;font-style:normal}.awc-autocomplete-tag-dismiss-btn i::before{line-height:inherit}.awc-autocomplete-blankslate{display:none;text-align:center;padding:var(--awc-autocomplete-blankslate-padding-y) var(--awc-autocomplete-blankslate-padding-x);color:var(--awc-autocomplete-blankslate-color)}.awc-autocomplete-error{display:none;text-align:center;padding:var(--awc-autocomplete-blankslate-padding-y) var(--awc-autocomplete-blankslate-padding-x);color:var(--awc-autocomplete-error-color)}.awc-autocomplete-spinner{display:none;align-items:center;justify-content:center;padding:var(--awc-autocomplete-blankslate-padding-y) var(--awc-autocomplete-blankslate-padding-x)}.awc-autocomplete[open] .awc-autocomplete-listbox{display:block}.awc-autocomplete--selected.awc-autocomplete--clearable .awc-autocomplete-adornment-decorator{display:none}.awc-autocomplete--selected .awc-autocomplete-clear-btn{display:inline-flex}.awc-autocomplete[loading] .awc-autocomplete-options,.awc-autocomplete[loading] .awc-autocomplete-blankslate{display:none}.awc-autocomplete[loading] .awc-autocomplete-spinner{display:flex}.awc-autocomplete[no-options] .awc-autocomplete-options{display:none}.awc-autocomplete[no-options]:not([error]):not([loading]) .awc-autocomplete-blankslate{display:block}.awc-autocomplete[error] .awc-autocomplete-error{display:block}.awc-autocomplete[multiple] .awc-autocomplete-control{flex-wrap:wrap;gap:var(--awc-autocomplete-tag-gap)}.awc-autocomplete--sm{--awc-autocomplete-input-height: var(--awc-autocomplete-input-height-sm);--awc-autocomplete-tag-btn-size: 1rem}.awc-autocomplete--sm .awc-autocomplete-control{min-height:var(--awc-autocomplete-control-min-height-sm);padding-right:2.25rem}.awc-autocomplete--sm .awc-autocomplete-end-adornment{right:.5rem;margin-right:calc(0.5rem/2*-1)}.awc-autocomplete--lg{--awc-autocomplete-input-height: var(--awc-autocomplete-input-height-lg);--awc-autocomplete-tag-font-size: var(--awc-autocomplete-tag-font-size-lg);--awc-autocomplete-tag-gap: var(--awc-autocomplete-tag-gap-lg)}.awc-autocomplete--lg .awc-autocomplete-control{min-height:var(--awc-autocomplete-control-min-height-lg);padding-right:2.75rem}.awc-autocomplete--lg .awc-autocomplete-end-adornment{right:1rem;margin-right:calc(1rem/2*-1)}.awc-dialog-dialog{--margin-y: 0.5rem;--margin-y-sm-up: 1.75rem;border:0;border-radius:var(--rounded-xl);max-width:92vw;width:100%;color:inherit;background-color:var(--white);box-shadow:var(--shadow-lg);padding:0;margin:var(--margin-y) auto;max-height:calc(100vh - var(--margin-y)*2);overflow:hidden;animation:dialog-show 150ms cubic-bezier(0.16, 1, 0.3, 1)}.awc-dialog-dialog[open]{display:flex;flex-direction:column}.awc-dialog-dialog:focus-visible{outline:none}.awc-dialog-dialog::backdrop{background-color:rgba(0,23,66,.5);animation:dialog-overlay 150ms cubic-bezier(0.16, 1, 0.3, 1)}@media(min-width: 576px){.awc-dialog-dialog{max-width:498px;max-height:calc(100vh - var(--margin-y-sm-up)*2);margin-top:var(--margin-y-sm-up);margin-bottom:var(--margin-y-sm-up)}}.awc-dialog-dialog--centered{margin-top:auto;margin-bottom:auto}.awc-dialog--scrollable{flex-grow:1;display:flex;flex-direction:column;overflow-y:hidden}.awc-dialog-header{flex-shrink:0;display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-1) var(--space-2) var(--space-3);border-bottom:1px solid var(--color-border-default)}.awc-dialog-title-container{flex:1 1 0%;padding:var(--space-2) 0}.awc-dialog-title{margin:0 !important;font-size:var(--fs-lg);font-weight:var(--fw-medium);line-height:20px}.awc-dialog-close-btn{position:relative;flex-shrink:0;padding:0;width:32px;height:32px;font-size:1.25rem;line-height:20px;display:inline-flex;align-items:center;justify-content:center}.awc-dialog-close-btn:not(:hover){background-color:var(--white);border-color:var(--white)}.awc-dialog-close-btn:focus{box-shadow:none}.awc-dialog-close-btn:focus-visible{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.awc-dialog-close-btn i{display:inline-flex;align-items:center;justify-content:center;font-style:normal}.awc-dialog-close-btn i::before{line-height:inherit}.awc-dialog-body{flex-grow:1;overflow-y:auto;padding:var(--space-3);font-size:var(--fs-default)}.awc-dialog-footer{flex-shrink:0;display:flex;align-items:center;justify-content:flex-end;padding:var(--space-3);flex-wrap:wrap;gap:var(--space-2);border-top:1px solid var(--color-border-default)}.awc-dialog--sm .awc-dialog-dialog{max-width:298px}.awc-dialog--lg .awc-dialog-dialog{max-width:798px}.awc-dialog--fullscreen .awc-dialog-dialog{max-width:100vw;box-shadow:none;border-radius:0;max-height:100vh;height:100%}@supports(max-height: 100dvh){.awc-dialog--fullscreen .awc-dialog-dialog{max-height:100dvh}}@supports(max-width: 100dvw){.awc-dialog--fullscreen .awc-dialog-dialog{max-width:100dvw}}@media(max-width: 576px){.awc-dialog--fullscreen-sm-down .awc-dialog-dialog{max-width:100vw;box-shadow:none;border-radius:0;max-height:100vh;height:100%}@supports(max-height: 100dvh){.awc-dialog--fullscreen-sm-down .awc-dialog-dialog{max-height:100dvh}}@supports(max-width: 100dvw){.awc-dialog--fullscreen-sm-down .awc-dialog-dialog{max-width:100dvw}}}@media(max-width: 768px){.awc-dialog--fullscreen-md-down .awc-dialog-dialog{max-width:100vw;box-shadow:none;border-radius:0;max-height:100vh;height:100%}@supports(max-height: 100dvh){.awc-dialog--fullscreen-md-down .awc-dialog-dialog{max-height:100dvh}}@supports(max-width: 100dvw){.awc-dialog--fullscreen-md-down .awc-dialog-dialog{max-width:100dvw}}}@media(max-width: 992px){.awc-dialog--fullscreen-lg-down .awc-dialog-dialog{max-width:100vw;box-shadow:none;border-radius:0;max-height:100vh;height:100%}@supports(max-height: 100dvh){.awc-dialog--fullscreen-lg-down .awc-dialog-dialog{max-height:100dvh}}@supports(max-width: 100dvw){.awc-dialog--fullscreen-lg-down .awc-dialog-dialog{max-width:100dvw}}}@media(max-width: 1200px){.awc-dialog--fullscreen-xl-down .awc-dialog-dialog{max-width:100vw;box-shadow:none;border-radius:0;max-height:100vh;height:100%}@supports(max-height: 100dvh){.awc-dialog--fullscreen-xl-down .awc-dialog-dialog{max-height:100dvh}}@supports(max-width: 100dvw){.awc-dialog--fullscreen-xl-down .awc-dialog-dialog{max-width:100dvw}}}@keyframes dialog-show{from{opacity:0;transform:scale(0.96)}to{opacity:1;transform:scale(1)}}@keyframes dialog-overlay{from{opacity:0}to{opacity:1}}.awc-popover{display:block}.awc-popover-container{outline:none;background-clip:padding-box;background-color:var(--white);border-radius:var(--rounded-default);box-shadow:var(--shadow-md);max-width:276px;margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--fs-default);overflow:visible;border:1px solid var(--color-border-default);animation-duration:400ms;animation-timing-function:cubic-bezier(0.16, 1, 0.3, 1);word-wrap:break-word}.awc-popover-container::backdrop{display:none}.awc-popover-container .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.awc-popover-container .arrow::before,.awc-popover-container .arrow::after{position:absolute;display:block;content:"";border-color:rgba(0,0,0,0);border-style:solid}@supports not selector(:popover-open){awc-popover:not([open])>.awc-popover-container{display:none}.awc-popover-container{z-index:1060}}.bs-popover-auto[x-placement^=top]{margin-bottom:0;animation-name:slide-down-and-fade}.bs-popover-auto[x-placement^=top]>.arrow{bottom:-0.5rem;margin-left:0;margin-right:0}.bs-popover-auto[x-placement^=right]{margin-left:0;animation-name:slide-left-and-fade}.bs-popover-auto[x-placement^=right]>.arrow{left:-0.5rem;margin-top:0;margin-bottom:0}.bs-popover-auto[x-placement^=bottom]{margin-top:0;animation-name:slide-up-and-fade}.bs-popover-auto[x-placement^=bottom]>.arrow{top:-0.5rem;margin-left:0;margin-right:0}.bs-popover-auto[x-placement^=left]{margin-right:0;animation-name:slide-right-and-fade}.bs-popover-auto[x-placement^=left]>.arrow{right:-0.5rem;margin-top:0;margin-bottom:0}@keyframes slide-up-and-fade{from{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-right-and-fade{from{opacity:0;transform:translateX(-2px)}to{opacity:1;transform:translateX(0)}}@keyframes slide-down-and-fade{from{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-left-and-fade{from{opacity:0;transform:translateX(2px)}to{opacity:1;transform:translateX(0)}}
2
-
3
- /*# sourceMappingURL=impulse_view_components.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../node_modules/bootstrap/scss/_root.scss","../../../src/styles/variables.scss","../../../src/styles/base.scss","../../../src/elements/autocomplete/index.scss","../../../node_modules/bootstrap/scss/_variables.scss","../../../node_modules/bootstrap/scss/mixins/_text-truncate.scss","../../../node_modules/bootstrap/scss/mixins/_gradients.scss","../../../src/elements/dialog/index.scss","../../../node_modules/bootstrap/scss/mixins/_breakpoints.scss","../../../src/elements/popover/index.scss","../../../node_modules/bootstrap/scss/mixins/_reset-text.scss","../../../node_modules/bootstrap/scss/vendor/_rfs.scss"],"names":[],"mappings":"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","file":"impulse_view_components.css"}
@@ -1,5 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("@floating-ui/dom")):"function"==typeof define&&define.amd?define(["@floating-ui/dom"],e):e(("undefined"!=typeof globalThis?globalThis:t||self).FloatingUIDOM)}(this,function(C){"use strict";function t(t,e,i,n){var s,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;0<=a;a--)(s=t[a])&&(r=(o<3?s(r):3<o?s(e,i,r):s(e,i))||r);return 3<o&&r&&Object.defineProperty(e,i,r),r}function K(e,i,n){let s=0,o=null;for(let t=i;t<e.length;t+=1){var r=e[t];if(o)r===o&&(o=null);else if('"'===r||"'"===r)o=r;else{if("("===r||"["===r?s+=1:")"!==r&&"]"!==r||--s,s<0)return null;if(n(r,t,s))return t}}return 0===s&&null===o?-1:null}const F=/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g;function V(n){const s=[];let o=0;return K(n,0,(t,e,i)=>{","===t&&0===i&&(s.push(n.slice(o,e)),o=e+1)}),s.push(n.slice(o)),s.map(t=>t.replace(F,"")).filter(t=>0<t.length)}function D(t,n){t=K(t,n,(t,e,i)=>n<e&&0===i);return null===t||-1===t?null:t}const R=/^[\w\u0080-\uFFFF-]+/,z=/^[a-z][\w\u0080-\uFFFF-]*/i,W=/^[\t\n\f\r ]*([\w\u0080-\uFFFF-]+)[\t\n\f\r ]*(?:[~|^$*]?=|$)/;function _(t){return!t.includes("\\")&&!t.includes("/*")}function j(t){document.createDocumentFragment().querySelector(t)}function U(i){var n=[];let s=0;var t=z.exec(i);for(t?(n.push({kind:"tag",source:t[0],name:t[0]}),s=t[0].length):"*"===i[0]&&(n.push({kind:"universal",source:"*"}),s=1);s<i.length;){var o=i[s];if("#"===o||"."===o){var e=R.exec(i.slice(s+1));if(!e)return null;var r=s+1+e[0].length;n.push({kind:"#"===o?"id":"class",source:i.slice(s,r),name:e[0]}),s=r}else if("["===o){e=D(i,s);if(null===e)return null;r=W.exec(i.slice(s+1,e));n.push({kind:"attribute",source:i.slice(s,e+1),name:r?r[1]:null}),s=e+1}else{if(":"!==o)return null;{var o=":"===i[s+1],a=s+(o?2:1),l=R.exec(i.slice(a));if(!l)return null;let t=a+l[0].length,e=null;if("("===i[t]){a=D(i,t);if(null===a)return null;e=i.slice(t+1,a),t=a+1}n.push({kind:"pseudo",source:i.slice(s,t),name:l[0].toLowerCase(),element:o,argument:e}),s=t}}}return n}const H=new Set(["is","where","not"]);function Q(t,n){t=V(t);return 0<t.length&&t.every(t=>{var e=n;if(null===(t=U(t)))return!1;for(const i of t)if("id"===i.kind)e.add("id");else if("class"===i.kind)e.add("class");else if("attribute"===i.kind){if(null===i.name)return!1;e.add(i.name),e.add(i.name.toLowerCase())}else if("pseudo"===i.kind){if(i.element||null===i.argument||!H.has(i.name))return!1;if(!Q(i.argument,e))return!1}return!0})}const $=/[\t\n\f\r ]/;function J(t){let n=0;return null===K(t,0,(t,e,i)=>{0!==i||">"!==t&&"+"!==t&&"~"!==t&&!$.test(t)||(n=e+1)})?null:t.slice(n)}function X(t){if(!_(t))return null;var e=[];for(const n of V(t)){var i=function(t){t=J(t);if(null===t)return null;t=U(t);if(null===t)return null;let e="";for(const i of t)"pseudo"!==i.kind&&"universal"!==i.kind&&(e+=i.source);return 0<e.length?e:null}(n);if(null===i)return null;e.push(i)}return 0<e.length?e:null}class h{constructor(){this.map=new Map}add(t,e){let i=this.map.get(t);return i||(i=new Set,this.map.set(t,i)),i.add(e),this}delete(t,e){var i=this.map.get(t);return!!i&&((e=i.delete(e))&&0===i.size&&this.map.delete(t),e)}deleteKey(t){return this.map.delete(t)}clear(){this.map.clear()}valuesForKey(t){t=this.map.get(t);return t?Array.from(t):[]}get keys(){return Array.from(this.map.keys())}get values(){var t=[];for(const e of this.map.values())for(const i of e)t.push(i);return t}get(t){return this.map.get(t)}has(t,e){return!!this.get(t)?.has(e)}}const Y=[];class G{constructor(){this.idIndex=new h,this.attributeIndex=new h,this.classIndex=new h,this.tagIndex=new h,this.fallback=new Set,this.count=0,this.generation=0,this.selectorCounts=new Map,this.matchQueryString=null,this.subjectQueryString=null,this.attributeNames=null}add(t,e){var i={selector:t,value:e,generation:0},e=this.bucketsFor(t);if(e)for(const n of e)n.map.add(n.key,i);else this.fallback.add(i);this.count+=1,this.countSelector(t,1)}delete(t,e){var i=this.bucketsFor(t),n=i?i[0].map.get(i[0].key):this.fallback;if(n)for(const s of n)if(s.selector===t&&s.value===e){if(i)for(const o of i)o.map.delete(o.key,s);else this.fallback.delete(s);return--this.count,void this.countSelector(t,-1)}}matches(e){var i=[],n=(this.generation+=1,this.generation),t=this.tagIndex.get(e.localName.toLowerCase());t&&l(t,i,n),e.id&&(t=this.idIndex.get(e.id))&&l(t,i,n);for(const a of e.classList){var s=this.classIndex.get(a);s&&l(s,i,n)}var o=this.attributeNames??(this.attributeNames=this.attributeIndex.keys);for(let t=0;t<o.length;t+=1){var r=o[t];e.hasAttribute(r)&&(r=this.attributeIndex.get(r))&&l(r,i,n)}return 0<this.fallback.size&&l(this.fallback,i,n),i}queryAll(t){return 0===this.count?Y:(this.matchQueryString??(this.matchQueryString=Array.from(this.selectorCounts.keys()).join(", ")),t.querySelectorAll(this.matchQueryString))}querySubjects(t){return 0===this.count?Y:(this.subjectQueryString??(this.subjectQueryString=function(t){var e=new Set;for(const n of t){var i=X(n);if(null===i)return"*";for(const s of i)e.add(s)}return 0<e.size?Array.from(e).join(", "):"*"}(this.selectorCounts.keys())),t.querySelectorAll(this.subjectQueryString))}get size(){return this.count}countSelector(t,e){var i=this.selectorCounts.get(t)??0,e=i+e;0===e?this.selectorCounts.delete(t):this.selectorCounts.set(t,e),0!==i&&0!==e||(this.matchQueryString=null,this.subjectQueryString=null,this.attributeNames=null)}bucketsFor(t){if(!_(t))return null;var e=[],i=new Set;for(const o of V(t)){var n=function(t){t=J(t);if(null===t)return null;t=U(t);if(null===t)return null;let e,i,n,s;for(const o of t)"id"===o.kind?e=e??o.name:"attribute"===o.kind?null!==o.name&&(i=i??o.name):"class"===o.kind?n=n??o.name:"tag"===o.kind&&(s=s??o.name.toLowerCase());return void 0!==e?{kind:"id",value:e}:void 0!==i?{kind:"attribute",value:i}:void 0!==n?{kind:"class",value:n}:void 0!==s?{kind:"tag",value:s}:null}(o);if(!n)return null;var s=n.kind+":"+n.value;i.has(s)||(i.add(s),"id"===n.kind?e.push({map:this.idIndex,key:n.value}):"attribute"===n.kind?(e.push({map:this.attributeIndex,key:n.value}),(s=n.value.toLowerCase())!==n.value&&e.push({map:this.attributeIndex,key:s})):"class"===n.kind?e.push({map:this.classIndex,key:n.value}):e.push({map:this.tagIndex,key:n.value}))}return 0<e.length?e:null}}function l(t,e,i){for(const n of t)n.generation!==i&&(n.generation=i,e.push(n))}const o=Symbol.for("impulse"),Z={name:"property"},tt={name:"target"};function et(t,e,i){let n=st(t),s=(n||(n=new Map,Object.defineProperty(t,o,{value:n,configurable:!0})),n.get(e.name));s||(s=new Map,n.set(e.name,s)),s.set(i.key,i)}function it(t,e){return st(t)?.get(e.name)??new Map}function nt(t,e){return it(Object.getPrototypeOf(t),e)}function st(t){if(Object.hasOwn(t,o))return t[o]}function e({type:i=String}={}){return(t,e)=>{et(t,Z,{key:e,type:i})}}function ot(e,i){var t,n;return!!Object.is(e,i)||"object"==typeof e&&"object"==typeof i&&null!==e&&null!==i&&(Array.isArray(e)||Array.isArray(i)?!(!Array.isArray(e)||!Array.isArray(i)||e.length!==i.length)&&e.every((t,e)=>ot(t,i[e])):(t=Object.keys(e),n=Object.keys(i),t.length===n.length&&t.every(t=>Object.hasOwn(i,t)&&ot(e[t],i[t]))))}const rt=/([\-_.\s])+(.)?/g,at=/(^|\/)([A-Z])/g,lt=/[ _]/g,ct=/([a-z\d])([A-Z])/g;function ht(t){return t.replace(ct,"$1_$2").toLowerCase().replace(lt,"-")}const ut=new WeakMap;class dt{constructor(t){this.instance=t,this.bound=new Map,this.declarations=nt(this.instance,Z),ut.set(this.instance,this)}start(){this.bind()}bind(){for(var{key:t,type:e}of this.declarations.values())if(!this.bound.has(t)){var i=this.instance[t];const n=new mt(this.instance,t,e,i);this.bound.set(t,n),Object.defineProperty(this.instance,t,{configurable:!0,get:()=>n.value,set:t=>n.write(t)})}}stop(){}change(t,e,i){var n=this.bound.get(t);if(n)return n.change(e,i);throw new Error(`Unregistered attribute changed: ${ht(t)}. Register the attribute using the @property() decorator.`)}}var i=t=>t;function pt(e,t){return{empty:t,fromAttribute:t=>{t=function(t,e){if(!t)return e;try{return JSON.parse(t)}catch{return e}}(t,null);return e(t)?t:void 0},toAttribute:t=>JSON.stringify(t),equals:ot,copy:t=>JSON.parse(JSON.stringify(t))}}const ft=new Map([[String,{empty:()=>"",fromAttribute:i,toAttribute:String,equals:Object.is,copy:i}],[Number,{empty:()=>0,fromAttribute:t=>{var t=t.replace(/_/g,"").trim(),e=Number(t);return""===t||Number.isNaN(e)?void 0:e},toAttribute:String,equals:Object.is,copy:i}],[Boolean,{empty:()=>!1,fromAttribute:t=>"false"!==t,toAttribute:(t,e)=>t?"":e?"false":null,equals:Object.is,copy:i}],[Array,pt(Array.isArray,()=>[])],[Object,pt(t=>"object"==typeof t&&null!==t&&!Array.isArray(t),()=>({}))]]);class mt{constructor(t,e,i,n){this.element=t,this.attributeName=ht(e),this.type=ft.get(i),this.defaultValue=n??this.type.empty()}get value(){return this.read(this.element.getAttribute(this.attributeName))}write(t){t=null==t?null:this.type.toAttribute(t,this.defaultValue);null===t?this.element.removeAttribute(this.attributeName):this.element.setAttribute(this.attributeName,t)}change(t,e){t=this.read(t),e=this.read(e);return this.type.equals(e,t)?null:{newValue:e,oldValue:t}}read(t){t=null===t?void 0:this.type.fromAttribute(t);return void 0===t?this.type.copy(this.defaultValue):t}}function n(s){return t=>{const e=class extends t{constructor(...t){super(...t),new.target===e&&(t=this,ut.get(t)?.bind())}};var i,n;Object.defineProperty(e,"name",{value:t.name}),i=t.prototype,n=e.prototype,(i=st(i))&&Object.defineProperty(n,o,{value:i,configurable:!0});try{window.customElements.define(s,e),window[t.name]=customElements.get(s)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}return e}}function s(){return(t,e)=>{et(t,tt,{key:e,multiple:!1})}}function vt(){return(t,e)=>{et(t,tt,{key:e,multiple:!0})}}const yt=/(?:(.+?)?(?:\.(.+?))?(?:@(window|document))?->)?(.+)#(.+)?$/,gt=["stop","prevent","self"],bt=["capture","once","passive"],wt=new Map;function kt(t){var e,i,n,s,t=t.trim(),o=wt.get(t);return o||([,o,s,e,i,n]=t.match(yt)||[],o={eventName:o,eventModifiers:(o=s?.split(".")||[]).filter(t=>gt.includes(t)),eventListenerOptions:function(t){var e={};for(const i of t)bt.includes(i)&&(e[i]=!0);return e}(o),eventTarget:"window"===(s=e)?window:"document"===s?document:void 0,methodName:n,identifier:i},wt.set(t,o),o)}const St={prevent:t=>Boolean(t.preventDefault()),stop:t=>Boolean(t.stopPropagation()),self:t=>t.target!==t.currentTarget};class At{constructor(t,e){this.instance=t,this.eventTarget=e.eventTarget,this.eventName=e.eventName,this.eventModifiers=e.eventModifiers,this.eventListenerOptions=e.eventListenerOptions,this.methodName=e.methodName}start(){this.eventTarget.addEventListener(this.eventName,this,this.eventListenerOptions)}stop(){this.eventTarget.removeEventListener(this.eventName,this,this.eventListenerOptions)}handleEvent(t){var e=this.instance[this.methodName];if("function"==typeof e){for(const i of this.eventModifiers)if((0,St[i])?.(t))return;e.call(this.instance,t)}}}function Et(t){"function"==typeof reportError?reportError(t):setTimeout(()=>{throw t})}function p(t){try{t()}catch(t){Et(t)}}function u(t,e){let i=!1,n;for(const s of t)try{e(s)}catch(t){i||(i=!0,n=t)}if(i)throw n}function Ot(){return new Promise(t=>{"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>t(),{once:!0}):t()})}let xt;const c=new G,d=new WeakMap;let r=null,Ct=null;const a=new Map;let Pt=0,f=null,Nt=!1,m=null,Tt=0,v=!1,Mt=0,y=[],Bt=0,g=null;function Lt(n,t){j(n);const s={selector:n,elementConnected:t.elementConnected,elementDisconnected:t.elementDisconnected,elementAttributeChanged:t.elementAttributeChanged,elements:new Map,attributes:_(t=n)&&Q(t,t=new Set)?Array.from(t):null};"loading"===document.readyState?(t=s,m||(m=new Set,Ot().then(qt)),m.add(t)):(v||Kt(),It(s),S(()=>{for(const t of document.querySelectorAll(n))$t(t,s)}));let o=!1;return()=>{if(!o&&(o=!0,!m?.delete(s))){c.delete(n,s),Rt(s.attributes,-1)&&(Nt=!0);for(const i of s.elements.keys())Xt(i,s);var t,e;s.elements.clear(),0===c.size&&r&&(t=Ft(),e=r,r=null,Wt(t),e.disconnect())}}}function It(t){c.add(t.selector,t),Rt(t.attributes,1),t=t.attributes,r?function(t){const e=f;return!e||null!==t&&t.every(t=>e.has(t))}(t)||Dt():(r=new MutationObserver(zt),Ct=document.documentElement,r.observe(Ct,{childList:!0,subtree:!0}),g=g??document.createTextNode(""),r.observe(g,{characterData:!0}),Dt())}function qt(){var t=m;if(m=null,t&&0!==t.size){for(const e of t)It(e);S(()=>_t(document.documentElement))}}function Kt(){for(let t=Ft();t.length;t=Ft())Wt(t)}function Ft(){return Vt(r?.takeRecords()??[])}function Vt(t){return 0===y.length||(t=y.concat(t),y=[]),t}function b(){return v?Mt:0}function w(){var t=v;return t||(Mt+=1),v=!0,t}function k(t){v=t}function S(t){var e=w();try{t()}finally{k(e)}}function Dt(){var t={attributes:!(Nt=!1),subtree:!0};0<Pt?f=null:(f=new Set(a.keys()),t.attributeFilter=Array.from(f)),r?.observe(document,t)}function Rt(t,e){if(!t)return 0===(Pt+=e);let i=!1;for(const s of t){var n=(a.get(s)??0)+e;0===n?(a.delete(s),i=!0):a.set(s,n)}return i}function zt(t){Nt&&Dt(),Wt(Vt(t))}function Wt(t){var e,i=document.documentElement!==Ct,n=Tt+=1,s=w();try{for(const a of t)if("childList"===a.type){if(0<(e=a).removedNodes.length&&1===e.addedNodes.length&&function(){var t,e,i;return void 0===xt&&(e=(t=document.createElement("div")).appendChild(document.createElement("div")).appendChild(document.createElement("div")),(i=new MutationObserver(()=>{})).observe(t,{childList:!0,subtree:!0}),t.replaceChildren?.(e),xt=1===i.takeRecords().length,i.disconnect()),xt}()){r=o=void 0;var o=a.addedNodes[0],r=n;if(o.nodeType===Node.ELEMENT_NODE){Qt(o,r);for(const l of c.querySubjects(o))Qt(l,r)}}a.removedNodes.forEach(jt),a.addedNodes.forEach(_t)}else"attributes"===a.type&&!i&&a.target instanceof Element&&!function(t,e){if(t.isConnected){var i=d.get(t);if(i)for(const n of Array.from(i))t.matches(n.selector)?p(()=>n.elementAttributeChanged?.(t,e??"")):Jt(t,n);Ut(t)}else Ht(t)}(a.target,a.attributeName)}finally{k(s)}}function _t(t){if(t.nodeType===Node.ELEMENT_NODE){var e=c.queryAll(t);Ut(t);for(const i of e)Ut(i)}}function jt(t){if(t.nodeType===Node.ELEMENT_NODE){Ht(t);for(const e of c.querySubjects(t))Ht(e)}}function Ut(t){if(t.isConnected)for(var{value:e}of c.matches(t))!e.elements.has(t)&&t.matches(e.selector)&&$t(t,e)}function Ht(t){var e=d.get(t);if(e)for(const i of Array.from(e))Jt(t,i)}function Qt(t,e){var i=d.get(t);if(i)for(const n of Array.from(i))n.elements.get(t)<e&&Jt(t,n)}function $t(e,i){{var n=e,s=i;s.elements.set(n,Tt);let t=d.get(n);t||(t=new Set,d.set(n,t)),t.add(s)}p(()=>i.elementConnected?.(e))}function Jt(t,e){var i,n;i=t,(n=e).elements.delete(i),Xt(i,n),p(()=>e.elementDisconnected?.(t))}function Xt(t,e){var i=d.get(t);i&&(i.delete(e),0===i.size)&&d.delete(t)}function Yt(o,r,i){const a=new h,l=(t,e)=>{a.add(t,e),i.tokenMatched?.(e)},c=(t,e)=>{a.delete(t,e),i.tokenUnmatched?.(e)},e=Lt(`[${r}]`,{elementConnected(t){if(o.contains(t))for(const e of Gt(t,r))p(()=>l(t,e))},elementDisconnected(t){for(const e of a.valuesForKey(t))p(()=>c(t,e))},elementAttributeChanged(t,e){if(e===r&&o.contains(t)){var e=a.valuesForKey(t),[e,i]=function(t,e){const i=new h;for(const o of e)i.add(o.content,o);var n=[];for(const r of t){var[s]=i.valuesForKey(r.content);s?i.delete(r.content,s):n.push(r)}return[n,e.filter(t=>i.has(t.content,t))]}(Gt(t,r),e);for(const n of i)p(()=>c(t,n));for(const s of e)p(()=>l(t,s))}}});return()=>{var t=a.values;a.clear();try{u(t,t=>i.tokenUnmatched?.(t))}finally{e()}}}function Gt(e,i){return Zt(e,i).map(t=>({element:e,attributeName:i,content:t}))}function Zt(t,e){return(t.getAttribute(e)||"").trim().split(/\s+/).filter(t=>t.length)}class te{constructor(t,e){this.attributeName=t,this.identifierFor=e,this.delegates=new WeakMap,this.tokensByOwner=new WeakMap,this.ownerByToken=new WeakMap,this.subscriberCount=0}subscribe(t,e){if(this.delegates.has(t))throw new Error(`<${t.localName}> is already subscribed to the "${this.attributeName}" token router.`);const i=e;this.stopWatching?Kt():this.stopWatching=Yt(document.documentElement,this.attributeName,{tokenMatched:t=>this.tokenMatched(t),tokenUnmatched:t=>this.tokenUnmatched(t)}),this.delegates.set(t,i),this.subscriberCount+=1;e=w();try{for(const s of this.ownedTokens(t))p(()=>i.tokenMatched?.(s))}finally{k(e)}let n=!1;return()=>{n||(n=!0,this.unsubscribe(t,i))}}stillRoutesTo(t,e){return{attributeName:i,content:n,element:s}=[e][0],Gt(s,i).some(t=>t.content===n)&&this.ownerOf(e)===t;var i,n,s}routesTo(e,i,n){return Zt(i,this.attributeName).some(t=>n(t)&&this.ownerFor(i,t)===e)}unsubscribe(t,e){this.delegates.delete(t),--this.subscriberCount;var i,t=this.ownedTokens(t),n=w();try{u(t,t=>e.tokenUnmatched?.(t))}finally{try{0===this.subscriberCount&&(i=this.stopWatching,this.stopWatching=void 0,i?.())}finally{k(n)}}}tokenMatched(e){var i=this.ownerOf(e);if(i){let t=this.tokensByOwner.get(i);t||(t=new Set,this.tokensByOwner.set(i,t)),t.add(e),this.ownerByToken.set(e,i),this.delegates.get(i)?.tokenMatched?.(e)}}tokenUnmatched(t){var e,i=this.ownerByToken.get(t);i&&(this.ownerByToken.delete(t),(e=this.tokensByOwner.get(i))&&(e.delete(t),0===e.size)&&this.tokensByOwner.delete(i),this.delegates.get(i)?.tokenUnmatched?.(t))}ownedTokens(t){t=this.tokensByOwner.get(t);return t?Array.from(t):[]}ownerOf(t){return this.ownerFor(t.element,t.content)}ownerFor(t,e){e=this.identifierFor(e);if(!e)return null;try{return t.closest(e)}catch{return null}}}const ee=new te("data-action",t=>kt(t).identifier);class ie{constructor(t){this.instance=t,this.eventListenerMap=new Map}start(){this.stopWatching||(this.stopWatching=ee.subscribe(this.instance,this))}stop(){var t=this.stopWatching;t&&(this.stopWatching=void 0,t())}tokenMatched(t){var{content:e,element:i}=t;const{identifier:n,eventTarget:s,...o}=kt(e);o.eventName&&n===this.identifier&&o.methodName&&(e=new At(this.instance,{...o,eventTarget:s||i}),this.eventListenerMap.set(t,e),e.start())}tokenUnmatched(t){var e=this.eventListenerMap.get(t);e&&(e.stop(),this.eventListenerMap.delete(t))}get identifier(){return this.instance.identifier}}const ne="data-impulse-element",A=new Map,se=new WeakSet;function E(t,e,i,n){j(e);var n="boolean"==typeof n?{capture:n}:n??{},s=!!n.capture,o=!!n.once;const{passive:r,signal:a}=n;if(!a?.aborted){const c={selector:e,callback:i,once:o,removed:!1,detach:()=>a?.removeEventListener("abort",l)},h=function(t,e,i){var n=function(t,e,i){i=void 0===i?"":i?"p":"n";return(e?"c":"b")+i+":"+t}(t,e,i),s=A.get(n);if(s)return s;const o=new G,d={key:n,eventName:t,capture:e,selectorSet:o,listener:t=>{try{var n=t,s=d.selectorSet,e=d.capture;try{n.eventPhase}catch{return}if(se.has(n)){if(n.cancelBubble)return;se.delete(n)}if((i=n.target)instanceof Node){var i="function"==typeof n.composedPath?n.composedPath():function(t){var e=[];let i=t;for(;i;)e.push(i),i=i.parentNode;return e}(i),e=e?i.slice().reverse():i,o=[];for(const a of e)if(a instanceof Element)for(var{value:r}of s.matches(a))!r.removed&&a.matches(r.selector)&&o.push({node:a,handler:r});if(0!==o.length){let e=!1,i=!1;const l=n.stopPropagation,c=n.stopImmediatePropagation;n.stopPropagation=function(){e=!0,l.call(n)},n.stopImmediatePropagation=function(){e=!0,i=!0,c.call(n)};try{let t;for(const{node:h,handler:u}of o){if(i)break;if(e&&void 0!==t&&h!==t)break;u.removed||(t=h,Object.defineProperty(n,"currentTarget",{configurable:!0,get:()=>h}),u.once&&(u.removed=!0,u.detach(),s.delete(u.selector,u)),p(()=>u.callback.call(h,n)))}}finally{e&&se.add(n),delete n.currentTarget,delete n.stopPropagation,delete n.stopImmediatePropagation}}}}finally{oe(d)}}};return document.addEventListener(t,d.listener,void 0===i?e:{capture:e,passive:i}),A.set(n,d),d}(t,s,r);function l(){c.removed||(c.removed=!0,c.detach(),h.selectorSet.delete(e,c),oe(h))}h.selectorSet.add(e,c),a?.addEventListener("abort",l)}}function oe(t){0<t.selectorSet.size||A.get(t.key)!==t||(document.removeEventListener(t.eventName,t.listener,t.capture),A.delete(t.key))}const re=new WeakSet,ae=new WeakMap;function le(t){return re.has(t)}function O(t){var[t,e]=t.split(".");return{identifier:t,key:e}}const x=new te("data-target",t=>O(t).identifier);function ce(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}class he{constructor(t){this.instance=t,this.orderedByKey=new Map,this.nowByKey=new Map,this.stableByKey=new Map,this.heldSinceByKey=new Map,this.departedByKey=new Map,this.declarations=nt(this.instance,tt),this.targetsByKey=new h,this.tokensByElement=new h,this.waitingByKey=new h}start(){for(const{key:e,multiple:t}of this.declarations.values()){const i=t?{delivered:()=>this.stableArray(e,this.orderedTargets(e)),now:()=>this.stableArray(e,this.claimants(e))}:{delivered:()=>this.targetsByKey.valuesForKey(e)[0]??null,now:()=>this.claimantNow(e)};Object.defineProperty(this.instance,e,{configurable:!0,get:()=>{var t;return this.stopWatching?(t=function(){if(v||!r)return 0;var t=r.takeRecords();if(0===t.length)return 0<y.length?Bt:0;let e=!1;for(const i of t)i.target!==g&&(y.push(i),e=!0);return e&&(Bt+=1),0===y.length?0:(g.data="",Bt)}())&&this.isInDocumentTree()?this.readNow(e,t,i.now):(0<this.nowByKey.size&&this.nowByKey.clear(),i.delivered()):0===b()&&this.isInDocumentTree()?i.now():i.delivered()}})}this.stopWatching||(this.stopWatching=x.subscribe(this.instance,this))}stop(){var t=this.stopWatching;if(t){this.stopWatching=void 0,this.nowByKey.clear();try{t()}finally{this.stableByKey.clear(),this.heldSinceByKey.clear(),this.departedByKey.clear()}}}tokenMatched(t){var{content:e,element:i}=t;const{identifier:n,key:s}=O(e);if(this.isValidIdKeyPair(n,s))if(this.targetsByKey.has(s,i))this.tokensByElement.add(i,t);else{if(!this.isKeyMultiple(s)){var[e]=this.targetsByKey.valuesForKey(s);if(e&&this.takesOver(s,e,i))return void this.handOver(s,e,t);if(e||this.keptForMovedTarget(s,i))return this.waitingByKey.add(s,t),this.reportIfLeftWaiting(s,t),void(e||Promise.resolve().then(()=>S(()=>this.adoptWaiting(s))))}this.tokensByElement.add(i,t),this.connect(s,i)}}tokenUnmatched(t){var{content:e,element:i}=t,{identifier:n,key:s}=O(e);if(this.isValidIdKeyPair(n,s)&&!this.waitingByKey.delete(s,t)&&this.targetsByKey.has(s,i)&&(this.tokensByElement.delete(i,t),!this.isStillReferenced(i,e)))try{this.invokeCallback(s,i,"disconnected")}finally{this.targetsByKey.delete(s,i),this.orderedByKey.delete(s),this.isKeyMultiple(s)||(n=this.heldSinceByKey.get(s)??b(),this.departedByKey.set(s,{element:i,since:n,delivery:b()})),this.adoptWaiting(s,t)}}reportIfLeftWaiting(t,e){Promise.resolve().then(()=>{this.waitingByKey.has(t,e)&&Et(new Error(`
2
- Multiple "${t}" targets in the "${this.identifier}" element were defined using the @target() decorator.
3
- Please use the @targets() decorator instead if you want to define multiple targets for the same key.
4
- Learn more about the @targets() decorator: https://ambiki.github.io/impulse/reference/targets.html#multiple-targets
5
- `.trim()))})}connect(t,e){var i,n;this.targetsByKey.add(t,e),this.orderedByKey.delete(t),this.isKeyMultiple(t)||(n=(i=this.departedByKey.get(t))?.element===e&&i.delivery===b(),this.heldSinceByKey.set(t,n?i.since:b())),this.invokeCallback(t,e,"connected")}takesOver(t,e,i){return this.heldSinceByKey.get(t)===b()&&ce(i,e)<0&&this.claims(i,t)&&this.claims(e,t)}handOver(e,t,i){var n=this.tokensByElement.valuesForKey(t).filter(t=>O(t.content).key===e);for(const s of n)this.tokensByElement.delete(t,s),this.waitingByKey.add(e,s);try{this.invokeCallback(e,t,"disconnected")}finally{this.targetsByKey.delete(e,t),this.stopWatching&&(n[0]&&this.reportIfLeftWaiting(e,n[0]),this.tokensByElement.add(i.element,i),p(()=>this.connect(e,i.element)))}}keptForMovedTarget(t,e){var i=this.departedByKey.get(t);return void 0!==i&&i.element!==e&&i.delivery===b()&&i.since!==i.delivery&&this.claims(i.element,t)}adoptWaiting(t,e){if(this.stopWatching&&this.waitingByKey.get(t)&&!this.targetsByKey.get(t)&&(!e||!x.stillRoutesTo(this.instance,e))){var i=this.waitingByKey.valuesForKey(t).filter(t=>x.stillRoutesTo(this.instance,t));const[n]=i.sort((t,e)=>ce(t.element,e.element));if(n){for(const s of i)s.element===n.element&&(this.waitingByKey.delete(t,s),this.tokensByElement.add(s.element,s));p(()=>this.connect(t,n.element))}else e&&Promise.resolve().then(()=>S(()=>this.adoptWaiting(t)))}}orderedTargets(t){let e=this.orderedByKey.get(t);return e||(e=this.targetsByKey.valuesForKey(t).sort(ce),this.orderedByKey.set(t,e)),e}readNow(t,e,i){var n=this.nowByKey.get(t);return n?.version===e?n.value:(n=i(),this.nowByKey.set(t,{version:e,value:n}),n)}stableArray(t,e){var i,n,s=this.stableByKey.get(t);return s===e||s&&(n=e,(i=s).length===n.length)&&i.every((t,e)=>t===n[e])?s:(this.stableByKey.set(t,e),e)}isInDocumentTree(){return this.instance.getRootNode()===document}claimants(t){var e=this.instance,i=`[data-target*="${CSS.escape(this.identifier+"."+t)}"]`,n=[];e.matches(i)&&this.claims(e,t)&&n.push(e);for(const s of e.querySelectorAll(i))this.claims(s,t)&&n.push(s);return n}claimantNow(t){var[e]=this.targetsByKey.valuesForKey(t);return e&&this.claims(e,t)?e:this.claimants(t)[0]??null}claims(t,e){return x.routesTo(this.instance,t,t=>{t=O(t);return t.identifier===this.identifier&&t.key===e})}isStillReferenced(t,e){return this.tokensByElement.valuesForKey(t).some(t=>t.content===e)}isValidIdKeyPair(t,e){return!(!e||t!==this.identifier||!this.declarations.has(e))}invokeCallback(t,e,i){i=this.instance[""+t+((t=i).charAt(0).toUpperCase()+t.slice(1))];"function"==typeof i&&i.call(this.instance,e)}isKeyMultiple(t){return this.declarations.get(t)?.multiple??!1}get identifier(){return this.instance.identifier}}const ue={phase:"idle"},de={phase:"initialized"};class pe extends HTMLElement{constructor(){super(...arguments),this.property=new dt(this),this.target=new he(this),this.action=new ie(this),this._lifecycle=ue}connectedCallback(){var t=this._lifecycle;"tearingDown"===t.phase?t.reconnected=!0:"idle"===t.phase&&this._asyncConnect()}static get observedAttributes(){return Array.from(it(this.prototype,Z).keys(),ht)}attributeChangedCallback(t,e,i){var n=this._lifecycle["phase"];"initialized"!==n&&"tearingDown"!==n||e===i||"function"==typeof(t=this[(n=t.replace(rt,(t,e,i)=>i?i.toUpperCase():"").replace(at,t=>t.toLowerCase()))+"Changed"])&&(n=this.property.change(n,e,i))&&t.call(this,n.newValue,n.oldValue)}disconnectedCallback(){if("initialized"===this._lifecycle.phase){var t={phase:"tearingDown",reconnected:!1},e=(this._lifecycle=t,this.removeAttribute(ne),e=this,re.delete(e),[()=>this.disconnected(),()=>this.action.stop(),()=>this.target.stop(),()=>this.property.stop()]);try{u(e,t=>t())}finally{this._lifecycle=ue,t.reconnected&&this.isConnected&&this._asyncConnect()}}}connected(){}disconnected(){}emit(t,{target:e=this,prefix:i=this.identifier,...n}={}){return[e,i,{detail:t={},...n}={}]=[e,i?i+":"+t:t,n],i=new CustomEvent(i,{bubbles:!0,composed:!0,detail:t,...n}),e.dispatchEvent(i),i}get identifier(){return this.tagName.toLowerCase()}async _asyncConnect(){var t={phase:"initializing"};this._lifecycle=t;try{if(this.property.start(),await Ot(),this.isConnected&&(customElements.upgrade(this),await this._resolveUndefinedElements(),this.isConnected))if(this.target.start(),this.isConnected)if(this.action.start(),this.isConnected){this._lifecycle=de,this.setAttribute(ne,"");var e=this,i=(re.add(e),ae.get(e));if(i){ae.delete(e);for(const n of i)p(()=>n(e))}this.connected()}else this._abandonInit();else this._abandonInit()}finally{this._lifecycle===t&&(this._lifecycle=ue)}}_abandonInit(){this._lifecycle=ue,u([()=>this.action.stop(),()=>this.target.stop()],t=>t())}_resolveUndefinedElements(){var t=Array.from(this.querySelectorAll(":not(:defined)")),e=this.constructor.migratedToWhenInitialized,e=(0<t.length&&!e&&console.warn(`[impulse] <${this.identifier}> waits for descendant custom elements to be defined before invoking target `+"connected callbacks. This is deprecated and will be removed in the next major version. If a connected callback reads properties on a target element, await whenInitialized(target) inside the callback instead. Set ImpulseElement.migratedToWhenInitialized = true to silence this warning."),t.map(t=>customElements.whenDefined(t.localName)));return Promise.all(e)}}function P(t,e){return t===e||"both"===t}function fe(t){return t.split("-")[0]}const N={placement:"bottom",strategy:"fixed",flip:!(pe.migratedToWhenInitialized=!1),keepFlipped:!1,shift:!0};function me(S){let A,E=!1,O=0,x;return{prime:function(){var{floating:t,strategy:e=N.strategy}=S();t&&(t.style.position=e,t.style.top="0px",t.style.left="0px")},reposition:async function(){var t=S();const{anchor:e,floating:i,floatingUI:n={}}=t;if(e&&i){const p=++O,f=()=>p!==O;var s,o,r,a=t.placement??N.placement,l=t.flip??N.flip,c=!0!==l&&l?l:{},h=n.flip?.fallbackPlacements??c.fallbackPlacements,u=(x=l&&t.keepFlipped&&x?.requested===a?x:void 0)?(d=a,o=x.placement,r=h,(u=fe(o))===fe(d)?d:r?o:(r=u,(o=(o=d).split("-")[1])?r+"-"+o:r)):a,d=[C.offset(n.offset??{mainAxis:t.distance??0,crossAxis:t.skidding??0})];const m=t["sync"];m?d.push(C.size({apply:({rects:t})=>{f()||(i.style.width=P(m,"width")?t.reference.width+"px":"",i.style.height=P(m,"height")?t.reference.height+"px":"")}})):(i.style.width="",i.style.height=""),l&&d.push(C.flip({...c,padding:([o=0,{autoSize:r,autoSizePadding:l=0}]=[c.padding,t],r?(l=Math.max(o,l+1),{top:c=P(r,"height")?l:o,bottom:c,left:c=P(r,"width")?l:o,right:c}):o),...n.flip,fallbackPlacements:(l=a,s=u,(c=h)&&s!==l?[l,...c].filter(t=>t!==s):c)}));h=t.shift??N.shift;h&&d.push(C.shift({...!0===h?{}:h,...n.shift}));const v=t["autoSize"];v?(d.push(C.size({padding:t.autoSizePadding??0,apply:({availableWidth:t,availableHeight:e})=>{f()||(P(v,"height")?i.style.setProperty("--awc-auto-size-height",e+"px"):i.style.removeProperty("--awc-auto-size-height"),P(v,"width")?i.style.setProperty("--awc-auto-size-width",t+"px"):i.style.removeProperty("--awc-auto-size-width"))}})),E=!0):E&&(i.style.removeProperty("--awc-auto-size-height"),i.style.removeProperty("--awc-auto-size-width"),E=!1),d.push(...n.middleware??[]);l=t.arrow;l&&d.push(C.arrow({element:l,padding:t.arrowPadding??0}));const{x:y,y:g,placement:b,strategy:w,middlewareData:k}=await C.computePosition(e,i,{placement:u,middleware:d,strategy:t.strategy??N.strategy});if(!f()){if(Object.assign(i.style,{left:y+"px",top:g+"px",position:w}),k.arrow&&l){const{x:y,y:g}=k.arrow;Object.assign(l.style,{left:"number"==typeof y?y+"px":"",top:"number"==typeof g?g+"px":""})}i.setAttribute("x-placement",b),t.keepFlipped&&A&&(x={placement:b,requested:a})}}},start:function(t){var{anchor:e,floating:i}=S();e&&i&&(A?.(),A=C.autoUpdate(e,i,t))},stop:async function(){return x=void 0,new Promise(t=>{A?(A(),A=void 0,requestAnimationFrame(()=>t())):t()})}}}let T=class extends pe{constructor(){super(...arguments),this.placement=N.placement,this.active=!1,this.strategy=N.strategy,this.distance=0,this.skidding=0,this.flip=N.flip,this.flipPadding=0,this.fallbackPlacements=[],this.fallbackStrategy="bestFit",this.keepFlipped=N.keepFlipped,this.shift=N.shift,this.shiftPadding=0,this.autoSizePadding=0,this.positioner=me(()=>this.positioningOptions)}connected(){this.follow()}disconnected(){this.unfollow()}async anchorIdChanged(t){await this.unfollow(),t&&this.anchorElement&&this.follow()}async activeChanged(t){t?this.follow():await this.unfollow()}start(){this.active?this.follow():this.active=!0}async stop(){var t=this.unfollow();return this.active=!1,t}async reposition(){this.active&&this.anchorElement&&await this.positioner.reposition()}follow(){this.anchorElement&&(this.positioner.prime(),this.positioner.start(()=>this.reposition()))}unfollow(){return this.positioner.stop()}get anchorElement(){return document.getElementById(this.anchorId)}get arrowElement(){return this.querySelector("[data-arrow]")}get positioningOptions(){return{anchor:this.anchorElement,floating:this,placement:this.placement,strategy:this.strategy,distance:this.distance,skidding:this.skidding,flip:this.flip&&{padding:this.flipPadding,fallbackPlacements:this.fallbackPlacements.length?this.fallbackPlacements:void 0,fallbackStrategy:this.fallbackStrategy},keepFlipped:this.keepFlipped,shift:this.shift&&{padding:this.shiftPadding},sync:this.sync,autoSize:this.autoSize,autoSizePadding:this.autoSizePadding,arrow:this.arrowElement,arrowPadding:this.arrowPadding}}};t([e()],T.prototype,"anchorId",void 0),t([e()],T.prototype,"placement",void 0),t([e({type:Boolean})],T.prototype,"active",void 0),t([e()],T.prototype,"strategy",void 0),t([e({type:Number})],T.prototype,"distance",void 0),t([e({type:Number})],T.prototype,"skidding",void 0),t([e()],T.prototype,"sync",void 0),t([e({type:Boolean})],T.prototype,"flip",void 0),t([e({type:Number})],T.prototype,"flipPadding",void 0),t([e({type:Array})],T.prototype,"fallbackPlacements",void 0),t([e()],T.prototype,"fallbackStrategy",void 0),t([e({type:Boolean})],T.prototype,"keepFlipped",void 0),t([e({type:Boolean})],T.prototype,"shift",void 0),t([e({type:Number})],T.prototype,"shiftPadding",void 0),t([e()],T.prototype,"autoSize",void 0),t([e({type:Number})],T.prototype,"autoSizePadding",void 0),t([e({type:Number})],T.prototype,"arrowPadding",void 0),T=t([n("awc-anchor")],T);var ve=0;function ye(){return ve+=1,`ambiki-${Math.random().toString().slice(2,6)}-`+ve}function ge(t){return!t.hasAttribute("disabled")&&"true"!==t.getAttribute("aria-disabled")}var be=!!navigator.userAgent.match(/Macintosh/),we=class{input;list;multiple;isMouseMoving=!1;constructor(t,e,{multiple:i=!1}={}){this.input=t,this.list=e,this.multiple=i,this.list.id||(this.list.id=ye()),this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.multiple&&this.input.setAttribute("aria-multiselectable","true"),this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-haspopup","listbox"),this.input.setAttribute("aria-autocomplete","list"),this.list.setAttribute("role","listbox"),this.onKeydown=this.onKeydown.bind(this),this.onClick=this.onClick.bind(this),this.onListMouseover=this.onListMouseover.bind(this),this.onListMousemove=this.onListMousemove.bind(this)}start(){this.isMouseMoving=!1,this.input.setAttribute("aria-expanded","true"),this.input.setAttribute("aria-controls",this.list.id),this.input.addEventListener("keydown",this.onKeydown),this.list.addEventListener("click",this.onClick),this.list.addEventListener("mouseover",this.onListMouseover),this.list.addEventListener("mousemove",this.onListMousemove),this.initializeOptions()}stop(){this.isMouseMoving=!1,this.input.setAttribute("aria-expanded","false"),this.input.removeAttribute("aria-controls"),this.input.removeEventListener("keydown",this.onKeydown),this.list.removeEventListener("click",this.onClick),this.list.removeEventListener("mouseover",this.onListMouseover),this.list.removeEventListener("mousemove",this.onListMousemove),this.deselectAll(),this.deactivate()}onKeydown(t){if(this.isMouseMoving=!1,!(t.shiftKey||t.metaKey||t.altKey||!be&&t.ctrlKey))switch(t.key){case"Enter":case"Tab":this.activeOption&&ge(this.activeOption)&&(t.preventDefault(),t.stopPropagation(),this.activeOption.click());break;case"Escape":this.deactivate();break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.activeOption?this.move(1):this.activate(this.visibleOptions[0],{scroll:!0});break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),this.activeOption?this.move(-1):this.activate(this.visibleOptions[this.visibleOptions.length-1],{scroll:!0});break;case"Home":t.preventDefault(),t.stopPropagation(),this.activate(this.visibleOptions[0],{scroll:!0});break;case"End":t.preventDefault(),t.stopPropagation(),this.activate(this.visibleOptions[this.visibleOptions.length-1],{scroll:!0});break;default:t.ctrlKey||this.deactivate()}}onClick(t){t=ke(t.target);t&&ge(t)&&(this.multiple&&this.isSelected(t)?this.deselect(t):this.select(t),t.dispatchEvent(new CustomEvent("combobox:commit",{bubbles:!0})))}onListMouseover(t){var e;this.isMouseMoving?(e=ke(t.target))&&this.activate(e):t.preventDefault()}onListMousemove(t){!this.isMouseMoving&&(this.isMouseMoving=!0,t=ke(t.target))&&this.activate(t)}select(t){if(this.multiple)t.setAttribute("aria-selected","true");else for(var e of this.options)e.setAttribute("aria-selected",(e===t).toString())}deselect(t){t.setAttribute("aria-selected","false")}deselectAll(){for(var t of this.options)this.deselect(t)}activate(t,{scroll:e=!1}={}){for(var i of this.options)i.id===t.id?(i.setAttribute("data-active",""),this.input.setAttribute("aria-activedescendant",i.id),e&&i.scrollIntoView({block:"nearest"})):i.removeAttribute("data-active")}deactivate(){this.input.removeAttribute("aria-activedescendant");for(var t of Array.from(this.list.querySelectorAll('[role="option"][data-active]')))t.removeAttribute("data-active")}isSelected(t){return"true"===t.getAttribute("aria-selected")}get options(){return Array.from(this.list.querySelectorAll('[role="option"]'))}get visibleOptions(){return this.options.filter(Se)}get activeOption(){return this.list.querySelector("[data-active]")}move(t){this.activeOption&&(t=function(t,e,i){let n=t.indexOf(e),s=(n===t.length-1&&1===i&&(n=-1),1===i?0:t.length-1);return t[s=e&&0<=n&&0<=(e=n+i)&&e<t.length?e:s]}(this.visibleOptions,this.activeOption,t),this.activate(t,{scroll:!0}))}initializeOptions(){for(var t of this.options)t.setAttribute("tabindex","-1"),t.id||(t.id=ye()),t.hasAttribute("aria-selected")||this.deselect(t)}};function ke(t){return t&&t.closest('[role="option"]')||!1}function Se(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(0<t.offsetWidth||0<t.offsetHeight)}function Ae(t,e){void 0===e&&(e=!0);var i=null==t||null==(i=t.getAttribute)?void 0:i.call(t,"inert");return""===i||"true"===i||e&&t&&("function"==typeof t.closest?t.closest("[inert]"):Ae(t.parentNode))}function Ee(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))}function Oe(t){var e,i;if(t)return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||""===(i=null==(e=t)||null==(i=e.getAttribute)?void 0:i.call(e,"contenteditable"))||"true"===i)&&!Ee(t)?0:t.tabIndex;throw new Error("No node provided")}function xe(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex}function Ce(t){return"INPUT"===t.tagName}function Pe(t){if(!t.name)return 1;function e(t){return i.querySelectorAll('input[type="radio"][name="'+t+'"]')}var i=t.form||Ie(t);if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)n=e(window.CSS.escape(t.name));else try{n=e(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),0}var n=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]}(n,t.form);return!n||n===t}function Ne(t){return Ce(e=t)&&"radio"===e.type&&!Pe(t);var e}function Te(t){var e=(t=t.getBoundingClientRect()).width,t=t.height;return 0===e&&0===t}function Me(t,e){var i=e.displayCheck,n=e.getShadowRoot;if("full-native"===i&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===(e=getComputedStyle(t).visibility)||"collapse"===e)return 1;if(e=M.call(t,"details>summary:first-of-type")?t.parentElement:t,M.call(e,"details:not([open]) *"))return 1;if(i&&"full"!==i&&"full-native"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return Te(t)}else{if("function"==typeof n){for(e=t;t;){var s=t.parentElement,o=Ie(t);if(s&&!s.shadowRoot&&!0===n(s))return Te(t);t=t.assignedSlot||(s||o===t.ownerDocument?s:o.host)}t=e}if(function(t){var e,i=t&&Ie(t),n=null==(e=i)?void 0:e.host,s=!1;if(i&&i!==t)for(s=!!(null!=(e=n)&&null!=(e=e.ownerDocument)&&e.contains(n)||null!=t&&null!=(e=t.ownerDocument)&&e.contains(t));!s&&n;)var o,s=!(null==(o=n=null==(o=i=Ie(n))?void 0:o.host)||null==(o=o.ownerDocument)||!o.contains(n));return s}(t))return!t.getClientRects().length;if("legacy-full"!==i)return 1}}var i=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Be=i.join(","),Le="undefined"==typeof Element,M=Le?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ie=!Le&&Element.prototype.getRootNode?function(t){var e;return null==t||null==(e=t.getRootNode)?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},qe=function(t,e,i){var n;return Ae(t)?[]:(n=Array.prototype.slice.apply(t.querySelectorAll(Be)),e&&M.call(t,Be)&&n.unshift(t),n.filter(i))},Ke=function(t,e,i){for(var n=[],s=Array.from(t);s.length;){var o,r,a=s.shift();Ae(a,!1)||("SLOT"===a.tagName?(o=(o=a.assignedElements()).length?o:a.children,o=Ke(o,!0,i),i.flatten?n.push.apply(n,o):n.push({scopeParent:a,candidates:o})):(M.call(a,Be)&&i.filter(a)&&(e||!t.includes(a))&&n.push(a),o=a.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(a),r=!Ae(o,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(a)),o&&r?(r=Ke((!0===o?a:o).children,!0,i),i.flatten?n.push.apply(n,r):n.push({scopeParent:a,candidates:r})):s.unshift.apply(s,a.children)))}return n},Fe=function(t,e){var i;return!(e.disabled||Ce(i=e)&&"hidden"===i.type||Me(e,t)||"DETAILS"===(i=e).tagName&&Array.prototype.slice.apply(i.children).some(function(t){return"SUMMARY"===t.tagName})||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var i=0;i<e.children.length;i++){var n=e.children.item(i);if("LEGEND"===n.tagName)return!!M.call(e,"fieldset[disabled] *")||!n.contains(t)}return!0}e=e.parentElement}return!1}(e))},Ve=function(t,e){return!(Ne(e)||Oe(e)<0||!Fe(t,e))},De=function(t){t=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(t)||0<=t)},Re=function(t){var a=[],l=[];return t.forEach(function(t,e){var i,n=!!t.scopeParent,s=n?t.scopeParent:t,o=(o=n,(i=Oe(r=s))<0&&o&&!Ee(r)?0:i),r=n?Re(t.candidates):s;0===o?n?a.push.apply(a,r):a.push(s):l.push({documentOrder:e,tabIndex:o,item:t,isScope:n,content:r})}),l.sort(xe).reduce(function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t},[]).concat(a)},ze=i.concat("iframe:not([inert]):not([inert] *)").join(",");function We(t){let e=t;for(;null!==e;){if(function(t,e){if(e=e||{},t)return!1!==M.call(t,ze)&&Fe(e,t);throw new Error("No node provided")}(e)||e.hasAttribute("data-loosely-focusable"))return 1;e=e.parentElement}}const _e=new WeakMap;function je(t,e){let i=_e.get(t);if(!i){i=[],_e.set(t,i);{var n=i;const s=t.disconnected.bind(t);Object.assign(t,{disconnected(){for(const t of n.splice(0).reverse())t();s()}})}}i.push(e)}function Ue(t,e){const f=function(t){if("function"==typeof t)return t;const e={...t};return()=>e}(e),i=me(()=>{return[{anchorElement:t,floatingElement:e,arrowElement:i,arrowPadding:n=0,middleware:s=[],offsetOptions:o=0,placement:r,flipOptions:a,shiftOptions:l,keepFlipped:c,strategy:h,sync:u,autoSize:d,autoSizePadding:p=0}]=[f()],{anchor:t,floating:e,placement:r,keepFlipped:c,strategy:h,sync:u,autoSize:d,autoSizePadding:p,arrow:i,arrowPadding:n,floatingUI:{offset:o,flip:a,shift:l,middleware:s}};var t,e,i,n,s,o,r,a,l,c,h,u,d,p});async function n(){t.open&&await i.reposition()}function s(){return i.stop()}return i.prime(),i.reposition(),je(t,()=>{s()}),{start:function(){i.start(n)},update:n,stop:s}}function He(t,{boundaries:n,callback:s}){const e=new AbortController;var i=e["signal"];let o=null;function r(){o=null}document.addEventListener("mousedown",function(t){o=0<t.button?null:t.composedPath?.()?.[0]||t.target},{capture:!0,signal:i}),document.addEventListener("click",function(t){var e=o;if(o=null,e&&!t.defaultPrevented&&e.getRootNode().contains(e)&&e.isConnected){for(const i of n)if(null!==i){if(i.contains(e))return;if(t.composed&&t.composedPath().includes(i))return}s(t,e)}},{capture:!0,signal:i}),document.addEventListener("contextmenu",r,{capture:!0,signal:i}),document.addEventListener("dragstart",r,{capture:!0,signal:i}),je(t,()=>{r(),e.abort()})}class Qe extends pe{constructor(){super(...arguments),this._opened=!1}connected(){this.open&&this.openQuietly({initial:!0})}disconnected(){this.closeQuietly()}openChanged(t){t?this.show():this.hide()}requestShow(){le(this)&&!this._opened&&this.emitRequest("show")&&this.othersAllowShow()&&this.show()}async requestHide(t){this._opened&&this.emitRequest("hide")&&await this.hide(t)}show(){this._opened||(le(this)?(this.openQuietly({initial:!1}),this.emit("shown")):this.open=!0)}async hide(t){this._opened?(t=this.closeQuietly(t),this.open=!1,t&&await t,this._opened||this.emit("hidden")):this.open=!1}get opened(){return this._opened}othersAllowShow(){return!0}emitRequest(t){return!this.emit(t,{cancelable:!0}).defaultPrevented}closeQuietly(t){if(this._opened)return this._opened=!1,this.closeParts(t)}openQuietly(t){this._opened=!0,this.open=!0;try{this.openParts(t)}catch(t){throw this._opened=!1,this.open=!1,t}}}function $e(t){return{target:t,value:t.getAttribute("value")??"",text:t.dataset.text||""}}const Je={bubbles:!1,prefix:!1};class Xe{constructor(t){this.cachedOptions="",this.autocomplete=t,this.debouncedRequest=function(e,i){let n;function t(...t){clearTimeout(n),n=setTimeout(()=>{e.apply(this,t)},i)}return t.clear=()=>{clearTimeout(n)},t}(t=>this.makeRequest(t),300)}search(t){this.autocomplete.setAttribute("loading",""),this.autocomplete.removeAttribute("error"),this.autocomplete.combobox.deactivate(),this.abortController?.abort(),this.debouncedRequest(t)}start(){this.cachedOptions?this.insertOptions(this.cachedOptions,{cached:!0}):this.search("")}stop(){}disconnected(){var t=Boolean(this.abortController);this.debouncedRequest.clear(),this.abortController?.abort(),this.abortController=void 0,this.autocomplete.removeAttribute("loading"),t&&this.emit("loadend")}async makeRequest(t){this.emit("loadstart"),this.abortController?.abort();var e=(this.abortController=new AbortController)["signal"],i=new URL(this.autocomplete.src,window.location.href),n=new URLSearchParams(i.search.slice(1));n.append(this.autocomplete.param,t),i.search=n.toString();try{var s=await fetch(i.toString(),{signal:e,credentials:"same-origin",headers:{accept:"text/fragment+html"}});if(!s.ok)throw new Error(await s.text());var o=await s.text();""===t&&(this.cachedOptions=o),await this.insertOptions(o),this.abortController=void 0,this.emit("load"),this.autocomplete.removeAttribute("loading"),this.emit("loadend")}catch(t){t instanceof Error&&"AbortError"===t.name||(this.abortController=void 0,this.autocomplete.open&&this.autocomplete.setAttribute("error",""),this.emit("error"),this.autocomplete.removeAttribute("loading"),this.emit("loadend"))}}async insertOptions(t,{cached:e=!1}={}){this.autocomplete.optionsContainer.innerHTML=t,e||this.autocomplete.combobox.initializeOptions(),this.autocomplete.open&&(this.autocomplete.checkIfListIsEmpty(),this.autocomplete.selectVariant.start(),await this.autocomplete.reposition())}emit(t){this.autocomplete.emit(t,Je)}}class Ye{constructor(t){this.autocomplete=t}search(t){var e,i,n=this.autocomplete.options,s=t.toLowerCase(),o=new Map;for(const l of n){var r=l.closest('[role="group"]'),a=!s||!!l.getAttribute("data-text")?.toLowerCase().includes(s);l.hidden=!a,r&&o.set(r,o.get(r)||a)}for([e,i]of o)e.hidden=!i;t=this.autocomplete.visibleOptions[0];t?this.autocomplete.combobox.activate(t):this.autocomplete.combobox.deactivate(),this.autocomplete.checkIfListIsEmpty()}start(){this.autocomplete.checkIfListIsEmpty()}stop(){this.resetOptions()}disconnected(){}resetOptions(){for(const t of this.autocomplete.groups)t.hidden=!1;for(const e of this.autocomplete.options)e.hidden=!1}}class Ge{constructor(t){this.selectedValues=new Set,this.defaultSelectedValues=[],this.findByValue=e=>t=>t.getAttribute("value")===e,this.autocomplete=t}connected(){this.defaultSelectedValues=this.tags.reduce((t,e)=>{var e=e.querySelector('[data-behavior="hidden-field"]'),i=e.value;return this.selectedValues.add(i),t.push({value:i,text:e.getAttribute("data-text")||""}),t},[])}start(){this.selectOrDeselectOptions(),this.firstActivableOption&&this.autocomplete.combobox.activate(this.firstActivableOption,{scroll:!0})}stop(){this.autocomplete.input.value=""}reset(){this.clear(),this.defaultSelectedValues.forEach(({value:t,text:e})=>this.setValue(t,e))}select(t){var e=t.getAttribute("value"),t=t.dataset["text"];e&&(this.selectedValues.has(e)?this.removeValue(e):this.setValue(e,t||""))}setValue(t,e){this.selectedValues.has(t)||(this.selectedValues.add(t),this.insertTag(t,e.trim()),this.toggleSelectedClass(),this.required=this.autocomplete.required,this.autocomplete.open&&(e=this.autocomplete.options.find(this.findByValue(t)))&&this.autocomplete.combobox.select(e))}clear(){this.selectedValues.forEach(t=>this.removeValue(t))}removeValue(t){this.selectedValues.has(t)&&(this.selectedValues.delete(t),this.removeTag(t),this.toggleSelectedClass(),this.required=this.autocomplete.required,t=this.autocomplete.options.find(this.findByValue(t)))&&this.autocomplete.combobox.deselect(t)}isSelected(t){return this.selectedValues.has(t)}set required(t){!t||0<this.selectedValues.size?this.autocomplete.input.required=!1:this.autocomplete.input.required=!0}selectOrDeselectOptions(){for(const e of this.autocomplete.options){var t=e.getAttribute("value");t&&this.selectedValues.has(t)?this.autocomplete.combobox.select(e):this.autocomplete.combobox.deselect(e)}}insertTag(t,e){var i=this.template.content.cloneNode(!0),n=i.querySelector('[data-behavior="tag"]'),s=i.querySelector('[data-behavior="text"]'),o=i.querySelector('[data-behavior="hidden-field"]');n.setAttribute("value",t),n.setAttribute("data-text",e),s.innerText=e,o.value=t,o.setAttribute("data-text",e),this.autocomplete.control.insertBefore(i,this.template);for(const r of this.autocomplete.tagDismissButtons)r.disabled=this.autocomplete.disabled}removeTag(t){this.tags.find(this.findByValue(t))?.remove()}toggleSelectedClass(){this.autocomplete.toggleSelectedClass(!!this.selectedValues.size)}get firstActivableOption(){return this.autocomplete.options.find(t=>this.selectedValues.has(t.getAttribute("value")))||this.autocomplete.visibleOptions[0]}get tags(){return this.autocomplete.tags}get template(){return this.autocomplete.querySelector('[data-behavior="tag-template"]')}}class Ze{constructor(t){this.defaultValue="",this.defaultText="",this.autocomplete=t}connected(){this.defaultValue=this.hiddenField.value,this.defaultText=this.hiddenField.getAttribute("data-text")??""}start(){var t;this.selectedOption?(this.autocomplete.combobox.select(this.selectedOption),this.autocomplete.combobox.activate(this.selectedOption,{scroll:!0})):(t=this.autocomplete.visibleOptions[0])&&this.autocomplete.combobox.activate(t,{scroll:!0})}stop(){var t=this.hiddenField.dataset["text"];this.autocomplete.input.value=t??""}reset(){this.setValue(this.defaultValue,this.defaultText)}select(t){var e=t.getAttribute("value")??"",t=t.dataset["text"];this.setValue(e,t||""),this.autocomplete.requestHide()}setValue(t,e){this.hiddenField.value=t;var e=e.trim();this.hiddenField.setAttribute("data-text",e),this.autocomplete.input.value=e,this.autocomplete.toggleSelectedClass(!!t),this.autocomplete.open&&((e=this.selectedOption)?this.autocomplete.combobox.select(e):this.autocomplete.combobox.deselectAll())}clear(){this.setValue("","")}removeValue(t){this.clear()}isSelected(t){return this.hiddenField.value===t}set required(t){this.autocomplete.input.required=t}get selectedOption(){return this.autocomplete.options.find(t=>t.getAttribute("value")===this.hiddenField.value)}get hiddenField(){return this.autocomplete.querySelector('input[data-behavior="hidden-field"]')}}let B=class extends Qe{constructor(){super(),this.open=!1,this.disabled=!1,this.required=!1,this.multiple=!1,this.param="q",this.autoSize=!0,this.autoSizePadding=4,this.firstFocus=!0,this.preventOutsideClickEvent=!1,this.handleFormReset=this.handleFormReset.bind(this)}connected(){this.form?.addEventListener("reset",this.handleFormReset),this.floatingUI=Ue(this,()=>({anchorElement:this.control,floatingElement:this.listbox,placement:"bottom",sync:"width",keepFlipped:!0,offsetOptions:4,autoSize:this.autoSize?"height":void 0,autoSizePadding:this.autoSizePadding})),He(this,{boundaries:[this.control,this.listbox],callback:(t,e)=>{this.preventOutsideClickEvent&&!We(e)?t.preventDefault():this.open&&this.requestHide(),this.preventOutsideClickEvent=!1}}),this.combobox=new we(this.input,this.listbox,{multiple:this.multiple}),this.selectVariant=new(this.multiple?Ge:Ze)(this),this.selectVariant.connected(),this.searchVariant=new(this.src?Xe:Ye)(this),this.selectVariant.required=this.required,super.connected()}disconnected(){super.disconnected(),this.searchVariant?.disconnected(),this.form?.removeEventListener("reset",this.handleFormReset),this.firstFocus=!0,this.preventOutsideClickEvent=!1}disabledChanged(t){this.input.disabled=t,this.clearButton&&(this.clearButton.disabled=t);for(const e of this.tagDismissButtons)e.disabled=t}requiredChanged(t){this.selectVariant.required=t}srcChanged(t){this.clear(),this.searchVariant?.disconnected(),this.searchVariant=new(t?Xe:Ye)(this)}autoSizeChanged(){this.reposition()}autoSizePaddingChanged(){this.reposition()}handleMousedown(t){t.target!==this.input&&t.preventDefault()}handleClick(t){this.disabled||(this.focus(),t.target.hasAttribute("data-trigger")&&this.requestShow(),this.firstFocus&&this.input.value&&this.input.select(),this.firstFocus=!1)}handleInputMousedown(t){this.disabled||1===t.buttons&&this.requestShow()}async handleInputBlur(){this.preventOutsideClickEvent=this.open,await this.requestHide(),this.firstFocus=!0}handleInputKeydown(t){switch(t.key){case"Enter":this.open&&t.preventDefault();break;case"Escape":this.open&&(t.preventDefault(),t.stopPropagation(),this.requestHide());break;case"ArrowDown":t.altKey&&!this.open&&(t.preventDefault(),this.requestShow());break;case"ArrowUp":t.altKey&&this.open&&(t.preventDefault(),this.requestHide());break;case"Backspace":var e;this.multiple&&!this.input.value&&(e=this.removeLastTag())&&(t.preventDefault(),this.emitEvent("remove",$e(e)))}}handleCommit(t){t.stopPropagation();var t=t.target;t instanceof HTMLElement&&(this.selectVariant.select(t),t=$e(t),this.emitEvent("commit",{...t,selected:this.selectVariant.isSelected(t.value)}))}handleFormReset(){this.reset(),this.hide(),this.emitEvent("reset")}handleClear(){this.clear(),this.requestHide(),this.emitEvent("clear")}handleTagRemove(t){this.disabled||(t=t.target.closest('[data-behavior="tag"]'))&&(this.removeTag(t),this.emitEvent("remove",$e(t)))}handleInput(t){var t=t["target"];t instanceof HTMLInputElement&&(t=t.value.trim(),this.requestShow(),this.searchVariant.search(t))}setValue(e,...t){var[t]=t,i=this.options.find(t=>t.getAttribute("value")===e),t=t||i?.getAttribute("data-text")||"";this.selectVariant.setValue(e,t)}removeValue(...t){var[t]=t;t?this.selectVariant.removeValue(t):this.selectVariant.clear()}activate(t,{scroll:e=!0}={}){this.combobox.activate(t,{scroll:e})}deactivate(){this.combobox.deactivate()}focus(t){this.input.focus(t)}blur(){this.input.blur()}reset(){this.selectVariant.reset()}clear(){this.selectVariant.clear()}async reposition(){await this.floatingUI.update()}emitEvent(t,...e){var[e]=e;return this.emit(t,{detail:e})}openParts(){this.floatingUI.start(),this.combobox.start(),this.selectVariant.start(),this.searchVariant.start()}async closeParts(){this.combobox.stop(),this.selectVariant.stop(),this.searchVariant.stop(),this.removeAttribute("no-options"),this.removeAttribute("error"),await this.floatingUI.stop()}removeLastTag(){var t=this.tags[this.tags.length-1];if(t)return this.removeTag(t),t}removeTag(t){t=t.getAttribute("value");t&&this.removeValue(t)}checkIfListIsEmpty(){this.toggleAttribute("no-options",0===this.visibleOptions.length)}toggleSelectedClass(t){this.classList.toggle("awc-autocomplete--selected",t)}get ajax(){return Boolean(this.src)}get value(){return this.multiple?this.tags.map(t=>t.getAttribute("value")??""):this.querySelector('input[data-behavior="hidden-field"]')?.value??""}get options(){return this.combobox.options}get visibleOptions(){return this.options.filter(t=>!t.hidden)}get activeOption(){return this.combobox.activeOption}get form(){return this.closest("form")}get tags(){return[...this.querySelectorAll('[data-behavior="tag"]')]}},L=(t([e({type:Boolean})],B.prototype,"open",void 0),t([e({type:Boolean})],B.prototype,"disabled",void 0),t([e({type:Boolean})],B.prototype,"required",void 0),t([e({type:Boolean})],B.prototype,"multiple",void 0),t([e()],B.prototype,"src",void 0),t([e()],B.prototype,"param",void 0),t([e({type:Boolean})],B.prototype,"autoSize",void 0),t([e({type:Number})],B.prototype,"autoSizePadding",void 0),t([s()],B.prototype,"control",void 0),t([s()],B.prototype,"input",void 0),t([s()],B.prototype,"listbox",void 0),t([s()],B.prototype,"optionsContainer",void 0),t([s()],B.prototype,"clearButton",void 0),t([vt()],B.prototype,"tagDismissButtons",void 0),t([vt()],B.prototype,"groups",void 0),B=t([n("awc-autocomplete")],B),class extends pe{constructor(){super(),this.disabled=!1,this.value="",this.for="",this.feedbackDuration=2e3,this.internals=this.attachInternals(),this.spacePressed=!1,this.handleClick=t=>{t.currentTarget===this&&(this.disabled?(t.preventDefault(),t.stopImmediatePropagation()):this.copy())},this.handleKeydown=t=>{this.isTargetOf(t)&&!this.disabled&&("Enter"===t.key?this.click():" "===t.key&&(t.preventDefault(),this.spacePressed=!0))},this.handleKeyup=t=>{this.isTargetOf(t)&&" "===t.key&&this.spacePressed&&(this.spacePressed=!1,this.click())},this.handleBlur=t=>{this.isTargetOf(t)&&(this.spacePressed=!1)},this.internals.role="button"}connected(){this.disabled===this.hasAttribute("tabindex")&&this.syncTabIndex(),this.internals.ariaDisabled=this.disabled?"true":null,this.listeners=new AbortController;var t={capture:!0,signal:this.listeners.signal};E("click",this.localName,this.handleClick,t),E("keydown",this.localName,this.handleKeydown,t),E("keyup",this.localName,this.handleKeyup,t),E("blur",this.localName,this.handleBlur,t)}disconnected(){this.listeners?.abort(),this.spacePressed=!1,this.showFeedback(null)}disabledChanged(t){this.internals.ariaDisabled=t?"true":null,this.syncTabIndex(),t&&(this.spacePressed=!1)}syncTabIndex(){this.disabled?this.removeAttribute("tabindex"):this.tabIndex=0}isTargetOf(t){return t.composedPath()[0]===this}async copy(){let t;try{if(t=this.copiedText(),!navigator.clipboard)throw new DOMException("The Clipboard API is unavailable.","NotSupportedError");await navigator.clipboard.writeText(t)}catch(t){return this.isConnected&&this.showFeedback("error"),void this.emit("error",{detail:{error:t}})}this.isConnected&&this.showFeedback("copied"),this.emit("copied",{detail:{text:t}})}showFeedback(t){clearTimeout(this.feedbackTimeout);try{this.internals.states.delete("copied"),this.internals.states.delete("error"),t&&(this.internals.states.add(t),this.feedbackTimeout=setTimeout(()=>this.showFeedback(null),this.feedbackDuration))}catch{}}copiedText(){if(this.value)return this.value;var t=this.for,e=this.getRootNode(),e=t&&(e instanceof Document||e instanceof ShadowRoot)?e.getElementById(t):null;if(e)return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement?e.value:e.innerText;throw new DOMException(`No copy source has the id "${t}".`,"NotFoundError")}});t([e({type:Boolean})],L.prototype,"disabled",void 0),t([e()],L.prototype,"value",void 0),t([e()],L.prototype,"for",void 0),t([e({type:Number})],L.prototype,"feedbackDuration",void 0),L=t([n("awc-clipboard-copy")],L);const ti=new Set;let I=class extends Qe{constructor(){super(...arguments),this.open=!1,this.hideOnOutsideClick=!0}hide(t){return this.opened&&this.nestedDialog?.hide(),super.hide(t)}handleClick(t){var e;this.hideOnOutsideClick&&!t.defaultPrevented&&(e=t.target)instanceof HTMLElement&&e===this.dialog&&((e=e.getBoundingClientRect()).top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width||this.requestHide())}handleKeydown(t){"Escape"===t.key&&t.stopPropagation()}handleCancel(t){t.cancelable&&(t.preventDefault(),this.requestHide())}handleClose(){this.dialog.open||this.hide()}hideWithoutEmitting(){this.dialog.open&&this.nestedDialog?.hideWithoutEmitting(),this.closeQuietly(),this.open=!1}openParts(){this.dialog.showModal(),this.hideOverflow()}closeParts(){this.dialog.open&&(this.nestedDialog?.closeQuietly(),this.dialog.close()),this.showOverflow()}hideOverflow(){this._scrollLockController=function(t,{abortSignal:e}={}){ti.add(t);var i,n=new AbortController,e=e||n.signal,s=window.innerWidth-document.documentElement.clientWidth;let o,r;return void 0===o&&0<s&&(i=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10),o=document.body.style.paddingRight,document.body.style.paddingRight=i+s+"px"),void 0===r&&(r=document.body.style.overflow,document.body.style.overflow="hidden"),e.addEventListener("abort",()=>{ti.delete(t),0===ti.size&&(void 0!==o&&(document.body.style.paddingRight=o,o=void 0),void 0!==r)&&(document.body.style.overflow=r,r=void 0)}),n}(this)}showOverflow(){this._scrollLockController?.abort()}get nestedDialog(){return this.querySelector(this.identifier)}};function ei(t){var e,i;e=t,(((i=i||{}).getShadowRoot?Ke([e],i.includeContainer,{filter:Fe.bind(null,i),flatten:!0,getShadowRoot:i.getShadowRoot}):qe(e,i.includeContainer,Fe.bind(null,i))).find(t=>t.hasAttribute("autofocus"))??function(t,e){t=(e=e||{}).getShadowRoot?Ke([t],e.includeContainer,{filter:Ve.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:De}):qe(t,e.includeContainer,Ve.bind(null,e));return Re(t)}(t)[0]??t).focus({preventScroll:!0})}function ii(){return"function"==typeof HTMLElement.prototype.showPopover}t([e({type:Boolean})],I.prototype,"open",void 0),t([e({type:Boolean})],I.prototype,"hideOnOutsideClick",void 0),t([s()],I.prototype,"dialog",void 0),I=t([n("awc-dialog")],I);let q=class extends Qe{constructor(){super(...arguments),this.open=!1,this.placement="bottom",this.strategy="fixed",this.opening=!1}connected(){const t=this.arrowPadding;this.floatingUI=Ue(this,()=>({anchorElement:this.button,floatingElement:this.panel,arrowElement:this.arrow,arrowPadding:t,placement:this.placement,strategy:this.strategy,offsetOptions:8,flipOptions:{fallbackAxisSideDirection:"end"}})),He(this,{boundaries:this.boundaries,callback:(t,e)=>{this.isClosedPopoverTrigger(e)||this.open&&!this.isAlsoOutsideParent(t,e)&&this.requestHide(t)}});{var[e,{boundaries:n,callback:s}]=[this,{boundaries:this.boundaries,callback:(t,e)=>{!this.open||this.opening||this.isAlsoOutsideParent(t,e)||this.requestHide(t)}}];const r=new AbortController;var o=r["signal"];const a=e=>n.some(t=>t?.contains(e));let i=null;document.addEventListener("pointerdown",t=>{t=t.target;i=a(t)?null:t},{capture:!0,signal:o}),document.addEventListener("click",()=>setTimeout(()=>i=null),{capture:!0,signal:o}),document.addEventListener("keydown",()=>i=null,{capture:!0,signal:o}),document.addEventListener("focusin",t=>{var e=t.target;a(e)||i&&e.contains(i)||s(t,e)},{capture:!0,signal:o}),je(e,()=>r.abort())}super.connected()}placementChanged(){this.reposition()}async toggle(t){this.opened?await this.requestHide(t):this.requestShow()}handleKeydown(t){var e;"Escape"!==t.key||(e=t.target.closest(this.identifier))!==this&&e?.open||this.open&&(t.preventDefault(),t.stopPropagation(),this.requestHide(t))}requestHide(t){var e;return t&&this.hideRequest?.event===t?this.hideRequest.done:(e=this.requestHideInnermostFirst(t),t&&(this.hideRequest={event:t,done:e}),e)}hide(t){if(this.opened)for(const e of this.nestedOpenPopovers)e.hide();return super.hide(t)}async reposition(){await this.floatingUI.update()}async requestHideInnermostFirst(t){if(this.opened){for(const e of this.nestedPopovers.reverse())if(await e.requestHide(t),e.opened)return;await super.requestHide(t)}}openParts({initial:t}){this.opening=!0;try{this.closeOtherPopovers();var e=document.activeElement;ii()&&this.panel.showPopover(),t?this.panel.contains(document.activeElement)&&((i=e)instanceof HTMLElement&&i!==document.body?i.focus({preventScroll:!0}):document.activeElement?.blur()):ei(this.panel)}finally{this.opening=!1}var i;this.button.setAttribute("aria-expanded","true"),this.floatingUI.start()}async closeParts(){var t,e,i=this.button,n=this.panel;n.isConnected&&(t=n,t=!(e=document.activeElement)||e===document.body||t.contains(e),ii()&&n.hidePopover(),t)&&i.focus(),await this.floatingUI.stop(),this.opened||i.setAttribute("aria-expanded","false")}othersAllowShow(){return this.otherOpenPopovers.every(t=>t.emitRequest("hide"))}closeOtherPopovers(){for(const t of this.otherOpenPopovers)t.hide()}isClosedPopoverTrigger(t){var e=t.closest(this.identifier);return!!e&&e!==this&&!e.open&&e.button.contains(t)}get otherOpenPopovers(){return Array.from(document.querySelectorAll(this.identifier)).filter(t=>t!==this&&!t.contains(this)&&t.open)}get nestedPopovers(){return Array.from(this.querySelectorAll(this.identifier))}get nestedOpenPopovers(){return this.nestedPopovers.filter(t=>t.open)}isAlsoOutsideParent(t,e){var i=this.parentElement?.closest(this.identifier);if(!i?.open)return!1;const n=t.composedPath();return!i.boundaries.some(t=>t.contains(e)||n.includes(t))}get arrowPadding(){var t=getComputedStyle(this.panel).borderRadius;return Number(t.replace(/[^-\d.]/g,""))||2}get boundaries(){return[this.button,this.panel]}};t([e({type:Boolean})],q.prototype,"open",void 0),t([e()],q.prototype,"placement",void 0),t([e()],q.prototype,"strategy",void 0),t([s()],q.prototype,"button",void 0),t([s()],q.prototype,"panel",void 0),t([s()],q.prototype,"arrow",void 0),q=t([n("awc-popover")],q)});