alchemy_cms 7.4.10 → 8.0.0.b
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.
Potentially problematic release.
This version of alchemy_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +16 -5
- data/app/assets/builds/alchemy/admin/page-select.css +1 -1
- data/app/assets/builds/alchemy/admin/print.css +1 -1
- data/app/assets/builds/alchemy/admin.css +2 -2
- data/app/assets/builds/alchemy/dark-theme.css +1 -0
- data/app/assets/builds/alchemy/light-theme.css +1 -0
- data/app/assets/builds/alchemy/theme.css +1 -0
- data/app/assets/builds/alchemy/welcome.css +1 -1
- data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css +1 -1
- data/app/assets/builds/tinymce/skins/content/alchemy-dark/content.min.css +1 -0
- data/app/assets/builds/tinymce/skins/ui/alchemy/content.min.css +1 -0
- data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css +1 -1
- data/app/assets/builds/tinymce/skins/ui/alchemy-dark/content.min.css +1 -0
- data/app/assets/builds/tinymce/skins/ui/alchemy-dark/skin.min.css +1 -0
- data/app/assets/config/alchemy_manifest.js +0 -2
- data/app/assets/images/alchemy/element_icons/default.svg +1 -0
- data/app/assets/images/alchemy/icons-sprite.svg +1 -0
- data/app/components/alchemy/admin/element_select.rb +39 -0
- data/app/components/alchemy/admin/resource/applied_filter.rb +29 -0
- data/app/components/alchemy/admin/resource/checkbox_filter.rb +36 -0
- data/app/components/alchemy/admin/resource/datepicker_filter.rb +42 -0
- data/app/components/alchemy/admin/resource/select_filter.rb +43 -0
- data/app/components/alchemy/admin/toolbar_button.rb +5 -2
- data/app/components/alchemy/ingredients/number_view.rb +18 -0
- data/app/controllers/alchemy/admin/attachments_controller.rb +10 -15
- data/app/controllers/alchemy/admin/clipboard_controller.rb +2 -6
- data/app/controllers/alchemy/admin/elements_controller.rb +3 -1
- data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +15 -15
- data/app/controllers/alchemy/admin/pictures_controller.rb +27 -37
- data/app/controllers/alchemy/admin/resources_controller.rb +16 -106
- data/app/controllers/alchemy/attachments_controller.rb +43 -14
- data/app/controllers/alchemy/messages_controller.rb +1 -1
- data/app/controllers/alchemy/pages_controller.rb +26 -4
- data/app/controllers/concerns/alchemy/admin/resource_filter.rb +93 -0
- data/app/decorators/alchemy/element_editor.rb +5 -48
- data/app/decorators/alchemy/ingredient_editor.rb +3 -53
- data/app/helpers/alchemy/admin/attachments_helper.rb +5 -5
- data/app/helpers/alchemy/admin/base_helper.rb +14 -84
- data/app/helpers/alchemy/admin/pages_helper.rb +1 -1
- data/app/helpers/alchemy/base_helper.rb +0 -30
- data/app/helpers/alchemy/elements_block_helper.rb +0 -14
- data/app/helpers/alchemy/pages_helper.rb +1 -1
- data/{lib → app/helpers}/alchemy/resources_helper.rb +5 -45
- data/app/javascript/alchemy_admin/components/action.js +2 -0
- data/app/javascript/alchemy_admin/components/alchemy_html_element.js +3 -3
- data/app/javascript/alchemy_admin/components/auto_submit.js +20 -0
- data/app/javascript/alchemy_admin/components/datepicker.js +18 -7
- data/app/javascript/alchemy_admin/components/element_editor/delete_element_button.js +8 -7
- data/app/javascript/alchemy_admin/components/element_editor.js +25 -15
- data/app/javascript/alchemy_admin/components/element_select.js +43 -0
- data/app/javascript/alchemy_admin/components/index.js +3 -0
- data/app/javascript/alchemy_admin/components/link_buttons.js +6 -2
- data/app/javascript/alchemy_admin/components/remote_select.js +9 -2
- data/app/javascript/alchemy_admin/components/tags_autocomplete.js +5 -1
- data/app/javascript/alchemy_admin/components/tinymce.js +93 -14
- data/app/javascript/alchemy_admin/components/update_check.js +42 -0
- data/app/javascript/alchemy_admin/components/uploader/file_upload.js +15 -8
- data/app/javascript/alchemy_admin/components/uploader/progress.js +12 -6
- data/app/javascript/alchemy_admin/components/uploader.js +4 -2
- data/app/javascript/alchemy_admin/confirm_dialog.js +27 -57
- data/app/javascript/alchemy_admin/dialog.js +1 -1
- data/app/javascript/alchemy_admin/dirty.js +3 -2
- data/app/javascript/alchemy_admin/file_editors.js +1 -1
- data/app/javascript/alchemy_admin/i18n.js +15 -16
- data/app/javascript/alchemy_admin/image_loader.js +4 -2
- data/app/javascript/alchemy_admin/initializer.js +1 -49
- data/app/javascript/alchemy_admin/picture_editors.js +7 -4
- data/app/javascript/alchemy_admin/picture_selector.js +4 -4
- data/app/javascript/alchemy_admin/utils/ajax.js +51 -44
- data/app/javascript/alchemy_admin.js +3 -8
- data/app/jobs/alchemy/delete_picture_job.rb +12 -0
- data/app/models/alchemy/admin/filters/base.rb +38 -0
- data/app/models/alchemy/admin/filters/checkbox.rb +24 -0
- data/app/models/alchemy/admin/filters/datepicker.rb +53 -0
- data/app/models/alchemy/admin/filters/select.rb +70 -0
- data/app/models/alchemy/admin/resource_name.rb +27 -0
- data/app/models/alchemy/attachment.rb +49 -44
- data/app/models/alchemy/base_record.rb +2 -0
- data/app/models/alchemy/element/definitions.rb +1 -1
- data/app/models/alchemy/element/element_ingredients.rb +6 -6
- data/app/models/alchemy/element/presenters.rb +3 -12
- data/app/models/alchemy/element.rb +10 -27
- data/app/models/alchemy/element_definition.rb +190 -0
- data/app/models/alchemy/ingredient.rb +10 -43
- data/app/models/alchemy/ingredient_definition.rb +134 -0
- data/app/models/alchemy/ingredient_validator.rb +7 -3
- data/app/models/alchemy/ingredients/number.rb +19 -0
- data/app/models/alchemy/language.rb +2 -21
- data/app/models/alchemy/message.rb +3 -7
- data/app/models/alchemy/node.rb +1 -1
- data/app/models/alchemy/page/{page_layouts.rb → definitions.rb} +12 -19
- data/app/models/alchemy/page/fixed_attributes.rb +1 -1
- data/app/models/alchemy/page/page_elements.rb +13 -14
- data/app/models/alchemy/page/page_naming.rb +3 -11
- data/app/models/alchemy/page/page_natures.rb +20 -15
- data/app/models/alchemy/page/page_scopes.rb +1 -1
- data/app/models/alchemy/page.rb +12 -39
- data/app/models/alchemy/page_definition.rb +115 -0
- data/app/models/alchemy/picture.rb +71 -99
- data/app/models/alchemy/picture_variant.rb +115 -5
- data/{lib → app/models}/alchemy/resource.rb +4 -18
- data/{lib → app/models}/alchemy/searchable_resource.rb +15 -0
- data/app/models/alchemy/site/layout.rb +5 -5
- data/app/models/alchemy/site.rb +1 -21
- data/app/models/alchemy/storage_adapter/active_storage/attachment_url.rb +41 -0
- data/app/models/alchemy/storage_adapter/active_storage/picture_url.rb +55 -0
- data/app/models/alchemy/storage_adapter/active_storage/preprocessor.rb +40 -0
- data/app/models/alchemy/storage_adapter/active_storage.rb +173 -0
- data/app/models/alchemy/{attachment/url.rb → storage_adapter/dragonfly/attachment_url.rb} +12 -12
- data/app/models/alchemy/storage_adapter/dragonfly/picture_url.rb +75 -0
- data/app/models/alchemy/{picture → storage_adapter/dragonfly}/preprocessor.rb +4 -4
- data/app/models/alchemy/storage_adapter/dragonfly.rb +205 -0
- data/app/models/alchemy/storage_adapter.rb +74 -0
- data/app/models/concerns/alchemy/picture_thumbnails.rb +19 -6
- data/app/models/concerns/alchemy/relatable_resource.rb +28 -0
- data/app/serializers/alchemy/element_serializer.rb +0 -1
- data/app/services/alchemy/dragonfly_to_image_processing.rb +100 -0
- data/app/stylesheets/alchemy/_custom-properties.scss +162 -0
- data/app/stylesheets/alchemy/_defaults.scss +3 -0
- data/app/stylesheets/alchemy/_extends.scss +69 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/_mixins.scss +40 -68
- data/app/stylesheets/alchemy/_themes.scss +540 -0
- data/app/stylesheets/alchemy/_variables.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/archive.scss +45 -42
- data/app/stylesheets/alchemy/admin/attachments.scss +17 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/base.scss +20 -15
- data/app/stylesheets/alchemy/admin/buttons.scss +135 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/clipboard.scss +2 -2
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/dashboard.scss +13 -16
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/dialogs.scss +33 -16
- data/app/stylesheets/alchemy/admin/element-select.scss +11 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/elements.scss +239 -133
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/errors.scss +5 -5
- data/app/stylesheets/alchemy/admin/filters.scss +57 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flatpickr.scss +54 -76
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/form_fields.scss +10 -11
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/forms.scss +28 -21
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/frame.scss +20 -18
- data/app/stylesheets/alchemy/admin/hints.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/icons.scss +1 -1
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/image_library.scss +21 -61
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/images.scss +1 -1
- data/app/stylesheets/alchemy/admin/labels.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/lists.scss +3 -3
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/navigation.scss +55 -59
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/node-select.scss +1 -10
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/nodes.scss +21 -18
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/notices.scss +20 -19
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/page-select.scss +18 -2
- data/app/stylesheets/alchemy/admin/pagination.scss +137 -0
- data/app/stylesheets/alchemy/admin/preview_window.scss +46 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/print.scss +1 -1
- data/app/stylesheets/alchemy/admin/resource_info.scss +148 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/search.scss +10 -7
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/selects.scss +85 -46
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/shoelace.scss +37 -68
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/sitemap.scss +39 -34
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/tables.scss +9 -7
- data/app/stylesheets/alchemy/admin/tags.scss +143 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/toolbar.scss +6 -6
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/typography.scss +3 -6
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/upload.scss +7 -5
- data/app/stylesheets/alchemy/admin.scss +44 -0
- data/app/stylesheets/alchemy/dark-theme.scss +5 -0
- data/app/stylesheets/alchemy/light-theme.scss +6 -0
- data/app/stylesheets/alchemy/theme.scss +13 -0
- data/app/stylesheets/alchemy/welcome.scss +75 -0
- data/app/stylesheets/tinymce/skins/content/alchemy/content.scss +69 -0
- data/app/{assets/stylesheets/tinymce/skins/content/alchemy → stylesheets/tinymce/skins/content/alchemy-dark}/content.scss +12 -12
- data/app/stylesheets/tinymce/skins/ui/alchemy/content.scss +1 -0
- data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/skin.scss +158 -176
- data/app/stylesheets/tinymce/skins/ui/alchemy-dark/content.scss +1 -0
- data/app/stylesheets/tinymce/skins/ui/alchemy-dark/skin.scss +3784 -0
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +22 -12
- data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/assign.js.erb +4 -3
- data/app/views/alchemy/admin/attachments/show.html.erb +55 -43
- data/app/views/alchemy/admin/{elements/_clipboard_button.html.erb → clipboard/_button.html.erb} +3 -5
- data/app/views/alchemy/admin/clipboard/_update_nested_element_button.turbo_stream.erb +11 -0
- data/app/views/alchemy/admin/clipboard/clear.turbo_stream.erb +4 -0
- data/app/views/alchemy/admin/clipboard/index.html.erb +15 -13
- data/app/views/alchemy/admin/clipboard/insert.turbo_stream.erb +18 -0
- data/app/views/alchemy/admin/clipboard/remove.turbo_stream.erb +9 -0
- data/app/views/alchemy/admin/crop.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/info.html.erb +17 -31
- data/app/views/alchemy/admin/elements/_element.html.erb +4 -8
- data/app/views/alchemy/admin/elements/_form.html.erb +9 -9
- data/app/views/alchemy/admin/elements/_header.html.erb +5 -1
- data/app/views/alchemy/admin/elements/_toolbar.html.erb +4 -6
- data/app/views/alchemy/admin/elements/create.turbo_stream.erb +2 -1
- data/app/views/alchemy/admin/elements/index.html.erb +2 -2
- data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +3 -16
- data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +0 -9
- data/app/views/alchemy/admin/languages/_form.html.erb +1 -1
- data/app/views/alchemy/admin/languages/_table.html.erb +1 -1
- data/app/views/alchemy/admin/languages/index.html.erb +5 -2
- data/app/views/alchemy/admin/layoutpages/index.html.erb +1 -12
- data/app/views/alchemy/admin/pages/_form.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_page.html.erb +2 -3
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +1 -15
- data/app/views/alchemy/admin/pages/index.html.erb +1 -1
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +9 -12
- data/app/views/alchemy/admin/partials/_search_form.html.erb +4 -9
- data/app/views/alchemy/admin/pictures/_archive.html.erb +16 -29
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +3 -7
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_form.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_infos.html.erb +21 -52
- data/app/views/alchemy/admin/pictures/_library_sidebar.html.erb +7 -0
- data/app/views/alchemy/admin/pictures/_picture.html.erb +14 -20
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +20 -16
- data/app/views/alchemy/admin/pictures/_sorting_select.html.erb +13 -0
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +1 -6
- data/app/views/alchemy/admin/pictures/index.html.erb +5 -19
- data/app/views/alchemy/admin/pictures/show.html.erb +10 -5
- data/app/views/alchemy/admin/resources/_applied_filters.html.erb +8 -0
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +5 -25
- data/app/views/alchemy/admin/resources/_pagination.html.erb +6 -0
- data/app/views/alchemy/admin/resources/_per_page_select.html.erb +4 -2
- data/app/views/alchemy/admin/resources/_resource_table.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_resource_usage_info.html.erb +36 -0
- data/app/views/alchemy/admin/resources/_table_header.html.erb +1 -15
- data/app/views/alchemy/admin/sites/index.html.erb +5 -1
- data/app/views/alchemy/admin/styleguide/index.html.erb +118 -58
- data/app/views/alchemy/admin/tags/index.html.erb +1 -1
- data/app/views/alchemy/admin/tinymce/_setup.html.erb +7 -7
- data/app/{javascript/alchemy_admin/locales/en.js → views/alchemy/admin/translations/_en.js} +5 -2
- data/app/views/alchemy/admin/uploader/_button.html.erb +1 -1
- data/app/views/alchemy/admin/uploader/_setup.html.erb +4 -4
- data/app/views/alchemy/base/error_notice.html.erb +1 -1
- data/app/views/alchemy/ingredients/_number_editor.html.erb +24 -0
- data/app/views/alchemy/no_index.html.erb +31 -0
- data/app/views/alchemy/welcome.html.erb +12 -10
- data/app/views/kaminari/alchemy/_first_page.html.erb +5 -3
- data/app/views/kaminari/alchemy/_last_page.html.erb +5 -3
- data/app/views/kaminari/alchemy/_next_page.html.erb +5 -3
- data/app/views/kaminari/alchemy/_paginator.html.erb +18 -13
- data/app/views/kaminari/alchemy/_prev_page.html.erb +5 -3
- data/app/views/layouts/alchemy/admin.html.erb +25 -24
- data/config/alchemy/config.yml +3 -2
- data/config/initializers/dragonfly.rb +0 -1
- data/config/initializers/mime_types.rb +1 -0
- data/config/locales/alchemy.en.yml +57 -21
- data/config/routes.rb +0 -2
- data/db/migrate/20250905140323_add_created_at_index_to_pictures_and_attachments.rb +14 -0
- data/lib/alchemy/admin/preview_url.rb +4 -5
- data/lib/alchemy/cache_digests/template_tracker.rb +6 -9
- data/lib/alchemy/config_missing.rb +14 -0
- data/lib/alchemy/configuration/base_option.rb +24 -0
- data/lib/alchemy/configuration/boolean_option.rb +16 -0
- data/lib/alchemy/configuration/class_option.rb +15 -0
- data/lib/alchemy/configuration/class_set_option.rb +46 -0
- data/lib/alchemy/configuration/integer_list_option.rb +13 -0
- data/lib/alchemy/configuration/integer_option.rb +12 -0
- data/lib/alchemy/configuration/list_option.rb +22 -0
- data/lib/alchemy/configuration/regexp_option.rb +11 -0
- data/lib/alchemy/configuration/string_list_option.rb +13 -0
- data/lib/alchemy/configuration/string_option.rb +11 -0
- data/lib/alchemy/configuration.rb +115 -0
- data/lib/alchemy/configuration_methods.rb +3 -1
- data/lib/alchemy/configurations/default_language.rb +12 -0
- data/lib/alchemy/configurations/default_site.rb +10 -0
- data/lib/alchemy/configurations/format_matchers.rb +11 -0
- data/lib/alchemy/configurations/mailer.rb +16 -0
- data/lib/alchemy/configurations/main.rb +223 -0
- data/lib/alchemy/configurations/page_cache.rb +19 -0
- data/lib/alchemy/configurations/preview.rb +32 -0
- data/lib/alchemy/configurations/sitemap.rb +10 -0
- data/lib/alchemy/configurations/uploader.rb +34 -0
- data/lib/alchemy/engine.rb +81 -24
- data/lib/alchemy/hints.rb +3 -7
- data/lib/alchemy/install/tasks.rb +0 -12
- data/lib/alchemy/on_page_layout.rb +2 -2
- data/lib/alchemy/propshaft/tinymce_asset.rb +15 -0
- data/lib/alchemy/seeder.rb +2 -2
- data/lib/alchemy/tasks/tidy.rb +18 -0
- data/lib/alchemy/tasks/usage.rb +4 -4
- data/lib/alchemy/test_support/config_stubbing.rb +1 -7
- data/lib/alchemy/test_support/factories/attachment_factory.rb +13 -2
- data/lib/alchemy/test_support/factories/language_factory.rb +1 -1
- data/lib/alchemy/test_support/factories/page_factory.rb +2 -3
- data/lib/alchemy/test_support/factories/picture_factory.rb +31 -2
- data/lib/alchemy/test_support/factories/site_factory.rb +2 -2
- data/lib/alchemy/test_support/having_crop_action_examples.rb +2 -2
- data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +80 -26
- data/lib/alchemy/test_support/relatable_resource_examples.rb +58 -0
- data/lib/alchemy/test_support/shared_ingredient_examples.rb +5 -5
- data/lib/alchemy/tinymce.rb +0 -1
- data/lib/alchemy/upgrader/eight_zero.rb +14 -0
- data/lib/alchemy/upgrader.rb +33 -20
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy.rb +185 -172
- data/lib/alchemy_cms.rb +1 -7
- data/lib/generators/alchemy/ingredient/ingredient_generator.rb +0 -3
- data/lib/generators/alchemy/install/files/_article.html.erb +6 -4
- data/lib/generators/alchemy/install/files/alchemy.en.yml +22 -3
- data/lib/generators/alchemy/install/files/application.html.erb +5 -0
- data/lib/generators/alchemy/install/install_generator.rb +25 -23
- data/lib/generators/alchemy/install/templates/alchemy.rb.tt +200 -0
- data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +0 -1
- data/lib/generators/alchemy/install/templates/elements.yml.tt +3 -1
- data/lib/generators/alchemy/install/templates/menus.yml.tt +1 -1
- data/lib/generators/alchemy/install/templates/page_layouts.yml.tt +2 -2
- data/lib/generators/alchemy/page_layouts/page_layouts_generator.rb +2 -2
- data/lib/tasks/alchemy/assets.rake +14 -0
- data/lib/tasks/alchemy/tidy.rake +6 -0
- data/lib/tasks/alchemy/upgrade.rake +12 -47
- data/vendor/assets/stylesheets/tinymce/skins/content/dark/content.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/content/default/content.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/ui/oxide/skin.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- data/vendor/javascript/clipboard.min.js +1 -1
- data/vendor/javascript/cropperjs.min.js +1 -1
- data/vendor/javascript/handlebars.min.js +3 -3
- data/vendor/javascript/jquery.min.js +1 -1
- data/vendor/javascript/select2.min.js +3 -3
- data/vendor/javascript/shoelace.min.js +92 -76
- data/vendor/javascript/sortable.min.js +2 -2
- data/vendor/javascript/tinymce.min.js +1 -1
- data/vendor/javascript/ungap-custom-elements.min.js +2 -2
- metadata +223 -208
- data/CHANGELOG.md +0 -2041
- data/CODE_OF_CONDUCT.md +0 -13
- data/CONTRIBUTING.md +0 -73
- data/Gemfile +0 -71
- data/Rakefile +0 -102
- data/SECURITY.md +0 -13
- data/alchemy_cms.gemspec +0 -88
- data/app/assets/builds/alchemy/admin/page-select.css.map +0 -1
- data/app/assets/builds/alchemy/admin/print.css.map +0 -1
- data/app/assets/builds/alchemy/admin.css.map +0 -1
- data/app/assets/builds/alchemy/custom-properties.css +0 -1
- data/app/assets/builds/alchemy/custom-properties.css.map +0 -1
- data/app/assets/builds/alchemy/welcome.css.map +0 -1
- data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css.map +0 -1
- data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css.map +0 -1
- data/app/assets/javascripts/alchemy/admin.js +0 -10
- data/app/assets/stylesheets/alchemy/_defaults.scss +0 -3
- data/app/assets/stylesheets/alchemy/_deprecated_variables.scss +0 -45
- data/app/assets/stylesheets/alchemy/_deprecation.scss +0 -17
- data/app/assets/stylesheets/alchemy/_extends.scss +0 -62
- data/app/assets/stylesheets/alchemy/_variables.scss +0 -201
- data/app/assets/stylesheets/alchemy/admin/attachments.scss +0 -40
- data/app/assets/stylesheets/alchemy/admin/buttons.scss +0 -123
- data/app/assets/stylesheets/alchemy/admin/hints.scss +0 -5
- data/app/assets/stylesheets/alchemy/admin/labels.scss +0 -3
- data/app/assets/stylesheets/alchemy/admin/pagination.scss +0 -92
- data/app/assets/stylesheets/alchemy/admin/preview_window.scss +0 -33
- data/app/assets/stylesheets/alchemy/admin/resource_info.scss +0 -42
- data/app/assets/stylesheets/alchemy/admin/tags.scss +0 -158
- data/app/assets/stylesheets/alchemy/admin.scss +0 -42
- data/app/assets/stylesheets/alchemy/custom-properties.css +0 -98
- data/app/assets/stylesheets/alchemy/welcome.scss +0 -57
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.css +0 -711
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.css +0 -705
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.min.css +0 -7
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.min.css +0 -7
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.css +0 -29
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.min.css +0 -7
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.css +0 -677
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.min.css +0 -7
- data/app/controllers/alchemy/elements_controller.rb +0 -32
- data/app/helpers/alchemy/admin/elements_helper.rb +0 -25
- data/app/models/alchemy/element/dom_id.rb +0 -31
- data/app/models/alchemy/picture/calculations.rb +0 -49
- data/app/models/alchemy/picture/transformations.rb +0 -115
- data/app/models/alchemy/picture/url.rb +0 -54
- data/app/views/alchemy/admin/attachments/destroy.js.erb +0 -1
- data/app/views/alchemy/admin/clipboard/clear.js.erb +0 -3
- data/app/views/alchemy/admin/clipboard/insert.js.erb +0 -29
- data/app/views/alchemy/admin/clipboard/remove.js.erb +0 -10
- data/app/views/alchemy/admin/resources/_filter.html.erb +0 -12
- data/app/views/alchemy/admin/resources/_resource.html.erb +0 -34
- data/app/views/alchemy/admin/resources/_table.html.erb +0 -29
- data/app/views/alchemy/elements/show.html.erb +0 -1
- data/app/views/alchemy/elements/show.js.erb +0 -1
- data/app/views/alchemy/ingredients/_audio_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_boolean_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_datetime_view.html.erb +0 -3
- data/app/views/alchemy/ingredients/_file_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_headline_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_html_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_link_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_node_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_page_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_picture_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_richtext_view.html.erb +0 -3
- data/app/views/alchemy/ingredients/_select_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_text_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_video_view.html.erb +0 -3
- data/babel.config.js +0 -12
- data/bin/importmap +0 -4
- data/bin/rails +0 -9
- data/bin/rspec +0 -3
- data/bin/setup +0 -30
- data/bin/start +0 -17
- data/bun.lockb +0 -0
- data/bundles/shoelace.js +0 -12
- data/bundles/tinymce.js +0 -22
- data/config/initializers/assets.rb +0 -4
- data/eslint.config.js +0 -17
- data/lib/alchemy/config.rb +0 -114
- data/lib/alchemy/element_definition.rb +0 -73
- data/lib/alchemy/page_layout.rb +0 -73
- data/lib/alchemy/resource_filter.rb +0 -40
- data/lib/alchemy/upgrader/seven_point_four.rb +0 -26
- data/lib/alchemy/upgrader/seven_point_three.rb +0 -52
- data/lib/alchemy/upgrader/tasks/.keep +0 -0
- data/lib/generators/alchemy/ingredient/templates/view.html.erb +0 -1
- data/lib/generators/alchemy/install/files/alchemy_admin.js +0 -1
- data/lib/generators/alchemy/install/files/all.js +0 -11
- data/lib/generators/alchemy/install/files/article.css +0 -25
- data/rollup.config.mjs +0 -108
- data/vendor/assets/images/remixicon.symbol.svg +0 -11
- /data/app/{assets/stylesheets → stylesheets}/alchemy/_fonts.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/attachment-select.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flash.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/list_filter.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/spinner.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/tinymce/skins/skintool.json +0 -0
- /data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/fonts/tinymce-mobile.woff +0 -0
@@ -1,26 +1,25 @@
|
|
1
|
-
var t=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,a=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),l=(e,o,i)=>o in e?t(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i,
|
1
|
+
var t=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,a=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),l=t=>{throw TypeError(t)},c=(e,o,i)=>o in e?t(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i,h=(t,e)=>{for(var o in e||(e={}))r.call(e,o)&&c(t,o,e[o]);if(s)for(var o of s(e))n.call(e,o)&&c(t,o,e[o]);return t},d=(t,o)=>e(t,i(o)),p=(e,i,s,r)=>{for(var n,a=r>1?void 0:r?o(i,s):i,l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r?n(i,s,a):n(a))||a);return r&&a&&t(i,s,a),a},u=(t,e,o)=>e.has(t)||l("Cannot "+o),f=function(t,e){this[0]=t,this[1]=e},b=t=>{var e,o=t[a("asyncIterator")],i=!1,s={};return null==o?(o=t[a("iterator")](),e=t=>s[t]=e=>o[t](e)):(o=o.call(t),e=t=>s[t]=e=>{if(i){if(i=!1,"throw"===t)throw e;return e}return i=!0,{done:!1,value:new f(new Promise((i=>{var s=o[t](e);s instanceof Object||l("Object expected"),i(s)})),1)}}),s[a("iterator")]=()=>s,e("next"),"throw"in o?e("throw"):s.throw=t=>{throw t},"return"in o&&e("return"),s},m=new Map,g=new WeakMap;function v(t,e){return"rtl"===e.toLowerCase()?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function y(t,e){m.set(t,function(t){return null!=t?t:{keyframes:[],options:{duration:0}}}(e))}function w(t,e,o){const i=g.get(t);if(null==i?void 0:i[e])return v(i[e],o.dir);const s=m.get(e);return s?v(s,o.dir):{keyframes:[],options:{duration:0}}}
|
2
2
|
/**
|
3
3
|
* @license
|
4
4
|
* Copyright 2019 Google LLC
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
6
|
-
*/const
|
6
|
+
*/const _=globalThis,x=_.ShadowRoot&&(void 0===_.ShadyCSS||_.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$=Symbol(),k=new WeakMap;let C=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==$)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(x&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=k.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&k.set(e,t))}return t}toString(){return this.cssText}};const A=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1]),t[0]);return new C(o,t,$)},E=x?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new C("string"==typeof t?t:t+"",void 0,$))(e)})(t):t
|
7
7
|
/**
|
8
8
|
* @license
|
9
9
|
* Copyright 2017 Google LLC
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
11
|
-
*/,{is:
|
11
|
+
*/,{is:S,defineProperty:z,getOwnPropertyDescriptor:T,getOwnPropertyNames:P,getOwnPropertySymbols:L,getPrototypeOf:O}=Object,F=globalThis,R=F.trustedTypes,D=R?R.emptyScript:"",M=F.reactiveElementPolyfillSupport,B=(t,e)=>t,N={toAttribute(t,e){switch(e){case Boolean:t=t?D:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},H=(t,e)=>!S(t,e),U={attribute:!0,type:String,converter:N,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),F.litPropertyMetadata??=new WeakMap;let I=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=U){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&z(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:s}=T(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const r=i?.call(this);s?.call(this,e),this.requestUpdate(t,r,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??U}static _$Ei(){if(this.hasOwnProperty(B("elementProperties")))return;const t=O(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(B("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(B("properties"))){const t=this.properties,e=[...P(t),...L(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const o=this._$Eu(t,e);void 0!==o&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(E(t))}else void 0!==t&&e.push(E(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(x)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of e){const e=document.createElement("style"),i=_.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const s=(void 0!==o.converter?.toAttribute?o.converter:N).toAttribute(e,o.type);this._$Em=t,null==s?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:N;this._$Em=i;const r=s.fromAttribute(e,t.type);this[i]=r??this._$Ej?.get(i)??r,this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){const i=this.constructor,s=this[t];if(o??=i.getPropertyOptions(t),!((o.hasChanged??H)(s,e)||o.useDefault&&o.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:i,wrapped:s},r){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),!0!==s||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t){const{wrapped:t}=o,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,o,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};I.elementStyles=[],I.shadowRootOptions={mode:"open"},I[B("elementProperties")]=new Map,I[B("finalized")]=new Map,M?.({ReactiveElement:I}),(F.reactiveElementVersions??=[]).push("2.1.1");
|
12
12
|
/**
|
13
13
|
* @license
|
14
14
|
* Copyright 2017 Google LLC
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
16
16
|
*/
|
17
|
-
const
|
17
|
+
const V=globalThis,W=V.trustedTypes,j=W?W.createPolicy("lit-html",{createHTML:t=>t}):void 0,q="$lit$",K=`lit$${Math.random().toFixed(9).slice(2)}$`,Z="?"+K,G=`<${Z}>`,X=document,Y=()=>X.createComment(""),J=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Q=Array.isArray,tt="[ \t\n\f\r]",et=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ot=/-->/g,it=/>/g,st=RegExp(`>|${tt}(?:([^\\s"'>=/]+)(${tt}*=${tt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),rt=/'/g,nt=/"/g,at=/^(?:script|style|textarea|title)$/i,lt=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),ct=Symbol.for("lit-noChange"),ht=Symbol.for("lit-nothing"),dt=new WeakMap,pt=X.createTreeWalker(X,129);function ut(t,e){if(!Q(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==j?j.createHTML(e):e}const ft=(t,e)=>{const o=t.length-1,i=[];let s,r=2===e?"<svg>":3===e?"<math>":"",n=et;for(let e=0;e<o;e++){const o=t[e];let a,l,c=-1,h=0;for(;h<o.length&&(n.lastIndex=h,l=n.exec(o),null!==l);)h=n.lastIndex,n===et?"!--"===l[1]?n=ot:void 0!==l[1]?n=it:void 0!==l[2]?(at.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=st):void 0!==l[3]&&(n=st):n===st?">"===l[0]?(n=s??et,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?st:'"'===l[3]?nt:rt):n===nt||n===rt?n=st:n===ot||n===it?n=et:(n=st,s=void 0);const d=n===st&&t[e+1].startsWith("/>")?" ":"";r+=n===et?o+G:c>=0?(i.push(a),o.slice(0,c)+q+o.slice(c)+K+d):o+K+(-2===c?e:d)}return[ut(t,r+(t[o]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class bt{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,c]=ft(t,e);if(this.el=bt.createElement(l,o),pt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=pt.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(q)){const e=c[r++],o=i.getAttribute(t).split(K),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:n[2],strings:o,ctor:"."===n[1]?wt:"?"===n[1]?_t:"@"===n[1]?xt:yt}),i.removeAttribute(t)}else t.startsWith(K)&&(a.push({type:6,index:s}),i.removeAttribute(t));if(at.test(i.tagName)){const t=i.textContent.split(K),e=t.length-1;if(e>0){i.textContent=W?W.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],Y()),pt.nextNode(),a.push({type:2,index:++s});i.append(t[e],Y())}}}else if(8===i.nodeType)if(i.data===Z)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(K,t+1));)a.push({type:7,index:s}),t+=K.length-1}s++}}static createElement(t,e){const o=X.createElement("template");return o.innerHTML=t,o}}function mt(t,e,o=t,i){if(e===ct)return e;let s=void 0!==i?o._$Co?.[i]:o._$Cl;const r=J(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),void 0===r?s=void 0:(s=new r(t),s._$AT(t,o,i)),void 0!==i?(o._$Co??=[])[i]=s:o._$Cl=s),void 0!==s&&(e=mt(t,s._$AS(t,e.values),s,i)),e}class gt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=(t?.creationScope??X).importNode(e,!0);pt.currentNode=i;let s=pt.nextNode(),r=0,n=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new vt(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new $t(s,this,t)),this._$AV.push(e),a=o[++n]}r!==a?.index&&(s=pt.nextNode(),r++)}return pt.currentNode=X,i}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class vt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,i){this.type=2,this._$AH=ht,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=mt(this,t,e),J(t)?t===ht||null==t||""===t?(this._$AH!==ht&&this._$AR(),this._$AH=ht):t!==this._$AH&&t!==ct&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>Q(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==ht&&J(this._$AH)?this._$AA.nextSibling.data=t:this.T(X.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=bt.createElement(ut(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new gt(i,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=dt.get(t.strings);return void 0===e&&dt.set(t.strings,e=new bt(t)),e}k(t){Q(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new vt(this.O(Y()),this.O(Y()),this,this.options)):o=e[i],o._$AI(s),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class yt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,s){this.type=1,this._$AH=ht,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=ht}_$AI(t,e=this,o,i){const s=this.strings;let r=!1;if(void 0===s)t=mt(this,t,e,0),r=!J(t)||t!==this._$AH&&t!==ct,r&&(this._$AH=t);else{const i=t;let n,a;for(t=s[0],n=0;n<s.length-1;n++)a=mt(this,i[o+n],e,n),a===ct&&(a=this._$AH[n]),r||=!J(a)||a!==this._$AH[n],a===ht?t=ht:t!==ht&&(t+=(a??"")+s[n+1]),this._$AH[n]=a}r&&!i&&this.j(t)}j(t){t===ht?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class wt extends yt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ht?void 0:t}}class _t extends yt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==ht)}}class xt extends yt{constructor(t,e,o,i,s){super(t,e,o,i,s),this.type=5}_$AI(t,e=this){if((t=mt(this,t,e,0)??ht)===ct)return;const o=this._$AH,i=t===ht&&o!==ht||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==ht&&(o===ht||i);i&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class $t{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){mt(this,t)}}const kt=V.litHtmlPolyfillSupport;kt?.(bt,vt),(V.litHtmlVersions??=[]).push("3.3.1");const Ct=globalThis;
|
18
18
|
/**
|
19
19
|
* @license
|
20
20
|
* Copyright 2017 Google LLC
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
22
|
-
*/
|
23
|
-
class xt extends U{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=((t,e,o)=>{const i=o?.renderBefore??e;let s=i._$litPart$;if(void 0===s){const t=o?.renderBefore??null;i._$litPart$=s=new mt(e.insertBefore(G(),t),t,void 0,o??{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return at}}xt._$litElement$=!0,xt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:xt});const $t=globalThis.litElementPolyfillSupport;$t?.({LitElement:xt}),(globalThis.litElementVersions??=[]).push("4.1.0");var kt=k`
|
22
|
+
*/let At=class extends I{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{const i=o?.renderBefore??e;let s=i._$litPart$;if(void 0===s){const t=o?.renderBefore??null;i._$litPart$=s=new vt(e.insertBefore(Y(),t),t,void 0,o??{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ct}};At._$litElement$=!0,At.finalized=!0,Ct.litElementHydrateSupport?.({LitElement:At});const Et=Ct.litElementPolyfillSupport;Et?.({LitElement:At}),(Ct.litElementVersions??=[]).push("4.2.1");var St=A`
|
24
23
|
:host {
|
25
24
|
display: inline-block;
|
26
25
|
}
|
@@ -185,7 +184,7 @@ class xt extends U{constructor(){super(...arguments),this.renderOptions={host:th
|
|
185
184
|
background-color: ButtonText;
|
186
185
|
}
|
187
186
|
}
|
188
|
-
`,
|
187
|
+
`,zt=A`
|
189
188
|
.form-control .form-control__label {
|
190
189
|
display: none;
|
191
190
|
}
|
@@ -241,7 +240,7 @@ class xt extends U{constructor(){super(...arguments),this.renderOptions={host:th
|
|
241
240
|
.form-control--has-help-text.form-control--radio-group .form-control__help-text {
|
242
241
|
margin-top: var(--sl-spacing-2x-small);
|
243
242
|
}
|
244
|
-
`,
|
243
|
+
`,Tt=new WeakMap,Pt=new WeakMap,Lt=new WeakMap,Ot=new WeakSet,Ft=new WeakMap,Rt=class{constructor(t,e){this.handleFormData=t=>{const e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),s="sl-button"===this.host.tagName.toLowerCase();this.host.isConnected&&!e&&!s&&"string"==typeof o&&o.length>0&&void 0!==i&&(Array.isArray(i)?i.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,i.toString()))},this.handleFormSubmit=t=>{var e;const o=this.options.disabled(this.host),i=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=Tt.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),!this.form||this.form.noValidate||o||i(this.host)||(t.preventDefault(),t.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Ft.set(this.host,[])},this.handleInteraction=t=>{const e=Ft.get(this.host);e.includes(t.type)||e.push(t.type),e.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.checkFormValidity=()=>{if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.checkValidity&&!e.checkValidity())return!1}return!0},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.reportValidity&&!e.reportValidity())return!1}return!0},(this.host=t).addController(this),this.options=h({form:t=>{const e=t.form;if(e){const o=t.getRootNode().querySelector(`#${e}`);if(o)return o}return t.closest("form")},name:t=>t.name,value:t=>t.value,defaultValue:t=>t.defaultValue,disabled:t=>{var e;return null!=(e=t.disabled)&&e},reportValidity:t=>"function"!=typeof t.reportValidity||t.reportValidity(),checkValidity:t=>"function"!=typeof t.checkValidity||t.checkValidity(),setValue:(t,e)=>t.value=e,assumeInteractionOn:["sl-input"]},e)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),Ft.set(this.host,[]),this.options.assumeInteractionOn.forEach((t=>{this.host.addEventListener(t,this.handleInteraction)}))}hostDisconnected(){this.detachForm(),Ft.delete(this.host),this.options.assumeInteractionOn.forEach((t=>{this.host.removeEventListener(t,this.handleInteraction)}))}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(t){t?(this.form=t,Tt.has(this.form)?Tt.get(this.form).add(this.host):Tt.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),Pt.has(this.form)||(Pt.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Lt.has(this.form)||(Lt.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=Tt.get(this.form);t&&(t.delete(this.host),t.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),Pt.has(this.form)&&(this.form.reportValidity=Pt.get(this.form),Pt.delete(this.form)),Lt.has(this.form)&&(this.form.checkValidity=Lt.get(this.form),Lt.delete(this.form)),this.form=void 0))}setUserInteracted(t,e){e?Ot.add(t):Ot.delete(t),t.requestUpdate()}doAction(t,e){if(this.form){const o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach((t=>{e.hasAttribute(t)&&o.setAttribute(t,e.getAttribute(t))}))),this.form.append(o),o.click(),o.remove()}}getForm(){var t;return null!=(t=this.form)?t:null}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){const e=this.host,o=Boolean(Ot.has(e)),i=Boolean(e.required);e.toggleAttribute("data-required",i),e.toggleAttribute("data-optional",!i),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o)}updateValidity(){const t=this.host;this.setValidity(t.validity.valid)}emitInvalidEvent(t){const e=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault(),this.host.dispatchEvent(e)||null==t||t.preventDefault()}},Dt=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1});Object.freeze(d(h({},Dt),{valid:!1,valueMissing:!0})),Object.freeze(d(h({},Dt),{valid:!1,customError:!0}));var Mt=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=t=>{const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some((t=>{if(t.nodeType===t.TEXT_NODE&&""!==t.textContent.trim())return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if("sl-visually-hidden"===e.tagName.toLowerCase())return!1;if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(t){return null!==this.host.querySelector(`:scope > [slot="${t}"]`)}test(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};function Bt(t,e){const o=h({waitUntilFirstUpdate:!1},e);return(e,i)=>{const{update:s}=e,r=Array.isArray(t)?t:[t];e.update=function(t){r.forEach((e=>{const s=e;if(t.has(s)){const e=t.get(s),r=this[s];e!==r&&(o.waitUntilFirstUpdate&&!this.hasUpdated||this[i](e,r))}})),s.call(this,t)}}}var Nt=A`
|
245
244
|
:host {
|
246
245
|
box-sizing: border-box;
|
247
246
|
}
|
@@ -260,12 +259,12 @@ class xt extends U{constructor(){super(...arguments),this.renderOptions={host:th
|
|
260
259
|
* @license
|
261
260
|
* Copyright 2017 Google LLC
|
262
261
|
* SPDX-License-Identifier: BSD-3-Clause
|
263
|
-
*/;const
|
262
|
+
*/;const Ht={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:H},Ut=(t=Ht,e,o)=>{const{kind:i,metadata:s}=o;let r=globalThis.litPropertyMetadata.get(s);if(void 0===r&&globalThis.litPropertyMetadata.set(s,r=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),r.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const s=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,s,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=o;return function(o){const s=this[i];e.call(this,o),this.requestUpdate(i,s,t)}}throw Error("Unsupported decorator location: "+i)};function It(t){return(e,o)=>"object"==typeof o?Ut(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)
|
264
263
|
/**
|
265
264
|
* @license
|
266
265
|
* Copyright 2017 Google LLC
|
267
266
|
* SPDX-License-Identifier: BSD-3-Clause
|
268
|
-
*/}function
|
267
|
+
*/}function Vt(t){return It({...t,state:!0,attribute:!1})}
|
269
268
|
/**
|
270
269
|
* @license
|
271
270
|
* Copyright 2017 Google LLC
|
@@ -276,23 +275,23 @@ class xt extends U{constructor(){super(...arguments),this.renderOptions={host:th
|
|
276
275
|
* Copyright 2017 Google LLC
|
277
276
|
* SPDX-License-Identifier: BSD-3-Clause
|
278
277
|
*/
|
279
|
-
function
|
278
|
+
function Wt(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o))(e,o,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}var jt,qt=class extends At{constructor(){var t,e,o;super(),t=this,o=!1,(e=jt).has(t)?l("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}emit(t,e){const o=new CustomEvent(t,h({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const i=customElements.get(t);if(!i){try{customElements.define(t,e,o)}catch(i){customElements.define(t,class extends e{},o)}return}let s=" (unknown version)",r=s;"version"in e&&e.version&&(s=" v"+e.version),"version"in i&&i.version&&(r=" v"+i.version),s&&r&&s===r||console.warn(`Attempted to register <${t}>${s}, but <${t}>${r} has already been registered.`)}attributeChangedCallback(t,e,o){var i,s;u(i=this,s=jt,"read from private field"),s.get(i)||(this.constructor.elementProperties.forEach(((t,e)=>{t.reflect&&null!=this[e]&&this.initialReflectedProperties.set(e,this[e])})),((t,e,o)=>{u(t,e,"write to private field"),e.set(t,o)})(this,jt,!0)),super.attributeChangedCallback(t,e,o)}willUpdate(t){super.willUpdate(t),this.initialReflectedProperties.forEach(((e,o)=>{t.has(o)&&null==this[o]&&(this[o]=e)}))}};jt=new WeakMap,qt.version="2.20.1",qt.dependencies={},p([It()],qt.prototype,"dir",2),p([It()],qt.prototype,"lang",2);
|
280
279
|
/**
|
281
280
|
* @license
|
282
281
|
* Copyright 2017 Google LLC
|
283
282
|
* SPDX-License-Identifier: BSD-3-Clause
|
284
283
|
*/
|
285
|
-
const
|
284
|
+
const Kt=1,Zt=3,Gt=4,Xt=t=>(...e)=>({_$litDirective$:t,values:e});let Yt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
|
286
285
|
/**
|
287
286
|
* @license
|
288
287
|
* Copyright 2018 Google LLC
|
289
288
|
* SPDX-License-Identifier: BSD-3-Clause
|
290
|
-
*/const
|
289
|
+
*/const Jt=Xt(class extends Yt{constructor(t){if(super(t),t.type!==Kt||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.st)t in e||(o.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(o.add(t),this.st.add(t)):(o.remove(t),this.st.delete(t)))}return ct}}),Qt=t=>t??ht
|
291
290
|
/**
|
292
291
|
* @license
|
293
292
|
* Copyright 2020 Google LLC
|
294
293
|
* SPDX-License-Identifier: BSD-3-Clause
|
295
|
-
*/,
|
294
|
+
*/,te={},ee=Xt(class extends Yt{constructor(t){if(super(t),t.type!==Zt&&t.type!==Kt&&t.type!==Gt)throw Error("The `live` directive is not allowed on child or event bindings");if(!(t=>void 0===t.strings)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===ct||e===ht)return e;const o=t.element,i=t.name;if(t.type===Zt){if(e===o[i])return ct}else if(t.type===Gt){if(!!e===o.hasAttribute(i))return ct}else if(t.type===Kt&&o.getAttribute(i)===e+"")return ct;return((t,e=te)=>{t._$AH=e;
|
296
295
|
/**
|
297
296
|
* @license
|
298
297
|
* Copyright 2020 Google LLC
|
@@ -302,21 +301,21 @@ const It=1,Vt=3,Wt=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});class qt{const
|
|
302
301
|
* @license
|
303
302
|
* Copyright 2018 Google LLC
|
304
303
|
* SPDX-License-Identifier: BSD-3-Clause
|
305
|
-
*/var
|
304
|
+
*/var oe=class extends qt{constructor(){super(...arguments),this.formControlController=new Rt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.hasSlotController=new Mt(this,"help-text"),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.form="",this.required=!1,this.helpText=""}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleInput(){this.emit("sl-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}handleClick(){this.checked=!this.checked,this.emit("sl-change")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleKeyDown(t){"ArrowLeft"===t.key&&(t.preventDefault(),this.checked=!1,this.emit("sl-change"),this.emit("sl-input")),"ArrowRight"===t.key&&(t.preventDefault(),this.checked=!0,this.emit("sl-change"),this.emit("sl-input"))}handleCheckedChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(!0)}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("help-text"),e=!!this.helpText||!!t;return lt`
|
306
305
|
<div
|
307
|
-
class=${
|
306
|
+
class=${Jt({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-help-text":e})}
|
308
307
|
>
|
309
308
|
<label
|
310
309
|
part="base"
|
311
|
-
class=${
|
310
|
+
class=${Jt({switch:!0,"switch--checked":this.checked,"switch--disabled":this.disabled,"switch--focused":this.hasFocus,"switch--small":"small"===this.size,"switch--medium":"medium"===this.size,"switch--large":"large"===this.size})}
|
312
311
|
>
|
313
312
|
<input
|
314
313
|
class="switch__input"
|
315
314
|
type="checkbox"
|
316
315
|
title=${this.title}
|
317
316
|
name=${this.name}
|
318
|
-
value=${
|
319
|
-
.checked=${
|
317
|
+
value=${Qt(this.value)}
|
318
|
+
.checked=${ee(this.checked)}
|
320
319
|
.disabled=${this.disabled}
|
321
320
|
.required=${this.required}
|
322
321
|
role="switch"
|
@@ -348,7 +347,7 @@ const It=1,Vt=3,Wt=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});class qt{const
|
|
348
347
|
<slot name="help-text">${this.helpText}</slot>
|
349
348
|
</div>
|
350
349
|
</div>
|
351
|
-
`}};
|
350
|
+
`}};oe.styles=[Nt,zt,St],p([Wt('input[type="checkbox"]')],oe.prototype,"input",2),p([Vt()],oe.prototype,"hasFocus",2),p([It()],oe.prototype,"title",2),p([It()],oe.prototype,"name",2),p([It()],oe.prototype,"value",2),p([It({reflect:!0})],oe.prototype,"size",2),p([It({type:Boolean,reflect:!0})],oe.prototype,"disabled",2),p([It({type:Boolean,reflect:!0})],oe.prototype,"checked",2),p([((t="value")=>(e,o)=>{const i=e.constructor,s=i.prototype.attributeChangedCallback;i.prototype.attributeChangedCallback=function(e,r,n){var a;const l=i.getPropertyOptions(t);if(e===("string"==typeof l.attribute?l.attribute:t)){const e=l.converter||N,i=("function"==typeof e?e:null!=(a=null==e?void 0:e.fromAttribute)?a:N.fromAttribute)(n,l.type);this[t]!==i&&(this[o]=i)}s.call(this,e,r,n)}})("checked")],oe.prototype,"defaultChecked",2),p([It({reflect:!0})],oe.prototype,"form",2),p([It({type:Boolean,reflect:!0})],oe.prototype,"required",2),p([It({attribute:"help-text"})],oe.prototype,"helpText",2),p([Bt("checked",{waitUntilFirstUpdate:!0})],oe.prototype,"handleCheckedChange",1),p([Bt("disabled",{waitUntilFirstUpdate:!0})],oe.prototype,"handleDisabledChange",1),oe.define("sl-switch");var ie=A`
|
352
351
|
:host {
|
353
352
|
display: inline-block;
|
354
353
|
}
|
@@ -379,11 +378,8 @@ const It=1,Vt=3,Wt=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});class qt{const
|
|
379
378
|
outline: transparent;
|
380
379
|
}
|
381
380
|
|
382
|
-
:host(:focus-visible):not([disabled]) {
|
383
|
-
color: var(--sl-color-primary-600);
|
384
|
-
}
|
385
|
-
|
386
381
|
:host(:focus-visible) {
|
382
|
+
color: var(--sl-color-primary-600);
|
387
383
|
outline: var(--sl-focus-ring);
|
388
384
|
outline-offset: calc(-1 * var(--sl-focus-ring-width) - var(--sl-focus-ring-offset));
|
389
385
|
}
|
@@ -416,7 +412,7 @@ const It=1,Vt=3,Wt=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});class qt{const
|
|
416
412
|
outline-offset: -3px;
|
417
413
|
}
|
418
414
|
}
|
419
|
-
`,
|
415
|
+
`,se=A`
|
420
416
|
:host {
|
421
417
|
display: inline-block;
|
422
418
|
color: var(--sl-color-neutral-600);
|
@@ -463,7 +459,7 @@ const It=1,Vt=3,Wt=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});class qt{const
|
|
463
459
|
.icon-button__icon {
|
464
460
|
pointer-events: none;
|
465
461
|
}
|
466
|
-
`,
|
462
|
+
`,re="";function ne(t){re=t}var ae={name:"default",resolver:t=>function(t=""){if(!re){const t=[...document.getElementsByTagName("script")],e=t.find((t=>t.hasAttribute("data-shoelace")));if(e)ne(e.getAttribute("data-shoelace"));else{const e=t.find((t=>/shoelace(\.min)?\.js($|\?)/.test(t.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(t.src)));let o="";e&&(o=e.getAttribute("src")),ne(o.split("/").slice(0,-1).join("/"))}}return re.replace(/\/$/,"")+(t?`/${t.replace(/^\//,"")}`:"")}(`assets/icons/${t}.svg`)},le={caret:'\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>\n ',check:'\n <svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor">\n <g transform="translate(3.428571, 3.428571)">\n <path d="M0,5.71428571 L3.42857143,9.14285714"></path>\n <path d="M9.14285714,0 L3.42857143,9.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"chevron-down":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>\n </svg>\n ',"chevron-left":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>\n </svg>\n ',"chevron-right":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>\n </svg>\n ',copy:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2Zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H6ZM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1H2Z"/>\n </svg>\n ',eye:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">\n <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>\n <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>\n </svg>\n ',"eye-slash":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">\n <path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>\n <path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>\n <path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>\n </svg>\n ',eyedropper:'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">\n <path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path>\n </svg>\n ',"grip-vertical":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">\n <path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path>\n </svg>\n ',indeterminate:'\n <svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">\n <g stroke="currentColor" stroke-width="2">\n <g transform="translate(2.285714, 6.857143)">\n <path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>\n </g>\n </g>\n </g>\n </svg>\n ',"person-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">\n <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>\n </svg>\n ',"play-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">\n <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path>\n </svg>\n ',"pause-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">\n <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path>\n </svg>\n ',radio:'\n <svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="currentColor">\n <circle cx="8" cy="8" r="3.42857143"></circle>\n </g>\n </g>\n </svg>\n ',"star-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">\n <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>\n </svg>\n ',"x-lg":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">\n <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>\n </svg>\n ',"x-circle-fill":'\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">\n <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>\n </svg>\n '},ce=[ae,{name:"system",resolver:t=>t in le?`data:image/svg+xml,${encodeURIComponent(le[t])}`:""}],he=[];function de(t){return ce.find((e=>e.name===t))}function pe(t,e){!function(t){ce=ce.filter((e=>e.name!==t))}(t),ce.push({name:t,resolver:e.resolver,mutator:e.mutator,spriteSheet:e.spriteSheet}),he.forEach((e=>{e.library===t&&e.setIcon()}))}var ue,fe=A`
|
467
463
|
:host {
|
468
464
|
display: inline-block;
|
469
465
|
width: 1em;
|
@@ -476,25 +472,25 @@ const It=1,Vt=3,Wt=4,jt=t=>(...e)=>({_$litDirective$:t,values:e});class qt{const
|
|
476
472
|
height: 100%;
|
477
473
|
width: 100%;
|
478
474
|
}
|
479
|
-
`,
|
475
|
+
`,be=Symbol(),me=Symbol(),ge=new Map,ve=class extends qt{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let i;if(null==e?void 0:e.spriteSheet)return this.svg=lt`<svg part="svg">
|
480
476
|
<use part="use" href="${t}"></use>
|
481
|
-
</svg>`,
|
477
|
+
</svg>`,this.svg;try{if(i=await fetch(t,{mode:"cors"}),!i.ok)return 410===i.status?be:me}catch(t){return me}try{const t=document.createElement("div");t.innerHTML=await i.text();const e=t.firstElementChild;if("svg"!==(null==(o=null==e?void 0:e.tagName)?void 0:o.toLowerCase()))return be;ue||(ue=new DOMParser);const s=ue.parseFromString(e.outerHTML,"text/html").body.querySelector("svg");return s?(s.part.add("svg"),document.adoptNode(s)):be}catch(t){return be}}connectedCallback(){var t;super.connectedCallback(),t=this,he.push(t)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){var t;super.disconnectedCallback(),t=this,he=he.filter((e=>e!==t))}getIconSource(){const t=de(this.library);return this.name&&t?{url:t.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){"string"==typeof this.label&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const{url:e,fromLibrary:o}=this.getIconSource(),i=o?de(this.library):void 0;if(!e)return void(this.svg=null);let s=ge.get(e);if(s||(s=this.resolveIcon(e,i),ge.set(e,s)),!this.initialRender)return;const r=await s;if(r===me&&ge.delete(e),e===this.getIconSource().url)if((t=>void 0!==t?._$litType$)(r)){if(this.svg=r,i){await this.updateComplete;const t=this.shadowRoot.querySelector("[part='svg']");"function"==typeof i.mutator&&t&&i.mutator(t)}}else switch(r){case me:case be:this.svg=null,this.emit("sl-error");break;default:this.svg=r.cloneNode(!0),null==(t=null==i?void 0:i.mutator)||t.call(i,this.svg),this.emit("sl-load")}}render(){return this.svg}};ve.styles=[Nt,fe],p([Vt()],ve.prototype,"svg",2),p([It({reflect:!0})],ve.prototype,"name",2),p([It()],ve.prototype,"src",2),p([It()],ve.prototype,"label",2),p([It({reflect:!0})],ve.prototype,"library",2),p([Bt("label")],ve.prototype,"handleLabelChange",1),p([Bt(["name","src","library"])],ve.prototype,"setIcon",1);
|
482
478
|
/**
|
483
479
|
* @license
|
484
480
|
* Copyright 2020 Google LLC
|
485
481
|
* SPDX-License-Identifier: BSD-3-Clause
|
486
482
|
*/
|
487
|
-
const
|
483
|
+
const ye=Symbol.for(""),we=t=>{if(t?.r===ye)return t?._$litStatic$},_e=(t,...e)=>({_$litStatic$:e.reduce(((e,o,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[i+1]),t[0]),r:ye}),xe=new Map,$e=(t=>(e,...o)=>{const i=o.length;let s,r;const n=[],a=[];let l,c=0,h=!1;for(;c<i;){for(l=e[c];c<i&&void 0!==(r=o[c],s=we(r));)l+=s+e[++c],h=!0;c!==i&&a.push(r),n.push(l),c++}if(c===i&&n.push(e[i]),h){const t=n.join("$$lit$$");void 0===(e=xe.get(t))&&(n.raw=n,xe.set(t,e=n)),o=a}return t(e,...o)})(lt);var ke=class extends qt{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t=!!this.href,e=t?_e`a`:_e`button`;return $e`
|
488
484
|
<${e}
|
489
485
|
part="base"
|
490
|
-
class=${
|
491
|
-
?disabled=${
|
492
|
-
type=${
|
493
|
-
href=${
|
494
|
-
target=${
|
495
|
-
download=${
|
496
|
-
rel=${
|
497
|
-
role=${
|
486
|
+
class=${Jt({"icon-button":!0,"icon-button--disabled":!t&&this.disabled,"icon-button--focused":this.hasFocus})}
|
487
|
+
?disabled=${Qt(t?void 0:this.disabled)}
|
488
|
+
type=${Qt(t?void 0:"button")}
|
489
|
+
href=${Qt(t?this.href:void 0)}
|
490
|
+
target=${Qt(t?this.target:void 0)}
|
491
|
+
download=${Qt(t?this.download:void 0)}
|
492
|
+
rel=${Qt(t&&this.target?"noreferrer noopener":void 0)}
|
493
|
+
role=${Qt(t?void 0:"button")}
|
498
494
|
aria-disabled=${this.disabled?"true":"false"}
|
499
495
|
aria-label="${this.label}"
|
500
496
|
tabindex=${this.disabled?"-1":"0"}
|
@@ -504,19 +500,19 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
504
500
|
>
|
505
501
|
<sl-icon
|
506
502
|
class="icon-button__icon"
|
507
|
-
name=${
|
508
|
-
library=${
|
509
|
-
src=${
|
503
|
+
name=${Qt(this.name)}
|
504
|
+
library=${Qt(this.library)}
|
505
|
+
src=${Qt(this.src)}
|
510
506
|
aria-hidden="true"
|
511
507
|
></sl-icon>
|
512
508
|
</${e}>
|
513
|
-
`}};
|
509
|
+
`}};ke.styles=[Nt,se],ke.dependencies={"sl-icon":ve},p([Wt(".icon-button")],ke.prototype,"button",2),p([Vt()],ke.prototype,"hasFocus",2),p([It()],ke.prototype,"name",2),p([It()],ke.prototype,"library",2),p([It()],ke.prototype,"src",2),p([It()],ke.prototype,"href",2),p([It()],ke.prototype,"target",2),p([It()],ke.prototype,"download",2),p([It()],ke.prototype,"label",2),p([It({type:Boolean,reflect:!0})],ke.prototype,"disabled",2);const Ce=new Set,Ae=new Map;let Ee,Se="ltr",ze="en";const Te="undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&void 0!==document.documentElement;if(Te){const t=new MutationObserver(Le);Se=document.documentElement.dir||"ltr",ze=document.documentElement.lang||navigator.language,t.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function Pe(...t){t.map((t=>{const e=t.$code.toLowerCase();Ae.has(e)?Ae.set(e,Object.assign(Object.assign({},Ae.get(e)),t)):Ae.set(e,t),Ee||(Ee=t)})),Le()}function Le(){Te&&(Se=document.documentElement.dir||"ltr",ze=document.documentElement.lang||navigator.language),[...Ce.keys()].map((t=>{"function"==typeof t.requestUpdate&&t.requestUpdate()}))}let Oe=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){Ce.add(this.host)}hostDisconnected(){Ce.delete(this.host)}dir(){return`${this.host.dir||Se}`.toLowerCase()}lang(){return`${this.host.lang||ze}`.toLowerCase()}getTranslationData(t){var e,o;const i=new Intl.Locale(t.replace(/_/g,"-")),s=null==i?void 0:i.language.toLowerCase(),r=null!==(o=null===(e=null==i?void 0:i.region)||void 0===e?void 0:e.toLowerCase())&&void 0!==o?o:"";return{locale:i,language:s,region:r,primary:Ae.get(`${s}-${r}`),secondary:Ae.get(s)}}exists(t,e){var o;const{primary:i,secondary:s}=this.getTranslationData(null!==(o=e.lang)&&void 0!==o?o:this.lang());return e=Object.assign({includeFallback:!1},e),!!(i&&i[t]||s&&s[t]||e.includeFallback&&Ee&&Ee[t])}term(t,...e){const{primary:o,secondary:i}=this.getTranslationData(this.lang());let s;if(o&&o[t])s=o[t];else if(i&&i[t])s=i[t];else{if(!Ee||!Ee[t])return console.error(`No translation found for: ${String(t)}`),String(t);s=Ee[t]}return"function"==typeof s?s(...e):s}date(t,e){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),e).format(t)}number(t,e){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),e).format(t)}relativeTime(t,e,o){return new Intl.RelativeTimeFormat(this.lang(),o).format(t,e)}};var Fe={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(t,e)=>`Go to slide ${t} of ${e}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:t=>0===t?"No options selected":1===t?"1 option selected":`${t} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:t=>`Slide ${t}`,toggleColorFormat:"Toggle color format"};Pe(Fe);var Re=Fe,De=class extends Oe{};Pe(Re);var Me=0,Be=class extends qt{constructor(){super(...arguments),this.localize=new De(this),this.attrId=++Me,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1,this.tabIndex=0}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleCloseClick(t){t.stopPropagation(),this.emit("sl-close")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.disabled&&!this.active?this.tabIndex=-1:this.tabIndex=0}render(){return this.id=this.id.length>0?this.id:this.componentId,lt`
|
514
510
|
<div
|
515
511
|
part="base"
|
516
|
-
class=${
|
512
|
+
class=${Jt({tab:!0,"tab--active":this.active,"tab--closable":this.closable,"tab--disabled":this.disabled})}
|
517
513
|
>
|
518
514
|
<slot></slot>
|
519
|
-
${this.closable?
|
515
|
+
${this.closable?lt`
|
520
516
|
<sl-icon-button
|
521
517
|
part="close-button"
|
522
518
|
exportparts="base:close-button__base"
|
@@ -529,7 +525,7 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
529
525
|
></sl-icon-button>
|
530
526
|
`:""}
|
531
527
|
</div>
|
532
|
-
`}};
|
528
|
+
`}};Be.styles=[Nt,ie],Be.dependencies={"sl-icon-button":ke},p([Wt(".tab")],Be.prototype,"tab",2),p([It({reflect:!0})],Be.prototype,"panel",2),p([It({type:Boolean,reflect:!0})],Be.prototype,"active",2),p([It({type:Boolean,reflect:!0})],Be.prototype,"closable",2),p([It({type:Boolean,reflect:!0})],Be.prototype,"disabled",2),p([It({type:Number,reflect:!0})],Be.prototype,"tabIndex",2),p([Bt("active")],Be.prototype,"handleActiveChange",1),p([Bt("disabled")],Be.prototype,"handleDisabledChange",1),Be.define("sl-tab");var Ne=A`
|
533
529
|
:host {
|
534
530
|
--indicator-color: var(--sl-color-primary-600);
|
535
531
|
--track-color: var(--sl-color-neutral-200);
|
@@ -560,6 +556,11 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
560
556
|
padding: 0 var(--sl-spacing-x-large);
|
561
557
|
}
|
562
558
|
|
559
|
+
.tab-group--has-scroll-controls .tab-group__scroll-button--start--hidden,
|
560
|
+
.tab-group--has-scroll-controls .tab-group__scroll-button--end--hidden {
|
561
|
+
visibility: hidden;
|
562
|
+
}
|
563
|
+
|
563
564
|
.tab-group__body {
|
564
565
|
display: block;
|
565
566
|
overflow: auto;
|
@@ -758,40 +759,50 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
758
759
|
.tab-group--end ::slotted(sl-tab-panel) {
|
759
760
|
--padding: 0 var(--sl-spacing-medium);
|
760
761
|
}
|
761
|
-
|
762
|
+
`,He=A`
|
763
|
+
:host {
|
764
|
+
display: contents;
|
765
|
+
}
|
766
|
+
`,Ue=class extends qt{constructor(){super(...arguments),this.observedElements=[],this.disabled=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((t=>{this.emit("sl-resize",{detail:{entries:t}})})),this.disabled||this.startObserver()}disconnectedCallback(){super.disconnectedCallback(),this.stopObserver()}handleSlotChange(){this.disabled||this.startObserver()}startObserver(){const t=this.shadowRoot.querySelector("slot");if(null!==t){const e=t.assignedElements({flatten:!0});this.observedElements.forEach((t=>this.resizeObserver.unobserve(t))),this.observedElements=[],e.forEach((t=>{this.resizeObserver.observe(t),this.observedElements.push(t)}))}}stopObserver(){this.resizeObserver.disconnect()}handleDisabledChange(){this.disabled?this.stopObserver():this.startObserver()}render(){return lt` <slot @slotchange=${this.handleSlotChange}></slot> `}};Ue.styles=[Nt,He],p([It({type:Boolean,reflect:!0})],Ue.prototype,"disabled",2),p([Bt("disabled",{waitUntilFirstUpdate:!0})],Ue.prototype,"handleDisabledChange",1);var Ie=new Set;function Ve(t){if(Ie.add(t),!document.documentElement.classList.contains("sl-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}()+function(){const t=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(t)||!t?0:t}();let e=getComputedStyle(document.documentElement).scrollbarGutter;e&&"auto"!==e||(e="stable"),t<2&&(e=""),document.documentElement.style.setProperty("--sl-scroll-lock-gutter",e),document.documentElement.classList.add("sl-scroll-lock"),document.documentElement.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function We(t){Ie.delete(t),0===Ie.size&&(document.documentElement.classList.remove("sl-scroll-lock"),document.documentElement.style.removeProperty("--sl-scroll-lock-size"))}function je(t,e,o="vertical",i="smooth"){const s=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),r=s.top+e.scrollTop,n=s.left+e.scrollLeft,a=e.scrollLeft,l=e.scrollLeft+e.offsetWidth,c=e.scrollTop,h=e.scrollTop+e.offsetHeight;"horizontal"!==o&&"both"!==o||(n<a?e.scrollTo({left:n,behavior:i}):n+t.clientWidth>l&&e.scrollTo({left:n-e.offsetWidth+t.clientWidth,behavior:i})),"vertical"!==o&&"both"!==o||(r<c?e.scrollTo({top:r,behavior:i}):r+t.clientHeight>h&&e.scrollTo({top:r-e.offsetHeight+t.clientHeight,behavior:i}))}var qe=class extends qt{constructor(){super(...arguments),this.tabs=[],this.focusableTabs=[],this.panels=[],this.localize=new De(this),this.hasScrollControls=!1,this.shouldHideScrollStartButton=!1,this.shouldHideScrollEndButton=!1,this.placement="top",this.activation="auto",this.noScrollControls=!1,this.fixedScrollControls=!1,this.scrollOffset=1}connectedCallback(){const t=Promise.all([customElements.whenDefined("sl-tab"),customElements.whenDefined("sl-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>{this.repositionIndicator(),this.updateScrollControls()})),this.mutationObserver=new MutationObserver((t=>{const e=t.filter((({target:t})=>{if(t===this)return!0;if(t.closest("sl-tab-group")!==this)return!1;const e=t.tagName.toLowerCase();return"sl-tab"===e||"sl-tab-panel"===e}));if(0!==e.length)if(e.some((t=>!["aria-labelledby","aria-controls"].includes(t.attributeName)))&&setTimeout((()=>this.setAriaLabels())),e.some((t=>"disabled"===t.attributeName)))this.syncTabsAndPanels();else if(e.some((t=>"active"===t.attributeName))){const t=e.filter((t=>"active"===t.attributeName&&"sl-tab"===t.target.tagName.toLowerCase())).map((t=>t.target)),o=t.find((t=>t.active));o&&this.setActiveTab(o)}})),this.updateComplete.then((()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,attributeFilter:["active","disabled","name","panel"],childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),t.then((()=>{new IntersectionObserver(((t,e)=>{var o;t[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab(null!=(o=this.getActiveTab())?o:this.tabs[0],{emitEvents:!1}),e.unobserve(t[0].target))})).observe(this.tabGroup)}))}))}disconnectedCallback(){var t,e;super.disconnectedCallback(),null==(t=this.mutationObserver)||t.disconnect(),this.nav&&(null==(e=this.resizeObserver)||e.unobserve(this.nav))}getAllTabs(){return this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()}getAllPanels(){return[...this.body.assignedElements()].filter((t=>"sl-tab-panel"===t.tagName.toLowerCase()))}getActiveTab(){return this.tabs.find((t=>t.active))}handleClick(t){const e=t.target.closest("sl-tab");(null==e?void 0:e.closest("sl-tab-group"))===this&&null!==e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}handleKeyDown(t){const e=t.target.closest("sl-tab");if((null==e?void 0:e.closest("sl-tab-group"))===this&&(["Enter"," "].includes(t.key)&&null!==e&&(this.setActiveTab(e,{scrollBehavior:"smooth"}),t.preventDefault()),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key))){const e=this.tabs.find((t=>t.matches(":focus"))),o="rtl"===this.localize.dir();let i=null;if("sl-tab"===(null==e?void 0:e.tagName.toLowerCase())){if("Home"===t.key)i=this.focusableTabs[0];else if("End"===t.key)i=this.focusableTabs[this.focusableTabs.length-1];else if(["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&"ArrowUp"===t.key){const t=this.tabs.findIndex((t=>t===e));i=this.findNextFocusableTab(t,"backward")}else if(["top","bottom"].includes(this.placement)&&t.key===(o?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&"ArrowDown"===t.key){const t=this.tabs.findIndex((t=>t===e));i=this.findNextFocusableTab(t,"forward")}if(!i)return;i.tabIndex=0,i.focus({preventScroll:!0}),"auto"===this.activation?this.setActiveTab(i,{scrollBehavior:"smooth"}):this.tabs.forEach((t=>{t.tabIndex=t===i?0:-1})),["top","bottom"].includes(this.placement)&&je(i,this.nav,"horizontal"),t.preventDefault()}}}handleScrollToStart(){this.nav.scroll({left:"rtl"===this.localize.dir()?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:"rtl"===this.localize.dir()?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,e){if(e=h({emitEvents:!0,scrollBehavior:"auto"},e),t!==this.activeTab&&!t.disabled){const o=this.activeTab;this.activeTab=t,this.tabs.forEach((t=>{t.active=t===this.activeTab,t.tabIndex=t===this.activeTab?0:-1})),this.panels.forEach((t=>{var e;return t.active=t.name===(null==(e=this.activeTab)?void 0:e.panel)})),this.syncIndicator(),["top","bottom"].includes(this.placement)&&je(this.activeTab,this.nav,"horizontal",e.scrollBehavior),e.emitEvents&&(o&&this.emit("sl-tab-hide",{detail:{name:o.panel}}),this.emit("sl-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach((t=>{const e=this.panels.find((e=>e.name===t.panel));e&&(t.setAttribute("aria-controls",e.getAttribute("id")),e.setAttribute("aria-labelledby",t.getAttribute("id")))}))}repositionIndicator(){const t=this.getActiveTab();if(!t)return;const e=t.clientWidth,o=t.clientHeight,i="rtl"===this.localize.dir(),s=this.getAllTabs(),r=s.slice(0,s.indexOf(t)).reduce(((t,e)=>({left:t.left+e.clientWidth,top:t.top+e.clientHeight})),{left:0,top:0});switch(this.placement){case"top":case"bottom":this.indicator.style.width=`${e}px`,this.indicator.style.height="auto",this.indicator.style.translate=i?-1*r.left+"px":`${r.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${o}px`,this.indicator.style.translate=`0 ${r.top}px`}}syncTabsAndPanels(){this.tabs=this.getAllTabs(),this.focusableTabs=this.tabs.filter((t=>!t.disabled)),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then((()=>this.updateScrollControls()))}findNextFocusableTab(t,e){let o=null;const i="forward"===e?1:-1;let s=t+i;for(;t<this.tabs.length;){if(o=this.tabs[s]||null,null===o){o="forward"===e?this.focusableTabs[0]:this.focusableTabs[this.focusableTabs.length-1];break}if(!o.disabled)break;s+=i}return o}updateScrollButtons(){this.hasScrollControls&&!this.fixedScrollControls&&(this.shouldHideScrollStartButton=this.scrollFromStart()<=this.scrollOffset,this.shouldHideScrollEndButton=this.isScrolledToEnd())}isScrolledToEnd(){return this.scrollFromStart()+this.nav.clientWidth>=this.nav.scrollWidth-this.scrollOffset}scrollFromStart(){return"rtl"===this.localize.dir()?-this.nav.scrollLeft:this.nav.scrollLeft}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth+1,this.updateScrollButtons()}syncIndicator(){this.getActiveTab()?(this.indicator.style.display="block",this.repositionIndicator()):this.indicator.style.display="none"}show(t){const e=this.tabs.find((e=>e.panel===t));e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}render(){const t="rtl"===this.localize.dir();return lt`
|
762
767
|
<div
|
763
768
|
part="base"
|
764
|
-
class=${
|
769
|
+
class=${Jt({"tab-group":!0,"tab-group--top":"top"===this.placement,"tab-group--bottom":"bottom"===this.placement,"tab-group--start":"start"===this.placement,"tab-group--end":"end"===this.placement,"tab-group--rtl":"rtl"===this.localize.dir(),"tab-group--has-scroll-controls":this.hasScrollControls})}
|
765
770
|
@click=${this.handleClick}
|
766
771
|
@keydown=${this.handleKeyDown}
|
767
772
|
>
|
768
773
|
<div class="tab-group__nav-container" part="nav">
|
769
|
-
${this.hasScrollControls?
|
774
|
+
${this.hasScrollControls?lt`
|
770
775
|
<sl-icon-button
|
771
776
|
part="scroll-button scroll-button--start"
|
772
777
|
exportparts="base:scroll-button__base"
|
773
|
-
class
|
778
|
+
class=${Jt({"tab-group__scroll-button":!0,"tab-group__scroll-button--start":!0,"tab-group__scroll-button--start--hidden":this.shouldHideScrollStartButton})}
|
774
779
|
name=${t?"chevron-right":"chevron-left"}
|
775
780
|
library="system"
|
781
|
+
tabindex="-1"
|
782
|
+
aria-hidden="true"
|
776
783
|
label=${this.localize.term("scrollToStart")}
|
777
784
|
@click=${this.handleScrollToStart}
|
778
785
|
></sl-icon-button>
|
779
786
|
`:""}
|
780
787
|
|
781
|
-
<div class="tab-group__nav">
|
788
|
+
<div class="tab-group__nav" @scrollend=${this.updateScrollButtons}>
|
782
789
|
<div part="tabs" class="tab-group__tabs" role="tablist">
|
783
790
|
<div part="active-tab-indicator" class="tab-group__indicator"></div>
|
784
|
-
<
|
791
|
+
<sl-resize-observer @sl-resize=${this.syncIndicator}>
|
792
|
+
<slot name="nav" @slotchange=${this.syncTabsAndPanels}></slot>
|
793
|
+
</sl-resize-observer>
|
785
794
|
</div>
|
786
795
|
</div>
|
787
796
|
|
788
|
-
${this.hasScrollControls?
|
797
|
+
${this.hasScrollControls?lt`
|
789
798
|
<sl-icon-button
|
790
799
|
part="scroll-button scroll-button--end"
|
791
800
|
exportparts="base:scroll-button__base"
|
792
|
-
class
|
801
|
+
class=${Jt({"tab-group__scroll-button":!0,"tab-group__scroll-button--end":!0,"tab-group__scroll-button--end--hidden":this.shouldHideScrollEndButton})}
|
793
802
|
name=${t?"chevron-left":"chevron-right"}
|
794
803
|
library="system"
|
804
|
+
tabindex="-1"
|
805
|
+
aria-hidden="true"
|
795
806
|
label=${this.localize.term("scrollToEnd")}
|
796
807
|
@click=${this.handleScrollToEnd}
|
797
808
|
></sl-icon-button>
|
@@ -800,7 +811,12 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
800
811
|
|
801
812
|
<slot part="body" class="tab-group__body" @slotchange=${this.syncTabsAndPanels}></slot>
|
802
813
|
</div>
|
803
|
-
`}};
|
814
|
+
`}};qe.styles=[Nt,Ne],qe.dependencies={"sl-icon-button":ke,"sl-resize-observer":Ue},p([Wt(".tab-group")],qe.prototype,"tabGroup",2),p([Wt(".tab-group__body")],qe.prototype,"body",2),p([Wt(".tab-group__nav")],qe.prototype,"nav",2),p([Wt(".tab-group__indicator")],qe.prototype,"indicator",2),p([Vt()],qe.prototype,"hasScrollControls",2),p([Vt()],qe.prototype,"shouldHideScrollStartButton",2),p([Vt()],qe.prototype,"shouldHideScrollEndButton",2),p([It()],qe.prototype,"placement",2),p([It()],qe.prototype,"activation",2),p([It({attribute:"no-scroll-controls",type:Boolean})],qe.prototype,"noScrollControls",2),p([It({attribute:"fixed-scroll-controls",type:Boolean})],qe.prototype,"fixedScrollControls",2),p([function(t){return(e,o)=>{const i="function"==typeof e?e:e[o];Object.assign(i,t)}}
|
815
|
+
/**
|
816
|
+
* @license
|
817
|
+
* Copyright 2017 Google LLC
|
818
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
819
|
+
*/({passive:!0})],qe.prototype,"updateScrollButtons",1),p([Bt("noScrollControls",{waitUntilFirstUpdate:!0})],qe.prototype,"updateScrollControls",1),p([Bt("placement",{waitUntilFirstUpdate:!0})],qe.prototype,"syncIndicator",1),qe.define("sl-tab-group");var Ke=(t,e)=>{let o=0;return function(...i){window.clearTimeout(o),o=window.setTimeout((()=>{t.call(this,...i)}),e)}},Ze=(t,e,o)=>{const i=t[e];t[e]=function(...t){i.call(this,...t),o.call(this,i,...t)}};(()=>{if("undefined"==typeof window)return;if(!("onscrollend"in window)){const t=new Set,e=new WeakMap,o=e=>{for(const o of e.changedTouches)t.add(o.identifier)},i=e=>{for(const o of e.changedTouches)t.delete(o.identifier)};document.addEventListener("touchstart",o,!0),document.addEventListener("touchend",i,!0),document.addEventListener("touchcancel",i,!0),Ze(EventTarget.prototype,"addEventListener",(function(o,i){if("scrollend"!==i)return;const s=Ke((()=>{t.size?s():this.dispatchEvent(new Event("scrollend"))}),100);o.call(this,"scroll",s,{passive:!0}),e.set(this,s)})),Ze(EventTarget.prototype,"removeEventListener",(function(t,o){if("scrollend"!==o)return;const i=e.get(this);i&&t.call(this,"scroll",i,{passive:!0})}))}})();var Ge=A`
|
804
820
|
:host {
|
805
821
|
--padding: 0;
|
806
822
|
|
@@ -815,12 +831,12 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
815
831
|
display: block;
|
816
832
|
padding: var(--padding);
|
817
833
|
}
|
818
|
-
`,
|
834
|
+
`,Xe=0,Ye=class extends qt{constructor(){super(...arguments),this.attrId=++Xe,this.componentId=`sl-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return lt`
|
819
835
|
<slot
|
820
836
|
part="base"
|
821
|
-
class=${
|
837
|
+
class=${Jt({"tab-panel":!0,"tab-panel--active":this.active})}
|
822
838
|
></slot>
|
823
|
-
`}};
|
839
|
+
`}};Ye.styles=[Nt,Ge],p([It({reflect:!0})],Ye.prototype,"name",2),p([It({type:Boolean,reflect:!0})],Ye.prototype,"active",2),p([Bt("active")],Ye.prototype,"handleActiveChange",1),Ye.define("sl-tab-panel");var Je=A`
|
824
840
|
:host {
|
825
841
|
--max-width: 20rem;
|
826
842
|
--hide-delay: 0ms;
|
@@ -872,7 +888,7 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
872
888
|
user-select: none;
|
873
889
|
-webkit-user-select: none;
|
874
890
|
}
|
875
|
-
`,
|
891
|
+
`,Qe=A`
|
876
892
|
:host {
|
877
893
|
--arrow-color: var(--sl-color-neutral-1000);
|
878
894
|
--arrow-size: 6px;
|
@@ -930,29 +946,29 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
930
946
|
var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)
|
931
947
|
);
|
932
948
|
}
|
933
|
-
`;const je=Math.min,qe=Math.max,Ke=Math.round,Ze=Math.floor,Ge=t=>({x:t,y:t}),Xe={left:"right",right:"left",bottom:"top",top:"bottom"},Ye={start:"end",end:"start"};function Je(t,e,o){return qe(t,je(e,o))}function Qe(t,e){return"function"==typeof t?t(e):t}function to(t){return t.split("-")[0]}function eo(t){return t.split("-")[1]}function oo(t){return"x"===t?"y":"x"}function io(t){return"y"===t?"height":"width"}function so(t){return["top","bottom"].includes(to(t))?"y":"x"}function ro(t){return oo(so(t))}function no(t){return t.replace(/start|end/g,(t=>Ye[t]))}function ao(t){return t.replace(/left|right|bottom|top/g,(t=>Xe[t]))}function lo(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function co(t){const{x:e,y:o,width:i,height:s}=t;return{width:i,height:s,top:o,left:e,right:e+i,bottom:o+s,x:e,y:o}}function ho(t,e,o){let{reference:i,floating:s}=t;const r=so(e),n=ro(e),a=io(n),l=to(e),c="y"===r,h=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2;let u;switch(l){case"top":u={x:h,y:i.y-s.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-s.width,y:d};break;default:u={x:i.x,y:i.y}}switch(eo(e)){case"start":u[n]-=p*(o&&c?-1:1);break;case"end":u[n]+=p*(o&&c?-1:1)}return u}async function po(t,e){var o;void 0===e&&(e={});const{x:i,y:s,platform:r,rects:n,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=Qe(e,t),f=lo(u),m=a[p?"floating"===d?"reference":"floating":d],b=co(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(m)))||o?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),g="floating"===d?{x:i,y:s,width:n.floating.width,height:n.floating.height}:n.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),y=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},w=co(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:l}):g);return{top:(b.top-w.top+f.top)/y.y,bottom:(w.bottom-b.bottom+f.bottom)/y.y,left:(b.left-w.left+f.left)/y.x,right:(w.right-b.right+f.right)/y.x}}function uo(t){return bo(t)?(t.nodeName||"").toLowerCase():"#document"}function fo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function mo(t){var e;return null==(e=(bo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function bo(t){return t instanceof Node||t instanceof fo(t).Node}function go(t){return t instanceof Element||t instanceof fo(t).Element}function vo(t){return t instanceof HTMLElement||t instanceof fo(t).HTMLElement}function yo(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof fo(t).ShadowRoot)}function wo(t){const{overflow:e,overflowX:o,overflowY:i,display:s}=Co(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(s)}function _o(t){return["table","td","th"].includes(uo(t))}function xo(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function $o(t){const e=ko(),o=go(t)?Co(t):t;return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function ko(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ao(t){return["html","body","#document"].includes(uo(t))}function Co(t){return fo(t).getComputedStyle(t)}function Eo(t){return go(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function So(t){if("html"===uo(t))return t;const e=t.assignedSlot||t.parentNode||yo(t)&&t.host||mo(t);return yo(e)?e.host:e}function zo(t){const e=So(t);return Ao(e)?t.ownerDocument?t.ownerDocument.body:t.body:vo(e)&&wo(e)?e:zo(e)}function To(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const s=zo(t),r=s===(null==(i=t.ownerDocument)?void 0:i.body),n=fo(s);if(r){const t=Po(n);return e.concat(n,n.visualViewport||[],wo(s)?s:[],t&&o?To(t):[])}return e.concat(s,To(s,[],o))}function Po(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Lo(t){const e=Co(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=vo(t),r=s?t.offsetWidth:o,n=s?t.offsetHeight:i,a=Ke(o)!==r||Ke(i)!==n;return a&&(o=r,i=n),{width:o,height:i,$:a}}function Oo(t){return go(t)?t:t.contextElement}function Fo(t){const e=Oo(t);if(!vo(e))return Ge(1);const o=e.getBoundingClientRect(),{width:i,height:s,$:r}=Lo(e);let n=(r?Ke(o.width):o.width)/i,a=(r?Ke(o.height):o.height)/s;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const Ro=Ge(0);function Mo(t){const e=fo(t);return ko()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Ro}function Do(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const s=t.getBoundingClientRect(),r=Oo(t);let n=Ge(1);e&&(i?go(i)&&(n=Fo(i)):n=Fo(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==fo(t))&&e}(r,o,i)?Mo(r):Ge(0);let l=(s.left+a.x)/n.x,c=(s.top+a.y)/n.y,h=s.width/n.x,d=s.height/n.y;if(r){const t=fo(r),e=i&&go(i)?fo(i):i;let o=t,s=Po(o);for(;s&&i&&e!==o;){const t=Fo(s),e=s.getBoundingClientRect(),i=Co(s),r=e.left+(s.clientLeft+parseFloat(i.paddingLeft))*t.x,n=e.top+(s.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=r,c+=n,o=fo(s),s=Po(o)}}return co({width:h,height:d,x:l,y:c})}function Bo(t){return Do(mo(t)).left+Eo(t).scrollLeft}function No(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=fo(t),i=mo(t),s=o.visualViewport;let r=i.clientWidth,n=i.clientHeight,a=0,l=0;if(s){r=s.width,n=s.height;const t=ko();(!t||t&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:n,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=mo(t),o=Eo(t),i=t.ownerDocument.body,s=qe(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=qe(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let n=-o.scrollLeft+Bo(t);const a=-o.scrollTop;return"rtl"===Co(i).direction&&(n+=qe(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:n,y:a}}(mo(t));else if(go(e))i=function(t,e){const o=Do(t,!0,"fixed"===e),i=o.top+t.clientTop,s=o.left+t.clientLeft,r=vo(t)?Fo(t):Ge(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:s*r.x,y:i*r.y}}(e,o);else{const o=Mo(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return co(i)}function Uo(t,e){const o=So(t);return!(o===e||!go(o)||Ao(o))&&("fixed"===Co(o).position||Uo(o,e))}function Ho(t,e,o){const i=vo(e),s=mo(e),r="fixed"===o,n=Do(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=Ge(0);if(i||!i&&!r)if(("body"!==uo(e)||wo(s))&&(a=Eo(e)),i){const t=Do(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else s&&(l.x=Bo(s));return{x:n.left+a.scrollLeft-l.x,y:n.top+a.scrollTop-l.y,width:n.width,height:n.height}}function Io(t){return"static"===Co(t).position}function Vo(t,e){return vo(t)&&"fixed"!==Co(t).position?e?e(t):t.offsetParent:null}function Wo(t,e){const o=fo(t);if(xo(t))return o;if(!vo(t)){let e=So(t);for(;e&&!Ao(e);){if(go(e)&&!Io(e))return e;e=So(e)}return o}let i=Vo(t,e);for(;i&&_o(i)&&Io(i);)i=Vo(i,e);return i&&Ao(i)&&Io(i)&&!$o(i)?o:i||function(t){let e=So(t);for(;vo(e)&&!Ao(e);){if($o(e))return e;if(xo(e))return null;e=So(e)}return null}(t)||o}const jo={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:o,offsetParent:i,strategy:s}=t;const r="fixed"===s,n=mo(i),a=!!e&&xo(e.floating);if(i===n||a&&r)return o;let l={scrollLeft:0,scrollTop:0},c=Ge(1);const h=Ge(0),d=vo(i);if((d||!d&&!r)&&(("body"!==uo(i)||wo(n))&&(l=Eo(i)),vo(i))){const t=Do(i);c=Fo(i),h.x=t.x+i.clientLeft,h.y=t.y+i.clientTop}return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+h.x,y:o.y*c.y-l.scrollTop*c.y+h.y}},getDocumentElement:mo,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:s}=t;const r=[..."clippingAncestors"===o?xo(e)?[]:function(t,e){const o=e.get(t);if(o)return o;let i=To(t,[],!1).filter((t=>go(t)&&"body"!==uo(t))),s=null;const r="fixed"===Co(t).position;let n=r?So(t):t;for(;go(n)&&!Ao(n);){const e=Co(n),o=$o(n);o||"fixed"!==e.position||(s=null),(r?!o&&!s:!o&&"static"===e.position&&s&&["absolute","fixed"].includes(s.position)||wo(n)&&!o&&Uo(t,n))?i=i.filter((t=>t!==n)):s=e,n=So(n)}return e.set(t,i),i}(e,this._c):[].concat(o),i],n=r[0],a=r.reduce(((t,o)=>{const i=No(e,o,s);return t.top=qe(i.top,t.top),t.right=je(i.right,t.right),t.bottom=je(i.bottom,t.bottom),t.left=qe(i.left,t.left),t}),No(e,n,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Wo,getElementRects:async function(t){const e=this.getOffsetParent||Wo,o=this.getDimensions,i=await o(t.floating);return{reference:Ho(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=Lo(t);return{width:e,height:o}},getScale:Fo,isElement:go,isRTL:function(t){return"rtl"===Co(t).direction}};function qo(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Oo(t),h=s||r?[...c?To(c):[],...To(e)]:[];h.forEach((t=>{s&&t.addEventListener("scroll",o,{passive:!0}),r&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,i=null;const s=mo(t);function r(){var t;clearTimeout(o),null==(t=i)||t.disconnect(),i=null}return function n(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const{left:c,top:h,width:d,height:p}=t.getBoundingClientRect();if(a||e(),!d||!p)return;const u={rootMargin:-Ze(h)+"px "+-Ze(s.clientWidth-(c+d))+"px "+-Ze(s.clientHeight-(h+p))+"px "+-Ze(c)+"px",threshold:qe(0,je(1,l))||1};let f=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!f)return n();e?n(!1,e):o=setTimeout((()=>{n(!1,1e-7)}),1e3)}f=!1}try{i=new IntersectionObserver(m,{...u,root:s.ownerDocument})}catch(t){i=new IntersectionObserver(m,u)}i.observe(t)}(!0),r}(c,o):null;let p,u=-1,f=null;n&&(f=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{var t;null==(t=f)||t.observe(e)}))),o()})),c&&!l&&f.observe(c),f.observe(e));let m=l?Do(t):null;return l&&function e(){const i=Do(t);!m||i.x===m.x&&i.y===m.y&&i.width===m.width&&i.height===m.height||o();m=i,p=requestAnimationFrame(e)}(),o(),()=>{var t;h.forEach((t=>{s&&t.removeEventListener("scroll",o),r&&t.removeEventListener("resize",o)})),null==d||d(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Ko=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,i;const{x:s,y:r,placement:n,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:i,elements:s}=t,r=await(null==i.isRTL?void 0:i.isRTL(s.floating)),n=to(o),a=eo(o),l="y"===so(o),c=["left","top"].includes(n)?-1:1,h=r&&l?-1:1,d=Qe(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof f&&(u="end"===a?-1*f:f),l?{x:u*h,y:p*c}:{x:p*c,y:u*h}}(e,t);return n===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:n}}}}},Zo=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:n=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=Qe(t,e),c={x:o,y:i},h=await po(e,l),d=so(to(s)),p=oo(d);let u=c[p],f=c[d];if(r){const t="y"===p?"bottom":"right";u=Je(u+h["y"===p?"top":"left"],u,u-h[t])}if(n){const t="y"===d?"bottom":"right";f=Je(f+h["y"===d?"top":"left"],f,f-h[t])}const m=a.fn({...e,[p]:u,[d]:f});return{...m,data:{x:m.x-o,y:m.y-i}}}}},Go=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:s,middlewareData:r,rects:n,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...b}=Qe(t,e);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const g=to(s),v=so(a),y=to(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),_=p||(y||!m?[ao(a)]:function(t){const e=ao(t);return[no(t),e,no(e)]}(a)),x="none"!==f;!p&&x&&_.push(...function(t,e,o,i){const s=eo(t);let r=function(t,e,o){const i=["left","right"],s=["right","left"],r=["top","bottom"],n=["bottom","top"];switch(t){case"top":case"bottom":return o?e?s:i:e?i:s;case"left":case"right":return e?r:n;default:return[]}}(to(t),"start"===o,i);return s&&(r=r.map((t=>t+"-"+s)),e&&(r=r.concat(r.map(no)))),r}(a,m,f,w));const $=[a,..._],k=await po(e,b),A=[];let C=(null==(i=r.flip)?void 0:i.overflows)||[];if(h&&A.push(k[g]),d){const t=function(t,e,o){void 0===o&&(o=!1);const i=eo(t),s=ro(t),r=io(s);let n="x"===s?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(n=ao(n)),[n,ao(n)]}(s,n,w);A.push(k[t[0]],k[t[1]])}if(C=[...C,{placement:s,overflows:A}],!A.every((t=>t<=0))){var E,S;const t=((null==(E=r.flip)?void 0:E.index)||0)+1,e=$[t];if(e)return{data:{index:t,overflows:C},reset:{placement:e}};let o=null==(S=C.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:S.placement;if(!o)switch(u){case"bestFit":{var z;const t=null==(z=C.filter((t=>{if(x){const e=so(t.placement);return e===v||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:z[0];t&&(o=t);break}case"initialPlacement":o=a}if(s!==o)return{reset:{placement:o}}}return{}}}},Xo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:i,platform:s,elements:r}=e,{apply:n=()=>{},...a}=Qe(t,e),l=await po(e,a),c=to(o),h=eo(o),d="y"===so(o),{width:p,height:u}=i.floating;let f,m;"top"===c||"bottom"===c?(f=c,m=h===(await(null==s.isRTL?void 0:s.isRTL(r.floating))?"start":"end")?"left":"right"):(m=c,f="end"===h?"top":"bottom");const b=u-l.top-l.bottom,g=p-l.left-l.right,v=je(u-l[f],b),y=je(p-l[m],g),w=!e.middlewareData.shift;let _=v,x=y;if(d?x=h||w?je(y,g):g:_=h||w?je(v,b):b,w&&!h){const t=qe(l.left,0),e=qe(l.right,0),o=qe(l.top,0),i=qe(l.bottom,0);d?x=p-2*(0!==t||0!==e?t+e:qe(l.left,l.right)):_=u-2*(0!==o||0!==i?o+i:qe(l.top,l.bottom))}await n({...e,availableWidth:x,availableHeight:_});const $=await s.getDimensions(r.floating);return p!==$.width||u!==$.height?{reset:{rects:!0}}:{}}}},Yo=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:s,rects:r,platform:n,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=Qe(t,e)||{};if(null==c)return{};const d=lo(h),p={x:o,y:i},u=ro(s),f=io(u),m=await n.getDimensions(c),b="y"===u,g=b?"top":"left",v=b?"bottom":"right",y=b?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[u]-p[u]-r.floating[f],_=p[u]-r.reference[u],x=await(null==n.getOffsetParent?void 0:n.getOffsetParent(c));let $=x?x[y]:0;$&&await(null==n.isElement?void 0:n.isElement(x))||($=a.floating[y]||r.floating[f]);const k=w/2-_/2,A=$/2-m[f]/2-1,C=je(d[g],A),E=je(d[v],A),S=C,z=$-m[f]-E,T=$/2-m[f]/2+k,P=Je(S,T,z),L=!l.arrow&&null!=eo(s)&&T!==P&&r.reference[f]/2-(T<S?C:E)-m[f]/2<0,O=L?T<S?T-S:T-z:0;return{[u]:p[u]+O,data:{[u]:P,centerOffset:T-P-O,...L&&{alignmentOffset:O}},reset:L}}}),Jo=(t,e,o)=>{const i=new Map,s={platform:jo,...o},r={...s.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:n}=o,a=r.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(e));let c=await n.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:d}=ho(c,i,l),p=i,u={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:m}=a[o],{x:b,y:g,data:v,reset:y}=await m({x:h,y:d,initialPlacement:i,placement:p,strategy:s,middlewareData:u,rects:c,platform:n,elements:{reference:t,floating:e}});h=null!=b?b:h,d=null!=g?g:d,u={...u,[r]:{...u[r],...v}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(c=!0===y.rects?await n.getElementRects({reference:t,floating:e,strategy:s}):y.rects),({x:h,y:d}=ho(c,p,l))),o=-1)}return{x:h,y:d,placement:p,strategy:s,middlewareData:u}})(t,e,{...s,platform:r})};function Qo(t){return function(t){for(let e=t;e;e=ti(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=ti(t);e;e=ti(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||"none"!==t.filter)return e;if("BODY"===e.tagName)return e}}return null}(t)}function ti(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}var ei=class extends Ht{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,i=0,s=0,r=0,n=0,a=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")?t.top<e.top?(o=t.left,i=t.bottom,s=t.right,r=t.bottom,n=e.left,a=e.top,l=e.right,c=e.top):(o=e.left,i=e.bottom,s=e.right,r=e.bottom,n=t.left,a=t.top,l=t.right,c=t.top):t.left<e.left?(o=t.right,i=t.top,s=e.left,r=e.top,n=t.right,a=t.bottom,l=e.left,c=e.bottom):(o=e.right,i=e.top,s=t.left,r=t.top,n=e.right,a=e.bottom,l=t.left,c=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${o}px`),this.style.setProperty("--hover-bridge-top-left-y",`${i}px`),this.style.setProperty("--hover-bridge-top-right-x",`${s}px`),this.style.setProperty("--hover-bridge-top-right-y",`${r}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${n}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${a}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||function(t){return null!==t&&"object"==typeof t&&"getBoundingClientRect"in t&&(!("contextElement"in t)||t instanceof Element)}(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){this.anchorEl&&(this.cleanup=qo(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[Ko({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Xo({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,o="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=o?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Go({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Zo({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Xo({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Yo({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>jo.getOffsetParent(t,Qo):jo.getOffsetParent;Jo(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:h(c({},jo),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:i})=>{const s=this.matches(":dir(rtl)"),r={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let i="",n="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",n=s?o:"",l=s?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n=s?"":o,l=s?o:"",a="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",i="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",i="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:i,right:n,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return nt`
|
949
|
+
`;const to=Math.min,eo=Math.max,oo=Math.round,io=Math.floor,so=t=>({x:t,y:t}),ro={left:"right",right:"left",bottom:"top",top:"bottom"},no={start:"end",end:"start"};function ao(t,e,o){return eo(t,to(e,o))}function lo(t,e){return"function"==typeof t?t(e):t}function co(t){return t.split("-")[0]}function ho(t){return t.split("-")[1]}function po(t){return"x"===t?"y":"x"}function uo(t){return"y"===t?"height":"width"}const fo=new Set(["top","bottom"]);function bo(t){return fo.has(co(t))?"y":"x"}function mo(t){return po(bo(t))}function go(t){return t.replace(/start|end/g,(t=>no[t]))}const vo=["left","right"],yo=["right","left"],wo=["top","bottom"],_o=["bottom","top"];function xo(t,e,o,i){const s=ho(t);let r=function(t,e,o){switch(t){case"top":case"bottom":return o?e?yo:vo:e?vo:yo;case"left":case"right":return e?wo:_o;default:return[]}}(co(t),"start"===o,i);return s&&(r=r.map((t=>t+"-"+s)),e&&(r=r.concat(r.map(go)))),r}function $o(t){return t.replace(/left|right|bottom|top/g,(t=>ro[t]))}function ko(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function Co(t){const{x:e,y:o,width:i,height:s}=t;return{width:i,height:s,top:o,left:e,right:e+i,bottom:o+s,x:e,y:o}}function Ao(t,e,o){let{reference:i,floating:s}=t;const r=bo(e),n=mo(e),a=uo(n),l=co(e),c="y"===r,h=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2;let u;switch(l){case"top":u={x:h,y:i.y-s.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-s.width,y:d};break;default:u={x:i.x,y:i.y}}switch(ho(e)){case"start":u[n]-=p*(o&&c?-1:1);break;case"end":u[n]+=p*(o&&c?-1:1)}return u}async function Eo(t,e){var o;void 0===e&&(e={});const{x:i,y:s,platform:r,rects:n,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=lo(e,t),f=ko(u),b=a[p?"floating"===d?"reference":"floating":d],m=Co(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(b)))||o?b:b.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),g="floating"===d?{x:i,y:s,width:n.floating.width,height:n.floating.height}:n.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),y=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},w=Co(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:l}):g);return{top:(m.top-w.top+f.top)/y.y,bottom:(w.bottom-m.bottom+f.bottom)/y.y,left:(m.left-w.left+f.left)/y.x,right:(w.right-m.right+f.right)/y.x}}const So=new Set(["left","top"]);function zo(){return"undefined"!=typeof window}function To(t){return Oo(t)?(t.nodeName||"").toLowerCase():"#document"}function Po(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Lo(t){var e;return null==(e=(Oo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Oo(t){return!!zo()&&(t instanceof Node||t instanceof Po(t).Node)}function Fo(t){return!!zo()&&(t instanceof Element||t instanceof Po(t).Element)}function Ro(t){return!!zo()&&(t instanceof HTMLElement||t instanceof Po(t).HTMLElement)}function Do(t){return!(!zo()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof Po(t).ShadowRoot)}const Mo=new Set(["inline","contents"]);function Bo(t){const{overflow:e,overflowX:o,overflowY:i,display:s}=Xo(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!Mo.has(s)}const No=new Set(["table","td","th"]);function Ho(t){return No.has(To(t))}const Uo=[":popover-open",":modal"];function Io(t){return Uo.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}const Vo=["transform","translate","scale","rotate","perspective"],Wo=["transform","translate","scale","rotate","perspective","filter"],jo=["paint","layout","strict","content"];function qo(t){const e=Ko(),o=Fo(t)?Xo(t):t;return Vo.some((t=>!!o[t]&&"none"!==o[t]))||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||Wo.some((t=>(o.willChange||"").includes(t)))||jo.some((t=>(o.contain||"").includes(t)))}function Ko(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Zo=new Set(["html","body","#document"]);function Go(t){return Zo.has(To(t))}function Xo(t){return Po(t).getComputedStyle(t)}function Yo(t){return Fo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Jo(t){if("html"===To(t))return t;const e=t.assignedSlot||t.parentNode||Do(t)&&t.host||Lo(t);return Do(e)?e.host:e}function Qo(t){const e=Jo(t);return Go(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ro(e)&&Bo(e)?e:Qo(e)}function ti(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const s=Qo(t),r=s===(null==(i=t.ownerDocument)?void 0:i.body),n=Po(s);if(r){const t=ei(n);return e.concat(n,n.visualViewport||[],Bo(s)?s:[],t&&o?ti(t):[])}return e.concat(s,ti(s,[],o))}function ei(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function oi(t){const e=Xo(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=Ro(t),r=s?t.offsetWidth:o,n=s?t.offsetHeight:i,a=oo(o)!==r||oo(i)!==n;return a&&(o=r,i=n),{width:o,height:i,$:a}}function ii(t){return Fo(t)?t:t.contextElement}function si(t){const e=ii(t);if(!Ro(e))return so(1);const o=e.getBoundingClientRect(),{width:i,height:s,$:r}=oi(e);let n=(r?oo(o.width):o.width)/i,a=(r?oo(o.height):o.height)/s;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const ri=so(0);function ni(t){const e=Po(t);return Ko()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ri}function ai(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const s=t.getBoundingClientRect(),r=ii(t);let n=so(1);e&&(i?Fo(i)&&(n=si(i)):n=si(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==Po(t))&&e}(r,o,i)?ni(r):so(0);let l=(s.left+a.x)/n.x,c=(s.top+a.y)/n.y,h=s.width/n.x,d=s.height/n.y;if(r){const t=Po(r),e=i&&Fo(i)?Po(i):i;let o=t,s=ei(o);for(;s&&i&&e!==o;){const t=si(s),e=s.getBoundingClientRect(),i=Xo(s),r=e.left+(s.clientLeft+parseFloat(i.paddingLeft))*t.x,n=e.top+(s.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,d*=t.y,l+=r,c+=n,o=Po(s),s=ei(o)}}return Co({width:h,height:d,x:l,y:c})}function li(t,e){const o=Yo(t).scrollLeft;return e?e.left+o:ai(Lo(t)).left+o}function ci(t,e){const o=t.getBoundingClientRect();return{x:o.left+e.scrollLeft-li(t,o),y:o.top+e.scrollTop}}const hi=25;const di=new Set(["absolute","fixed"]);function pi(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=Po(t),i=Lo(t),s=o.visualViewport;let r=i.clientWidth,n=i.clientHeight,a=0,l=0;if(s){r=s.width,n=s.height;const t=Ko();(!t||t&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}const c=li(i);if(c<=0){const t=i.ownerDocument,e=t.body,o=getComputedStyle(e),s="CSS1Compat"===t.compatMode&&parseFloat(o.marginLeft)+parseFloat(o.marginRight)||0,n=Math.abs(i.clientWidth-e.clientWidth-s);n<=hi&&(r-=n)}else c<=hi&&(r+=c);return{width:r,height:n,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=Lo(t),o=Yo(t),i=t.ownerDocument.body,s=eo(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=eo(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let n=-o.scrollLeft+li(t);const a=-o.scrollTop;return"rtl"===Xo(i).direction&&(n+=eo(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:n,y:a}}(Lo(t));else if(Fo(e))i=function(t,e){const o=ai(t,!0,"fixed"===e),i=o.top+t.clientTop,s=o.left+t.clientLeft,r=Ro(t)?si(t):so(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:s*r.x,y:i*r.y}}(e,o);else{const o=ni(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Co(i)}function ui(t,e){const o=Jo(t);return!(o===e||!Fo(o)||Go(o))&&("fixed"===Xo(o).position||ui(o,e))}function fi(t,e,o){const i=Ro(e),s=Lo(e),r="fixed"===o,n=ai(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=so(0);function c(){l.x=li(s)}if(i||!i&&!r)if(("body"!==To(e)||Bo(s))&&(a=Yo(e)),i){const t=ai(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else s&&c();r&&!i&&s&&c();const h=!s||i||r?so(0):ci(s,a);return{x:n.left+a.scrollLeft-l.x-h.x,y:n.top+a.scrollTop-l.y-h.y,width:n.width,height:n.height}}function bi(t){return"static"===Xo(t).position}function mi(t,e){if(!Ro(t)||"fixed"===Xo(t).position)return null;if(e)return e(t);let o=t.offsetParent;return Lo(t)===o&&(o=o.ownerDocument.body),o}function gi(t,e){const o=Po(t);if(Io(t))return o;if(!Ro(t)){let e=Jo(t);for(;e&&!Go(e);){if(Fo(e)&&!bi(e))return e;e=Jo(e)}return o}let i=mi(t,e);for(;i&&Ho(i)&&bi(i);)i=mi(i,e);return i&&Go(i)&&bi(i)&&!qo(i)?o:i||function(t){let e=Jo(t);for(;Ro(e)&&!Go(e);){if(qo(e))return e;if(Io(e))return null;e=Jo(e)}return null}(t)||o}const vi={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:o,offsetParent:i,strategy:s}=t;const r="fixed"===s,n=Lo(i),a=!!e&&Io(e.floating);if(i===n||a&&r)return o;let l={scrollLeft:0,scrollTop:0},c=so(1);const h=so(0),d=Ro(i);if((d||!d&&!r)&&(("body"!==To(i)||Bo(n))&&(l=Yo(i)),Ro(i))){const t=ai(i);c=si(i),h.x=t.x+i.clientLeft,h.y=t.y+i.clientTop}const p=!n||d||r?so(0):ci(n,l);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+h.x+p.x,y:o.y*c.y-l.scrollTop*c.y+h.y+p.y}},getDocumentElement:Lo,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:s}=t;const r=[..."clippingAncestors"===o?Io(e)?[]:function(t,e){const o=e.get(t);if(o)return o;let i=ti(t,[],!1).filter((t=>Fo(t)&&"body"!==To(t))),s=null;const r="fixed"===Xo(t).position;let n=r?Jo(t):t;for(;Fo(n)&&!Go(n);){const e=Xo(n),o=qo(n);o||"fixed"!==e.position||(s=null),(r?!o&&!s:!o&&"static"===e.position&&s&&di.has(s.position)||Bo(n)&&!o&&ui(t,n))?i=i.filter((t=>t!==n)):s=e,n=Jo(n)}return e.set(t,i),i}(e,this._c):[].concat(o),i],n=r[0],a=r.reduce(((t,o)=>{const i=pi(e,o,s);return t.top=eo(i.top,t.top),t.right=to(i.right,t.right),t.bottom=to(i.bottom,t.bottom),t.left=eo(i.left,t.left),t}),pi(e,n,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:gi,getElementRects:async function(t){const e=this.getOffsetParent||gi,o=this.getDimensions,i=await o(t.floating);return{reference:fi(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:o}=oi(t);return{width:e,height:o}},getScale:si,isElement:Fo,isRTL:function(t){return"rtl"===Xo(t).direction}};function yi(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function wi(t,e,o,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=ii(t),h=s||r?[...c?ti(c):[],...ti(e)]:[];h.forEach((t=>{s&&t.addEventListener("scroll",o,{passive:!0}),r&&t.addEventListener("resize",o)}));const d=c&&a?function(t,e){let o,i=null;const s=Lo(t);function r(){var t;clearTimeout(o),null==(t=i)||t.disconnect(),i=null}return function n(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const c=t.getBoundingClientRect(),{left:h,top:d,width:p,height:u}=c;if(a||e(),!p||!u)return;const f={rootMargin:-io(d)+"px "+-io(s.clientWidth-(h+p))+"px "+-io(s.clientHeight-(d+u))+"px "+-io(h)+"px",threshold:eo(0,to(1,l))||1};let b=!0;function m(e){const i=e[0].intersectionRatio;if(i!==l){if(!b)return n();i?n(!1,i):o=setTimeout((()=>{n(!1,1e-7)}),1e3)}1!==i||yi(c,t.getBoundingClientRect())||n(),b=!1}try{i=new IntersectionObserver(m,{...f,root:s.ownerDocument})}catch(t){i=new IntersectionObserver(m,f)}i.observe(t)}(!0),r}(c,o):null;let p,u=-1,f=null;n&&(f=new ResizeObserver((t=>{let[i]=t;i&&i.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{var t;null==(t=f)||t.observe(e)}))),o()})),c&&!l&&f.observe(c),f.observe(e));let b=l?ai(t):null;return l&&function e(){const i=ai(t);b&&!yi(b,i)&&o();b=i,p=requestAnimationFrame(e)}(),o(),()=>{var t;h.forEach((t=>{s&&t.removeEventListener("scroll",o),r&&t.removeEventListener("resize",o)})),null==d||d(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const _i=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var o,i;const{x:s,y:r,placement:n,middlewareData:a}=e,l=await async function(t,e){const{placement:o,platform:i,elements:s}=t,r=await(null==i.isRTL?void 0:i.isRTL(s.floating)),n=co(o),a=ho(o),l="y"===bo(o),c=So.has(n)?-1:1,h=r&&l?-1:1,d=lo(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(u="end"===a?-1*f:f),l?{x:u*h,y:p*c}:{x:p*c,y:u*h}}(e,t);return n===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:n}}}}},xi=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:n=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=lo(t,e),c={x:o,y:i},h=await Eo(e,l),d=bo(co(s)),p=po(d);let u=c[p],f=c[d];if(r){const t="y"===p?"bottom":"right";u=ao(u+h["y"===p?"top":"left"],u,u-h[t])}if(n){const t="y"===d?"bottom":"right";f=ao(f+h["y"===d?"top":"left"],f,f-h[t])}const b=a.fn({...e,[p]:u,[d]:f});return{...b,data:{x:b.x-o,y:b.y-i,enabled:{[p]:r,[d]:n}}}}}},$i=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var o,i;const{placement:s,middlewareData:r,rects:n,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:b=!0,...m}=lo(t,e);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const g=co(s),v=bo(a),y=co(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),_=p||(y||!b?[$o(a)]:function(t){const e=$o(t);return[go(t),e,go(e)]}(a)),x="none"!==f;!p&&x&&_.push(...xo(a,b,f,w));const $=[a,..._],k=await Eo(e,m),C=[];let A=(null==(i=r.flip)?void 0:i.overflows)||[];if(h&&C.push(k[g]),d){const t=function(t,e,o){void 0===o&&(o=!1);const i=ho(t),s=mo(t),r=uo(s);let n="x"===s?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(n=$o(n)),[n,$o(n)]}(s,n,w);C.push(k[t[0]],k[t[1]])}if(A=[...A,{placement:s,overflows:C}],!C.every((t=>t<=0))){var E,S;const t=((null==(E=r.flip)?void 0:E.index)||0)+1,e=$[t];if(e){if(!("alignment"===d&&v!==bo(e))||A.every((t=>bo(t.placement)!==v||t.overflows[0]>0)))return{data:{index:t,overflows:A},reset:{placement:e}}}let o=null==(S=A.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:S.placement;if(!o)switch(u){case"bestFit":{var z;const t=null==(z=A.filter((t=>{if(x){const e=bo(t.placement);return e===v||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:z[0];t&&(o=t);break}case"initialPlacement":o=a}if(s!==o)return{reset:{placement:o}}}return{}}}},ki=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var o,i;const{placement:s,rects:r,platform:n,elements:a}=e,{apply:l=()=>{},...c}=lo(t,e),h=await Eo(e,c),d=co(s),p=ho(s),u="y"===bo(s),{width:f,height:b}=r.floating;let m,g;"top"===d||"bottom"===d?(m=d,g=p===(await(null==n.isRTL?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,m="end"===p?"top":"bottom");const v=b-h.top-h.bottom,y=f-h.left-h.right,w=to(b-h[m],v),_=to(f-h[g],y),x=!e.middlewareData.shift;let $=w,k=_;if(null!=(o=e.middlewareData.shift)&&o.enabled.x&&(k=y),null!=(i=e.middlewareData.shift)&&i.enabled.y&&($=v),x&&!p){const t=eo(h.left,0),e=eo(h.right,0),o=eo(h.top,0),i=eo(h.bottom,0);u?k=f-2*(0!==t||0!==e?t+e:eo(h.left,h.right)):$=b-2*(0!==o||0!==i?o+i:eo(h.top,h.bottom))}await l({...e,availableWidth:k,availableHeight:$});const C=await n.getDimensions(a.floating);return f!==C.width||b!==C.height?{reset:{rects:!0}}:{}}}},Ci=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:i,placement:s,rects:r,platform:n,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=lo(t,e)||{};if(null==c)return{};const d=ko(h),p={x:o,y:i},u=mo(s),f=uo(u),b=await n.getDimensions(c),m="y"===u,g=m?"top":"left",v=m?"bottom":"right",y=m?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[u]-p[u]-r.floating[f],_=p[u]-r.reference[u],x=await(null==n.getOffsetParent?void 0:n.getOffsetParent(c));let $=x?x[y]:0;$&&await(null==n.isElement?void 0:n.isElement(x))||($=a.floating[y]||r.floating[f]);const k=w/2-_/2,C=$/2-b[f]/2-1,A=to(d[g],C),E=to(d[v],C),S=A,z=$-b[f]-E,T=$/2-b[f]/2+k,P=ao(S,T,z),L=!l.arrow&&null!=ho(s)&&T!==P&&r.reference[f]/2-(T<S?A:E)-b[f]/2<0,O=L?T<S?T-S:T-z:0;return{[u]:p[u]+O,data:{[u]:P,centerOffset:T-P-O,...L&&{alignmentOffset:O}},reset:L}}}),Ai=(t,e,o)=>{const i=new Map,s={platform:vi,...o},r={...s.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:n}=o,a=r.filter(Boolean),l=await(null==n.isRTL?void 0:n.isRTL(e));let c=await n.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:d}=Ao(c,i,l),p=i,u={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:b}=a[o],{x:m,y:g,data:v,reset:y}=await b({x:h,y:d,initialPlacement:i,placement:p,strategy:s,middlewareData:u,rects:c,platform:n,elements:{reference:t,floating:e}});h=null!=m?m:h,d=null!=g?g:d,u={...u,[r]:{...u[r],...v}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(c=!0===y.rects?await n.getElementRects({reference:t,floating:e,strategy:s}):y.rects),({x:h,y:d}=Ao(c,p,l))),o=-1)}return{x:h,y:d,placement:p,strategy:s,middlewareData:u}})(t,e,{...s,platform:r})};function Ei(t){return function(t){for(let e=t;e;e=Si(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=Si(t);e;e=Si(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||qo(t))return e;if("BODY"===e.tagName)return e}}return null}(t)}function Si(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}var zi=class extends qt{constructor(){super(...arguments),this.localize=new De(this),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect();let o=0,i=0,s=0,r=0,n=0,a=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")?t.top<e.top?(o=t.left,i=t.bottom,s=t.right,r=t.bottom,n=e.left,a=e.top,l=e.right,c=e.top):(o=e.left,i=e.bottom,s=e.right,r=e.bottom,n=t.left,a=t.top,l=t.right,c=t.top):t.left<e.left?(o=t.right,i=t.top,s=e.left,r=e.top,n=t.right,a=t.bottom,l=e.left,c=e.bottom):(o=e.right,i=e.top,s=t.left,r=t.top,n=e.right,a=e.bottom,l=t.left,c=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${o}px`),this.style.setProperty("--hover-bridge-top-left-y",`${i}px`),this.style.setProperty("--hover-bridge-top-right-x",`${s}px`),this.style.setProperty("--hover-bridge-top-right-y",`${r}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${n}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${a}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||function(t){return null!==t&&"object"==typeof t&&"getBoundingClientRect"in t&&(!("contextElement"in t)||t.contextElement instanceof Element)}(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.active&&this.start()}start(){this.anchorEl&&this.active&&(this.cleanup=wi(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[_i({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(ki({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,o="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=o?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push($i({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(xi({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(ki({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Ci({element:this.arrowEl,padding:this.arrowPadding}));const e="absolute"===this.strategy?t=>vi.getOffsetParent(t,Ei):vi.getOffsetParent;Ai(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:d(h({},vi),{getOffsetParent:e})}).then((({x:t,y:e,middlewareData:o,placement:i})=>{const s="rtl"===this.localize.dir(),r={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];if(this.setAttribute("data-current-placement",i),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=o.arrow.x,e=o.arrow.y;let i="",n="",a="",l="";if("start"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";i="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",n=s?o:"",l=s?"":o}else if("end"===this.arrowPlacement){const o="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";n=s?"":o,l=s?o:"",a="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",i="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",i="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:i,right:n,bottom:a,left:l,[r]:"calc(var(--arrow-size-diagonal) * -1)"})}})),requestAnimationFrame((()=>this.updateHoverBridge())),this.emit("sl-reposition")}render(){return lt`
|
934
950
|
<slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
|
935
951
|
|
936
952
|
<span
|
937
953
|
part="hover-bridge"
|
938
|
-
class=${
|
954
|
+
class=${Jt({"popup-hover-bridge":!0,"popup-hover-bridge--visible":this.hoverBridge&&this.active})}
|
939
955
|
></span>
|
940
956
|
|
941
957
|
<div
|
942
958
|
part="popup"
|
943
|
-
class=${
|
959
|
+
class=${Jt({popup:!0,"popup--active":this.active,"popup--fixed":"fixed"===this.strategy,"popup--has-arrow":this.arrow})}
|
944
960
|
>
|
945
961
|
<slot></slot>
|
946
|
-
${this.arrow?
|
962
|
+
${this.arrow?lt`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
|
947
963
|
</div>
|
948
|
-
`}};function
|
964
|
+
`}};function Ti(t,e){return new Promise((o=>{t.addEventListener(e,(function i(s){s.target===t&&(t.removeEventListener(e,i),o())}))}))}function Pi(t,e,o){return new Promise((i=>{if((null==o?void 0:o.duration)===1/0)throw new Error("Promise-based animations must be finite.");const s=t.animate(e,d(h({},o),{duration:Oi()?0:o.duration}));s.addEventListener("cancel",i,{once:!0}),s.addEventListener("finish",i,{once:!0})}))}function Li(t){return(t=t.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?1e3*parseFloat(t):parseFloat(t)}function Oi(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Fi(t){return Promise.all(t.getAnimations().map((t=>new Promise((e=>{t.cancel(),requestAnimationFrame(e)})))))}zi.styles=[Nt,Qe],p([Wt(".popup")],zi.prototype,"popup",2),p([Wt(".popup__arrow")],zi.prototype,"arrowEl",2),p([It()],zi.prototype,"anchor",2),p([It({type:Boolean,reflect:!0})],zi.prototype,"active",2),p([It({reflect:!0})],zi.prototype,"placement",2),p([It({reflect:!0})],zi.prototype,"strategy",2),p([It({type:Number})],zi.prototype,"distance",2),p([It({type:Number})],zi.prototype,"skidding",2),p([It({type:Boolean})],zi.prototype,"arrow",2),p([It({attribute:"arrow-placement"})],zi.prototype,"arrowPlacement",2),p([It({attribute:"arrow-padding",type:Number})],zi.prototype,"arrowPadding",2),p([It({type:Boolean})],zi.prototype,"flip",2),p([It({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],zi.prototype,"flipFallbackPlacements",2),p([It({attribute:"flip-fallback-strategy"})],zi.prototype,"flipFallbackStrategy",2),p([It({type:Object})],zi.prototype,"flipBoundary",2),p([It({attribute:"flip-padding",type:Number})],zi.prototype,"flipPadding",2),p([It({type:Boolean})],zi.prototype,"shift",2),p([It({type:Object})],zi.prototype,"shiftBoundary",2),p([It({attribute:"shift-padding",type:Number})],zi.prototype,"shiftPadding",2),p([It({attribute:"auto-size"})],zi.prototype,"autoSize",2),p([It()],zi.prototype,"sync",2),p([It({type:Object})],zi.prototype,"autoSizeBoundary",2),p([It({attribute:"auto-size-padding",type:Number})],zi.prototype,"autoSizePadding",2),p([It({attribute:"hover-bridge",type:Boolean})],zi.prototype,"hoverBridge",2);var Ri=class extends qt{constructor(){super(),this.localize=new De(this),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleDocumentKeyDown=t=>{"Escape"===t.key&&(t.stopPropagation(),this.hide())},this.handleMouseOver=()=>{if(this.hasTrigger("hover")){const t=Li(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=Li(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),t)}},this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){var t,e;if(this.open){if(this.disabled)return;this.emit("sl-show"),"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),await Fi(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:e,options:o}=w(this,"tooltip.show",{dir:this.localize.dir()});await Pi(this.popup.popup,e,o),this.popup.reposition(),this.emit("sl-after-show")}else{this.emit("sl-hide"),null==(e=this.closeWatcher)||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown),await Fi(this.body);const{keyframes:t,options:o}=w(this,"tooltip.hide",{dir:this.localize.dir()});await Pi(this.popup.popup,t,o),this.popup.active=!1,this.body.hidden=!0,this.emit("sl-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Ti(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,Ti(this,"sl-after-hide")}render(){return lt`
|
949
965
|
<sl-popup
|
950
966
|
part="base"
|
951
967
|
exportparts="
|
952
968
|
popup:base__popup,
|
953
969
|
arrow:base__arrow
|
954
970
|
"
|
955
|
-
class=${
|
971
|
+
class=${Jt({tooltip:!0,"tooltip--open":this.open})}
|
956
972
|
placement=${this.placement}
|
957
973
|
distance=${this.distance}
|
958
974
|
skidding=${this.skidding}
|
@@ -970,7 +986,7 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
970
986
|
<slot name="content">${this.content}</slot>
|
971
987
|
</div>
|
972
988
|
</sl-popup>
|
973
|
-
`}};
|
989
|
+
`}};Ri.styles=[Nt,Je],Ri.dependencies={"sl-popup":zi},p([Wt("slot:not([name])")],Ri.prototype,"defaultSlot",2),p([Wt(".tooltip__body")],Ri.prototype,"body",2),p([Wt("sl-popup")],Ri.prototype,"popup",2),p([It()],Ri.prototype,"content",2),p([It()],Ri.prototype,"placement",2),p([It({type:Boolean,reflect:!0})],Ri.prototype,"disabled",2),p([It({type:Number})],Ri.prototype,"distance",2),p([It({type:Boolean,reflect:!0})],Ri.prototype,"open",2),p([It({type:Number})],Ri.prototype,"skidding",2),p([It()],Ri.prototype,"trigger",2),p([It({type:Boolean})],Ri.prototype,"hoist",2),p([Bt("open",{waitUntilFirstUpdate:!0})],Ri.prototype,"handleOpenChange",1),p([Bt(["content","distance","hoist","placement","skidding"])],Ri.prototype,"handleOptionsChange",1),p([Bt("disabled")],Ri.prototype,"handleDisabledChange",1),y("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),y("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),Ri.define("sl-tooltip");var Di=A`
|
974
990
|
:host {
|
975
991
|
--height: 1rem;
|
976
992
|
--track-color: var(--sl-color-neutral-200);
|
@@ -1057,22 +1073,22 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
1057
1073
|
* @license
|
1058
1074
|
* Copyright 2018 Google LLC
|
1059
1075
|
* SPDX-License-Identifier: BSD-3-Clause
|
1060
|
-
*/;const
|
1076
|
+
*/;const Mi="important",Bi=" !"+Mi,Ni=Xt(class extends Yt{constructor(t){if(super(t),t.type!==Kt||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?o.removeProperty(t):o[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ft.add(t);const e="string"==typeof i&&i.endsWith(Bi);t.includes("-")||e?o.setProperty(t,e?i.slice(0,-11):i,e?Mi:""):o[t]=i}}return ct}});var Hi=class extends qt{constructor(){super(...arguments),this.localize=new De(this),this.value=0,this.indeterminate=!1,this.label=""}render(){return lt`
|
1061
1077
|
<div
|
1062
1078
|
part="base"
|
1063
|
-
class=${
|
1079
|
+
class=${Jt({"progress-bar":!0,"progress-bar--indeterminate":this.indeterminate,"progress-bar--rtl":"rtl"===this.localize.dir()})}
|
1064
1080
|
role="progressbar"
|
1065
|
-
title=${
|
1081
|
+
title=${Qt(this.title)}
|
1066
1082
|
aria-label=${this.label.length>0?this.label:this.localize.term("progress")}
|
1067
1083
|
aria-valuemin="0"
|
1068
1084
|
aria-valuemax="100"
|
1069
1085
|
aria-valuenow=${this.indeterminate?0:this.value}
|
1070
1086
|
>
|
1071
|
-
<div part="indicator" class="progress-bar__indicator" style=${
|
1072
|
-
${this.indeterminate?"":
|
1087
|
+
<div part="indicator" class="progress-bar__indicator" style=${Ni({width:`${this.value}%`})}>
|
1088
|
+
${this.indeterminate?"":lt` <slot part="label" class="progress-bar__label"></slot> `}
|
1073
1089
|
</div>
|
1074
1090
|
</div>
|
1075
|
-
`}};
|
1091
|
+
`}};function*Ui(t=document.activeElement){null!=t&&(yield t,"shadowRoot"in t&&t.shadowRoot&&"closed"!==t.shadowRoot.mode&&(yield*b(Ui(t.shadowRoot.activeElement))))}Hi.styles=[Nt,Di],p([It({type:Number,reflect:!0})],Hi.prototype,"value",2),p([It({type:Boolean,reflect:!0})],Hi.prototype,"indeterminate",2),p([It()],Hi.prototype,"label",2),Hi.define("sl-progress-bar");var Ii=new WeakMap;function Vi(t){let e=Ii.get(t);return e||(e=window.getComputedStyle(t,null),Ii.set(t,e)),e}function Wi(t){const e=t.tagName.toLowerCase(),o=Number(t.getAttribute("tabindex"));if(t.hasAttribute("tabindex")&&(isNaN(o)||o<=-1))return!1;if(t.hasAttribute("disabled"))return!1;if(t.closest("[inert]"))return!1;if("input"===e&&"radio"===t.getAttribute("type")){const e=t.getRootNode(),o=`input[type='radio'][name="${t.getAttribute("name")}"]`,i=e.querySelector(`${o}:checked`);if(i)return i===t;return e.querySelector(o)===t}if(!function(t){if("function"==typeof t.checkVisibility)return t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const e=Vi(t);return"hidden"!==e.visibility&&"none"!==e.display}(t))return!1;if(("audio"===e||"video"===e)&&t.hasAttribute("controls"))return!0;if(t.hasAttribute("tabindex"))return!0;if(t.hasAttribute("contenteditable")&&"false"!==t.getAttribute("contenteditable"))return!0;return!!["button","input","select","textarea","a","audio","video","summary","iframe"].includes(e)||function(t){const e=Vi(t),{overflowY:o,overflowX:i}=e;return"scroll"===o||"scroll"===i||"auto"===o&&"auto"===i&&(t.scrollHeight>t.clientHeight&&"auto"===o||!(!(t.scrollWidth>t.clientWidth)||"auto"!==i))}(t)}function ji(t){const e=new WeakMap,o=[];return function i(s){if(s instanceof Element){if(s.hasAttribute("inert")||s.closest("[inert]"))return;if(e.has(s))return;e.set(s,!0),!o.includes(s)&&Wi(s)&&o.push(s),s instanceof HTMLSlotElement&&function(t,e){var o;return(null==(o=t.getRootNode({composed:!0}))?void 0:o.host)!==e}(s,t)&&s.assignedElements({flatten:!0}).forEach((t=>{i(t)})),null!==s.shadowRoot&&"open"===s.shadowRoot.mode&&i(s.shadowRoot)}for(const t of s.children)i(t)}(t),o.sort(((t,e)=>{const o=Number(t.getAttribute("tabindex"))||0;return(Number(e.getAttribute("tabindex"))||0)-o}))}var qi=[],Ki=class{constructor(t){this.tabDirection="forward",this.handleFocusIn=()=>{this.isActive()&&this.checkFocus()},this.handleKeyDown=t=>{var e;if("Tab"!==t.key||this.isExternalActivated)return;if(!this.isActive())return;const o=[...Ui()].pop();if(this.previousFocus=o,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;t.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const i=ji(this.element);let s=i.findIndex((t=>t===o));this.previousFocus=this.currentFocus;const r="forward"===this.tabDirection?1:-1;for(;;){s+r>=i.length?s=0:s+r<0?s=i.length-1:s+=r,this.previousFocus=this.currentFocus;const o=i[s];if("backward"===this.tabDirection&&this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;if(o&&this.possiblyHasTabbableChildren(o))return;t.preventDefault(),this.currentFocus=o,null==(e=this.currentFocus)||e.focus({preventScroll:!1});const n=[...Ui()];if(n.includes(this.currentFocus)||!n.includes(this.previousFocus))break}setTimeout((()=>this.checkFocus()))},this.handleKeyUp=()=>{this.tabDirection="forward"},this.element=t,this.elementsWithTabbableControls=["iframe"]}activate(){qi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){qi=qi.filter((t=>t!==this.element)),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return qi[qi.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const t=ji(this.element);if(!this.element.matches(":focus-within")){const e=t[0],o=t[t.length-1],i="forward"===this.tabDirection?e:o;"function"==typeof(null==i?void 0:i.focus)&&(this.currentFocus=i,i.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(t){return this.elementsWithTabbableControls.includes(t.tagName.toLowerCase())||t.hasAttribute("controls")}},Zi=A`
|
1076
1092
|
:host {
|
1077
1093
|
--width: 31rem;
|
1078
1094
|
--header-spacing: var(--sl-spacing-large);
|
@@ -1189,10 +1205,10 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
1189
1205
|
border: solid 1px var(--sl-color-neutral-0);
|
1190
1206
|
}
|
1191
1207
|
}
|
1192
|
-
`,
|
1208
|
+
`,Gi=class extends qt{constructor(){super(...arguments),this.hasSlotController=new Mt(this,"footer"),this.localize=new De(this),this.modal=new Ki(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.modal.isActive()&&this.open&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Ve(this))}disconnectedCallback(){super.disconnectedCallback(),this.modal.deactivate(),We(this),this.removeOpenListeners()}requestClose(t){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=w(this,"dialog.denyClose",{dir:this.localize.dir()});Pi(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){var t;"CloseWatcher"in window?(null==(t=this.closeWatcher)||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var t;null==(t=this.closeWatcher)||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),Ve(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([Fi(this.dialog),Fi(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=w(this,"dialog.show",{dir:this.localize.dir()}),o=w(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([Pi(this.panel,e.keyframes,e.options),Pi(this.overlay,o.keyframes,o.options)]),this.emit("sl-after-show")}else{(t=>{var e;const{activeElement:o}=document;o&&t.contains(o)&&(null==(e=document.activeElement)||e.blur())})(this),this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([Fi(this.dialog),Fi(this.overlay)]);const t=w(this,"dialog.hide",{dir:this.localize.dir()}),e=w(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([Pi(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),Pi(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,We(this);const o=this.originalTrigger;"function"==typeof(null==o?void 0:o.focus)&&setTimeout((()=>o.focus())),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,Ti(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,Ti(this,"sl-after-hide")}render(){return lt`
|
1193
1209
|
<div
|
1194
1210
|
part="base"
|
1195
|
-
class=${
|
1211
|
+
class=${Jt({dialog:!0,"dialog--open":this.open,"dialog--has-footer":this.hasSlotController.test("footer")})}
|
1196
1212
|
>
|
1197
1213
|
<div part="overlay" class="dialog__overlay" @click=${()=>this.requestClose("overlay")} tabindex="-1"></div>
|
1198
1214
|
|
@@ -1202,11 +1218,11 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
1202
1218
|
role="dialog"
|
1203
1219
|
aria-modal="true"
|
1204
1220
|
aria-hidden=${this.open?"false":"true"}
|
1205
|
-
aria-label=${
|
1206
|
-
aria-labelledby=${
|
1221
|
+
aria-label=${Qt(this.noHeader?this.label:void 0)}
|
1222
|
+
aria-labelledby=${Qt(this.noHeader?void 0:"title")}
|
1207
1223
|
tabindex="-1"
|
1208
1224
|
>
|
1209
|
-
${this.noHeader?"":
|
1225
|
+
${this.noHeader?"":lt`
|
1210
1226
|
<header part="header" class="dialog__header">
|
1211
1227
|
<h2 part="title" class="dialog__title" id="title">
|
1212
1228
|
<slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(65279)} </slot>
|
@@ -1233,4 +1249,4 @@ const fe=Symbol.for(""),me=t=>{if(t?.r===fe)return t?._$litStatic$},be=(t,...e)=
|
|
1233
1249
|
</footer>
|
1234
1250
|
</div>
|
1235
1251
|
</div>
|
1236
|
-
`}};
|
1252
|
+
`}};Gi.styles=[Nt,Zi],Gi.dependencies={"sl-icon-button":ke},p([Wt(".dialog")],Gi.prototype,"dialog",2),p([Wt(".dialog__panel")],Gi.prototype,"panel",2),p([Wt(".dialog__overlay")],Gi.prototype,"overlay",2),p([It({type:Boolean,reflect:!0})],Gi.prototype,"open",2),p([It({reflect:!0})],Gi.prototype,"label",2),p([It({attribute:"no-header",type:Boolean,reflect:!0})],Gi.prototype,"noHeader",2),p([Bt("open",{waitUntilFirstUpdate:!0})],Gi.prototype,"handleOpenChange",1),y("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),y("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),y("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),y("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),y("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),Gi.define("sl-dialog");export{pe as registerIconLibrary,y as setDefaultAnimation};
|