diff --git a/Gemfile.lock b/Gemfile.lock index 59c6c834fe52..968838b3d511 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -341,11 +341,10 @@ GEM activerecord (>= 4.0.0, < 7.2) aws-eventstream (1.3.0) aws-partitions (1.894.0) - aws-sdk-core (3.191.2) + aws-sdk-core (3.191.3) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.8) - base64 jmespath (~> 1, >= 1.6.1) aws-sdk-kms (1.77.0) aws-sdk-core (~> 3, >= 3.191.0) @@ -566,7 +565,7 @@ GEM fugit (>= 1.1) railties (>= 6.0.0) thor (>= 0.14.1) - google-apis-core (0.13.0) + google-apis-core (0.14.0) addressable (~> 2.5, >= 2.5.1) googleauth (~> 1.9) httpclient (>= 2.8.1, < 3.a) @@ -574,8 +573,8 @@ GEM representable (~> 3.0) retriable (>= 2.0, < 4.a) rexml - google-apis-gmail_v1 (0.38.0) - google-apis-core (>= 0.12.0, < 2.a) + google-apis-gmail_v1 (0.39.0) + google-apis-core (>= 0.14.0, < 2.a) google-cloud-env (2.1.1) faraday (>= 1.0, < 3.a) googleauth (1.11.0) @@ -663,7 +662,7 @@ GEM language_server-protocol (3.17.0.3) launchy (2.5.2) addressable (~> 2.8) - lefthook (1.6.1) + lefthook (1.6.3) letter_opener (1.9.0) launchy (>= 2.2, < 3) listen (3.8.0) diff --git a/app/components/application_component.rb b/app/components/application_component.rb index a964792b7a29..e603d1194588 100644 --- a/app/components/application_component.rb +++ b/app/components/application_component.rb @@ -37,7 +37,9 @@ def initialize(model = nil, **options) @options = options end - delegate :url_helpers, to: 'Rails.application.routes' + def url_helpers + @url_helpers ||= OpenProject::StaticRouting::StaticUrlHelpers.new + end class << self ## diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index 4094618a33ad..246abb7af12f 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -127,6 +127,10 @@ def theme super.presence || Setting.user_default_theme end + def high_contrast_theme? + theme.end_with?('high_contrast') + end + def time_zone super.presence || Setting.user_default_timezone.presence end diff --git a/app/services/copy/concerns/copy_attachments.rb b/app/services/copy/concerns/copy_attachments.rb index 869c0d135ef4..ba22146b68e2 100644 --- a/app/services/copy/concerns/copy_attachments.rb +++ b/app/services/copy/concerns/copy_attachments.rb @@ -3,20 +3,36 @@ module Concerns module CopyAttachments ## # Tries to copy the given attachment between containers - def copy_attachments(container_type, from_id:, to_id:) + def copy_attachments(container_type, from:, to:, references: []) Attachment - .where(container_type:, container_id: from_id) + .where(container_type:, container_id: from.id) .find_each do |source| - copy = Attachment - .new(attachment_copy_attributes(source, to_id)) - source.file.copy_to(copy) + copy_attachment(from:, to:, references:, source:) + end + + if to.changed? && !to.save + Rails.logger.error { "Failed to update copied attachment references in to #{to}: #{to.errors.full_messages}" } + end + end + + def copy_attachment(source:, from:, to:, references:) + copy = Attachment + .new(attachment_copy_attributes(source, to.id)) + source.file.copy_to(copy) - unless copy.save - Rails.logger.error { "Attachments ##{source.id} could not be copy: #{copy.errors.full_messages} " } - end - rescue StandardError => e - Rails.logger.error { "Failed to copy attachments from ##{from_id} to ##{to_id}: #{e}" } + if copy.save + update_references( + attachment_source: source.id, + attachment_target: copy.id, + model_source: from, + model_target: to, + references: + ) + else + Rails.logger.error { "Attachments ##{source.id} could not be copy: #{copy.errors.full_messages} " } end + rescue StandardError => e + Rails.logger.error { "Failed to copy attachments from #{from} to #{to}: #{e}" } end def attachment_copy_attributes(source, to_id) @@ -27,6 +43,18 @@ def attachment_copy_attributes(source, to_id) .merge('author_id' => user.id, 'container_id' => to_id) end + + def update_references(attachment_source:, attachment_target:, model_source:, model_target:, references:) + references.each do |reference| + text = model_source.send(reference) + next if text.nil? + + replaced = text.gsub("/api/v3/attachments/#{attachment_source}/content", + "/api/v3/attachments/#{attachment_target}/content") + + model_target.send(:"#{reference}=", replaced) + end + end end end end diff --git a/app/services/wiki_pages/copy_service.rb b/app/services/wiki_pages/copy_service.rb index 7e37b9f670b8..118b62e8553e 100644 --- a/app/services/wiki_pages/copy_service.rb +++ b/app/services/wiki_pages/copy_service.rb @@ -79,6 +79,11 @@ def writable_attributes end def copy_wiki_page_attachments(copy) - copy_attachments('WikiPage', from_id: model.id, to_id: copy.id) + copy_attachments( + 'WikiPage', + from: model, + to: copy, + references: %i[text] + ) end end diff --git a/app/services/work_packages/copy_service.rb b/app/services/work_packages/copy_service.rb index c23bb1602445..6f2f0e0616bb 100644 --- a/app/services/work_packages/copy_service.rb +++ b/app/services/work_packages/copy_service.rb @@ -105,6 +105,11 @@ def copy_watchers(copied) end def copy_work_package_attachments(copy) - copy_attachments('WorkPackage', from_id: work_package.id, to_id: copy.id) + copy_attachments( + 'WorkPackage', + from: work_package, + to: copy, + references: %i[description] + ) end end diff --git a/app/views/custom_styles/_inline_css_logo.erb b/app/views/custom_styles/_inline_css_logo.erb index 0c59172ba562..8059da75e50b 100644 --- a/app/views/custom_styles/_inline_css_logo.erb +++ b/app/views/custom_styles/_inline_css_logo.erb @@ -29,19 +29,25 @@ See COPYRIGHT and LICENSE files for more details. <% cache(CustomStyle.current) do %> <% end %> diff --git a/config/constants/settings/definition.rb b/config/constants/settings/definition.rb index f88bccbff1ea..1403a3016395 100644 --- a/config/constants/settings/definition.rb +++ b/config/constants/settings/definition.rb @@ -756,6 +756,34 @@ class Definition format: :string, default: nil }, + httpx_connect_timeout: { + description: '', + format: :float, + writable: false, + allowed: (0..), + default: 3 + }, + httpx_read_timeout: { + description: '', + format: :float, + writable: false, + allowed: (0..), + default: 3 + }, + httpx_write_timeout: { + description: '', + format: :float, + writable: false, + allowed: (0..), + default: 3 + }, + httpx_keep_alive_timeout: { + description: '', + format: :float, + writable: false, + allowed: (0..), + default: 20 + }, rate_limiting: { default: {}, description: 'Configure rate limiting for various endpoint rules. See configuration documentation for details.' diff --git a/config/locales/crowdin/js-ms.yml b/config/locales/crowdin/js-ms.yml new file mode 100644 index 000000000000..a6e21ed10f6c --- /dev/null +++ b/config/locales/crowdin/js-ms.yml @@ -0,0 +1,1321 @@ +#-- copyright +#OpenProject is an open source project management software. +#Copyright (C) 2012-2024 the OpenProject GmbH +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License version 3. +#OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +#Copyright (C) 2006-2013 Jean-Philippe Lang +#Copyright (C) 2010-2013 the ChiliProject Team +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#See COPYRIGHT and LICENSE files for more details. +#++ +ms: + js: + ajax: + hide: "Hide" + loading: "Loading…" + updating: "Updating…" + attachments: + delete: "Delete attachment" + delete_confirmation: | + Are you sure you want to delete this file? This action is not reversible. + draggable_hint: | + Drag on editor field to inline image or reference attachment. Closed editor fields will be opened while you keep dragging. + quarantined_hint: "The file is quarantined, as a virus was found. It is not available for download." + autocomplete_ng_select: + add_tag: "Add item" + clear_all: "Clear all" + loading: "Loading..." + not_found: "No items found" + type_to_search: "Type to search" + autocomplete_select: + placeholder: + multi: "Add \"%{name}\"" + single: "Select \"%{name}\"" + remove: "Remove %{name}" + active: "Active %{label} %{name}" + backup: + attachments_disabled: Attachments may not be included since they exceed the maximum overall size allowed. You can change this via the configuration (requires a server restart). + info: > + You can trigger a backup here. The process can take some time depending on the amount of data (especially attachments) you have. You will receive an email once it's ready. + note: > + A new backup will override any previous one. Only a limited number of backups per day can be requested. + last_backup: Last backup + last_backup_from: Last backup from + title: Backup OpenProject + options: Options + include_attachments: Include attachments + download_backup: Download backup + request_backup: Request backup + close_popup_title: "Close popup" + close_filter_title: "Close filter" + close_form_title: "Close form" + button_add_watcher: "Add watcher" + button_add: "Add" + button_back: "Back" + button_back_to_list_view: "Back to list view" + button_cancel: "Cancel" + button_close: "Close" + button_change_project: "Change project" + button_check_all: "Check all" + button_configure-form: "Configure form" + button_confirm: "Confirm" + button_continue: "Continue" + button_copy: "Copy" + button_copy_to_clipboard: "Copy to clipboard" + button_copy_link_to_clipboard: "Copy link to clipboard" + button_copy_to_other_project: "Copy to other project" + button_custom-fields: "Custom fields" + button_delete: "Delete" + button_delete_watcher: "Delete watcher" + button_details_view: "Details view" + button_duplicate: "Duplicate" + button_edit: "Edit" + button_filter: "Filter" + button_collapse_all: "Collapse all" + button_expand_all: "Expand all" + button_advanced_filter: "Advanced filter" + button_list_view: "List view" + button_show_view: "Fullscreen view" + button_log_time: "Log time" + button_more: "More" + button_open_details: "Open details view" + button_close_details: "Close details view" + button_open_fullscreen: "Open fullscreen view" + button_show_cards: "Show card view" + button_show_list: "Show list view" + button_show_table: "Show table view" + button_show_gantt: "Show Gantt view" + button_show_fullscreen: "Show fullscreen view" + button_more_actions: "More actions" + button_quote: "Quote" + button_save: "Save" + button_settings: "Settings" + button_uncheck_all: "Uncheck all" + button_update: "Kemaskini" + button_export-pdf: "Download PDF" + button_export-atom: "Download Atom" + button_create: "Create" + card: + add_new: 'Add new card' + highlighting: + inline: 'Highlight inline:' + entire_card_by: 'Entire card by' + remove_from_list: 'Remove card from list' + caption_rate_history: "Rate history" + clipboard: + browser_error: "Your browser doesn't support copying to clipboard. Please copy it manually: %{content}" + copied_successful: "Successfully copied to clipboard!" + chart: + type: 'Chart type' + axis_criteria: 'Axis criteria' + modal_title: 'Work package graph configuration' + types: + line: 'Line' + horizontal_bar: 'Horizontal bar' + bar: 'Bar' + pie: 'Pie' + doughnut: 'Doughnut' + radar: 'Radar' + polar_area: 'Polar area' + tabs: + graph_settings: 'General' + dataset: 'Dataset %{number}' + errors: + could_not_load: 'The data to display the graph could not be loaded. The necessary permissions may be lacking.' + description_available_columns: "Available Columns" + description_current_position: "You are here: " + description_select_work_package: "Select work package #%{id}" + description_selected_columns: "Selected Columns" + description_subwork_package: "Child of work package #%{id}" + editor: + preview: 'Toggle preview mode' + source_code: 'Toggle Markdown source mode' + error_saving_failed: 'Saving the document failed with the following error: %{error}' + ckeditor_error: 'An error occurred within CKEditor' + mode: + manual: 'Switch to Markdown source' + wysiwyg: 'Switch to WYSIWYG editor' + macro: + error: 'Cannot expand macro: %{message}' + attribute_reference: + macro_help_tooltip: 'This text segment is being dynamically rendered by a macro.' + not_found: 'Requested resource could not be found' + invalid_attribute: "The selected attribute '%{name}' does not exist." + child_pages: + button: 'Links to child pages' + include_parent: 'Include parent' + text: '[Placeholder] Links to child pages of' + page: 'Wiki page' + this_page: 'this page' + hint: | + Leave this field empty to list all child pages of the current page. If you want to reference a different page, provide its title or slug. + code_block: + button: 'Insert code snippet' + title: 'Insert / edit Code snippet' + language: 'Formatting language' + language_hint: 'Enter the formatting language that will be used for highlighting (if supported).' + dropdown: + macros: 'Macros' + chose_macro: 'Choose macro' + toc: 'Table of contents' + toolbar_help: 'Click to select widget and show the toolbar. Double-click to edit widget' + wiki_page_include: + button: 'Include content of another wiki page' + text: '[Placeholder] Included wiki page of' + page: 'Wiki page' + not_set: '(Page not yet set)' + hint: | + Include the content of another wiki page by specifying its title or slug. + You can include the wiki page of another project by separating them with a colon like the following example. + work_package_button: + button: 'Insert create work package button' + type: 'Work package type' + button_style: 'Use button style' + button_style_hint: 'Optional: Check to make macro appear as a button, not as a link.' + without_type: 'Create work package' + with_type: 'Create work package (Type: %{typename})' + embedded_table: + button: 'Embed work package table' + text: '[Placeholder] Embedded work package table' + embedded_calendar: + text: '[Placeholder] Embedded calendar' + admin: + type_form: + custom_field: 'Custom field' + inactive: 'Inactive' + drag_to_activate: "Drag fields from here to activate them" + add_group: "Add attribute group" + add_table: "Add table of related work packages" + edit_query: 'Edit query' + new_group: 'New group' + reset_to_defaults: 'Reset to defaults' + enterprise: + text_reprieve_days_left: "%{days} days until end of grace period" + text_expired: "expired" + trial: + confirmation: "Confirmation of email address" + confirmation_info: > + We sent you an email on %{date} to %{email}. Please check your inbox and click the confirmation link provided to start your 14 days trial. + form: + general_consent: > + I agree with the terms of service and the privacy policy. + invalid_email: "Invalid email address" + label_company: "Company" + label_first_name: "First name" + label_last_name: "Last name" + label_domain: "Domain" + label_subscriber: "Subscriber" + label_maximum_users: "Maximum active users" + label_starts_at: "Starts at" + label_expires_at: "Expires at" + receive_newsletter: I want to receive the OpenProject newsletter. + taken_domain: There can only be one active trial per domain. + domain_mismatch: The current request host name does not match the configured host name. Please double check your system settings. + taken_email: Each user can only create one trial. + email_not_received: "You did not receive an email? You can resend the email with the link on the right." + try_another_email: "Or try it with another email address." + next_steps: "Next steps" + resend_link: "Resend" + resend_success: "Email has been resent. Please check your emails and click the confirmation link provided." + resend_warning: "Could not resend email." + session_timeout: "Your session timed out. Please try to reload the page or resend email." + status_label: "Status:" + status_confirmed: "confirmed" + status_waiting: "email sent - waiting for confirmation" + test_ee: "Test the Enterprise edition 14 days for free" + quick_overview: "Get a quick overview of project management and team collaboration with OpenProject Enterprise edition." + upsale: + become_hero: "Become a hero!" + enterprise_info_html: "%{feature_title} is an Enterprise add-on." + upgrade_info: "Please upgrade to a paid plan to activate and start using it in your team." + benefits: + description: "What are the benefits of the Enterprise on-premises edition?" + high_security: "Security features" + high_security_text: "Single sign on (SAML, OpenID Connect, CAS), LDAP groups." + installation: "Installation support" + installation_text: "Experienced software engineers guide you through the complete installation and setup process in your own infrastructure." + premium_features: "Enterprise add-ons" + premium_features_text: "Agile boards, custom theme and logo, graphs, intelligent workflows with custom actions, full text search for work package attachments and multi-select custom fields." + professional_support: "Professional support" + professional_support_text: "Get reliable, high-touch support from senior support engineers with expert knowledge about running OpenProject in business-critical environments." + button_start_trial: "Start free trial" + button_upgrade: "Upgrade now" + button_contact_us: "Contact us for a demo" + button_book_now: "Book now" + confidence: > + We deliver the confidence of a tested and supported enterprise-class project management software - with Open Source and an open mind. + link_quote: "Get a quote" + more_info: "More information" + text: > + The OpenProject Enterprise edition builds on top of the Community edition. It includes Enterprise add-ons and professional support mainly aimed at organizations with more than 10 users that manage business critical projects with OpenProject. + unlimited: "Unlimited" + you_contribute: "Developers need to pay their bills, too. By upgrading to the Enterprise edition, you will be supporting this open source community effort and contributing to its development, maintenance and continuous improvement." + working_days: + calendar: + empty_state_header: "Non-working days" + empty_state_description: 'No specific non-working days are defined for this year. Click on "+ Non-working day" below to add a date.' + new_date: '(new)' + add_non_working_day: "Non-working day" + already_added_error: "A non-working day for this date exists already. There can only be one non-working day created for each unique date." + change_button: "Save and reschedule" + change_title: "Change working days" + removed_title: "You will remove the following days from the non-working days list:" + change_description: "Changing which days of the week are considered working days or non-working days can affect the start and finish days of all work packages in all projects in this instance." + warning: > + The changes might take some time to take effect. You will be notified when all relevant work packages have been updated. + Are you sure you want to continue? + custom_actions: + date: + specific: 'on' + current_date: 'Current date' + error: + internal: "An internal error has occurred." + cannot_save_changes_with_message: "Cannot save your changes due to the following error: %{error}" + query_saving: "The view could not be saved." + embedded_table_loading: "The embedded view could not be loaded: %{message}" + enumeration_activities: "Activities (time tracking)" + enumeration_doc_categories: "Document categories" + enumeration_work_package_priorities: "Work package priorities" + filter: + more_values_not_shown: "There are %{total} more results, search to filter results." + description: + text_open_filter: "Open this filter with 'ALT' and arrow keys." + text_close_filter: "To select an entry leave the focus for example by pressing enter. To leave without filter select the first (empty) entry." + noneElement: "(none)" + time_zone_converted: + two_values: "%{from} - %{to} in your local time." + only_start: "From %{from} in your local time." + only_end: "Till %{to} in your local time." + value_spacer: "-" + sorting: + criteria: + one: "First sorting criteria" + two: "Second sorting criteria" + three: "Third sorting criteria" + gantt_chart: + label: 'Gantt chart' + quarter_label: 'Q%{quarter_number}' + labels: + title: 'Label configuration' + bar: 'Bar labels' + left: 'Left' + right: 'Right' + farRight: 'Far right' + description: > + Select the attributes you want to be shown in the respective positions of the Gantt chart at all times. Note that when hovering over an element, its date labels will be shown instead of these attributes. + button_activate: 'Show Gantt chart' + button_deactivate: 'Hide Gantt chart' + filter: + noneSelection: "(none)" + selection_mode: + notification: 'Click on any highlighted work package to create the relation. Press escape to cancel.' + zoom: + in: "Zoom in" + out: "Zoom out" + auto: "Auto zoom" + days: "Days" + weeks: "Weeks" + months: "Months" + quarters: "Quarters" + years: "Years" + description: > + Select the initial zoom level that should be shown when autozoom is not available. + general_text_no: "no" + general_text_yes: "yes" + general_text_No: "No" + general_text_Yes: "Yes" + hal: + error: + update_conflict_refresh: "Click here to refresh the resource and update to the newest version." + edit_prohibited: "Editing %{attribute} is blocked for this resource. Either this attribute is derived from relations (e.g, children) or otherwise not configurable." + format: + date: "%{attribute} is no valid date - YYYY-MM-DD expected." + general: "An error has occurred." + homescreen: + blocks: + new_features: + text_new_features: "Read about new features and product updates." + learn_about: "Learn more about the new features" + #Include the version to invalidate outdated translations in other locales. + #Otherwise, e.g. chinese might still have the translations for 10.0 in the 12.0 release. + '13_3': + standard: + learn_about_link: https://www.openproject.org/blog/openproject-13-3-release/ + new_features_html: > + The release contains various new features and improvements:
+ ical_sharing_modal: + title: "Subscribe to calendar" + inital_setup_error_message: "An error occured while fetching data." + description: "You can use the URL (iCalendar) to subscribe to this calendar in an external client and view up-to-date work package information from there." + warning: "Please don't share this URL with other users. Anyone with this link will be able to view work package details without an account or password." + token_name_label: "Where will you be using this?" + token_name_placeholder: "Type a name, e.g. \"Phone\"" + token_name_description_text: "If you subscribe to this calendar from multiple devices, this name will help you distinguish between them in your access tokens list." + copy_url_label: "Copy URL" + ical_generation_error_text: "An error occured while generating the calendar URL." + success_message: "The URL \"%{name}\" was successfully copied to your clipboard. Paste it in your calendar client to complete the subscription." + label_activate: "Activate" + label_assignee: 'Assignee' + label_add_column_after: "Add column after" + label_add_column_before: "Add column before" + label_add_columns: "Add columns" + label_add_comment: "Add comment" + label_add_comment_title: "Comment and type @ to notify other people" + label_add_row_after: "Add row after" + label_add_row_before: "Add row before" + label_add_selected_columns: "Add selected columns" + label_added_by: "added by" + label_added_time_by: "Added by %{author} at %{age}" + label_ago: "days ago" + label_all: "all" + label_all_work_packages: "all work packages" + label_and: "and" + label_ascending: "Ascending" + label_author: "Author: %{user}" + label_avatar: "Avatar" + label_between: "between" + label_board: "Board" + label_board_locked: "Locked" + label_board_plural: "Boards" + label_board_sticky: "Sticky" + label_change: "Change" + label_create: "Create" + label_create_work_package: "Create new work package" + label_created_by: "Created by" + label_date: "Date" + label_date_with_format: "Enter the %{date_attribute} using the following format: %{format}" + label_deactivate: "Deactivate" + label_descending: "Descending" + label_description: "Description" + label_details: "Details" + label_display: "Display" + label_cancel_comment: "Cancel comment" + label_closed_work_packages: "closed" + label_collapse: "Collapse" + label_collapsed: "collapsed" + label_collapse_all: "Collapse all" + label_comment: "Comment" + label_committed_at: "%{committed_revision_link} at %{date}" + label_committed_link: "committed revision %{revision_identifier}" + label_contains: "contains" + label_created_on: "created on" + label_edit_comment: "Edit this comment" + label_edit_status: "Edit the status of the work package" + label_email: "Email" + label_equals: "is" + label_expand: "Expand" + label_expanded: "expanded" + label_expand_all: "Expand all" + label_expand_project_menu: "Expand project menu" + label_export: "Export" + label_export_preparing: "The export is being prepared and will be downloaded shortly." + label_filename: "File" + label_filesize: "Size" + label_general: "General" + label_global_roles: "Global roles" + label_greater_or_equal: ">=" + label_group: 'Group' + label_group_by: "Group by" + label_group_plural: "Groups" + label_hide_attributes: "Show less" + label_hide_column: "Hide column" + label_hide_project_menu: "Collapse project menu" + label_in: "in" + label_in_less_than: "in less than" + label_in_more_than: "in more than" + label_incoming_emails: "Incoming emails" + label_information_plural: "Information" + label_invalid: "Invalid" + label_import: "Import" + label_latest_activity: "Latest activity" + label_last_updated_on: "Last updated on" + label_learn_more_link: "Learn more" + label_less_or_equal: "<=" + label_less_than_ago: "less than days ago" + label_loading: "Loading..." + label_mail_notification: "Email notifications" + label_me: "me" + label_meeting_agenda: "Agenda" + label_meeting_minutes: "Minutes" + label_menu_collapse: "collapse" + label_menu_expand: "expand" + label_more_than_ago: "more than days ago" + label_next: "Next" + label_no_color: "No color" + label_no_data: "No data to display" + label_no_due_date: "no finish date" + label_no_start_date: "no start date" + label_no_date: "no date" + label_no_value: "No value" + label_none: "none" + label_not_contains: "doesn't contain" + label_not_equals: "is not" + label_on: "on" + label_open_menu: "Open menu" + label_open_context_menu: "Open context menu" + label_open_work_packages: "open" + label_password: "Password" + label_previous: "Previous" + label_per_page: "Per page:" + label_please_wait: "Please wait" + label_project: "Project" + label_project_list: "Project lists" + label_project_plural: "Projects" + label_visibility_settings: "Visibility settings" + label_quote_comment: "Quote this comment" + label_recent: "Recent" + label_reset: "Reset" + label_remove: "Remove" + label_remove_column: "Remove column" + label_remove_columns: "Remove selected columns" + label_remove_row: "Remove row" + label_report: "Report" + label_repository_plural: "Repositories" + label_save_as: "Save as" + label_select_project: "Select a project" + label_select_watcher: "Select a watcher..." + label_selected_filter_list: "Selected filters" + label_show_attributes: "Show all attributes" + label_show_in_menu: "Show view in menu" + label_sort_by: "Sort by" + label_sorted_by: "sorted by" + label_sort_higher: "Move up" + label_sort_lower: "Move down" + label_sorting: "Sorting" + label_spent_time: "Spent time" + label_star_query: "Favored" + label_press_enter_to_save: "Press enter to save." + label_public_query: "Public" + label_sum: "Sum" + label_sum_for: "Sum for" + label_total_sum: "Total sum" + label_subject: "Subject" + label_this_week: "this week" + label_today: "Today" + label_time_entry_plural: "Spent time" + label_up: "Up" + label_user_plural: "Users" + label_activity_show_only_comments: "Show activities with comments only" + label_activity_show_all: "Show all activities" + label_total_progress: "%{percent}% Total progress" + label_total_amount: "Total: %{amount}" + label_updated_on: "updated on" + label_value_derived_from_children: "(value derived from children)" + label_children_derived_duration: "Work package's children derived duration" + label_warning: "Warning" + label_work_package: "Work package" + label_work_package_parent: "Parent work package" + label_work_package_plural: "Work packages" + label_watch: "Watch" + label_watch_work_package: "Watch work package" + label_watcher_added_successfully: "Watcher successfully added!" + label_watcher_deleted_successfully: "Watcher successfully deleted!" + label_work_package_details_you_are_here: "You are on the %{tab} tab for %{type} %{subject}." + label_work_package_context_menu: "Work package context menu" + label_unwatch: "Unwatch" + label_unwatch_work_package: "Unwatch work package" + label_uploaded_by: "Uploaded by" + label_default_queries: "Default" + label_starred_queries: "Favorite" + label_global_queries: "Public" + label_custom_queries: "Private" + label_columns: "Columns" + label_attachments: Attachments + label_drop_files: "Drop files here to attach files." + label_drop_or_click_files: "Drop files here or click to attach files." + label_drop_folders_hint: You cannot upload folders as an attachment. Please select single files. + label_add_attachments: "Attach files" + label_formattable_attachment_hint: "Attach and link files by dropping on this field, or pasting from the clipboard." + label_remove_file: "Delete %{fileName}" + label_remove_watcher: "Remove watcher %{name}" + label_remove_all_files: Delete all files + label_add_description: "Add a description for %{file}" + label_upload_notification: "Uploading files..." + label_work_package_upload_notification: "Uploading files for Work package #%{id}: %{subject}" + label_wp_id_added_by: "#%{id} added by %{author}" + label_files_to_upload: "These files will be uploaded:" + label_rejected_files: "These files cannot be uploaded:" + label_rejected_files_reason: "These files cannot be uploaded as their size is greater than %{maximumFilesize}" + label_wait: "Please wait for configuration..." + label_upload_counter: "%{done} of %{count} files finished" + label_validation_error: "The work package could not be saved due to the following errors:" + label_version_plural: "Versions" + label_view_has_changed: "This view has unsaved changes. Click to save them." + help_texts: + show_modal: 'Show attribute help text entry' + onboarding: + buttons: + skip: 'Skip' + next: 'Next' + got_it: 'Got it' + steps: + help_menu: 'The Help (?) menu provides additional help resources. Here you can find a user guide, helpful how-to videos and more.
Enjoy your work with OpenProject!' + members: 'Invite new members to join your project.' + quick_add_button: 'Click on the plus (+) icon in the header navigation to create a new project or to invite coworkers.' + sidebar_arrow: "Use the return arrow in the top left corner to return to the project’s main menu." + welcome: 'Take a three minutes introduction tour to learn the most important features.
We recommend completing the steps until the end. You can restart the tour any time.' + wiki: 'Within the wiki you can document and share knowledge together with your team.' + backlogs: + overview: "Manage your work in the backlogs view." + sprints: "On the right you have the product backlog and the bug backlog, on the left you have the respective sprints. Here you can create epics, user stories, and bugs, prioritize via drag & drop and add them to a sprint." + task_board_arrow: 'To see your task board, open the sprint drop-down...' + task_board_select: '...and select the task board entry.' + task_board: "The task board visualizes the progress for this sprint. Click on the plus (+) icon next to a user story to add new tasks or impediments.
The status can be updated by drag and drop." + boards: + overview: 'Select boards to shift the view and manage your project using the agile boards view.' + lists_kanban: 'Here you can create multiple lists (columns) within your board. This feature allows you to create a Kanban board, for example.' + lists_basic: 'Here you can create multiple lists (columns) within your agile board.' + add: 'Click on the plus (+) icon to create a new card or add an existing card to the list on the board.' + drag: 'Drag and drop your cards within a given list to reorder them, or to move them to another list.
You can click the info (i) icon in the upper right-hand corner or double-click a card to open its details.' + wp: + toggler: "Now let's have a look at the work package section, which gives you a more detailed view of your work." + list: 'This work package overview provides a list of all the work in your project, such as tasks, milestones, phases, and more.
Work packages can be created and edited directly from this view. To access the details of a particular work package, simply double-click its row.' + full_view: 'The work package details view provides all the relevant information pertaining to a given work package, such as its description, status, priority, activities, dependencies, and comments.' + back_button: 'Use the return arrow in the top left corner to exit and return to the work package list.' + create_button: 'The + Create button will add a new work package to your project.' + gantt_menu: 'Create project schedules and timelines effortlessly using the Gantt chart module.' + timeline: 'Here you can edit your project plan, create new work packages, such as tasks, milestones, phases, and more, as well as add dependencies. All team members can see and update the latest plan at any time.' + team_planner: + overview: 'The team planner lets you visually assign tasks to team members and get an overview of who is working on what.' + calendar: 'The weekly or biweekly planning board displays all work packages assigned to your team members.' + add_assignee: 'To get started, add assignees to the team planner.' + add_existing: 'Search for existing work packages and drag them to the team planner to instantly assign them to a team member and define start and end dates.' + card: 'Drag work packages horizontally to move them backwards or forwards in time, drag the edges to change start and end dates and even drag them vertically to a different row to assign them to another member.' + notifications: + title: "Notifications" + no_unread: "No unread notifications" + reasons: + mentioned: 'mentioned' + watched: 'watcher' + assigned: 'assignee' + responsible: 'accountable' + created: 'created' + scheduled: 'scheduled' + commented: 'commented' + processed: 'processed' + prioritized: 'prioritized' + dateAlert: 'Date alert' + shared: 'shared' + date_alerts: + milestone_date: 'Milestone date' + overdue: 'Overdue' + overdue_since: 'since %{difference_in_days}' + property_today: 'is today' + property_is: 'is in %{difference_in_days}' + property_was: 'was %{difference_in_days} ago' + property_is_deleted: 'is deleted' + upsale: + title: 'Date alerts' + description: 'With date alerts, you will be notified of upcoming start or finish dates so that you never miss or forget an important deadline.' + facets: + unread: 'Unread' + unread_title: 'Show unread' + all: 'All' + all_title: 'Show all' + center: + label_actor_and: 'and' + and_more_users: + other: 'and %{count} others' + no_results: + at_all: 'New notifications will appear here when there is activity that concerns you.' + with_current_filter: 'There are no notifications in this view at the moment' + mark_all_read: 'Mark all as read' + mark_as_read: 'Mark as read' + text_update_date: "%{date} by" + total_count_warning: "Showing the %{newest_count} most recent notifications. %{more_count} more are not displayed." + empty_state: + no_notification: "Looks like you are all caught up." + no_notification_with_current_project_filter: "Looks like you are all caught up with the selected project." + no_notification_with_current_filter: "Looks like you are all caught up for %{filter} filter." + no_selection: "Click on a notification to view all activity details." + new_notifications: + message: 'There are new notifications.' + link_text: 'Click here to load them' + menu: + accountable: 'Accountable' + by_project: 'Unread by project' + by_reason: 'Reason' + inbox: 'Inbox' + mentioned: 'Mentioned' + watched: 'Watcher' + date_alert: 'Date alert' + shared: 'Shared' + settings: + change_notification_settings: 'You can modify your notification settings to ensure you never miss an important update.' + title: "Notification settings" + notify_me: "Notify me" + reminders: + no_notification: No notification + timeframes: + normal: + PT0S: same day + P1D: 1 day before + P3D: 3 days before + P7D: a week before + overdue: + P1D: every day + P3D: every 3 days + P7D: every week + reasons: + mentioned: + title: 'Mentioned' + description: 'Receive a notification every time someone mentions me anywhere' + assignee: 'Assignee' + responsible: 'Accountable' + shared: 'Shared' + watched: 'Watcher' + work_package_commented: 'All new comments' + work_package_created: 'New work packages' + work_package_processed: 'All status changes' + work_package_prioritized: 'All priority changes' + work_package_scheduled: 'All date changes' + global: + immediately: + title: 'Participating' + description: 'Notifications for all activities in work packages you are involved in (assignee, accountable or watcher).' + delayed: + title: 'Non-participating' + description: 'Additional notifications for activities in all projects.' + date_alerts: + title: 'Date alerts' + description: 'Automatic notifications when important dates are approaching for open work packages you are involved in (assignee, accountable or watcher).' + teaser_text: 'With date alerts, you will be notified of upcoming start or finish dates so that you never miss or forget an important deadline.' + overdue: When overdue + project_specific: + title: 'Project-specific notification settings' + description: 'These project-specific settings override default settings above.' + add: 'Add setting for project' + already_selected: 'This project is already selected' + remove: 'Remove project settings' + password_confirmation: + field_description: 'You need to enter your account password to confirm this change.' + title: 'Confirm your password to continue' + pagination: + no_other_page: "You are on the only page." + pages: + next: "Forward to the next page" + previous: "Back to the previous page" + placeholders: + default: '-' + subject: 'Enter subject here' + selection: 'Please select' + description: 'Description: Click to edit...' + relation_description: 'Click to add description for this relation' + project: + required_outside_context: > + Please choose a project to create the work package in to see all attributes. You can only select projects which have the type above activated. + details_activity: 'Project details activity' + context: 'Project context' + click_to_switch_to_project: 'Project: %{projectname}' + confirm_template_load: 'Switching the template will reload the page and you will lose all input to this form. Continue?' + use_template: "Use template" + no_template_selected: "(None)" + copy: + copy_options: "Copy options" + autocompleter: + label: 'Project autocompletion' + reminders: + settings: + daily: + add_time: 'Add time' + enable: 'Enable daily email reminders' + explanation: 'You will receive these reminders only for unread notifications and only at hours you specify. %{no_time_zone}' + no_time_zone: 'Until you configure a time zone for your account, the times will be interpreted to be in UTC.' + time_label: 'Time %{counter}:' + title: 'Send me daily email reminders for unread notifications' + workdays: + title: 'Receive email reminders on these days' + immediate: + title: 'Send me an email reminder' + mentioned: 'Immediately when someone @mentions me' + alerts: + title: 'Email alerts for other items (that are not work packages)' + explanation: > + Notifications today are limited to work packages. You can choose to continue receiving email alerts for these events until they are included in notifications: + news_added: 'News added' + news_commented: 'Comment on a news item' + document_added: 'Documents added' + forum_messages: 'New forum messages' + wiki_page_added: 'Wiki page added' + wiki_page_updated: 'Wiki page updated' + membership_added: 'Membership added' + membership_updated: 'Membership updated' + title: 'Email reminders' + pause: + label: 'Temporarily pause daily email reminders' + first_day: 'First day' + last_day: 'Last day' + text_are_you_sure: "Are you sure?" + text_data_lost: "All entered data will be lost." + text_user_wrote: "%{value} wrote:" + types: + attribute_groups: + error_duplicate_group_name: "The name %{group} is used more than once. Group names must be unique." + error_no_table_configured: "Please configure a table for %{group}." + reset_title: "Reset form configuration" + confirm_reset: > + Warning: Are you sure you want to reset the form configuration? This will reset the attributes to their default group and disable ALL custom fields. + upgrade_to_ee: "Upgrade to Enterprise on-premises edition" + upgrade_to_ee_text: "Wow! If you need this add-on you are a super pro! Would you mind supporting us OpenSource developers by becoming an Enterprise edition client?" + more_information: "More information" + nevermind: "Nevermind" + edit: + form_configuration: "Form Configuration" + projects: "Projects" + settings: "Settings" + time_entry: + work_package_required: 'Requires selecting a work package first.' + title: 'Log time' + tracking: 'Time tracking' + stop: 'Stop' + timer: + start_new_timer: 'Start new timer' + timer_already_running: 'To start a new timer, you must first stop the current timer:' + timer_already_stopped: 'No active timer for this work package, have you stopped it in another window?' + tracking_time: 'Tracking time' + button_stop: 'Stop current timer' + two_factor_authentication: + label_two_factor_authentication: 'Two-factor authentication' + watchers: + label_loading: loading watchers... + label_error_loading: An error occurred while loading the watchers + label_search_watchers: Search watchers + label_add: Add watchers + label_discard: Discard selection + typeahead_placeholder: Search for possible watchers + relation_labels: + parent: "Parent" + children: "Children" + relates: "Related To" + duplicates: "Duplicates" + duplicated: "Duplicated by" + blocks: "Blocks" + blocked: "Blocked by" + precedes: "Precedes" + follows: "Follows" + includes: "Includes" + partof: "Part of" + requires: "Requires" + required: "Required by" + relation_type: "relation type" + relations_hierarchy: + parent_headline: "Parent" + hierarchy_headline: "Hierarchy" + children_headline: "Children" + relation_buttons: + set_parent: "Set parent" + change_parent: "Change parent" + remove_parent: "Remove parent" + hierarchy_indent: "Indent hierarchy" + hierarchy_outdent: "Outdent hierarchy" + group_by_wp_type: "Group by work package type" + group_by_relation_type: "Group by relation type" + add_parent: "Add existing parent" + add_new_child: "Create new child" + create_new: "Create new" + add_existing: "Add existing" + add_existing_child: "Add existing child" + remove_child: "Remove child" + add_new_relation: "Create new relation" + add_existing_relation: "Add existing relation" + update_description: "Set or update description of this relation" + toggle_description: "Toggle relation description" + update_relation: "Click to change the relation type" + add_follower: "Add follower" + show_relations: "Show relations" + add_predecessor: "Add predecessor" + remove: "Remove relation" + save: "Save relation" + abort: "Abort" + relations_autocomplete: + placeholder: "Type to search" + parent_placeholder: "Choose new parent or press escape to cancel." + autocompleter: + placeholder: "Type to search" + notFoundText: "No items found" + project: + placeholder: "Select project" + repositories: + select_tag: 'Select tag' + select_branch: 'Select branch' + field_value_enter_prompt: "Enter a value for '%{field}'" + project_menu_details: "Details" + scheduling: + manual: 'Manual scheduling' + sort: + sorted_asc: 'Ascending sort applied, ' + sorted_dsc: 'Descending sort applied, ' + sorted_no: 'No sort applied, ' + sorting_disabled: 'sorting is disabled' + activate_asc: 'activate to apply an ascending sort' + activate_dsc: 'activate to apply a descending sort' + activate_no: 'activate to remove the sort' + text_work_packages_destroy_confirmation: "Are you sure you want to delete the selected work package(s)?" + text_query_destroy_confirmation: "Are you sure you want to delete the selected view?" + tl_toolbar: + zooms: "Zoom level" + outlines: "Hierarchy level" + upsale: + ee_only: 'Enterprise edition add-on' + wiki_formatting: + strong: "Strong" + italic: "Italic" + underline: "Underline" + deleted: "Deleted" + code: "Inline Code" + heading1: "Heading 1" + heading2: "Heading 2" + heading3: "Heading 3" + unordered_list: "Unordered List" + ordered_list: "Ordered List" + quote: "Quote" + unquote: "Unquote" + preformatted_text: "Preformatted Text" + wiki_link: "Link to a Wiki page" + image: "Image" + work_packages: + bulk_actions: + move: 'Bulk change of project' + edit: 'Bulk edit' + copy: 'Bulk copy' + delete: 'Bulk delete' + button_clear: "Clear" + comment_added: "The comment was successfully added." + comment_send_failed: "An error has occurred. Could not submit the comment." + comment_updated: "The comment was successfully updated." + confirm_edit_cancel: "Are you sure you want to cancel editing the work package?" + datepicker_modal: + automatically_scheduled_parent: "Automatically scheduled. Dates are derived from relations." + manually_scheduled: "Manual scheduling enabled, all relations ignored." + start_date_limited_by_relations: "Available start and finish dates are limited by relations." + changing_dates_affects_follow_relations: "Changing these dates will affect dates of related work packages." + click_on_show_relations_to_open_gantt: 'Click on "%{button_name}" for GANTT overview.' + show_relations: 'Show relations' + ignore_non_working_days: + title: 'Working days only' + description_filter: "Filter" + description_enter_text: "Enter text" + description_options_hide: "Hide options" + description_options_show: "Show options" + edit_attribute: "%{attribute} - Edit" + key_value: "%{key}: %{value}" + label_enable_multi_select: "Enable multiselect" + label_disable_multi_select: "Disable multiselect" + label_filter_add: "Add filter" + label_filter_by_text: "Filter by text" + label_options: "Options" + label_column_multiselect: "Combined dropdown field: Select with arrow keys, confirm selection with enter, delete with backspace" + message_error_during_bulk_delete: An error occurred while trying to delete work packages. + message_successful_bulk_delete: Successfully deleted work packages. + message_successful_show_in_fullscreen: "Click here to open this work package in fullscreen view." + message_view_spent_time: "Show spent time for this work package" + message_work_package_read_only: "Work package is locked in this status. No attribute other than status can be altered." + message_work_package_status_blocked: "Work package status is not writable due to closed status and closed version being assigned." + placeholder_filter_by_text: "Subject, description, comments, ..." + baseline: + addition_label: 'Added to view within the comparison time period' + removal_label: 'Removed from view within the comparison time period' + modification_label: 'Modified within the comparison time period' + column_incompatible: 'This column does not show changes in Baseline mode.' + filters: + title: 'Filter work packages' + baseline_incompatible: 'This filter attribute is not taken into consideration in Baseline mode.' + baseline_warning: 'Baseline mode is on but some of your active filters are not included in the comparison.' + inline_create: + title: 'Click here to add a new work package to this list' + create: + title: 'New work package' + header: 'New %{type}' + header_no_type: 'New work package (Type not yet set)' + header_with_parent: 'New %{type} (Child of %{parent_type} #%{id})' + button: 'Create' + copy: + title: 'Copy work package' + hierarchy: + show: "Show hierarchy mode" + hide: "Hide hierarchy mode" + toggle_button: 'Click to toggle hierarchy mode.' + leaf: 'Work package leaf at level %{level}.' + children_collapsed: 'Hierarchy level %{level}, collapsed. Click to show the filtered children' + children_expanded: 'Hierarchy level %{level}, expanded. Click to collapse the filtered children' + faulty_query: + title: Work packages could not be loaded. + description: Your view is erroneous and could not be processed. + no_results: + title: No work packages to display. + description: Either none have been created or all work packages are filtered out. + limited_results: Only %{count} work packages can be shown in manual sorting mode. Please reduce the results by filtering, or switch to automatic sorting. + property_groups: + details: "Details" + people: "People" + estimatesAndTime: "Estimates & Time" + other: "Other" + properties: + assignee: "Assignee" + author: "Author" + createdAt: "Created on" + description: "Description" + date: "Date" + percentComplete: "% Complete" + percentCompleteAlternative: "Progress" + dueDate: "Finish date" + duration: "Duration" + spentTime: "Spent time" + category: "Category" + percentageDone: "Percentage done" + priority: "Priority" + projectName: "Project" + remainingWork: "Remaining work" + remainingWorkAlternative: "Remaining hours" + responsible: "Responsible" + startDate: "Start date" + status: "Status" + subject: "Subject" + subproject: "Subproject" + title: "Title" + type: "Type" + updatedAt: "Updated on" + versionName: "Version" + version: "Version" + work: "Work" + workAlternative: "Estimated time" + remainingTime: "Remaining work" + default_queries: + latest_activity: "Latest activity" + created_by_me: "Created by me" + assigned_to_me: "Assigned to me" + recently_created: "Recently created" + all_open: "All open" + summary: "Summary" + shared_with_users: "Shared with users" + jump_marks: + pagination: "Jump to table pagination" + label_pagination: "Click here to skip over the work packages table and go to pagination" + content: "Jump to content" + label_content: "Click here to skip over the menu and go to the content" + placeholders: + default: "-" + date: "Select date" + query: + column_names: "Columns" + group_by: "Group results by" + group: "Group by" + group_by_disabled_by_hierarchy: "Group by is disabled due to the hierarchy mode being active." + hierarchy_disabled_by_group_by: "Hierarchy mode is disabled due to results being grouped by %{column}." + sort_ascending: "Sort ascending" + sort_descending: "Sort descending" + move_column_left: "Move column left" + move_column_right: "Move column right" + hide_column: "Hide column" + insert_columns: "Insert columns" + filters: "Filters" + display_sums: "Display Sums" + confirm_edit_cancel: "Are you sure you want to cancel editing the name of this view? Title will be set back to previous value." + click_to_edit_query_name: "Click to edit title of this view." + rename_query_placeholder: "Name of this view" + star_text: "Mark this view as favorite and add to the saved views sidebar on the left." + public_text: > + Publish this view, allowing other users to access your view. Users with the 'Manage public views' permission can modify or remove public query. This does not affect the visibility of work package results in that view and depending on their permissions, users may see different results. + errors: + unretrievable_query: "Unable to retrieve view from URL" + not_found: "There is no such view" + duplicate_query_title: "Name of this view already exists. Change anyway?" + text_no_results: "No matching views were found." + scheduling: + is_parent: "The dates of this work package are automatically deduced from its children. Activate 'Manual scheduling' to set the dates." + is_switched_from_manual_to_automatic: "The dates of this work package may need to be recalculated after switching from manual to automatic scheduling due to relationships with other work packages." + sharing: + share: 'Share' + title: "Share work package" + show_all_users: "Show all shared users" + selected_count: "%{count} selected" + selection: + mixed: "Mixed" + upsale: + description: "Share work packages with users who are not members of the project." + table: + configure_button: 'Configure work package table' + summary: "Table with rows of work package and columns of work package attributes." + text_inline_edit: "Most cells of this table are buttons that activate inline-editing functionality of that attribute." + text_sort_hint: "With the links in the table headers you can sort, group, reorder, remove and add table columns." + text_select_hint: "Select boxes should be opened with 'ALT' and arrow keys." + table_configuration: + button: 'Configure this work package table' + choose_display_mode: 'Display work packages as' + modal_title: 'Work package table configuration' + embedded_tab_disabled: "This configuration tab is not available for the embedded view you are editing." + default: "default" + display_settings: 'Display settings' + default_mode: "Flat list" + hierarchy_mode: "Hierarchy" + hierarchy_hint: "All filtered table results will be augmented with their ancestors. Hierarchies can be expanded and collapsed." + display_sums_hint: "Display sums of all summable attributes in a row below the table results." + show_timeline_hint: "Show an interactive gantt chart on the right side of the table. You can change its width by dragging the divider between table and gantt chart." + highlighting: 'Highlighting' + highlighting_mode: + description: "Highlight with color" + none: "No highlighting" + inline: 'Highlighted attribute(s)' + inline_all: 'All attributes' + entire_row_by: 'Entire row by' + status: 'Status' + priority: 'Priority' + type: 'Type' + sorting_mode: + description: 'Chose the mode to sort your Work packages:' + automatic: 'Automatic' + manually: 'Manually' + warning: 'You will lose your previous sorting when activating the automatic sorting mode.' + columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them." + upsale: + attribute_highlighting: 'Need certain work packages to stand out from the mass?' + relation_columns: 'Need to see relations in the work package list?' + check_out_link: 'Check out the Enterprise edition.' + relation_filters: + filter_work_packages_by_relation_type: 'Filter work packages by relation type' + tabs: + overview: Overview + activity: Activity + relations: Relations + watchers: Watchers + files: Files + time_relative: + days: "days" + weeks: "weeks" + months: "months" + toolbar: + settings: + configure_view: "Configure view" + columns: "Columns" + sort_by: "Sort by" + group_by: "Group by" + display_sums: "Display sums" + display_hierarchy: "Display hierarchy" + hide_hierarchy: "Hide hierarchy" + hide_sums: "Hide sums" + save: "Save" + save_as: "Save as" + export: "Export" + visibility_settings: "Visibility settings" + share_calendar: "Subscribe to calendar" + page_settings: "Rename view" + delete: "Delete" + filter: "Filter" + unselected_title: "Work package" + search_query_label: "Search saved views" + modals: + label_name: "Name" + label_delete_page: "Delete current page" + button_apply: "Apply" + button_save: "Save" + button_submit: "Submit" + button_cancel: "Cancel" + button_delete: "Delete" + form_submit: + title: 'Confirm to continue' + text: 'Are you sure you want to perform this action?' + destroy_work_package: + title: "Confirm deletion of %{label}" + single_text: "Are you sure you want to delete the work package" + bulk_text: "Are you sure you want to delete the following %{label}?" + has_children: "The work package has %{childUnits}:" + confirm_deletion_children: "I acknowledge that ALL descendants of the listed work packages will be recursively removed." + deletes_children: "All child work packages and their descendants will also be recursively deleted." + destroy_time_entry: + title: "Confirm deletion of time entry" + text: "Are you sure you want to delete the following time entry?" + notice_no_results_to_display: "No visible results to display." + notice_successful_create: "Successful creation." + notice_successful_delete: "Successful deletion." + notice_successful_update: "Successful update." + notice_job_started: "job started." + notice_bad_request: "Bad Request." + relations: + empty: No relation exists + remove: Remove relation + inplace: + button_edit: "%{attribute}: Edit" + button_save: "%{attribute}: Save" + button_cancel: "%{attribute}: Cancel" + button_save_all: "Save" + button_cancel_all: "Cancel" + link_formatting_help: "Text formatting help" + btn_preview_enable: "Preview" + btn_preview_disable: "Disable preview" + null_value_label: "No value" + clear_value_label: "-" + errors: + required: '%{field} cannot be empty' + number: '%{field} is not a valid number' + maxlength: '%{field} cannot contain more than %{maxLength} digit(s)' + minlength: '%{field} cannot contain less than %{minLength} digit(s)' + messages_on_field: 'This field is invalid: %{messages}' + error_could_not_resolve_version_name: "Couldn't resolve version name" + error_could_not_resolve_user_name: "Couldn't resolve user name" + error_attachment_upload: "File failed to upload: %{error}" + error_attachment_upload_permission: "You don't have the permission to upload files on this resource." + units: + workPackage: + other: "work packages" + child_work_packages: + other: "%{count} work package children" + hour: + one: "1 h" + other: "%{count} h" + zero: "0 h" + day: + one: "1 day" + other: "%{count} days" + zero: "0 days" + zen_mode: + button_activate: 'Activate zen mode' + button_deactivate: 'Deactivate zen mode' + global_search: + all_projects: "In all projects" + close_search: "Close search" + current_project_and_all_descendants: "In this project + subprojects" + current_project: "In this project" + recently_viewed: "Recently viewed" + search: "Search" + title: + all_projects: "all projects" + project_and_subprojects: "and all subprojects" + search_for: "Search for" + views: + card: 'Cards' + list: 'Table' + timeline: 'Gantt' + invite_user_modal: + back: 'Back' + invite: 'Invite' + title: + invite: 'Invite user' + invite_to_project: 'Invite %{type} to %{project}' + User: 'user' + Group: 'group' + PlaceholderUser: 'placeholder user' + invite_principal_to_project: 'Invite %{principal} to %{project}' + project: + label: 'Project' + required: 'Please select a project' + lacking_permission: 'Please select a different project since you lack permissions to assign users to the currently selected.' + lacking_permission_info: 'You lack the permission to assign users to the project you are currently in. You need to select a different one.' + next_button: 'Next' + no_results: 'No projects were found' + no_invite_rights: 'You are not allowed to invite members to this project' + type: + required: 'Please select the type to be invited' + user: + title: 'User' + description: 'Permissions based on the assigned role in the selected project' + group: + title: 'Group' + description: 'Permissions based on the assigned role in the selected project' + placeholder: + title: 'Placeholder user' + title_no_ee: 'Placeholder user (Enterprise edition only add-on)' + description: 'Has no access to the project and no emails are sent out.' + description_no_ee: 'Has no access to the project and no emails are sent out.
Check out the Enterprise edition' + principal: + label: + name_or_email: 'Name or email address' + name: 'Name' + already_member_message: 'Already a member of %{project}' + no_results_user: 'No users were found' + invite_user: 'Invite:' + no_results_placeholder: 'No placeholders were found' + create_new_placeholder: 'Create new placeholder:' + no_results_group: 'No groups were found' + next_button: 'Next' + required: + user: 'Please select a user' + placeholder: 'Please select a placeholder' + group: 'Please select a group' + role: + label: 'Role in %{project}' + no_roles_found: 'No roles were found' + description: 'This is the role that the user will receive when they join your project. The role defines which actions they are allowed to take and which information they are allowed to see. Learn more about roles and permissions. ' + required: 'Please select a role' + next_button: 'Next' + message: + label: 'Invitation message' + description: 'We will send an email to the user, to which you can add a personal message here. An explanation for the invitation could be useful, or prehaps a bit of information regarding the project to help them get started.' + next_button: 'Next' + summary: + next_button: 'Send invitation' + success: + title: '%{principal} was invited!' + description: + user: 'The user can now log in to access %{project}. Meanwhile you can already plan with that user and assign work packages for instance.' + placeholder: 'The placeholder can now be used in %{project}. Meanwhile you can already plan with that user and assign work packages for instance.' + group: 'The group is now a part of %{project}. Meanwhile you can already plan with that group and assign work packages for instance.' + next_button: 'Continue' + include_projects: + toggle_title: 'Include projects' + title: 'Projects' + clear_selection: 'Clear selection' + apply: 'Apply' + selected_filter: + all: 'All projects' + selected: 'Only selected' + search_placeholder: 'Search project...' + include_subprojects: 'Include all sub-projects' + tooltip: + include_all_selected: 'Project already included since Include all sub-projects is enabled.' + current_project: 'This is the current project you are in.' + does_not_match_search: 'Project does not match the search criteria.' + no_results: 'No project matches your search criteria.' + baseline: + toggle_title: 'Baseline' + clear: 'Clear' + apply: 'Apply' + header_description: 'Highlight changes made to this list since any point in the past.' + enterprise_header_description: 'Highlight changes made to this list since any point in the past with Enterprise edition.' + show_changes_since: 'Show changes since' + baseline_comparison: 'Baseline comparison' + help_description: 'Reference time zone for the baseline.' + time_description: 'In your local time: %{datetime}' + time: 'Time' + from: 'From' + to: 'To' + drop_down: + none: '-' + yesterday: 'yesterday' + last_working_day: 'last working day' + last_week: 'last week' + last_month: 'last month' + a_specific_date: 'a specific date' + between_two_specific_dates: 'between two specific dates' + legends: + changes_since: 'Changes since' + changes_between: 'Changes between' + now_meets_filter_criteria: 'Now meets filter criteria' + no_longer_meets_filter_criteria: 'No longer meets filter criteria' + maintained_with_changes: 'Maintained with changes' + in_your_timezone: 'In your local timezone:' + icon_tooltip: + added: 'Added to view within the comparison time period' + removed: 'Removed from view within the comparison time period' + changed: 'Maintained with modifications' + forms: + submit_success_message: 'The form was successfully submitted' + load_error_message: 'There was an error loading the form' + validation_error_message: 'Please fix the errors present in the form' + advanced_settings: 'Advanced settings' + spot: + filter_chip: + remove: 'Remove' + drop_modal: + focus_grab: 'This is a focus anchor for modals. Press shift+tab to go back to the modal trigger element.' + Close: 'Close' diff --git a/config/locales/crowdin/js-ru.yml b/config/locales/crowdin/js-ru.yml index 2aeea7f3bf5a..9502a01e72cd 100644 --- a/config/locales/crowdin/js-ru.yml +++ b/config/locales/crowdin/js-ru.yml @@ -978,7 +978,7 @@ ru: percentageDone: "Сделано в процентах" priority: "Приоритет" projectName: "Проект" - remainingWork: "Оставшаяся работа" + remainingWork: "Оставшиеся часы" remainingWorkAlternative: "Оставшиеся часы" responsible: "Ответственный" startDate: "Дата начала" @@ -990,7 +990,7 @@ ru: updatedAt: "Обновлено" versionName: "Этап" version: "Этап" - work: "Работа" + work: "Часы" workAlternative: "Приблизительное время" remainingTime: "Оставшиеся часы" default_queries: diff --git a/config/locales/crowdin/ms.seeders.yml b/config/locales/crowdin/ms.seeders.yml new file mode 100644 index 000000000000..15d59b906641 --- /dev/null +++ b/config/locales/crowdin/ms.seeders.yml @@ -0,0 +1,471 @@ +#This file has been generated by script/i18n/generate_seeders_i18n_source_file. +#Please do not edit directly. +#This file is part of the sources sent to crowdin for translation. +--- +ms: + seeds: + common: + colors: + item_0: + name: Blue (dark) + item_1: + name: Blue + item_2: + name: Blue (light) + item_3: + name: Green (light) + item_4: + name: Green (dark) + item_5: + name: Yellow + item_6: + name: Orange + item_7: + name: Red + item_8: + name: Magenta + item_9: + name: White + item_10: + name: Grey (light) + item_11: + name: Grey + item_12: + name: Grey (dark) + item_13: + name: Black + document_categories: + item_0: + name: Documentation + item_1: + name: Specification + item_2: + name: Other + work_package_roles: + item_0: + name: Work package editor + item_1: + name: Work package commenter + item_2: + name: Work package viewer + project_roles: + item_0: + name: Non member + item_1: + name: Anonymous + item_2: + name: Member + item_3: + name: Reader + item_4: + name: Project admin + global_roles: + item_0: + name: Staff and projects manager + standard: + priorities: + item_0: + name: Low + item_1: + name: Normal + item_2: + name: High + item_3: + name: Immediate + statuses: + item_0: + name: New + item_1: + name: In specification + item_2: + name: Specified + item_3: + name: Confirmed + item_4: + name: To be scheduled + item_5: + name: Scheduled + item_6: + name: In progress + item_7: + name: Developed + item_8: + name: In testing + item_9: + name: Tested + item_10: + name: Test failed + item_11: + name: Closed + item_12: + name: On hold + item_13: + name: Rejected + time_entry_activities: + item_0: + name: Management + item_1: + name: Specification + item_2: + name: Development + item_3: + name: Testing + item_4: + name: Support + item_5: + name: Other + types: + item_0: + name: Task + item_1: + name: Milestone + item_2: + name: Phase + item_3: + name: Feature + item_4: + name: Epic + item_5: + name: User story + item_6: + name: Bug + welcome: + title: Welcome to OpenProject! + text: | + OpenProject is the leading open source project management software. It supports classic, agile as well as hybrid project management and gives you full control over your data. + + Core features and use cases: + + * [Project Portfolio Management](https://www.openproject.org/collaboration-software-features/project-portfolio-management/) + * [Project Planning and Scheduling](https://www.openproject.org/collaboration-software-features/project-planning-scheduling/) + * [Task Management and Issue Tracking](https://www.openproject.org/collaboration-software-features/task-management/) + * [Agile Boards (Scrum and Kanban)](https://www.openproject.org/collaboration-software-features/agile-project-management/) + * [Requirements Management and Release Planning](https://www.openproject.org/collaboration-software-features/product-development/) + * [Time and Cost Tracking, Budgets](https://www.openproject.org/collaboration-software-features/time-tracking/) + * [Team Collaboration and Documentation](https://www.openproject.org/collaboration-software-features/team-collaboration/) + + Welcome to the future of project management. + + For Admins: You can change this welcome text [here]({{opSetting:base_url}}/admin/settings/general). + projects: + demo-project: + name: Demo project + status_explanation: All tasks are on schedule. The people involved know their tasks. The system is completely set up. + description: This is a short summary of the goals of this demo project. + news: + item_0: + title: Welcome to your demo project + summary: | + We are glad you joined. + In this module you can communicate project news to your team members. + description: The actual news + categories: + item_0: Category 1 (to be changed in Project settings) + queries: + item_0: + name: Project plan + item_1: + name: Milestones + item_2: + name: Tasks + item_3: + name: Team planner + boards: + kanban: + name: Kanban board + basic: + name: Basic board + lists: + item_0: + name: Wish list + item_1: + name: Short list + item_2: + name: Priority list for today + item_3: + name: Never + parent_child: + name: Work breakdown structure + project-overview: + widgets: + item_0: + options: + name: Welcome + item_1: + options: + name: Getting started + text: | + We are glad you joined! We suggest to try a few things to get started in OpenProject. + + Discover the most important features with our [Guided Tour]({{opSetting:base_url}}/projects/demo-project/work_packages/?start_onboarding_tour=true). + + _Try the following steps:_ + + 1. *Invite new members to your project*: → Go to [Members]({{opSetting:base_url}}/projects/demo-project/members) in the project navigation. + 2. *View the work in your project*: → Go to [Work packages]({{opSetting:base_url}}/projects/demo-project/work_packages) in the project navigation. + 3. *Create a new work package*: → Go to [Work packages → Create]({{opSetting:base_url}}/projects/demo-project/work_packages/new). + 4. *Create and update a project plan*: → Go to [Project plan]({{opSetting:base_url}}/projects/demo-project/work_packages?query_id=##query.id:demo_project__query__project_plan) in the project navigation. + 5. *Activate further modules*: → Go to [Project settings → Modules]({{opSetting:base_url}}/projects/demo-project/settings/modules). + 6. *Complete your tasks in the project*: → Go to [Work packages → Tasks]({{opSetting:base_url}}/projects/demo-project/work_packages/details/##wp.id:set_date_and_location_of_conference/overview?query_id=##query.id:demo_project__query__tasks). + + Here you will find our [User Guides](https://www.openproject.org/docs/user-guide/). + Please let us know if you have any questions or need support. Contact us: [support[at]openproject.com](mailto:support@openproject.com). + item_5: + options: + name: Work packages + item_6: + options: + name: Milestones + work_packages: + item_0: + subject: Start of project + item_1: + subject: Organize open source conference + children: + item_0: + subject: Set date and location of conference + children: + item_0: + subject: Send invitation to speakers + item_1: + subject: Contact sponsoring partners + item_2: + subject: Create sponsorship brochure and hand-outs + item_1: + subject: Invite attendees to conference + item_2: + subject: Setup conference website + item_2: + subject: Conference + item_3: + subject: Follow-up tasks + children: + item_0: + subject: Upload presentations to website + item_1: + subject: Party for conference supporters :-) + description: |- + * [ ] Beer + * [ ] Snacks + * [ ] Music + * [ ] Even more beer + item_4: + subject: End of project + scrum-project: + name: Scrum project + status_explanation: All tasks are on schedule. The people involved know their tasks. The system is completely set up. + description: This is a short summary of the goals of this demo Scrum project. + news: + item_0: + title: Welcome to your Scrum demo project + summary: | + We are glad you joined. + In this module you can communicate project news to your team members. + versions: + item_0: + name: Bug Backlog + item_1: + name: Product Backlog + item_2: + name: Sprint 1 + wiki: + title: Sprint 1 + content: | + ### Sprint planning meeting + + _Please document here topics to the Sprint planning meeting_ + + * Time boxed (8 h) + * Input: Product Backlog + * Output: Sprint Backlog + + * Divided into two additional time boxes of 4 h: + + * The Product Owner presents the [Product Backlog]({{opSetting:base_url}}/projects/your-scrum-project/backlogs) and the priorities to the team and explains the Sprint Goal, to which the team must agree. Together, they prioritize the topics from the Product Backlog which the team will take care of in the next sprint. The team commits to the discussed delivery. + * The team plans autonomously (without the Product Owner) in detail and breaks down the tasks from the discussed requirements to consolidate a [Sprint Backlog]({{opSetting:base_url}}/projects/your-scrum-project/backlogs). + + + ### Daily Scrum meeting + + _Please document here topics to the Daily Scrum meeting_ + + * Short, daily status meeting of the team. + * Time boxed (max. 15 min). + * Stand-up meeting to discuss the following topics from the [Task board](##sprint:scrum_project__version__sprint_1). + * What do I plan to do until the next Daily Scrum? + * What has blocked my work (Impediments)? + * Scrum Master moderates and notes down [Sprint Impediments](##sprint:scrum_project__version__sprint_1). + * Product Owner may participate may participate in order to stay informed. + + ### Sprint Review meeting + + _Please document here topics to the Sprint Review meeting_ + + * Time boxed (4 h). + * A maximum of one hour of preparation time per person. + * The team shows the product owner and other interested persons what has been achieved in this sprint. + * Important: no dummies and no PowerPoint! Just finished product functionality (Increments) should be demonstrated. + * Feedback from Product Owner, stakeholders and others is desired and will be included in further work. + * Based on the demonstrated functionalities, the Product Owner decides to go live with this increment or to develop it further. This possibility allows an early ROI. + + + ### Sprint Retrospective + + _Please document here topics to the Sprint Retrospective meeting_ + + * Time boxed (3 h). + * After Sprint Review, will be moderated by Scrum Master. + * The team discusses the sprint: what went well, what needs to be improved to be more productive for the next sprint or even have more fun. + item_3: + name: Sprint 2 + categories: + item_0: Category 1 (to be changed in Project settings) + queries: + item_0: + name: Project plan + item_1: + name: Product backlog + item_2: + name: Sprint 1 + item_3: + name: Tasks + boards: + kanban: + name: Kanban board + basic: + name: Task board + lists: + item_0: + name: Wish list + item_1: + name: Short list + item_2: + name: Priority list for today + item_3: + name: Never + project-overview: + widgets: + item_0: + options: + name: Welcome + item_1: + options: + name: Getting started + text: | + We are glad you joined! We suggest to try a few things to get started in OpenProject. + + _Try the following steps:_ + + 1. *Invite new members to your project*: → Go to [Members]({{opSetting:base_url}}/projects/your-scrum-project/members) in the project navigation. + 2. *View your Product backlog and Sprint backlogs*: → Go to [Backlogs]({{opSetting:base_url}}/projects/your-scrum-project/backlogs) in the project navigation. + 3. *View your Task board*: → Go to [Backlogs]({{opSetting:base_url}}/projects/your-scrum-project/backlogs) → Click on right arrow on Sprint → Select [Task Board](##sprint:scrum_project__version__sprint_1). + 4. *Create a new work package*: → Go to [Work packages → Create]({{opSetting:base_url}}/projects/your-scrum-project/work_packages/new). + 5. *Create and update a project plan*: → Go to [Project plan](##query:scrum_project__query__project_plan) in the project navigation. + 6. *Create a Sprint wiki*: → Go to [Backlogs]({{opSetting:base_url}}/projects/your-scrum-project/backlogs) and open the sprint wiki from the right drop down menu in a sprint. You can edit the [wiki template]({{opSetting:base_url}}/projects/your-scrum-project/wiki/) based on your needs. + 7. *Activate further modules*: → Go to [Project settings → Modules]({{opSetting:base_url}}/projects/your-scrum-project/settings/modules). + + Here you will find our [User Guides](https://www.openproject.org/docs/user-guide/). + Please let us know if you have any questions or need support. Contact us: [support[at]openproject.com](mailto:support@openproject.com). + item_5: + options: + name: Work packages + item_6: + options: + name: Project plan + work_packages: + item_0: + subject: New login screen + item_1: + subject: Password reset does not send email + item_2: + subject: New website + children: + item_0: + subject: Newsletter registration form + item_1: + subject: Implement product tour + item_2: + subject: New landing page + children: + item_0: + subject: Create wireframes for new landing page + item_3: + subject: Contact form + item_4: + subject: Feature carousel + children: + item_0: + subject: Make screenshots for feature tour + item_5: + subject: Wrong hover color + item_6: + subject: SSL certificate + item_7: + subject: Set-up Staging environment + item_8: + subject: Choose a content management system + item_9: + subject: Website navigation structure + children: + item_0: + subject: Set up navigation concept for website. + item_10: + subject: Internal link structure + item_11: + subject: Develop v1.0 + item_12: + subject: Release v1.0 + item_13: + subject: Develop v1.1 + item_14: + subject: Release v1.1 + item_15: + subject: Develop v2.0 + item_16: + subject: Release v2.0 + wiki: | + ### Sprint planning meeting + + _Please document here topics to the Sprint planning meeting_ + + * Time boxed (8 h) + * Input: Product Backlog + * Output: Sprint Backlog + + * Divided into two additional time boxes of 4 h: + + * The Product Owner presents the [Product Backlog]({{opSetting:base_url}}/projects/your-scrum-project/backlogs) and the priorities to the team and explains the Sprint Goal, to which the team must agree. Together, they prioritize the topics from the Product Backlog which the team will take care of in the next sprint. The team commits to the discussed delivery. + * The team plans autonomously (without the Product Owner) in detail and breaks down the tasks from the discussed requirements to consolidate a [Sprint Backlog]({{opSetting:base_url}}/projects/your-scrum-project/backlogs). + + + ### Daily Scrum meeting + + _Please document here topics to the Daily Scrum meeting_ + + * Short, daily status meeting of the team. + * Time boxed (max. 15 min). + * Stand-up meeting to discuss the following topics from the Task board. + * What do I plan to do until the next Daily Scrum? + * What has blocked my work (Impediments)? + * Scrum Master moderates and notes down Sprint Impediments. + * Product Owner may participate may participate in order to stay informed. + + ### Sprint Review meeting + + _Please document here topics to the Sprint Review meeting_ + + * Time boxed (4 h). + * A maximum of one hour of preparation time per person. + * The team shows the product owner and other interested persons what has been achieved in this sprint. + * Important: no dummies and no PowerPoint! Just finished product functionality (Increments) should be demonstrated. + * Feedback from Product Owner, stakeholders and others is desired and will be included in further work. + * Based on the demonstrated functionalities, the Product Owner decides to go live with this increment or to develop it further. This possibility allows an early ROI. + + + ### Sprint Retrospective + + _Please document here topics to the Sprint Retrospective meeting_ + + * Time boxed (3 h). + * After Sprint Review, will be moderated by Scrum Master. + * The team discusses the sprint: what went well, what needs to be improved to be more productive for the next sprint or even have more fun. diff --git a/config/locales/crowdin/ms.yml b/config/locales/crowdin/ms.yml new file mode 100644 index 000000000000..8dc4d4d3c7a8 --- /dev/null +++ b/config/locales/crowdin/ms.yml @@ -0,0 +1,3363 @@ +#-- copyright +#OpenProject is an open source project management software. +#Copyright (C) 2012-2024 the OpenProject GmbH +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License version 3. +#OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +#Copyright (C) 2006-2013 Jean-Philippe Lang +#Copyright (C) 2010-2013 the ChiliProject Team +#This program is free software; you can redistribute it and/or +#modify it under the terms of the GNU General Public License +#as published by the Free Software Foundation; either version 2 +#of the License, or (at your option) any later version. +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. +#You should have received a copy of the GNU General Public License +#along with this program; if not, write to the Free Software +#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#See COPYRIGHT and LICENSE files for more details. +#++ +ms: + no_results_title_text: There is currently nothing to display. + activities: + index: + no_results_title_text: There has not been any activity for the project within this time frame. + admin: + plugins: + no_results_title_text: There are currently no plugins available. + custom_styles: + color_theme: "Color theme" + color_theme_custom: "(Custom)" + colors: + alternative-color: "Alternative" + content-link-color: "Link font" + primary-color: "Primary" + primary-color-dark: "Primary (dark)" + header-bg-color: "Header background" + header-item-bg-hover-color: "Header background on hover" + header-item-font-color: "Header font" + header-item-font-hover-color: "Header font on hover" + header-border-bottom-color: "Header border" + main-menu-bg-color: "Main menu background" + main-menu-bg-selected-background: "Main menu when selected" + main-menu-bg-hover-background: "Main menu on hover" + main-menu-font-color: "Main menu font" + main-menu-selected-font-color: "Main menu font when selected" + main-menu-hover-font-color: "Main menu font on hover" + main-menu-border-color: "Main menu border" + custom_colors: "Custom colors" + customize: "Customize your OpenProject installation with your own logo and colors." + enterprise_notice: "As a special 'Thank you!' for their financial contribution to develop OpenProject, this tiny add-on is only available for Enterprise edition support subscribers." + enterprise_more_info: "Note: the used logo will be publicly accessible." + manage_colors: "Edit color select options" + instructions: + alternative-color: "Strong accent color, typically used for the most important button on a screen." + content-link-color: "Font color of most of the links." + primary-color: "Main color." + primary-color-dark: "Typically a darker version of the main color used for hover effects." + header-item-bg-hover-color: "Background color of clickable header items when hovered with the mouse." + header-item-font-color: "Font color of clickable header items." + header-item-font-hover-color: "Font color of clickable header items when hovered with the mouse." + header-border-bottom-color: "Thin line under the header. Leave this field empty if you don't want any line." + main-menu-bg-color: "Left side menu's background color." + theme_warning: Changing the theme will overwrite you custom style. The design will then be lost. Are you sure you want to continue? + enterprise: + upgrade_to_ee: "Upgrade to the Enterprise edition" + add_token: "Upload an Enterprise edition support token" + delete_token_modal: + text: "Are you sure you want to remove the current Enterprise edition token used?" + title: "Delete token" + replace_token: "Replace your current support token" + order: "Order Enterprise on-premises edition" + paste: "Paste your Enterprise edition support token" + required_for_feature: "This add-on is only available with an active Enterprise edition support token." + enterprise_link: "For more information, click here." + start_trial: "Start free trial" + book_now: "Book now" + get_quote: "Get a quote" + buttons: + upgrade: "Upgrade now" + contact: "Contact us for a demo" + enterprise_info_html: "is an Enterprise add-on." + upgrade_info: "Please upgrade to a paid plan to activate and start using it in your team." + journal_aggregation: + explanation: + text: "Individual actions of a user (e.g. updating a work package twice) are aggregated into a single action if their age difference is less than the specified timespan. They will be displayed as a single action within the application. This will also delay notifications by the same amount of time reducing the number of emails being sent and will also affect %{webhook_link} delay." + link: "webhook" + announcements: + show_until: Show until + is_active: currently displayed + is_inactive: currently not displayed + antivirus_scan: + not_processed_yet_message: "Downloading is blocked, as file was not scanned for viruses yet. Please try again later." + quarantined_message: "A virus was detected in file '%{filename}'. It has been quarantined and is not available for download." + deleted_message: "A virus was detected in file '%{filename}'. The file has been deleted." + deleted_by_admin: "The quarantined file '%{filename}' has been deleted by an administrator." + overridden_by_admin: "The quarantine for file '%{filename}' has been removed by %{user}. The file can now be acccessed." + quarantined_attachments: + container: "Container" + delete: "Delete the quarantined file" + title: "Quarantined attachments" + error_cannot_act_self: "Cannot perform actions on your own uploaded files." + attribute_help_texts: + note_public: "Any text and images you add to this field is publicly visible to all logged in users!" + text_overview: "In this view, you can create custom help texts for attributes view. When defined, these texts can be shown by clicking the help icon next to its belonging attribute." + label_plural: "Attribute help texts" + show_preview: "Preview text" + add_new: "Add help text" + edit: "Edit help text for %{attribute_caption}" + background_jobs: + status: + error_requeue: "Job experienced an error but is retrying. The error was: %{message}" + cancelled_due_to: "Job was cancelled due to error: %{message}" + ldap_auth_sources: + ldap_error: "LDAP-Error: %{error_message}" + ldap_auth_failed: "Could not authenticate at the LDAP-Server." + sync_failed: "Failed to synchronize from LDAP: %{message}." + back_to_index: "Click here to go back to the list of connection." + technical_warning_html: | + This LDAP form requires technical knowledge of your LDAP / Active Directory setup. +
+ Please visit our documentation for detailed instructions. + attribute_texts: + name: Arbitrary name of the LDAP connection + host: LDAP host name or IP address + login_map: The attribute key in LDAP that is used to identify the unique user login. Usually, this will be `uid` or `samAccountName`. + generic_map: The attribute key in LDAP that is mapped to the OpenProject `%{attribute}` attribute + admin_map_html: "Optional: The attribute key in LDAP that if present marks the OpenProject user an admin. Leave empty when in doubt." + system_user_dn_html: | + Enter the DN of the system user used for read-only access. +
+ Example: uid=openproject,ou=system,dc=example,dc=com + system_user_password: Enter the bind password of the system user + base_dn: | + Enter the Base DN of the subtree in LDAP you want OpenProject to look for users and groups. + OpenProject will filter for provided usernames in this subtree only. + Example: ou=users,dc=example,dc=com + filter_string: | + Add an optional RFC4515 filter to apply to the results returned for users filtered in the LDAP. + This can be used to restrict the set of users that are found by OpenProject for authentication and group synchronization. + filter_string_concat: | + OpenProject will always filter for the login attribute provided by the user to identify the record. If you provide a filter here, + it will be concatenated with an AND. By default, a catch-all (objectClass=*) will be used as a filter. + onthefly_register: | + If you check this box, OpenProject will automatically create new users from their LDAP entries + when they first authenticate with OpenProject. + Leave this unchecked to only allow existing accounts in OpenProject to authenticate through LDAP! + connection_encryption: "Connection encryption" + encryption_details: "pilihan-pilihan LDAPS/STARTTTLS" + system_account: "System account" + system_account_legend: | + OpenProject requires read-only access through a system account to lookup users and groups in your LDAP tree. + Please specify the bind credentials for that system user in the following section. + ldap_details: "LDAP details" + user_settings: "Attribute mapping" + user_settings_legend: | + The following fields are related to how users are created in OpenProject from LDAP entries and + what LDAP attributes are used to define the attributes of an OpenProject user (attribute mapping). + tls_mode: + plain: "none" + simple_tls: "LDAPS" + start_tls: "STARTTTLS" + plain_description: "Opens an unencrypted connection to the LDAP server. Not recommended for production." + simple_tls_description: "Use LDAPS. Requires a separate port on the LDAP server. This mode is often deprecated, we recommend using STARTTLS whenever possible." + start_tls_description: "Sends a STARTTLS command after connecting to the standard LDAP port. Recommended for encrypted connections." + section_more_info_link_html: > + This section concerns the connection security of this LDAP authentication source. For more information, visit the Net::LDAP documentation. + tls_options: + verify_peer: "Verify SSL certificate" + verify_peer_description_html: > + Enables strict SSL verification of the certificate trusted chain.
Warning: Unchecking this option disables SSL verification of the LDAP server certificate. This exposes your connection to Man in the Middle attacks. + tls_certificate_description: "If the LDAP server certificate is not in the trust sources of this system, you can add it manually here. Enter a PEM X509 certifiate string." + forums: + show: + no_results_title_text: There are currently no posts for the forum. + colors: + index: + no_results_title_text: There are currently no colors. + no_results_content_text: Create a new color + label_new_color: "New color" + new: + label_new_color: "New Color" + edit: + label_edit_color: "Edit Color" + form: + label_new_color: "New color" + label_edit_color: "Edit color" + label_no_color: "No color" + label_properties: "Properties" + label_really_delete_color: > + Are you sure, you want to delete the following color? Types using this color will not be deleted. + custom_actions: + actions: + name: "Actions" + add: "Add action" + assigned_to: + executing_user_value: "(Assign to executing user)" + conditions: "Conditions" + plural: "Custom actions" + new: "New custom action" + edit: "Edit custom action %{name}" + execute: "Execute %{name}" + upsale: + title: "Custom actions" + description: "Custom actions are one-click shortcuts to a set of pre-defined actions that you can make available on certain work packages based on status, role, type or project." + custom_fields: + text_add_new_custom_field: > + To add new custom fields to a project you first need to create them before you can add them to this project. + is_enabled_globally: "Is enabled globally" + enabled_in_project: "Enabled in project" + contained_in_type: "Contained in type" + confirm_destroy_option: "Deleting an option will delete all of its occurrences (e.g. in work packages). Are you sure you want to delete it?" + reorder_alphabetical: "Reorder values alphabetically" + reorder_confirmation: "Warning: The current order of available values will be lost. Continue?" + instructions: + is_required: "Mark the custom field as required. This will make it mandatory to fill in the field when creating new or updating existing resources." + is_for_all: "Mark the custom field as available in all existing and new projects." + searchable: "Include the field values when using the global search functionality." + editable: "Allow the field to be editable by users themselves." + visible: "Make field visible for all users (non-admins) in the project overview and displayed in the project details widget on the Project Overview." + is_filter: > + Allow the custom field to be used in a filter in work package views. Note that only with 'For all projects' selected, the custom field will show up in global views. + tab: + no_results_title_text: There are currently no custom fields. + no_results_content_text: Create a new custom field + concatenation: + single: "or" + global_search: + placeholder: "Search in %{app_title}" + overwritten_tabs: + wiki_pages: "Wiki" + messages: "Forum" + groups: + index: + no_results_title_text: There are currently no groups. + no_results_content_text: Create a new group + users: + no_results_title_text: There are currently no users part of this group. + memberships: + no_results_title_text: There are currently no projects part of this group. + incoming_mails: + ignore_filenames: > + Specify a list of names to ignore when processing attachments for incoming mails (e.g., signatures or icons). Enter one filename per line. + projects: + copy: + #Contains custom strings for options when copying a project that cannot be found elsewhere. + members: "Project members" + overviews: "Project overview" + queries: "Work packages: saved views" + wiki_page_attachments: "Wiki pages: attachments" + work_package_attachments: "Work packages: attachments" + work_package_categories: "Work packages: categories" + work_package_file_links: "Work packages: file links" + delete: + scheduled: "Deletion has been scheduled and is performed in the background. You will be notified of the result." + schedule_failed: "Project cannot be deleted: %{errors}" + failed: "Deletion of project %{name} has failed" + failed_text: "The request to delete project %{name} has failed. The project was left archived." + completed: "Deletion of project %{name} completed" + completed_text: "The request to delete project '%{name}' has been completed." + completed_text_children: "Additionally, the following subprojects have been deleted:" + index: + open_as_gantt: "Open as Gantt view" + no_results_title_text: There are currently no projects + no_results_content_text: Create a new project + lists: + active: 'Active projects' + my: 'My projects' + archived: 'Archived projects' + my_private: 'My private project lists' + new: + placeholder: 'New project list' + settings: + change_identifier: Change identifier + activities: + no_results_title_text: There are currently no activities available. + forums: + no_results_title_text: There are currently no forums for the project. + no_results_content_text: Create a new forum + categories: + no_results_title_text: There are currently no work package categories. + no_results_content_text: Create a new work package category + custom_fields: + no_results_title_text: There are currently no custom fields available. + types: + no_results_title_text: There are currently no types available. + form: + enable_type_in_project: 'Enable type "%{type}"' + versions: + no_results_title_text: There are currently no versions for the project. + no_results_content_text: Create a new version + storage: + no_results_title_text: There is no additional recorded disk space consumed by this project. + members: + index: + no_results_title_text: There are currently no members part of this project. + no_results_content_text: Add a member to the project + invite_by_mail: "Send invite to %{mail}" + send_invite_to: "Send invite to" + no_modify_on_shared: "You currently cannot modify or remove shared memberships through the member page. Use the sharing modal instead." + columns: + shared: "Shared" + filters: + all_shares: "All shares" + menu: + all: "All" + invited: "Invited" + locked: "Locked" + project_roles: "Project roles" + wp_shares: "Work package shares" + groups: "Groups" + my: + access_token: + failed_to_reset_token: "Failed to reset access token: %{error}" + notice_reset_token: "A new %{type} token has been generated. Your access token is:" + token_value_warning: "Note: This is the only time you will see this token, make sure to copy it now." + no_results_title_text: There are currently no access tokens available. + notice_api_token_revoked: "The API token has been deleted. To create a new token please use the link in the API section." + notice_rss_token_revoked: "The RSS token has been deleted. To create a new token please use the link in the RSS section." + notice_ical_token_revoked: 'iCalendar token "%{token_name}" for calendar "%{calendar_name}" of project "%{project_name}" has been revoked. The iCalendar URL with this token is now invalid.' + news: + index: + no_results_title_text: There is currently no news to report. + no_results_content_text: Add a news item + users: + autologins: + prompt: "Stay logged in for %{num_days}" + sessions: + remembered_devices: "Remembered devices" + remembered_devices_caption: "A list of all devices that logged into this account using the 'Stay logged in' option." + session_name: "%{browser_name} %{browser_version} on %{os_name}" + browser: "Browser" + device: "Device / OS" + unknown_browser: "unknown browser" + unknown_os: "unknown operating system" + current: "Current session" + title: "Session management" + instructions: "This is a list of devices that have logged into your account. Revoke any sessions that you do not recognize or you have no longer access to." + may_not_delete_current: "You cannot delete your current session." + groups: + member_in_these_groups: "This user is currently a member of the following groups:" + no_results_title_text: This user is currently not a member in any group. + memberships: + no_results_title_text: This user is currently not a member of a project. + page: + text: 'Text' + placeholder_users: + right_to_manage_members_missing: > + You are not allowed to delete the placeholder user. You do not have the right to manage members for all projects that the placeholder user is a member of. + delete_tooltip: "Delete placeholder user" + deletion_info: + heading: "Delete placeholder user %{name}" + data_consequences: > + All occurrences of the placeholder user (e.g., as assignee, responsible or other user values) will be reassigned to an account called "Deleted user". As the data of every deleted account is reassigned to this account it will not be possible to distinguish the data the user created from the data of another deleted account. + irreversible: "This action is irreversible" + confirmation: "Enter the placeholder user name %{name} to confirm the deletion." + upsale: + title: Placeholder users + description: > + Placeholder users are a way to assign work packages to users who are not part of your project. They can be useful in a range of scenarios; for example, if you need to track tasks for a resource that is not yet named or available, or if you don’t want to give that person access to OpenProject but still want to track tasks assigned to them. + prioritiies: + edit: + priority_color_text: | + Click to assign or change the color of this priority. + It can be used for highlighting work packages in the table. + reportings: + index: + no_results_title_text: There are currently no status reportings. + no_results_content_text: Add a status reporting + statuses: + edit: + status_readonly_html: | + Check this option to mark work packages with this status as read-only. + No attributes can be changed with the exception of the status. +
+ Note: Inherited values (e.g., from children or relations) will still apply. + status_color_text: | + Click to assign or change the color of this status. + It is shown in the status button and can be used for highlighting work packages in the table. + index: + no_results_title_text: There are currently no work package statuses. + no_results_content_text: Add a new status + themes: + light: "Light" + light_high_contrast: "Light high contrast" + types: + index: + no_results_title_text: There are currently no types. + no_results_content_text: Create a new type + edit: + settings: "Settings" + form_configuration: "Form configuration" + more_info_text_html: > + Enterprise edition allows you to customize form configuration with these additional add-ons:
+ projects: "Projects" + enabled_projects: "Enabled projects" + edit_query: "Edit table" + query_group_placeholder: "Give the table a name" + reset: "Reset to defaults" + type_color_text: | + The selected color distinguishes different types + in Gantt charts or work packages tables. It is therefore recommended to use a strong color. + versions: + overview: + work_packages_in_archived_projects: "The version is shared with archived projects which still have work packages assigned to this version. These are counted, but will not appear in the linked views." + no_results_title_text: There are currently no work packages assigned to this version. + wiki: + page_not_editable_index: The requested page does not (yet) exist. You have been redirected to the index of all wiki pages. + no_results_title_text: There are currently no wiki pages. + print_hint: This will print the content of this wiki page without any navigation bars. + index: + no_results_content_text: Add a new wiki page + work_flows: + index: + no_results_title_text: There are currently no workflows. + work_packages: + x_descendants: + other: "%{count} work package descendants" + bulk: + copy_failed: "The work packages could not be copied." + move_failed: "The work packages could not be moved." + could_not_be_saved: "The following work packages could not be saved:" + none_could_be_saved: "None of the %{total} work packages could be updated." + x_out_of_y_could_be_saved: "%{failing} out of the %{total} work packages could not be updated while %{success} could." + selected_because_descendants: "While %{selected} work packages where selected, in total %{total} work packages are affected which includes descendants." + descendant: "descendant of selected" + move: + no_common_statuses_exists: "There is no status available for all selected work packages. Their status cannot be changed." + unsupported_for_multiple_projects: "Bulk move/copy is not supported for work packages from multiple projects" + sharing: + missing_workflow_waring: + title: "Workflow missing for work package sharing" + message: "No workflow is configured for the 'Work package editor' role. Without a workflow, the shared with user cannot alter the status of the work package. Workflows can be copied. Select a source type (e.g. 'Task') and source role (e.g. 'Member'). Then select the target types. To start with, you could select all the types as targets. Finally, select the 'Work package editor' role as the target and press 'Copy'. After having thus created the defaults, fine tune the workflows as you do for every other role." + link_message: "Configure the workflows in the administration." + summary: + reports: + category: + no_results_title_text: There are currently no categories available. + assigned_to: + no_results_title_text: There are currently no members part of this project. + responsible: + no_results_title_text: There are currently no members part of this project. + author: + no_results_title_text: There are currently no members part of this project. + priority: + no_results_title_text: There are currently no priorities available. + type: + no_results_title_text: There are currently no types available. + version: + no_results_title_text: There are currently no versions available. + label_invitation: Invitation + account: + delete: "Delete account" + delete_confirmation: "Are you sure you want to delete the account?" + deletion_pending: "Account has been locked and was scheduled for deletion. Note that this process takes place in the background. It might take a few moments until the user is fully deleted." + deletion_info: + data_consequences: + other: 'Of the data the user created (e.g. email, preferences, work packages, wiki entries) as much as possible will be deleted. Note however, that data like work packages and wiki entries can not be deleted without impeding the work of the other users. Such data is hence reassigned to an account called "Deleted user". As the data of every deleted account is reassigned to this account it will not be possible to distinguish the data the user created from the data of another deleted account.' + self: 'Of the data you created (e.g. email, preferences, work packages, wiki entries) as much as possible will be deleted. Note however, that data like work packages and wiki entries can not be deleted without impeding the work of the other users. Such data is hence reassigned to an account called "Deleted user". As the data of every deleted account is reassigned to this account it will not be possible to distinguish the data you created from the data of another deleted account.' + heading: "Delete account %{name}" + info: + other: "Deleting the user account is an irreversible action." + self: "Deleting your user account is an irreversible action." + login_consequences: + other: "The account will be deleted from the system. Therefore, the user will no longer be able to log in with his current credentials. He/she can choose to become a user of this application again by the means this application grants." + self: "Your account will be deleted from the system. Therefore, you will no longer be able to log in with your current credentials. If you choose to become a user of this application again, you can do so by using the means this application grants." + login_verification: + other: "Enter the login %{name} to verify the deletion. Once submitted, you will be asked to confirm your password." + self: "Enter your login %{name} to verify the deletion. Once submitted, you will be asked to confirm your password." + error_inactive_activation_by_mail: > + Your account has not yet been activated. To activate your account, click on the link that was emailed to you. + error_inactive_manual_activation: > + Your account has not yet been activated. Please wait for an administrator to activate your account. + error_self_registration_disabled: > + User registration is disabled on this system. Please ask an administrator to create an account for you. + error_self_registration_limited_provider: > + User registration is limited for the Single sign-on provider '%{name}'. Please ask an administrator to activate the account for you or change the self registration limit for this provider. + login_with_auth_provider: "or sign in with your existing account" + signup_with_auth_provider: "or sign up using" + auth_source_login: Please login as %{login} to activate your account. + omniauth_login: Please login to activate your account. + actionview_instancetag_blank_option: "Please select" + activerecord: + attributes: + announcements: + show_until: "Display until" + attachment: + attachment_content: "Attachment content" + attachment_file_name: "Attachment file name" + downloads: "Downloads" + file: "File" + filename: "File" + filesize: "Size" + attribute_help_text: + attribute_name: "Attribute" + help_text: "Help text" + ldap_auth_source: + account: "Account" + attr_firstname: "Firstname attribute" + attr_lastname: "Lastname attribute" + attr_login: "Username attribute" + attr_mail: "Email attribute" + base_dn: "Base DN" + host: "Host" + onthefly: "Automatic user creation" + port: "Port" + tls_certificate_string: "LDAP server SSL certificate" + changeset: + repository: "Repository" + color: + hexcode: "Hex code" + comment: + commented: "Commented" #an object that this comment belongs to + custom_action: + actions: "Actions" + custom_field: + allow_non_open_versions: "Allow non-open versions" + default_value: "Default value" + editable: "Editable" + field_format: "Format" + is_filter: "Used as a filter" + is_required: "Required" + max_length: "Maximum length" + min_length: "Minimum length" + multi_value: "Allow multi-select" + possible_values: "Possible values" + regexp: "Regular expression" + searchable: "Searchable" + visible: "Visible" + custom_value: + value: "Value" + enterprise_token: + starts_at: "Valid since" + subscriber: "Subscriber" + encoded_token: "Enterprise support token" + active_user_count_restriction: "Maximum active users" + grids/grid: + page: "Page" + row_count: "Number of rows" + column_count: "Number of columns" + widgets: "Widgets" + oauth_client: + client: "Client ID" + relation: + delay: "Delay" + from: "Work package" + to: "Related work package" + status: + is_closed: "Work package closed" + is_readonly: "Work package read-only" + journal: + notes: "Notes" + member: + roles: "Roles" + project: + active_value: + true: "unarchived" + false: "archived" + identifier: "Identifier" + latest_activity_at: "Latest activity at" + parent: "Subproject of" + public_value: + title: "Visibility" + true: "public" + false: "private" + queries: "Queries" + status_code: "Project status" + status_explanation: "Project status description" + status_codes: + not_started: "Not started" + on_track: "On track" + at_risk: "At risk" + off_track: "Off track" + finished: "Finished" + discontinued: "Discontinued" + templated: "Template project" + templated_value: + true: "marked as template" + false: "unmarked as template" + types: "Types" + versions: "Versions" + work_packages: "Work Packages" + query: + column_names: "Columns" + relations_to_type_column: "Relations to %{type}" + relations_of_type_column: "%{type} relations" + group_by: "Group results by" + filters: "Filters" + timeline_labels: "Timeline labels" + repository: + url: "URL" + role: + permissions: "Permissions" + time_entry: + activity: "Activity" + hours: "Hours" + spent_on: "Date" + type: "Type" + ongoing: "Ongoing" + type: + description: "Default text for description" + attribute_groups: "" + is_in_roadmap: "Displayed in roadmap by default" + is_default: "Activated for new projects by default" + is_milestone: "Is milestone" + color: "Color" + user: + admin: "Administrator" + auth_source: "Authentication source" + ldap_auth_source: "LDAP connection" + identity_url: "Identity URL" + current_password: "Current password" + force_password_change: "Enforce password change on next login" + language: "Language" + last_login_on: "Last login" + new_password: "New password" + password_confirmation: "Confirmation" + consented_at: "Consented at" + user_preference: + comments_sorting: "Display comments" + hide_mail: "Hide my email address" + impaired: "Accessibility mode" + time_zone: "Time zone" + auto_hide_popups: "Auto-hide success notifications" + warn_on_leaving_unsaved: "Warn me when leaving a work package with unsaved changes" + theme: "Mode" + version: + effective_date: "Finish date" + sharing: "Sharing" + wiki_content: + text: "Text" + wiki_page: + parent_title: "Parent page" + redirect_existing_links: "Redirect existing links" + planning_element_type_color: + hexcode: Hex code + work_package: + begin_insertion: "Begin of the insertion" + begin_deletion: "Begin of the deletion" + children: "Subelements" + derived_done_ratio: "Jumlah % disiapkan" + derived_remaining_hours: "Total remaining work" + derived_remaining_time: "Total remaining work" + done_ratio: "% Complete" + duration: "Duration" + end_insertion: "End of the insertion" + end_deletion: "End of the deletion" + ignore_non_working_days: "Ignore non working days" + include_non_working_days: + title: "Working days" + false: "working days only" + true: "include non-working days" + notify: "Notify" #used in custom actions + parent: "Parent" + parent_issue: "Parent" + parent_work_package: "Parent" + priority: "Priority" + progress: "% Complete" + readonly: "Read only" + remaining_hours: "Remaining work" + remaining_time: "Remaining work" + shared_with_users: "Shared with" + schedule_manually: "Manual scheduling" + spent_hours: "Spent time" + spent_time: "Spent time" + subproject: "Subproject" + time_entries: "Log time" + type: "Type" + version: "Version" + watcher: "Watcher" + "doorkeeper/application": + uid: "Client ID" + secret: "Client secret" + owner: "Owner" + redirect_uri: "Redirect URI" + client_credentials_user_id: "Client Credentials User ID" + scopes: "Scopes" + confidential: "Confidential" + errors: + messages: + accepted: "must be accepted." + after: "must be after %{date}." + after_or_equal_to: "must be after or equal to %{date}." + before: "must be before %{date}." + before_or_equal_to: "must be before or equal to %{date}." + blank: "can't be blank." + blank_nested: "needs to have the property '%{property}' set." + cant_link_a_work_package_with_a_descendant: "A work package cannot be linked to one of its subtasks." + circular_dependency: "This relation would create a circular dependency." + confirmation: "doesn't match %{attribute}." + could_not_be_copied: "%{dependency} could not be (fully) copied." + does_not_exist: "does not exist." + error_enterprise_only: "%{action} is only available in the OpenProject Enterprise edition" + error_unauthorized: "may not be accessed." + error_readonly: "was attempted to be written but is not writable." + error_conflict: "Information has been updated by at least one other user in the meantime." + email: "is not a valid email address." + empty: "can't be empty." + even: "must be even." + exclusion: "is reserved." + file_too_large: "is too large (maximum size is %{count} Bytes)." + filter_does_not_exist: "filter does not exist." + format: "does not match the expected format '%{expected}'." + format_nested: "does not match the expected format '%{expected}' at path '%{path}'." + greater_than: "must be greater than %{count}." + greater_than_or_equal_to: "must be greater than or equal to %{count}." + greater_than_or_equal_to_start_date: "must be greater than or equal to the start date." + greater_than_start_date: "must be greater than the start date." + inclusion: "is not set to one of the allowed values." + inclusion_nested: "is not set to one of the allowed values at path '%{path}'." + invalid: "is invalid." + invalid_url: "is not a valid URL." + invalid_url_scheme: "is not a supported protocol (allowed: %{allowed_schemes})." + less_than_or_equal_to: "must be less than or equal to %{count}." + not_available: "is not available due to a system configuration." + not_deletable: "cannot be deleted." + not_current_user: "is not the current user." + not_a_date: "is not a valid date." + not_a_datetime: "is not a valid date time." + not_a_number: "is not a number." + not_allowed: "is invalid because of missing permissions." + not_an_integer: "is not an integer." + not_an_iso_date: "is not a valid date. Required format: YYYY-MM-DD." + not_same_project: "doesn't belong to the same project." + odd: "must be odd." + regex_invalid: "could not be validated with the associated regular expression." + smaller_than_or_equal_to_max_length: "must be smaller than or equal to maximum length." + taken: "has already been taken." + too_long: "is too long (maximum is %{count} characters)." + too_short: "is too short (minimum is %{count} characters)." + type_mismatch: "is not of type '%{type}'" + type_mismatch_nested: "is not of type '%{type}' at path '%{path}'" + unchangeable: "cannot be changed." + unknown_property: "is not a known property." + unknown_property_nested: "has the unknown path '%{path}'." + unremovable: "cannot be removed." + url_not_secure_context: > + is not providing a "Secure Context". Either use HTTPS or a loopback address, such as localhost. + wrong_length: "is the wrong length (should be %{count} characters)." + models: + ldap_auth_source: + attributes: + tls_certificate_string: + invalid_certificate: "The provided SSL certificate is invalid: %{additional_message}" + format: "%{message}" + attachment: + attributes: + content_type: + blank: "The content type of the file cannot be blank." + not_whitelisted: "The file was rejected by an automatic filter. '%{value}' is not whitelisted for upload." + format: "%{message}" + capability: + context: + global: "Global" + query: + filters: + minimum: "need to include at least one filter for principal, context or id with the '=' operator." + custom_field: + at_least_one_custom_option: "At least one option needs to be available." + custom_actions: + only_one_allowed: "(%{name}) only one value is allowed." + empty: "(%{name}) value can't be empty." + inclusion: "(%{name}) value is not set to one of the allowed values." + not_logged_in: "(%{name}) value cannot be set because you are not logged in." + not_an_integer: "(%{name}) is not an integer." + smaller_than_or_equal_to: "(%{name}) must be smaller than or equal to %{count}." + greater_than_or_equal_to: "(%{name}) must be greater than or equal to %{count}." + format: "%{message}" + doorkeeper/application: + attributes: + redirect_uri: + fragment_present: "cannot contain a fragment." + invalid_uri: "must be a valid URI." + relative_uri: "must be an absolute URI." + secured_uri: 'is not providing a "Secure Context". Either use HTTPS or a loopback address, such as localhost.' + forbidden_uri: "is forbidden by the server." + scopes: + not_match_configured: "doesn't match available scopes." + enterprise_token: + unreadable: "can't be read. Are you sure it is a support token?" + grids/grid: + overlaps: "overlap." + outside: "is outside of the grid." + end_before_start: "end value needs to be larger than the start value." + ical_token_query_assignment: + attributes: + name: + blank: "is mandatory. Please select a name." + not_unique: "is already in use. Please select another name." + notifications: + at_least_one_channel: "At least one channel for sending notifications needs to be specified." + attributes: + read_ian: + read_on_creation: "cannot be set to true on notification creation." + mail_reminder_sent: + set_on_creation: "cannot be set to true on notification creation." + reason: + no_notification_reason: "cannot be blank as IAN is chosen as a channel." + reason_mail_digest: + no_notification_reason: "cannot be blank as mail digest is chosen as a channel." + non_working_day: + attributes: + date: + taken: "A non-working day already exists for %{value}." + format: "%{message}" + parse_schema_filter_params_service: + attributes: + base: + unsupported_operator: "The operator is not supported." + invalid_values: "A value is invalid." + id_filter_required: "An 'id' filter is required." + project: + archived_ancestor: "The project has an archived ancestor." + foreign_wps_reference_version: "Work packages in non descendant projects reference versions of the project or its descendants." + attributes: + base: + archive_permission_missing_on_subprojects: "You do not have the permissions required to archive all sub-projects. Please contact an administrator." + types: + in_use_by_work_packages: "still in use by work packages: %{types}" + enabled_modules: + dependency_missing: "The module '%{dependency}' needs to be enabled as well since the module '%{module}' depends on it." + format: "%{message}" + query: + attributes: + project: + error_not_found: "not found" + public: + error_unauthorized: "- The user has no permission to create public views." + group_by: + invalid: "Can't group by: %{value}" + format: "%{message}" + column_names: + invalid: "Invalid query column: %{value}" + format: "%{message}" + sort_criteria: + invalid: "Can't sort by column: %{value}" + format: "%{message}" + timestamps: + invalid: "Timestamps contain invalid values: %{values}" + forbidden: "Timestamps contain forbidden values: %{values}" + format: "%{message}" + group_by_hierarchies_exclusive: "is mutually exclusive with group by '%{group_by}'. You cannot activate both." + filters: + custom_fields: + inexistent: "There is no custom field for the filter." + queries/filters/base: + attributes: + values: + inclusion: "filter has invalid values." + format: "%{message}" + relation: + typed_dag: + circular_dependency: "The relationship creates a circle of relationships." + attributes: + to: + error_not_found: "work package in `to` position not found or not visible" + error_readonly: "an existing relation's `to` link is immutable" + from: + error_not_found: "work package in `from` position not found or not visible" + error_readonly: "an existing relation's `from` link is immutable" + repository: + not_available: "SCM vendor is not available" + not_whitelisted: "is not allowed by the configuration." + invalid_url: "is not a valid repository URL or path." + must_not_be_ssh: "must not be an SSH url." + no_directory: "is not a directory." + role: + attributes: + permissions: + dependency_missing: "need to also include '%{dependency}' as '%{permission}' is selected." + setting: + attributes: + base: + working_days_are_missing: "At least one day of the week must be defined as a working day." + previous_working_day_changes_unprocessed: "The previous changes to the working days configuration have not been applied yet." + time_entry: + attributes: + hours: + day_limit: "is too high as a maximum of 24 hours can be logged per date." + user_preference: + attributes: + pause_reminders: + invalid_range: "can only be a valid date range." + daily_reminders: + full_hour: "can only be configured to be delivered at a full hour." + notification_settings: + only_one_global_setting: "There must only be one global notification setting." + email_alerts_global: "The email notification settings can only be set globally." + format: "%{message}" + wrong_date: "Wrong value for Start date, Due date, or Overdue." + watcher: + attributes: + user_id: + not_allowed_to_view: "is not allowed to view this resource." + locked: "is locked." + wiki_page: + error_conflict: "The wiki page has been updated by someone else while you were editing it." + attributes: + slug: + undeducible: "cannot be deduced from the title '%{title}'." + work_package: + is_not_a_valid_target_for_time_entries: "Work package #%{id} is not a valid target for reassigning the time entries." + attributes: + assigned_to: + format: "%{message}" + due_date: + not_start_date: "is not on start date, although this is required for milestones." + cannot_be_null: "can not be set to null as start date and duration are known." + duration: + larger_than_dates: "is larger than the interval between the start and the finish date." + smaller_than_dates: "is smaller than the interval between the start and the finish date." + not_available_for_milestones: "is not available for milestone typed work packages." + cannot_be_null: "can not be set to null as start date and finish date are known." + parent: + cannot_be_milestone: "cannot be a milestone." + cannot_be_self_assigned: "cannot be assigned to itself." + cannot_be_in_another_project: "cannot be in another project." + not_a_valid_parent: "is invalid." + start_date: + violates_relationships: "can only be set to %{soonest_start} or later so as not to violate the work package's relationships." + cannot_be_null: "can not be set to null as finish date and duration are known." + status_id: + status_transition_invalid: "is invalid because no valid transition exists from old to new status for the current user's roles." + status_invalid_in_type: "is invalid because the current status does not exist in this type." + type: + cannot_be_milestone_due_to_children: "cannot be a milestone because this work package has children." + priority_id: + only_active_priorities_allowed: "needs to be active." + category: + only_same_project_categories_allowed: "The category of a work package must be within the same project as the work package." + does_not_exist: "The specified category does not exist." + estimated_hours: + only_values_greater_or_equal_zeroes_allowed: "must be >= 0." + readonly_status: "The work package is in a readonly status so its attributes cannot be changed." + type: + attributes: + attribute_groups: + attribute_unknown: "Invalid work package attribute used." + attribute_unknown_name: "Invalid work package attribute used: %{attribute}" + duplicate_group: "The group name '%{group}' is used more than once. Group names must be unique." + query_invalid: "The embedded query '%{group}' is invalid: %{details}" + group_without_name: "Unnamed groups are not allowed." + user: + attributes: + base: + user_limit_reached: "User limit reached. No more accounts can be created on the current plan." + one_must_be_active: "Admin User cannot be locked/removed. At least one admin must be active." + password_confirmation: + confirmation: "Password confirmation does not match password." + format: "%{message}" + password: + weak: "Must contain characters of the following classes (at least %{min_count} of %{all_count}): %{rules}." + lowercase: "lowercase (e.g. 'a')" + uppercase: "uppercase (e.g. 'A')" + numeric: "numeric (e.g. '1')" + special: "special (e.g. '%')" + reused: + other: "has been used before. Please choose one that is different from your last %{count}." + match: + confirm: "Confirm new password." + description: "'Password confirmation' should match the input in the 'New password' field." + status: + invalid_on_create: "is not a valid status for new users." + ldap_auth_source: + error_not_found: "not found" + auth_source: + error_not_found: "not found" + member: + principal_blank: "Please choose at least one user or group." + role_blank: "need to be assigned." + attributes: + roles: + ungrantable: "has an unassignable role." + more_than_one: "has more than one role." + principal: + unassignable: "cannot be assigned to a project." + version: + undeletable_archived_projects: "The version cannot be deleted as it has work packages attached to it." + undeletable_work_packages_attached: "The version cannot be deleted as it has work packages attached to it." + status: + readonly_default_exlusive: "can not be activated for statuses that are marked default." + template: + body: "Please check the following fields:" + header: + other: "%{count} errors prohibited this %{model} from being saved" + models: + attachment: "File" + attribute_help_text: "Attribute help text" + category: "Category" + comment: "Comment" + custom_action: "Custom action" + custom_field: "Custom field" + "doorkeeper/application": "OAuth application" + forum: "Forum" + global_role: "Global role" + group: "Group" + member: "Member" + news: "News" + notification: + other: "Notifications" + placeholder_user: "Placeholder user" + project: "Project" + query: "Custom query" + role: + other: "Roles" + status: "Work package status" + type: "Type" + user: "User" + version: "Version" + workflow: "Workflow" + work_package: "Work package" + wiki: "Wiki" + wiki_page: "Wiki page" + errors: + header_invalid_fields: + other: "There were problems with the following fields:" + header_additional_invalid_fields: + other: "Additionally, there were problems with the following fields:" + field_erroneous_label: "This field is invalid: %{full_errors}\nPlease enter a valid value." + activity: + item: + created_by_on: "created by %{user} on %{datetime}" + created_by_on_time_entry: "time logged by %{user} on %{datetime}" + created_on: "created on %{datetime}" + created_on_time_entry: "time logged on %{datetime}" + updated_by_on: "updated by %{user} on %{datetime}" + updated_by_on_time_entry: "logged time updated by %{user} on %{datetime}" + updated_on: "updated on %{datetime}" + updated_on_time_entry: "logged time updated on %{datetime}" + parent_without_of: "Subproject" + parent_no_longer: "No longer subproject of" + time_entry: + hour: + other: "%{count} hours" + hour_html: + other: "%{count} hours" + updated: "changed from %{old_value} to %{value}" + logged_for: "Logged for" + filter: + changeset: "Changesets" + message: "Forums" + news: "News" + project_attribute: "Project attributes" + subproject: "Include subprojects" + time_entry: "Spent time" + wiki_edit: "Wiki" + work_package: "Work packages" + #common attributes of all models + attributes: + active: "Active" + assigned_to: "Assignee" + assignee: "Assignee" + attachments: "Attachments" + author: "Author" + base: "General Error:" + blocks_ids: "IDs of blocked work packages" + category: "Category" + comment: "Comment" + comments: "Comment" + content: "Content" + color: "Color" + created_at: "Created on" + custom_options: "Possible values" + custom_values: "Custom fields" + date: "Date" + default_columns: "Default columns" + description: "Description" + derived_due_date: "Derived finish date" + derived_estimated_hours: "Total work" + derived_start_date: "Derived start date" + display_sums: "Display Sums" + due_date: "Finish date" + estimated_hours: "Work" + estimated_time: "Work" + expires_at: "Expires at" + firstname: "First name" + group: "Group" + groups: "Groups" + id: "ID" + is_default: "Default value" + is_for_all: "For all projects" + public: "Public" + #kept for backwards compatibility + issue: "Work package" + lastname: "Last name" + login: "Username" + mail: "Email" + name: "Name" + password: "Password" + priority: "Priority" + project: "Project" + responsible: "Accountable" + role: "Role" + roles: "Roles" + start_date: "Start date" + status: "Status" + subject: "Subject" + summary: "Summary" + title: "Title" + type: "Type" + updated_at: "Updated on" + updated_on: "Updated on" + uploader: "Uploader" + user: "User" + value: "Value" + version: "Version" + work_package: "Work package" + backup: + failed: "Backup failed" + label_backup_token: "Backup token" + label_create_token: "Create backup token" + label_delete_token: "Delete backup token" + label_reset_token: "Reset backup token" + label_token_users: "The following users have active backup tokens" + reset_token: + action_create: Create + action_reset: Reset + heading_reset: "Reset backup token" + heading_create: "Create backup token" + implications: > + Enabling backups will allow any user with the required permissions and this backup token to download a backup containing all data of this OpenProject installation. This includes the data of all other users. + info: > + You will need to generate a backup token to be able to create a backup. Each time you want to request a backup you will have to provide this token. You can delete the backup token to disable backups for this user. + verification: > + Enter %{word} to confirm you want to %{action} the backup token. + verification_word_reset: reset + verification_word_create: create + warning: > + When you create a new token you will only be allowed to request a backup after 24 hours. This is a safety measure. After that you can request a backup any time using that token. + text_token_deleted: Backup token deleted. Backups are now disabled. + error: + invalid_token: Invalid or missing backup token + token_cooldown: The backup token will be valid in %{hours} hours. + backup_pending: There is already a backup pending. + limit_reached: You can only do %{limit} backups per day. + button_add: "Add" + button_add_comment: "Add comment" + button_add_member: Add member + button_add_watcher: "Add watcher" + button_annotate: "Annotate" + button_apply: "Apply" + button_archive: "Archive" + button_back: "Back" + button_cancel: "Cancel" + button_change: "Change" + button_change_parent_page: "Change parent page" + button_change_password: "Change password" + button_check_all: "Check all" + button_clear: "Clear" + button_click_to_reveal: "Click to reveal" + button_close: "Close" + button_collapse_all: "Collapse all" + button_configure: "Configure" + button_continue: "Continue" + button_copy: "Copy" + button_copy_to_clipboard: "Copy to clipboard" + button_copy_link_to_clipboard: "Copy link to clipboard" + button_copy_and_follow: "Copy and follow" + button_create: "Create" + button_create_and_continue: "Create and continue" + button_delete: "Delete" + button_decline: "Decline" + button_delete_watcher: "Delete watcher %{name}" + button_download: "Download" + button_duplicate: "Duplicate" + button_edit: "Edit" + button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" + button_expand_all: "Expand all" + button_filter: "Filter" + button_generate: "Generate" + button_list: "List" + button_lock: "Lock" + button_login: "Sign in" + button_move: "Move" + button_move_and_follow: "Move and follow" + button_print: "Print" + button_quote: "Quote" + button_remove: Remove + button_rename: "Rename" + button_replace: "Replace" + button_revoke: "Revoke" + button_reply: "Reply" + button_reset: "Reset" + button_rollback: "Rollback to this version" + button_save: "Save" + button_apply_changes: "Apply changes" + button_save_back: "Save and back" + button_show: "Show" + button_sort: "Sort" + button_submit: "Submit" + button_test: "Test" + button_unarchive: "Unarchive" + button_uncheck_all: "Uncheck all" + button_unlock: "Unlock" + button_unwatch: "Unwatch" + button_update: "Update" + button_upgrade: "Upgrade" + button_upload: "Upload" + button_view: "View" + button_watch: "Watch" + button_manage_menu_entry: "Configure menu item" + button_add_menu_entry: "Add menu item" + button_configure_menu_entry: "Configure menu item" + button_delete_menu_entry: "Delete menu item" + consent: + checkbox_label: I have noted and do consent to the above. + failure_message: Consent failed, cannot proceed. + title: User Consent + decline_warning_message: You have declined to consent and have been logged out. + user_has_consented: User has consented to your configured statement at the given time. + not_yet_consented: User has not consented yet, will be requested upon next login. + contact_mail_instructions: Define the mail address that users can reach a data controller to perform data change or removal requests. + contact_your_administrator: Please contact your administrator if you want to have your account deleted. + contact_this_mail_address: Please contact %{mail_address} if you want to have your account deleted. + text_update_consent_time: Check this box to force users to consent again. Enable when you have changed the legal aspect of the consent information above. + update_consent_last_time: "Last update of consent: %{update_time}" + copy_project: + title: 'Copy project "%{source_project_name}"' + started: 'Started to copy project "%{source_project_name}" to "%{target_project_name}". You will be informed by mail as soon as "%{target_project_name}" is available.' + failed: "Cannot copy project %{source_project_name}" + failed_internal: "Copying failed due to an internal error." + succeeded: "Created project %{target_project_name}" + errors: "Error" + project_custom_fields: "Custom fields on project" + x_objects_of_this_type: + zero: "No objects of this type" + one: "One object of this type" + other: "%{count} objects of this type" + text: + failed: 'Could not copy project "%{source_project_name}" to project "%{target_project_name}".' + succeeded: 'Copied project "%{source_project_name}" to "%{target_project_name}".' + create_new_page: "Wiki page" + date: + abbr_day_names: + - "Sun" + - "Mon" + - "Tue" + - "Wed" + - "Thu" + - "Fri" + - "Sat" + abbr_month_names: + - null + - "Jan" + - "Feb" + - "Mar" + - "Apr" + - "May" + - "Jun" + - "Jul" + - "Aug" + - "Sep" + - "Oct" + - "Nov" + - "Dec" + abbr_week: "Wk" + day_names: + - "Sunday" + - "Monday" + - "Tuesday" + - "Wednesday" + - "Thursday" + - "Friday" + - "Saturday" + formats: + #Use the strftime parameters for formats. + #When no format has been given, it uses default. + #You can provide other formats here if you like! + default: "%m/%d/%Y" + long: "%B %d, %Y" + short: "%b %d" + #Don't forget the nil at the beginning; there's no such thing as a 0th month + month_names: #Used in date_select and datetime_select. + - null + - "January" + - "February" + - "March" + - "April" + - "May" + - "June" + - "July" + - "August" + - "September" + - "October" + - "November" + - "December" + order: + - :year + - :month + - :day + datetime: + distance_in_words: + about_x_hours: + other: "about %{count} hours" + about_x_months: + other: "about %{count} months" + about_x_years: + other: "about %{count} years" + almost_x_years: + other: "almost %{count} years" + half_a_minute: "half a minute" + less_than_x_minutes: + other: "less than %{count} minutes" + less_than_x_seconds: + other: "less than %{count} seconds" + over_x_years: + other: "over %{count} years" + x_days: + other: "%{count} days" + x_minutes: + other: "%{count} minutes" + x_minutes_abbreviated: + other: "%{count} mins" + x_hours: + other: "%{count} hours" + x_hours_abbreviated: + other: "%{count} hrs" + x_weeks: + other: "%{count} weeks" + x_months: + other: "%{count} months" + x_years: + other: "%{count} years" + x_seconds: + other: "%{count} seconds" + x_seconds_abbreviated: + other: "%{count} s" + units: + hour: + other: "hours" + description_active: "Active?" + description_attachment_toggle: "Show/Hide attachments" + description_autocomplete: > + This field uses autocomplete. While typing the title of a work package you will receive a list of possible candidates. Choose one using the arrow up and arrow down key and select it with tab or enter. Alternatively you can enter the work package number directly. + description_available_columns: "Available Columns" + description_choose_project: "Projects" + description_compare_from: "Compare from" + description_compare_to: "Compare to" + description_current_position: "You are here: " + description_date_from: "Enter start date" + description_date_to: "Enter end date" + description_enter_number: "Enter number" + description_enter_text: "Enter text" + description_filter: "Filter" + description_filter_toggle: "Show/Hide filter" + description_category_reassign: "Choose category" + description_message_content: "Message content" + description_my_project: "You are member" + description_notes: "Notes" + description_parent_work_package: "Parent work package of current" + description_project_scope: "Search scope" + description_query_sort_criteria_attribute: "Sort attribute" + description_query_sort_criteria_direction: "Sort direction" + description_search: "Searchfield" + description_select_work_package: "Select work package" + description_selected_columns: "Selected Columns" + description_sub_work_package: "Sub work package of current" + description_toc_toggle: "Show/Hide table of contents" + description_wiki_subpages_reassign: "Choose new parent page" + #Text direction: Left-to-Right (ltr) or Right-to-Left (rtl) + direction: ltr + ee: + upsale: + form_configuration: + description: "Customize the form configuration with these additional add-ons:" + add_groups: "Add new attribute groups" + rename_groups: "Rename attributes groups" + project_filters: + description_html: "Filtering and sorting on custom fields is an Enterprise edition add-on." + enumeration_activities: "Time tracking activities" + enumeration_work_package_priorities: "Work package priorities" + enumeration_reported_project_statuses: "Reported project status" + error_auth_source_sso_failed: "Single Sign-On (SSO) for user '%{value}' failed" + error_can_not_archive_project: "This project cannot be archived: %{errors}" + error_can_not_delete_entry: "Unable to delete entry" + error_can_not_delete_custom_field: "Unable to delete custom field" + error_can_not_delete_in_use_archived_undisclosed: "There are also work packages in archived projects. You need to ask an administrator to perform the deletion to see which projects are affected." + error_can_not_delete_in_use_archived_work_packages: "There are also work packages in archived projects. You need to reactivate the following projects first, before you can change the attribute of the respective work packages: %{archived_projects_urls}" + error_can_not_delete_type: + explanation: 'This type contains work packages and cannot be deleted. You can see all affected work packages in this view.' + error_can_not_delete_standard_type: "Standard types cannot be deleted." + error_can_not_invite_user: "Failed to send invitation to user." + error_can_not_remove_role: "This role is in use and cannot be deleted." + error_can_not_reopen_work_package_on_closed_version: "A work package assigned to a closed version cannot be reopened" + error_can_not_find_all_resources: "Could not find all related resources to this request." + error_can_not_unarchive_project: "This project cannot be unarchived: %{errors}" + error_check_user_and_role: "Please choose a user and a role." + error_code: "Error %{code}" + error_color_could_not_be_saved: "Color could not be saved" + error_cookie_missing: "The OpenProject cookie is missing. Please ensure that cookies are enabled, as this application will not properly function without." + error_custom_option_not_found: "Option does not exist." + error_enterprise_activation_user_limit: "Your account could not be activated (user limit reached). Please contact your administrator to gain access." + error_enterprise_token_invalid_domain: "The Enterprise edition is not active. Your Enterprise token's domain (%{actual}) does not match the system's host name (%{expected})." + error_failed_to_delete_entry: "Failed to delete this entry." + error_in_dependent: "Error attempting to alter dependent object: %{dependent_class} #%{related_id} - %{related_subject}: %{error}" + error_in_new_dependent: "Error attempting to create dependent object: %{dependent_class} - %{related_subject}: %{error}" + error_invalid_selected_value: "Invalid selected value." + error_journal_attribute_not_present: "Journal does not contain attribute %{attribute}." + error_pdf_export_too_many_columns: "Too many columns selected for the PDF export. Please reduce the number of columns." + error_pdf_failed_to_export: "The PDF export could not be saved: %{error}" + error_token_authenticity: "Unable to verify Cross-Site Request Forgery token. Did you try to submit data on multiple browsers or tabs? Please close all tabs and try again." + error_work_package_done_ratios_not_updated: "Work package % Complete values not updated." + error_work_package_not_found_in_project: "The work package was not found or does not belong to this project" + error_must_be_project_member: "must be project member" + error_migrations_are_pending: "Your OpenProject installation has pending database migrations. You have likely missed running the migrations on your last upgrade. Please check the upgrade guide to properly upgrade your installation." + error_migrations_visit_upgrade_guides: "Please visit our upgrade guide documentation" + error_no_default_work_package_status: 'No default work package status is defined. Please check your configuration (Go to "Administration -> Work package statuses").' + error_no_type_in_project: "No type is associated to this project. Please check the Project settings." + error_omniauth_registration_timed_out: "The registration via an external authentication provider timed out. Please try again." + error_omniauth_invalid_auth: "The authentication information returned from the identity provider was invalid. Please contact your administrator for further help." + error_password_change_failed: "An error occurred when trying to change the password." + error_scm_command_failed: "An error occurred when trying to access the repository: %{value}" + error_scm_not_found: "The entry or revision was not found in the repository." + error_type_could_not_be_saved: "Type could not be saved" + error_unable_delete_status: "The work package status cannot be deleted since it is used by at least one work package." + error_unable_delete_default_status: "Unable to delete the default work package status. Please select another default work package status before deleting the current one." + error_unable_to_connect: "Unable to connect (%{value})" + error_unable_delete_wiki: "Unable to delete the wiki page." + error_unable_update_wiki: "Unable to update the wiki page." + error_workflow_copy_source: "Please select a source type or role" + error_workflow_copy_target: "Please select target type(s) and role(s)" + error_menu_item_not_created: Menu item could not be added + error_menu_item_not_saved: Menu item could not be saved + error_wiki_root_menu_item_conflict: > + Can't rename "%{old_name}" to "%{new_name}" due to a conflict in the resulting menu item with the existing menu item "%{existing_caption}" (%{existing_identifier}). + error_external_authentication_failed: "An error occurred during external authentication. Please try again." + error_attribute_not_highlightable: "Attribute(s) not highlightable: %{attributes}" + events: + changeset: "Changeset edited" + message: Message edited + news: News + project_attributes: "Project attributes edited" + project: "Project edited" + projects: "Project edited" + reply: Replied + time_entry: "Timelog edited" + wiki_page: "Wiki page edited" + work_package_closed: "Work Package closed" + work_package_edit: "Work Package edited" + work_package_note: "Work Package note added" + title: + project: "Project: %{name}" + subproject: "Subproject: %{name}" + export: + your_work_packages_export: "Your work packages export" + succeeded: "The export has completed successfully." + failed: "The export has failed: %{message}" + format: + atom: "Atom" + csv: "CSV" + pdf: "PDF" + pdf_overview_table: "PDF Table" + pdf_report_with_images: "PDF Report with images" + pdf_report: "PDF Report" + image: + omitted: "Image not exported." + units: + hours: h + days: d + extraction: + available: + pdftotext: "Pdftotext available (optional)" + unrtf: "Unrtf available (optional)" + catdoc: "Catdoc available (optional)" + xls2csv: "Xls2csv available (optional)" + catppt: "Catppt available (optional)" + tesseract: "Tesseract available (optional)" + general_csv_decimal_separator: "." + general_csv_encoding: "UTF-8" + general_csv_separator: "," + general_first_day_of_week: "7" + general_pdf_encoding: "ISO-8859-1" + general_text_no: "no" + general_text_yes: "yes" + general_text_No: "No" + general_text_Yes: "Yes" + general_text_true: "true" + general_text_false: "false" + gui_validation_error: "1 error" + gui_validation_error_plural: "%{count} errors" + homescreen: + additional: + projects: "Newest visible projects in this instance." + no_visible_projects: "There are no visible projects in this instance." + users: "Newest registered users in this instance." + blocks: + community: "OpenProject community" + upsale: + title: "Upgrade to Enterprise edition" + more_info: "More information" + links: + upgrade_enterprise_edition: "Upgrade to Enterprise edition" + postgres_migration: "Migrating your installation to PostgreSQL" + user_guides: "User guides" + faq: "FAQ" + glossary: "Glossary" + shortcuts: "Shortcuts" + blog: "OpenProject blog" + forums: "Community forum" + newsletter: "Security alerts / Newsletter" + image_conversion: + imagemagick: "Imagemagick" + journals: + changes_retracted: "The changes were retracted." + caused_changes: + dates_changed: "Dates changed" + system_update: "OpenProject system update:" + cause_descriptions: + work_package_predecessor_changed_times: by changes to predecessor %{link} + work_package_parent_changed_times: by changes to parent %{link} + work_package_children_changed_times: by changes to child %{link} + work_package_related_changed_times: by changes to related %{link} + unaccessable_work_package_changed: by changes to a related work package + working_days_changed: + changed: "by changes to working days (%{changes})" + days: + working: "%{day} is now working" + non_working: "%{day} is now non-working" + dates: + working: "%{date} is now working" + non_working: "%{date} is now non-working" + system_update: + file_links_journal: > + From now on, activity related to file links (files stored in external storages) will appear here in the Activity tab. The following represent activity concerning links that already existed: + links: + configuration_guide: "Configuration guide" + get_in_touch: "You have questions? Get in touch with us." + instructions_after_registration: "You can sign in as soon as your account has been activated by clicking %{signin}." + instructions_after_logout: "You can sign in again by clicking %{signin}." + instructions_after_error: "You can try to sign in again by clicking %{signin}. If the error persists, ask your admin for help." + menus: + admin: + mail_notification: "Email notifications" + mails_and_notifications: "Emails and notifications" + aggregation: "Aggregation" + api_and_webhooks: "API and webhooks" + quick_add: + label: "Open quick add menu" + my_account: + access_tokens: + no_results: + title: "No access tokens to display" + description: "All of them have been disabled. They can be re-enabled in the administration menu." + access_tokens: "Access tokens" + headers: + action: "Action" + expiration: "Expires" + indefinite_expiration: "Never" + simple_revoke_confirmation: "Are you sure you want to revoke this token?" + api: + title: "API" + text_hint: "API tokens allow third-party applications to communicate with this OpenProject instance via REST APIs." + static_token_name: "API token" + disabled_text: "API tokens are not enabled by the administrator. Please contact your administrator to use this feature." + ical: + title: "iCalendar" + text_hint: 'iCalendar tokens allow users to subscribe to OpenProject calendars and view up-to-date work package information from external clients.' + disabled_text: "iCalendar subscriptions are not enabled by the administrator. Please contact your administrator to use this feature." + empty_text_hint: "To add an iCalendar token, subscribe to a new or existing calendar from within the Calendar module of a project. You must have the necessary permissions." + oauth: + title: "OAuth" + text_hint: "OAuth tokens allow third-party applications to connect with this OpenProject instance." + empty_text_hint: "There is no third-party application access configured and active for you. Please contact your administrator to activate this feature." + rss: + title: "RSS" + text_hint: "RSS tokens allow users to keep up with the latest changes in this OpenProject instance via an external RSS reader." + static_token_name: "RSS token" + disabled_text: "RSS tokens are not enabled by the administrator. Please contact your administrator to use this feature." + storages: + title: "File Storages" + text_hint: "File Storage tokens connect this OpenProject instance with an external File Storage." + empty_text_hint: "There is no storage access linked to your account." + revoke_token: "Do you really want to remove this token? You will need to login again on %{storage}" + removed: "File Storage token successfully removed" + failed: "An error occurred and the token couldn't be removed. Please try again later." + unknown_storage: "Unknown storage" + notifications: + send_notifications: "Send notifications for this action" + work_packages: + subject: + created: "The work package was created." + assigned: "You have been assigned to %{work_package}" + subscribed: "You subscribed to %{work_package}" + mentioned: "You have been mentioned in %{work_package}" + responsible: "You have become accountable for %{work_package}" + watched: "You are watching %{work_package}" + update_info_mail: + body: > + We are excited to announce the release of OpenProject 12.0. It's a major release that will hopefully significantly improve the way you use OpenProject. + Starting with this release, we are introducing in-app notifications. From now on, you will receive notifications for updates to work packages directly in OpenProject. You can mark these notifications as read, reply to a comment or even directly modify work package attributes without leaving the notification center. + This also means that we will no longer be using emails for notifications. We think the new notification center is a better place to view and act upon these updates. Nevertheless, if you would like continue receiving updates via email, you can choose to receive daily email reminders at particular times of your choosing. + Please make sure to verify your new default notification settings, and set your preferences for notifications and email reminders via your account settings. You can do this through the “Change email settings” button bellow. + We hope you find in-app notifications useful and that they makes you even more productive. + Sincerely, The OpenProject team + body_header: "Version 12.0 with Notification Center" + body_subheader: "News" + subject: "Important changes to notifications with the release of 12.0" + label_accessibility: "Accessibility" + label_account: "Account" + label_active: "Active" + label_activate_user: "Activate user" + label_active_in_new_projects: "Active in new projects" + label_activity: "Activity" + label_add_edit_translations: "Add and edit translations" + label_add_another_file: "Add another file" + label_add_columns: "Add selected columns" + label_add_note: "Add a note" + label_add_related_work_packages: "Add related work packages" + label_add_subtask: "Add subtask" + label_added: "added" + label_added_by: "Added by %{author}" + label_added_time_by: "Added by %{author} %{age} ago" + label_additional_workflow_transitions_for_assignee: "Additional transitions allowed when the user is the assignee" + label_additional_workflow_transitions_for_author: "Additional transitions allowed when the user is the author" + label_administration: "Administration" + label_advanced_settings: "Advanced settings" + label_age: "Age" + label_ago: "days ago" + label_all: "all" + label_all_time: "all time" + label_all_words: "All words" + label_all_open_wps: "All open" + label_always_visible: "Always displayed" + label_announcement: "Announcement" + label_angular: "AngularJS" + label_api_access_key: "API access key" + label_api_access_key_created_on: "API access key created %{value} ago" + label_api_access_key_type: "API" + label_ical_access_key_type: "iCalendar" + label_ical_access_key_description: 'iCalendar token "%{token_name}" for "%{calendar_name}" in "%{project_name}"' + label_ical_access_key_not_present: "iCalendar token(s) not present." + label_ical_access_key_generation_hint: "Automatically generated when subscribing to a calendar." + label_ical_access_key_latest: "latest" + label_ical_access_key_revoke: "Revoke" + label_applied_status: "Applied status" + label_archive_project: "Archive project" + label_ascending: "Ascending" + label_assigned_to_me_work_packages: "Work packages assigned to me" + label_associated_revisions: "Associated revisions" + label_attachment_delete: "Delete file" + label_attachment_new: "New file" + label_attachment_plural: "Files" + label_attribute: "Attribute" + label_attribute_plural: "Attributes" + label_ldap_auth_source_new: "New LDAP connection" + label_ldap_auth_source: "LDAP connection" + label_ldap_auth_source_plural: "LDAP connections" + label_authentication: "Authentication" + label_available_global_roles: "Available global roles" + label_available_project_forums: "Available forums" + label_available_project_repositories: "Available repositories" + label_available_project_versions: "Available versions" + label_available_project_work_package_categories: "Available work package categories" + label_available_project_work_package_types: "Available work package types" + label_available_projects: "Available projects" + label_api_doc: "API documentation" + label_backup: "Backup" + label_backup_code: "Backup code" + label_between: "between" + label_blocked_by: "blocked by" + label_blocks: "blocks" + label_blog: "Blog" + label_forums_locked: "Locked" + label_forum_new: "New forum" + label_forum_plural: "Forums" + label_forum_sticky: "Sticky" + label_boolean: "Boolean" + label_board_plural: "Boards" + label_branch: "Branch" + label_browse: "Browse" + label_bulk_edit_selected_work_packages: "Bulk edit selected work packages" + label_bundled: "(Bundled)" + label_calendar: "Calendar" + label_calendars_and_dates: "Calendars and dates" + label_calendar_show: "Show Calendar" + label_category: "Category" + label_consent_settings: "User Consent" + label_wiki_menu_item: Wiki menu item + label_select_main_menu_item: Select new main menu item + label_required_disk_storage: "Required disk storage" + label_send_invitation: Send invitation + label_change_plural: "Changes" + label_change_properties: "Change properties" + label_change_status: "Change status" + label_change_status_of_user: "Change status of #{username}" + label_change_view_all: "View all changes" + label_changes_details: "Details of all changes" + label_changeset: "Changeset" + label_changeset_id: "Changeset ID" + label_changeset_plural: "Changesets" + label_checked: "checked" + label_check_uncheck_all_in_column: "Check/Uncheck all in column" + label_check_uncheck_all_in_row: "Check/Uncheck all in row" + label_child_element: "Child element" + label_choices: "Choices" + label_chronological_order: "Oldest first" + label_close_versions: "Close completed versions" + label_closed_work_packages: "closed" + label_collapse: "Collapse" + label_collapsed_click_to_show: "Collapsed. Click to show" + label_configuration: configuration + label_comment_add: "Add a comment" + label_comment_added: "Comment added" + label_comment_delete: "Delete comments" + label_comment_plural: "Comments" + label_commits_per_author: "Commits per author" + label_commits_per_month: "Commits per month" + label_confirmation: "Confirmation" + label_contains: "contains" + label_content: "Content" + label_color_plural: "Colors" + label_copied: "copied" + label_copy_same_as_target: "Same as target" + label_copy_source: "Source" + label_copy_target: "Target" + label_copy_workflow_from: "Copy workflow from" + label_copy_project: "Copy project" + label_core_version: "Core version" + label_core_build: "Core build" + label_current_status: "Current status" + label_current_version: "Current version" + label_custom_field_add_no_type: "Add this field to a work package type" + label_custom_field_new: "New custom field" + label_custom_field_plural: "Custom fields" + label_custom_field_default_type: "Empty type" + label_custom_style: "Design" + label_dashboard: "Dashboard" + label_database_version: "PostgreSQL version" + label_date: "Date" + label_date_and_time: "Date and time" + label_date_format: "Date format" + label_date_from: "From" + label_date_from_to: "From %{start} to %{end}" + label_date_to: "To" + label_day_plural: "days" + label_default: "Default" + label_delete_user: "Delete user" + label_delete_project: "Delete project" + label_deleted: "deleted" + label_deleted_custom_field: "(deleted custom field)" + label_deleted_custom_option: "(deleted option)" + label_empty_element: "(empty)" + label_missing_or_hidden_custom_option: "(missing value or lacking permissions to access)" + label_descending: "Descending" + label_details: "Details" + label_development_roadmap: "Development roadmap" + label_diff: "diff" + label_diff_inline: "inline" + label_diff_side_by_side: "side by side" + label_digital_accessibility: "Digital accessibility (DE)" + label_disabled: "disabled" + label_display: "Display" + label_display_per_page: "Per page: %{value}" + label_display_used_statuses_only: "Only display statuses that are used by this type" + label_download: "%{count} Download" + label_download_plural: "%{count} Downloads" + label_downloads_abbr: "D/L" + label_duplicated_by: "duplicated by" + label_duplicate: "duplicate" + label_duplicates: "duplicates" + label_edit: "Edit" + label_edit_x: "Edit: %{x}" + label_enable_multi_select: "Toggle multiselect" + label_enabled_project_custom_fields: "Enabled custom fields" + label_enabled_project_modules: "Enabled modules" + label_enabled_project_activities: "Enabled time tracking activities" + label_end_to_end: "end to end" + label_end_to_start: "end to start" + label_enumeration_new: "New enumeration value" + label_enumeration_value: "Enumeration value" + label_enumerations: "Enumerations" + label_enterprise: "Enterprise" + label_enterprise_active_users: "%{current}/%{limit} booked active users" + label_enterprise_edition: "Enterprise edition" + label_enterprise_support: "Enterprise support" + label_enterprise_addon: "Enterprise add-on" + label_environment: "Environment" + label_estimates_and_time: "Estimates and time" + label_equals: "is" + label_everywhere: "everywhere" + label_example: "Example" + label_experimental: "Experimental" + label_i_am_member: "I am member" + label_ifc_viewer: "Ifc Viewer" + label_ifc_model_plural: "Ifc Models" + label_import: "Import" + label_export_to: "Also available in:" + label_expanded_click_to_collapse: "Expanded. Click to collapse" + label_f_hour: "%{value} hour" + label_f_hour_plural: "%{value} hours" + label_favoured: "Favoured" + label_feed_plural: "Feeds" + label_feeds_access_key: "RSS access key" + label_feeds_access_key_created_on: "RSS access key created %{value} ago" + label_feeds_access_key_type: "RSS" + label_file_plural: "Files" + label_filter_add: "Add filter" + label_filter: "Filters" + label_filter_plural: "Filters" + label_filters_toggle: "Show/hide filters" + label_float: "Float" + label_folder: "Folder" + label_follows: "follows" + label_force_user_language_to_default: "Set language of users having a non allowed language to default" + label_form_configuration: "Form configuration" + label_gantt_chart: "Gantt chart" + label_gantt_chart_plural: "Gantt charts" + label_general: "General" + label_generate_key: "Generate a key" + label_git_path: "Path to .git directory" + label_greater_or_equal: ">=" + label_group_by: "Group by" + label_group_new: "New group" + label_group: "Group" + label_group_named: "Group %{name}" + label_group_plural: "Groups" + label_help: "Help" + label_here: here + label_hide: "Hide" + label_history: "History" + label_hierarchy_leaf: "Hierarchy leaf" + label_home: "Home" + label_subject_or_id: "Subject or ID" + label_calendar_subscriptions: "Calendar subscriptions" + label_identifier: "Identifier" + label_impressum: "Legal notice" + label_in: "in" + label_in_less_than: "in less than" + label_in_more_than: "in more than" + label_inactive: "Inactive" + label_incoming_emails: "Incoming emails" + label_includes: "includes" + label_index_by_date: "Index by date" + label_index_by_title: "Index by title" + label_information: "Information" + label_information_plural: "Information" + label_installation_guides: "Installation guides" + label_integer: "Integer" + label_internal: "Internal" + label_introduction_video: "Introduction video" + label_invite_user: "Invite user" + label_share: "Share" + label_show_hide: "Show/hide" + label_show_all_registered_users: "Show all registered users" + label_journal: "Journal" + label_journal_diff: "Description Comparison" + label_language: "Language" + label_languages: "Languages" + label_jump_to_a_project: "Jump to a project..." + label_keyword_plural: "Keywords" + label_language_based: "Based on user's language" + label_last_activity: "Last activity" + label_last_change_on: "Last change on" + label_last_changes: "last %{count} changes" + label_last_login: "Last login" + label_last_month: "last month" + label_last_n_days: "last %{count} days" + label_last_week: "last week" + label_latest_revision: "Latest revision" + label_latest_revision_plural: "Latest revisions" + label_ldap_authentication: "LDAP authentication" + label_less_or_equal: "<=" + label_less_than_ago: "less than days ago" + label_list: "List" + label_loading: "Loading..." + label_lock_user: "Lock user" + label_logged_as: "Logged in as" + label_login: "Sign in" + label_custom_logo: "Custom logo" + label_custom_export_logo: "Custom export logo" + label_custom_export_cover: "Custom export cover background" + label_custom_export_cover_overlay: "Custom export cover background overlay" + label_custom_export_cover_text_color: "Text color" + label_custom_pdf_export_settings: "Custom PDF export settings" + label_custom_favicon: "Custom favicon" + label_custom_touch_icon: "Custom touch icon" + label_logout: "Sign out" + label_main_menu: "Side Menu" + label_manage_groups: "Manage groups" + label_managed_repositories_vendor: "Managed %{vendor} repositories" + label_max_size: "Maximum size" + label_me: "me" + label_member_new: "New member" + label_member_all_admin: "(All roles due to admin status)" + label_member_plural: "Members" + label_membership_plural: "Memberships" + lable_membership_added: "Member added" + lable_membership_updated: "Member updated" + label_menu_badge: + pre_alpha: "pre-alpha" + alpha: "alpha" + beta: "beta" + label_menu_item_name: "Name of menu item" + label_message: "Message" + label_message_last: "Last message" + label_message_new: "New message" + label_message_plural: "Messages" + label_message_posted: "Message added" + label_min_max_length: "Min - Max length" + label_minute_plural: "minutes" + label_missing_api_access_key: "Missing API access key" + label_missing_feeds_access_key: "Missing RSS access key" + label_modification: "%{count} change" + label_modified: "modified" + label_module_plural: "Modules" + label_modules: "Modules" + label_months_from: "months from" + label_more: "More" + label_more_than_ago: "more than days ago" + label_move_work_package: "Move work package" + label_my_account: "My account" + label_my_activity: "My activity" + label_my_account_data: "My account data" + label_my_avatar: "My avatar" + label_my_queries: "My custom queries" + label_name: "Name" + label_never: "Never" + label_new: "New" + label_new_features: "New features" + label_new_statuses_allowed: "New statuses allowed" + label_news_singular: "News" + label_news_added: "News added" + label_news_comment_added: "Comment added to a news" + label_news_latest: "Latest news" + label_news_new: "Add news" + label_news_edit: "Edit news" + label_news_plural: "News" + label_news_view_all: "View all news" + label_next: "Next" + label_next_week: "Next week" + label_no_change_option: "(No change)" + label_no_data: "No data to display" + label_no_parent_page: "No parent page" + label_nothing_display: "Nothing to display" + label_nobody: "nobody" + label_not_found: "not found" + label_none: "none" + label_none_parentheses: "(none)" + label_not_contains: "doesn't contain" + label_not_equals: "is not" + label_on: "on" + label_operator_all: "is not empty" + label_operator_none: "is empty" + label_operator_equals_or: "is (OR)" + label_operator_equals_all: "is (AND)" + label_operator_shared_with_user_any: "any" + label_open_menu: "Open menu" + label_open_work_packages: "open" + label_open_work_packages_plural: "open" + label_openproject_website: "OpenProject website" + label_optional_description: "Description" + label_options: "Options" + label_other: "Other" + label_overall_activity: "Overall activity" + label_overview: "Overview" + label_page_title: "Page title" + label_part_of: "part of" + label_password_lost: "Forgot your password?" + label_password_rule_lowercase: "Lowercase" + label_password_rule_numeric: "Numeric Characters" + label_password_rule_special: "Special Characters" + label_password_rule_uppercase: "Uppercase" + label_path_encoding: "Path encoding" + label_per_page: "Per page" + label_people: "People" + label_permissions: "Permissions" + label_permissions_report: "Permissions report" + label_personalize_page: "Personalize this page" + label_placeholder_user: "Placeholder user" + label_placeholder_user_new: "New placeholder user" + label_placeholder_user_plural: "Placeholder users" + label_planning: "Planning" + label_please_login: "Please log in" + label_plugins: "Plugins" + label_modules_and_plugins: "Modules and Plugins" + label_precedes: "precedes" + label_preferences: "Preferences" + label_preview: "Preview" + label_previous: "Previous" + label_previous_week: "Previous week" + label_principal_invite_via_email: " or invite new users via email" + label_principal_search: "Add existing users or groups" + label_privacy_policy: "Data privacy and security policy" + label_product_version: "Product version" + label_profile: "Profile" + label_project_activity: "Project activity" + label_project_attribute_plural: "Project attributes" + label_project_count: "Total number of projects" + label_project_copy_notifications: "Send email notifications during the project copy" + label_project_latest: "Latest projects" + label_project_default_type: "Allow empty type" + label_project_hierarchy: "Project hierarchy" + label_project_new: "New project" + label_project_plural: "Projects" + label_project_settings: "Project settings" + label_project_storage_plural: "File Storages" + label_project_storage_project_folder: "File Storages: Project folders" + label_projects_storage_information: "%{count} projects using %{storage} disk storage" + label_project_view_all: "View all projects" + label_project_show_details: "Show project details" + label_project_hide_details: "Hide project details" + label_public_projects: "Public projects" + label_query_new: "New query" + label_query_plural: "Custom queries" + label_read: "Read..." + label_register: "Create a new account" + label_register_with_developer: "Register as developer" + label_registered_on: "Registered on" + label_registration_activation_by_email: "account activation by email" + label_registration_automatic_activation: "automatic account activation" + label_registration_manual_activation: "manual account activation" + label_related_work_packages: "Related work packages" + label_relates: "related to" + label_relates_to: "related to" + label_relation_delete: "Delete relation" + label_relation_new: "New relation" + label_release_notes: "Release notes" + label_remove_columns: "Remove selected columns" + label_renamed: "renamed" + label_reply_plural: "Replies" + label_report: "Report" + label_report_bug: "Report a bug" + label_report_plural: "Reports" + label_reported_work_packages: "Reported work packages" + label_reporting: "Reporting" + label_reporting_plural: "Reportings" + label_repository: "Repository" + label_repository_root: "Repository root" + label_repository_plural: "Repositories" + label_required: "required" + label_requires: "requires" + label_result_plural: "Results" + label_reverse_chronological_order: "Newest first" + label_revision: "Revision" + label_revision_id: "Revision %{value}" + label_revision_plural: "Revisions" + label_roadmap: "Roadmap" + label_roadmap_edit: "Edit roadmap %{name}" + label_roadmap_due_in: "Due in %{value}" + label_roadmap_no_work_packages: "No work packages for this version" + label_roadmap_overdue: "%{value} late" + label_role_and_permissions: "Roles and permissions" + label_role_new: "New role" + label_role_plural: "Roles" + label_role_search: "Assign role to new members" + label_scm: "SCM" + label_search: "Search" + label_send_information: "Send new credentials to the user" + label_send_test_email: "Send a test email" + label_session: "Session" + label_setting_plural: "Settings" + label_system_settings: "System settings" + label_show_completed_versions: "Show completed versions" + label_sort: "Sort" + label_sort_by: "Sort by %{value}" + label_sorted_by: "sorted by %{value}" + label_sort_higher: "Move up" + label_sort_highest: "Move to top" + label_sort_lower: "Move down" + label_sort_lowest: "Move to bottom" + label_spent_time: "Spent time" + label_start_to_end: "start to end" + label_start_to_start: "start to start" + label_statistics: "Statistics" + label_status: "Status" + label_storage_free_space: "Remaining disk space" + label_storage_used_space: "Used disk space" + label_storage_group: "Storage filesystem %{identifier}" + label_storage_for: "Encompasses storage for" + label_string: "Text" + label_subproject: "Subproject" + label_subproject_new: "New subproject" + label_subproject_plural: "Subprojects" + label_subtask_plural: "Subtasks" + label_summary: "Summary" + label_system: "System" + label_system_storage: "Storage information" + label_table_of_contents: "Table of contents" + label_tag: "Tag" + label_team_planner: "Team Planner" + label_text: "Long text" + label_this_month: "this month" + label_this_week: "this week" + label_this_year: "this year" + label_time_entry_plural: "Spent time" + label_time_entry_activity_plural: "Spent time activities" + label_title: "Title" + label_projects_menu: "Projects" + label_today: "today" + label_top_menu: "Top Menu" + label_topic_plural: "Topics" + label_total: "Total" + label_type_new: "New type" + label_type_plural: "Types" + label_ui: "User Interface" + label_update_work_package_done_ratios: "Update work package % Complete values" + label_updated_time: "Updated %{value} ago" + label_updated_time_at: "%{author} %{age}" + label_updated_time_by: "Updated by %{author} %{age} ago" + label_upgrade_guides: "Upgrade guides" + label_used_by: "Used by" + label_used_by_types: "Used by types" + label_used_in_projects: "Used in projects" + label_user: "User" + label_user_and_permission: "Users and permissions" + label_user_named: "User %{name}" + label_user_activity: "%{value}'s activity" + label_user_anonymous: "Anonymous" + label_user_mail_option_all: "For any event on all my projects" + label_user_mail_option_none: "No events" + label_user_mail_option_only_assigned: "Only for things I am assigned to" + label_user_mail_option_only_my_events: "Only for things I watch or I'm involved in" + label_user_mail_option_only_owner: "Only for things I am the owner of" + label_user_mail_option_selected: "For any event on the selected projects only" + label_user_new: "New user" + label_user_plural: "Users" + label_user_search: "Search for user" + label_user_settings: "User settings" + label_users_settings: "Users settings" + label_version_new: "New version" + label_version_plural: "Versions" + label_version_sharing_descendants: "With subprojects" + label_version_sharing_hierarchy: "With project hierarchy" + label_version_sharing_none: "Not shared" + label_version_sharing_system: "With all projects" + label_version_sharing_tree: "With project tree" + label_videos: "Videos" + label_view_all_revisions: "View all revisions" + label_view_diff: "View differences" + label_view_revisions: "View revisions" + label_watched_work_packages: "Watched work packages" + label_what_is_this: "What is this?" + label_week: "Week" + label_wiki_content_added: "Wiki page added" + label_wiki_content_updated: "Wiki page updated" + label_wiki_toc: "Table of Contents" + label_wiki_toc_empty: "Table of Contents is empty as no headings are present." + label_wiki_dont_show_menu_item: "Do not show this wikipage in project navigation" + label_wiki_edit: "Wiki edit" + label_wiki_edit_plural: "Wiki edits" + label_wiki_page_attachments: "Wiki page attachments" + label_wiki_page_id: "Wiki page ID" + label_wiki_navigation: "Wiki navigation" + label_wiki_page: "Wiki page" + label_wiki_page_plural: "Wiki pages" + label_wiki_show_index_page_link: "Show submenu item 'Table of Contents'" + label_wiki_show_menu_item: "Show as menu item in project navigation" + label_wiki_show_new_page_link: "Show submenu item 'Create new child page'" + label_wiki_show_submenu_item: "Show as submenu item of " + label_wiki_start: "Start page" + label_work_package: "Work package" + label_work_package_attachments: "Work package attachments" + label_work_package_category_new: "New category" + label_work_package_category_plural: "Work package categories" + label_work_package_hierarchy: "Work package hierarchy" + label_work_package_new: "New work package" + label_work_package_edit: "Edit work package %{name}" + label_work_package_plural: "Work packages" + label_work_package_status: "Work package status" + label_work_package_status_new: "New status" + label_work_package_status_plural: "Work package statuses" + label_work_package_types: "Work package types" + label_work_package_tracking: "Work package tracking" + label_work_package_view_all: "View all work packages" + label_workflow: "Workflow" + label_workflow_plural: "Workflows" + label_workflow_summary: "Summary" + label_working_days: "Working days" + label_x_closed_work_packages_abbr: + one: "1 closed" + other: "%{count} closed" + zero: "0 closed" + label_x_comments: + one: "1 comment" + other: "%{count} comments" + zero: "no comments" + label_x_open_work_packages_abbr: + one: "1 open" + other: "%{count} open" + zero: "0 open" + label_x_work_packages: + one: "1 work package" + other: "%{count} work packages" + zero: "No work packages" + label_x_projects: + one: "1 project" + other: "%{count} projects" + zero: "no projects" + label_x_files: + one: "1 file" + other: "%{count} files" + zero: "no files" + label_yesterday: "yesterday" + label_role_type: "Type" + label_member_role: "Project role" + label_global_role: "Global role" + label_not_changeable: "(not changeable)" + label_global: "Global" + label_seeded_from_env_warning: This record has been created through a setting / environment variable. It is not editable through UI. + macro_execution_error: "Error executing the macro %{macro_name}" + macro_unavailable: "Macro %{macro_name} cannot be displayed." + macros: + placeholder: "[Placeholder] Macro %{macro_name}" + errors: + missing_or_invalid_parameter: "Missing or invalid macro parameter." + legacy_warning: + timeline: "This legacy timeline macro has been removed and is no longer available. You can replace the functionality with an embedded table macro." + include_wiki_page: + removed: "The macro does no longer exist." + wiki_child_pages: + errors: + page_not_found: "Cannot find the wiki page '%{name}'." + create_work_package_link: + errors: + no_project_context: "Calling create_work_package_link macro from outside project context." + invalid_type: "No type found with name '%{type}' in project '%{project}'." + link_name: "New work package" + link_name_type: "New %{type_name}" + mail: + actions: "Actions" + digests: + including_mention_singular: "including a mention" + including_mention_plural: "including %{number_mentioned} mentions" + unread_notification_singular: "1 unread notification" + unread_notification_plural: "%{number_unread} unread notifications" + you_have: "You have" + logo_alt_text: "Logo" + mention: + subject: "%{user_name} mentioned you in #%{id} - %{subject}" + notification: + center: "To notification center" + see_in_center: "See comment in notification center" + settings: "Change email settings" + salutation: "Hello %{user}" + salutation_full_name: "Full name" + work_packages: + created_at: "Created at %{timestamp} by %{user} " + login_to_see_all: "Log in to see all notifications." + mentioned: "You have been mentioned in a comment" + mentioned_by: "%{user} mentioned you in a comment" + more_to_see: + other: "There are %{count} more work packages with notifications." + open_in_browser: "Open in browser" + reason: + watched: "Watched" + assigned: "Assigned" + responsible: "Accountable" + mentioned: "Mentioned" + shared: "Shared" + subscribed: "all" + prefix: "Received because of the notification setting: %{reason}" + date_alert_start_date: "Date alert" + date_alert_due_date: "Date alert" + see_all: "See all" + updated_at: "Updated at %{timestamp} by %{user}" + sharing: + work_packages: + allowed_actions: "You may %{allowed_actions} this work package. This can change depending on your project role and permissions." + create_account: "To access this work package, you will need to create and activate an account on %{instance}." + open_work_package: "Open work package" + subject: "Work package #%{id} was shared with you" + enterprise_text: "Share work packages with users who are not members of the project." + summary: + user: "%{user} shared a work package with you with %{role_rights} rights" + group: "%{user} shared a work package with the group %{group} you are a member of" + mail_body_account_activation_request: "A new user (%{value}) has registered. The account is pending your approval:" + mail_body_account_information: "Your account information" + mail_body_account_information_external: "You can use your %{value} account to log in." + mail_body_backup_ready: "Your requested backup is ready. You can download it here:" + mail_body_backup_token_reset_admin_info: The backup token for user '%{user}' has been reset. + mail_body_backup_token_reset_user_info: Your backup token has been reset. + mail_body_backup_token_info: The previous token is no longer valid. + mail_body_backup_waiting_period: The new token will be enabled in %{hours} hours. + mail_body_backup_token_warning: If this wasn't you, login to OpenProject immediately and reset it again. + mail_body_incoming_email_error: The email you sent to OpenProject could not be processed. + mail_body_incoming_email_error_in_reply_to: "At %{received_at} %{from_email} wrote" + mail_body_incoming_email_error_logs: "Logs" + mail_body_lost_password: "To change your password, click on the following link:" + mail_password_change_not_possible: + title: "Password change not possible" + body: "Your account at %{app_title} is connected to an external authentication provider (%{name})." + subtext: "Passwords for external account cannot be changed in the application. Please use the lost password functionality of your authentication provider." + mail_body_register: "Welcome to %{app_title}. Please activate your account by clicking on this link:" + mail_body_register_header_title: "Project member invitation email" + mail_body_register_user: "Dear %{name}, " + mail_body_register_links_html: | + Please feel free to browse our youtube channel (%{youtube_link}) where we provide a webinar (%{webinar_link}) + and “Get started” videos (%{get_started_link}) to make your first steps in OpenProject as easy as possible. +
+ If you have any further questions, consult our documentation (%{documentation_link}) or contact your administrator. + mail_body_register_closing: "Your OpenProject team" + mail_body_register_ending: "Stay connected! Kind regards," + mail_body_reminder: "%{count} work package(s) that are assigned to you are due in the next %{days} days:" + mail_body_group_reminder: '%{count} work package(s) that are assigned to group "%{group}" are due in the next %{days} days:' + mail_body_wiki_page_added: "The '%{id}' wiki page has been added by %{author}." + mail_body_wiki_page_updated: "The '%{id}' wiki page has been updated by %{author}." + mail_subject_account_activation_request: "%{value} account activation request" + mail_subject_backup_ready: "Your backup is ready" + mail_subject_backup_token_reset: "Backup token reset" + mail_subject_incoming_email_error: "An email you sent to OpenProject could not be processed" + mail_subject_lost_password: "Your %{value} password" + mail_subject_register: "Your %{value} account activation" + mail_subject_wiki_content_added: "'%{id}' wiki page has been added" + mail_subject_wiki_content_updated: "'%{id}' wiki page has been updated" + mail_member_added_project: + subject: "%{project} - You have been added as a member" + body: + added_by: + without_message: "%{user} added you as a member to the project '%{project}'." + with_message: "%{user} added you as a member to the project '%{project}' writing:" + roles: "You have the following roles:" + mail_member_updated_project: + subject: "%{project} - Your roles have been updated" + body: + updated_by: + without_message: "%{user} updated the roles you have in the project '%{project}'." + with_message: "%{user} updated the roles you have in the project '%{project}' writing:" + roles: "You now have the following roles:" + mail_member_updated_global: + subject: "Your global permissions have been updated" + body: + updated_by: + without_message: "%{user} updated the roles you have globally." + with_message: "%{user} updated the roles you have globally writing:" + roles: "You now have the following roles:" + mail_user_activation_limit_reached: + subject: User activation limit reached + message: | + A new user (%{email}) tried to create an account on an OpenProject environment that you manage (%{host}). + The user cannot activate their account since the user limit has been reached. + steps: + label: "To allow the user to sign in you can either: " + a: "Upgrade your payment plan ([here](upgrade_url))" #here turned into a link + b: "Lock or delete an existing user ([here](users_url))" #here turned into a link + more_actions: "More functions" + noscript_description: "You need to activate JavaScript in order to use OpenProject!" + noscript_heading: "JavaScript disabled" + noscript_learn_more: "Learn more" + notice_accessibility_mode: The accessibility mode can be enabled in your [account settings](url). + notice_account_activated: "Your account has been activated. You can now log in." + notice_account_already_activated: The account has already been activated. + notice_account_invalid_token: Invalid activation token + notice_account_invalid_credentials: "Invalid user or password" + notice_account_invalid_credentials_or_blocked: "Invalid user or password or the account is blocked due to multiple failed login attempts. If so, it will be unblocked automatically in a short time." + notice_account_lost_email_sent: "An email with instructions to choose a new password has been sent to you." + notice_account_new_password_forced: "A new password is required." + notice_account_password_expired: "Your password expired after %{days} days. Please set a new one." + notice_account_password_updated: "Password was successfully updated." + notice_account_pending: "Your account was created and is now pending administrator approval." + notice_account_register_done: "Account was successfully created. To activate your account, click on the link that was emailed to you." + notice_account_unknown_email: "Unknown user." + notice_account_update_failed: "Account setting could not be saved. Please have a look at your account page." + notice_account_updated: "Account was successfully updated." + notice_account_other_session_expired: "All other sessions tied to your account have been invalidated." + notice_account_wrong_password: "Wrong password" + notice_account_registered_and_logged_in: "Welcome, your account has been activated. You are logged in now." + notice_activation_failed: The account could not be activated. + notice_auth_stage_verification_error: "Could not verify stage '%{stage}'." + notice_auth_stage_wrong_stage: "Expected to finish authentication stage '%{expected}', but '%{actual}' returned." + notice_auth_stage_error: "Authentication stage '%{stage}' failed." + notice_can_t_change_password: "This account uses an external authentication source. Impossible to change the password." + notice_custom_options_deleted: "Option '%{option_value}' and its %{num_deleted} occurrences were deleted." + notice_email_error: "An error occurred while sending mail (%{value})" + notice_email_sent: "An email was sent to %{value}" + notice_failed_to_save_work_packages: "Failed to save %{count} work package(s) on %{total} selected: %{ids}." + notice_failed_to_save_members: "Failed to save member(s): %{errors}." + notice_deletion_scheduled: "The deletion has been scheduled and is performed asynchronously." + notice_file_not_found: "The page you were trying to access doesn't exist or has been removed." + notice_forced_logout: "You have been automatically logged out after %{ttl_time} minutes of inactivity." + notice_internal_server_error: "An error occurred on the page you were trying to access. If you continue to experience problems please contact your %{app_title} administrator for assistance." + notice_work_package_done_ratios_updated: "% complete updated" + notice_locking_conflict: "Information has been updated by at least one other user in the meantime." + notice_locking_conflict_additional_information: "The update(s) came from %{users}." + notice_locking_conflict_reload_page: "Please reload the page, review the changes and reapply your updates." + notice_member_added: Added %{name} to the project. + notice_members_added: Added %{number} users to the project. + notice_member_removed: "Removed %{user} from project." + notice_member_deleted: "%{user} has been removed from the project and deleted." + notice_no_principals_found: "No results found." + notice_bad_request: "Bad Request." + notice_not_authorized: "You are not authorized to access this page." + notice_not_authorized_archived_project: "The project you're trying to access has been archived." + notice_password_confirmation_failed: "Your password is not correct. Cannot continue." + notice_principals_found_multiple: "There are %{number} results found. \n Tab to focus the first result." + notice_principals_found_single: "There is one result. \n Tab to focus it." + notice_project_not_deleted: "The project wasn't deleted." + notice_successful_connection: "Successful connection." + notice_successful_create: "Successful creation." + notice_successful_delete: "Successful deletion." + notice_successful_update: "Successful update." + notice_successful_update_custom_fields_added_to_project: | + Successful update. The custom fields of the activated types are automatically activated + on the work package form. See more. + notice_successful_update_custom_fields_added_to_type: | + Successful update. The active custom fields are automatically activated for + the associated projects of this type. + notice_to_many_principals_to_display: "There are too many results.\nNarrow down the search by typing in the name of the new member (or group)." + notice_user_missing_authentication_method: User has yet to choose a password or another way to sign in. + notice_user_invitation_resent: An invitation has been sent to %{email}. + present_access_key_value: "Your %{key_name} is: %{value}" + notice_automatic_set_of_standard_type: "Set standard type automatically." + notice_logged_out: "You have been logged out." + notice_wont_delete_auth_source: The LDAP connection cannot be deleted as long as there are still users using it. + notice_project_cannot_update_custom_fields: "You cannot update the project's available custom fields. The project is invalid: %{errors}" + notice_attachment_migration_wiki_page: > + This page was generated automatically during the update of OpenProject. It contains all attachments previously associated with the %{container_type} "%{container_name}". + #Default format for numbers + number: + format: + delimiter: "" + precision: 3 + separator: "." + human: + format: + delimiter: "" + precision: 1 + storage_units: + format: "%n %u" + units: + byte: + other: "Bytes" + gb: "GB" + kb: "kB" + mb: "MB" + tb: "TB" + onboarding: + heading_getting_started: "Get an overview" + text_getting_started_description: "Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu." + welcome: "Welcome to %{app_title}" + select_language: "Please select your language" + permission_add_work_package_notes: "Add notes" + permission_add_work_packages: "Add work packages" + permission_add_messages: "Post messages" + permission_add_project: "Create projects" + permission_add_work_package_attachments: "Add attachments" + permission_add_work_package_attachments_explanation: "Allows adding attachments without Edit work packages permission" + permission_archive_project: "Archive project" + permission_create_user: "Create users" + permission_manage_user: "Edit users" + permission_manage_placeholder_user: "Create, edit, and delete placeholder users" + permission_add_subprojects: "Create subprojects" + permission_add_work_package_watchers: "Add watchers" + permission_assign_versions: "Assign versions" + permission_browse_repository: "Read-only access to repository (browse and checkout)" + permission_change_wiki_parent_page: "Change parent wiki page" + permission_change_work_package_status: "Change work package status" + permission_change_work_package_status_explanation: "Allows changing status without Edit work packages permission" + permission_comment_news: "Comment news" + permission_commit_access: "Read/write access to repository (commit)" + permission_copy_projects: "Copy projects" + permission_copy_work_packages: "Copy work packages" + permission_create_backup: "Create backups" + permission_delete_work_package_watchers: "Delete watchers" + permission_delete_work_packages: "Delete work packages" + permission_delete_messages: "Delete messages" + permission_delete_own_messages: "Delete own messages" + permission_delete_reportings: "Delete reportings" + permission_delete_timelines: "Delete timelines" + permission_delete_wiki_pages: "Delete wiki pages" + permission_delete_wiki_pages_attachments: "Delete attachments" + permission_edit_work_package_notes: "Edit notes" + permission_edit_work_packages: "Edit work packages" + permission_edit_messages: "Edit messages" + permission_edit_own_work_package_notes: "Edit own notes" + permission_edit_own_messages: "Edit own messages" + permission_edit_own_time_entries: "Edit own time logs" + permission_edit_project: "Edit project" + permission_edit_reportings: "Edit reportings" + permission_edit_time_entries: "Edit time logs for other users" + permission_edit_timelines: "Edit timelines" + permission_edit_wiki_pages: "Edit wiki pages" + permission_export_work_packages: "Export work packages" + permission_export_wiki_pages: "Export wiki pages" + permission_list_attachments: "List attachments" + permission_log_own_time: "Log own time" + permission_log_time: "Log time for other users" + permission_manage_forums: "Manage forums" + permission_manage_categories: "Manage work package categories" + permission_manage_dashboards: "Manage dashboards" + permission_manage_work_package_relations: "Manage work package relations" + permission_manage_members: "Manage members" + permission_manage_news: "Manage news" + permission_manage_project_activities: "Manage project activities" + permission_manage_public_queries: "Manage public views" + permission_manage_repository: "Manage repository" + permission_manage_subtasks: "Manage work package hierarchies" + permission_manage_versions: "Manage versions" + permission_manage_wiki: "Manage wiki" + permission_manage_wiki_menu: "Manage wiki menu" + permission_move_work_packages: "Move work packages" + permission_protect_wiki_pages: "Protect wiki pages" + permission_rename_wiki_pages: "Rename wiki pages" + permission_save_queries: "Save views" + permission_search_project: "Search project" + permission_select_custom_fields: "Select custom fields" + permission_select_project_modules: "Select project modules" + permission_share_work_packages: "Share work packages" + permission_manage_types: "Select types" + permission_view_project: "View projects" + permission_view_changesets: "View repository revisions in OpenProject" + permission_view_commit_author_statistics: "View commit author statistics" + permission_view_dashboards: "View dashboards" + permission_view_work_package_watchers: "View watchers list" + permission_view_work_packages: "View work packages" + permission_view_messages: "View messages" + permission_view_news: "View news" + permission_view_members: "View members" + permission_view_reportings: "View reportings" + permission_view_shared_work_packages: "View work package shares" + permission_view_time_entries: "View spent time" + permission_view_timelines: "View timelines" + permission_view_wiki_edits: "View wiki history" + permission_view_wiki_pages: "View wiki" + permission_work_package_assigned: "Become assignee/responsible" + permission_work_package_assigned_explanation: "Work packages can be assigned to users and groups in possession of this role in the respective project" + permission_view_project_activity: "View project activity" + permission_save_bcf_queries: "Save BCF queries" + permission_manage_public_bcf_queries: "Manage public BCF queries" + permission_edit_attribute_help_texts: "Edit attribute help texts" + placeholders: + default: "-" + project: + destroy: + confirmation: "If you continue, the project %{identifier} will be permanently destroyed. To confirm this action please introduce the project name in the field below, this will:" + project_delete_result_1: "Delete all related data." + project_delete_result_2: "Delete all managed project folders in the attached storages." + info: "Deleting the project is an irreversible action." + project_verification: "Enter the project's name %{name} to verify the deletion." + subprojects_confirmation: "Its subproject(s): %{value} will also be deleted." + title: "Delete the project %{name}" + identifier: + warning_one: Members of the project will have to relocate the project's repositories. + warning_two: Existing links to the project will no longer work. + title: Change the project's identifier + template: + copying: > + Your project is being created from the selected template project. You will be notified by mail as soon as the project is available. + use_template: "Use template" + make_template: "Set as template" + remove_from_templates: "Remove from templates" + archive: + are_you_sure: "Are you sure you want to archive the project '%{name}'?" + archived: "Archived" + project_module_activity: "Activity" + project_module_forums: "Forums" + project_module_work_package_tracking: "Work packages" + project_module_news: "News" + project_module_repository: "Repository" + project_module_wiki: "Wiki" + permission_header_for_project_module_work_package_tracking: "Work packages and Gantt charts" + query: + attribute_and_direction: "%{attribute} (%{direction})" + #possible query parameters (e.g. issue queries), + #which are not attributes of an AR-Model. + query_fields: + active_or_archived: "Active or archived" + assigned_to_role: "Assignee's role" + assignee_or_group: "Assignee or belonging group" + member_of_group: "Assignee's group" + name_or_identifier: "Name or identifier" + only_subproject_id: "Only subproject" + shared_with_user: "Shared with user" + subproject_id: "Including subproject" + repositories: + at_identifier: "at %{identifier}" + atom_revision_feed: "Atom revision feed" + autofetch_information: "Check this if you want repositories to be updated automatically when accessing the repository module page.\nThis encompasses the retrieval of commits from the repository and refreshing the required disk storage." + checkout: + access: + readwrite: "Read + Write" + read: "Read-only" + none: "No checkout access, you may only view the repository through this application." + access_permission: "Your permissions on this repository" + url: "Checkout URL" + base_url_text: "The base URL to use for generating checkout URLs (e.g., https://myserver.example.org/repos/).\nNote: The base URL is only used for rewriting checkout URLs in managed repositories. Other repositories are not altered." + default_instructions: + git: |- + The data contained in this repository can be downloaded to your computer with Git. + Please consult the documentation of Git if you need more information on the checkout procedure and available clients. + subversion: |- + The data contained in this repository can be downloaded to your computer with Subversion. + Please consult the documentation of Subversion if you need more information on the checkout procedure and available clients. + enable_instructions_text: "Displays checkout instructions defined below on all repository-related pages." + instructions: "Checkout instructions" + show_instructions: "Display checkout instructions" + text_instructions: "This text is displayed alongside the checkout URL for guidance on how to check out the repository." + not_available: "Checkout instructions are not defined for this repository. Ask your administrator to enable them for this repository in the system settings." + create_managed_delay: "Please note: The repository is managed, it is created asynchronously on the disk and will be available shortly." + create_successful: "The repository has been registered." + delete_sucessful: "The repository has been deleted." + destroy: + confirmation: "If you continue, this will permanently delete the managed repository." + info: "Deleting the repository is an irreversible action." + info_not_managed: "Note: This will NOT delete the contents of this repository, as it is not managed by OpenProject." + managed_path_note: "The following directory will be erased: %{path}" + repository_verification: "Enter the project's identifier %{identifier} to verify the deletion of its repository." + subtitle: "Do you really want to delete the %{repository_type} of the project %{project_name}?" + subtitle_not_managed: "Do you really want to remove the linked %{repository_type} %{url} from the project %{project_name}?" + title: "Delete the %{repository_type}" + title_not_managed: "Remove the linked %{repository_type}?" + errors: + build_failed: "Unable to create the repository with the selected configuration. %{reason}" + managed_delete: "Unable to delete the managed repository." + managed_delete_local: "Unable to delete the local repository on filesystem at '%{path}': %{error_message}" + empty_repository: "The repository exists, but is empty. It does not contain any revisions yet." + exists_on_filesystem: "The repository directory already exists in the filesystem." + filesystem_access_failed: "An error occurred while accessing the repository in the filesystem: %{message}" + not_manageable: "This repository vendor cannot be managed by OpenProject." + path_permission_failed: "An error occurred trying to create the following path: %{path}. Please ensure that OpenProject may write to that folder." + unauthorized: "You're not authorized to access the repository or the credentials are invalid." + unavailable: "The repository is unavailable." + exception_title: "Cannot access the repository: %{message}" + disabled_or_unknown_type: "The selected type %{type} is disabled or no longer available for the SCM vendor %{vendor}." + disabled_or_unknown_vendor: "The SCM vendor %{vendor} is disabled or no longer available." + remote_call_failed: "Calling the managed remote failed with message '%{message}' (Code: %{code})" + remote_invalid_response: "Received an invalid response from the managed remote." + remote_save_failed: "Could not save the repository with the parameters retrieved from the remote." + git: + instructions: + managed_url: "This is the URL of the managed (local) Git repository." + path: >- + Specify the path to your local Git repository ( e.g., %{example_path} ). You can also use remote repositories which are cloned to a local copy by using a value starting with http(s):// or file://. + path_encoding: "Override Git path encoding (Default: UTF-8)" + local_title: "Link existing local Git repository" + local_url: "Local URL" + local_introduction: "If you have an existing local Git repository, you can link it with OpenProject to access it from within the application." + managed_introduction: "Let OpenProject create and integrate a local Git repository automatically." + managed_title: "Git repository integrated into OpenProject" + managed_url: "Managed URL" + path: "Path to Git repository" + path_encoding: "Path encoding" + go_to_revision: "Go to revision" + managed_remote: "Managed repositories for this vendor are handled remotely." + managed_remote_note: "Information on the URL and path of this repository is not available prior to its creation." + managed_url: "Managed URL" + settings: + automatic_managed_repos_disabled: "Disable automatic creation" + automatic_managed_repos: "Automatic creation of managed repositories" + automatic_managed_repos_text: "By setting a vendor here, newly created projects will automatically receive a managed repository of this vendor." + scm_vendor: "Source control management system" + scm_type: "Repository type" + scm_types: + local: "Link existing local repository" + existing: "Link existing repository" + managed: "Create new repository in OpenProject" + storage: + not_available: "Disk storage consumption is not available for this repository." + update_timeout: "Keep the last required disk space information for a repository for N minutes.\nAs counting the required disk space of a repository may be costly, increase this value to reduce performance impact." + oauth_application_details: "The client secret value will not be accessible again after you close this window. Please copy these values into the Nextcloud OpenProject Integration settings:" + oauth_application_details_link_text: "Go to settings page" + setup_documentation_details: "If you need help configuring a new file storage please check the documentation: " + setup_documentation_details_link_text: "File Storages setup" + show_warning_details: "To use this file storage remember to activate the module and the specific storage in the project settings of each desired project." + subversion: + existing_title: "Existing Subversion repository" + existing_introduction: "If you have an existing Subversion repository, you can link it with OpenProject to access it from within the application." + existing_url: "Existing URL" + instructions: + managed_url: "This is the URL of the managed (local) Subversion repository." + url: "Enter the repository URL. This may either target a local repository (starting with %{local_proto} ), or a remote repository.\nThe following URL schemes are supported:" + managed_title: "Subversion repository integrated into OpenProject" + managed_introduction: "Let OpenProject create and integrate a local Subversion repository automatically." + managed_url: "Managed URL" + password: "Repository Password" + username: "Repository username" + truncated: "Sorry, we had to truncate this directory to %{limit} files. %{truncated} entries were omitted from the list." + named_repository: "%{vendor_name} repository" + update_settings_successful: "The settings have been successfully saved." + url: "URL to repository" + warnings: + cannot_annotate: "This file cannot be annotated." + scheduling: + activated: "activated" + deactivated: "deactivated" + search_input_placeholder: "Search ..." + setting_apiv3_cors_enabled: "Enable CORS" + setting_apiv3_cors_origins: "API V3 Cross-Origin Resource Sharing (CORS) allowed origins" + setting_apiv3_cors_origins_text_html: > + If CORS is enabled, these are the origins that are allowed to access OpenProject API.
Please check the Documentation on the Origin header on how to specify the expected values. + setting_apiv3_max_page_size: "Maximum API page size" + setting_apiv3_max_page_instructions_html: > + Set the maximum page size the API will respond with. It will not be possible to perform API requests that return more values on a single page.
Warning: Please only change this value if you are sure why you need it. Setting to a high value will result in significant performance impacts, while a value lower than the per page options will cause errors in paginated views. + setting_apiv3_docs: "Documentation" + setting_apiv3_docs_enabled: "Enable docs page" + setting_apiv3_docs_enabled_instructions_html: > + If the docs page is enabled you can get an interactive view of the APIv3 documentation under %{link}. + setting_attachment_whitelist: "Attachment upload whitelist" + setting_email_delivery_method: "Email delivery method" + setting_emails_salutation: "Address user in emails with" + setting_sendmail_location: "Location of the sendmail executable" + setting_smtp_enable_starttls_auto: "Automatically use STARTTLS if available" + setting_smtp_ssl: "Use SSL connection" + setting_smtp_address: "SMTP server" + setting_smtp_port: "SMTP port" + setting_smtp_authentication: "SMTP authentication" + setting_smtp_user_name: "SMTP username" + setting_smtp_password: "SMTP password" + setting_smtp_domain: "SMTP HELO domain" + setting_activity_days_default: "Days displayed on project activity" + setting_app_subtitle: "Application subtitle" + setting_app_title: "Application title" + setting_attachment_max_size: "Attachment max. size" + setting_antivirus_scan_mode: "Scan mode" + setting_antivirus_scan_action: "Infected file action" + setting_autofetch_changesets: "Autofetch repository changes" + setting_autologin: "Autologin" + setting_available_languages: "Available languages" + setting_bcc_recipients: "Blind carbon copy recipients (bcc)" + setting_brute_force_block_after_failed_logins: "Block user after this number of failed login attempts" + setting_brute_force_block_minutes: "Time the user is blocked for" + setting_cache_formatted_text: "Cache formatted text" + setting_use_wysiwyg_description: "Select to enable CKEditor5 WYSIWYG editor for all users by default. CKEditor has limited functionality for GFM Markdown." + setting_column_options: "Customize the appearance of the work package lists" + setting_commit_fix_keywords: "Fixing keywords" + setting_commit_logs_encoding: "Commit messages encoding" + setting_commit_logtime_activity_id: "Activity for logged time" + setting_commit_logtime_enabled: "Enable time logging" + setting_commit_ref_keywords: "Referencing keywords" + setting_consent_time: "Consent time" + setting_consent_info: "Consent information text" + setting_consent_required: "Consent required" + setting_consent_decline_mail: "Consent contact mail address" + setting_cross_project_work_package_relations: "Allow cross-project work package relations" + setting_first_week_of_year: "First week in year contains" + setting_date_format: "Date" + setting_default_language: "Default language" + setting_default_projects_modules: "Default enabled modules for new projects" + setting_default_projects_public: "New projects are public by default" + setting_diff_max_lines_displayed: "Max number of diff lines displayed" + setting_display_subprojects_work_packages: "Display subprojects work packages on main projects by default" + setting_emails_footer: "Emails footer" + setting_emails_header: "Emails header" + setting_email_login: "Use email as login" + setting_enabled_scm: "Enabled SCM" + setting_enabled_projects_columns: "Visible in project list" + setting_feeds_enabled: "Enable Feeds" + setting_ical_enabled: "Enable iCalendar subscriptions" + setting_feeds_limit: "Feed content limit" + setting_file_max_size_displayed: "Max size of text files displayed inline" + setting_host_name: "Host name" + setting_invitation_expiration_days: "Activation email expires after" + setting_work_package_done_ratio: "Calculate work package % Complete with" + setting_work_package_done_ratio_field: "The work package field" + setting_work_package_done_ratio_status: "The work package status" + setting_work_package_done_ratio_disabled: "Disable (hide the % Complete field)" + setting_work_package_list_default_columns: "Display by default" + setting_work_package_properties: "Work package properties" + setting_work_package_startdate_is_adddate: "Use current date as start date for new work packages" + setting_work_packages_projects_export_limit: "Work packages / Projects export limit" + setting_journal_aggregation_time_minutes: "User actions aggregated within" + setting_log_requesting_user: "Log user login, name, and mail address for all requests" + setting_login_required: "Authentication required" + setting_mail_from: "Emission email address" + setting_mail_handler_api_key: "API key" + setting_mail_handler_body_delimiters: "Truncate emails after one of these lines" + setting_mail_handler_body_delimiter_regex: "Truncate emails matching this regex" + setting_mail_handler_ignore_filenames: "Ignored mail attachments" + setting_new_project_user_role_id: "Role given to a non-admin user who creates a project" + setting_password_active_rules: "Active character classes" + setting_password_count_former_banned: "Number of most recently used passwords banned for reuse" + setting_password_days_valid: "Number of days, after which to enforce a password change" + setting_password_min_length: "Minimum length" + setting_password_min_adhered_rules: "Minimum number of required classes" + setting_per_page_options: "Objects per page options" + setting_plain_text_mail: "Plain text mail (no HTML)" + setting_protocol: "Protocol" + setting_project_gantt_query: "Project portfolio Gantt view" + setting_project_gantt_query_text: "You can modify the query that is used to display Gantt chart from the project overview page." + setting_security_badge_displayed: "Display security badge" + setting_registration_footer: "Registration footer" + setting_repositories_automatic_managed_vendor: "Automatic repository vendor type" + setting_repositories_encodings: "Repositories encodings" + setting_repository_authentication_caching_enabled: "Enable caching for authentication request of version control software" + setting_repository_storage_cache_minutes: "Repository disk size cache" + setting_repository_checkout_display: "Show checkout instructions" + setting_repository_checkout_base_url: "Checkout base URL" + setting_repository_checkout_text: "Checkout instruction text" + setting_repository_log_display_limit: "Maximum number of revisions displayed on file log" + setting_repository_truncate_at: "Maximum number of files displayed in the repository browser" + setting_rest_api_enabled: "Enable REST web service" + setting_self_registration: "Self-registration" + setting_session_ttl: "Session expiry time after inactivity" + setting_session_ttl_hint: "Value below 5 works like disabled" + setting_session_ttl_enabled: "Session expires" + setting_start_of_week: "Week starts on" + setting_sys_api_enabled: "Enable repository management web service" + setting_sys_api_description: "The repository management web service provides integration and user authorization for accessing repositories." + setting_time_format: "Time" + setting_accessibility_mode_for_anonymous: "Enable accessibility mode for anonymous users" + setting_user_format: "Users name format" + setting_user_default_timezone: "Users default time zone" + setting_users_deletable_by_admins: "User accounts deletable by admins" + setting_users_deletable_by_self: "Users allowed to delete their accounts" + setting_welcome_text: "Welcome block text" + setting_welcome_title: "Welcome block title" + setting_welcome_on_homescreen: "Display welcome block on homescreen" + setting_work_package_list_default_highlighting_mode: "Default highlighting mode" + setting_work_package_list_default_highlighted_attributes: "Default inline highlighted attributes" + setting_working_days: "Working days" + settings: + attachments: + whitelist_text_html: > + Define a list of valid file extensions and/or mime types for uploaded files.
Enter file extensions (e.g., %{ext_example}) or mime types (e.g., %{mime_example}).
Leave empty to allow any file type to be uploaded. Multiple values allowed (one line for each value). + antivirus: + title: "Virus scanning" + clamav_ping_failed: "Failed to connect the the ClamAV daemon. Double-check the configuration and try again." + remaining_quarantined_files_html: > + Virus scanning has been disbled. %{file_count} remain in quarantine. To review quarantined files, please visit this link: %{link} + remaining_scan_complete_html: > + Remaining files have been scanned. There are %{file_count} in quarantine. You are being redirected to the quarantine page. Use this page to delete or override quarantined files. + remaining_rescanned_files: > + With virus scanning now active, there are %{file_count} that need to be rescanned. This process has been scheduled in the background. The files will remain accessible during the scan. + upsale: + description: "Ensure uploaded files in OpenProject are scanned for viruses before being accessible by other users." + actions: + delete: 'Delete the file' + quarantine: 'Quarantine the file' + instructions_html: > + Select the action to perform for files on which a virus has been detected:
+ modes: + clamav_socket_html: Enter the socket to the clamd daemon, e.g., %{example} + clamav_host_html: Enter the hostname and port to the clamd daemon separated by colon. e.g., %{example} + description_html: > + Select the mode in which the antivirus scanner integration should operate.
+ brute_force_prevention: "Automated user blocking" + date_format: + first_date_of_week_and_year_set: > + If either options "%{day_of_week_setting_name}" or "%{first_week_setting_name}" are set, the other has to be set as well to avoid inconsistencies in the frontend. + first_week_of_year_text_html: > + Select the date of January that is contained in the first week of the year. This value together with first day of the week determines the total number of weeks in a year. For more information, please see our documentation on this topic. + experimental: + save_confirmation: Caution! Risk of data loss! Only activate experimental features if you do not mind breaking your OpenProject installation and losing all of its data. + warning_toast: Feature flags are settings that activate features that are still under development. They shall only be used for testing purposes. They shall never be activated on OpenProject installations holding important data. These features will very likely corrupt your data. Use them at your own risk. + feature_flags: Feature flags + general: "General" + highlighting: + mode_long: + inline: "Highlight attribute(s) inline" + none: "No highlighting" + status: "Entire row by Status" + type: "Entire row by Type" + priority: "Entire row by Priority" + icalendar: + enable_subscriptions_text_html: Allows users with the necessary permissions to subscribe to OpenProject calendars and access work package information via an external calendar client. Note: Please read about iCalendar subscriptions to understand potential security risks before enabling this. + language_name_being_default: "%{language_name} (default)" + notifications: + events_explanation: "Governs for which event an email is sent out. Work packages are excluded from this list as the notifications for them can be configured specifically for every user." + delay_minutes_explanation: "Email sending can be delayed to allow users with configured in app notification to confirm the notification within the application before a mail is sent out. Users who read a notification within the application will not receive an email for the already read notification." + other: "Other" + passwords: "Passwords" + projects: + missing_dependencies: "Project module %{module} was checked which depends on %{dependencies}. You need to check these dependencies as well." + section_new_projects: "Settings for new projects" + section_project_overview: "Settings for project overview list" + session: "Session" + user: + default_preferences: "Default preferences" + display_format: "Display format" + deletion: "Deletion" + working_days: + section_work_week: "Work week" + section_holidays_and_closures: "Holidays and closures" + text_formatting: + markdown: "Markdown" + plain: "Plain text" + status_active: "active" + status_archived: "archived" + status_blocked: "blocked" + status_invited: invited + status_locked: locked + status_registered: registered + #Used in array.to_sentence. + support: + array: + sentence_connector: "and" + skip_last_comma: "false" + text_accessibility_hint: "The accessibility mode is designed for users who are blind, motorically handicaped or have a bad eyesight. For the latter focused elements are specially highlighted. Please notice, that the Backlogs module is not available in this mode." + text_access_token_hint: "Access tokens allow you to grant external applications access to resources in OpenProject." + text_analyze: "Further analyze: %{subject}" + text_are_you_sure: "Are you sure?" + text_are_you_sure_continue: "Are you sure you want to continue?" + text_are_you_sure_with_children: "Delete work package and all child work packages?" + text_assign_to_project: "Assign to the project" + text_form_configuration: > + You can customize which fields will be displayed in work package forms. You can freely group the fields to reflect the needs for your domain. + text_form_configuration_required_attribute: "Attribute is marked required and thus always shown" + text_caracters_maximum: "%{count} characters maximum." + text_caracters_minimum: "Must be at least %{count} characters long." + text_comma_separated: "Multiple values allowed (comma separated)." + text_comment_wiki_page: "Comment to wiki page: %{page}" + text_custom_field_possible_values_info: "One line for each value" + text_custom_field_hint_activate_per_project: > + When using custom fields: Keep in mind that custom fields need to be activated per project, too. + text_custom_field_hint_activate_per_project_and_type: > + Custom fields need to be activated per work package type and per project. + text_wp_status_read_only_html: > + The Enterprise edition will add these additional add-ons for work packages' statuses fields:
+ text_project_custom_field_html: > + The Enterprise edition will add these additional add-ons for projects' custom fields:
+ text_custom_logo_instructions: > + A white logo on transparent background is recommended. For best results on both, conventional and retina displays, make sure your image's dimensions are 460px by 60px. + text_custom_export_logo_instructions: > + This is the logo that appears in your PDF exports. It needs to be a PNG or JPEG image file. A black or colored logo on transparent or white background is recommended. + text_custom_export_cover_instructions: > + This is the image that appears in the background of a cover page in your PDF exports. It needs to be an about 800px width by 500px height sized PNG or JPEG image file. + text_custom_favicon_instructions: > + This is the tiny icon that appears in your browser window/tab next to the page's title. It needs to be a squared 32 by 32 pixels sized PNG image file with a transparent background. + text_custom_touch_icon_instructions: > + This is the icon that appears in your mobile or tablet when you place a bookmark on your homescreen. It needs to be a squared 180 by 180 pixels sized PNG image file. Please make sure the image's background is not transparent otherwise it will look bad on iOS. + text_database_allows_tsv: "Database allows TSVector (optional)" + text_default_administrator_account_changed: "Default administrator account changed" + text_default_encoding: "Default: UTF-8" + text_destroy: "Delete" + text_destroy_with_associated: "There are additional objects assossociated with the work package(s) that are to be deleted. Those objects are of the following types:" + text_destroy_what_to_do: "What do you want to do?" + text_diff_truncated: "... This diff was truncated because it exceeds the maximum size that can be displayed." + text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server to enable them." + text_enumeration_category_reassign_to: "Reassign them to this value:" + text_enumeration_destroy_question: "%{count} objects are assigned to this value." + text_file_repository_writable: "Attachments directory writable" + text_git_repo_example: "a bare and local repository (e.g. /gitrepo, c:\\gitrepo)" + text_hint_date_format: "Enter a date in the form of YYYY-MM-DD. Other formats may be changed to an unwanted date." + text_hint_disable_with_0: "Note: Disable with 0" + text_hours_between: "Between %{min} and %{max} hours." + text_work_package_added: "Work package %{id} has been reported by %{author}." + text_work_package_category_destroy_assignments: "Remove category assignments" + text_work_package_category_destroy_question: "Some work packages (%{count}) are assigned to this category. What do you want to do?" + text_work_package_category_reassign_to: "Reassign work packages to this category" + text_work_package_updated: "Work package %{id} has been updated by %{author}." + text_work_package_watcher_added: "You have been added as a watcher to Work package %{id} by %{watcher_changer}." + text_work_package_watcher_removed: "You have been removed from watchers of Work package %{id} by %{watcher_changer}." + text_work_packages_destroy_confirmation: "Are you sure you want to delete the selected work package(s)?" + text_work_packages_ref_in_commit_messages: "Referencing and fixing work packages in commit messages" + text_journal_added: "%{label} %{value} added" + text_journal_attachment_added: "%{label} %{value} added as attachment" + text_journal_attachment_deleted: "%{label} %{old} removed as attachment" + text_journal_changed_plain: "%{label} changed from %{old} %{linebreak}to %{new}" + text_journal_changed_no_detail: "%{label} updated" + text_journal_changed_with_diff: "%{label} changed (%{link})" + text_journal_deleted: "%{label} deleted (%{old})" + text_journal_deleted_subproject: "%{label} %{old}" + text_journal_deleted_with_diff: "%{label} deleted (%{link})" + text_journal_file_link_added: "%{label} link to %{value} (%{storage}) added" + text_journal_file_link_deleted: "%{label} link to %{old} (%{storage}) removed" + text_journal_of: "%{label} %{value}" + text_journal_set_to: "%{label} set to %{value}" + text_journal_set_with_diff: "%{label} set (%{link})" + text_journal_label_value: "%{label} %{value}" + text_latest_note: "The latest comment is: %{note}" + text_length_between: "Length between %{min} and %{max} characters." + text_line_separated: "Multiple values allowed (one line for each value)." + text_load_default_configuration: "Load the default configuration" + text_min_max_length_info: "0 means no restriction" + text_no_roles_defined: There are no roles defined. + text_no_access_tokens_configurable: "There are no access tokens which can be configured." + text_no_configuration_data: "Roles, types, work package statuses and workflow have not been configured yet.\nIt is highly recommended to load the default configuration. You will be able to modify it once loaded." + text_no_notes: "There are no comments available for this work package." + text_notice_too_many_values_are_inperformant: "Note: Displaying more than 100 items per page can increase the page load time." + text_notice_security_badge_displayed_html: > + Note: if enabled, this will display a badge with your installation status in the %{information_panel_label} administration panel, and on the home page. It is displayed to administrators only.
The badge will check your current OpenProject version against the official OpenProject release database to alert you of any updates or known vulnerabilities. For more information on what the check provides, what data is needed to provide available updates, and how to disable this check, please visit the configuration documentation. + text_own_membership_delete_confirmation: "You are about to remove some or all of your permissions and may no longer be able to edit this project after that.\nAre you sure you want to continue?" + text_plugin_assets_writable: "Plugin assets directory writable" + text_powered_by: "Powered by %{link}" + text_project_identifier_info: "Only lower case letters (a-z), numbers, dashes and underscores are allowed, must start with a lower case letter." + text_reassign: "Reassign to work package:" + text_regexp_info: "eg. ^[A-Z0-9]+$" + text_regexp_multiline: 'The regex is applied in a multi-line mode. e.g., ^---\s+' + text_repository_usernames_mapping: "Select or update the OpenProject user mapped to each username found in the repository log.\nUsers with the same OpenProject and repository username or email are automatically mapped." + text_status_changed_by_changeset: "Applied in changeset %{value}." + text_table_difference_description: "In this table the single %{entries} are shown. You can view the difference between any two entries by first selecting the according checkboxes in the table. When clicking on the button below the table the differences are shown." + text_time_logged_by_changeset: "Applied in changeset %{value}." + text_tip_work_package_begin_day: "work package beginning this day" + text_tip_work_package_begin_end_day: "work package beginning and ending this day" + text_tip_work_package_end_day: "work package ending this day" + text_type_no_workflow: "No workflow defined for this type" + text_unallowed_characters: "Unallowed characters" + text_user_invited: The user has been invited and is pending registration. + text_user_wrote: "%{value} wrote:" + text_warn_on_leaving_unsaved: "The work package contains unsaved text that will be lost if you leave this page." + text_what_did_you_change_click_to_add_comment: "What did you change? Click to add comment" + text_wiki_destroy_confirmation: "Are you sure you want to delete this wiki and all its content?" + text_wiki_page_destroy_children: "Delete child pages and all their descendants" + text_wiki_page_destroy_question: "This page has %{descendants} child page(s) and descendant(s). What do you want to do?" + text_wiki_page_nullify_children: "Keep child pages as root pages" + text_wiki_page_reassign_children: "Reassign child pages to this parent page" + text_workflow_edit: "Select a role and a type to edit the workflow" + text_zoom_in: "Zoom in" + text_zoom_out: "Zoom out" + text_setup_mail_configuration: "Configure your email provider" + help_texts: + views: + project: > + %{plural} are always attached to a project. You can only select projects here where the %{plural} module is active. After creating a %{singular} you can add work packages from other projects to it. + public: "Publish this view, allowing other users to access your view. Users with the 'Manage public views' permission can modify or remove public query. This does not affect the visibility of work package results in that view and depending on their permissions, users may see different results." + favoured: "Mark this view as favourite and add to the saved views sidebar on the left." + time: + am: "am" + formats: + default: "%m/%d/%Y %I:%M %p" + long: "%B %d, %Y %H:%M" + short: "%d %b %H:%M" + time: "%I:%M %p" + pm: "pm" + timeframe: + show: "Show timeframe" + end: "to" + start: "from" + title_remove_and_delete_user: Remove the invited user from the project and delete him/her. + title_enterprise_upgrade: "Upgrade to unlock more users." + tooltip_user_default_timezone: > + The default time zone for new users. Can be changed in a user's settings. + tooltip_resend_invitation: > + Sends another invitation email with a fresh token in case the old one expired or the user did not get the original email. Can also be used for active users to choose a new authentication method. When used with active users their status will be changed to 'invited'. + tooltip: + setting_email_login: > + If enabled a user will be unable to chose a login during registration. Instead their given email address will serve as the login. An administrator may still change the login separately. + queries: + apply_filter: Apply preconfigured filter + top_menu: + additional_resources: "Additional resources" + getting_started: "Getting started" + help_and_support: "Help and support" + total_progress: "Total progress" + user: + all: "all" + active: "active" + activate: "Activate" + activate_and_reset_failed_logins: "Activate and reset failed logins" + authentication_provider: "Authentication Provider" + identity_url_text: "The internal unique identifier provided by the authentication provider." + authentication_settings_disabled_due_to_external_authentication: > + This user authenticates via an external authentication provider, so there is no password in OpenProject to be changed. + authorization_rejected: "You are not allowed to sign in." + assign_random_password: "Assign random password (sent to user via email)" + blocked: "locked temporarily" + blocked_num_failed_logins: + other: "locked temporarily (%{count} failed login attempts)" + confirm_status_change: "You are about to change the status of '%{name}'. Are you sure you want to continue?" + deleted: "Deleted user" + error_status_change_failed: "Changing the user status failed due to the following errors: %{errors}" + invite: Invite user via email + invited: invited + lock: "Lock permanently" + locked: "locked permanently" + no_login: "This user authenticates through login by password. Since it is disabled, they cannot log in." + password_change_unsupported: Change of password is not supported. + registered: "registered" + reset_failed_logins: "Reset failed logins" + status_user_and_brute_force: "%{user} and %{brute_force}" + status_change: "Status change" + text_change_disabled_for_provider_login: "The name is set by your login provider and can thus not be changed." + unlock: "Unlock" + unlock_and_reset_failed_logins: "Unlock and reset failed logins" + version_status_closed: "closed" + version_status_locked: "locked" + version_status_open: "open" + note: Note + note_password_login_disabled: "Password login has been disabled by %{configuration}." + warning: Warning + warning_attachments_not_saved: "%{count} file(s) could not be saved." + warning_imminent_user_limit: > + You invited more users than are supported by your current plan. Invited users may not be able to join your OpenProject environment. Please upgrade your plan or block existing users in order to allow invited and registered users to join. + warning_registration_token_expired: | + The activation email has expired. We sent you a new one to %{email}. + Please click the link inside of it to activate your account. + warning_user_limit_reached: > + Adding additional users will exceed the current limit. Please contact an administrator to increase the user limit to ensure external users are able to access this instance. + warning_user_limit_reached_admin: > + Adding additional users will exceed the current limit. Please upgrade your plan to be able to ensure external users are able to access this instance. + warning_user_limit_reached_instructions: > + You reached your user limit (%{current}/%{max} active users). Please contact sales@openproject.com to upgrade your Enterprise edition plan and add additional users. + warning_protocol_mismatch_html: > + + warning_bar: + https_mismatch: + title: "HTTPS mode setup mismatch" + text_html: > + Your application is running with HTTPS mode set to %{set_protocol}, but the request is an %{actual_protocol} request. This will result in errors! You will need to set the following configuration value: %{setting_value}. Please see the installation documentation on how to set this configuration. + hostname_mismatch: + title: "Hostname setting mismatch" + text_html: > + Your application is running with its host name setting set to %{set_hostname}, but the request is a %{actual_hostname} hostname. This will result in errors! Go to System settings and change the "Host name" setting to correct this. + menu_item: "Menu item" + menu_item_setting: "Visibility" + wiki_menu_item_for: 'Menu item for wikipage "%{title}"' + wiki_menu_item_setting: "Visibility" + wiki_menu_item_new_main_item_explanation: > + You are deleting the only main wiki menu item. You now have to choose a wiki page for which a new main item will be generated. To delete the wiki the wiki module can be deactivated by project administrators. + wiki_menu_item_delete_not_permitted: The wiki menu item of the only wiki page cannot be deleted. + #TODO: merge with work_packages top level key + work_package: + updated_automatically_by_child_changes: | + _Updated automatically by changing values within child work package %{child}_ + destroy: + info: "Deleting the work package is an irreversible action." + title: "Delete the work package" + sharing: + count: + zero: "0 users" + one: "1 user" + other: "%{count} users" + filter: + project_member: "Project member" + not_project_member: "Not project member" + project_group: "Project group" + not_project_group: "Not project group" + role: "Role" + type: "Type" + label_search: "Search for users to invite" + label_search_placeholder: "Search by user or email address" + label_toggle_all: "Toggle all shares" + permissions: + comment: "Comment" + comment_description: "Can view and comment this work package." + denied: "You don't have permissions to share work packages." + edit: "Edit" + edit_description: "Can view, comment and edit this work package." + view: "View" + view_description: "Can view this work package." + remove: "Remove" + share: "Share" + text_empty_search_description: "There are no users with the current filter criteria." + text_empty_search_header: "We couldn't find any matching results." + text_empty_state_description: "The work package has not been shared with anyone yet." + text_empty_state_header: "Not shared" + text_user_limit_reached: "Adding additional users will exceed the current limit. Please contact an administrator to increase the user limit to ensure external users are able to access this work package." + text_user_limit_reached_admins: 'Adding additional users will exceed the current limit. Please upgrade your plan to be able to add more users.' + warning_user_limit_reached: > + Adding additional users will exceed the current limit. Please contact an administrator to increase the user limit to ensure external users are able to access this work package. + warning_user_limit_reached_admin: > + Adding additional users will exceed the current limit. Please upgrade your plan to be able to ensure external users are able to access this work package. + warning_no_selected_user: "Please select users to share this work package with" + warning_locked_user: "The user %{user} is locked and cannot be shared with" + user_details: + locked: "Locked user" + invited: "Invite sent. " + resend_invite: "Resend." + invite_resent: "Invite has been resent" + not_project_member: "Not a project member" + project_group: "Group members might have additional privileges (as project members)" + not_project_group: "Group (shared with all members)" + additional_privileges_project: "Might have additional privileges (as project member)" + additional_privileges_group: "Might have additional privileges (as group member)" + additional_privileges_project_or_group: "Might have additional privileges (as project or group member)" + working_days: + info: > + Days that are not selected are skipped when scheduling work packages (and not included in the day count). These can be overriden at a work-package level. + instance_wide_info: > + Dates added to the list below are considered non-working and skipped when scheduling work packages. + change_button: "Change working days" + warning: > + Changing which days of the week are considered working days or non-working days can affect the start and finish days of all work packages in all projects in this instance.
Please note that changes are only applied after you click on the apply changes button. + journal_note: + changed: _**Working days** changed (%{changes})._ + days: + working: "%{day} is now working" + non_working: "%{day} is now non-working" + dates: + working: "%{date} is now working" + non_working: "%{date} is now non-working" + nothing_to_preview: "Nothing to preview" + api_v3: + attributes: + lock_version: "Lock Version" + property: "Property" + errors: + code_400: "Bad request: %{message}" + code_401: "You need to be authenticated to access this resource." + code_401_wrong_credentials: "You did not provide the correct credentials." + code_403: "You are not authorized to access this resource." + code_404: "The requested resource could not be found." + code_409: "Could not update the resource because of conflicting modifications." + code_429: "Too many requests. Please try again later." + code_500: "An internal error has occurred." + code_500_outbound_request_failure: "An outbound request to another resource has failed with status code %{status_code}." + code_500_missing_enterprise_token: "The request can not be handled due to invalid or missing Enterprise token." + not_found: + work_package: "The work package you are looking for cannot be found or has been deleted." + expected: + date: "YYYY-MM-DD (ISO 8601 date only)" + datetime: "YYYY-MM-DDThh:mm:ss[.lll][+hh:mm] (any compatible ISO 8601 datetime)" + duration: "ISO 8601 duration" + invalid_content_type: "Expected CONTENT-TYPE to be '%{content_type}' but got '%{actual}'." + invalid_format: "Invalid format for property '%{property}': Expected format like '%{expected_format}', but got '%{actual}'." + invalid_json: "The request could not be parsed as JSON." + invalid_relation: "The relation is invalid." + invalid_resource: "For property '%{property}' a link like '%{expected}' is expected, but got '%{actual}'." + invalid_signal: + embed: "The requested embedding of %{invalid} is not supported. Supported embeddings are %{supported}." + select: "The requested select of %{invalid} is not supported. Supported selects are %{supported}." + invalid_user_status_transition: "The current user account status does not allow this operation." + missing_content_type: "not specified" + missing_property: "Missing property '%{property}'." + missing_request_body: "There was no request body." + missing_or_malformed_parameter: "The query parameter '%{parameter}' is missing or malformed." + multipart_body_error: "The request body did not contain the expected multipart parts." + multiple_errors: "Multiple field constraints have been violated." + unable_to_create_attachment: "The attachment could not be created" + unable_to_create_attachment_permissions: "The attachment could not be saved due to lacking file system permissions" + render: + context_not_parsable: "The context provided is not a link to a resource." + unsupported_context: "The resource given is not supported as context." + context_object_not_found: "Cannot find the resource given as the context." + validation: + done_ratio: "% Complete cannot be set on parent work packages, when it is inferred by status or when it is disabled." + due_date: "Finish date cannot be set on parent work packages." + estimated_hours: "Work cannot be set on parent work packages." #feel like this one should be removed eventually + invalid_user_assigned_to_work_package: "The chosen user is not allowed to be '%{property}' for this work package." + start_date: "Start date cannot be set on parent work packages." + eprops: + invalid_gzip: "is invalid gzip: %{message}" + invalid_json: "is invalid json: %{message}" + resources: + schema: "Schema" + undisclosed: + parent: Undisclosed - The selected parent is invisible because of lacking permissions. + ancestor: Undisclosed - The ancestor is invisible because of lacking permissions. + doorkeeper: + pre_authorization: + status: "Pre-authorization" + auth_url: "Auth URL" + access_token_url: "Access token URL" + errors: + messages: + #Common error messages + invalid_request: + unknown: "The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed." + missing_param: "Missing required parameter: %{value}." + request_not_authorized: "Request need to be authorized. Required parameter for authorizing request is missing or invalid." + invalid_redirect_uri: "The requested redirect uri is malformed or doesn't match client redirect URI." + unauthorized_client: "The client is not authorized to perform this request using this method." + access_denied: "The resource owner or authorization server denied the request." + invalid_scope: "The requested scope is invalid, unknown, or malformed." + invalid_code_challenge_method: "The code challenge method must be plain or S256." + server_error: "The authorization server encountered an unexpected condition which prevented it from fulfilling the request." + temporarily_unavailable: "The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server." + #Configuration error messages + credential_flow_not_configured: "Resource Owner Password Credentials flow failed due to Doorkeeper.configure.resource_owner_from_credentials being unconfigured." + resource_owner_authenticator_not_configured: "Resource Owner find failed due to Doorkeeper.configure.resource_owner_authenticator being unconfigured." + admin_authenticator_not_configured: "Access to admin panel is forbidden due to Doorkeeper.configure.admin_authenticator being unconfigured." + #Access grant errors + unsupported_response_type: "The authorization server does not support this response type." + unsupported_response_mode: "The authorization server does not support this response mode." + #Access token errors + invalid_client: "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method." + invalid_grant: "The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client." + unsupported_grant_type: "The authorization grant type is not supported by the authorization server." + invalid_token: + revoked: "The access token was revoked" + expired: "The access token expired" + unknown: "The access token is invalid" + revoke: + unauthorized: "You are not authorized to revoke this token." + forbidden_token: + missing_scope: 'Access to this resource requires scope "%{oauth_scopes}".' + unsupported_browser: + title: "Your browser is outdated and unsupported." + message: "You may run into errors and degraded experience on this page." + update_message: "Please update your browser." + close_warning: "Ignore this warning." + oauth: + application: + singular: "OAuth application" + plural: "OAuth applications" + named: "OAuth application '%{name}'" + new: "New OAuth application" + default_scopes: "(Default scopes)" + instructions: + name: "The name of your application. This will be displayed to other users upon authorization." + redirect_uri_html: > + The allowed URLs authorized users can be redirected to. One entry per line.
If you're registering a desktop application, use the following URL. + confidential: "Check if the application will be used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are assumed non-confidential." + scopes: "Check the scopes you want the application to grant access to. If no scope is checked, api_v3 is assumed." + client_credential_user_id: "Optional user ID to impersonate when clients use this application. Leave empty to allow public access only" + register_intro: "If you are developing an OAuth API client application for OpenProject, you can register it using this form for all users to use." + default_scopes: "" + client_id: "Client ID" + client_secret_notice: > + This is the only time we can print the client secret, please note it down and keep it secure. It should be treated as a password and cannot be retrieved by OpenProject at a later time. + authorization_dialog: + authorize: "Authorize" + cancel: "Cancel and deny authorization." + prompt_html: "Authorize %{application_name} to use your account %{login}?" + title: "Authorize %{application_name}" + wants_to_access_html: > + This application requests access to your OpenProject account.
It has requested the following permissions: + scopes: + api_v3: "Full API v3 access" + api_v3_text: "Application will receive full read & write access to the OpenProject API v3 to perform actions on your behalf." + grants: + created_date: "Approved on" + scopes: "Permissions" + successful_application_revocation: "Revocation of application %{application_name} successful." + none_given: "No OAuth applications have been granted access to your user account." + x_active_tokens: + other: "%{count} active token" + flows: + authorization_code: "Authorization code flow" + client_credentials: "Client credentials flow" + client_credentials: "User used for Client credentials" + client_credentials_impersonation_set_to: "Client credentials user set to" + client_credentials_impersonation_warning: "Note: Clients using the 'Client credentials' flow in this application will have the rights of this user" + client_credentials_impersonation_html: > + By default, OpenProject provides OAuth 2.0 authorization via %{authorization_code_flow_link}. You can optionally enable %{client_credentials_flow_link}, but you must provide a user on whose behalf requests will be performed. + authorization_error: "An authorization error has occurred." + revoke_my_application_confirmation: "Do you really want to remove this application? This will revoke %{token_count} active for it." + my_registered_applications: "Registered OAuth applications" + oauth_client: + urn_connection_status: + connected: "Connected" + error: "Error" + failed_authorization: "Authorization failed" + labels: + label_oauth_integration: "OAuth2 integration" + label_redirect_uri: "Redirect URI" + label_request_token: "Request token" + label_refresh_token: "Refresh token" + errors: + oauth_authorization_code_grant_had_errors: "OAuth2 returned an error" + oauth_reported: "OAuth2 provider reported" + oauth_returned_error: "OAuth2 returned an error" + oauth_returned_json_error: "OAuth2 returned a JSON error" + oauth_returned_http_error: "OAuth2 returned a network error" + oauth_returned_standard_error: "OAuth2 returned an internal error" + wrong_token_type_returned: "OAuth2 returned a wrong type of token, expecting AccessToken::Bearer" + oauth_issue_contact_admin: "OAuth2 reported an error. Please contact your system administrator." + oauth_client_not_found: "OAuth2 client not found in 'callback' endpoint (redirect_uri)." + refresh_token_called_without_existing_token: > + Internal error: Called refresh_token without a previously existing token. + refresh_token_updated_failed: "Error during update of OAuthClientToken" + oauth_client_not_found_explanation: > + This error appears after you have updated the client_id and client_secret in OpenProject, but haven't updated the 'Return URI' field in the OAuth2 provider. + oauth_code_not_present: "OAuth2 'code' not found in 'callback' endpoint (redirect_uri)." + oauth_code_not_present_explanation: > + This error appears if you have selected the wrong response_type in the OAuth2 provider. Response_type should be 'code' or similar. + oauth_state_not_present: "OAuth2 'state' not found in 'callback' endpoint (redirect_uri)." + oauth_state_not_present_explanation: > + The 'state' is used to indicate to OpenProject where to continue after a successful OAuth2 authorization. A missing 'state' is an internal error that may appear during setup. Please contact your system administrator. + rack_oauth2: + client_secret_invalid: "Client secret is invalid (client_secret_invalid)" + invalid_request: > + OAuth2 Authorization Server responded with 'invalid_request'. This error appears if you try to authorize multiple times or in case of technical issues. + invalid_response: "OAuth2 Authorization Server provided an invalid response (invalid_response)" + invalid_grant: "The OAuth2 Authorization Server asks you to reauthorize (invalid_grant)." + invalid_client: "The OAuth2 Authorization Server doesn't recognize OpenProject (invalid_client)." + unauthorized_client: "The OAuth2 Authorization Server rejects the grant type (unauthorized_client)" + unsupported_grant_type: "The OAuth2 Authorization Server asks you to reauthorize (unsupported_grant_type)." + invalid_scope: "You are not allowed to access the requested resource (invalid_scope)." + http: + request: + failed_authorization: "The server side request failed authorizing itself." + missing_authorization: "The server side request failed due to missing authorization information." + response: + unexpected: "Unexpected response received." + you: you + link: link + plugin_openproject_auth_plugins: + name: "OpenProject Auth Plugins" + description: "Integration of OmniAuth strategy providers for authentication in Openproject." + plugin_openproject_auth_saml: + name: "OmniAuth SAML / Single-Sign On" + description: "Adds the OmniAuth SAML provider to OpenProject" diff --git a/config/locales/generated/ms.yml b/config/locales/generated/ms.yml new file mode 100644 index 000000000000..2c396fbfd91c --- /dev/null +++ b/config/locales/generated/ms.yml @@ -0,0 +1,14 @@ +# This file has been generated by script/i18n/generate_languages_translations. +# Please do not edit directly. +# +# To update this file, run script/i18n/generate_languages_translations. +# +# The translations come from version 42 of the Unicode CLDR project . +# +# The Unicode Common Locale Data Repository (CLDR) provides key building +# blocks for software to support the world's languages, with the largest +# and most extensive standard repository of locale data available. +--- +ms: + cldr: + language_name: Melayu diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 1b35b00837fe..6004090e9f6c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -3502,9 +3502,9 @@ "dev": true }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3776,13 +3776,13 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -3803,9 +3803,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "node_modules/@isaacs/cliui": { @@ -9226,13 +9226,14 @@ } }, "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "version": "0.10.63", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.63.tgz", + "integrity": "sha512-hUCZd2Byj/mNKjfP9jXrdVZ62B8KuA/VoK7X8nUh5qT+AxDmcbvZz041oDVZdbIN1qW6XY9VDNwzkvKnZvK2TQ==", "hasInstallScript": true, "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" }, "engines": { @@ -9400,16 +9401,16 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -9984,6 +9985,34 @@ "node": ">=8" } }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esniff/node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/esniff/node_modules/d/node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -22981,9 +23010,9 @@ } }, "@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true }, "@floating-ui/core": { @@ -23212,13 +23241,13 @@ } }, "@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" } }, @@ -23229,9 +23258,9 @@ "dev": true }, "@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "@isaacs/cliui": { @@ -27283,12 +27312,13 @@ } }, "es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "version": "0.10.63", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.63.tgz", + "integrity": "sha512-hUCZd2Byj/mNKjfP9jXrdVZ62B8KuA/VoK7X8nUh5qT+AxDmcbvZz041oDVZdbIN1qW6XY9VDNwzkvKnZvK2TQ==", "requires": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" } }, @@ -27440,16 +27470,16 @@ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" }, "eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -27885,6 +27915,35 @@ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, + "esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "dependencies": { + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + }, + "dependencies": { + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + } + } + } + } + }, "espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", diff --git a/frontend/src/stimulus/controllers/dynamic/costs/budget-subform.controller.ts b/frontend/src/stimulus/controllers/dynamic/costs/budget-subform.controller.ts index 9e722d6d4403..36b21a4fcfa6 100644 --- a/frontend/src/stimulus/controllers/dynamic/costs/budget-subform.controller.ts +++ b/frontend/src/stimulus/controllers/dynamic/costs/budget-subform.controller.ts @@ -55,11 +55,19 @@ export default class BudgetSubformController extends Controller { this.submitButtons = this.form.querySelectorAll("button[type='submit']"); } + private debounceTimers:{ [id:string]:ReturnType } = {}; + valueChanged(evt:Event) { const row = this.eventRow(evt.target); if (row) { - void this.refreshRow(row.getAttribute('id') as string); + const id:string = row.getAttribute('id') as string; + + clearTimeout(this.debounceTimers[id]); + + this.debounceTimers[id] = setTimeout(() => { + void this.refreshRow(id); + }, 100); } } diff --git a/frontend/src/vendor/ckeditor/ckeditor.js b/frontend/src/vendor/ckeditor/ckeditor.js index 11d92c0e324f..4d6dac3fac96 100644 --- a/frontend/src/vendor/ckeditor/ckeditor.js +++ b/frontend/src/vendor/ckeditor/ckeditor.js @@ -3,5 +3,5 @@ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. */ -function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OPEditor=t():e.OPEditor=t()}(self,(()=>(()=>{var e={8168:(e,t,o)=>{const n=o(8874),r={};for(const e of Object.keys(n))r[n[e]]=e;const i={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=i;for(const e of Object.keys(i)){if(!("channels"in i[e]))throw new Error("missing channels property: "+e);if(!("labels"in i[e]))throw new Error("missing channel labels property: "+e);if(i[e].labels.length!==i[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:o}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],"channels",{value:t}),Object.defineProperty(i[e],"labels",{value:o})}i.rgb.hsl=function(e){const t=e[0]/255,o=e[1]/255,n=e[2]/255,r=Math.min(t,o,n),i=Math.max(t,o,n),s=i-r;let a,l;i===r?a=0:t===i?a=(o-n)/s:o===i?a=2+(n-t)/s:n===i&&(a=4+(t-o)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(r+i)/2;return l=i===r?0:c<=.5?s/(i+r):s/(2-i-r),[a,100*l,100*c]},i.rgb.hsv=function(e){let t,o,n,r,i;const s=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(s,a,l),d=c-Math.min(s,a,l),u=function(e){return(c-e)/6/d+.5};return 0===d?(r=0,i=0):(i=d/c,t=u(s),o=u(a),n=u(l),s===c?r=n-o:a===c?r=1/3+t-n:l===c&&(r=2/3+o-t),r<0?r+=1:r>1&&(r-=1)),[360*r,100*i,100*c]},i.rgb.hwb=function(e){const t=e[0],o=e[1];let n=e[2];const r=i.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(o,n));return n=1-1/255*Math.max(t,Math.max(o,n)),[r,100*s,100*n]},i.rgb.cmyk=function(e){const t=e[0]/255,o=e[1]/255,n=e[2]/255,r=Math.min(1-t,1-o,1-n);return[100*((1-t-r)/(1-r)||0),100*((1-o-r)/(1-r)||0),100*((1-n-r)/(1-r)||0),100*r]},i.rgb.keyword=function(e){const t=r[e];if(t)return t;let o,i=1/0;for(const t of Object.keys(n)){const r=n[t],l=(a=r,((s=e)[0]-a[0])**2+(s[1]-a[1])**2+(s[2]-a[2])**2);l.04045?((t+.055)/1.055)**2.4:t/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*o+.1805*n),100*(.2126*t+.7152*o+.0722*n),100*(.0193*t+.1192*o+.9505*n)]},i.rgb.lab=function(e){const t=i.rgb.xyz(e);let o=t[0],n=t[1],r=t[2];o/=95.047,n/=100,r/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(o-n),200*(n-r)]},i.hsl.rgb=function(e){const t=e[0]/360,o=e[1]/100,n=e[2]/100;let r,i,s;if(0===o)return s=255*n,[s,s,s];r=n<.5?n*(1+o):n+o-n*o;const a=2*n-r,l=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,s=6*i<1?a+6*(r-a)*i:2*i<1?r:3*i<2?a+(r-a)*(2/3-i)*6:a,l[e]=255*s;return l},i.hsl.hsv=function(e){const t=e[0];let o=e[1]/100,n=e[2]/100,r=o;const i=Math.max(n,.01);n*=2,o*=n<=1?n:2-n,r*=i<=1?i:2-i;return[t,100*(0===n?2*r/(i+r):2*o/(n+o)),100*((n+o)/2)]},i.hsv.rgb=function(e){const t=e[0]/60,o=e[1]/100;let n=e[2]/100;const r=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-o),a=255*n*(1-o*i),l=255*n*(1-o*(1-i));switch(n*=255,r){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}},i.hsv.hsl=function(e){const t=e[0],o=e[1]/100,n=e[2]/100,r=Math.max(n,.01);let i,s;s=(2-o)*n;const a=(2-o)*r;return i=o*r,i/=a<=1?a:2-a,i=i||0,s/=2,[t,100*i,100*s]},i.hwb.rgb=function(e){const t=e[0]/360;let o=e[1]/100,n=e[2]/100;const r=o+n;let i;r>1&&(o/=r,n/=r);const s=Math.floor(6*t),a=1-n;i=6*t-s,0!=(1&s)&&(i=1-i);const l=o+i*(a-o);let c,d,u;switch(s){default:case 6:case 0:c=a,d=l,u=o;break;case 1:c=l,d=a,u=o;break;case 2:c=o,d=a,u=l;break;case 3:c=o,d=l,u=a;break;case 4:c=l,d=o,u=a;break;case 5:c=a,d=o,u=l}return[255*c,255*d,255*u]},i.cmyk.rgb=function(e){const t=e[0]/100,o=e[1]/100,n=e[2]/100,r=e[3]/100;return[255*(1-Math.min(1,t*(1-r)+r)),255*(1-Math.min(1,o*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r))]},i.xyz.rgb=function(e){const t=e[0]/100,o=e[1]/100,n=e[2]/100;let r,i,s;return r=3.2406*t+-1.5372*o+-.4986*n,i=-.9689*t+1.8758*o+.0415*n,s=.0557*t+-.204*o+1.057*n,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r=Math.min(Math.max(0,r),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[255*r,255*i,255*s]},i.xyz.lab=function(e){let t=e[0],o=e[1],n=e[2];t/=95.047,o/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*o-16,500*(t-o),200*(o-n)]},i.lab.xyz=function(e){let t,o,n;o=(e[0]+16)/116,t=e[1]/500+o,n=o-e[2]/200;const r=o**3,i=t**3,s=n**3;return o=r>.008856?r:(o-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,t*=95.047,o*=100,n*=108.883,[t,o,n]},i.lab.lch=function(e){const t=e[0],o=e[1],n=e[2];let r;r=360*Math.atan2(n,o)/2/Math.PI,r<0&&(r+=360);return[t,Math.sqrt(o*o+n*n),r]},i.lch.lab=function(e){const t=e[0],o=e[1],n=e[2]/360*2*Math.PI;return[t,o*Math.cos(n),o*Math.sin(n)]},i.rgb.ansi16=function(e,t=null){const[o,n,r]=e;let s=null===t?i.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(o/255));return 2===s&&(a+=60),a},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){const t=e[0],o=e[1],n=e[2];if(t===o&&o===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(n/255*5)},i.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const o=.5*(1+~~(e>50));return[(1&t)*o*255,(t>>1&1)*o*255,(t>>2&1)*o*255]},i.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},i.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let o=t[0];3===t[0].length&&(o=o.split("").map((e=>e+e)).join(""));const n=parseInt(o,16);return[n>>16&255,n>>8&255,255&n]},i.rgb.hcg=function(e){const t=e[0]/255,o=e[1]/255,n=e[2]/255,r=Math.max(Math.max(t,o),n),i=Math.min(Math.min(t,o),n),s=r-i;let a,l;return a=s<1?i/(1-s):0,l=s<=0?0:r===t?(o-n)/s%6:r===o?2+(n-t)/s:4+(t-o)/s,l/=6,l%=1,[360*l,100*s,100*a]},i.hsl.hcg=function(e){const t=e[1]/100,o=e[2]/100,n=o<.5?2*t*o:2*t*(1-o);let r=0;return n<1&&(r=(o-.5*n)/(1-n)),[e[0],100*n,100*r]},i.hsv.hcg=function(e){const t=e[1]/100,o=e[2]/100,n=t*o;let r=0;return n<1&&(r=(o-n)/(1-n)),[e[0],100*n,100*r]},i.hcg.rgb=function(e){const t=e[0]/360,o=e[1]/100,n=e[2]/100;if(0===o)return[255*n,255*n,255*n];const r=[0,0,0],i=t%1*6,s=i%1,a=1-s;let l=0;switch(Math.floor(i)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=a,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=a,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=a}return l=(1-o)*n,[255*(o*r[0]+l),255*(o*r[1]+l),255*(o*r[2]+l)]},i.hcg.hsv=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);let n=0;return o>0&&(n=t/o),[e[0],100*n,100*o]},i.hcg.hsl=function(e){const t=e[1]/100,o=e[2]/100*(1-t)+.5*t;let n=0;return o>0&&o<.5?n=t/(2*o):o>=.5&&o<1&&(n=t/(2*(1-o))),[e[0],100*n,100*o]},i.hcg.hwb=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);return[e[0],100*(o-t),100*(1-o)]},i.hwb.hcg=function(e){const t=e[1]/100,o=1-e[2]/100,n=o-t;let r=0;return n<1&&(r=(o-n)/(1-n)),[e[0],100*n,100*r]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=function(e){return[0,0,e[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),o=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(o.length)+o},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},2085:(e,t,o)=>{const n=o(8168),r=o(4111),i={};Object.keys(n).forEach((e=>{i[e]={},Object.defineProperty(i[e],"channels",{value:n[e].channels}),Object.defineProperty(i[e],"labels",{value:n[e].labels});const t=r(e);Object.keys(t).forEach((o=>{const n=t[o];i[e][o]=function(e){const t=function(...t){const o=t[0];if(null==o)return o;o.length>1&&(t=o);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t1&&(t=o),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=i},4111:(e,t,o)=>{const n=o(8168);function r(e){const t=function(){const e={},t=Object.keys(n);for(let o=t.length,n=0;n{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},8180:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-basic-styles/theme/code.css"],names:[],mappings:"AAKA,iBACC,kCAAuC,CAEvC,iBAAkB,CADlB,aAED,CAEA,0CACC,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content code {\n\tbackground-color: hsla(0, 0%, 78%, 0.3);\n\tpadding: .15em;\n\tborder-radius: 2px;\n}\n\n.ck.ck-editor__editable .ck-code_selected {\n\tbackground-color: hsla(0, 0%, 78%, 0.5);\n}\n"],sourceRoot:""}]);const a=s},636:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-block-quote/theme/blockquote.css"],names:[],mappings:"AAKA,uBAWC,0BAAsC,CADtC,iBAAkB,CAFlB,aAAc,CACd,cAAe,CAPf,eAAgB,CAIhB,kBAAmB,CADnB,mBAOD,CAEA,gCACC,aAAc,CACd,2BACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content blockquote {\n\t/* See #12 */\n\toverflow: hidden;\n\n\t/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\n\tpadding-right: 1.5em;\n\tpadding-left: 1.5em;\n\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tfont-style: italic;\n\tborder-left: solid 5px hsl(0, 0%, 80%);\n}\n\n.ck-content[dir="rtl"] blockquote {\n\tborder-left: 0;\n\tborder-right: solid 5px hsl(0, 0%, 80%);\n}\n'],sourceRoot:""}]);const a=s},390:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}.ck.ck-clipboard-drop-target-line{pointer-events:none;position:absolute}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}.ck.ck-clipboard-drop-target-line{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);height:0;margin-top:-1px}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-clipboard/theme/clipboard.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-clipboard/clipboard.css"],names:[],mappings:"AASC,8DACC,cAAe,CAEf,mBAAoB,CADpB,iBAOD,CAJC,mEACC,iBAAkB,CAClB,OACD,CAWA,qJACC,YACD,CAIF,kCAEC,mBAAoB,CADpB,iBAED,CChCA,MACC,yCAA0C,CAC1C,yCAA0C,CAC1C,6DACD,CAOE,mEAIC,gDAAiD,CADjD,sDAAuD,CAFvD,2DAA8D,CAI9D,gBAAiB,CAHjB,wDAqBD,CAfC,yEAWC,sFAAuF,CAEvF,kBAAmB,CADnB,qKAA0K,CAX1K,UAAW,CAIX,aAAc,CAFd,QAAS,CAIT,QAAS,CADT,iBAAkB,CAElB,wDAA2D,CAE3D,0BAA2B,CAR3B,OAYD,CAOF,kEACC,gGACD,CAKA,gDACC,OAAS,CACT,sBACD,CAGD,kCAGC,gDAAiD,CADjD,sDAAuD,CADvD,QAAS,CAGT,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\tdisplay: inline;\n\t\tposition: relative;\n\t\tpointer-events: none;\n\n\t\t& span {\n\t\t\tposition: absolute;\n\t\t\twidth: 0;\n\t\t}\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\t& > .ck-widget__selection-handle {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t& > .ck-widget__type-around {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n.ck.ck-clipboard-drop-target-line {\n\tposition: absolute;\n\tpointer-events: none;\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-clipboard-drop-target-dot-width: 12px;\n\t--ck-clipboard-drop-target-dot-height: 8px;\n\t--ck-clipboard-drop-target-color: var(--ck-color-focus-border)\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\t& span {\n\t\t\tbottom: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\t\t\tbackground: var(--ck-clipboard-drop-target-color);\n\t\t\tmargin-left: -1px;\n\n\t\t\t/* The triangle above the marker */\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 50%;\n\t\t\t\ttop: calc(var(--ck-clipboard-drop-target-dot-height) * -.5);\n\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\tborder-color: var(--ck-clipboard-drop-target-color) transparent transparent transparent;\n\t\t\t\tborder-width: calc(var(--ck-clipboard-drop-target-dot-height)) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width));\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Styles of the widget that it a drop target.\n\t */\n\t& .ck-widget.ck-clipboard-drop-target-range {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color) !important;\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\tzoom: 0.6;\n\t\toutline: none !important;\n\t}\n}\n\n.ck.ck-clipboard-drop-target-line {\n\theight: 0;\n\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\tbackground: var(--ck-clipboard-drop-target-color);\n\tmargin-top: -1px;\n}\n'],sourceRoot:""}]);const a=s},8894:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-engine/theme/placeholder.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-engine/placeholder.css"],names:[],mappings:"AAMA,uCAEC,iBAWD,CATC,qDAIC,8BAA+B,CAF/B,MAAO,CAKP,mBAAoB,CANpB,iBAAkB,CAElB,OAKD,CAKA,wCACC,YACD,CAQD,iCACC,iBACD,CC5BC,qDAEC,6CAA8C,CAD9C,WAED",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder,\n.ck .ck-placeholder {\n\tposition: relative;\n\n\t&::before {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tcontent: attr(data-placeholder);\n\n\t\t/* See ckeditor/ckeditor5#469. */\n\t\tpointer-events: none;\n\t}\n}\n\n/* See ckeditor/ckeditor5#1987. */\n.ck.ck-read-only .ck-placeholder {\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n\n/*\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\n */\n.ck.ck-reset_all .ck-placeholder {\n\tposition: relative;\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder, .ck .ck-placeholder {\n\t&::before {\n\t\tcursor: text;\n\t\tcolor: var(--ck-color-engine-placeholder-text);\n\t}\n}\n"],sourceRoot:""}]);const a=s},4401:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-engine/theme/renderer.css"],names:[],mappings:"AAMA,qDACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Elements marked by the Renderer as hidden should be invisible in the editor. */\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n\tdisplay: none;\n}\n"],sourceRoot:""}]);const a=s},3230:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-heading/theme/heading.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-heading/heading.css"],names:[],mappings:"AAKA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,+BACC,eACD,CCZC,2EACC,SACD,CAEA,uEACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-heading_heading1 {\n\tfont-size: 20px;\n}\n\n.ck.ck-heading_heading2 {\n\tfont-size: 17px;\n}\n\n.ck.ck-heading_heading3 {\n\tfont-size: 14px;\n}\n\n.ck[class*="ck-heading_heading"] {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Resize dropdown's button label. */\n.ck.ck-dropdown.ck-heading-dropdown {\n\t& .ck-dropdown__button .ck-button__label {\n\t\twidth: 8em;\n\t}\n\n\t& .ck-dropdown__panel .ck-list__item {\n\t\tmin-width: 18em;\n\t}\n}\n"],sourceRoot:""}]);const a=s},9048:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{align-items:flex-start;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/image.css"],names:[],mappings:"AAMC,mBAEC,UAAW,CADX,aAAc,CAOd,gBAAkB,CAGlB,cAAe,CARf,iBAuBD,CAbC,uBAEC,aAAc,CAGd,aAAc,CAGd,cAAe,CAGf,cACD,CAGD,0BAYC,sBAAuB,CANvB,mBAAoB,CAGpB,cAoBD,CAdC,kCACC,YACD,CAGA,gEAGC,WAAY,CACZ,aAAc,CAGd,cACD,CAUD,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAWA,2GACC,SAUD,CAHC,qEACC,YACD,CAOA,0FACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content {\n\t& .image {\n\t\tdisplay: table;\n\t\tclear: both;\n\t\ttext-align: center;\n\n\t\t/* Make sure there is some space between the content and the image. Center image by default. */\n\t\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\t \tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\t\tmargin: 0.9em auto;\n\n\t\t/* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */\n\t\tmin-width: 50px;\n\n\t\t& img {\n\t\t\t/* Prevent unnecessary margins caused by line-height (see #44). */\n\t\t\tdisplay: block;\n\n\t\t\t/* Center the image if its width is smaller than the content\'s width. */\n\t\t\tmargin: 0 auto;\n\n\t\t\t/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */\n\t\t\tmax-width: 100%;\n\n\t\t\t/* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */\n\t\t\tmin-width: 100%\n\t\t}\n\t}\n\n\t& .image-inline {\n\t\t/*\n\t\t * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).\n\t\t * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root.\n\t\t * This strange behavior does not happen with inline-flex.\n\t\t */\n\t\tdisplay: inline-flex;\n\n\t\t/* While being resized, don\'t allow the image to exceed the width of the editing root. */\n\t\tmax-width: 100%;\n\n\t\t/* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */\n\t\talign-items: flex-start;\n\n\t\t/* When the picture is present it must act as a flex container to let the img resize properly */\n\t\t& picture {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t/* When the picture is present, it must act like a resizable img. */\n\t\t& picture,\n\t\t& img {\n\t\t\t/* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */\n\t\t\tflex-grow: 1;\n\t\t\tflex-shrink: 1;\n\n\t\t\t/* Prevents overflowing the editing root boundaries when an inline image is very wide. */\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Inhertit the content styles padding of the
in case the integration overrides `text-align: center`\n\t * of `.image` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native\n\t * caret does, and not at the edge of
.\n\t */\n\t& .image > figcaption.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the image caption placeholder doesn\'t overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\n\t/*\n\t * Make sure the selected inline image always stays on top of its siblings.\n\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t */\n\t& .image.ck-widget_selected {\n\t\tz-index: 1;\n\t}\n\n\t& .image-inline.ck-widget_selected {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the native browser selection style is not displayed.\n\t\t * Inline image widgets have their own styles for the selected state and\n\t\t * leaving this up to the browser is asking for a visual collision.\n\t\t */\n\t\t& ::selection {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t/* The inline image nested in the table should have its original size if not resized.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline img {\n\t\t\tmax-width: none;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},8662:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-background:#fd0}.ck-content .image>figcaption{background-color:var(--ck-color-image-caption-background);caption-side:bottom;color:var(--ck-color-image-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;word-break:break-word}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imagecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,mDACD,CAGA,8BAKC,yDAA0D,CAH1D,mBAAoB,CAEpB,wCAAyC,CAHzC,qBAAsB,CAMtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,qBAMD,CAGA,qEACC,iDACD,CAEA,sCACC,GACC,oEACD,CAEA,GACC,yDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-image-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-image-caption-highligted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .image > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: bottom;\n\tword-break: break-word;\n\tcolor: var(--ck-color-image-caption-text);\n\tbackground-color: var(--ck-color-image-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {\n\tanimation: ck-image-caption-highlight .6s ease-out;\n}\n\n@keyframes ck-image-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-image-caption-highligted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-image-caption-background);\n\t}\n}\n"],sourceRoot:""}]);const a=s},9292:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-image-insert__panel{padding:var(--ck-spacing-large)}.ck.ck-image-insert__ck-finder-button{border:1px solid #ccc;border-radius:var(--ck-border-radius);display:block;margin:var(--ck-spacing-standard) auto;width:100%}.ck.ck-splitbutton>.ck-file-dialog-button.ck-button{border:none;margin:0;padding:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageinsert.css"],names:[],mappings:"AAKA,2BACC,+BACD,CAEA,sCAIC,qBAAiC,CACjC,qCAAsC,CAJtC,aAAc,CAEd,sCAAuC,CADvC,UAID,CAGA,oDAGC,WAAY,CADZ,QAAS,CADT,SAGD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-image-insert__panel {\n\tpadding: var(--ck-spacing-large);\n}\n\n.ck.ck-image-insert__ck-finder-button {\n\tdisplay: block;\n\twidth: 100%;\n\tmargin: var(--ck-spacing-standard) auto;\n\tborder: 1px solid hsl(0, 0%, 80%);\n\tborder-radius: var(--ck-border-radius);\n}\n\n/* https://github.com/ckeditor/ckeditor5/issues/7986 */\n.ck.ck-splitbutton > .ck-file-dialog-button.ck-button {\n\tpadding: 0;\n\tmargin: 0;\n\tborder: none;\n}\n"],sourceRoot:""}]);const a=s},5150:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-image-insert-form:focus{outline:none}.ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-image-insert-form__action-row{margin-top:var(--ck-spacing-standard)}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageinsertformrowview.css"],names:[],mappings:"AAMC,+BAEC,YACD,CAGD,iBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAmBD,CAhBC,iCACC,WACD,CAEA,kDACC,qCAUD,CARC,sIAEC,sBACD,CAEA,+EACC,0BACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-image-insert-form {\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n}\n\n.ck.ck-form__row {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\tflex-grow: 1;\n\t}\n\n\t&.ck-image-insert-form__action-row {\n\t\tmargin-top: var(--ck-spacing-standard);\n\n\t\t& .ck-button-save,\n\t\t& .ck-button-cancel {\n\t\t\tjustify-content: center;\n\t\t}\n\n\t\t& .ck-button .ck-button__label {\n\t\t\tcolor: var(--ck-color-text);\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},1043:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck-content .image.image_resized{box-sizing:border-box;display:block;max-width:100%}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageresize.css"],names:[],mappings:"AAKA,iCAQC,qBAAsB,CADtB,aAAc,CANd,cAkBD,CATC,qCAEC,UACD,CAEA,4CAEC,aACD,CAQC,sHACC,cACD,CAIF,oFACC,uCACD,CAEA,oFACC,sCACD,CAEA,oEACC,SACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .image.image_resized {\n\tmax-width: 100%;\n\t/*\n\tThe `
` element for resized images must not use `display:table` as browsers do not support `max-width` for it well.\n\tSee https://stackoverflow.com/questions/4019604/chrome-safari-ignoring-max-width-in-table/14420691#14420691 for more.\n\tFortunately, since we control the width, there is no risk that the image will look bad.\n\t*/\n\tdisplay: block;\n\tbox-sizing: border-box;\n\n\t& img {\n\t\t/* For resized images it is the `
` element that determines the image width. */\n\t\twidth: 100%;\n\t}\n\n\t& > figcaption {\n\t\t/* The `
` element uses `display:block`, so `
` also has to. */\n\t\tdisplay: block;\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/* The resized inline image nested in the table should respect its parent size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline.image_resized img {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n[dir="ltr"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-right: var(--ck-spacing-standard);\n}\n\n[dir="rtl"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-left: var(--ck-spacing-standard);\n}\n\n.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label {\n\twidth: 4em;\n}\n'],sourceRoot:""}]);const a=s},4622:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-bottom:var(--ck-inline-image-style-spacing);margin-top:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imagestyle.css"],names:[],mappings:"AAKA,MACC,8BAA+B,CAC/B,qEACD,CAMC,qFAEC,oDACD,CAIA,yEAEC,UACD,CAEA,8BACC,WAAY,CACZ,yCAA0C,CAC1C,aACD,CAEA,oCACC,UAAW,CACX,0CACD,CAEA,sCACC,gBAAiB,CACjB,iBACD,CAEA,qCACC,WAAY,CACZ,yCACD,CAEA,2CAEC,gBAAiB,CADjB,cAED,CAEA,0CACC,aAAc,CACd,iBACD,CAGA,6GAGC,YACD,CAGC,mGAGC,kDAAmD,CADnD,+CAED,CAEA,iDACC,iDACD,CAEA,kDACC,gDACD,CAUC,0lBAGC,qDAKD,CAHC,8nBACC,YACD,CAKD,oVAGC,2DACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-image-style-spacing: 1.5em;\n\t--ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);\n}\n\n.ck-content {\n\t/* Provides a minimal side margin for the left and right aligned images, so that the user has a visual feedback\n\tconfirming successful application of the style if image width exceeds the editor's size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9342 */\n\t& .image-style-block-align-left,\n\t& .image-style-block-align-right {\n\t\tmax-width: calc(100% - var(--ck-image-style-spacing));\n\t}\n\n\t/* Allows displaying multiple floating images in the same line.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9183#issuecomment-804988132 */\n\t& .image-style-align-left,\n\t& .image-style-align-right {\n\t\tclear: none;\n\t}\n\n\t& .image-style-side {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t\tmax-width: 50%;\n\t}\n\n\t& .image-style-align-left {\n\t\tfloat: left;\n\t\tmargin-right: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-align-center {\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\n\t}\n\n\t& .image-style-align-right {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-block-align-right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\n\t& .image-style-block-align-left {\n\t\tmargin-left: 0;\n\t\tmargin-right: auto;\n\t}\n\n\t/* Simulates margin collapsing with the preceding paragraph, which does not work for the floating elements. */\n\t& p + .image-style-align-left,\n\t& p + .image-style-align-right,\n\t& p + .image-style-side {\n\t\tmargin-top: 0;\n\t}\n\n\t& .image-inline {\n\t\t&.image-style-align-left,\n\t\t&.image-style-align-right {\n\t\t\tmargin-top: var(--ck-inline-image-style-spacing);\n\t\t\tmargin-bottom: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-left {\n\t\t\tmargin-right: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-right {\n\t\t\tmargin-left: var(--ck-inline-image-style-spacing);\n\t\t}\n\t}\n}\n\n.ck.ck-splitbutton {\n\t/* The button should display as a regular drop-down if the action button\n\tis forced to fire the same action as the arrow button. */\n\t&.ck-splitbutton_flatten {\n\t\t&:hover,\n\t\t&.ck-splitbutton_open {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-background);\n\n\t\t\t\t&::after {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.ck-splitbutton_open:hover {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-hover-background);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},9899:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{animation-delay:0ms,3s;animation-duration:.5s,.5s;animation-fill-mode:forwards,forwards;animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;background:var(--ck-color-image-upload-icon-background);font-size:calc(1px*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));opacity:0;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{animation-delay:.5s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:ck-upload-complete-icon-check;border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);box-sizing:border-box;height:0;left:25%;opacity:0;top:50%;transform:scaleX(-1) rotate(135deg);transform-origin:left top;width:0}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{height:0;opacity:1;width:0}33%{height:0;width:.3em}to{height:.45em;opacity:1;width:.3em}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageuploadicon.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadicon.css"],names:[],mappings:"AAKA,+BAUC,iBAAkB,CATlB,aAAc,CACd,iBAAkB,CAOlB,sCAAwC,CADxC,oCAAsC,CAGtC,SAMD,CAJC,qCACC,UAAW,CACX,iBACD,CChBD,MACC,iCAA8C,CAC9C,+CAA4D,CAG5D,8BAA+B,CAC/B,gCAAiC,CACjC,4DACD,CAEA,+BAWC,sBAA4B,CAN5B,0BAAgC,CADhC,qCAAuC,CADvC,wEAA0E,CAD1E,uDAAwD,CAMxD,oDAAuD,CAWvD,oFAAuF,CAlBvF,SAAU,CAgBV,eAAgB,CAChB,mFA0BD,CAtBC,qCAgBC,mBAAsB,CADtB,sBAAyB,CAEzB,4BAA6B,CAH7B,4CAA6C,CAF7C,sFAAuF,CADvF,oFAAqF,CASrF,qBAAsB,CAdtB,QAAS,CAJT,QAAS,CAGT,SAAU,CADV,OAAQ,CAKR,mCAAoC,CACpC,yBAA0B,CAH1B,OAcD,CAGD,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,yCACC,GAGC,QAAS,CAFT,SAAU,CACV,OAED,CACA,IAEC,QAAS,CADT,UAED,CACA,GAGC,YAAc,CAFd,SAAU,CACV,UAED,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-image-upload-complete-icon {\n\tdisplay: block;\n\tposition: absolute;\n\n\t/*\n\t * Smaller images should have the icon closer to the border.\n\t * Match the icon position with the linked image indicator brought by the link image feature.\n\t */\n\ttop: min(var(--ck-spacing-medium), 6%);\n\tright: min(var(--ck-spacing-medium), 6%);\n\tborder-radius: 50%;\n\tz-index: 1;\n\n\t&::after {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t}\n}\n','/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-upload-icon: hsl(0, 0%, 100%);\n\t--ck-color-image-upload-icon-background: hsl(120, 100%, 27%);\n\n\t/* Match the icon size with the linked image indicator brought by the link image feature. */\n\t--ck-image-upload-icon-size: 20;\n\t--ck-image-upload-icon-width: 2px;\n\t--ck-image-upload-icon-is-visible: clamp(0px, 100% - 50px, 1px);\n}\n\n.ck-image-upload-complete-icon {\n\topacity: 0;\n\tbackground: var(--ck-color-image-upload-icon-background);\n\tanimation-name: ck-upload-complete-icon-show, ck-upload-complete-icon-hide;\n\tanimation-fill-mode: forwards, forwards;\n\tanimation-duration: 500ms, 500ms;\n\n\t/* To make animation scalable. */\n\tfont-size: calc(1px * var(--ck-image-upload-icon-size));\n\n\t/* Hide completed upload icon after 3 seconds. */\n\tanimation-delay: 0ms, 3000ms;\n\n\t/*\n\t * Use CSS math to simulate container queries.\n\t * https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\n\t */\n\toverflow: hidden;\n\twidth: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\theight: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\n\t/* This is check icon element made from border-width mixed with animations. */\n\t&::after {\n\t\t/* Because of border transformation we need to "hard code" left position. */\n\t\tleft: 25%;\n\n\t\ttop: 50%;\n\t\topacity: 0;\n\t\theight: 0;\n\t\twidth: 0;\n\n\t\ttransform: scaleX(-1) rotate(135deg);\n\t\ttransform-origin: left top;\n\t\tborder-top: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\t\tborder-right: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\n\t\tanimation-name: ck-upload-complete-icon-check;\n\t\tanimation-duration: 500ms;\n\t\tanimation-delay: 500ms;\n\t\tanimation-fill-mode: forwards;\n\n\t\t/* #1095. While reset is not providing proper box-sizing for pseudoelements, we need to handle it. */\n\t\tbox-sizing: border-box;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-show {\n\tfrom {\n\t\topacity: 0;\n\t}\n\n\tto {\n\t\topacity: 1;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-hide {\n\tfrom {\n\t\topacity: 1;\n\t}\n\n\tto {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-check {\n\t0% {\n\t\topacity: 1;\n\t\twidth: 0;\n\t\theight: 0;\n\t}\n\t33% {\n\t\twidth: 0.3em;\n\t\theight: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t\twidth: 0.3em;\n\t\theight: 0.45em;\n\t}\n}\n'],sourceRoot:""}]);const a=s},9825:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,'.ck .ck-upload-placeholder-loader{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{margin:0;width:100%}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{height:100%;width:100%}.ck .ck-upload-placeholder-loader:before{animation:ck-upload-placeholder-loader 1s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:3px solid var(--ck-color-upload-placeholder-loader);height:var(--ck-upload-placeholder-loader-size);width:var(--ck-upload-placeholder-loader-size)}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageuploadloader.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadloader.css"],names:[],mappings:"AAKA,kCAGC,kBAAmB,CADnB,YAAa,CAEb,sBAAuB,CAEvB,MAAO,CALP,iBAAkB,CAIlB,KAOD,CAJC,yCACC,UAAW,CACX,iBACD,CCXD,MACC,4CAAqD,CACrD,wCAAyC,CACzC,8CACD,CAEA,iCAGC,QAAS,CADT,UAgBD,CAbC,8CACC,sGACD,CAEA,qCAOC,4DACD,CAGD,kCAEC,WAAY,CADZ,UAWD,CARC,yCAMC,yDAA0D,CAH1D,iBAAkB,CAElB,kCAAmC,CADnC,8DAA+D,CAF/D,+CAAgD,CADhD,8CAMD,CAGD,wCACC,GACC,uBACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-upload-placeholder-loader {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttop: 0;\n\tleft: 0;\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-upload-placeholder-loader: hsl(0, 0%, 70%);\n\t--ck-upload-placeholder-loader-size: 32px;\n\t--ck-upload-placeholder-image-aspect-ratio: 2.8;\n}\n\n.ck .ck-image-upload-placeholder {\n\t/* We need to control the full width of the SVG gray background. */\n\twidth: 100%;\n\tmargin: 0;\n\n\t&.image-inline {\n\t\twidth: calc( 2 * var(--ck-upload-placeholder-loader-size) * var(--ck-upload-placeholder-image-aspect-ratio) );\n\t}\n\n\t& img {\n\t\t/*\n\t\t * This is an arbitrary aspect for a 1x1 px GIF to display to the user. Not too tall, not too short.\n\t\t * There's nothing special about this number except that it should make the image placeholder look like\n\t\t * a real image during this short period after the upload started and before the image was read from the\n\t\t * file system (and a rich preview was loaded).\n\t\t */\n\t\taspect-ratio: var(--ck-upload-placeholder-image-aspect-ratio);\n\t}\n}\n\n.ck .ck-upload-placeholder-loader {\n\twidth: 100%;\n\theight: 100%;\n\n\t&::before {\n\t\twidth: var(--ck-upload-placeholder-loader-size);\n\t\theight: var(--ck-upload-placeholder-loader-size);\n\t\tborder-radius: 50%;\n\t\tborder-top: 3px solid var(--ck-color-upload-placeholder-loader);\n\t\tborder-right: 2px solid transparent;\n\t\tanimation: ck-upload-placeholder-loader 1s linear infinite;\n\t}\n}\n\n@keyframes ck-upload-placeholder-loader {\n\tto {\n\t\ttransform: rotate( 360deg );\n\t}\n}\n"],sourceRoot:""}]);const a=s},5870:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{background:var(--ck-color-upload-bar-background);height:2px;transition:width .1s;width:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageuploadprogress.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadprogress.css"],names:[],mappings:"AAMC,qEAEC,iBACD,CAGA,uGAIC,MAAO,CAFP,iBAAkB,CAClB,KAED,CCRC,yFACC,oBACD,CAID,uGAIC,gDAAiD,CAFjD,UAAW,CAGX,oBAAuB,CAFvB,OAGD,CAGD,kBACC,GAAO,SAAY,CACnB,GAAO,SAAY,CACpB",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\tposition: relative;\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\t/* Showing animation. */\n\t\t&.ck-appear {\n\t\t\tanimation: fadeIn 700ms;\n\t\t}\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\theight: 2px;\n\t\twidth: 0;\n\t\tbackground: var(--ck-color-upload-bar-background);\n\t\ttransition: width 100ms;\n\t}\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n"],sourceRoot:""}]);const a=s},6831:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/textalternativeform.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,6BACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,oDACC,oBACD,CAEA,uCACC,YACD,CCZA,oCDCD,6BAcE,cAUF,CARE,oDACC,eACD,CAEA,wCACC,cACD,CCrBD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-text-alternative-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-labeled-field-view {\n\t\tdisplay: inline-block;\n\t}\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},399:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/link.css"],names:[],mappings:"AAMA,sBACC,mDAMD,CAHC,wCACC,yFACD,CAOD,4BACC,8CACD,CAGA,sCAEC,gDAAiD,CADjD,WAAY,CAEZ,iBAAkB,CAClB,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Class added to span element surrounding currently selected link. */\n.ck .ck-link_selected {\n\tbackground: var(--ck-color-link-selected-background);\n\n\t/* Give linked inline images some outline to let the user know they are also part of the link. */\n\t& span.image-inline {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background);\n\t}\n}\n\n/*\n * Classes used by the "fake visual selection" displayed in the content when an input\n * in the link UI has focus (the browser does not render the native selection in this state).\n */\n.ck .ck-fake-link-selection {\n\tbackground: var(--ck-color-link-fake-selection);\n}\n\n/* A collapsed fake visual selection. */\n.ck .ck-fake-link-selection_collapsed {\n\theight: 100%;\n\tborder-right: 1px solid var(--ck-color-base-text);\n\tmargin-right: -1px;\n\toutline: solid 1px hsla(0, 0%, 100%, .5);\n}\n'],sourceRoot:""}]);const a=s},9465:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-link/theme/linkactions.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkactions.css"],names:[],mappings:"AAOA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,8CACC,oBAKD,CAHC,gEACC,eACD,CCXD,oCDCD,oBAcE,cAUF,CARE,8CACC,eACD,CAEA,8DACC,cACD,CCrBD,CCIA,wDACC,cAAe,CACf,eAmCD,CAjCC,0EAEC,kCAAmC,CAEnC,cAAe,CAIf,+BAAgC,CAChC,aAAc,CARd,kCAAmC,CASnC,iBAAkB,CAPlB,sBAYD,CAHC,gFACC,yBACD,CAGD,mPAIC,eACD,CAEA,+DACC,eACD,CAGC,gFACC,yBACD,CAWD,qHACC,sCACD,CDtDD,oCC0DC,wDACC,8DAMD,CAJC,0EAEC,cAAe,CADf,WAED,CAGD,gJAME,aAEF,CDzED",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-link-actions__preview {\n\t\tdisplay: inline-block;\n\n\t\t& .ck-button__label {\n\t\t\toverflow: hidden;\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-link-actions__preview {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\t& .ck-button.ck-link-actions__preview {\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\n\t\t& .ck-button__label {\n\t\t\tpadding: 0 var(--ck-spacing-medium);\n\t\t\tcolor: var(--ck-color-link-default);\n\t\t\ttext-overflow: ellipsis;\n\t\t\tcursor: pointer;\n\n\t\t\t/* Match the box model of the link editor form\'s input so the balloon\n\t\t\tdoes not change width when moving between actions and the form. */\n\t\t\tmax-width: var(--ck-input-width);\n\t\t\tmin-width: 3em;\n\t\t\ttext-align: center;\n\n\t\t\t&:hover {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\n\t\t&,\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&:focus {\n\t\t\t& .ck-button__label {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-button:not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-button:not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\t& .ck-button.ck-link-actions__preview {\n\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\n\t\t\t& .ck-button__label {\n\t\t\t\tmin-width: 0;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},4827:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical>.ck-button{border-radius:0;margin:0;padding:var(--ck-spacing-standard);width:50%}.ck.ck-link-form_layout-vertical>.ck-button:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form_layout-vertical>.ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-link/theme/linkform.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkform.css"],names:[],mappings:"AAOA,iBACC,YAiBD,CAfC,2BACC,YACD,CCNA,oCDCD,iBAQE,cAUF,CARE,wCACC,eACD,CAEA,4BACC,cACD,CCfD,CDuBD,iCACC,aAYD,CALE,wHAEC,mCACD,CE/BF,iCAEC,+BAAgC,CADhC,SAgDD,CA7CC,wDACC,8EAMD,CAJC,uEACC,WAAY,CACZ,UACD,CAGD,4CAIC,eAAgB,CAFhB,QAAS,CADT,kCAAmC,CAEnC,SAkBD,CAfC,wDACC,gDACD,CARD,4GAeE,aAMF,CAJE,mEACC,kDACD,CAKF,6CACC,yDAUD,CARC,wEACC,SAAU,CACV,UAKD,CAHC,8EACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-form {\n\tdisplay: flex;\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tdisplay: block;\n\n\t/*\n\t * Whether the form is in the responsive mode or not, if there are decorator buttons\n\t * keep the top margin of action buttons medium.\n\t */\n\t& .ck-button {\n\t\t&.ck-button-save,\n\t\t&.ck-button-cancel {\n\t\t\tmargin-top: var(--ck-spacing-medium);\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tpadding: 0;\n\tmin-width: var(--ck-input-width);\n\n\t& .ck-labeled-field-view {\n\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small);\n\n\t\t& .ck-input-text {\n\t\t\tmin-width: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t}\n\n\t& > .ck-button {\n\t\tpadding: var(--ck-spacing-standard);\n\t\tmargin: 0;\n\t\twidth: 50%;\n\t\tborder-radius: 0;\n\n\t\t&:not(:focus) {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: 0;\n\n\t\t\t&:last-of-type {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Using additional `.ck` class for stronger CSS specificity than `.ck.ck-link-form > :not(:first-child)`. */\n\t& .ck.ck-list {\n\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-large);\n\n\t\t& .ck-button.ck-switchbutton {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\n\t\t\t&:hover {\n\t\t\t\tbackground: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},3858:(e,t,o)=>{"use strict";o.d(t,{Z:()=>h});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i),a=o(1667),l=o.n(a),c=new URL(o(8491),o.b),d=s()(r()),u=l()(c);d.push([e.id,".ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}:root{--ck-link-image-indicator-icon-size:20;--ck-link-image-indicator-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{background-color:rgba(0,0,0,.4);background-image:url("+u+');background-position:50%;background-repeat:no-repeat;background-size:14px;border-radius:100%;content:"";height:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size));overflow:hidden;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);width:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size))}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-link/theme/linkimage.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkimage.css"],names:[],mappings:"AASE,+FACC,aAAc,CACd,iBACD,CCPF,MAEC,sCAAuC,CACvC,oEACD,CAME,+FAUC,+BAAqC,CACrC,wDAA+3B,CAG/3B,uBAA2B,CAD3B,2BAA4B,CAD5B,oBAAqB,CAGrB,kBAAmB,CAdnB,UAAW,CAsBX,oGAAuG,CAFvG,eAAgB,CAbhB,sCAAwC,CADxC,oCAAsC,CAetC,mGAED",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t/* Linked image indicator */\n\t& figure.image > a,\n\t& a span.image-inline {\n\t\t&::after {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* Match the icon size with the upload indicator brought by the image upload feature. */\n\t--ck-link-image-indicator-icon-size: 20;\n\t--ck-link-image-indicator-icon-is-visible: clamp(0px, 100% - 50px, 1px);\n}\n\n.ck.ck-editor__editable {\n\t/* Linked image indicator */\n\t& figure.image > a,\n\t& a span.image-inline {\n\t\t&::after {\n\t\t\tcontent: "";\n\n\t\t\t/*\n\t\t\t * Smaller images should have the icon closer to the border.\n\t\t\t * Match the icon position with the upload indicator brought by the image upload feature.\n\t\t\t */\n\t\t\ttop: min(var(--ck-spacing-medium), 6%);\n\t\t\tright: min(var(--ck-spacing-medium), 6%);\n\n\t\t\tbackground-color: hsla(0, 0%, 0%, .4);\n\t\t\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+");\n\t\t\tbackground-size: 14px;\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-position: center;\n\t\t\tborder-radius: 100%;\n\n\t\t\t/*\n\t\t\t* Use CSS math to simulate container queries.\n\t\t\t* https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\n\t\t\t*/\n\t\t\toverflow: hidden;\n\t\t\twidth: calc(var(--ck-link-image-indicator-icon-is-visible) * var(--ck-link-image-indicator-icon-size));\n\t\t\theight: calc(var(--ck-link-image-indicator-icon-is-visible) * var(--ck-link-image-indicator-icon-size));\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]);const h=d},3195:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:0 var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-list/theme/collapsible.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-list/collapsible.css"],names:[],mappings:"AAMC,sEACC,YACD,CCHD,MACC,yDACD,CAGC,iCAIC,eAAgB,CAChB,aAAc,CAHd,eAAiB,CACjB,wDAAyD,CAFzD,UAoBD,CAdC,uCACC,sBACD,CAEA,wIACC,sBAAuB,CACvB,wBAAyB,CACzB,eACD,CAEA,0CACC,qCAAsC,CACtC,sCACD,CAGD,6CACC,yDACD,CAGC,mEACC,wBACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-collapsible.ck-collapsible_collapsed {\n\t& > .ck-collapsible__children {\n\t\tdisplay: none;\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-collapsible-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-collapsible {\n\t& > .ck.ck-button {\n\t\twidth: 100%;\n\t\tfont-weight: bold;\n\t\tpadding: var(--ck-spacing-medium) var(--ck-spacing-large);\n\t\tborder-radius: 0;\n\t\tcolor: inherit;\n\n\t\t&:focus {\n\t\t\tbackground: transparent;\n\t\t}\n\n\t\t&:active, &:not(:focus), &:hover:not(:focus) {\n\t\t\tbackground: transparent;\n\t\t\tborder-color: transparent;\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t& > .ck-icon {\n\t\t\tmargin-right: var(--ck-spacing-medium);\n\t\t\twidth: var(--ck-collapsible-arrow-size);\n\t\t}\n\t}\n\n\t& > .ck-collapsible__children {\n\t\tpadding: 0 var(--ck-spacing-large) var(--ck-spacing-large);\n\t}\n\n\t&.ck-collapsible_collapsed {\n\t\t& > .ck.ck-button .ck-icon {\n\t\t\ttransform: rotate(-90deg);\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},8676:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-list/theme/documentlist.css"],names:[],mappings:"AAKA,8CACC,aACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-editor__editable .ck-list-bogus-paragraph {\n\tdisplay: block;\n}\n"],sourceRoot:""}]);const a=s},9989:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:disc}.ck-content ul ul{list-style-type:circle}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-list/theme/list.css"],names:[],mappings:"AAKA,eACC,uBAiBD,CAfC,kBACC,2BAaD,CAXC,qBACC,2BASD,CAPC,wBACC,2BAKD,CAHC,2BACC,2BACD,CAMJ,eACC,oBAaD,CAXC,kBACC,sBASD,CAJE,6CACC,sBACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content ol {\n\tlist-style-type: decimal;\n\n\t& ol {\n\t\tlist-style-type: lower-latin;\n\n\t\t& ol {\n\t\t\tlist-style-type: lower-roman;\n\n\t\t\t& ol {\n\t\t\t\tlist-style-type: upper-latin;\n\n\t\t\t\t& ol {\n\t\t\t\t\tlist-style-type: upper-roman;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck-content ul {\n\tlist-style-type: disc;\n\n\t& ul {\n\t\tlist-style-type: circle;\n\n\t\t& ul {\n\t\t\tlist-style-type: square;\n\n\t\t\t& ul {\n\t\t\t\tlist-style-type: square;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},7133:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-list/listproperties.css"],names:[],mappings:"AAOC,yDACC,+BASD,CAPC,2DACC,cAKD,CAHC,6DACC,qCACD,CASD,wFACC,oCACD,CAGA,mFACC,gDAWD,CARE,+GACC,UAKD,CAHC,iHACC,qCACD,CAMJ,8EACC,cAAe,CACf,UACD,CAEA,uEACC,sBAAuB,CAGvB,6CAAgD,CAFhD,cAAe,CACf,eAQD,CALC,2JAGC,eAAgB,CADhB,wBAAyB,CADzB,eAGD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-properties {\n\t/* When there are no list styles and there is no collapsible. */\n\t&.ck-list-properties_without-styles {\n\t\tpadding: var(--ck-spacing-large);\n\n\t\t& > * {\n\t\t\tmin-width: 14em;\n\n\t\t\t& + * {\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * When the numbered list property fields (start at, reversed) should be displayed,\n\t * more horizontal space is needed. Reconfigure the style grid to create that space.\n\t */\n\t&.ck-list-properties_with-numbered-properties {\n\t\t& > .ck-list-styles-list {\n\t\t\tgrid-template-columns: repeat( 4, auto );\n\t\t}\n\n\t\t/* When list styles are rendered and property fields are in a collapsible. */\n\t\t& > .ck-collapsible {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\n\t\t\t& > .ck-collapsible__children {\n\t\t\t\t& > * {\n\t\t\t\t\twidth: 100%;\n\n\t\t\t\t\t& + * {\n\t\t\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-numbered-list-properties__start-index .ck-input {\n\t\tmin-width: auto;\n\t\twidth: 100%;\n\t}\n\n\t& .ck.ck-numbered-list-properties__reversed-order {\n\t\tbackground: transparent;\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t\tmargin-bottom: calc(-1 * var(--ck-spacing-tiny));\n\n\t\t&:active, &:hover {\n\t\t\tbox-shadow: none;\n\t\t\tborder-color: transparent;\n\t\t\tbackground: none;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},4553:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-list/theme/liststyles.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-list/liststyles.css"],names:[],mappings:"AAKA,wBACC,YACD,CCFA,MACC,gCACD,CAEA,wBAGC,mCAAoC,CAFpC,oCAAwC,CAGxC,+BAAgC,CAFhC,gCA4BD,CAxBC,mCAiBC,sBAAuB,CAPvB,QAAS,CANT,SAmBD,CAJC,+EAhBA,uCAAwC,CADxC,sCAoBA",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-styles-list {\n\tdisplay: grid;\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-list-style-button-size: 44px;\n}\n\n.ck.ck-list-styles-list {\n\tgrid-template-columns: repeat( 3, auto );\n\trow-gap: var(--ck-spacing-medium);\n\tcolumn-gap: var(--ck-spacing-medium);\n\tpadding: var(--ck-spacing-large);\n\n\t& .ck-button {\n\t\t/* Make the button look like a thumbnail (the icon "takes it all"). */\n\t\twidth: var(--ck-list-style-button-size);\n\t\theight: var(--ck-list-style-button-size);\n\t\tpadding: 0;\n\n\t\t/*\n\t\t * Buttons are aligned by the grid so disable default button margins to not collide with the\n\t\t * gaps in the grid.\n\t\t */\n\t\tmargin: 0;\n\n\t\t/*\n\t\t * Make sure the button border (which is displayed on focus, BTW) does not steal pixels\n\t\t * from the button dimensions and, as a result, decrease the size of the icon\n\t\t * (which becomes blurry as it scales down).\n\t\t */\n\t\tbox-sizing: content-box;\n\n\t\t& .ck-icon {\n\t\t\twidth: var(--ck-list-style-button-size);\n\t\t\theight: var(--ck-list-style-button-size);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},1588:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out;width:100%}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-list/theme/todolist.css"],names:[],mappings:"AAKA,MACC,kCACD,CAEA,uBACC,eA0ED,CAxEC,0BACC,iBAKD,CAHC,qCACC,cACD,CAIA,+CACC,uBAAwB,CAQxB,QAAS,CAPT,oBAAqB,CAGrB,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,wCAqDD,CAxCC,sDAOC,qBAAiC,CACjC,iBAAkB,CALlB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,0FAAgG,CAJhG,UAKD,CAEA,qDAaC,wBAAyB,CADzB,kBAAmB,CAEnB,sGAA+G,CAX/G,sBAAuB,CAEvB,UAAW,CAJX,aAAc,CAUd,mDAAwD,CAHxD,+CAAoD,CAJpD,mBAAoB,CAFpB,iBAAkB,CAOlB,gDAAqD,CAMrD,uBAAwB,CALxB,kDAMD,CAGC,+DACC,kBAA8B,CAC9B,oBACD,CAEA,8DACC,iBACD,CAIF,wEACC,qBACD,CAKF,6CACC,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAED,CAMA,wDACC,cAKD,CAHC,qEACC,mCACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-todo-list-checkmark-size: 16px;\n}\n\n.ck-content .todo-list {\n\tlist-style: none;\n\n\t& li {\n\t\tmargin-bottom: 5px;\n\n\t\t& .todo-list {\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n\n\t& .todo-list__label {\n\t\t& > input {\n\t\t\t-webkit-appearance: none;\n\t\t\tdisplay: inline-block;\n\t\t\tposition: relative;\n\t\t\twidth: var(--ck-todo-list-checkmark-size);\n\t\t\theight: var(--ck-todo-list-checkmark-size);\n\t\t\tvertical-align: middle;\n\n\t\t\t/* Needed on iOS */\n\t\t\tborder: 0;\n\n\t\t\t/* LTR styles */\n\t\t\tleft: -25px;\n\t\t\tmargin-right: -15px;\n\t\t\tright: 0;\n\t\t\tmargin-left: 0;\n\n\t\t\t&::before {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tcontent: '';\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 1px solid hsl(0, 0%, 20%);\n\t\t\t\tborder-radius: 2px;\n\t\t\t\ttransition: 250ms ease-in-out box-shadow, 250ms ease-in-out background, 250ms ease-in-out border;\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tbox-sizing: content-box;\n\t\t\t\tpointer-events: none;\n\t\t\t\tcontent: '';\n\n\t\t\t\t/* Calculate tick position, size and border-width proportional to the checkmark size. */\n\t\t\t\tleft: calc( var(--ck-todo-list-checkmark-size) / 3 );\n\t\t\t\ttop: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\t\t\twidth: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\t\t\theight: calc( var(--ck-todo-list-checkmark-size) / 2.6 );\n\t\t\t\tborder-style: solid;\n\t\t\t\tborder-color: transparent;\n\t\t\t\tborder-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;\n\t\t\t\ttransform: rotate(45deg);\n\t\t\t}\n\n\t\t\t&[checked] {\n\t\t\t\t&::before {\n\t\t\t\t\tbackground: hsl(126, 64%, 41%);\n\t\t\t\t\tborder-color: hsl(126, 64%, 41%);\n\t\t\t\t}\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-color: hsl(0, 0%, 100%);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& .todo-list__label__description {\n\t\t\tvertical-align: middle;\n\t\t}\n\t}\n}\n\n/* RTL styles */\n[dir=\"rtl\"] .todo-list .todo-list__label > input {\n\tleft: 0;\n\tmargin-right: 0;\n\tright: -25px;\n\tmargin-left: -15px;\n}\n\n/*\n * To-do list should be interactive only during the editing\n * (https://github.com/ckeditor/ckeditor5/issues/2090).\n */\n.ck-editor__editable .todo-list .todo-list__label > input {\n\tcursor: pointer;\n\n\t&:hover::before {\n\t\tbox-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);\n\t}\n}\n"],sourceRoot:""}]);const a=s},7583:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-color-mention-background:rgba(153,0,48,.1);--ck-color-mention-text:#990030}.ck-content .mention{background:var(--ck-color-mention-background);color:var(--ck-color-mention-text)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-mention/mention.css"],names:[],mappings:"AAKA,MACC,+CAAwD,CACxD,+BACD,CAEA,qBACC,6CAA8C,CAC9C,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-mention-background: hsla(341, 100%, 30%, 0.1);\n\t--ck-color-mention-text: hsl(341, 100%, 30%);\n}\n\n.ck-content .mention {\n\tbackground: var(--ck-color-mention-background);\n\tcolor: var(--ck-color-mention-text);\n}\n"],sourceRoot:""}]);const a=s},6391:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-mention-list-max-height:300px}.ck.ck-mentions{max-height:var(--ck-mention-list-max-height);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.ck.ck-mentions>.ck-list__item{flex-shrink:0;overflow:hidden}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-mention/theme/mentionui.css"],names:[],mappings:"AAKA,MACC,kCACD,CAEA,gBACC,4CAA6C,CAM7C,iBAAkB,CAJlB,eAAgB,CAMhB,2BAQD,CAJC,+BAEC,aAAc,CADd,eAED",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-mention-list-max-height: 300px;\n}\n\n.ck.ck-mentions {\n\tmax-height: var(--ck-mention-list-max-height);\n\n\toverflow-y: auto;\n\n\t/* Prevent unnecessary horizontal scrollbar in Safari\n\thttps://github.com/ckeditor/ckeditor5-mention/issues/41 */\n\toverflow-x: hidden;\n\n\toverscroll-behavior: contain;\n\n\t/* Prevent unnecessary vertical scrollbar in Safari\n\thttps://github.com/ckeditor/ckeditor5-mention/issues/41 */\n\t& > .ck-list__item {\n\t\toverflow: hidden;\n\t\tflex-shrink: 0;\n\t}\n}\n"],sourceRoot:""}]);const a=s},4082:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/colorinput.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/colorinput.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,YAAa,CACb,0BAA2B,CAF3B,UAgCD,CA5BC,0CAEC,WAAY,CADZ,cAED,CAEA,sCACC,cAMD,CAHC,kFACC,YACD,CAGD,8CAEC,YAWD,CATC,kFAEC,eAAgB,CADhB,iBAOD,CAJC,0IAEC,aAAc,CADd,iBAED,CC1BF,+CAGE,4BAA6B,CAD7B,yBAcF,CAhBA,+CAQE,2BAA4B,CAD5B,wBASF,CAHC,2CACC,SACD,CAIA,wEACC,SA0CD,CA3CA,kFAKE,2BAA4B,CAD5B,wBAuCF,CApCE,8FACC,iCACD,CATF,kFAcE,4BAA6B,CAD7B,yBA8BF,CA3BE,8FACC,kCACD,CAGD,oFACC,oDACD,CAEA,4GC1CF,eD2DE,CAjBA,+PCtCD,qCDuDC,CAjBA,4GAKC,6CAA8C,CAD9C,WAAY,CADZ,UAcD,CAVC,oKAKC,cAA6B,CAC7B,iBAAkB,CAHlB,WAAY,CADZ,QAAS,CADT,QAAS,CAMT,uBAAwB,CACxB,oBAAqB,CAJrB,QAKD,CAKH,oDAIC,2BAA4B,CAC5B,4BAA6B,CAH7B,qEAAwE,CADxE,UA0BD,CApBC,gEACC,oDACD,CATD,8DAYE,yBAeF,CA3BA,8DAgBE,wBAWF,CARC,gEACC,uCAMD,CAPA,0EAKE,sCAAuC,CADvC,cAGF",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-input-color {\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: row-reverse;\n\n\t& > input.ck.ck-input-text {\n\t\tmin-width: auto;\n\t\tflex-grow: 1;\n\t}\n\n\t& > div.ck.ck-dropdown {\n\t\tmin-width: auto;\n\n\t\t/* This dropdown has no arrow but a color preview instead. */\n\t\t& > .ck-input-color__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck.ck-input-color__button {\n\t\t/* Resolving issue with misaligned buttons on Safari (see #10589) */\n\t\tdisplay: flex;\n\n\t\t& .ck.ck-input-color__button__preview {\n\t\t\tposition: relative;\n\t\t\toverflow: hidden;\n\n\t\t\t& > .ck.ck-input-color__button__preview__no-color-indicator {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_rounded.css";\n\n.ck.ck-input-color {\n\t& > .ck.ck-input-text {\n\t\t@mixin ck-dir ltr {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\n\t\t/* Make sure the focused input is always on top of the dropdown button so its\n\t\t outline and border are never cropped (also when the input is read-only). */\n\t\t&:focus {\n\t\t\tz-index: 0;\n\t\t}\n\t}\n\n\t& > .ck.ck-dropdown {\n\t\t& > .ck.ck-button.ck-input-color__button {\n\t\t\tpadding: 0;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\n\t\t\t\t&:not(:focus) {\n\t\t\t\t\tborder-left: 1px solid transparent;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\n\t\t\t\t&:not(:focus) {\n\t\t\t\t\tborder-right: 1px solid transparent;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.ck-disabled {\n\t\t\t\tbackground: var(--ck-color-input-disabled-background);\n\t\t\t}\n\n\t\t\t& > .ck.ck-input-color__button__preview {\n\t\t\t\t@mixin ck-rounded-corners;\n\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t\tborder: 1px solid var(--ck-color-input-border);\n\n\t\t\t\t& > .ck.ck-input-color__button__preview__no-color-indicator {\n\t\t\t\t\ttop: -30%;\n\t\t\t\t\tleft: 50%;\n\t\t\t\t\theight: 150%;\n\t\t\t\t\twidth: 8%;\n\t\t\t\t\tbackground: hsl(0, 100%, 50%);\n\t\t\t\t\tborder-radius: 2px;\n\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\ttransform-origin: 50%;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-input-color__remove-color {\n\t\twidth: 100%;\n\t\tpadding: calc(var(--ck-spacing-standard) / 2) var(--ck-spacing-standard);\n\n\t\tborder-bottom-left-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\n\t\t&:not(:focus) {\n\t\t\tborder-bottom: 1px solid var(--ck-color-input-border);\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tborder-top-left-radius: 0;\n\t\t}\n\n\t\t& .ck.ck-icon {\n\t\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: 0;\n\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},4880:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/form.css"],names:[],mappings:"AAKA,YACC,mCAyBD,CAvBC,kBAEC,YACD,CAEA,8BACC,cAAe,CACf,OACD,CAEA,4BACC,cAWD,CARE,6DACC,4CACD,CAEA,mEACC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form {\n\tpadding: 0 0 var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t& .ck.ck-input-text {\n\t\tmin-width: 100%;\n\t\twidth: 0;\n\t}\n\n\t& .ck.ck-dropdown {\n\t\tmin-width: 100%;\n\n\t\t& .ck-dropdown__button {\n\t\t\t&:not(:focus) {\n\t\t\t\tborder: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\n\t\t\t& .ck-button__label {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},9865:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/formrow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/formrow.css"],names:[],mappings:"AAKA,iBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAaD,CAVC,iCACC,WACD,CAGC,wHAEC,sBACD,CCbF,iBACC,4DA2BD,CAvBE,6CAEE,mCAMF,CARA,6CAME,oCAEF,CAGD,2BAEC,cAAe,CADf,UAED,CAEA,2CACC,kCAKD,CAHC,wEACC,0BACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__row {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\tflex-grow: 1;\n\t}\n\n\t&.ck-table-form__action-row {\n\t\t& .ck-button-save,\n\t\t& .ck-button-cancel {\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-form__row {\n\tpadding: var(--ck-spacing-standard) var(--ck-spacing-large) 0;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\t& + * {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck-label {\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&.ck-table-form__action-row {\n\t\tmargin-top: var(--ck-spacing-large);\n\n\t\t& .ck-button .ck-button__label {\n\t\t\tcolor: var(--ck-color-text);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},8085:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label,.ck[dir=rtl] .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/inserttable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/inserttable.css"],names:[],mappings:"AAKA,oCACC,YAAa,CACb,kBAAmB,CACnB,cACD,CCJA,MACC,uCAAwC,CACxC,0CAA2C,CAC3C,yCAA0C,CAC1C,yCACD,CAEA,oCAGC,yFAA0F,CAD1F,oJAED,CAEA,mFAEC,iBACD,CAEA,uCAIC,4CAA6C,CAC7C,iBAAkB,CAFlB,iDAAkD,CADlD,qDAAsD,CADtD,mDAAoD,CAKpD,YAAa,CACb,eAUD,CARC,6CACC,eACD,CAEA,6CAEC,6CAA8C,CAD9C,yCAED",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-insert-table-dropdown__grid {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-insert-table-dropdown-padding: 10px;\n\t--ck-insert-table-dropdown-box-height: 11px;\n\t--ck-insert-table-dropdown-box-width: 12px;\n\t--ck-insert-table-dropdown-box-margin: 1px;\n}\n\n.ck .ck-insert-table-dropdown__grid {\n\t/* The width of a container should match 10 items in a row so there will be a 10x10 grid. */\n\twidth: calc(var(--ck-insert-table-dropdown-box-width) * 10 + var(--ck-insert-table-dropdown-box-margin) * 20 + var(--ck-insert-table-dropdown-padding) * 2);\n\tpadding: var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;\n}\n\n.ck .ck-insert-table-dropdown__label,\n.ck[dir=rtl] .ck-insert-table-dropdown__label {\n\ttext-align: center;\n}\n\n.ck .ck-insert-table-dropdown-grid-box {\n\tmin-width: var(--ck-insert-table-dropdown-box-width);\n\tmin-height: var(--ck-insert-table-dropdown-box-height);\n\tmargin: var(--ck-insert-table-dropdown-box-margin);\n\tborder: 1px solid var(--ck-color-base-border);\n\tborder-radius: 1px;\n\toutline: none;\n\ttransition: none;\n\n\t&:focus {\n\t\tbox-shadow: none;\n\t}\n\n\t&.ck-on {\n\t\tborder-color: var(--ck-color-focus-border);\n\t\tbackground: var(--ck-color-focus-outer-shadow);\n\t}\n}\n\n"],sourceRoot:""}]);const a=s},4104:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/table.css"],names:[],mappings:"AAKA,mBAKC,aAAc,CADd,gBAiCD,CA9BC,yBAYC,yBAAkC,CAVlC,wBAAyB,CACzB,gBAAiB,CAKjB,WAAY,CADZ,UAsBD,CAfC,wDAQC,wBAAiC,CANjC,aAAc,CACd,YAMD,CAEA,4BAEC,0BAA+B,CAD/B,eAED,CAMF,+BACC,gBACD,CAEA,+BACC,eACD,CAEA,+CAKC,oBAAqB,CAMrB,UACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .table {\n\t/* Give the table widget some air and center it horizontally */\n\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\tmargin: 0.9em auto;\n\tdisplay: table;\n\n\t& table {\n\t\t/* The table cells should have slight borders */\n\t\tborder-collapse: collapse;\n\t\tborder-spacing: 0;\n\n\t\t/* Table width and height are set on the parent
. Make sure the table inside stretches\n\t\tto the full dimensions of the container (https://github.com/ckeditor/ckeditor5/issues/6186). */\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t/* The outer border of the table should be slightly darker than the inner lines.\n\t\tAlso see https://github.com/ckeditor/ckeditor5-table/issues/50. */\n\t\tborder: 1px double hsl(0, 0%, 70%);\n\n\t\t& td,\n\t\t& th {\n\t\t\tmin-width: 2em;\n\t\t\tpadding: .4em;\n\n\t\t\t/* The border is inherited from .ck-editor__nested-editable styles, so theoretically it\'s not necessary here.\n\t\t\tHowever, the border is a content style, so it should use .ck-content (so it works outside the editor).\n\t\t\tHence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */\n\t\t\tborder: 1px solid hsl(0, 0%, 75%);\n\t\t}\n\n\t\t& th {\n\t\t\tfont-weight: bold;\n\t\t\tbackground: hsla(0, 0%, 0%, 5%);\n\t\t}\n\t}\n}\n\n/* Text alignment of the table header should match the editor settings and override the native browser styling,\nwhen content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */\n.ck-content[dir="rtl"] .table th {\n\ttext-align: right;\n}\n\n.ck-content[dir="ltr"] .table th {\n\ttext-align: left;\n}\n\n.ck-editor__editable .ck-table-bogus-paragraph {\n\t/*\n\t * Use display:inline-block to force Chrome/Safari to limit text mutations to this element.\n\t * See https://github.com/ckeditor/ckeditor5/issues/6062.\n\t */\n\tdisplay: inline-block;\n\n\t/*\n\t * Inline HTML elements nested in the span should always be dimensioned in relation to the whole cell width.\n\t * See https://github.com/ckeditor/ckeditor5/issues/9117.\n\t */\n\twidth: 100%;\n}\n'],sourceRoot:""}]);const a=s},9888:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-color-table-caption-background:#f7f7f7;--ck-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-table-caption-background);caption-side:top;color:var(--ck-color-table-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-table-caption-highlighted-background)}to{background-color:var(--ck-color-table-caption-background)}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/tablecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,oDACD,CAGA,8BAMC,yDAA0D,CAJ1D,gBAAiB,CAGjB,wCAAyC,CAJzC,qBAAsB,CAOtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,iBAAkB,CADlB,qBAOD,CAIC,qEACC,iDACD,CAEA,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAGD,sCACC,GACC,qEACD,CAEA,GACC,yDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-table-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-table-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-table-caption-highlighted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .table > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: top;\n\tword-break: break-word;\n\ttext-align: center;\n\tcolor: var(--ck-color-table-caption-text);\n\tbackground-color: var(--ck-color-table-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .table > figcaption {\n\t&.table__caption_highlighted {\n\t\tanimation: ck-table-caption-highlight .6s ease-out;\n\t}\n\n\t&.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the table caption placeholder doesn't overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n@keyframes ck-table-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-table-caption-highlighted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-table-caption-background);\n\t}\n}\n"],sourceRoot:""}]);const a=s},5737:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/tablecellproperties.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tablecellproperties.css"],names:[],mappings:"AAOE,6FACC,cAiBD,CAdE,0HAEC,cACD,CAEA,yHAEC,cACD,CAEA,uHACC,WACD,CClBJ,kCACC,WAkBD,CAfE,2FACC,mBAAoB,CACpB,SAAU,CACV,SACD,CAGC,4GACC,eAAgB,CAGhB,qCACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-cell-properties-form {\n\t& .ck-form__row {\n\t\t&.ck-table-cell-properties-form__alignment-row {\n\t\t\tflex-wrap: wrap;\n\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\t&:first-of-type {\n\t\t\t\t\t/* 4 buttons out of 7 (h-alignment + v-alignment) = 0.57 */\n\t\t\t\t\tflex-grow: 0.57;\n\t\t\t\t}\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\t/* 3 buttons out of 7 (h-alignment + v-alignment) = 0.43 */\n\t\t\t\t\tflex-grow: 0.43;\n\t\t\t\t}\n\n\t\t\t\t& .ck-button {\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-cell-properties-form {\n\twidth: 320px;\n\n\t& .ck-form__row {\n\t\t&.ck-table-cell-properties-form__padding-row {\n\t\t\talign-self: flex-end;\n\t\t\tpadding: 0;\n\t\t\twidth: 25%;\n\t\t}\n\n\t\t&.ck-table-cell-properties-form__alignment-row {\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\tbackground: none;\n\n\t\t\t\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},728:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-color-table-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table table{overflow:hidden}.ck-content .table td,.ck-content .table th{position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:-999999px;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:-999999px;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-table-column-resizer-hover);opacity:.25}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/tablecolumnresize.css"],names:[],mappings:"AAKA,MACC,iEAAkE,CAClE,mCAAoC,CAIpC,iGACD,CAEA,qCACC,kBACD,CAEA,yBACC,eACD,CAEA,4CAEC,iBACD,CAEA,wDAOC,gBAAiB,CAGjB,iBAAkB,CATlB,iBAAkB,CAOlB,oDAAqD,CAFrD,aAAc,CAKd,gBAAiB,CAFjB,0CAA2C,CAG3C,2BACD,CAQA,qJACC,YACD,CAEA,8HAEC,2DAA4D,CAC5D,WACD,CAEA,iEACC,mDAAoD,CACpD,WACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-table-column-resizer-hover: var(--ck-color-base-active);\n\t--ck-table-column-resizer-width: 7px;\n\n\t/* The offset used for absolute positioning of the resizer element, so that it is placed exactly above the cell border.\n\t The value is: minus half the width of the resizer decreased additionaly by the half the width of the border (0.5px). */\n\t--ck-table-column-resizer-position-offset: calc(var(--ck-table-column-resizer-width) * -0.5 - 0.5px);\n}\n\n.ck-content .table .ck-table-resized {\n\ttable-layout: fixed;\n}\n\n.ck-content .table table {\n\toverflow: hidden;\n}\n\n.ck-content .table td,\n.ck-content .table th {\n\tposition: relative;\n}\n\n.ck.ck-editor__editable .table .ck-table-column-resizer {\n\tposition: absolute;\n\t/* The resizer element resides in each cell so to occupy the entire height of the table, which is unknown from a CSS point of view,\n\t it is extended to an extremely high height. Even for screens with a very high pixel density, the resizer will fulfill its role as\n\t it should, i.e. for a screen of 476 ppi the total height of the resizer will take over 350 sheets of A4 format, which is totally\n\t unrealistic height for a single table. */\n\ttop: -999999px;\n\tbottom: -999999px;\n\tright: var(--ck-table-column-resizer-position-offset);\n\twidth: var(--ck-table-column-resizer-width);\n\tcursor: col-resize;\n\tuser-select: none;\n\tz-index: var(--ck-z-default);\n}\n\n.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer {\n\tdisplay: none;\n}\n\n/* The resizer elements, which are extended to an extremely high height, break the drag & drop feature in Chrome. To make it work again,\n all resizers must be hidden while the table is dragged. */\n.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer {\n\tdisplay: none;\n}\n\n.ck.ck-editor__editable .table .ck-table-column-resizer:hover,\n.ck.ck-editor__editable .table .ck-table-column-resizer__active {\n\tbackground-color: var(--ck-color-table-column-resizer-hover);\n\topacity: 0.25;\n}\n\n.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer {\n\tleft: var(--ck-table-column-resizer-position-offset);\n\tright: unset;\n}\n"],sourceRoot:""}]);const a=s},4777:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-color-table-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableediting.css"],names:[],mappings:"AAKA,MACC,6DACD,CAKE,8QAGC,wDAAyD,CAKzD,iBAAkB,CAClB,8CAA+C,CAC/C,mBACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-table-focused-cell-background: hsla(212, 90%, 80%, .3);\n}\n\n.ck-widget.table {\n\t& td,\n\t& th {\n\t\t&.ck-editor__nested-editable.ck-editor__nested-editable_focused,\n\t\t&.ck-editor__nested-editable:focus {\n\t\t\t/* A very slight background to highlight the focused cell */\n\t\t\tbackground: var(--ck-color-table-focused-cell-background);\n\n\t\t\t/* Fixes the problem where surrounding cells cover the focused cell's border.\n\t\t\tIt does not fix the problem in all places but the UX is improved.\n\t\t\tSee https://github.com/ckeditor/ckeditor5-table/issues/29. */\n\t\t\tborder-style: none;\n\t\t\toutline: 1px solid var(--ck-color-focus-border);\n\t\t\toutline-offset: -1px; /* progressive enhancement - no IE support */\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},198:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/tableform.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableform.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAWE,wHACC,cACD,CAEA,8DAEC,kBAAmB,CADnB,cAgBD,CAbC,qFAGC,kBAAmB,CAFnB,YAAa,CACb,6BAMD,CAEA,sMACC,WACD,CAIF,4CAEC,iBAoBD,CAlBC,8EAGC,2DAAgE,CADhE,QAAS,CADT,iBAAkB,CAGlB,8BAA+B,CAG/B,SAUD,CAPC,oFACC,UAAW,CAGX,QAAS,CAFT,iBAAkB,CAClB,wDAA6D,CAE7D,0BACD,CChDH,MACC,0CAA2C,CAC3C,2CACD,CAMI,2FACC,kCAAmC,CACnC,iBACD,CAGD,8KAIC,cAAe,CADf,cAAe,CADf,UAGD,CAGD,8DACC,SAcD,CAZC,yMAEC,QACD,CAEA,iGACC,mBAAoB,CACpB,oBAAqB,CACrB,wCAAyC,CACzC,6CAA8C,CAC9C,gCACD,CAIF,4CACC,sCAyBD,CAvBC,8ECxCD,eDyDC,CAjBA,mMCpCA,qCDqDA,CAjBA,8EAGC,qCAAsC,CACtC,qCAAsC,CAEtC,oDAAqD,CADrD,wDAAyD,CAEzD,iBAUD,CAPC,oFACC,2EAA4E,CAE5E,kBAAmB,CADnB,kJAED,CAdD,8EAgBC,iEACD,CAGA,6GACC,YACD,CAIF,oDACC,GACC,SACD,CAEA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-form {\n\t& .ck-form__row {\n\t\t&.ck-table-form__border-row {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t&.ck-table-form__background-row {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t&.ck-table-form__dimensions-row {\n\t\t\tflex-wrap: wrap;\n\t\t\talign-items: center;\n\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column-reverse;\n\t\t\t\talign-items: center;\n\n\t\t\t\t& .ck.ck-dropdown {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-table-form__dimension-operator {\n\t\t\t\tflex-grow: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-labeled-field-view {\n\t\t/* Allow absolute positioning of the status (error) balloons. */\n\t\tposition: relative;\n\n\t\t& .ck.ck-labeled-field-view__status {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\tbottom: calc( -1 * var(--ck-table-properties-error-arrow-size) );\n\t\t\ttransform: translate(-50%,100%);\n\n\t\t\t/* Make sure the balloon status stays on top of other form elements. */\n\t\t\tz-index: 1;\n\n\t\t\t/* The arrow pointing towards the field. */\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: calc( -1 * var(--ck-table-properties-error-arrow-size) );\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX( -50% );\n\t\t\t}\n\t\t}\n\t}\n}\n','/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_rounded.css";\n\n:root {\n\t--ck-table-properties-error-arrow-size: 6px;\n\t--ck-table-properties-min-error-width: 150px;\n}\n\n.ck.ck-table-form {\n\t& .ck-form__row {\n\t\t&.ck-table-form__border-row {\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\t& > .ck-label {\n\t\t\t\t\tfont-size: var(--ck-font-size-tiny);\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-table-form__border-style,\n\t\t\t& .ck-table-form__border-width {\n\t\t\t\twidth: 80px;\n\t\t\t\tmin-width: 80px;\n\t\t\t\tmax-width: 80px;\n\t\t\t}\n\t\t}\n\n\t\t&.ck-table-form__dimensions-row {\n\t\t\tpadding: 0;\n\n\t\t\t& .ck-table-form__dimensions-row__width,\n\t\t\t& .ck-table-form__dimensions-row__height {\n\t\t\t\tmargin: 0\n\t\t\t}\n\n\t\t\t& .ck-table-form__dimension-operator {\n\t\t\t\talign-self: flex-end;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\theight: var(--ck-ui-component-min-height);\n\t\t\t\tline-height: var(--ck-ui-component-min-height);\n\t\t\t\tmargin: 0 var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-labeled-field-view {\n\t\tpadding-top: var(--ck-spacing-standard);\n\n\t\t& .ck.ck-labeled-field-view__status {\n\t\t\t@mixin ck-rounded-corners;\n\n\t\t\tbackground: var(--ck-color-base-error);\n\t\t\tcolor: var(--ck-color-base-background);\n\t\t\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\n\t\t\tmin-width: var(--ck-table-properties-min-error-width);\n\t\t\ttext-align: center;\n\n\t\t\t/* The arrow pointing towards the field. */\n\t\t\t&::after {\n\t\t\t\tborder-color: transparent transparent var(--ck-color-base-error) transparent;\n\t\t\t\tborder-width: 0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size);\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\n\t\t\tanimation: ck-table-form-labeled-view-status-appear .15s ease both;\n\t\t}\n\n\t\t/* Hide the error balloon when the field is blurred. Makes the experience much more clear. */\n\t\t& .ck-input.ck-error:not(:focus) + .ck.ck-labeled-field-view__status {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n@keyframes ck-table-form-labeled-view-status-appear {\n\t0% {\n\t\topacity: 0;\n\t}\n\n\t100% {\n\t\topacity: 1;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},9221:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/tableproperties.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableproperties.css"],names:[],mappings:"AAOE,mFAGC,sBAAuB,CADvB,YAAa,CADb,cAOD,CAHC,qHACC,gBACD,CCTH,6BACC,WAmBD,CAhBE,mFACC,mBAAoB,CACpB,SAYD,CAVC,kGACC,eAAgB,CAGhB,qCAKD,CAHC,uHACC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-properties-form {\n\t& .ck-form__row {\n\t\t&.ck-table-properties-form__alignment-row {\n\t\t\tflex-wrap: wrap;\n\t\t\tflex-basis: 0;\n\t\t\talign-content: baseline;\n\n\t\t\t& .ck.ck-toolbar .ck-toolbar__items {\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-properties-form {\n\twidth: 320px;\n\n\t& .ck-form__row {\n\t\t&.ck-table-properties-form__alignment-row {\n\t\t\talign-self: flex-end;\n\t\t\tpadding: 0;\n\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\tbackground: none;\n\n\t\t\t\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\n\t\t\t\t& .ck-toolbar__items > * {\n\t\t\t\t\twidth: 40px;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},5593:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableselection.css"],names:[],mappings:"AAKA,MACC,wDACD,CAGC,0IAKC,gBAAiB,CAFjB,uBAAwB,CACxB,aAAc,CAFd,iBAiCD,CA3BC,sJAGC,yDAA0D,CAK1D,QAAS,CAPT,UAAW,CAKX,MAAO,CAJP,mBAAoB,CAEpB,iBAAkB,CAGlB,OAAQ,CAFR,KAID,CAEA,wTAEC,4BACD,CAMA,gKACC,aAKD,CAHC,0NACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-table-selected-cell-background: hsla(208, 90%, 80%, .3);\n}\n\n.ck.ck-editor__editable .table table {\n\t& td.ck-editor__editable_selected,\n\t& th.ck-editor__editable_selected {\n\t\tposition: relative;\n\t\tcaret-color: transparent;\n\t\toutline: unset;\n\t\tbox-shadow: unset;\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/6446 */\n\t\t&:after {\n\t\t\tcontent: '';\n\t\t\tpointer-events: none;\n\t\t\tbackground-color: var(--ck-table-selected-cell-background);\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t}\n\n\t\t& ::selection,\n\t\t&:focus {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t/*\n\t\t * To reduce the amount of noise, all widgets in the table selection have no outline and no selection handle.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9491.\n\t\t */\n\t\t& .ck-widget {\n\t\t\toutline: unset;\n\n\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},4499:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/button.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/button.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/mixins/_button.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAOA,6BAMC,kBAAmB,CADnB,mBAAoB,CAEpB,oBAAqB,CAHrB,iBAAkB,CCFlB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDkBD,CAdC,iEACC,YACD,CAGC,yGACC,oBACD,CAID,iFACC,sBACD,CEjBD,6BCAC,oDD4ID,CCzIE,6EACC,0DACD,CAEA,+EACC,2DACD,CAID,qDACC,6DACD,CDfD,6BEDC,eF6ID,CA5IA,wIEGE,qCFyIF,CA5IA,6BA6BC,uBAAwB,CANxB,4BAA6B,CAjB7B,cAAe,CAcf,iBAAkB,CAHlB,aAAc,CAJd,4CAA6C,CAD7C,2CAA4C,CAJ5C,8BAA+B,CAC/B,iBAAkB,CAiBlB,4DAA8D,CAnB9D,qBAAsB,CAFtB,kBAuID,CA7GC,oFGhCA,2BAA2B,CCF3B,2CAA8B,CDC9B,YHqCA,CAIC,kJAEC,aACD,CAGD,iEAIC,aAAc,CACd,cAAe,CAHf,iBAAkB,CAClB,mBAAoB,CAMpB,qBASD,CAlBA,qFAYE,eAMF,CAlBA,qFAgBE,gBAEF,CAEA,yEACC,aAYD,CAbA,6FAIE,mCASF,CAbA,6FAQE,oCAKF,CAbA,yEAWC,eAAiB,CACjB,UACD,CAIC,oIIrFD,oDJyFC,CAOA,gLKhGD,kCLkGC,CAEA,iGACC,UACD,CAGD,qEACC,yDAcD,CAXC,2HAEE,4CAA+C,CAC/C,oCAOF,CAVA,2HAQE,mCAAoC,CADpC,6CAGF,CAKA,mHACC,WACD,CAID,yCC/HA,+CDmIA,CChIC,yFACC,qDACD,CAEA,2FACC,sDACD,CAID,iEACC,wDACD,CDgHA,yCAGC,qCACD,CAEA,2DACC,iCACD,CAEA,+DACC,mCACD,CAID,2CC/IC,mDDoJD,CCjJE,2FACC,yDACD,CAEA,6FACC,0DACD,CAID,mEACC,4DACD,CDgID,2CAIC,wCACD,CAEA,uCAEC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-unselectable;\n\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: left;\n\n\t& .ck-button__label {\n\t\tdisplay: none;\n\t}\n\n\t&.ck-button_with-text {\n\t\t& .ck-button__label {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t/* Center the icon horizontally in a button without text. */\n\t&:not(.ck-button_with-text) {\n\t\tjustify-content: center;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../mixins/_button.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-button-colors --ck-color-button-default;\n\t@mixin ck-rounded-corners;\n\n\twhite-space: nowrap;\n\tcursor: default;\n\tvertical-align: middle;\n\tpadding: var(--ck-spacing-tiny);\n\ttext-align: center;\n\n\t/* A very important piece of styling. Go to variable declaration to learn more. */\n\tmin-width: var(--ck-ui-component-min-height);\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Normalize the height of the line. Removing this will break consistent height\n\tamong text and text-less buttons (with icons). */\n\tline-height: 1;\n\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t/* Avoid flickering when the foucs border shows up. */\n\tborder: 1px solid transparent;\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .2s ease-in-out, border .2s ease-in-out;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/189 */\n\t-webkit-appearance: none;\n\n\t&:active,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t/* Allow icon coloring using the text "color" property. */\n\t& .ck-button__icon {\n\t\t& use,\n\t\t& use * {\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n\n\t& .ck-button__label {\n\t\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\t\tfont-size: inherit;\n\t\tfont-weight: inherit;\n\t\tcolor: inherit;\n\t\tcursor: inherit;\n\n\t\t/* Must be consistent with .ck-icon\'s vertical align. Otherwise, buttons with and\n\t\twithout labels (but with icons) have different sizes in Chrome */\n\t\tvertical-align: middle;\n\n\t\t@mixin ck-dir ltr {\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttext-align: right;\n\t\t}\n\t}\n\n\t& .ck-button__keystroke {\n\t\tcolor: inherit;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t}\n\n\t\tfont-weight: bold;\n\t\topacity: .7;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t&.ck-disabled {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t/* The disabled button should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t\t& .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t& .ck-button__keystroke {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&.ck-button_with-text {\n\t\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-standard);\n\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-button_with-keystroke {\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__label {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t/* A style of the button which is currently on, e.g. its feature is active. */\n\t&.ck-on {\n\t\t@mixin ck-button-colors --ck-color-button-on;\n\n\t\tcolor: var(--ck-color-button-on-color);\n\t}\n\n\t&.ck-button-save {\n\t\tcolor: var(--ck-color-button-save);\n\t}\n\n\t&.ck-button-cancel {\n\t\tcolor: var(--ck-color-button-cancel);\n\t}\n}\n\n/* A style of the button which handles the primary action. */\n.ck.ck-button-action,\na.ck.ck-button-action {\n\t@mixin ck-button-colors --ck-color-button-action;\n\n\tcolor: var(--ck-color-button-action-text);\n}\n\n.ck.ck-button-bold,\na.ck.ck-button-bold {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements a button of given background color.\n *\n * @param {String} $background - Background color of the button.\n * @param {String} $border - Border color of the button.\n */\n@define-mixin ck-button-colors $prefix {\n\tbackground: var($(prefix)-background);\n\n\t&:not(.ck-disabled) {\n\t\t&:hover {\n\t\t\tbackground: var($(prefix)-hover-background);\n\t\t}\n\n\t\t&:active {\n\t\t\tbackground: var($(prefix)-active-background);\n\t\t}\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t&.ck-disabled {\n\t\tbackground: var($(prefix)-disabled-background);\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},9681:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/switchbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/switchbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AASE,4HACC,aACD,CCCF,MAEC,8CAA+C,CAE/C,0DAAgE,CAChE,2HAIC,CACD,0FACD,CAOC,0QAEC,sBAAuB,CADvB,aAED,CAEA,0DAGE,4CAOF,CAVA,0DAQE,2CAEF,CAEA,iDCpCA,eD4EA,CAxCA,yIChCC,qCDwED,CAxCA,2DAKE,gBAmCF,CAxCA,2DAUE,iBA8BF,CAxCA,iDAkBC,uDAAwD,CAFxD,4BAA6B,CAD7B,iFAAsF,CAEtF,0CAuBD,CApBC,2ECxDD,eDmEC,CAXA,6LCpDA,qCAAsC,CDsDpC,8CASF,CAXA,2EAOC,yDAA0D,CAD1D,gDAAiD,CAIjD,uBAA0B,CAL1B,+CAMD,CAEA,uDACC,6DAKD,CAHC,iFACC,qDACD,CAIF,6DEhFA,kCFkFA,CAGA,oCACC,wBAAyB,CAEzB,eAAgB,CADhB,YAQD,CALC,uDACC,iGAAmG,CAEnG,4BAA6B,CAD7B,kBAED,CAKA,uDACC,sDAkBD,CAhBC,6DACC,4DACD,CAEA,2FAKE,2DAMF,CAXA,2FASE,oEAEF",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-button.ck-switchbutton {\n\t& .ck-button__toggle {\n\t\tdisplay: block;\n\n\t\t& .ck-button__toggle__inner {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/* Note: To avoid rendering issues (aliasing) but to preserve the responsive nature\nof the component, floating–point numbers have been used which, for the default font size\n(see: --ck-font-size-base), will generate simple integers. */\n:root {\n\t/* 34px at 13px font-size */\n\t--ck-switch-button-toggle-width: 2.6153846154em;\n\t/* 14px at 13px font-size */\n\t--ck-switch-button-toggle-inner-size: calc(1.0769230769em + 1px);\n\t--ck-switch-button-translation: calc(\n\t\tvar(--ck-switch-button-toggle-width) -\n\t\tvar(--ck-switch-button-toggle-inner-size) -\n\t\t2px /* Border */\n\t);\n\t--ck-switch-button-inner-hover-shadow: 0 0 0 5px var(--ck-color-switch-button-inner-shadow);\n}\n\n.ck.ck-button.ck-switchbutton {\n\t/* Unlike a regular button, the switch button text color and background should never change.\n\t * Changing toggle switch (background, outline) is enough to carry the information about the\n\t * state of the entire component (https://github.com/ckeditor/ckeditor5/issues/12519)\n\t */\n\t&, &:hover, &:focus, &:active, &.ck-on:hover, &.ck-on:focus, &.ck-on:active {\n\t\tcolor: inherit;\n\t\tbackground: transparent;\n\t}\n\n\t& .ck-button__label {\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-right: calc(2 * var(--ck-spacing-large));\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-left: calc(2 * var(--ck-spacing-large));\n\t\t}\n\t}\n\n\t& .ck-button__toggle {\n\t\t@mixin ck-rounded-corners;\n\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Make sure the toggle is always to the right as far as possible. */\n\t\t\tmargin-left: auto;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Make sure the toggle is always to the left as far as possible. */\n\t\t\tmargin-right: auto;\n\t\t}\n\n\t\t/* Apply some smooth transition to the box-shadow and border. */\n\t\t/* Gently animate the background color of the toggle switch */\n\t\ttransition: background 400ms ease, box-shadow .2s ease-in-out, outline .2s ease-in-out;\n\t\tborder: 1px solid transparent;\n\t\twidth: var(--ck-switch-button-toggle-width);\n\t\tbackground: var(--ck-color-switch-button-off-background);\n\n\t\t& .ck-button__toggle__inner {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-radius: calc(.5 * var(--ck-border-radius));\n\t\t\t}\n\n\t\t\twidth: var(--ck-switch-button-toggle-inner-size);\n\t\t\theight: var(--ck-switch-button-toggle-inner-size);\n\t\t\tbackground: var(--ck-color-switch-button-inner-background);\n\n\t\t\t/* Gently animate the inner part of the toggle switch */\n\t\t\ttransition: all 300ms ease;\n\t\t}\n\n\t\t&:hover {\n\t\t\tbackground: var(--ck-color-switch-button-off-hover-background);\n\n\t\t\t& .ck-button__toggle__inner {\n\t\t\t\tbox-shadow: var(--ck-switch-button-inner-hover-shadow);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-button__toggle {\n\t\t@mixin ck-disabled;\n\t}\n\n\t/* Overriding default .ck-button:focus styles + an outline around the toogle */\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t\tbox-shadow: none;\n\n\t\t& .ck-button__toggle {\n\t\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-background), 0 0 0 5px var(--ck-color-focus-outer-shadow);\n\t\t\toutline-offset: 1px;\n\t\t\toutline: var(--ck-focus-ring);\n\t\t}\n\t}\n\n\t/* stylelint-disable-next-line no-descending-specificity */\n\t&.ck-on {\n\t\t& .ck-button__toggle {\n\t\t\tbackground: var(--ck-color-switch-button-on-background);\n\n\t\t\t&:hover {\n\t\t\t\tbackground: var(--ck-color-switch-button-on-hover-background);\n\t\t\t}\n\n\t\t\t& .ck-button__toggle__inner {\n\t\t\t\t/*\n\t\t\t\t* Move the toggle switch to the right. It will be animated.\n\t\t\t\t*/\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\ttransform: translateX( var( --ck-switch-button-translation ) );\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\ttransform: translateX( calc( -1 * var( --ck-switch-button-translation ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},4923:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/colorgrid/colorgrid.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorgrid/colorgrid.css"],names:[],mappings:"AAKA,kBACC,YACD,CCAA,MACC,8BAA+B,CAK/B,wCACD,CAEA,kBACC,YAAa,CACb,WACD,CAEA,wBAOC,QAAS,CALT,qCAAsC,CAEtC,yCAA0C,CAD1C,wCAAyC,CAEzC,SAAU,CACV,8BAA+B,CAL/B,oCAyCD,CAjCC,oCACC,YAAa,CACb,gBACD,CAEA,4DACC,gDACD,CAEA,oCAEC,2CAA4C,CAD5C,YAED,CAEA,8BACC,8FAKD,CAHC,0CACC,aACD,CAGD,8HAIC,QACD,CAEA,gGAEC,iGACD,CAGD,yBACC,oCACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-color-grid {\n\tdisplay: grid;\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-grid-tile-size: 24px;\n\n\t/* Not using global colors here because these may change but some colors in a pallette\n\t * require special treatment. For instance, this ensures no matter what the UI text color is,\n\t * the check icon will look good on the black color tile. */\n\t--ck-color-color-grid-check-icon: hsl(212, 81%, 46%);\n}\n\n.ck.ck-color-grid {\n\tgrid-gap: 5px;\n\tpadding: 8px;\n}\n\n.ck.ck-color-grid__tile {\n\twidth: var(--ck-color-grid-tile-size);\n\theight: var(--ck-color-grid-tile-size);\n\tmin-width: var(--ck-color-grid-tile-size);\n\tmin-height: var(--ck-color-grid-tile-size);\n\tpadding: 0;\n\ttransition: .2s ease box-shadow;\n\tborder: 0;\n\n\t&.ck-disabled {\n\t\tcursor: unset;\n\t\ttransition: unset;\n\t}\n\n\t&.ck-color-table__color-tile_bordered {\n\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-border);\n\t}\n\n\t& .ck.ck-icon {\n\t\tdisplay: none;\n\t\tcolor: var(--ck-color-color-grid-check-icon);\n\t}\n\n\t&.ck-on {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);\n\n\t\t& .ck.ck-icon {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t&.ck-on,\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\t/* Disable the default .ck-button\'s border ring. */\n\t\tborder: 0;\n\t}\n\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);\n\t}\n}\n\n.ck.ck-color-grid__label {\n\tpadding: 0 var(--ck-spacing-standard);\n}\n'],sourceRoot:""}]);const a=s},2191:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-input{min-width:unset}.color-picker-hex-input{width:max-content}.ck.ck-color-picker__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-color-picker__row .ck-color-picker__hash-view{padding-right:var(--ck-spacing-medium);padding-top:var(--ck-spacing-tiny)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/colorpicker/colorpicker.css"],names:[],mappings:"AAKA,aACC,eACD,CAEA,wBACC,iBACD,CAEA,yBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAMD,CAJC,qDAEC,sCAAuC,CADvC,kCAED",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-input {\n\tmin-width: unset;\n}\n\n.color-picker-hex-input {\n\twidth: max-content;\n}\n\n.ck.ck-color-picker__row {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n\n\t& .ck-color-picker__hash-view {\n\t\tpadding-top: var(--ck-spacing-tiny);\n\t\tpadding-right: var(--ck-spacing-medium);\n\t}\n}\n"],sourceRoot:""}]);const a=s},3488:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/dropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_disabled.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,MACC,4BACD,CAEA,gBACC,oBAAqB,CACrB,iBA2ED,CAzEC,oCACC,mBAAoB,CACpB,2BACD,CAGA,+CACC,UACD,CAEA,oCACC,YAAa,CAEb,sCAAuC,CAEvC,iBAAkB,CAHlB,yBA4DD,CAvDC,+DACC,oBACD,CAEA,mSAKC,WACD,CAEA,mSAUC,WAAY,CADZ,QAED,CAEA,oHAEC,MACD,CAEA,oHAEC,OACD,CAEA,kHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAQF,mCACC,mCACD,CCpFA,MACC,sDACD,CAEA,gBAEC,iBA2ED,CAzEC,oCACC,mCACD,CAGC,8CAIC,sCAAuC,CAHvC,gCAID,CAIA,8CACC,+BAAgC,CAGhC,oCACD,CAGD,gDC/BA,kCDiCA,CAIE,mFAEC,oCACD,CAIA,mFAEC,qCACD,CAID,iEAEC,eAAgB,CAChB,sBAAuB,CAFvB,SAGD,CAGA,6EC1DD,kCD4DC,CAGA,qDACC,2BAA4B,CAC5B,4BACD,CAEA,sGACC,UACD,CAGA,yHAEC,eAKD,CAHC,qIE7EF,2CF+EE,CAKH,uBGlFC,eH8GD,CA5BA,qFG9EE,qCH0GF,CA5BA,uBAIC,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CE1FT,oCAA8B,CF6F9B,cAmBD,CAfC,6CACC,wBACD,CAEA,6CACC,yBACD,CAEA,6CACC,2BACD,CAEA,6CACC,4BACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-dropdown-max-width: 75vw;\n}\n\n.ck.ck-dropdown {\n\tdisplay: inline-block;\n\tposition: relative;\n\n\t& .ck-dropdown__arrow {\n\t\tpointer-events: none;\n\t\tz-index: var(--ck-z-default);\n\t}\n\n\t/* Dropdown button should span horizontally, e.g. in vertical toolbars */\n\t& .ck-button.ck-dropdown__button {\n\t\twidth: 100%;\n\t}\n\n\t& .ck-dropdown__panel {\n\t\tdisplay: none;\n\t\tz-index: var(--ck-z-modal);\n\t\tmax-width: var(--ck-dropdown-max-width);\n\n\t\tposition: absolute;\n\n\t\t&.ck-dropdown__panel-visible {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_n,\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_nme {\n\t\t\tbottom: 100%;\n\t\t}\n\n\t\t&.ck-dropdown__panel_se,\n\t\t&.ck-dropdown__panel_sw,\n\t\t&.ck-dropdown__panel_smw,\n\t\t&.ck-dropdown__panel_sme,\n\t\t&.ck-dropdown__panel_s {\n\t\t\t/*\n\t\t\t * Using transform: translate3d( 0, 100%, 0 ) causes blurry dropdown on Chrome 67-78+ on non-retina displays.\n\t\t\t * See https://github.com/ckeditor/ckeditor5/issues/1053.\n\t\t\t */\n\t\t\ttop: 100%;\n\t\t\tbottom: auto;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_se {\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_sw {\n\t\t\tright: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_s,\n\t\t&.ck-dropdown__panel_n {\n\t\t\t/* Positioning panels relative to the center of the button */\n\t\t\tleft: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_smw {\n\t\t\t/* Positioning panels relative to the middle-west of the button */\n\t\t\tleft: 75%;\n\t\t\ttransform: translateX(-75%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nme,\n\t\t&.ck-dropdown__panel_sme {\n\t\t\t/* Positioning panels relative to the middle-east of the button */\n\t\t\tleft: 25%;\n\t\t\ttransform: translateX(-25%);\n\t\t}\n\t}\n}\n\n/*\n * Toolbar dropdown panels should be always above the UI (eg. other dropdown panels) from the editor's content.\n * See https://github.com/ckeditor/ckeditor5/issues/7874\n */\n.ck.ck-toolbar .ck-dropdown__panel {\n\tz-index: calc( var(--ck-z-modal) + 1 );\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-dropdown-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-dropdown {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-dropdown__arrow {\n\t\twidth: var(--ck-dropdown-arrow-size);\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-dropdown__arrow {\n\t\t\tright: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-dropdown__arrow {\n\t\t\tleft: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-dropdown__arrow {\n\t\t@mixin ck-disabled;\n\t}\n\n\t& .ck-button.ck-dropdown__button {\n\t\t@mixin ck-dir ltr {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-right: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t/* #23 */\n\t\t& .ck-button__label {\n\t\t\twidth: 7em;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t\t&.ck-disabled .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/816 */\n\t\t&.ck-on {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t&.ck-dropdown__button_label-width_auto .ck-button__label {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/8699 */\n\t\t&.ck-off:active,\n\t\t&.ck-on:active {\n\t\t\tbox-shadow: none;\n\t\t\t\n\t\t\t&:focus {\n\t\t\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-dropdown__panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tbackground: var(--ck-color-dropdown-panel-background);\n\tborder: 1px solid var(--ck-color-dropdown-panel-border);\n\tbottom: 0;\n\n\t/* Make sure the panel is at least as wide as the drop-down\'s button. */\n\tmin-width: 100%;\n\n\t/* Disabled corner border radius to be consistent with the .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-dropdown__panel_se {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_sw {\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_ne {\n\t\tborder-bottom-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_nw {\n\t\tborder-bottom-right-radius: 0;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},6875:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/listdropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,6CCIC,eDqBD,CAzBA,iICQE,qCAAsC,CDJtC,wBAqBF,CAfE,mFCND,eDYC,CANA,6MCFA,qCAAsC,CDKpC,2BAA4B,CAC5B,4BAA6B,CAF7B,wBAIF,CAEA,kFCdD,eDmBC,CALA,2MCVA,qCAAsC,CDYpC,wBAAyB,CACzB,yBAEF",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n.ck.ck-dropdown .ck-dropdown__panel .ck-list {\n\t/* Disabled radius of top-left border to be consistent with .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t/* Make sure the button belonging to the first/last child of the list goes well with the\n\tborder radius of the entire panel. */\n\t& .ck-list__item {\n\t\t&:first-child .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t&:last-child .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},66:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton>.ck-splitbutton__arrow:not(:focus){border-bottom-width:0;border-top-width:0}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:focus:after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:focus:after{--ck-color-split-button-hover-border:var(--ck-color-focus-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/splitbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,iBAKD,CAHC,iDACC,qCACD,CCJD,MACC,gDAAyD,CACzD,4CACD,CAMC,oIAKE,gCAAiC,CADjC,6BASF,CAbA,oIAWE,+BAAgC,CADhC,4BAGF,CAEA,0CAGC,eAiBD,CApBA,oDAQE,+BAAgC,CADhC,4BAaF,CApBA,oDAcE,gCAAiC,CADjC,6BAOF,CAHC,8CACC,mCACD,CAKD,sDAEC,qBAAwB,CADxB,kBAED,CAQC,0KACC,wDACD,CAIA,8JAKC,0DAA2D,CAJ3D,UAAW,CAGX,WAAY,CAFZ,iBAAkB,CAClB,SAGD,CAGA,sIACC,iEACD,CAGC,kLACC,SACD,CAIA,kLACC,UACD,CAMF,uCCzFA,eDmGA,CAVA,qHCrFC,qCD+FD,CARE,qKACC,2BACD,CAEA,mKACC,4BACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-splitbutton {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-splitbutton__action:focus {\n\t\tz-index: calc(var(--ck-z-default) + 1);\n\t}\n}\n\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-split-button-hover-background: hsl(0, 0%, 92%);\n\t--ck-color-split-button-hover-border: hsl(0, 0%, 70%);\n}\n\n.ck.ck-splitbutton {\n\t/*\n\t * Note: ck-rounded and ck-dir mixins don\'t go together (because they both use @nest).\n\t */\n\t&:hover > .ck-splitbutton__action,\n\t&.ck-splitbutton_open > .ck-splitbutton__action {\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the action button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the action button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\t}\n\n\t& > .ck-splitbutton__arrow {\n\t\t/* It\'s a text-less button and since the icon is positioned absolutely in such situation,\n\t\tit must get some arbitrary min-width. */\n\t\tmin-width: unset;\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the arrow button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the arrow button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t& svg {\n\t\t\twidth: var(--ck-dropdown-arrow-size);\n\t\t}\n\t}\n\n\t/* Make sure the divider stretches 100% height of the button\n\thttps://github.com/ckeditor/ckeditor5/issues/10936 */\n\t& > .ck-splitbutton__arrow:not(:focus) {\n\t\tborder-top-width: 0px;\n\t\tborder-bottom-width: 0px;\n\t}\n\n\t/* When the split button is "open" (the arrow is on) or being hovered, it should get some styling\n\tas a whole. The background of both buttons should stand out and there should be a visual\n\tseparation between both buttons. */\n\t&.ck-splitbutton_open,\n\t&:hover {\n\t\t/* When the split button hovered as a whole, not as individual buttons. */\n\t\t& > .ck-button:not(.ck-on):not(.ck-disabled):not(:hover) {\n\t\t\tbackground: var(--ck-color-split-button-hover-background);\n\t\t}\n\n\t\t/* Splitbutton separator needs to be set with the ::after pseudoselector\n\t\tto display properly the borders on focus */\n\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\tcontent: \'\';\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t\theight: 100%;\n\t\t\tbackground-color: var(--ck-color-split-button-hover-border);\n\t\t}\n\n\t\t/* Make sure the divider between the buttons looks fine when the button is focused */\n\t\t& > .ck-splitbutton__arrow:focus::after {\n\t\t\t--ck-color-split-button-hover-border: var(--ck-color-focus-border);\n\t\t}\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tleft: -1px;\n\t\t\t}\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tright: -1px;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Don\'t round the bottom left and right corners of the buttons when "open"\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-splitbutton_open {\n\t\t@mixin ck-rounded-corners {\n\t\t\t& > .ck-splitbutton__action {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\n\t\t\t& > .ck-splitbutton__arrow {\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},5075:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/toolbardropdown.css"],names:[],mappings:"AAKA,MACC,oCACD,CAEA,4CAGC,8CAA+C,CAD/C,iBAQD,CAJE,6DACC,qCACD,CCZF,oCACC,QACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-toolbar-dropdown-max-width: 60vw;\n}\n\n.ck.ck-toolbar-dropdown > .ck-dropdown__panel {\n\t/* https://github.com/ckeditor/ckeditor5/issues/5586 */\n\twidth: max-content;\n\tmax-width: var(--ck-toolbar-dropdown-max-width);\n\n\t& .ck-button {\n\t\t&:focus {\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-toolbar-dropdown .ck-toolbar {\n\tborder: 0;\n}\n"],sourceRoot:""}]);const a=s},4547:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/editorui.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAWA,MACC,0CACD,CAEA,yDCJC,eDWD,CAPA,yJCAE,qCDOF,CAJC,oEEPA,2BAA2B,CCF3B,qCAA8B,CDC9B,YFWA,CAGD,+BAGC,4BAA6B,CAF7B,aAAc,CACd,oCA6BD,CA1BC,wCACC,eACD,CAEA,wCACC,gBACD,CAGA,4CACC,kCACD,CAGA,2CAKC,qCACD,CAGA,sDACC,kDACD,CAKA,gEACC,mDACD,CAIA,gEACC,gDACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_focus.css";\n@import "../../mixins/_button.css";\n\n:root {\n\t--ck-color-editable-blur-selection: hsl(0, 0%, 85%);\n}\n\n.ck.ck-editor__editable:not(.ck-editor__nested-editable) {\n\t@mixin ck-rounded-corners;\n\n\t&.ck-focused {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t}\n}\n\n.ck.ck-editor__editable_inline {\n\toverflow: auto;\n\tpadding: 0 var(--ck-spacing-standard);\n\tborder: 1px solid transparent;\n\n\t&[dir="ltr"] {\n\t\ttext-align: left;\n\t}\n\n\t&[dir="rtl"] {\n\t\ttext-align: right;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/116 */\n\t& > *:first-child {\n\t\tmargin-top: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/847 */\n\t& > *:last-child {\n\t\t/*\n\t\t * This value should match with the default margins of the block elements (like .media or .image)\n\t\t * to avoid a content jumping when the fake selection container shows up (See https://github.com/ckeditor/ckeditor5/issues/9825).\n\t\t */\n\t\tmargin-bottom: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/6517 */\n\t&.ck-blurred ::selection {\n\t\tbackground: var(--ck-color-editable-blur-selection);\n\t}\n}\n\n/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/111 */\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_n"] {\n\t&::after {\n\t\tborder-bottom-color: var(--ck-color-base-foreground);\n\t}\n}\n\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_s"] {\n\t&::after {\n\t\tborder-top-color: var(--ck-color-base-foreground);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},5523:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/formheader/formheader.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/formheader/formheader.css"],names:[],mappings:"AAKA,oBAIC,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CAEjB,6BACD,CCNA,MACC,4BACD,CAEA,oBAIC,mDAAoD,CAFpD,mCAAoC,CACpC,wCAAyC,CAFzC,uDAQD,CAHC,4CACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__header {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\talign-items: center;\n\tjustify-content: space-between;\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-form-header-height: 38px;\n}\n\n.ck.ck-form__header {\n\tpadding: var(--ck-spacing-small) var(--ck-spacing-large);\n\theight: var(--ck-form-header-height);\n\tline-height: var(--ck-form-header-height);\n\tborder-bottom: 1px solid var(--ck-color-base-border);\n\n\t& .ck-form__header__label {\n\t\tfont-weight: bold;\n\t}\n}\n"],sourceRoot:""}]);const a=s},1174:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/icon/icon.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/icon/icon.css"],names:[],mappings:"AAKA,YACC,qBACD,CCFA,MACC,0EACD,CAEA,YAKC,uBAAwB,CAHxB,0BAA2B,CAD3B,yBAA0B,CAU1B,qBAoBD,CAlBC,0BALA,cAQA,CAMC,sEACC,aAMD,CAJC,+CAEC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-icon {\n\tvertical-align: middle;\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-icon-size: calc(var(--ck-line-height-base) * var(--ck-font-size-normal));\n}\n\n.ck.ck-icon {\n\twidth: var(--ck-icon-size);\n\theight: var(--ck-icon-size);\n\n\t/* Multiplied by the height of the line in "px" should give SVG "viewport" dimensions */\n\tfont-size: .8333350694em;\n\n\t/* Inherit cursor style (#5). */\n\tcursor: inherit;\n\n\t/* This will prevent blurry icons on Firefox. See #340. */\n\twill-change: transform;\n\n\t& * {\n\t\t/* Inherit cursor style (#5). */\n\t\tcursor: inherit;\n\t}\n\n\t/* Allows dynamic coloring of an icon by inheriting its color from the parent. */\n\t&.ck-icon_inherit-color {\n\t\tcolor: inherit;\n\n\t\t& * {\n\t\t\tcolor: inherit;\n\n\t\t\t&:not([fill]) {\n\t\t\t\t/* Needed by FF. */\n\t\t\t\tfill: currentColor;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},6985:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/input/input.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AASA,MACC,qBAAsB,CAGtB,2CACD,CAEA,aCLC,eD2CD,CAtCA,iECDE,qCDuCF,CAtCA,aAGC,2CAA4C,CAC5C,6CAA8C,CAK9C,4CAA6C,CAH7C,+BAAgC,CADhC,6DAA8D,CAO9D,4DA0BD,CAxBC,mBEnBA,2BAA2B,CCF3B,2CAA8B,CDC9B,YFuBA,CAEA,uBAEC,oDAAqD,CADrD,sDAAuD,CAEvD,yCAMD,CAJC,6BG/BD,oDHkCC,CAGD,sBAEC,sCAAuC,CADvC,+CAMD,CAHC,4BGzCD,iDH2CC,CAIF,0BACC,IACC,0BACD,CAEA,IACC,yBACD,CAEA,IACC,0BACD,CAEA,IACC,yBACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-input-width: 18em;\n\n\t/* Backward compatibility. */\n\t--ck-input-text-width: var(--ck-input-width);\n}\n\n.ck.ck-input {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-input-background);\n\tborder: 1px solid var(--ck-color-input-border);\n\tpadding: var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);\n\tmin-width: var(--ck-input-width);\n\n\t/* This is important to stay of the same height as surrounding buttons */\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .1s ease-in-out, border .1s ease-in-out;\n\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t&[readonly] {\n\t\tborder: 1px solid var(--ck-color-input-disabled-border);\n\t\tbackground: var(--ck-color-input-disabled-background);\n\t\tcolor: var(--ck-color-input-disabled-text);\n\n\t\t&:focus {\n\t\t\t/* The read-only input should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\tborder-color: var(--ck-color-input-error-border);\n\t\tanimation: ck-input-shake .3s ease both;\n\n\t\t&:focus {\n\t\t\t@mixin ck-box-shadow var(--ck-focus-error-outer-shadow);\n\t\t}\n\t}\n}\n\n@keyframes ck-input-shake {\n\t20% {\n\t\ttransform: translateX(-2px);\n\t}\n\n\t40% {\n\t\ttransform: translateX(2px);\n\t}\n\n\t60% {\n\t\ttransform: translateX(-1px);\n\t}\n\n\t80% {\n\t\ttransform: translateX(1px);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},2751:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/label/label.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/label/label.css"],names:[],mappings:"AAKA,aACC,aACD,CAEA,mBACC,YACD,CCNA,aACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tdisplay: block;\n}\n\n.ck.ck-voice-label {\n\tdisplay: none;\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tfont-weight: bold;\n}\n"],sourceRoot:""}]);const a=s},8111:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledfield/labeledfieldview.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAMC,mEACC,YAAa,CACb,iBACD,CAEA,uCACC,aAAc,CACd,iBACD,CCND,MACC,kEAAsE,CACtE,gFAAiF,CACjF,oEAAqE,CACrE,8EAAiF,CACjF,yEACD,CAEA,0BCLC,eD8GD,CAzGA,2FCDE,qCD0GF,CAtGC,mEACC,UAmCD,CAjCC,gFACC,KA+BD,CAhCA,0FAIE,MA4BF,CAhCA,0FAQE,OAwBF,CAhCA,gFAiBC,yDAA0D,CAG1D,eAAmB,CADnB,kBAAoB,CAOpB,cAAe,CAFf,eAAgB,CANhB,2CAA8C,CAP9C,mBAAoB,CAYpB,sBAAuB,CARvB,6DAA+D,CAH/D,oBAAqB,CAgBrB,+JAID,CAQA,mKACC,gCACD,CAGD,yDACC,mCAAoC,CACpC,kCAAmC,CAInC,kBAKD,CAHC,6FACC,gCACD,CAID,4OAEC,yCACD,CAIA,oUAGE,+HAYF,CAfA,oUAOE,wIAQF,CAfA,gTAaC,sBAAuB,CAFvB,iEAAkE,CAGlE,SACD,CAKA,8FACC,sBACD,CAGA,yIACC,SACD,CAGA,kMACC,8HACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-labeled-field-view {\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t}\n\n\t& .ck.ck-label {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-labeled-field-view-transition: .1s cubic-bezier(0, 0, 0.24, 0.95);\n\t--ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-spacing-medium);\n\t--ck-labeled-field-label-default-position-x: var(--ck-spacing-medium);\n\t--ck-labeled-field-label-default-position-y: calc(0.6 * var(--ck-font-size-base));\n\t--ck-color-labeled-field-label-background: var(--ck-color-base-background);\n}\n\n.ck.ck-labeled-field-view {\n\t@mixin ck-rounded-corners;\n\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\twidth: 100%;\n\n\t\t& > .ck.ck-label {\n\t\t\ttop: 0px;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tleft: 0px;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tright: 0px;\n\t\t\t}\n\n\t\t\tpointer-events: none;\n\t\t\ttransform-origin: 0 0;\n\n\t\t\t/* By default, display the label scaled down above the field. */\n\t\t\ttransform: translate(var(--ck-spacing-medium), -6px) scale(.75);\n\n\t\t\tbackground: var(--ck-color-labeled-field-label-background);\n\t\t\tpadding: 0 calc(.5 * var(--ck-font-size-tiny));\n\t\t\tline-height: initial;\n\t\t\tfont-weight: normal;\n\n\t\t\t/* Prevent overflow when the label is longer than the input */\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\n\t\t\tmax-width: 100%;\n\n\t\t\ttransition:\n\t\t\t\ttransform var(--ck-labeled-field-view-transition),\n\t\t\t\tpadding var(--ck-labeled-field-view-transition),\n\t\t\t\tbackground var(--ck-labeled-field-view-transition);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\t& > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\n\t\t& .ck-input:not([readonly]) + .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t& .ck-labeled-field-view__status {\n\t\tfont-size: var(--ck-font-size-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\n\t\t/* Let the info wrap to the next line to avoid stretching the layout horizontally.\n\t\tThe status could be very long. */\n\t\twhite-space: normal;\n\n\t\t&.ck-labeled-field-view__status_error {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t/* Disabled fields and fields that have no focus should fade out. */\n\t&.ck-disabled > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\tcolor: var(--ck-color-input-disabled-text);\n\t}\n\n\t/* Fields that are disabled or not focused and without a placeholder should have full-sized labels. */\n\t/* stylelint-disable-next-line no-descending-specificity */\n\t&.ck-disabled.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t@mixin ck-dir ltr {\n\t\t\ttransform: translate(var(--ck-labeled-field-label-default-position-x), var(--ck-labeled-field-label-default-position-y)) scale(1);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttransform: translate(calc(-1 * var(--ck-labeled-field-label-default-position-x)), var(--ck-labeled-field-label-default-position-y)) scale(1);\n\t\t}\n\n\t\t/* Compensate for the default translate position. */\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width));\n\n\t\tbackground: transparent;\n\t\tpadding: 0;\n\t}\n\n\t/*------ DropdownView integration ----------------------------------------------------------------------------------- */\n\n\t/* Make sure dropdown\' background color in any of dropdown\'s state does not collide with labeled field. */\n\t& > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck.ck-button {\n\t\tbackground: transparent;\n\t}\n\n\t/* When the dropdown is "empty", the labeled field label replaces its label. */\n\t&.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck-button > .ck-button__label {\n\t\topacity: 0;\n\t}\n\n\t/* Make sure the label of the empty, unfocused input does not cover the dropdown arrow. */\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown + .ck-label {\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard));\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},1162:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/list/list.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,YAGC,YAAa,CACb,qBAAsB,CCFtB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDaD,CAZC,2DAEC,aACD,CAKA,kCACC,iBAAkB,CAClB,2BACD,CEfD,YCEC,eDGD,CALA,+DCME,qCDDF,CALA,YAIC,0CAA2C,CAD3C,oBAED,CAEA,kBACC,cAAe,CACf,cA2DD,CAzDC,6BAIC,eAAgB,CAHhB,gBAAiB,CAQjB,iIAEiE,CARjE,eAAgB,CADhB,UAwCD,CA7BC,+CAEC,yEACD,CAEA,oCACC,eACD,CAEA,mCACC,oDAAqD,CACrD,yCAaD,CAXC,0CACC,eACD,CAEA,2DACC,0DACD,CAEA,iFACC,4CACD,CAGD,qDACC,uDACD,CAMA,yCACC,0CAA2C,CAC3C,aAMD,CAJC,iEACC,uDAAwD,CACxD,aACD,CAKH,uBAGC,sCAAuC,CAFvC,UAAW,CACX,UAED",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-list {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t& .ck-list__item,\n\t& .ck-list__separator {\n\t\tdisplay: block;\n\t}\n\n\t/* Make sure that whatever child of the list item gets focus, it remains on the\n\ttop. Thanks to that, styles like box-shadow, outline, etc. are not masked by\n\tadjacent list items. */\n\t& .ck-list__item > *:focus {\n\t\tposition: relative;\n\t\tz-index: var(--ck-z-default);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-list {\n\t@mixin ck-rounded-corners;\n\n\tlist-style-type: none;\n\tbackground: var(--ck-color-list-background);\n}\n\n.ck.ck-list__item {\n\tcursor: default;\n\tmin-width: 12em;\n\n\t& .ck-button {\n\t\tmin-height: unset;\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t\tborder-radius: 0;\n\n\t\t/* List items should have the same height. Use absolute units to make sure it is so\n\t\t because e.g. different heading styles may have different height\n\t\t https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\tpadding:\n\t\t\tcalc(.2 * var(--ck-line-height-base) * var(--ck-font-size-base))\n\t\t\tcalc(.4 * var(--ck-line-height-base) * var(--ck-font-size-base));\n\n\t\t& .ck-button__label {\n\t\t\t/* https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\t\tline-height: calc(1.2 * var(--ck-line-height-base) * var(--ck-font-size-base));\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-button-on-background);\n\t\t\tcolor: var(--ck-color-list-button-on-text);\n\n\t\t\t&:active {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-on-background-focus);\n\t\t\t}\n\n\t\t\t&:focus:not(.ck-switchbutton):not(.ck-disabled) {\n\t\t\t\tborder-color: var(--ck-color-base-background);\n\t\t\t}\n\t\t}\n\n\t\t&:hover:not(.ck-disabled) {\n\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t}\n\t}\n\n\t/* It\'s unnecessary to change the background/text of a switch toggle; it has different ways\n\tof conveying its state (like the switcher) */\n\t& .ck-switchbutton {\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-background);\n\t\t\tcolor: inherit;\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-list__separator {\n\theight: 1px;\n\twidth: 100%;\n\tbackground: var(--ck-color-base-border);\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},8245:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonpanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonpanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MAEC,8DACD,CAEA,qBACC,YAAa,CACb,iBAAkB,CAElB,yBAyCD,CAtCE,+GAEC,UAAW,CACX,iBACD,CAEA,wDACC,6CACD,CAEA,uDACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAGD,8CACC,aACD,CC9CD,MACC,6BAA8B,CAC9B,6BAA8B,CAC9B,8BAA+B,CAC/B,iCAAkC,CAClC,oEACD,CAEA,qBCLC,eDmMD,CA9LA,iFCDE,qCD+LF,CA9LA,qBAMC,2CAA4C,CAC5C,wEAAyE,CEdzE,oCAA8B,CFW9B,eA0LD,CApLE,+GAIC,kBAAmB,CADnB,QAAS,CADT,OAGD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,kDACD,CAEA,2CACC,iFAAkF,CAClF,gFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,iEAAkE,CAClE,uDAAwD,CACxD,qDACD,CAEA,2CACC,iFAAkF,CAClF,mFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,oDACD,CAEA,2CACC,iFAAkF,CAClF,kFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,mDACD,CAEA,2CACC,iFAAkF,CAClF,iFACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,2CACD,CAIA,2GAEC,+CAAkD,CAClD,2CACD,CAIA,2GAEC,gDAAmD,CACnD,2CACD,CAIA,yGAIC,8CAAiD,CAFjD,QAAS,CACT,uDAED,CAIA,2GAGC,8CAAiD,CADjD,+CAED,CAIA,2GAGC,8CAAiD,CADjD,gDAED,CAIA,6GAIC,8CAAiD,CADjD,uDAA0D,CAD1D,SAGD,CAIA,6GAIC,8CAAiD,CAFjD,QAAS,CACT,sDAED,CAIA,6GAGC,uDAA0D,CAD1D,SAAU,CAEV,2CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,2CACD,CAIA,yGAGC,sDAAyD,CADzD,6CAAgD,CAEhD,OACD,CAIA,yGAEC,4CAA+C,CAC/C,sDAAyD,CACzD,OACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* Make sure the balloon arrow does not float over its children. */\n\t--ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);\n}\n\n.ck.ck-balloon-panel {\n\tdisplay: none;\n\tposition: absolute;\n\n\tz-index: var(--ck-z-modal);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tposition: absolute;\n\t\t}\n\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_visible {\n\t\tdisplay: block;\n\t}\n}\n','/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-border-width: 1px;\n\t--ck-balloon-arrow-offset: 2px;\n\t--ck-balloon-arrow-height: 10px;\n\t--ck-balloon-arrow-half-width: 8px;\n\t--ck-balloon-arrow-drop-shadow: 0 2px 2px var(--ck-color-shadow-drop);\n}\n\n.ck.ck-balloon-panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: var(--ck-balloon-border-width) solid var(--ck-color-panel-border);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-border) transparent;\n\t\t\tmargin-top: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-background) transparent;\n\t\t\tmargin-top: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: var(--ck-color-panel-border) transparent transparent;\n\t\t\tfilter: drop-shadow(var(--ck-balloon-arrow-drop-shadow));\n\t\t\tmargin-bottom: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: var(--ck-color-panel-background) transparent transparent transparent;\n\t\t\tmargin-bottom: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_e"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent transparent transparent var(--ck-color-panel-border);\n\t\t\tmargin-right: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent transparent transparent var(--ck-color-panel-background);\n\t\t\tmargin-right: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_w"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0;\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent var(--ck-color-panel-border) transparent transparent;\n\t\t\tmargin-left: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent var(--ck-color-panel-background) transparent transparent;\n\t\t\tmargin-left: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_n {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_ne {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_s {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_se {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_smw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nmw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_e {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t\tmargin-top: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: 50%;\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_w {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t\tmargin-top: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},1757:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonrotator.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonrotator.css"],names:[],mappings:"AAKA,oCAEC,kBAAmB,CADnB,YAAa,CAEb,sBACD,CAKA,6CACC,sBACD,CCXA,oCACC,6CAA8C,CAC9C,sDAAuD,CACvD,iCAgBD,CAbC,sCAGC,qCAAsC,CAFtC,oCAAqC,CACrC,kCAED,CAGA,iEAIC,mCAAoC,CAHpC,uCAID,CAMA,2DACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Buttons inside a toolbar should be centered when rotator bar is wider.\n * See: https://github.com/ckeditor/ckeditor5-ui/issues/495\n */\n.ck .ck-balloon-rotator__content .ck-toolbar {\n\tjustify-content: center;\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tbackground: var(--ck-color-toolbar-background);\n\tborder-bottom: 1px solid var(--ck-color-toolbar-border);\n\tpadding: 0 var(--ck-spacing-small);\n\n\t/* Let's keep similar appearance to `ck-toolbar`. */\n\t& > * {\n\t\tmargin-right: var(--ck-spacing-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t/* Gives counter more breath than buttons. */\n\t& .ck-balloon-rotator__counter {\n\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t/* We need to use smaller margin because of previous button's right margin. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n.ck .ck-balloon-rotator__content {\n\n\t/* Disable default annotation shadow inside rotator with fake panels. */\n\t& .ck.ck-annotation-wrapper {\n\t\tbox-shadow: none;\n\t}\n}\n"],sourceRoot:""}]);const a=s},3553:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/fakepanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/fakepanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,mBACC,iBAAkB,CAGlB,mCACD,CAEA,uBACC,iBACD,CAEA,mCACC,SACD,CAEA,oCACC,SACD,CCfA,MACC,6CAA8C,CAC9C,2CACD,CAGA,uBAKC,2CAA4C,CAC5C,6CAA8C,CAC9C,qCAAsC,CCXtC,oCAA8B,CDc9B,WAAY,CAPZ,eAAgB,CAMhB,UAED,CAEA,mCACC,0DAA2D,CAC3D,uDACD,CAEA,oCACC,kEAAqE,CACrE,+DACD,CACA,oCACC,kEAAqE,CACrE,+DACD,CAGA,yIAGC,4CACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-fake-panel {\n\tposition: absolute;\n\n\t/* Fake panels should be placed under main balloon content. */\n\tz-index: calc(var(--ck-z-modal) - 1);\n}\n\n.ck .ck-fake-panel div {\n\tposition: absolute;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tz-index: 2;\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tz-index: 1;\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-fake-panel-offset-horizontal: 6px;\n\t--ck-balloon-fake-panel-offset-vertical: 6px;\n}\n\n/* Let\'s use `.ck-balloon-panel` appearance. See: balloonpanel.css. */\n.ck .ck-fake-panel div {\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: 1px solid var(--ck-color-panel-border);\n\tborder-radius: var(--ck-border-radius);\n\n\twidth: 100%;\n\theight: 100%;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tmargin-left: var(--ck-balloon-fake-panel-offset-horizontal);\n\tmargin-top: var(--ck-balloon-fake-panel-offset-vertical);\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 2);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 2);\n}\n.ck .ck-fake-panel div:nth-child( 3 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 3);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 3);\n}\n\n/* If balloon is positioned above element, we need to move fake panel to the top. */\n.ck .ck-balloon-panel_arrow_s + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_se + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_sw + .ck-fake-panel {\n\t--ck-balloon-fake-panel-offset-vertical: -6px;\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},3609:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/stickypanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/stickypanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAMC,qDAEC,cAAe,CACf,KAAM,CAFN,yBAGD,CAEA,kEAEC,iBAAkB,CADlB,QAED,CCPA,qDAIC,wBAAyB,CACzB,yBAA0B,CAF1B,sBAAuB,CCFxB,oCDKA",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\tz-index: var(--ck-z-modal); /* #315 */\n\t\tposition: fixed;\n\t\ttop: 0;\n\t}\n\n\t& .ck-sticky-panel__content_sticky_bottom-limit {\n\t\ttop: auto;\n\t\tposition: absolute;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\t@mixin ck-drop-shadow;\n\n\t\tborder-width: 0 1px 1px;\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},1590:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/responsive-form/responsiveform.css"],names:[],mappings:"AAQC,mCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,yCACC,YACD,CCdA,oCDoBE,wCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,8CACC,YACD,CC9BF,CCAD,qDACC,kDACD,CAEA,uBACC,+BAmED,CAjEC,6BAEC,YACD,CASC,uGACC,sCACD,CDvBD,oCCMD,uBAqBE,SAAU,CACV,oCA8CF,CA5CE,8CACC,wDAWD,CATC,6DACC,WAAY,CACZ,UACD,CAGA,4EACC,kBACD,CAKA,0DACC,kDACD,CAGD,iGAIC,eAAgB,CADhB,kCAAmC,CADnC,kCAmBD,CAfC,yHACC,gDACD,CARD,0OAeE,aAMF,CAJE,+IACC,kDACD,CDpEH",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck-vertical-form .ck-button {\n\t&::after {\n\t\tcontent: "";\n\t\twidth: 0;\n\t\tposition: absolute;\n\t\tright: -1px;\n\t\ttop: -1px;\n\t\tbottom: -1px;\n\t\tz-index: 1;\n\t}\n\n\t&:focus::after {\n\t\tdisplay: none;\n\t}\n}\n\n.ck.ck-responsive-form {\n\t@mixin ck-media-phone {\n\t\t& .ck-button {\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: -1px;\n\t\t\t\tz-index: 1;\n\t\t\t}\n\n\t\t\t&:focus::after {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck-vertical-form > .ck-button:nth-last-child(2)::after {\n\tborder-right: 1px solid var(--ck-color-base-border);\n}\n\n.ck.ck-responsive-form {\n\tpadding: var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& > :not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& > :not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tpadding: 0;\n\t\twidth: calc(.8 * var(--ck-input-width));\n\n\t\t& .ck-labeled-field-view {\n\t\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) 0;\n\n\t\t\t& .ck-input-text {\n\t\t\t\tmin-width: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t/* Let the long error messages wrap in the narrow form. */\n\t\t\t& .ck-labeled-field-view__error {\n\t\t\t\twhite-space: normal;\n\t\t\t}\n\t\t}\n\n\t\t/* Styles for two last buttons in the form (save&cancel, edit&unlink, etc.). */\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\t&::after {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\n\t\t& > .ck-button:nth-last-child(1),\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\tpadding: var(--ck-spacing-standard);\n\t\t\tmargin-top: var(--ck-spacing-large);\n\t\t\tborder-radius: 0;\n\n\t\t\t&:not(:focus) {\n\t\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},6706:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/blocktoolbar.css"],names:[],mappings:"AAKA,4BACC,iBAAkB,CAClB,2BACD,CCHA,MACC,oDAAqD,CACrD,yDACD,CAEA,4BACC,0CAA2C,CAC3C,sCACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-block-toolbar-button {\n\tposition: absolute;\n\tz-index: var(--ck-z-default);\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-block-toolbar-button: var(--ck-color-text);\n\t--ck-block-toolbar-button-size: var(--ck-font-size-normal);\n}\n\n.ck.ck-block-toolbar-button {\n\tcolor: var(--ck-color-block-toolbar-button);\n\tfont-size: var(--ck-block-toolbar-size);\n}\n"],sourceRoot:""}]);const a=s},5571:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck.ck-toolbar:focus{outline:none}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,eAKC,kBAAmB,CAFnB,YAAa,CACb,oBAAqB,CCFrB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6CD,CA3CC,kCAGC,kBAAmB,CAFnB,YAAa,CACb,kBAAmB,CAEnB,WAED,CAEA,yCACC,oBAWD,CAJC,yGAEC,YACD,CAGD,uCACC,eACD,CAEA,sDACC,gBACD,CAEA,sDACC,qBACD,CAEA,sDACC,gBACD,CAGC,yFACC,YACD,CE/CF,eCGC,eDwGD,CA3GA,qECOE,qCDoGF,CA3GA,eAGC,6CAA8C,CAE9C,+CAAgD,CADhD,iCAuGD,CApGC,yCACC,kBAAmB,CAGnB,yCAA0C,CAO1C,qCAAsC,CADtC,kCAAmC,CAPnC,aAAc,CADd,SAUD,CAEA,uCACC,QACD,CAGC,gEAEC,oCACD,CAIA,kEACC,YACD,CAGD,gHAIC,qCAAsC,CADtC,kCAED,CAEA,mCAEC,SAaD,CAVC,0DAQC,eAAgB,CAHhB,QAAS,CAHT,UAOD,CAGD,kCAEC,SAWD,CATC,uDAEC,QAMD,CAHC,yFACC,eACD,CASD,kFACC,mCACD,CAMA,wEACC,cACD,CAEA,iFACC,aAAc,CACd,UACD,CAGD,qBACC,YACD,CAtGD,qCAyGE,QAEF,CAYC,+FACC,cACD,CAEA,iJAEC,mCACD,CAEA,qHACC,aACD,CAIC,6JAEC,2BAA4B,CAD5B,wBAED,CAGA,2JAEC,4BAA6B,CAD7B,yBAED,CASD,8RACC,mCACD,CAWA,qHACC,cACD,CAIC,6JAEC,4BAA6B,CAD7B,yBAED,CAGA,2JAEC,2BAA4B,CAD5B,wBAED,CASD,8RACC,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-flow: row nowrap;\n\talign-items: center;\n\n\t& > .ck-toolbar__items {\n\t\tdisplay: flex;\n\t\tflex-flow: row wrap;\n\t\talign-items: center;\n\t\tflex-grow: 1;\n\n\t}\n\n\t& .ck.ck-toolbar__separator {\n\t\tdisplay: inline-block;\n\n\t\t/*\n\t\t * A leading or trailing separator makes no sense (separates from nothing on one side).\n\t\t * For instance, it can happen when toolbar items (also separators) are getting grouped one by one and\n\t\t * moved to another toolbar in the dropdown.\n\t\t */\n\t\t&:first-child,\n\t\t&:last-child {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\tflex-basis: 100%;\n\t}\n\n\t&.ck-toolbar_grouping > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t&.ck-toolbar_vertical > .ck-toolbar__items {\n\t\tflex-direction: column;\n\t}\n\n\t&.ck-toolbar_floating > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t& > .ck-dropdown__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-toolbar-background);\n\tpadding: 0 var(--ck-spacing-small);\n\tborder: 1px solid var(--ck-color-toolbar-border);\n\n\t& .ck.ck-toolbar__separator {\n\t\talign-self: stretch;\n\t\twidth: 1px;\n\t\tmin-width: 1px;\n\t\tbackground: var(--ck-color-toolbar-border);\n\n\t\t/*\n\t\t * These margins make the separators look better in balloon toolbars (when aligned with the "tip").\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/7493.\n\t\t */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\theight: 0;\n\t}\n\n\t& > .ck-toolbar__items {\n\t\t& > *:not(.ck-toolbar__line-break) {\n\t\t\t/* (#11) Separate toolbar items. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\n\t\t/* Don\'t display a separator after an empty items container, for instance,\n\t\twhen all items were grouped */\n\t\t&:empty + .ck.ck-toolbar__separator {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& > .ck-toolbar__items > *:not(.ck-toolbar__line-break),\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/* Make sure items wrapped to the next line have v-spacing */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t&.ck-toolbar_vertical {\n\t\t/* Items in a vertical toolbar span the entire width. */\n\t\tpadding: 0;\n\n\t\t/* Specificity matters here. See https://github.com/ckeditor/ckeditor5-theme-lark/issues/168. */\n\t\t& > .ck-toolbar__items > .ck {\n\t\t\t/* Items in a vertical toolbar should span the horizontal space. */\n\t\t\twidth: 100%;\n\n\t\t\t/* Items in a vertical toolbar should have no margin. */\n\t\t\tmargin: 0;\n\n\t\t\t/* Items in a vertical toolbar span the entire width so rounded corners are pointless. */\n\t\t\tborder-radius: 0;\n\t\t}\n\t}\n\n\t&.ck-toolbar_compact {\n\t\t/* No spacing around items. */\n\t\tpadding: 0;\n\n\t\t& > .ck-toolbar__items > * {\n\t\t\t/* Compact toolbar items have no spacing between them. */\n\t\t\tmargin: 0;\n\n\t\t\t/* "Middle" children should have no rounded corners. */\n\t\t\t&:not(:first-child):not(:last-child) {\n\t\t\t\tborder-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/*\n\t\t * Dropdown button has asymmetric padding to fit the arrow.\n\t\t * This button has no arrow so let\'s revert that padding back to normal.\n\t\t */\n\t\t& > .ck.ck-button.ck-dropdown__button {\n\t\t\tpadding-left: var(--ck-spacing-tiny);\n\t\t}\n\t}\n\n\t/* A drop-down containing the nested toolbar with configured items. */\n\t& .ck-toolbar__nested-toolbar-dropdown {\n\t\t/* Prevent empty space in the panel when the dropdown label is visible and long but the toolbar has few items. */\n\t\t& > .ck-dropdown__panel {\n\t\t\tmin-width: auto;\n\t\t}\n\n\t\t& > .ck-button > .ck-button__label {\n\t\t\tmax-width: 7em;\n\t\t\twidth: auto;\n\t\t}\n\t}\n\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t@nest .ck-toolbar-container & {\n\t\tborder: 0;\n\t}\n}\n\n/* stylelint-disable */\n\n/*\n * Styles for RTL toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="rtl"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="rtl"] {\n\t& > .ck-toolbar__items > .ck {\n\t\tmargin-right: 0;\n\t}\n\n\t&:not(.ck-toolbar_compact) > .ck-toolbar__items > .ck {\n\t\t/* (#11) Separate toolbar items. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-left: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n/*\n * Styles for LTR toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="ltr"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="ltr"] {\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-right: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n}\n\n/* stylelint-enable */\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},9948:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/tooltip/tooltip.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/tooltip/tooltip.css"],names:[],mappings:"AAKA,gCCGC,6BAA8B,CAC9B,6BAA8B,CAC9B,iCAAkC,CAClC,6BAA8B,CAC9B,8DAA+D,CAE/D,kCAAmC,CDPnC,mBAAoB,CAEpB,qCACD,CCMC,kDAGC,kCAAmC,CAFnC,cAAe,CACf,eAED,CAbD,gCAgBC,eAMD,CAHC,uCACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-balloon-panel.ck-tooltip {\n\t/* Keep tooltips transparent for any interactions. */\n\tpointer-events: none;\n\n\tz-index: calc( var(--ck-z-modal) + 100 );\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n.ck.ck-balloon-panel.ck-tooltip {\n\t--ck-balloon-border-width: 0px;\n\t--ck-balloon-arrow-offset: 0px;\n\t--ck-balloon-arrow-half-width: 4px;\n\t--ck-balloon-arrow-height: 4px;\n\t--ck-color-panel-background: var(--ck-color-tooltip-background);\n\n\tpadding: 0 var(--ck-spacing-medium);\n\n\t& .ck-tooltip__text {\n\t\tfont-size: .9em;\n\t\tline-height: 1.5;\n\t\tcolor: var(--ck-color-tooltip-text);\n\t}\n\n\t/* Reset balloon panel styles */\n\tbox-shadow: none;\n\n\t/* Hide the default shadow of the .ck-balloon-panel tip */\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n'],sourceRoot:""}]);const a=s},6150:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);border:0;box-shadow:none;min-height:unset}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{align-items:center;cursor:pointer;display:flex;filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_hidden.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_reset.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_zindex.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_transition.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_poweredby.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_colors.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_disabled.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_fonts.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_reset.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_spacing.css"],names:[],mappings:"AAQA,WAGC,sBACD,CCPA,2EAGC,qBAAsB,CAEtB,WAAY,CACZ,eAAgB,CAFhB,UAGD,CCPA,MACC,gBAAiB,CACjB,4CACD,CCAA,oDAEC,yBACD,CCNA,MACC,gCAAiC,CACjC,oCAAqC,CACrC,sCAAuC,CACvC,kCAA2C,CAC3C,qDAAsD,CACtD,+BAA4C,CAC5C,yDACD,CAEA,2CACC,qDAAsD,CAItD,0CAA2C,CAF3C,QAAS,CACT,eAAgB,CAEhB,gBA6CD,CA3CC,6DACC,4CAoCD,CAlCC,+DAGC,kBAAmB,CAFnB,cAAe,CACf,YAAa,CAGb,qBAAsB,CACtB,4CAA6C,CAF7C,WAAY,CAGZ,qFACD,CAEA,mFASC,qCAAsC,CAFtC,cAAe,CANf,eAAgB,CAIhB,eAAiB,CAHjB,oBAAqB,CAMrB,kBAAmB,CAFnB,gBAAiB,CAHjB,gBAAiB,CACjB,wBAOD,CAEA,sEAEC,cAAe,CADf,aAED,CAGC,qEACC,mBAAqB,CACrB,SACD,CAIF,mEACC,2BAA4B,CAC5B,8CACD,CC5DD,MACC,kCAAmD,CACnD,+BAAoD,CACpD,8BAAkD,CAClD,8BAAuD,CACvD,6BAAmD,CACnD,yBAA+C,CAC/C,8BAAsD,CACtD,oCAA4D,CAC5D,6BAAkD,CAIlD,mDAA4D,CAC5D,qEAA+E,CAC/E,qCAA4D,CAC5D,qDAA8D,CAC9D,gDAAyD,CACzD,yCAAqD,CACrD,sCAAsD,CACtD,4CAA0D,CAC1D,sCAAsD,CAItD,gDAAuD,CACvD,kDAAiE,CACjE,mDAAkE,CAClE,yDAA8D,CAE9D,uCAA6D,CAC7D,6CAAoE,CACpE,8CAAoE,CACpE,gDAAiE,CACjE,kCAAyD,CAGzD,+DAAsE,CACtE,iDAAsE,CACtE,kDAAsE,CACtE,oDAAoE,CACpE,6DAAsE,CAEtE,8BAAoD,CACpD,gCAAqD,CAErD,+CAA8D,CAC9D,qDAAiE,CACjE,+EAAqF,CACrF,oDAAuE,CACvE,yEAA8E,CAC9E,oDAAgE,CAIhE,oEAA2E,CAC3E,4DAAoE,CAIpE,2DAAoE,CACpE,mDAA6D,CAC7D,wDAAgE,CAChE,+CAA0D,CAC1D,4CAA2D,CAC3D,4DAAoE,CACpE,sCAAsD,CAItD,0DAAmE,CACnE,uFAA6F,CAC7F,oEAA2E,CAC3E,0EAA+E,CAC/E,8DAAsE,CAItE,2DAAoE,CACpE,mDAA6D,CAI7D,6DAAsE,CACtE,qDAA+D,CAI/D,uDAAgE,CAChE,uDAAiE,CAIjE,0CAAyD,CAIzD,wCAA2D,CAI3D,+BAAoD,CACpD,uDAAmE,CACnE,kDAAgE,CAIhE,oCAAwD,CCvGxD,wBAAyB,CCAzB,0CAA2C,CAK3C,gGAAiG,CAKjG,4GAA6G,CAK7G,sGAAuG,CAKvG,sDAAuD,CCvBvD,wBAAyB,CACzB,6BAA8B,CAC9B,wDAA6D,CAE7D,yBAA0B,CAC1B,2BAA4B,CAC5B,yBAA0B,CAC1B,wBAAyB,CACzB,0BAA2B,CCJ3B,kCJuGD,CIjGA,2EAaC,oBAAqB,CANrB,sBAAuB,CADvB,QAAS,CAFT,QAAS,CACT,SAAU,CAGV,oBAAqB,CAErB,eAAgB,CADhB,qBAKD,CAKA,8DAGC,wBAAyB,CAEzB,0BAA2B,CAG3B,WAAY,CACZ,UAAW,CALX,iGAAkG,CAElG,eAAgB,CAChB,kBAGD,CAGC,qDACC,gBACD,CAEA,mDAEC,sBACD,CAEA,qDACC,oBACD,CAEA,mLAGC,WACD,CAEA,iNAGC,cACD,CAEA,qDAEC,yBAAoC,CADpC,YAED,CAEA,qEAGC,QAAQ,CADR,SAED,CAMD,8BAEC,gBACD,CCnFA,MACC,sBAAuB,CCAvB,gEAAiE,CAKjE,0DAA2D,CAK3D,wEAAyE,CCbzE,uBAA8B,CAC9B,mDAA2D,CAC3D,4CAAkD,CAClD,oDAA4D,CAC5D,mDAA2D,CAC3D,kDAA2D,CAC3D,yDFFD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which hides an element in DOM.\n */\n.ck-hidden {\n\t/* Override selector specificity. Otherwise, all elements with some display\n\tstyle defined will override this one, which is not a desired result. */\n\tdisplay: none !important;\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\tbox-sizing: border-box;\n\twidth: auto;\n\theight: auto;\n\tposition: static;\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-z-default: 1;\n\t--ck-z-modal: calc( var(--ck-z-default) + 999 );\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class that disables all transitions of the element and its children.\n */\n.ck-transitions-disabled,\n.ck-transitions-disabled * {\n\ttransition: none !important;\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-powered-by-line-height: 10px;\n\t--ck-powered-by-padding-vertical: 2px;\n\t--ck-powered-by-padding-horizontal: 4px;\n\t--ck-powered-by-text-color: hsl(0, 0%, 31%);\n\t--ck-powered-by-border-radius: var(--ck-border-radius);\n\t--ck-powered-by-background: hsl(0, 0%, 100%);\n\t--ck-powered-by-border-color: var(--ck-color-focus-border);\n}\n\n.ck.ck-balloon-panel.ck-powered-by-balloon {\n\t--ck-border-radius: var(--ck-powered-by-border-radius);\n\n\tborder: 0;\n\tbox-shadow: none;\n\tbackground: var(--ck-powered-by-background);\n\tmin-height: unset;\n\n\t& .ck.ck-powered-by {\n\t\tline-height: var(--ck-powered-by-line-height);\n\n\t\t& a {\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\topacity: .66;\n\t\t\tfilter: grayscale(80%);\n\t\t\tline-height: var(--ck-powered-by-line-height);\n\t\t\tpadding: var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal);\n\t\t}\n\n\t\t& .ck-powered-by__label {\n\t\t\tfont-size: 7.5px;\n\t\t\tletter-spacing: -.2px;\n\t\t\tpadding-left: 2px;\n\t\t\ttext-transform: uppercase;\n\t\t\tfont-weight: bold;\n\t\t\tmargin-right: 4px;\n\t\t\tcursor: pointer;\n\t\t\tline-height: normal;\n\t\t\tcolor: var(--ck-powered-by-text-color);\n\n\t\t}\n\n\t\t& .ck-icon {\n\t\t\tdisplay: block;\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&:hover {\n\t\t\t& a {\n\t\t\t\tfilter: grayscale(0%);\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n\n\t&[class*="position_border"] {\n\t\tborder: var(--ck-focus-ring);\n\t\tborder-color: var(--ck-powered-by-border-color);\n\t}\n}\n\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-base-foreground: \t\t\t\t\t\t\t\thsl(0, 0%, 98%);\n\t--ck-color-base-background: \t\t\t\t\t\t\t\thsl(0, 0%, 100%);\n\t--ck-color-base-border: \t\t\t\t\t\t\t\t\thsl(220, 6%, 81%);\n\t--ck-color-base-action: \t\t\t\t\t\t\t\t\thsl(104, 50.2%, 42.5%);\n\t--ck-color-base-focus: \t\t\t\t\t\t\t\t\t\thsl(209, 92%, 70%);\n\t--ck-color-base-text: \t\t\t\t\t\t\t\t\t\thsl(0, 0%, 20%);\n\t--ck-color-base-active: \t\t\t\t\t\t\t\t\thsl(218.1, 100%, 58%);\n\t--ck-color-base-active-focus:\t\t\t\t\t\t\t\thsl(218.2, 100%, 52.5%);\n\t--ck-color-base-error:\t\t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t/* -- Generic colors ------------------------------------------------------------------------ */\n\n\t--ck-color-focus-border-coordinates: \t\t\t\t\t\t218, 81.8%, 56.9%;\n\t--ck-color-focus-border: \t\t\t\t\t\t\t\t\thsl(var(--ck-color-focus-border-coordinates));\n\t--ck-color-focus-outer-shadow:\t\t\t\t\t\t\t\thsl(212.4, 89.3%, 89%);\n\t--ck-color-focus-disabled-shadow:\t\t\t\t\t\t\thsla(209, 90%, 72%,.3);\n\t--ck-color-focus-error-shadow:\t\t\t\t\t\t\t\thsla(9,100%,56%,.3);\n\t--ck-color-text: \t\t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-shadow-drop: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.15);\n\t--ck-color-shadow-drop-active:\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.2);\n\t--ck-color-shadow-inner: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Buttons ------------------------------------------------------------------------------- */\n\n\t--ck-color-button-default-background: \t\t\t\t\t\ttransparent;\n\t--ck-color-button-default-hover-background: \t\t\t\thsl(0, 0%, 94.1%);\n\t--ck-color-button-default-active-background: \t\t\t\thsl(0, 0%, 94.1%);\n\t--ck-color-button-default-disabled-background: \t\t\t\ttransparent;\n\n\t--ck-color-button-on-background: \t\t\t\t\t\t\thsl(212, 100%, 97.1%);\n\t--ck-color-button-on-hover-background: \t\t\t\t\t\thsl(211.7, 100%, 92.9%);\n\t--ck-color-button-on-active-background: \t\t\t\t\thsl(211.7, 100%, 92.9%);\n\t--ck-color-button-on-disabled-background: \t\t\t\t\thsl(211, 15%, 95%);\n\t--ck-color-button-on-color:\t\t\t\t\t\t\t\t\thsl(218.1, 100%, 58%);\n\n\n\t--ck-color-button-action-background: \t\t\t\t\t\tvar(--ck-color-base-action);\n\t--ck-color-button-action-hover-background: \t\t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-button-action-active-background: \t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-button-action-disabled-background: \t\t\t\thsl(104, 44%, 58%);\n\t--ck-color-button-action-text: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t--ck-color-button-save: \t\t\t\t\t\t\t\t\thsl(120, 100%, 27%);\n\t--ck-color-button-cancel: \t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t--ck-color-switch-button-off-background:\t\t\t\t\thsl(0, 0%, 57.6%);\n\t--ck-color-switch-button-off-hover-background:\t\t\t\thsl(0, 0%, 49%);\n\t--ck-color-switch-button-on-background:\t\t\t\t\t\tvar(--ck-color-button-action-background);\n\t--ck-color-switch-button-on-hover-background:\t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-switch-button-inner-background:\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-switch-button-inner-shadow:\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Dropdown ------------------------------------------------------------------------------ */\n\n\t--ck-color-dropdown-panel-background: \t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-dropdown-panel-border: \t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Input --------------------------------------------------------------------------------- */\n\n\t--ck-color-input-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-input-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\t--ck-color-input-error-border:\t\t\t\t\t\t\t\tvar(--ck-color-base-error);\n\t--ck-color-input-text: \t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-input-disabled-background: \t\t\t\t\t\thsl(0, 0%, 95%);\n\t--ck-color-input-disabled-border: \t\t\t\t\t\t\tvar(--ck-color-base-border);\n\t--ck-color-input-disabled-text: \t\t\t\t\t\t\thsl(0, 0%, 46%);\n\n\t/* -- List ---------------------------------------------------------------------------------- */\n\n\t--ck-color-list-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-list-button-hover-background: \t\t\t\t\tvar(--ck-color-button-default-hover-background);\n\t--ck-color-list-button-on-background: \t\t\t\t\t\tvar(--ck-color-button-on-color);\n\t--ck-color-list-button-on-background-focus: \t\t\t\tvar(--ck-color-button-on-color);\n\t--ck-color-list-button-on-text:\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Panel --------------------------------------------------------------------------------- */\n\n\t--ck-color-panel-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-panel-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Toolbar ------------------------------------------------------------------------------- */\n\n\t--ck-color-toolbar-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-toolbar-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Tooltip ------------------------------------------------------------------------------- */\n\n\t--ck-color-tooltip-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-tooltip-text: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Engine -------------------------------------------------------------------------------- */\n\n\t--ck-color-engine-placeholder-text: \t\t\t\t\t\thsl(0, 0%, 44%);\n\n\t/* -- Upload -------------------------------------------------------------------------------- */\n\n\t--ck-color-upload-bar-background:\t\t \t\t\t\t\thsl(209, 92%, 70%);\n\n\t/* -- Link -------------------------------------------------------------------------------- */\n\n\t--ck-color-link-default:\t\t\t\t\t\t\t\t\thsl(240, 100%, 47%);\n\t--ck-color-link-selected-background:\t\t\t\t\t\thsla(201, 100%, 56%, 0.1);\n\t--ck-color-link-fake-selection:\t\t\t\t\t\t\t\thsla(201, 100%, 56%, 0.3);\n\n\t/* -- Search result highlight ---------------------------------------------------------------- */\n\n\t--ck-color-highlight-background:\t\t\t\t\t\t\thsl(60, 100%, 50%)\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * An opacity value of disabled UI item.\n\t */\n\t--ck-disabled-opacity: .5;\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * The geometry of the of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow-geometry: 0 0 0 3px;\n\n\t/**\n\t * A visual style of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when disabled).\n\t */\n\t--ck-focus-disabled-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when has errors).\n\t */\n\t--ck-focus-error-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);\n\n\t/**\n\t * A visual style of focused element's border or outline.\n\t */\n\t--ck-focus-ring: 1px solid var(--ck-color-focus-border);\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-font-size-base: 13px;\n\t--ck-line-height-base: 1.84615;\n\t--ck-font-face: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n\n\t--ck-font-size-tiny: 0.7em;\n\t--ck-font-size-small: 0.75em;\n\t--ck-font-size-normal: 1em;\n\t--ck-font-size-big: 1.4em;\n\t--ck-font-size-large: 1.8em;\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* This is super-important. This is **manually** adjusted so a button without an icon\n\tis never smaller than a button with icon, additionally making sure that text-less buttons\n\tare perfect squares. The value is also shared by other components which should stay "in-line"\n\twith buttons. */\n\t--ck-ui-component-min-height: 2.3em;\n}\n\n/**\n * Resets an element, ignoring its children.\n */\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\t/* Do not include inheritable rules here. */\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tbackground: transparent;\n\ttext-decoration: none;\n\tvertical-align: middle;\n\ttransition: none;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/105 */\n\tword-wrap: break-word;\n}\n\n/**\n * Resets an element AND its children.\n */\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\t/* These are rule inherited by all children elements. */\n\tborder-collapse: collapse;\n\tfont: normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);\n\tcolor: var(--ck-color-text);\n\ttext-align: left;\n\twhite-space: nowrap;\n\tcursor: auto;\n\tfloat: none;\n}\n\n.ck-reset_all {\n\t& .ck-rtl *:not(.ck-reset_all-excluded *) {\n\t\ttext-align: right;\n\t}\n\n\t& iframe:not(.ck-reset_all-excluded *) {\n\t\t/* For IE */\n\t\tvertical-align: inherit;\n\t}\n\n\t& textarea:not(.ck-reset_all-excluded *) {\n\t\twhite-space: pre-wrap;\n\t}\n\n\t& textarea:not(.ck-reset_all-excluded *),\n\t& input[type="text"]:not(.ck-reset_all-excluded *),\n\t& input[type="password"]:not(.ck-reset_all-excluded *) {\n\t\tcursor: text;\n\t}\n\n\t& textarea[disabled]:not(.ck-reset_all-excluded *),\n\t& input[type="text"][disabled]:not(.ck-reset_all-excluded *),\n\t& input[type="password"][disabled]:not(.ck-reset_all-excluded *) {\n\t\tcursor: default;\n\t}\n\n\t& fieldset:not(.ck-reset_all-excluded *) {\n\t\tpadding: 10px;\n\t\tborder: 2px groove hsl(255, 7%, 88%);\n\t}\n\n\t& button:not(.ck-reset_all-excluded *)::-moz-focus-inner {\n\t\t/* See http://stackoverflow.com/questions/5517744/remove-extra-button-spacing-padding-in-firefox */\n\t\tpadding: 0;\n\t\tborder: 0\n\t}\n}\n\n/**\n * Default UI rules for RTL languages.\n */\n.ck[dir="rtl"],\n.ck[dir="rtl"] .ck {\n\ttext-align: right;\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Default border-radius value.\n */\n:root{\n\t--ck-border-radius: 2px;\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * A visual style of element's inner shadow (i.e. input).\n\t */\n\t--ck-inner-shadow: 2px 2px 3px var(--ck-color-shadow-inner) inset;\n\n\t/**\n\t * A visual style of element's drop shadow (i.e. panel).\n\t */\n\t--ck-drop-shadow: 0 1px 2px 1px var(--ck-color-shadow-drop);\n\n\t/**\n\t * A visual style of element's active shadow (i.e. comment or suggestion).\n\t */\n\t--ck-drop-shadow-active: 0 3px 6px 1px var(--ck-color-shadow-drop-active);\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-spacing-unit: \t\t\t\t\t\t0.6em;\n\t--ck-spacing-large: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 1.5);\n\t--ck-spacing-standard: \t\t\t\t\tvar(--ck-spacing-unit);\n\t--ck-spacing-medium: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.8);\n\t--ck-spacing-small: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.5);\n\t--ck-spacing-tiny: \t\t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.3);\n\t--ck-spacing-extra-tiny: \t\t\t\tcalc(var(--ck-spacing-unit) * 0.16);\n}\n"],sourceRoot:""}]);const a=s},6507:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-widget/theme/widget.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-widget/widget.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MACC,+CAAgD,CAChD,6CAAsD,CACtD,uCAAgD,CAEhD,kDAAmD,CACnD,gCAAiC,CACjC,kEACD,CAOA,8DAEC,iBAqBD,CAnBC,4EACC,iBAOD,CALC,qFAGC,aACD,CASD,iLACC,kBACD,CAGD,kBACC,qDAAsD,CAEtD,qDAAsD,CACtD,6CAA8C,CAF9C,0CAA2C,CAI3C,aAAc,CADd,kCAAmC,CAGnC,uCAAwC,CACxC,4CAA6C,CAF7C,iCAsCD,CAlCC,8NAKC,iBACD,CAEA,0CAEC,qCAAsC,CADtC,oCAED,CAEA,2CAEC,sCAAuC,CADvC,oCAED,CAEA,8CACC,uCAAwC,CACxC,sCACD,CAEA,6CACC,uCAAwC,CACxC,qCACD,CAGA,8CAEC,QAAS,CADT,6CAAgD,CAEhD,yBACD,CCjFD,MACC,iCAAkC,CAClC,kCAAmC,CACnC,4CAA6C,CAC7C,wCAAyC,CAEzC,wCAAiD,CACjD,sCAAkD,CAClD,2EAA4E,CAC5E,yEACD,CAEA,eAGC,yBAA0B,CAD1B,mBAAoB,CADpB,gDAAiD,CAGjD,6GAUD,CARC,0EAEC,6EACD,CAEA,qBACC,iDACD,CAGD,gCACC,4BAWD,CAPC,yGAKC,iEAAkE,CCnCnE,2BAA2B,CCF3B,qCAA8B,CDC9B,YDqCA,CAIA,4EAKC,4BAA6B,CAa7B,iEAAkE,CAhBlE,qBAAsB,CAoBtB,mDAAoD,CAhBpD,SAAU,CALV,WAAY,CAsBZ,KAAM,CAFN,2BAA4B,CAT5B,6SAgCD,CAnBC,qFAIC,oDAAqD,CADrD,yCAA0C,CAD1C,wCAWD,CANC,kHACC,SAAU,CAGV,+DACD,CAID,wHACC,SACD,CAID,kFAEC,oDAAqD,CADrD,SAED,CAKC,oMAEC,6CAA8C,CAD9C,SAOD,CAHC,gRACC,SACD,CAOH,qFACC,SAAU,CACV,oDACD,CAGA,gDAEC,eAkBD,CAhBC,yEAOC,iCACD,CAGC,gOAEC,gDACD,CAOD,wIAEC,mDAQD,CALE,ghBAEC,gDACD,CAKH,yKAOC,yDACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-resizer: var(--ck-color-focus-border);\n\t--ck-color-resizer-tooltip-background: hsl(0, 0%, 15%);\n\t--ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);\n\n\t--ck-resizer-border-radius: var(--ck-border-radius);\n\t--ck-resizer-tooltip-offset: 10px;\n\t--ck-resizer-tooltip-height: calc(var(--ck-spacing-small) * 2 + 10px);\n}\n\n.ck .ck-widget {\n\t/* This is neccessary for type around UI to be positioned properly. */\n\tposition: relative;\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n\n\t& .ck-widget__selection-handle {\n\t\tposition: absolute;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the icon in not a subject to font-size or line-height to avoid\n\t\t\tunnecessary spacing around it. */\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t/* Show the selection handle on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n\n\t/* Show the selection handle when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n}\n\n.ck .ck-size-view {\n\tbackground: var(--ck-color-resizer-tooltip-background);\n\tcolor: var(--ck-color-resizer-tooltip-text);\n\tborder: 1px solid var(--ck-color-resizer-tooltip-text);\n\tborder-radius: var(--ck-resizer-border-radius);\n\tfont-size: var(--ck-font-size-tiny);\n\tdisplay: block;\n\tpadding: 0 var(--ck-spacing-small);\n\theight: var(--ck-resizer-tooltip-height);\n\tline-height: var(--ck-resizer-tooltip-height);\n\n\t&.ck-orientation-top-left,\n\t&.ck-orientation-top-right,\n\t&.ck-orientation-bottom-right,\n\t&.ck-orientation-bottom-left,\n\t&.ck-orientation-above-center {\n\t\tposition: absolute;\n\t}\n\n\t&.ck-orientation-top-left {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-top-right {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-right {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-left {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t/* Class applied if the widget is too small to contain the size label */\n\t&.ck-orientation-above-center {\n\t\ttop: calc(var(--ck-resizer-tooltip-height) * -1);\n\t\tleft: 50%;\n\t\ttransform: translate(-50%);\n\t}\n}\n",'/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n\n:root {\n\t--ck-widget-outline-thickness: 3px;\n\t--ck-widget-handler-icon-size: 16px;\n\t--ck-widget-handler-animation-duration: 200ms;\n\t--ck-widget-handler-animation-curve: ease;\n\n\t--ck-color-widget-blurred-border: hsl(0, 0%, 87%);\n\t--ck-color-widget-hover-border: hsl(43, 100%, 62%);\n\t--ck-color-widget-editable-focus-background: var(--ck-color-base-background);\n\t--ck-color-widget-drag-handler-icon-color: var(--ck-color-base-background);\n}\n\n.ck .ck-widget {\n\toutline-width: var(--ck-widget-outline-thickness);\n\toutline-style: solid;\n\toutline-color: transparent;\n\ttransition: outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border);\n\t}\n\n\t&:hover {\n\t\toutline-color: var(--ck-color-widget-hover-border);\n\t}\n}\n\n.ck .ck-editor__nested-editable {\n\tborder: 1px solid transparent;\n\n\t/* The :focus style is applied before .ck-editor__nested-editable_focused class is rendered in the view.\n\tThese styles show a different border for a blink of an eye, so `:focus` need to have same styles applied. */\n\t&.ck-editor__nested-editable_focused,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\n\t\tbackground-color: var(--ck-color-widget-editable-focus-background);\n\t}\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t& .ck-widget__selection-handle {\n\t\tpadding: 4px;\n\t\tbox-sizing: border-box;\n\n\t\t/* Background and opacity will be animated as the handler shows up or the widget gets selected. */\n\t\tbackground-color: transparent;\n\t\topacity: 0;\n\n\t\t/* Transition:\n\t\t * background-color for the .ck-widget_selected state change,\n\t\t * visibility for hiding the handler,\n\t\t * opacity for the proper look of the icon when the handler disappears. */\n\t\ttransition:\n\t\t\tbackground-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\tvisibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\topacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t\t/* Make only top corners round. */\n\t\tborder-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0;\n\n\t\t/* Place the drag handler outside the widget wrapper. */\n\t\ttransform: translateY(-100%);\n\t\tleft: calc(0px - var(--ck-widget-outline-thickness));\n\t\ttop: 0;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the dimensions of the icon are independent of the fon-size of the content. */\n\t\t\twidth: var(--ck-widget-handler-icon-size);\n\t\t\theight: var(--ck-widget-handler-icon-size);\n\t\t\tcolor: var(--ck-color-widget-drag-handler-icon-color);\n\n\t\t\t/* The "selected" part of the icon is invisible by default */\n\t\t\t& .ck-icon__selected-indicator {\n\t\t\t\topacity: 0;\n\n\t\t\t\t/* Note: The animation is longer on purpose. Simply feels better. */\n\t\t\t\ttransition: opacity 300ms var(--ck-widget-handler-animation-curve);\n\t\t\t}\n\t\t}\n\n\t\t/* Advertise using the look of the icon that once clicked the handler, the widget will be selected. */\n\t\t&:hover .ck-icon .ck-icon__selected-indicator {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t/* Show the selection handler on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\topacity: 1;\n\t\tbackground-color: var(--ck-color-widget-hover-border);\n\t}\n\n\t/* Show the selection handler when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\t& > .ck-widget__selection-handle {\n\t\t\topacity: 1;\n\t\t\tbackground-color: var(--ck-color-focus-border);\n\n\t\t\t/* When the widget is selected, notify the user using the proper look of the icon. */\n\t\t\t& .ck-icon .ck-icon__selected-indicator {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/* In a RTL environment, align the selection handler to the right side of the widget */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle {\n\tleft: auto;\n\tright: calc(0px - var(--ck-widget-outline-thickness));\n}\n\n/* https://github.com/ckeditor/ckeditor5/issues/6415 */\n.ck.ck-editor__editable.ck-read-only .ck-widget {\n\t/* Prevent the :hover outline from showing up because of the used outline-color transition. */\n\ttransition: none;\n\n\t&:not(.ck-widget_selected) {\n\t\t/* Disable visual effects of hover/active widget when CKEditor is in readOnly mode.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/1261\n\t\t *\n\t\t * Leave the unit because this custom property is used in calc() by other features.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/6775\n\t\t */\n\t\t--ck-widget-outline-thickness: 0px;\n\t}\n\n\t&.ck-widget_with-selection-handle {\n\t\t& .ck-widget__selection-handle,\n\t\t& .ck-widget__selection-handle:hover {\n\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t}\n\t}\n}\n\n/* Style the widget when it\'s selected but the editable it belongs to lost focus. */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck.ck-editor__editable.ck-blurred .ck-widget {\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline-color: var(--ck-color-widget-blurred-border);\n\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t& > .ck-widget__selection-handle,\n\t\t\t& > .ck-widget__selection-handle:hover {\n\t\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable > .ck-widget.ck-widget_with-selection-handle:first-child,\n.ck.ck-editor__editable blockquote > .ck-widget.ck-widget_with-selection-handle:first-child {\n\t/* Do not crop selection handler if a widget is a first-child in the blockquote or in the root editable.\n\tIn fact, anything with overflow: hidden.\n\thttps://github.com/ckeditor/ckeditor5-block-quote/issues/28\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/44\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/66 */\n\tmargin-top: calc(1em + var(--ck-widget-handler-icon-size));\n}\n',"/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},2263:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-widget/theme/widgetresize.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-widget/widgetresize.css"],names:[],mappings:"AAKA,4BAEC,iBACD,CAEA,wBACC,YAAa,CAMb,MAAO,CAFP,mBAAoB,CAHpB,iBAAkB,CAMlB,KACD,CAGC,2EACC,aACD,CAGD,gCAIC,kBAAmB,CAHnB,iBAcD,CATC,4IAEC,kBACD,CAEA,4IAEC,kBACD,CCpCD,MACC,sBAAuB,CAGvB,yDAAiE,CACjE,6BACD,CAEA,wBACC,yCACD,CAEA,gCAGC,uCAAwC,CACxC,gDAA6D,CAC7D,6CAA8C,CAH9C,6BAA8B,CAD9B,4BAyBD,CAnBC,oEAEC,6BAA8B,CAD9B,4BAED,CAEA,qEAEC,8BAA+B,CAD/B,4BAED,CAEA,wEACC,+BAAgC,CAChC,8BACD,CAEA,uEACC,+BAAgC,CAChC,6BACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget_with-resizer {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n}\n\n.ck .ck-widget__resizer {\n\tdisplay: none;\n\tposition: absolute;\n\n\t/* The wrapper itself should not interfere with the pointer device, only the handles should. */\n\tpointer-events: none;\n\n\tleft: 0;\n\ttop: 0;\n}\n\n.ck-focused .ck-widget_with-resizer.ck-widget_selected {\n\t& > .ck-widget__resizer {\n\t\tdisplay: block;\n\t}\n}\n\n.ck .ck-widget__resizer__handle {\n\tposition: absolute;\n\n\t/* Resizers are the only UI elements that should interfere with a pointer device. */\n\tpointer-events: all;\n\n\t&.ck-widget__resizer__handle-top-left,\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tcursor: nwse-resize;\n\t}\n\n\t&.ck-widget__resizer__handle-top-right,\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tcursor: nesw-resize;\n\t}\n}\n","/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-resizer-size: 10px;\n\n\t/* Set the resizer with a 50% offset. */\n\t--ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px);\n\t--ck-resizer-border-width: 1px;\n}\n\n.ck .ck-widget__resizer {\n\toutline: 1px solid var(--ck-color-resizer);\n}\n\n.ck .ck-widget__resizer__handle {\n\twidth: var(--ck-resizer-size);\n\theight: var(--ck-resizer-size);\n\tbackground: var(--ck-color-focus-border);\n\tborder: var(--ck-resizer-border-width) solid hsl(0, 0%, 100%);\n\tborder-radius: var(--ck-resizer-border-radius);\n\n\t&.ck-widget__resizer__handle-top-left {\n\t\ttop: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-top-right {\n\t\ttop: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n}\n"],sourceRoot:""}]);const a=s},5137:(e,t,o)=>{"use strict";o.d(t,{Z:()=>a});var n=o(7537),r=o.n(n),i=o(3645),s=o.n(i)()(r());s.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-widget/theme/widgettypearound.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-widget/widgettypearound.css"],names:[],mappings:"AASC,+CACC,aAAc,CAEd,eAAgB,CADhB,iBAAkB,CAElB,2BAwBD,CAtBC,mDAGC,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAEA,qFAGC,kBAAoB,CADpB,gDAAoD,CAGpD,0BACD,CAEA,oFAEC,mDAAuD,CACvD,mBAAqB,CAErB,yBACD,CAUA,mLACC,UAAW,CACX,aAAc,CAGd,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAMD,2EACC,YAAa,CAEb,MAAO,CADP,iBAAkB,CAElB,OACD,CAOA,iFACC,gDAAqD,CACrD,iDACD,CAKA,wHAEC,aAAc,CADd,qDAED,CAKA,uHACC,wDAA6D,CAC7D,aACD,CAoBD,mOACC,YACD,CC3GA,MACC,wCAAyC,CACzC,wEAAyE,CACzE,8EAA+E,CAC/E,2FAA4F,CAC5F,wDAAyD,CACzD,uDAAwD,CACxD,yEACD,CAgBC,+CAGC,oDAAqD,CACrD,mBAAoB,CAFpB,+CAAgD,CAVjD,SAAU,CACV,mBAAoB,CAYnB,uMAAyM,CAJzM,8CAkDD,CA1CC,mDAEC,UAAW,CAGX,cAAe,CAFf,8BAA+B,CAC/B,6BAA8B,CAH9B,UAoBD,CAdC,qDACC,mBAAoB,CACpB,mBAAoB,CAEpB,SAAU,CACV,qDAAsD,CACtD,kBAAmB,CACnB,oBAAqB,CACrB,qBACD,CAEA,wDACC,kBACD,CAGD,qDAIC,6DAcD,CARE,kEACC,oDACD,CAEA,8DACC,wDACD,CAUF,uKAvED,SAAU,CACV,mBAwEC,CAOD,gGACC,0DACD,CAOA,uKAEC,2DAQD,CANC,mLAIC,uEAAkF,CADlF,mBAAoB,CADpB,2DAA4D,CAD5D,0DAID,CAOD,8GACC,gBACD,CAKA,mDAGC,mFAAoF,CAOpF,oCAAqC,CARrC,UAAW,CAOX,oCAAwC,CARxC,mBAUD,CAOC,6JAEC,yBACD,CAUA,yKACC,iDACD,CAMA,uOAlJD,SAAU,CACV,mBAmJC,CAoBA,6yBACC,SACD,CASF,uHACC,aAAc,CACd,iBACD,CAYG,iRAlMF,SAAU,CACV,mBAmME,CAQH,kIACC,qEAKD,CAHC,wIACC,WACD,CAGD,4CACC,GACC,oBACD,CACA,OACC,mBACD,CACD,CAEA,gDACC,OACC,mBACD,CACA,OACC,mBACD,CACD,CAEA,8CACC,GACC,6HACD,CACA,IACC,6HACD,CACA,GACC,+HACD,CACD,CAEA,kDACC,GACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\toverflow: hidden;\n\t\tz-index: var(--ck-z-default);\n\n\t\t& svg {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: 50%;\n\t\t\tz-index: calc(var(--ck-z-default) + 2);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_before {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\ttop: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tleft: min(10%, 30px);\n\n\t\t\ttransform: translateY(-50%);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_after {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\tbottom: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tright: min(10%, 30px);\n\n\t\t\ttransform: translateY(50%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 1px;\n\t\t\tleft: 1px;\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t}\n\n\t/*\n\t * When the widget is hovered the "fake caret" would normally be narrower than the\n\t * extra outline displayed around the widget. Let\'s extend the "fake caret" to match\n\t * the full width of the widget.\n\t */\n\t&:hover > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tleft: calc( -1 * var(--ck-widget-outline-thickness) );\n\t\tright: calc( -1 * var(--ck-widget-outline-thickness) );\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed before the widget (backward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\ttop: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed after the widget (forward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tbottom: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n}\n\n/*\n * Integration with the read-only mode of the editor.\n */\n.ck.ck-editor__editable.ck-read-only .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the restricted editing mode (feature) of the editor.\n */\n.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the #isEnabled property of the WidgetTypeAround plugin.\n */\n.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around {\n\tdisplay: none;\n}\n','/*\n * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-widget-type-around-button-size: 20px;\n\t--ck-color-widget-type-around-button-active: var(--ck-color-focus-border);\n\t--ck-color-widget-type-around-button-hover: var(--ck-color-widget-hover-border);\n\t--ck-color-widget-type-around-button-blurred-editable: var(--ck-color-widget-blurred-border);\n\t--ck-color-widget-type-around-button-radar-start-alpha: 0;\n\t--ck-color-widget-type-around-button-radar-end-alpha: .3;\n\t--ck-color-widget-type-around-button-icon: var(--ck-color-base-background);\n}\n\n@define-mixin ck-widget-type-around-button-visible {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n@define-mixin ck-widget-type-around-button-hidden {\n\topacity: 0;\n\tpointer-events: none;\n}\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\twidth: var(--ck-widget-type-around-button-size);\n\t\theight: var(--ck-widget-type-around-button-size);\n\t\tbackground: var(--ck-color-widget-type-around-button);\n\t\tborder-radius: 100px;\n\t\ttransition: opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve), background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t\t@mixin ck-widget-type-around-button-hidden;\n\n\t\t& svg {\n\t\t\twidth: 10px;\n\t\t\theight: 8px;\n\t\t\ttransform: translate(-50%,-50%);\n\t\t\ttransition: transform .5s ease;\n\t\t\tmargin-top: 1px;\n\n\t\t\t& * {\n\t\t\t\tstroke-dasharray: 10;\n\t\t\t\tstroke-dashoffset: 0;\n\n\t\t\t\tfill: none;\n\t\t\t\tstroke: var(--ck-color-widget-type-around-button-icon);\n\t\t\t\tstroke-width: 1.5px;\n\t\t\t\tstroke-linecap: round;\n\t\t\t\tstroke-linejoin: round;\n\t\t\t}\n\n\t\t\t& line {\n\t\t\t\tstroke-dasharray: 7;\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t/*\n\t\t\t * Display the "sonar" around the button when hovered.\n\t\t\t */\n\t\t\tanimation: ck-widget-type-around-button-sonar 1s ease infinite;\n\n\t\t\t/*\n\t\t\t * Animate active button\'s icon.\n\t\t\t */\n\t\t\t& svg {\n\t\t\t\t& polyline {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-dash 2s linear;\n\t\t\t\t}\n\n\t\t\t\t& line {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-tip-dash 2s linear;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Show type around buttons when the widget gets selected or being hovered.\n\t */\n\t&.ck-widget_selected,\n\t&:hover {\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-visible;\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when the widget is NOT selected (but the buttons are visible\n\t * and still can be hovered).\n\t */\n\t&:not(.ck-widget_selected) > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\tbackground: var(--ck-color-widget-type-around-button-hover);\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\tbackground: var(--ck-color-widget-type-around-button-active);\n\n\t\t&::after {\n\t\t\twidth: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\theight: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\tborder-radius: 100px;\n\t\t\tbackground: linear-gradient(135deg, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,.3) 100%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the "before" button when the widget has a selection handle. Because some space\n\t * is consumed by the handle, the button must be moved slightly to the right to let it breathe.\n\t */\n\t&.ck-widget_with-selection-handle > .ck-widget__type-around > .ck-widget__type-around__button_before {\n\t\tmargin-left: 20px;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& .ck-widget__type-around__fake-caret {\n\t\tpointer-events: none;\n\t\theight: 1px;\n\t\tanimation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards;\n\n\t\t/*\n\t\t * The semi-transparent-outline+background combo improves the contrast\n\t\t * when the background underneath the fake caret is dark.\n\t\t */\n\t\toutline: solid 1px hsla(0, 0%, 100%, .5);\n\t\tbackground: var(--ck-color-base-text);\n\t}\n\n\t/*\n\t * Styles of the widget when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t * Despite the widget being physically selected in the model, its outline should disappear.\n\t */\n\t&.ck-widget_selected {\n\t\t&.ck-widget_type-around_show-fake-caret_before,\n\t\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t\toutline-color: transparent;\n\t\t}\n\t}\n\n\t&.ck-widget_type-around_show-fake-caret_before,\n\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t/*\n\t\t * When the "fake caret" is visible we simulate that the widget is not selected\n\t\t * (despite being physically selected), so the outline color should be for the\n\t\t * unselected widget.\n\t\t */\n\t\t&.ck-widget_selected:hover {\n\t\t\toutline-color: var(--ck-color-widget-hover-border);\n\t\t}\n\n\t\t/*\n\t\t * Styles of the type around buttons when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t\t * In this state, the type around buttons would collide with the fake carets so they should disappear.\n\t\t */\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the selection handle. When the caret is visible, simply\n\t\t * hide the handle because it intersects with the caret (and does not make much sense anyway).\n\t\t */\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t&.ck-widget_selected,\n\t\t\t&.ck-widget_selected:hover {\n\t\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\t\topacity: 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the resize UI. When the caret is visible, simply\n\t\t * hide the resize UI because it creates too much noise. It can be visible when the user\n\t\t * hovers the widget, though.\n\t\t */\n\t\t&.ck-widget_selected.ck-widget_with-resizer > .ck-widget__resizer {\n\t\t\topacity: 0\n\t\t}\n\t}\n}\n\n/*\n * Styles for the "before" button when the widget has a selection handle in an RTL environment.\n * The selection handler is aligned to the right side of the widget so there is no need to create\n * additional space for it next to the "before" button.\n */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around > .ck-widget__type-around__button_before {\n\tmargin-left: 0;\n\tmargin-right: 20px;\n}\n\n/*\n * Hide type around buttons when the widget is selected as a child of a selected\n * nested editable (e.g. mulit-cell table selection).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/7263.\n */\n.ck-editor__nested-editable.ck-editor__editable_selected {\n\t& .ck-widget {\n\t\t&.ck-widget_selected,\n\t\t&:hover {\n\t\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*\n * Styles for the buttons when the widget is selected but the user clicked outside of the editor (blurred the editor).\n */\n.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button:not(:hover) {\n\tbackground: var(--ck-color-widget-type-around-button-blurred-editable);\n\n\t& svg * {\n\t\tstroke: hsl(0,0%,60%);\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-dash {\n\t0% {\n\t\tstroke-dashoffset: 10;\n\t}\n\t20%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-tip-dash {\n\t0%, 20% {\n\t\tstroke-dashoffset: 7;\n\t}\n\t40%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-button-sonar {\n\t0% {\n\t\tbox-shadow: 0 0 0 0 hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n\t50% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-end-alpha));\n\t}\n\t100% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n}\n\n@keyframes ck-widget-type-around-fake-caret-pulse {\n\t0% {\n\t\topacity: 1;\n\t}\n\t49% {\n\t\topacity: 1;\n\t}\n\t50% {\n\t\topacity: 0;\n\t}\n\t99% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n'],sourceRoot:""}]);const a=s},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,n,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}},1667:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},7537:e=>{"use strict";e.exports=function(e){var t=e[1],o=e[3];if(!o)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),i="/*# ".concat(r," */");return[t].concat([i]).join("\n")}return[t].join("\n")}},8337:(e,t,o)=>{"use strict";function n(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(o){e[o]=t[o]}))})),e}function r(e){return Object.prototype.toString.call(e)}function i(e){return"[object Function]"===r(e)}function s(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var a={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var l={"http:":{validate:function(e,t,o){var n=e.slice(t);return o.re.http||(o.re.http=new RegExp("^\\/\\/"+o.re.src_auth+o.re.src_host_port_strict+o.re.src_path,"i")),o.re.http.test(n)?n.match(o.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,o){var n=e.slice(t);return o.re.no_http||(o.re.no_http=new RegExp("^"+o.re.src_auth+"(?:localhost|(?:(?:"+o.re.src_domain+")\\.)+"+o.re.src_domain_root+")"+o.re.src_port+o.re.src_host_terminator+o.re.src_path,"i")),o.re.no_http.test(n)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:n.match(o.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,o){var n=e.slice(t);return o.re.mailto||(o.re.mailto=new RegExp("^"+o.re.src_email_name+"@"+o.re.src_host_strict,"i")),o.re.mailto.test(n)?n.match(o.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(e){var t=e.re=o(6066)(e.__opts__),n=e.__tlds__.slice();function a(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(c),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(a(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(a(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(a(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(a(t.tpl_host_fuzzy_test),"i");var l=[];function d(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var o=e.__schemas__[t];if(null!==o){var n={validate:null,link:null};if(e.__compiled__[t]=n,"[object Object]"===r(o))return!function(e){return"[object RegExp]"===r(e)}(o.validate)?i(o.validate)?n.validate=o.validate:d(t,o):n.validate=function(e){return function(t,o){var n=t.slice(o);return e.test(n)?n.match(e)[0].length:0}}(o.validate),void(i(o.normalize)?n.normalize=o.normalize:o.normalize?d(t,o):n.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===r(e)}(o)?d(t,o):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var u=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(s).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function h(e,t){var o=e.__index__,n=e.__last_index__,r=e.__text_cache__.slice(o,n);this.schema=e.__schema__.toLowerCase(),this.index=o+t,this.lastIndex=n+t,this.raw=r,this.text=r,this.url=r}function p(e,t){var o=new h(e,t);return e.__compiled__[o.schema].normalize(o,e),o}function g(e,t){if(!(this instanceof g))return new g(e,t);var o;t||(o=e,Object.keys(o||{}).reduce((function(e,t){return e||a.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=n({},a,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},l,e),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},u(this)}g.prototype.add=function(e,t){return this.__schemas__[e]=t,u(this),this},g.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},g.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,o,n,r,i,s,a,l;if(this.re.schema_test.test(e))for((a=this.re.schema_search).lastIndex=0;null!==(t=a.exec(e));)if(r=this.testSchemaAt(e,t[2],a.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l=0&&null!==(n=e.match(this.re.email_fuzzy))&&(i=n.index+n[1].length,s=n.index+n[0].length,(this.__index__<0||ithis.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s)),this.__index__>=0},g.prototype.pretest=function(e){return this.re.pretest.test(e)},g.prototype.testSchemaAt=function(e,t,o){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,o,this):0},g.prototype.match=function(e){var t=0,o=[];this.__index__>=0&&this.__text_cache__===e&&(o.push(p(this,t)),t=this.__last_index__);for(var n=t?e.slice(t):e;this.test(n);)o.push(p(this,t)),n=n.slice(this.__last_index__),t+=this.__last_index__;return o.length?o:null},g.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var t=this.re.schema_at_start.exec(e);if(!t)return null;var o=this.testSchemaAt(e,t[2],t[0].length);return o?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o,p(this,0)):null},g.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,o){return e!==o[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},g.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},g.prototype.onCompile=function(){},e.exports=g},6066:(e,t,o)=>{"use strict";e.exports=function(e){var t={};e=e||{},t.src_Any=o(9369).source,t.src_Cc=o(9413).source,t.src_Z=o(5045).source,t.src_P=o(3189).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},4651:e=>{var t=!0,o=!1,n=!1;function r(e,t,o){var n=e.attrIndex(t),r=[t,o];n<0?e.attrPush(r):e.attrs[n]=r}function i(e,t){for(var o=e[t].level-1,n=t-1;n>=0;n--)if(e[n].level===o)return n;return-1}function s(e,t){return"inline"===e[t].type&&function(e){return"paragraph_open"===e.type}(e[t-1])&&function(e){return"list_item_open"===e.type}(e[t-2])&&function(e){return 0===e.content.indexOf("[ ] ")||0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] ")}(e[t])}function a(e,r){if(e.children.unshift(function(e,o){var n=new o("html_inline","",0),r=t?' disabled="" ':"";0===e.content.indexOf("[ ] ")?n.content='':0!==e.content.indexOf("[x] ")&&0!==e.content.indexOf("[X] ")||(n.content='');return n}(e,r)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),o)if(n){e.children.pop();var i="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+i+'">',e.children.push(function(e,t,o){var n=new o("html_inline","",0);return n.content='",n.attrs=[{for:t}],n}(e.content,i,r))}else e.children.unshift(function(e){var t=new e("html_inline","",0);return t.content="",t}(r))}e.exports=function(e,l){l&&(t=!l.enabled,o=!!l.label,n=!!l.labelAfter),e.core.ruler.after("inline","github-task-lists",(function(e){for(var o=e.tokens,n=2;n{"use strict";e.exports=o(7024)},6233:(e,t,o)=>{"use strict";e.exports=o(9323)},813:e=>{"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},1947:e=>{"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",o="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",n=new RegExp("^(?:"+t+"|"+o+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),r=new RegExp("^(?:"+t+"|"+o+")");e.exports.n=n,e.exports.q=r},7022:(e,t,o)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(e,t){return n.call(e,t)}function i(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function s(e){if(e>65535){var t=55296+((e-=65536)>>10),o=56320+(1023&e);return String.fromCharCode(t,o)}return String.fromCharCode(e)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,d=o(6233);var u=/[&<>"]/,h=/[&<>"]/g,p={"&":"&","<":"<",">":">",'"':"""};function g(e){return p[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var f=o(3189);t.lib={},t.lib.mdurl=o(8765),t.lib.ucmicro=o(4205),t.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(o){e[o]=t[o]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=r,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(a,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,o){return t||function(e,t){var o=0;return r(d,t)?d[t]:35===t.charCodeAt(0)&&c.test(t)&&i(o="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?s(o):e}(e,o)}))},t.isValidEntityCode=i,t.fromCodePoint=s,t.escapeHtml=function(e){return u.test(e)?e.replace(h,g):e},t.arrayReplaceAt=function(e,t,o){return[].concat(e.slice(0,t),o,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return f.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},1685:(e,t,o)=>{"use strict";t.parseLinkLabel=o(3595),t.parseLinkDestination=o(2548),t.parseLinkTitle=o(8040)},2548:(e,t,o)=>{"use strict";var n=o(7022).unescapeAll;e.exports=function(e,t,o){var r,i,s=t,a={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t32)return a;if(41===r){if(0===i)break;i--}t++}return s===t||0!==i||(a.str=n(e.slice(s,t)),a.lines=0,a.pos=t,a.ok=!0),a}},3595:e=>{"use strict";e.exports=function(e,t,o){var n,r,i,s,a=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,n=1;e.pos{"use strict";var n=o(7022).unescapeAll;e.exports=function(e,t,o){var r,i,s=0,a=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=o)return l;if(34!==(i=e.charCodeAt(t))&&39!==i&&40!==i)return l;for(t++,40===i&&(i=41);t{"use strict";var n=o(7022),r=o(1685),i=o(7529),s=o(7346),a=o(2471),l=o(4485),c=o(8337),d=o(8765),u=o(3689),h={default:o(4218),zero:o(873),commonmark:o(6895)},p=/^(vbscript|javascript|file|data):/,g=/^data:image\/(gif|png|jpeg|webp);/;function m(e){var t=e.trim().toLowerCase();return!p.test(t)||!!g.test(t)}var f=["http:","https:","mailto:"];function b(e){var t=d.parse(e,!0);if(t.hostname&&(!t.protocol||f.indexOf(t.protocol)>=0))try{t.hostname=u.toASCII(t.hostname)}catch(e){}return d.encode(d.format(t))}function k(e){var t=d.parse(e,!0);if(t.hostname&&(!t.protocol||f.indexOf(t.protocol)>=0))try{t.hostname=u.toUnicode(t.hostname)}catch(e){}return d.decode(d.format(t),d.decode.defaultChars+"%")}function w(e,t){if(!(this instanceof w))return new w(e,t);t||n.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new a,this.core=new s,this.renderer=new i,this.linkify=new c,this.validateLink=m,this.normalizeLink=b,this.normalizeLinkText=k,this.utils=n,this.helpers=n.assign({},r),this.options={},this.configure(e),t&&this.set(t)}w.prototype.set=function(e){return n.assign(this.options,e),this},w.prototype.configure=function(e){var t,o=this;if(n.isString(e)&&!(e=h[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&o.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&o[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&o[t].ruler2.enableOnly(e.components[t].rules2)})),this},w.prototype.enable=function(e,t){var o=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){o=o.concat(this[t].ruler.enable(e,!0))}),this),o=o.concat(this.inline.ruler2.enable(e,!0));var n=e.filter((function(e){return o.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},w.prototype.disable=function(e,t){var o=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){o=o.concat(this[t].ruler.disable(e,!0))}),this),o=o.concat(this.inline.ruler2.disable(e,!0));var n=e.filter((function(e){return o.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},w.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},w.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var o=new this.core.State(e,this,t);return this.core.process(o),o.tokens},w.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},w.prototype.parseInline=function(e,t){var o=new this.core.State(e,this,t);return o.inlineMode=!0,this.core.process(o),o.tokens},w.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=w},2471:(e,t,o)=>{"use strict";var n=o(9580),r=[["table",o(1785),["paragraph","reference"]],["code",o(8768)],["fence",o(3542),["paragraph","reference","blockquote","list"]],["blockquote",o(5258),["paragraph","reference","blockquote","list"]],["hr",o(5634),["paragraph","reference","blockquote","list"]],["list",o(8532),["paragraph","reference","blockquote"]],["reference",o(3804)],["html_block",o(6329),["paragraph","reference","blockquote"]],["heading",o(1630),["paragraph","reference","blockquote"]],["lheading",o(6850)],["paragraph",o(6864)]];function i(){this.ruler=new n;for(var e=0;e=o))&&!(e.sCount[s]=l){e.line=o;break}for(n=0;n{"use strict";var n=o(9580),r=[["normalize",o(4129)],["block",o(898)],["inline",o(9827)],["linkify",o(7830)],["replacements",o(2834)],["smartquotes",o(8450)],["text_join",o(6633)]];function i(){this.ruler=new n;for(var e=0;e{"use strict";var n=o(9580),r=[["text",o(9941)],["linkify",o(2906)],["newline",o(3905)],["escape",o(1917)],["backticks",o(9755)],["strikethrough",o(4814).w],["emphasis",o(7894).w],["link",o(1727)],["image",o(3006)],["autolink",o(3420)],["html_inline",o(1779)],["entity",o(9391)]],i=[["balance_pairs",o(9354)],["strikethrough",o(4814).g],["emphasis",o(7894).g],["fragments_join",o(9969)]];function s(){var e;for(this.ruler=new n,e=0;e=i)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},s.prototype.parse=function(e,t,o,n){var r,i,s,a=new this.State(e,t,o,n);for(this.tokenize(a),s=(i=this.ruler2.getRules("")).length,r=0;r{"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},4218:e=>{"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},873:e=>{"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}}},7529:(e,t,o)=>{"use strict";var n=o(7022).assign,r=o(7022).unescapeAll,i=o(7022).escapeHtml,s={};function a(){this.rules=n({},s)}s.code_inline=function(e,t,o,n,r){var s=e[t];return""+i(e[t].content)+""},s.code_block=function(e,t,o,n,r){var s=e[t];return""+i(e[t].content)+"\n"},s.fence=function(e,t,o,n,s){var a,l,c,d,u,h=e[t],p=h.info?r(h.info).trim():"",g="",m="";return p&&(g=(c=p.split(/(\s+)/g))[0],m=c.slice(2).join("")),0===(a=o.highlight&&o.highlight(h.content,g,m)||i(h.content)).indexOf(""+a+"\n"):"
"+a+"
\n"},s.image=function(e,t,o,n,r){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=r.renderInlineAsText(i.children,o,n),r.renderToken(e,t,o)},s.hardbreak=function(e,t,o){return o.xhtmlOut?"
\n":"
\n"},s.softbreak=function(e,t,o){return o.breaks?o.xhtmlOut?"
\n":"
\n":"\n"},s.text=function(e,t){return i(e[t].content)},s.html_block=function(e,t){return e[t].content},s.html_inline=function(e,t){return e[t].content},a.prototype.renderAttrs=function(e){var t,o,n;if(!e.attrs)return"";for(n="",t=0,o=e.attrs.length;t\n":">")},a.prototype.renderInline=function(e,t,o){for(var n,r="",i=this.rules,s=0,a=e.length;s{"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t{"use strict";var n=o(7022).isSpace;e.exports=function(e,t,o,r){var i,s,a,l,c,d,u,h,p,g,m,f,b,k,w,_,y,A,C,v,x=e.lineMax,E=e.bMarks[t]+e.tShift[t],D=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(E++))return!1;if(r)return!0;for(l=p=e.sCount[t]+1,32===e.src.charCodeAt(E)?(E++,l++,p++,i=!1,_=!0):9===e.src.charCodeAt(E)?(_=!0,(e.bsCount[t]+p)%4==3?(E++,l++,p++,i=!1):i=!0):_=!1,g=[e.bMarks[t]],e.bMarks[t]=E;E=D,k=[e.sCount[t]],e.sCount[t]=p-l,w=[e.tShift[t]],e.tShift[t]=E-e.bMarks[t],A=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",h=t+1;h=(D=e.eMarks[h])));h++)if(62!==e.src.charCodeAt(E++)||v){if(d)break;for(y=!1,a=0,c=A.length;a=D,m.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(_?1:0),k.push(e.sCount[h]),e.sCount[h]=p-l,w.push(e.tShift[h]),e.tShift[h]=E-e.bMarks[h]}for(f=e.blkIndent,e.blkIndent=0,(C=e.push("blockquote_open","blockquote",1)).markup=">",C.map=u=[t,0],e.md.block.tokenize(e,t,h),(C=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=x,e.parentType=b,u[1]=e.line,a=0;a{"use strict";e.exports=function(e,t,o){var n,r,i;if(e.sCount[t]-e.blkIndent<4)return!1;for(r=n=t+1;n=4))break;r=++n}return e.line=r,(i=e.push("code_block","code",0)).content=e.getLines(t,r,4+e.blkIndent,!1)+"\n",i.map=[t,e.line],!0}},3542:e=>{"use strict";e.exports=function(e,t,o,n){var r,i,s,a,l,c,d,u=!1,h=e.bMarks[t]+e.tShift[t],p=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(h+3>p)return!1;if(126!==(r=e.src.charCodeAt(h))&&96!==r)return!1;if(l=h,(i=(h=e.skipChars(h,r))-l)<3)return!1;if(d=e.src.slice(l,h),s=e.src.slice(h,p),96===r&&s.indexOf(String.fromCharCode(r))>=0)return!1;if(n)return!0;for(a=t;!(++a>=o)&&!((h=l=e.bMarks[a]+e.tShift[a])<(p=e.eMarks[a])&&e.sCount[a]=4||(h=e.skipChars(h,r))-l{"use strict";var n=o(7022).isSpace;e.exports=function(e,t,o,r){var i,s,a,l,c=e.bMarks[t]+e.tShift[t],d=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(i=e.src.charCodeAt(c))||c>=d)return!1;for(s=1,i=e.src.charCodeAt(++c);35===i&&c6||cc&&n(e.src.charCodeAt(a-1))&&(d=a),e.line=t+1,(l=e.push("heading_open","h"+String(s),1)).markup="########".slice(0,s),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,d).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(s),-1)).markup="########".slice(0,s)),!0)}},5634:(e,t,o)=>{"use strict";var n=o(7022).isSpace;e.exports=function(e,t,o,r){var i,s,a,l,c=e.bMarks[t]+e.tShift[t],d=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(i=e.src.charCodeAt(c++))&&45!==i&&95!==i)return!1;for(s=1;c{"use strict";var n=o(813),r=o(1947).q,i=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(r.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,o,n){var r,s,a,l,c=e.bMarks[t]+e.tShift[t],d=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,d),r=0;r{"use strict";e.exports=function(e,t,o){var n,r,i,s,a,l,c,d,u,h,p=t+1,g=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(h=e.parentType,e.parentType="paragraph";p3)){if(e.sCount[p]>=e.blkIndent&&(l=e.bMarks[p]+e.tShift[p])<(c=e.eMarks[p])&&(45===(u=e.src.charCodeAt(l))||61===u)&&(l=e.skipChars(l,u),(l=e.skipSpaces(l))>=c)){d=61===u?1:2;break}if(!(e.sCount[p]<0)){for(r=!1,i=0,s=g.length;i{"use strict";var n=o(7022).isSpace;function r(e,t){var o,r,i,s;return r=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],42!==(o=e.src.charCodeAt(r++))&&45!==o&&43!==o||r=s)return-1;if((o=e.src.charCodeAt(i++))<48||o>57)return-1;for(;;){if(i>=s)return-1;if(!((o=e.src.charCodeAt(i++))>=48&&o<=57)){if(41===o||46===o)break;return-1}if(i-r>=10)return-1}return i=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]=e.blkIndent&&(z=!0),(S=i(e,t))>=0){if(h=!0,B=e.bMarks[t]+e.tShift[t],k=Number(e.src.slice(B,S-1)),z&&1!==k)return!1}else{if(!((S=r(e,t))>=0))return!1;h=!1}if(z&&e.skipSpaces(S)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(S-1),n)return!0;for(f=e.tokens.length,h?(R=e.push("ordered_list_open","ol",1),1!==k&&(R.attrs=[["start",k]])):R=e.push("bullet_list_open","ul",1),R.map=m=[t,0],R.markup=String.fromCharCode(b),_=t,T=!1,P=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";_=w?1:y-u)>4&&(d=1),c=u+d,(R=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),R.map=p=[t,0],h&&(R.info=e.src.slice(B,S-1)),E=e.tight,x=e.tShift[t],v=e.sCount[t],A=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=a-e.bMarks[t],e.sCount[t]=y,a>=w&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,o):e.md.block.tokenize(e,t,o,!0),e.tight&&!T||(M=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=A,e.tShift[t]=x,e.sCount[t]=v,e.tight=E,(R=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),_=t=e.line,p[1]=_,a=e.bMarks[t],_>=o)break;if(e.sCount[_]=4)break;for(I=!1,l=0,g=P.length;l{"use strict";e.exports=function(e,t){var o,n,r,i,s,a,l=t+1,c=e.md.block.ruler.getRules("paragraph"),d=e.lineMax;for(a=e.parentType,e.parentType="paragraph";l3||e.sCount[l]<0)){for(n=!1,r=0,i=c.length;r{"use strict";var n=o(7022).normalizeReference,r=o(7022).isSpace;e.exports=function(e,t,o,i){var s,a,l,c,d,u,h,p,g,m,f,b,k,w,_,y,A=0,C=e.bMarks[t]+e.tShift[t],v=e.eMarks[t],x=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(C))return!1;for(;++C3||e.sCount[x]<0)){for(w=!1,u=0,h=_.length;u{"use strict";var n=o(5872),r=o(7022).isSpace;function i(e,t,o,n){var i,s,a,l,c,d,u,h;for(this.src=e,this.md=t,this.env=o,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",h=!1,a=l=d=u=0,c=(s=this.src).length;l0&&this.level++,this.tokens.push(r),r},i.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},i.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!r(this.src.charCodeAt(--e)))return e+1;return e},i.prototype.skipChars=function(e,t){for(var o=this.src.length;eo;)if(t!==this.src.charCodeAt(--e))return e+1;return e},i.prototype.getLines=function(e,t,o,n){var i,s,a,l,c,d,u,h=e;if(e>=t)return"";for(d=new Array(t-e),i=0;ho?new Array(s-o+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return d.join("")},i.prototype.Token=n,e.exports=i},1785:(e,t,o)=>{"use strict";var n=o(7022).isSpace;function r(e,t){var o=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(o,n)}function i(e){var t,o=[],n=0,r=e.length,i=!1,s=0,a="";for(t=e.charCodeAt(n);no)return!1;if(h=t+1,e.sCount[h]=4)return!1;if((c=e.bMarks[h]+e.tShift[h])>=e.eMarks[h])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C)return!1;if(c>=e.eMarks[h])return!1;if(124!==(v=e.src.charCodeAt(c++))&&45!==v&&58!==v&&!n(v))return!1;if(45===C&&n(v))return!1;for(;c=4)return!1;if((p=i(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),0===(g=p.length)||g!==f.length)return!1;if(s)return!0;for(_=e.parentType,e.parentType="table",A=e.md.block.ruler.getRules("blockquote"),(m=e.push("table_open","table",1)).map=k=[t,0],(m=e.push("thead_open","thead",1)).map=[t,t+1],(m=e.push("tr_open","tr",1)).map=[t,t+1],d=0;d=4)break;for((p=i(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),h===t+2&&((m=e.push("tbody_open","tbody",1)).map=w=[t+2,0]),(m=e.push("tr_open","tr",1)).map=[h,h+1],d=0;d{"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},9827:e=>{"use strict";e.exports=function(e){var t,o,n,r=e.tokens;for(o=0,n=r.length;o{"use strict";var n=o(7022).arrayReplaceAt;function r(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,o,i,s,a,l,c,d,u,h,p,g,m,f,b,k,w,_,y=e.tokens;if(e.md.options.linkify)for(o=0,i=y.length;o=0;t--)if("link_close"!==(l=s[t]).type){if("html_inline"===l.type&&(_=l.content,/^\s]/i.test(_)&&m>0&&m--,r(l.content)&&m++),!(m>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(u=l.content,w=e.md.linkify.match(u),c=[],g=l.level,p=0,w.length>0&&0===w[0].index&&t>0&&"text_special"===s[t-1].type&&(w=w.slice(1)),d=0;dp&&((a=new e.Token("text","",0)).content=u.slice(p,h),a.level=g,c.push(a)),(a=new e.Token("link_open","a",1)).attrs=[["href",b]],a.level=g++,a.markup="linkify",a.info="auto",c.push(a),(a=new e.Token("text","",0)).content=k,a.level=g,c.push(a),(a=new e.Token("link_close","a",-1)).level=--g,a.markup="linkify",a.info="auto",c.push(a),p=w[d].lastIndex);p{"use strict";var t=/\r\n?|\n/g,o=/\0/g;e.exports=function(e){var n;n=(n=e.src.replace(t,"\n")).replace(o,"�"),e.src=n}},2834:e=>{"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,o=/\((c|tm|r)\)/i,n=/\((c|tm|r)\)/gi,r={c:"©",r:"®",tm:"™"};function i(e,t){return r[t.toLowerCase()]}function s(e){var t,o,r=0;for(t=e.length-1;t>=0;t--)"text"!==(o=e[t]).type||r||(o.content=o.content.replace(n,i)),"link_open"===o.type&&"auto"===o.info&&r--,"link_close"===o.type&&"auto"===o.info&&r++}function a(e){var o,n,r=0;for(o=e.length-1;o>=0;o--)"text"!==(n=e[o]).type||r||t.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}e.exports=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)"inline"===e.tokens[n].type&&(o.test(e.tokens[n].content)&&s(e.tokens[n].children),t.test(e.tokens[n].content)&&a(e.tokens[n].children))}},8450:(e,t,o)=>{"use strict";var n=o(7022).isWhiteSpace,r=o(7022).isPunctChar,i=o(7022).isMdAsciiPunct,s=/['"]/,a=/['"]/g;function l(e,t,o){return e.slice(0,t)+o+e.slice(t+1)}function c(e,t){var o,s,c,d,u,h,p,g,m,f,b,k,w,_,y,A,C,v,x,E,D;for(x=[],o=0;o=0&&!(x[C].level<=p);C--);if(x.length=C+1,"text"===s.type){u=0,h=(c=s.content).length;e:for(;u=0)m=c.charCodeAt(d.index-1);else for(C=o-1;C>=0&&("softbreak"!==e[C].type&&"hardbreak"!==e[C].type);C--)if(e[C].content){m=e[C].content.charCodeAt(e[C].content.length-1);break}if(f=32,u=48&&m<=57&&(A=y=!1),y&&A&&(y=b,A=k),y||A){if(A)for(C=x.length-1;C>=0&&(g=x[C],!(x[C].level=0;t--)"inline"===e.tokens[t].type&&s.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},6480:(e,t,o)=>{"use strict";var n=o(5872);function r(e,t,o){this.src=e,this.env=o,this.tokens=[],this.inlineMode=!1,this.md=t}r.prototype.Token=n,e.exports=r},6633:e=>{"use strict";e.exports=function(e){var t,o,n,r,i,s,a=e.tokens;for(t=0,o=a.length;t{"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,o=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,n){var r,i,s,a,l,c,d=e.pos;if(60!==e.src.charCodeAt(d))return!1;for(l=e.pos,c=e.posMax;;){if(++d>=c)return!1;if(60===(a=e.src.charCodeAt(d)))return!1;if(62===a)break}return r=e.src.slice(l+1,d),o.test(r)?(i=e.md.normalizeLink(r),!!e.md.validateLink(i)&&(n||((s=e.push("link_open","a",1)).attrs=[["href",i]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(r),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=r.length+2,!0)):!!t.test(r)&&(i=e.md.normalizeLink("mailto:"+r),!!e.md.validateLink(i)&&(n||((s=e.push("link_open","a",1)).attrs=[["href",i]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(r),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=r.length+2,!0))}},9755:e=>{"use strict";e.exports=function(e,t){var o,n,r,i,s,a,l,c,d=e.pos;if(96!==e.src.charCodeAt(d))return!1;for(o=d,d++,n=e.posMax;d{"use strict";function t(e,t){var o,n,r,i,s,a,l,c,d={},u=t.length;if(u){var h=0,p=-2,g=[];for(o=0;os;n-=g[n]+1)if((i=t[n]).marker===r.marker&&i.open&&i.end<0&&(l=!1,(i.close||r.open)&&(i.length+r.length)%3==0&&(i.length%3==0&&r.length%3==0||(l=!0)),!l)){c=n>0&&!t[n-1].open?g[n-1]+1:0,g[o]=o-n+c,g[n]=c,r.open=!1,i.end=o,i.close=!1,a=-1,p=-2;break}-1!==a&&(d[r.marker][(r.open?3:0)+(r.length||0)%3]=a)}}}e.exports=function(e){var o,n=e.tokens_meta,r=e.tokens_meta.length;for(t(0,e.delimiters),o=0;o{"use strict";function t(e,t){var o,n,r,i,s,a;for(o=t.length-1;o>=0;o--)95!==(n=t[o]).marker&&42!==n.marker||-1!==n.end&&(r=t[n.end],a=o>0&&t[o-1].end===n.end+1&&t[o-1].marker===n.marker&&t[o-1].token===n.token-1&&t[n.end+1].token===r.token+1,s=String.fromCharCode(n.marker),(i=e.tokens[n.token]).type=a?"strong_open":"em_open",i.tag=a?"strong":"em",i.nesting=1,i.markup=a?s+s:s,i.content="",(i=e.tokens[r.token]).type=a?"strong_close":"em_close",i.tag=a?"strong":"em",i.nesting=-1,i.markup=a?s+s:s,i.content="",a&&(e.tokens[t[o-1].token].content="",e.tokens[t[n.end+1].token].content="",o--))}e.exports.w=function(e,t){var o,n,r=e.pos,i=e.src.charCodeAt(r);if(t)return!1;if(95!==i&&42!==i)return!1;for(n=e.scanDelims(e.pos,42===i),o=0;o{"use strict";var n=o(6233),r=o(7022).has,i=o(7022).isValidEntityCode,s=o(7022).fromCodePoint,a=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var o,c,d,u=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1>=h)return!1;if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(a))return t||(o="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),(d=e.push("text_special","",0)).content=i(o)?s(o):s(65533),d.markup=c[0],d.info="entity"),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&r(n,c[1]))return t||((d=e.push("text_special","",0)).content=n[c[1]],d.markup=c[0],d.info="entity"),e.pos+=c[0].length,!0;return!1}},1917:(e,t,o)=>{"use strict";for(var n=o(7022).isSpace,r=[],i=0;i<256;i++)r.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){r[e.charCodeAt(0)]=1})),e.exports=function(e,t){var o,i,s,a,l,c=e.pos,d=e.posMax;if(92!==e.src.charCodeAt(c))return!1;if(++c>=d)return!1;if(10===(o=e.src.charCodeAt(c))){for(t||e.push("hardbreak","br",0),c++;c=55296&&o<=56319&&c+1=56320&&i<=57343&&(a+=e.src[c+1],c++),s="\\"+a,t||(l=e.push("text_special","",0),o<256&&0!==r[o]?l.content=a:l.content=s,l.markup=s,l.info="escape"),e.pos=c+1,!0}},9969:e=>{"use strict";e.exports=function(e){var t,o,n=0,r=e.tokens,i=e.tokens.length;for(t=o=0;t0&&n++,"text"===r[t].type&&t+1{"use strict";var n=o(1947).n;e.exports=function(e,t){var o,r,i,s,a,l=e.pos;return!!e.md.options.html&&(i=e.posMax,!(60!==e.src.charCodeAt(l)||l+2>=i)&&(!(33!==(o=e.src.charCodeAt(l+1))&&63!==o&&47!==o&&!function(e){var t=32|e;return t>=97&&t<=122}(o))&&(!!(r=e.src.slice(l).match(n))&&(t||((s=e.push("html_inline","",0)).content=e.src.slice(l,l+r[0].length),a=s.content,/^\s]/i.test(a)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(s.content)&&e.linkLevel--),e.pos+=r[0].length,!0))))}},3006:(e,t,o)=>{"use strict";var n=o(7022).normalizeReference,r=o(7022).isSpace;e.exports=function(e,t){var o,i,s,a,l,c,d,u,h,p,g,m,f,b="",k=e.pos,w=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((d=l+1)=w)return!1;for(f=d,(h=e.md.helpers.parseLinkDestination(e.src,d,e.posMax)).ok&&(b=e.md.normalizeLink(h.str),e.md.validateLink(b)?d=h.pos:b=""),f=d;d=w||41!==e.src.charCodeAt(d))return e.pos=k,!1;d++}else{if(void 0===e.env.references)return!1;if(d=0?a=e.src.slice(f,d++):d=l+1):d=l+1,a||(a=e.src.slice(c,l)),!(u=e.env.references[n(a)]))return e.pos=k,!1;b=u.href,p=u.title}return t||(s=e.src.slice(c,l),e.md.inline.parse(s,e.md,e.env,m=[]),(g=e.push("image","img",0)).attrs=o=[["src",b],["alt",""]],g.children=m,g.content=s,p&&o.push(["title",p])),e.pos=d,e.posMax=w,!0}},1727:(e,t,o)=>{"use strict";var n=o(7022).normalizeReference,r=o(7022).isSpace;e.exports=function(e,t){var o,i,s,a,l,c,d,u,h="",p="",g=e.pos,m=e.posMax,f=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(a=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=a+1)=m)return!1;if(f=c,(d=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(h=e.md.normalizeLink(d.str),e.md.validateLink(h)?c=d.pos:h="",f=c;c=m||41!==e.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===e.env.references)return!1;if(c=0?s=e.src.slice(f,c++):c=a+1):c=a+1,s||(s=e.src.slice(l,a)),!(u=e.env.references[n(s)]))return e.pos=g,!1;h=u.href,p=u.title}return t||(e.pos=l,e.posMax=a,e.push("link_open","a",1).attrs=o=[["href",h]],p&&o.push(["title",p]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)),e.pos=c,e.posMax=m,!0}},2906:e=>{"use strict";var t=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;e.exports=function(e,o){var n,r,i,s,a,l,c;return!!e.md.options.linkify&&(!(e.linkLevel>0)&&(!((n=e.pos)+3>e.posMax)&&(58===e.src.charCodeAt(n)&&(47===e.src.charCodeAt(n+1)&&(47===e.src.charCodeAt(n+2)&&(!!(r=e.pending.match(t))&&(i=r[1],!!(s=e.md.linkify.matchAtStart(e.src.slice(n-i.length)))&&(a=(a=s.url).replace(/\*+$/,""),l=e.md.normalizeLink(a),!!e.md.validateLink(l)&&(o||(e.pending=e.pending.slice(0,-i.length),(c=e.push("link_open","a",1)).attrs=[["href",l]],c.markup="linkify",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(a),(c=e.push("link_close","a",-1)).markup="linkify",c.info="auto"),e.pos+=a.length-i.length,!0)))))))))}},3905:(e,t,o)=>{"use strict";var n=o(7022).isSpace;e.exports=function(e,t){var o,r,i,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;if(o=e.pending.length-1,r=e.posMax,!t)if(o>=0&&32===e.pending.charCodeAt(o))if(o>=1&&32===e.pending.charCodeAt(o-1)){for(i=o-1;i>=1&&32===e.pending.charCodeAt(i-1);)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(s++;s{"use strict";var n=o(5872),r=o(7022).isWhiteSpace,i=o(7022).isPunctChar,s=o(7022).isMdAsciiPunct;function a(e,t,o,n){this.src=e,this.env=o,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}a.prototype.pushPending=function(){var e=new n("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},a.prototype.push=function(e,t,o){this.pending&&this.pushPending();var r=new n(e,t,o),i=null;return o<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,o>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},a.prototype.scanDelims=function(e,t){var o,n,a,l,c,d,u,h,p,g=e,m=!0,f=!0,b=this.posMax,k=this.src.charCodeAt(e);for(o=e>0?this.src.charCodeAt(e-1):32;g{"use strict";function t(e,t){var o,n,r,i,s,a=[],l=t.length;for(o=0;o{"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,o){for(var n=e.pos;n{"use strict";function t(e,t,o){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=o,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,o,n;if(!this.attrs)return-1;for(o=0,n=(t=this.attrs).length;o=0&&(o=this.attrs[t][1]),o},t.prototype.attrJoin=function(e,t){var o=this.attrIndex(e);o<0?this.attrPush([e,t]):this.attrs[o][1]=this.attrs[o][1]+" "+t},e.exports=t},3122:e=>{"use strict";var t={};function o(e,n){var r;return"string"!=typeof n&&(n=o.defaultChars),r=function(e){var o,n,r=t[e];if(r)return r;for(r=t[e]=[],o=0;o<128;o++)n=String.fromCharCode(o),r.push(n);for(o=0;o=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&n)&&t+91114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}o.defaultChars=";/?:@&=+$,#",o.componentChars="",e.exports=o},729:e=>{"use strict";var t={};function o(e,n,r){var i,s,a,l,c,d="";for("string"!=typeof n&&(r=n,n=o.defaultChars),void 0===r&&(r=!0),c=function(e){var o,n,r=t[e];if(r)return r;for(r=t[e]=[],o=0;o<128;o++)n=String.fromCharCode(o),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+o.toString(16).toUpperCase()).slice(-2));for(o=0;o=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1=56320&&l<=57343){d+=encodeURIComponent(e[i]+e[i+1]),i++;continue}d+="%EF%BF%BD"}else d+=encodeURIComponent(e[i]);return d}o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",e.exports=o},2201:e=>{"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},8765:(e,t,o)=>{"use strict";e.exports.encode=o(729),e.exports.decode=o(3122),e.exports.format=o(2201),e.exports.parse=o(9553)},9553:e=>{"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var o=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,r=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),s=["'"].concat(i),a=["%","/","?",";","#"].concat(s),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,u={javascript:!0,"javascript:":!0},h={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var n,i,s,p,g,m=e;if(m=m.trim(),!t&&1===e.split("#").length){var f=r.exec(m);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var b=o.exec(m);if(b&&(s=(b=b[0]).toLowerCase(),this.protocol=b,m=m.substr(b.length)),(t||b||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(g="//"===m.substr(0,2))||b&&u[b]||(m=m.substr(2),this.slashes=!0)),!u[b]&&(g||b&&!h[b])){var k,w,_=-1;for(n=0;n127?x+="x":x+=v[E];if(!x.match(c)){var S=C.slice(0,n),T=C.slice(n+1),B=v.match(d);B&&(S.push(B[1]),T.unshift(B[2])),T.length&&(m=T.join(".")+m),this.hostname=S.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var I=m.indexOf("#");-1!==I&&(this.hash=m.substr(I),m=m.slice(0,I));var P=m.indexOf("?");return-1!==P&&(this.search=m.substr(P),m=m.slice(0,P)),m&&(this.pathname=m),h[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=n.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,o){if(e&&e instanceof t)return e;var n=new t;return n.parse(e,o),n}},3689:(e,t,o)=>{"use strict";o.r(t),o.d(t,{decode:()=>b,default:()=>y,encode:()=>k,toASCII:()=>_,toUnicode:()=>w,ucs2decode:()=>p,ucs2encode:()=>g});const n=2147483647,r=36,i=/^xn--/,s=/[^\0-\x7E]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,d=String.fromCharCode;function u(e){throw new RangeError(l[e])}function h(e,t){const o=e.split("@");let n="";o.length>1&&(n=o[0]+"@",e=o[1]);const r=function(e,t){const o=[];let n=e.length;for(;n--;)o[n]=t(e[n]);return o}((e=e.replace(a,".")).split("."),t).join(".");return n+r}function p(e){const t=[];let o=0;const n=e.length;for(;o=55296&&r<=56319&&oString.fromCodePoint(...e),m=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},f=function(e,t,o){let n=0;for(e=o?c(e/700):e>>1,e+=c(e/t);e>455;n+=r)e=c(e/35);return c(n+36*e/(e+38))},b=function(e){const t=[],o=e.length;let i=0,s=128,a=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let o=0;o=128&&u("not-basic"),t.push(e.charCodeAt(o));for(let h=l>0?l+1:0;h=o&&u("invalid-input");const l=(d=e.charCodeAt(h++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:r;(l>=r||l>c((n-i)/t))&&u("overflow"),i+=l*t;const p=s<=a?1:s>=a+26?26:s-a;if(lc(n/g)&&u("overflow"),t*=g}const p=t.length+1;a=f(i-l,p,0==l),c(i/p)>n-s&&u("overflow"),s+=c(i/p),i%=p,t.splice(i++,0,s)}var d;return String.fromCodePoint(...t)},k=function(e){const t=[];let o=(e=p(e)).length,i=128,s=0,a=72;for(const o of e)o<128&&t.push(d(o));let l=t.length,h=l;for(l&&t.push("-");h=i&&tc((n-s)/p)&&u("overflow"),s+=(o-i)*p,i=o;for(const o of e)if(on&&u("overflow"),o==i){let e=s;for(let o=r;;o+=r){const n=o<=a?1:o>=a+26?26:o-a;if(e{"use strict";var t=[];function o(e){for(var o=-1,n=0;n{"use strict";var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},8575:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(o){e.setAttribute(o,t[o])}))}},9037:e=>{"use strict";var t,o=(t=[],function(e,o){return t[e]=o,t.filter(Boolean).join("\n")});function n(e,t,n,r){var i;if(n)i="";else{i="",r.supports&&(i+="@supports (".concat(r.supports,") {")),r.media&&(i+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(i+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),i+=r.css,s&&(i+="}"),r.media&&(i+="}"),r.supports&&(i+="}")}if(e.styleSheet)e.styleSheet.cssText=o(t,i);else{var a=document.createTextNode(i),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(a,l[t]):e.appendChild(a)}}var r={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=r.singletonCounter++,o=r.singleton||(r.singleton=e.insertStyleElement(e));return{update:function(e){n(o,t,!1,e)},remove:function(e){n(o,t,!0,e)}}}},9413:e=>{e.exports=/[\0-\x1F\x7F-\x9F]/},2326:e=>{e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},3189:e=>{e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},5045:e=>{e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},4205:(e,t,o)=>{"use strict";t.Any=o(9369),t.Cc=o(9413),t.Cf=o(2326),t.P=o(3189),t.Z=o(5045)},9369:e=>{e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},8491:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+"},9323:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={id:n,exports:{}};return e[n](i,i.exports,o),i.exports}o.m=e,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.b=document.baseURI||self.location.href;var n={};return(()=>{"use strict";const e=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}(),t={isMac:r(e),isWindows:function(e){return e.indexOf("windows")>-1}(e),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(e),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(e),isiOS:function(e){return!!e.match(/iphone|ipad/i)||r(e)&&navigator.maxTouchPoints>0}(e),isAndroid:function(e){return e.indexOf("android")>-1}(e),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(e),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}},n=t;function r(e){return e.indexOf("macintosh")>-1}function i(e,t,o,n){o=o||function(e,t){return e===t};const r=Array.isArray(e)?e:Array.prototype.slice.call(e),i=Array.isArray(t)?t:Array.prototype.slice.call(t),l=function(e,t,o){const n=s(e,t,o);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const r=a(e,n),i=a(t,n),l=s(r,i,o),c=e.length-l,d=t.length-l;return{firstIndex:n,lastIndexOld:c,lastIndexNew:d}}(r,i,o),c=n?function(e,t){const{firstIndex:o,lastIndexOld:n,lastIndexNew:r}=e;if(-1===o)return Array(t).fill("equal");let i=[];o>0&&(i=i.concat(Array(o).fill("equal")));r-o>0&&(i=i.concat(Array(r-o).fill("insert")));n-o>0&&(i=i.concat(Array(n-o).fill("delete")));r0&&o.push({index:n,type:"insert",values:e.slice(n,i)});r-n>0&&o.push({index:n+(i-n),type:"delete",howMany:r-n});return o}(i,l);return c}function s(e,t,o){for(let n=0;n200||r>200||n+r>300)return l.fastDiff(e,t,o,!0);let i,s;if(rl?-1:1;u[n+d]&&(u[n]=u[n+d].slice(0)),u[n]||(u[n]=[]),u[n].push(r>l?i:s);let p=Math.max(r,l),g=p-n;for(;gd;g--)h[g]=p(g);h[d]=p(d),m++}while(h[d]!==c);return u[d].slice(1)}l.fastDiff=i;const c=function(){return function e(){e.called=!0}};class d{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=c(),this.off=c()}}const u=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function h(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0;return"e"+u[e>>0&255]+u[e>>8&255]+u[e>>16&255]+u[e>>24&255]+u[t>>0&255]+u[t>>8&255]+u[t>>16&255]+u[t>>24&255]+u[o>>0&255]+u[o>>8&255]+u[o>>16&255]+u[o>>24&255]+u[n>>0&255]+u[n>>8&255]+u[n>>16&255]+u[n>>24&255]}const p={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function g(e,t){const o=p.get(t.priority);for(let n=0;n{if("object"==typeof t&&null!==t){if(o.has(t))return`[object ${t.constructor.name}]`;o.add(t)}return t},r=t?` ${JSON.stringify(t,n)}`:"",i=k(e);return e+r+i}(e,o)),this.name="CKEditorError",this.context=t,this.data=o}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const o=new f(e.message,t);throw o.stack=e.stack,o}}function b(e,t){console.warn(...w(e,t))}function k(e){return`\nRead more: ${m}#error-${e}`}function w(e,t){const o=k(e);return t?[e,t,o]:[e,o]}const y="38.0.1",A=new Date(2023,4,23),C="object"==typeof window?window:o.g;if(C.CKEDITOR_VERSION)throw new f("ckeditor-duplicated-modules",null);C.CKEDITOR_VERSION=y;const v=Symbol("listeningTo"),x=Symbol("emitterId"),E=Symbol("delegations"),D=S(Object);function S(e){if(!e)return D;return class extends e{on(e,t,o){this.listenTo(this,e,t,o)}once(e,t,o){let n=!1;this.listenTo(this,e,((e,...o)=>{n||(n=!0,e.off(),t.call(this,e,...o))}),o)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,o,n={}){let r,i;this[v]||(this[v]={});const s=this[v];B(e)||T(e);const a=B(e);(r=s[a])||(r=s[a]={emitter:e,callbacks:{}}),(i=r.callbacks[t])||(i=r.callbacks[t]=[]),i.push(o),function(e,t,o,n,r){t._addEventListener?t._addEventListener(o,n,r):e._addEventListener.call(t,o,n,r)}(this,e,t,o,n)}stopListening(e,t,o){const n=this[v];let r=e&&B(e);const i=n&&r?n[r]:void 0,s=i&&t?i.callbacks[t]:void 0;if(!(!n||e&&!i||t&&!s))if(o){M(this,e,t,o);-1!==s.indexOf(o)&&(1===s.length?delete i.callbacks[t]:M(this,e,t,o))}else if(s){for(;o=s.pop();)M(this,e,t,o);delete i.callbacks[t]}else if(i){for(t in i.callbacks)this.stopListening(e,t);delete n[r]}else{for(r in n)this.stopListening(n[r].emitter);delete this[v]}}fire(e,...t){try{const o=e instanceof d?e:new d(this,e),n=o.name;let r=R(this,n);if(o.path.push(this),r){const e=[o,...t];r=Array.from(r);for(let t=0;t{this[E]||(this[E]=new Map),e.forEach((e=>{const n=this[E].get(e);n?n.set(t,o):this[E].set(e,new Map([[t,o]]))}))}}}stopDelegating(e,t){if(this[E])if(e)if(t){const o=this[E].get(e);o&&o.delete(t)}else this[E].delete(e);else this[E].clear()}_addEventListener(e,t,o){!function(e,t){const o=I(e);if(o[t])return;let n=t,r=null;const i=[];for(;""!==n&&!o[n];)o[n]={callbacks:[],childEvents:[]},i.push(o[n]),r&&o[n].childEvents.push(r),r=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const e of i)e.callbacks=o[n].callbacks.slice();o[n].childEvents.push(r)}}(this,e);const n=P(this,e),r={callback:t,priority:p.get(o.priority)};for(const e of n)g(e,r)}_removeEventListener(e,t){const o=P(this,e);for(const e of o)for(let o=0;o-1?R(e,t.substr(0,t.lastIndexOf(":"))):null}function z(e,t,o){for(let[n,r]of e){r?"function"==typeof r&&(r=r(t.name)):r=t.name;const e=new d(t.source,r);e.path=[...t.path],n.fire(e,...o)}}function M(e,t,o,n){t._removeEventListener?t._removeEventListener(o,n):e._removeEventListener.call(t,o,n)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{S[e]=D.prototype[e]}));const N=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},F=Symbol("observableProperties"),O=Symbol("boundObservables"),V=Symbol("boundProperties"),L=Symbol("decoratedMethods"),j=Symbol("decoratedOriginal"),q=H(S());function H(e){if(!e)return q;return class extends e{set(e,t){if(N(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);W(this);const o=this[F];if(e in this&&!o.has(e))throw new f("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>o.get(e),set(t){const n=o.get(e);let r=this.fire(`set:${e}`,e,t,n);void 0===r&&(r=t),n===r&&o.has(e)||(o.set(e,r),this.fire(`change:${e}`,e,r,n))}}),this[e]=t}bind(...e){if(!e.length||!G(e))throw new f("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new f("observable-bind-duplicate-properties",this);W(this);const t=this[V];e.forEach((e=>{if(t.has(e))throw new f("observable-bind-rebind",this)}));const o=new Map;return e.forEach((e=>{const n={property:e,to:[]};t.set(e,n),o.set(e,n)})),{to:$,toMany:U,_observable:this,_bindProperties:e,_to:[],_bindings:o}}unbind(...e){if(!this[F])return;const t=this[V],o=this[O];if(e.length){if(!G(e))throw new f("observable-unbind-wrong-properties",this);e.forEach((e=>{const n=t.get(e);n&&(n.to.forEach((([e,t])=>{const r=o.get(e),i=r[t];i.delete(n),i.size||delete r[t],Object.keys(r).length||(o.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else o.forEach(((e,t)=>{this.stopListening(t,"change")})),o.clear(),t.clear()}decorate(e){W(this);const t=this[e];if(!t)throw new f("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,o)=>{e.return=t.apply(this,o)})),this[e]=function(...t){return this.fire(e,t)},this[e][j]=t,this[L]||(this[L]=[]),this[L].push(e)}stopListening(e,t,o){if(!e&&this[L]){for(const e of this[L])this[e]=this[e][j];delete this[L]}super.stopListening(e,t,o)}}}function W(e){e[F]||(Object.defineProperty(e,F,{value:new Map}),Object.defineProperty(e,O,{value:new Map}),Object.defineProperty(e,V,{value:new Map}))}function $(...e){const t=function(...e){if(!e.length)throw new f("observable-bind-to-parse-error",null);const t={to:[]};let o;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)o.properties.push(e);else{if("object"!=typeof e)throw new f("observable-bind-to-parse-error",null);o={observable:e,properties:[]},t.to.push(o)}})),t}(...e),o=Array.from(this._bindings.keys()),n=o.length;if(!t.callback&&t.to.length>1)throw new f("observable-bind-to-no-callback",this);if(n>1&&t.callback)throw new f("observable-bind-to-extra-callback",this);var r;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==n)throw new f("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(o[0]).callback=t.callback),r=this._observable,this._to.forEach((e=>{const t=r[O];let o;t.get(e.observable)||r.listenTo(e.observable,"change",((n,i)=>{o=t.get(e.observable)[i],o&&o.forEach((e=>{K(r,e.property)}))}))})),function(e){let t;e._bindings.forEach(((o,n)=>{e._to.forEach((r=>{t=r.properties[o.callback?0:e._bindProperties.indexOf(n)],o.to.push([r.observable,t]),function(e,t,o,n){const r=e[O],i=r.get(o),s=i||{};s[n]||(s[n]=new Set);s[n].add(t),i||r.set(o,s)}(e._observable,o,r.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{K(this._observable,e)}))}function U(e,t,o){if(this._bindings.size>1)throw new f("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const o=e.map((e=>[e,t]));return Array.prototype.concat.apply([],o)}(e,t),o)}function G(e){return e.every((e=>"string"==typeof e))}function K(e,t){const o=e[V].get(t);let n;o.callback?n=o.callback.apply(e,o.to.map((e=>e[0][e[1]]))):(n=o.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}function Z(e){let t=0;for(const o of e)t++;return t}function J(e,t){const o=Math.min(e.length,t.length);for(let n=0;n{H[e]=q.prototype[e]}));const Y="object"==typeof global&&global&&global.Object===Object&&global;var X="object"==typeof self&&self&&self.Object===Object&&self;const ee=Y||X||Function("return this")();const te=ee.Symbol;var oe=Object.prototype,ne=oe.hasOwnProperty,re=oe.toString,ie=te?te.toStringTag:void 0;const se=function(e){var t=ne.call(e,ie),o=e[ie];try{e[ie]=void 0;var n=!0}catch(e){}var r=re.call(e);return n&&(t?e[ie]=o:delete e[ie]),r};var ae=Object.prototype.toString;const le=function(e){return ae.call(e)};var ce=te?te.toStringTag:void 0;const de=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ce&&ce in Object(e)?se(e):le(e)};const ue=Array.isArray;const he=function(e){return null!=e&&"object"==typeof e};const pe=function(e){return"string"==typeof e||!ue(e)&&he(e)&&"[object String]"==de(e)};function ge(e,t,o={},n=[]){const r=o&&o.xmlns,i=r?e.createElementNS(r,t):e.createElement(t);for(const e in o)i.setAttribute(e,o[e]);!pe(n)&&Q(n)||(n=[n]);for(let t of n)pe(t)&&(t=e.createTextNode(t)),i.appendChild(t);return i}const me=function(e,t){return function(o){return e(t(o))}};const fe=me(Object.getPrototypeOf,Object);var be=Function.prototype,ke=Object.prototype,we=be.toString,_e=ke.hasOwnProperty,ye=we.call(Object);const Ae=function(e){if(!he(e)||"[object Object]"!=de(e))return!1;var t=fe(e);if(null===t)return!0;var o=_e.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&we.call(o)==ye};const Ce=function(){this.__data__=[],this.size=0};const ve=function(e,t){return e===t||e!=e&&t!=t};const xe=function(e,t){for(var o=e.length;o--;)if(ve(e[o][0],t))return o;return-1};var Ee=Array.prototype.splice;const De=function(e){var t=this.__data__,o=xe(t,e);return!(o<0)&&(o==t.length-1?t.pop():Ee.call(t,o,1),--this.size,!0)};const Se=function(e){var t=this.__data__,o=xe(t,e);return o<0?void 0:t[o][1]};const Te=function(e){return xe(this.__data__,e)>-1};const Be=function(e,t){var o=this.__data__,n=xe(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};function Ie(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991};var jt={};jt["[object Float32Array]"]=jt["[object Float64Array]"]=jt["[object Int8Array]"]=jt["[object Int16Array]"]=jt["[object Int32Array]"]=jt["[object Uint8Array]"]=jt["[object Uint8ClampedArray]"]=jt["[object Uint16Array]"]=jt["[object Uint32Array]"]=!0,jt["[object Arguments]"]=jt["[object Array]"]=jt["[object ArrayBuffer]"]=jt["[object Boolean]"]=jt["[object DataView]"]=jt["[object Date]"]=jt["[object Error]"]=jt["[object Function]"]=jt["[object Map]"]=jt["[object Number]"]=jt["[object Object]"]=jt["[object RegExp]"]=jt["[object Set]"]=jt["[object String]"]=jt["[object WeakMap]"]=!1;const qt=function(e){return he(e)&&Lt(e.length)&&!!jt[de(e)]};const Ht=function(e){return function(t){return e(t)}};var Wt="object"==typeof exports&&exports&&!exports.nodeType&&exports,$t=Wt&&"object"==typeof module&&module&&!module.nodeType&&module,Ut=$t&&$t.exports===Wt&&Y.process;const Gt=function(){try{var e=$t&&$t.require&&$t.require("util").types;return e||Ut&&Ut.binding&&Ut.binding("util")}catch(e){}}();var Kt=Gt&&Gt.isTypedArray;const Zt=Kt?Ht(Kt):qt;var Jt=Object.prototype.hasOwnProperty;const Qt=function(e,t){var o=ue(e),n=!o&&Pt(e),r=!o&&!n&&Ft(e),i=!o&&!n&&!r&&Zt(e),s=o||n||r||i,a=s?Dt(e.length,String):[],l=a.length;for(var c in e)!t&&!Jt.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Vt(c,l))||a.push(c);return a};var Yt=Object.prototype;const Xt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Yt)};const eo=me(Object.keys,Object);var to=Object.prototype.hasOwnProperty;const oo=function(e){if(!Xt(e))return eo(e);var t=[];for(var o in Object(e))to.call(e,o)&&"constructor"!=o&&t.push(o);return t};const no=function(e){return null!=e&&Lt(e.length)&&!Fe(e)};const ro=function(e){return no(e)?Qt(e):oo(e)};const io=function(e,t){return e&&Et(t,ro(t),e)};const so=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t};var ao=Object.prototype.hasOwnProperty;const lo=function(e){if(!N(e))return so(e);var t=Xt(e),o=[];for(var n in e)("constructor"!=n||!t&&ao.call(e,n))&&o.push(n);return o};const co=function(e){return no(e)?Qt(e,!0):lo(e)};const uo=function(e,t){return e&&Et(t,co(t),e)};var ho="object"==typeof exports&&exports&&!exports.nodeType&&exports,po=ho&&"object"==typeof module&&module&&!module.nodeType&&module,go=po&&po.exports===ho?ee.Buffer:void 0,mo=go?go.allocUnsafe:void 0;const fo=function(e,t){if(t)return e.slice();var o=e.length,n=mo?mo(o):new e.constructor(o);return e.copy(n),n};const bo=function(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++o{this._setToTarget(e,n,t[n],o)}))}}function An(e){return wn(e,Cn)}function Cn(e){return _n(e)?e:void 0}function vn(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function xn(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const En=Dn(S());function Dn(e){if(!e)return En;return class extends e{listenTo(e,t,o,n={}){if(vn(e)||xn(e)){const r={capture:!!n.useCapture,passive:!!n.usePassive},i=this._getProxyEmitter(e,r)||new Sn(e,r);this.listenTo(i,t,o,n)}else super.listenTo(e,t,o,n)}stopListening(e,t,o){if(vn(e)||xn(e)){const n=this._getAllProxyEmitters(e);for(const e of n)this.stopListening(e,t,o)}else super.stopListening(e,t,o)}_getProxyEmitter(e,t){return function(e,t){const o=e[v];return o&&o[t]?o[t].emitter:null}(this,Tn(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{Dn[e]=En.prototype[e]}));class Sn extends(S()){constructor(e,t){super(),T(this,Tn(e,t)),this._domNode=e,this._options=t}attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,o){this.attach(e),S().prototype._addEventListener.call(this,e,t,o)}_removeEventListener(e,t){S().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function Tn(e,t){let o=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=h())}(e);for(const e of Object.keys(t).sort())t[e]&&(o+="-"+e);return o}let Bn;try{Bn={window,document}}catch(e){Bn={window:{},document:{}}}const In=Bn;function Pn(e){const t=[];let o=e;for(;o&&o.nodeType!=Node.DOCUMENT_NODE;)t.unshift(o),o=o.parentNode;return t}function Rn(e){return"[object Text]"==Object.prototype.toString.call(e)}function zn(e){return"[object Range]"==Object.prototype.toString.apply(e)}function Mn(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}const Nn=["top","right","bottom","left","width","height"];class Fn{constructor(e){const t=zn(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),Ln(e)||t)if(t){const t=Fn.getDomRangeRects(e);On(this,Fn.getBoundingRect(t))}else On(this,e.getBoundingClientRect());else if(xn(e)){const{innerWidth:t,innerHeight:o}=e;On(this,{top:0,right:t,bottom:o,left:0,width:t,height:o})}else On(this,e)}clone(){return new Fn(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new Fn(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!Vn(e)){let o=e.parentNode||e.commonAncestorContainer;for(;o&&!Vn(o);){const e=new Fn(o),n=t.getIntersection(e);if(!n)return null;n.getArea(){for(const t of e){const e=jn._getElementCallbacks(t.target);if(e)for(const o of e)o(t)}}))}}function qn(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function Hn(e){return t=>t+e}function Wn(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function $n(e,t,o){e.insertBefore(o,e.childNodes[t]||null)}function Un(e){return e&&e.nodeType===Node.COMMENT_NODE}function Gn(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}function Kn({element:e,target:t,positions:o,limiter:n,fitInViewport:r,viewportOffsetConfig:i}){Fe(t)&&(t=t()),Fe(n)&&(n=n());const s=function(e){return e&&e.parentNode?e.offsetParent===In.document.body?null:e.offsetParent:null}(e),a=new Fn(e),l=new Fn(t);let c;const d=r&&function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new Fn(In.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(i)||null,u={targetRect:l,elementRect:a,positionedElementAncestor:s,viewportRect:d};if(n||r){const e=n&&new Fn(n).getVisible();Object.assign(u,{limiterRect:e,viewportRect:d}),c=function(e,t){const{elementRect:o}=t,n=o.getArea(),r=e.map((e=>new Jn(e,t))).filter((e=>!!e.name));let i=0,s=null;for(const e of r){const{limiterIntersectionArea:t,viewportIntersectionArea:o}=e;if(t===n)return e;const r=o**2+t**2;r>i&&(i=r,s=e)}return s}(o,u)||new Jn(o[0],u)}else c=new Jn(o[0],u);return c}function Zn(e){const{scrollX:t,scrollY:o}=In.window;return e.clone().moveBy(t,o)}jn._observerInstance=null,jn._elementCallbacks=null;class Jn{constructor(e,t){const o=e(t.targetRect,t.elementRect,t.viewportRect);if(!o)return;const{left:n,top:r,name:i,config:s}=o;this.name=i,this.config=s,this._positioningFunctionCorrdinates={left:n,top:r},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;if(e){const t=this._options.viewportRect;if(!t)return e.getIntersectionArea(this._rect);{const o=e.getIntersection(t);if(o)return o.getIntersectionArea(this._rect)}}return 0}get viewportIntersectionArea(){const e=this._options.viewportRect;return e?e.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=Zn(this._rect),this._options.positionedElementAncestor&&function(e,t){const o=Zn(new Fn(t)),n=Mn(t);let r=0,i=0;r-=o.left,i-=o.top,r+=t.scrollLeft,i+=t.scrollTop,r-=n.left,i-=n.top,e.moveBy(r,i)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}function Qn(e){const t=e.parentNode;t&&t.removeChild(e)}function Yn({window:e,rect:t,alignToTop:o,forceScroll:n,viewportOffset:r}){const i=t.clone().moveBy(0,r),s=t.clone().moveBy(0,-r),a=new Fn(e).excludeScrollbarsAndBorders(),l=o&&n,c=[s,i].every((e=>a.contains(e)));let{scrollX:d,scrollY:u}=e;const h=d,p=u;l?u-=a.top-t.top+r:c||(tr(s,a)?u-=a.top-t.top+r:er(i,a)&&(u+=o?t.top-a.top-r:t.bottom-a.bottom+r)),c||(or(t,a)?d-=a.left-t.left+r:nr(t,a)&&(d+=t.right-a.right+r)),d==h&&u===p||e.scrollTo(d,u)}function Xn({parent:e,getRect:t,alignToTop:o,forceScroll:n,ancestorOffset:r=0}){const i=rr(e),s=o&&n;let a,l,c;for(;e!=i.document.body;)l=t(),a=new Fn(e).excludeScrollbarsAndBorders(),c=a.contains(l),s?e.scrollTop-=a.top-l.top+r:c||(tr(l,a)?e.scrollTop-=a.top-l.top+r:er(l,a)&&(e.scrollTop+=o?l.top-a.top-r:l.bottom-a.bottom+r)),c||(or(l,a)?e.scrollLeft-=a.left-l.left+r:nr(l,a)&&(e.scrollLeft+=l.right-a.right+r)),e=e.parentNode}function er(e,t){return e.bottom>t.bottom}function tr(e,t){return e.topt.right}function rr(e){return zn(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function ir(e){if(zn(e)){let t=e.commonAncestorContainer;return Rn(t)&&(t=t.parentNode),t}return e.parentNode}function sr(e,t){const o=rr(e),n=new Fn(e);if(o===t)return n;{let e=o;for(;e!=t;){const t=e.frameElement,o=new Fn(t).excludeScrollbarsAndBorders();n.moveBy(o.left,o.top),e=e.parent}}return n}const ar={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},lr={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},cr=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){e[String.fromCharCode(t).toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(const t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),dr=Object.fromEntries(Object.entries(cr).map((([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)])));function ur(e){let t;if("string"==typeof e){if(t=cr[e.toLowerCase()],!t)throw new f("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?cr.alt:0)+(e.ctrlKey?cr.ctrl:0)+(e.shiftKey?cr.shift:0)+(e.metaKey?cr.cmd:0);return t}function hr(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return ur(e.slice(0,-1));const t=ur(e);return n.isMac&&t==cr.ctrl?cr.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function pr(e){let t=hr(e);return Object.entries(n.isMac?ar:lr).reduce(((e,[o,n])=>(0!=(t&cr[o])&&(t&=~cr[o],e+=n),e)),"")+(t?dr[t]:"")}function gr(e,t){const o="ltr"===t;switch(e){case cr.arrowleft:return o?"left":"right";case cr.arrowright:return o?"right":"left";case cr.arrowup:return"up";case cr.arrowdown:return"down"}}function mr(e){return Array.isArray(e)?e:[e]}function fr(e,t,o=1){if("number"!=typeof o)throw new f("translation-service-quantity-not-a-number",null,{quantity:o});const n=Object.keys(In.window.CKEDITOR_TRANSLATIONS).length;1===n&&(e=Object.keys(In.window.CKEDITOR_TRANSLATIONS)[0]);const r=t.id||t.string;if(0===n||!function(e,t){return!!In.window.CKEDITOR_TRANSLATIONS[e]&&!!In.window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,r))return 1!==o?t.plural:t.string;const i=In.window.CKEDITOR_TRANSLATIONS[e].dictionary,s=In.window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1),a=i[r];if("string"==typeof a)return a;return a[Number(s(o))]}In.window.CKEDITOR_TRANSLATIONS||(In.window.CKEDITOR_TRANSLATIONS={});const br=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function kr(e){return br.includes(e)?"rtl":"ltr"}class wr{constructor({uiLanguage:e="en",contentLanguage:t}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=kr(this.uiLanguage),this.contentLanguageDirection=kr(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=mr(t),"string"==typeof e&&(e={string:e});const o=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,o)=>othis._items.length||t<0)throw new f("collection-add-item-invalid-index",this);let o=0;for(const n of e){const e=this._getItemIdBeforeAdding(n),r=t+o;this._items.splice(r,0,n),this._itemMap.set(e,n),this.fire("add",n,r),o++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new f("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,o]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:o}),t}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new f("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,o=(o,n,r)=>{const i=t._bindToCollection==this,s=t._bindToInternalToExternalMap.get(n);if(i&&s)this._bindToExternalToInternalMap.set(n,s),this._bindToInternalToExternalMap.set(s,n);else{const o=e(n);if(!o)return void this._skippedIndexesFromExternal.push(r);let i=r;for(const e of this._skippedIndexesFromExternal)r>e&&i--;for(const e of t._skippedIndexesFromExternal)i>=e&&i++;this._bindToExternalToInternalMap.set(n,o),this._bindToInternalToExternalMap.set(o,n),this.add(o,i);for(let e=0;e{const n=this._bindToExternalToInternalMap.get(t);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(ot&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let o;if(t in e){if(o=e[t],"string"!=typeof o)throw new f("collection-add-invalid-id",this);if(this.get(o))throw new f("collection-add-item-already-exists",this)}else e[t]=o=h();return o}_remove(e){let t,o,n,r=!1;const i=this._idProperty;if("string"==typeof e?(o=e,n=this._itemMap.get(o),r=!n,n&&(t=this._items.indexOf(n))):"number"==typeof e?(t=e,n=this._items[t],r=!n,n&&(o=n[i])):(n=e,o=n[i],t=this._items.indexOf(n),r=-1==t||!this._itemMap.get(o)),r)throw new f("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(o);const s=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(s),this.fire("remove",n,t),[n,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function yr(e){const t=e.next();return t.done?null:t.value}class Ar extends(Dn(H())){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(e){if(this._elements.has(e))throw new f("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class Cr{constructor(){this._listener=new(Dn())}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+ur(t),t)}))}set(e,t,o={}){const n=hr(e),r=o.priority;this._listener.listenTo(this._listener,"_keydown:"+n,((e,o)=>{t(o,(()=>{o.preventDefault(),o.stopPropagation(),e.stop()})),e.return=!0}),{priority:r})}press(e){return!!this._listener.fire("_keydown:"+ur(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function vr(e){return Q(e)?new Map(e):function(e){const t=new Map;for(const o in e)t.set(o,e[o]);return t}(e)}function xr(e,t){let o;function n(...r){n.cancel(),o=setTimeout((()=>e(...r)),t)}return n.cancel=()=>{clearTimeout(o)},n}function Er(e,t){return!!(o=e.charAt(t-1))&&1==o.length&&/[\ud800-\udbff]/.test(o)&&function(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}(e.charAt(t));var o}function Dr(e,t){return!!(o=e.charAt(t))&&1==o.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(o);var o}const Sr=function(){const e=/\p{Regional_Indicator}{2}/u.source,t="(?:"+[/\p{Emoji}[\u{E0020}-\u{E007E}]+\u{E007F}/u,/\p{Emoji}\u{FE0F}?\u{20E3}/u,/\p{Emoji}\u{FE0F}/u,/(?=\p{General_Category=Other_Symbol})\p{Emoji}\p{Emoji_Modifier}*/u].map((e=>e.source)).join("|")+")";return new RegExp(`${e}|${t}(?:‍${t})*`,"ug")}();function Tr(e,t){const o=String(e).matchAll(Sr);return Array.from(o).some((e=>e.index{this.refresh()})),this.listenTo(e,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(t=>{this.affectsData&&(e.isReadOnly||this._isEnabledBasedOnSelection&&!e.model.canEditAt(e.model.document.selection))&&(t.return=!1,t.stop())}),{priority:"highest"}),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",Rr,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",Rr),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function Rr(e){e.return=!1,e.stop()}class zr extends(S()){constructor(e,t=[],o=[]){super(),this._plugins=new Map,this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of o)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new f("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],o=[]){const n=this,r=this._context;!function e(t,o=new Set){t.forEach((t=>{a(t)&&(o.has(t)||(o.add(t),t.pluginName&&!n._availablePlugins.has(t.pluginName)&&n._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,o)))}))}(e),u(e);const i=[...function e(t,o=new Set){return t.map((e=>a(e)?e:n._availablePlugins.get(e))).reduce(((t,n)=>o.has(n)?t:(o.add(n),n.requires&&(u(n.requires,n),e(n.requires,o).forEach((e=>t.add(e)))),t.add(n))),new Set)}(e.filter((e=>!c(e,t))))];!function(e,t){for(const o of t){if("function"!=typeof o)throw new f("plugincollection-replace-plugin-invalid-type",null,{pluginItem:o});const t=o.pluginName;if(!t)throw new f("plugincollection-replace-plugin-missing-name",null,{pluginItem:o});if(o.requires&&o.requires.length)throw new f("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const r=n._availablePlugins.get(t);if(!r)throw new f("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const i=e.indexOf(r);if(-1===i){if(n._contextPlugins.has(r))return;throw new f("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(r.requires&&r.requires.length)throw new f("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(i,1,o),n._availablePlugins.set(t,o)}}(i,o);const s=function(e){return e.map((e=>{let t=n._contextPlugins.get(e);return t=t||new e(r),n._add(e,t),t}))}(i);return h(s,"init").then((()=>h(s,"afterInit"))).then((()=>s));function a(e){return"function"==typeof e}function l(e){return a(e)&&!!e.isContextPlugin}function c(e,t){return t.some((t=>t===e||(d(e)===t||d(t)===e)))}function d(e){return a(e)?e.pluginName||e.name:e}function u(e,o=null){e.map((e=>a(e)?e:n._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(a(e))return;if(t)throw new f("plugincollection-soft-required",r,{missingPlugin:e,requiredBy:d(t)});throw new f("plugincollection-plugin-not-found",r,{plugin:e})}(e,o),function(e,t){if(!l(t))return;if(l(e))return;throw new f("plugincollection-context-required",r,{plugin:d(e),requiredBy:d(t)})}(e,o),function(e,o){if(!o)return;if(!c(e,t))return;throw new f("plugincollection-required",r,{plugin:d(e),requiredBy:d(o)})}(e,o)}))}function h(e,t){return e.reduce(((e,o)=>o[t]?n._contextPlugins.has(o)?e:e.then(o[t].bind(o)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const o=e.pluginName;if(o){if(this._plugins.has(o))throw new f("plugincollection-plugin-name-conflict",null,{pluginName:o,plugin1:this._plugins.get(o).constructor,plugin2:e});this._plugins.set(o,t)}}}class Mr{constructor(e){this._contextOwner=null,this.config=new yn(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new zr(this,t);const o=this.config.get("language")||{};this.locale=new wr({uiLanguage:"string"==typeof o?o:o.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new _r}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const o of e.concat(t)){if("function"!=typeof o)throw new f("context-initplugins-constructor-only",null,{Plugin:o});if(!0!==o.isContextPlugin)throw new f("context-initplugins-invalid-plugin",null,{Plugin:o})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new f("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const o=new this(e);t(o.initPlugins().then((()=>o)))}))}}class Nr extends(H()){constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}var Fr=o(3379),Or=o.n(Fr),Vr=o(9037),Lr=o.n(Vr),jr=o(569),qr=o.n(jr),Hr=o(8575),Wr=o.n(Hr),$r=o(9216),Ur=o.n($r),Gr=o(8894),Kr={attributes:{"data-cke":!0}};Kr.setAttributes=Wr(),Kr.insert=qr().bind(null,"head"),Kr.domAPI=Lr(),Kr.insertStyleElement=Ur();Or()(Gr.Z,Kr);Gr.Z&&Gr.Z.locals&&Gr.Z.locals;const Zr=new WeakMap;function Jr({view:e,element:t,text:o,isDirectHost:n=!0,keepOnFocus:r=!1}){const i=e.document;Zr.has(i)||(Zr.set(i,new Map),i.registerPostFixer((e=>Yr(i,e))),i.on("change:isComposing",(()=>{e.change((e=>Yr(i,e)))}),{priority:"high"})),Zr.get(i).set(t,{text:o,isDirectHost:n,keepOnFocus:r,hostElement:n?t:null}),e.change((e=>Yr(i,e)))}function Qr(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function Yr(e,t){const o=Zr.get(e),n=[];let r=!1;for(const[e,i]of o)i.isDirectHost&&(n.push(e),Xr(t,e,i)&&(r=!0));for(const[e,i]of o){if(i.isDirectHost)continue;const o=ei(e);o&&(n.includes(o)||(i.hostElement=o,Xr(t,e,i)&&(r=!0)))}return r}function Xr(e,t,o){const{text:n,isDirectHost:r,hostElement:i}=o;let s=!1;i.getAttribute("data-placeholder")!==n&&(e.setAttribute("data-placeholder",n,i),s=!0);return(r||1==t.childCount)&&function(e,t){if(!e.isAttached())return!1;const o=Array.from(e.getChildren()).some((e=>!e.is("uiElement")));if(o)return!1;const n=e.document,r=n.selection.anchor;return!(n.isComposing&&r&&r.parent===e||!t&&n.isFocused&&(!r||r.parent===e))}(i,o.keepOnFocus)?function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,i)&&(s=!0):Qr(e,i)&&(s=!0),s}function ei(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}class ti{is(){throw new Error("is() method is abstract")}}const oi=function(e){return kn(e,4)};class ni extends(S(ti)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new f("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),n=e.getAncestors(t);let r=0;for(;o[r]==n[r]&&o[r];)r++;return 0===r?null:o[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),n=J(t,o);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n]e.data.length)throw new f("view-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.data.length)throw new f("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let o=e.includeSelf?this.textNode:this.parent;for(;null!==o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}}ii.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};class si{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const o=ai(t,e);if(o)return{element:t,pattern:e,match:o}}return null}matchAll(...e){const t=[];for(const o of e)for(const e of this._patterns){const n=ai(o,e);n&&t.push({element:o,pattern:e,match:n})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function ai(e,t){if("function"==typeof t)return t(e);const o={};return t.name&&(o.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!o.name)||t.attributes&&(o.attributes=function(e,t){const o=new Set(t.getAttributeKeys());Ae(e)?(void 0!==e.style&&b("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&b("matcher-pattern-deprecated-attributes-class-key",e)):(o.delete("style"),o.delete("class"));return li(e,o,(e=>t.getAttribute(e)))}(t.attributes,e),!o.attributes)||t.classes&&(o.classes=function(e,t){return li(e,t.getClassNames(),(()=>{}))}(t.classes,e),!o.classes)||t.styles&&(o.styles=function(e,t){return li(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!o.styles)?null:o}function li(e,t,o){const n=function(e){if(Array.isArray(e))return e.map((e=>Ae(e)?(void 0!==e.key&&void 0!==e.value||b("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if(Ae(e))return Object.entries(e);return[[e,!0]]}(e),r=Array.from(t),i=[];if(n.forEach((([e,t])=>{r.forEach((n=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,n)&&function(e,t,o){if(!0===e)return!0;const n=o(t);return e===n||e instanceof RegExp&&!!String(n).match(e)}(t,n,o)&&i.push(n)}))})),n.length&&!(i.lengthr?0:r+t),(o=o>r?r:o)<0&&(o+=r),r=t>o?0:o-t>>>0,t>>>=0;for(var i=Array(r);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}};const Zi=Ki(Ui);const Ji=function(e,t){return Zi(Wi(e,t,ji),e+"")};const Qi=function(e,t,o){if(!N(o))return!1;var n=typeof t;return!!("number"==n?no(o)&&Vt(t,o.length):"string"==n&&t in o)&&ve(o[t],e)};const Yi=function(e){return Ji((function(t,o){var n=-1,r=o.length,i=r>1?o[r-1]:void 0,s=r>2?o[2]:void 0;for(i=e.length>3&&"function"==typeof i?(r--,i):void 0,s&&Qi(o[0],o[1],s)&&(i=r<3?void 0:i,r=1),t=Object(t);++nt===e));return Array.isArray(t)}set(e,t){if(N(e))for(const[t,o]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,o,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=is(e);Pi(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!N(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map((([e])=>e))}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const o of t)e.push(...this._styleProcessor.getReducedForm(o,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const o=t.splice(0,t.length-1).join("."),n=Ri(this._styles,o);if(!n)return;!Array.from(Object.keys(n)).length&&this.remove(o)}}class rs{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,o){if(N(t))ss(o,is(e),t);else if(this._normalizers.has(e)){const n=this._normalizers.get(e),{path:r,value:i}=n(t);ss(o,r,i)}else ss(o,e,t)}getNormalized(e,t){if(!e)return es({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const o=this._extractors.get(e);if("string"==typeof o)return Ri(t,o);const n=o(e,t);if(n)return n}return Ri(t,is(e))}getReducedForm(e,t){const o=this.getNormalized(e,t);if(void 0===o)return[];if(this._reducers.has(e)){return this._reducers.get(e)(o)}return[[e,o]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const o=this.getNormalized(t,e);return o&&"object"==typeof o?Object.keys(o).length:o})),o=new Set([...t,...Object.keys(e)]);return Array.from(o.values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const o of t)this._mapStyleNames(o,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function is(e){return e.replace("-",".")}function ss(e,t,o){let n=o;N(o)&&(n=es({},Ri(e,t),o)),os(e,t,n)}class as extends ni{constructor(e,t,o,n){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=vr(e);for(const[e,o]of t)null===o?t.delete(e):"string"!=typeof o&&t.set(e,String(o));return t}(o),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");ls(this._classes,e),this._attrs.delete("class")}this._styles=new ns(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof as))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,o]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==o)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new si(...e);let o=this.parent;for(;o&&!o.is("documentFragment");){if(t.match(o))return o;o=o.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),o=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==o?"":` ${o}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const o of this.getChildren())t.push(o._clone(e));const o=new this.constructor(this.document,this.name,this._attrs,t);return o._classes=new Set(this._classes),o._styles.set(this._styles.getNormalized()),o._customProperties=new Map(this._customProperties),o.getFillerOffset=this.getFillerOffset,o._unsafeAttributesToRender=this._unsafeAttributesToRender,o}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let o=0;const n=function(e,t){if("string"==typeof t)return[new ri(e,t)];Q(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new ri(e,t):t instanceof ii?new ri(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of mr(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of mr(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of mr(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function ls(e,t){const o=t.split(/\s+/);e.clear(),o.forEach((t=>e.add(t)))}as.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class cs extends as{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=ds}}function ds(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}cs.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class us extends(H(cs)){constructor(e,t,o,n){super(e,t,o,n),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}us.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const hs=Symbol("rootName");class ps extends us{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(hs)}set rootName(e){this._setCustomProperty(hs,e)}set _name(e){this.name=e}}ps.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class gs{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new f("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new f("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=ms._createAt(e.startPosition):this._position=ms._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o;do{o=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&e.offset===o.childCount)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let n;if(o instanceof ri){if(e.isAtEnd)return this._position=ms._createAfter(o),this._next();n=o.data[e.offset]}else n=o.getChild(e.offset);if(n instanceof as)return this.shallow?e.offset++:e=new ms(n,0),this._position=e,this._formatReturnValue("elementStart",n,t,e,1);if(n instanceof ri){if(this.singleCharacters)return e=new ms(n,0),this._position=e,this._next();{let o,r=n.data.length;return n==this._boundaryEndParent?(r=this.boundaries.end.offset,o=new ii(n,0,r),e=ms._createAfter(o)):(o=new ii(n,0,n.data.length),e.offset++),this._position=e,this._formatReturnValue("text",o,t,e,r)}}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{n=(o===this._boundaryEndParent?this.boundaries.end.offset:o.data.length)-e.offset}const r=new ii(o,e.offset,n);return e.offset+=n,this._position=e,this._formatReturnValue("text",r,t,e,n)}return e=ms._createAfter(o),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",o,t,e)}_previous(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&0===e.offset)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let n;if(o instanceof ri){if(e.isAtStart)return this._position=ms._createBefore(o),this._previous();n=o.data[e.offset-1]}else n=o.getChild(e.offset-1);if(n instanceof as)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",n,t,e,1)):(e=new ms(n,n.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",n,t,e));if(n instanceof ri){if(this.singleCharacters)return e=new ms(n,n.data.length),this._position=e,this._previous();{let o,r=n.data.length;if(n==this._boundaryStartParent){const t=this.boundaries.start.offset;o=new ii(n,t,n.data.length-t),r=o.data.length,e=ms._createBefore(o)}else o=new ii(n,0,n.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",o,t,e,r)}}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{const t=o===this._boundaryStartParent?this.boundaries.start.offset:0;n=e.offset-t}e.offset-=n;const r=new ii(o,e.offset,n);return this._position=e,this._formatReturnValue("text",r,t,e,n)}return e=ms._createBefore(o),this._position=e,this._formatReturnValue("elementStart",o,t,e,1)}_formatReturnValue(e,t,o,n,r){return t instanceof ii&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?o=ms._createAfter(t.textNode):(n=ms._createAfter(t.textNode),this._position=n)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?o=ms._createBefore(t.textNode):(n=ms._createBefore(t.textNode),this._position=n))),{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:n,length:r}}}}class ms extends ti{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof us);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=ms._createAt(this),o=t.offset+e;return t.offset=o<0?0:o,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const o=new gs(t);return o.skip(e),o.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),o=e.getAncestors();let n=0;for(;t[n]==o[n]&&t[n];)n++;return 0===n?null:t[n-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],o=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),o.push(e.offset);const n=J(t,o);switch(n){case"prefix":return"before";case"extension":return"after";default:return t[n]0?new this(o,n):new this(n,o)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(ms._createBefore(e),t)}}function bs(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}fs.prototype.is=function(e){return"range"===e||"view:range"===e};class ks extends(S(ti)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const n of e._ranges)if(t.isEqual(n)){o=!0;break}if(!o)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=Z(this.getRanges());if(t!=Z(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let o=!1;for(let n of e.getRanges())if(n=n.getTrimmed(),t.start.isEqual(n.start)&&t.end.isEqual(n.end)){o=!0;break}if(!o)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,o,n]=e;if("object"==typeof o&&(n=o,o=void 0),null===t)this._setRanges([]),this._setFakeOptions(n);else if(t instanceof ks||t instanceof ws)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof fs)this._setRanges([t],n&&n.backward),this._setFakeOptions(n);else if(t instanceof ms)this._setRanges([new fs(t)]),this._setFakeOptions(n);else if(t instanceof ni){const e=!!n&&!!n.backward;let r;if(void 0===o)throw new f("view-selection-setto-required-second-parameter",this);r="in"==o?fs._createIn(t):"on"==o?fs._createOn(t):new fs(ms._createAt(t,o)),this._setRanges([r],e),this._setFakeOptions(n)}else{if(!Q(t))throw new f("view-selection-setto-not-selectable",this);this._setRanges(t,n&&n.backward),this._setFakeOptions(n)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new f("view-selection-setfocus-no-ranges",this);const o=ms._createAt(e,t);if("same"==o.compareWith(this.focus))return;const n=this.anchor;this._ranges.pop(),"before"==o.compareWith(n)?this._addRange(new fs(o,n),!0):this._addRange(new fs(n,o)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof fs))throw new f("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new f("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new fs(e.start,e.end))}}ks.prototype.is=function(e){return"selection"===e||"view:selection"===e};class ws extends(S(ti)){constructor(...e){super(),this._selection=new ks,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}ws.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class _s extends d{constructor(e,t,o){super(e,t),this.startRange=o,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const ys=Symbol("bubbling contexts");function As(e){return class extends e{fire(e,...t){try{const o=e instanceof d?e:new d(this,e),n=Es(this);if(!n.size)return;if(Cs(o,"capturing",this),vs(n,"$capture",o,...t))return o.return;const r=o.startRange||this.selection.getFirstRange(),i=r?r.getContainedElement():null,s=!!i&&Boolean(xs(n,i));let a=i||function(e){if(!e)return null;const t=e.start.parent,o=e.end.parent,n=t.getPath(),r=o.getPath();return n.length>r.length?t:o}(r);if(Cs(o,"atTarget",a),!s){if(vs(n,"$text",o,...t))return o.return;Cs(o,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(vs(n,"$root",o,...t))return o.return}else if(a.is("element")&&vs(n,a.name,o,...t))return o.return;if(vs(n,a,o,...t))return o.return;a=a.parent,Cs(o,"bubbling",a)}return Cs(o,"bubbling",this),vs(n,"$document",o,...t),o.return}catch(e){f.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,o){const n=mr(o.context||"$document"),r=Es(this);for(const i of n){let n=r.get(i);n||(n=new(S()),r.set(i,n)),this.listenTo(n,e,t,o)}}_removeEventListener(e,t){const o=Es(this);for(const n of o.values())this.stopListening(n,e,t)}}}{const e=As(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{As[t]=e.prototype[t]}))}function Cs(e,t,o){e instanceof _s&&(e._eventPhase=t,e._currentTarget=o)}function vs(e,t,o,...n){const r="string"==typeof t?e.get(t):xs(e,t);return!!r&&(r.fire(o,...n),o.stop.called)}function xs(e,t){for(const[o,n]of e)if("function"==typeof o&&o(t))return n;return null}function Es(e){return e[ys]||(e[ys]=new Map),e[ys]}class Ds extends(As(H())){constructor(e){super(),this._postFixers=new Set,this.selection=new ws,this.roots=new _r({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(t=o(e),t)break}while(t)}}class Ss extends as{constructor(e,t,o,n){super(e,t,o,n),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Ts}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new f("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function Ts(){if(Bs(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Bs(e)>1)return null;e=e.parent}return!e||Bs(e)>1?null:this.childCount}function Bs(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}Ss.DEFAULT_PRIORITY=10,Ss.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Is extends as{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=Ps}_insertChild(e,t){if(t&&(t instanceof ni||Array.from(t).length>0))throw new f("view-emptyelement-cannot-add",[this,t]);return 0}}function Ps(){return null}Is.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Rs extends as{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=Ms}_insertChild(e,t){if(t&&(t instanceof ni||Array.from(t).length>0))throw new f("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function zs(e){e.document.on("arrowKey",((t,o)=>function(e,t,o){if(t.keyCode==cr.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),n=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(n||t.shiftKey){const t=e.focusNode,r=e.focusOffset,i=o.domPositionToView(t,r);if(null===i)return;let s=!1;const a=i.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(s=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(s){const t=o.viewPositionToDom(a);n?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,o,e.domConverter)),{priority:"low"})}function Ms(){return null}Rs.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ns extends as{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=Fs}_insertChild(e,t){if(t&&(t instanceof ni||Array.from(t).length>0))throw new f("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function Fs(){return null}Ns.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Os extends(S(ti)){constructor(e,t){super(),this._children=[],this._customProperties=new Map,this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let o=0;const n=function(e,t){if("string"==typeof t)return[new ri(e,t)];Q(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new ri(e,t):t instanceof ii?new ri(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o{const o=e[e.length-1],n=!t.is("uiElement");return o&&o.breakAttributes==n?o.nodes.push(t):e.push({breakAttributes:n,nodes:[t]}),e}),[]);let n=null,r=e;for(const{nodes:e,breakAttributes:t}of o){const o=this._insertNodes(r,e,t);n||(n=o.start),r=o.end}return n?new fs(n,r):new fs(e)}remove(e){const t=e instanceof fs?e:fs._createOn(e);if(Ks(t,this.document),t.isCollapsed)return new Os(this.document);const{start:o,end:n}=this._breakAttributesRange(t,!0),r=o.parent,i=n.offset-o.offset,s=r._removeChildren(o.offset,i);for(const e of s)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(o);return t.start=a,t.end=a.clone(),new Os(this.document,s)}clear(e,t){Ks(e,this.document);const o=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const n of o){const o=n.item;let r;if(o.is("element")&&t.isSimilar(o))r=fs._createOn(o);else if(!n.nextPosition.isAfter(e.start)&&o.is("$textProxy")){const e=o.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(r=fs._createIn(e))}r&&(r.end.isAfter(e.end)&&(r.end=e.end),r.start.isBefore(e.start)&&(r.start=e.start),this.remove(r))}}move(e,t){let o;if(t.isAfter(e.end)){const n=(t=this._breakAttributes(t,!0)).parent,r=n.childCount;e=this._breakAttributesRange(e,!0),o=this.remove(e),t.offset+=n.childCount-r}else o=this.remove(e);return this.insert(t,o)}wrap(e,t){if(!(t instanceof Ss))throw new f("view-writer-wrap-invalid-attribute",this.document);if(Ks(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&(o=n.parent,!Array.from(o.getChildren()).some((e=>!e.is("uiElement"))))&&(n=n.getLastMatchingPosition((e=>e.item.is("uiElement")))),n=this._wrapPosition(n,t);const r=this.document.selection;return r.isCollapsed&&r.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new fs(n)}return this._wrapRange(e,t);var o}unwrap(e,t){if(!(t instanceof Ss))throw new f("view-writer-unwrap-invalid-attribute",this.document);if(Ks(e,this.document),e.isCollapsed)return e;const{start:o,end:n}=this._breakAttributesRange(e,!0),r=o.parent,i=this._unwrapChildren(r,o.offset,n.offset,t),s=this.mergeAttributes(i.start);s.isEqual(i.start)||i.end.offset--;const a=this.mergeAttributes(i.end);return new fs(s,a)}rename(e,t){const o=new cs(this.document,e,t.getAttributes());return this.insert(ms._createAfter(t),o),this.move(fs._createIn(t),ms._createAt(o,0)),this.remove(fs._createOn(t)),o}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return ms._createAt(e,t)}createPositionAfter(e){return ms._createAfter(e)}createPositionBefore(e){return ms._createBefore(e)}createRange(e,t){return new fs(e,t)}createRangeOn(e){return fs._createOn(e)}createRangeIn(e){return fs._createIn(e)}createSelection(...e){return new ks(...e)}createSlot(e="children"){if(!this._slotFactory)throw new f("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,o){let n,r;if(n=o?Ls(e):e.parent.is("$text")?e.parent.parent:e.parent,!n)throw new f("view-writer-invalid-position-container",this.document);r=o?this._breakAttributes(e,!0):e.parent.is("$text")?Hs(e):e;const i=n._insertChild(r.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const s=r.getShiftedBy(i),a=this.mergeAttributes(r);a.isEqual(r)||s.offset--;const l=this.mergeAttributes(s);return new fs(a,l)}_wrapChildren(e,t,o,n){let r=t;const i=[];for(;r!1,e.parent._insertChild(e.offset,o);const n=new fs(e,e.getShiftedBy(1));this.wrap(n,t);const r=new ms(o.parent,o.index);o._remove();const i=r.nodeBefore,s=r.nodeAfter;return i instanceof ri&&s instanceof ri?Ws(i,s):qs(r)}_wrapAttributeElement(e,t){if(!Zs(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&t.hasAttribute(o)&&t.getAttribute(o)!==e.getAttribute(o))return!1;for(const o of e.getStyleNames())if(t.hasStyle(o)&&t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&(t.hasAttribute(o)||this.setAttribute(o,e.getAttribute(o),t));for(const o of e.getStyleNames())t.hasStyle(o)||this.setStyle(o,e.getStyle(o),t);for(const o of e.getClassNames())t.hasClass(o)||this.addClass(o,t);return!0}_unwrapAttributeElement(e,t){if(!Zs(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&(!t.hasAttribute(o)||t.getAttribute(o)!==e.getAttribute(o)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const o of e.getStyleNames())if(!t.hasStyle(o)||t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&this.removeAttribute(o,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const o=e.start,n=e.end;if(Ks(e,this.document),e.isCollapsed){const o=this._breakAttributes(e.start,t);return new fs(o,o)}const r=this._breakAttributes(n,t),i=r.parent.childCount,s=this._breakAttributes(o,t);return r.offset+=r.parent.childCount-i,new fs(s,r)}_breakAttributes(e,t=!1){const o=e.offset,n=e.parent;if(e.parent.is("emptyElement"))throw new f("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new f("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new f("view-writer-cannot-break-raw-element",this.document);if(!t&&n.is("$text")&&Gs(n.parent))return e.clone();if(Gs(n))return e.clone();if(n.is("$text"))return this._breakAttributes(Hs(e),t);if(o==n.childCount){const e=new ms(n.parent,n.index+1);return this._breakAttributes(e,t)}if(0===o){const e=new ms(n.parent,n.index);return this._breakAttributes(e,t)}{const e=n.index+1,r=n._clone();n.parent._insertChild(e,r),this._addToClonedElementsGroup(r);const i=n.childCount-o,s=n._removeChildren(o,i);r._appendChild(s);const a=new ms(n.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let o=this._cloneGroups.get(t);o||(o=new Set,this._cloneGroups.set(t,o)),o.add(e),e._clonesGroup=o}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const o=this._cloneGroups.get(t);o&&o.delete(e)}}function Ls(e){let t=e.parent;for(;!Gs(t);){if(!t)return;t=t.parent}return t}function js(e,t){return e.priorityt.priority)&&e.getIdentity()o instanceof e)))throw new f("view-writer-insert-invalid-node-type",t);o.is("$text")||Us(o.getChildren(),t)}}function Gs(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function Ks(e,t){const o=Ls(e.start),n=Ls(e.end);if(!o||!n||o!==n)throw new f("view-writer-invalid-range-container",t)}function Zs(e,t){return null===e.id&&null===t.id}const Js=e=>e.createTextNode(" "),Qs=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},Ys=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},Xs=7,ea="⁠".repeat(Xs);function ta(e){return Rn(e)&&e.data.substr(0,Xs)===ea}function oa(e){return e.data.length==Xs&&ta(e)}function na(e){return ta(e)?e.data.slice(Xs):e.data}function ra(e,t){if(t.keyCode==cr.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,o=e.getRangeAt(0).startOffset;ta(t)&&o<=Xs&&e.collapse(t,0)}}}var ia=o(4401),sa={attributes:{"data-cke":!0}};sa.setAttributes=Wr(),sa.insert=qr().bind(null,"head"),sa.domAPI=Lr(),sa.insertStyleElement=Ur();Or()(ia.Z,sa);ia.Z&&ia.Z.locals&&ia.Z.locals;class aa extends(H()){constructor(e,t){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),n.isBlink&&!n.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e){throw new f("view-renderer-unknown-type",this)}this.markedChildren.add(t)}}}render(){if(this.isComposing&&!n.isAndroid)return;let e=null;const t=!(n.isBlink&&!n.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=ms._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),o=t.parent.ownerDocument;ta(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=la(o,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){if(!this.domConverter.mapViewToDom(e))return;const t=Array.from(this.domConverter.mapViewToDom(e).childNodes),o=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),n=this._diffNodeLists(t,o),r=this._findUpdateActions(n,t,o,ca);if(-1!==r.indexOf("update")){const n={equal:0,insert:0,delete:0};for(const i of r)if("update"===i){const r=n.equal+n.insert,i=n.equal+n.delete,s=e.getChild(r);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,t[i]),Qn(o[r]),n.equal++}else n[i]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?ms._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Rn(t.parent)&&ta(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!ta(e))throw new f("view-renderer-filler-was-lost",this);oa(e)?e.remove():e.data=e.data.substr(Xs),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,o=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(o===t.getFillerOffset())return!1;const r=e.nodeBefore,i=e.nodeAfter;return!(r instanceof ri||i instanceof ri)&&(!n.isAndroid||!r&&!i)}_updateText(e,t){const o=this.domConverter.findCorrespondingDomText(e);let n=this.domConverter.viewToDom(e).data;const r=t.inlineFillerPosition;r&&r.parent==e.parent&&r.offset==e.index&&(n=ea+n),ha(o,n)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const o=Array.from(t.attributes).map((e=>e.name)),n=e.getAttributeKeys();for(const o of n)this.domConverter.setDomElementAttribute(t,o,e.getAttribute(o),e);for(const n of o)e.hasAttribute(n)||this.domConverter.removeDomElementAttribute(t,n)}_updateChildren(e,t){const o=this.domConverter.mapViewToDom(e);if(!o)return;if(n.isAndroid){let e=null;for(const t of Array.from(o.childNodes)){if(e&&Rn(e)&&Rn(t)){o.normalize();break}e=t}}const r=t.inlineFillerPosition,i=o.childNodes,s=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));r&&r.parent===e&&la(o.ownerDocument,s,r.offset);const a=this._diffNodeLists(i,s),l=this._findUpdateActions(a,i,s,da);let c=0;const d=new Set;for(const e of l)"delete"===e?(d.add(i[c]),Qn(i[c])):"equal"!==e&&"update"!==e||c++;c=0;for(const e of l)"insert"===e?($n(o,c,s[c]),c++):"update"===e?(ha(i[c],s[c].data),c++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(s[c])),c++);for(const e of d)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const o=Array.from(e);if(0==o.length||!t)return o;const n=o[o.length-1];n==t&&o.pop();return o}(e,this._fakeSelectionContainer),l(e,t,ua.bind(null,this.domConverter))}_findUpdateActions(e,t,o,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let r=[],i=[],s=[];const a={equal:0,insert:0,delete:0};for(const c of e)"insert"===c?s.push(o[a.equal+a.insert]):"delete"===c?i.push(t[a.equal+a.delete]):(r=r.concat(l(i,s,n).map((e=>"equal"===e?"update":e))),r.push("equal"),i=[],s=[]),a[c]++;return r.concat(l(i,s,n).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(n.isBlink&&!n.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&n.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const o=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(o,this.selection),!this._fakeSelectionNeedsUpdate(e))return;o.parentElement&&o.parentElement==e||e.appendChild(o),o.textContent=this.selection.fakeSelectionLabel||" ";const n=t.getSelection(),r=t.createRange();n.removeAllRanges(),r.selectNodeContents(o),n.addRange(r)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const o=this.domConverter.viewPositionToDom(this.selection.anchor),r=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(o.parent,o.offset),t.extend(r.parent,r.offset),n.isGecko&&function(e,t){const o=e.parent;if(o.nodeType!=Node.ELEMENT_NODE||e.offset!=o.childNodes.length-1)return;const n=o.childNodes[e.offset];n&&"BR"==n.tagName&&t.addRange(t.getRangeAt(0))}(r,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,o=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(o.anchorNode!==t&&!t.contains(o.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const o=e.activeElement,n=this.domConverter.mapDomToView(o);o&&n&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function la(e,t,o){const n=t instanceof Array?t:t.childNodes,r=n[o];if(Rn(r))return r.data=ea+r.data,r;{const r=e.createTextNode(ea);return Array.isArray(t)?n.splice(o,0,r):$n(t,o,r),r}}function ca(e,t){return vn(e)&&vn(t)&&!Rn(e)&&!Rn(t)&&!Un(e)&&!Un(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function da(e,t){return vn(e)&&vn(t)&&Rn(e)&&Rn(t)}function ua(e,t,o){return t===o||(Rn(t)&&Rn(o)?t.data===o.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(o)))}function ha(e,t){const o=e.data;if(o==t)return;const n=i(o,t);for(const t of n)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const pa=Ys(In.document),ga=Js(In.document),ma=Qs(In.document),fa="data-ck-unsafe-attribute-",ba="data-ck-unsafe-element";class ka{constructor(e,{blockFillerMode:t,renderingMode:o="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new si,this._encounteredRawContentDomNodes=new WeakSet,this.document=e,this.renderingMode=o,this.blockFillerMode=t||("editing"===o?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?In.document:In.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new ks(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,o){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===o&&("src"===e||"srcset"===e)||("source"===o&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const o=(new DOMParser).parseFromString(t,"text/html"),n=o.createDocumentFragment(),r=o.body.childNodes;for(;r.length>0;)n.appendChild(r[0]);const i=o.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=i.nextNode();)s.push(a);for(const e of s){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(ya(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(n)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let o;if(e.is("documentFragment"))o=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(o,e);else{if(e.is("uiElement"))return o="$comment"===e.name?this._domDocument.createComment(e.getCustomProperty("$rawContent")):e.render(this._domDocument,this),t.bind&&this.bindElements(o,e),o;this._shouldRenameElement(e.name)?(ya(e.name),o=this._createReplacementDomElement(e.name)):o=e.hasAttribute("xmlns")?this._domDocument.createElementNS(e.getAttribute("xmlns"),e.name):this._domDocument.createElement(e.name),e.is("rawElement")&&e.render(o,this),t.bind&&this.bindElements(o,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(o,t,e.getAttribute(t),e)}if(!1!==t.withChildren)for(const n of this.viewChildrenToDom(e,t))o.appendChild(n);return o}}setDomElementAttribute(e,t,o,n){const r=this.shouldRenderAttribute(t,o,e.tagName.toLowerCase())||n&&n.shouldRenderUnsafeAttribute(t);r||b("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:o}),function(e){try{In.document.createAttribute(e)}catch(e){return!1}return!0}(t)?(e.hasAttribute(t)&&!r?e.removeAttribute(t):e.hasAttribute(fa+t)&&r&&e.removeAttribute(fa+t),e.setAttribute(r?t:fa+t,o)):b("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:o})}removeDomElementAttribute(e,t){t!=ba&&(e.removeAttribute(t),e.removeAttribute(fa+t))}*viewChildrenToDom(e,t={}){const o=e.getFillerOffset&&e.getFillerOffset();let n=0;for(const r of e.getChildren()){o===n&&(yield this._getBlockFiller());const e=r.is("element")&&!!r.getCustomProperty("dataPipeline:transparentRendering")&&!yr(r.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(r,t):(e&&b("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:r}),yield this.viewToDom(r,t)),n++}o===n&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),o=this.viewPositionToDom(e.end),n=this._domDocument.createRange();return n.setStart(t.parent,t.offset),n.setEnd(o.parent,o.offset),n}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const o=this.findCorrespondingDomText(t);if(!o)return null;let n=e.offset;return ta(o)&&(n+=Xs),{parent:o,offset:n}}{let o,n,r;if(0===e.offset){if(o=this.mapViewToDom(t),!o)return null;r=o.childNodes[0]}else{const t=e.nodeBefore;if(n=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!n)return null;o=n.parentNode,r=n.nextSibling}if(Rn(r)&&ta(r))return{parent:r,offset:Xs};return{parent:o,offset:n?Wn(n)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const o=this.getHostViewElement(e);if(o)return o;if(Un(e)&&t.skipComments)return null;if(Rn(e)){if(oa(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new ri(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let o;if(this.isDocumentFragment(e))o=new Os(this.document),t.bind&&this.bindDocumentFragments(e,o);else{o=this._createViewElement(e,t),t.bind&&this.bindElements(e,o);const n=e.attributes;if(n)for(let e=n.length,t=0;t{const{scrollLeft:t,scrollTop:o}=e;n.push([t,o])})),t.focus(),wa(t,(e=>{const[t,o]=n.shift();e.scrollLeft=t,e.scrollTop=o})),In.window.scrollTo(e,o)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(pa):!("BR"!==e.tagName||!_a(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(ma)||function(e,t){const o=e.isEqualNode(ga);return o&&_a(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const o=t.collapsed;return t.detach(),o}getHostViewElement(e){const t=Pn(e);for(t.pop();t.length;){const e=t.pop(),o=this._domToViewMapping.get(e);if(o&&(o.is("uiElement")||o.is("rawElement")))return o}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return Js(this._domDocument);case"markedNbsp":return Qs(this._domDocument);case"br":return Ys(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if(Rn(e)&&ta(e)&&tthis.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const o=this._getTouchingInlineViewNode(e,!1);!(o&&o.is("$textProxy")&&this._nodeEndsWithSpace(o))&&o||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const o=this._getTouchingInlineViewNode(e,!0),n=o&&o.is("$textProxy")&&" "==o.data.charAt(0);" "!=t.charAt(t.length-2)&&o&&!n||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(function(e,t){const o=Pn(e);return o.some((e=>e.tagName&&t.includes(e.tagName.toLowerCase())))}(e,this.preElements))return na(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const o=this._getTouchingInlineDomNode(e,!1),n=this._getTouchingInlineDomNode(e,!0),r=this._checkShouldLeftTrimDomText(e,o),i=this._checkShouldRightTrimDomText(e,n);r&&(t=t.replace(/^ /,"")),i&&(t=t.replace(/ $/,"")),t=na(new Text(t)),t=t.replace(/ \u00A0/g," ");const s=n&&this.isElement(n)&&"BR"!=n.tagName,a=n&&Rn(n)&&" "==n.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!n||s||a)&&(t=t.replace(/\u00A0$/," ")),(r||o&&this.isElement(o)&&"BR"!=o.tagName)&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!ta(e)}_getTouchingInlineViewNode(e,t){const o=new gs({startPosition:t?ms._createAfter(e):ms._createBefore(e),direction:t?"forward":"backward"});for(const e of o){if(e.item.is("element")&&this.inlineObjectElements.includes(e.item.name))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const o=t?"firstChild":"lastChild",n=t?"nextSibling":"previousSibling";let r=!0,i=e;do{if(!r&&i[o]?i=i[o]:i[n]?(i=i[n],r=!1):(i=i.parentNode,r=!0),!i||this._isBlockElement(i))return null}while(!Rn(i)&&"BR"!=i.tagName&&!this._isInlineObjectElement(i));return i}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if(Un(e))return new Rs(this.document,"$comment");const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new as(this.document,o)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const o=this._domDocument.createElement("span");if(o.setAttribute(ba,e),t){for(;t.firstChild;)o.appendChild(t.firstChild);for(const e of t.getAttributeNames())o.setAttribute(e,t.getAttribute(e))}return o}}function wa(e,t){let o=e;for(;o;)t(o),o=o.parentElement}function _a(e,t){const o=e.parentNode;return!!o&&!!o.tagName&&t.includes(o.tagName.toLowerCase())}function ya(e){"script"===e&&b("domconverter-unsafe-script-element-detected"),"style"===e&&b("domconverter-unsafe-style-element-detected")}class Aa extends(Dn()){constructor(e){super(),this._isEnabled=!1,this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}var Ca=Yi((function(e,t){Et(t,co(t),e)}));const va=Ca;class xa{constructor(e,t,o){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,va(this,o)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Ea extends Aa{constructor(){super(...arguments),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,o){this.isEnabled&&this.document.fire(e,new xa(this.view,t,o))}}class Da extends Ea{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return ur(this)}};this.fire(e.type,e,t)}}const Sa=function(){return ee.Date.now()};var Ta=/\s/;const Ba=function(e){for(var t=e.length;t--&&Ta.test(e.charAt(t)););return t};var Ia=/^\s+/;const Pa=function(e){return e?e.slice(0,Ba(e)+1).replace(Ia,""):e};var Ra=/^[-+]0x[0-9a-f]+$/i,za=/^0b[01]+$/i,Ma=/^0o[0-7]+$/i,Na=parseInt;const Fa=function(e){if("number"==typeof e)return e;if(ci(e))return NaN;if(N(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=N(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Pa(e);var o=za.test(e);return o||Ma.test(e)?Na(e.slice(2),o?2:8):Ra.test(e)?NaN:+e};var Oa=Math.max,Va=Math.min;const La=function(e,t,o){var n,r,i,s,a,l,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var o=n,i=r;return n=r=void 0,c=t,s=e.apply(i,o)}function g(e){var o=e-l;return void 0===l||o>=t||o<0||u&&e-c>=i}function m(){var e=Sa();if(g(e))return f(e);a=setTimeout(m,function(e){var o=t-(e-l);return u?Va(o,i-(e-c)):o}(e))}function f(e){return a=void 0,h&&n?p(e):(n=r=void 0,s)}function b(){var e=Sa(),o=g(e);if(n=arguments,r=this,l=e,o){if(void 0===a)return function(e){return c=e,a=setTimeout(m,t),d?p(e):s}(l);if(u)return clearTimeout(a),a=setTimeout(m,t),p(l)}return void 0===a&&(a=setTimeout(m,t)),s}return t=Fa(t)||0,N(o)&&(d=!!o.leading,i=(u="maxWait"in o)?Oa(Fa(o.maxWait)||0,t):i,h="trailing"in o?!!o.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=r=a=void 0},b.flush=function(){return void 0===a?s:f(Sa())},b};class ja extends Aa{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=La((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&o.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(o.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,o=new ks(t.getRanges(),{backward:t.isBackward,fake:!1});e!=cr.arrowleft&&e!=cr.arrowup||o.setTo(o.getFirstPosition()),e!=cr.arrowright&&e!=cr.arrowdown||o.setTo(o.getLastPosition());const n={oldSelection:t,newSelection:o,domSelection:null};this.document.fire("selectionChange",n),this._fireSelectionChangeDoneDebounced(n)}}const qa=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const Ha=function(e){return this.__data__.has(e)};function Wa(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new bt;++ta))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var u=-1,h=!0,p=2&o?new $a:void 0;for(i.set(e,t),i.set(t,e);++u{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((o,n)=>{const r=t.selection.editableElement;null!==r&&r!==n.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class hl extends Aa{constructor(e){super(e),this.mutationObserver=e.getObserver(cl),this.focusObserver=e.getObserver(ul),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=La((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=La((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,o=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",o,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",o,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",o,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,o)=>{this.document.isComposing&&!n.isAndroid||(this._handleSelectionChange(o,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const o=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(o.anchorNode))return;this.mutationObserver.flush();const n=this.domConverter.domSelectionToView(o);if(0!=n.rangeCount){if(this.view.hasDomSelection=!0,!this.selection.isEqual(n)||!this.domConverter.isDomSelectionCorrect(o))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.focusObserver.flush(),this.selection.isSimilar(n))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:n,domSelection:o};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class pl extends Ea{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class gl{constructor(e,t={}){this._files=t.cacheFiles?ml(e):null,this._native=e}get files(){return this._files||(this._files=ml(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,o){this._native.setDragImage(e,t,o)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function ml(e){const t=Array.from(e.files||[]),o=Array.from(e.items||[]);return t.length?t:o.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class fl extends Ea{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(e){const t=e.getTargetRanges(),o=this.view,r=o.document;let i=null,s=null,a=[];if(e.dataTransfer&&(i=new gl(e.dataTransfer)),null!==e.data?s=e.data:i&&(s=i.getData("text/plain")),r.selection.isFake)a=Array.from(r.selection.getRanges());else if(t.length)a=t.map((e=>o.domConverter.domRangeToView(e)));else if(n.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();a=Array.from(o.domConverter.domSelectionToView(t).getRanges())}if(n.isAndroid&&"insertCompositionText"==e.inputType&&s&&s.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[o.createRange(a[0].end)]});else if("insertText"==e.inputType&&s&&s.includes("\n")){const t=s.split(/\n{1,2}/g);let o=a;for(let n=0;n{if(this.isEnabled&&((o=t.keyCode)==cr.arrowright||o==cr.arrowleft||o==cr.arrowup||o==cr.arrowdown)){const o=new _s(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(o,t),o.stop.called&&e.stop()}var o}))}observe(){}stopObserving(){}}class kl extends Aa{constructor(e){super(e);const t=this.document;t.on("keydown",((e,o)=>{if(!this.isEnabled||o.keyCode!=cr.tab||o.ctrlKey)return;const n=new _s(t,"tab",t.selection.getFirstRange());t.fire(n,o),n.stop.called&&e.stop()}))}observe(){}stopObserving(){}}class wl extends(H()){constructor(e){super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new Ds(e),this.domConverter=new ka(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new aa(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new Vs(this.document),this.addObserver(cl),this.addObserver(ul),this.addObserver(hl),this.addObserver(Da),this.addObserver(ja),this.addObserver(pl),this.addObserver(bl),this.addObserver(fl),this.addObserver(kl),this.document.on("arrowKey",ra,{priority:"low"}),zs(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0}))}attachDomRoot(e,t="main"){const o=this.document.getRoot(t);o._name=e.tagName.toLowerCase();const n={};for(const{name:t,value:r}of Array.from(e.attributes))n[t]=r,"class"===t?this._writer.addClass(r.split(" "),o):this._writer.setAttribute(t,r,o);this._initialDomRootAttributes.set(e,n);const r=()=>{this._writer.setAttribute("contenteditable",(!o.isReadOnly).toString(),o),o.isReadOnly?this._writer.addClass("ck-read-only",o):this._writer.removeClass("ck-read-only",o)};r(),this.domRoots.set(t,e),this.domConverter.bindElements(e,o),this._renderer.markToSync("children",o),this._renderer.markToSync("attributes",o),this._renderer.domDocuments.add(e.ownerDocument),o.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),o.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),o.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),o.on("change:isReadOnly",(()=>this.change(r))),o.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const o of this._observers.values())o.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const o=this._initialDomRootAttributes.get(t);for(const e in o)t.setAttribute(e,o[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,o]of this.domRoots)t.observe(o,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:o=20,ancestorOffset:n=20}={}){const r=this.document.selection.getFirstRange();r&&function({target:e,viewportOffset:t=0,ancestorOffset:o=0,alignToTop:n,forceScroll:r}){const i=rr(e);let s=i,a=null;for(;s;){let l;l=ir(s==i?e:a),Xn({parent:l,getRect:()=>sr(e,s),alignToTop:n,ancestorOffset:o,forceScroll:r});const c=sr(e,s);if(Yn({window:s,rect:c,viewportOffset:t,alignToTop:n,forceScroll:r}),s.parent!=s){if(a=s.frameElement,s=s.parent,!a)return}else s=null}}({target:this.domConverter.viewRangeToDom(r),viewportOffset:o,ancestorOffset:n,alignToTop:e,forceScroll:t})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new f("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){f.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(ul).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return ms._createAt(e,t)}createPositionAfter(e){return ms._createAfter(e)}createPositionBefore(e){return ms._createBefore(e)}createRange(e,t){return new fs(e,t)}createRangeOn(e){return fs._createOn(e)}createRangeIn(e){return fs._createIn(e)}createSelection(...e){return new ks(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class _l{is(){throw new Error("is() method is abstract")}}class yl extends _l{constructor(e){super(),this.parent=null,this._attrs=vr(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new f("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new f("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),n=e.getAncestors(t);let r=0;for(;o[r]==n[r]&&o[r];)r++;return 0===r?null:o[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),n=J(t,o);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n](e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=vr(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}yl.prototype.is=function(e){return"node"===e||"model:node"===e};class Al{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new f("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const o of this._nodes){if(e>=t&&e1e4)return e.slice(0,o).concat(t).concat(e.slice(o+n,e.length));{const r=Array.from(e);return r.splice(o,n,...t),r}}(this._nodes,Array.from(t),e,0)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e=>e.toJSON()))}}class Cl extends yl{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Cl(this.data,this.getAttributes())}static fromJSON(e){return new Cl(e.data,e.attributes)}}Cl.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class vl extends _l{constructor(e,t,o){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new f("model-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.offsetSize)throw new f("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}vl.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class xl extends yl{constructor(e,t,o){super(t),this._children=new Al,this.name=e,o&&this._insertChild(0,o)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}findAncestor(e,t={}){let o=t.includeSelf?this:this.parent;for(;o;){if(o.name===e)return o;o=o.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new xl(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Cl(e)];Q(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Cl(e):e instanceof vl?new Cl(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}static fromJSON(e){let t;if(e.children){t=[];for(const o of e.children)o.name?t.push(xl.fromJSON(o)):t.push(Cl.fromJSON(o))}return new xl(e.name,e.attributes,t)}}xl.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class El{constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new f("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new f("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=Sl._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o,n,r;do{n=this.position,r=this._visitedParent,({done:t,value:o}=this.next())}while(!t&&e(o));t||(this._position=n,this._visitedParent=r)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),o=this._visitedParent;if(null===o.parent&&t.offset===o.maxOffset)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const n=Tl(t,o),r=n||Bl(t,o,n);if(r instanceof xl)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=r),this._position=t,Dl("elementStart",r,e,t,1);if(r instanceof Cl){let n;if(this.singleCharacters)n=1;else{let e=r.endOffset;this._boundaryEndParent==o&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),n=t.offset-e}const r=t.offset-i.startOffset,s=new vl(i,r-n,n);return t.offset-=n,this._position=t,Dl("text",s,e,t,n)}return t.path.pop(),this._position=t,this._visitedParent=o.parent,Dl("elementStart",o,e,t,1)}}function Dl(e,t,o,n,r){return{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:n,length:r}}}class Sl extends _l{constructor(e,t,o="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new f("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new f("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=o}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t1)return!1;if(1===t)return Pl(e,this,o);if(-1===t)return Pl(this,e,o)}return this.path.length===e.path.length||(this.path.length>e.path.length?Rl(this.path,t):Rl(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;return"same"==J(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=Sl._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let o;return t.containsPosition(this)||t.start.isEqual(this)?(o=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(o=o._getTransformedByDeletion(e.deletionPosition,1))):o=this.isEqual(e.deletionPosition)?Sl._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),o}_getTransformedByDeletion(e,t){const o=Sl._createAt(this);if(this.root!=e.root)return o;if("same"==J(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;o.offset-=t}}else if("prefix"==J(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;if(e.offset<=this.path[n]){if(e.offset+t>this.path[n])return null;o.path[n]-=t}}return o}_getTransformedByInsertion(e,t){const o=Sl._createAt(this);if(this.root!=e.root)return o;if("same"==J(e.getParentPath(),this.getParentPath()))(e.offset=t;){if(e.path[n]+r!==o.maxOffset)return!1;r=1,n--,o=o.parent}return!0}(e,o+1))}function Rl(e,t){for(;tt+1;){const t=n.maxOffset-o.offset;0!==t&&e.push(new zl(o,o.getShiftedBy(t))),o.path=o.path.slice(0,-1),o.offset++,n=n.parent}for(;o.path.length<=this.end.path.length;){const t=this.end.path[o.path.length-1],n=t-o.offset;0!==n&&e.push(new zl(o,o.getShiftedBy(n))),o.offset=t,o.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new El(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new El(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new El(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new zl(this.start,this.end)]}getTransformedByOperations(e){const t=[new zl(this.start,this.end)];for(const o of e)for(let e=0;e0?new this(o,n):new this(n,o)}static _createIn(e){return new this(Sl._createAt(e,0),Sl._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Sl._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new f("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const o=e.indexOf(t),n=new this(t.start,t.end);if(o>0)for(let t=o-1;e[t].end.isEqual(n.start);t++)n.start=Sl._createAt(e[t].start);for(let t=o+1;t{if(t.viewPosition)return;const o=this._modelToViewMapping.get(t.modelPosition.parent);if(!o)throw new f("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(o,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const o=this.findMappedViewAncestor(t.viewPosition),n=this._viewToModelMapping.get(o),r=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,o);t.modelPosition=Sl._createAt(n,r)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const o=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(o)==e&&this._modelToViewMapping.delete(o))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const o=this._markerNameToElements.get(t)||new Set;o.add(e);const n=this._elementToMarkerNames.get(e)||new Set;n.add(t),this._markerNameToElements.set(t,o),this._elementToMarkerNames.set(e,n)}unbindElementFromMarkerName(e,t){const o=this._markerNameToElements.get(t);o&&(o.delete(e),0==o.size&&this._markerNameToElements.delete(t));const n=this._elementToMarkerNames.get(e);n&&(n.delete(t),0==n.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new zl(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new fs(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const o={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",o),o.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const o=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())o.add(t);else o.add(e);return o}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,o){if(o!=e){return this._toModelOffset(e.parent,e.index,o)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let n=0;for(let o=0;o1?t[0]+":"+t[1]:t[0]}class Ol extends(S()){constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,o){const n=this._createConversionApi(o,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,n);const r=this._reduceChanges(e.getChanges());for(const e of r)"insert"===e.type?this._convertInsert(zl._createFromPositionAndShift(e.position,e.length),n):"reinsert"===e.type?this._convertReinsert(zl._createFromPositionAndShift(e.position,e.length),n):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,n):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,n);for(const e of n.mapper.flushUnboundMarkerNames()){const o=t.get(e).getRange();this._convertMarkerRemove(e,o,n),this._convertMarkerAdd(e,o,n)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,n);n.mapper.flushDeferredBindings(),n.consumable.verifyAllConsumed("insert")}convert(e,t,o,n={}){const r=this._createConversionApi(o,void 0,n);this._convertInsert(e,r);for(const[e,o]of t)this._convertMarkerAdd(e,o,r);r.consumable.verifyAllConsumed("insert")}convertSelection(e,t,o){const n=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),r=this._createConversionApi(o);if(this._addConsumablesForSelection(r.consumable,e,n),this.fire("selection",{selection:e},r),e.isCollapsed){for(const t of n){const o=t.getRange();if(!Vl(e.getFirstPosition(),t,r.mapper))continue;const n={item:e,markerName:t.name,markerRange:o};r.consumable.test(e,"addMarker:"+t.name)&&this.fire(`addMarker:${t.name}`,n,r)}for(const t of e.getAttributeKeys()){const o={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};r.consumable.test(e,"attribute:"+o.attributeKey)&&this.fire(`attribute:${o.attributeKey}:$text`,o,r)}}}_convertInsert(e,t,o={}){o.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e));for(const o of Array.from(e.getWalker({shallow:!0})).map(Ll))this._testAndFire("insert",o,t)}_convertRemove(e,t,o,n){this.fire(`remove:${o}`,{position:e,length:t},n)}_convertAttribute(e,t,o,n,r){this._addConsumablesForRange(r.consumable,e,`attribute:${t}`);for(const i of e){const e={item:i.item,range:zl._createFromPositionAndShift(i.previousPosition,i.length),attributeKey:t,attributeOldValue:o,attributeNewValue:n};this._testAndFire(`attribute:${t}`,e,r)}}_convertReinsert(e,t){const o=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,o);for(const e of o.map(Ll))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,o){if("$graveyard"==t.root.rootName)return;const n=`addMarker:${e}`;if(o.consumable.add(t,n),this.fire(n,{markerName:e,markerRange:t},o),o.consumable.consume(t,n)){this._addConsumablesForRange(o.consumable,t,n);for(const r of t.getItems()){if(!o.consumable.test(r,n))continue;const i={item:r,range:zl._createOn(r),markerName:e,markerRange:t};this.fire(n,i,o)}}}_convertMarkerRemove(e,t,o){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},o)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const o of t){const t=o.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o)}}return e}_addConsumablesForRange(e,t,o){for(const n of t.getItems())e.add(n,o);return e}_addConsumablesForSelection(e,t,o){e.add(t,"selection");for(const n of o)e.add(t,"addMarker:"+n.name);for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o);return e}_testAndFire(e,t,o){const n=function(e,t){const o=t.item.is("element")?t.item.name:"$text";return`${e}:${o}`}(e,t),r=t.item.is("$textProxy")?o.consumable._getSymbolForTextProxy(t.item):t.item,i=this._firedEventsMap.get(o),s=i.get(r);if(s){if(s.has(n))return;s.add(n)}else i.set(r,new Set([n]));this.fire(n,t,o)}_testAndFireAddAttributes(e,t){const o={item:e,range:zl._createOn(e)};for(const e of o.item.getAttributeKeys())o.attributeKey=e,o.attributeOldValue=null,o.attributeNewValue=o.item.getAttribute(e),this._testAndFire(`attribute:${e}`,o,t)}_createConversionApi(e,t=new Set,o={}){const n={...this._conversionApi,consumable:new Nl,writer:e,options:o,convertItem:e=>this._convertInsert(zl._createOn(e),n),convertChildren:e=>this._convertInsert(zl._createIn(e),n,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,n),canReuseView:e=>!t.has(n.mapper.toModelElement(e))};return this._firedEventsMap.set(n,new Map),n}}function Vl(e,t,o){const n=t.getRange(),r=Array.from(e.getAncestors());r.shift(),r.reverse();return!r.some((e=>{if(n.containsItem(e)){return!!o.toViewElement(e).getCustomProperty("addHighlight")}}))}function Ll(e){return{item:e.item,range:zl._createFromPositionAndShift(e.previousPosition,e.length)}}class jl extends(S(_l)){constructor(...e){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const n of e._ranges)if(t.isEqual(n)){o=!0;break}if(!o)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new zl(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new zl(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new zl(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,o,n]=e;if("object"==typeof o&&(n=o,o=void 0),null===t)this._setRanges([]);else if(t instanceof jl)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof zl)this._setRanges([t],!!n&&!!n.backward);else if(t instanceof Sl)this._setRanges([new zl(t)]);else if(t instanceof yl){const e=!!n&&!!n.backward;let r;if("in"==o)r=zl._createIn(t);else if("on"==o)r=zl._createOn(t);else{if(void 0===o)throw new f("model-selection-setto-required-second-parameter",[this,t]);r=new zl(Sl._createAt(t,o))}this._setRanges([r],e)}else{if(!Q(t))throw new f("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,n&&!!n.backward)}}_setRanges(e,t=!1){const o=Array.from(e),n=o.some((t=>{if(!(t instanceof zl))throw new f("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(o.length!==this._ranges.length||n)&&(this._replaceAllRanges(o),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new f("model-selection-setfocus-no-ranges",[this,e]);const o=Sl._createAt(e,t);if("same"==o.compareWith(this.focus))return;const n=this.anchor;this._ranges.length&&this._popRange(),"before"==o.compareWith(n)?(this._pushRange(new zl(o,n)),this._lastRangeBackward=!0):(this._pushRange(new zl(n,o)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const o=Wl(t.start,e);Ul(o,t)&&(yield o);for(const o of t.getWalker()){const n=o.item;"elementEnd"==o.type&&Hl(n,e,t)&&(yield n)}const n=Wl(t.end,e);Gl(n,t)&&(yield n)}}containsEntireContent(e=this.anchor.root){const t=Sl._createAt(e,0),o=Sl._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&o.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new zl(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function ql(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function Hl(e,t,o){return ql(e,t)&&$l(e,o)}function Wl(e,t){const o=e.parent.root.document.model.schema,n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let r=!1;const i=n.find((e=>!r&&(r=o.isLimit(e),!r&&ql(e,t))));return n.forEach((e=>t.add(e))),i}function $l(e,t){const o=function(e){const t=e.root.document.model.schema;let o=e.parent;for(;o;){if(t.isBlock(o))return o;o=o.parent}}(e);if(!o)return!0;return!t.containsRange(zl._createOn(o),!0)}function Ul(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(Sl._createAt(e,e.maxOffset))&&$l(e,t))}function Gl(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(Sl._createAt(e,0))&&$l(e,t))}jl.prototype.is=function(e){return"selection"===e||"model:selection"===e};class Kl extends(S(zl)){constructor(e,t){super(e,t),Zl.call(this)}detach(){this.stopListening()}toRange(){return new zl(this.start,this.end)}static fromRange(e){return new Kl(e.start,e.end)}}function Zl(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&Jl.call(this,o)}),{priority:"low"})}function Jl(e){const t=this.getTransformedByOperation(e),o=zl._createFromRanges(t),n=!o.isEqual(this),r=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let i=null;if(n){"$graveyard"==o.root.rootName&&(i="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=o.start,this.end=o.end,this.fire("change:range",t,{deletionPosition:i})}else r&&this.fire("change:content",this.toRange(),{deletionPosition:i})}Kl.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const Ql="selection:";class Yl extends(S(_l)){constructor(e){super(),this._selection=new Xl(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return Ql+e}static _isStoreAttributeKey(e){return e.startsWith(Ql)}}Yl.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class Xl extends jl{constructor(e){super(),this.markers=new _r({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&"marker"!=o.type&&"rename"!=o.type&&"noop"!=o.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,o,n)=>{this._updateMarker(t,n)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const o=e.document.differ;for(const n of o.getChanges()){if("insert"!=n.type)continue;const o=n.position.parent;n.length===o.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(o.getAttributeKeys()).filter((e=>e.startsWith(Ql)));for(const n of t)e.removeAttribute(n,o)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=n.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const o=t.name.split(":",1)[0];if(!this._observedMarkers.has(o))continue;const n=t.getRange();for(const o of this.getRanges())n.containsRange(o,!o.isCollapsed)&&e.push(t)}const o=Array.from(this.markers);for(const o of e)this.markers.has(o)||(this.markers.add(o),t=!0);for(const o of Array.from(this.markers))e.includes(o)||(this.markers.remove(o),t=!0);t&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateMarker(e,t){const o=e.name.split(":",1)[0];if(!this._observedMarkers.has(o))return;let n=!1;const r=Array.from(this.markers),i=this.markers.has(e);if(t){let o=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){o=!0;break}o&&!i?(this.markers.add(e),n=!0):!o&&i&&(this.markers.remove(e),n=!0)}else i&&(this.markers.remove(e),n=!0);n&&this.fire("change:marker",{oldMarkers:r,directChange:!1})}_updateAttributes(e){const t=vr(this._getSurroundingAttributes()),o=vr(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const n=[];for(const[e,t]of this.getAttributes())o.has(e)&&o.get(e)===t||n.push(e);for(const[e]of o)this.hasAttribute(e)||n.push(e);n.length>0&&this.fire("change:attribute",{attributeKeys:n,directChange:!1})}_setAttribute(e,t,o=!0){const n=o?"normal":"low";if("low"==n&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,n),!0)}_removeAttribute(e,t=!0){const o=t?"normal":"low";return("low"!=o||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,o),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,o]of this.getAttributes())e.get(t)!==o&&this._removeAttribute(t,!1);for(const[o,n]of e){this._setAttribute(o,n,!1)&&t.add(o)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(Ql)){const o=t.substr(10);yield[o,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let o=null;if(this.isCollapsed){const n=e.textNode?e.textNode:e.nodeBefore,r=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(o=ec(n)),o||(o=ec(r)),!this.isGravityOverridden&&!o){let e=n;for(;e&&!t.isInline(e)&&!o;)e=e.previousSibling,o=ec(e)}if(!o){let e=r;for(;e&&!t.isInline(e)&&!o;)e=e.nextSibling,o=ec(e)}o||(o=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const n of e){if(n.item.is("element")&&t.isObject(n.item))break;if("text"==n.type){o=n.item.getAttributes();break}}}return o}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function ec(e){return e instanceof vl||e instanceof Cl?e.getAttributes():null}class tc{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}const oc=function(e){return kn(e,5)};class nc extends tc{elementToElement(e){return this.add(function(e){const t=sc(e.model),o=ac(e.view,"container");t.attributes.length&&(t.children=!0);return n=>{n.on(`insert:${t.name}`,function(e,t=mc){return(o,n,r)=>{if(!t(n.item,r.consumable,{preflight:!0}))return;const i=e(n.item,r,n);if(!i)return;t(n.item,r.consumable);const s=r.mapper.toViewPosition(n.range.start);r.mapper.bindElements(n.item,i),r.writer.insert(s,i),r.convertAttributes(n.item),pc(i,n.item.getChildren(),r,{reconversion:n.reconversion})}}(o,hc(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&n.on("reduceChanges",uc(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=sc(e.model),o=ac(e.view,"container");return t.children=!0,n=>{if(n._conversionApi.schema.checkChild(t.name,"$text"))throw new f("conversion-element-to-structure-disallowed-text",n,{elementName:t.name});var r,i;n.on(`insert:${t.name}`,(r=o,i=hc(t),(e,t,o)=>{if(!i(t.item,o.consumable,{preflight:!0}))return;const n=new Map;o.writer._registerSlotFactory(function(e,t,o){return(n,r)=>{const i=n.createContainerElement("$slot");let s=null;if("children"===r)s=Array.from(e.getChildren());else{if("function"!=typeof r)throw new f("conversion-slot-mode-unknown",o.dispatcher,{modeOrFilter:r});s=Array.from(e.getChildren()).filter((e=>r(e)))}return t.set(i,s),i}}(t.item,n,o));const s=r(t.item,o,t);if(o.writer._clearSlotFactory(),!s)return;!function(e,t,o){const n=Array.from(t.values()).flat(),r=new Set(n);if(r.size!=n.length)throw new f("conversion-slot-filter-overlap",o.dispatcher,{element:e});if(r.size!=e.childCount)throw new f("conversion-slot-filter-incomplete",o.dispatcher,{element:e})}(t.item,n,o),i(t.item,o.consumable);const a=o.mapper.toViewPosition(t.range.start);o.mapper.bindElements(t.item,s),o.writer.insert(a,s),o.convertAttributes(t.item),function(e,t,o,n){o.mapper.on("modelToViewPosition",s,{priority:"highest"});let r=null,i=null;for([r,i]of t)pc(e,i,o,n),o.writer.move(o.writer.createRangeIn(r),o.writer.createPositionBefore(r)),o.writer.remove(r);function s(e,t){const o=t.modelPosition.nodeAfter,n=i.indexOf(o);n<0||(t.viewPosition=t.mapper.findPositionIn(r,n))}o.mapper.off("modelToViewPosition",s)}(s,n,o,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),n.on("reduceChanges",uc(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){e=oc(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=ac(e.view[o],"attribute");else e.view=ac(e.view,"attribute");const n=lc(e);return t=>{t.on(o,function(e){return(t,o,n)=>{if(!n.consumable.test(o.item,t.name))return;const r=e(o.attributeOldValue,n,o),i=e(o.attributeNewValue,n,o);if(!r&&!i)return;n.consumable.consume(o.item,t.name);const s=n.writer,a=s.document.selection;if(o.item instanceof jl||o.item instanceof Yl)s.wrap(a.getFirstRange(),i);else{let e=n.mapper.toViewRange(o.range);null!==o.attributeOldValue&&r&&(e=s.unwrap(e,r)),null!==o.attributeNewValue&&i&&s.wrap(e,i)}}}(n),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=oc(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=cc(e.view[o]);else e.view=cc(e.view);const n=lc(e);return t=>{var r;t.on(o,(r=n,(e,t,o)=>{if(!o.consumable.test(t.item,e.name))return;const n=r(t.attributeOldValue,o,t),i=r(t.attributeNewValue,o,t);if(!n&&!i)return;o.consumable.consume(t.item,e.name);const s=o.mapper.toViewElement(t.item),a=o.writer;if(!s)throw new f("conversion-attribute-to-attribute-on-text",o.dispatcher,t);if(null!==t.attributeOldValue&&n)if("class"==n.key){const e=mr(n.value);for(const t of e)a.removeClass(t,s)}else if("style"==n.key){const e=Object.keys(n.value);for(const t of e)a.removeStyle(t,s)}else a.removeAttribute(n.key,s);if(null!==t.attributeNewValue&&i)if("class"==i.key){const e=mr(i.value);for(const t of e)a.addClass(t,s)}else if("style"==i.key){const e=Object.keys(i.value);for(const t of e)a.setStyle(t,i.value[t],s)}else a.setAttribute(i.key,i.value,s)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=ac(e.view,"ui");return o=>{var n;o.on(`addMarker:${e.model}`,(n=t,(e,t,o)=>{t.isOpening=!0;const r=n(t,o);t.isOpening=!1;const i=n(t,o);if(!r||!i)return;const s=t.markerRange;if(s.isCollapsed&&!o.consumable.consume(s,e.name))return;for(const t of s)if(!o.consumable.consume(t.item,e.name))return;const a=o.mapper,l=o.writer;l.insert(a.toViewPosition(s.start),r),o.mapper.bindElementToMarker(r,t.markerName),s.isCollapsed||(l.insert(a.toViewPosition(s.end),i),o.mapper.bindElementToMarker(i,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${e.model}`,((e,t,o)=>{const n=o.mapper.markerNameToElements(t.markerName);if(n){for(const e of n)o.mapper.unbindElementFromMarkerName(e,t.markerName),o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var o;t.on(`addMarker:${e.model}`,(o=e.view,(e,t,n)=>{if(!t.item)return;if(!(t.item instanceof jl||t.item instanceof Yl||t.item.is("$textProxy")))return;const r=dc(o,t,n);if(!r)return;if(!n.consumable.consume(t.item,e.name))return;const i=n.writer,s=rc(i,r),a=i.document.selection;if(t.item instanceof jl||t.item instanceof Yl)i.wrap(a.getFirstRange(),s);else{const e=n.mapper.toViewRange(t.range),o=i.wrap(e,s);for(const e of o.getItems())if(e.is("attributeElement")&&e.isSimilar(s)){n.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,o,n)=>{if(!o.item)return;if(!(o.item instanceof xl))return;const r=dc(e,o,n);if(!r)return;if(!n.consumable.test(o.item,t.name))return;const i=n.mapper.toViewElement(o.item);if(i&&i.getCustomProperty("addHighlight")){n.consumable.consume(o.item,t.name);for(const e of zl._createIn(o.item))n.consumable.consume(e.item,t.name);i.getCustomProperty("addHighlight")(i,r,n.writer),n.mapper.bindElementToMarker(i,o.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,o,n)=>{if(o.markerRange.isCollapsed)return;const r=dc(e,o,n);if(!r)return;const i=rc(n.writer,r),s=n.mapper.markerNameToElements(o.markerName);if(s){for(const e of s)if(n.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("attributeElement"))n.writer.unwrap(n.writer.createRangeOn(e),i);else{e.getCustomProperty("removeHighlight")(e,r.id,n.writer)}n.writer.clearClonedElementsGroup(o.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){e=oc(e);const t=e.model;let o=e.view;o||(o=o=>({group:t,name:o.substr(e.model.length+1)}));return n=>{var r;n.on(`addMarker:${t}`,(r=o,(e,t,o)=>{const n=r(t.markerName,o);if(!n)return;const i=t.markerRange;o.consumable.consume(i,e.name)&&(ic(i,!1,o,t,n),ic(i,!0,o,t,n),e.stop())}),{priority:e.converterPriority||"normal"}),n.on(`removeMarker:${t}`,function(e){return(t,o,n)=>{const r=e(o.markerName,n);if(!r)return;const i=n.mapper.markerNameToElements(o.markerName);if(i){for(const e of i)n.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("containerElement")?(s(`data-${r.group}-start-before`,e),s(`data-${r.group}-start-after`,e),s(`data-${r.group}-end-before`,e),s(`data-${r.group}-end-after`,e)):n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(o.markerName),t.stop()}function s(e,t){if(t.hasAttribute(e)){const o=new Set(t.getAttribute(e).split(","));o.delete(r.name),0==o.size?n.writer.removeAttribute(e,t):n.writer.setAttribute(e,Array.from(o).join(","),t)}}}}(o),{priority:e.converterPriority||"normal"})}}(e))}}function rc(e,t){const o=e.createAttributeElement("span",t.attributes);return t.classes&&o._addClass(t.classes),"number"==typeof t.priority&&(o._priority=t.priority),o._id=t.id,o}function ic(e,t,o,n,r){const i=t?e.start:e.end,s=i.nodeAfter&&i.nodeAfter.is("element")?i.nodeAfter:null,a=i.nodeBefore&&i.nodeBefore.is("element")?i.nodeBefore:null;if(s||a){let e,i;t&&s||!t&&!a?(e=s,i=!0):(e=a,i=!1);const l=o.mapper.toViewElement(e);if(l)return void function(e,t,o,n,r,i){const s=`data-${i.group}-${t?"start":"end"}-${o?"before":"after"}`,a=e.hasAttribute(s)?e.getAttribute(s).split(","):[];a.unshift(i.name),n.writer.setAttribute(s,a.join(","),e),n.mapper.bindElementToMarker(e,r.markerName)}(l,t,i,o,n,r)}!function(e,t,o,n,r){const i=`${r.group}-${t?"start":"end"}`,s=r.name?{name:r.name}:null,a=o.writer.createUIElement(i,s);o.writer.insert(e,a),o.mapper.bindElementToMarker(a,n.markerName)}(o.mapper.toViewPosition(i),t,o,n,r)}function sc(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function ac(e,t){return"function"==typeof e?e:(o,n)=>function(e,t,o){"string"==typeof e&&(e={name:e});let n;const r=t.writer,i=Object.assign({},e.attributes);if("container"==o)n=r.createContainerElement(e.name,i);else if("attribute"==o){const t={priority:e.priority||Ss.DEFAULT_PRIORITY};n=r.createAttributeElement(e.name,i,t)}else n=r.createUIElement(e.name,i);if(e.styles){const t=Object.keys(e.styles);for(const o of t)r.setStyle(o,e.styles[o],n)}if(e.classes){const t=e.classes;if("string"==typeof t)r.addClass(t,n);else for(const e of t)r.addClass(e,n)}return n}(e,n,t)}function lc(e){return e.model.values?(t,o,n)=>{const r=e.view[t];return r?r(t,o,n):null}:e.view}function cc(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function dc(e,t,o){const n="function"==typeof e?e(t,o):e;return n?(n.priority||(n.priority=10),n.id||(n.id=t.markerName),n):null}function uc(e){const t=function(e){return(t,o)=>{if(!t.is("element",e.name))return!1;if("attribute"==o.type){if(e.attributes.includes(o.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,o)=>{const n=[];o.reconvertedElements||(o.reconvertedElements=new Set);for(const e of o.changes){const r="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(r&&t(r,e)){if(!o.reconvertedElements.has(r)){o.reconvertedElements.add(r);const e=Sl._createBefore(r);let t=n.length;for(let o=n.length-1;o>=0;o--){const r=n[o],i=("attribute"==r.type?r.range.start:r.position).compareWith(e);if("before"==i||"remove"==r.type&&"same"==i)break;t=o}n.splice(t,0,{type:"remove",name:r.name,position:e,length:1},{type:"reinsert",name:r.name,position:e,length:1})}}else n.push(e)}o.changes=n}}function hc(e){return(t,o,n={})=>{const r=["insert"];for(const o of e.attributes)t.hasAttribute(o)&&r.push(`attribute:${o}`);return!!r.every((e=>o.test(t,e)))&&(n.preflight||r.forEach((e=>o.consume(t,e))),!0)}}function pc(e,t,o,n){for(const r of t)gc(e.root,r,o,n)||o.convertItem(r)}function gc(e,t,o,n){const{writer:r,mapper:i}=o;if(!n.reconversion)return!1;const s=i.toViewElement(t);return!(!s||s.root==e)&&(!!o.canReuseView(s)&&(r.move(r.createRangeOn(s),i.toViewPosition(Sl._createBefore(t))),!0))}function mc(e,t,{preflight:o}={}){return o?t.test(e,"insert"):t.consume(e,"insert")}function fc(e){const{schema:t,document:o}=e.model;for(const n of o.getRootNames()){const r=o.getRoot(n);if(r.isEmpty&&!t.checkChild(r,"$text")&&t.checkChild(r,"paragraph"))return e.insertElement("paragraph",r),!0}return!1}function bc(e,t,o){const n=o.createContext(e);return!!o.checkChild(n,"paragraph")&&!!o.checkChild(n.push("paragraph"),t)}function kc(e,t){const o=t.createElement("paragraph");return t.insert(o,e),t.createPositionAt(o,0)}class wc extends tc{elementToElement(e){return this.add(_c(e))}elementToAttribute(e){return this.add(function(e){e=oc(e),Cc(e);const t=vc(e,!1),o=yc(e.view),n=o?`element:${o}`:"element";return o=>{o.on(n,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=oc(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let o;if("class"==t||"style"==t){o={["class"==t?"classes":"styles"]:e.view.value}}else{o={attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}}}e.view.name&&(o.name=e.view.name);return e.view=o,t}(e));Cc(e,t);const o=vc(e,!0);return t=>{t.on("element",o,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,o)=>{const n="string"==typeof e?e:e(t,o);return o.writer.createElement("$marker",{"data-name":n})}}(e.model);return _c({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){e=oc(e),e.model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},o=Ac(xc(t,"start")),n=Ac(xc(t,"end"));return r=>{r.on(`element:${e.view}-start`,o,{priority:e.converterPriority||"normal"}),r.on(`element:${e.view}-end`,n,{priority:e.converterPriority||"normal"});const i=p.get("low"),s=p.get("highest"),a=p.get(e.converterPriority)/s;r.on("element",function(e){return(t,o,n)=>{const r=`data-${e.view}`;function i(t,r){for(const i of r){const r=e.model(i,n),s=n.writer.createElement("$marker",{"data-name":r});n.writer.insert(s,t),o.modelCursor.isEqual(t)?o.modelCursor=o.modelCursor.getShiftedBy(1):o.modelCursor=o.modelCursor._getTransformedByInsertion(t,1),o.modelRange=o.modelRange._getTransformedByInsertion(t,1)[0]}}(n.consumable.test(o.viewItem,{attributes:r+"-end-after"})||n.consumable.test(o.viewItem,{attributes:r+"-start-after"})||n.consumable.test(o.viewItem,{attributes:r+"-end-before"})||n.consumable.test(o.viewItem,{attributes:r+"-start-before"}))&&(o.modelRange||Object.assign(o,n.convertChildren(o.viewItem,o.modelCursor)),n.consumable.consume(o.viewItem,{attributes:r+"-end-after"})&&i(o.modelRange.end,o.viewItem.getAttribute(r+"-end-after").split(",")),n.consumable.consume(o.viewItem,{attributes:r+"-start-after"})&&i(o.modelRange.end,o.viewItem.getAttribute(r+"-start-after").split(",")),n.consumable.consume(o.viewItem,{attributes:r+"-end-before"})&&i(o.modelRange.start,o.viewItem.getAttribute(r+"-end-before").split(",")),n.consumable.consume(o.viewItem,{attributes:r+"-start-before"})&&i(o.modelRange.start,o.viewItem.getAttribute(r+"-start-before").split(",")))}}(t),{priority:i+a})}}(e))}}function _c(e){const t=Ac(e=oc(e)),o=yc(e.view),n=o?`element:${o}`:"element";return o=>{o.on(n,t,{priority:e.converterPriority||"normal"})}}function yc(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function Ac(e){const t=new si(e.view);return(o,n,r)=>{const i=t.match(n.viewItem);if(!i)return;const s=i.match;if(s.name=!0,!r.consumable.test(n.viewItem,s))return;const a=function(e,t,o){return e instanceof Function?e(t,o):o.writer.createElement(e)}(e.model,n.viewItem,r);a&&r.safeInsert(a,n.modelCursor)&&(r.consumable.consume(n.viewItem,s),r.convertChildren(n.viewItem,a),r.updateConversionResult(a,n))}}function Cc(e,t=null){const o=null===t||(e=>e.getAttribute(t)),n="object"!=typeof e.model?e.model:e.model.key,r="object"!=typeof e.model||void 0===e.model.value?o:e.model.value;e.model={key:n,value:r}}function vc(e,t){const o=new si(e.view);return(n,r,i)=>{if(!r.modelRange&&t)return;const s=o.match(r.viewItem);if(!s)return;if(!function(e,t){const o="function"==typeof e?e(t):e;if("object"==typeof o&&!yc(o))return!1;return!o.classes&&!o.attributes&&!o.styles}(e.view,r.viewItem)?delete s.match.name:s.match.name=!0,!i.consumable.test(r.viewItem,s.match))return;const a=e.model.key,l="function"==typeof e.model.value?e.model.value(r.viewItem,i):e.model.value;if(null===l)return;r.modelRange||Object.assign(r,i.convertChildren(r.viewItem,r.modelCursor));const c=function(e,t,o,n){let r=!1;for(const i of Array.from(e.getItems({shallow:o})))n.schema.checkAttribute(i,t.key)&&(r=!0,i.hasAttribute(t.key)||n.writer.setAttribute(t.key,t.value,i));return r}(r.modelRange,{key:a,value:l},t,i);c&&(i.consumable.test(r.viewItem,{name:!0})&&(s.match.name=!0),i.consumable.consume(r.viewItem,s.match))}}function xc(e,t){return{view:`${e.view}-${t}`,model:(t,o)=>{const n=t.getAttribute("name"),r=e.model(n,o);return o.writer.createElement("$marker",{"data-name":r})}}}function Ec(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.selection,n=t.schema,r=[];let i=!1;for(const e of o.getRanges()){const t=Dc(e,n);t&&!t.isEqual(e)?(r.push(t),i=!0):r.push(e)}i&&e.setSelection(function(e){const t=[...e],o=new Set;let n=1;for(;n!o.has(t)))}(r),{backward:o.isBackward});return!1}(t,e)))}function Dc(e,t){return e.isCollapsed?function(e,t){const o=e.start,n=t.getNearestSelectionRange(o);if(!n){const e=o.getAncestors().reverse().find((e=>t.isObject(e)));return e?zl._createOn(e):null}if(!n.isCollapsed)return n;const r=n.start;if(o.isEqual(r))return null;return new zl(r)}(e,t):function(e,t){const{start:o,end:n}=e,r=t.checkChild(o,"$text"),i=t.checkChild(n,"$text"),s=t.getLimitElement(o),a=t.getLimitElement(n);if(s===a){if(r&&i)return null;if(function(e,t,o){const n=e.nodeAfter&&!o.isLimit(e.nodeAfter)||o.checkChild(e,"$text"),r=t.nodeBefore&&!o.isLimit(t.nodeBefore)||o.checkChild(t,"$text");return n||r}(o,n,t)){const e=o.nodeAfter&&t.isSelectable(o.nodeAfter)?null:t.getNearestSelectionRange(o,"forward"),r=n.nodeBefore&&t.isSelectable(n.nodeBefore)?null:t.getNearestSelectionRange(n,"backward"),i=e?e.start:o,s=r?r.end:n;return new zl(i,s)}}const l=s&&!s.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const e=o.nodeAfter&&n.nodeBefore&&o.nodeAfter.parent===n.nodeBefore.parent,r=l&&(!e||!Tc(o.nodeAfter,t)),i=c&&(!e||!Tc(n.nodeBefore,t));let d=o,u=n;return r&&(d=Sl._createBefore(Sc(s,t))),i&&(u=Sl._createAfter(Sc(a,t))),new zl(d,u)}return null}(e,t)}function Sc(e,t){let o=e,n=o;for(;t.isLimit(n)&&n.parent;)o=n,n=n.parent;return o}function Tc(e,t){return e&&t.isSelectable(e)}class Bc extends(H()){constructor(e,t){super(),this.model=e,this.view=new wl(t),this.mapper=new Ml,this.downcastDispatcher=new Ol({mapper:this.mapper,schema:e.schema});const o=this.model.document,r=o.selection,i=this.model.markers;var s,a,l;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(o,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(o.differ,i,e),this.downcastDispatcher.convertSelection(r,i,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(o,n)=>{const r=n.newSelection,i=[];for(const e of r.getRanges())i.push(t.toModelRange(e));const s=e.createSelection(i,{backward:r.isBackward});s.isEqual(e.document.selection)||e.change((e=>{e.setSelection(s)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(s=this.mapper,a=this.model.schema,l=this.view,(e,t)=>{if(!l.document.isComposing||n.isAndroid)for(let e=0;e{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer,r=o.mapper.toViewPosition(t.range.start),i=n.createText(t.item.data);n.insert(r,i)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,o)=>{const n=o.mapper.toViewPosition(t.position),r=t.position.getShiftedBy(t.length),i=o.mapper.toViewPosition(r,{isPhantom:!0}),s=o.writer.createRange(n,i),a=o.writer.remove(s.getTrimmed());for(const e of o.writer.createRangeIn(a).getItems())o.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const n=o.writer,r=n.document.selection;for(const e of r.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&o.writer.mergeAttributes(e.start);n.setSelection(null)}),{priority:"high"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const n=t.selection;if(n.isCollapsed)return;if(!o.consumable.consume(n,"selection"))return;const r=[];for(const e of n.getRanges())r.push(o.mapper.toViewRange(e));o.writer.setSelection(r,{backward:n.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const n=t.selection;if(!n.isCollapsed)return;if(!o.consumable.consume(n,"selection"))return;const r=o.writer,i=n.getFirstPosition(),s=o.mapper.toViewPosition(i),a=r.breakAttributes(s);r.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new ps(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,o=this.model.markers.get(t);if(!o)throw new f("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(o)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class Ic{constructor(){this._consumables=new Map}add(e,t){let o;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?o=this._consumables.get(e):(o=new Rc(e),this._consumables.set(e,o)),o.add(t))}test(e,t){const o=this._consumables.get(e);return void 0===o?null:e.is("$text")||e.is("documentFragment")?o:o.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const o=this._consumables.get(e);void 0!==o&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):o.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},o=e.getAttributeKeys();for(const e of o)"style"!=e&&"class"!=e&&t.attributes.push(e);const n=e.getClassNames();for(const e of n)t.classes.push(e);const r=e.getStyleNames();for(const e of r)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new Ic),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,Ic.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const o of e.getChildren())t=Ic.createFrom(o,t);return t}}const Pc=["attributes","classes","styles"];class Rc{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of Pc)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of Pc)if(t in e){const o=this._test(t,e[t]);if(!0!==o)return o}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of Pc)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of Pc)t in e&&this._revert(t,e[t])}_add(e,t){const o=ue(t)?t:[t],n=this._consumables[e];for(const t of o){if("attributes"===e&&("class"===t||"style"===t))throw new f("viewconsumable-invalid-attribute",this);if(n.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!0)}}_test(e,t){const o=ue(t)?t:[t],n=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){const e=n.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",o=this._test(e,[...this._consumables[e].keys()]);if(!0!==o)return o}return!0}_consume(e,t){const o=ue(t)?t:[t],n=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){if(n.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const o=ue(t)?t:[t],n=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){!1===n.get(t)&&n.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class zc extends(H()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new Mc(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new Mc(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new f("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new f("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const o=this.getDefinition(e.last);return!!o&&o.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof Sl){const t=e.nodeBefore,o=e.nodeAfter;if(!(t instanceof xl))throw new f("schema-check-merge-no-element-before",this);if(!(o instanceof xl))throw new f("schema-check-merge-no-element-after",this);return this.checkMerge(t,o)}for(const o of t.getChildren())if(!this.checkChild(e,o))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[o,n])=>{if(!n)return;const r=e(o,n);"boolean"==typeof r&&(t.stop(),t.return=r)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[o,n])=>{const r=e(o,n);"boolean"==typeof r&&(t.stop(),t.return=r)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof Sl)t=e.parent;else{t=(e instanceof zl?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const o=t.getCommonAncestor();return e?e.getCommonAncestor(o,{includeSelf:!0}):o}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const o=[...e.getFirstPosition().getAncestors(),new Cl("",e.getAttributes())];return this.checkAttribute(o,t)}{const o=e.getRanges();for(const e of o)for(const o of e)if(this.checkAttribute(o.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const o of e)yield*this._getValidRangesForRange(o,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new zl(e);let o,n;const r=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(o=new El({boundaries:zl._createIn(r),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(n=new El({boundaries:zl._createIn(r),startPosition:e}));for(const e of function*(e,t){let o=!1;for(;!o;){if(o=!0,e){const t=e.next();t.done||(o=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(o=!1,yield{walker:t,value:e.value})}}}(o,n)){const t=e.walker==o?"elementEnd":"elementStart",n=e.value;if(n.type==t&&this.isObject(n.item))return zl._createOn(n.item);if(this.checkChild(n.nextPosition,"$text"))return new zl(n.nextPosition)}return null}findAllowedParent(e,t){let o=e.parent;for(;o;){if(this.checkChild(o,t))return o;if(this.isLimit(o))return null;o=o.parent}return null}setAllowedAttributes(e,t,o){const n=o.model;for(const[r,i]of Object.entries(t))n.schema.checkAttribute(e,r)&&o.setAttribute(r,i,e)}removeDisallowedAttributes(e,t){for(const o of e)if(o.is("$text"))Kc(this,o,t);else{const e=zl._createIn(o).getPositions();for(const o of e){Kc(this,o.nodeBefore||o.parent,t)}}}getAttributesWithProperty(e,t,o){const n={};for(const[r,i]of e.getAttributes()){const e=this.getAttributeProperties(r);void 0!==e[t]&&(void 0!==o&&o!==e[t]||(n[r]=i))}return n}createContext(e){return new Mc(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,o=Object.keys(t);for(const n of o)e[n]=Nc(t[n],n);for(const t of o)Fc(e,t);for(const t of o)Oc(e,t);for(const t of o)Vc(e,t);for(const t of o)Lc(e,t),jc(e,t);for(const t of o)qc(e,t),Hc(e,t),Wc(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,o=t.length-1){const n=t.getItem(o);if(e.allowIn.includes(n.name)){if(0==o)return!0;{const e=this.getDefinition(n);return this._checkContextMatch(e,t,o-1)}}return!1}*_getValidRangesForRange(e,t){let o=e.start,n=e.start;for(const r of e.getItems({shallow:!0}))r.is("element")&&(yield*this._getValidRangesForRange(zl._createIn(r),t)),this.checkAttribute(r,t)||(o.isEqual(n)||(yield new zl(o,n)),o=Sl._createAfter(r)),n=Sl._createAfter(r);o.isEqual(n)||(yield new zl(o,n))}}class Mc{constructor(e){if(e instanceof Mc)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(Gc)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Mc([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Nc(e,t){const o={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const o of e){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const n of e)t[n]=!!o[n]}}(e,o),$c(e,o,"allowIn"),$c(e,o,"allowContentOf"),$c(e,o,"allowWhere"),$c(e,o,"allowAttributes"),$c(e,o,"allowAttributesOf"),$c(e,o,"allowChildren"),$c(e,o,"inheritTypesFrom"),function(e,t){for(const o of e){const e=o.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,o),o}function Fc(e,t){const o=e[t];for(const n of o.allowChildren){const o=e[n];o&&o.allowIn.push(t)}o.allowChildren.length=0}function Oc(e,t){for(const o of e[t].allowContentOf)if(e[o]){Uc(e,o).forEach((e=>{e.allowIn.push(t)}))}delete e[t].allowContentOf}function Vc(e,t){for(const o of e[t].allowWhere){const n=e[o];if(n){const o=n.allowIn;e[t].allowIn.push(...o)}}delete e[t].allowWhere}function Lc(e,t){for(const o of e[t].allowAttributesOf){const n=e[o];if(n){const o=n.allowAttributes;e[t].allowAttributes.push(...o)}}delete e[t].allowAttributesOf}function jc(e,t){const o=e[t];for(const t of o.inheritTypesFrom){const n=e[t];if(n){const e=Object.keys(n).filter((e=>e.startsWith("is")));for(const t of e)t in o||(o[t]=n[t])}}delete o.inheritTypesFrom}function qc(e,t){const o=e[t],n=o.allowIn.filter((t=>e[t]));o.allowIn=Array.from(new Set(n))}function Hc(e,t){const o=e[t];for(const n of o.allowIn){e[n].allowChildren.push(t)}}function Wc(e,t){const o=e[t];o.allowAttributes=Array.from(new Set(o.allowAttributes))}function $c(e,t,o){for(const n of e){const e=n[o];"string"==typeof e?t[o].push(e):Array.isArray(e)&&t[o].push(...e)}}function Uc(e,t){const o=e[t];return(n=e,Object.keys(n).map((e=>n[e]))).filter((e=>e.allowIn.includes(o.name)));var n}function Gc(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function Kc(e,t,o){for(const n of t.getAttributeKeys())e.checkAttribute(t,n)||o.removeAttribute(n,t)}class Zc extends(S()){constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,o=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let o;for(const n of new Mc(e)){const e={};for(const t of n.getAttributeKeys())e[t]=n.getAttribute(t);const r=t.createElement(n.name,e);o&&t.insert(r,o),o=Sl._createAt(r,0)}return o}(o,t),this.conversionApi.writer=t,this.conversionApi.consumable=Ic.createFrom(e),this.conversionApi.store={};const{modelRange:n}=this._convertItem(e,this._modelCursor),r=t.createDocumentFragment();if(n){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,r);r.markers=function(e,t){const o=new Set,n=new Map,r=zl._createIn(e).getItems();for(const e of r)e.is("element","$marker")&&o.add(e);for(const e of o){const o=e.getAttribute("data-name"),r=t.createPositionBefore(e);n.has(o)?n.get(o).end=r.clone():n.set(o,new zl(r.clone())),t.remove(e)}return n}(r,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,r}_convertItem(e,t){const o={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,o,this.conversionApi):e.is("$text")?this.fire("text",o,this.conversionApi):this.fire("documentFragment",o,this.conversionApi),o.modelRange&&!(o.modelRange instanceof zl))throw new f("view-conversion-dispatcher-incorrect-result",this);return{modelRange:o.modelRange,modelCursor:o.modelCursor}}_convertChildren(e,t){let o=t.is("position")?t:Sl._createAt(t,0);const n=new zl(o);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,o);e.modelRange instanceof zl&&(n.end=e.modelRange.end,o=e.modelCursor)}return{modelRange:n,modelCursor:o}}_safeInsert(e,t){const o=this._splitToAllowedParent(e,t);return!!o&&(this.conversionApi.writer.insert(e,o.position),!0)}_updateConversionResult(e,t){const o=this._getSplitParts(e),n=this.conversionApi.writer;t.modelRange||(t.modelRange=n.createRange(n.createPositionBefore(e),n.createPositionAfter(o[o.length-1])));const r=this._cursorParents.get(e);t.modelCursor=r?n.createPositionAt(r,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:o,writer:n}=this.conversionApi;let r=o.findAllowedParent(t,e);if(r){if(r===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(r)&&(r=null)}if(!r)return bc(t,e,o)?{position:kc(t,n)}:null;const i=this.conversionApi.writer.split(t,r),s=[];for(const e of i.range.getWalker())if("elementEnd"==e.type)s.push(e.item);else{const t=s.pop(),o=e.item;this._registerSplitPair(t,o)}const a=i.range.end.parent;return this._cursorParents.set(e,a),{position:i.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const o=this._splitParts.get(e);this._splitParts.set(t,o),o.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class Jc{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class Qc{constructor(e){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new ka(e,{renderingMode:"data"}),this.htmlWriter=new Jc}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`${e}`);const t=this.domParser.parseFromString(e,"text/html"),o=t.createDocumentFragment(),n=t.body.childNodes;for(;n.length>0;)o.appendChild(n[0]);return o}}class Yc extends(S()){constructor(e,t){super(),this.model=e,this.mapper=new Ml,this.downcastDispatcher=new Ol({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer,r=o.mapper.toViewPosition(t.range.start),i=n.createText(t.item.data);n.insert(r,i)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new Zc({schema:e.schema}),this.viewDocument=new Ds(t),this.stylesProcessor=t,this.htmlProcessor=new Qc(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Vs(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:o,consumable:n,writer:r})=>{let i=t.modelCursor;if(!n.test(t.viewItem))return;if(!o.checkChild(i,"$text")){if(!bc(i,"$text",o))return;if(0==t.viewItem.data.trim().length)return;const e=i.nodeBefore;i=kc(i,r),e&&e.is("element","$marker")&&(r.move(r.createRangeOn(e),i),i=r.createPositionAfter(e))}n.consume(t.viewItem);const s=r.createText(t.viewItem.data);r.insert(s,i),t.modelRange=r.createRange(i,i.getShiftedBy(s.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}}),{priority:"lowest"}),H().prototype.decorate.call(this,"init"),H().prototype.decorate.call(this,"set"),H().prototype.decorate.call(this,"get"),H().prototype.decorate.call(this,"toView"),H().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},fc)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:o="empty"}=e;if(!this._checkIfRootsExists([t]))throw new f("datacontroller-get-non-existent-root",this);const n=this.model.document.getRoot(t);return n.isAttached()||b("datacontroller-get-detached-root",this),"empty"!==o||this.model.hasContent(n,{ignoreWhitespaces:!0})?this.stringify(n,e):""}stringify(e,t={}){const o=this.toView(e,t);return this.processor.toData(o)}toView(e,t={}){const o=this.viewDocument,n=this._viewWriter;this.mapper.clearBindings();const r=zl._createIn(e),i=new Os(o);this.mapper.bindElements(e,i);const s=e.is("documentFragment")?e.markers:function(e){const t=[],o=e.root.document;if(!o)return new Map;const n=zl._createIn(e);for(const e of o.model.markers){const o=e.getRange(),r=o.isCollapsed,i=o.start.isEqual(n.start)||o.end.isEqual(n.end);if(r&&i)t.push([e.name,o]);else{const r=n.getIntersection(o);r&&t.push([e.name,r])}}return t.sort((([e,t],[o,n])=>{if("after"!==t.end.compareWith(n.start))return 1;if("before"!==t.start.compareWith(n.end))return-1;switch(t.start.compareWith(n.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(n.end)){case"before":return 1;case"after":return-1;default:return o.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(r,s,n,t),i}init(e){if(this.model.document.version)throw new f("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new f("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const o of Object.keys(t)){const n=this.model.document.getRoot(o);e.insert(this.parse(t[o],n),n,0)}})),Promise.resolve()}set(e,t={}){let o={};if("string"==typeof e?o.main=e:o=e,!this._checkIfRootsExists(Object.keys(o)))throw new f("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(o)){const n=this.model.document.getRoot(t);e.remove(e.createRangeIn(n)),e.insert(this.parse(o[t],n),n,0)}}))}parse(e,t="$root"){const o=this.processor.toView(e);return this.toModel(o,t)}toModel(e,t="$root"){return this.model.change((o=>this.upcastDispatcher.convert(e,o,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class Xc{constructor(e,t){this._helpers=new Map,this._downcast=mr(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=mr(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const o=this._downcast.includes(t);if(!this._upcast.includes(t)&&!o)throw new f("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:o})}for(e){if(!this._helpers.has(e))throw new f("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:o}of ed(e))this.for("upcast").elementToElement({model:t,view:o,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:o}of ed(e))this.for("upcast").elementToAttribute({view:o,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:o}of ed(e))this.for("upcast").attributeToAttribute({view:o,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:o}){if(this._helpers.has(e))throw new f("conversion-group-exists",this);const n=o?new nc(t):new wc(t);this._helpers.set(e,n)}}function*ed(e){if(e.model.values)for(const t of e.model.values){const o={key:e.model.key,value:t},n=e.view[t],r=e.upcastAlso?e.upcastAlso[t]:void 0;yield*td(o,n,r)}else yield*td(e.model,e.view,e.upcastAlso)}function*td(e,t,o){if(yield{model:e,view:t},o)for(const t of mr(o))yield{model:e,view:t}}class od{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function nd(e,t){const o=sd(t),n=o.reduce(((e,t)=>e+t.offsetSize),0),r=e.parent;ld(e);const i=e.index;return r._insertChild(i,o),ad(r,i+o.length),ad(r,i),new zl(e,e.getShiftedBy(n))}function rd(e){if(!e.isFlat)throw new f("operation-utils-remove-range-not-flat",this);const t=e.start.parent;ld(e.start),ld(e.end);const o=t._removeChildren(e.start.index,e.end.index-e.start.index);return ad(t,e.start.index),o}function id(e,t){if(!e.isFlat)throw new f("operation-utils-move-range-not-flat",this);const o=rd(e);return nd(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),o)}function sd(e){const t=[];!function e(o){if("string"==typeof o)t.push(new Cl(o));else if(o instanceof vl)t.push(new Cl(o.data,o.getAttributes()));else if(o instanceof yl)t.push(o);else if(Q(o))for(const t of o)e(t)}(e);for(let e=1;ee.maxOffset)throw new f("move-operation-nodes-do-not-exist",this);if(e===t&&o=o&&this.targetPosition.path[e]e._clone(!0)))),t=new ud(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new Sl(e,[0]);return new dd(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0)))),nd(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const o=[];for(const t of e.nodes)t.name?o.push(xl.fromJSON(t)):o.push(Cl.fromJSON(t));const n=new ud(Sl.fromJSON(e.position,t),o,e.baseVersion);return n.shouldReceiveAttributes=e.shouldReceiveAttributes,n}}class hd extends od{constructor(e,t,o,n,r){super(r),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=o,this.graveyardPosition=n?n.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new Sl(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new zl(this.splitPosition,e)}get affectedSelectable(){const e=[zl._createFromPositionAndShift(this.splitPosition,0),zl._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(zl._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new hd(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new Sl(e,[0]);return new pd(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const n=e.range.getDifference(t.range).map((t=>new fd(t,e.key,e.oldValue,e.newValue,0))),r=e.range.getIntersection(t.range);return r&&o.aIsStrong&&n.push(new fd(r,t.key,t.newValue,e.newValue,0)),0==n.length?[new bd(0)]:n}return[e]})),vd(fd,ud,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const o=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new fd(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const n=Id(t,e.key,e.oldValue);n&&o.unshift(n)}return o}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),vd(fd,pd,((e,t)=>{const o=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&o.push(zl._createFromPositionAndShift(t.graveyardPosition,1));const n=e.range._getTransformedByMergeOperation(t);return n.isCollapsed||o.push(n),o.map((t=>new fd(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),vd(fd,dd,((e,t)=>{const o=function(e,t){const o=zl._createFromPositionAndShift(t.sourcePosition,t.howMany);let n=null,r=[];o.containsRange(e,!0)?n=e:e.start.hasSameParentAs(o.start)?(r=e.getDifference(o),n=e.getIntersection(o)):r=[e];const i=[];for(let e of r){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const o=t.getMovedRangeStart(),n=e.start.hasSameParentAs(o),r=e._getTransformedByInsertion(o,t.howMany,n);i.push(...r)}n&&i.push(n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return i}(e.range,t);return o.map((t=>new fd(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),vd(fd,hd,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const o=e.clone();return o.range=new zl(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,o]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),vd(ud,fd,((e,t)=>{const o=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const n=Id(e,t.key,t.newValue);n&&o.push(n)}return o})),vd(ud,ud,((e,t,o)=>(e.position.isEqual(t.position)&&o.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),vd(ud,dd,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),vd(ud,hd,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),vd(ud,pd,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),vd(gd,ud,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),vd(gd,gd,((e,t,o)=>{if(e.name==t.name){if(!o.aIsStrong)return[new bd(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),vd(gd,pd,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),vd(gd,dd,((e,t,o)=>{if(e.oldRange&&(e.oldRange=zl._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(o.abRelation){const n=zl._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=n.end,e.newRange.start.path=o.abRelation.path,[e];if("right"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=n.start,e.newRange.end.path=o.abRelation.path,[e]}e.newRange=zl._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),vd(gd,hd,((e,t,o)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(o.abRelation){const n=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&o.abRelation.wasStartBeforeMergedElement?e.newRange.start=Sl._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!o.abRelation.wasInLeftElement&&(e.newRange.start=Sl._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasInRightElement?e.newRange.end=Sl._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasEndBeforeMergedElement?e.newRange.end=Sl._createAt(t.insertionPosition):e.newRange.end=n.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),vd(pd,ud,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),vd(pd,pd,((e,t,o)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(o.bWasUndone){const o=t.graveyardPosition.path.slice();return o.push(0),e.sourcePosition=new Sl(t.graveyardPosition.root,o),e.howMany=0,[e]}return[new bd(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!o.bWasUndone&&"splitAtSource"!=o.abRelation){const n="$graveyard"==e.targetPosition.root.rootName,r="$graveyard"==t.targetPosition.root.rootName;if(r&&!n||!(n&&!r)&&o.aIsStrong){const o=t.targetPosition._getTransformedByMergeOperation(t),n=e.targetPosition._getTransformedByMergeOperation(t);return[new dd(o,e.howMany,n,0)]}return[new bd(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&o.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),vd(pd,dd,((e,t,o)=>{const n=zl._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!o.bWasUndone&&!o.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition)?[new bd(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),vd(pd,hd,((e,t,o)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const n=0!=t.howMany,r=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(n||r||"mergeTargetNotMoved"==o.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==o.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==o.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),vd(dd,ud,((e,t)=>{const o=zl._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),vd(dd,dd,((e,t,o)=>{const n=zl._createFromPositionAndShift(e.sourcePosition,e.howMany),r=zl._createFromPositionAndShift(t.sourcePosition,t.howMany);let i,s=o.aIsStrong,a=!o.aIsStrong;if("insertBefore"==o.abRelation||"insertAfter"==o.baRelation?a=!0:"insertAfter"!=o.abRelation&&"insertBefore"!=o.baRelation||(a=!1),i=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Pd(e,t)&&Pd(t,e))return[t.getReversed()];if(n.containsPosition(t.targetPosition)&&n.containsRange(r,!0))return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Rd([n],i);if(r.containsPosition(e.targetPosition)&&r.containsRange(n,!0))return n.start=n.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.end=n.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Rd([n],i);const l=J(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Rd([n],i);"remove"!=e.type||"remove"==t.type||o.aWasUndone||o.forceWeakRemove?"remove"==e.type||"remove"!=t.type||o.bWasUndone||o.forceWeakRemove||(s=!1):s=!0;const c=[],d=n.getDifference(r);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const o="same"==J(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,o);c.push(...n)}const u=n.getIntersection(r);return null!==u&&s&&(u.start=u.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),u.end=u.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(u):1==c.length?r.start.isBefore(n.start)||r.start.isEqual(n.start)?c.unshift(u):c.push(u):c.splice(1,0,u)),0===c.length?[new bd(e.baseVersion)]:Rd(c,i)})),vd(dd,hd,((e,t,o)=>{let n=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=o.abRelation||(n=e.targetPosition._getTransformedBySplitOperation(t));const r=zl._createFromPositionAndShift(e.sourcePosition,e.howMany);if(r.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=n,[e];if(r.start.hasSameParentAs(t.splitPosition)&&r.containsPosition(t.splitPosition)){let e=new zl(t.splitPosition,r.end);e=e._getTransformedBySplitOperation(t);return Rd([new zl(r.start,t.splitPosition),e],n)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==o.abRelation&&(n=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==o.abRelation&&(n=e.targetPosition);const i=[r._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const n=r.start.isEqual(t.graveyardPosition)||r.containsPosition(t.graveyardPosition);e.howMany>1&&n&&!o.aWasUndone&&i.push(zl._createFromPositionAndShift(t.insertionPosition,1))}return Rd(i,n)})),vd(dd,pd,((e,t,o)=>{const n=zl._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition))if("remove"!=e.type||o.forceWeakRemove){if(1==e.howMany)return o.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new bd(0)]}else if(!o.aWasUndone){const o=[];let n=t.graveyardPosition.clone(),r=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(o.push(new dd(e.sourcePosition,e.howMany-1,e.targetPosition,0)),n=n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),r=r._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const i=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),s=new dd(n,1,i,0),a=s.getMovedRangeStart().path.slice();a.push(0);const l=new Sl(s.targetPosition.root,a);r=r._getTransformedByMove(n,i,1);const c=new dd(r,t.howMany,l,0);return o.push(s),o.push(c),o}const r=zl._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=r.start,e.howMany=r.end.offset-r.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),vd(kd,ud,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),vd(kd,pd,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),vd(kd,dd,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),vd(kd,kd,((e,t,o)=>{if(e.position.isEqual(t.position)){if(!o.aIsStrong)return[new bd(0)];e.oldName=t.newName}return[e]})),vd(kd,hd,((e,t)=>{if("same"==J(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new kd(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),vd(wd,wd,((e,t,o)=>{if(e.root===t.root&&e.key===t.key){if(!o.aIsStrong||e.newValue===t.newValue)return[new bd(0)];e.oldValue=t.newValue}return[e]})),vd(_d,_d,((e,t,o)=>e.rootName!==t.rootName||e.isAdd!==t.isAdd||o.bWasUndone?[e]:[new bd(0)])),vd(hd,ud,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!o.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const o=t.graveyardPosition.path.slice();o.push(0);const n=new Sl(t.graveyardPosition.root,o),r=hd.getInsertionPosition(new Sl(t.graveyardPosition.root,o)),i=new hd(n,0,r,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=hd.getInsertionPosition(e.splitPosition),e.graveyardPosition=i.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[i,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=hd.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),vd(hd,dd,((e,t,o)=>{const n=zl._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const r=n.start.isEqual(e.graveyardPosition)||n.containsPosition(e.graveyardPosition);if(!o.bWasUndone&&r){const o=e.splitPosition._getTransformedByMoveOperation(t),n=e.graveyardPosition._getTransformedByMoveOperation(t),r=n.path.slice();r.push(0);const i=new Sl(n.root,r);return[new dd(o,e.howMany,i,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const r=e.splitPosition.isEqual(t.targetPosition);if(r&&("insertAtSource"==o.baRelation||"splitBefore"==o.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=hd.getInsertionPosition(e.splitPosition),[e];if(r&&o.abRelation&&o.abRelation.howMany){const{howMany:t,offset:n}=o.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(n),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const o=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=o,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new bd(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new bd(0)];if("splitBefore"==o.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const n="$graveyard"==e.splitPosition.root.rootName,r="$graveyard"==t.splitPosition.root.rootName;if(r&&!n||!(n&&!r)&&o.aIsStrong){const o=[];return t.howMany&&o.push(new dd(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&o.push(new dd(e.splitPosition,e.howMany,e.moveTargetPosition,0)),o}return[new bd(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==o.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==o.baRelation){const o=t.insertionPosition.path.slice();o.push(0);const n=new Sl(t.insertionPosition.root,o);return[e,new dd(e.insertionPosition,1,n,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset{const o=t[0];o.isDocumentOperation&&Nd.call(this,o)}),{priority:"low"})}function Nd(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}zd.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class Fd{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},b("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:o=!0,isUndo:n=!1,isTyping:r=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=o,this.isUndo=n,this.isTyping=r}get type(){return b("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class Od{constructor(e){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),o=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),o||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=zl._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const o=t.graveyardPosition.parent;this._markInsert(o,t.graveyardPosition.offset,1);const n=t.targetPosition.parent;this._isInInsertedElement(n)||this._markInsert(n,t.targetPosition.offset,e.maxOffset);break}case"detachRoot":case"addRoot":this._bufferRootStateChange(t.rootName,t.isAdd);break;case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,o){const n=this._changedMarkers.get(e);n?(n.newMarkerData=o,null==n.oldMarkerData.range&&null==o.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:o,oldMarkerData:t})}getMarkersToRemove(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.oldMarkerData.range&&e.push({name:t,range:o.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.newMarkerData.range&&e.push({name:t,range:o.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const o=e.range&&!t.range,n=!e.range&&t.range,r=e.range&&t.range&&!e.range.isEqual(t.range);if(o||n||r)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const o=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(jd),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const o=this._changedRoots.get(e);void 0!==o.state?(delete o.state,void 0===o.attributes&&this._changedRoots.delete(e)):o.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,o,n){const r=this._changedRoots.get(e)||{name:e},i=r.attributes||{};if(i[t]){const e=i[t];n===e.oldValue?delete i[t]:e.newValue=n}else i[t]={oldValue:o,newValue:n};0===Object.entries(i).length?(delete r.attributes,void 0===r.state&&this._changedRoots.delete(e)):(r.attributes=i,this._changedRoots.set(e,r))}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=zl._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,o){const n={type:"insert",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,n)}_markRemove(e,t,o){const n={type:"remove",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,n),this._removeAllNestedChanges(e,t,o)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const o=this._getChangesForElement(e);this._handleChange(t,o),o.push(t);for(let e=0;eo.offset){if(n>r){const e={type:"attribute",offset:r,howMany:n-r,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=o.offset&&e.offsetr?(e.nodesToHandle=n-r,e.offset=r):e.nodesToHandle=0);if("remove"==o.type&&e.offseto.offset){const r={type:"attribute",offset:o.offset,howMany:n-o.offset,count:this._changeCount++};this._handleChange(r,t),t.push(r),e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==o.type&&(e.offset>=o.offset&&n<=r?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=o.offset&&n>=r&&(o.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,o){return{type:"insert",position:Sl._createAt(e,t),name:o.name,attributes:new Map(o.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,o){return{type:"remove",position:Sl._createAt(e,t),name:o.name,attributes:new Map(o.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,o){const n=[];o=new Map(o);for(const[r,i]of t){const t=o.has(r)?o.get(r):null;t!==i&&n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:r,attributeOldValue:i,attributeNewValue:t,changeCount:this._changeCount++}),o.delete(r)}for(const[t,r]of o)n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:r,changeCount:this._changeCount++});return n}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const o=this._changesInElement.get(t),n=e.startOffset;if(o)for(const e of o)if("insert"==e.type&&n>=e.offset&&nn){for(let t=0;tthis._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new f("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const o=this._operations[0];void 0===e&&(e=o.baseVersion);let n=t-1;for(const[t,o]of this._gaps)e>t&&et&&nthis.lastOperation.baseVersion)return[];let r=this._baseVersionToOperationIndex.get(e);void 0===r&&(r=0);let i=this._baseVersionToOperationIndex.get(n);return void 0===i&&(i=this._operations.length-1),this._operations.slice(r,i+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class Hd extends xl{constructor(e,t,o="main"){super(t),this._isAttached=!0,this._document=e,this.rootName=o}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}Hd.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const Wd="$graveyard";class $d extends(S()){constructor(e){super(),this.model=e,this.history=new qd,this.selection=new Yl(this),this.roots=new _r({idProperty:"rootName"}),this.differ=new Od(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Wd),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.differ.bufferOperation(o)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.history.addOperation(o)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,o,n,r)=>{const i={...t.getData(),range:n};this.differ.bufferMarkerChange(t.name,r,i),null===o&&t.on("change",((e,o)=>{const n=t.getData();this.differ.bufferMarkerChange(t.name,{...n,range:o},n)}))})),this.registerPostFixer((e=>{let t=!1;for(const o of this.roots)o.isAttached()||o.isEmpty||(e.remove(e.createRangeIn(o)),t=!0);for(const o of this.model.markers)o.getRange().root.isAttached()||(e.removeMarker(o),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(Wd)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new f("model-document-createroot-name-exists",this,{name:t});const o=new Hd(this,e,t);return this.roots.add(o),o}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return Array.from(this.roots).filter((t=>t.rootName!=Wd&&(e||t.isAttached()))).map((e=>e.rootName))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=oi(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,o=t.schema,n=t.createPositionFromPath(e,[0]);return o.getNearestSelectionRange(n)||t.createRange(n)}_validateSelectionRange(e){return Ud(e.start)&&Ud(e.end)}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(this.selection.refresh(),t=o(e),t)break}while(t)}}function Ud(e){const t=e.textNode;if(t){const o=t.data,n=e.offset-t.startOffset;return!Er(o,n)&&!Dr(o,n)}return!0}class Gd extends(S()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof Kd?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,o=!1,n=!1){const r=e instanceof Kd?e.name:e;if(r.includes(","))throw new f("markercollection-incorrect-marker-name",this);const i=this._markers.get(r);if(i){const e=i.getData(),s=i.getRange();let a=!1;return s.isEqual(t)||(i._attachLiveRange(Kl.fromRange(t)),a=!0),o!=i.managedUsingOperations&&(i._managedUsingOperations=o,a=!0),"boolean"==typeof n&&n!=i.affectsData&&(i._affectsData=n,a=!0),a&&this.fire(`update:${r}`,i,s,t,e),i}const s=Kl.fromRange(t),a=new Kd(r,s,o,n);return this._markers.set(r,a),this.fire(`update:${r}`,a,null,t,{...a.getData(),range:null}),a}_remove(e){const t=e instanceof Kd?e.name:e,o=this._markers.get(t);return!!o&&(this._markers.delete(t),this.fire(`update:${t}`,o,o.getRange(),null,o.getData()),this._destroyMarker(o),!0)}_refresh(e){const t=e instanceof Kd?e.name:e,o=this._markers.get(t);if(!o)throw new f("markercollection-refresh-marker-not-exists",this);const n=o.getRange();this.fire(`update:${t}`,o,n,n,o.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class Kd extends(S(_l)){constructor(e,t,o,n){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=o,this._affectsData=n}get managedUsingOperations(){if(!this._liveRange)throw new f("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new f("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new f("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new f("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new f("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Kd.prototype.is=function(e){return"marker"===e||"model:marker"===e};class Zd extends od{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new f("detach-operation-on-document-node",this)}_execute(){rd(zl._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Jd extends _l{constructor(e){super(),this.markers=new Map,this._children=new Al,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const o of e)o.name?t.push(xl.fromJSON(o)):t.push(Cl.fromJSON(o));return new Jd(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Cl(e)];Q(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Cl(e):e instanceof vl?new Cl(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}}Jd.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class Qd{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new Cl(e,t)}createElement(e,t){return new xl(e,t)}createDocumentFragment(){return new Jd}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,o=0){if(this._assertWriterUsedCorrectly(),e instanceof Cl&&""==e.data)return;const n=Sl._createAt(t,o);if(e.parent){if(ou(e.root,n.root))return void this.move(zl._createOn(e),n);if(e.root.document)throw new f("model-writer-insert-forbidden-move",this);this.remove(e)}const r=n.root.document?n.root.document.version:null,i=new ud(n,e,r);if(e instanceof Cl&&(i.shouldReceiveAttributes=!0),this.batch.addOperation(i),this.model.applyOperation(i),e instanceof Jd)for(const[t,o]of e.markers){const e=Sl._createAt(o.root,0),r={range:new zl(o.start._getCombined(e,n),o.end._getCombined(e,n)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,r):this.addMarker(t,r)}}insertText(e,t,o,n){t instanceof Jd||t instanceof xl||t instanceof Sl?this.insert(this.createText(e),t,o):this.insert(this.createText(e,t),o,n)}insertElement(e,t,o,n){t instanceof Jd||t instanceof xl||t instanceof Sl?this.insert(this.createElement(e),t,o):this.insert(this.createElement(e,t),o,n)}append(e,t){this.insert(e,t,"end")}appendText(e,t,o){t instanceof Jd||t instanceof xl?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),o,"end")}appendElement(e,t,o){t instanceof Jd||t instanceof xl?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),o,"end")}setAttribute(e,t,o){if(this._assertWriterUsedCorrectly(),o instanceof zl){const n=o.getMinimalFlatRanges();for(const o of n)Yd(this,e,t,o)}else Xd(this,e,t,o)}setAttributes(e,t){for(const[o,n]of vr(e))this.setAttribute(o,n,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof zl){const o=t.getMinimalFlatRanges();for(const t of o)Yd(this,e,null,t)}else Xd(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof zl)for(const o of e.getItems())t(o);else t(e)}move(e,t,o){if(this._assertWriterUsedCorrectly(),!(e instanceof zl))throw new f("writer-move-invalid-range",this);if(!e.isFlat)throw new f("writer-move-range-not-flat",this);const n=Sl._createAt(t,o);if(n.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!ou(e.root,n.root))throw new f("writer-move-different-document",this);const r=e.root.document?e.root.document.version:null,i=new dd(e.start,e.end.offset-e.start.offset,n,r);this.batch.addOperation(i),this.model.applyOperation(i)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof zl?e:zl._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),tu(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,o=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof xl))throw new f("writer-merge-no-element-before",this);if(!(o instanceof xl))throw new f("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,o){return this.model.createPositionFromPath(e,t,o)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,o=e.nodeAfter;this.move(zl._createIn(o),Sl._createAt(t,"end")),this.remove(o)}_merge(e){const t=Sl._createAt(e.nodeBefore,"end"),o=Sl._createAt(e.nodeAfter,0),n=e.root.document.graveyard,r=new Sl(n,[0]),i=e.root.document.version,s=new pd(o,e.nodeAfter.maxOffset,t,r,i);this.batch.addOperation(s),this.model.applyOperation(s)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof xl))throw new f("writer-rename-not-element-instance",this);const o=e.root.document?e.root.document.version:null,n=new kd(Sl._createBefore(e),e.name,t,o);this.batch.addOperation(n),this.model.applyOperation(n)}split(e,t){this._assertWriterUsedCorrectly();let o,n,r=e.parent;if(!r.parent)throw new f("writer-split-element-no-parent",this);if(t||(t=r.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new f("writer-split-invalid-limit-element",this);do{const t=r.root.document?r.root.document.version:null,i=r.maxOffset-e.offset,s=hd.getInsertionPosition(e),a=new hd(e,i,s,null,t);this.batch.addOperation(a),this.model.applyOperation(a),o||n||(o=r,n=e.parent.nextSibling),r=(e=this.createPositionAfter(e.parent)).parent}while(r!==t);return{position:e,range:new zl(Sl._createAt(o,"end"),Sl._createAt(n,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new f("writer-wrap-range-not-flat",this);const o=t instanceof xl?t:new xl(t);if(o.childCount>0)throw new f("writer-wrap-element-not-empty",this);if(null!==o.parent)throw new f("writer-wrap-element-attached",this);this.insert(o,e.start);const n=new zl(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(n,Sl._createAt(o,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new f("writer-unwrap-element-no-parent",this);this.move(zl._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new f("writer-addmarker-no-usingoperation",this);const o=t.usingOperation,n=t.range,r=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new f("writer-addmarker-marker-exists",this);if(!n)throw new f("writer-addmarker-no-range",this);return o?(eu(this,e,null,n,r),this.model.markers.get(e)):this.model.markers._set(e,n,o,r)}updateMarker(e,t){this._assertWriterUsedCorrectly();const o="string"==typeof e?e:e.name,n=this.model.markers.get(o);if(!n)throw new f("writer-updatemarker-marker-not-exists",this);if(!t)return b("writer-updatemarker-reconvert-using-editingcontroller",{markerName:o}),void this.model.markers._refresh(n);const r="boolean"==typeof t.usingOperation,i="boolean"==typeof t.affectsData,s=i?t.affectsData:n.affectsData;if(!r&&!t.range&&!i)throw new f("writer-updatemarker-wrong-options",this);const a=n.getRange(),l=t.range?t.range:a;r&&t.usingOperation!==n.managedUsingOperations?t.usingOperation?eu(this,o,null,l,s):(eu(this,o,a,null,s),this.model.markers._set(o,l,void 0,s)):n.managedUsingOperations?eu(this,o,a,l,s):this.model.markers._set(o,l,void 0,s)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new f("writer-removemarker-no-marker",this);const o=this.model.markers.get(t);if(!o.managedUsingOperations)return void this.model.markers._remove(t);eu(this,t,o.getRange(),null,o.affectsData)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const o=this.model.document.getRoot(e);if(o&&o.isAttached())throw new f("writer-addroot-root-exists",this);const n=this.model.document,r=new _d(e,t,!0,n,n.version);return this.batch.addOperation(r),this.model.applyOperation(r),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new f("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const o=this.model.document,n=new _d(t.rootName,t.name,!1,o,o.version);this.batch.addOperation(n),this.model.applyOperation(n)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,o]of vr(e))this._setSelectionAttribute(t,o)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const o=this.model.document.selection;if(o.isCollapsed&&o.anchor.parent.isEmpty){const n=Yl._getStoreAttributeKey(e);this.setAttribute(n,t,o.anchor.parent)}o._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const o=Yl._getStoreAttributeKey(e);this.removeAttribute(o,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new f("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const o of this.model.markers){if(!o.managedUsingOperations)continue;const n=o.getRange();let r=!1;if("move"===e){const e=t;r=e.containsPosition(n.start)||e.start.isEqual(n.start)||e.containsPosition(n.end)||e.end.isEqual(n.end)}else{const e=t,o=e.nodeBefore,i=e.nodeAfter,s=n.start.parent==o&&n.start.isAtEnd,a=n.end.parent==i&&0==n.end.offset,l=n.end.nodeAfter==i,c=n.start.nodeAfter==i;r=s||a||l||c}r&&this.updateMarker(o.name,{range:n})}}}function Yd(e,t,o,n){const r=e.model,i=r.document;let s,a,l,c=n.start;for(const e of n.getWalker({shallow:!0}))l=e.item.getAttribute(t),s&&a!=l&&(a!=o&&d(),c=s),s=e.nextPosition,a=l;function d(){const n=new zl(c,s),l=n.root.document?i.version:null,d=new fd(n,t,a,o,l);e.batch.addOperation(d),r.applyOperation(d)}s instanceof Sl&&s!=c&&a!=o&&d()}function Xd(e,t,o,n){const r=e.model,i=r.document,s=n.getAttribute(t);let a,l;if(s!=o){if(n.root===n){const e=n.document?i.version:null;l=new wd(n,t,s,o,e)}else{a=new zl(Sl._createBefore(n),e.createPositionAfter(n));const r=a.root.document?i.version:null;l=new fd(a,t,s,o,r)}e.batch.addOperation(l),r.applyOperation(l)}}function eu(e,t,o,n,r){const i=e.model,s=i.document,a=new gd(t,o,n,i.markers,!!r,s.version);e.batch.addOperation(a),i.applyOperation(a)}function tu(e,t,o,n){let r;if(e.root.document){const o=n.document,i=new Sl(o.graveyard,[0]);r=new dd(e,t,i,o.version)}else r=new Zd(e,t);o.addOperation(r),n.applyOperation(r)}function ou(e,t){return e===t||e instanceof Hd&&t instanceof Hd}function nu(e,t,o={}){if(t.isCollapsed)return;const n=t.getFirstRange();if("$graveyard"==n.root.rootName)return;const r=e.schema;e.change((e=>{if(!o.doNotResetEntireContent&&function(e,t){const o=e.getLimitElement(t);if(!t.containsEntireContent(o))return!1;const n=t.getFirstRange();if(n.start.parent==n.end.parent)return!1;return e.checkChild(o,"paragraph")}(r,t))return void function(e,t){const o=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(o)),au(e,e.createPositionAt(o,0),t)}(e,t);const i={};if(!o.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(i,r.getAttributesWithProperty(e,"copyOnReplace",!0))}const[s,a]=function(e){const t=e.root.document.model,o=e.start;let n=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const o=function(e){const t=e.parent,o=t.root.document.model.schema,n=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of n){if(o.isLimit(e))return null;if(o.isBlock(e))return e}}(n);if(o&&n.isTouching(t.createPositionAt(o,0))){const o=t.createSelection(e);t.modifySelection(o,{direction:"backward"});const r=o.getLastPosition(),i=t.createRange(r,n);t.hasContent(i,{ignoreMarkers:!0})||(n=r)}}return[zd.fromPosition(o,"toPrevious"),zd.fromPosition(n,"toNext")]}(n);s.isTouching(a)||e.remove(e.createRange(s,a)),o.leaveUnmerged||(!function(e,t,o){const n=e.model;if(!su(e.model.schema,t,o))return;const[r,i]=function(e,t){const o=e.getAncestors(),n=t.getAncestors();let r=0;for(;o[r]&&o[r]==n[r];)r++;return[o[r],n[r]]}(t,o);if(!r||!i)return;!n.hasContent(r,{ignoreMarkers:!0})&&n.hasContent(i,{ignoreMarkers:!0})?iu(e,t,o,r.parent):ru(e,t,o,r.parent)}(e,s,a),r.removeDisallowedAttributes(s.parent.getChildren(),e)),lu(e,t,s),!o.doNotAutoparagraph&&function(e,t){const o=e.checkChild(t,"$text"),n=e.checkChild(t,"paragraph");return!o&&n}(r,s)&&au(e,s,t,i),s.detach(),a.detach()}))}function ru(e,t,o,n){const r=t.parent,i=o.parent;if(r!=n&&i!=n){for(t=e.createPositionAfter(r),(o=e.createPositionBefore(i)).isEqual(t)||e.insert(i,t),e.merge(t);o.parent.isEmpty;){const t=o.parent;o=e.createPositionBefore(t),e.remove(t)}su(e.model.schema,t,o)&&ru(e,t,o,n)}}function iu(e,t,o,n){const r=t.parent,i=o.parent;if(r!=n&&i!=n){for(t=e.createPositionAfter(r),(o=e.createPositionBefore(i)).isEqual(t)||e.insert(r,o);t.parent.isEmpty;){const o=t.parent;t=e.createPositionBefore(o),e.remove(o)}o=e.createPositionBefore(i),function(e,t){const o=t.nodeBefore,n=t.nodeAfter;o.name!=n.name&&e.rename(o,n.name);e.clearAttributes(o),e.setAttributes(Object.fromEntries(n.getAttributes()),o),e.merge(t)}(e,o),su(e.model.schema,t,o)&&iu(e,t,o,n)}}function su(e,t,o){const n=t.parent,r=o.parent;return n!=r&&(!e.isLimit(n)&&!e.isLimit(r)&&function(e,t,o){const n=new zl(e,t);for(const e of n.getWalker())if(o.isLimit(e.item))return!1;return!0}(t,o,e))}function au(e,t,o,n={}){const r=e.createElement("paragraph");e.model.schema.setAllowedAttributes(r,n,e),e.insert(r,t),lu(e,o,e.createPositionAt(r,0))}function lu(e,t,o){t instanceof Yl?e.setSelection(o):t.setTo(o)}function cu(e,t){const o=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{o.push(e.start.parent),t.remove(e)})),o.forEach((e=>{let o=e;for(;o.parent&&o.isEmpty;){const e=t.createRangeOn(o);o=o.parent,t.remove(e)}}))}class du{constructor(e,t,o){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=e,this.writer=t,this.position=o,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),o=this.writer.createPositionAfter(e);if(o.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new f("insertcontent-invalid-insertion-position",this);this.position=o,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?zl._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new zl(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=zd.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new f("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=zd.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=zd.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof xl))return;if(!this._canMergeLeft(e))return;const t=zd._createBefore(e);t.stickiness="toNext";const o=zd.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=zd._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=zd._createAt(t.nodeBefore,"end","toNext")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof xl))return;if(!this._canMergeRight(e))return;const t=zd._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new f("insertcontent-invalid-insertion-position",this);this.position=Sl._createAt(t.nodeBefore,"end");const o=zd.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=zd._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=zd._createAt(t.nodeBefore,0,"toPrevious")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof xl&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof xl&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function uu(e,t,o="auto"){const n=e.getSelectedElement();if(n&&t.schema.isObject(n)&&!t.schema.isInline(n))return"before"==o||"after"==o?t.createRange(t.createPositionAt(n,o)):t.createRangeOn(n);const r=yr(e.getSelectedBlocks());if(!r)return t.createRange(e.focus);if(r.isEmpty)return t.createRange(t.createPositionAt(r,0));const i=t.createPositionAfter(r);return e.focus.isTouching(i)?t.createRange(i):t.createRange(t.createPositionBefore(r))}function hu(e,t,o,n={}){if(!e.schema.isObject(t))throw new f("insertobject-element-not-an-object",e,{object:t});const r=o||e.document.selection;let i=r;n.findOptimalPosition&&e.schema.isBlock(t)&&(i=e.createSelection(uu(r,e,n.findOptimalPosition)));const s=yr(r.getSelectedBlocks()),a={};return s&&Object.assign(a,e.schema.getAttributesWithProperty(s,"copyOnReplace",!0)),e.change((o=>{i.isCollapsed||e.deleteContent(i,{doNotAutoparagraph:!0});let r=t;const s=i.anchor.parent;!e.schema.checkChild(s,t)&&e.schema.checkChild(s,"paragraph")&&e.schema.checkChild("paragraph",t)&&(r=o.createElement("paragraph"),o.insert(t,r)),e.schema.setAllowedAttributes(r,a,o);const l=e.insertContent(r,i);return l.isCollapsed||n.setSelection&&function(e,t,o,n){const r=e.model;if("on"==o)return void e.setSelection(t,"on");if("after"!=o)throw new f("insertobject-invalid-place-parameter-value",r);let i=t.nextSibling;if(r.schema.isInline(t))return void e.setSelection(t,"after");const s=i&&r.schema.checkChild(i,"$text");!s&&r.schema.checkChild(t.parent,"paragraph")&&(i=e.createElement("paragraph"),r.schema.setAllowedAttributes(i,n,e),r.insertContent(i,e.createPositionAfter(t)));i&&e.setSelection(i,0)}(o,t,n.setSelection,a),l}))}const pu=' ,.?!:;"-()';function gu(e,t){const{isForward:o,walker:n,unit:r,schema:i,treatEmojiAsSingleUnit:s}=e,{type:a,item:l,nextPosition:c}=t;if("text"==a)return"word"===e.unit?function(e,t){let o=e.position.textNode;o||(o=t?e.position.nodeAfter:e.position.nodeBefore);for(;o&&o.is("$text");){const n=e.position.offset-o.startOffset;if(bu(o,n,t))o=t?e.position.nodeAfter:e.position.nodeBefore;else{if(fu(o.data,n,t))break;e.next()}}return e.position}(n,o):function(e,t,o){const n=e.position.textNode;if(n){const r=n.data;let i=e.position.offset-n.startOffset;for(;Er(r,i)||"character"==t&&Dr(r,i)||o&&Tr(r,i);)e.next(),i=e.position.offset-n.startOffset}return e.position}(n,r,s);if(a==(o?"elementStart":"elementEnd")){if(i.isSelectable(l))return Sl._createAt(l,o?"after":"before");if(i.checkChild(c,"$text"))return c}else{if(i.isLimit(l))return void n.skip((()=>!0));if(i.checkChild(c,"$text"))return c}}function mu(e,t){const o=e.root,n=Sl._createAt(o,t?"end":0);return t?new zl(e,n):new zl(n,e)}function fu(e,t,o){const n=t+(o?0:-1);return pu.includes(e.charAt(n))}function bu(e,t,o){return t===(o?e.offsetSize:0)}class ku extends(H()){constructor(){super(),this.markers=new Gd,this.document=new $d(this),this.schema=new zc,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),Ec(this),this.document.registerPostFixer(fc),this.on("insertContent",((e,[t,o])=>{e.return=function(e,t,o){return e.change((n=>{const r=o||e.document.selection;r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});const i=new du(e,n,r.anchor),s=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[o,n]of t.markers){const{start:t,end:r}=n,i=t.isEqual(r);e.push({position:t,name:o,isCollapsed:i},{position:r,name:o,isCollapsed:i})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:o,name:r,isCollapsed:i}of e){let e=null,a=null;const l=o.parent===t&&o.isAtStart,c=o.parent===t&&o.isAtEnd;l||c?i&&(a=l?"start":"end"):(e=n.createElement("$marker"),n.insert(e,o)),s.push({name:r,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];i.handleNodes(a);let l=i.getSelectionRange();if(t.is("documentFragment")&&s.length){const e=l?Kl.fromRange(l):null,t={};for(let e=s.length-1;e>=0;e--){const{name:o,element:r,collapsed:a}=s[e],l=!t[o];if(l&&(t[o]=[]),r){const e=n.createPositionAt(r,"before");t[o].push(e),n.remove(r)}else{const e=i.getAffectedRange();if(!e){a&&t[o].push(i.position);continue}a?t[o].push(e[a]):t[o].push(l?e.start:e.end)}}for(const[e,[o,r]]of Object.entries(t))o&&r&&o.root===r.root&&n.addMarker(e,{usingOperation:!0,affectsData:!0,range:new zl(o,r)});e&&(l=e.toRange(),e.detach())}l&&(r instanceof Yl?n.setSelection(l):r.setTo(l));const c=i.getAffectedRange()||e.createRange(r.anchor);return i.destroy(),c}))}(this,t,o)})),this.on("insertObject",((e,[t,o,n])=>{e.return=hu(this,t,o,n)})),this.on("canEditAt",(e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Fd,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){f.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new Fd):e instanceof Fd||(e=new Fd(e)):e=new Fd,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){f.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,o,...n){const r=wu(t,o);return this.fire("insertContent",[e,r,o,...n])}insertObject(e,t,o,n,...r){const i=wu(t,o);return this.fire("insertObject",[e,i,n,n,...r])}deleteContent(e,t){nu(this,e,t)}modifySelection(e,t){!function(e,t,o={}){const n=e.schema,r="backward"!=o.direction,i=o.unit?o.unit:"character",s=!!o.treatEmojiAsSingleUnit,a=t.focus,l=new El({boundaries:mu(a,r),singleCharacters:!0,direction:r?"forward":"backward"}),c={walker:l,schema:n,isForward:r,unit:i,treatEmojiAsSingleUnit:s};let d;for(;d=l.next();){if(d.done)return;const o=gu(c,d.value);if(o)return void(t instanceof Yl?e.change((e=>{e.setSelectionFocus(o)})):t.setFocus(o))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const o=e.createDocumentFragment(),n=t.getFirstRange();if(!n||n.isCollapsed)return o;const r=n.start.root,i=n.start.getCommonPath(n.end),s=r.getNodeByPath(i);let a;a=n.start.parent==n.end.parent?n:e.createRange(e.createPositionAt(s,n.start.path[i.length]),e.createPositionAt(s,n.end.path[i.length]+1));const l=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),o):e.append(e.cloneElement(t,!0),o);if(a!=n){const t=n._getTransformedByMove(a.start,e.createPositionAt(o,0),l)[0],r=e.createRange(e.createPositionAt(o,0),t.start);cu(e.createRange(t.end,e.createPositionAt(o,"end")),e),cu(r,e)}return o}))}(this,e)}hasContent(e,t={}){const o=e instanceof zl?e:zl._createIn(e);if(o.isCollapsed)return!1;const{ignoreWhitespaces:n=!1,ignoreMarkers:r=!1}=t;if(!r)for(const e of this.markers.getMarkersIntersectingRange(o))if(e.affectsData)return!0;for(const e of o.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!n)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=wu(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,o){return new Sl(e,t,o)}createPositionAt(e,t){return Sl._createAt(e,t)}createPositionAfter(e){return Sl._createAfter(e)}createPositionBefore(e){return Sl._createBefore(e)}createRange(e,t){return new zl(e,t)}createRangeIn(e){return zl._createIn(e)}createRangeOn(e){return zl._createOn(e)}createSelection(...e){return new jl(...e)}createBatch(e){return new Fd(e)}createOperationFromJSON(e){return Ad.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new Qd(this,t);const o=this._pendingChanges[0].callback(this._currentWriter);e.push(o),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function wu(e,t){if(e)return e instanceof jl||e instanceof Yl?e:e instanceof yl?t||0===t?new jl(e,t):e.is("rootElement")?new jl(e,"in"):new jl(e,"on"):new jl(e)}class _u extends Ea{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}class yu extends Ea{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}class Au{constructor(e){this.document=e}createDocumentFragment(e){return new Os(this.document,e)}createElement(e,t,o){return new as(this.document,e,t,o)}createText(e){return new ri(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,o){return o._insertChild(e,t)}removeChildren(e,t,o){return o._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const o=e.parent;if(o){const n=o.getChildIndex(e);return this.removeChildren(n,1,o),this.insertChild(n,t,o),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const o=t.getChildIndex(e);this.remove(e),this.insertChild(o,e.getChildren(),t)}}rename(e,t){const o=new as(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,o)?o:null}setAttribute(e,t,o){o._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,o){Ae(e)&&void 0===o?t._setStyle(e):o._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,o){o._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return ms._createAt(e,t)}createPositionAfter(e){return ms._createAfter(e)}createPositionBefore(e){return ms._createBefore(e)}createRange(e,t){return new fs(e,t)}createRangeOn(e){return fs._createOn(e)}createRangeIn(e){return fs._createIn(e)}createSelection(...e){return new ks(...e)}}const Cu=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,vu=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,xu=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Eu=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,Du=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Su=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function Tu(e){return e.startsWith("#")?Cu.test(e):e.startsWith("rgb")?vu.test(e)||xu.test(e):e.startsWith("hsl")?Eu.test(e)||Du.test(e):Su.has(e.toLowerCase())}const Bu=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function Iu(e){return Bu.includes(e)}const Pu=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Ru(e){return Pu.test(e)}const zu=/^[+-]?[0-9]*([.][0-9]+)?%$/;const Mu=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function Nu(e){return Mu.includes(e)}const Fu=["center","top","bottom","left","right"];function Ou(e){return Fu.includes(e)}const Vu=["fixed","scroll","local"];function Lu(e){return Vu.includes(e)}const ju=/^url\(/;function qu(e){return ju.test(e)}function Hu(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=Uu(e),o=t[0],n=t[2]||o,r=t[1]||o;return{top:o,bottom:n,right:r,left:t[3]||r}}function Wu(e){return t=>{const{top:o,right:n,bottom:r,left:i}=t,s=[];return[o,n,i,r].every((e=>!!e))?s.push([e,$u(t)]):(o&&s.push([e+"-top",o]),n&&s.push([e+"-right",n]),r&&s.push([e+"-bottom",r]),i&&s.push([e+"-left",i])),s}}function $u({top:e,right:t,bottom:o,left:n}){const r=[];return n!==t?r.push(e,t,o,n):o!==e?r.push(e,t,o):t!==e?r.push(e,t):r.push(e),r.join(" ")}function Uu(e){return e.replace(/, /g,",").split(" ").map((e=>e.replace(/,/g,", ")))}function Gu(e){e.setNormalizer("background",(e=>{const t={},o=Uu(e);for(const e of o)Nu(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Ou(e)?(t.position=t.position||[],t.position.push(e)):Lu(e)?t.attachment=e:Tu(e)?t.color=e:qu(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function Ku(e){e.setNormalizer("border",(e=>{const{color:t,style:o,width:n}=th(e);return{path:"border",value:{color:Hu(t),style:Hu(o),width:Hu(n)}}})),e.setNormalizer("border-top",Zu("top")),e.setNormalizer("border-right",Zu("right")),e.setNormalizer("border-bottom",Zu("bottom")),e.setNormalizer("border-left",Zu("left")),e.setNormalizer("border-color",Ju("color")),e.setNormalizer("border-width",Ju("width")),e.setNormalizer("border-style",Ju("style")),e.setNormalizer("border-top-color",Yu("color","top")),e.setNormalizer("border-top-style",Yu("style","top")),e.setNormalizer("border-top-width",Yu("width","top")),e.setNormalizer("border-right-color",Yu("color","right")),e.setNormalizer("border-right-style",Yu("style","right")),e.setNormalizer("border-right-width",Yu("width","right")),e.setNormalizer("border-bottom-color",Yu("color","bottom")),e.setNormalizer("border-bottom-style",Yu("style","bottom")),e.setNormalizer("border-bottom-width",Yu("width","bottom")),e.setNormalizer("border-left-color",Yu("color","left")),e.setNormalizer("border-left-style",Yu("style","left")),e.setNormalizer("border-left-width",Yu("width","left")),e.setExtractor("border-top",Xu("top")),e.setExtractor("border-right",Xu("right")),e.setExtractor("border-bottom",Xu("bottom")),e.setExtractor("border-left",Xu("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",Wu("border-color")),e.setReducer("border-style",Wu("border-style")),e.setReducer("border-width",Wu("border-width")),e.setReducer("border-top",oh("top")),e.setReducer("border-right",oh("right")),e.setReducer("border-bottom",oh("bottom")),e.setReducer("border-left",oh("left")),e.setReducer("border",function(){return t=>{const o=eh(t,"top"),n=eh(t,"right"),r=eh(t,"bottom"),i=eh(t,"left"),s=[o,n,r,i],a={width:e(s,"width"),style:e(s,"style"),color:e(s,"color")},l=nh(a,"all");if(l.length)return l;const c=Object.entries(a).reduce(((e,[t,o])=>(o&&(e.push([`border-${t}`,o]),s.forEach((e=>delete e[t]))),e)),[]);return[...c,...nh(o,"top"),...nh(n,"right"),...nh(r,"bottom"),...nh(i,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function Zu(e){return t=>{const{color:o,style:n,width:r}=th(t),i={};return void 0!==o&&(i.color={[e]:o}),void 0!==n&&(i.style={[e]:n}),void 0!==r&&(i.width={[e]:r}),{path:"border",value:i}}}function Ju(e){return t=>({path:"border",value:Qu(t,e)})}function Qu(e,t){return{[t]:Hu(e)}}function Yu(e,t){return o=>({path:"border",value:{[e]:{[t]:o}}})}function Xu(e){return(t,o)=>{if(o.border)return eh(o.border,e)}}function eh(e,t){const o={};return e.width&&e.width[t]&&(o.width=e.width[t]),e.style&&e.style[t]&&(o.style=e.style[t]),e.color&&e.color[t]&&(o.color=e.color[t]),o}function th(e){const t={},o=Uu(e);for(const e of o)Ru(e)||/thin|medium|thick/.test(e)?t.width=e:Iu(e)?t.style=e:t.color=e;return t}function oh(e){return t=>nh(t,e)}function nh(e,t){const o=[];if(e&&e.width&&o.push("width"),e&&e.style&&o.push("style"),e&&e.color&&o.push("color"),3==o.length){const n=o.map((t=>e[t])).join(" ");return["all"==t?["border",n]:[`border-${t}`,n]]}return"all"==t?[]:o.map((o=>[`border-${t}-${o}`,e[o]]))}function rh(e){var t;e.setNormalizer("padding",(t="padding",e=>({path:t,value:Hu(e)}))),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",Wu("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}class ih{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const o=this.get(e);if(!o)throw new f("commandcollection-command-not-found",this,{commandName:e});return o.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class sh extends Cr{constructor(e){super(),this.editor=e}set(e,t,o={}){if("string"==typeof t){const e=t;t=(t,o)=>{this.editor.execute(e),o()}}super.set(e,t,o)}}class ah extends(H()){constructor(e={}){super();const t=this.constructor,o=e.language||t.defaultConfig&&t.defaultConfig.language;this._context=e.context||new Mr({language:o}),this._context._addEditor(this,!e.context);const n=Array.from(t.builtinPlugins||[]);this.config=new yn(e,t.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new zr(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new ih,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new ku,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const r=new rs;this.data=new Yc(this.model,r),this.editing=new Bc(this.model,r),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Xc([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new sh(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new f("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new f("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new f("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),o=e.get("removePlugins")||[],n=e.get("extraPlugins")||[],r=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(n),o,r)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){f.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}}function lh(e){return class extends e{setData(e){this.data.set(e)}getData(e){return this.data.get(e)}}}{const e=lh(Object);lh.setData=e.prototype.setData,lh.getData=e.prototype.getData}function ch(e){return class extends e{updateSourceElement(e=this.data.get()){if(!this.sourceElement)throw new f("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),o=this.sourceElement instanceof HTMLTextAreaElement;qn(this.sourceElement,t||o?e:"")}}}ch.updateSourceElement=ch(Object).prototype.updateSourceElement;class dh extends Nr{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new _r({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new f("pendingactions-add-invalid-message",this);const t=new(H());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const uh={bold:'',cancel:'',caption:'',check:'',cog:'',eraser:'',image:'',lowVision:'',importExport:'',paragraph:'',plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:'',quote:'',threeVerticalDots:''};class hh{constructor(e){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const o=this._listeners[e]||[];for(const e of o)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const o=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:o}),o?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function ph(e,t=new Set){const o=[e],n=new Set;let r=0;for(;o.length>r;){const e=o[r++];if(!n.has(e)&&gh(e)&&!t.has(e))if(n.add(e),Symbol.iterator in e)try{for(const t of e)o.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&o.push(e[t])}return n}function gh(e){const t=Object.prototype.toString.call(e),o=typeof e;return!("number"===o||"boolean"===o||"string"===o||"symbol"===o||"function"===o||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function mh(e,t,o=new Set){if(e===t&&("object"==typeof(n=e)&&null!==n))return!0;var n;const r=ph(e,o),i=ph(t,o);for(const e of r)if(i.has(e))return!0;return!1}const fh=function(e,t,o){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return N(o)&&(n="leading"in o?!!o.leading:n,r="trailing"in o?!!o.trailing:r),La(e,t,{leading:n,maxWait:t,trailing:r})};class bh extends hh{constructor(e,t={}){super(t),this._editor=null,this._throttledSave=fh(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,o)=>e.create(t,o)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const e=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,e,e.context)}})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,o){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=e,this._config=this._cloneEditorConfiguration(t)||{},this._config.context=o,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.flush();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e={};for(const t of this._editor.model.document.getRootNames())e[t]=this._editor.data.get({rootName:t});return e}_isErrorComingFromThisItem(e){return mh(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return wn(e,((e,t)=>_n(e)||"context"===t?e:void 0))}}const kh=Symbol("MainQueueId");class wh{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const o=e===kh;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const n=(o?Promise.all(this._queues.values()):Promise.all([this._queues.get(kh),this._queues.get(e)])).then(t),r=n.catch((()=>{}));return this._queues.set(e,r),n.finally((()=>{this._activeActions--,this._queues.get(e)===r&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function _h(e){return Array.isArray(e)?e:[e]}function yh({emitter:e,activator:t,callback:o,contextElements:n}){e.listenTo(document,"mousedown",((e,r)=>{if(!t())return;const i="function"==typeof r.composedPath?r.composedPath():[],s="function"==typeof n?n():n;for(const e of s)if(e.contains(r.target)||i.includes(e))return;o()}))}function Ah(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...e){super(...e),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function Ch({view:e}){e.listenTo(e.element,"submit",((t,o)=>{o.preventDefault(),e.fire("submit")}),{useCapture:!0})}function vh({keystrokeHandler:e,focusTracker:t,gridItems:o,numberOfColumns:n,uiLanguageDirection:r}){const i="number"==typeof n?()=>n:n;function s(e){return n=>{const r=o.find((e=>e.element===t.focusedElement)),i=o.getIndex(r),s=e(i,o);o.get(s).focus(),n.stopPropagation(),n.preventDefault()}}function a(e,t){return e===t-1?0:e+1}function l(e,t){return 0===e?t-1:e-1}e.set("arrowright",s(((e,t)=>"rtl"===r?l(e,t.length):a(e,t.length)))),e.set("arrowleft",s(((e,t)=>"rtl"===r?a(e,t.length):l(e,t.length)))),e.set("arrowup",s(((e,t)=>{let o=e-i();return o<0&&(o=e+i()*Math.floor(t.length/i()),o>t.length-1&&(o-=i())),o}))),e.set("arrowdown",s(((e,t)=>{let o=e+i();return o>t.length-1&&(o=e%i()),o})))}class xh extends _r{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,o)=>{this._renderViewIntoCollectionParent(t,o)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new f("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const o of this)for(const n of e)o.delegate(n).to(t);this.on("add",((o,n)=>{for(const o of e)n.delegate(o).to(t)})),this.on("remove",((o,n)=>{for(const o of e)n.stopDelegating(o,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}var Eh=o(6150),Dh={attributes:{"data-cke":!0}};Dh.setAttributes=Wr(),Dh.insert=qr().bind(null,"head"),Dh.domAPI=Lr(),Dh.insertStyleElement=Ur();Or()(Eh.Z,Dh);Eh.Z&&Eh.Z.locals&&Eh.Z.locals;class Sh extends(Dn(H())){constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new _r,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,o)=>{o.locale=e,o.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Th.bind(this,this)}createCollection(e){const t=new xh(e);return this._viewCollections.add(t),t}registerChild(e){Q(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){Q(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Th(e)}extendTemplate(e){Th.extend(this.template,e)}render(){if(this.isRendered)throw new f("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}class Th extends(S()){constructor(e){super(),Object.assign(this,Vh(Oh(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new f("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const o of t.children)$h(o)?yield o:Uh(o)&&(yield*e(o))}(this)}static bind(e,t){return{to:(o,n)=>new Ih({eventNameOrFunction:o,attribute:o,observable:e,emitter:t,callback:n}),if:(o,n,r)=>new Ph({observable:e,emitter:t,attribute:o,valueIfTrue:n,callback:r})}}static extend(e,t){if(e._isRendered)throw new f("template-extend-render",[this,e]);Hh(e,Vh(Oh(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new f("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),Rh(this.text)?this._bindToObservable({schema:this.text,updater:Mh(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,o=e.revertData;for(const n in this.attributes){const r=t.getAttribute(n),i=this.attributes[n];o&&(o.attributes[n]=r);const s=Kh(i)?i[0].ns:null;if(Rh(i)){const a=Kh(i)?i[0].value:i;o&&Zh(n)&&a.unshift(r),this._bindToObservable({schema:a,updater:Nh(t,n,s),data:e})}else if("style"==n&&"string"!=typeof i[0])this._renderStyleAttribute(i[0],e);else{o&&r&&Zh(n)&&i.unshift(r);const e=i.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(jh,"");Wh(e)||t.setAttributeNS(s,n,e)}}}_renderStyleAttribute(e,t){const o=t.node;for(const n in e){const r=e[n];Rh(r)?this._bindToObservable({schema:[r],updater:Fh(o,n),data:t}):o.style[n]=r}}_renderElementChildren(e){const t=e.node,o=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let r=0;for(const i of this.children)if(Gh(i)){if(!n){i.setParent(t);for(const e of i)o.appendChild(e.element)}}else if($h(i))n||(i.isRendered||i.render(),o.appendChild(i.element));else if(vn(i))o.appendChild(i);else if(n){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),i._renderNode({intoFragment:!1,node:o.childNodes[r++],isApplying:!0,revertData:t})}else o.appendChild(i.render());e.intoFragment&&t.appendChild(o)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const o=this.eventListeners[t].map((o=>{const[n,r]=t.split("@");return o.activateDomEventListener(n,r,e)}));e.revertData&&e.revertData.bindings.push(o)}}_bindToObservable({schema:e,updater:t,data:o}){const n=o.revertData;zh(e,t,o);const r=e.filter((e=>!Wh(e))).filter((e=>e.observable)).map((n=>n.activateAttributeListener(e,t,o)));n&&n.bindings.push(r)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const o=e;for(const e in t.attributes){const n=t.attributes[e];null===n?o.removeAttribute(e):o.setAttribute(e,n)}for(let e=0;ezh(e,t,o);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,n),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,n)}}}class Ih extends Bh{constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,o){const n=(e,o)=>{t&&!o.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(o):this.observable.fire(this.eventNameOrFunction,o))};return this.emitter.listenTo(o.node,e,n),()=>{this.emitter.stopListening(o.node,e,n)}}}class Ph extends Bh{constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!Wh(super.getValue(e))&&(this.valueIfTrue||!0)}}function Rh(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(Rh):e instanceof Bh)}function zh(e,t,{node:o}){const n=function(e,t){return e.map((e=>e instanceof Bh?e.getValue(t):e))}(e,o);let r;r=1==e.length&&e[0]instanceof Ph?n[0]:n.reduce(jh,""),Wh(r)?t.remove():t.set(r)}function Mh(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function Nh(e,t,o){return{set(n){e.setAttributeNS(o,t,n)},remove(){e.removeAttributeNS(o,t)}}}function Fh(e,t){return{set(o){e.style[t]=o},remove(){e.style[t]=null}}}function Oh(e){return wn(e,(e=>{if(e&&(e instanceof Bh||Uh(e)||$h(e)||Gh(e)))return e}))}function Vh(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=mr(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)Lh(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=mr(e[t].value)),Lh(e,t)}(e.attributes);const t=[];if(e.children)if(Gh(e.children))t.push(e.children);else for(const o of e.children)Uh(o)||$h(o)||vn(o)?t.push(o):t.push(new Th(o));e.children=t}return e}function Lh(e,t){e[t]=mr(e[t])}function jh(e,t){return Wh(t)?e:Wh(e)?t:`${e} ${t}`}function qh(e,t){for(const o in t)e[o]?e[o].push(...t[o]):e[o]=t[o]}function Hh(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),qh(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),qh(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new f("ui-template-extend-children-mismatch",e);let o=0;for(const n of t.children)Hh(e.children[o++],n)}}function Wh(e){return!e&&0!==e}function $h(e){return e instanceof Sh}function Uh(e){return e instanceof Th}function Gh(e){return e instanceof xh}function Kh(e){return N(e[0])&&e[0].ns}function Zh(e){return"class"==e||"style"==e}class Jh extends xh{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new Th({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=ge(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var Qh=o(1174),Yh={attributes:{"data-cke":!0}};Yh.setAttributes=Wr(),Yh.insert=qr().bind(null,"head"),Yh.domAPI=Lr(),Yh.insertStyleElement=Ur();Or()(Qh.Z,Yh);Qh.Z&&Qh.Z.locals&&Qh.Z.locals;class Xh extends Sh{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon","ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:o}of Array.from(e.attributes))Xh.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,o);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}}Xh.presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];var ep=o(4499),tp={attributes:{"data-cke":!0}};tp.setAttributes=Wr(),tp.insert=qr().bind(null,"head"),tp.domAPI=Lr(),tp.insertStyleElement=Ur();Or()(ep.Z,tp);ep.Z&&ep.Z.locals&&ep.Z.locals;class op extends Sh{constructor(e){super(e),this._focusDelayed=null;const t=this.bindTemplate,o=h();this.set("ariaChecked",void 0),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${o}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._createLabelView(),this.iconView=new Xh,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const r={tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",(e=>!e)),t.if("isVisible","ck-hidden",(e=>!e)),t.to("isOn",(e=>e?"ck-on":"ck-off")),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],role:t.to("role"),type:t.to("type",(e=>e||"button")),tabindex:t.to("tabindex"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy"),"aria-disabled":t.if("isEnabled",!0,(e=>!e)),"aria-checked":t.to("isOn"),"aria-pressed":t.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":t.to("_tooltipString"),"data-cke-tooltip-position":t.to("tooltipPosition")},children:this.children,on:{click:t.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};n.isSafari&&(this._focusDelayed||(this._focusDelayed=xr((()=>this.focus()),0)),r.on.mousedown=t.to((()=>{this._focusDelayed()})),r.on.mouseup=t.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(r)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_createLabelView(){const e=new Sh,t=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:t.to("labelStyle"),id:this.ariaLabelledBy},children:[{text:t.to("label")}]}),e}_createKeystrokeView(){const e=new Sh;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>pr(e)))}]}),e}_getTooltipString(e,t,o){return e?"string"==typeof e?e:(o&&(o=pr(o)),e instanceof Function?e(t,o):`${t}${o?` (${o})`:""}`):""}}var np=o(9681),rp={attributes:{"data-cke":!0}};rp.setAttributes=Wr(),rp.insert=qr().bind(null,"head"),rp.domAPI=Lr(),rp.insertStyleElement=Ur();Or()(np.Z,rp);np.Z&&np.Z.locals&&np.Z.locals;class ip extends op{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new Sh;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}function sp(e,t){const o=e.t,n={Black:o("Black"),"Dim grey":o("Dim grey"),Grey:o("Grey"),"Light grey":o("Light grey"),White:o("White"),Red:o("Red"),Orange:o("Orange"),Yellow:o("Yellow"),"Light green":o("Light green"),Green:o("Green"),Aquamarine:o("Aquamarine"),Turquoise:o("Turquoise"),"Light blue":o("Light blue"),Blue:o("Blue"),Purple:o("Purple")};return t.map((e=>{const t=n[e.label];return t&&t!=e.label&&(e.label=t),e}))}function ap(e){return e.map(lp).filter((e=>!!e))}function lp(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}class cp extends op{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}var dp=o(4923),up={attributes:{"data-cke":!0}};up.setAttributes=Wr(),up.insert=qr().bind(null,"head"),up.domAPI=Lr(),up.insertStyleElement=Ur();Or()(dp.Z,up);dp.Z&&dp.Z.locals&&dp.Z.locals;class hp extends Sh{constructor(e,t){super(e);const o=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t&&t.columns?t.columns:5;const n={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new Ar,this.keystrokes=new Cr,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),o.forEach((e=>{const t=new cp;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",((e,t,o)=>{for(const e of this.items)e.isOn=e.color===o}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),vh({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}o(8874);o(2085);var pp=o(2751),gp={attributes:{"data-cke":!0}};gp.setAttributes=Wr(),gp.insert=qr().bind(null,"head"),gp.domAPI=Lr(),gp.insertStyleElement=Ur();Or()(pp.Z,gp);pp.Z&&pp.Z.locals&&pp.Z.locals;class mp extends Sh{constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${h()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}var fp=o(8111),bp={attributes:{"data-cke":!0}};bp.setAttributes=Wr(),bp.insert=qr().bind(null,"head"),bp.domAPI=Lr(),bp.insertStyleElement=Ur();Or()(fp.Z,bp);fp.Z&&fp.Z.locals&&fp.Z.locals;class kp extends Sh{constructor(e,t){super(e);const o=`ck-labeled-field-view-${h()}`,n=`ck-labeled-field-view-status-${h()}`;this.fieldView=t(this,o,n),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(o),this.statusView=this._createStatusView(n),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const r=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",r.to("class"),r.if("isEnabled","ck-disabled",(e=>!e)),r.if("isEmpty","ck-labeled-field-view_empty"),r.if("isFocused","ck-labeled-field-view_focused"),r.if("placeholder","ck-labeled-field-view_placeholder"),r.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new mp(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new Sh(this.locale),o=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",o.if("errorText","ck-labeled-field-view__status_error"),o.if("_statusText","ck-hidden",(e=>!e))],id:e,role:o.if("errorText","alert")},children:[{text:o.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}var wp=o(6985),_p={attributes:{"data-cke":!0}};_p.setAttributes=Wr(),_p.insert=qr().bind(null,"head"),_p.domAPI=Lr(),_p.insertStyleElement=Ur();Or()(wp.Z,_p);wp.Z&&wp.Z.locals&&wp.Z.locals;class yp extends Sh{constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.focusTracker=new Ar,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),inputmode:t.to("inputMode"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,o)=>{this._setDomElementValue(o),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}class Ap extends yp{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class Cp extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():b("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var vp=o(3488),xp={attributes:{"data-cke":!0}};xp.setAttributes=Wr(),xp.insert=qr().bind(null,"head"),xp.domAPI=Lr(),xp.insertStyleElement=Ur();Or()(vp.Z,xp);vp.Z&&vp.Z.locals&&vp.Z.locals;class Ep extends Sh{constructor(e,t,o){super(e);const n=this.bindTemplate;this.buttonView=t,this.panelView=o,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.keystrokes=new Cr,this.focusTracker=new Ar,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",(e=>!e))],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[t,o]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":n.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",((e,t,o)=>{o&&("auto"===this.panelPosition?this.panelView.position=Ep._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:o,southWest:n,northEast:r,northWest:i,southMiddleEast:s,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=Ep.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[o,n,s,a,e,r,i,l,c,t]:[n,o,a,s,e,i,r,c,l,t]}}Ep.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},Ep._getOptimalPosition=Kn;const Dp='';class Sp extends op{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Xh;return e.content=Dp,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class Tp{constructor(e){if(this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let o=e.actions[t];"string"==typeof o&&(o=[o]);for(const n of o)e.keystrokeHandler.set(n,((e,o)=>{this[t](),o()}))}}get first(){return this.focusables.find(Bp)||null}get last(){return this.focusables.filter(Bp).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,o)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=o),n})),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,o=this.focusables.length;if(!o)return null;if(null===t)return this[1===e?"first":"last"];let n=(t+o+e)%o;do{const t=this.focusables.get(n);if(Bp(t))return t;n=(n+o+e)%o}while(n!==t);return null}}function Bp(e){return!(!e.focus||!Gn(e.element))}class Ip extends Sh{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Pp extends Sh{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}var Rp=o(5571),zp={attributes:{"data-cke":!0}};zp.setAttributes=Wr(),zp.insert=qr().bind(null,"head"),zp.domAPI=Lr(),zp.insertStyleElement=Ur();Or()(Rp.Z,zp);Rp.Z&&Rp.Z.locals&&Rp.Z.locals;const{threeVerticalDots:Mp}=uh,Np={alignLeft:uh.alignLeft,bold:uh.bold,importExport:uh.importExport,paragraph:uh.paragraph,plus:uh.plus,text:uh.text,threeVerticalDots:uh.threeVerticalDots};class Fp extends Sh{constructor(e,t){super(e);const o=this.bindTemplate,n=this.t;this.options=t||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Ar,this.keystrokes=new Cr,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new Op(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const r="rtl"===e.uiLanguageDirection;this._focusCycler=new Tp({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[r?"arrowright":"arrowleft","arrowup"],focusNext:[r?"arrowleft":"arrowright","arrowdown"]}});const i=["ck","ck-toolbar",o.to("class"),o.if("isCompact","ck-toolbar_compact")];var s;this.options.shouldGroupWhenFull&&this.options.isFloating&&i.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:i,role:"toolbar","aria-label":o.to("ariaLabel"),style:{maxWidth:o.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(s=this,s.bindTemplate.to((e=>{e.target===s.element&&e.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new Lp(this):new Vp(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,o){this.items.addMany(this._buildItemsFromConfig(e,t,o))}_buildItemsFromConfig(e,t,o){const n=function(e){return Array.isArray(e)?{items:e,removeItems:[]}:e?Object.assign({items:[],removeItems:[]},e):{items:[],removeItems:[]}}(e),r=o||n.removeItems;return this._cleanItemsConfiguration(n.items,t,r).map((e=>N(e)?this._createNestedToolbarDropdown(e,t,r):"|"===e?new Ip:"-"===e?new Pp:t.create(e))).filter((e=>!!e))}_cleanItemsConfiguration(e,t,o){const n=e.filter(((e,n,r)=>"|"===e||-1===o.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(b("toolbarview-line-break-ignored-when-grouping-items",r),!1):!(!N(e)&&!t.has(e))||(b("toolbarview-item-unavailable",{item:e}),!1))));return this._cleanSeparatorsAndLineBreaks(n)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,o=e.length,n=e.findIndex(t);if(-1===n)return[];const r=o-e.slice().reverse().findIndex(t);return e.slice(n,r).filter(((e,o,n)=>{if(t(e))return!0;return!(o>0&&n[o-1]===e)}))}_createNestedToolbarDropdown(e,t,o){let{label:n,icon:r,items:i,tooltip:s=!0,withText:a=!1}=e;if(i=this._cleanItemsConfiguration(i,t,o),!i.length)return null;const l=Xp(this.locale);return n||b("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:n,tooltip:s,withText:!!a}),!1!==r?l.buttonView.icon=Np[r]||r||Mp:l.buttonView.withText=!0,eg(l,(()=>l.toolbarView._buildItemsFromConfig(i,t,o))),l}}class Op extends Sh{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Vp{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>e)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Lp{constructor(e){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("change",this._updateFocusCycleableItems.bind(this)),e.children.on("change",this._updateFocusCycleableItems.bind(this)),e.items.on("change",((e,t)=>{const o=t.index,n=Array.from(t.added);for(const e of t.removed)o>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=o;ethis.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!Gn(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,o=new Fn(e.lastChild),n=new Fn(e);if(!this.cachedPadding){const o=In.window.getComputedStyle(e),n="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(o[n])}return"ltr"===t?o.right>n.right-this.cachedPadding:o.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Ip),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,o=Xp(e);return o.class="ck-toolbar__grouped-dropdown",o.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",eg(o,this.groupedItems),o.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:Mp}),o}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}var jp=o(1162),qp={attributes:{"data-cke":!0}};qp.setAttributes=Wr(),qp.insert=qr().bind(null,"head"),qp.domAPI=Lr(),qp.insertStyleElement=Ur();Or()(jp.Z,qp);jp.Z&&jp.Z.locals&&jp.Z.locals;class Hp extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.items=this.createCollection(),this.focusTracker=new Ar,this.keystrokes=new Cr,this._focusCycler=new Tp({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel")},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class Wp extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))],role:"presentation"},children:this.children})}focus(){this.children.first.focus()}}class $p extends Sh{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var Up=o(66),Gp={attributes:{"data-cke":!0}};Gp.setAttributes=Wr(),Gp.insert=qr().bind(null,"head"),Gp.domAPI=Lr(),Gp.insertStyleElement=Ur();Or()(Up.Z,Gp);Up.Z&&Up.Z.locals&&Up.Z.locals;class Kp extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new Cr,this.focusTracker=new Ar,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",t.to("class"),t.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){const e=new op;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){const e=new op,t=e.bindTemplate;return e.icon=Dp,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}var Zp=o(5075),Jp={attributes:{"data-cke":!0}};Jp.setAttributes=Wr(),Jp.insert=qr().bind(null,"head"),Jp.domAPI=Lr(),Jp.insertStyleElement=Ur();Or()(Zp.Z,Jp);Zp.Z&&Zp.Z.locals&&Zp.Z.locals;var Qp=o(6875),Yp={attributes:{"data-cke":!0}};Yp.setAttributes=Wr(),Yp.insert=qr().bind(null,"head"),Yp.domAPI=Lr(),Yp.insertStyleElement=Ur();Or()(Qp.Z,Yp);Qp.Z&&Qp.Z.locals&&Qp.Z.locals;function Xp(e,t=Sp){const o=new t(e),n=new Cp(e),r=new Ep(e,o,n);return o.bind("isEnabled").to(r),o instanceof Kp?o.arrowView.bind("isOn").to(r,"isOpen"):o.bind("isOn").to(r,"isOpen"),function(e){(function(e){e.on("render",(()=>{yh({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})}))})(e),function(e){e.on("execute",(t=>{t.source instanceof ip||(e.isOpen=!1)}))}(e),function(e){e.focusTracker.on("change:isFocused",((t,o,n)=>{e.isOpen&&!n&&(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",((t,o)=>{e.isOpen&&(e.panelView.focus(),o())})),e.keystrokes.set("arrowup",((t,o)=>{e.isOpen&&(e.panelView.focusLast(),o())}))}(e),function(e){e.on("change:isOpen",((t,o,n)=>{if(n)return;const r=e.panelView.element;r&&r.contains(In.document.activeElement)&&e.buttonView.focus()}))}(e),function(e){e.on("change:isOpen",((t,o,n)=>{n&&e.panelView.focus()}),{priority:"low"})}(e)}(r),r}function eg(e,t,o={}){e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?tg(e,t,o):e.once("change:isOpen",(()=>tg(e,t,o)),{priority:"highest"}),o.enableActiveItemFocusOnDropdownOpen&&rg(e,(()=>e.toolbarView.items.find((e=>e.isOn))))}function tg(e,t,o){const n=e.locale,r=n.t,i=e.toolbarView=new Fp(n),s="function"==typeof t?t():t;i.ariaLabel=o.ariaLabel||r("Dropdown toolbar"),o.maxWidth&&(i.maxWidth=o.maxWidth),o.class&&(i.class=o.class),o.isCompact&&(i.isCompact=o.isCompact),o.isVertical&&(i.isVertical=!0),s instanceof xh?i.items.bindTo(s).using((e=>e)):i.items.addMany(s),e.panelView.children.add(i),i.items.delegate("execute").to(e)}function og(e,t,o={}){e.isOpen?ng(e,t,o):e.once("change:isOpen",(()=>ng(e,t,o)),{priority:"highest"}),rg(e,(()=>e.listView.items.find((e=>e instanceof Wp&&e.children.first.isOn))))}function ng(e,t,o){const n=e.locale,r=e.listView=new Hp(n),i="function"==typeof t?t():t;r.ariaLabel=o.ariaLabel,r.role=o.role,r.items.bindTo(i).using((e=>{if("separator"===e.type)return new $p(n);if("button"===e.type||"switchbutton"===e.type){const t=new Wp(n);let o;return o="button"===e.type?new op(n):new ip(n),o.bind(...Object.keys(e.model)).to(e.model),o.delegate("execute").to(t),t.children.add(o),t}return null})),e.panelView.children.add(r),r.items.delegate("execute").to(e)}function rg(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const o=t();o&&("function"==typeof o.focus?o.focus():b("ui-dropdown-focus-child-on-open-child-missing-focus",{view:o}))}),{priority:p.low-10})}function ig(e,t,o){const n=new Ap(e.locale);return n.set({id:t,ariaDescribedById:o}),n.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),n.bind("hasError").to(e,"errorText",(e=>!!e)),n.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(n),n}function sg(e,t,o){const n=Xp(e.locale);return n.set({id:t,ariaDescribedById:o}),n.bind("isEnabled").to(e),n}const ag=(e,t=0,o=1)=>e>o?o:eMath.round(o*e)/o,cg=(Math.PI,e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?lg(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?lg(parseInt(e.substring(6,8),16)/255,2):1})),dg=({h:e,s:t,v:o,a:n})=>{const r=(200-t)*o/100;return{h:lg(e),s:lg(r>0&&r<200?t*o/100/(r<=100?r:200-r)*100:0),l:lg(r/2),a:lg(n,2)}},ug=e=>{const{h:t,s:o,l:n}=dg(e);return`hsl(${t}, ${o}%, ${n}%)`},hg=({h:e,s:t,v:o,a:n})=>{e=e/360*6,t/=100,o/=100;const r=Math.floor(e),i=o*(1-t),s=o*(1-(e-r)*t),a=o*(1-(1-e+r)*t),l=r%6;return{r:lg(255*[o,s,i,i,a,o][l]),g:lg(255*[a,o,o,s,i,i][l]),b:lg(255*[i,i,a,o,o,s][l]),a:lg(n,2)}},pg=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},gg=({r:e,g:t,b:o,a:n})=>{const r=n<1?pg(lg(255*n)):"";return"#"+pg(e)+pg(t)+pg(o)+r},mg=({r:e,g:t,b:o,a:n})=>{const r=Math.max(e,t,o),i=r-Math.min(e,t,o),s=i?r===e?(t-o)/i:r===t?2+(o-e)/i:4+(e-t)/i:0;return{h:lg(60*(s<0?s+6:s)),s:lg(r?i/r*100:0),v:lg(r/255*100),a:n}},fg=(e,t)=>{if(e===t)return!0;for(const o in e)if(e[o]!==t[o])return!1;return!0},bg={},kg=e=>{let t=bg[e];return t||(t=document.createElement("template"),t.innerHTML=e,bg[e]=t),t},wg=(e,t,o)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))};let _g=!1;const yg=e=>"touches"in e,Ag=(e,t)=>{const o=yg(t)?t.touches[0]:t,n=e.el.getBoundingClientRect();wg(e.el,"move",e.getMove({x:ag((o.pageX-(n.left+window.pageXOffset))/n.width),y:ag((o.pageY-(n.top+window.pageYOffset))/n.height)}))};class Cg{constructor(e,t,o,n){const r=kg(`
`);e.appendChild(r.content.cloneNode(!0));const i=e.querySelector(`[part=${t}]`);i.addEventListener("mousedown",this),i.addEventListener("touchstart",this),i.addEventListener("keydown",this),this.el=i,this.xy=n,this.nodes=[i.firstChild,i]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(_g?"touchmove":"mousemove",this),t(_g?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(_g&&!yg(e)||(_g||(_g=yg(e)),0)))(e)||!_g&&0!=e.button)return;this.el.focus(),Ag(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),Ag(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const o=t.keyCode;o>40||e.xy&&o<37||o<33||(t.preventDefault(),wg(e.el,"move",e.getMove({x:39===o?.01:37===o?-.01:34===o?.05:33===o?-.05:35===o?1:36===o?-1:0,y:40===o?.01:38===o?-.01:0},!0)))})(this,e)}}style(e){e.forEach(((e,t)=>{for(const o in e)this.nodes[t].style.setProperty(o,e[o])}))}}class vg extends Cg{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:e/360*100+"%",color:ug({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${lg(e)}`)}getMove(e,t){return{h:t?ag(this.h+360*e.x,0,360):360*e.x}}}class xg extends Cg{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:ug(e)},{"background-color":ug({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${lg(e.s)}%, Brightness ${lg(e.v)}%`)}getMove(e,t){return{s:t?ag(this.hsva.s+100*e.x,0,100):100*e.x,v:t?ag(this.hsva.v-100*e.y,0,100):Math.round(100-100*e.y)}}}const Eg=Symbol("same"),Dg=Symbol("color"),Sg=Symbol("hsva"),Tg=Symbol("update"),Bg=Symbol("parts"),Ig=Symbol("css"),Pg=Symbol("sliders");class Rg extends HTMLElement{static get observedAttributes(){return["color"]}get[Ig](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[Pg](){return[xg,vg]}get color(){return this[Dg]}set color(e){if(!this[Eg](e)){const t=this.colorModel.toHsva(e);this[Tg](t),this[Dg]=e}}constructor(){super();const e=kg(``),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[Bg]=this[Pg].map((e=>new e(t)))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,o){const n=this.colorModel.fromAttr(o);this[Eg](n)||(this.color=n)}handleEvent(e){const t=this[Sg],o={...t,...e.detail};let n;this[Tg](o),fg(o,t)||this[Eg](n=this.colorModel.fromHsva(o))||(this[Dg]=n,wg(this,"color-changed",{value:n}))}[Eg](e){return this.color&&this.colorModel.equal(e,this.color)}[Tg](e){this[Sg]=e,this[Bg].forEach((t=>t.update(e)))}}const zg={defaultColor:"#000",toHsva:e=>mg(cg(e)),fromHsva:({h:e,s:t,v:o})=>gg(hg({h:e,s:t,v:o,a:1})),equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||fg(cg(e),cg(t)),fromAttr:e=>e};class Mg extends Rg{get colorModel(){return zg}}customElements.define("hex-color-picker",class extends Mg{});var Ng=o(2191),Fg={attributes:{"data-cke":!0}};Fg.setAttributes=Wr(),Fg.insert=qr().bind(null,"head"),Fg.domAPI=Lr(),Fg.insertStyleElement=Ur();Or()(Ng.Z,Fg);Ng.Z&&Ng.Z.locals&&Ng.Z.locals;class Og{constructor(e){this._components=new Map,this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(Vg(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new f("componentfactory-item-missing",this,{name:e});return this._components.get(Vg(e)).callback(this.editor.locale)}has(e){return this._components.has(Vg(e))}}function Vg(e){return String(e).toLowerCase()}var Lg=o(8245),jg={attributes:{"data-cke":!0}};jg.setAttributes=Wr(),jg.insert=qr().bind(null,"head"),jg.domAPI=Lr(),jg.insertStyleElement=Ur();Or()(Lg.Z,jg);Lg.Z&&Lg.Z.locals&&Lg.Z.locals;const qg=Hn("px"),Hg=In.document.body;class Wg extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",qg),left:t.to("left",qg)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=Wg.defaultPositions,o=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:Hg,fitInViewport:!0},e),n=Wg._getOptimalPosition(o),r=parseInt(n.left),i=parseInt(n.top),s=n.name,a=n.config||{},{withArrow:l=!0}=a;this.top=i,this.left=r,this.position=s,this.withArrow=l}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=$g(e.target),o=e.limiter?$g(e.limiter):Hg;this.listenTo(In.document,"scroll",((n,r)=>{const i=r.target,s=t&&i.contains(t),a=o&&i.contains(o);!s&&!a&&t&&o||this.attachTo(e)}),{useCapture:!0}),this.listenTo(In.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(In.document,"scroll"),this.stopListening(In.window,"resize")}}function $g(e){return _n(e)?e:zn(e)?e.commonAncestorContainer:"function"==typeof e?$g(e()):null}function Ug(e={}){const{sideOffset:t=Wg.arrowSideOffset,heightOffset:o=Wg.arrowHeightOffset,stickyVerticalOffset:n=Wg.stickyVerticalOffset,config:r}=e;return{northWestArrowSouthWest:(e,o)=>({top:i(e,o),left:e.left-t,name:"arrow_sw",...r&&{config:r}}),northWestArrowSouthMiddleWest:(e,o)=>({top:i(e,o),left:e.left-.25*o.width-t,name:"arrow_smw",...r&&{config:r}}),northWestArrowSouth:(e,t)=>({top:i(e,t),left:e.left-t.width/2,name:"arrow_s",...r&&{config:r}}),northWestArrowSouthMiddleEast:(e,o)=>({top:i(e,o),left:e.left-.75*o.width+t,name:"arrow_sme",...r&&{config:r}}),northWestArrowSouthEast:(e,o)=>({top:i(e,o),left:e.left-o.width+t,name:"arrow_se",...r&&{config:r}}),northArrowSouthWest:(e,o)=>({top:i(e,o),left:e.left+e.width/2-t,name:"arrow_sw",...r&&{config:r}}),northArrowSouthMiddleWest:(e,o)=>({top:i(e,o),left:e.left+e.width/2-.25*o.width-t,name:"arrow_smw",...r&&{config:r}}),northArrowSouth:(e,t)=>({top:i(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...r&&{config:r}}),northArrowSouthMiddleEast:(e,o)=>({top:i(e,o),left:e.left+e.width/2-.75*o.width+t,name:"arrow_sme",...r&&{config:r}}),northArrowSouthEast:(e,o)=>({top:i(e,o),left:e.left+e.width/2-o.width+t,name:"arrow_se",...r&&{config:r}}),northEastArrowSouthWest:(e,o)=>({top:i(e,o),left:e.right-t,name:"arrow_sw",...r&&{config:r}}),northEastArrowSouthMiddleWest:(e,o)=>({top:i(e,o),left:e.right-.25*o.width-t,name:"arrow_smw",...r&&{config:r}}),northEastArrowSouth:(e,t)=>({top:i(e,t),left:e.right-t.width/2,name:"arrow_s",...r&&{config:r}}),northEastArrowSouthMiddleEast:(e,o)=>({top:i(e,o),left:e.right-.75*o.width+t,name:"arrow_sme",...r&&{config:r}}),northEastArrowSouthEast:(e,o)=>({top:i(e,o),left:e.right-o.width+t,name:"arrow_se",...r&&{config:r}}),southWestArrowNorthWest:e=>({top:s(e),left:e.left-t,name:"arrow_nw",...r&&{config:r}}),southWestArrowNorthMiddleWest:(e,o)=>({top:s(e),left:e.left-.25*o.width-t,name:"arrow_nmw",...r&&{config:r}}),southWestArrowNorth:(e,t)=>({top:s(e),left:e.left-t.width/2,name:"arrow_n",...r&&{config:r}}),southWestArrowNorthMiddleEast:(e,o)=>({top:s(e),left:e.left-.75*o.width+t,name:"arrow_nme",...r&&{config:r}}),southWestArrowNorthEast:(e,o)=>({top:s(e),left:e.left-o.width+t,name:"arrow_ne",...r&&{config:r}}),southArrowNorthWest:e=>({top:s(e),left:e.left+e.width/2-t,name:"arrow_nw",...r&&{config:r}}),southArrowNorthMiddleWest:(e,o)=>({top:s(e),left:e.left+e.width/2-.25*o.width-t,name:"arrow_nmw",...r&&{config:r}}),southArrowNorth:(e,t)=>({top:s(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...r&&{config:r}}),southArrowNorthMiddleEast:(e,o)=>({top:s(e),left:e.left+e.width/2-.75*o.width+t,name:"arrow_nme",...r&&{config:r}}),southArrowNorthEast:(e,o)=>({top:s(e),left:e.left+e.width/2-o.width+t,name:"arrow_ne",...r&&{config:r}}),southEastArrowNorthWest:e=>({top:s(e),left:e.right-t,name:"arrow_nw",...r&&{config:r}}),southEastArrowNorthMiddleWest:(e,o)=>({top:s(e),left:e.right-.25*o.width-t,name:"arrow_nmw",...r&&{config:r}}),southEastArrowNorth:(e,t)=>({top:s(e),left:e.right-t.width/2,name:"arrow_n",...r&&{config:r}}),southEastArrowNorthMiddleEast:(e,o)=>({top:s(e),left:e.right-.75*o.width+t,name:"arrow_nme",...r&&{config:r}}),southEastArrowNorthEast:(e,o)=>({top:s(e),left:e.right-o.width+t,name:"arrow_ne",...r&&{config:r}}),westArrowEast:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.left-t.width-o,name:"arrow_e",...r&&{config:r}}),eastArrowWest:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.right+o,name:"arrow_w",...r&&{config:r}}),viewportStickyNorth:(e,t,o)=>e.getIntersection(o)?{top:o.top+n,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...r}}:null};function i(e,t){return e.top-t.height-o}function s(e){return e.bottom+o}}Wg.arrowSideOffset=25,Wg.arrowHeightOffset=10,Wg.stickyVerticalOffset=20,Wg._getOptimalPosition=Kn,Wg.defaultPositions=Ug();var Gg=o(9948),Kg={attributes:{"data-cke":!0}};Kg.setAttributes=Wr(),Kg.insert=qr().bind(null,"head"),Kg.domAPI=Lr(),Kg.insertStyleElement=Ur();Or()(Gg.Z,Kg);Gg.Z&&Gg.Z.locals&&Gg.Z.locals;const Zg="ck-tooltip";class Jg extends(Dn()){constructor(e){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver=null,Jg._editors.add(e),Jg._instance)return Jg._instance;Jg._instance=this,this.tooltipTextView=new Sh(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new Wg(e.locale),this.balloonPanelView.class=Zg,this.balloonPanelView.content.add(this.tooltipTextView),this._pinTooltipDebounced=La(this._pinTooltip,600),this.listenTo(In.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(In.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(In.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(In.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(In.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;Jg._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),Jg._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Jg._instance=null)}static getPositioningFunctions(e){const t=Jg.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onEnterOrFocus(e,{target:t}){const o=Qg(t);var n;o&&(o!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(o,{text:(n=o).dataset.ckeTooltipText,position:n.dataset.ckeTooltipPosition||"s",cssClass:n.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(e,{target:t,relatedTarget:o}){if("mouseleave"===e.name){if(!_n(t))return;if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const e=Qg(t),n=Qg(o);e&&e!==n&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:o,cssClass:n}){const r=yr(Jg._editors.values()).ui.view.body;r.has(this.balloonPanelView)||r.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.pin({target:e,positions:Jg.getPositioningFunctions(o)}),this._resizeObserver=new jn(e,(()=>{Gn(e)||this._unpinTooltip()})),this.balloonPanelView.class=[Zg,n].filter((e=>e)).join(" ");for(const e of Jg._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=o}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of Jg._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver&&this._resizeObserver.destroy()}_updateTooltipPosition(){Gn(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Jg.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}}function Qg(e){return _n(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}Jg.defaultBalloonPositions=Ug({heightOffset:5,sideOffset:13}),Jg._editors=new Set,Jg._instance=null;const Yg=50,Xg=350,em="Powered by",tm={top:-99999,left:-99999,name:"invalid",config:{withArrow:!1}};class om extends(Dn()){constructor(e){super(),this.editor=e,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=fh(this._showBalloon.bind(this),50,{leading:!0}),e.on("ready",this._handleEditorReady.bind(this))}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;"VALID"!==function(e){function t(e){return e.match(/^[a-zA-Z0-9+/=$]+$/g)&&e.length>=40&&e.length<=255?"VALID":"INVALID"}let o="",n="";if(!e)return"INVALID";try{o=atob(e)}catch(e){return"INVALID"}const r=o.split("-"),i=r[0],s=r[1];if(!s)return t(e);try{atob(s)}catch(o){try{if(atob(i),!atob(i).length)return t(e)}catch(o){return t(e)}}if(i.length<40||i.length>255)return"INVALID";try{atob(i)}catch(e){return"INVALID"}try{n=atob(s)}catch(e){return"INVALID"}if(8!==n.length)return"INVALID";const a=Number(n.substring(0,4)),l=Number(n.substring(4,6))-1,c=Number(n.substring(6,8)),d=new Date(a,l,c);return d{this._updateLastFocusedEditableElement(),o?this._showBalloon():this._hideBalloon()})),e.ui.focusTracker.on("change:focusedElement",((e,t,o)=>{this._updateLastFocusedEditableElement(),o&&this._showBalloon()})),e.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const e=this.editor,t=this._balloonView=new Wg,o=im(e),n=new nm(e.locale,o.label);t.content.add(n),t.set({class:"ck-powered-by-balloon"}),e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this._balloonView=t}_showBalloon(){if(!this._lastFocusedEditableElement)return;const e=function(e,t){const o=im(e),n="right"===o.side?function(e,t){return rm(e,t,((e,o)=>e.left+e.width-o.width-t.horizontalOffset))}(t,o):function(e,t){return rm(e,t,(e=>e.left+t.horizontalOffset))}(t,o);return{target:t,positions:[n]}}(this.editor,this._lastFocusedEditableElement);e&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,o=e.ui.focusTracker.focusedElement;if(!t||!o)return void(this._lastFocusedEditableElement=null);const n=Array.from(e.ui.getEditableElementsNames()).map((t=>e.ui.getEditableElement(t)));n.includes(o)?this._lastFocusedEditableElement=o:this._lastFocusedEditableElement=n[0]}}class nm extends Sh{constructor(e,t){super(e);const o=new Xh,n=this.bindTemplate;o.set({content:'\n',isColorInherited:!1}),o.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],o],on:{dragstart:n.to((e=>e.preventDefault()))}}]})}}function rm(e,t,o){return(n,r)=>{const i=n.getVisible();if(!i)return tm;if(n.widthe.bottom)return tm}}return{top:s,left:a,name:`position_${t.position}-side_${t.side}`,config:{withArrow:!1}}}}function im(e){const t=e.config.get("ui.poweredBy"),o=t&&t.position||"border";return{position:o,label:em,verticalOffset:"inside"===o?5:0,horizontalOffset:5,side:"ltr"===e.locale.contentLanguageDirection?"right":"left",...t}}class sm extends(H()){constructor(e){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this.editor=e,this.componentFactory=new Og(e),this.focusTracker=new Ar,this.tooltipManager=new Jg(e),this.poweredBy=new om(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(e.editing.view.document,"layoutChanged",(()=>this.update())),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const o=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?o():this.once("ready",o)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const o=e.config.get("toolbar.viewportTopOffset");return o?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:o}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let o,n;e.keystrokes.set("Alt+F10",((e,r)=>{const i=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(i)&&!Array.from(t.domRoots.values()).includes(i)&&(o=i);const s=this._getCurrentFocusedToolbarDefinition();s&&n||(n=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e{const r=this._getCurrentFocusedToolbarDefinition();r&&(o?(o.focus(),o=null):e.editing.view.focus(),r.options.afterBlur&&r.options.afterBlur(),n())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:o,options:n}=t;(Gn(o.element)||n.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>am(e)-am(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:o}}=e;return o&&o(),!!Gn(t.element)&&(t.focus(),!0)}}function am(e){const{toolbarView:t,options:o}=e;let n=10;return Gn(t.element)&&n--,o.isContextual&&n--,n}var lm=o(4547),cm={attributes:{"data-cke":!0}};cm.setAttributes=Wr(),cm.insert=qr().bind(null,"head"),cm.domAPI=Lr(),cm.insertStyleElement=Ur();Or()(lm.Z,cm);lm.Z&&lm.Z.locals&&lm.Z.locals;class dm extends Sh{constructor(e){super(e),this.body=new Jh(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class um extends Sh{constructor(e,t,o){super(e),this.name=null,this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=o,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((o=>{const n=e.document.getRoot(t.name);o.addClass(t.isFocused?"ck-focused":"ck-blurred",n),o.removeClass(t.isFocused?"ck-blurred":"ck-focused",n)}))}e.isRenderingInProgress?function o(n){e.once("change:isRenderingInProgress",((e,r,i)=>{i?o(n):t(n)}))}(this):t(this)}}class hm extends um{constructor(e,t,o,n={}){super(e,t,o);const r=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=n.label||(()=>r("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const o=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),o)}))}}var pm=o(5523),gm={attributes:{"data-cke":!0}};gm.setAttributes=Wr(),gm.insert=qr().bind(null,"head"),gm.domAPI=Lr(),gm.insertStyleElement=Ur();Or()(pm.Z,gm);pm.Z&&pm.Z.locals&&pm.Z.locals;class mm extends Sh{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",o.to("class")]},children:this.children});const n=new Sh(e);n.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"]},children:[{text:o.to("label")}]}),this.children.add(n)}}class fm extends Nr{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class bm extends(H()){constructor(e,t){super(),t&&va(this,t),e&&this.set(e)}}var km=o(1757),wm={attributes:{"data-cke":!0}};wm.setAttributes=Wr(),wm.insert=qr().bind(null,"head"),wm.domAPI=Lr(),wm.insertStyleElement=Ur();Or()(km.Z,wm);km.Z&&km.Z.locals&&km.Z.locals;var _m=o(3553),ym={attributes:{"data-cke":!0}};ym.setAttributes=Wr(),ym.insert=qr().bind(null,"head"),ym.domAPI=Lr(),ym.insertStyleElement=Ur();Or()(_m.Z,ym);_m.Z&&_m.Z.locals&&_m.Z.locals;const Am=Hn("px");class Cm extends Br{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new f("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const o=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),o.set(e.view,e),this._viewToStack.set(e.view,o),o===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new f("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new f("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new Wg(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new vm(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,o)=>{if(o<2)return"";const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[n,o])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new xm(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:o=!0,singleViewMode:n=!1}){this.view.class=t,this.view.withArrow=o,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),n&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class vm extends Sh{constructor(e){super(e);const t=e.t,o=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Ar,this.buttonPrevView=this._createButtonView(t("Previous"),''),this.buttonNextView=this._createButtonView(t("Next"),''),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",o.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:o.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const o=new op(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o}}class xm extends Sh{constructor(e,t){super(e);const o=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",o.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:o.to("top",Am),left:o.to("left",Am),width:o.to("width",Am),height:o.to("height",Am)}},children:this.content}),this.on("change:numberOfPanels",((e,t,o,n)=>{o>n?this._addPanels(o-n):this._removePanels(n-o),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new Sh;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:o,height:n}=new Fn(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:o,height:n})}}}var Em=o(3609),Dm={attributes:{"data-cke":!0}};Dm.setAttributes=Wr(),Dm.insert=qr().bind(null,"head"),Dm.domAPI=Lr(),Dm.insertStyleElement=Ur();Or()(Em.Z,Dm);Em.Z&&Em.Z.locals&&Em.Z.locals,Hn("px");Hn("px");var Sm=o(6706),Tm={attributes:{"data-cke":!0}};Tm.setAttributes=Wr(),Tm.insert=qr().bind(null,"head"),Tm.domAPI=Lr(),Tm.insertStyleElement=Ur();Or()(Sm.Z,Tm);Sm.Z&&Sm.Z.locals&&Sm.Z.locals,Hn("px");Hn("px");const{pilcrow:Bm}=uh;class Im extends sm{constructor(e,t){super(e),this.view=t}init(){const e=this.editor,t=this.view,o=e.editing.view,n=t.editable,r=o.document.getRoot();n.name=r.rootName,t.render();const i=n.element;this.setEditableElement(n.name,i),t.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(i),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){super.destroy();const e=this.view;this.editor.editing.view.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.editor,t=this.view;t.toolbar.fillFromConfig(e.config.get("toolbar"),this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,o=t.document.getRoot(),n=(e.sourceElement,e.config.get("placeholder"));if(n){const e="string"==typeof n?n:n[o.rootName];e&&Jr({view:t,element:o,text:e,isDirectHost:!1,keepOnFocus:!0})}}}class Pm extends dm{constructor(e,t,o={}){super(e);const n=e.t;this.toolbar=new Fp(e,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),this.editable=new hm(e,t,o.editableElement,{label:e=>n("Rich Text Editor. Editing area: %0",e.name)}),this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}})}render(){super.render(),this.registerChild([this.toolbar,this.editable])}}class Rm extends(lh(ch(ah))){constructor(e,t={}){if(!zm(e)&&void 0!==t.initialData)throw new f("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return zm(e)?(t=e,t instanceof HTMLTextAreaElement?t.value:t.innerHTML):e;var t}(e)),zm(e)&&(this.sourceElement=e,function(e,t){if(t.ckeditorInstance)throw new f("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}(this,e)),this.model.document.createRoot();const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new Pm(this.locale,this.editing.view,{editableElement:this.sourceElement,shouldToolbarGroupWhenFull:o});this.ui=new Im(this,n)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(e)}))}static create(e,t={}){return new Promise((o=>{if(zm(e)&&"TEXTAREA"===e.tagName)throw new f("editor-wrong-element",null);const n=new this(e,t);o(n.initPlugins().then((()=>n.ui.init())).then((()=>n.data.init(n.config.get("initialData")))).then((()=>n.fire("ready"))).then((()=>n)))}))}}function zm(e){return _n(e)}Rm.Context=Mr,Rm.EditorWatchdog=bh,Rm.ContextWatchdog=class extends hh{constructor(e,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new wh,this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(kh,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=_h(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new bh(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((o,{error:n,causesRestart:r})=>{this._fire("itemError",{itemId:e.id,error:n}),r&&this._actionQueues.enqueue(e.id,(()=>new Promise((o=>{const n=()=>{t.off("restart",n),this._fire("itemRestart",{itemId:e.id}),o()};t.on("restart",n)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=_h(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(kh,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(kh,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=ph(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return mh(this._context,e.context)}};class Mm extends(S()){constructor(){super(...arguments),this._stack=[]}add(e,t){const o=this._stack,n=o[0];this._insertDescriptor(e);const r=o[0];n===r||Nm(n,r)||this.fire("change:top",{oldDescriptor:n,newDescriptor:r,writer:t})}remove(e,t){const o=this._stack,n=o[0];this._removeDescriptor(e);const r=o[0];n===r||Nm(n,r)||this.fire("change:top",{oldDescriptor:n,newDescriptor:r,writer:t})}_insertDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e.id));if(Nm(e,t[o]))return;o>-1&&t.splice(o,1);let n=0;for(;t[n]&&Fm(t[n],e);)n++;t.splice(n,0,e)}_removeDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e));o>-1&&t.splice(o,1)}}function Nm(e,t){return e&&t&&e.priority==t.priority&&Om(e.classes)==Om(t.classes)}function Fm(e,t){return e.priority>t.priority||!(e.priorityOm(t.classes)}function Om(e){return Array.isArray(e)?e.sort().join(","):e}const Vm="widget-type-around";function Lm(e,t,o){return!!e&&$m(e)&&!o.isInline(t)}function jm(e){return e.getAttribute(Vm)}const qm='',Hm="ck-widget",Wm="ck-widget_selected";function $m(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function Um(e,t,o={}){if(!e.is("containerElement"))throw new f("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(Hm,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=Qm,t.setCustomProperty("widgetLabel",[],e),o.label&&function(e,t){const o=e.getCustomProperty("widgetLabel");o.push(t)}(e,o.label),o.hasSelectionHandle&&function(e,t){const o=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),o=new Xh;return o.set("content",qm),o.render(),t.appendChild(o.element),t}));t.insert(t.createPositionAt(e,0),o),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),Zm(e,t),e}function Gm(e,t,o){if(t.classes&&o.addClass(mr(t.classes),e),t.attributes)for(const n in t.attributes)o.setAttribute(n,t.attributes[n],e)}function Km(e,t,o){if(t.classes&&o.removeClass(mr(t.classes),e),t.attributes)for(const n in t.attributes)o.removeAttribute(n,e)}function Zm(e,t,o=Gm,n=Km){const r=new Mm;r.on("change:top",((t,r)=>{r.oldDescriptor&&n(e,r.oldDescriptor,r.writer),r.newDescriptor&&o(e,r.newDescriptor,r.writer)}));t.setCustomProperty("addHighlight",((e,t,o)=>r.add(t,o)),e),t.setCustomProperty("removeHighlight",((e,t,o)=>r.remove(t,o)),e)}function Jm(e,t,o={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),o.label&&t.setAttribute("aria-label",o.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((o,n,r)=>{t.setAttribute("contenteditable",r?"false":"true",e)})),e.on("change:isFocused",((o,n,r)=>{r?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),Zm(e,t),e}function Qm(){return null}class Ym extends Br{static get pluginName(){return"OPMacroToc"}static get buttonName(){return"insertToc"}init(){const e=this.editor,t=e.model,o=e.conversion;t.schema.register("op-macro-toc",{allowWhere:"$block",isBlock:!0,isLimit:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"toc"},model:"op-macro-toc"}),o.for("editingDowncast").elementToElement({model:"op-macro-toc",view:(e,{writer:t})=>Um(this.createTocViewElement(t),t,{label:this.label})}),o.for("dataDowncast").elementToElement({model:"op-macro-toc",view:(e,{writer:t})=>this.createTocDataElement(t)}),e.ui.componentFactory.add(Ym.buttonName,(t=>{const o=new op(t);return o.set({label:this.label,withText:!0}),o.on("execute",(()=>{e.model.change((t=>{const o=t.createElement("op-macro-toc",{});e.model.insertContent(o,e.model.document.selection)}))})),o}))}get label(){return window.I18n.t("js.editor.macro.toc")}createTocViewElement(e){const t=e.createText(this.label),o=e.createContainerElement("div");return e.insert(e.createPositionAt(o,0),t),o}createTocDataElement(e){return e.createContainerElement("macro",{class:"toc"})}}const Xm=Symbol("isOPEmbeddedTable");function ef(e){const t=e.getSelectedElement();return!(!t||!function(e){return!!e.getCustomProperty(Xm)&&$m(e)}(t))}function tf(e){return _.get(e.config,"_config.openProject.context.resource")}function of(e){return _.get(e.config,"_config.openProject.pluginContext")}function nf(e,t){return of(e).services[t]}function rf(e){return nf(e,"pathHelperService")}class sf extends Br{static get pluginName(){return"EmbeddedTableEditing"}static get buttonName(){return"insertEmbeddedTable"}init(){const e=this.editor,t=e.model,o=e.conversion,n=of(e);this.text={button:window.I18n.t("js.editor.macro.embedded_table.button"),macro_text:window.I18n.t("js.editor.macro.embedded_table.text")},t.schema.register("op-macro-embedded-table",{allowWhere:"$block",allowAttributes:["opEmbeddedTableQuery"],isBlock:!0,isObject:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"embedded-table"},model:(e,{writer:t})=>{const o=e.getAttribute("data-query-props");return t.createElement("op-macro-embedded-table",{opEmbeddedTableQuery:o?JSON.parse(o):{}})}}),o.for("editingDowncast").elementToElement({model:"op-macro-embedded-table",view:(e,{writer:t})=>{return o=this.createEmbeddedTableView(t),n=t,this.label,n.setCustomProperty(Xm,!0,o),Um(o,n,{label:"your label here"});var o,n}}),o.for("dataDowncast").elementToElement({model:"op-macro-embedded-table",view:(e,{writer:t})=>this.createEmbeddedTableDataElement(e,t)}),e.ui.componentFactory.add(sf.buttonName,(t=>{const o=new op(t);return o.set({label:this.text.button,withText:!0}),o.on("execute",(()=>n.runInZone((()=>{n.services.externalQueryConfiguration.show({currentQuery:{},callback:t=>e.model.change((o=>{const n=o.createElement("op-macro-embedded-table",{opEmbeddedTableQuery:t});e.model.insertContent(n,e.model.document.selection)}))})})))),o}))}createEmbeddedTableView(e){const t=e.createText(this.text.macro_text),o=e.createContainerElement("div");return e.insert(e.createPositionAt(o,0),t),o}createEmbeddedTableDataElement(e,t){const o=e.getAttribute("opEmbeddedTableQuery")||{};return t.createContainerElement("macro",{class:"embedded-table","data-query-props":JSON.stringify(o)})}}class af{constructor(e,t=20){this._batch=null,this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}class lf extends Pr{constructor(e,t){super(e),this._buffer=new af(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,o=t.document,n=e.text||"",r=n.length;let i=o.selection;if(e.selection?i=e.selection:e.range&&(i=t.createSelection(e.range)),!t.canEditAt(i))return;const s=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock(),t.deleteContent(i),n&&t.insertContent(e.createText(n,o.selection.getAttributes()),i),s?e.setSelection(s):i.is("documentSelection")||e.setSelection(i),this._buffer.unlock(),this._buffer.input(r)}))}}const cf=["insertText","insertReplacementText"];class df extends Aa{constructor(e){super(e),n.isAndroid&&cf.push("insertCompositionText");const t=e.document;t.on("beforeinput",((o,n)=>{if(!this.isEnabled)return;const{data:r,targetRanges:i,inputType:s,domEvent:a}=n;if(!cf.includes(s))return;const l=new d(t,"insertText");t.fire(l,new xa(e,a,{text:r,selection:e.createSelection(i)})),l.stop.called&&o.stop()})),t.on("compositionend",((o,{data:r,domEvent:i})=>{this.isEnabled&&!n.isAndroid&&r&&t.fire("insertText",new xa(e,i,{text:r,selection:t.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class uf extends Br{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,o=e.editing.view,r=t.document.selection;o.addObserver(df);const i=new lf(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",i),e.commands.add("input",i),this.listenTo(o.document,"insertText",((r,i)=>{o.document.isComposing||i.preventDefault();const{text:s,selection:a,resultRange:l}=i,c=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));let d=s;if(n.isAndroid){const e=Array.from(c[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");e&&(e.length<=d.length?d.startsWith(e)&&(d=d.substring(e.length),c[0].start=c[0].start.getShiftedBy(e.length)):e.startsWith(d)&&(c[0].start=c[0].start.getShiftedBy(d.length),d=""))}const u={text:d,selection:t.createSelection(c)};l&&(u.resultRange=e.editing.mapper.toModelRange(l)),e.execute("insertText",u)})),n.isAndroid?this.listenTo(o.document,"keydown",((e,n)=>{!r.isCollapsed&&229==n.keyCode&&o.document.isComposing&&hf(t,i)})):this.listenTo(o.document,"compositionstart",(()=>{r.isCollapsed||hf(t,i)}))}}function hf(e,t){if(!t.isEnabled)return;const o=t.buffer;o.lock(),e.enqueueChange(o.batch,(()=>{e.deleteContent(e.document.selection)})),o.unlock()}class pf extends Pr{constructor(e,t){super(e),this.direction=t,this._buffer=new af(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,o=t.document;t.enqueueChange(this._buffer.batch,(n=>{this._buffer.lock();const r=n.createSelection(e.selection||o.selection);if(!t.canEditAt(r))return;const i=e.sequence||1,s=r.isCollapsed;if(r.isCollapsed&&t.modifySelection(r,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(i))return void this._replaceEntireContentWithParagraph(n);if(this._shouldReplaceFirstBlockWithParagraph(r,i))return void this.editor.execute("paragraph",{selection:r});if(r.isCollapsed)return;let a=0;r.getFirstRange().getMinimalFlatRanges().forEach((e=>{a+=Z(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(r,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),n.setSelection(r),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,o=t.document.selection,n=t.schema.getLimitElement(o);if(!(o.isCollapsed&&o.containsEntireContent(n)))return!1;if(!t.schema.checkChild(n,"paragraph"))return!1;const r=n.getChild(0);return!r||!r.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,o=t.document.selection,n=t.schema.getLimitElement(o),r=e.createElement("paragraph");e.remove(e.createRangeIn(n)),e.insert(r,n),e.setSelection(r,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const o=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const n=e.getFirstPosition(),r=o.schema.getLimitElement(n),i=r.getChild(0);return n.parent==i&&(!!e.containsEntireContent(i)&&(!!o.schema.checkChild(r,"paragraph")&&"paragraph"!=i.name))}}const gf="word",mf="selection",ff="backward",bf="forward",kf={deleteContent:{unit:mf,direction:ff},deleteContentBackward:{unit:"codePoint",direction:ff},deleteWordBackward:{unit:gf,direction:ff},deleteHardLineBackward:{unit:mf,direction:ff},deleteSoftLineBackward:{unit:mf,direction:ff},deleteContentForward:{unit:"character",direction:bf},deleteWordForward:{unit:gf,direction:bf},deleteHardLineForward:{unit:mf,direction:bf},deleteSoftLineForward:{unit:mf,direction:bf}};class wf extends Aa{constructor(e){super(e);const t=e.document;let o=0;t.on("keydown",(()=>{o++})),t.on("keyup",(()=>{o=0})),t.on("beforeinput",((r,i)=>{if(!this.isEnabled)return;const{targetRanges:s,domEvent:a,inputType:l}=i,c=kf[l];if(!c)return;const d={direction:c.direction,unit:c.unit,sequence:o};d.unit==mf&&(d.selectionToRemove=e.createSelection(s[0])),"deleteContentBackward"===l&&(n.isAndroid&&(d.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let o=0;for(const{nextPosition:e}of t){if(e.parent.is("$text")){const t=e.parent.data,n=e.offset;if(Er(t,n)||Dr(t,n)||Tr(t,n))continue;o++}else o++;if(o>1)return!0}return!1}(s)&&(d.unit=mf,d.selectionToRemove=e.createSelection(s)));const u=new _s(t,"delete",s[0]);t.fire(u,new xa(e,a,d)),u.stop.called&&r.stop()})),n.isBlink&&function(e){const t=e.view,o=t.document;let n=null,r=!1;function i(e){return e==cr.backspace||e==cr.delete}function s(e){return e==cr.backspace?ff:bf}o.on("keydown",((e,{keyCode:t})=>{n=t,r=!1})),o.on("keyup",((a,{keyCode:l,domEvent:c})=>{const d=o.selection,u=e.isEnabled&&l==n&&i(l)&&!d.isCollapsed&&!r;if(n=null,u){const e=d.getFirstRange(),n=new _s(o,"delete",e),r={unit:mf,direction:s(l),selectionToRemove:d};o.fire(n,new xa(t,c,r))}})),o.on("beforeinput",((e,{inputType:t})=>{const o=kf[t];i(n)&&o&&o.direction==s(n)&&(r=!0)}),{priority:"high"}),o.on("beforeinput",((e,{inputType:t,data:o})=>{n==cr.delete&&"insertText"==t&&""==o&&e.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class _f extends Br{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,o=t.document,n=e.model.document;t.addObserver(wf),this._undoOnBackspace=!1;const r=new pf(e,"forward");e.commands.add("deleteForward",r),e.commands.add("forwardDelete",r),e.commands.add("delete",new pf(e,"backward")),this.listenTo(o,"delete",((n,r)=>{o.isComposing||r.preventDefault();const{direction:i,sequence:s,selectionToRemove:a,unit:l}=r,c="forward"===i?"deleteForward":"delete",d={sequence:s};if("selection"==l){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=l;e.execute(c,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(o,"delete",((t,o)=>{this._undoOnBackspace&&"backward"==o.direction&&1==o.sequence&&"codePoint"==o.unit&&(this._undoOnBackspace=!1,e.execute("undo"),o.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(n,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class yf extends Br{static get requires(){return[uf,_f]}static get pluginName(){return"Typing"}}function Af(e,t){let o=e.start;return{text:Array.from(e.getItems()).reduce(((e,n)=>n.is("$text")||n.is("$textProxy")?e+n.data:(o=t.createPositionAfter(n),"")),""),range:t.createRange(o,e.end)}}class Cf extends(H()){constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:o})=>{o&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const o=this.model,n=o.document.selection,r=o.createRange(o.createPositionAt(n.focus.parent,0),n.focus),{text:i,range:s}=Af(r,o),a=this.testCallback(i);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const o=Object.assign(t,{text:i,range:s});"object"==typeof a&&Object.assign(o,a),this.fire(`matched:${e}`,o)}}}class vf extends Br{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,o=e.editing.view,n=e.locale,r=t.document.selection;this.listenTo(o.document,"arrowKey",((e,t)=>{if(!r.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const o=t.keyCode==cr.arrowright,i=t.keyCode==cr.arrowleft;if(!o&&!i)return;const s=n.contentLanguageDirection;let a=!1;a="ltr"===s&&o||"rtl"===s&&i?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()}),{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(r,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&Sf(r.getFirstPosition(),this.attributes)||this._restoreGravity())}))}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,o=this.editor.model.document.selection,n=o.getFirstPosition();return!this._isGravityOverridden&&((!n.isAtStart||!xf(o,t))&&(!!Sf(n,t)&&(Df(e),this._overrideGravity(),!0)))}_handleBackwardMovement(e){const t=this.attributes,o=this.editor.model,n=o.document.selection,r=n.getFirstPosition();return this._isGravityOverridden?(Df(e),this._restoreGravity(),Ef(o,t,r),!0):r.isAtStart?!!xf(n,t)&&(Df(e),Ef(o,t,r),!0):!!function(e,t){const o=e.getShiftedBy(-1);return Sf(o,t)}(r,t)&&(r.isAtEnd&&!xf(n,t)&&Sf(r,t)?(Df(e),Ef(o,t,r),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function xf(e,t){for(const o of t)if(e.hasAttribute(o))return!0;return!1}function Ef(e,t,o){const n=o.nodeBefore;e.change((e=>{n?e.setSelectionAttribute(n.getAttributes()):e.removeSelectionAttribute(t)}))}function Df(e){e.preventDefault()}function Sf(e,t){const{nodeBefore:o,nodeAfter:n}=e;for(const e of t){const t=o?o.getAttribute(e):void 0;if((n?n.getAttribute(e):void 0)!==t)return!0}return!1}Tf('"'),Tf("'"),Tf("'"),Tf('"'),Tf('"'),Tf("'");function Tf(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function Bf(e,t,o,n){return n.createRange(If(e,t,o,!0,n),If(e,t,o,!1,n))}function If(e,t,o,n,r){let i=e.textNode||(n?e.nodeBefore:e.nodeAfter),s=null;for(;i&&i.getAttribute(t)==o;)s=i,i=n?i.previousSibling:i.nextSibling;return s?r.createPositionAt(s,n?"before":"after"):e}function Pf(e,t,o,n){const r=e.editing.view,i=new Set;r.document.registerPostFixer((r=>{const s=e.model.document.selection;let a=!1;if(s.hasAttribute(t)){const l=Bf(s.getFirstPosition(),t,s.getAttribute(t),e.model),c=e.editing.mapper.toViewRange(l);for(const e of c.getItems())e.is("element",o)&&!e.hasClass(n)&&(r.addClass(n,e),i.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){r.change((e=>{for(const t of i.values())e.removeClass(n,t),i.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}function*Rf(e,t){for(const o of t)o&&e.getAttributeProperties(o[0]).copyOnEnter&&(yield o)}class zf extends Pr{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,o=t.document.selection,n=t.schema,r=o.isCollapsed,i=o.getFirstRange(),s=i.start.parent,a=i.end.parent;if(n.isLimit(s)||n.isLimit(a))return r||s!=a||t.deleteContent(o),!1;if(r){const t=Rf(e.model.schema,o.getAttributes());return Mf(e,i.start),e.setSelectionAttribute(t),!0}{const n=!(i.start.isAtStart&&i.end.isAtEnd),r=s==a;if(t.deleteContent(o,{leaveUnmerged:n}),n){if(r)return Mf(e,o.focus),!0;e.setSelection(a,0)}}return!1}}function Mf(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}const Nf={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class Ff extends Aa{constructor(e){super(e);const t=this.document;let o=!1;t.on("keydown",((e,t)=>{o=t.shiftKey})),t.on("beforeinput",((r,i)=>{if(!this.isEnabled)return;let s=i.inputType;n.isSafari&&o&&"insertParagraph"==s&&(s="insertLineBreak");const a=i.domEvent,l=Nf[s];if(!l)return;const c=new _s(t,"enter",i.targetRanges[0]);t.fire(c,new xa(e,a,{isSoft:l.isSoft})),c.stop.called&&r.stop()}))}observe(){}stopObserving(){}}class Of extends Br{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,o=t.document;t.addObserver(Ff),e.commands.add("enter",new zf(e)),this.listenTo(o,"enter",((n,r)=>{o.isComposing||r.preventDefault(),r.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}class Vf extends Pr{execute(){const e=this.editor.model,t=e.document;e.change((o=>{!function(e,t,o){const n=o.isCollapsed,r=o.getFirstRange(),i=r.start.parent,s=r.end.parent,a=i==s;if(n){const n=Rf(e.schema,o.getAttributes());Lf(e,t,r.end),t.removeSelectionAttribute(o.getAttributeKeys()),t.setSelectionAttribute(n)}else{const n=!(r.start.isAtStart&&r.end.isAtEnd);e.deleteContent(o,{leaveUnmerged:n}),a?Lf(e,t,o.focus):n&&t.setSelection(s,0)}}(e,o,t.selection),this.fire("afterExecute",{writer:o})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const o=t.anchor;if(!o||!e.checkChild(o,"softBreak"))return!1;const n=t.getFirstRange(),r=n.start.parent,i=n.end.parent;if((jf(r,e)||jf(i,e))&&r!==i)return!1;return!0}(e.schema,t.selection)}}function Lf(e,t,o){const n=t.createElement("softBreak");e.insertContent(n,o),t.setSelection(n,"after")}function jf(e,t){return!e.is("rootElement")&&(t.isLimit(e)||jf(e.parent,t))}class qf extends Br{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,o=e.conversion,n=e.editing.view,r=n.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),o.for("upcast").elementToElement({model:"softBreak",view:"br"}),o.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),n.addObserver(Ff),e.commands.add("shiftEnter",new Vf(e)),this.listenTo(r,"enter",((t,o)=>{r.isComposing||o.preventDefault(),o.isSoft&&(e.execute("shiftEnter"),n.scrollToTheSelection())}),{priority:"low"})}}var Hf=o(5137),Wf={attributes:{"data-cke":!0}};Wf.setAttributes=Wr(),Wf.insert=qr().bind(null,"head"),Wf.domAPI=Lr(),Wf.insertStyleElement=Ur();Or()(Hf.Z,Wf);Hf.Z&&Hf.Z.locals&&Hf.Z.locals;const $f=["before","after"],Uf=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,Gf="ck-widget__type-around_disabled";class Kf extends Br{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[Of,_f]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((o,n,r)=>{t.change((e=>{for(const o of t.document.roots)r?e.removeClass(Gf,o):e.addClass(Gf,o)})),r||e.model.change((e=>{e.removeSelectionAttribute(Vm)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const o=this.editor,n=o.editing.view,r=o.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);o.execute("insertParagraph",{position:o.model.createPositionAt(e,t),attributes:r}),n.focus(),n.scrollToTheSelection()}_listenToIfEnabled(e,t,o,n){this.listenTo(e,t,((...e)=>{this.isEnabled&&o(...e)}),n)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=jm(e);if(!t)return!1;const o=e.getSelectedElement();return this._insertParagraph(o,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,o=e.locale.t,n={before:o("Insert paragraph before block"),after:o("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,r,i)=>{const s=i.mapper.toViewElement(r.item);if(s&&Lm(s,r.item,t)){!function(e,t,o){const n=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const o=this.toDomElement(e);return function(e,t){for(const o of $f){const n=new Th({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${o}`],title:t[o],"aria-hidden":"true"},children:[e.ownerDocument.importNode(Uf,!0)]});e.appendChild(n.render())}}(o,t),function(e){const t=new Th({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(o),o}));e.insert(e.createPositionAt(o,"end"),n)}(i.writer,n,s);s.getCustomProperty("widgetLabel").push((()=>this.isEnabled?o("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,o=t.document.selection,n=t.schema,r=e.editing.view;function i(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(r.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[$m,"$text"],priority:"high"}),this._listenToIfEnabled(o,"change:range",((t,o)=>{o.directChange&&e.model.change((e=>{e.removeSelectionAttribute(Vm)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=o.getSelectedElement();if(t){if(Lm(e.editing.mapper.toViewElement(t),t,n))return}e.model.change((e=>{e.removeSelectionAttribute(Vm)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,o)=>{const r=o.writer;if(this._currentFakeCaretModelElement){const e=o.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(r.removeClass($f.map(i),e),this._currentFakeCaretModelElement=null)}const s=t.selection.getSelectedElement();if(!s)return;const a=o.mapper.toViewElement(s);if(!Lm(a,s,n))return;const l=jm(t.selection);l&&(r.addClass(i(l),a),this._currentFakeCaretModelElement=s)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,o,n)=>{n||e.model.change((e=>{e.removeSelectionAttribute(Vm)}))}))}_handleArrowKeyPress(e,t){const o=this.editor,n=o.model,r=n.document.selection,i=n.schema,s=o.editing.view,a=function(e,t){const o=gr(e,t);return"down"===o||"right"===o}(t.keyCode,o.locale.contentLanguageDirection),l=s.document.selection.getSelectedElement();let c;Lm(l,o.editing.mapper.toModelElement(l),i)?c=this._handleArrowKeyPressOnSelectedWidget(a):r.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),c&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,o=jm(t.document.selection);return t.change((t=>{if(!o)return t.setSelectionAttribute(Vm,e?"after":"before"),!0;if(!(o===(e?"after":"before")))return t.removeSelectionAttribute(Vm),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,o=t.model,n=o.schema,r=t.plugins.get("Widget"),i=r._getObjectElementNextToSelection(e);return!!Lm(t.editing.mapper.toViewElement(i),i,n)&&(o.change((t=>{r._setSelectionOverElement(i),t.setSelectionAttribute(Vm,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,o=t.model,n=o.schema,r=t.editing.mapper,i=o.document.selection,s=e?i.getLastPosition().nodeBefore:i.getFirstPosition().nodeAfter;return!!Lm(r.toViewElement(s),s,n)&&(o.change((t=>{t.setSelection(s,"on"),t.setSelectionAttribute(Vm,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((o,n)=>{const r=n.domTarget.closest(".ck-widget__type-around__button");if(!r)return;const i=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(r),s=function(e,t){const o=e.closest(".ck-widget");return t.mapDomToView(o)}(r,t.domConverter),a=e.editing.mapper.toModelElement(s);this._insertParagraph(a,i),n.preventDefault(),o.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,o=e.editing.view;this._listenToIfEnabled(o.document,"enter",((o,n)=>{if("atTarget"!=o.eventPhase)return;const r=t.getSelectedElement(),i=e.editing.mapper.toViewElement(r),s=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:Lm(i,r,s)&&(this._insertParagraph(r,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),o.stop())}),{context:$m})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=e.selection)}),{priority:"high"}),n.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,o=e.model,n=o.schema;this._listenToIfEnabled(t.document,"delete",((t,r)=>{if("atTarget"!=t.eventPhase)return;const i=jm(o.document.selection);if(!i)return;const s=r.direction,a=o.document.selection.getSelectedElement(),l="forward"==s;if("before"===i===l)e.execute("delete",{selection:o.createSelection(a,"on")});else{const t=n.getNearestSelectionRange(o.createPositionAt(a,i),s);if(t)if(t.isCollapsed){const r=o.createSelection(t.start);if(o.modifySelection(r,{direction:s}),r.focus.isEqual(t.start)){const e=function(e,t){let o=t;for(const n of t.getAncestors({parentFirst:!0})){if(n.childCount>1||e.isLimit(n))break;o=n}return o}(n,t.start.parent);o.deleteContent(o.createSelection(e,"on"),{doNotAutoparagraph:!0})}else o.change((o=>{o.setSelection(t),e.execute(l?"deleteForward":"delete")}))}else o.change((o=>{o.setSelection(t),e.execute(l?"deleteForward":"delete")}))}r.preventDefault(),t.stop()}),{context:$m})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,o=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[n,r])=>{if(r&&!r.is("documentSelection"))return;const i=jm(o);return i?(e.stop(),t.change((e=>{const r=o.getSelectedElement(),s=t.createPositionAt(r,i),a=e.createSelection(s),l=t.insertContent(n,a);return e.setSelection(a),l}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,o)=>{const[,n,r={}]=o;if(n&&!n.is("documentSelection"))return;const i=jm(t);i&&(r.findOptimalPosition=i,o[3]=r)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[o])=>{if(o&&!o.is("documentSelection"))return;jm(t)&&e.stop()}),{priority:"high"})}}function Zf(e){const t=e.model;return(o,n)=>{const r=n.keyCode==cr.arrowup,i=n.keyCode==cr.arrowdown,s=n.shiftKey,a=t.document.selection;if(!r&&!i)return;const l=i;if(s&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,l))return;const c=function(e,t,o){const n=e.model;if(o){const e=t.isCollapsed?t.focus:t.getLastPosition(),o=Jf(n,e,"forward");if(!o)return null;const r=n.createRange(e,o),i=Qf(n.schema,r,"backward");return i?n.createRange(e,i):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),o=Jf(n,e,"backward");if(!o)return null;const r=n.createRange(o,e),i=Qf(n.schema,r,"forward");return i?n.createRange(i,e):null}}(e,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(s)return}(c.isCollapsed||function(e,t,o){const n=e.model,r=e.view.domConverter;if(o){const e=n.createSelection(t.start);n.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=n.createRange(e.focus,t.end))}const i=e.mapper.toViewRange(t),s=r.viewRangeToDom(i),a=Fn.getDomRangeRects(s);let l;for(const e of a)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,c,l))&&(t.change((e=>{const o=l?c.end:c.start;if(s){const n=t.createSelection(a.anchor);n.setFocus(o),e.setSelection(n)}else e.setSelection(o)})),o.stop(),n.preventDefault(),n.stopPropagation())}}}function Jf(e,t,o){const n=e.schema,r=e.createRangeIn(t.root),i="forward"==o?"elementStart":"elementEnd";for(const{previousPosition:e,item:s,type:a}of r.getWalker({startPosition:t,direction:o})){if(n.isLimit(s)&&!n.isInline(s))return e;if(a==i&&n.isBlock(s))return null}return null}function Qf(e,t,o){const n="backward"==o?t.end:t.start;if(e.checkChild(n,"$text"))return n;for(const{nextPosition:n}of t.getWalker({direction:o}))if(e.checkChild(n,"$text"))return n;return null}var Yf=o(6507),Xf={attributes:{"data-cke":!0}};Xf.setAttributes=Wr(),Xf.insert=qr().bind(null,"head"),Xf.domAPI=Lr(),Xf.insertStyleElement=Ur();Or()(Yf.Z,Xf);Yf.Z&&Yf.Z.locals&&Yf.Z.locals;class eb extends Br{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[Kf,_f]}init(){const e=this.editor,t=e.editing.view,o=t.document;this.editor.editing.downcastDispatcher.on("selection",((t,o,n)=>{const r=n.writer,i=o.selection;if(i.isCollapsed)return;const s=i.getSelectedElement();if(!s)return;const a=e.editing.mapper.toViewElement(s);var l;$m(a)&&(n.consumable.consume(i,"selection")&&r.setSelection(r.createRangeOn(a),{fake:!0,label:(l=a,l.getCustomProperty("widgetLabel").reduce(((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t),""))}))})),this.editor.editing.downcastDispatcher.on("selection",((e,t,o)=>{this._clearPreviouslySelectedWidgets(o.writer);const n=o.writer,r=n.document.selection;let i=null;for(const e of r.getRanges())for(const t of e){const e=t.item;$m(e)&&!tb(e,i)&&(n.addClass(Wm,e),this._previouslySelected.add(e),i=e)}}),{priority:"low"}),t.addObserver(yu),this.listenTo(o,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(o,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[$m,"$text"]}),this.listenTo(o,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(o,"arrowKey",Zf(this.editor.editing),{context:"$text"}),this.listenTo(o,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"})}_onMousedown(e,t){const o=this.editor,r=o.editing.view,i=r.document;let s=t.target;if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if($m(t))return!1;t=t.parent}return!1}(s)){if((n.isSafari||n.isGecko)&&t.domEvent.detail>=3){const e=o.editing.mapper,n=s.is("attributeElement")?s.findAncestor((e=>!e.is("attributeElement"))):s,r=e.toModelElement(n);t.preventDefault(),this.editor.model.change((e=>{e.setSelection(r,"in")}))}return}if(!$m(s)&&(s=s.findAncestor($m),!s))return;n.isAndroid&&t.preventDefault(),i.isFocused||r.focus();const a=o.editing.mapper.toModelElement(s);this._setSelectionOverElement(a)}_handleSelectionChangeOnArrowKeyPress(e,t){const o=t.keyCode,n=this.editor.model,r=n.schema,i=n.document.selection,s=i.getSelectedElement(),a=gr(o,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,c="up"==a||"down"==a;if(s&&r.isObject(s)){const o=l?i.getLastPosition():i.getFirstPosition(),s=r.getNearestSelectionRange(o,l?"forward":"backward");return void(s&&(n.change((e=>{e.setSelection(s)})),t.preventDefault(),e.stop()))}if(!i.isCollapsed&&!t.shiftKey){const o=i.getFirstPosition(),s=i.getLastPosition(),a=o.nodeAfter,c=s.nodeBefore;return void((a&&r.isObject(a)||c&&r.isObject(c))&&(n.change((e=>{e.setSelection(l?s:o)})),t.preventDefault(),e.stop()))}if(!i.isCollapsed)return;const d=this._getObjectElementNextToSelection(l);if(d&&r.isObject(d)){if(r.isInline(d)&&c)return;this._setSelectionOverElement(d),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const o=this.editor.model,n=o.schema,r=o.document.selection.getSelectedElement();r&&n.isObject(r)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);return o?(this.editor.model.change((e=>{let n=t.anchor.parent;for(;n.isEmpty;){const t=n;n=t.parent,e.remove(t)}this._setSelectionOverElement(o)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,o=t.schema,n=t.document.selection,r=t.createSelection(n);if(t.modifySelection(r,{direction:e?"forward":"backward"}),r.isEqual(n))return null;const i=e?r.focus.nodeBefore:r.focus.nodeAfter;return i&&o.isObject(i)?i:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(Wm,t);this._previouslySelected.clear()}}function tb(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class ob extends Br{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[Cm]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!$m(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:o,getRelatedElement:n,balloonClassName:r="ck-toolbar-container"}){if(!o.length)return void b("widget-toolbar-no-items",{toolbarId:e});const i=this.editor,s=i.t,a=new Fp(i.locale);if(a.ariaLabel=t||s("Widget toolbar"),this._toolbarDefinitions.has(e))throw new f("widget-toolbar-duplicated",this,{toolbarId:e});const l={view:a,getRelatedElement:n,balloonClassName:r,itemsConfig:o,initialized:!1};i.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const e=n(i.editing.view.document.selection);e&&this._showToolbar(l,e)},afterBlur:()=>{this._hideToolbar(l)}}),this._toolbarDefinitions.set(e,l)}_updateToolbarsVisibility(){let e=0,t=null,o=null;for(const n of this._toolbarDefinitions.values()){const r=n.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&r)if(this.editor.ui.focusTracker.isFocused){const i=r.getAncestors().length;i>e&&(e=i,t=r,o=n)}else this._isToolbarVisible(n)&&this._hideToolbar(n);else this._isToolbarInBalloon(n)&&this._hideToolbar(n)}o&&this._showToolbar(o,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?nb(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:rb(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);nb(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function nb(e,t){const o=e.plugins.get("ContextualBalloon"),n=rb(e,t);o.updatePosition(n)}function rb(e,t){const o=e.editing.view,n=Wg.defaultPositions;return{target:o.domConverter.mapViewToDom(t),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class ib extends(H()){constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,o){const n=new Fn(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const o of t)if(e.classList.contains(sb(o)))return o}(e),this._referenceCoordinates=function(e,t){const o=new Fn(e),n=t.split("-"),r={x:"right"==n[1]?o.right:o.left,y:"bottom"==n[0]?o.bottom:o.top};return r.x+=e.ownerDocument.defaultView.scrollX,r.y+=e.ownerDocument.defaultView.scrollY,r}(t,function(e){const t=e.split("-"),o={top:"bottom",bottom:"top",left:"right",right:"left"};return`${o[t[0]]}-${o[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=n.width,this._originalHeight=n.height,this._aspectRatio=n.width/n.height;const r=o.style.width;r&&r.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(r):this._originalWidthPercents=function(e,t){const o=e.parentElement;let n=parseFloat(o.ownerDocument.defaultView.getComputedStyle(o).width);const r=5;let i=0,s=o;for(;isNaN(n);){if(s=s.parentElement,++i>r)return 0;n=parseFloat(o.ownerDocument.defaultView.getComputedStyle(s).width)}return t.width/n*100}(o,n)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function sb(e){return`ck-widget__resizer__handle-${e}`}class ab extends Sh{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,o,n)=>"px"===e.unit?`${t}×${o}`:`${n}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,o)=>t<50||o<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}class lb extends(H()){constructor(e){super(),this._viewResizerWrapper=null,this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((o=>{const n=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const o=this.toDomElement(t);return e._appendHandles(o),e._appendSizeUI(o),o}));o.insert(o.createPositionAt(t,"end"),n),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(e){this._state=new ib(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change((e=>{const o=this._options.unit||"%",n=("%"===o?t.widthPercents:t.width)+o;e.setStyle("width",n,this._options.viewElement)}));const o=this._getHandleHost(),n=new Fn(o),r=Math.round(n.width),i=Math.round(n.height),s=new Fn(o);t.width=Math.round(s.width),t.height=Math.round(s.height),this.redraw(n),this.state.update({...t,handleHostWidth:r,handleHostHeight:i})}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(t)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((o=t)&&o.ownerDocument&&o.ownerDocument.contains(o)))return;var o;const n=t.parentElement,r=this._getHandleHost(),i=this._viewResizerWrapper,s=[i.getStyle("width"),i.getStyle("height"),i.getStyle("left"),i.getStyle("top")];let a;if(n.isSameNode(r)){const t=e||new Fn(r);a=[t.width+"px",t.height+"px",void 0,void 0]}else a=[r.offsetWidth+"px",r.offsetHeight+"px",r.offsetLeft+"px",r.offsetTop+"px"];"same"!==J(s,a)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},i)}))}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,o={x:(n=e).pageX,y:n.pageY};var n;const r=!this._options.isCentered||this._options.isCentered(this),i={x:t._referenceCoordinates.x-(o.x+t.originalWidth),y:o.y-t.originalHeight-t._referenceCoordinates.y};r&&t.activeHandlePosition.endsWith("-right")&&(i.x=o.x-(t._referenceCoordinates.x+t.originalWidth)),r&&(i.x*=2);let s=Math.abs(t.originalWidth+i.x),a=Math.abs(t.originalHeight+i.y);return"width"==(s/t.aspectRatio>a?"width":"height")?a=s/t.aspectRatio:s=a*t.aspectRatio,{width:Math.round(s),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*s*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)e.appendChild(new Th({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(o=n,`ck-widget__resizer__handle-${o}`)}}).render());var o}_appendSizeUI(e){this._sizeView=new ab,this._sizeView.render(),e.appendChild(this._sizeView.element)}}var cb=o(2263),db={attributes:{"data-cke":!0}};db.setAttributes=Wr(),db.insert=qr().bind(null,"head"),db.domAPI=Lr(),db.insertStyleElement=Ur();Or()(cb.Z,db);cb.Z&&cb.Z.locals&&cb.Z.locals;class ub extends Br{constructor(){super(...arguments),this._resizers=new Map}static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=In.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(yu),this._observer=new(Dn()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=fh((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(In.window,"resize",this._redrawSelectedResizerThrottled);const o=this.editor.editing.view.document.selection;o.on("change",(()=>{const e=o.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()}))}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new lb(e),o=this.editor.plugins;if(t.attach(),o.has("WidgetToolbarRepository")){const e=o.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const n=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(n)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const o=t.domTarget;lb.isResizeHandle(o)&&(this._activeResizer=this._getResizerByHandle(o)||null,this._activeResizer&&(this._activeResizer.begin(o),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}function hb(e,t,o){e.ui.componentFactory.add(t,(t=>{const n=new op(t);return n.set({label:I18n.t("js.button_edit"),icon:'\n',tooltip:!0}),n.on("execute",(()=>{const t=e.model.document.selection.getSelectedElement();t&&o(t)})),n}))}const pb="ck-toolbar-container";function gb(e,t,o,n){const r=t.config.get(o+".toolbar");if(!r||!r.length)return;const i=t.plugins.get("ContextualBalloon"),s=new Fp(t.locale);function a(){t.ui.focusTracker.isFocused&&n(t.editing.view.document.selection)?c()?function(e,t){const o=e.plugins.get("ContextualBalloon");if(t(e.editing.view.document.selection)){const t=mb(e);o.updatePosition(t)}}(t,n):i.hasView(s)||i.add({view:s,position:mb(t),balloonClassName:pb}):l()}function l(){c()&&i.remove(s)}function c(){return i.visibleView==s}s.fillFromConfig(r,t.ui.componentFactory),e.listenTo(t.editing.view,"render",a),e.listenTo(t.ui.focusTracker,"change:isFocused",a,{priority:"low"})}function mb(e){const t=e.editing.view,o=Wg.defaultPositions;return{target:t.domConverter.viewToDom(t.document.selection.getSelectedElement()),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast]}}class fb extends Br{static get requires(){return[Cm]}static get pluginName(){return"EmbeddedTableToolbar"}init(){const e=this.editor,t=this.editor.model,o=of(e);hb(e,"opEditEmbeddedTableQuery",(e=>{const n=o.services.externalQueryConfiguration,r=e.getAttribute("opEmbeddedTableQuery")||{};o.runInZone((()=>{n.show({currentQuery:r,callback:o=>t.change((t=>{t.setAttribute("opEmbeddedTableQuery",o,e)}))})}))}))}afterInit(){gb(this,this.editor,"OPMacroEmbeddedTable",ef)}}const bb=Symbol("isWpButtonMacroSymbol");function kb(e){const t=e.getSelectedElement();return!(!t||!function(e){return!!e.getCustomProperty(bb)&&$m(e)}(t))}class wb extends Br{static get pluginName(){return"OPMacroWpButtonEditing"}static get buttonName(){return"insertWorkPackageButton"}init(){const e=this.editor,t=e.model,o=e.conversion,n=of(e);t.schema.register("op-macro-wp-button",{allowWhere:["$block"],allowAttributes:["type","classes"],isBlock:!0,isLimit:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"create_work_package_link"},model:(e,{writer:t})=>{const o=e.getAttribute("data-type")||"",n=e.getAttribute("data-classes")||"";return t.createElement("op-macro-wp-button",{type:o,classes:n})}}),o.for("editingDowncast").elementToElement({model:"op-macro-wp-button",view:(e,{writer:t})=>this.createMacroViewElement(e,t)}),o.for("dataDowncast").elementToElement({model:"op-macro-wp-button",view:(e,{writer:t})=>t.createContainerElement("macro",{class:"create_work_package_link","data-type":e.getAttribute("type")||"","data-classes":e.getAttribute("classes")||""})}),e.ui.componentFactory.add(wb.buttonName,(t=>{const o=new op(t);return o.set({label:window.I18n.t("js.editor.macro.work_package_button.button"),withText:!0}),o.on("execute",(()=>{n.services.macros.configureWorkPackageButton().then((t=>e.model.change((o=>{const n=o.createElement("op-macro-wp-button",{});o.setAttribute("type",t.type,n),o.setAttribute("classes",t.classes,n),e.model.insertContent(n,e.model.document.selection)}))))})),o}))}macroLabel(e){return e?window.I18n.t("js.editor.macro.work_package_button.with_type",{typename:e}):window.I18n.t("js.editor.macro.work_package_button.without_type")}createMacroViewElement(e,t){e.getAttribute("type");const o=e.getAttribute("classes")||"",n=this.macroLabel(),r=t.createText(n),i=t.createContainerElement("span",{class:o});return t.insert(t.createPositionAt(i,0),r),function(e,t,o){return t.setCustomProperty(bb,!0,e),Um(e,t,{label:o})}(i,t,{label:n})}}class _b extends Br{static get requires(){return[Cm]}static get pluginName(){return"OPMacroWpButtonToolbar"}init(){const e=this.editor,t=(this.editor.model,of(e));hb(e,"opEditWpMacroButton",(o=>{const n=t.services.macros,r=o.getAttribute("type"),i=o.getAttribute("classes");n.configureWorkPackageButton(r,i).then((t=>e.model.change((e=>{e.setAttribute("classes",t.classes,o),e.setAttribute("type",t.type,o)}))))}))}afterInit(){gb(this,this.editor,"OPMacroWpButton",kb)}}class yb extends(H()){constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((o,n)=>{t.onload=()=>{const e=t.result;this._data=e,o(e)},t.onerror=()=>{n("error")},t.onabort=()=>{n("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}class Ab extends Br{constructor(){super(...arguments),this.loaders=new _r,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[dh]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return b("filerepository-no-upload-adapter"),null;const t=new Cb(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof Cb?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,o)=>{e===t&&this._loadersMap.delete(o)}))}_updatePendingAction(){const e=this.editor.plugins.get(dh);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,o=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(o(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",o)}}else e.remove(this._pendingAction),this._pendingAction=null}}class Cb extends(H()){constructor(e,t){super(),this.id=h(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new yb,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new f("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new f("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((o,n)=>{t.rejecter=n,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,o(e)})).catch((e=>{t.isFulfilled=!0,n(e)}))})),t}}class vb extends Sh{constructor(e){super(e),this.buttonView=new op(e),this._fileInputView=new xb(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",(()=>{this._fileInputView.open()}))}focus(){this.buttonView.focus()}}class xb extends Sh{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}class Eb{constructor(e,t,o){this.loader=e,this.resource=t,this.editor=o}upload(){const e=this.resource,t=nf(this.editor,"attachmentsResourceService");return e?this.loader.file.then((o=>t.attachFiles(e,[o]).toPromise().then((e=>(this.editor.model.fire("op:attachment-added",e),this.buildResponse(e[0])))).catch((e=>{console.error("Failed upload %O",e)})))):(console.warn("resource not available in this CKEditor instance"),Promise.reject("Not possible to upload attachments without resource"))}buildResponse(e){return{default:e._links.staticDownloadLocation.href}}abort(){return!1}}class Db extends Ea{constructor(e){super(e),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const t=this.document;function o(e){return(o,n)=>{n.preventDefault();const r=n.dropRange?[n.dropRange]:null,i=new d(t,e);t.fire(i,{dataTransfer:n.dataTransfer,method:o.name,targetRanges:r,target:n.target,domEvent:n.domEvent}),i.stop.called&&n.stopPropagation()}}this.listenTo(t,"paste",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",o("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,o="drop"==e.type||"paste"==e.type,n={dataTransfer:new gl(t,{cacheFiles:o})};"drop"!=e.type&&"dragover"!=e.type||(n.dropRange=function(e,t){const o=t.target.ownerDocument,n=t.clientX,r=t.clientY;let i;o.caretRangeFromPoint&&o.caretRangeFromPoint(n,r)?i=o.caretRangeFromPoint(n,r):t.rangeParent&&(i=o.createRange(),i.setStart(t.rangeParent,t.rangeOffset),i.collapse(!0));if(i)return e.domConverter.domRangeToView(i);return null}(this.view,e)),this.fire(e.type,e,n)}}const Sb=["figcaption","li"];function Tb(e){let t="";if(e.is("$text")||e.is("$textProxy"))t=e.data;else if(e.is("element","img")&&e.hasAttribute("alt"))t=e.getAttribute("alt");else if(e.is("element","br"))t="\n";else{let o=null;for(const n of e.getChildren()){const e=Tb(n);o&&(o.is("containerElement")||n.is("containerElement"))&&(Sb.includes(o.name)||Sb.includes(n.name)?t+="\n":t+="\n\n"),t+=e,o=n}}return t}class Bb extends Br{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(Db),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const e=this.editor,t=e.model,o=e.editing.view,n=o.document;this.listenTo(n,"clipboardInput",((t,o)=>{"paste"!=o.method||e.model.canEditAt(e.model.document.selection)||t.stop()}),{priority:"highest"}),this.listenTo(n,"clipboardInput",((e,t)=>{const n=t.dataTransfer;let r;if(t.content)r=t.content;else{let e="";n.getData("text/html")?e=function(e){return e.replace(/(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(//g,"")}(n.getData("text/html")):n.getData("text/plain")&&(((i=(i=n.getData("text/plain")).replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/\t/g,"    ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||i.includes("
"))&&(i=`

${i}

`),e=i),r=this.editor.data.htmlProcessor.toView(e)}var i;const s=new d(this,"inputTransformation");this.fire(s,{content:r,dataTransfer:n,targetRanges:t.targetRanges,method:t.method}),s.stop.called&&e.stop(),o.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,o)=>{if(o.content.isEmpty)return;const n=this.editor.data.toModel(o.content,"$clipboardHolder");0!=n.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:n,method:o.method,dataTransfer:o.dataTransfer,targetRanges:o.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,o)=>{o.resultRange=t.insertContent(o.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,o=e.editing.view.document,n=(n,r)=>{const i=r.dataTransfer;r.preventDefault();const s=e.data.toView(e.model.getSelectedContent(t.selection));o.fire("clipboardOutput",{dataTransfer:i,content:s,method:n.name})};this.listenTo(o,"copy",n,{priority:"low"}),this.listenTo(o,"cut",((t,o)=>{e.model.canEditAt(e.model.document.selection)?n(t,o):o.preventDefault()}),{priority:"low"}),this.listenTo(o,"clipboardOutput",((o,n)=>{n.content.isEmpty||(n.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(n.content)),n.dataTransfer.setData("text/plain",Tb(n.content))),"cut"==n.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}var Ib=o(390),Pb={attributes:{"data-cke":!0}};Pb.setAttributes=Wr(),Pb.insert=qr().bind(null,"head"),Pb.domAPI=Lr(),Pb.insertStyleElement=Ur();Or()(Ib.Z,Pb);Ib.Z&&Ib.Z.locals&&Ib.Z.locals;class Rb extends Br{static get pluginName(){return"DragDrop"}static get requires(){return[Bb,eb]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=fh((e=>this._updateDropMarker(e)),40),this._removeDropMarkerDelayed=xr((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=xr((()=>this._clearDraggableAttributes()),40),e.plugins.has("DragDropExperimental")?this.forceDisabled("DragDropExperimental"):(t.addObserver(Db),t.addObserver(yu),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,o)=>{o||this._finalizeDragging(!1)})),n.isAndroid&&this.forceDisabled("noAndroidSupport"))}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,o=t.document,r=e.editing.view,i=r.document;this.listenTo(i,"dragstart",((n,r)=>{const s=o.selection;if(r.target&&r.target.is("editableElement"))return void r.preventDefault();const a=r.target?Nb(r.target):null;if(a){const o=e.editing.mapper.toModelElement(a);if(this._draggedRange=Kl.fromRange(t.createRangeOn(o)),e.plugins.has("WidgetToolbarRepository")){e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}}else if(!i.selection.isCollapsed){const e=i.selection.getSelectedElement();e&&$m(e)||(this._draggedRange=Kl.fromRange(s.getFirstRange()))}if(!this._draggedRange)return void r.preventDefault();this._draggingUid=h();const l=this.isEnabled&&e.model.canEditAt(this._draggedRange);r.dataTransfer.effectAllowed=l?"copyMove":"copy",r.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const c=t.createSelection(this._draggedRange.toRange()),d=e.data.toView(t.getSelectedContent(c));i.fire("clipboardOutput",{dataTransfer:r.dataTransfer,content:d,method:"dragstart"}),l||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(i,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(i,"dragenter",(()=>{this.isEnabled&&r.focus()})),this.listenTo(i,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(i,"dragging",((t,o)=>{if(!this.isEnabled)return void(o.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const r=zb(e,o.targetRanges,o.target);e.model.canEditAt(r)?(this._draggedRange||(o.dataTransfer.dropEffect="copy"),n.isGecko||("copy"==o.dataTransfer.effectAllowed?o.dataTransfer.dropEffect="copy":["all","copyMove"].includes(o.dataTransfer.effectAllowed)&&(o.dataTransfer.dropEffect="move")),r&&this._updateDropMarkerThrottled(r)):o.dataTransfer.dropEffect="none"}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",((t,o)=>{if("drop"!=o.method)return;const n=zb(e,o.targetRanges,o.target);if(this._removeDropMarker(),!n||!e.model.canEditAt(n))return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=o.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==Mb(o.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(n,!0))return this._finalizeDragging(!1),void t.stop();o.targetRanges=[e.editing.mapper.toViewRange(n)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(Bb);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(o)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o="move"==Mb(t.dataTransfer),n=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(n&&o)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,o=t.document;this.listenTo(o,"mousedown",((r,i)=>{if(n.isAndroid||!i)return;this._clearDraggableAttributesDelayed.cancel();let s=Nb(i.target);if(n.isBlink&&!s&&!o.selection.isCollapsed){const e=o.selection.getSelectedElement();if(!e||!$m(e)){const e=o.selection.editableElement;e&&!e.isReadOnly&&(s=e)}}s&&(t.change((e=>{e.setAttribute("draggable","true",s)})),this._draggableElement=e.editing.mapper.toModelElement(s))})),this.listenTo(o,"mouseup",(()=>{n.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:o})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return o.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("⁠",e.createElement("span"),"⁠"),t}))}})}_updateDropMarker(e){const t=this.editor,o=t.model.markers;t.model.change((t=>{o.has("drop-target")?o.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_finalizeDragging(e){const t=this.editor,o=t.model;if(this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&o.deleteContent(o.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function zb(e,t,o){const r=e.model,i=e.editing.mapper;let s=null;const a=t?t[0].start:null;if(o.is("uiElement")&&(o=o.parent),s=function(e,t){const o=e.model,n=e.editing.mapper;if($m(t))return o.createRangeOn(n.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor((e=>$m(e)||e.is("editableElement")));if($m(e))return o.createRangeOn(n.toModelElement(e))}return null}(e,o),s)return s;const l=function(e,t){const o=e.editing.mapper,n=e.editing.view,r=o.toModelElement(t);if(r)return r;const i=n.createPositionBefore(t),s=o.findMappedViewAncestor(i);return o.toModelElement(s)}(e,o),c=a?i.toModelPosition(a):null;return c?(s=function(e,t,o){const n=e.model;if(!n.schema.checkChild(o,"$block"))return null;const r=n.createPositionAt(o,0),i=t.path.slice(0,r.path.length),s=n.createPositionFromPath(t.root,i),a=s.nodeAfter;if(a&&n.schema.isObject(a))return n.createRangeOn(a);return null}(e,c,l),s||(s=r.schema.getNearestSelectionRange(c,n.isGecko?"forward":"backward"),s||function(e,t){const o=e.model;let n=t;for(;n;){if(o.schema.isObject(n))return o.createRangeOn(n);n=n.parent}return null}(e,c.parent))):function(e,t){const o=e.model,n=o.schema,r=o.createPositionAt(t,0);return n.getNearestSelectionRange(r,"forward")}(e,l)}function Mb(e){return n.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function Nb(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor($m);if($m(e))return e;const t=e.findAncestor((e=>$m(e)||e.is("editableElement")));return $m(t)?t:null}class Fb extends Br{static get pluginName(){return"PastePlainText"}static get requires(){return[Bb]}init(){const e=this.editor,t=e.model,o=e.editing.view,n=o.document,r=t.document.selection;let i=!1;o.addObserver(Db),this.listenTo(n,"keydown",((e,t)=>{i=t.shiftKey})),e.plugins.get(Bb).on("contentInsertion",((e,o)=>{(i||function(e,t){if(e.childCount>1)return!1;const o=e.getChild(0);if(t.isObject(o))return!1;return 0==Array.from(o.getAttributeKeys()).length}(o.content,t.schema))&&t.change((e=>{const n=Array.from(r.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0}),n.push(...r.getAttributes());const i=e.createRangeIn(o.content);for(const t of i.getItems())t.is("$textProxy")&&e.setAttributes(n,t)}))}))}}class Ob extends Br{static get pluginName(){return"Clipboard"}static get requires(){return[Bb,Rb,Fb]}}Hn("px");class Vb extends Pr{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",((e,t)=>{t[1]={...t[1]};const o=t[1];o.batchType||(o.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,o={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:o}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,o){const n=this.editor.model,r=n.document,i=[],s=e.map((e=>e.getTransformedByOperations(o))),a=s.flat();for(const e of s){const t=e.filter((e=>e.root!=r.graveyard)).filter((e=>!jb(e,a)));t.length&&(Lb(t),i.push(t[0]))}i.length&&n.change((e=>{e.setSelection(i,{backward:t})}))}_undo(e,t){const o=this.editor.model,n=o.document;this._createdBatches.add(t);const r=e.operations.slice().filter((e=>e.isDocumentOperation));r.reverse();for(const e of r){const r=e.baseVersion+1,i=Array.from(n.history.getOperations(r)),s=Dd([e.getReversed()],i,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let r of s){const i=r.affectedSelectable;i&&!o.canEditAt(i)&&(r=new bd(r.baseVersion)),t.addOperation(r),o.applyOperation(r),n.history.setOperationAsUndone(e,r)}}}}function Lb(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;tt!==e&&t.containsRange(e,!0)))}class qb extends Vb{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,o=this._stack.splice(t,1)[0],n=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(n,(()=>{this._undo(o.batch,n);const e=this.editor.model.document.history.getOperations(o.batch.baseVersion);this._restoreSelection(o.selection.ranges,o.selection.isBackward,e),this.fire("revert",o.batch,n)})),this.refresh()}}class Hb extends Vb{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const o=e.batch.operations[e.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(o);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch,t)})),this.refresh()}}class Wb extends Br{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const e=this.editor;this._undoCommand=new qb(e),this._redoCommand=new Hb(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const o=t[0];if(!o.isDocumentOperation)return;const n=o.batch,r=this._redoCommand.createdBatches.has(n),i=this._undoCommand.createdBatches.has(n);this._batchRegistry.has(n)||(this._batchRegistry.add(n),n.isUndoable&&(r?this._undoCommand.addBatch(n):i||(this._undoCommand.addBatch(n),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,o)=>{this._redoCommand.addBatch(o)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}const $b='',Ub='';class Gb extends Br{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,o=e.t,n="ltr"==t.uiLanguageDirection?$b:Ub,r="ltr"==t.uiLanguageDirection?Ub:$b;this._addButton("undo",o("Undo"),"CTRL+Z",n),this._addButton("redo",o("Redo"),"CTRL+Y",r)}_addButton(e,t,o,n){const r=this.editor;r.ui.componentFactory.add(e,(i=>{const s=r.commands.get(e),a=new op(i);return a.set({label:t,icon:n,keystroke:o,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",(()=>{r.execute(e),r.editing.view.focus()})),a}))}}class Kb extends Br{static get requires(){return[Wb,Gb]}static get pluginName(){return"Undo"}}function Zb(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot("children")])}function Jb(e,t){const o=e.plugins.get("ImageUtils"),n=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>{if(!o.isInlineImageView(e))return null;if(!n)return r(e);return("block"==e.getStyle("display")||e.findAncestor(o.isBlockImageView)?"imageBlock":"imageInline")!==t?null:r(e)};function r(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function Qb(e,t){const o=yr(t.getSelectedBlocks());return!o||e.isObject(o)||o.isEmpty&&"listItem"!=o.name?"imageBlock":"imageInline"}class Yb extends Br{static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,o=null){const n=this.editor,r=n.model,i=r.document.selection;o=Xb(n,t||i,o),e={...Object.fromEntries(i.getAttributes()),...e};for(const t in e)r.schema.checkAttribute(o,t)||delete e[t];return r.change((n=>{const i=n.createElement(o,e);return r.insertObject(i,t,null,{setSelection:"on",findOptimalPosition:t||"imageInline"==o?void 0:"auto"}),i.parent?i:null}))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const o=e.getSelectedElement();if(o&&this.isImageWidget(o))return o;let n=t.parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){const o=Xb(e,t,null);if("imageBlock"==o){const o=function(e,t){const o=function(e,t){const o=e.getSelectedElement();if(o){const n=jm(e);if(n)return t.createRange(t.createPositionAt(o,n))}return uu(e,t)}(e,t),n=o.start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(t,e.model);if(e.model.schema.checkChild(o,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every((e=>!e.is("element","imageBlock")))}(e)}toImageWidget(e,t,o){t.setCustomProperty("image",!0,e);return Um(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${o}`:o}})}isImageWidget(e){return!!e.getCustomProperty("image")&&$m(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:o}of t.createRangeIn(e))if(this.isInlineImageView(o))return o}}function Xb(e,t,o){const n=e.model.schema,r=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?o||("inline"===r?"imageInline":"block"===r?"imageBlock":t.is("selection")?Qb(n,t):n.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));class ek extends Pr{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,o=t.plugins.get("ImageUtils"),n=t.model,r=o.getClosestSelectedImageElement(n.document.selection);n.change((t=>{t.setAttribute("alt",e.newValue,r)}))}}class tk extends Br{static get requires(){return[Yb]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new ek(this.editor))}}var ok=o(6831),nk={attributes:{"data-cke":!0}};nk.setAttributes=Wr(),nk.insert=qr().bind(null,"head"),nk.domAPI=Lr(),nk.insertStyleElement=Ur();Or()(ok.Z,nk);ok.Z&&ok.Z.locals&&ok.Z.locals;var rk=o(1590),ik={attributes:{"data-cke":!0}};ik.setAttributes=Wr(),ik.insert=qr().bind(null,"head"),ik.domAPI=Lr(),ik.insertStyleElement=Ur();Or()(rk.Z,ik);rk.Z&&rk.Z.locals&&rk.Z.locals;class sk extends Sh{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new Ar,this.keystrokes=new Cr,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),uh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),uh.cancel,"ck-button-cancel","cancel"),this._focusables=new xh,this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),Ch({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,o,n){const r=new op(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:o}}),n&&r.delegate("execute").to(this,n),r}_createLabeledInputView(){const e=this.locale.t,t=new kp(this.locale,ig);return t.label=e("Text alternative"),t}}function ak(e){const t=e.editing.view,o=Wg.defaultPositions,n=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(n.getClosestSelectedImageWidget(t.document.selection)),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}class lk extends Br{static get requires(){return[Cm]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",(o=>{const n=e.commands.get("imageTextAlternative"),r=new op(o);return r.set({label:t("Change image text alternative"),icon:uh.lowVision,tooltip:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",(e=>!!e)),this.listenTo(r,"execute",(()=>{this._showForm()})),r}))}_createForm(){const e=this.editor,t=e.editing.view.document,o=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Ah(sk))(e.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)})),this.listenTo(this._form,"cancel",(()=>{this._hideForm(!0)})),this._form.keystrokes.set("Esc",((e,t)=>{this._hideForm(!0),t()})),this.listenTo(e.ui,"update",(()=>{o.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const o=ak(e);t.updatePosition(o)}}(e):this._hideForm(!0)})),yh({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),o=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:ak(e)}),o.fieldView.value=o.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class ck extends Br{static get requires(){return[tk,lk]}static get pluginName(){return"ImageTextAlternative"}}function dk(e,t){const o=(t,o,n)=>{if(!n.consumable.consume(o.item,t.name))return;const r=n.writer,i=n.mapper.toViewElement(o.item),s=e.findViewImgElement(i);if(null===o.attributeNewValue){const e=o.attributeOldValue;e&&e.data&&(r.removeAttribute("srcset",s),r.removeAttribute("sizes",s),e.width&&r.removeAttribute("width",s))}else{const e=o.attributeNewValue;e&&e.data&&(r.setAttribute("srcset",e.data,s),r.setAttribute("sizes","100vw",s),e.width&&r.setAttribute("width",e.width,s))}};return e=>{e.on(`attribute:srcset:${t}`,o)}}function uk(e,t,o){const n=(t,o,n)=>{if(!n.consumable.consume(o.item,t.name))return;const r=n.writer,i=n.mapper.toViewElement(o.item),s=e.findViewImgElement(i);r.setAttribute(o.attributeKey,o.attributeNewValue||"",s)};return e=>{e.on(`attribute:${o}:${t}`,n)}}class hk extends Aa{observe(e){this.listenTo(e,"load",((e,t)=>{const o=t.target;this.checkShouldIgnoreEventFromTarget(o)||"IMG"==o.tagName&&this._fireEvents(t)}),{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class pk extends Pr{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&b("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&b("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=mr(e.source),o=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),r=Object.fromEntries(o.getAttributes());t.forEach(((e,t)=>{const i=o.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&i&&n.isImage(i)){const t=this.editor.model.createPositionAfter(i);n.insertImage({...e,...r},t)}else n.insertImage({...e,...r})}))}}class gk extends Pr{refresh(){const e=this.editor.plugins.get("ImageUtils"),t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=e.isImage(t),this.value=this.isEnabled?t.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement();this.editor.model.change((o=>{o.setAttribute("src",e.source,t),o.removeAttribute("srcset",t),o.removeAttribute("sizes",t)}))}}class mk extends Br{static get requires(){return[Yb]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(hk),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{const t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}});const o=new pk(e),n=new gk(e);e.commands.add("insertImage",o),e.commands.add("replaceImageSource",n),e.commands.add("imageInsert",o)}}class fk extends Pr{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(){const e=this.editor,t=this.editor.model,o=e.plugins.get("ImageUtils"),n=o.getClosestSelectedImageElement(t.document.selection),r=Object.fromEntries(n.getAttributes());return r.src||r.uploadId?t.change((e=>{const i=Array.from(t.markers).filter((e=>e.getRange().containsItem(n))),s=o.insertImage(r,t.createSelection(n,"on"),this._modelElementName);if(!s)return null;const a=e.createRangeOn(s);for(const t of i){const o=t.getRange(),n="$graveyard"!=o.root.rootName?o.getJoined(a,!0):a;e.updateMarker(t,{range:n})}return{oldElement:n,newElement:s}})):null}}class bk extends Br{static get requires(){return[mk,Yb,Bb]}static get pluginName(){return"ImageBlockEditing"}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new fk(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,o=e.conversion,n=e.plugins.get("ImageUtils");o.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>Zb(t)}),o.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:o})=>n.toImageWidget(Zb(o),o,t("image widget"))}),o.for("downcast").add(uk(n,"imageBlock","src")).add(uk(n,"imageBlock","alt")).add(dk(n,"imageBlock")),o.for("upcast").elementToElement({view:Jb(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)}).add(function(e){const t=(t,o,n)=>{if(!n.consumable.test(o.viewItem,{name:!0,classes:"image"}))return;const r=e.findViewImgElement(o.viewItem);if(!r||!n.consumable.test(r,{name:!0}))return;n.consumable.consume(o.viewItem,{name:!0,classes:"image"});const i=yr(n.convertItem(r,o.modelCursor).modelRange.getItems());i?(n.convertChildren(o.viewItem,i),n.updateConversionResult(i,o)):n.consumable.revert(o.viewItem,{name:!0,classes:"image"})};return e=>{e.on("element:figure",t)}}(n))}_setupClipboardIntegration(){const e=this.editor,t=e.model,o=e.editing.view,n=e.plugins.get("ImageUtils"),r=e.plugins.get("ClipboardPipeline");this.listenTo(r,"inputTransformation",((r,i)=>{const s=Array.from(i.content.getChildren());let a;if(!s.every(n.isInlineImageView))return;a=i.targetRanges?e.editing.mapper.toModelRange(i.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageBlock"===Qb(t.schema,l)){const e=new Au(o.document),t=s.map((t=>e.createElement("figure",{class:"image"},t)));i.content=e.createDocumentFragment(t)}}))}}var kk=o(9048),wk={attributes:{"data-cke":!0}};wk.setAttributes=Wr(),wk.insert=qr().bind(null,"head"),wk.domAPI=Lr(),wk.insertStyleElement=Ur();Or()(kk.Z,wk);kk.Z&&kk.Z.locals&&kk.Z.locals;class _k extends Br{static get requires(){return[mk,Yb,Bb]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor,t=e.model.schema;t.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),t.addChildCheck(((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1})),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new fk(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,o=e.conversion,n=e.plugins.get("ImageUtils");o.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),o.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:o})=>n.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(o),o,t("image widget"))}),o.for("downcast").add(uk(n,"imageInline","src")).add(uk(n,"imageInline","alt")).add(dk(n,"imageInline")),o.for("upcast").elementToElement({view:Jb(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,o=e.editing.view,n=e.plugins.get("ImageUtils"),r=e.plugins.get("ClipboardPipeline");this.listenTo(r,"inputTransformation",((r,i)=>{const s=Array.from(i.content.getChildren());let a;if(!s.every(n.isBlockImageView))return;a=i.targetRanges?e.editing.mapper.toModelRange(i.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageInline"===Qb(t.schema,l)){const e=new Au(o.document),t=s.map((t=>1===t.childCount?(Array.from(t.getAttributes()).forEach((o=>e.setAttribute(...o,n.findViewImgElement(t)))),t.getChild(0)):t));i.content=e.createDocumentFragment(t)}}))}}class yk extends Br{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[Yb]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),o=e.getFirstPosition().findAncestor("caption");return o&&t.isBlockImage(o.parent)?o:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}class Ak extends Pr{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),o=e.plugins.get("ImageUtils");if(!e.plugins.has(bk))return this.isEnabled=!1,void(this.value=!1);const n=e.model.document.selection,r=n.getSelectedElement();if(!r){const e=t.getCaptionFromModelSelection(n);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=o.isImage(r),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(r):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change((e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)}))}_showImageCaption(e,t){const o=this.editor.model.document.selection,n=this.editor.plugins.get("ImageCaptionEditing"),r=this.editor.plugins.get("ImageUtils");let i=o.getSelectedElement();const s=n._getSavedCaption(i);r.isInlineImage(i)&&(this.editor.execute("imageTypeBlock"),i=o.getSelectedElement());const a=s||e.createElement("caption");e.append(a,i),t&&e.setSelection(a,"in")}_hideImageCaption(e){const t=this.editor,o=t.model.document.selection,n=t.plugins.get("ImageCaptionEditing"),r=t.plugins.get("ImageCaptionUtils");let i,s=o.getSelectedElement();s?i=r.getCaptionFromImageModelElement(s):(i=r.getCaptionFromModelSelection(o),s=i.parent),n._saveCaption(s,i),e.setSelection(s,"on"),e.remove(i)}}class Ck extends Br{static get requires(){return[Yb,yk]}static get pluginName(){return"ImageCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new Ak(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,o=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),r=e.t;e.conversion.for("upcast").elementToElement({view:e=>n.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>o.isBlockImage(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:n})=>{if(!o.isBlockImage(e.parent))return null;const i=n.createEditableElement("figcaption");n.setCustomProperty("imageCaption",!0,i),Jr({view:t,element:i,text:r("Enter image caption"),keepOnFocus:!0});const s=e.parent.getAttribute("alt");return Jm(i,n,{label:s?r("Caption for image: %0",[s]):r("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),o=e.plugins.get("ImageCaptionUtils"),n=e.commands.get("imageTypeInline"),r=e.commands.get("imageTypeBlock"),i=e=>{if(!e.return)return;const{oldElement:n,newElement:r}=e.return;if(!n)return;if(t.isBlockImage(n)){const e=o.getCaptionFromImageModelElement(n);if(e)return void this._saveCaption(r,e)}const i=this._getSavedCaption(n);i&&this._saveCaption(r,i)};n&&this.listenTo(n,"execute",i,{priority:"low"}),r&&this.listenTo(r,"execute",i,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?xl.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,o=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",(()=>{const r=t.document.differ.getChanges();for(const t of r){if("alt"!==t.attributeKey)continue;const r=t.range.start.nodeAfter;if(o.isBlockImage(r)){const t=n.getCaptionFromImageModelElement(r);if(!t)return;e.editing.reconvertItem(t)}}}))}}class vk extends Br{static get requires(){return[yk]}static get pluginName(){return"ImageCaptionUI"}init(){const e=this.editor,t=e.editing.view,o=e.plugins.get("ImageCaptionUtils"),n=e.t;e.ui.componentFactory.add("toggleImageCaption",(r=>{const i=e.commands.get("toggleImageCaption"),s=new op(r);return s.set({icon:uh.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(i,"value","isEnabled"),s.bind("label").to(i,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(s,"execute",(()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const n=o.getCaptionFromModelSelection(e.model.document.selection);if(n){const o=e.editing.mapper.toViewElement(n);t.scrollToTheSelection(),t.change((e=>{e.addClass("image__caption_highlighted",o)}))}e.editing.view.focus()})),s}))}}var xk=o(8662),Ek={attributes:{"data-cke":!0}};Ek.setAttributes=Wr(),Ek.insert=qr().bind(null,"head"),Ek.domAPI=Lr(),Ek.insertStyleElement=Ur();Or()(xk.Z,Ek);xk.Z&&xk.Z.locals&&xk.Z.locals;function Dk(e){const t=e.map((e=>e.replace("+","\\+")));return new RegExp(`^image\\/(${t.join("|")})$`)}function Sk(e){return new Promise(((t,o)=>{const n=e.getAttribute("src");fetch(n).then((e=>e.blob())).then((e=>{const o=Tk(e,n),r=o.replace("image/",""),i=new File([e],`image.${r}`,{type:o});t(i)})).catch((e=>e&&"TypeError"===e.name?function(e){return function(e){return new Promise(((t,o)=>{const n=In.document.createElement("img");n.addEventListener("load",(()=>{const e=In.document.createElement("canvas");e.width=n.width,e.height=n.height;e.getContext("2d").drawImage(n,0,0),e.toBlob((e=>e?t(e):o()))})),n.addEventListener("error",(()=>o())),n.src=e}))}(e).then((t=>{const o=Tk(t,e),n=o.replace("image/","");return new File([t],`image.${n}`,{type:o})}))}(n).then(t).catch(o):o(e)))}))}function Tk(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class Bk extends Br{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=e.t,o=o=>{const n=new vb(o),r=e.commands.get("uploadImage"),i=e.config.get("image.upload.types"),s=Dk(i);return n.set({acceptedType:i.map((e=>`image/${e}`)).join(","),allowMultipleFiles:!0}),n.buttonView.set({label:t("Insert image"),icon:uh.image,tooltip:!0}),n.buttonView.bind("isEnabled").to(r),n.on("done",((t,o)=>{const n=Array.from(o).filter((e=>s.test(e.type)));n.length&&(e.execute("uploadImage",{file:n}),e.editing.view.focus())})),n};e.ui.componentFactory.add("uploadImage",o),e.ui.componentFactory.add("imageUpload",o)}}var Ik=o(5870),Pk={attributes:{"data-cke":!0}};Pk.setAttributes=Wr(),Pk.insert=qr().bind(null,"head"),Pk.domAPI=Lr(),Pk.insertStyleElement=Ur();Or()(Ik.Z,Pk);Ik.Z&&Ik.Z.locals&&Ik.Z.locals;var Rk=o(9899),zk={attributes:{"data-cke":!0}};zk.setAttributes=Wr(),zk.insert=qr().bind(null,"head"),zk.domAPI=Lr(),zk.insertStyleElement=Ur();Or()(Rk.Z,zk);Rk.Z&&Rk.Z.locals&&Rk.Z.locals;var Mk=o(9825),Nk={attributes:{"data-cke":!0}};Nk.setAttributes=Wr(),Nk.insert=qr().bind(null,"head"),Nk.domAPI=Lr(),Nk.insertStyleElement=Ur();Or()(Mk.Z,Nk);Mk.Z&&Mk.Z.locals&&Mk.Z.locals;class Fk extends Br{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.uploadStatusChange=(e,t,o)=>{const n=this.editor,r=t.item,i=r.getAttribute("uploadId");if(!o.consumable.consume(t.item,e.name))return;const s=n.plugins.get("ImageUtils"),a=n.plugins.get(Ab),l=i?t.attributeNewValue:null,c=this.placeholder,d=n.editing.mapper.toViewElement(r),u=o.writer;if("reading"==l)return Ok(d,u),void Vk(s,c,d,u);if("uploading"==l){const e=a.loaders.get(i);return Ok(d,u),void(e?(Lk(d,u),function(e,t,o,n){const r=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),r),o.on("change:uploadedPercent",((e,t,o)=>{n.change((e=>{e.setStyle("width",o+"%",r)}))}))}(d,u,e,n.editing.view),function(e,t,o,n){if(n.data){const r=e.findViewImgElement(t);o.setAttribute("src",n.data,r)}}(s,d,u,e)):Vk(s,c,d,u))}"complete"==l&&a.loaders.get(i)&&function(e,t,o){const n=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),n),setTimeout((()=>{o.change((e=>e.remove(e.createRangeOn(n))))}),3e3)}(d,u,n.editing.view),function(e,t){qk(e,t,"progressBar")}(d,u),Lk(d,u),function(e,t){t.removeClass("ck-appear",e)}(d,u)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function Ok(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function Vk(e,t,o,n){o.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",o);const r=e.findViewImgElement(o);r.getAttribute("src")!==t&&n.setAttribute("src",t,r),jk(o,"placeholder")||n.insert(n.createPositionAfter(r),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(n))}function Lk(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),qk(e,t,"placeholder")}function jk(e,t){for(const o of e.getChildren())if(o.getCustomProperty(t))return o}function qk(e,t,o){const n=jk(e,o);n&&t.remove(t.createRangeOn(n))}class Hk extends Pr{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),o=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(o)}execute(e){const t=mr(e.file),o=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),r=Object.fromEntries(o.getAttributes());t.forEach(((e,t)=>{const i=o.getSelectedElement();if(t&&i&&n.isImage(i)){const t=this.editor.model.createPositionAfter(i);this._uploadImage(e,r,t)}else this._uploadImage(e,r)}))}_uploadImage(e,t,o){const n=this.editor,r=n.plugins.get(Ab).createLoader(e),i=n.plugins.get("ImageUtils");r&&i.insertImage({...t,uploadId:r.id},o)}}class Wk extends Br{static get requires(){return[Ab,fm,Bb,Yb]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,o=e.conversion,n=e.plugins.get(Ab),r=e.plugins.get("ImageUtils"),i=e.plugins.get("ClipboardPipeline"),s=Dk(e.config.get("image.upload.types")),a=new Hk(e);e.commands.add("uploadImage",a),e.commands.add("imageUpload",a),o.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,o)=>{if(n=o.dataTransfer,Array.from(n.types).includes("text/html")&&""!==n.getData("text/html"))return;var n;const r=Array.from(o.dataTransfer.files).filter((e=>!!e&&s.test(e.type)));r.length&&(t.stop(),e.model.change((t=>{o.targetRanges&&t.setSelection(o.targetRanges.map((t=>e.editing.mapper.toModelRange(t)))),e.model.enqueueChange((()=>{e.execute("uploadImage",{file:r})}))})))})),this.listenTo(i,"inputTransformation",((t,o)=>{const i=Array.from(e.editing.view.createRangeIn(o.content)).map((e=>e.item)).filter((e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src")||!t.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!t.getAttribute("src").match(/^blob:/g))}(r,e)&&!e.getAttribute("uploadProcessed"))).map((e=>({promise:Sk(e),imageElement:e})));if(!i.length)return;const s=new Au(e.editing.view.document);for(const e of i){s.setAttribute("uploadProcessed",!0,e.imageElement);const t=n.createLoader(e.promise);t&&(s.setAttribute("src","",e.imageElement),s.setAttribute("uploadId",t.id,e.imageElement))}})),e.editing.view.document.on("dragover",((e,t)=>{t.preventDefault()})),t.on("change",(()=>{const o=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),r=new Set;for(const t of o)if("insert"==t.type&&"$text"!=t.name){const o=t.position.nodeAfter,i="$graveyard"==t.position.root.rootName;for(const t of $k(e,o)){const e=t.getAttribute("uploadId");if(!e)continue;const o=n.loaders.get(e);o&&(i?r.has(e)||o.abort():(r.add(e),this._uploadImageElements.set(e,t),"idle"==o.status&&this._readAndUpload(o)))}}})),this.on("uploadComplete",((e,{imageElement:t,data:o})=>{const n=o.urls?o.urls:o;this.editor.model.change((e=>{e.setAttribute("src",n.default,t),this._parseAndSetSrcsetAttributeOnImage(n,t,e)}))}),{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,o=t.model,r=t.locale.t,i=t.plugins.get(Ab),s=t.plugins.get(fm),a=t.plugins.get("ImageUtils"),l=this._uploadImageElements;return o.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","reading",l.get(e.id))})),e.read().then((()=>{const r=e.upload(),i=l.get(e.id);if(n.isSafari){const e=t.editing.mapper.toViewElement(i),o=a.findViewImgElement(e);t.editing.view.once("render",(()=>{if(!o.parent)return;const e=t.editing.view.domConverter.mapViewToDom(o.parent);if(!e)return;const n=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=n}))}return o.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","uploading",i)})),r})).then((t=>{o.enqueueChange({isUndoable:!1},(o=>{const n=l.get(e.id);o.setAttribute("uploadStatus","complete",n),this.fire("uploadComplete",{data:t,imageElement:n})})),c()})).catch((t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&s.showWarning(t,{title:r("Upload failed"),namespace:"upload"}),o.enqueueChange({isUndoable:!1},(t=>{t.remove(l.get(e.id))})),c()}));function c(){o.enqueueChange({isUndoable:!1},(t=>{const o=l.get(e.id);t.removeAttribute("uploadId",o),t.removeAttribute("uploadStatus",o),l.delete(e.id)})),i.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,o){let n=0;const r=Object.keys(e).filter((e=>{const t=parseInt(e,10);if(!isNaN(t))return n=Math.max(n,t),!0})).map((t=>`${e[t]} ${t}w`)).join(", ");""!=r&&o.setAttribute("srcset",{data:r,width:n},t)}}function $k(e,t){const o=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter((e=>o.isImage(e.item))).map((e=>e.item))}class Uk extends Br{static get pluginName(){return"ImageUpload"}static get requires(){return[Wk,Bk,Fk]}}var Gk=o(5150),Kk={attributes:{"data-cke":!0}};Kk.setAttributes=Wr(),Kk.insert=qr().bind(null,"head"),Kk.domAPI=Lr(),Kk.insertStyleElement=Ur();Or()(Gk.Z,Kk);Gk.Z&&Gk.Z.locals&&Gk.Z.locals;var Zk=o(9292),Jk={attributes:{"data-cke":!0}};Jk.setAttributes=Wr(),Jk.insert=qr().bind(null,"head"),Jk.domAPI=Lr(),Jk.insertStyleElement=Ur();Or()(Zk.Z,Jk);Zk.Z&&Zk.Z.locals&&Zk.Z.locals;class Qk extends Pr{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!t,t&&t.hasAttribute("width")?this.value={width:t.getAttribute("width"),height:null}:this.value=null}execute(e){const t=this.editor,o=t.model,n=t.plugins.get("ImageUtils").getClosestSelectedImageElement(o.document.selection);this.value={width:e.width,height:null},n&&o.change((t=>{t.setAttribute("width",e.width,n)}))}}class Yk extends Br{static get requires(){return[Yb]}static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new Qk(e);this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:"width"}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:"width"})}_registerConverters(e){const t=this.editor;t.conversion.for("downcast").add((t=>t.on(`attribute:width:${e}`,((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer,r=o.mapper.toViewElement(t.item);null!==t.attributeNewValue?(n.setStyle("width",t.attributeNewValue,r),n.addClass("image_resized",r)):(n.removeStyle("width",r),n.removeClass("image_resized",r))})))),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{width:/.+/}},model:{key:"width",value:e=>e.getStyle("width")}})}}const Xk={small:uh.objectSizeSmall,medium:uh.objectSizeMedium,large:uh.objectSizeLarge,original:uh.objectSizeFull};class ew extends Br{static get requires(){return[Yk]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),o=e.commands.get("resizeImage");this.bind("isEnabled").to(o);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:o,value:n,icon:r}=e,i=n?n+this._resizeUnit:null;t.ui.componentFactory.add(o,(o=>{const n=new op(o),s=t.commands.get("resizeImage"),a=this._getOptionLabelValue(e,!0);if(!Xk[r])throw new f("imageresizebuttons-missing-icon",t,e);return n.set({label:a,icon:Xk[r],tooltip:a,isToggleable:!0}),n.bind("isEnabled").to(this),n.bind("isOn").to(s,"value",tw(i)),this.listenTo(n,"execute",(()=>{t.execute("resizeImage",{width:i})})),n}))}_registerImageResizeDropdown(e){const t=this.editor,o=t.t,n=e.find((e=>!e.value)),r=r=>{const i=t.commands.get("resizeImage"),s=Xp(r,Sp),a=s.buttonView,l=o("Resize image");return a.set({tooltip:l,commandValue:n.value,icon:Xk.medium,isToggleable:!0,label:this._getOptionLabelValue(n),withText:!0,class:"ck-resize-image-button",ariaLabel:l,ariaLabelledBy:void 0}),a.bind("label").to(i,"value",(e=>e&&e.width?e.width:this._getOptionLabelValue(n))),s.bind("isEnabled").to(this),og(s,(()=>this._getResizeDropdownListItemDefinitions(e,i)),{ariaLabel:o("Image resize list"),role:"menu"}),this.listenTo(s,"execute",(e=>{t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus()})),s};t.ui.componentFactory.add("resizeImage",r),t.ui.componentFactory.add("imageResize",r)}_getOptionLabelValue(e,t=!1){const o=this.editor.t;return e.label?e.label:t?e.value?o("Resize image to %0",e.value+this._resizeUnit):o("Resize image to the original size"):e.value?e.value+this._resizeUnit:o("Original")}_getResizeDropdownListItemDefinitions(e,t){const o=new _r;return e.map((e=>{const n=e.value?e.value+this._resizeUnit:null,r={type:"button",model:new bm({commandName:"resizeImage",commandValue:n,label:this._getOptionLabelValue(e),role:"menuitemradio",withText:!0,icon:null})};r.model.bind("isOn").to(t,"value",tw(n)),o.add(r)})),o}}function tw(e){return t=>null===e&&t===e||null!==t&&t.width===e}const ow=/(image|image-inline)/,nw="image_resized";class rw extends Br{static get requires(){return[ub]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view;t.addObserver(hk),this.listenTo(t.document,"imageLoaded",((o,n)=>{if(!n.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const r=e.editing.view.domConverter,i=r.domToView(n.target).findAncestor({classes:ow});let s=this.editor.plugins.get(ub).getResizerByViewElement(i);if(s)return void s.redraw();const a=e.editing.mapper,l=a.toModelElement(i);s=e.plugins.get(ub).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:l,viewElement:i,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:()=>r.mapViewToDom(a.toViewElement(l.parent)),isCentered(){const e=l.getAttribute("imageStyle");return!e||"block"==e||"alignCenter"==e},onCommit(o){t.change((e=>{e.removeClass(nw,i)})),e.execute("resizeImage",{width:o})}}),s.on("updateSize",(()=>{i.hasClass(nw)||t.change((e=>{e.addClass(nw,i)}))})),s.bind("isEnabled").to(this)}))}}var iw=o(1043),sw={attributes:{"data-cke":!0}};sw.setAttributes=Wr(),sw.insert=qr().bind(null,"head"),sw.domAPI=Lr(),sw.insertStyleElement=Ur();Or()(iw.Z,sw);iw.Z&&iw.Z.locals&&iw.Z.locals;class aw extends Pr{constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map((e=>{if(e.isDefault)for(const t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]})))}refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(e={}){const t=this.editor,o=t.model,n=t.plugins.get("ImageUtils");o.change((t=>{const r=e.value;let i=n.getClosestSelectedImageElement(o.document.selection);r&&this.shouldConvertImageType(r,i)&&(this.editor.execute(n.isBlockImage(i)?"imageTypeInline":"imageTypeBlock"),i=n.getClosestSelectedImageElement(o.document.selection)),!r||this._styles.get(r).isDefault?t.removeAttribute("imageStyle",i):t.setAttribute("imageStyle",r,i)}))}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const{objectFullWidth:lw,objectInline:cw,objectLeft:dw,objectRight:uw,objectCenter:hw,objectBlockLeft:pw,objectBlockRight:gw}=uh,mw={get inline(){return{name:"inline",title:"In line",icon:cw,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:dw,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:pw,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:hw,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:uw,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:gw,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:hw,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:uw,modelElements:["imageBlock"],className:"image-style-side"}}},fw={full:lw,left:pw,right:gw,center:hw,inlineLeft:dw,inlineRight:uw,inline:cw},bw=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function kw(e){b("image-style-configuration-definition-invalid",e)}const ww={normalizeStyles:function(e){const t=(e.configuredStyles.options||[]).map((e=>function(e){e="string"==typeof e?mw[e]?{...mw[e]}:{name:e}:function(e,t){const o={...t};for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(o[n]=e[n]);return o}(mw[e.name],e);"string"==typeof e.icon&&(e.icon=fw[e.icon]||e.icon);return e}(e))).filter((t=>function(e,{isBlockPluginLoaded:t,isInlinePluginLoaded:o}){const{modelElements:n,name:r}=e;if(!(n&&n.length&&r))return kw({style:e}),!1;{const r=[t?"imageBlock":null,o?"imageInline":null];if(!n.some((e=>r.includes(e))))return b("image-style-missing-dependency",{style:e,missingPlugins:n.map((e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(t,e)));return t},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...bw]:[]},warnInvalidStyle:kw,DEFAULT_OPTIONS:mw,DEFAULT_ICONS:fw,DEFAULT_DROPDOWN_DEFINITIONS:bw};function _w(e,t){for(const o of t)if(o.name===e)return o}class yw extends Br{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[Yb]}init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=ww,o=this.editor,n=o.plugins.has("ImageBlockEditing"),r=o.plugins.has("ImageInlineEditing");o.config.define("image.styles",t(n,r)),this.normalizedStyles=e({configuredStyles:o.config.get("image.styles"),isBlockPluginLoaded:n,isInlinePluginLoaded:r}),this._setupConversion(n,r),this._setupPostFixer(),o.commands.add("imageStyle",new aw(o,this.normalizedStyles))}_setupConversion(e,t){const o=this.editor,n=o.model.schema,r=(i=this.normalizedStyles,(e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=_w(t.attributeNewValue,i),r=_w(t.attributeOldValue,i),s=o.mapper.toViewElement(t.item),a=o.writer;r&&a.removeClass(r.className,s),n&&a.addClass(n.className,s)});var i;const s=function(e){const t={imageInline:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageInline"))),imageBlock:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageBlock")))};return(e,o,n)=>{if(!o.modelRange)return;const r=o.viewItem,i=yr(o.modelRange.getItems());if(i&&n.schema.checkAttribute(i,"imageStyle"))for(const e of t[i.name])n.consumable.consume(r,{classes:e.className})&&n.writer.setAttribute("imageStyle",e.name,i)}}(this.normalizedStyles);o.editing.downcastDispatcher.on("attribute:imageStyle",r),o.data.downcastDispatcher.on("attribute:imageStyle",r),e&&(n.extend("imageBlock",{allowAttributes:"imageStyle"}),o.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),t&&(n.extend("imageInline",{allowAttributes:"imageStyle"}),o.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,o=e.plugins.get(Yb),n=new Map(this.normalizedStyles.map((e=>[e.name,e])));t.registerPostFixer((e=>{let r=!1;for(const i of t.differ.getChanges())if("insert"==i.type||"attribute"==i.type&&"imageStyle"==i.attributeKey){let t="insert"==i.type?i.position.nodeAfter:i.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!o.isImage(t))continue;const s=t.getAttribute("imageStyle");if(!s)continue;const a=n.get(s);a&&a.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),r=!0)}return r}))}}var Aw=o(4622),Cw={attributes:{"data-cke":!0}};Cw.setAttributes=Wr(),Cw.insert=qr().bind(null,"head"),Cw.domAPI=Lr(),Cw.insertStyleElement=Ur();Or()(Aw.Z,Cw);Aw.Z&&Aw.Z.locals&&Aw.Z.locals;class vw extends Br{static get requires(){return[yw]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],o=xw(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of o)this._createButton(e);const n=xw([...t.filter(N),...ww.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of n)this._createDropdown(e,o)}_createDropdown(e,t){const o=this.editor.ui.componentFactory;o.add(e.name,(n=>{let r;const{defaultItem:i,items:s,title:a}=e,l=s.filter((e=>t.find((({name:t})=>Ew(t)===e)))).map((e=>{const t=o.create(e);return e===i&&(r=t),t}));s.length!==l.length&&ww.warnInvalidStyle({dropdown:e});const c=Xp(n,Kp),d=c.buttonView,u=d.arrowView;return eg(c,l,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:Dw(a,r.label),class:null,tooltip:!0}),u.unbind("label"),u.set({label:a}),d.bind("icon").toMany(l,"isOn",((...e)=>{const t=e.findIndex(ji);return t<0?r.icon:l[t].icon})),d.bind("label").toMany(l,"isOn",((...e)=>{const t=e.findIndex(ji);return Dw(a,t<0?r.label:l[t].label)})),d.bind("isOn").toMany(l,"isOn",((...e)=>e.some(ji))),d.bind("class").toMany(l,"isOn",((...e)=>e.some(ji)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{l.some((({isOn:e})=>e))?c.isOpen=!c.isOpen:r.fire("execute")})),c.bind("isEnabled").toMany(l,"isEnabled",((...e)=>e.some(ji))),this.listenTo(c,"execute",(()=>{this.editor.editing.view.focus()})),c}))}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(Ew(t),(o=>{const n=this.editor.commands.get("imageStyle"),r=new op(o);return r.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",(e=>e===t)),r.on("execute",this._executeCommand.bind(this,t)),r}))}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function xw(e,t){for(const o of e)t[o.title]&&(o.title=t[o.title]);return e}function Ew(e){return`imageStyle:${e}`}function Dw(e,t){return(e?e+": ":"")+t}const Sw=Symbol("isWpButtonMacroSymbol");function Tw(e){const t=e.getSelectedElement();return!(!t||!function(e){return!!e.getCustomProperty(Sw)&&$m(e)}(t))}class Bw extends Br{static get pluginName(){return"OPChildPagesEditing"}static get buttonName(){return"insertChildPages"}init(){const e=this.editor,t=e.model,o=e.conversion;t.schema.register("op-macro-child-pages",{allowWhere:["$block"],allowAttributes:["page"],isBlock:!0,isLimit:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"child_pages"},model:(e,{writer:t})=>{const o=e.getAttribute("data-page")||"",n="true"==e.getAttribute("data-include-parent");return t.createElement("op-macro-child-pages",{page:o,includeParent:n})}}),o.for("editingDowncast").elementToElement({model:"op-macro-child-pages",view:(e,{writer:t})=>this.createMacroViewElement(e,t)}).add((e=>e.on("attribute:page",this.modelAttributeToView.bind(this)))).add((e=>e.on("attribute:includeParent",this.modelAttributeToView.bind(this)))),o.for("dataDowncast").elementToElement({model:"op-macro-child-pages",view:(e,{writer:t})=>t.createContainerElement("macro",{class:"child_pages","data-page":e.getAttribute("page")||"","data-include-parent":e.getAttribute("includeParent")||""})}),e.ui.componentFactory.add(Bw.buttonName,(t=>{const o=new op(t);return o.set({label:window.I18n.t("js.editor.macro.child_pages.button"),withText:!0}),o.on("execute",(()=>{e.model.change((t=>{const o=t.createElement("op-macro-child-pages",{});e.model.insertContent(o,e.model.document.selection)}))})),o}))}modelAttributeToView(e,t,o){const n=t.item;if(!n.is("element","op-macro-child-pages"))return;o.consumable.consume(t.item,e.name);const r=o.mapper.toViewElement(n);o.writer.remove(o.writer.createRangeIn(r)),this.setPlaceholderContent(o.writer,n,r)}macroLabel(){return window.I18n.t("js.editor.macro.child_pages.text")}pageLabel(e){return e&&e.length>0?e:window.I18n.t("js.editor.macro.child_pages.this_page")}includeParentText(e){return e?` (${window.I18n.t("js.editor.macro.child_pages.include_parent")})`:""}createMacroViewElement(e,t){const o=t.createContainerElement("div");return this.setPlaceholderContent(t,e,o),function(e,t,o){return t.setCustomProperty(Sw,!0,e),Um(e,t,{label:o})}(o,t,{label:this.macroLabel()})}setPlaceholderContent(e,t,o){const n=t.getAttribute("page"),r=t.getAttribute("includeParent"),i=this.macroLabel(),s=this.pageLabel(n),a=e.createContainerElement("span",{class:"macro-value"});let l=[e.createText(`${i} `)];e.insert(e.createPositionAt(a,0),e.createText(`${s}`)),l.push(a),l.push(e.createText(this.includeParentText(r))),e.insert(e.createPositionAt(o,0),l)}}class Iw extends Br{static get requires(){return[Cm]}static get pluginName(){return"OPChildPagesToolbar"}init(){const e=this.editor,t=this.editor.model,o=of(e);hb(e,"opEditChildPagesMacroButton",(e=>{const n=o.services.macros,r=e.getAttribute("page"),i=e.getAttribute("includeParent"),s=r&&r.length>0?r:"";n.configureChildPages(s,i).then((o=>t.change((t=>{t.setAttribute("page",o.page,e),t.setAttribute("includeParent",o.includeParent,e)}))))}))}afterInit(){gb(this,this.editor,"OPChildPages",Tw)}}class Pw extends Pr{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let o=e.schema.getLimitElement(t);if(t.containsEntireContent(o)||!Rw(e.schema,o))do{if(o=o.parent,!o)return}while(!Rw(e.schema,o));e.change((e=>{e.setSelection(o,"in")}))}}function Rw(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const zw=hr("Ctrl+A");class Mw extends Br{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new Pw(e)),this.listenTo(t,"keydown",((t,o)=>{ur(o)===zw&&(e.execute("selectAll"),o.preventDefault())}))}}class Nw extends Br{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(t=>{const o=e.commands.get("selectAll"),n=new op(t),r=t.t;return n.set({label:r("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),n.bind("isEnabled").to(o,"isEnabled"),this.listenTo(n,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),n}))}}class Fw extends Br{static get requires(){return[Mw,Nw]}static get pluginName(){return"SelectAll"}}const Ow="ckCsrfToken",Vw="abcdefghijklmnopqrstuvwxyz0123456789";function Lw(){let e=function(e){e=e.toLowerCase();const t=document.cookie.split(";");for(const o of t){const t=o.split("=");if(decodeURIComponent(t[0].trim().toLowerCase())===e)return decodeURIComponent(t[1])}return null}(Ow);var t,o;return e&&40==e.length||(e=function(e){let t="";const o=new Uint8Array(e);window.crypto.getRandomValues(o);for(let e=0;e.5?n.toUpperCase():n}return t}(40),t=Ow,o=e,document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(o)+";path=/"),e}class jw{constructor(e,t,o){this.loader=e,this.url=t,this.t=o}upload(){return this.loader.file.then((e=>new Promise(((t,o)=>{this._initRequest(),this._initListeners(t,o,e),this._sendRequest(e)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,o){const n=this.xhr,r=this.loader,i=(0,this.t)("Cannot upload file:")+` ${o.name}.`;n.addEventListener("error",(()=>t(i))),n.addEventListener("abort",(()=>t())),n.addEventListener("load",(()=>{const o=n.response;if(!o||!o.uploaded)return t(o&&o.error&&o.error.message?o.error.message:i);e({default:o.url})})),n.upload&&n.upload.addEventListener("progress",(e=>{e.lengthComputable&&(r.uploadTotal=e.total,r.uploaded=e.loaded)}))}_sendRequest(e){const t=new FormData;t.append("upload",e),t.append("ckCsrfToken",Lw()),this.xhr.send(t)}}function qw(e,t,o,n){let r,i=null;"function"==typeof n?r=n:(i=e.commands.get(n),r=()=>{e.execute(n)}),e.model.document.on("change:data",((s,a)=>{if(i&&!i.isEnabled||!t.isEnabled)return;const l=yr(e.model.document.selection.getRanges());if(!l.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const c=Array.from(e.model.document.differ.getChanges()),d=c[0];if(1!=c.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const u=d.position.parent;if(u.is("element","codeBlock"))return;if(u.is("element","listItem")&&"function"!=typeof n&&!["numberedList","bulletedList","todoList"].includes(n))return;if(i&&!0===i.value)return;const h=u.getChild(0),p=e.model.createRangeOn(h);if(!p.containsRange(l)&&!l.end.isEqual(p.end))return;const g=o.exec(h.data.substr(0,l.end.offset));g&&e.model.enqueueChange((t=>{const o=t.createPositionAt(u,0),n=t.createPositionAt(u,g[0].length),i=new Kl(o,n);if(!1!==r({match:g})){t.remove(i);const o=e.model.document.selection.getFirstRange(),n=t.createRangeIn(u);!u.isEmpty||n.isEqual(o)||n.containsRange(o,!0)||t.remove(u)}i.detach(),e.model.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function Hw(e,t,o,n){let r,i;o instanceof RegExp?r=o:i=o,i=i||(e=>{let t;const o=[],n=[];for(;null!==(t=r.exec(e))&&!(t&&t.length<4);){let{index:e,1:r,2:i,3:s}=t;const a=r+i+s;e+=t[0].length-a.length;const l=[e,e+r.length],c=[e+r.length+i.length,e+r.length+i.length+s.length];o.push(l),o.push(c),n.push([e+r.length,e+r.length+i.length])}return{remove:o,format:n}}),e.model.document.on("change:data",((o,r)=>{if(r.isUndo||!r.isLocal||!t.isEnabled)return;const s=e.model,a=s.document.selection;if(!a.isCollapsed)return;const l=Array.from(s.document.differ.getChanges()),c=l[0];if(1!=l.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const d=a.focus,u=d.parent,{text:h,range:p}=function(e,t){let o=e.start;const n=Array.from(e.getItems()).reduce(((e,n)=>!n.is("$text")&&!n.is("$textProxy")||n.getAttribute("code")?(o=t.createPositionAfter(n),""):e+n.data),"");return{text:n,range:t.createRange(o,e.end)}}(s.createRange(s.createPositionAt(u,0),d),s),g=i(h),m=Ww(p.start,g.format,s),f=Ww(p.start,g.remove,s);m.length&&f.length&&s.enqueueChange((t=>{if(!1!==n(t,m)){for(const e of f.reverse())t.remove(e);s.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function Ww(e,t,o){return t.filter((e=>void 0!==e[0]&&void 0!==e[1])).map((t=>o.createRange(e.getShiftedBy(t[0]),e.getShiftedBy(t[1]))))}function $w(e,t){return(o,n)=>{if(!e.commands.get(t).isEnabled)return!1;const r=e.model.schema.getValidRanges(n,t);for(const e of r)o.setAttribute(t,!0,e);o.removeSelectionAttribute(t)}}class Uw extends Pr{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,o=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(o.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const r=t.schema.getValidRanges(o.getRanges(),this.attributeKey);for(const t of r)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,o=e.document.selection;if(o.isCollapsed)return o.hasAttribute(this.attributeKey);for(const e of o.getRanges())for(const o of e.getItems())if(t.checkAttribute(o,this.attributeKey))return o.hasAttribute(this.attributeKey);return!1}}const Gw="bold";class Kw extends Br{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Gw}),e.model.schema.setAttributeProperties(Gw,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Gw,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t&&("bold"==t||Number(t)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add(Gw,new Uw(e,Gw)),e.keystrokes.set("CTRL+B",Gw)}}const Zw="bold";class Jw extends Br{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Zw,(o=>{const n=e.commands.get(Zw),r=new op(o);return r.set({label:t("Bold"),icon:uh.bold,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute(Zw),e.editing.view.focus()})),r}))}}const Qw="code";class Yw extends Br{static get pluginName(){return"CodeEditing"}static get requires(){return[vf]}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Qw}),e.model.schema.setAttributeProperties(Qw,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:Qw,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),e.commands.add(Qw,new Uw(e,Qw)),e.plugins.get(vf).registerAttribute(Qw),Pf(e,Qw,"code","ck-code_selected")}}var Xw=o(8180),e_={attributes:{"data-cke":!0}};e_.setAttributes=Wr(),e_.insert=qr().bind(null,"head"),e_.domAPI=Lr(),e_.insertStyleElement=Ur();Or()(Xw.Z,e_);Xw.Z&&Xw.Z.locals&&Xw.Z.locals;const t_="code";class o_ extends Br{static get pluginName(){return"CodeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(t_,(o=>{const n=e.commands.get(t_),r=new op(o);return r.set({label:t("Code"),icon:'',tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute(t_),e.editing.view.focus()})),r}))}}const n_="italic";class r_ extends Br{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:n_}),e.model.schema.setAttributeProperties(n_,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:n_,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(n_,new Uw(e,n_)),e.keystrokes.set("CTRL+I",n_)}}const i_="italic";class s_ extends Br{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(i_,(o=>{const n=e.commands.get(i_),r=new op(o);return r.set({label:t("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute(i_),e.editing.view.focus()})),r}))}}const a_="strikethrough";class l_ extends Br{static get pluginName(){return"StrikethroughEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:a_}),e.model.schema.setAttributeProperties(a_,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:a_,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(a_,new Uw(e,a_)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}const c_="strikethrough";class d_ extends Br{static get pluginName(){return"StrikethroughUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(c_,(o=>{const n=e.commands.get(c_),r=new op(o);return r.set({label:t("Strikethrough"),icon:'',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute(c_),e.editing.view.focus()})),r}))}}class u_ extends Pr{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,o=t.schema,n=t.document.selection,r=Array.from(n.getSelectedBlocks()),i=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(i){const t=r.filter((e=>h_(e)||g_(o,e)));this._applyQuote(e,t)}else this._removeQuote(e,r.filter(h_))}))}_getValue(){const e=yr(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!h_(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,o=yr(e.getSelectedBlocks());return!!o&&g_(t,o)}_removeQuote(e,t){p_(e,t).reverse().forEach((t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const o=e.createPositionBefore(t.start.parent);return void e.move(t,o)}t.end.isAtEnd||e.split(t.end);const o=e.createPositionAfter(t.end.parent);e.move(t,o)}))}_applyQuote(e,t){const o=[];p_(e,t).reverse().forEach((t=>{let n=h_(t.start);n||(n=e.createElement("blockQuote"),e.wrap(t,n)),o.push(n)})),o.reverse().reduce(((t,o)=>t.nextSibling==o?(e.merge(e.createPositionAfter(t)),t):o))}}function h_(e){return"blockQuote"==e.parent.name?e.parent:null}function p_(e,t){let o,n=0;const r=[];for(;n{const n=e.model.document.differ.getChanges();for(const e of n)if("insert"==e.type){const n=e.position.nodeAfter;if(!n)continue;if(n.is("element","blockQuote")&&n.isEmpty)return o.remove(n),!0;if(n.is("element","blockQuote")&&!t.checkChild(e.position,n))return o.unwrap(n),!0;if(n.is("element")){const e=o.createRangeIn(n);for(const n of e.getItems())if(n.is("element","blockQuote")&&!t.checkChild(o.createPositionBefore(n),n))return o.unwrap(n),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return o.remove(t),!0}return!1}));const o=this.editor.editing.view.document,n=e.model.document.selection,r=e.commands.get("blockQuote");this.listenTo(o,"enter",((t,o)=>{if(!n.isCollapsed||!r.value)return;n.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),o.preventDefault(),t.stop())}),{context:"blockquote"}),this.listenTo(o,"delete",((t,o)=>{if("backward"!=o.direction||!n.isCollapsed||!r.value)return;const i=n.getLastPosition().parent;i.isEmpty&&!i.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),o.preventDefault(),t.stop())}),{context:"blockquote"})}}var f_=o(636),b_={attributes:{"data-cke":!0}};b_.setAttributes=Wr(),b_.insert=qr().bind(null,"head"),b_.domAPI=Lr(),b_.insertStyleElement=Ur();Or()(f_.Z,b_);f_.Z&&f_.Z.locals&&f_.Z.locals;class k_ extends Br{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",(o=>{const n=e.commands.get("blockQuote"),r=new op(o);return r.set({label:t("Block quote"),icon:uh.quote,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute("blockQuote"),e.editing.view.focus()})),r}))}}class w_ extends Pr{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=yr(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&__(t,e.schema)}execute(e={}){const t=this.editor.model,o=t.document,n=e.selection||o.selection;t.canEditAt(n)&&t.change((e=>{const o=n.getSelectedBlocks();for(const n of o)!n.is("element","paragraph")&&__(n,t.schema)&&e.rename(n,"paragraph")}))}}function __(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class y_ extends Pr{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,o=e.attributes;let n=e.position;t.canEditAt(n)&&t.change((e=>{const r=e.createElement("paragraph");if(o&&t.schema.setAllowedAttributes(r,o,e),!t.schema.checkChild(n.parent,r)){const o=t.schema.findAllowedParent(n,r);if(!o)return;n=e.split(n,o).position}t.insertContent(r,n),e.setSelection(r,"in")}))}}class A_ extends Br{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new w_(e)),e.commands.add("insertParagraph",new y_(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>A_.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}A_.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class C_ extends Pr{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=yr(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t=>v_(e,t,this.editor.model.schema)))}execute(e){const t=this.editor.model,o=t.document,n=e.value;t.change((e=>{const r=Array.from(o.selection.getSelectedBlocks()).filter((e=>v_(e,n,t.schema)));for(const t of r)t.is("element",n)||e.rename(t,n)}))}}function v_(e,t,o){return o.checkChild(e.parent,t)&&!o.isObject(e)}const x_="paragraph";class E_ extends Br{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[A_]}init(){const e=this.editor,t=e.config.get("heading.options"),o=[];for(const n of t)"paragraph"!==n.model&&(e.model.schema.register(n.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(n),o.push(n.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new C_(e,o))}afterInit(){const e=this.editor,t=e.commands.get("enter"),o=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",((t,n)=>{const r=e.model.document.selection.getFirstPosition().parent;o.some((e=>r.is("element",e.model)))&&!r.is("element",x_)&&0===r.childCount&&n.writer.rename(r,x_)}))}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:p.get("low")+1})}}var D_=o(3230),S_={attributes:{"data-cke":!0}};S_.setAttributes=Wr(),S_.insert=qr().bind(null,"head"),S_.domAPI=Lr(),S_.insertStyleElement=Ur();Or()(D_.Z,S_);D_.Z&&D_.Z.locals&&D_.Z.locals;class T_ extends Br{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,o=function(e){const t=e.t,o={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map((e=>{const t=o[e.title];return t&&t!=e.title&&(e.title=t),e}))}(e),n=t("Choose heading"),r=t("Heading");e.ui.componentFactory.add("heading",(t=>{const i={},s=new _r,a=e.commands.get("heading"),l=e.commands.get("paragraph"),c=[a];for(const e of o){const t={type:"button",model:new bm({label:e.title,class:e.class,role:"menuitemradio",withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(l,"value"),t.model.set("commandName","paragraph"),c.push(l)):(t.model.bind("isOn").to(a,"value",(t=>t===e.model)),t.model.set({commandName:"heading",commandValue:e.model})),s.add(t),i[e.model]=e.title}const d=Xp(t);return og(d,s,{ariaLabel:r,role:"menu"}),d.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(c,"isEnabled",((...e)=>e.some((e=>e)))),d.buttonView.bind("label").to(a,"value",l,"value",((e,t)=>{const o=e||t&&"paragraph";return"boolean"==typeof o?n:i[o]?i[o]:n})),this.listenTo(d,"execute",(t=>{const{commandName:o,commandValue:n}=t.source;e.execute(o,n?{value:n}:void 0),e.editing.view.focus()})),d}))}}new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);class B_{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach((e=>this._definitions.add(e))):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",((e,t,o)=>{if(!o.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!o.schema.isInline(t.item))return;const n=o.writer,r=n.document.selection;for(const e of this._definitions){const i=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,i);for(const t in e.styles)n.setStyle(t,e.styles[t],i);n.setCustomProperty("link",!0,i),e.callback(t.attributeNewValue)?t.item.is("selection")?n.wrap(r.getFirstRange(),i):n.wrap(o.mapper.toViewRange(t.range),i):n.unwrap(o.mapper.toViewRange(t.range),i)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,t,{writer:o,mapper:n})=>{const r=n.toViewElement(t.item),i=Array.from(r.getChildren()).find((e=>e.is("element","a")));for(const e of this._definitions){const n=vr(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of n)"class"===e?o.addClass(t,i):o.setAttribute(e,t,i);e.classes&&o.addClass(e.classes,i);for(const t in e.styles)o.setStyle(t,e.styles[t],i)}else{for(const[e,t]of n)"class"===e?o.removeClass(t,i):o.removeAttribute(e,i);e.classes&&o.removeClass(e.classes,i);for(const t in e.styles)o.removeStyle(t,i)}}}))}}}const I_=function(e,t,o){var n=e.length;return o=void 0===o?n:o,!t&&o>=n?e:Ti(e,t,o)};var P_=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const R_=function(e){return P_.test(e)};const z_=function(e){return e.split("")};var M_="\\ud800-\\udfff",N_="["+M_+"]",F_="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",O_="\\ud83c[\\udffb-\\udfff]",V_="[^"+M_+"]",L_="(?:\\ud83c[\\udde6-\\uddff]){2}",j_="[\\ud800-\\udbff][\\udc00-\\udfff]",q_="(?:"+F_+"|"+O_+")"+"?",H_="[\\ufe0e\\ufe0f]?",W_=H_+q_+("(?:\\u200d(?:"+[V_,L_,j_].join("|")+")"+H_+q_+")*"),$_="(?:"+[V_+F_+"?",F_,L_,j_,N_].join("|")+")",U_=RegExp(O_+"(?="+O_+")|"+$_+W_,"g");const G_=function(e){return e.match(U_)||[]};const K_=function(e){return R_(e)?G_(e):z_(e)};const Z_=function(e){return function(t){t=vi(t);var o=R_(t)?K_(t):void 0,n=o?o[0]:t.charAt(0),r=o?I_(o,1).join(""):t.slice(1);return n[e]()+r}}("toUpperCase"),J_=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Q_=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,Y_=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,X_=/^((\w+:(\/{2,})?)|(\W))/i,ey="Ctrl+K";function ty(e,{writer:t}){const o=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,o),o}function oy(e){const t=String(e);return function(e){const t=e.replace(J_,"");return!!t.match(Q_)}(t)?t:"#"}function ny(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function ry(e,t){const o=(n=e,Y_.test(n)?"mailto:":t);var n;const r=!!o&&!iy(e);return e&&r?o+e:e}function iy(e){return X_.test(e)}function sy(e){window.open(e,"_blank","noopener")}class ay extends Pr{constructor(){super(...arguments),this.manualDecorators=new _r,this.automaticDecorators=new B_}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,o=t.getSelectedElement()||yr(t.getSelectedBlocks());ny(o,e.schema)?(this.value=o.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(o,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const o=this.editor.model,n=o.document.selection,r=[],i=[];for(const e in t)t[e]?r.push(e):i.push(e);o.change((t=>{if(n.isCollapsed){const s=n.getFirstPosition();if(n.hasAttribute("linkHref")){const a=ly(n);let l=Bf(s,"linkHref",n.getAttribute("linkHref"),o);n.getAttribute("linkHref")===a&&(l=this._updateLinkContent(o,t,l,e)),t.setAttribute("linkHref",e,l),r.forEach((e=>{t.setAttribute(e,!0,l)})),i.forEach((e=>{t.removeAttribute(e,l)})),t.setSelection(t.createPositionAfter(l.end.nodeBefore))}else if(""!==e){const i=vr(n.getAttributes());i.set("linkHref",e),r.forEach((e=>{i.set(e,!0)}));const{end:a}=o.insertContent(t.createText(e,i),s);t.setSelection(a)}["linkHref",...r,...i].forEach((e=>{t.removeSelectionAttribute(e)}))}else{const s=o.schema.getValidRanges(n.getRanges(),"linkHref"),a=[];for(const e of n.getSelectedBlocks())o.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const l=a.slice();for(const e of s)this._isRangeToUpdate(e,a)&&l.push(e);for(const s of l){let a=s;if(1===l.length){const r=ly(n);n.getAttribute("linkHref")===r&&(a=this._updateLinkContent(o,t,s,e),t.setSelection(t.createSelection(a)))}t.setAttribute("linkHref",e,a),r.forEach((e=>{t.setAttribute(e,!0,a)})),i.forEach((e=>{t.removeAttribute(e,a)}))}}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,o=t.document.selection,n=o.getSelectedElement();return ny(n,t.schema)?n.getAttribute(e):o.getAttribute(e)}_isRangeToUpdate(e,t){for(const o of t)if(o.containsRange(e))return!1;return!0}_updateLinkContent(e,t,o,n){const r=t.createText(n,{linkHref:n});return e.insertContent(r,o)}}function ly(e){if(e.isCollapsed){const t=e.getFirstPosition();return t.textNode&&t.textNode.data}{const t=Array.from(e.getFirstRange().getItems());if(t.length>1)return null;const o=t[0];return o.is("$text")||o.is("$textProxy")?o.data:null}}class cy extends Pr{refresh(){const e=this.editor.model,t=e.document.selection,o=t.getSelectedElement();ny(o,e.schema)?this.isEnabled=e.schema.checkAttribute(o,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,o=t.document.selection,n=e.commands.get("link");t.change((e=>{const r=o.isCollapsed?[Bf(o.getFirstPosition(),"linkHref",o.getAttribute("linkHref"),t)]:t.schema.getValidRanges(o.getRanges(),"linkHref");for(const t of r)if(e.removeAttribute("linkHref",t),n)for(const o of n.manualDecorators)e.removeAttribute(o.id,t)}))}}class dy extends(H()){constructor({id:e,label:t,attributes:o,classes:n,styles:r,defaultValue:i}){super(),this.id=e,this.set("value",void 0),this.defaultValue=i,this.label=t,this.attributes=o,this.classes=n,this.styles=r}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var uy=o(399),hy={attributes:{"data-cke":!0}};hy.setAttributes=Wr(),hy.insert=qr().bind(null,"head"),hy.domAPI=Lr(),hy.insertStyleElement=Ur();Or()(uy.Z,hy);uy.Z&&uy.Z.locals&&uy.Z.locals;const py="automatic",gy=/^(https?:)?\/\//;class my extends Br{static get pluginName(){return"LinkEditing"}static get requires(){return[vf,uf,Bb]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:ty}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>ty(oy(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new ay(e)),e.commands.add("unlink",new cy(e));const t=function(e,t){const o={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach((e=>("label"in e&&o[e.label]&&(e.label=o[e.label]),e))),t}(e.t,function(e){const t=[];if(e)for(const[o,n]of Object.entries(e)){const e=Object.assign({},n,{id:`link${Z_(o)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter((e=>e.mode===py))),this._enableManualDecorators(t.filter((e=>"manual"===e.mode)));e.plugins.get(vf).registerAttribute("linkHref"),Pf(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink(),this._enableClipboardIntegration()}_enableAutomaticDecorators(e){const t=this.editor,o=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&o.add({id:"linkIsExternal",mode:py,callback:e=>!!e&&gy.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),o.add(e),o.length&&t.conversion.for("downcast").add(o.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,o=t.commands.get("link").manualDecorators;e.forEach((e=>{t.model.schema.extend("$text",{allowAttributes:e.id});const n=new dy(e);o.add(n),t.conversion.for("downcast").attributeToElement({model:n.id,view:(e,{writer:t,schema:o},{item:r})=>{if((r.is("selection")||o.isInline(r))&&e){const e=t.createAttributeElement("a",n.attributes,{priority:5});n.classes&&t.addClass(n.classes,e);for(const o in n.styles)t.setStyle(o,n.styles[o],e);return t.setCustomProperty("link",!0,e),e}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...n._createPattern()},model:{key:n.id}})}))}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((e,t)=>{if(!(n.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let o=t.domTarget;if("a"!=o.tagName.toLowerCase()&&(o=o.closest("a")),!o)return;const r=o.getAttribute("href");r&&(e.stop(),t.preventDefault(),sy(r))}),{context:"$capture"}),this.listenTo(t,"keydown",((t,o)=>{const n=e.commands.get("link").value;!!n&&o.keyCode===cr.enter&&o.altKey&&(t.stop(),sy(n))}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(e,"insertContent",(()=>{const o=t.anchor.nodeBefore,n=t.anchor.nodeAfter;t.hasAttribute("linkHref")&&o&&o.hasAttribute("linkHref")&&(n&&n.hasAttribute("linkHref")||e.change((t=>{fy(t,ky(e.schema))})))}),{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,t=e.model;e.editing.view.addObserver(yu);let o=!1;this.listenTo(e.editing.view.document,"mousedown",(()=>{o=!0})),this.listenTo(e.editing.view.document,"selectionChange",(()=>{if(!o)return;o=!1;const e=t.document.selection;if(!e.isCollapsed)return;if(!e.hasAttribute("linkHref"))return;const n=e.getFirstPosition(),r=Bf(n,"linkHref",e.getAttribute("linkHref"),t);(n.isTouching(r.start)||n.isTouching(r.end))&&t.change((e=>{fy(e,ky(t.schema))}))}))}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let o=null,n=!1;this.listenTo(t.document,"delete",(()=>{n=!0}),{priority:"high"}),this.listenTo(e.model,"deleteContent",(()=>{const t=e.model.document.selection;t.isCollapsed||(n?n=!1:by(e)&&function(e){const t=e.document.selection,o=t.getFirstPosition(),n=t.getLastPosition(),r=o.nodeAfter;if(!r)return!1;if(!r.is("$text"))return!1;if(!r.hasAttribute("linkHref"))return!1;const i=n.textNode||n.nodeBefore;if(r===i)return!0;return Bf(o,"linkHref",r.getAttribute("linkHref"),e).containsRange(e.createRange(o,n),!0)}(e.model)&&(o=t.getAttributes()))}),{priority:"high"}),this.listenTo(e.model,"insertContent",((t,[r])=>{n=!1,by(e)&&o&&(e.model.change((e=>{for(const[t,n]of o)e.setAttribute(t,n,r)})),o=null)}),{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,o=t.document.selection,n=e.editing.view;let r=!1,i=!1;this.listenTo(n.document,"delete",((e,t)=>{i="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{r=!1;const e=o.getFirstPosition(),n=o.getAttribute("linkHref");if(!n)return;const i=Bf(e,"linkHref",n,t);r=i.containsPosition(e)||i.end.isEqual(e)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{i&&(i=!1,r||e.model.enqueueChange((e=>{fy(e,ky(t.schema))})))}),{priority:"low"})}_enableClipboardIntegration(){const e=this.editor,t=e.model,o=this.editor.config.get("link.defaultProtocol");o&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",((e,n)=>{t.change((e=>{const t=e.createRangeIn(n.content);for(const n of t.getItems())if(n.hasAttribute("linkHref")){const t=ry(n.getAttribute("linkHref"),o);e.setAttribute("linkHref",t,n)}}))}))}}function fy(e,t){e.removeSelectionAttribute("linkHref");for(const o of t)e.removeSelectionAttribute(o)}function by(e){return e.model.change((e=>e.batch)).isTyping}function ky(e){return e.getDefinition("$text").allowAttributes.filter((e=>e.startsWith("link")))}var wy=o(4827),_y={attributes:{"data-cke":!0}};_y.setAttributes=Wr(),_y.insert=qr().bind(null,"head"),_y.domAPI=Lr(),_y.insertStyleElement=Ur();Or()(wy.Z,_y);wy.Z&&wy.Z.locals&&wy.Z.locals;class yy extends Sh{constructor(e,t){super(e),this.focusTracker=new Ar,this.keystrokes=new Cr,this._focusables=new xh;const o=e.t;this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(o("Save"),uh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(o("Cancel"),uh.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const n=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&n.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:n,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),Ch({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new kp(this.locale,ig);return t.label=e("Link URL"),t}_createButton(e,t,o,n){const r=new op(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:o}}),n&&r.delegate("execute").to(this,n),r}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const o of e.manualDecorators){const n=new ip(this.locale);n.set({name:o.id,label:o.label,withText:!0}),n.bind("isOn").toMany([o,e],"value",((e,t)=>void 0===t&&void 0===e?!!o.defaultValue:!!e)),n.on("execute",(()=>{o.set("value",!n.isOn)})),t.add(n)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new Sh;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}var Ay=o(9465),Cy={attributes:{"data-cke":!0}};Cy.setAttributes=Wr(),Cy.insert=qr().bind(null,"head"),Cy.domAPI=Lr(),Cy.insertStyleElement=Ur();Or()(Ay.Z,Cy);Ay.Z&&Ay.Z.locals&&Ay.Z.locals;class vy extends Sh{constructor(e){super(e),this.focusTracker=new Ar,this.keystrokes=new Cr,this._focusables=new xh;const t=e.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'',"unlink"),this.editButtonView=this._createButton(t("Edit link"),uh.pencil,"edit"),this.set("href",void 0),this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,o){const n=new op(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.delegate("execute").to(this,o),n}_createPreviewButton(){const e=new op(this.locale),t=this.bindTemplate,o=this.t;return e.set({withText:!0,tooltip:o("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&oy(e))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||o("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}const xy="link-ui";class Ey extends Br{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[Cm]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(_u),this._balloon=e.plugins.get(Cm),this._createToolbarLinkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:xy,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:xy,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new vy(e.locale),o=e.commands.get("link"),n=e.commands.get("unlink");return t.bind("href").to(o,"value"),t.editButtonView.bind("isEnabled").to(o),t.unlinkButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",(()=>{this._addFormView()})),this.listenTo(t,"unlink",(()=>{e.execute("unlink"),this._hideUI()})),t.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),t.keystrokes.set(ey,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),o=e.config.get("link.defaultProtocol"),n=new(Ah(yy))(e.locale,t);return n.urlInputView.fieldView.bind("value").to(t,"value"),n.urlInputView.bind("isEnabled").to(t,"isEnabled"),n.saveButtonView.bind("isEnabled").to(t),this.listenTo(n,"submit",(()=>{const{value:t}=n.urlInputView.fieldView.element,r=ry(t,o);e.execute("link",r,n.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(n,"cancel",(()=>{this._closeFormView()})),n.keystrokes.set("Esc",((e,t)=>{this._closeFormView(),t()})),n}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),o=e.t;e.ui.componentFactory.add("link",(e=>{const n=new op(e);return n.isEnabled=!0,n.label=o("Link"),n.icon='',n.keystroke=ey,n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(t,"isEnabled"),n.bind("isOn").to(t,"value",(e=>!!e)),this.listenTo(n,"execute",(()=>this._showUI(!0))),n}))}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),e.keystrokes.set(ey,((t,o)=>{o(),e.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((e,t)=>{this._isUIVisible&&(this._hideUI(),t())})),yh({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let o=this._getSelectedLinkElement(),n=i();const r=()=>{const e=this._getSelectedLinkElement(),t=i();o&&!e||!o&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),o=e,n=t};function i(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",r),this.listenTo(this._balloon,"change:visibleView",r)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return!!this.formView&&e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,o=e.document;let n;if(t.markers.has(xy)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(xy)),o=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));n=e.domConverter.viewRangeToDom(o)}else n=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(o.selection.getFirstRange())};return{target:n}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,o=t.getSelectedElement();if(t.isCollapsed||o&&$m(o))return Dy(t.getFirstPosition());{const o=t.getFirstRange().getTrimmed(),n=Dy(o.start),r=Dy(o.end);return n&&n==r&&e.createRangeIn(n).getTrimmed().isEqual(o)?n:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const o=e.document.selection.getFirstRange();if(e.markers.has(xy))t.updateMarker(xy,{range:o});else if(o.start.isAtEnd){const n=o.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:o});t.addMarker(xy,{usingOperation:!1,affectsData:!1,range:t.createRange(n,o.end)})}else t.addMarker(xy,{usingOperation:!1,affectsData:!1,range:o})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(xy)&&e.change((e=>{e.removeMarker(xy)}))}}function Dy(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))||null}const Sy=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class Ty extends Br{static get requires(){return[_f]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new Cf(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=By(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,o)=>{const{batch:n,range:r,url:i}=o;if(!n.isTyping)return;const s=r.end.getShiftedBy(-1),a=s.getShiftedBy(-i.length),l=e.model.createRange(a,s);this._applyAutoLink(i,l)})),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,o=e.commands.get("enter");o&&o.on("execute",(()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const o=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(o)}))}_enableShiftEnterHandling(){const e=this.editor,t=e.model,o=e.commands.get("shiftEnter");o&&o.on("execute",(()=>{const e=t.document.selection.getFirstPosition(),o=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(o)}))}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:o,range:n}=Af(e,t),r=By(o);if(r){const e=t.createRange(n.end.getShiftedBy(-r.length),n.end);this._applyAutoLink(r,e)}}_applyAutoLink(e,t){const o=this.editor.model,n=ry(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,o)&&iy(n)&&!function(e){const t=e.start.nodeAfter;return!!t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(n,t)}_persistAutoLink(e,t){const o=this.editor.model,n=this.editor.plugins.get("Delete");o.enqueueChange((r=>{r.setAttribute("linkHref",e,t),o.enqueueChange((()=>{n.requestUndoOnBackspace()}))}))}}function By(e){const t=Sy.exec(e);return t?t[2]:null}var Iy=o(3858),Py={attributes:{"data-cke":!0}};Py.setAttributes=Wr(),Py.insert=qr().bind(null,"head"),Py.domAPI=Lr(),Py.insertStyleElement=Ur();Or()(Iy.Z,Py);Iy.Z&&Iy.Z.locals&&Iy.Z.locals;Symbol.iterator;Symbol.iterator;var Ry=o(8676),zy={attributes:{"data-cke":!0}};zy.setAttributes=Wr(),zy.insert=qr().bind(null,"head"),zy.domAPI=Lr(),zy.insertStyleElement=Ur();Or()(Ry.Z,zy);Ry.Z&&Ry.Z.locals&&Ry.Z.locals;var My=o(9989),Ny={attributes:{"data-cke":!0}};Ny.setAttributes=Wr(),Ny.insert=qr().bind(null,"head"),Ny.domAPI=Lr(),Ny.insertStyleElement=Ur();Or()(My.Z,Ny);My.Z&&My.Z.locals&&My.Z.locals;function Fy(e,t){const o=t.mapper,n=t.writer,r="numbered"==e.getAttribute("listType")?"ol":"ul",i=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=Gy,t}(n),s=n.createContainerElement(r,null);return n.insert(n.createPositionAt(s,0),i),o.bindElements(e,i),i}function Oy(e,t,o,n){const r=t.parent,i=o.mapper,s=o.writer;let a=i.toViewPosition(n.createPositionBefore(e));const l=jy(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=i.toViewElement(l);a=s.breakContainer(s.createPositionAfter(e))}else if(c&&"listItem"==c.name){a=i.toViewPosition(n.createPositionAt(c,"end"));const e=i.findMappedViewAncestor(a),t=Hy(e);a=t?s.createPositionBefore(t):s.createPositionAt(e,"end")}else a=i.toViewPosition(n.createPositionBefore(e));if(a=Ly(a),s.insert(a,r),c&&"listItem"==c.name){const e=i.toViewElement(c),o=s.createRange(s.createPositionAt(e,0),a).getWalker({ignoreElementEnd:!0});for(const e of o)if(e.item.is("element","li")){const n=s.breakContainer(s.createPositionBefore(e.item)),r=e.item.parent,i=s.createPositionAt(t,"end");Vy(s,i.nodeBefore,i.nodeAfter),s.move(s.createRangeOn(r),i),o._position=n}}else{const o=r.nextSibling;if(o&&(o.is("element","ul")||o.is("element","ol"))){let n=null;for(const t of o.getChildren()){const o=i.toModelElement(t);if(!(o&&o.getAttribute("listIndent")>e.getAttribute("listIndent")))break;n=t}n&&(s.breakContainer(s.createPositionAfter(n)),s.move(s.createRangeOn(n.parent),s.createPositionAt(t,"end")))}}Vy(s,r,r.nextSibling),Vy(s,r.previousSibling,r)}function Vy(e,t,o){return!t||!o||"ul"!=t.name&&"ol"!=t.name||t.name!=o.name||t.getAttribute("class")!==o.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function Ly(e){return e.getLastMatchingPosition((e=>e.item.is("uiElement")))}function jy(e,t){const o=!!t.sameIndent,n=!!t.smallerIndent,r=t.listIndent;let i=e;for(;i&&"listItem"==i.name;){const e=i.getAttribute("listIndent");if(o&&r==e||n&&r>e)return i;i="forward"===t.direction?i.nextSibling:i.previousSibling}return null}function qy(e,t,o,n){e.ui.componentFactory.add(t,(r=>{const i=e.commands.get(t),s=new op(r);return s.set({label:o,icon:n,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(i,"value","isEnabled"),s.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),s}))}function Hy(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}function Wy(e,t){const o=[],n=e.parent,r={ignoreElementEnd:!1,startPosition:e,shallow:!0,direction:t},i=n.getAttribute("listIndent"),s=[...new El(r)].filter((e=>e.item.is("element"))).map((e=>e.item));for(const e of s){if(!e.is("element","listItem"))break;if(e.getAttribute("listIndent")i)){if(e.getAttribute("listType")!==n.getAttribute("listType"))break;if(e.getAttribute("listStyle")!==n.getAttribute("listStyle"))break;if(e.getAttribute("listReversed")!==n.getAttribute("listReversed"))break;if(e.getAttribute("listStart")!==n.getAttribute("listStart"))break;"backward"===t?o.unshift(e):o.push(e)}}return o}const $y=["disc","circle","square"],Uy=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function Gy(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:ds.call(this)}class Ky extends Br{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;qy(this.editor,"numberedList",e("Numbered List"),''),qy(this.editor,"bulletedList",e("Bulleted List"),'')}}const Zy={},Jy={},Qy={},Yy=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:e,typeAttribute:t,listType:o}of Yy)Zy[e]=o,Jy[e]=t,t&&(Qy[t]=e);var Xy=o(3195),eA={attributes:{"data-cke":!0}};eA.setAttributes=Wr(),eA.insert=qr().bind(null,"head"),eA.domAPI=Lr(),eA.insertStyleElement=Ur();Or()(Xy.Z,eA);Xy.Z&&Xy.Z.locals&&Xy.Z.locals;var tA=o(7133),oA={attributes:{"data-cke":!0}};oA.setAttributes=Wr(),oA.insert=qr().bind(null,"head"),oA.domAPI=Lr(),oA.insertStyleElement=Ur();Or()(tA.Z,oA);tA.Z&&tA.Z.locals&&tA.Z.locals;var nA=o(4553),rA={attributes:{"data-cke":!0}};rA.setAttributes=Wr(),rA.insert=qr().bind(null,"head"),rA.domAPI=Lr(),rA.insertStyleElement=Ur();Or()(nA.Z,rA);nA.Z&&nA.Z.locals&&nA.Z.locals;class iA extends Pr{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let o=Array.from(t.selection.getSelectedBlocks());e.change((e=>{const t=o[o.length-1];let n=t.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>t.getAttribute("listIndent");)o.push(n),n=n.nextSibling;this._indentBy<0&&(o=o.reverse());for(const t of o){const o=t.getAttribute("listIndent")+this._indentBy;o<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",o,t)}this.fire("_executeCleanup",o)}))}_checkEnabled(){const e=yr(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),o=e.getAttribute("listType");let n=e.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=t;){if(n.getAttribute("listIndent")==t)return n.getAttribute("listType")==o;n=n.previousSibling}return!1}return!0}}class sA extends Pr{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,o=t.document,n=Array.from(o.selection.getSelectedBlocks()).filter((e=>lA(e,t.schema))),r=void 0!==e.forceValue?!e.forceValue:this.value;t.change((e=>{if(r){let t=n[n.length-1].nextSibling,o=Number.POSITIVE_INFINITY,r=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e=o;)i>r.getAttribute("listIndent")&&(i=r.getAttribute("listIndent")),r.getAttribute("listIndent")==i&&e[t?"unshift":"push"](r),r=r[t?"previousSibling":"nextSibling"]}}function lA(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class cA extends Br{static get pluginName(){return"ListUtils"}getListTypeFromListStyleType(e){return function(e){return $y.includes(e)?"bulleted":Uy.includes(e)?"numbered":null}(e)}getSelectedListItems(e){return function(e){let t=[...e.document.selection.getSelectedBlocks()].filter((e=>e.is("element","listItem"))).map((t=>{const o=e.change((e=>e.createPositionAt(t,0)));return[...Wy(o,"backward"),...Wy(o,"forward")]})).flat();return t=[...new Set(t)],t}(e)}getSiblingNodes(e,t){return Wy(e,t)}}function dA(e){return(t,o,n)=>{const r=n.consumable;if(!r.test(o.item,"insert")||!r.test(o.item,"attribute:listType")||!r.test(o.item,"attribute:listIndent"))return;r.consume(o.item,"insert"),r.consume(o.item,"attribute:listType"),r.consume(o.item,"attribute:listIndent");const i=o.item;Oy(i,Fy(i,n),n,e)}}const uA=(e,t,o)=>{if(!o.consumable.test(t.item,e.name))return;const n=o.mapper.toViewElement(t.item),r=o.writer;r.breakContainer(r.createPositionBefore(n)),r.breakContainer(r.createPositionAfter(n));const i=n.parent,s="numbered"==t.attributeNewValue?"ol":"ul";r.rename(s,i)},hA=(e,t,o)=>{o.consumable.consume(t.item,e.name);const n=o.mapper.toViewElement(t.item).parent,r=o.writer;Vy(r,n,n.nextSibling),Vy(r,n.previousSibling,n)};const pA=(e,t,o)=>{if(o.consumable.test(t.item,e.name)&&"listItem"!=t.item.name){let e=o.mapper.toViewPosition(t.range.start);const n=o.writer,r=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=n.breakContainer(e),"li"==e.parent.name);){const t=e,o=n.createPositionAt(e.parent,"end");if(!t.isEqual(o)){const e=n.remove(n.createRange(t,o));r.push(e)}e=n.createPositionAfter(e.parent)}if(r.length>0){for(let t=0;t0){const t=Vy(n,o,o.nextSibling);t&&t.parent==o&&e.offset--}}Vy(n,e.nodeBefore,e.nodeAfter)}}},gA=(e,t,o)=>{const n=o.mapper.toViewPosition(t.position),r=n.nodeBefore,i=n.nodeAfter;Vy(o.writer,r,i)},mA=(e,t,o)=>{if(o.consumable.consume(t.viewItem,{name:!0})){const e=o.writer,n=e.createElement("listItem"),r=function(e){let t=0,o=e.parent;for(;o;){if(o.is("element","li"))t++;else{const e=o.previousSibling;e&&e.is("element","li")&&t++}o=o.parent}return t}(t.viewItem);e.setAttribute("listIndent",r,n);const i=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",i,n),!o.safeInsert(n,t.modelCursor))return;const s=function(e,t,o){const{writer:n,schema:r}=o;let i=n.createPositionAfter(e);for(const s of t)if("ul"==s.name||"ol"==s.name)i=o.convertItem(s,i).modelCursor;else{const t=o.convertItem(s,n.createPositionAt(e,"end")),a=t.modelRange.start.nodeAfter;a&&a.is("element")&&!r.checkChild(e,a.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:_A(t.modelCursor),i=n.createPositionAfter(e))}return i}(n,t.viewItem.getChildren(),o);t.modelRange=e.createRange(t.modelCursor,s),o.updateConversionResult(n,t)}},fA=(e,t,o)=>{if(o.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e){!(t.is("element","li")||AA(t))&&t._remove()}}},bA=(e,t,o)=>{if(o.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let o=!1;for(const t of e)o&&!AA(t)&&t._remove(),AA(t)&&(o=!0)}};function kA(e){return(t,o)=>{if(o.isPhantom)return;const n=o.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const t=o.mapper.toViewElement(n),r=t.getAncestors().find(AA),i=e.createPositionAt(t,0).getWalker();for(const e of i){if("elementStart"==e.type&&e.item.is("element","li")){o.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==r){o.viewPosition=e.nextPosition;break}}}}}const wA=function(e,[t,o]){const n=this;let r,i=t.is("documentFragment")?t.getChild(0):t;if(r=o?n.createSelection(o):n.document.selection,i&&i.is("element","listItem")){const e=r.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;i&&i.is("element","listItem");)i._setAttribute("listIndent",i.getAttribute("listIndent")+e),i=i.nextSibling}}};function _A(e){const t=new El({startPosition:e});let o;do{o=t.next()}while(!o.value.item.is("element","listItem"));return o.value.item}function yA(e,t,o,n,r,i){const s=jy(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e}),a=r.mapper,l=r.writer,c=s?s.getAttribute("listIndent"):null;let d;if(s)if(c==e){const e=a.toViewElement(s).parent;d=l.createPositionAfter(e)}else{const e=i.createPositionAt(s,"end");d=a.toViewPosition(e)}else d=o;d=Ly(d);for(const e of[...n.getChildren()])AA(e)&&(d=l.move(l.createRangeOn(e),d).end,Vy(l,e,e.nextSibling),Vy(l,e.previousSibling,e))}function AA(e){return e.is("element","ol")||e.is("element","ul")}class CA extends Br{static get pluginName(){return"ListEditing"}static get requires(){return[Of,_f,cA]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,o=e.editing;var n;e.model.document.registerPostFixer((t=>function(e,t){const o=e.document.differ.getChanges(),n=new Map;let r=!1;for(const n of o)if("insert"==n.type&&"listItem"==n.name)i(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const o=n.position.nodeAfter;o.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",o),r=!0),o.hasAttribute("listType")&&(t.removeAttribute("listType",o),r=!0),o.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",o),r=!0),o.hasAttribute("listReversed")&&(t.removeAttribute("listReversed",o),r=!0),o.hasAttribute("listStart")&&(t.removeAttribute("listStart",o),r=!0);for(const t of Array.from(e.createRangeIn(o)).filter((e=>e.item.is("element","listItem"))))i(t.previousPosition)}i(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?i(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&i(n.range.start);for(const e of n.values())s(e),a(e);return r;function i(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(n.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,n.has(e))return;n.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&n.set(t,t)}}function s(e){let o=0,n=null;for(;e&&e.is("element","listItem");){const i=e.getAttribute("listIndent");if(i>o){let s;null===n?(n=i-o,s=o):(n>i&&(n=i),s=i-n),t.setAttribute("listIndent",s,e),r=!0}else n=null,o=e.getAttribute("listIndent")+1;e=e.nextSibling}}function a(e){let o=[],n=null;for(;e&&e.is("element","listItem");){const i=e.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>i&&(o=o.slice(0,i+1)),0!=i)if(o[i]){const n=o[i];e.getAttribute("listType")!=n&&(t.setAttribute("listType",n,e),r=!0)}else o[i]=e.getAttribute("listType");n=e,e=e.nextSibling}}}(e.model,t))),o.mapper.registerViewToModelLength("li",vA),t.mapper.registerViewToModelLength("li",vA),o.mapper.on("modelToViewPosition",kA(o.view)),o.mapper.on("viewToModelPosition",(n=e.model,(e,t)=>{const o=t.viewPosition,r=o.parent,i=t.mapper;if("ul"==r.name||"ol"==r.name){if(o.isAtEnd){const e=i.toModelElement(o.nodeBefore),r=i.getModelLength(o.nodeBefore);t.modelPosition=n.createPositionBefore(e).getShiftedBy(r)}else{const e=i.toModelElement(o.nodeAfter);t.modelPosition=n.createPositionBefore(e)}e.stop()}else if("li"==r.name&&o.nodeBefore&&("ul"==o.nodeBefore.name||"ol"==o.nodeBefore.name)){const s=i.toModelElement(r);let a=1,l=o.nodeBefore;for(;l&&AA(l);)a+=i.getModelLength(l),l=l.previousSibling;t.modelPosition=n.createPositionBefore(s).getShiftedBy(a),e.stop()}})),t.mapper.on("modelToViewPosition",kA(o.view)),e.conversion.for("editingDowncast").add((t=>{t.on("insert",pA,{priority:"high"}),t.on("insert:listItem",dA(e.model)),t.on("attribute:listType:listItem",uA,{priority:"high"}),t.on("attribute:listType:listItem",hA,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,o,n)=>{if(!n.consumable.consume(o.item,"attribute:listIndent"))return;const r=n.mapper.toViewElement(o.item),i=n.writer;i.breakContainer(i.createPositionBefore(r)),i.breakContainer(i.createPositionAfter(r));const s=r.parent,a=s.previousSibling,l=i.createRangeOn(s);i.remove(l),a&&a.nextSibling&&Vy(i,a,a.nextSibling),yA(o.attributeOldValue+1,o.range.start,l.start,r,n,e),Oy(o.item,r,n,e);for(const e of o.item.getChildren())n.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,o,n)=>{const r=n.mapper.toViewPosition(o.position).getLastMatchingPosition((e=>!e.item.is("element","li"))).nodeAfter,i=n.writer;i.breakContainer(i.createPositionBefore(r)),i.breakContainer(i.createPositionAfter(r));const s=r.parent,a=s.previousSibling,l=i.createRangeOn(s),c=i.remove(l);a&&a.nextSibling&&Vy(i,a,a.nextSibling),yA(n.mapper.toModelElement(r).getAttribute("listIndent")+1,o.position,l.start,r,n,e);for(const e of i.createRangeIn(c).getItems())n.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",gA,{priority:"low"})})),e.conversion.for("dataDowncast").add((t=>{t.on("insert",pA,{priority:"high"}),t.on("insert:listItem",dA(e.model))})),e.conversion.for("upcast").add((e=>{e.on("element:ul",fA,{priority:"high"}),e.on("element:ol",fA,{priority:"high"}),e.on("element:li",bA,{priority:"high"}),e.on("element:li",mA)})),e.model.on("insertContent",wA,{priority:"high"}),e.commands.add("numberedList",new sA(e,"numbered")),e.commands.add("bulletedList",new sA(e,"bulleted")),e.commands.add("indentList",new iA(e,"forward")),e.commands.add("outdentList",new iA(e,"backward"));const r=o.view.document;this.listenTo(r,"enter",((e,t)=>{const o=this.editor.model.document,n=o.selection.getLastPosition().parent;o.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())}),{context:"li"}),this.listenTo(r,"delete",((e,t)=>{if("backward"!==t.direction)return;const o=this.editor.model.document.selection;if(!o.isCollapsed)return;const n=o.getFirstPosition();if(!n.isAtStart)return;const r=n.parent;if("listItem"!==r.name)return;r.previousSibling&&"listItem"===r.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop())}),{context:"li"}),this.listenTo(e.editing.view.document,"tab",((t,o)=>{const n=o.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(e.execute(n),o.stopPropagation(),o.preventDefault(),t.stop())}),{context:"li"})}afterInit(){const e=this.editor.commands,t=e.get("indent"),o=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),o&&o.registerChildCommand(e.get("outdentList"))}}function vA(e){let t=1;for(const o of e.getChildren())if("ul"==o.name||"ol"==o.name)for(const e of o.getChildren())t+=vA(e);return t}const xA="todoListChecked";class EA extends Pr{constructor(e){super(e),this._selectedElements=[],this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every((e=>!!e.getAttribute(xA))),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const e=this.editor.model,t=e.schema,o=e.document.selection.getFirstRange(),n=o.start.parent,r=[];t.checkAttribute(n,xA)&&r.push(n);for(const e of o.getItems())t.checkAttribute(e,xA)&&!r.includes(e)&&r.push(e);return r}execute(e={}){this.editor.model.change((t=>{for(const o of this._selectedElements){(void 0===e.forceValue?!this.value:e.forceValue)?t.setAttribute(xA,!0,o):t.removeAttribute(xA,o)}}))}}const DA=(e,t,o)=>{const n=t.modelCursor,r=n.parent,i=t.viewItem;if("checkbox"!=i.getAttribute("type")||"listItem"!=r.name||!n.isAtStart)return;if(!o.consumable.consume(i,{name:!0}))return;const s=o.writer;s.setAttribute("listType","todo",r),t.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,r),t.modelRange=s.createRange(n)};function SA(e){return(t,o)=>{const n=o.modelPosition,r=n.parent;if(!r.is("element","listItem")||"todo"!=r.getAttribute("listType"))return;const i=BA(o.mapper.toViewElement(r),e);i&&(o.viewPosition=o.mapper.findPositionIn(i,n.offset))}}function TA(e,t,o,n){return t.createUIElement("label",{class:"todo-list__label",contenteditable:!1},(function(t){const r=ge(document,"input",{type:"checkbox",tabindex:"-1"});o&&r.setAttribute("checked","checked"),r.addEventListener("change",(()=>n(e)));const i=this.toDomElement(t);return i.appendChild(r),i}))}function BA(e,t){const o=t.createRangeIn(e);for(const e of o)if(e.item.is("containerElement","span")&&e.item.hasClass("todo-list__label__description"))return e.item}const IA=hr("Ctrl+Enter");class PA extends Br{static get pluginName(){return"TodoListEditing"}static get requires(){return[CA]}init(){const e=this.editor,{editing:t,data:o,model:n}=e;n.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),n.schema.addAttributeCheck(((e,t)=>{const o=e.last;if("todoListChecked"==t&&"listItem"==o.name&&"todo"!=o.getAttribute("listType"))return!1})),e.commands.add("todoList",new sA(e,"todo"));const r=new EA(e);var i,s;e.commands.add("checkTodoList",r),e.commands.add("todoListCheck",r),o.downcastDispatcher.on("insert:listItem",function(e){return(t,o,n)=>{const r=n.consumable;if(!r.test(o.item,"insert")||!r.test(o.item,"attribute:listType")||!r.test(o.item,"attribute:listIndent"))return;if("todo"!=o.item.getAttribute("listType"))return;const i=o.item;r.consume(i,"insert"),r.consume(i,"attribute:listType"),r.consume(i,"attribute:listIndent"),r.consume(i,"attribute:todoListChecked");const s=n.writer,a=Fy(i,n);s.addClass("todo-list",a.parent);const l=s.createContainerElement("label",{class:"todo-list__label"}),c=s.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),d=s.createContainerElement("span",{class:"todo-list__label__description"});i.getAttribute("todoListChecked")&&s.setAttribute("checked","checked",c),s.insert(s.createPositionAt(a,0),l),s.insert(s.createPositionAt(l,0),c),s.insert(s.createPositionAfter(c),d),Oy(i,a,n,e)}}(n),{priority:"high"}),o.upcastDispatcher.on("element:input",DA,{priority:"high"}),t.downcastDispatcher.on("insert:listItem",function(e,t){return(o,n,r)=>{const i=r.consumable;if(!i.test(n.item,"insert")||!i.test(n.item,"attribute:listType")||!i.test(n.item,"attribute:listIndent"))return;if("todo"!=n.item.getAttribute("listType"))return;const s=n.item;i.consume(s,"insert"),i.consume(s,"attribute:listType"),i.consume(s,"attribute:listIndent"),i.consume(s,"attribute:todoListChecked");const a=r.writer,l=Fy(s,r),c=!!s.getAttribute("todoListChecked"),d=TA(s,a,c,t),u=a.createContainerElement("span",{class:"todo-list__label__description"});a.addClass("todo-list",l.parent),a.insert(a.createPositionAt(l,0),d),a.insert(a.createPositionAfter(d),u),Oy(s,l,r,e)}}(n,(e=>this._handleCheckmarkChange(e))),{priority:"high"}),t.downcastDispatcher.on("attribute:listType:listItem",(i=e=>this._handleCheckmarkChange(e),s=t.view,(e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.mapper.toViewElement(t.item),r=o.writer,a=function(e,t){const o=t.createRangeIn(e);for(const e of o)if(e.item.is("uiElement","label"))return e.item}(n,s);if("todo"==t.attributeNewValue){const e=!!t.item.getAttribute("todoListChecked"),o=TA(t.item,r,e,i),s=r.createContainerElement("span",{class:"todo-list__label__description"}),a=r.createRangeIn(n),l=Hy(n),c=Ly(a.start),d=l?r.createPositionBefore(l):a.end,u=r.createRange(c,d);r.addClass("todo-list",n.parent),r.move(u,r.createPositionAt(s,0)),r.insert(r.createPositionAt(n,0),o),r.insert(r.createPositionAfter(o),s)}else if("todo"==t.attributeOldValue){const e=BA(n,s);r.removeClass("todo-list",n.parent),r.remove(a),r.move(r.createRangeIn(e),r.createPositionBefore(e)),r.remove(e)}})),t.downcastDispatcher.on("attribute:todoListChecked:listItem",function(e){return(t,o,n)=>{if("todo"!=o.item.getAttribute("listType"))return;if(!n.consumable.consume(o.item,"attribute:todoListChecked"))return;const{mapper:r,writer:i}=n,s=!!o.item.getAttribute("todoListChecked"),a=r.toViewElement(o.item).getChild(0),l=TA(o.item,i,s,e);i.insert(i.createPositionAfter(a),l),i.remove(a)}}((e=>this._handleCheckmarkChange(e)))),t.mapper.on("modelToViewPosition",SA(t.view)),o.mapper.on("modelToViewPosition",SA(t.view)),this.listenTo(t.view.document,"arrowKey",function(e,t){return(o,n)=>{if("left"!=gr(n.keyCode,t.contentLanguageDirection))return;const r=e.schema,i=e.document.selection;if(!i.isCollapsed)return;const s=i.getFirstPosition(),a=s.parent;if("listItem"===a.name&&"todo"==a.getAttribute("listType")&&s.isAtStart){const t=r.getNearestSelectionRange(e.createPositionBefore(a),"backward");t&&e.change((e=>e.setSelection(t))),n.preventDefault(),n.stopPropagation(),o.stop()}}}(n,e.locale),{context:"li"}),this.listenTo(t.view.document,"keydown",((t,o)=>{ur(o)===IA&&(e.execute("checkTodoList"),t.stop())}),{priority:"high"});const a=new Set;this.listenTo(n,"applyOperation",((e,t)=>{const o=t[0];if("rename"==o.type&&"listItem"==o.oldName){const e=o.position.nodeAfter;e.hasAttribute("todoListChecked")&&a.add(e)}else if("changeAttribute"==o.type&&"listType"==o.key&&"todo"===o.oldValue)for(const e of o.range.getItems())e.hasAttribute("todoListChecked")&&"todo"!==e.getAttribute("listType")&&a.add(e)})),n.document.registerPostFixer((e=>{let t=!1;for(const o of a)e.removeAttribute("todoListChecked",o),t=!0;return a.clear(),t}))}_handleCheckmarkChange(e){const t=this.editor,o=t.model,n=Array.from(o.document.selection.getRanges());o.change((o=>{o.setSelection(e,"end"),t.execute("checkTodoList"),o.setSelection(n)}))}}class RA extends Br{static get pluginName(){return"TodoListUI"}init(){const e=this.editor.t;qy(this.editor,"todoList",e("To-do List"),'')}}var zA=o(1588),MA={attributes:{"data-cke":!0}};MA.setAttributes=Wr(),MA.insert=qr().bind(null,"head"),MA.domAPI=Lr(),MA.insertStyleElement=Ur();Or()(zA.Z,MA);zA.Z&&zA.Z.locals&&zA.Z.locals;const NA=Symbol("isOPCodeBlock");function FA(e){return!!e.getCustomProperty(NA)&&$m(e)}function OA(e){const t=e.getSelectedElement();return!(!t||!FA(t))}function VA(e,t,o){const n=t.createContainerElement("pre",{title:window.I18n.t("js.editor.macro.toolbar_help")});return LA(t,e,n),function(e,t,o){return t.setCustomProperty(NA,!0,e),Um(e,t,{label:o})}(n,t,o)}function LA(e,t,o){const n=(t.getAttribute("opCodeblockLanguage")||"language-text").replace(/^language-/,""),r=e.createContainerElement("div",{class:"op-uc-code-block--language"});jA(e,n,r,"text"),e.insert(e.createPositionAt(o,0),r);jA(e,t.getAttribute("opCodeblockContent"),o,"(empty)")}function jA(e,t,o,n){const r=e.createText(t||n);e.insert(e.createPositionAt(o,0),r)}class qA extends Ea{constructor(e){super(e),this.domEventType="dblclick"}onDomEvent(e){this.fire(e.type,e)}}class HA extends Br{static get pluginName(){return"CodeBlockEditing"}init(){const e=this.editor,t=e.model.schema,o=e.conversion,n=e.editing.view,r=n.document,i=of(e);var s,a;t.register("codeblock",{isObject:!0,isBlock:!0,allowContentOf:"$block",allowWhere:["$root","$block"],allowIn:["$root"],allowAttributes:["opCodeblockLanguage","opCodeblockContent"]}),o.for("upcast").add(function(){return t=>{t.on("element:pre",e,{priority:"high"})};function e(e,t,o){if(!o.consumable.test(t.viewItem,{name:!0}))return;const n=Array.from(t.viewItem.getChildren()).find((e=>e.is("element","code")));if(!n||!o.consumable.consume(n,{name:!0}))return;const r=o.writer.createElement("codeblock");o.writer.setAttribute("opCodeblockLanguage",n.getAttribute("class"),r);const i=o.splitToAllowedParent(r,t.modelCursor);if(i){o.writer.insert(r,i.position);const e=n.getChild(0);o.consumable.consume(e,{name:!0});const s=e.data.replace(/\n$/,"");o.writer.setAttribute("opCodeblockContent",s,r),t.modelRange=new zl(o.writer.createPositionBefore(r),o.writer.createPositionAfter(r)),t.modelCursor=t.modelRange.end}}}()),o.for("editingDowncast").elementToElement({model:"codeblock",view:(e,{writer:t})=>VA(e,t,"Code block")}).add(function(){return t=>{t.on("attribute:opCodeblockContent",e),t.on("attribute:opCodeblockLanguage",e)};function e(e,t,o){const n=t.item;o.consumable.consume(t.item,e.name);const r=o.mapper.toViewElement(n);o.writer.remove(o.writer.createRangeOn(r.getChild(1))),o.writer.remove(o.writer.createRangeOn(r.getChild(0))),LA(o.writer,n,r)}}()),o.for("dataDowncast").add(function(){return t=>{t.on("insert:codeblock",e,{priority:"high"})};function e(e,t,o){const n=t.item,r=n.getAttribute("opCodeblockLanguage")||"language-text",i=n.getAttribute("opCodeblockContent");o.consumable.consume(n,"insert");const s=o.writer,a=s.createContainerElement("pre"),l=s.createContainerElement("div",{class:"op-uc-code-block--language"}),c=s.createContainerElement("code",{class:r}),d=s.createText(r),u=s.createText(i);s.insert(s.createPositionAt(c,0),u),s.insert(s.createPositionAt(l,0),d),s.insert(s.createPositionAt(a,0),l),s.insert(s.createPositionAt(a,0),c),o.mapper.bindElements(n,c),o.mapper.bindElements(n,a),o.mapper.bindElements(n,l);const h=o.mapper.toViewPosition(t.range.start);s.insert(h,a),e.stop()}}()),this.editor.editing.mapper.on("viewToModelPosition",(s=this.editor.model,a=e=>e.hasClass("op-uc-code-block"),(e,t)=>{const{mapper:o,viewPosition:n}=t,r=o.findMappedViewAncestor(n);if(!a(r))return;const i=o.toModelElement(r);t.modelPosition=s.createPositionAt(i,n.isAtStart?"before":"after")})),n.addObserver(qA),this.listenTo(r,"dblclick",((t,o)=>{let n=o.target,r=o.domEvent;if(r.shiftKey||r.altKey||r.metaKey)return;if(!FA(n)&&(n=n.findAncestor(FA),!n))return;o.preventDefault(),o.stopPropagation();const s=e.editing.mapper.toModelElement(n),a=i.services.macros,l=s.getAttribute("opCodeblockLanguage"),c=s.getAttribute("opCodeblockContent");a.editCodeBlock(c,l).then((t=>e.model.change((e=>{e.setAttribute("opCodeblockLanguage",t.languageClass,s),e.setAttribute("opCodeblockContent",t.content,s)}))))})),e.ui.componentFactory.add("insertCodeBlock",(t=>{const o=new op(t);return o.set({label:window.I18n.t("js.editor.macro.code_block.button"),icon:'\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n image/svg+xml\n \n \n \n \n\n',tooltip:!0}),o.on("execute",(()=>{i.services.macros.editCodeBlock().then((t=>e.model.change((o=>{const n=o.createElement("codeblock");o.setAttribute("opCodeblockLanguage",t.languageClass,n),o.setAttribute("opCodeblockContent",t.content,n),e.model.insertContent(n,e.model.document.selection)}))))})),o}))}}class WA extends Br{static get requires(){return[Cm]}static get pluginName(){return"CodeBlockToolbar"}init(){const e=this.editor,t=this.editor.model,o=of(e);hb(e,"opEditCodeBlock",(e=>{const n=o.services.macros,r=e.getAttribute("opCodeblockLanguage"),i=e.getAttribute("opCodeblockContent");n.editCodeBlock(i,r).then((o=>t.change((t=>{t.setAttribute("opCodeblockLanguage",o.languageClass,e),t.setAttribute("opCodeblockContent",o.content,e)}))))}))}afterInit(){gb(this,this.editor,"OPCodeBlock",OA)}}function $A(e){return e.__currentlyDisabled=e.__currentlyDisabled||[],e.ui.view.toolbar?e.ui.view.toolbar.items._items:[]}function UA(e,t){jQuery.each($A(e),(function(o,n){let r=n;n instanceof vb?r=n.buttonView:n!==t&&n.hasOwnProperty("isEnabled")||(r=null),r&&(r.isEnabled?r.isEnabled=!1:e.__currentlyDisabled.push(r))}))}function GA(e){jQuery.each($A(e),(function(t,o){let n=o;o instanceof vb&&(n=o.buttonView),e.__currentlyDisabled.indexOf(n)<0&&(n.isEnabled=!0)})),e.__currentlyDisabled=[]}function KA(e,t){const{modelAttribute:o,styleName:n,viewElement:r,defaultValue:i,reduceBoxSides:s=!1,shouldUpcast:a=(()=>!0)}=t;e.for("upcast").attributeToAttribute({view:{name:r,styles:{[n]:/[\s\S]+/}},model:{key:o,value:e=>{if(!a(e))return;const t=e.getNormalizedStyle(n),o=s?YA(t):t;return i!==o?o:void 0}}})}function ZA(e,t,o,n){e.for("upcast").add((e=>e.on("element:"+t,((e,t,r)=>{if(!t.modelRange)return;const i=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter((e=>t.viewItem.hasStyle(e)));if(!i.length)return;const s={styles:i};if(!r.consumable.test(t.viewItem,s))return;const a=[...t.modelRange.getItems({shallow:!0})].pop();r.consumable.consume(t.viewItem,s);const l={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},c={style:YA(l.style),color:YA(l.color),width:YA(l.width)};c.style!==n.style&&r.writer.setAttribute(o.style,c.style,a),c.color!==n.color&&r.writer.setAttribute(o.color,c.color,a),c.width!==n.width&&r.writer.setAttribute(o.width,c.width,a)}))))}function JA(e,t){const{modelElement:o,modelAttribute:n,styleName:r}=t;e.for("downcast").attributeToAttribute({model:{name:o,key:n},view:e=>({key:"style",value:{[r]:e}})})}function QA(e,t){const{modelAttribute:o,styleName:n}=t;e.for("downcast").add((e=>e.on(`attribute:${o}:table`,((e,t,o)=>{const{item:r,attributeNewValue:i}=t,{mapper:s,writer:a}=o;if(!o.consumable.consume(t.item,e.name))return;const l=[...s.toViewElement(r).getChildren()].find((e=>e.is("element","table")));i?a.setStyle(n,i,l):a.removeStyle(n,l)}))))}function YA(e){if(!e)return;const t=["top","right","bottom","left"];if(!t.every((t=>e[t])))return e;const o=e.top;return t.every((t=>e[t]===o))?o:e}function XA(e,t,o,n,r=1){null!=t&&null!=r&&t>r?n.setAttribute(e,t,o):n.removeAttribute(e,o)}function eC(e,t,o={}){const n=e.createElement("tableCell",o);return e.insertElement("paragraph",n),e.insert(n,t),n}function tC(e,t){const o=t.parent.parent,n=parseInt(o.getAttribute("headingColumns")||"0"),{column:r}=e.getCellLocation(t);return!!n&&r{e.on("element:table",((e,t,o)=>{const n=t.viewItem;if(!o.consumable.test(n,{name:!0}))return;const{rows:r,headingRows:i,headingColumns:s}=function(e){let t,o=0;const n=[],r=[];let i;for(const s of Array.from(e.getChildren())){if("tbody"!==s.name&&"thead"!==s.name&&"tfoot"!==s.name)continue;"thead"!==s.name||i||(i=s);const e=Array.from(s.getChildren()).filter((e=>e.is("element","tr")));for(const a of e)if(i&&s===i||"tbody"===s.name&&Array.from(a.getChildren()).length&&Array.from(a.getChildren()).every((e=>e.is("element","th"))))o++,n.push(a);else{r.push(a);const e=iC(a);(!t||eo.convertItem(e,o.writer.createPositionAt(l,"end")))),o.convertChildren(n,o.writer.createPositionAt(l,"end")),l.isEmpty){const e=o.writer.createElement("tableRow");o.writer.insert(e,o.writer.createPositionAt(l,"end")),eC(o.writer,o.writer.createPositionAt(e,"end"))}o.updateConversionResult(l,t)}}))}}function rC(e){return t=>{t.on(`element:${e}`,((e,t,{writer:o})=>{if(!t.modelRange)return;const n=t.modelRange.start.nodeAfter,r=o.createPositionAt(n,0);if(t.viewItem.isEmpty)return void o.insertElement("paragraph",r);const i=Array.from(n.getChildren());if(i.every((e=>e.is("element","$marker")))){const e=o.createElement("paragraph");o.insert(e,o.createPositionAt(n,0));for(const t of i)o.move(o.createRangeOn(t),o.createPositionAt(e,"end"))}}),{priority:"low"})}}function iC(e){let t=0,o=0;const n=Array.from(e.getChildren()).filter((e=>"th"===e.name||"td"===e.name));for(;o1||r>1)&&this._recordSpans(o,r,n),this._shouldSkipSlot()||(t=this._formatOutValue(o)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,o=this._column){return{done:!1,value:new aC(this,e,t,o)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||o||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,o){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;e{const r=o.getAttribute("headingRows")||0,i=n.createContainerElement("table",null,[]),s=n.createContainerElement("figure",{class:"table"},i);r>0&&n.insert(n.createPositionAt(i,"end"),n.createContainerElement("thead",null,n.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=r))));for(const{positionOffset:e,filter:o}of t.additionalSlots)n.insert(n.createPositionAt(i,e),n.createSlot(o));return n.insert(n.createPositionAt(i,"after"),n.createSlot((e=>!e.is("element","tableRow")&&!t.additionalSlots.some((({filter:t})=>t(e)))))),t.asWidget?function(e,t){return t.setCustomProperty("table",!0,e),Um(e,t,{hasSelectionHandle:!0})}(s,n):s}}function cC(e={}){return(t,{writer:o})=>{const n=t.parent,r=n.parent,i=r.getChildIndex(n),s=new sC(r,{row:i}),a=r.getAttribute("headingRows")||0,l=r.getAttribute("headingColumns")||0;let c=null;for(const n of s)if(n.cell==t){const t=n.row{if(!t.parent.is("element","tableCell"))return null;if(!uC(t))return null;if(e.asWidget)return o.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const e=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,e),e}}}function uC(e){return 1==e.parent.childCount&&!!e.getAttributeKeys().next().done}class hC extends Pr{refresh(){const e=this.editor.model,t=e.document.selection,o=e.schema;this.isEnabled=function(e,t){const o=e.getFirstPosition().parent,n=o===o.root?o:o.parent;return t.checkChild(n,"table")}(t,o)}execute(e={}){const t=this.editor,o=t.model,n=t.plugins.get("TableUtils"),r=t.config.get("table.defaultHeadings.rows"),i=t.config.get("table.defaultHeadings.columns");void 0===e.headingRows&&r&&(e.headingRows=r),void 0===e.headingColumns&&i&&(e.headingColumns=i),o.change((t=>{const r=n.createTable(t,e);o.insertObject(r,null,null,{findOptimalPosition:"auto"}),t.setSelection(t.createPositionAt(r.getNodeByPath([0,0,0]),0))}))}}class pC extends Pr{constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="above"===this.order,r=o.getSelectionAffectedTableCells(t),i=o.getRowIndexes(r),s=n?i.first:i.last,a=r[0].findAncestor("table");o.insertRows(a,{at:n?s:s+1,copyStructureFromAbove:!n})}}class gC extends Pr{constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="left"===this.order,r=o.getSelectionAffectedTableCells(t),i=o.getColumnIndexes(r),s=n?i.first:i.last,a=r[0].findAncestor("table");o.insertColumns(a,{columns:1,at:n?s:s+1})}}class mC extends Pr{constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}function fC(e,t,o){const{startRow:n,startColumn:r,endRow:i,endColumn:s}=t,a=o.createElement("table"),l=i-n+1;for(let e=0;e0){XA("headingRows",i-o,e,r,0)}const s=parseInt(t.getAttribute("headingColumns")||"0");if(s>0){XA("headingColumns",s-n,e,r,0)}}(a,e,n,r,o),a}function bC(e,t,o=0){const n=[],r=new sC(e,{startRow:o,endRow:t-1});for(const e of r){const{row:o,cellHeight:r}=e;o1&&(a.rowspan=l);const c=parseInt(e.getAttribute("colspan")||"1");c>1&&(a.colspan=c);const d=i+s,u=[...new sC(r,{startRow:i,endRow:d,includeAllSlots:!0})];let h,p=null;for(const t of u){const{row:n,column:r,cell:i}=t;i===e&&void 0===h&&(h=r),void 0!==h&&h===r&&n===d&&(p=eC(o,t.getPositionBefore(),a))}return XA("rowspan",s,e,o),p}function wC(e,t){const o=[],n=new sC(e);for(const e of n){const{column:n,cellWidth:r}=e;n1&&(i.colspan=s);const a=parseInt(e.getAttribute("rowspan")||"1");a>1&&(i.rowspan=a);const l=eC(n,n.createPositionAfter(e),i);return XA("colspan",r,e,n),l}function yC(e,t,o,n,r,i){const s=parseInt(e.getAttribute("colspan")||"1"),a=parseInt(e.getAttribute("rowspan")||"1");if(o+s-1>r){XA("colspan",r-o+1,e,i,1)}if(t+a-1>n){XA("rowspan",n-t+1,e,i,1)}}function AC(e,t){const o=t.getColumns(e),n=new Array(o).fill(0);for(const{column:t}of new sC(e))n[t]++;const r=n.reduce(((e,t,o)=>t?e:[...e,o]),[]);if(r.length>0){const o=r[r.length-1];return t.removeColumns(e,{at:o}),!0}return!1}function CC(e,t){const o=[],n=t.getRows(e);for(let t=0;t0){const n=o[o.length-1];return t.removeRows(e,{at:n}),!0}return!1}function vC(e,t){AC(e,t)||CC(e,t)}function xC(e,t){const o=Array.from(new sC(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(o.every((({cellHeight:e})=>1===e)))return t.lastRow;const n=o[0].cellHeight-1;return t.lastRow+n}function EC(e,t){const o=Array.from(new sC(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(o.every((({cellWidth:e})=>1===e)))return t.lastColumn;const n=o[0].cellWidth-1;return t.lastColumn+n}class DC extends Pr{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,o=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],n=this.value,r=this.direction;e.change((e=>{const t="right"==r||"down"==r,i=t?o:n,s=t?n:o,a=s.parent;!function(e,t,o){SC(e)||(SC(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end")));o.remove(e)}(s,i,e);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(o.getAttribute(l)||"1"),d=parseInt(n.getAttribute(l)||"1");e.setAttribute(l,c+d,i),e.setSelection(e.createRangeIn(i));const u=this.editor.plugins.get("TableUtils");vC(a.findAncestor("table"),u)}))}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),o=t.getTableCellsContainingSelection(e.selection)[0];if(!o)return;const n=this.isHorizontal?function(e,t,o){const n=e.parent,r=n.parent,i="right"==t?e.nextSibling:e.previousSibling,s=(r.getAttribute("headingColumns")||0)>0;if(!i)return;const a="right"==t?e:i,l="right"==t?i:e,{column:c}=o.getCellLocation(a),{column:d}=o.getCellLocation(l),u=parseInt(a.getAttribute("colspan")||"1"),h=tC(o,a),p=tC(o,l);if(s&&h!=p)return;return c+u===d?i:void 0}(o,this.direction,t):function(e,t,o){const n=e.parent,r=n.parent,i=r.getChildIndex(n);if("down"==t&&i===o.getRows(r)-1||"up"==t&&0===i)return null;const s=parseInt(e.getAttribute("rowspan")||"1"),a=r.getAttribute("headingRows")||0,l="down"==t&&i+s===a,c="up"==t&&i===a;if(a&&(l||c))return null;const d=parseInt(e.getAttribute("rowspan")||"1"),u="down"==t?i+d:i,h=[...new sC(r,{endRow:u})],p=h.find((t=>t.cell===e)),g=p.column,m=h.find((({row:e,cellHeight:o,column:n})=>n===g&&("down"==t?e===u:u===e+o)));return m&&m.cell?m.cell:null}(o,this.direction,t);if(!n)return;const r=this.isHorizontal?"rowspan":"colspan",i=parseInt(o.getAttribute(r)||"1");return parseInt(n.getAttribute(r)||"1")===i?n:void 0}}function SC(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}class TC extends Pr{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),r=e.getRows(n)-1,i=e.getRowIndexes(t),s=0===i.first&&i.last===r;this.isEnabled=!s}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),r=o[0],i=r.findAncestor("table"),s=t.getCellLocation(r).column;e.change((e=>{const o=n.last-n.first+1;t.removeRows(i,{at:n.first,rows:o});const r=function(e,t,o,n){const r=e.getChild(Math.min(t,n-1));let i=r.getChild(0),s=0;for(const e of r.getChildren()){if(s>o)return i;i=e,s+=parseInt(e.getAttribute("colspan")||"1")}return i}(i,n.first,s,t.getRows(i));e.setSelection(e.createPositionAt(r,0))}))}}class BC extends Pr{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),r=e.getColumns(n),{first:i,last:s}=e.getColumnIndexes(t);this.isEnabled=s-ie.cell===t)).column,last:r.find((e=>e.cell===o)).column},s=function(e,t,o,n){const r=parseInt(o.getAttribute("colspan")||"1");return r>1?o:t.previousSibling||o.nextSibling?o.nextSibling||t.previousSibling:n.first?e.reverse().find((({column:e})=>ee>n.last)).cell}(r,t,o,i);this.editor.model.change((t=>{const o=i.last-i.first+1;e.removeColumns(n,{at:i.first,columns:o}),t.setSelection(t.createPositionAt(s,0))}))}}class IC extends Pr{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o.length>0;this.isEnabled=n,this.value=n&&o.every((e=>this._isInHeading(e,e.parent.parent)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),r=n[0].findAncestor("table"),{first:i,last:s}=t.getRowIndexes(n),a=this.value?i:s+1,l=r.getAttribute("headingRows")||0;o.change((e=>{if(a){const t=bC(r,a,a>l?l:0);for(const{cell:o}of t)kC(o,a,e)}XA("headingRows",a,r,e,0)}))}_isInHeading(e,t){const o=parseInt(t.getAttribute("headingRows")||"0");return!!o&&e.parent.index0;this.isEnabled=n,this.value=n&&o.every((e=>tC(t,e)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),r=n[0].findAncestor("table"),{first:i,last:s}=t.getColumnIndexes(n),a=this.value?i:s+1;o.change((e=>{if(a){const t=wC(r,a);for(const{cell:o,column:n}of t)_C(o,n,a,e)}XA("headingColumns",a,r,e,0)}))}}class RC extends Br{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,o=t.parent,n=o.getChildIndex(t),r=new sC(o,{row:n});for(const{cell:t,row:o,column:n}of r)if(t===e)return{row:o,column:n}}createTable(e,t){const o=e.createElement("table"),n=t.rows||2,r=t.columns||2;return zC(e,o,0,n,r),t.headingRows&&XA("headingRows",Math.min(t.headingRows,n),o,e,0),t.headingColumns&&XA("headingColumns",Math.min(t.headingColumns,r),o,e,0),o}insertRows(e,t={}){const o=this.editor.model,n=t.at||0,r=t.rows||1,i=void 0!==t.copyStructureFromAbove,s=t.copyStructureFromAbove?n-1:n,a=this.getRows(e),l=this.getColumns(e);if(n>a)throw new f("tableutils-insertrows-insert-out-of-range",this,{options:t});o.change((t=>{const o=e.getAttribute("headingRows")||0;if(o>n&&XA("headingRows",o+r,e,t,0),!i&&(0===n||n===a))return void zC(t,e,n,r,l);const c=i?Math.max(n,s):n,d=new sC(e,{endRow:c}),u=new Array(l).fill(1);for(const{row:e,column:o,cellHeight:a,cellWidth:l,cell:c}of d){const d=e+a-1,h=e<=s&&s<=d;e0&&eC(t,r,n>1?{colspan:n}:void 0),e+=Math.abs(n)-1}}}))}insertColumns(e,t={}){const o=this.editor.model,n=t.at||0,r=t.columns||1;o.change((t=>{const o=e.getAttribute("headingColumns");nr-1)throw new f("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});o.change((t=>{const o={first:i,last:s},{cellsToMove:n,cellsToTrim:r}=function(e,{first:t,last:o}){const n=new Map,r=[];for(const{row:i,column:s,cellHeight:a,cell:l}of new sC(e,{endRow:o})){const e=i+a-1;if(i>=t&&i<=o&&e>o){const e=a-(o-i+1);n.set(s,{cell:l,rowspan:e})}if(i=t){let n;n=e>=o?o-t+1:e-t+1,r.push({cell:l,rowspan:a-n})}}return{cellsToMove:n,cellsToTrim:r}}(e,o);if(n.size){!function(e,t,o,n){const r=new sC(e,{includeAllSlots:!0,row:t}),i=[...r],s=e.getChild(t);let a;for(const{column:e,cell:t,isAnchor:r}of i)if(o.has(e)){const{cell:t,rowspan:r}=o.get(e),i=a?n.createPositionAfter(a):n.createPositionAt(s,0);n.move(n.createRangeOn(t),i),XA("rowspan",r,t,n),a=t}else r&&(a=t)}(e,s+1,n,t)}for(let o=s;o>=i;o--)t.remove(e.getChild(o));for(const{rowspan:e,cell:o}of r)XA("rowspan",e,o,t);!function(e,{first:t,last:o},n){const r=e.getAttribute("headingRows")||0;if(t{!function(e,t,o){const n=e.getAttribute("headingColumns")||0;if(n&&t.first=n;o--)for(const{cell:n,column:r,cellWidth:i}of[...new sC(e)])r<=o&&i>1&&r+i>o?XA("colspan",i-1,n,t):r===o&&t.remove(n);CC(e,this)||AC(e,this)}))}splitCellVertically(e,t=2){const o=this.editor.model,n=e.parent.parent,r=parseInt(e.getAttribute("rowspan")||"1"),i=parseInt(e.getAttribute("colspan")||"1");o.change((o=>{if(i>1){const{newCellsSpan:n,updatedSpan:s}=NC(i,t);XA("colspan",s,e,o);const a={};n>1&&(a.colspan=n),r>1&&(a.rowspan=r);MC(i>t?t-1:i-1,o,o.createPositionAfter(e),a)}if(it===e)),c=a.filter((({cell:t,cellWidth:o,column:n})=>t!==e&&n===l||nl));for(const{cell:e,cellWidth:t}of c)o.setAttribute("colspan",t+s,e);const d={};r>1&&(d.rowspan=r),MC(s,o,o.createPositionAfter(e),d);const u=n.getAttribute("headingColumns")||0;u>l&&XA("headingColumns",u+s,n,o)}}))}splitCellHorizontally(e,t=2){const o=this.editor.model,n=e.parent,r=n.parent,i=r.getChildIndex(n),s=parseInt(e.getAttribute("rowspan")||"1"),a=parseInt(e.getAttribute("colspan")||"1");o.change((o=>{if(s>1){const n=[...new sC(r,{startRow:i,endRow:i+s-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=NC(s,t);XA("rowspan",c,e,o);const{column:d}=n.find((({cell:t})=>t===e)),u={};l>1&&(u.rowspan=l),a>1&&(u.colspan=a);for(const e of n){const{column:t,row:n}=e;n>=i+c&&t===d&&(n+i+c)%l==0&&MC(1,o,e.getPositionBefore(),u)}}if(si){const e=r+n;o.setAttribute("rowspan",e,t)}const c={};a>1&&(c.colspan=a),zC(o,r,i+1,n,1,c);const d=r.getAttribute("headingRows")||0;d>i&&XA("headingRows",d+n,r,o)}}))}getColumns(e){return[...e.getChild(0).getChildren()].reduce(((e,t)=>e+parseInt(t.getAttribute("colspan")||"1")),0)}getRows(e){return Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0)}createTableWalker(e,t={}){return new sC(e,t)}getSelectedTableCells(e){const t=[];for(const o of this.sortRanges(e.getRanges())){const e=o.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];for(const o of e.getRanges()){const e=o.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map((e=>e.parent.index));return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),o=[...new sC(t)].filter((t=>e.includes(t.cell))).map((e=>e.column));return this._getFirstLastIndexesObject(o)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,o=new Set;let n=0;for(const r of e){const{row:e,column:i}=this.getCellLocation(r),s=parseInt(r.getAttribute("rowspan"))||1,a=parseInt(r.getAttribute("colspan"))||1;t.add(e),o.add(i),s>1&&t.add(e+s-1),a>1&&o.add(i+a-1),n+=s*a}const r=function(e,t){const o=Array.from(e.values()),n=Array.from(t.values()),r=Math.max(...o),i=Math.min(...o),s=Math.max(...n),a=Math.min(...n);return(r-i+1)*(s-a+1)}(t,o);return r==n}sortRanges(e){return Array.from(e).sort(FC)}_getFirstLastIndexesObject(e){const t=e.sort(((e,t)=>e-t));return{first:t[0],last:t[t.length-1]}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),o=this.getRowIndexes(e),n=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(o,n))return!1;const r=this.getColumnIndexes(e),i=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(r,i)}_areIndexesInSameSection({first:e,last:t},o){return e{const n=t.getSelectedTableCells(e.document.selection),r=n.shift(),{mergeWidth:i,mergeHeight:s}=function(e,t,o){let n=0,r=0;for(const e of t){const{row:t,column:i}=o.getCellLocation(e);n=jC(e,i,n,"colspan"),r=jC(e,t,r,"rowspan")}const{row:i,column:s}=o.getCellLocation(e),a=n-s,l=r-i;return{mergeWidth:a,mergeHeight:l}}(r,n,t);XA("colspan",i,r,o),XA("rowspan",s,r,o);for(const e of n)VC(e,r,o);vC(r.findAncestor("table"),t),o.setSelection(r,"in")}))}}function VC(e,t,o){LC(e)||(LC(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end"))),o.remove(e)}function LC(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}function jC(e,t,o,n){const r=parseInt(e.getAttribute(n)||"1");return Math.max(o,t+r)}class qC extends Pr{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),r=o[0].findAncestor("table"),i=[];for(let t=n.first;t<=n.last;t++)for(const o of r.getChild(t).getChildren())i.push(e.createRangeOn(o));e.change((e=>{e.setSelection(i)}))}}class HC extends Pr{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o[0],r=o.pop(),i=n.findAncestor("table"),s=e.getCellLocation(n),a=e.getCellLocation(r),l=Math.min(s.column,a.column),c=Math.max(s.column,a.column),d=[];for(const e of new sC(i,{startColumn:l,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change((e=>{e.setSelection(d)}))}}function WC(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;const r=new Set;for(const t of o){let o=null;"insert"==t.type&&"table"==t.name&&(o=t.position.nodeAfter),"insert"!=t.type&&"remove"!=t.type||"tableRow"!=t.name&&"tableCell"!=t.name||(o=t.position.findAncestor("table")),GC(t)&&(o=t.range.start.findAncestor("table")),o&&!r.has(o)&&(n=$C(o,e)||n,n=UC(o,e)||n,r.add(o))}return n}(t,e)))}function $C(e,t){let o=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||"0"),o=Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0),n=[];for(const{row:r,cell:i,cellHeight:s}of new sC(e)){if(s<2)continue;const e=re){const t=e-r;n.push({cell:i,rowspan:t})}}return n}(e);if(n.length){o=!0;for(const e of n)XA("rowspan",e.rowspan,e.cell,t,1)}return o}function UC(e,t){let o=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:o}of new sC(e,{includeAllSlots:!0}))t[o]++;return t}(e),r=[];for(const[t,o]of n.entries())!o&&e.getChild(t).is("element","tableRow")&&r.push(t);if(r.length){o=!0;for(const o of r.reverse())t.remove(e.getChild(o)),n.splice(o,1)}const i=n.filter(((t,o)=>e.getChild(o).is("element","tableRow"))),s=i[0];if(!i.every((e=>e===s))){const n=i.reduce(((e,t)=>t>e?t:e),0);for(const[r,s]of i.entries()){const i=n-s;if(i){for(let o=0;ofunction(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o)"insert"==t.type&&"table"==t.name&&(n=ZC(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=JC(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=QC(t.position.nodeAfter,e)||n),"remove"!=t.type&&"insert"!=t.type||!YC(t)||(n=QC(t.position.parent,e)||n);return n}(t,e)))}function ZC(e,t){let o=!1;for(const n of e.getChildren())n.is("element","tableRow")&&(o=JC(n,t)||o);return o}function JC(e,t){let o=!1;for(const n of e.getChildren())o=QC(n,t)||o;return o}function QC(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const o=Array.from(e.getChildren()).filter((e=>e.is("$text")));for(const e of o)t.wrap(t.createRangeOn(e),"paragraph");return!!o.length}function YC(e){return!!e.position.parent.is("element","tableCell")&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function XC(e,t){if(!e.is("element","paragraph"))return!1;const o=t.toViewElement(e);return!!o&&uC(e)!==o.is("element","span")}var ev=o(4777),tv={attributes:{"data-cke":!0}};tv.setAttributes=Wr(),tv.insert=qr().bind(null,"head"),tv.domAPI=Lr(),tv.insertStyleElement=Ur();Or()(ev.Z,tv);ev.Z&&ev.Z.locals&&ev.Z.locals;class ov extends Br{static get pluginName(){return"TableEditing"}static get requires(){return[RC]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,o=t.schema,n=e.conversion,r=e.plugins.get(RC);o.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),o.register("tableRow",{allowIn:"table",isLimit:!0}),o.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.for("upcast").add((e=>{e.on("element:figure",((e,t,o)=>{if(!o.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(t.viewItem,{name:!0,classes:"table"});const r=yr(o.convertItem(n,t.modelCursor).modelRange.getItems());r?(o.convertChildren(t.viewItem,o.writer.createPositionAt(r,"end")),o.updateConversionResult(r,t)):o.consumable.revert(t.viewItem,{name:!0,classes:"table"})}))})),n.for("upcast").add(nC()),n.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:lC(r,{asWidget:!0,additionalSlots:this._additionalSlots})}),n.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:lC(r,{additionalSlots:this._additionalSlots})}),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add((e=>{e.on("element:tr",((e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()}),{priority:"high"})})),n.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(rC("td")),n.for("upcast").add(rC("th")),n.for("editingDowncast").elementToElement({model:"tableCell",view:cC({asWidget:!0})}),n.for("dataDowncast").elementToElement({model:"tableCell",view:cC()}),n.for("editingDowncast").elementToElement({model:"paragraph",view:dC({asWidget:!0}),converterPriority:"high"}),n.for("dataDowncast").elementToElement({model:"paragraph",view:dC(),converterPriority:"high"}),n.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),n.for("upcast").attributeToAttribute({model:{key:"colspan",value:nv("colspan")},view:"colspan"}),n.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("upcast").attributeToAttribute({model:{key:"rowspan",value:nv("rowspan")},view:"rowspan"}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new hC(e)),e.commands.add("insertTableRowAbove",new pC(e,{order:"above"})),e.commands.add("insertTableRowBelow",new pC(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new gC(e,{order:"left"})),e.commands.add("insertTableColumnRight",new gC(e,{order:"right"})),e.commands.add("removeTableRow",new TC(e)),e.commands.add("removeTableColumn",new BC(e)),e.commands.add("splitTableCellVertically",new mC(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new mC(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new OC(e)),e.commands.add("mergeTableCellRight",new DC(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new DC(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new DC(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new DC(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new PC(e)),e.commands.add("setTableRowHeader",new IC(e)),e.commands.add("selectTableRow",new qC(e)),e.commands.add("selectTableColumn",new HC(e)),WC(t),KC(t),this.listenTo(t.document,"change:data",(()=>{!function(e,t){const o=e.document.differ;for(const e of o.getChanges()){let o,n=!1;if("attribute"==e.type){const t=e.range.start.nodeAfter;if(!t||!t.is("element","table"))continue;if("headingRows"!=e.attributeKey&&"headingColumns"!=e.attributeKey)continue;o=t,n="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(o=e.position.findAncestor("table"),n="tableRow"==e.name);if(!o)continue;const r=o.getAttribute("headingRows")||0,i=o.getAttribute("headingColumns")||0,s=new sC(o);for(const e of s){const o=e.rowXC(e,t.mapper)));for(const e of o)t.reconvertItem(e)}}(t,e.editing)}))}registerAdditionalSlot(e){this._additionalSlots.push(e)}}function nv(e){return t=>{const o=parseInt(t.getAttribute(e));return Number.isNaN(o)||o<=0?null:o}}var rv=o(8085),iv={attributes:{"data-cke":!0}};iv.setAttributes=Wr(),iv.insert=qr().bind(null,"head"),iv.domAPI=Lr(),iv.insertStyleElement=Ur();Or()(rv.Z,iv);rv.Z&&rv.Z.locals&&rv.Z.locals;class sv extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new Cr,this.focusTracker=new Ar,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",((e,t)=>`${t} × ${e}`)),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to((e=>{e.preventDefault()})),click:t.to((()=>{this.fire("execute")}))}}),this.on("boxover",((e,t)=>{const{row:o,column:n}=t.target.dataset;this.items.get(10*(parseInt(o,10)-1)+(parseInt(n,10)-1)).focus()})),this.focusTracker.on("change:focusedElement",((e,t,o)=>{if(!o)return;const{row:n,column:r}=o.dataset;this.set({rows:parseInt(n),columns:parseInt(r)})})),this.on("change:columns",(()=>this._highlightGridBoxes())),this.on("change:rows",(()=>this._highlightGridBoxes()))}render(){super.render(),vh({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map(((o,n)=>{const r=Math.floor(n/10){const n=e.commands.get("insertTable"),r=Xp(o);let i;return r.bind("isEnabled").to(n),r.buttonView.set({icon:'',label:t("Insert table"),tooltip:!0}),r.on("change:isOpen",(()=>{i||(i=new sv(o),r.panelView.children.add(i),i.delegate("execute").to(r),r.on("execute",(()=>{e.execute("insertTable",{rows:i.rows,columns:i.columns}),e.editing.view.focus()})))})),r})),e.ui.componentFactory.add("tableColumn",(e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:o?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:o?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),'',n,e)})),e.ui.componentFactory.add("tableRow",(e=>{const o=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),'',o,e)})),e.ui.componentFactory.add("mergeTableCells",(e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:o?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:o?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),'',n,e)}))}_prepareDropdown(e,t,o,n){const r=this.editor,i=Xp(n),s=this._fillDropdownWithListOptions(i,o);return i.buttonView.set({label:e,icon:t,tooltip:!0}),i.bind("isEnabled").toMany(s,"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(i,"execute",(e=>{r.execute(e.source.commandName),e.source instanceof ip||r.editing.view.focus()})),i}_prepareMergeSplitButtonDropdown(e,t,o,n){const r=this.editor,i=Xp(n,Kp),s="mergeTableCells",a=r.commands.get(s),l=this._fillDropdownWithListOptions(i,o);return i.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),i.bind("isEnabled").toMany([a,...l],"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(i.buttonView,"execute",(()=>{r.execute(s),r.editing.view.focus()})),this.listenTo(i,"execute",(e=>{r.execute(e.source.commandName),r.editing.view.focus()})),i}_fillDropdownWithListOptions(e,t){const o=this.editor,n=[],r=new _r;for(const e of t)lv(e,o,n,r);return og(e,r),n}}function lv(e,t,o,n){if("button"===e.type||"switchbutton"===e.type){const n=e.model=new bm(e.model),{commandName:r,bindIsOn:i}=e.model,s=t.commands.get(r);o.push(s),n.set({commandName:r}),n.bind("isEnabled").to(s),i&&n.bind("isOn").to(s,"value"),n.set({withText:!0})}n.add(e)}var cv=o(5593),dv={attributes:{"data-cke":!0}};dv.setAttributes=Wr(),dv.insert=qr().bind(null,"head"),dv.domAPI=Lr(),dv.insertStyleElement=Ur();Or()(cv.Z,dv);cv.Z&&cv.Z.locals&&cv.Z.locals;class uv extends Br{static get pluginName(){return"TableSelection"}static get requires(){return[RC,RC]}init(){const e=this.editor,t=e.model,o=e.editing.view;this.listenTo(t,"deleteContent",((e,t)=>this._handleDeleteContent(e,t)),{priority:"high"}),this.listenTo(o.document,"insertText",((e,t)=>this._handleInsertTextEvent(e,t)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(RC),t=this.editor.model.document.selection,o=e.getSelectedTableCells(t);return 0==o.length?null:o}getSelectionAsFragment(){const e=this.editor.plugins.get(RC),t=this.getSelectedTableCells();return t?this.editor.model.change((o=>{const n=o.createDocumentFragment(),{first:r,last:i}=e.getColumnIndexes(t),{first:s,last:a}=e.getRowIndexes(t),l=t[0].findAncestor("table");let c=a,d=i;if(e.isSelectionRectangular(t)){const e={firstColumn:r,lastColumn:i,firstRow:s,lastRow:a};c=xC(l,e),d=EC(l,e)}const u=fC(l,{startRow:s,startColumn:r,endRow:c,endColumn:d},o);return o.insert(u,n,0),n})):null}setCellSelection(e,t){const o=this._getCellsToSelect(e,t);this.editor.model.change((e=>{e.setSelection(o.cells.map((t=>e.createRangeOn(t))),{backward:o.backward})}))}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=yr(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add((e=>e.on("selection",((e,o,n)=>{const r=n.writer;!function(e){for(const o of t)e.removeClass("ck-editor__editable_selected",o);t.clear()}(r);const i=this.getSelectedTableCells();if(!i)return;for(const e of i){const o=n.mapper.toViewElement(e);r.addClass("ck-editor__editable_selected",o),t.add(o)}const s=n.mapper.toViewElement(i[i.length-1]);r.setSelection(s,0)}),{priority:"lowest"})))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",(()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change((o=>{const n=o.createPositionAt(t[0],0),r=e.model.schema.getNearestSelectionRange(n);o.setSelection(r)}))}}))}_handleDeleteContent(e,t){const o=this.editor.plugins.get(RC),n=t[0],r=t[1],i=this.editor.model,s=!r||"backward"==r.direction,a=o.getSelectedTableCells(n);a.length&&(e.stop(),i.change((e=>{const t=a[s?a.length-1:0];i.change((e=>{for(const t of a)i.deleteContent(e.createSelection(t,"in"))}));const o=i.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(o):n.setTo(o)})))}_handleInsertTextEvent(e,t){const o=this.editor,n=this.getSelectedTableCells();if(!n)return;const r=o.editing.view,i=o.editing.mapper,s=n.map((e=>r.createRangeOn(i.toViewElement(e))));t.selection=r.createSelection(s)}_getCellsToSelect(e,t){const o=this.editor.plugins.get("TableUtils"),n=o.getCellLocation(e),r=o.getCellLocation(t),i=Math.min(n.row,r.row),s=Math.max(n.row,r.row),a=Math.min(n.column,r.column),l=Math.max(n.column,r.column),c=new Array(s-i+1).fill(null).map((()=>[])),d={startRow:i,endRow:s,startColumn:a,endColumn:l};for(const{row:t,cell:o}of new sC(e.findAncestor("table"),d))c[t-i].push(o);const u=r.rowe.reverse())),{cells:c.flat(),backward:u||h}}}class hv extends Br{static get pluginName(){return"TableClipboard"}static get requires(){return[uv,RC]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",((e,t)=>this._onCopyCut(e,t))),this.listenTo(t,"cut",((e,t)=>this._onCopyCut(e,t))),this.listenTo(e.model,"insertContent",((e,[t,o])=>this._onInsertContent(e,t,o)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const o=this.editor.plugins.get(uv);if(!o.getSelectedTableCells())return;if("cut"==e.name&&!this.editor.model.canEditAt(this.editor.model.document.selection))return;t.preventDefault(),e.stop();const n=this.editor.data,r=this.editor.editing.view.document,i=n.toView(o.getSelectionAsFragment());r.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:i,method:e.name})}_onInsertContent(e,t,o){if(o&&!o.is("documentSelection"))return;const n=this.editor.model,r=this.editor.plugins.get(RC);let i=this.getTableIfOnlyTableInContent(t,n);if(!i)return;const s=r.getSelectionAffectedTableCells(n.document.selection);s.length?(e.stop(),n.change((e=>{const t={width:r.getColumns(i),height:r.getRows(i)},o=function(e,t,o,n){const r=e[0].findAncestor("table"),i=n.getColumnIndexes(e),s=n.getRowIndexes(e),a={firstColumn:i.first,lastColumn:i.last,firstRow:s.first,lastRow:s.last},l=1===e.length;l&&(a.lastRow+=t.height-1,a.lastColumn+=t.width-1,function(e,t,o,n){const r=n.getColumns(e),i=n.getRows(e);o>r&&n.insertColumns(e,{at:r,columns:o-r});t>i&&n.insertRows(e,{at:i,rows:t-i})}(r,a.lastRow+1,a.lastColumn+1,n));l||!n.isSelectionRectangular(e)?function(e,t,o){const{firstRow:n,lastRow:r,firstColumn:i,lastColumn:s}=t,a={first:n,last:r},l={first:i,last:s};gv(e,i,a,o),gv(e,s+1,a,o),pv(e,n,l,o),pv(e,r+1,l,o,n)}(r,a,o):(a.lastRow=xC(r,a),a.lastColumn=EC(r,a));return a}(s,t,e,r),n=o.lastRow-o.firstRow+1,a=o.lastColumn-o.firstColumn+1,l={startRow:0,startColumn:0,endRow:Math.min(n,t.height)-1,endColumn:Math.min(a,t.width)-1};i=fC(i,l,e);const c=s[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(i,t,c,o,e);if(this.editor.plugins.get("TableSelection").isEnabled){const t=r.sortRanges(d.map((t=>e.createRangeOn(t))));e.setSelection(t)}else e.setSelection(d[0],0)}))):vC(i,r)}_replaceSelectedCellsWithPasted(e,t,o,n,r){const{width:i,height:s}=t,a=function(e,t,o){const n=new Array(o).fill(null).map((()=>new Array(t).fill(null)));for(const{column:t,row:o,cell:r}of new sC(e))n[o][t]=r;return n}(e,i,s),l=[...new sC(o,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of l){const{row:t,column:o}=e;o===n.firstColumn&&(d=e.getPositionBefore());const l=t-n.firstRow,u=o-n.firstColumn,h=a[l%s][u%i],p=h?r.cloneElement(h):null,g=this._replaceTableSlotCell(e,p,d,r);g&&(yC(g,t,o,n.lastRow,n.lastColumn,r),c.push(g),d=r.createPositionAfter(g))}const u=parseInt(o.getAttribute("headingRows")||"0"),h=parseInt(o.getAttribute("headingColumns")||"0"),p=n.firstRowmv(e,t,o))).map((({cell:e})=>kC(e,t,n)))}function gv(e,t,o,n){if(t<1)return;return wC(e,t).filter((({row:e,cellHeight:t})=>mv(e,t,o))).map((({cell:e,column:o})=>_C(e,o,t,n)))}function mv(e,t,o){const n=e+t-1,{first:r,last:i}=o;return e>=r&&e<=i||e=r}class fv extends Br{static get pluginName(){return"TableKeyboard"}static get requires(){return[uv,RC]}init(){const e=this.editor.editing.view.document;this.listenTo(e,"arrowKey",((...e)=>this._onArrowKey(...e)),{context:"table"}),this.listenTo(e,"tab",((...e)=>this._handleTabOnSelectedTable(...e)),{context:"figure"}),this.listenTo(e,"tab",((...e)=>this._handleTab(...e)),{context:["th","td"]})}_handleTabOnSelectedTable(e,t){const o=this.editor,n=o.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),o.model.change((e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))})))}_handleTab(e,t){const o=this.editor,n=this.editor.plugins.get(RC),r=this.editor.plugins.get("TableSelection"),i=o.model.document.selection,s=!t.shiftKey;let a=n.getTableCellsContainingSelection(i)[0];if(a||(a=r.getFocusCell()),!a)return;t.preventDefault(),t.stopPropagation(),e.stop();const l=a.parent,c=l.parent,d=c.getChildIndex(l),u=l.getChildIndex(a),h=0===u;if(!s&&h&&0===d)return void o.model.change((e=>{e.setSelection(e.createRangeOn(c))}));const p=u===l.childCount-1,g=d===n.getRows(c)-1;if(s&&g&&p&&(o.execute("insertTableRowBelow"),d===n.getRows(c)-1))return void o.model.change((e=>{e.setSelection(e.createRangeOn(c))}));let m;if(s&&p){const e=c.getChild(d+1);m=e.getChild(0)}else if(!s&&h){const e=c.getChild(d-1);m=e.getChild(e.childCount-1)}else m=l.getChild(u+(s?1:-1));o.model.change((e=>{e.setSelection(e.createRangeIn(m))}))}_onArrowKey(e,t){const o=this.editor,n=gr(t.keyCode,o.locale.contentLanguageDirection);this._handleArrowKeys(n,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const o=this.editor.plugins.get(RC),n=this.editor.plugins.get("TableSelection"),r=this.editor.model,i=r.document.selection,s=["right","down"].includes(e),a=o.getSelectedTableCells(i);if(a.length){let o;return o=t?n.getFocusCell():s?a[a.length-1]:a[0],this._navigateFromCellInDirection(o,e,t),!0}const l=i.focus.findAncestor("tableCell");if(!l)return!1;if(!i.isCollapsed)if(t){if(i.isBackward==s&&!i.containsEntireContent(l))return!1}else{const e=i.getSelectedElement();if(!e||!r.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(i,l,s)&&(this._navigateFromCellInDirection(l,e,t),!0)}_isSelectionAtCellEdge(e,t,o){const n=this.editor.model,r=this.editor.model.schema,i=o?e.getLastPosition():e.getFirstPosition();if(!r.getLimitElement(i).is("element","tableCell")){return n.createPositionAt(t,o?"end":0).isTouching(i)}const s=n.createSelection(i);return n.modifySelection(s,{direction:o?"forward":"backward"}),i.isEqual(s.focus)}_navigateFromCellInDirection(e,t,o=!1){const n=this.editor.model,r=e.findAncestor("table"),i=[...new sC(r,{includeAllSlots:!0})],{row:s,column:a}=i[i.length-1],l=i.find((({cell:t})=>t==e));let{row:c,column:d}=l;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>s||d<0&&c<=0||d>a&&c>=s)return void n.change((e=>{e.setSelection(e.createRangeOn(r))}));d<0?(d=o?0:a,c--):d>a&&(d=o?a:0,c++);const u=i.find((e=>e.row==c&&e.column==d)).cell,h=["right","down"].includes(t),p=this.editor.plugins.get("TableSelection");if(o&&p.isEnabled){const t=p.getAnchorCell()||e;p.setCellSelection(t,u)}else{const e=n.createPositionAt(u,h?0:"end");n.change((t=>{t.setSelection(e)}))}}}class bv extends Ea{constructor(){super(...arguments),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class kv extends Br{static get pluginName(){return"TableMouse"}static get requires(){return[uv,RC]}init(){this.editor.editing.view.addObserver(bv),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(RC);let o=!1;const n=e.plugins.get(uv);this.listenTo(e.editing.view.document,"mousedown",((r,i)=>{const s=e.model.document.selection;if(!this.isEnabled||!n.isEnabled)return;if(!i.domEvent.shiftKey)return;const a=n.getAnchorCell()||t.getTableCellsContainingSelection(s)[0];if(!a)return;const l=this._getModelTableCellFromDomEvent(i);l&&wv(a,l)&&(o=!0,n.setCellSelection(a,l),i.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{o=!1})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{o&&e.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,o,n=!1,r=!1;const i=e.plugins.get(uv);this.listenTo(e.editing.view.document,"mousedown",((e,o)=>{this.isEnabled&&i.isEnabled&&(o.domEvent.shiftKey||o.domEvent.ctrlKey||o.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(o)))})),this.listenTo(e.editing.view.document,"mousemove",((e,s)=>{if(!s.domEvent.buttons)return;if(!t)return;const a=this._getModelTableCellFromDomEvent(s);a&&wv(t,a)&&(o=a,n||o==t||(n=!0)),n&&(r=!0,i.setCellSelection(t,o),s.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{n=!1,r=!1,t=null,o=null})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{r&&e.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,o=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(o).parent.findAncestor("tableCell",{includeSelf:!0})}}function wv(e,t){return e.parent.parent==t.parent.parent}var _v=o(4104),yv={attributes:{"data-cke":!0}};yv.setAttributes=Wr(),yv.insert=qr().bind(null,"head"),yv.domAPI=Lr(),yv.insertStyleElement=Ur();Or()(_v.Z,yv);_v.Z&&_v.Z.locals&&_v.Z.locals;function Av(e){const t=e.getSelectedElement();return t&&vv(t)?t:null}function Cv(e){const t=e.getFirstPosition();if(!t)return null;let o=t.parent;for(;o;){if(o.is("element")&&vv(o))return o;o=o.parent}return null}function vv(e){return!!e.getCustomProperty("table")&&$m(e)}var xv=o(4082),Ev={attributes:{"data-cke":!0}};Ev.setAttributes=Wr(),Ev.insert=qr().bind(null,"head"),Ev.domAPI=Lr(),Ev.insertStyleElement=Ur();Or()(xv.Z,Ev);xv.Z&&xv.Z.locals&&xv.Z.locals;class Dv extends Sh{constructor(e,t){super(e),this.set("value",""),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.options=t,this.focusTracker=new Ar,this._focusables=new xh,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new Cr,this._stillTyping=!1,this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color"]},children:[this.dropdownView,this.inputView]}),this.on("change:value",((e,t,o)=>this._setInputValue(o)))}render(){super.render(),this.keystrokes.listenTo(this.dropdownView.panelView.element)}focus(){this.inputView.focus()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,o=this.bindTemplate,n=this._createColorGrid(e),r=Xp(e),i=new Sh,s=this._createRemoveColorButton();return i.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:o.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",o.if("value","ck-hidden",(e=>""!=e))]}}]}),r.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),r.buttonView.children.add(i),r.buttonView.label=t("Color picker"),r.buttonView.tooltip=!0,r.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",r.panelView.children.add(s),r.panelView.children.add(n),r.bind("isEnabled").to(this,"isReadOnly",(e=>!e)),this._focusables.add(s),this._focusables.add(n),this.focusTracker.add(s.element),this.focusTracker.add(n.element),r}_createInputTextView(){const e=this.locale,t=new Ap(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",(()=>{const e=t.element.value,o=this.options.colorDefinitions.find((t=>e===t.label));this._stillTyping=!0,this.value=o&&o.color||e})),t.on("blur",(()=>{this._stillTyping=!1,this._setInputValue(t.element.value)})),t.delegate("input").to(this),t}_createRemoveColorButton(){const e=this.locale,t=e.t,o=new op(e),n=this.options.defaultColorValue||"",r=t(n?"Restore default":"Remove color");return o.class="ck-input-color__remove-color",o.withText=!0,o.icon=uh.eraser,o.label=r,o.on("execute",(()=>{this.value=n,this.dropdownView.isOpen=!1,this.fire("input")})),o}_createColorGrid(e){const t=new hp(e,{colorDefinitions:this.options.colorDefinitions,columns:this.options.columns});return t.on("execute",((e,t)=>{this.value=t.value,this.dropdownView.isOpen=!1,this.fire("input")})),t.bind("selectedColor").to(this,"value"),t}_setInputValue(e){if(!this._stillTyping){const t=Sv(e),o=this.options.colorDefinitions.find((e=>t===Sv(e.color)));this.inputView.value=o?o.label:e||""}}}function Sv(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const Tv=e=>""===e;function Bv(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function Iv(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function Pv(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function Rv(e){return e=e.trim(),Tv(e)||Tu(e)}function zv(e){return e=e.trim(),Tv(e)||Lv(e)||Ru(e)||(t=e,zu.test(t));var t}function Mv(e){return e=e.trim(),Tv(e)||Lv(e)||Ru(e)}function Nv(e,t){const o=new _r,n=Bv(e.t);for(const r in n){const i={type:"button",model:new bm({_borderStyleValue:r,label:n[r],role:"menuitemradio",withText:!0})};"none"===r?i.model.bind("isOn").to(e,"borderStyle",(e=>"none"===t?!e:e===r)):i.model.bind("isOn").to(e,"borderStyle",(e=>e===r)),o.add(i)}return o}function Fv(e){const{view:t,icons:o,toolbar:n,labels:r,propertyName:i,nameToValue:s,defaultValue:a}=e;for(const e in r){const l=new op(t.locale);l.set({label:r[e],icon:o[e],tooltip:r[e]});const c=s?s(e):e;l.bind("isOn").to(t,i,(e=>{let t=e;return""===e&&a&&(t=a),c===t})),l.on("execute",(()=>{t[i]=c})),n.items.add(l)}}const Ov=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function Vv(e){return(t,o,n)=>{const r=new Dv(t.locale,{colorDefinitions:(i=e.colorConfig,i.map((e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}})))),columns:e.columns,defaultColorValue:e.defaultColorValue});var i;return r.inputView.set({id:o,ariaDescribedById:n}),r.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),r.bind("hasError").to(t,"errorText",(e=>!!e)),r.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused").to(r),r}}function Lv(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}var jv=o(9865),qv={attributes:{"data-cke":!0}};qv.setAttributes=Wr(),qv.insert=qr().bind(null,"head"),qv.domAPI=Lr(),qv.insertStyleElement=Ur();Or()(jv.Z,qv);jv.Z&&jv.Z.locals&&jv.Z.locals;class Hv extends Sh{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",o.to("class")],role:o.to("_role"),"aria-labelledby":o.to("_ariaLabelledBy")},children:this.children})}}var Wv=o(4880),$v={attributes:{"data-cke":!0}};$v.setAttributes=Wr(),$v.insert=qr().bind(null,"head"),$v.domAPI=Lr(),$v.insertStyleElement=Ur();Or()(Wv.Z,$v);Wv.Z&&Wv.Z.locals&&Wv.Z.locals;var Uv=o(198),Gv={attributes:{"data-cke":!0}};Gv.setAttributes=Wr(),Gv.insert=qr().bind(null,"head"),Gv.domAPI=Lr(),Gv.insertStyleElement=Ur();Or()(Uv.Z,Gv);Uv.Z&&Uv.Z.locals&&Uv.Z.locals;var Kv=o(5737),Zv={attributes:{"data-cke":!0}};Zv.setAttributes=Wr(),Zv.insert=qr().bind(null,"head"),Zv.domAPI=Lr(),Zv.insertStyleElement=Ur();Or()(Kv.Z,Zv);Kv.Z&&Kv.Z.locals&&Kv.Z.locals;const Jv={left:uh.alignLeft,center:uh.alignCenter,right:uh.alignRight,justify:uh.alignJustify,top:uh.alignTop,middle:uh.alignMiddle,bottom:uh.alignBottom};class Qv extends Sh{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:r,borderRowLabel:i}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:p,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new Ar,this.keystrokes=new Cr,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=r,this.backgroundInput=a,this.paddingInput=this._createPaddingField(),this.widthInput=l,this.heightInput=d,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=p;const{saveButtonView:m,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=m,this.cancelButtonView=f,this._focusables=new xh,this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new mm(e,{label:this.t("Cell properties")})),this.children.add(new Hv(e,{labelView:i,children:[i,o,r,n],class:"ck-table-form__border-row"})),this.children.add(new Hv(e,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new Hv(e,{children:[new Hv(e,{labelView:u,children:[u,l,c,d],class:"ck-table-form__dimensions-row"}),new Hv(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new Hv(e,{labelView:g,children:[g,h,p],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new Hv(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Ch({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderColorInput.fieldView.dropdownView.buttonView,this.borderWidthInput,this.backgroundInput,this.backgroundInput.fieldView.dropdownView.buttonView,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=Vv({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color}),n=this.locale,r=this.t,i=r("Style"),s=new mp(n);s.text=r("Border");const a=Bv(r),l=new kp(n,sg);l.set({label:i,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:i,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:i}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>a[e||"none"])),l.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),l.bind("isEmpty").to(this,"borderStyle",(e=>!e)),og(l.fieldView,Nv(this,t.style),{role:"menu",ariaLabel:i});const c=new kp(n,ig);c.set({label:r("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",Yv),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new kp(n,o);return d.set({label:r("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",Yv),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,o,n,r)=>{Yv(n)||(this.borderColor="",this.borderWidth=""),Yv(r)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:s,borderStyleDropdown:l,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Background");const n=Vv({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor}),r=new kp(e,n);return r.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),r.fieldView.bind("value").to(this,"backgroundColor"),r.fieldView.on("input",(()=>{this.backgroundColor=r.fieldView.value})),{backgroundRowLabel:o,backgroundInput:r}}_createDimensionFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Dimensions");const n=new kp(e,ig);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const r=new Sh(e);r.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const i=new kp(e,ig);return i.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),i.fieldView.bind("value").to(this,"height"),i.fieldView.on("input",(()=>{this.height=i.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:r,heightInput:i}}_createPaddingField(){const e=this.locale,t=this.t,o=new kp(e,ig);return o.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),o.fieldView.bind("value").to(this,"padding"),o.fieldView.on("input",(()=>{this.padding=o.fieldView.element.value})),o}_createAlignmentFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Table cell text alignment");const n=new Fp(e),r="rtl"===e.contentLanguageDirection;n.set({isCompact:!0,ariaLabel:t("Horizontal text alignment toolbar")}),Fv({view:this,icons:Jv,toolbar:n,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(r){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const i=new Fp(e);return i.set({isCompact:!0,ariaLabel:t("Vertical text alignment toolbar")}),Fv({view:this,icons:Jv,toolbar:i,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:n,verticalAlignmentToolbar:i,alignmentLabel:o}}_createActionButtons(){const e=this.locale,t=this.t,o=new op(e),n=new op(e),r=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return o.set({label:t("Save"),icon:uh.check,class:"ck-button-save",type:"submit",withText:!0}),o.bind("isEnabled").toMany(r,"errorText",((...e)=>e.every((e=>!e)))),n.set({label:t("Cancel"),icon:uh.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:o,cancelButtonView:n}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,o=t("Align cell text to the left"),n=t("Align cell text to the center"),r=t("Align cell text to the right"),i=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:r,center:n,left:o,justify:i}:{left:o,center:n,right:r,justify:i}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function Yv(e){return"none"!==e}const Xv=Wg.defaultPositions,ex=[Xv.northArrowSouth,Xv.northArrowSouthWest,Xv.northArrowSouthEast,Xv.southArrowNorth,Xv.southArrowNorthWest,Xv.southArrowNorthEast,Xv.viewportStickyNorth];function tx(e,t){const o=e.plugins.get("ContextualBalloon");if(Cv(e.editing.view.document.selection)){let n;n="cell"===t?nx(e):ox(e),o.updatePosition(n)}}function ox(e){const t=e.model.document.selection.getFirstPosition().findAncestor("table"),o=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(o),positions:ex}}function nx(e){const t=e.editing.mapper,o=e.editing.view.domConverter,n=e.model.document.selection;if(n.rangeCount>1)return{target:()=>function(e,t){const o=t.editing.mapper,n=t.editing.view.domConverter,r=Array.from(e).map((e=>{const t=rx(e.start),r=o.toViewElement(t);return new Fn(n.mapViewToDom(r))}));return Fn.getBoundingRect(r)}(n.getRanges(),e),positions:ex};const r=rx(n.getFirstPosition()),i=t.toViewElement(r);return{target:o.mapViewToDom(i),positions:ex}}function rx(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}function ix(e){if(!e||!N(e))return e;const{top:t,right:o,bottom:n,left:r}=e;return t==o&&o==n&&n==r?t:void 0}function sx(e,t){const o=parseFloat(e);return Number.isNaN(o)||String(o)!==String(e)?e:`${o}${t}`}function ax(e,t={}){const o={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...e};return t.includeAlignmentProperty&&!o.alignment&&(o.alignment="center"),t.includePaddingProperty&&!o.padding&&(o.padding=""),t.includeVerticalAlignmentProperty&&!o.verticalAlignment&&(o.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!o.horizontalAlignment&&(o.horizontalAlignment=t.isRightToLeftContent?"right":"left"),o}const lx={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class cx extends Br{static get requires(){return[Cm]}static get pluginName(){return"TableCellPropertiesUI"}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:Ov,backgroundColors:Ov})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=ax(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(Cm),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",(o=>{const n=new op(o);n.set({label:t("Cell properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const r=Object.values(lx).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(r,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableCellProperties"),o=ap(t.borderColors),n=sp(e.locale,o),r=ap(t.backgroundColors),i=sp(e.locale,r),s=new Qv(e.locale,{borderColors:n,backgroundColors:i,defaultTableCellProperties:this._defaultTableCellProperties}),a=e.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),yh({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const l=Iv(a),c=Pv(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableCellBorderColor",errorText:l,validator:Rv})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableCellBorderWidth",errorText:c,validator:Mv})),s.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:s.paddingInput,commandName:"tableCellPadding",errorText:c,validator:zv})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableCellWidth",errorText:c,validator:zv})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableCellHeight",errorText:c,validator:zv})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableCellBackgroundColor",errorText:l,validator:Rv})),s.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),s.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(lx).map((([t,o])=>{const n=this._defaultTableCellProperties[t]||"";return[t,e.get(o).value||n]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:nx(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;Cv(e.editing.view.document.selection)?this._isViewVisible&&tx(e,"cell"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:r}=e,i=La((()=>{o.errorText=r}),500);return(e,r,s)=>{i.cancel(),this._isReady&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),o.errorText=null):i())}}}class dx extends Pr{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:o}=e,n=this.editor.model,r=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n.document.selection),i=this._getValueToSet(t);n.enqueueChange(o,(e=>{i?r.forEach((t=>e.setAttribute(this.attributeName,i,t))):r.forEach((t=>e.removeAttribute(this.attributeName,t)))}))}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every((e=>this._getAttribute(e)===t))?t:void 0}}class ux extends dx{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=sx(e,"px"))!==this._defaultValue)return e}}class hx extends Br{static get pluginName(){return"TableCellWidthEditing"}static get requires(){return[ov]}init(){const e=this.editor,t=ax(e.config.get("table.tableCellProperties.defaultProperties"));oC(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:t.width}),e.commands.add("tableCellWidth",new ux(e,t.width))}}class px extends dx{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=sx(e,"px");if(t!==this._defaultValue)return t}}class gx extends dx{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=sx(e,"px");if(t!==this._defaultValue)return t}}class mx extends dx{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class fx extends dx{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class bx extends dx{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class kx extends dx{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class wx extends dx{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class _x extends dx{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=sx(e,"px");if(t!==this._defaultValue)return t}}const yx=/^(top|middle|bottom)$/,Ax=/^(left|center|right|justify)$/;class Cx extends Br{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[ov,hx]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const n=ax(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(Ku),function(e,t,o){const n={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(n)}),ZA(t,"td",n,o),ZA(t,"th",n,o),JA(t,{modelElement:"tableCell",modelAttribute:n.style,styleName:"border-style"}),JA(t,{modelElement:"tableCell",modelAttribute:n.color,styleName:"border-color"}),JA(t,{modelElement:"tableCell",modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableCellBorderStyle",new kx(e,n.borderStyle)),e.commands.add("tableCellBorderColor",new wx(e,n.borderColor)),e.commands.add("tableCellBorderWidth",new _x(e,n.borderWidth)),oC(t,o,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableCellHeight",new gx(e,n.height)),e.data.addStyleProcessorRules(rh),oC(t,o,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),e.commands.add("tableCellPadding",new px(e,n.padding)),e.data.addStyleProcessorRules(Gu),oC(t,o,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableCellBackgroundColor",new mx(e,n.backgroundColor)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:e=>({key:"style",value:{"text-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":Ax}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:Ax}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new bx(e,n.horizontalAlignment)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:e=>({key:"style",value:{"vertical-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":yx}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:yx}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===o?null:t}}})}(t,o,n.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new fx(e,n.verticalAlignment))}}class vx extends Pr{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor.model.document.selection.getFirstPosition().findAncestor("table");this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,o=t.document.selection,{value:n,batch:r}=e,i=o.getFirstPosition().findAncestor("table"),s=this._getValueToSet(n);t.enqueueChange(r,(e=>{s?e.setAttribute(this.attributeName,s,i):e.removeAttribute(this.attributeName,i)}))}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}}class xx extends vx{constructor(e,t){super(e,"tableBackgroundColor",t)}}class Ex extends vx{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Dx extends vx{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Sx extends vx{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=sx(e,"px");if(t!==this._defaultValue)return t}}class Tx extends vx{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=sx(e,"px"))!==this._defaultValue)return e}}class Bx extends vx{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if((e=sx(e,"px"))!==this._defaultValue)return e}}class Ix extends vx{constructor(e,t){super(e,"tableAlignment",t)}}const Px=/^(left|center|right)$/,Rx=/^(left|none|right)$/;class zx extends Br{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[ov]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const n=ax(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules(Ku),function(e,t,o){const n={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(n)}),ZA(t,"table",n,o),QA(t,{modelAttribute:n.color,styleName:"border-color"}),QA(t,{modelAttribute:n.style,styleName:"border-style"}),QA(t,{modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableBorderColor",new Ex(e,n.borderColor)),e.commands.add("tableBorderStyle",new Dx(e,n.borderStyle)),e.commands.add("tableBorderWidth",new Sx(e,n.borderWidth)),function(e,t,o){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:Rx}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===o?null:t}}}).attributeToAttribute({view:{attributes:{align:Px}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.alignment),e.commands.add("tableAlignment",new Ix(e,n.alignment)),Mx(t,o,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),e.commands.add("tableWidth",new Tx(e,n.width)),Mx(t,o,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableHeight",new Bx(e,n.height)),e.data.addStyleProcessorRules(Gu),function(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),KA(t,{viewElement:"table",...o}),QA(t,o)}(t,o,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableBackgroundColor",new xx(e,n.backgroundColor))}}function Mx(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),KA(t,{viewElement:/^(table|figure)$/,shouldUpcast:e=>!("table"==e.name&&"figure"==e.parent.name),...o}),JA(t,{modelElement:"table",...o})}var Nx=o(9221),Fx={attributes:{"data-cke":!0}};Fx.setAttributes=Wr(),Fx.insert=qr().bind(null,"head"),Fx.domAPI=Lr(),Fx.insertStyleElement=Ur();Or()(Nx.Z,Fx);Nx.Z&&Nx.Z.locals&&Nx.Z.locals;const Ox={left:uh.objectLeft,center:uh.objectCenter,right:uh.objectRight};class Vx extends Sh{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:r,borderRowLabel:i}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:p}=this._createAlignmentFields();this.focusTracker=new Ar,this.keystrokes=new Cr,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=r,this.backgroundInput=a,this.widthInput=l,this.heightInput=d,this.alignmentToolbar=h;const{saveButtonView:g,cancelButtonView:m}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=m,this._focusables=new xh,this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new mm(e,{label:this.t("Table properties")})),this.children.add(new Hv(e,{labelView:i,children:[i,o,r,n],class:"ck-table-form__border-row"})),this.children.add(new Hv(e,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new Hv(e,{children:[new Hv(e,{labelView:u,children:[u,l,c,d],class:"ck-table-form__dimensions-row"}),new Hv(e,{labelView:p,children:[p,h],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new Hv(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Ch({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderColorInput.fieldView.dropdownView.buttonView,this.borderWidthInput,this.backgroundInput,this.backgroundInput.fieldView.dropdownView.buttonView,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=Vv({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color}),n=this.locale,r=this.t,i=r("Style"),s=new mp(n);s.text=r("Border");const a=Bv(r),l=new kp(n,sg);l.set({label:i,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:i,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:i}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>a[e||"none"])),l.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),l.bind("isEmpty").to(this,"borderStyle",(e=>!e)),og(l.fieldView,Nv(this,t.style),{role:"menu",ariaLabel:i});const c=new kp(n,ig);c.set({label:r("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",Lx),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new kp(n,o);return d.set({label:r("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",Lx),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,o,n,r)=>{Lx(n)||(this.borderColor="",this.borderWidth=""),Lx(r)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:s,borderStyleDropdown:l,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Background");const n=Vv({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor}),r=new kp(e,n);return r.set({label:t("Color"),class:"ck-table-properties-form__background"}),r.fieldView.bind("value").to(this,"backgroundColor"),r.fieldView.on("input",(()=>{this.backgroundColor=r.fieldView.value})),{backgroundRowLabel:o,backgroundInput:r}}_createDimensionFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Dimensions");const n=new kp(e,ig);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const r=new Sh(e);r.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const i=new kp(e,ig);return i.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),i.fieldView.bind("value").to(this,"height"),i.fieldView.on("input",(()=>{this.height=i.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:r,heightInput:i}}_createAlignmentFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Alignment");const n=new Fp(e);return n.set({isCompact:!0,ariaLabel:t("Table alignment toolbar")}),Fv({view:this,icons:Ox,toolbar:n,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:o,alignmentToolbar:n}}_createActionButtons(){const e=this.locale,t=this.t,o=new op(e),n=new op(e),r=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return o.set({label:t("Save"),icon:uh.check,class:"ck-button-save",type:"submit",withText:!0}),o.bind("isEnabled").toMany(r,"errorText",((...e)=>e.every((e=>!e)))),n.set({label:t("Cancel"),icon:uh.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:o,cancelButtonView:n}}get _alignmentLabels(){const e=this.locale,t=this.t,o=t("Align table to the left"),n=t("Center table"),r=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:r,center:n,left:o}:{left:o,center:n,right:r}}}function Lx(e){return"none"!==e}const jx={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class qx extends Br{static get requires(){return[Cm]}static get pluginName(){return"TablePropertiesUI"}constructor(e){super(e),this.view=null,e.config.define("table.tableProperties",{borderColors:Ov,backgroundColors:Ov})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=ax(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(Cm),e.ui.componentFactory.add("tableProperties",(o=>{const n=new op(o);n.set({label:t("Table properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const r=Object.values(jx).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(r,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableProperties"),o=ap(t.borderColors),n=sp(e.locale,o),r=ap(t.backgroundColors),i=sp(e.locale,r),s=new Vx(e.locale,{borderColors:n,backgroundColors:i,defaultTableProperties:this._defaultTableProperties}),a=e.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),yh({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const l=Iv(a),c=Pv(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableBorderColor",errorText:l,validator:Rv})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableBorderWidth",errorText:c,validator:Mv})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableBackgroundColor",errorText:l,validator:Rv})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableWidth",errorText:c,validator:zv})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableHeight",errorText:c,validator:zv})),s.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(jx).map((([t,o])=>{const n=t,r=this._defaultTableProperties[n]||"";return[n,e.get(o).value||r]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:ox(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;Cv(e.editing.view.document.selection)?this._isViewVisible&&tx(e,"table"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:r}=e,i=La((()=>{o.errorText=r}),500);return(e,r,s)=>{i.cancel(),this._isReady&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),o.errorText=null):i())}}}var Hx=o(9888),Wx={attributes:{"data-cke":!0}};Wx.setAttributes=Wr(),Wx.insert=qr().bind(null,"head"),Wx.domAPI=Lr(),Wx.insertStyleElement=Ur();Or()(Hx.Z,Wx);Hx.Z&&Hx.Z.locals&&Hx.Z.locals;var $x=o(728),Ux={attributes:{"data-cke":!0}};Ux.setAttributes=Wr(),Ux.insert=qr().bind(null,"head"),Ux.domAPI=Lr(),Ux.insertStyleElement=Ur();Or()($x.Z,Ux);$x.Z&&$x.Z.locals&&$x.Z.locals;function Gx(e,t){if(!e.childCount)return;const o=new Au(e.document),n=function(e,t){const o=t.createRangeIn(e),n=new si({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),r=[];for(const e of o)if("elementStart"===e.type&&n.match(e.item)){const t=Jx(e.item);r.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return r}(e,o);if(!n.length)return;let r=null,i=1;n.forEach(((e,s)=>{const a=function(e,t){if(!e)return!0;if(e.id!==t.id)return t.indent-e.indent!=1;const o=t.element.previousSibling;if(!o)return!0;return n=o,!(n.is("element","ol")||n.is("element","ul"));var n}(n[s-1],e),l=a?null:n[s-1],c=(u=e,(d=l)?u.indent-d.indent:u.indent-1);var d,u;if(a&&(r=null,i=1),!r||0!==c){const n=function(e,t){const o=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi"),n=/mso-level-number-format:([^;]{0,100});/gi,r=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,i=o.exec(t);let s="decimal",a="ol",l=null;if(i&&i[1]){const t=n.exec(i[1]);if(t&&t[1]&&(s=t[1].trim(),a="bullet"!==s&&"image"!==s?"ol":"ul"),"bullet"===s){const t=function(e){const t=function(e){if(e.getChild(0).is("$text"))return null;for(const t of e.getChildren()){if(!t.is("element","span"))continue;const e=t.getChild(0);if(e)return e.is("$text")?e:e.getChild(0)}return null}(e);if(!t)return null;const o=t._data;if("o"===o)return"circle";if("·"===o)return"disc";if("§"===o)return"square";return null}(e.element);t&&(s=t)}else{const e=r.exec(i[1]);e&&e[1]&&(l=parseInt(e[1]))}}return{type:a,startIndex:l,style:Kx(s)}}(e,t);if(r){if(e.indent>i){const e=r.getChild(r.childCount-1),t=e.getChild(e.childCount-1);r=Zx(n,t,o),i+=1}else if(e.indent1&&o.setAttribute("start",e.startIndex,r),r}function Jx(e){const t={},o=e.getStyle("mso-list");if(o){const e=o.match(/(^|\s{1,100})l(\d+)/i),n=o.match(/\s{0,100}lfo(\d+)/i),r=o.match(/\s{0,100}level(\d+)/i);e&&n&&r&&(t.id=e[2],t.order=n[1],t.indent=parseInt(r[1]))}return t}function Qx(e,t){if(!e.childCount)return;const o=new Au(e.document),n=function(e,t){const o=t.createRangeIn(e),n=new si({name:/v:(.+)/}),r=[];for(const e of o){if("elementStart"!=e.type)continue;const t=e.item,o=t.previousSibling,i=o&&o.is("element")?o.name:null;n.match(t)&&t.getAttribute("o:gfxdata")&&"v:shapetype"!==i&&r.push(e.item.getAttribute("id"))}return r}(e,o);!function(e,t,o){const n=o.createRangeIn(t),r=new si({name:"img"}),i=[];for(const t of n)if(t.item.is("element")&&r.match(t.item)){const o=t.item,n=o.getAttribute("v:shapes")?o.getAttribute("v:shapes").split(" "):[];n.length&&n.every((t=>e.indexOf(t)>-1))?i.push(o):o.getAttribute("src")||i.push(o)}for(const e of i)o.remove(e)}(n,e,o),function(e,t,o){const n=o.createRangeIn(t),r=[];for(const t of n)if("elementStart"==t.type&&t.item.is("element","v:shape")){const o=t.item.getAttribute("id");if(e.includes(o))continue;i(t.item.parent.getChildren(),o)||r.push(t.item)}for(const e of r){const t={src:s(e)};e.hasAttribute("alt")&&(t.alt=e.getAttribute("alt"));const n=o.createElement("img",t);o.insertChild(e.index+1,n,e.parent)}function i(e,t){for(const o of e)if(o.is("element")){if("img"==o.name&&o.getAttribute("v:shapes")==t)return!0;if(i(o.getChildren(),t))return!0}return!1}function s(e){for(const t of e.getChildren())if(t.is("element")&&t.getAttribute("src"))return t.getAttribute("src")}}(n,e,o),function(e,t){const o=t.createRangeIn(e),n=new si({name:/v:(.+)/}),r=[];for(const e of o)"elementStart"==e.type&&n.match(e.item)&&r.push(e.item);for(const e of r)t.remove(e)}(e,o);const r=function(e,t){const o=t.createRangeIn(e),n=new si({name:"img"}),r=[];for(const e of o)e.item.is("element")&&n.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&r.push(e.item);return r}(e,o);r.length&&function(e,t,o){if(e.length===t.length)for(let n=0;nString.fromCharCode(parseInt(e,16)))).join(""))}const Xx=//i,eE=/xmlns:o="urn:schemas-microsoft-com/i;class tE{constructor(e){this.document=e}isActive(e){return Xx.test(e)||eE.test(e)}execute(e){const{body:t,stylesString:o}=e._parsedData;Gx(t,o),Qx(t,e.dataTransfer.getData("text/rtf")),e.content=t}}function oE(e,t,o,{blockElements:n,inlineObjectElements:r}){let i=o.createPositionAt(e,"forward"==t?"after":"before");return i=i.getLastMatchingPosition((({item:e})=>e.is("element")&&!n.includes(e.name)&&!r.includes(e.name)),{direction:t}),"forward"==t?i.nodeAfter:i.nodeBefore}function nE(e,t){return!!e&&e.is("element")&&t.includes(e.name)}const rE=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class iE{constructor(e){this.document=e}isActive(e){return rE.test(e)}execute(e){const t=new Au(this.document),{body:o}=e._parsedData;!function(e,t){for(const o of e.getChildren())if(o.is("element","b")&&"normal"===o.getStyle("font-weight")){const n=e.getChildIndex(o);t.remove(o),t.insertChild(n,o.getChildren(),e)}}(o,t),function(e,t){for(const o of t.createRangeIn(e)){const e=o.item;if(e.is("element","li")){const o=e.getChild(0);o&&o.is("element","p")&&t.unwrapElement(o)}}}(o,t),function(e,t){const o=new Ds(t.document.stylesProcessor),n=new ka(o,{renderingMode:"data"}),r=n.blockElements,i=n.inlineObjectElements,s=[];for(const o of t.createRangeIn(e)){const e=o.item;if(e.is("element","br")){const o=oE(e,"forward",t,{blockElements:r,inlineObjectElements:i}),n=oE(e,"backward",t,{blockElements:r,inlineObjectElements:i}),a=nE(o,r);(nE(n,r)||a)&&s.push(e)}}for(const e of s)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}(o,t),e.content=o}}const sE=/(\s+)<\/span>/g,((e,t)=>1===t.length?" ":Array(t.length+1).join("  ").substr(0,t.length)))}function cE(e,t){const o=new DOMParser,n=function(e){return lE(lE(e)).replace(/([^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/ <\//g," <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)<")}(function(e){const t="",o="",n=e.indexOf(t);if(n<0)return e;const r=e.indexOf(o,n+t.length);return e.substring(0,n+t.length)+(r>=0?e.substring(r):"")}(e=e.replace(//,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(r.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,o,n){var r,s,a,l,c=e.bMarks[t]+e.tShift[t],d=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,d),r=0;r{"use strict";e.exports=function(e,t,o){var n,r,i,s,a,l,c,d,u,h,p=t+1,g=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(h=e.parentType,e.parentType="paragraph";p3)){if(e.sCount[p]>=e.blkIndent&&(l=e.bMarks[p]+e.tShift[p])<(c=e.eMarks[p])&&(45===(u=e.src.charCodeAt(l))||61===u)&&(l=e.skipChars(l,u),(l=e.skipSpaces(l))>=c)){d=61===u?1:2;break}if(!(e.sCount[p]<0)){for(r=!1,i=0,s=g.length;i{"use strict";var n=o(7022).isSpace;function r(e,t){var o,r,i,s;return r=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],42!==(o=e.src.charCodeAt(r++))&&45!==o&&43!==o||r=s)return-1;if((o=e.src.charCodeAt(i++))<48||o>57)return-1;for(;;){if(i>=s)return-1;if(!((o=e.src.charCodeAt(i++))>=48&&o<=57)){if(41===o||46===o)break;return-1}if(i-r>=10)return-1}return i=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]=e.blkIndent&&(z=!0),(S=i(e,t))>=0){if(h=!0,B=e.bMarks[t]+e.tShift[t],k=Number(e.src.slice(B,S-1)),z&&1!==k)return!1}else{if(!((S=r(e,t))>=0))return!1;h=!1}if(z&&e.skipSpaces(S)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(S-1),n)return!0;for(f=e.tokens.length,h?(R=e.push("ordered_list_open","ol",1),1!==k&&(R.attrs=[["start",k]])):R=e.push("bullet_list_open","ul",1),R.map=m=[t,0],R.markup=String.fromCharCode(b),_=t,T=!1,P=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";_=w?1:y-u)>4&&(d=1),c=u+d,(R=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),R.map=p=[t,0],h&&(R.info=e.src.slice(B,S-1)),E=e.tight,x=e.tShift[t],v=e.sCount[t],A=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=a-e.bMarks[t],e.sCount[t]=y,a>=w&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,o):e.md.block.tokenize(e,t,o,!0),e.tight&&!T||(M=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=A,e.tShift[t]=x,e.sCount[t]=v,e.tight=E,(R=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),_=t=e.line,p[1]=_,a=e.bMarks[t],_>=o)break;if(e.sCount[_]=4)break;for(I=!1,l=0,g=P.length;l{"use strict";e.exports=function(e,t){var o,n,r,i,s,a,l=t+1,c=e.md.block.ruler.getRules("paragraph"),d=e.lineMax;for(a=e.parentType,e.parentType="paragraph";l3||e.sCount[l]<0)){for(n=!1,r=0,i=c.length;r{"use strict";var n=o(7022).normalizeReference,r=o(7022).isSpace;e.exports=function(e,t,o,i){var s,a,l,c,d,u,h,p,g,m,f,b,k,w,_,y,A=0,C=e.bMarks[t]+e.tShift[t],v=e.eMarks[t],x=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(C))return!1;for(;++C3||e.sCount[x]<0)){for(w=!1,u=0,h=_.length;u{"use strict";var n=o(5872),r=o(7022).isSpace;function i(e,t,o,n){var i,s,a,l,c,d,u,h;for(this.src=e,this.md=t,this.env=o,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",h=!1,a=l=d=u=0,c=(s=this.src).length;l0&&this.level++,this.tokens.push(r),r},i.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},i.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!r(this.src.charCodeAt(--e)))return e+1;return e},i.prototype.skipChars=function(e,t){for(var o=this.src.length;eo;)if(t!==this.src.charCodeAt(--e))return e+1;return e},i.prototype.getLines=function(e,t,o,n){var i,s,a,l,c,d,u,h=e;if(e>=t)return"";for(d=new Array(t-e),i=0;ho?new Array(s-o+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return d.join("")},i.prototype.Token=n,e.exports=i},1785:(e,t,o)=>{"use strict";var n=o(7022).isSpace;function r(e,t){var o=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(o,n)}function i(e){var t,o=[],n=0,r=e.length,i=!1,s=0,a="";for(t=e.charCodeAt(n);no)return!1;if(h=t+1,e.sCount[h]=4)return!1;if((c=e.bMarks[h]+e.tShift[h])>=e.eMarks[h])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C)return!1;if(c>=e.eMarks[h])return!1;if(124!==(v=e.src.charCodeAt(c++))&&45!==v&&58!==v&&!n(v))return!1;if(45===C&&n(v))return!1;for(;c=4)return!1;if((p=i(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),0===(g=p.length)||g!==f.length)return!1;if(s)return!0;for(_=e.parentType,e.parentType="table",A=e.md.block.ruler.getRules("blockquote"),(m=e.push("table_open","table",1)).map=k=[t,0],(m=e.push("thead_open","thead",1)).map=[t,t+1],(m=e.push("tr_open","tr",1)).map=[t,t+1],d=0;d=4)break;for((p=i(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),h===t+2&&((m=e.push("tbody_open","tbody",1)).map=w=[t+2,0]),(m=e.push("tr_open","tr",1)).map=[h,h+1],d=0;d{"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},9827:e=>{"use strict";e.exports=function(e){var t,o,n,r=e.tokens;for(o=0,n=r.length;o{"use strict";var n=o(7022).arrayReplaceAt;function r(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,o,i,s,a,l,c,d,u,h,p,g,m,f,b,k,w,_,y=e.tokens;if(e.md.options.linkify)for(o=0,i=y.length;o=0;t--)if("link_close"!==(l=s[t]).type){if("html_inline"===l.type&&(_=l.content,/^\s]/i.test(_)&&m>0&&m--,r(l.content)&&m++),!(m>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(u=l.content,w=e.md.linkify.match(u),c=[],g=l.level,p=0,w.length>0&&0===w[0].index&&t>0&&"text_special"===s[t-1].type&&(w=w.slice(1)),d=0;dp&&((a=new e.Token("text","",0)).content=u.slice(p,h),a.level=g,c.push(a)),(a=new e.Token("link_open","a",1)).attrs=[["href",b]],a.level=g++,a.markup="linkify",a.info="auto",c.push(a),(a=new e.Token("text","",0)).content=k,a.level=g,c.push(a),(a=new e.Token("link_close","a",-1)).level=--g,a.markup="linkify",a.info="auto",c.push(a),p=w[d].lastIndex);p{"use strict";var t=/\r\n?|\n/g,o=/\0/g;e.exports=function(e){var n;n=(n=e.src.replace(t,"\n")).replace(o,"�"),e.src=n}},2834:e=>{"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,o=/\((c|tm|r)\)/i,n=/\((c|tm|r)\)/gi,r={c:"©",r:"®",tm:"™"};function i(e,t){return r[t.toLowerCase()]}function s(e){var t,o,r=0;for(t=e.length-1;t>=0;t--)"text"!==(o=e[t]).type||r||(o.content=o.content.replace(n,i)),"link_open"===o.type&&"auto"===o.info&&r--,"link_close"===o.type&&"auto"===o.info&&r++}function a(e){var o,n,r=0;for(o=e.length-1;o>=0;o--)"text"!==(n=e[o]).type||r||t.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}e.exports=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)"inline"===e.tokens[n].type&&(o.test(e.tokens[n].content)&&s(e.tokens[n].children),t.test(e.tokens[n].content)&&a(e.tokens[n].children))}},8450:(e,t,o)=>{"use strict";var n=o(7022).isWhiteSpace,r=o(7022).isPunctChar,i=o(7022).isMdAsciiPunct,s=/['"]/,a=/['"]/g;function l(e,t,o){return e.slice(0,t)+o+e.slice(t+1)}function c(e,t){var o,s,c,d,u,h,p,g,m,f,b,k,w,_,y,A,C,v,x,E,D;for(x=[],o=0;o=0&&!(x[C].level<=p);C--);if(x.length=C+1,"text"===s.type){u=0,h=(c=s.content).length;e:for(;u=0)m=c.charCodeAt(d.index-1);else for(C=o-1;C>=0&&("softbreak"!==e[C].type&&"hardbreak"!==e[C].type);C--)if(e[C].content){m=e[C].content.charCodeAt(e[C].content.length-1);break}if(f=32,u=48&&m<=57&&(A=y=!1),y&&A&&(y=b,A=k),y||A){if(A)for(C=x.length-1;C>=0&&(g=x[C],!(x[C].level=0;t--)"inline"===e.tokens[t].type&&s.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},6480:(e,t,o)=>{"use strict";var n=o(5872);function r(e,t,o){this.src=e,this.env=o,this.tokens=[],this.inlineMode=!1,this.md=t}r.prototype.Token=n,e.exports=r},6633:e=>{"use strict";e.exports=function(e){var t,o,n,r,i,s,a=e.tokens;for(t=0,o=a.length;t{"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,o=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,n){var r,i,s,a,l,c,d=e.pos;if(60!==e.src.charCodeAt(d))return!1;for(l=e.pos,c=e.posMax;;){if(++d>=c)return!1;if(60===(a=e.src.charCodeAt(d)))return!1;if(62===a)break}return r=e.src.slice(l+1,d),o.test(r)?(i=e.md.normalizeLink(r),!!e.md.validateLink(i)&&(n||((s=e.push("link_open","a",1)).attrs=[["href",i]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(r),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=r.length+2,!0)):!!t.test(r)&&(i=e.md.normalizeLink("mailto:"+r),!!e.md.validateLink(i)&&(n||((s=e.push("link_open","a",1)).attrs=[["href",i]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(r),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=r.length+2,!0))}},9755:e=>{"use strict";e.exports=function(e,t){var o,n,r,i,s,a,l,c,d=e.pos;if(96!==e.src.charCodeAt(d))return!1;for(o=d,d++,n=e.posMax;d{"use strict";function t(e,t){var o,n,r,i,s,a,l,c,d={},u=t.length;if(u){var h=0,p=-2,g=[];for(o=0;os;n-=g[n]+1)if((i=t[n]).marker===r.marker&&i.open&&i.end<0&&(l=!1,(i.close||r.open)&&(i.length+r.length)%3==0&&(i.length%3==0&&r.length%3==0||(l=!0)),!l)){c=n>0&&!t[n-1].open?g[n-1]+1:0,g[o]=o-n+c,g[n]=c,r.open=!1,i.end=o,i.close=!1,a=-1,p=-2;break}-1!==a&&(d[r.marker][(r.open?3:0)+(r.length||0)%3]=a)}}}e.exports=function(e){var o,n=e.tokens_meta,r=e.tokens_meta.length;for(t(0,e.delimiters),o=0;o{"use strict";function t(e,t){var o,n,r,i,s,a;for(o=t.length-1;o>=0;o--)95!==(n=t[o]).marker&&42!==n.marker||-1!==n.end&&(r=t[n.end],a=o>0&&t[o-1].end===n.end+1&&t[o-1].marker===n.marker&&t[o-1].token===n.token-1&&t[n.end+1].token===r.token+1,s=String.fromCharCode(n.marker),(i=e.tokens[n.token]).type=a?"strong_open":"em_open",i.tag=a?"strong":"em",i.nesting=1,i.markup=a?s+s:s,i.content="",(i=e.tokens[r.token]).type=a?"strong_close":"em_close",i.tag=a?"strong":"em",i.nesting=-1,i.markup=a?s+s:s,i.content="",a&&(e.tokens[t[o-1].token].content="",e.tokens[t[n.end+1].token].content="",o--))}e.exports.w=function(e,t){var o,n,r=e.pos,i=e.src.charCodeAt(r);if(t)return!1;if(95!==i&&42!==i)return!1;for(n=e.scanDelims(e.pos,42===i),o=0;o{"use strict";var n=o(6233),r=o(7022).has,i=o(7022).isValidEntityCode,s=o(7022).fromCodePoint,a=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var o,c,d,u=e.pos,h=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1>=h)return!1;if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(a))return t||(o="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),(d=e.push("text_special","",0)).content=i(o)?s(o):s(65533),d.markup=c[0],d.info="entity"),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&r(n,c[1]))return t||((d=e.push("text_special","",0)).content=n[c[1]],d.markup=c[0],d.info="entity"),e.pos+=c[0].length,!0;return!1}},1917:(e,t,o)=>{"use strict";for(var n=o(7022).isSpace,r=[],i=0;i<256;i++)r.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){r[e.charCodeAt(0)]=1})),e.exports=function(e,t){var o,i,s,a,l,c=e.pos,d=e.posMax;if(92!==e.src.charCodeAt(c))return!1;if(++c>=d)return!1;if(10===(o=e.src.charCodeAt(c))){for(t||e.push("hardbreak","br",0),c++;c=55296&&o<=56319&&c+1=56320&&i<=57343&&(a+=e.src[c+1],c++),s="\\"+a,t||(l=e.push("text_special","",0),o<256&&0!==r[o]?l.content=a:l.content=s,l.markup=s,l.info="escape"),e.pos=c+1,!0}},9969:e=>{"use strict";e.exports=function(e){var t,o,n=0,r=e.tokens,i=e.tokens.length;for(t=o=0;t0&&n++,"text"===r[t].type&&t+1{"use strict";var n=o(1947).n;e.exports=function(e,t){var o,r,i,s,a,l=e.pos;return!!e.md.options.html&&(i=e.posMax,!(60!==e.src.charCodeAt(l)||l+2>=i)&&(!(33!==(o=e.src.charCodeAt(l+1))&&63!==o&&47!==o&&!function(e){var t=32|e;return t>=97&&t<=122}(o))&&(!!(r=e.src.slice(l).match(n))&&(t||((s=e.push("html_inline","",0)).content=e.src.slice(l,l+r[0].length),a=s.content,/^\s]/i.test(a)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(s.content)&&e.linkLevel--),e.pos+=r[0].length,!0))))}},3006:(e,t,o)=>{"use strict";var n=o(7022).normalizeReference,r=o(7022).isSpace;e.exports=function(e,t){var o,i,s,a,l,c,d,u,h,p,g,m,f,b="",k=e.pos,w=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((d=l+1)=w)return!1;for(f=d,(h=e.md.helpers.parseLinkDestination(e.src,d,e.posMax)).ok&&(b=e.md.normalizeLink(h.str),e.md.validateLink(b)?d=h.pos:b=""),f=d;d=w||41!==e.src.charCodeAt(d))return e.pos=k,!1;d++}else{if(void 0===e.env.references)return!1;if(d=0?a=e.src.slice(f,d++):d=l+1):d=l+1,a||(a=e.src.slice(c,l)),!(u=e.env.references[n(a)]))return e.pos=k,!1;b=u.href,p=u.title}return t||(s=e.src.slice(c,l),e.md.inline.parse(s,e.md,e.env,m=[]),(g=e.push("image","img",0)).attrs=o=[["src",b],["alt",""]],g.children=m,g.content=s,p&&o.push(["title",p])),e.pos=d,e.posMax=w,!0}},1727:(e,t,o)=>{"use strict";var n=o(7022).normalizeReference,r=o(7022).isSpace;e.exports=function(e,t){var o,i,s,a,l,c,d,u,h="",p="",g=e.pos,m=e.posMax,f=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(a=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=a+1)=m)return!1;if(f=c,(d=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(h=e.md.normalizeLink(d.str),e.md.validateLink(h)?c=d.pos:h="",f=c;c=m||41!==e.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===e.env.references)return!1;if(c=0?s=e.src.slice(f,c++):c=a+1):c=a+1,s||(s=e.src.slice(l,a)),!(u=e.env.references[n(s)]))return e.pos=g,!1;h=u.href,p=u.title}return t||(e.pos=l,e.posMax=a,e.push("link_open","a",1).attrs=o=[["href",h]],p&&o.push(["title",p]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)),e.pos=c,e.posMax=m,!0}},2906:e=>{"use strict";var t=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;e.exports=function(e,o){var n,r,i,s,a,l,c;return!!e.md.options.linkify&&(!(e.linkLevel>0)&&(!((n=e.pos)+3>e.posMax)&&(58===e.src.charCodeAt(n)&&(47===e.src.charCodeAt(n+1)&&(47===e.src.charCodeAt(n+2)&&(!!(r=e.pending.match(t))&&(i=r[1],!!(s=e.md.linkify.matchAtStart(e.src.slice(n-i.length)))&&(a=(a=s.url).replace(/\*+$/,""),l=e.md.normalizeLink(a),!!e.md.validateLink(l)&&(o||(e.pending=e.pending.slice(0,-i.length),(c=e.push("link_open","a",1)).attrs=[["href",l]],c.markup="linkify",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(a),(c=e.push("link_close","a",-1)).markup="linkify",c.info="auto"),e.pos+=a.length-i.length,!0)))))))))}},3905:(e,t,o)=>{"use strict";var n=o(7022).isSpace;e.exports=function(e,t){var o,r,i,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;if(o=e.pending.length-1,r=e.posMax,!t)if(o>=0&&32===e.pending.charCodeAt(o))if(o>=1&&32===e.pending.charCodeAt(o-1)){for(i=o-1;i>=1&&32===e.pending.charCodeAt(i-1);)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(s++;s{"use strict";var n=o(5872),r=o(7022).isWhiteSpace,i=o(7022).isPunctChar,s=o(7022).isMdAsciiPunct;function a(e,t,o,n){this.src=e,this.env=o,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}a.prototype.pushPending=function(){var e=new n("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},a.prototype.push=function(e,t,o){this.pending&&this.pushPending();var r=new n(e,t,o),i=null;return o<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,o>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},a.prototype.scanDelims=function(e,t){var o,n,a,l,c,d,u,h,p,g=e,m=!0,f=!0,b=this.posMax,k=this.src.charCodeAt(e);for(o=e>0?this.src.charCodeAt(e-1):32;g{"use strict";function t(e,t){var o,n,r,i,s,a=[],l=t.length;for(o=0;o{"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,o){for(var n=e.pos;n{"use strict";function t(e,t,o){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=o,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,o,n;if(!this.attrs)return-1;for(o=0,n=(t=this.attrs).length;o=0&&(o=this.attrs[t][1]),o},t.prototype.attrJoin=function(e,t){var o=this.attrIndex(e);o<0?this.attrPush([e,t]):this.attrs[o][1]=this.attrs[o][1]+" "+t},e.exports=t},3122:e=>{"use strict";var t={};function o(e,n){var r;return"string"!=typeof n&&(n=o.defaultChars),r=function(e){var o,n,r=t[e];if(r)return r;for(r=t[e]=[],o=0;o<128;o++)n=String.fromCharCode(o),r.push(n);for(o=0;o=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&n)&&t+91114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}o.defaultChars=";/?:@&=+$,#",o.componentChars="",e.exports=o},729:e=>{"use strict";var t={};function o(e,n,r){var i,s,a,l,c,d="";for("string"!=typeof n&&(r=n,n=o.defaultChars),void 0===r&&(r=!0),c=function(e){var o,n,r=t[e];if(r)return r;for(r=t[e]=[],o=0;o<128;o++)n=String.fromCharCode(o),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+o.toString(16).toUpperCase()).slice(-2));for(o=0;o=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1=56320&&l<=57343){d+=encodeURIComponent(e[i]+e[i+1]),i++;continue}d+="%EF%BF%BD"}else d+=encodeURIComponent(e[i]);return d}o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",e.exports=o},2201:e=>{"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},8765:(e,t,o)=>{"use strict";e.exports.encode=o(729),e.exports.decode=o(3122),e.exports.format=o(2201),e.exports.parse=o(9553)},9553:e=>{"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var o=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,r=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),s=["'"].concat(i),a=["%","/","?",";","#"].concat(s),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,u={javascript:!0,"javascript:":!0},h={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var n,i,s,p,g,m=e;if(m=m.trim(),!t&&1===e.split("#").length){var f=r.exec(m);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var b=o.exec(m);if(b&&(s=(b=b[0]).toLowerCase(),this.protocol=b,m=m.substr(b.length)),(t||b||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(g="//"===m.substr(0,2))||b&&u[b]||(m=m.substr(2),this.slashes=!0)),!u[b]&&(g||b&&!h[b])){var k,w,_=-1;for(n=0;n127?x+="x":x+=v[E];if(!x.match(c)){var S=C.slice(0,n),T=C.slice(n+1),B=v.match(d);B&&(S.push(B[1]),T.unshift(B[2])),T.length&&(m=T.join(".")+m),this.hostname=S.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var I=m.indexOf("#");-1!==I&&(this.hash=m.substr(I),m=m.slice(0,I));var P=m.indexOf("?");return-1!==P&&(this.search=m.substr(P),m=m.slice(0,P)),m&&(this.pathname=m),h[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=n.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,o){if(e&&e instanceof t)return e;var n=new t;return n.parse(e,o),n}},3689:(e,t,o)=>{"use strict";o.r(t),o.d(t,{decode:()=>b,default:()=>y,encode:()=>k,toASCII:()=>_,toUnicode:()=>w,ucs2decode:()=>p,ucs2encode:()=>g});const n=2147483647,r=36,i=/^xn--/,s=/[^\0-\x7E]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,d=String.fromCharCode;function u(e){throw new RangeError(l[e])}function h(e,t){const o=e.split("@");let n="";o.length>1&&(n=o[0]+"@",e=o[1]);const r=function(e,t){const o=[];let n=e.length;for(;n--;)o[n]=t(e[n]);return o}((e=e.replace(a,".")).split("."),t).join(".");return n+r}function p(e){const t=[];let o=0;const n=e.length;for(;o=55296&&r<=56319&&oString.fromCodePoint(...e),m=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},f=function(e,t,o){let n=0;for(e=o?c(e/700):e>>1,e+=c(e/t);e>455;n+=r)e=c(e/35);return c(n+36*e/(e+38))},b=function(e){const t=[],o=e.length;let i=0,s=128,a=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let o=0;o=128&&u("not-basic"),t.push(e.charCodeAt(o));for(let h=l>0?l+1:0;h=o&&u("invalid-input");const l=(d=e.charCodeAt(h++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:r;(l>=r||l>c((n-i)/t))&&u("overflow"),i+=l*t;const p=s<=a?1:s>=a+26?26:s-a;if(lc(n/g)&&u("overflow"),t*=g}const p=t.length+1;a=f(i-l,p,0==l),c(i/p)>n-s&&u("overflow"),s+=c(i/p),i%=p,t.splice(i++,0,s)}var d;return String.fromCodePoint(...t)},k=function(e){const t=[];let o=(e=p(e)).length,i=128,s=0,a=72;for(const o of e)o<128&&t.push(d(o));let l=t.length,h=l;for(l&&t.push("-");h=i&&tc((n-s)/p)&&u("overflow"),s+=(o-i)*p,i=o;for(const o of e)if(on&&u("overflow"),o==i){let e=s;for(let o=r;;o+=r){const n=o<=a?1:o>=a+26?26:o-a;if(e{"use strict";var t=[];function o(e){for(var o=-1,n=0;n{"use strict";var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},8575:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(o){e.setAttribute(o,t[o])}))}},9037:e=>{"use strict";var t,o=(t=[],function(e,o){return t[e]=o,t.filter(Boolean).join("\n")});function n(e,t,n,r){var i;if(n)i="";else{i="",r.supports&&(i+="@supports (".concat(r.supports,") {")),r.media&&(i+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(i+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),i+=r.css,s&&(i+="}"),r.media&&(i+="}"),r.supports&&(i+="}")}if(e.styleSheet)e.styleSheet.cssText=o(t,i);else{var a=document.createTextNode(i),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(a,l[t]):e.appendChild(a)}}var r={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=r.singletonCounter++,o=r.singleton||(r.singleton=e.insertStyleElement(e));return{update:function(e){n(o,t,!1,e)},remove:function(e){n(o,t,!0,e)}}}},9413:e=>{e.exports=/[\0-\x1F\x7F-\x9F]/},2326:e=>{e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},3189:e=>{e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},5045:e=>{e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},4205:(e,t,o)=>{"use strict";t.Any=o(9369),t.Cc=o(9413),t.Cf=o(2326),t.P=o(3189),t.Z=o(5045)},9369:e=>{e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},8491:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+"},9323:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={id:n,exports:{}};return e[n](i,i.exports,o),i.exports}o.m=e,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.b=document.baseURI||self.location.href;var n={};return(()=>{"use strict";const e=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}(),t={isMac:r(e),isWindows:function(e){return e.indexOf("windows")>-1}(e),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(e),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(e),isiOS:function(e){return!!e.match(/iphone|ipad/i)||r(e)&&navigator.maxTouchPoints>0}(e),isAndroid:function(e){return e.indexOf("android")>-1}(e),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(e),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}},n=t;function r(e){return e.indexOf("macintosh")>-1}function i(e,t,o,n){o=o||function(e,t){return e===t};const r=Array.isArray(e)?e:Array.prototype.slice.call(e),i=Array.isArray(t)?t:Array.prototype.slice.call(t),l=function(e,t,o){const n=s(e,t,o);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const r=a(e,n),i=a(t,n),l=s(r,i,o),c=e.length-l,d=t.length-l;return{firstIndex:n,lastIndexOld:c,lastIndexNew:d}}(r,i,o),c=n?function(e,t){const{firstIndex:o,lastIndexOld:n,lastIndexNew:r}=e;if(-1===o)return Array(t).fill("equal");let i=[];o>0&&(i=i.concat(Array(o).fill("equal")));r-o>0&&(i=i.concat(Array(r-o).fill("insert")));n-o>0&&(i=i.concat(Array(n-o).fill("delete")));r0&&o.push({index:n,type:"insert",values:e.slice(n,i)});r-n>0&&o.push({index:n+(i-n),type:"delete",howMany:r-n});return o}(i,l);return c}function s(e,t,o){for(let n=0;n200||r>200||n+r>300)return l.fastDiff(e,t,o,!0);let i,s;if(rl?-1:1;u[n+d]&&(u[n]=u[n+d].slice(0)),u[n]||(u[n]=[]),u[n].push(r>l?i:s);let p=Math.max(r,l),g=p-n;for(;gd;g--)h[g]=p(g);h[d]=p(d),m++}while(h[d]!==c);return u[d].slice(1)}l.fastDiff=i;const c=function(){return function e(){e.called=!0}};class d{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=c(),this.off=c()}}const u=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function h(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0;return"e"+u[e>>0&255]+u[e>>8&255]+u[e>>16&255]+u[e>>24&255]+u[t>>0&255]+u[t>>8&255]+u[t>>16&255]+u[t>>24&255]+u[o>>0&255]+u[o>>8&255]+u[o>>16&255]+u[o>>24&255]+u[n>>0&255]+u[n>>8&255]+u[n>>16&255]+u[n>>24&255]}const p={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function g(e,t){const o=p.get(t.priority);for(let n=0;n{if("object"==typeof t&&null!==t){if(o.has(t))return`[object ${t.constructor.name}]`;o.add(t)}return t},r=t?` ${JSON.stringify(t,n)}`:"",i=k(e);return e+r+i}(e,o)),this.name="CKEditorError",this.context=t,this.data=o}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const o=new f(e.message,t);throw o.stack=e.stack,o}}function b(e,t){console.warn(...w(e,t))}function k(e){return`\nRead more: ${m}#error-${e}`}function w(e,t){const o=k(e);return t?[e,t,o]:[e,o]}const y="38.0.1",A=new Date(2023,4,23),C="object"==typeof window?window:o.g;if(C.CKEDITOR_VERSION)throw new f("ckeditor-duplicated-modules",null);C.CKEDITOR_VERSION=y;const v=Symbol("listeningTo"),x=Symbol("emitterId"),E=Symbol("delegations"),D=S(Object);function S(e){if(!e)return D;return class extends e{on(e,t,o){this.listenTo(this,e,t,o)}once(e,t,o){let n=!1;this.listenTo(this,e,((e,...o)=>{n||(n=!0,e.off(),t.call(this,e,...o))}),o)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,o,n={}){let r,i;this[v]||(this[v]={});const s=this[v];B(e)||T(e);const a=B(e);(r=s[a])||(r=s[a]={emitter:e,callbacks:{}}),(i=r.callbacks[t])||(i=r.callbacks[t]=[]),i.push(o),function(e,t,o,n,r){t._addEventListener?t._addEventListener(o,n,r):e._addEventListener.call(t,o,n,r)}(this,e,t,o,n)}stopListening(e,t,o){const n=this[v];let r=e&&B(e);const i=n&&r?n[r]:void 0,s=i&&t?i.callbacks[t]:void 0;if(!(!n||e&&!i||t&&!s))if(o){M(this,e,t,o);-1!==s.indexOf(o)&&(1===s.length?delete i.callbacks[t]:M(this,e,t,o))}else if(s){for(;o=s.pop();)M(this,e,t,o);delete i.callbacks[t]}else if(i){for(t in i.callbacks)this.stopListening(e,t);delete n[r]}else{for(r in n)this.stopListening(n[r].emitter);delete this[v]}}fire(e,...t){try{const o=e instanceof d?e:new d(this,e),n=o.name;let r=R(this,n);if(o.path.push(this),r){const e=[o,...t];r=Array.from(r);for(let t=0;t{this[E]||(this[E]=new Map),e.forEach((e=>{const n=this[E].get(e);n?n.set(t,o):this[E].set(e,new Map([[t,o]]))}))}}}stopDelegating(e,t){if(this[E])if(e)if(t){const o=this[E].get(e);o&&o.delete(t)}else this[E].delete(e);else this[E].clear()}_addEventListener(e,t,o){!function(e,t){const o=I(e);if(o[t])return;let n=t,r=null;const i=[];for(;""!==n&&!o[n];)o[n]={callbacks:[],childEvents:[]},i.push(o[n]),r&&o[n].childEvents.push(r),r=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const e of i)e.callbacks=o[n].callbacks.slice();o[n].childEvents.push(r)}}(this,e);const n=P(this,e),r={callback:t,priority:p.get(o.priority)};for(const e of n)g(e,r)}_removeEventListener(e,t){const o=P(this,e);for(const e of o)for(let o=0;o-1?R(e,t.substr(0,t.lastIndexOf(":"))):null}function z(e,t,o){for(let[n,r]of e){r?"function"==typeof r&&(r=r(t.name)):r=t.name;const e=new d(t.source,r);e.path=[...t.path],n.fire(e,...o)}}function M(e,t,o,n){t._removeEventListener?t._removeEventListener(o,n):e._removeEventListener.call(t,o,n)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{S[e]=D.prototype[e]}));const N=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},F=Symbol("observableProperties"),O=Symbol("boundObservables"),V=Symbol("boundProperties"),L=Symbol("decoratedMethods"),j=Symbol("decoratedOriginal"),q=H(S());function H(e){if(!e)return q;return class extends e{set(e,t){if(N(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);W(this);const o=this[F];if(e in this&&!o.has(e))throw new f("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>o.get(e),set(t){const n=o.get(e);let r=this.fire(`set:${e}`,e,t,n);void 0===r&&(r=t),n===r&&o.has(e)||(o.set(e,r),this.fire(`change:${e}`,e,r,n))}}),this[e]=t}bind(...e){if(!e.length||!G(e))throw new f("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new f("observable-bind-duplicate-properties",this);W(this);const t=this[V];e.forEach((e=>{if(t.has(e))throw new f("observable-bind-rebind",this)}));const o=new Map;return e.forEach((e=>{const n={property:e,to:[]};t.set(e,n),o.set(e,n)})),{to:$,toMany:U,_observable:this,_bindProperties:e,_to:[],_bindings:o}}unbind(...e){if(!this[F])return;const t=this[V],o=this[O];if(e.length){if(!G(e))throw new f("observable-unbind-wrong-properties",this);e.forEach((e=>{const n=t.get(e);n&&(n.to.forEach((([e,t])=>{const r=o.get(e),i=r[t];i.delete(n),i.size||delete r[t],Object.keys(r).length||(o.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else o.forEach(((e,t)=>{this.stopListening(t,"change")})),o.clear(),t.clear()}decorate(e){W(this);const t=this[e];if(!t)throw new f("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,o)=>{e.return=t.apply(this,o)})),this[e]=function(...t){return this.fire(e,t)},this[e][j]=t,this[L]||(this[L]=[]),this[L].push(e)}stopListening(e,t,o){if(!e&&this[L]){for(const e of this[L])this[e]=this[e][j];delete this[L]}super.stopListening(e,t,o)}}}function W(e){e[F]||(Object.defineProperty(e,F,{value:new Map}),Object.defineProperty(e,O,{value:new Map}),Object.defineProperty(e,V,{value:new Map}))}function $(...e){const t=function(...e){if(!e.length)throw new f("observable-bind-to-parse-error",null);const t={to:[]};let o;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)o.properties.push(e);else{if("object"!=typeof e)throw new f("observable-bind-to-parse-error",null);o={observable:e,properties:[]},t.to.push(o)}})),t}(...e),o=Array.from(this._bindings.keys()),n=o.length;if(!t.callback&&t.to.length>1)throw new f("observable-bind-to-no-callback",this);if(n>1&&t.callback)throw new f("observable-bind-to-extra-callback",this);var r;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==n)throw new f("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(o[0]).callback=t.callback),r=this._observable,this._to.forEach((e=>{const t=r[O];let o;t.get(e.observable)||r.listenTo(e.observable,"change",((n,i)=>{o=t.get(e.observable)[i],o&&o.forEach((e=>{K(r,e.property)}))}))})),function(e){let t;e._bindings.forEach(((o,n)=>{e._to.forEach((r=>{t=r.properties[o.callback?0:e._bindProperties.indexOf(n)],o.to.push([r.observable,t]),function(e,t,o,n){const r=e[O],i=r.get(o),s=i||{};s[n]||(s[n]=new Set);s[n].add(t),i||r.set(o,s)}(e._observable,o,r.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{K(this._observable,e)}))}function U(e,t,o){if(this._bindings.size>1)throw new f("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const o=e.map((e=>[e,t]));return Array.prototype.concat.apply([],o)}(e,t),o)}function G(e){return e.every((e=>"string"==typeof e))}function K(e,t){const o=e[V].get(t);let n;o.callback?n=o.callback.apply(e,o.to.map((e=>e[0][e[1]]))):(n=o.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}function Z(e){let t=0;for(const o of e)t++;return t}function J(e,t){const o=Math.min(e.length,t.length);for(let n=0;n{H[e]=q.prototype[e]}));const Y="object"==typeof global&&global&&global.Object===Object&&global;var X="object"==typeof self&&self&&self.Object===Object&&self;const ee=Y||X||Function("return this")();const te=ee.Symbol;var oe=Object.prototype,ne=oe.hasOwnProperty,re=oe.toString,ie=te?te.toStringTag:void 0;const se=function(e){var t=ne.call(e,ie),o=e[ie];try{e[ie]=void 0;var n=!0}catch(e){}var r=re.call(e);return n&&(t?e[ie]=o:delete e[ie]),r};var ae=Object.prototype.toString;const le=function(e){return ae.call(e)};var ce=te?te.toStringTag:void 0;const de=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ce&&ce in Object(e)?se(e):le(e)};const ue=Array.isArray;const he=function(e){return null!=e&&"object"==typeof e};const pe=function(e){return"string"==typeof e||!ue(e)&&he(e)&&"[object String]"==de(e)};function ge(e,t,o={},n=[]){const r=o&&o.xmlns,i=r?e.createElementNS(r,t):e.createElement(t);for(const e in o)i.setAttribute(e,o[e]);!pe(n)&&Q(n)||(n=[n]);for(let t of n)pe(t)&&(t=e.createTextNode(t)),i.appendChild(t);return i}const me=function(e,t){return function(o){return e(t(o))}};const fe=me(Object.getPrototypeOf,Object);var be=Function.prototype,ke=Object.prototype,we=be.toString,_e=ke.hasOwnProperty,ye=we.call(Object);const Ae=function(e){if(!he(e)||"[object Object]"!=de(e))return!1;var t=fe(e);if(null===t)return!0;var o=_e.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&we.call(o)==ye};const Ce=function(){this.__data__=[],this.size=0};const ve=function(e,t){return e===t||e!=e&&t!=t};const xe=function(e,t){for(var o=e.length;o--;)if(ve(e[o][0],t))return o;return-1};var Ee=Array.prototype.splice;const De=function(e){var t=this.__data__,o=xe(t,e);return!(o<0)&&(o==t.length-1?t.pop():Ee.call(t,o,1),--this.size,!0)};const Se=function(e){var t=this.__data__,o=xe(t,e);return o<0?void 0:t[o][1]};const Te=function(e){return xe(this.__data__,e)>-1};const Be=function(e,t){var o=this.__data__,n=xe(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};function Ie(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991};var jt={};jt["[object Float32Array]"]=jt["[object Float64Array]"]=jt["[object Int8Array]"]=jt["[object Int16Array]"]=jt["[object Int32Array]"]=jt["[object Uint8Array]"]=jt["[object Uint8ClampedArray]"]=jt["[object Uint16Array]"]=jt["[object Uint32Array]"]=!0,jt["[object Arguments]"]=jt["[object Array]"]=jt["[object ArrayBuffer]"]=jt["[object Boolean]"]=jt["[object DataView]"]=jt["[object Date]"]=jt["[object Error]"]=jt["[object Function]"]=jt["[object Map]"]=jt["[object Number]"]=jt["[object Object]"]=jt["[object RegExp]"]=jt["[object Set]"]=jt["[object String]"]=jt["[object WeakMap]"]=!1;const qt=function(e){return he(e)&&Lt(e.length)&&!!jt[de(e)]};const Ht=function(e){return function(t){return e(t)}};var Wt="object"==typeof exports&&exports&&!exports.nodeType&&exports,$t=Wt&&"object"==typeof module&&module&&!module.nodeType&&module,Ut=$t&&$t.exports===Wt&&Y.process;const Gt=function(){try{var e=$t&&$t.require&&$t.require("util").types;return e||Ut&&Ut.binding&&Ut.binding("util")}catch(e){}}();var Kt=Gt&&Gt.isTypedArray;const Zt=Kt?Ht(Kt):qt;var Jt=Object.prototype.hasOwnProperty;const Qt=function(e,t){var o=ue(e),n=!o&&Pt(e),r=!o&&!n&&Ft(e),i=!o&&!n&&!r&&Zt(e),s=o||n||r||i,a=s?Dt(e.length,String):[],l=a.length;for(var c in e)!t&&!Jt.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Vt(c,l))||a.push(c);return a};var Yt=Object.prototype;const Xt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Yt)};const eo=me(Object.keys,Object);var to=Object.prototype.hasOwnProperty;const oo=function(e){if(!Xt(e))return eo(e);var t=[];for(var o in Object(e))to.call(e,o)&&"constructor"!=o&&t.push(o);return t};const no=function(e){return null!=e&&Lt(e.length)&&!Fe(e)};const ro=function(e){return no(e)?Qt(e):oo(e)};const io=function(e,t){return e&&Et(t,ro(t),e)};const so=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t};var ao=Object.prototype.hasOwnProperty;const lo=function(e){if(!N(e))return so(e);var t=Xt(e),o=[];for(var n in e)("constructor"!=n||!t&&ao.call(e,n))&&o.push(n);return o};const co=function(e){return no(e)?Qt(e,!0):lo(e)};const uo=function(e,t){return e&&Et(t,co(t),e)};var ho="object"==typeof exports&&exports&&!exports.nodeType&&exports,po=ho&&"object"==typeof module&&module&&!module.nodeType&&module,go=po&&po.exports===ho?ee.Buffer:void 0,mo=go?go.allocUnsafe:void 0;const fo=function(e,t){if(t)return e.slice();var o=e.length,n=mo?mo(o):new e.constructor(o);return e.copy(n),n};const bo=function(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++o{this._setToTarget(e,n,t[n],o)}))}}function An(e){return wn(e,Cn)}function Cn(e){return _n(e)?e:void 0}function vn(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function xn(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const En=Dn(S());function Dn(e){if(!e)return En;return class extends e{listenTo(e,t,o,n={}){if(vn(e)||xn(e)){const r={capture:!!n.useCapture,passive:!!n.usePassive},i=this._getProxyEmitter(e,r)||new Sn(e,r);this.listenTo(i,t,o,n)}else super.listenTo(e,t,o,n)}stopListening(e,t,o){if(vn(e)||xn(e)){const n=this._getAllProxyEmitters(e);for(const e of n)this.stopListening(e,t,o)}else super.stopListening(e,t,o)}_getProxyEmitter(e,t){return function(e,t){const o=e[v];return o&&o[t]?o[t].emitter:null}(this,Tn(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{Dn[e]=En.prototype[e]}));class Sn extends(S()){constructor(e,t){super(),T(this,Tn(e,t)),this._domNode=e,this._options=t}attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,o){this.attach(e),S().prototype._addEventListener.call(this,e,t,o)}_removeEventListener(e,t){S().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function Tn(e,t){let o=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=h())}(e);for(const e of Object.keys(t).sort())t[e]&&(o+="-"+e);return o}let Bn;try{Bn={window,document}}catch(e){Bn={window:{},document:{}}}const In=Bn;function Pn(e){const t=[];let o=e;for(;o&&o.nodeType!=Node.DOCUMENT_NODE;)t.unshift(o),o=o.parentNode;return t}function Rn(e){return"[object Text]"==Object.prototype.toString.call(e)}function zn(e){return"[object Range]"==Object.prototype.toString.apply(e)}function Mn(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}const Nn=["top","right","bottom","left","width","height"];class Fn{constructor(e){const t=zn(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),Ln(e)||t)if(t){const t=Fn.getDomRangeRects(e);On(this,Fn.getBoundingRect(t))}else On(this,e.getBoundingClientRect());else if(xn(e)){const{innerWidth:t,innerHeight:o}=e;On(this,{top:0,right:t,bottom:o,left:0,width:t,height:o})}else On(this,e)}clone(){return new Fn(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new Fn(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!Vn(e)){let o=e.parentNode||e.commonAncestorContainer;for(;o&&!Vn(o);){const e=new Fn(o),n=t.getIntersection(e);if(!n)return null;n.getArea(){for(const t of e){const e=jn._getElementCallbacks(t.target);if(e)for(const o of e)o(t)}}))}}function qn(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function Hn(e){return t=>t+e}function Wn(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function $n(e,t,o){e.insertBefore(o,e.childNodes[t]||null)}function Un(e){return e&&e.nodeType===Node.COMMENT_NODE}function Gn(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}function Kn({element:e,target:t,positions:o,limiter:n,fitInViewport:r,viewportOffsetConfig:i}){Fe(t)&&(t=t()),Fe(n)&&(n=n());const s=function(e){return e&&e.parentNode?e.offsetParent===In.document.body?null:e.offsetParent:null}(e),a=new Fn(e),l=new Fn(t);let c;const d=r&&function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new Fn(In.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(i)||null,u={targetRect:l,elementRect:a,positionedElementAncestor:s,viewportRect:d};if(n||r){const e=n&&new Fn(n).getVisible();Object.assign(u,{limiterRect:e,viewportRect:d}),c=function(e,t){const{elementRect:o}=t,n=o.getArea(),r=e.map((e=>new Jn(e,t))).filter((e=>!!e.name));let i=0,s=null;for(const e of r){const{limiterIntersectionArea:t,viewportIntersectionArea:o}=e;if(t===n)return e;const r=o**2+t**2;r>i&&(i=r,s=e)}return s}(o,u)||new Jn(o[0],u)}else c=new Jn(o[0],u);return c}function Zn(e){const{scrollX:t,scrollY:o}=In.window;return e.clone().moveBy(t,o)}jn._observerInstance=null,jn._elementCallbacks=null;class Jn{constructor(e,t){const o=e(t.targetRect,t.elementRect,t.viewportRect);if(!o)return;const{left:n,top:r,name:i,config:s}=o;this.name=i,this.config=s,this._positioningFunctionCorrdinates={left:n,top:r},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;if(e){const t=this._options.viewportRect;if(!t)return e.getIntersectionArea(this._rect);{const o=e.getIntersection(t);if(o)return o.getIntersectionArea(this._rect)}}return 0}get viewportIntersectionArea(){const e=this._options.viewportRect;return e?e.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=Zn(this._rect),this._options.positionedElementAncestor&&function(e,t){const o=Zn(new Fn(t)),n=Mn(t);let r=0,i=0;r-=o.left,i-=o.top,r+=t.scrollLeft,i+=t.scrollTop,r-=n.left,i-=n.top,e.moveBy(r,i)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}function Qn(e){const t=e.parentNode;t&&t.removeChild(e)}function Yn({window:e,rect:t,alignToTop:o,forceScroll:n,viewportOffset:r}){const i=t.clone().moveBy(0,r),s=t.clone().moveBy(0,-r),a=new Fn(e).excludeScrollbarsAndBorders(),l=o&&n,c=[s,i].every((e=>a.contains(e)));let{scrollX:d,scrollY:u}=e;const h=d,p=u;l?u-=a.top-t.top+r:c||(tr(s,a)?u-=a.top-t.top+r:er(i,a)&&(u+=o?t.top-a.top-r:t.bottom-a.bottom+r)),c||(or(t,a)?d-=a.left-t.left+r:nr(t,a)&&(d+=t.right-a.right+r)),d==h&&u===p||e.scrollTo(d,u)}function Xn({parent:e,getRect:t,alignToTop:o,forceScroll:n,ancestorOffset:r=0}){const i=rr(e),s=o&&n;let a,l,c;for(;e!=i.document.body;)l=t(),a=new Fn(e).excludeScrollbarsAndBorders(),c=a.contains(l),s?e.scrollTop-=a.top-l.top+r:c||(tr(l,a)?e.scrollTop-=a.top-l.top+r:er(l,a)&&(e.scrollTop+=o?l.top-a.top-r:l.bottom-a.bottom+r)),c||(or(l,a)?e.scrollLeft-=a.left-l.left+r:nr(l,a)&&(e.scrollLeft+=l.right-a.right+r)),e=e.parentNode}function er(e,t){return e.bottom>t.bottom}function tr(e,t){return e.topt.right}function rr(e){return zn(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function ir(e){if(zn(e)){let t=e.commonAncestorContainer;return Rn(t)&&(t=t.parentNode),t}return e.parentNode}function sr(e,t){const o=rr(e),n=new Fn(e);if(o===t)return n;{let e=o;for(;e!=t;){const t=e.frameElement,o=new Fn(t).excludeScrollbarsAndBorders();n.moveBy(o.left,o.top),e=e.parent}}return n}const ar={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},lr={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},cr=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){e[String.fromCharCode(t).toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(const t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),dr=Object.fromEntries(Object.entries(cr).map((([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)])));function ur(e){let t;if("string"==typeof e){if(t=cr[e.toLowerCase()],!t)throw new f("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?cr.alt:0)+(e.ctrlKey?cr.ctrl:0)+(e.shiftKey?cr.shift:0)+(e.metaKey?cr.cmd:0);return t}function hr(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return ur(e.slice(0,-1));const t=ur(e);return n.isMac&&t==cr.ctrl?cr.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function pr(e){let t=hr(e);return Object.entries(n.isMac?ar:lr).reduce(((e,[o,n])=>(0!=(t&cr[o])&&(t&=~cr[o],e+=n),e)),"")+(t?dr[t]:"")}function gr(e,t){const o="ltr"===t;switch(e){case cr.arrowleft:return o?"left":"right";case cr.arrowright:return o?"right":"left";case cr.arrowup:return"up";case cr.arrowdown:return"down"}}function mr(e){return Array.isArray(e)?e:[e]}function fr(e,t,o=1){if("number"!=typeof o)throw new f("translation-service-quantity-not-a-number",null,{quantity:o});const n=Object.keys(In.window.CKEDITOR_TRANSLATIONS).length;1===n&&(e=Object.keys(In.window.CKEDITOR_TRANSLATIONS)[0]);const r=t.id||t.string;if(0===n||!function(e,t){return!!In.window.CKEDITOR_TRANSLATIONS[e]&&!!In.window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,r))return 1!==o?t.plural:t.string;const i=In.window.CKEDITOR_TRANSLATIONS[e].dictionary,s=In.window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1),a=i[r];if("string"==typeof a)return a;return a[Number(s(o))]}In.window.CKEDITOR_TRANSLATIONS||(In.window.CKEDITOR_TRANSLATIONS={});const br=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function kr(e){return br.includes(e)?"rtl":"ltr"}class wr{constructor({uiLanguage:e="en",contentLanguage:t}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=kr(this.uiLanguage),this.contentLanguageDirection=kr(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=mr(t),"string"==typeof e&&(e={string:e});const o=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,o)=>othis._items.length||t<0)throw new f("collection-add-item-invalid-index",this);let o=0;for(const n of e){const e=this._getItemIdBeforeAdding(n),r=t+o;this._items.splice(r,0,n),this._itemMap.set(e,n),this.fire("add",n,r),o++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new f("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,o]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:o}),t}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new f("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,o=(o,n,r)=>{const i=t._bindToCollection==this,s=t._bindToInternalToExternalMap.get(n);if(i&&s)this._bindToExternalToInternalMap.set(n,s),this._bindToInternalToExternalMap.set(s,n);else{const o=e(n);if(!o)return void this._skippedIndexesFromExternal.push(r);let i=r;for(const e of this._skippedIndexesFromExternal)r>e&&i--;for(const e of t._skippedIndexesFromExternal)i>=e&&i++;this._bindToExternalToInternalMap.set(n,o),this._bindToInternalToExternalMap.set(o,n),this.add(o,i);for(let e=0;e{const n=this._bindToExternalToInternalMap.get(t);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(ot&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let o;if(t in e){if(o=e[t],"string"!=typeof o)throw new f("collection-add-invalid-id",this);if(this.get(o))throw new f("collection-add-item-already-exists",this)}else e[t]=o=h();return o}_remove(e){let t,o,n,r=!1;const i=this._idProperty;if("string"==typeof e?(o=e,n=this._itemMap.get(o),r=!n,n&&(t=this._items.indexOf(n))):"number"==typeof e?(t=e,n=this._items[t],r=!n,n&&(o=n[i])):(n=e,o=n[i],t=this._items.indexOf(n),r=-1==t||!this._itemMap.get(o)),r)throw new f("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(o);const s=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(s),this.fire("remove",n,t),[n,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function yr(e){const t=e.next();return t.done?null:t.value}class Ar extends(Dn(H())){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(e){if(this._elements.has(e))throw new f("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class Cr{constructor(){this._listener=new(Dn())}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+ur(t),t)}))}set(e,t,o={}){const n=hr(e),r=o.priority;this._listener.listenTo(this._listener,"_keydown:"+n,((e,o)=>{t(o,(()=>{o.preventDefault(),o.stopPropagation(),e.stop()})),e.return=!0}),{priority:r})}press(e){return!!this._listener.fire("_keydown:"+ur(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function vr(e){return Q(e)?new Map(e):function(e){const t=new Map;for(const o in e)t.set(o,e[o]);return t}(e)}function xr(e,t){let o;function n(...r){n.cancel(),o=setTimeout((()=>e(...r)),t)}return n.cancel=()=>{clearTimeout(o)},n}function Er(e,t){return!!(o=e.charAt(t-1))&&1==o.length&&/[\ud800-\udbff]/.test(o)&&function(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}(e.charAt(t));var o}function Dr(e,t){return!!(o=e.charAt(t))&&1==o.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(o);var o}const Sr=function(){const e=/\p{Regional_Indicator}{2}/u.source,t="(?:"+[/\p{Emoji}[\u{E0020}-\u{E007E}]+\u{E007F}/u,/\p{Emoji}\u{FE0F}?\u{20E3}/u,/\p{Emoji}\u{FE0F}/u,/(?=\p{General_Category=Other_Symbol})\p{Emoji}\p{Emoji_Modifier}*/u].map((e=>e.source)).join("|")+")";return new RegExp(`${e}|${t}(?:‍${t})*`,"ug")}();function Tr(e,t){const o=String(e).matchAll(Sr);return Array.from(o).some((e=>e.index{this.refresh()})),this.listenTo(e,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(t=>{this.affectsData&&(e.isReadOnly||this._isEnabledBasedOnSelection&&!e.model.canEditAt(e.model.document.selection))&&(t.return=!1,t.stop())}),{priority:"highest"}),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",Rr,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",Rr),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function Rr(e){e.return=!1,e.stop()}class zr extends(S()){constructor(e,t=[],o=[]){super(),this._plugins=new Map,this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of o)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new f("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],o=[]){const n=this,r=this._context;!function e(t,o=new Set){t.forEach((t=>{a(t)&&(o.has(t)||(o.add(t),t.pluginName&&!n._availablePlugins.has(t.pluginName)&&n._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,o)))}))}(e),u(e);const i=[...function e(t,o=new Set){return t.map((e=>a(e)?e:n._availablePlugins.get(e))).reduce(((t,n)=>o.has(n)?t:(o.add(n),n.requires&&(u(n.requires,n),e(n.requires,o).forEach((e=>t.add(e)))),t.add(n))),new Set)}(e.filter((e=>!c(e,t))))];!function(e,t){for(const o of t){if("function"!=typeof o)throw new f("plugincollection-replace-plugin-invalid-type",null,{pluginItem:o});const t=o.pluginName;if(!t)throw new f("plugincollection-replace-plugin-missing-name",null,{pluginItem:o});if(o.requires&&o.requires.length)throw new f("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const r=n._availablePlugins.get(t);if(!r)throw new f("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const i=e.indexOf(r);if(-1===i){if(n._contextPlugins.has(r))return;throw new f("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(r.requires&&r.requires.length)throw new f("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(i,1,o),n._availablePlugins.set(t,o)}}(i,o);const s=function(e){return e.map((e=>{let t=n._contextPlugins.get(e);return t=t||new e(r),n._add(e,t),t}))}(i);return h(s,"init").then((()=>h(s,"afterInit"))).then((()=>s));function a(e){return"function"==typeof e}function l(e){return a(e)&&!!e.isContextPlugin}function c(e,t){return t.some((t=>t===e||(d(e)===t||d(t)===e)))}function d(e){return a(e)?e.pluginName||e.name:e}function u(e,o=null){e.map((e=>a(e)?e:n._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(a(e))return;if(t)throw new f("plugincollection-soft-required",r,{missingPlugin:e,requiredBy:d(t)});throw new f("plugincollection-plugin-not-found",r,{plugin:e})}(e,o),function(e,t){if(!l(t))return;if(l(e))return;throw new f("plugincollection-context-required",r,{plugin:d(e),requiredBy:d(t)})}(e,o),function(e,o){if(!o)return;if(!c(e,t))return;throw new f("plugincollection-required",r,{plugin:d(e),requiredBy:d(o)})}(e,o)}))}function h(e,t){return e.reduce(((e,o)=>o[t]?n._contextPlugins.has(o)?e:e.then(o[t].bind(o)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const o=e.pluginName;if(o){if(this._plugins.has(o))throw new f("plugincollection-plugin-name-conflict",null,{pluginName:o,plugin1:this._plugins.get(o).constructor,plugin2:e});this._plugins.set(o,t)}}}class Mr{constructor(e){this._contextOwner=null,this.config=new yn(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new zr(this,t);const o=this.config.get("language")||{};this.locale=new wr({uiLanguage:"string"==typeof o?o:o.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new _r}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const o of e.concat(t)){if("function"!=typeof o)throw new f("context-initplugins-constructor-only",null,{Plugin:o});if(!0!==o.isContextPlugin)throw new f("context-initplugins-invalid-plugin",null,{Plugin:o})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new f("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const o=new this(e);t(o.initPlugins().then((()=>o)))}))}}class Nr extends(H()){constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}var Fr=o(3379),Or=o.n(Fr),Vr=o(9037),Lr=o.n(Vr),jr=o(569),qr=o.n(jr),Hr=o(8575),Wr=o.n(Hr),$r=o(9216),Ur=o.n($r),Gr=o(8894),Kr={attributes:{"data-cke":!0}};Kr.setAttributes=Wr(),Kr.insert=qr().bind(null,"head"),Kr.domAPI=Lr(),Kr.insertStyleElement=Ur();Or()(Gr.Z,Kr);Gr.Z&&Gr.Z.locals&&Gr.Z.locals;const Zr=new WeakMap;function Jr({view:e,element:t,text:o,isDirectHost:n=!0,keepOnFocus:r=!1}){const i=e.document;Zr.has(i)||(Zr.set(i,new Map),i.registerPostFixer((e=>Yr(i,e))),i.on("change:isComposing",(()=>{e.change((e=>Yr(i,e)))}),{priority:"high"})),Zr.get(i).set(t,{text:o,isDirectHost:n,keepOnFocus:r,hostElement:n?t:null}),e.change((e=>Yr(i,e)))}function Qr(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function Yr(e,t){const o=Zr.get(e),n=[];let r=!1;for(const[e,i]of o)i.isDirectHost&&(n.push(e),Xr(t,e,i)&&(r=!0));for(const[e,i]of o){if(i.isDirectHost)continue;const o=ei(e);o&&(n.includes(o)||(i.hostElement=o,Xr(t,e,i)&&(r=!0)))}return r}function Xr(e,t,o){const{text:n,isDirectHost:r,hostElement:i}=o;let s=!1;i.getAttribute("data-placeholder")!==n&&(e.setAttribute("data-placeholder",n,i),s=!0);return(r||1==t.childCount)&&function(e,t){if(!e.isAttached())return!1;const o=Array.from(e.getChildren()).some((e=>!e.is("uiElement")));if(o)return!1;const n=e.document,r=n.selection.anchor;return!(n.isComposing&&r&&r.parent===e||!t&&n.isFocused&&(!r||r.parent===e))}(i,o.keepOnFocus)?function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,i)&&(s=!0):Qr(e,i)&&(s=!0),s}function ei(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}class ti{is(){throw new Error("is() method is abstract")}}const oi=function(e){return kn(e,4)};class ni extends(S(ti)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new f("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),n=e.getAncestors(t);let r=0;for(;o[r]==n[r]&&o[r];)r++;return 0===r?null:o[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),n=J(t,o);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n]e.data.length)throw new f("view-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.data.length)throw new f("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let o=e.includeSelf?this.textNode:this.parent;for(;null!==o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}}ii.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};class si{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const o=ai(t,e);if(o)return{element:t,pattern:e,match:o}}return null}matchAll(...e){const t=[];for(const o of e)for(const e of this._patterns){const n=ai(o,e);n&&t.push({element:o,pattern:e,match:n})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function ai(e,t){if("function"==typeof t)return t(e);const o={};return t.name&&(o.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!o.name)||t.attributes&&(o.attributes=function(e,t){const o=new Set(t.getAttributeKeys());Ae(e)?(void 0!==e.style&&b("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&b("matcher-pattern-deprecated-attributes-class-key",e)):(o.delete("style"),o.delete("class"));return li(e,o,(e=>t.getAttribute(e)))}(t.attributes,e),!o.attributes)||t.classes&&(o.classes=function(e,t){return li(e,t.getClassNames(),(()=>{}))}(t.classes,e),!o.classes)||t.styles&&(o.styles=function(e,t){return li(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!o.styles)?null:o}function li(e,t,o){const n=function(e){if(Array.isArray(e))return e.map((e=>Ae(e)?(void 0!==e.key&&void 0!==e.value||b("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if(Ae(e))return Object.entries(e);return[[e,!0]]}(e),r=Array.from(t),i=[];if(n.forEach((([e,t])=>{r.forEach((n=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,n)&&function(e,t,o){if(!0===e)return!0;const n=o(t);return e===n||e instanceof RegExp&&!!String(n).match(e)}(t,n,o)&&i.push(n)}))})),n.length&&!(i.lengthr?0:r+t),(o=o>r?r:o)<0&&(o+=r),r=t>o?0:o-t>>>0,t>>>=0;for(var i=Array(r);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}};const Zi=Ki(Ui);const Ji=function(e,t){return Zi(Wi(e,t,ji),e+"")};const Qi=function(e,t,o){if(!N(o))return!1;var n=typeof t;return!!("number"==n?no(o)&&Vt(t,o.length):"string"==n&&t in o)&&ve(o[t],e)};const Yi=function(e){return Ji((function(t,o){var n=-1,r=o.length,i=r>1?o[r-1]:void 0,s=r>2?o[2]:void 0;for(i=e.length>3&&"function"==typeof i?(r--,i):void 0,s&&Qi(o[0],o[1],s)&&(i=r<3?void 0:i,r=1),t=Object(t);++nt===e));return Array.isArray(t)}set(e,t){if(N(e))for(const[t,o]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,o,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=is(e);Pi(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!N(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map((([e])=>e))}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const o of t)e.push(...this._styleProcessor.getReducedForm(o,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const o=t.splice(0,t.length-1).join("."),n=Ri(this._styles,o);if(!n)return;!Array.from(Object.keys(n)).length&&this.remove(o)}}class rs{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,o){if(N(t))ss(o,is(e),t);else if(this._normalizers.has(e)){const n=this._normalizers.get(e),{path:r,value:i}=n(t);ss(o,r,i)}else ss(o,e,t)}getNormalized(e,t){if(!e)return es({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const o=this._extractors.get(e);if("string"==typeof o)return Ri(t,o);const n=o(e,t);if(n)return n}return Ri(t,is(e))}getReducedForm(e,t){const o=this.getNormalized(e,t);if(void 0===o)return[];if(this._reducers.has(e)){return this._reducers.get(e)(o)}return[[e,o]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const o=this.getNormalized(t,e);return o&&"object"==typeof o?Object.keys(o).length:o})),o=new Set([...t,...Object.keys(e)]);return Array.from(o.values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const o of t)this._mapStyleNames(o,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function is(e){return e.replace("-",".")}function ss(e,t,o){let n=o;N(o)&&(n=es({},Ri(e,t),o)),os(e,t,n)}class as extends ni{constructor(e,t,o,n){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=vr(e);for(const[e,o]of t)null===o?t.delete(e):"string"!=typeof o&&t.set(e,String(o));return t}(o),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");ls(this._classes,e),this._attrs.delete("class")}this._styles=new ns(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof as))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,o]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==o)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new si(...e);let o=this.parent;for(;o&&!o.is("documentFragment");){if(t.match(o))return o;o=o.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),o=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==o?"":` ${o}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const o of this.getChildren())t.push(o._clone(e));const o=new this.constructor(this.document,this.name,this._attrs,t);return o._classes=new Set(this._classes),o._styles.set(this._styles.getNormalized()),o._customProperties=new Map(this._customProperties),o.getFillerOffset=this.getFillerOffset,o._unsafeAttributesToRender=this._unsafeAttributesToRender,o}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let o=0;const n=function(e,t){if("string"==typeof t)return[new ri(e,t)];Q(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new ri(e,t):t instanceof ii?new ri(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of mr(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of mr(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of mr(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function ls(e,t){const o=t.split(/\s+/);e.clear(),o.forEach((t=>e.add(t)))}as.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class cs extends as{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=ds}}function ds(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}cs.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class us extends(H(cs)){constructor(e,t,o,n){super(e,t,o,n),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}us.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const hs=Symbol("rootName");class ps extends us{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(hs)}set rootName(e){this._setCustomProperty(hs,e)}set _name(e){this.name=e}}ps.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class gs{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new f("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new f("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=ms._createAt(e.startPosition):this._position=ms._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o;do{o=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&e.offset===o.childCount)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let n;if(o instanceof ri){if(e.isAtEnd)return this._position=ms._createAfter(o),this._next();n=o.data[e.offset]}else n=o.getChild(e.offset);if(n instanceof as)return this.shallow?e.offset++:e=new ms(n,0),this._position=e,this._formatReturnValue("elementStart",n,t,e,1);if(n instanceof ri){if(this.singleCharacters)return e=new ms(n,0),this._position=e,this._next();{let o,r=n.data.length;return n==this._boundaryEndParent?(r=this.boundaries.end.offset,o=new ii(n,0,r),e=ms._createAfter(o)):(o=new ii(n,0,n.data.length),e.offset++),this._position=e,this._formatReturnValue("text",o,t,e,r)}}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{n=(o===this._boundaryEndParent?this.boundaries.end.offset:o.data.length)-e.offset}const r=new ii(o,e.offset,n);return e.offset+=n,this._position=e,this._formatReturnValue("text",r,t,e,n)}return e=ms._createAfter(o),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",o,t,e)}_previous(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&0===e.offset)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let n;if(o instanceof ri){if(e.isAtStart)return this._position=ms._createBefore(o),this._previous();n=o.data[e.offset-1]}else n=o.getChild(e.offset-1);if(n instanceof as)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",n,t,e,1)):(e=new ms(n,n.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",n,t,e));if(n instanceof ri){if(this.singleCharacters)return e=new ms(n,n.data.length),this._position=e,this._previous();{let o,r=n.data.length;if(n==this._boundaryStartParent){const t=this.boundaries.start.offset;o=new ii(n,t,n.data.length-t),r=o.data.length,e=ms._createBefore(o)}else o=new ii(n,0,n.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",o,t,e,r)}}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{const t=o===this._boundaryStartParent?this.boundaries.start.offset:0;n=e.offset-t}e.offset-=n;const r=new ii(o,e.offset,n);return this._position=e,this._formatReturnValue("text",r,t,e,n)}return e=ms._createBefore(o),this._position=e,this._formatReturnValue("elementStart",o,t,e,1)}_formatReturnValue(e,t,o,n,r){return t instanceof ii&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?o=ms._createAfter(t.textNode):(n=ms._createAfter(t.textNode),this._position=n)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?o=ms._createBefore(t.textNode):(n=ms._createBefore(t.textNode),this._position=n))),{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:n,length:r}}}}class ms extends ti{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof us);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=ms._createAt(this),o=t.offset+e;return t.offset=o<0?0:o,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const o=new gs(t);return o.skip(e),o.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),o=e.getAncestors();let n=0;for(;t[n]==o[n]&&t[n];)n++;return 0===n?null:t[n-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],o=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),o.push(e.offset);const n=J(t,o);switch(n){case"prefix":return"before";case"extension":return"after";default:return t[n]0?new this(o,n):new this(n,o)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(ms._createBefore(e),t)}}function bs(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}fs.prototype.is=function(e){return"range"===e||"view:range"===e};class ks extends(S(ti)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const n of e._ranges)if(t.isEqual(n)){o=!0;break}if(!o)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=Z(this.getRanges());if(t!=Z(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let o=!1;for(let n of e.getRanges())if(n=n.getTrimmed(),t.start.isEqual(n.start)&&t.end.isEqual(n.end)){o=!0;break}if(!o)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,o,n]=e;if("object"==typeof o&&(n=o,o=void 0),null===t)this._setRanges([]),this._setFakeOptions(n);else if(t instanceof ks||t instanceof ws)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof fs)this._setRanges([t],n&&n.backward),this._setFakeOptions(n);else if(t instanceof ms)this._setRanges([new fs(t)]),this._setFakeOptions(n);else if(t instanceof ni){const e=!!n&&!!n.backward;let r;if(void 0===o)throw new f("view-selection-setto-required-second-parameter",this);r="in"==o?fs._createIn(t):"on"==o?fs._createOn(t):new fs(ms._createAt(t,o)),this._setRanges([r],e),this._setFakeOptions(n)}else{if(!Q(t))throw new f("view-selection-setto-not-selectable",this);this._setRanges(t,n&&n.backward),this._setFakeOptions(n)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new f("view-selection-setfocus-no-ranges",this);const o=ms._createAt(e,t);if("same"==o.compareWith(this.focus))return;const n=this.anchor;this._ranges.pop(),"before"==o.compareWith(n)?this._addRange(new fs(o,n),!0):this._addRange(new fs(n,o)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof fs))throw new f("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new f("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new fs(e.start,e.end))}}ks.prototype.is=function(e){return"selection"===e||"view:selection"===e};class ws extends(S(ti)){constructor(...e){super(),this._selection=new ks,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}ws.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class _s extends d{constructor(e,t,o){super(e,t),this.startRange=o,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const ys=Symbol("bubbling contexts");function As(e){return class extends e{fire(e,...t){try{const o=e instanceof d?e:new d(this,e),n=Es(this);if(!n.size)return;if(Cs(o,"capturing",this),vs(n,"$capture",o,...t))return o.return;const r=o.startRange||this.selection.getFirstRange(),i=r?r.getContainedElement():null,s=!!i&&Boolean(xs(n,i));let a=i||function(e){if(!e)return null;const t=e.start.parent,o=e.end.parent,n=t.getPath(),r=o.getPath();return n.length>r.length?t:o}(r);if(Cs(o,"atTarget",a),!s){if(vs(n,"$text",o,...t))return o.return;Cs(o,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(vs(n,"$root",o,...t))return o.return}else if(a.is("element")&&vs(n,a.name,o,...t))return o.return;if(vs(n,a,o,...t))return o.return;a=a.parent,Cs(o,"bubbling",a)}return Cs(o,"bubbling",this),vs(n,"$document",o,...t),o.return}catch(e){f.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,o){const n=mr(o.context||"$document"),r=Es(this);for(const i of n){let n=r.get(i);n||(n=new(S()),r.set(i,n)),this.listenTo(n,e,t,o)}}_removeEventListener(e,t){const o=Es(this);for(const n of o.values())this.stopListening(n,e,t)}}}{const e=As(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{As[t]=e.prototype[t]}))}function Cs(e,t,o){e instanceof _s&&(e._eventPhase=t,e._currentTarget=o)}function vs(e,t,o,...n){const r="string"==typeof t?e.get(t):xs(e,t);return!!r&&(r.fire(o,...n),o.stop.called)}function xs(e,t){for(const[o,n]of e)if("function"==typeof o&&o(t))return n;return null}function Es(e){return e[ys]||(e[ys]=new Map),e[ys]}class Ds extends(As(H())){constructor(e){super(),this._postFixers=new Set,this.selection=new ws,this.roots=new _r({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(t=o(e),t)break}while(t)}}class Ss extends as{constructor(e,t,o,n){super(e,t,o,n),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Ts}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new f("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function Ts(){if(Bs(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Bs(e)>1)return null;e=e.parent}return!e||Bs(e)>1?null:this.childCount}function Bs(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}Ss.DEFAULT_PRIORITY=10,Ss.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Is extends as{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=Ps}_insertChild(e,t){if(t&&(t instanceof ni||Array.from(t).length>0))throw new f("view-emptyelement-cannot-add",[this,t]);return 0}}function Ps(){return null}Is.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Rs extends as{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=Ms}_insertChild(e,t){if(t&&(t instanceof ni||Array.from(t).length>0))throw new f("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function zs(e){e.document.on("arrowKey",((t,o)=>function(e,t,o){if(t.keyCode==cr.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),n=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(n||t.shiftKey){const t=e.focusNode,r=e.focusOffset,i=o.domPositionToView(t,r);if(null===i)return;let s=!1;const a=i.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(s=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(s){const t=o.viewPositionToDom(a);n?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,o,e.domConverter)),{priority:"low"})}function Ms(){return null}Rs.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ns extends as{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=Fs}_insertChild(e,t){if(t&&(t instanceof ni||Array.from(t).length>0))throw new f("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function Fs(){return null}Ns.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Os extends(S(ti)){constructor(e,t){super(),this._children=[],this._customProperties=new Map,this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let o=0;const n=function(e,t){if("string"==typeof t)return[new ri(e,t)];Q(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new ri(e,t):t instanceof ii?new ri(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o{const o=e[e.length-1],n=!t.is("uiElement");return o&&o.breakAttributes==n?o.nodes.push(t):e.push({breakAttributes:n,nodes:[t]}),e}),[]);let n=null,r=e;for(const{nodes:e,breakAttributes:t}of o){const o=this._insertNodes(r,e,t);n||(n=o.start),r=o.end}return n?new fs(n,r):new fs(e)}remove(e){const t=e instanceof fs?e:fs._createOn(e);if(Ks(t,this.document),t.isCollapsed)return new Os(this.document);const{start:o,end:n}=this._breakAttributesRange(t,!0),r=o.parent,i=n.offset-o.offset,s=r._removeChildren(o.offset,i);for(const e of s)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(o);return t.start=a,t.end=a.clone(),new Os(this.document,s)}clear(e,t){Ks(e,this.document);const o=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const n of o){const o=n.item;let r;if(o.is("element")&&t.isSimilar(o))r=fs._createOn(o);else if(!n.nextPosition.isAfter(e.start)&&o.is("$textProxy")){const e=o.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(r=fs._createIn(e))}r&&(r.end.isAfter(e.end)&&(r.end=e.end),r.start.isBefore(e.start)&&(r.start=e.start),this.remove(r))}}move(e,t){let o;if(t.isAfter(e.end)){const n=(t=this._breakAttributes(t,!0)).parent,r=n.childCount;e=this._breakAttributesRange(e,!0),o=this.remove(e),t.offset+=n.childCount-r}else o=this.remove(e);return this.insert(t,o)}wrap(e,t){if(!(t instanceof Ss))throw new f("view-writer-wrap-invalid-attribute",this.document);if(Ks(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&(o=n.parent,!Array.from(o.getChildren()).some((e=>!e.is("uiElement"))))&&(n=n.getLastMatchingPosition((e=>e.item.is("uiElement")))),n=this._wrapPosition(n,t);const r=this.document.selection;return r.isCollapsed&&r.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new fs(n)}return this._wrapRange(e,t);var o}unwrap(e,t){if(!(t instanceof Ss))throw new f("view-writer-unwrap-invalid-attribute",this.document);if(Ks(e,this.document),e.isCollapsed)return e;const{start:o,end:n}=this._breakAttributesRange(e,!0),r=o.parent,i=this._unwrapChildren(r,o.offset,n.offset,t),s=this.mergeAttributes(i.start);s.isEqual(i.start)||i.end.offset--;const a=this.mergeAttributes(i.end);return new fs(s,a)}rename(e,t){const o=new cs(this.document,e,t.getAttributes());return this.insert(ms._createAfter(t),o),this.move(fs._createIn(t),ms._createAt(o,0)),this.remove(fs._createOn(t)),o}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return ms._createAt(e,t)}createPositionAfter(e){return ms._createAfter(e)}createPositionBefore(e){return ms._createBefore(e)}createRange(e,t){return new fs(e,t)}createRangeOn(e){return fs._createOn(e)}createRangeIn(e){return fs._createIn(e)}createSelection(...e){return new ks(...e)}createSlot(e="children"){if(!this._slotFactory)throw new f("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,o){let n,r;if(n=o?Ls(e):e.parent.is("$text")?e.parent.parent:e.parent,!n)throw new f("view-writer-invalid-position-container",this.document);r=o?this._breakAttributes(e,!0):e.parent.is("$text")?Hs(e):e;const i=n._insertChild(r.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const s=r.getShiftedBy(i),a=this.mergeAttributes(r);a.isEqual(r)||s.offset--;const l=this.mergeAttributes(s);return new fs(a,l)}_wrapChildren(e,t,o,n){let r=t;const i=[];for(;r!1,e.parent._insertChild(e.offset,o);const n=new fs(e,e.getShiftedBy(1));this.wrap(n,t);const r=new ms(o.parent,o.index);o._remove();const i=r.nodeBefore,s=r.nodeAfter;return i instanceof ri&&s instanceof ri?Ws(i,s):qs(r)}_wrapAttributeElement(e,t){if(!Zs(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&t.hasAttribute(o)&&t.getAttribute(o)!==e.getAttribute(o))return!1;for(const o of e.getStyleNames())if(t.hasStyle(o)&&t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&(t.hasAttribute(o)||this.setAttribute(o,e.getAttribute(o),t));for(const o of e.getStyleNames())t.hasStyle(o)||this.setStyle(o,e.getStyle(o),t);for(const o of e.getClassNames())t.hasClass(o)||this.addClass(o,t);return!0}_unwrapAttributeElement(e,t){if(!Zs(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&(!t.hasAttribute(o)||t.getAttribute(o)!==e.getAttribute(o)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const o of e.getStyleNames())if(!t.hasStyle(o)||t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&this.removeAttribute(o,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const o=e.start,n=e.end;if(Ks(e,this.document),e.isCollapsed){const o=this._breakAttributes(e.start,t);return new fs(o,o)}const r=this._breakAttributes(n,t),i=r.parent.childCount,s=this._breakAttributes(o,t);return r.offset+=r.parent.childCount-i,new fs(s,r)}_breakAttributes(e,t=!1){const o=e.offset,n=e.parent;if(e.parent.is("emptyElement"))throw new f("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new f("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new f("view-writer-cannot-break-raw-element",this.document);if(!t&&n.is("$text")&&Gs(n.parent))return e.clone();if(Gs(n))return e.clone();if(n.is("$text"))return this._breakAttributes(Hs(e),t);if(o==n.childCount){const e=new ms(n.parent,n.index+1);return this._breakAttributes(e,t)}if(0===o){const e=new ms(n.parent,n.index);return this._breakAttributes(e,t)}{const e=n.index+1,r=n._clone();n.parent._insertChild(e,r),this._addToClonedElementsGroup(r);const i=n.childCount-o,s=n._removeChildren(o,i);r._appendChild(s);const a=new ms(n.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let o=this._cloneGroups.get(t);o||(o=new Set,this._cloneGroups.set(t,o)),o.add(e),e._clonesGroup=o}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const o=this._cloneGroups.get(t);o&&o.delete(e)}}function Ls(e){let t=e.parent;for(;!Gs(t);){if(!t)return;t=t.parent}return t}function js(e,t){return e.priorityt.priority)&&e.getIdentity()o instanceof e)))throw new f("view-writer-insert-invalid-node-type",t);o.is("$text")||Us(o.getChildren(),t)}}function Gs(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function Ks(e,t){const o=Ls(e.start),n=Ls(e.end);if(!o||!n||o!==n)throw new f("view-writer-invalid-range-container",t)}function Zs(e,t){return null===e.id&&null===t.id}const Js=e=>e.createTextNode(" "),Qs=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},Ys=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},Xs=7,ea="⁠".repeat(Xs);function ta(e){return Rn(e)&&e.data.substr(0,Xs)===ea}function oa(e){return e.data.length==Xs&&ta(e)}function na(e){return ta(e)?e.data.slice(Xs):e.data}function ra(e,t){if(t.keyCode==cr.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,o=e.getRangeAt(0).startOffset;ta(t)&&o<=Xs&&e.collapse(t,0)}}}var ia=o(4401),sa={attributes:{"data-cke":!0}};sa.setAttributes=Wr(),sa.insert=qr().bind(null,"head"),sa.domAPI=Lr(),sa.insertStyleElement=Ur();Or()(ia.Z,sa);ia.Z&&ia.Z.locals&&ia.Z.locals;class aa extends(H()){constructor(e,t){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),n.isBlink&&!n.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e){throw new f("view-renderer-unknown-type",this)}this.markedChildren.add(t)}}}render(){if(this.isComposing&&!n.isAndroid)return;let e=null;const t=!(n.isBlink&&!n.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=ms._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),o=t.parent.ownerDocument;ta(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=la(o,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){if(!this.domConverter.mapViewToDom(e))return;const t=Array.from(this.domConverter.mapViewToDom(e).childNodes),o=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),n=this._diffNodeLists(t,o),r=this._findUpdateActions(n,t,o,ca);if(-1!==r.indexOf("update")){const n={equal:0,insert:0,delete:0};for(const i of r)if("update"===i){const r=n.equal+n.insert,i=n.equal+n.delete,s=e.getChild(r);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,t[i]),Qn(o[r]),n.equal++}else n[i]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?ms._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Rn(t.parent)&&ta(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!ta(e))throw new f("view-renderer-filler-was-lost",this);oa(e)?e.remove():e.data=e.data.substr(Xs),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,o=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(o===t.getFillerOffset())return!1;const r=e.nodeBefore,i=e.nodeAfter;return!(r instanceof ri||i instanceof ri)&&(!n.isAndroid||!r&&!i)}_updateText(e,t){const o=this.domConverter.findCorrespondingDomText(e);let n=this.domConverter.viewToDom(e).data;const r=t.inlineFillerPosition;r&&r.parent==e.parent&&r.offset==e.index&&(n=ea+n),ha(o,n)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const o=Array.from(t.attributes).map((e=>e.name)),n=e.getAttributeKeys();for(const o of n)this.domConverter.setDomElementAttribute(t,o,e.getAttribute(o),e);for(const n of o)e.hasAttribute(n)||this.domConverter.removeDomElementAttribute(t,n)}_updateChildren(e,t){const o=this.domConverter.mapViewToDom(e);if(!o)return;if(n.isAndroid){let e=null;for(const t of Array.from(o.childNodes)){if(e&&Rn(e)&&Rn(t)){o.normalize();break}e=t}}const r=t.inlineFillerPosition,i=o.childNodes,s=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));r&&r.parent===e&&la(o.ownerDocument,s,r.offset);const a=this._diffNodeLists(i,s),l=this._findUpdateActions(a,i,s,da);let c=0;const d=new Set;for(const e of l)"delete"===e?(d.add(i[c]),Qn(i[c])):"equal"!==e&&"update"!==e||c++;c=0;for(const e of l)"insert"===e?($n(o,c,s[c]),c++):"update"===e?(ha(i[c],s[c].data),c++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(s[c])),c++);for(const e of d)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const o=Array.from(e);if(0==o.length||!t)return o;const n=o[o.length-1];n==t&&o.pop();return o}(e,this._fakeSelectionContainer),l(e,t,ua.bind(null,this.domConverter))}_findUpdateActions(e,t,o,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let r=[],i=[],s=[];const a={equal:0,insert:0,delete:0};for(const c of e)"insert"===c?s.push(o[a.equal+a.insert]):"delete"===c?i.push(t[a.equal+a.delete]):(r=r.concat(l(i,s,n).map((e=>"equal"===e?"update":e))),r.push("equal"),i=[],s=[]),a[c]++;return r.concat(l(i,s,n).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(n.isBlink&&!n.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&n.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const o=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(o,this.selection),!this._fakeSelectionNeedsUpdate(e))return;o.parentElement&&o.parentElement==e||e.appendChild(o),o.textContent=this.selection.fakeSelectionLabel||" ";const n=t.getSelection(),r=t.createRange();n.removeAllRanges(),r.selectNodeContents(o),n.addRange(r)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const o=this.domConverter.viewPositionToDom(this.selection.anchor),r=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(o.parent,o.offset),t.extend(r.parent,r.offset),n.isGecko&&function(e,t){const o=e.parent;if(o.nodeType!=Node.ELEMENT_NODE||e.offset!=o.childNodes.length-1)return;const n=o.childNodes[e.offset];n&&"BR"==n.tagName&&t.addRange(t.getRangeAt(0))}(r,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,o=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(o.anchorNode!==t&&!t.contains(o.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const o=e.activeElement,n=this.domConverter.mapDomToView(o);o&&n&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function la(e,t,o){const n=t instanceof Array?t:t.childNodes,r=n[o];if(Rn(r))return r.data=ea+r.data,r;{const r=e.createTextNode(ea);return Array.isArray(t)?n.splice(o,0,r):$n(t,o,r),r}}function ca(e,t){return vn(e)&&vn(t)&&!Rn(e)&&!Rn(t)&&!Un(e)&&!Un(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function da(e,t){return vn(e)&&vn(t)&&Rn(e)&&Rn(t)}function ua(e,t,o){return t===o||(Rn(t)&&Rn(o)?t.data===o.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(o)))}function ha(e,t){const o=e.data;if(o==t)return;const n=i(o,t);for(const t of n)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const pa=Ys(In.document),ga=Js(In.document),ma=Qs(In.document),fa="data-ck-unsafe-attribute-",ba="data-ck-unsafe-element";class ka{constructor(e,{blockFillerMode:t,renderingMode:o="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new si,this._encounteredRawContentDomNodes=new WeakSet,this.document=e,this.renderingMode=o,this.blockFillerMode=t||("editing"===o?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?In.document:In.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new ks(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,o){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===o&&("src"===e||"srcset"===e)||("source"===o&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const o=(new DOMParser).parseFromString(t,"text/html"),n=o.createDocumentFragment(),r=o.body.childNodes;for(;r.length>0;)n.appendChild(r[0]);const i=o.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=i.nextNode();)s.push(a);for(const e of s){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(ya(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(n)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let o;if(e.is("documentFragment"))o=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(o,e);else{if(e.is("uiElement"))return o="$comment"===e.name?this._domDocument.createComment(e.getCustomProperty("$rawContent")):e.render(this._domDocument,this),t.bind&&this.bindElements(o,e),o;this._shouldRenameElement(e.name)?(ya(e.name),o=this._createReplacementDomElement(e.name)):o=e.hasAttribute("xmlns")?this._domDocument.createElementNS(e.getAttribute("xmlns"),e.name):this._domDocument.createElement(e.name),e.is("rawElement")&&e.render(o,this),t.bind&&this.bindElements(o,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(o,t,e.getAttribute(t),e)}if(!1!==t.withChildren)for(const n of this.viewChildrenToDom(e,t))o.appendChild(n);return o}}setDomElementAttribute(e,t,o,n){const r=this.shouldRenderAttribute(t,o,e.tagName.toLowerCase())||n&&n.shouldRenderUnsafeAttribute(t);r||b("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:o}),function(e){try{In.document.createAttribute(e)}catch(e){return!1}return!0}(t)?(e.hasAttribute(t)&&!r?e.removeAttribute(t):e.hasAttribute(fa+t)&&r&&e.removeAttribute(fa+t),e.setAttribute(r?t:fa+t,o)):b("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:o})}removeDomElementAttribute(e,t){t!=ba&&(e.removeAttribute(t),e.removeAttribute(fa+t))}*viewChildrenToDom(e,t={}){const o=e.getFillerOffset&&e.getFillerOffset();let n=0;for(const r of e.getChildren()){o===n&&(yield this._getBlockFiller());const e=r.is("element")&&!!r.getCustomProperty("dataPipeline:transparentRendering")&&!yr(r.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(r,t):(e&&b("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:r}),yield this.viewToDom(r,t)),n++}o===n&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),o=this.viewPositionToDom(e.end),n=this._domDocument.createRange();return n.setStart(t.parent,t.offset),n.setEnd(o.parent,o.offset),n}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const o=this.findCorrespondingDomText(t);if(!o)return null;let n=e.offset;return ta(o)&&(n+=Xs),{parent:o,offset:n}}{let o,n,r;if(0===e.offset){if(o=this.mapViewToDom(t),!o)return null;r=o.childNodes[0]}else{const t=e.nodeBefore;if(n=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!n)return null;o=n.parentNode,r=n.nextSibling}if(Rn(r)&&ta(r))return{parent:r,offset:Xs};return{parent:o,offset:n?Wn(n)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const o=this.getHostViewElement(e);if(o)return o;if(Un(e)&&t.skipComments)return null;if(Rn(e)){if(oa(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new ri(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let o;if(this.isDocumentFragment(e))o=new Os(this.document),t.bind&&this.bindDocumentFragments(e,o);else{o=this._createViewElement(e,t),t.bind&&this.bindElements(e,o);const n=e.attributes;if(n)for(let e=n.length,t=0;t{const{scrollLeft:t,scrollTop:o}=e;n.push([t,o])})),t.focus(),wa(t,(e=>{const[t,o]=n.shift();e.scrollLeft=t,e.scrollTop=o})),In.window.scrollTo(e,o)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(pa):!("BR"!==e.tagName||!_a(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(ma)||function(e,t){const o=e.isEqualNode(ga);return o&&_a(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const o=t.collapsed;return t.detach(),o}getHostViewElement(e){const t=Pn(e);for(t.pop();t.length;){const e=t.pop(),o=this._domToViewMapping.get(e);if(o&&(o.is("uiElement")||o.is("rawElement")))return o}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return Js(this._domDocument);case"markedNbsp":return Qs(this._domDocument);case"br":return Ys(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if(Rn(e)&&ta(e)&&tthis.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const o=this._getTouchingInlineViewNode(e,!1);!(o&&o.is("$textProxy")&&this._nodeEndsWithSpace(o))&&o||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const o=this._getTouchingInlineViewNode(e,!0),n=o&&o.is("$textProxy")&&" "==o.data.charAt(0);" "!=t.charAt(t.length-2)&&o&&!n||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(function(e,t){const o=Pn(e);return o.some((e=>e.tagName&&t.includes(e.tagName.toLowerCase())))}(e,this.preElements))return na(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const o=this._getTouchingInlineDomNode(e,!1),n=this._getTouchingInlineDomNode(e,!0),r=this._checkShouldLeftTrimDomText(e,o),i=this._checkShouldRightTrimDomText(e,n);r&&(t=t.replace(/^ /,"")),i&&(t=t.replace(/ $/,"")),t=na(new Text(t)),t=t.replace(/ \u00A0/g," ");const s=n&&this.isElement(n)&&"BR"!=n.tagName,a=n&&Rn(n)&&" "==n.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!n||s||a)&&(t=t.replace(/\u00A0$/," ")),(r||o&&this.isElement(o)&&"BR"!=o.tagName)&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!ta(e)}_getTouchingInlineViewNode(e,t){const o=new gs({startPosition:t?ms._createAfter(e):ms._createBefore(e),direction:t?"forward":"backward"});for(const e of o){if(e.item.is("element")&&this.inlineObjectElements.includes(e.item.name))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const o=t?"firstChild":"lastChild",n=t?"nextSibling":"previousSibling";let r=!0,i=e;do{if(!r&&i[o]?i=i[o]:i[n]?(i=i[n],r=!1):(i=i.parentNode,r=!0),!i||this._isBlockElement(i))return null}while(!Rn(i)&&"BR"!=i.tagName&&!this._isInlineObjectElement(i));return i}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if(Un(e))return new Rs(this.document,"$comment");const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new as(this.document,o)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const o=this._domDocument.createElement("span");if(o.setAttribute(ba,e),t){for(;t.firstChild;)o.appendChild(t.firstChild);for(const e of t.getAttributeNames())o.setAttribute(e,t.getAttribute(e))}return o}}function wa(e,t){let o=e;for(;o;)t(o),o=o.parentElement}function _a(e,t){const o=e.parentNode;return!!o&&!!o.tagName&&t.includes(o.tagName.toLowerCase())}function ya(e){"script"===e&&b("domconverter-unsafe-script-element-detected"),"style"===e&&b("domconverter-unsafe-style-element-detected")}class Aa extends(Dn()){constructor(e){super(),this._isEnabled=!1,this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}var Ca=Yi((function(e,t){Et(t,co(t),e)}));const va=Ca;class xa{constructor(e,t,o){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,va(this,o)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Ea extends Aa{constructor(){super(...arguments),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,o){this.isEnabled&&this.document.fire(e,new xa(this.view,t,o))}}class Da extends Ea{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return ur(this)}};this.fire(e.type,e,t)}}const Sa=function(){return ee.Date.now()};var Ta=/\s/;const Ba=function(e){for(var t=e.length;t--&&Ta.test(e.charAt(t)););return t};var Ia=/^\s+/;const Pa=function(e){return e?e.slice(0,Ba(e)+1).replace(Ia,""):e};var Ra=/^[-+]0x[0-9a-f]+$/i,za=/^0b[01]+$/i,Ma=/^0o[0-7]+$/i,Na=parseInt;const Fa=function(e){if("number"==typeof e)return e;if(ci(e))return NaN;if(N(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=N(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Pa(e);var o=za.test(e);return o||Ma.test(e)?Na(e.slice(2),o?2:8):Ra.test(e)?NaN:+e};var Oa=Math.max,Va=Math.min;const La=function(e,t,o){var n,r,i,s,a,l,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var o=n,i=r;return n=r=void 0,c=t,s=e.apply(i,o)}function g(e){var o=e-l;return void 0===l||o>=t||o<0||u&&e-c>=i}function m(){var e=Sa();if(g(e))return f(e);a=setTimeout(m,function(e){var o=t-(e-l);return u?Va(o,i-(e-c)):o}(e))}function f(e){return a=void 0,h&&n?p(e):(n=r=void 0,s)}function b(){var e=Sa(),o=g(e);if(n=arguments,r=this,l=e,o){if(void 0===a)return function(e){return c=e,a=setTimeout(m,t),d?p(e):s}(l);if(u)return clearTimeout(a),a=setTimeout(m,t),p(l)}return void 0===a&&(a=setTimeout(m,t)),s}return t=Fa(t)||0,N(o)&&(d=!!o.leading,i=(u="maxWait"in o)?Oa(Fa(o.maxWait)||0,t):i,h="trailing"in o?!!o.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=r=a=void 0},b.flush=function(){return void 0===a?s:f(Sa())},b};class ja extends Aa{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=La((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&o.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(o.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,o=new ks(t.getRanges(),{backward:t.isBackward,fake:!1});e!=cr.arrowleft&&e!=cr.arrowup||o.setTo(o.getFirstPosition()),e!=cr.arrowright&&e!=cr.arrowdown||o.setTo(o.getLastPosition());const n={oldSelection:t,newSelection:o,domSelection:null};this.document.fire("selectionChange",n),this._fireSelectionChangeDoneDebounced(n)}}const qa=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const Ha=function(e){return this.__data__.has(e)};function Wa(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new bt;++ta))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var u=-1,h=!0,p=2&o?new $a:void 0;for(i.set(e,t),i.set(t,e);++u{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((o,n)=>{const r=t.selection.editableElement;null!==r&&r!==n.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class hl extends Aa{constructor(e){super(e),this.mutationObserver=e.getObserver(cl),this.focusObserver=e.getObserver(ul),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=La((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=La((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,o=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",o,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",o,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",o,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,o)=>{this.document.isComposing&&!n.isAndroid||(this._handleSelectionChange(o,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const o=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(o.anchorNode))return;this.mutationObserver.flush();const n=this.domConverter.domSelectionToView(o);if(0!=n.rangeCount){if(this.view.hasDomSelection=!0,!this.selection.isEqual(n)||!this.domConverter.isDomSelectionCorrect(o))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.focusObserver.flush(),this.selection.isSimilar(n))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:n,domSelection:o};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class pl extends Ea{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class gl{constructor(e,t={}){this._files=t.cacheFiles?ml(e):null,this._native=e}get files(){return this._files||(this._files=ml(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,o){this._native.setDragImage(e,t,o)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function ml(e){const t=Array.from(e.files||[]),o=Array.from(e.items||[]);return t.length?t:o.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class fl extends Ea{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(e){const t=e.getTargetRanges(),o=this.view,r=o.document;let i=null,s=null,a=[];if(e.dataTransfer&&(i=new gl(e.dataTransfer)),null!==e.data?s=e.data:i&&(s=i.getData("text/plain")),r.selection.isFake)a=Array.from(r.selection.getRanges());else if(t.length)a=t.map((e=>o.domConverter.domRangeToView(e)));else if(n.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();a=Array.from(o.domConverter.domSelectionToView(t).getRanges())}if(n.isAndroid&&"insertCompositionText"==e.inputType&&s&&s.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[o.createRange(a[0].end)]});else if("insertText"==e.inputType&&s&&s.includes("\n")){const t=s.split(/\n{1,2}/g);let o=a;for(let n=0;n{if(this.isEnabled&&((o=t.keyCode)==cr.arrowright||o==cr.arrowleft||o==cr.arrowup||o==cr.arrowdown)){const o=new _s(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(o,t),o.stop.called&&e.stop()}var o}))}observe(){}stopObserving(){}}class kl extends Aa{constructor(e){super(e);const t=this.document;t.on("keydown",((e,o)=>{if(!this.isEnabled||o.keyCode!=cr.tab||o.ctrlKey)return;const n=new _s(t,"tab",t.selection.getFirstRange());t.fire(n,o),n.stop.called&&e.stop()}))}observe(){}stopObserving(){}}class wl extends(H()){constructor(e){super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new Ds(e),this.domConverter=new ka(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new aa(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new Vs(this.document),this.addObserver(cl),this.addObserver(ul),this.addObserver(hl),this.addObserver(Da),this.addObserver(ja),this.addObserver(pl),this.addObserver(bl),this.addObserver(fl),this.addObserver(kl),this.document.on("arrowKey",ra,{priority:"low"}),zs(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0}))}attachDomRoot(e,t="main"){const o=this.document.getRoot(t);o._name=e.tagName.toLowerCase();const n={};for(const{name:t,value:r}of Array.from(e.attributes))n[t]=r,"class"===t?this._writer.addClass(r.split(" "),o):this._writer.setAttribute(t,r,o);this._initialDomRootAttributes.set(e,n);const r=()=>{this._writer.setAttribute("contenteditable",(!o.isReadOnly).toString(),o),o.isReadOnly?this._writer.addClass("ck-read-only",o):this._writer.removeClass("ck-read-only",o)};r(),this.domRoots.set(t,e),this.domConverter.bindElements(e,o),this._renderer.markToSync("children",o),this._renderer.markToSync("attributes",o),this._renderer.domDocuments.add(e.ownerDocument),o.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),o.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),o.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),o.on("change:isReadOnly",(()=>this.change(r))),o.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const o of this._observers.values())o.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const o=this._initialDomRootAttributes.get(t);for(const e in o)t.setAttribute(e,o[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,o]of this.domRoots)t.observe(o,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:o=20,ancestorOffset:n=20}={}){const r=this.document.selection.getFirstRange();r&&function({target:e,viewportOffset:t=0,ancestorOffset:o=0,alignToTop:n,forceScroll:r}){const i=rr(e);let s=i,a=null;for(;s;){let l;l=ir(s==i?e:a),Xn({parent:l,getRect:()=>sr(e,s),alignToTop:n,ancestorOffset:o,forceScroll:r});const c=sr(e,s);if(Yn({window:s,rect:c,viewportOffset:t,alignToTop:n,forceScroll:r}),s.parent!=s){if(a=s.frameElement,s=s.parent,!a)return}else s=null}}({target:this.domConverter.viewRangeToDom(r),viewportOffset:o,ancestorOffset:n,alignToTop:e,forceScroll:t})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new f("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){f.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(ul).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return ms._createAt(e,t)}createPositionAfter(e){return ms._createAfter(e)}createPositionBefore(e){return ms._createBefore(e)}createRange(e,t){return new fs(e,t)}createRangeOn(e){return fs._createOn(e)}createRangeIn(e){return fs._createIn(e)}createSelection(...e){return new ks(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class _l{is(){throw new Error("is() method is abstract")}}class yl extends _l{constructor(e){super(),this.parent=null,this._attrs=vr(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new f("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new f("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),n=e.getAncestors(t);let r=0;for(;o[r]==n[r]&&o[r];)r++;return 0===r?null:o[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),n=J(t,o);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n](e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=vr(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}yl.prototype.is=function(e){return"node"===e||"model:node"===e};class Al{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new f("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const o of this._nodes){if(e>=t&&e1e4)return e.slice(0,o).concat(t).concat(e.slice(o+n,e.length));{const r=Array.from(e);return r.splice(o,n,...t),r}}(this._nodes,Array.from(t),e,0)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e=>e.toJSON()))}}class Cl extends yl{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Cl(this.data,this.getAttributes())}static fromJSON(e){return new Cl(e.data,e.attributes)}}Cl.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class vl extends _l{constructor(e,t,o){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new f("model-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.offsetSize)throw new f("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}vl.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class xl extends yl{constructor(e,t,o){super(t),this._children=new Al,this.name=e,o&&this._insertChild(0,o)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}findAncestor(e,t={}){let o=t.includeSelf?this:this.parent;for(;o;){if(o.name===e)return o;o=o.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new xl(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Cl(e)];Q(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Cl(e):e instanceof vl?new Cl(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}static fromJSON(e){let t;if(e.children){t=[];for(const o of e.children)o.name?t.push(xl.fromJSON(o)):t.push(Cl.fromJSON(o))}return new xl(e.name,e.attributes,t)}}xl.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class El{constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new f("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new f("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=Sl._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o,n,r;do{n=this.position,r=this._visitedParent,({done:t,value:o}=this.next())}while(!t&&e(o));t||(this._position=n,this._visitedParent=r)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),o=this._visitedParent;if(null===o.parent&&t.offset===o.maxOffset)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const n=Tl(t,o),r=n||Bl(t,o,n);if(r instanceof xl)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=r),this._position=t,Dl("elementStart",r,e,t,1);if(r instanceof Cl){let n;if(this.singleCharacters)n=1;else{let e=r.endOffset;this._boundaryEndParent==o&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),n=t.offset-e}const r=t.offset-i.startOffset,s=new vl(i,r-n,n);return t.offset-=n,this._position=t,Dl("text",s,e,t,n)}return t.path.pop(),this._position=t,this._visitedParent=o.parent,Dl("elementStart",o,e,t,1)}}function Dl(e,t,o,n,r){return{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:n,length:r}}}class Sl extends _l{constructor(e,t,o="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new f("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new f("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=o}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t1)return!1;if(1===t)return Pl(e,this,o);if(-1===t)return Pl(this,e,o)}return this.path.length===e.path.length||(this.path.length>e.path.length?Rl(this.path,t):Rl(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;return"same"==J(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=Sl._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let o;return t.containsPosition(this)||t.start.isEqual(this)?(o=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(o=o._getTransformedByDeletion(e.deletionPosition,1))):o=this.isEqual(e.deletionPosition)?Sl._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),o}_getTransformedByDeletion(e,t){const o=Sl._createAt(this);if(this.root!=e.root)return o;if("same"==J(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;o.offset-=t}}else if("prefix"==J(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;if(e.offset<=this.path[n]){if(e.offset+t>this.path[n])return null;o.path[n]-=t}}return o}_getTransformedByInsertion(e,t){const o=Sl._createAt(this);if(this.root!=e.root)return o;if("same"==J(e.getParentPath(),this.getParentPath()))(e.offset=t;){if(e.path[n]+r!==o.maxOffset)return!1;r=1,n--,o=o.parent}return!0}(e,o+1))}function Rl(e,t){for(;tt+1;){const t=n.maxOffset-o.offset;0!==t&&e.push(new zl(o,o.getShiftedBy(t))),o.path=o.path.slice(0,-1),o.offset++,n=n.parent}for(;o.path.length<=this.end.path.length;){const t=this.end.path[o.path.length-1],n=t-o.offset;0!==n&&e.push(new zl(o,o.getShiftedBy(n))),o.offset=t,o.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new El(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new El(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new El(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new zl(this.start,this.end)]}getTransformedByOperations(e){const t=[new zl(this.start,this.end)];for(const o of e)for(let e=0;e0?new this(o,n):new this(n,o)}static _createIn(e){return new this(Sl._createAt(e,0),Sl._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Sl._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new f("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const o=e.indexOf(t),n=new this(t.start,t.end);if(o>0)for(let t=o-1;e[t].end.isEqual(n.start);t++)n.start=Sl._createAt(e[t].start);for(let t=o+1;t{if(t.viewPosition)return;const o=this._modelToViewMapping.get(t.modelPosition.parent);if(!o)throw new f("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(o,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const o=this.findMappedViewAncestor(t.viewPosition),n=this._viewToModelMapping.get(o),r=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,o);t.modelPosition=Sl._createAt(n,r)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const o=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(o)==e&&this._modelToViewMapping.delete(o))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const o=this._markerNameToElements.get(t)||new Set;o.add(e);const n=this._elementToMarkerNames.get(e)||new Set;n.add(t),this._markerNameToElements.set(t,o),this._elementToMarkerNames.set(e,n)}unbindElementFromMarkerName(e,t){const o=this._markerNameToElements.get(t);o&&(o.delete(e),0==o.size&&this._markerNameToElements.delete(t));const n=this._elementToMarkerNames.get(e);n&&(n.delete(t),0==n.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new zl(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new fs(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const o={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",o),o.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const o=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())o.add(t);else o.add(e);return o}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,o){if(o!=e){return this._toModelOffset(e.parent,e.index,o)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let n=0;for(let o=0;o1?t[0]+":"+t[1]:t[0]}class Ol extends(S()){constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,o){const n=this._createConversionApi(o,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,n);const r=this._reduceChanges(e.getChanges());for(const e of r)"insert"===e.type?this._convertInsert(zl._createFromPositionAndShift(e.position,e.length),n):"reinsert"===e.type?this._convertReinsert(zl._createFromPositionAndShift(e.position,e.length),n):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,n):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,n);for(const e of n.mapper.flushUnboundMarkerNames()){const o=t.get(e).getRange();this._convertMarkerRemove(e,o,n),this._convertMarkerAdd(e,o,n)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,n);n.mapper.flushDeferredBindings(),n.consumable.verifyAllConsumed("insert")}convert(e,t,o,n={}){const r=this._createConversionApi(o,void 0,n);this._convertInsert(e,r);for(const[e,o]of t)this._convertMarkerAdd(e,o,r);r.consumable.verifyAllConsumed("insert")}convertSelection(e,t,o){const n=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),r=this._createConversionApi(o);if(this._addConsumablesForSelection(r.consumable,e,n),this.fire("selection",{selection:e},r),e.isCollapsed){for(const t of n){const o=t.getRange();if(!Vl(e.getFirstPosition(),t,r.mapper))continue;const n={item:e,markerName:t.name,markerRange:o};r.consumable.test(e,"addMarker:"+t.name)&&this.fire(`addMarker:${t.name}`,n,r)}for(const t of e.getAttributeKeys()){const o={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};r.consumable.test(e,"attribute:"+o.attributeKey)&&this.fire(`attribute:${o.attributeKey}:$text`,o,r)}}}_convertInsert(e,t,o={}){o.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e));for(const o of Array.from(e.getWalker({shallow:!0})).map(Ll))this._testAndFire("insert",o,t)}_convertRemove(e,t,o,n){this.fire(`remove:${o}`,{position:e,length:t},n)}_convertAttribute(e,t,o,n,r){this._addConsumablesForRange(r.consumable,e,`attribute:${t}`);for(const i of e){const e={item:i.item,range:zl._createFromPositionAndShift(i.previousPosition,i.length),attributeKey:t,attributeOldValue:o,attributeNewValue:n};this._testAndFire(`attribute:${t}`,e,r)}}_convertReinsert(e,t){const o=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,o);for(const e of o.map(Ll))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,o){if("$graveyard"==t.root.rootName)return;const n=`addMarker:${e}`;if(o.consumable.add(t,n),this.fire(n,{markerName:e,markerRange:t},o),o.consumable.consume(t,n)){this._addConsumablesForRange(o.consumable,t,n);for(const r of t.getItems()){if(!o.consumable.test(r,n))continue;const i={item:r,range:zl._createOn(r),markerName:e,markerRange:t};this.fire(n,i,o)}}}_convertMarkerRemove(e,t,o){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},o)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const o of t){const t=o.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o)}}return e}_addConsumablesForRange(e,t,o){for(const n of t.getItems())e.add(n,o);return e}_addConsumablesForSelection(e,t,o){e.add(t,"selection");for(const n of o)e.add(t,"addMarker:"+n.name);for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o);return e}_testAndFire(e,t,o){const n=function(e,t){const o=t.item.is("element")?t.item.name:"$text";return`${e}:${o}`}(e,t),r=t.item.is("$textProxy")?o.consumable._getSymbolForTextProxy(t.item):t.item,i=this._firedEventsMap.get(o),s=i.get(r);if(s){if(s.has(n))return;s.add(n)}else i.set(r,new Set([n]));this.fire(n,t,o)}_testAndFireAddAttributes(e,t){const o={item:e,range:zl._createOn(e)};for(const e of o.item.getAttributeKeys())o.attributeKey=e,o.attributeOldValue=null,o.attributeNewValue=o.item.getAttribute(e),this._testAndFire(`attribute:${e}`,o,t)}_createConversionApi(e,t=new Set,o={}){const n={...this._conversionApi,consumable:new Nl,writer:e,options:o,convertItem:e=>this._convertInsert(zl._createOn(e),n),convertChildren:e=>this._convertInsert(zl._createIn(e),n,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,n),canReuseView:e=>!t.has(n.mapper.toModelElement(e))};return this._firedEventsMap.set(n,new Map),n}}function Vl(e,t,o){const n=t.getRange(),r=Array.from(e.getAncestors());r.shift(),r.reverse();return!r.some((e=>{if(n.containsItem(e)){return!!o.toViewElement(e).getCustomProperty("addHighlight")}}))}function Ll(e){return{item:e.item,range:zl._createFromPositionAndShift(e.previousPosition,e.length)}}class jl extends(S(_l)){constructor(...e){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const n of e._ranges)if(t.isEqual(n)){o=!0;break}if(!o)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new zl(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new zl(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new zl(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,o,n]=e;if("object"==typeof o&&(n=o,o=void 0),null===t)this._setRanges([]);else if(t instanceof jl)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof zl)this._setRanges([t],!!n&&!!n.backward);else if(t instanceof Sl)this._setRanges([new zl(t)]);else if(t instanceof yl){const e=!!n&&!!n.backward;let r;if("in"==o)r=zl._createIn(t);else if("on"==o)r=zl._createOn(t);else{if(void 0===o)throw new f("model-selection-setto-required-second-parameter",[this,t]);r=new zl(Sl._createAt(t,o))}this._setRanges([r],e)}else{if(!Q(t))throw new f("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,n&&!!n.backward)}}_setRanges(e,t=!1){const o=Array.from(e),n=o.some((t=>{if(!(t instanceof zl))throw new f("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(o.length!==this._ranges.length||n)&&(this._replaceAllRanges(o),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new f("model-selection-setfocus-no-ranges",[this,e]);const o=Sl._createAt(e,t);if("same"==o.compareWith(this.focus))return;const n=this.anchor;this._ranges.length&&this._popRange(),"before"==o.compareWith(n)?(this._pushRange(new zl(o,n)),this._lastRangeBackward=!0):(this._pushRange(new zl(n,o)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const o=Wl(t.start,e);Ul(o,t)&&(yield o);for(const o of t.getWalker()){const n=o.item;"elementEnd"==o.type&&Hl(n,e,t)&&(yield n)}const n=Wl(t.end,e);Gl(n,t)&&(yield n)}}containsEntireContent(e=this.anchor.root){const t=Sl._createAt(e,0),o=Sl._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&o.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new zl(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function ql(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function Hl(e,t,o){return ql(e,t)&&$l(e,o)}function Wl(e,t){const o=e.parent.root.document.model.schema,n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let r=!1;const i=n.find((e=>!r&&(r=o.isLimit(e),!r&&ql(e,t))));return n.forEach((e=>t.add(e))),i}function $l(e,t){const o=function(e){const t=e.root.document.model.schema;let o=e.parent;for(;o;){if(t.isBlock(o))return o;o=o.parent}}(e);if(!o)return!0;return!t.containsRange(zl._createOn(o),!0)}function Ul(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(Sl._createAt(e,e.maxOffset))&&$l(e,t))}function Gl(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(Sl._createAt(e,0))&&$l(e,t))}jl.prototype.is=function(e){return"selection"===e||"model:selection"===e};class Kl extends(S(zl)){constructor(e,t){super(e,t),Zl.call(this)}detach(){this.stopListening()}toRange(){return new zl(this.start,this.end)}static fromRange(e){return new Kl(e.start,e.end)}}function Zl(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&Jl.call(this,o)}),{priority:"low"})}function Jl(e){const t=this.getTransformedByOperation(e),o=zl._createFromRanges(t),n=!o.isEqual(this),r=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let i=null;if(n){"$graveyard"==o.root.rootName&&(i="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=o.start,this.end=o.end,this.fire("change:range",t,{deletionPosition:i})}else r&&this.fire("change:content",this.toRange(),{deletionPosition:i})}Kl.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const Ql="selection:";class Yl extends(S(_l)){constructor(e){super(),this._selection=new Xl(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return Ql+e}static _isStoreAttributeKey(e){return e.startsWith(Ql)}}Yl.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class Xl extends jl{constructor(e){super(),this.markers=new _r({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&"marker"!=o.type&&"rename"!=o.type&&"noop"!=o.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,o,n)=>{this._updateMarker(t,n)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const o=e.document.differ;for(const n of o.getChanges()){if("insert"!=n.type)continue;const o=n.position.parent;n.length===o.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(o.getAttributeKeys()).filter((e=>e.startsWith(Ql)));for(const n of t)e.removeAttribute(n,o)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=n.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const o=t.name.split(":",1)[0];if(!this._observedMarkers.has(o))continue;const n=t.getRange();for(const o of this.getRanges())n.containsRange(o,!o.isCollapsed)&&e.push(t)}const o=Array.from(this.markers);for(const o of e)this.markers.has(o)||(this.markers.add(o),t=!0);for(const o of Array.from(this.markers))e.includes(o)||(this.markers.remove(o),t=!0);t&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateMarker(e,t){const o=e.name.split(":",1)[0];if(!this._observedMarkers.has(o))return;let n=!1;const r=Array.from(this.markers),i=this.markers.has(e);if(t){let o=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){o=!0;break}o&&!i?(this.markers.add(e),n=!0):!o&&i&&(this.markers.remove(e),n=!0)}else i&&(this.markers.remove(e),n=!0);n&&this.fire("change:marker",{oldMarkers:r,directChange:!1})}_updateAttributes(e){const t=vr(this._getSurroundingAttributes()),o=vr(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const n=[];for(const[e,t]of this.getAttributes())o.has(e)&&o.get(e)===t||n.push(e);for(const[e]of o)this.hasAttribute(e)||n.push(e);n.length>0&&this.fire("change:attribute",{attributeKeys:n,directChange:!1})}_setAttribute(e,t,o=!0){const n=o?"normal":"low";if("low"==n&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,n),!0)}_removeAttribute(e,t=!0){const o=t?"normal":"low";return("low"!=o||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,o),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,o]of this.getAttributes())e.get(t)!==o&&this._removeAttribute(t,!1);for(const[o,n]of e){this._setAttribute(o,n,!1)&&t.add(o)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(Ql)){const o=t.substr(10);yield[o,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let o=null;if(this.isCollapsed){const n=e.textNode?e.textNode:e.nodeBefore,r=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(o=ec(n)),o||(o=ec(r)),!this.isGravityOverridden&&!o){let e=n;for(;e&&!t.isInline(e)&&!o;)e=e.previousSibling,o=ec(e)}if(!o){let e=r;for(;e&&!t.isInline(e)&&!o;)e=e.nextSibling,o=ec(e)}o||(o=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const n of e){if(n.item.is("element")&&t.isObject(n.item))break;if("text"==n.type){o=n.item.getAttributes();break}}}return o}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function ec(e){return e instanceof vl||e instanceof Cl?e.getAttributes():null}class tc{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}const oc=function(e){return kn(e,5)};class nc extends tc{elementToElement(e){return this.add(function(e){const t=sc(e.model),o=ac(e.view,"container");t.attributes.length&&(t.children=!0);return n=>{n.on(`insert:${t.name}`,function(e,t=mc){return(o,n,r)=>{if(!t(n.item,r.consumable,{preflight:!0}))return;const i=e(n.item,r,n);if(!i)return;t(n.item,r.consumable);const s=r.mapper.toViewPosition(n.range.start);r.mapper.bindElements(n.item,i),r.writer.insert(s,i),r.convertAttributes(n.item),pc(i,n.item.getChildren(),r,{reconversion:n.reconversion})}}(o,hc(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&n.on("reduceChanges",uc(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=sc(e.model),o=ac(e.view,"container");return t.children=!0,n=>{if(n._conversionApi.schema.checkChild(t.name,"$text"))throw new f("conversion-element-to-structure-disallowed-text",n,{elementName:t.name});var r,i;n.on(`insert:${t.name}`,(r=o,i=hc(t),(e,t,o)=>{if(!i(t.item,o.consumable,{preflight:!0}))return;const n=new Map;o.writer._registerSlotFactory(function(e,t,o){return(n,r)=>{const i=n.createContainerElement("$slot");let s=null;if("children"===r)s=Array.from(e.getChildren());else{if("function"!=typeof r)throw new f("conversion-slot-mode-unknown",o.dispatcher,{modeOrFilter:r});s=Array.from(e.getChildren()).filter((e=>r(e)))}return t.set(i,s),i}}(t.item,n,o));const s=r(t.item,o,t);if(o.writer._clearSlotFactory(),!s)return;!function(e,t,o){const n=Array.from(t.values()).flat(),r=new Set(n);if(r.size!=n.length)throw new f("conversion-slot-filter-overlap",o.dispatcher,{element:e});if(r.size!=e.childCount)throw new f("conversion-slot-filter-incomplete",o.dispatcher,{element:e})}(t.item,n,o),i(t.item,o.consumable);const a=o.mapper.toViewPosition(t.range.start);o.mapper.bindElements(t.item,s),o.writer.insert(a,s),o.convertAttributes(t.item),function(e,t,o,n){o.mapper.on("modelToViewPosition",s,{priority:"highest"});let r=null,i=null;for([r,i]of t)pc(e,i,o,n),o.writer.move(o.writer.createRangeIn(r),o.writer.createPositionBefore(r)),o.writer.remove(r);function s(e,t){const o=t.modelPosition.nodeAfter,n=i.indexOf(o);n<0||(t.viewPosition=t.mapper.findPositionIn(r,n))}o.mapper.off("modelToViewPosition",s)}(s,n,o,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),n.on("reduceChanges",uc(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){e=oc(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=ac(e.view[o],"attribute");else e.view=ac(e.view,"attribute");const n=lc(e);return t=>{t.on(o,function(e){return(t,o,n)=>{if(!n.consumable.test(o.item,t.name))return;const r=e(o.attributeOldValue,n,o),i=e(o.attributeNewValue,n,o);if(!r&&!i)return;n.consumable.consume(o.item,t.name);const s=n.writer,a=s.document.selection;if(o.item instanceof jl||o.item instanceof Yl)s.wrap(a.getFirstRange(),i);else{let e=n.mapper.toViewRange(o.range);null!==o.attributeOldValue&&r&&(e=s.unwrap(e,r)),null!==o.attributeNewValue&&i&&s.wrap(e,i)}}}(n),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=oc(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=cc(e.view[o]);else e.view=cc(e.view);const n=lc(e);return t=>{var r;t.on(o,(r=n,(e,t,o)=>{if(!o.consumable.test(t.item,e.name))return;const n=r(t.attributeOldValue,o,t),i=r(t.attributeNewValue,o,t);if(!n&&!i)return;o.consumable.consume(t.item,e.name);const s=o.mapper.toViewElement(t.item),a=o.writer;if(!s)throw new f("conversion-attribute-to-attribute-on-text",o.dispatcher,t);if(null!==t.attributeOldValue&&n)if("class"==n.key){const e=mr(n.value);for(const t of e)a.removeClass(t,s)}else if("style"==n.key){const e=Object.keys(n.value);for(const t of e)a.removeStyle(t,s)}else a.removeAttribute(n.key,s);if(null!==t.attributeNewValue&&i)if("class"==i.key){const e=mr(i.value);for(const t of e)a.addClass(t,s)}else if("style"==i.key){const e=Object.keys(i.value);for(const t of e)a.setStyle(t,i.value[t],s)}else a.setAttribute(i.key,i.value,s)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=ac(e.view,"ui");return o=>{var n;o.on(`addMarker:${e.model}`,(n=t,(e,t,o)=>{t.isOpening=!0;const r=n(t,o);t.isOpening=!1;const i=n(t,o);if(!r||!i)return;const s=t.markerRange;if(s.isCollapsed&&!o.consumable.consume(s,e.name))return;for(const t of s)if(!o.consumable.consume(t.item,e.name))return;const a=o.mapper,l=o.writer;l.insert(a.toViewPosition(s.start),r),o.mapper.bindElementToMarker(r,t.markerName),s.isCollapsed||(l.insert(a.toViewPosition(s.end),i),o.mapper.bindElementToMarker(i,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${e.model}`,((e,t,o)=>{const n=o.mapper.markerNameToElements(t.markerName);if(n){for(const e of n)o.mapper.unbindElementFromMarkerName(e,t.markerName),o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var o;t.on(`addMarker:${e.model}`,(o=e.view,(e,t,n)=>{if(!t.item)return;if(!(t.item instanceof jl||t.item instanceof Yl||t.item.is("$textProxy")))return;const r=dc(o,t,n);if(!r)return;if(!n.consumable.consume(t.item,e.name))return;const i=n.writer,s=rc(i,r),a=i.document.selection;if(t.item instanceof jl||t.item instanceof Yl)i.wrap(a.getFirstRange(),s);else{const e=n.mapper.toViewRange(t.range),o=i.wrap(e,s);for(const e of o.getItems())if(e.is("attributeElement")&&e.isSimilar(s)){n.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,o,n)=>{if(!o.item)return;if(!(o.item instanceof xl))return;const r=dc(e,o,n);if(!r)return;if(!n.consumable.test(o.item,t.name))return;const i=n.mapper.toViewElement(o.item);if(i&&i.getCustomProperty("addHighlight")){n.consumable.consume(o.item,t.name);for(const e of zl._createIn(o.item))n.consumable.consume(e.item,t.name);i.getCustomProperty("addHighlight")(i,r,n.writer),n.mapper.bindElementToMarker(i,o.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,o,n)=>{if(o.markerRange.isCollapsed)return;const r=dc(e,o,n);if(!r)return;const i=rc(n.writer,r),s=n.mapper.markerNameToElements(o.markerName);if(s){for(const e of s)if(n.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("attributeElement"))n.writer.unwrap(n.writer.createRangeOn(e),i);else{e.getCustomProperty("removeHighlight")(e,r.id,n.writer)}n.writer.clearClonedElementsGroup(o.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){e=oc(e);const t=e.model;let o=e.view;o||(o=o=>({group:t,name:o.substr(e.model.length+1)}));return n=>{var r;n.on(`addMarker:${t}`,(r=o,(e,t,o)=>{const n=r(t.markerName,o);if(!n)return;const i=t.markerRange;o.consumable.consume(i,e.name)&&(ic(i,!1,o,t,n),ic(i,!0,o,t,n),e.stop())}),{priority:e.converterPriority||"normal"}),n.on(`removeMarker:${t}`,function(e){return(t,o,n)=>{const r=e(o.markerName,n);if(!r)return;const i=n.mapper.markerNameToElements(o.markerName);if(i){for(const e of i)n.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("containerElement")?(s(`data-${r.group}-start-before`,e),s(`data-${r.group}-start-after`,e),s(`data-${r.group}-end-before`,e),s(`data-${r.group}-end-after`,e)):n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(o.markerName),t.stop()}function s(e,t){if(t.hasAttribute(e)){const o=new Set(t.getAttribute(e).split(","));o.delete(r.name),0==o.size?n.writer.removeAttribute(e,t):n.writer.setAttribute(e,Array.from(o).join(","),t)}}}}(o),{priority:e.converterPriority||"normal"})}}(e))}}function rc(e,t){const o=e.createAttributeElement("span",t.attributes);return t.classes&&o._addClass(t.classes),"number"==typeof t.priority&&(o._priority=t.priority),o._id=t.id,o}function ic(e,t,o,n,r){const i=t?e.start:e.end,s=i.nodeAfter&&i.nodeAfter.is("element")?i.nodeAfter:null,a=i.nodeBefore&&i.nodeBefore.is("element")?i.nodeBefore:null;if(s||a){let e,i;t&&s||!t&&!a?(e=s,i=!0):(e=a,i=!1);const l=o.mapper.toViewElement(e);if(l)return void function(e,t,o,n,r,i){const s=`data-${i.group}-${t?"start":"end"}-${o?"before":"after"}`,a=e.hasAttribute(s)?e.getAttribute(s).split(","):[];a.unshift(i.name),n.writer.setAttribute(s,a.join(","),e),n.mapper.bindElementToMarker(e,r.markerName)}(l,t,i,o,n,r)}!function(e,t,o,n,r){const i=`${r.group}-${t?"start":"end"}`,s=r.name?{name:r.name}:null,a=o.writer.createUIElement(i,s);o.writer.insert(e,a),o.mapper.bindElementToMarker(a,n.markerName)}(o.mapper.toViewPosition(i),t,o,n,r)}function sc(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function ac(e,t){return"function"==typeof e?e:(o,n)=>function(e,t,o){"string"==typeof e&&(e={name:e});let n;const r=t.writer,i=Object.assign({},e.attributes);if("container"==o)n=r.createContainerElement(e.name,i);else if("attribute"==o){const t={priority:e.priority||Ss.DEFAULT_PRIORITY};n=r.createAttributeElement(e.name,i,t)}else n=r.createUIElement(e.name,i);if(e.styles){const t=Object.keys(e.styles);for(const o of t)r.setStyle(o,e.styles[o],n)}if(e.classes){const t=e.classes;if("string"==typeof t)r.addClass(t,n);else for(const e of t)r.addClass(e,n)}return n}(e,n,t)}function lc(e){return e.model.values?(t,o,n)=>{const r=e.view[t];return r?r(t,o,n):null}:e.view}function cc(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function dc(e,t,o){const n="function"==typeof e?e(t,o):e;return n?(n.priority||(n.priority=10),n.id||(n.id=t.markerName),n):null}function uc(e){const t=function(e){return(t,o)=>{if(!t.is("element",e.name))return!1;if("attribute"==o.type){if(e.attributes.includes(o.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,o)=>{const n=[];o.reconvertedElements||(o.reconvertedElements=new Set);for(const e of o.changes){const r="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(r&&t(r,e)){if(!o.reconvertedElements.has(r)){o.reconvertedElements.add(r);const e=Sl._createBefore(r);let t=n.length;for(let o=n.length-1;o>=0;o--){const r=n[o],i=("attribute"==r.type?r.range.start:r.position).compareWith(e);if("before"==i||"remove"==r.type&&"same"==i)break;t=o}n.splice(t,0,{type:"remove",name:r.name,position:e,length:1},{type:"reinsert",name:r.name,position:e,length:1})}}else n.push(e)}o.changes=n}}function hc(e){return(t,o,n={})=>{const r=["insert"];for(const o of e.attributes)t.hasAttribute(o)&&r.push(`attribute:${o}`);return!!r.every((e=>o.test(t,e)))&&(n.preflight||r.forEach((e=>o.consume(t,e))),!0)}}function pc(e,t,o,n){for(const r of t)gc(e.root,r,o,n)||o.convertItem(r)}function gc(e,t,o,n){const{writer:r,mapper:i}=o;if(!n.reconversion)return!1;const s=i.toViewElement(t);return!(!s||s.root==e)&&(!!o.canReuseView(s)&&(r.move(r.createRangeOn(s),i.toViewPosition(Sl._createBefore(t))),!0))}function mc(e,t,{preflight:o}={}){return o?t.test(e,"insert"):t.consume(e,"insert")}function fc(e){const{schema:t,document:o}=e.model;for(const n of o.getRootNames()){const r=o.getRoot(n);if(r.isEmpty&&!t.checkChild(r,"$text")&&t.checkChild(r,"paragraph"))return e.insertElement("paragraph",r),!0}return!1}function bc(e,t,o){const n=o.createContext(e);return!!o.checkChild(n,"paragraph")&&!!o.checkChild(n.push("paragraph"),t)}function kc(e,t){const o=t.createElement("paragraph");return t.insert(o,e),t.createPositionAt(o,0)}class wc extends tc{elementToElement(e){return this.add(_c(e))}elementToAttribute(e){return this.add(function(e){e=oc(e),Cc(e);const t=vc(e,!1),o=yc(e.view),n=o?`element:${o}`:"element";return o=>{o.on(n,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=oc(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let o;if("class"==t||"style"==t){o={["class"==t?"classes":"styles"]:e.view.value}}else{o={attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}}}e.view.name&&(o.name=e.view.name);return e.view=o,t}(e));Cc(e,t);const o=vc(e,!0);return t=>{t.on("element",o,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,o)=>{const n="string"==typeof e?e:e(t,o);return o.writer.createElement("$marker",{"data-name":n})}}(e.model);return _c({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){e=oc(e),e.model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},o=Ac(xc(t,"start")),n=Ac(xc(t,"end"));return r=>{r.on(`element:${e.view}-start`,o,{priority:e.converterPriority||"normal"}),r.on(`element:${e.view}-end`,n,{priority:e.converterPriority||"normal"});const i=p.get("low"),s=p.get("highest"),a=p.get(e.converterPriority)/s;r.on("element",function(e){return(t,o,n)=>{const r=`data-${e.view}`;function i(t,r){for(const i of r){const r=e.model(i,n),s=n.writer.createElement("$marker",{"data-name":r});n.writer.insert(s,t),o.modelCursor.isEqual(t)?o.modelCursor=o.modelCursor.getShiftedBy(1):o.modelCursor=o.modelCursor._getTransformedByInsertion(t,1),o.modelRange=o.modelRange._getTransformedByInsertion(t,1)[0]}}(n.consumable.test(o.viewItem,{attributes:r+"-end-after"})||n.consumable.test(o.viewItem,{attributes:r+"-start-after"})||n.consumable.test(o.viewItem,{attributes:r+"-end-before"})||n.consumable.test(o.viewItem,{attributes:r+"-start-before"}))&&(o.modelRange||Object.assign(o,n.convertChildren(o.viewItem,o.modelCursor)),n.consumable.consume(o.viewItem,{attributes:r+"-end-after"})&&i(o.modelRange.end,o.viewItem.getAttribute(r+"-end-after").split(",")),n.consumable.consume(o.viewItem,{attributes:r+"-start-after"})&&i(o.modelRange.end,o.viewItem.getAttribute(r+"-start-after").split(",")),n.consumable.consume(o.viewItem,{attributes:r+"-end-before"})&&i(o.modelRange.start,o.viewItem.getAttribute(r+"-end-before").split(",")),n.consumable.consume(o.viewItem,{attributes:r+"-start-before"})&&i(o.modelRange.start,o.viewItem.getAttribute(r+"-start-before").split(",")))}}(t),{priority:i+a})}}(e))}}function _c(e){const t=Ac(e=oc(e)),o=yc(e.view),n=o?`element:${o}`:"element";return o=>{o.on(n,t,{priority:e.converterPriority||"normal"})}}function yc(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function Ac(e){const t=new si(e.view);return(o,n,r)=>{const i=t.match(n.viewItem);if(!i)return;const s=i.match;if(s.name=!0,!r.consumable.test(n.viewItem,s))return;const a=function(e,t,o){return e instanceof Function?e(t,o):o.writer.createElement(e)}(e.model,n.viewItem,r);a&&r.safeInsert(a,n.modelCursor)&&(r.consumable.consume(n.viewItem,s),r.convertChildren(n.viewItem,a),r.updateConversionResult(a,n))}}function Cc(e,t=null){const o=null===t||(e=>e.getAttribute(t)),n="object"!=typeof e.model?e.model:e.model.key,r="object"!=typeof e.model||void 0===e.model.value?o:e.model.value;e.model={key:n,value:r}}function vc(e,t){const o=new si(e.view);return(n,r,i)=>{if(!r.modelRange&&t)return;const s=o.match(r.viewItem);if(!s)return;if(!function(e,t){const o="function"==typeof e?e(t):e;if("object"==typeof o&&!yc(o))return!1;return!o.classes&&!o.attributes&&!o.styles}(e.view,r.viewItem)?delete s.match.name:s.match.name=!0,!i.consumable.test(r.viewItem,s.match))return;const a=e.model.key,l="function"==typeof e.model.value?e.model.value(r.viewItem,i):e.model.value;if(null===l)return;r.modelRange||Object.assign(r,i.convertChildren(r.viewItem,r.modelCursor));const c=function(e,t,o,n){let r=!1;for(const i of Array.from(e.getItems({shallow:o})))n.schema.checkAttribute(i,t.key)&&(r=!0,i.hasAttribute(t.key)||n.writer.setAttribute(t.key,t.value,i));return r}(r.modelRange,{key:a,value:l},t,i);c&&(i.consumable.test(r.viewItem,{name:!0})&&(s.match.name=!0),i.consumable.consume(r.viewItem,s.match))}}function xc(e,t){return{view:`${e.view}-${t}`,model:(t,o)=>{const n=t.getAttribute("name"),r=e.model(n,o);return o.writer.createElement("$marker",{"data-name":r})}}}function Ec(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.selection,n=t.schema,r=[];let i=!1;for(const e of o.getRanges()){const t=Dc(e,n);t&&!t.isEqual(e)?(r.push(t),i=!0):r.push(e)}i&&e.setSelection(function(e){const t=[...e],o=new Set;let n=1;for(;n!o.has(t)))}(r),{backward:o.isBackward});return!1}(t,e)))}function Dc(e,t){return e.isCollapsed?function(e,t){const o=e.start,n=t.getNearestSelectionRange(o);if(!n){const e=o.getAncestors().reverse().find((e=>t.isObject(e)));return e?zl._createOn(e):null}if(!n.isCollapsed)return n;const r=n.start;if(o.isEqual(r))return null;return new zl(r)}(e,t):function(e,t){const{start:o,end:n}=e,r=t.checkChild(o,"$text"),i=t.checkChild(n,"$text"),s=t.getLimitElement(o),a=t.getLimitElement(n);if(s===a){if(r&&i)return null;if(function(e,t,o){const n=e.nodeAfter&&!o.isLimit(e.nodeAfter)||o.checkChild(e,"$text"),r=t.nodeBefore&&!o.isLimit(t.nodeBefore)||o.checkChild(t,"$text");return n||r}(o,n,t)){const e=o.nodeAfter&&t.isSelectable(o.nodeAfter)?null:t.getNearestSelectionRange(o,"forward"),r=n.nodeBefore&&t.isSelectable(n.nodeBefore)?null:t.getNearestSelectionRange(n,"backward"),i=e?e.start:o,s=r?r.end:n;return new zl(i,s)}}const l=s&&!s.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const e=o.nodeAfter&&n.nodeBefore&&o.nodeAfter.parent===n.nodeBefore.parent,r=l&&(!e||!Tc(o.nodeAfter,t)),i=c&&(!e||!Tc(n.nodeBefore,t));let d=o,u=n;return r&&(d=Sl._createBefore(Sc(s,t))),i&&(u=Sl._createAfter(Sc(a,t))),new zl(d,u)}return null}(e,t)}function Sc(e,t){let o=e,n=o;for(;t.isLimit(n)&&n.parent;)o=n,n=n.parent;return o}function Tc(e,t){return e&&t.isSelectable(e)}class Bc extends(H()){constructor(e,t){super(),this.model=e,this.view=new wl(t),this.mapper=new Ml,this.downcastDispatcher=new Ol({mapper:this.mapper,schema:e.schema});const o=this.model.document,r=o.selection,i=this.model.markers;var s,a,l;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(o,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(o.differ,i,e),this.downcastDispatcher.convertSelection(r,i,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(o,n)=>{const r=n.newSelection,i=[];for(const e of r.getRanges())i.push(t.toModelRange(e));const s=e.createSelection(i,{backward:r.isBackward});s.isEqual(e.document.selection)||e.change((e=>{e.setSelection(s)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(s=this.mapper,a=this.model.schema,l=this.view,(e,t)=>{if(!l.document.isComposing||n.isAndroid)for(let e=0;e{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer,r=o.mapper.toViewPosition(t.range.start),i=n.createText(t.item.data);n.insert(r,i)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,o)=>{const n=o.mapper.toViewPosition(t.position),r=t.position.getShiftedBy(t.length),i=o.mapper.toViewPosition(r,{isPhantom:!0}),s=o.writer.createRange(n,i),a=o.writer.remove(s.getTrimmed());for(const e of o.writer.createRangeIn(a).getItems())o.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const n=o.writer,r=n.document.selection;for(const e of r.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&o.writer.mergeAttributes(e.start);n.setSelection(null)}),{priority:"high"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const n=t.selection;if(n.isCollapsed)return;if(!o.consumable.consume(n,"selection"))return;const r=[];for(const e of n.getRanges())r.push(o.mapper.toViewRange(e));o.writer.setSelection(r,{backward:n.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const n=t.selection;if(!n.isCollapsed)return;if(!o.consumable.consume(n,"selection"))return;const r=o.writer,i=n.getFirstPosition(),s=o.mapper.toViewPosition(i),a=r.breakAttributes(s);r.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new ps(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,o=this.model.markers.get(t);if(!o)throw new f("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(o)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class Ic{constructor(){this._consumables=new Map}add(e,t){let o;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?o=this._consumables.get(e):(o=new Rc(e),this._consumables.set(e,o)),o.add(t))}test(e,t){const o=this._consumables.get(e);return void 0===o?null:e.is("$text")||e.is("documentFragment")?o:o.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const o=this._consumables.get(e);void 0!==o&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):o.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},o=e.getAttributeKeys();for(const e of o)"style"!=e&&"class"!=e&&t.attributes.push(e);const n=e.getClassNames();for(const e of n)t.classes.push(e);const r=e.getStyleNames();for(const e of r)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new Ic),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,Ic.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const o of e.getChildren())t=Ic.createFrom(o,t);return t}}const Pc=["attributes","classes","styles"];class Rc{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of Pc)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of Pc)if(t in e){const o=this._test(t,e[t]);if(!0!==o)return o}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of Pc)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of Pc)t in e&&this._revert(t,e[t])}_add(e,t){const o=ue(t)?t:[t],n=this._consumables[e];for(const t of o){if("attributes"===e&&("class"===t||"style"===t))throw new f("viewconsumable-invalid-attribute",this);if(n.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!0)}}_test(e,t){const o=ue(t)?t:[t],n=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){const e=n.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",o=this._test(e,[...this._consumables[e].keys()]);if(!0!==o)return o}return!0}_consume(e,t){const o=ue(t)?t:[t],n=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){if(n.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const o=ue(t)?t:[t],n=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){!1===n.get(t)&&n.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class zc extends(H()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new Mc(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new Mc(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new f("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new f("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const o=this.getDefinition(e.last);return!!o&&o.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof Sl){const t=e.nodeBefore,o=e.nodeAfter;if(!(t instanceof xl))throw new f("schema-check-merge-no-element-before",this);if(!(o instanceof xl))throw new f("schema-check-merge-no-element-after",this);return this.checkMerge(t,o)}for(const o of t.getChildren())if(!this.checkChild(e,o))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[o,n])=>{if(!n)return;const r=e(o,n);"boolean"==typeof r&&(t.stop(),t.return=r)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[o,n])=>{const r=e(o,n);"boolean"==typeof r&&(t.stop(),t.return=r)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof Sl)t=e.parent;else{t=(e instanceof zl?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const o=t.getCommonAncestor();return e?e.getCommonAncestor(o,{includeSelf:!0}):o}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const o=[...e.getFirstPosition().getAncestors(),new Cl("",e.getAttributes())];return this.checkAttribute(o,t)}{const o=e.getRanges();for(const e of o)for(const o of e)if(this.checkAttribute(o.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const o of e)yield*this._getValidRangesForRange(o,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new zl(e);let o,n;const r=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(o=new El({boundaries:zl._createIn(r),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(n=new El({boundaries:zl._createIn(r),startPosition:e}));for(const e of function*(e,t){let o=!1;for(;!o;){if(o=!0,e){const t=e.next();t.done||(o=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(o=!1,yield{walker:t,value:e.value})}}}(o,n)){const t=e.walker==o?"elementEnd":"elementStart",n=e.value;if(n.type==t&&this.isObject(n.item))return zl._createOn(n.item);if(this.checkChild(n.nextPosition,"$text"))return new zl(n.nextPosition)}return null}findAllowedParent(e,t){let o=e.parent;for(;o;){if(this.checkChild(o,t))return o;if(this.isLimit(o))return null;o=o.parent}return null}setAllowedAttributes(e,t,o){const n=o.model;for(const[r,i]of Object.entries(t))n.schema.checkAttribute(e,r)&&o.setAttribute(r,i,e)}removeDisallowedAttributes(e,t){for(const o of e)if(o.is("$text"))Kc(this,o,t);else{const e=zl._createIn(o).getPositions();for(const o of e){Kc(this,o.nodeBefore||o.parent,t)}}}getAttributesWithProperty(e,t,o){const n={};for(const[r,i]of e.getAttributes()){const e=this.getAttributeProperties(r);void 0!==e[t]&&(void 0!==o&&o!==e[t]||(n[r]=i))}return n}createContext(e){return new Mc(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,o=Object.keys(t);for(const n of o)e[n]=Nc(t[n],n);for(const t of o)Fc(e,t);for(const t of o)Oc(e,t);for(const t of o)Vc(e,t);for(const t of o)Lc(e,t),jc(e,t);for(const t of o)qc(e,t),Hc(e,t),Wc(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,o=t.length-1){const n=t.getItem(o);if(e.allowIn.includes(n.name)){if(0==o)return!0;{const e=this.getDefinition(n);return this._checkContextMatch(e,t,o-1)}}return!1}*_getValidRangesForRange(e,t){let o=e.start,n=e.start;for(const r of e.getItems({shallow:!0}))r.is("element")&&(yield*this._getValidRangesForRange(zl._createIn(r),t)),this.checkAttribute(r,t)||(o.isEqual(n)||(yield new zl(o,n)),o=Sl._createAfter(r)),n=Sl._createAfter(r);o.isEqual(n)||(yield new zl(o,n))}}class Mc{constructor(e){if(e instanceof Mc)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(Gc)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Mc([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Nc(e,t){const o={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const o of e){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const n of e)t[n]=!!o[n]}}(e,o),$c(e,o,"allowIn"),$c(e,o,"allowContentOf"),$c(e,o,"allowWhere"),$c(e,o,"allowAttributes"),$c(e,o,"allowAttributesOf"),$c(e,o,"allowChildren"),$c(e,o,"inheritTypesFrom"),function(e,t){for(const o of e){const e=o.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,o),o}function Fc(e,t){const o=e[t];for(const n of o.allowChildren){const o=e[n];o&&o.allowIn.push(t)}o.allowChildren.length=0}function Oc(e,t){for(const o of e[t].allowContentOf)if(e[o]){Uc(e,o).forEach((e=>{e.allowIn.push(t)}))}delete e[t].allowContentOf}function Vc(e,t){for(const o of e[t].allowWhere){const n=e[o];if(n){const o=n.allowIn;e[t].allowIn.push(...o)}}delete e[t].allowWhere}function Lc(e,t){for(const o of e[t].allowAttributesOf){const n=e[o];if(n){const o=n.allowAttributes;e[t].allowAttributes.push(...o)}}delete e[t].allowAttributesOf}function jc(e,t){const o=e[t];for(const t of o.inheritTypesFrom){const n=e[t];if(n){const e=Object.keys(n).filter((e=>e.startsWith("is")));for(const t of e)t in o||(o[t]=n[t])}}delete o.inheritTypesFrom}function qc(e,t){const o=e[t],n=o.allowIn.filter((t=>e[t]));o.allowIn=Array.from(new Set(n))}function Hc(e,t){const o=e[t];for(const n of o.allowIn){e[n].allowChildren.push(t)}}function Wc(e,t){const o=e[t];o.allowAttributes=Array.from(new Set(o.allowAttributes))}function $c(e,t,o){for(const n of e){const e=n[o];"string"==typeof e?t[o].push(e):Array.isArray(e)&&t[o].push(...e)}}function Uc(e,t){const o=e[t];return(n=e,Object.keys(n).map((e=>n[e]))).filter((e=>e.allowIn.includes(o.name)));var n}function Gc(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function Kc(e,t,o){for(const n of t.getAttributeKeys())e.checkAttribute(t,n)||o.removeAttribute(n,t)}class Zc extends(S()){constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,o=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let o;for(const n of new Mc(e)){const e={};for(const t of n.getAttributeKeys())e[t]=n.getAttribute(t);const r=t.createElement(n.name,e);o&&t.insert(r,o),o=Sl._createAt(r,0)}return o}(o,t),this.conversionApi.writer=t,this.conversionApi.consumable=Ic.createFrom(e),this.conversionApi.store={};const{modelRange:n}=this._convertItem(e,this._modelCursor),r=t.createDocumentFragment();if(n){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,r);r.markers=function(e,t){const o=new Set,n=new Map,r=zl._createIn(e).getItems();for(const e of r)e.is("element","$marker")&&o.add(e);for(const e of o){const o=e.getAttribute("data-name"),r=t.createPositionBefore(e);n.has(o)?n.get(o).end=r.clone():n.set(o,new zl(r.clone())),t.remove(e)}return n}(r,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,r}_convertItem(e,t){const o={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,o,this.conversionApi):e.is("$text")?this.fire("text",o,this.conversionApi):this.fire("documentFragment",o,this.conversionApi),o.modelRange&&!(o.modelRange instanceof zl))throw new f("view-conversion-dispatcher-incorrect-result",this);return{modelRange:o.modelRange,modelCursor:o.modelCursor}}_convertChildren(e,t){let o=t.is("position")?t:Sl._createAt(t,0);const n=new zl(o);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,o);e.modelRange instanceof zl&&(n.end=e.modelRange.end,o=e.modelCursor)}return{modelRange:n,modelCursor:o}}_safeInsert(e,t){const o=this._splitToAllowedParent(e,t);return!!o&&(this.conversionApi.writer.insert(e,o.position),!0)}_updateConversionResult(e,t){const o=this._getSplitParts(e),n=this.conversionApi.writer;t.modelRange||(t.modelRange=n.createRange(n.createPositionBefore(e),n.createPositionAfter(o[o.length-1])));const r=this._cursorParents.get(e);t.modelCursor=r?n.createPositionAt(r,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:o,writer:n}=this.conversionApi;let r=o.findAllowedParent(t,e);if(r){if(r===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(r)&&(r=null)}if(!r)return bc(t,e,o)?{position:kc(t,n)}:null;const i=this.conversionApi.writer.split(t,r),s=[];for(const e of i.range.getWalker())if("elementEnd"==e.type)s.push(e.item);else{const t=s.pop(),o=e.item;this._registerSplitPair(t,o)}const a=i.range.end.parent;return this._cursorParents.set(e,a),{position:i.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const o=this._splitParts.get(e);this._splitParts.set(t,o),o.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class Jc{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class Qc{constructor(e){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new ka(e,{renderingMode:"data"}),this.htmlWriter=new Jc}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`${e}`);const t=this.domParser.parseFromString(e,"text/html"),o=t.createDocumentFragment(),n=t.body.childNodes;for(;n.length>0;)o.appendChild(n[0]);return o}}class Yc extends(S()){constructor(e,t){super(),this.model=e,this.mapper=new Ml,this.downcastDispatcher=new Ol({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer,r=o.mapper.toViewPosition(t.range.start),i=n.createText(t.item.data);n.insert(r,i)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new Zc({schema:e.schema}),this.viewDocument=new Ds(t),this.stylesProcessor=t,this.htmlProcessor=new Qc(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Vs(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:o,consumable:n,writer:r})=>{let i=t.modelCursor;if(!n.test(t.viewItem))return;if(!o.checkChild(i,"$text")){if(!bc(i,"$text",o))return;if(0==t.viewItem.data.trim().length)return;const e=i.nodeBefore;i=kc(i,r),e&&e.is("element","$marker")&&(r.move(r.createRangeOn(e),i),i=r.createPositionAfter(e))}n.consume(t.viewItem);const s=r.createText(t.viewItem.data);r.insert(s,i),t.modelRange=r.createRange(i,i.getShiftedBy(s.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}}),{priority:"lowest"}),H().prototype.decorate.call(this,"init"),H().prototype.decorate.call(this,"set"),H().prototype.decorate.call(this,"get"),H().prototype.decorate.call(this,"toView"),H().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},fc)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:o="empty"}=e;if(!this._checkIfRootsExists([t]))throw new f("datacontroller-get-non-existent-root",this);const n=this.model.document.getRoot(t);return n.isAttached()||b("datacontroller-get-detached-root",this),"empty"!==o||this.model.hasContent(n,{ignoreWhitespaces:!0})?this.stringify(n,e):""}stringify(e,t={}){const o=this.toView(e,t);return this.processor.toData(o)}toView(e,t={}){const o=this.viewDocument,n=this._viewWriter;this.mapper.clearBindings();const r=zl._createIn(e),i=new Os(o);this.mapper.bindElements(e,i);const s=e.is("documentFragment")?e.markers:function(e){const t=[],o=e.root.document;if(!o)return new Map;const n=zl._createIn(e);for(const e of o.model.markers){const o=e.getRange(),r=o.isCollapsed,i=o.start.isEqual(n.start)||o.end.isEqual(n.end);if(r&&i)t.push([e.name,o]);else{const r=n.getIntersection(o);r&&t.push([e.name,r])}}return t.sort((([e,t],[o,n])=>{if("after"!==t.end.compareWith(n.start))return 1;if("before"!==t.start.compareWith(n.end))return-1;switch(t.start.compareWith(n.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(n.end)){case"before":return 1;case"after":return-1;default:return o.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(r,s,n,t),i}init(e){if(this.model.document.version)throw new f("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new f("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const o of Object.keys(t)){const n=this.model.document.getRoot(o);e.insert(this.parse(t[o],n),n,0)}})),Promise.resolve()}set(e,t={}){let o={};if("string"==typeof e?o.main=e:o=e,!this._checkIfRootsExists(Object.keys(o)))throw new f("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(o)){const n=this.model.document.getRoot(t);e.remove(e.createRangeIn(n)),e.insert(this.parse(o[t],n),n,0)}}))}parse(e,t="$root"){const o=this.processor.toView(e);return this.toModel(o,t)}toModel(e,t="$root"){return this.model.change((o=>this.upcastDispatcher.convert(e,o,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class Xc{constructor(e,t){this._helpers=new Map,this._downcast=mr(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=mr(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const o=this._downcast.includes(t);if(!this._upcast.includes(t)&&!o)throw new f("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:o})}for(e){if(!this._helpers.has(e))throw new f("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:o}of ed(e))this.for("upcast").elementToElement({model:t,view:o,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:o}of ed(e))this.for("upcast").elementToAttribute({view:o,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:o}of ed(e))this.for("upcast").attributeToAttribute({view:o,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:o}){if(this._helpers.has(e))throw new f("conversion-group-exists",this);const n=o?new nc(t):new wc(t);this._helpers.set(e,n)}}function*ed(e){if(e.model.values)for(const t of e.model.values){const o={key:e.model.key,value:t},n=e.view[t],r=e.upcastAlso?e.upcastAlso[t]:void 0;yield*td(o,n,r)}else yield*td(e.model,e.view,e.upcastAlso)}function*td(e,t,o){if(yield{model:e,view:t},o)for(const t of mr(o))yield{model:e,view:t}}class od{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function nd(e,t){const o=sd(t),n=o.reduce(((e,t)=>e+t.offsetSize),0),r=e.parent;ld(e);const i=e.index;return r._insertChild(i,o),ad(r,i+o.length),ad(r,i),new zl(e,e.getShiftedBy(n))}function rd(e){if(!e.isFlat)throw new f("operation-utils-remove-range-not-flat",this);const t=e.start.parent;ld(e.start),ld(e.end);const o=t._removeChildren(e.start.index,e.end.index-e.start.index);return ad(t,e.start.index),o}function id(e,t){if(!e.isFlat)throw new f("operation-utils-move-range-not-flat",this);const o=rd(e);return nd(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),o)}function sd(e){const t=[];!function e(o){if("string"==typeof o)t.push(new Cl(o));else if(o instanceof vl)t.push(new Cl(o.data,o.getAttributes()));else if(o instanceof yl)t.push(o);else if(Q(o))for(const t of o)e(t)}(e);for(let e=1;ee.maxOffset)throw new f("move-operation-nodes-do-not-exist",this);if(e===t&&o=o&&this.targetPosition.path[e]e._clone(!0)))),t=new ud(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new Sl(e,[0]);return new dd(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0)))),nd(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const o=[];for(const t of e.nodes)t.name?o.push(xl.fromJSON(t)):o.push(Cl.fromJSON(t));const n=new ud(Sl.fromJSON(e.position,t),o,e.baseVersion);return n.shouldReceiveAttributes=e.shouldReceiveAttributes,n}}class hd extends od{constructor(e,t,o,n,r){super(r),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=o,this.graveyardPosition=n?n.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new Sl(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new zl(this.splitPosition,e)}get affectedSelectable(){const e=[zl._createFromPositionAndShift(this.splitPosition,0),zl._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(zl._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new hd(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new Sl(e,[0]);return new pd(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const n=e.range.getDifference(t.range).map((t=>new fd(t,e.key,e.oldValue,e.newValue,0))),r=e.range.getIntersection(t.range);return r&&o.aIsStrong&&n.push(new fd(r,t.key,t.newValue,e.newValue,0)),0==n.length?[new bd(0)]:n}return[e]})),vd(fd,ud,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const o=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new fd(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const n=Id(t,e.key,e.oldValue);n&&o.unshift(n)}return o}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),vd(fd,pd,((e,t)=>{const o=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&o.push(zl._createFromPositionAndShift(t.graveyardPosition,1));const n=e.range._getTransformedByMergeOperation(t);return n.isCollapsed||o.push(n),o.map((t=>new fd(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),vd(fd,dd,((e,t)=>{const o=function(e,t){const o=zl._createFromPositionAndShift(t.sourcePosition,t.howMany);let n=null,r=[];o.containsRange(e,!0)?n=e:e.start.hasSameParentAs(o.start)?(r=e.getDifference(o),n=e.getIntersection(o)):r=[e];const i=[];for(let e of r){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const o=t.getMovedRangeStart(),n=e.start.hasSameParentAs(o),r=e._getTransformedByInsertion(o,t.howMany,n);i.push(...r)}n&&i.push(n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return i}(e.range,t);return o.map((t=>new fd(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),vd(fd,hd,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const o=e.clone();return o.range=new zl(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,o]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),vd(ud,fd,((e,t)=>{const o=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const n=Id(e,t.key,t.newValue);n&&o.push(n)}return o})),vd(ud,ud,((e,t,o)=>(e.position.isEqual(t.position)&&o.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),vd(ud,dd,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),vd(ud,hd,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),vd(ud,pd,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),vd(gd,ud,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),vd(gd,gd,((e,t,o)=>{if(e.name==t.name){if(!o.aIsStrong)return[new bd(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),vd(gd,pd,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),vd(gd,dd,((e,t,o)=>{if(e.oldRange&&(e.oldRange=zl._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(o.abRelation){const n=zl._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=n.end,e.newRange.start.path=o.abRelation.path,[e];if("right"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=n.start,e.newRange.end.path=o.abRelation.path,[e]}e.newRange=zl._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),vd(gd,hd,((e,t,o)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(o.abRelation){const n=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&o.abRelation.wasStartBeforeMergedElement?e.newRange.start=Sl._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!o.abRelation.wasInLeftElement&&(e.newRange.start=Sl._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasInRightElement?e.newRange.end=Sl._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasEndBeforeMergedElement?e.newRange.end=Sl._createAt(t.insertionPosition):e.newRange.end=n.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),vd(pd,ud,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),vd(pd,pd,((e,t,o)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(o.bWasUndone){const o=t.graveyardPosition.path.slice();return o.push(0),e.sourcePosition=new Sl(t.graveyardPosition.root,o),e.howMany=0,[e]}return[new bd(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!o.bWasUndone&&"splitAtSource"!=o.abRelation){const n="$graveyard"==e.targetPosition.root.rootName,r="$graveyard"==t.targetPosition.root.rootName;if(r&&!n||!(n&&!r)&&o.aIsStrong){const o=t.targetPosition._getTransformedByMergeOperation(t),n=e.targetPosition._getTransformedByMergeOperation(t);return[new dd(o,e.howMany,n,0)]}return[new bd(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&o.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),vd(pd,dd,((e,t,o)=>{const n=zl._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!o.bWasUndone&&!o.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition)?[new bd(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),vd(pd,hd,((e,t,o)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const n=0!=t.howMany,r=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(n||r||"mergeTargetNotMoved"==o.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==o.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==o.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),vd(dd,ud,((e,t)=>{const o=zl._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),vd(dd,dd,((e,t,o)=>{const n=zl._createFromPositionAndShift(e.sourcePosition,e.howMany),r=zl._createFromPositionAndShift(t.sourcePosition,t.howMany);let i,s=o.aIsStrong,a=!o.aIsStrong;if("insertBefore"==o.abRelation||"insertAfter"==o.baRelation?a=!0:"insertAfter"!=o.abRelation&&"insertBefore"!=o.baRelation||(a=!1),i=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Pd(e,t)&&Pd(t,e))return[t.getReversed()];if(n.containsPosition(t.targetPosition)&&n.containsRange(r,!0))return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Rd([n],i);if(r.containsPosition(e.targetPosition)&&r.containsRange(n,!0))return n.start=n.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.end=n.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Rd([n],i);const l=J(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Rd([n],i);"remove"!=e.type||"remove"==t.type||o.aWasUndone||o.forceWeakRemove?"remove"==e.type||"remove"!=t.type||o.bWasUndone||o.forceWeakRemove||(s=!1):s=!0;const c=[],d=n.getDifference(r);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const o="same"==J(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,o);c.push(...n)}const u=n.getIntersection(r);return null!==u&&s&&(u.start=u.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),u.end=u.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(u):1==c.length?r.start.isBefore(n.start)||r.start.isEqual(n.start)?c.unshift(u):c.push(u):c.splice(1,0,u)),0===c.length?[new bd(e.baseVersion)]:Rd(c,i)})),vd(dd,hd,((e,t,o)=>{let n=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=o.abRelation||(n=e.targetPosition._getTransformedBySplitOperation(t));const r=zl._createFromPositionAndShift(e.sourcePosition,e.howMany);if(r.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=n,[e];if(r.start.hasSameParentAs(t.splitPosition)&&r.containsPosition(t.splitPosition)){let e=new zl(t.splitPosition,r.end);e=e._getTransformedBySplitOperation(t);return Rd([new zl(r.start,t.splitPosition),e],n)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==o.abRelation&&(n=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==o.abRelation&&(n=e.targetPosition);const i=[r._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const n=r.start.isEqual(t.graveyardPosition)||r.containsPosition(t.graveyardPosition);e.howMany>1&&n&&!o.aWasUndone&&i.push(zl._createFromPositionAndShift(t.insertionPosition,1))}return Rd(i,n)})),vd(dd,pd,((e,t,o)=>{const n=zl._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition))if("remove"!=e.type||o.forceWeakRemove){if(1==e.howMany)return o.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new bd(0)]}else if(!o.aWasUndone){const o=[];let n=t.graveyardPosition.clone(),r=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(o.push(new dd(e.sourcePosition,e.howMany-1,e.targetPosition,0)),n=n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),r=r._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const i=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),s=new dd(n,1,i,0),a=s.getMovedRangeStart().path.slice();a.push(0);const l=new Sl(s.targetPosition.root,a);r=r._getTransformedByMove(n,i,1);const c=new dd(r,t.howMany,l,0);return o.push(s),o.push(c),o}const r=zl._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=r.start,e.howMany=r.end.offset-r.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),vd(kd,ud,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),vd(kd,pd,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),vd(kd,dd,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),vd(kd,kd,((e,t,o)=>{if(e.position.isEqual(t.position)){if(!o.aIsStrong)return[new bd(0)];e.oldName=t.newName}return[e]})),vd(kd,hd,((e,t)=>{if("same"==J(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new kd(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),vd(wd,wd,((e,t,o)=>{if(e.root===t.root&&e.key===t.key){if(!o.aIsStrong||e.newValue===t.newValue)return[new bd(0)];e.oldValue=t.newValue}return[e]})),vd(_d,_d,((e,t,o)=>e.rootName!==t.rootName||e.isAdd!==t.isAdd||o.bWasUndone?[e]:[new bd(0)])),vd(hd,ud,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!o.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const o=t.graveyardPosition.path.slice();o.push(0);const n=new Sl(t.graveyardPosition.root,o),r=hd.getInsertionPosition(new Sl(t.graveyardPosition.root,o)),i=new hd(n,0,r,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=hd.getInsertionPosition(e.splitPosition),e.graveyardPosition=i.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[i,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=hd.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),vd(hd,dd,((e,t,o)=>{const n=zl._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const r=n.start.isEqual(e.graveyardPosition)||n.containsPosition(e.graveyardPosition);if(!o.bWasUndone&&r){const o=e.splitPosition._getTransformedByMoveOperation(t),n=e.graveyardPosition._getTransformedByMoveOperation(t),r=n.path.slice();r.push(0);const i=new Sl(n.root,r);return[new dd(o,e.howMany,i,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const r=e.splitPosition.isEqual(t.targetPosition);if(r&&("insertAtSource"==o.baRelation||"splitBefore"==o.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=hd.getInsertionPosition(e.splitPosition),[e];if(r&&o.abRelation&&o.abRelation.howMany){const{howMany:t,offset:n}=o.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(n),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const o=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=o,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new bd(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new bd(0)];if("splitBefore"==o.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const n="$graveyard"==e.splitPosition.root.rootName,r="$graveyard"==t.splitPosition.root.rootName;if(r&&!n||!(n&&!r)&&o.aIsStrong){const o=[];return t.howMany&&o.push(new dd(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&o.push(new dd(e.splitPosition,e.howMany,e.moveTargetPosition,0)),o}return[new bd(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==o.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==o.baRelation){const o=t.insertionPosition.path.slice();o.push(0);const n=new Sl(t.insertionPosition.root,o);return[e,new dd(e.insertionPosition,1,n,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset{const o=t[0];o.isDocumentOperation&&Nd.call(this,o)}),{priority:"low"})}function Nd(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}zd.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class Fd{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},b("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:o=!0,isUndo:n=!1,isTyping:r=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=o,this.isUndo=n,this.isTyping=r}get type(){return b("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class Od{constructor(e){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),o=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),o||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=zl._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const o=t.graveyardPosition.parent;this._markInsert(o,t.graveyardPosition.offset,1);const n=t.targetPosition.parent;this._isInInsertedElement(n)||this._markInsert(n,t.targetPosition.offset,e.maxOffset);break}case"detachRoot":case"addRoot":this._bufferRootStateChange(t.rootName,t.isAdd);break;case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,o){const n=this._changedMarkers.get(e);n?(n.newMarkerData=o,null==n.oldMarkerData.range&&null==o.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:o,oldMarkerData:t})}getMarkersToRemove(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.oldMarkerData.range&&e.push({name:t,range:o.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.newMarkerData.range&&e.push({name:t,range:o.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const o=e.range&&!t.range,n=!e.range&&t.range,r=e.range&&t.range&&!e.range.isEqual(t.range);if(o||n||r)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const o=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(jd),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const o=this._changedRoots.get(e);void 0!==o.state?(delete o.state,void 0===o.attributes&&this._changedRoots.delete(e)):o.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,o,n){const r=this._changedRoots.get(e)||{name:e},i=r.attributes||{};if(i[t]){const e=i[t];n===e.oldValue?delete i[t]:e.newValue=n}else i[t]={oldValue:o,newValue:n};0===Object.entries(i).length?(delete r.attributes,void 0===r.state&&this._changedRoots.delete(e)):(r.attributes=i,this._changedRoots.set(e,r))}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=zl._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,o){const n={type:"insert",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,n)}_markRemove(e,t,o){const n={type:"remove",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,n),this._removeAllNestedChanges(e,t,o)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const o=this._getChangesForElement(e);this._handleChange(t,o),o.push(t);for(let e=0;eo.offset){if(n>r){const e={type:"attribute",offset:r,howMany:n-r,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=o.offset&&e.offsetr?(e.nodesToHandle=n-r,e.offset=r):e.nodesToHandle=0);if("remove"==o.type&&e.offseto.offset){const r={type:"attribute",offset:o.offset,howMany:n-o.offset,count:this._changeCount++};this._handleChange(r,t),t.push(r),e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==o.type&&(e.offset>=o.offset&&n<=r?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=o.offset&&n>=r&&(o.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,o){return{type:"insert",position:Sl._createAt(e,t),name:o.name,attributes:new Map(o.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,o){return{type:"remove",position:Sl._createAt(e,t),name:o.name,attributes:new Map(o.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,o){const n=[];o=new Map(o);for(const[r,i]of t){const t=o.has(r)?o.get(r):null;t!==i&&n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:r,attributeOldValue:i,attributeNewValue:t,changeCount:this._changeCount++}),o.delete(r)}for(const[t,r]of o)n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:r,changeCount:this._changeCount++});return n}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const o=this._changesInElement.get(t),n=e.startOffset;if(o)for(const e of o)if("insert"==e.type&&n>=e.offset&&nn){for(let t=0;tthis._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new f("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const o=this._operations[0];void 0===e&&(e=o.baseVersion);let n=t-1;for(const[t,o]of this._gaps)e>t&&et&&nthis.lastOperation.baseVersion)return[];let r=this._baseVersionToOperationIndex.get(e);void 0===r&&(r=0);let i=this._baseVersionToOperationIndex.get(n);return void 0===i&&(i=this._operations.length-1),this._operations.slice(r,i+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class Hd extends xl{constructor(e,t,o="main"){super(t),this._isAttached=!0,this._document=e,this.rootName=o}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}Hd.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const Wd="$graveyard";class $d extends(S()){constructor(e){super(),this.model=e,this.history=new qd,this.selection=new Yl(this),this.roots=new _r({idProperty:"rootName"}),this.differ=new Od(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Wd),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.differ.bufferOperation(o)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.history.addOperation(o)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,o,n,r)=>{const i={...t.getData(),range:n};this.differ.bufferMarkerChange(t.name,r,i),null===o&&t.on("change",((e,o)=>{const n=t.getData();this.differ.bufferMarkerChange(t.name,{...n,range:o},n)}))})),this.registerPostFixer((e=>{let t=!1;for(const o of this.roots)o.isAttached()||o.isEmpty||(e.remove(e.createRangeIn(o)),t=!0);for(const o of this.model.markers)o.getRange().root.isAttached()||(e.removeMarker(o),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(Wd)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new f("model-document-createroot-name-exists",this,{name:t});const o=new Hd(this,e,t);return this.roots.add(o),o}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return Array.from(this.roots).filter((t=>t.rootName!=Wd&&(e||t.isAttached()))).map((e=>e.rootName))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=oi(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,o=t.schema,n=t.createPositionFromPath(e,[0]);return o.getNearestSelectionRange(n)||t.createRange(n)}_validateSelectionRange(e){return Ud(e.start)&&Ud(e.end)}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(this.selection.refresh(),t=o(e),t)break}while(t)}}function Ud(e){const t=e.textNode;if(t){const o=t.data,n=e.offset-t.startOffset;return!Er(o,n)&&!Dr(o,n)}return!0}class Gd extends(S()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof Kd?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,o=!1,n=!1){const r=e instanceof Kd?e.name:e;if(r.includes(","))throw new f("markercollection-incorrect-marker-name",this);const i=this._markers.get(r);if(i){const e=i.getData(),s=i.getRange();let a=!1;return s.isEqual(t)||(i._attachLiveRange(Kl.fromRange(t)),a=!0),o!=i.managedUsingOperations&&(i._managedUsingOperations=o,a=!0),"boolean"==typeof n&&n!=i.affectsData&&(i._affectsData=n,a=!0),a&&this.fire(`update:${r}`,i,s,t,e),i}const s=Kl.fromRange(t),a=new Kd(r,s,o,n);return this._markers.set(r,a),this.fire(`update:${r}`,a,null,t,{...a.getData(),range:null}),a}_remove(e){const t=e instanceof Kd?e.name:e,o=this._markers.get(t);return!!o&&(this._markers.delete(t),this.fire(`update:${t}`,o,o.getRange(),null,o.getData()),this._destroyMarker(o),!0)}_refresh(e){const t=e instanceof Kd?e.name:e,o=this._markers.get(t);if(!o)throw new f("markercollection-refresh-marker-not-exists",this);const n=o.getRange();this.fire(`update:${t}`,o,n,n,o.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class Kd extends(S(_l)){constructor(e,t,o,n){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=o,this._affectsData=n}get managedUsingOperations(){if(!this._liveRange)throw new f("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new f("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new f("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new f("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new f("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Kd.prototype.is=function(e){return"marker"===e||"model:marker"===e};class Zd extends od{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new f("detach-operation-on-document-node",this)}_execute(){rd(zl._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Jd extends _l{constructor(e){super(),this.markers=new Map,this._children=new Al,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const o of e)o.name?t.push(xl.fromJSON(o)):t.push(Cl.fromJSON(o));return new Jd(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Cl(e)];Q(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Cl(e):e instanceof vl?new Cl(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}}Jd.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class Qd{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new Cl(e,t)}createElement(e,t){return new xl(e,t)}createDocumentFragment(){return new Jd}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,o=0){if(this._assertWriterUsedCorrectly(),e instanceof Cl&&""==e.data)return;const n=Sl._createAt(t,o);if(e.parent){if(ou(e.root,n.root))return void this.move(zl._createOn(e),n);if(e.root.document)throw new f("model-writer-insert-forbidden-move",this);this.remove(e)}const r=n.root.document?n.root.document.version:null,i=new ud(n,e,r);if(e instanceof Cl&&(i.shouldReceiveAttributes=!0),this.batch.addOperation(i),this.model.applyOperation(i),e instanceof Jd)for(const[t,o]of e.markers){const e=Sl._createAt(o.root,0),r={range:new zl(o.start._getCombined(e,n),o.end._getCombined(e,n)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,r):this.addMarker(t,r)}}insertText(e,t,o,n){t instanceof Jd||t instanceof xl||t instanceof Sl?this.insert(this.createText(e),t,o):this.insert(this.createText(e,t),o,n)}insertElement(e,t,o,n){t instanceof Jd||t instanceof xl||t instanceof Sl?this.insert(this.createElement(e),t,o):this.insert(this.createElement(e,t),o,n)}append(e,t){this.insert(e,t,"end")}appendText(e,t,o){t instanceof Jd||t instanceof xl?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),o,"end")}appendElement(e,t,o){t instanceof Jd||t instanceof xl?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),o,"end")}setAttribute(e,t,o){if(this._assertWriterUsedCorrectly(),o instanceof zl){const n=o.getMinimalFlatRanges();for(const o of n)Yd(this,e,t,o)}else Xd(this,e,t,o)}setAttributes(e,t){for(const[o,n]of vr(e))this.setAttribute(o,n,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof zl){const o=t.getMinimalFlatRanges();for(const t of o)Yd(this,e,null,t)}else Xd(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof zl)for(const o of e.getItems())t(o);else t(e)}move(e,t,o){if(this._assertWriterUsedCorrectly(),!(e instanceof zl))throw new f("writer-move-invalid-range",this);if(!e.isFlat)throw new f("writer-move-range-not-flat",this);const n=Sl._createAt(t,o);if(n.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!ou(e.root,n.root))throw new f("writer-move-different-document",this);const r=e.root.document?e.root.document.version:null,i=new dd(e.start,e.end.offset-e.start.offset,n,r);this.batch.addOperation(i),this.model.applyOperation(i)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof zl?e:zl._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),tu(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,o=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof xl))throw new f("writer-merge-no-element-before",this);if(!(o instanceof xl))throw new f("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,o){return this.model.createPositionFromPath(e,t,o)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,o=e.nodeAfter;this.move(zl._createIn(o),Sl._createAt(t,"end")),this.remove(o)}_merge(e){const t=Sl._createAt(e.nodeBefore,"end"),o=Sl._createAt(e.nodeAfter,0),n=e.root.document.graveyard,r=new Sl(n,[0]),i=e.root.document.version,s=new pd(o,e.nodeAfter.maxOffset,t,r,i);this.batch.addOperation(s),this.model.applyOperation(s)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof xl))throw new f("writer-rename-not-element-instance",this);const o=e.root.document?e.root.document.version:null,n=new kd(Sl._createBefore(e),e.name,t,o);this.batch.addOperation(n),this.model.applyOperation(n)}split(e,t){this._assertWriterUsedCorrectly();let o,n,r=e.parent;if(!r.parent)throw new f("writer-split-element-no-parent",this);if(t||(t=r.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new f("writer-split-invalid-limit-element",this);do{const t=r.root.document?r.root.document.version:null,i=r.maxOffset-e.offset,s=hd.getInsertionPosition(e),a=new hd(e,i,s,null,t);this.batch.addOperation(a),this.model.applyOperation(a),o||n||(o=r,n=e.parent.nextSibling),r=(e=this.createPositionAfter(e.parent)).parent}while(r!==t);return{position:e,range:new zl(Sl._createAt(o,"end"),Sl._createAt(n,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new f("writer-wrap-range-not-flat",this);const o=t instanceof xl?t:new xl(t);if(o.childCount>0)throw new f("writer-wrap-element-not-empty",this);if(null!==o.parent)throw new f("writer-wrap-element-attached",this);this.insert(o,e.start);const n=new zl(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(n,Sl._createAt(o,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new f("writer-unwrap-element-no-parent",this);this.move(zl._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new f("writer-addmarker-no-usingoperation",this);const o=t.usingOperation,n=t.range,r=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new f("writer-addmarker-marker-exists",this);if(!n)throw new f("writer-addmarker-no-range",this);return o?(eu(this,e,null,n,r),this.model.markers.get(e)):this.model.markers._set(e,n,o,r)}updateMarker(e,t){this._assertWriterUsedCorrectly();const o="string"==typeof e?e:e.name,n=this.model.markers.get(o);if(!n)throw new f("writer-updatemarker-marker-not-exists",this);if(!t)return b("writer-updatemarker-reconvert-using-editingcontroller",{markerName:o}),void this.model.markers._refresh(n);const r="boolean"==typeof t.usingOperation,i="boolean"==typeof t.affectsData,s=i?t.affectsData:n.affectsData;if(!r&&!t.range&&!i)throw new f("writer-updatemarker-wrong-options",this);const a=n.getRange(),l=t.range?t.range:a;r&&t.usingOperation!==n.managedUsingOperations?t.usingOperation?eu(this,o,null,l,s):(eu(this,o,a,null,s),this.model.markers._set(o,l,void 0,s)):n.managedUsingOperations?eu(this,o,a,l,s):this.model.markers._set(o,l,void 0,s)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new f("writer-removemarker-no-marker",this);const o=this.model.markers.get(t);if(!o.managedUsingOperations)return void this.model.markers._remove(t);eu(this,t,o.getRange(),null,o.affectsData)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const o=this.model.document.getRoot(e);if(o&&o.isAttached())throw new f("writer-addroot-root-exists",this);const n=this.model.document,r=new _d(e,t,!0,n,n.version);return this.batch.addOperation(r),this.model.applyOperation(r),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new f("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const o=this.model.document,n=new _d(t.rootName,t.name,!1,o,o.version);this.batch.addOperation(n),this.model.applyOperation(n)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,o]of vr(e))this._setSelectionAttribute(t,o)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const o=this.model.document.selection;if(o.isCollapsed&&o.anchor.parent.isEmpty){const n=Yl._getStoreAttributeKey(e);this.setAttribute(n,t,o.anchor.parent)}o._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const o=Yl._getStoreAttributeKey(e);this.removeAttribute(o,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new f("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const o of this.model.markers){if(!o.managedUsingOperations)continue;const n=o.getRange();let r=!1;if("move"===e){const e=t;r=e.containsPosition(n.start)||e.start.isEqual(n.start)||e.containsPosition(n.end)||e.end.isEqual(n.end)}else{const e=t,o=e.nodeBefore,i=e.nodeAfter,s=n.start.parent==o&&n.start.isAtEnd,a=n.end.parent==i&&0==n.end.offset,l=n.end.nodeAfter==i,c=n.start.nodeAfter==i;r=s||a||l||c}r&&this.updateMarker(o.name,{range:n})}}}function Yd(e,t,o,n){const r=e.model,i=r.document;let s,a,l,c=n.start;for(const e of n.getWalker({shallow:!0}))l=e.item.getAttribute(t),s&&a!=l&&(a!=o&&d(),c=s),s=e.nextPosition,a=l;function d(){const n=new zl(c,s),l=n.root.document?i.version:null,d=new fd(n,t,a,o,l);e.batch.addOperation(d),r.applyOperation(d)}s instanceof Sl&&s!=c&&a!=o&&d()}function Xd(e,t,o,n){const r=e.model,i=r.document,s=n.getAttribute(t);let a,l;if(s!=o){if(n.root===n){const e=n.document?i.version:null;l=new wd(n,t,s,o,e)}else{a=new zl(Sl._createBefore(n),e.createPositionAfter(n));const r=a.root.document?i.version:null;l=new fd(a,t,s,o,r)}e.batch.addOperation(l),r.applyOperation(l)}}function eu(e,t,o,n,r){const i=e.model,s=i.document,a=new gd(t,o,n,i.markers,!!r,s.version);e.batch.addOperation(a),i.applyOperation(a)}function tu(e,t,o,n){let r;if(e.root.document){const o=n.document,i=new Sl(o.graveyard,[0]);r=new dd(e,t,i,o.version)}else r=new Zd(e,t);o.addOperation(r),n.applyOperation(r)}function ou(e,t){return e===t||e instanceof Hd&&t instanceof Hd}function nu(e,t,o={}){if(t.isCollapsed)return;const n=t.getFirstRange();if("$graveyard"==n.root.rootName)return;const r=e.schema;e.change((e=>{if(!o.doNotResetEntireContent&&function(e,t){const o=e.getLimitElement(t);if(!t.containsEntireContent(o))return!1;const n=t.getFirstRange();if(n.start.parent==n.end.parent)return!1;return e.checkChild(o,"paragraph")}(r,t))return void function(e,t){const o=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(o)),au(e,e.createPositionAt(o,0),t)}(e,t);const i={};if(!o.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(i,r.getAttributesWithProperty(e,"copyOnReplace",!0))}const[s,a]=function(e){const t=e.root.document.model,o=e.start;let n=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const o=function(e){const t=e.parent,o=t.root.document.model.schema,n=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of n){if(o.isLimit(e))return null;if(o.isBlock(e))return e}}(n);if(o&&n.isTouching(t.createPositionAt(o,0))){const o=t.createSelection(e);t.modifySelection(o,{direction:"backward"});const r=o.getLastPosition(),i=t.createRange(r,n);t.hasContent(i,{ignoreMarkers:!0})||(n=r)}}return[zd.fromPosition(o,"toPrevious"),zd.fromPosition(n,"toNext")]}(n);s.isTouching(a)||e.remove(e.createRange(s,a)),o.leaveUnmerged||(!function(e,t,o){const n=e.model;if(!su(e.model.schema,t,o))return;const[r,i]=function(e,t){const o=e.getAncestors(),n=t.getAncestors();let r=0;for(;o[r]&&o[r]==n[r];)r++;return[o[r],n[r]]}(t,o);if(!r||!i)return;!n.hasContent(r,{ignoreMarkers:!0})&&n.hasContent(i,{ignoreMarkers:!0})?iu(e,t,o,r.parent):ru(e,t,o,r.parent)}(e,s,a),r.removeDisallowedAttributes(s.parent.getChildren(),e)),lu(e,t,s),!o.doNotAutoparagraph&&function(e,t){const o=e.checkChild(t,"$text"),n=e.checkChild(t,"paragraph");return!o&&n}(r,s)&&au(e,s,t,i),s.detach(),a.detach()}))}function ru(e,t,o,n){const r=t.parent,i=o.parent;if(r!=n&&i!=n){for(t=e.createPositionAfter(r),(o=e.createPositionBefore(i)).isEqual(t)||e.insert(i,t),e.merge(t);o.parent.isEmpty;){const t=o.parent;o=e.createPositionBefore(t),e.remove(t)}su(e.model.schema,t,o)&&ru(e,t,o,n)}}function iu(e,t,o,n){const r=t.parent,i=o.parent;if(r!=n&&i!=n){for(t=e.createPositionAfter(r),(o=e.createPositionBefore(i)).isEqual(t)||e.insert(r,o);t.parent.isEmpty;){const o=t.parent;t=e.createPositionBefore(o),e.remove(o)}o=e.createPositionBefore(i),function(e,t){const o=t.nodeBefore,n=t.nodeAfter;o.name!=n.name&&e.rename(o,n.name);e.clearAttributes(o),e.setAttributes(Object.fromEntries(n.getAttributes()),o),e.merge(t)}(e,o),su(e.model.schema,t,o)&&iu(e,t,o,n)}}function su(e,t,o){const n=t.parent,r=o.parent;return n!=r&&(!e.isLimit(n)&&!e.isLimit(r)&&function(e,t,o){const n=new zl(e,t);for(const e of n.getWalker())if(o.isLimit(e.item))return!1;return!0}(t,o,e))}function au(e,t,o,n={}){const r=e.createElement("paragraph");e.model.schema.setAllowedAttributes(r,n,e),e.insert(r,t),lu(e,o,e.createPositionAt(r,0))}function lu(e,t,o){t instanceof Yl?e.setSelection(o):t.setTo(o)}function cu(e,t){const o=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{o.push(e.start.parent),t.remove(e)})),o.forEach((e=>{let o=e;for(;o.parent&&o.isEmpty;){const e=t.createRangeOn(o);o=o.parent,t.remove(e)}}))}class du{constructor(e,t,o){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=e,this.writer=t,this.position=o,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),o=this.writer.createPositionAfter(e);if(o.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new f("insertcontent-invalid-insertion-position",this);this.position=o,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?zl._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new zl(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=zd.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new f("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=zd.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=zd.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof xl))return;if(!this._canMergeLeft(e))return;const t=zd._createBefore(e);t.stickiness="toNext";const o=zd.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=zd._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=zd._createAt(t.nodeBefore,"end","toNext")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof xl))return;if(!this._canMergeRight(e))return;const t=zd._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new f("insertcontent-invalid-insertion-position",this);this.position=Sl._createAt(t.nodeBefore,"end");const o=zd.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=zd._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=zd._createAt(t.nodeBefore,0,"toPrevious")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof xl&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof xl&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function uu(e,t,o="auto"){const n=e.getSelectedElement();if(n&&t.schema.isObject(n)&&!t.schema.isInline(n))return"before"==o||"after"==o?t.createRange(t.createPositionAt(n,o)):t.createRangeOn(n);const r=yr(e.getSelectedBlocks());if(!r)return t.createRange(e.focus);if(r.isEmpty)return t.createRange(t.createPositionAt(r,0));const i=t.createPositionAfter(r);return e.focus.isTouching(i)?t.createRange(i):t.createRange(t.createPositionBefore(r))}function hu(e,t,o,n={}){if(!e.schema.isObject(t))throw new f("insertobject-element-not-an-object",e,{object:t});const r=o||e.document.selection;let i=r;n.findOptimalPosition&&e.schema.isBlock(t)&&(i=e.createSelection(uu(r,e,n.findOptimalPosition)));const s=yr(r.getSelectedBlocks()),a={};return s&&Object.assign(a,e.schema.getAttributesWithProperty(s,"copyOnReplace",!0)),e.change((o=>{i.isCollapsed||e.deleteContent(i,{doNotAutoparagraph:!0});let r=t;const s=i.anchor.parent;!e.schema.checkChild(s,t)&&e.schema.checkChild(s,"paragraph")&&e.schema.checkChild("paragraph",t)&&(r=o.createElement("paragraph"),o.insert(t,r)),e.schema.setAllowedAttributes(r,a,o);const l=e.insertContent(r,i);return l.isCollapsed||n.setSelection&&function(e,t,o,n){const r=e.model;if("on"==o)return void e.setSelection(t,"on");if("after"!=o)throw new f("insertobject-invalid-place-parameter-value",r);let i=t.nextSibling;if(r.schema.isInline(t))return void e.setSelection(t,"after");const s=i&&r.schema.checkChild(i,"$text");!s&&r.schema.checkChild(t.parent,"paragraph")&&(i=e.createElement("paragraph"),r.schema.setAllowedAttributes(i,n,e),r.insertContent(i,e.createPositionAfter(t)));i&&e.setSelection(i,0)}(o,t,n.setSelection,a),l}))}const pu=' ,.?!:;"-()';function gu(e,t){const{isForward:o,walker:n,unit:r,schema:i,treatEmojiAsSingleUnit:s}=e,{type:a,item:l,nextPosition:c}=t;if("text"==a)return"word"===e.unit?function(e,t){let o=e.position.textNode;o||(o=t?e.position.nodeAfter:e.position.nodeBefore);for(;o&&o.is("$text");){const n=e.position.offset-o.startOffset;if(bu(o,n,t))o=t?e.position.nodeAfter:e.position.nodeBefore;else{if(fu(o.data,n,t))break;e.next()}}return e.position}(n,o):function(e,t,o){const n=e.position.textNode;if(n){const r=n.data;let i=e.position.offset-n.startOffset;for(;Er(r,i)||"character"==t&&Dr(r,i)||o&&Tr(r,i);)e.next(),i=e.position.offset-n.startOffset}return e.position}(n,r,s);if(a==(o?"elementStart":"elementEnd")){if(i.isSelectable(l))return Sl._createAt(l,o?"after":"before");if(i.checkChild(c,"$text"))return c}else{if(i.isLimit(l))return void n.skip((()=>!0));if(i.checkChild(c,"$text"))return c}}function mu(e,t){const o=e.root,n=Sl._createAt(o,t?"end":0);return t?new zl(e,n):new zl(n,e)}function fu(e,t,o){const n=t+(o?0:-1);return pu.includes(e.charAt(n))}function bu(e,t,o){return t===(o?e.offsetSize:0)}class ku extends(H()){constructor(){super(),this.markers=new Gd,this.document=new $d(this),this.schema=new zc,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),Ec(this),this.document.registerPostFixer(fc),this.on("insertContent",((e,[t,o])=>{e.return=function(e,t,o){return e.change((n=>{const r=o||e.document.selection;r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});const i=new du(e,n,r.anchor),s=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[o,n]of t.markers){const{start:t,end:r}=n,i=t.isEqual(r);e.push({position:t,name:o,isCollapsed:i},{position:r,name:o,isCollapsed:i})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:o,name:r,isCollapsed:i}of e){let e=null,a=null;const l=o.parent===t&&o.isAtStart,c=o.parent===t&&o.isAtEnd;l||c?i&&(a=l?"start":"end"):(e=n.createElement("$marker"),n.insert(e,o)),s.push({name:r,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];i.handleNodes(a);let l=i.getSelectionRange();if(t.is("documentFragment")&&s.length){const e=l?Kl.fromRange(l):null,t={};for(let e=s.length-1;e>=0;e--){const{name:o,element:r,collapsed:a}=s[e],l=!t[o];if(l&&(t[o]=[]),r){const e=n.createPositionAt(r,"before");t[o].push(e),n.remove(r)}else{const e=i.getAffectedRange();if(!e){a&&t[o].push(i.position);continue}a?t[o].push(e[a]):t[o].push(l?e.start:e.end)}}for(const[e,[o,r]]of Object.entries(t))o&&r&&o.root===r.root&&n.addMarker(e,{usingOperation:!0,affectsData:!0,range:new zl(o,r)});e&&(l=e.toRange(),e.detach())}l&&(r instanceof Yl?n.setSelection(l):r.setTo(l));const c=i.getAffectedRange()||e.createRange(r.anchor);return i.destroy(),c}))}(this,t,o)})),this.on("insertObject",((e,[t,o,n])=>{e.return=hu(this,t,o,n)})),this.on("canEditAt",(e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Fd,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){f.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new Fd):e instanceof Fd||(e=new Fd(e)):e=new Fd,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){f.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,o,...n){const r=wu(t,o);return this.fire("insertContent",[e,r,o,...n])}insertObject(e,t,o,n,...r){const i=wu(t,o);return this.fire("insertObject",[e,i,n,n,...r])}deleteContent(e,t){nu(this,e,t)}modifySelection(e,t){!function(e,t,o={}){const n=e.schema,r="backward"!=o.direction,i=o.unit?o.unit:"character",s=!!o.treatEmojiAsSingleUnit,a=t.focus,l=new El({boundaries:mu(a,r),singleCharacters:!0,direction:r?"forward":"backward"}),c={walker:l,schema:n,isForward:r,unit:i,treatEmojiAsSingleUnit:s};let d;for(;d=l.next();){if(d.done)return;const o=gu(c,d.value);if(o)return void(t instanceof Yl?e.change((e=>{e.setSelectionFocus(o)})):t.setFocus(o))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const o=e.createDocumentFragment(),n=t.getFirstRange();if(!n||n.isCollapsed)return o;const r=n.start.root,i=n.start.getCommonPath(n.end),s=r.getNodeByPath(i);let a;a=n.start.parent==n.end.parent?n:e.createRange(e.createPositionAt(s,n.start.path[i.length]),e.createPositionAt(s,n.end.path[i.length]+1));const l=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),o):e.append(e.cloneElement(t,!0),o);if(a!=n){const t=n._getTransformedByMove(a.start,e.createPositionAt(o,0),l)[0],r=e.createRange(e.createPositionAt(o,0),t.start);cu(e.createRange(t.end,e.createPositionAt(o,"end")),e),cu(r,e)}return o}))}(this,e)}hasContent(e,t={}){const o=e instanceof zl?e:zl._createIn(e);if(o.isCollapsed)return!1;const{ignoreWhitespaces:n=!1,ignoreMarkers:r=!1}=t;if(!r)for(const e of this.markers.getMarkersIntersectingRange(o))if(e.affectsData)return!0;for(const e of o.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!n)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=wu(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,o){return new Sl(e,t,o)}createPositionAt(e,t){return Sl._createAt(e,t)}createPositionAfter(e){return Sl._createAfter(e)}createPositionBefore(e){return Sl._createBefore(e)}createRange(e,t){return new zl(e,t)}createRangeIn(e){return zl._createIn(e)}createRangeOn(e){return zl._createOn(e)}createSelection(...e){return new jl(...e)}createBatch(e){return new Fd(e)}createOperationFromJSON(e){return Ad.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new Qd(this,t);const o=this._pendingChanges[0].callback(this._currentWriter);e.push(o),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function wu(e,t){if(e)return e instanceof jl||e instanceof Yl?e:e instanceof yl?t||0===t?new jl(e,t):e.is("rootElement")?new jl(e,"in"):new jl(e,"on"):new jl(e)}class _u extends Ea{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}class yu extends Ea{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}class Au{constructor(e){this.document=e}createDocumentFragment(e){return new Os(this.document,e)}createElement(e,t,o){return new as(this.document,e,t,o)}createText(e){return new ri(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,o){return o._insertChild(e,t)}removeChildren(e,t,o){return o._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const o=e.parent;if(o){const n=o.getChildIndex(e);return this.removeChildren(n,1,o),this.insertChild(n,t,o),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const o=t.getChildIndex(e);this.remove(e),this.insertChild(o,e.getChildren(),t)}}rename(e,t){const o=new as(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,o)?o:null}setAttribute(e,t,o){o._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,o){Ae(e)&&void 0===o?t._setStyle(e):o._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,o){o._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return ms._createAt(e,t)}createPositionAfter(e){return ms._createAfter(e)}createPositionBefore(e){return ms._createBefore(e)}createRange(e,t){return new fs(e,t)}createRangeOn(e){return fs._createOn(e)}createRangeIn(e){return fs._createIn(e)}createSelection(...e){return new ks(...e)}}const Cu=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,vu=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,xu=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Eu=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,Du=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Su=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function Tu(e){return e.startsWith("#")?Cu.test(e):e.startsWith("rgb")?vu.test(e)||xu.test(e):e.startsWith("hsl")?Eu.test(e)||Du.test(e):Su.has(e.toLowerCase())}const Bu=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function Iu(e){return Bu.includes(e)}const Pu=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Ru(e){return Pu.test(e)}const zu=/^[+-]?[0-9]*([.][0-9]+)?%$/;const Mu=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function Nu(e){return Mu.includes(e)}const Fu=["center","top","bottom","left","right"];function Ou(e){return Fu.includes(e)}const Vu=["fixed","scroll","local"];function Lu(e){return Vu.includes(e)}const ju=/^url\(/;function qu(e){return ju.test(e)}function Hu(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=Uu(e),o=t[0],n=t[2]||o,r=t[1]||o;return{top:o,bottom:n,right:r,left:t[3]||r}}function Wu(e){return t=>{const{top:o,right:n,bottom:r,left:i}=t,s=[];return[o,n,i,r].every((e=>!!e))?s.push([e,$u(t)]):(o&&s.push([e+"-top",o]),n&&s.push([e+"-right",n]),r&&s.push([e+"-bottom",r]),i&&s.push([e+"-left",i])),s}}function $u({top:e,right:t,bottom:o,left:n}){const r=[];return n!==t?r.push(e,t,o,n):o!==e?r.push(e,t,o):t!==e?r.push(e,t):r.push(e),r.join(" ")}function Uu(e){return e.replace(/, /g,",").split(" ").map((e=>e.replace(/,/g,", ")))}function Gu(e){e.setNormalizer("background",(e=>{const t={},o=Uu(e);for(const e of o)Nu(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Ou(e)?(t.position=t.position||[],t.position.push(e)):Lu(e)?t.attachment=e:Tu(e)?t.color=e:qu(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function Ku(e){e.setNormalizer("border",(e=>{const{color:t,style:o,width:n}=th(e);return{path:"border",value:{color:Hu(t),style:Hu(o),width:Hu(n)}}})),e.setNormalizer("border-top",Zu("top")),e.setNormalizer("border-right",Zu("right")),e.setNormalizer("border-bottom",Zu("bottom")),e.setNormalizer("border-left",Zu("left")),e.setNormalizer("border-color",Ju("color")),e.setNormalizer("border-width",Ju("width")),e.setNormalizer("border-style",Ju("style")),e.setNormalizer("border-top-color",Yu("color","top")),e.setNormalizer("border-top-style",Yu("style","top")),e.setNormalizer("border-top-width",Yu("width","top")),e.setNormalizer("border-right-color",Yu("color","right")),e.setNormalizer("border-right-style",Yu("style","right")),e.setNormalizer("border-right-width",Yu("width","right")),e.setNormalizer("border-bottom-color",Yu("color","bottom")),e.setNormalizer("border-bottom-style",Yu("style","bottom")),e.setNormalizer("border-bottom-width",Yu("width","bottom")),e.setNormalizer("border-left-color",Yu("color","left")),e.setNormalizer("border-left-style",Yu("style","left")),e.setNormalizer("border-left-width",Yu("width","left")),e.setExtractor("border-top",Xu("top")),e.setExtractor("border-right",Xu("right")),e.setExtractor("border-bottom",Xu("bottom")),e.setExtractor("border-left",Xu("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",Wu("border-color")),e.setReducer("border-style",Wu("border-style")),e.setReducer("border-width",Wu("border-width")),e.setReducer("border-top",oh("top")),e.setReducer("border-right",oh("right")),e.setReducer("border-bottom",oh("bottom")),e.setReducer("border-left",oh("left")),e.setReducer("border",function(){return t=>{const o=eh(t,"top"),n=eh(t,"right"),r=eh(t,"bottom"),i=eh(t,"left"),s=[o,n,r,i],a={width:e(s,"width"),style:e(s,"style"),color:e(s,"color")},l=nh(a,"all");if(l.length)return l;const c=Object.entries(a).reduce(((e,[t,o])=>(o&&(e.push([`border-${t}`,o]),s.forEach((e=>delete e[t]))),e)),[]);return[...c,...nh(o,"top"),...nh(n,"right"),...nh(r,"bottom"),...nh(i,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function Zu(e){return t=>{const{color:o,style:n,width:r}=th(t),i={};return void 0!==o&&(i.color={[e]:o}),void 0!==n&&(i.style={[e]:n}),void 0!==r&&(i.width={[e]:r}),{path:"border",value:i}}}function Ju(e){return t=>({path:"border",value:Qu(t,e)})}function Qu(e,t){return{[t]:Hu(e)}}function Yu(e,t){return o=>({path:"border",value:{[e]:{[t]:o}}})}function Xu(e){return(t,o)=>{if(o.border)return eh(o.border,e)}}function eh(e,t){const o={};return e.width&&e.width[t]&&(o.width=e.width[t]),e.style&&e.style[t]&&(o.style=e.style[t]),e.color&&e.color[t]&&(o.color=e.color[t]),o}function th(e){const t={},o=Uu(e);for(const e of o)Ru(e)||/thin|medium|thick/.test(e)?t.width=e:Iu(e)?t.style=e:t.color=e;return t}function oh(e){return t=>nh(t,e)}function nh(e,t){const o=[];if(e&&e.width&&o.push("width"),e&&e.style&&o.push("style"),e&&e.color&&o.push("color"),3==o.length){const n=o.map((t=>e[t])).join(" ");return["all"==t?["border",n]:[`border-${t}`,n]]}return"all"==t?[]:o.map((o=>[`border-${t}-${o}`,e[o]]))}function rh(e){var t;e.setNormalizer("padding",(t="padding",e=>({path:t,value:Hu(e)}))),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",Wu("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}class ih{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const o=this.get(e);if(!o)throw new f("commandcollection-command-not-found",this,{commandName:e});return o.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class sh extends Cr{constructor(e){super(),this.editor=e}set(e,t,o={}){if("string"==typeof t){const e=t;t=(t,o)=>{this.editor.execute(e),o()}}super.set(e,t,o)}}class ah extends(H()){constructor(e={}){super();const t=this.constructor,o=e.language||t.defaultConfig&&t.defaultConfig.language;this._context=e.context||new Mr({language:o}),this._context._addEditor(this,!e.context);const n=Array.from(t.builtinPlugins||[]);this.config=new yn(e,t.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new zr(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new ih,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new ku,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const r=new rs;this.data=new Yc(this.model,r),this.editing=new Bc(this.model,r),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Xc([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new sh(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new f("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new f("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new f("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),o=e.get("removePlugins")||[],n=e.get("extraPlugins")||[],r=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(n),o,r)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){f.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}}function lh(e){return class extends e{setData(e){this.data.set(e)}getData(e){return this.data.get(e)}}}{const e=lh(Object);lh.setData=e.prototype.setData,lh.getData=e.prototype.getData}function ch(e){return class extends e{updateSourceElement(e=this.data.get()){if(!this.sourceElement)throw new f("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),o=this.sourceElement instanceof HTMLTextAreaElement;qn(this.sourceElement,t||o?e:"")}}}ch.updateSourceElement=ch(Object).prototype.updateSourceElement;class dh extends Nr{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new _r({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new f("pendingactions-add-invalid-message",this);const t=new(H());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const uh={bold:'',cancel:'',caption:'',check:'',cog:'',eraser:'',image:'',lowVision:'',importExport:'',paragraph:'',plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:'',quote:'',threeVerticalDots:''};class hh{constructor(e){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const o=this._listeners[e]||[];for(const e of o)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const o=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:o}),o?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function ph(e,t=new Set){const o=[e],n=new Set;let r=0;for(;o.length>r;){const e=o[r++];if(!n.has(e)&&gh(e)&&!t.has(e))if(n.add(e),Symbol.iterator in e)try{for(const t of e)o.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&o.push(e[t])}return n}function gh(e){const t=Object.prototype.toString.call(e),o=typeof e;return!("number"===o||"boolean"===o||"string"===o||"symbol"===o||"function"===o||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function mh(e,t,o=new Set){if(e===t&&("object"==typeof(n=e)&&null!==n))return!0;var n;const r=ph(e,o),i=ph(t,o);for(const e of r)if(i.has(e))return!0;return!1}const fh=function(e,t,o){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return N(o)&&(n="leading"in o?!!o.leading:n,r="trailing"in o?!!o.trailing:r),La(e,t,{leading:n,maxWait:t,trailing:r})};class bh extends hh{constructor(e,t={}){super(t),this._editor=null,this._throttledSave=fh(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,o)=>e.create(t,o)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const e=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,e,e.context)}})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,o){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=e,this._config=this._cloneEditorConfiguration(t)||{},this._config.context=o,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.flush();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e={};for(const t of this._editor.model.document.getRootNames())e[t]=this._editor.data.get({rootName:t});return e}_isErrorComingFromThisItem(e){return mh(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return wn(e,((e,t)=>_n(e)||"context"===t?e:void 0))}}const kh=Symbol("MainQueueId");class wh{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const o=e===kh;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const n=(o?Promise.all(this._queues.values()):Promise.all([this._queues.get(kh),this._queues.get(e)])).then(t),r=n.catch((()=>{}));return this._queues.set(e,r),n.finally((()=>{this._activeActions--,this._queues.get(e)===r&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function _h(e){return Array.isArray(e)?e:[e]}function yh({emitter:e,activator:t,callback:o,contextElements:n}){e.listenTo(document,"mousedown",((e,r)=>{if(!t())return;const i="function"==typeof r.composedPath?r.composedPath():[],s="function"==typeof n?n():n;for(const e of s)if(e.contains(r.target)||i.includes(e))return;o()}))}function Ah(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...e){super(...e),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function Ch({view:e}){e.listenTo(e.element,"submit",((t,o)=>{o.preventDefault(),e.fire("submit")}),{useCapture:!0})}function vh({keystrokeHandler:e,focusTracker:t,gridItems:o,numberOfColumns:n,uiLanguageDirection:r}){const i="number"==typeof n?()=>n:n;function s(e){return n=>{const r=o.find((e=>e.element===t.focusedElement)),i=o.getIndex(r),s=e(i,o);o.get(s).focus(),n.stopPropagation(),n.preventDefault()}}function a(e,t){return e===t-1?0:e+1}function l(e,t){return 0===e?t-1:e-1}e.set("arrowright",s(((e,t)=>"rtl"===r?l(e,t.length):a(e,t.length)))),e.set("arrowleft",s(((e,t)=>"rtl"===r?a(e,t.length):l(e,t.length)))),e.set("arrowup",s(((e,t)=>{let o=e-i();return o<0&&(o=e+i()*Math.floor(t.length/i()),o>t.length-1&&(o-=i())),o}))),e.set("arrowdown",s(((e,t)=>{let o=e+i();return o>t.length-1&&(o=e%i()),o})))}class xh extends _r{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,o)=>{this._renderViewIntoCollectionParent(t,o)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new f("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const o of this)for(const n of e)o.delegate(n).to(t);this.on("add",((o,n)=>{for(const o of e)n.delegate(o).to(t)})),this.on("remove",((o,n)=>{for(const o of e)n.stopDelegating(o,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}var Eh=o(6150),Dh={attributes:{"data-cke":!0}};Dh.setAttributes=Wr(),Dh.insert=qr().bind(null,"head"),Dh.domAPI=Lr(),Dh.insertStyleElement=Ur();Or()(Eh.Z,Dh);Eh.Z&&Eh.Z.locals&&Eh.Z.locals;class Sh extends(Dn(H())){constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new _r,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,o)=>{o.locale=e,o.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Th.bind(this,this)}createCollection(e){const t=new xh(e);return this._viewCollections.add(t),t}registerChild(e){Q(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){Q(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Th(e)}extendTemplate(e){Th.extend(this.template,e)}render(){if(this.isRendered)throw new f("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}class Th extends(S()){constructor(e){super(),Object.assign(this,Vh(Oh(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new f("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const o of t.children)$h(o)?yield o:Uh(o)&&(yield*e(o))}(this)}static bind(e,t){return{to:(o,n)=>new Ih({eventNameOrFunction:o,attribute:o,observable:e,emitter:t,callback:n}),if:(o,n,r)=>new Ph({observable:e,emitter:t,attribute:o,valueIfTrue:n,callback:r})}}static extend(e,t){if(e._isRendered)throw new f("template-extend-render",[this,e]);Hh(e,Vh(Oh(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new f("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),Rh(this.text)?this._bindToObservable({schema:this.text,updater:Mh(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,o=e.revertData;for(const n in this.attributes){const r=t.getAttribute(n),i=this.attributes[n];o&&(o.attributes[n]=r);const s=Kh(i)?i[0].ns:null;if(Rh(i)){const a=Kh(i)?i[0].value:i;o&&Zh(n)&&a.unshift(r),this._bindToObservable({schema:a,updater:Nh(t,n,s),data:e})}else if("style"==n&&"string"!=typeof i[0])this._renderStyleAttribute(i[0],e);else{o&&r&&Zh(n)&&i.unshift(r);const e=i.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(jh,"");Wh(e)||t.setAttributeNS(s,n,e)}}}_renderStyleAttribute(e,t){const o=t.node;for(const n in e){const r=e[n];Rh(r)?this._bindToObservable({schema:[r],updater:Fh(o,n),data:t}):o.style[n]=r}}_renderElementChildren(e){const t=e.node,o=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let r=0;for(const i of this.children)if(Gh(i)){if(!n){i.setParent(t);for(const e of i)o.appendChild(e.element)}}else if($h(i))n||(i.isRendered||i.render(),o.appendChild(i.element));else if(vn(i))o.appendChild(i);else if(n){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),i._renderNode({intoFragment:!1,node:o.childNodes[r++],isApplying:!0,revertData:t})}else o.appendChild(i.render());e.intoFragment&&t.appendChild(o)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const o=this.eventListeners[t].map((o=>{const[n,r]=t.split("@");return o.activateDomEventListener(n,r,e)}));e.revertData&&e.revertData.bindings.push(o)}}_bindToObservable({schema:e,updater:t,data:o}){const n=o.revertData;zh(e,t,o);const r=e.filter((e=>!Wh(e))).filter((e=>e.observable)).map((n=>n.activateAttributeListener(e,t,o)));n&&n.bindings.push(r)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const o=e;for(const e in t.attributes){const n=t.attributes[e];null===n?o.removeAttribute(e):o.setAttribute(e,n)}for(let e=0;ezh(e,t,o);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,n),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,n)}}}class Ih extends Bh{constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,o){const n=(e,o)=>{t&&!o.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(o):this.observable.fire(this.eventNameOrFunction,o))};return this.emitter.listenTo(o.node,e,n),()=>{this.emitter.stopListening(o.node,e,n)}}}class Ph extends Bh{constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!Wh(super.getValue(e))&&(this.valueIfTrue||!0)}}function Rh(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(Rh):e instanceof Bh)}function zh(e,t,{node:o}){const n=function(e,t){return e.map((e=>e instanceof Bh?e.getValue(t):e))}(e,o);let r;r=1==e.length&&e[0]instanceof Ph?n[0]:n.reduce(jh,""),Wh(r)?t.remove():t.set(r)}function Mh(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function Nh(e,t,o){return{set(n){e.setAttributeNS(o,t,n)},remove(){e.removeAttributeNS(o,t)}}}function Fh(e,t){return{set(o){e.style[t]=o},remove(){e.style[t]=null}}}function Oh(e){return wn(e,(e=>{if(e&&(e instanceof Bh||Uh(e)||$h(e)||Gh(e)))return e}))}function Vh(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=mr(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)Lh(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=mr(e[t].value)),Lh(e,t)}(e.attributes);const t=[];if(e.children)if(Gh(e.children))t.push(e.children);else for(const o of e.children)Uh(o)||$h(o)||vn(o)?t.push(o):t.push(new Th(o));e.children=t}return e}function Lh(e,t){e[t]=mr(e[t])}function jh(e,t){return Wh(t)?e:Wh(e)?t:`${e} ${t}`}function qh(e,t){for(const o in t)e[o]?e[o].push(...t[o]):e[o]=t[o]}function Hh(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),qh(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),qh(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new f("ui-template-extend-children-mismatch",e);let o=0;for(const n of t.children)Hh(e.children[o++],n)}}function Wh(e){return!e&&0!==e}function $h(e){return e instanceof Sh}function Uh(e){return e instanceof Th}function Gh(e){return e instanceof xh}function Kh(e){return N(e[0])&&e[0].ns}function Zh(e){return"class"==e||"style"==e}class Jh extends xh{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new Th({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=ge(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var Qh=o(1174),Yh={attributes:{"data-cke":!0}};Yh.setAttributes=Wr(),Yh.insert=qr().bind(null,"head"),Yh.domAPI=Lr(),Yh.insertStyleElement=Ur();Or()(Qh.Z,Yh);Qh.Z&&Qh.Z.locals&&Qh.Z.locals;class Xh extends Sh{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon","ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:o}of Array.from(e.attributes))Xh.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,o);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}}Xh.presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];var ep=o(4499),tp={attributes:{"data-cke":!0}};tp.setAttributes=Wr(),tp.insert=qr().bind(null,"head"),tp.domAPI=Lr(),tp.insertStyleElement=Ur();Or()(ep.Z,tp);ep.Z&&ep.Z.locals&&ep.Z.locals;class op extends Sh{constructor(e){super(e),this._focusDelayed=null;const t=this.bindTemplate,o=h();this.set("ariaChecked",void 0),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${o}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._createLabelView(),this.iconView=new Xh,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const r={tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",(e=>!e)),t.if("isVisible","ck-hidden",(e=>!e)),t.to("isOn",(e=>e?"ck-on":"ck-off")),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],role:t.to("role"),type:t.to("type",(e=>e||"button")),tabindex:t.to("tabindex"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy"),"aria-disabled":t.if("isEnabled",!0,(e=>!e)),"aria-checked":t.to("isOn"),"aria-pressed":t.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":t.to("_tooltipString"),"data-cke-tooltip-position":t.to("tooltipPosition")},children:this.children,on:{click:t.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};n.isSafari&&(this._focusDelayed||(this._focusDelayed=xr((()=>this.focus()),0)),r.on.mousedown=t.to((()=>{this._focusDelayed()})),r.on.mouseup=t.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(r)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_createLabelView(){const e=new Sh,t=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:t.to("labelStyle"),id:this.ariaLabelledBy},children:[{text:t.to("label")}]}),e}_createKeystrokeView(){const e=new Sh;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>pr(e)))}]}),e}_getTooltipString(e,t,o){return e?"string"==typeof e?e:(o&&(o=pr(o)),e instanceof Function?e(t,o):`${t}${o?` (${o})`:""}`):""}}var np=o(9681),rp={attributes:{"data-cke":!0}};rp.setAttributes=Wr(),rp.insert=qr().bind(null,"head"),rp.domAPI=Lr(),rp.insertStyleElement=Ur();Or()(np.Z,rp);np.Z&&np.Z.locals&&np.Z.locals;class ip extends op{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new Sh;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}function sp(e,t){const o=e.t,n={Black:o("Black"),"Dim grey":o("Dim grey"),Grey:o("Grey"),"Light grey":o("Light grey"),White:o("White"),Red:o("Red"),Orange:o("Orange"),Yellow:o("Yellow"),"Light green":o("Light green"),Green:o("Green"),Aquamarine:o("Aquamarine"),Turquoise:o("Turquoise"),"Light blue":o("Light blue"),Blue:o("Blue"),Purple:o("Purple")};return t.map((e=>{const t=n[e.label];return t&&t!=e.label&&(e.label=t),e}))}function ap(e){return e.map(lp).filter((e=>!!e))}function lp(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}class cp extends op{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}var dp=o(4923),up={attributes:{"data-cke":!0}};up.setAttributes=Wr(),up.insert=qr().bind(null,"head"),up.domAPI=Lr(),up.insertStyleElement=Ur();Or()(dp.Z,up);dp.Z&&dp.Z.locals&&dp.Z.locals;class hp extends Sh{constructor(e,t){super(e);const o=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t&&t.columns?t.columns:5;const n={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new Ar,this.keystrokes=new Cr,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),o.forEach((e=>{const t=new cp;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",((e,t,o)=>{for(const e of this.items)e.isOn=e.color===o}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),vh({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}o(8874);o(2085);var pp=o(2751),gp={attributes:{"data-cke":!0}};gp.setAttributes=Wr(),gp.insert=qr().bind(null,"head"),gp.domAPI=Lr(),gp.insertStyleElement=Ur();Or()(pp.Z,gp);pp.Z&&pp.Z.locals&&pp.Z.locals;class mp extends Sh{constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${h()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}var fp=o(8111),bp={attributes:{"data-cke":!0}};bp.setAttributes=Wr(),bp.insert=qr().bind(null,"head"),bp.domAPI=Lr(),bp.insertStyleElement=Ur();Or()(fp.Z,bp);fp.Z&&fp.Z.locals&&fp.Z.locals;class kp extends Sh{constructor(e,t){super(e);const o=`ck-labeled-field-view-${h()}`,n=`ck-labeled-field-view-status-${h()}`;this.fieldView=t(this,o,n),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(o),this.statusView=this._createStatusView(n),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const r=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",r.to("class"),r.if("isEnabled","ck-disabled",(e=>!e)),r.if("isEmpty","ck-labeled-field-view_empty"),r.if("isFocused","ck-labeled-field-view_focused"),r.if("placeholder","ck-labeled-field-view_placeholder"),r.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new mp(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new Sh(this.locale),o=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",o.if("errorText","ck-labeled-field-view__status_error"),o.if("_statusText","ck-hidden",(e=>!e))],id:e,role:o.if("errorText","alert")},children:[{text:o.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}var wp=o(6985),_p={attributes:{"data-cke":!0}};_p.setAttributes=Wr(),_p.insert=qr().bind(null,"head"),_p.domAPI=Lr(),_p.insertStyleElement=Ur();Or()(wp.Z,_p);wp.Z&&wp.Z.locals&&wp.Z.locals;class yp extends Sh{constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.focusTracker=new Ar,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),inputmode:t.to("inputMode"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,o)=>{this._setDomElementValue(o),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}class Ap extends yp{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class Cp extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():b("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var vp=o(3488),xp={attributes:{"data-cke":!0}};xp.setAttributes=Wr(),xp.insert=qr().bind(null,"head"),xp.domAPI=Lr(),xp.insertStyleElement=Ur();Or()(vp.Z,xp);vp.Z&&vp.Z.locals&&vp.Z.locals;class Ep extends Sh{constructor(e,t,o){super(e);const n=this.bindTemplate;this.buttonView=t,this.panelView=o,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.keystrokes=new Cr,this.focusTracker=new Ar,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",(e=>!e))],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[t,o]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":n.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",((e,t,o)=>{o&&("auto"===this.panelPosition?this.panelView.position=Ep._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:o,southWest:n,northEast:r,northWest:i,southMiddleEast:s,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=Ep.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[o,n,s,a,e,r,i,l,c,t]:[n,o,a,s,e,i,r,c,l,t]}}Ep.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},Ep._getOptimalPosition=Kn;const Dp='';class Sp extends op{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Xh;return e.content=Dp,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class Tp{constructor(e){if(this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let o=e.actions[t];"string"==typeof o&&(o=[o]);for(const n of o)e.keystrokeHandler.set(n,((e,o)=>{this[t](),o()}))}}get first(){return this.focusables.find(Bp)||null}get last(){return this.focusables.filter(Bp).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,o)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=o),n})),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,o=this.focusables.length;if(!o)return null;if(null===t)return this[1===e?"first":"last"];let n=(t+o+e)%o;do{const t=this.focusables.get(n);if(Bp(t))return t;n=(n+o+e)%o}while(n!==t);return null}}function Bp(e){return!(!e.focus||!Gn(e.element))}class Ip extends Sh{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Pp extends Sh{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}var Rp=o(5571),zp={attributes:{"data-cke":!0}};zp.setAttributes=Wr(),zp.insert=qr().bind(null,"head"),zp.domAPI=Lr(),zp.insertStyleElement=Ur();Or()(Rp.Z,zp);Rp.Z&&Rp.Z.locals&&Rp.Z.locals;const{threeVerticalDots:Mp}=uh,Np={alignLeft:uh.alignLeft,bold:uh.bold,importExport:uh.importExport,paragraph:uh.paragraph,plus:uh.plus,text:uh.text,threeVerticalDots:uh.threeVerticalDots};class Fp extends Sh{constructor(e,t){super(e);const o=this.bindTemplate,n=this.t;this.options=t||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Ar,this.keystrokes=new Cr,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new Op(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const r="rtl"===e.uiLanguageDirection;this._focusCycler=new Tp({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[r?"arrowright":"arrowleft","arrowup"],focusNext:[r?"arrowleft":"arrowright","arrowdown"]}});const i=["ck","ck-toolbar",o.to("class"),o.if("isCompact","ck-toolbar_compact")];var s;this.options.shouldGroupWhenFull&&this.options.isFloating&&i.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:i,role:"toolbar","aria-label":o.to("ariaLabel"),style:{maxWidth:o.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(s=this,s.bindTemplate.to((e=>{e.target===s.element&&e.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new Lp(this):new Vp(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,o){this.items.addMany(this._buildItemsFromConfig(e,t,o))}_buildItemsFromConfig(e,t,o){const n=function(e){return Array.isArray(e)?{items:e,removeItems:[]}:e?Object.assign({items:[],removeItems:[]},e):{items:[],removeItems:[]}}(e),r=o||n.removeItems;return this._cleanItemsConfiguration(n.items,t,r).map((e=>N(e)?this._createNestedToolbarDropdown(e,t,r):"|"===e?new Ip:"-"===e?new Pp:t.create(e))).filter((e=>!!e))}_cleanItemsConfiguration(e,t,o){const n=e.filter(((e,n,r)=>"|"===e||-1===o.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(b("toolbarview-line-break-ignored-when-grouping-items",r),!1):!(!N(e)&&!t.has(e))||(b("toolbarview-item-unavailable",{item:e}),!1))));return this._cleanSeparatorsAndLineBreaks(n)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,o=e.length,n=e.findIndex(t);if(-1===n)return[];const r=o-e.slice().reverse().findIndex(t);return e.slice(n,r).filter(((e,o,n)=>{if(t(e))return!0;return!(o>0&&n[o-1]===e)}))}_createNestedToolbarDropdown(e,t,o){let{label:n,icon:r,items:i,tooltip:s=!0,withText:a=!1}=e;if(i=this._cleanItemsConfiguration(i,t,o),!i.length)return null;const l=Xp(this.locale);return n||b("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:n,tooltip:s,withText:!!a}),!1!==r?l.buttonView.icon=Np[r]||r||Mp:l.buttonView.withText=!0,eg(l,(()=>l.toolbarView._buildItemsFromConfig(i,t,o))),l}}class Op extends Sh{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Vp{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>e)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Lp{constructor(e){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("change",this._updateFocusCycleableItems.bind(this)),e.children.on("change",this._updateFocusCycleableItems.bind(this)),e.items.on("change",((e,t)=>{const o=t.index,n=Array.from(t.added);for(const e of t.removed)o>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=o;ethis.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!Gn(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,o=new Fn(e.lastChild),n=new Fn(e);if(!this.cachedPadding){const o=In.window.getComputedStyle(e),n="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(o[n])}return"ltr"===t?o.right>n.right-this.cachedPadding:o.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Ip),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,o=Xp(e);return o.class="ck-toolbar__grouped-dropdown",o.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",eg(o,this.groupedItems),o.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:Mp}),o}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}var jp=o(1162),qp={attributes:{"data-cke":!0}};qp.setAttributes=Wr(),qp.insert=qr().bind(null,"head"),qp.domAPI=Lr(),qp.insertStyleElement=Ur();Or()(jp.Z,qp);jp.Z&&jp.Z.locals&&jp.Z.locals;class Hp extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.items=this.createCollection(),this.focusTracker=new Ar,this.keystrokes=new Cr,this._focusCycler=new Tp({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel")},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class Wp extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))],role:"presentation"},children:this.children})}focus(){this.children.first.focus()}}class $p extends Sh{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var Up=o(66),Gp={attributes:{"data-cke":!0}};Gp.setAttributes=Wr(),Gp.insert=qr().bind(null,"head"),Gp.domAPI=Lr(),Gp.insertStyleElement=Ur();Or()(Up.Z,Gp);Up.Z&&Up.Z.locals&&Up.Z.locals;class Kp extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new Cr,this.focusTracker=new Ar,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",t.to("class"),t.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){const e=new op;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){const e=new op,t=e.bindTemplate;return e.icon=Dp,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}var Zp=o(5075),Jp={attributes:{"data-cke":!0}};Jp.setAttributes=Wr(),Jp.insert=qr().bind(null,"head"),Jp.domAPI=Lr(),Jp.insertStyleElement=Ur();Or()(Zp.Z,Jp);Zp.Z&&Zp.Z.locals&&Zp.Z.locals;var Qp=o(6875),Yp={attributes:{"data-cke":!0}};Yp.setAttributes=Wr(),Yp.insert=qr().bind(null,"head"),Yp.domAPI=Lr(),Yp.insertStyleElement=Ur();Or()(Qp.Z,Yp);Qp.Z&&Qp.Z.locals&&Qp.Z.locals;function Xp(e,t=Sp){const o=new t(e),n=new Cp(e),r=new Ep(e,o,n);return o.bind("isEnabled").to(r),o instanceof Kp?o.arrowView.bind("isOn").to(r,"isOpen"):o.bind("isOn").to(r,"isOpen"),function(e){(function(e){e.on("render",(()=>{yh({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})}))})(e),function(e){e.on("execute",(t=>{t.source instanceof ip||(e.isOpen=!1)}))}(e),function(e){e.focusTracker.on("change:isFocused",((t,o,n)=>{e.isOpen&&!n&&(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",((t,o)=>{e.isOpen&&(e.panelView.focus(),o())})),e.keystrokes.set("arrowup",((t,o)=>{e.isOpen&&(e.panelView.focusLast(),o())}))}(e),function(e){e.on("change:isOpen",((t,o,n)=>{if(n)return;const r=e.panelView.element;r&&r.contains(In.document.activeElement)&&e.buttonView.focus()}))}(e),function(e){e.on("change:isOpen",((t,o,n)=>{n&&e.panelView.focus()}),{priority:"low"})}(e)}(r),r}function eg(e,t,o={}){e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?tg(e,t,o):e.once("change:isOpen",(()=>tg(e,t,o)),{priority:"highest"}),o.enableActiveItemFocusOnDropdownOpen&&rg(e,(()=>e.toolbarView.items.find((e=>e.isOn))))}function tg(e,t,o){const n=e.locale,r=n.t,i=e.toolbarView=new Fp(n),s="function"==typeof t?t():t;i.ariaLabel=o.ariaLabel||r("Dropdown toolbar"),o.maxWidth&&(i.maxWidth=o.maxWidth),o.class&&(i.class=o.class),o.isCompact&&(i.isCompact=o.isCompact),o.isVertical&&(i.isVertical=!0),s instanceof xh?i.items.bindTo(s).using((e=>e)):i.items.addMany(s),e.panelView.children.add(i),i.items.delegate("execute").to(e)}function og(e,t,o={}){e.isOpen?ng(e,t,o):e.once("change:isOpen",(()=>ng(e,t,o)),{priority:"highest"}),rg(e,(()=>e.listView.items.find((e=>e instanceof Wp&&e.children.first.isOn))))}function ng(e,t,o){const n=e.locale,r=e.listView=new Hp(n),i="function"==typeof t?t():t;r.ariaLabel=o.ariaLabel,r.role=o.role,r.items.bindTo(i).using((e=>{if("separator"===e.type)return new $p(n);if("button"===e.type||"switchbutton"===e.type){const t=new Wp(n);let o;return o="button"===e.type?new op(n):new ip(n),o.bind(...Object.keys(e.model)).to(e.model),o.delegate("execute").to(t),t.children.add(o),t}return null})),e.panelView.children.add(r),r.items.delegate("execute").to(e)}function rg(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const o=t();o&&("function"==typeof o.focus?o.focus():b("ui-dropdown-focus-child-on-open-child-missing-focus",{view:o}))}),{priority:p.low-10})}function ig(e,t,o){const n=new Ap(e.locale);return n.set({id:t,ariaDescribedById:o}),n.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),n.bind("hasError").to(e,"errorText",(e=>!!e)),n.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(n),n}function sg(e,t,o){const n=Xp(e.locale);return n.set({id:t,ariaDescribedById:o}),n.bind("isEnabled").to(e),n}const ag=(e,t=0,o=1)=>e>o?o:eMath.round(o*e)/o,cg=(Math.PI,e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?lg(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?lg(parseInt(e.substring(6,8),16)/255,2):1})),dg=({h:e,s:t,v:o,a:n})=>{const r=(200-t)*o/100;return{h:lg(e),s:lg(r>0&&r<200?t*o/100/(r<=100?r:200-r)*100:0),l:lg(r/2),a:lg(n,2)}},ug=e=>{const{h:t,s:o,l:n}=dg(e);return`hsl(${t}, ${o}%, ${n}%)`},hg=({h:e,s:t,v:o,a:n})=>{e=e/360*6,t/=100,o/=100;const r=Math.floor(e),i=o*(1-t),s=o*(1-(e-r)*t),a=o*(1-(1-e+r)*t),l=r%6;return{r:lg(255*[o,s,i,i,a,o][l]),g:lg(255*[a,o,o,s,i,i][l]),b:lg(255*[i,i,a,o,o,s][l]),a:lg(n,2)}},pg=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},gg=({r:e,g:t,b:o,a:n})=>{const r=n<1?pg(lg(255*n)):"";return"#"+pg(e)+pg(t)+pg(o)+r},mg=({r:e,g:t,b:o,a:n})=>{const r=Math.max(e,t,o),i=r-Math.min(e,t,o),s=i?r===e?(t-o)/i:r===t?2+(o-e)/i:4+(e-t)/i:0;return{h:lg(60*(s<0?s+6:s)),s:lg(r?i/r*100:0),v:lg(r/255*100),a:n}},fg=(e,t)=>{if(e===t)return!0;for(const o in e)if(e[o]!==t[o])return!1;return!0},bg={},kg=e=>{let t=bg[e];return t||(t=document.createElement("template"),t.innerHTML=e,bg[e]=t),t},wg=(e,t,o)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))};let _g=!1;const yg=e=>"touches"in e,Ag=(e,t)=>{const o=yg(t)?t.touches[0]:t,n=e.el.getBoundingClientRect();wg(e.el,"move",e.getMove({x:ag((o.pageX-(n.left+window.pageXOffset))/n.width),y:ag((o.pageY-(n.top+window.pageYOffset))/n.height)}))};class Cg{constructor(e,t,o,n){const r=kg(`
`);e.appendChild(r.content.cloneNode(!0));const i=e.querySelector(`[part=${t}]`);i.addEventListener("mousedown",this),i.addEventListener("touchstart",this),i.addEventListener("keydown",this),this.el=i,this.xy=n,this.nodes=[i.firstChild,i]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(_g?"touchmove":"mousemove",this),t(_g?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(_g&&!yg(e)||(_g||(_g=yg(e)),0)))(e)||!_g&&0!=e.button)return;this.el.focus(),Ag(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),Ag(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const o=t.keyCode;o>40||e.xy&&o<37||o<33||(t.preventDefault(),wg(e.el,"move",e.getMove({x:39===o?.01:37===o?-.01:34===o?.05:33===o?-.05:35===o?1:36===o?-1:0,y:40===o?.01:38===o?-.01:0},!0)))})(this,e)}}style(e){e.forEach(((e,t)=>{for(const o in e)this.nodes[t].style.setProperty(o,e[o])}))}}class vg extends Cg{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:e/360*100+"%",color:ug({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${lg(e)}`)}getMove(e,t){return{h:t?ag(this.h+360*e.x,0,360):360*e.x}}}class xg extends Cg{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:ug(e)},{"background-color":ug({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${lg(e.s)}%, Brightness ${lg(e.v)}%`)}getMove(e,t){return{s:t?ag(this.hsva.s+100*e.x,0,100):100*e.x,v:t?ag(this.hsva.v-100*e.y,0,100):Math.round(100-100*e.y)}}}const Eg=Symbol("same"),Dg=Symbol("color"),Sg=Symbol("hsva"),Tg=Symbol("update"),Bg=Symbol("parts"),Ig=Symbol("css"),Pg=Symbol("sliders");class Rg extends HTMLElement{static get observedAttributes(){return["color"]}get[Ig](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[Pg](){return[xg,vg]}get color(){return this[Dg]}set color(e){if(!this[Eg](e)){const t=this.colorModel.toHsva(e);this[Tg](t),this[Dg]=e}}constructor(){super();const e=kg(``),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[Bg]=this[Pg].map((e=>new e(t)))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,o){const n=this.colorModel.fromAttr(o);this[Eg](n)||(this.color=n)}handleEvent(e){const t=this[Sg],o={...t,...e.detail};let n;this[Tg](o),fg(o,t)||this[Eg](n=this.colorModel.fromHsva(o))||(this[Dg]=n,wg(this,"color-changed",{value:n}))}[Eg](e){return this.color&&this.colorModel.equal(e,this.color)}[Tg](e){this[Sg]=e,this[Bg].forEach((t=>t.update(e)))}}const zg={defaultColor:"#000",toHsva:e=>mg(cg(e)),fromHsva:({h:e,s:t,v:o})=>gg(hg({h:e,s:t,v:o,a:1})),equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||fg(cg(e),cg(t)),fromAttr:e=>e};class Mg extends Rg{get colorModel(){return zg}}customElements.define("hex-color-picker",class extends Mg{});var Ng=o(2191),Fg={attributes:{"data-cke":!0}};Fg.setAttributes=Wr(),Fg.insert=qr().bind(null,"head"),Fg.domAPI=Lr(),Fg.insertStyleElement=Ur();Or()(Ng.Z,Fg);Ng.Z&&Ng.Z.locals&&Ng.Z.locals;class Og{constructor(e){this._components=new Map,this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(Vg(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new f("componentfactory-item-missing",this,{name:e});return this._components.get(Vg(e)).callback(this.editor.locale)}has(e){return this._components.has(Vg(e))}}function Vg(e){return String(e).toLowerCase()}var Lg=o(8245),jg={attributes:{"data-cke":!0}};jg.setAttributes=Wr(),jg.insert=qr().bind(null,"head"),jg.domAPI=Lr(),jg.insertStyleElement=Ur();Or()(Lg.Z,jg);Lg.Z&&Lg.Z.locals&&Lg.Z.locals;const qg=Hn("px"),Hg=In.document.body;class Wg extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",qg),left:t.to("left",qg)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=Wg.defaultPositions,o=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:Hg,fitInViewport:!0},e),n=Wg._getOptimalPosition(o),r=parseInt(n.left),i=parseInt(n.top),s=n.name,a=n.config||{},{withArrow:l=!0}=a;this.top=i,this.left=r,this.position=s,this.withArrow=l}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=$g(e.target),o=e.limiter?$g(e.limiter):Hg;this.listenTo(In.document,"scroll",((n,r)=>{const i=r.target,s=t&&i.contains(t),a=o&&i.contains(o);!s&&!a&&t&&o||this.attachTo(e)}),{useCapture:!0}),this.listenTo(In.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(In.document,"scroll"),this.stopListening(In.window,"resize")}}function $g(e){return _n(e)?e:zn(e)?e.commonAncestorContainer:"function"==typeof e?$g(e()):null}function Ug(e={}){const{sideOffset:t=Wg.arrowSideOffset,heightOffset:o=Wg.arrowHeightOffset,stickyVerticalOffset:n=Wg.stickyVerticalOffset,config:r}=e;return{northWestArrowSouthWest:(e,o)=>({top:i(e,o),left:e.left-t,name:"arrow_sw",...r&&{config:r}}),northWestArrowSouthMiddleWest:(e,o)=>({top:i(e,o),left:e.left-.25*o.width-t,name:"arrow_smw",...r&&{config:r}}),northWestArrowSouth:(e,t)=>({top:i(e,t),left:e.left-t.width/2,name:"arrow_s",...r&&{config:r}}),northWestArrowSouthMiddleEast:(e,o)=>({top:i(e,o),left:e.left-.75*o.width+t,name:"arrow_sme",...r&&{config:r}}),northWestArrowSouthEast:(e,o)=>({top:i(e,o),left:e.left-o.width+t,name:"arrow_se",...r&&{config:r}}),northArrowSouthWest:(e,o)=>({top:i(e,o),left:e.left+e.width/2-t,name:"arrow_sw",...r&&{config:r}}),northArrowSouthMiddleWest:(e,o)=>({top:i(e,o),left:e.left+e.width/2-.25*o.width-t,name:"arrow_smw",...r&&{config:r}}),northArrowSouth:(e,t)=>({top:i(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...r&&{config:r}}),northArrowSouthMiddleEast:(e,o)=>({top:i(e,o),left:e.left+e.width/2-.75*o.width+t,name:"arrow_sme",...r&&{config:r}}),northArrowSouthEast:(e,o)=>({top:i(e,o),left:e.left+e.width/2-o.width+t,name:"arrow_se",...r&&{config:r}}),northEastArrowSouthWest:(e,o)=>({top:i(e,o),left:e.right-t,name:"arrow_sw",...r&&{config:r}}),northEastArrowSouthMiddleWest:(e,o)=>({top:i(e,o),left:e.right-.25*o.width-t,name:"arrow_smw",...r&&{config:r}}),northEastArrowSouth:(e,t)=>({top:i(e,t),left:e.right-t.width/2,name:"arrow_s",...r&&{config:r}}),northEastArrowSouthMiddleEast:(e,o)=>({top:i(e,o),left:e.right-.75*o.width+t,name:"arrow_sme",...r&&{config:r}}),northEastArrowSouthEast:(e,o)=>({top:i(e,o),left:e.right-o.width+t,name:"arrow_se",...r&&{config:r}}),southWestArrowNorthWest:e=>({top:s(e),left:e.left-t,name:"arrow_nw",...r&&{config:r}}),southWestArrowNorthMiddleWest:(e,o)=>({top:s(e),left:e.left-.25*o.width-t,name:"arrow_nmw",...r&&{config:r}}),southWestArrowNorth:(e,t)=>({top:s(e),left:e.left-t.width/2,name:"arrow_n",...r&&{config:r}}),southWestArrowNorthMiddleEast:(e,o)=>({top:s(e),left:e.left-.75*o.width+t,name:"arrow_nme",...r&&{config:r}}),southWestArrowNorthEast:(e,o)=>({top:s(e),left:e.left-o.width+t,name:"arrow_ne",...r&&{config:r}}),southArrowNorthWest:e=>({top:s(e),left:e.left+e.width/2-t,name:"arrow_nw",...r&&{config:r}}),southArrowNorthMiddleWest:(e,o)=>({top:s(e),left:e.left+e.width/2-.25*o.width-t,name:"arrow_nmw",...r&&{config:r}}),southArrowNorth:(e,t)=>({top:s(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...r&&{config:r}}),southArrowNorthMiddleEast:(e,o)=>({top:s(e),left:e.left+e.width/2-.75*o.width+t,name:"arrow_nme",...r&&{config:r}}),southArrowNorthEast:(e,o)=>({top:s(e),left:e.left+e.width/2-o.width+t,name:"arrow_ne",...r&&{config:r}}),southEastArrowNorthWest:e=>({top:s(e),left:e.right-t,name:"arrow_nw",...r&&{config:r}}),southEastArrowNorthMiddleWest:(e,o)=>({top:s(e),left:e.right-.25*o.width-t,name:"arrow_nmw",...r&&{config:r}}),southEastArrowNorth:(e,t)=>({top:s(e),left:e.right-t.width/2,name:"arrow_n",...r&&{config:r}}),southEastArrowNorthMiddleEast:(e,o)=>({top:s(e),left:e.right-.75*o.width+t,name:"arrow_nme",...r&&{config:r}}),southEastArrowNorthEast:(e,o)=>({top:s(e),left:e.right-o.width+t,name:"arrow_ne",...r&&{config:r}}),westArrowEast:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.left-t.width-o,name:"arrow_e",...r&&{config:r}}),eastArrowWest:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.right+o,name:"arrow_w",...r&&{config:r}}),viewportStickyNorth:(e,t,o)=>e.getIntersection(o)?{top:o.top+n,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...r}}:null};function i(e,t){return e.top-t.height-o}function s(e){return e.bottom+o}}Wg.arrowSideOffset=25,Wg.arrowHeightOffset=10,Wg.stickyVerticalOffset=20,Wg._getOptimalPosition=Kn,Wg.defaultPositions=Ug();var Gg=o(9948),Kg={attributes:{"data-cke":!0}};Kg.setAttributes=Wr(),Kg.insert=qr().bind(null,"head"),Kg.domAPI=Lr(),Kg.insertStyleElement=Ur();Or()(Gg.Z,Kg);Gg.Z&&Gg.Z.locals&&Gg.Z.locals;const Zg="ck-tooltip";class Jg extends(Dn()){constructor(e){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver=null,Jg._editors.add(e),Jg._instance)return Jg._instance;Jg._instance=this,this.tooltipTextView=new Sh(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new Wg(e.locale),this.balloonPanelView.class=Zg,this.balloonPanelView.content.add(this.tooltipTextView),this._pinTooltipDebounced=La(this._pinTooltip,600),this.listenTo(In.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(In.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(In.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(In.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(In.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;Jg._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),Jg._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Jg._instance=null)}static getPositioningFunctions(e){const t=Jg.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onEnterOrFocus(e,{target:t}){const o=Qg(t);var n;o&&(o!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(o,{text:(n=o).dataset.ckeTooltipText,position:n.dataset.ckeTooltipPosition||"s",cssClass:n.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(e,{target:t,relatedTarget:o}){if("mouseleave"===e.name){if(!_n(t))return;if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const e=Qg(t),n=Qg(o);e&&e!==n&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:o,cssClass:n}){const r=yr(Jg._editors.values()).ui.view.body;r.has(this.balloonPanelView)||r.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.pin({target:e,positions:Jg.getPositioningFunctions(o)}),this._resizeObserver=new jn(e,(()=>{Gn(e)||this._unpinTooltip()})),this.balloonPanelView.class=[Zg,n].filter((e=>e)).join(" ");for(const e of Jg._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=o}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of Jg._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver&&this._resizeObserver.destroy()}_updateTooltipPosition(){Gn(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Jg.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}}function Qg(e){return _n(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}Jg.defaultBalloonPositions=Ug({heightOffset:5,sideOffset:13}),Jg._editors=new Set,Jg._instance=null;const Yg=50,Xg=350,em="Powered by",tm={top:-99999,left:-99999,name:"invalid",config:{withArrow:!1}};class om extends(Dn()){constructor(e){super(),this.editor=e,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=fh(this._showBalloon.bind(this),50,{leading:!0}),e.on("ready",this._handleEditorReady.bind(this))}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;"VALID"!==function(e){function t(e){return e.match(/^[a-zA-Z0-9+/=$]+$/g)&&e.length>=40&&e.length<=255?"VALID":"INVALID"}let o="",n="";if(!e)return"INVALID";try{o=atob(e)}catch(e){return"INVALID"}const r=o.split("-"),i=r[0],s=r[1];if(!s)return t(e);try{atob(s)}catch(o){try{if(atob(i),!atob(i).length)return t(e)}catch(o){return t(e)}}if(i.length<40||i.length>255)return"INVALID";try{atob(i)}catch(e){return"INVALID"}try{n=atob(s)}catch(e){return"INVALID"}if(8!==n.length)return"INVALID";const a=Number(n.substring(0,4)),l=Number(n.substring(4,6))-1,c=Number(n.substring(6,8)),d=new Date(a,l,c);return d{this._updateLastFocusedEditableElement(),o?this._showBalloon():this._hideBalloon()})),e.ui.focusTracker.on("change:focusedElement",((e,t,o)=>{this._updateLastFocusedEditableElement(),o&&this._showBalloon()})),e.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const e=this.editor,t=this._balloonView=new Wg,o=im(e),n=new nm(e.locale,o.label);t.content.add(n),t.set({class:"ck-powered-by-balloon"}),e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this._balloonView=t}_showBalloon(){if(!this._lastFocusedEditableElement)return;const e=function(e,t){const o=im(e),n="right"===o.side?function(e,t){return rm(e,t,((e,o)=>e.left+e.width-o.width-t.horizontalOffset))}(t,o):function(e,t){return rm(e,t,(e=>e.left+t.horizontalOffset))}(t,o);return{target:t,positions:[n]}}(this.editor,this._lastFocusedEditableElement);e&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,o=e.ui.focusTracker.focusedElement;if(!t||!o)return void(this._lastFocusedEditableElement=null);const n=Array.from(e.ui.getEditableElementsNames()).map((t=>e.ui.getEditableElement(t)));n.includes(o)?this._lastFocusedEditableElement=o:this._lastFocusedEditableElement=n[0]}}class nm extends Sh{constructor(e,t){super(e);const o=new Xh,n=this.bindTemplate;o.set({content:'\n',isColorInherited:!1}),o.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],o],on:{dragstart:n.to((e=>e.preventDefault()))}}]})}}function rm(e,t,o){return(n,r)=>{const i=n.getVisible();if(!i)return tm;if(n.widthe.bottom)return tm}}return{top:s,left:a,name:`position_${t.position}-side_${t.side}`,config:{withArrow:!1}}}}function im(e){const t=e.config.get("ui.poweredBy"),o=t&&t.position||"border";return{position:o,label:em,verticalOffset:"inside"===o?5:0,horizontalOffset:5,side:"ltr"===e.locale.contentLanguageDirection?"right":"left",...t}}class sm extends(H()){constructor(e){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this.editor=e,this.componentFactory=new Og(e),this.focusTracker=new Ar,this.tooltipManager=new Jg(e),this.poweredBy=new om(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(e.editing.view.document,"layoutChanged",(()=>this.update())),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const o=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?o():this.once("ready",o)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const o=e.config.get("toolbar.viewportTopOffset");return o?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:o}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let o,n;e.keystrokes.set("Alt+F10",((e,r)=>{const i=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(i)&&!Array.from(t.domRoots.values()).includes(i)&&(o=i);const s=this._getCurrentFocusedToolbarDefinition();s&&n||(n=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e{const r=this._getCurrentFocusedToolbarDefinition();r&&(o?(o.focus(),o=null):e.editing.view.focus(),r.options.afterBlur&&r.options.afterBlur(),n())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:o,options:n}=t;(Gn(o.element)||n.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>am(e)-am(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:o}}=e;return o&&o(),!!Gn(t.element)&&(t.focus(),!0)}}function am(e){const{toolbarView:t,options:o}=e;let n=10;return Gn(t.element)&&n--,o.isContextual&&n--,n}var lm=o(4547),cm={attributes:{"data-cke":!0}};cm.setAttributes=Wr(),cm.insert=qr().bind(null,"head"),cm.domAPI=Lr(),cm.insertStyleElement=Ur();Or()(lm.Z,cm);lm.Z&&lm.Z.locals&&lm.Z.locals;class dm extends Sh{constructor(e){super(e),this.body=new Jh(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class um extends Sh{constructor(e,t,o){super(e),this.name=null,this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=o,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((o=>{const n=e.document.getRoot(t.name);o.addClass(t.isFocused?"ck-focused":"ck-blurred",n),o.removeClass(t.isFocused?"ck-blurred":"ck-focused",n)}))}e.isRenderingInProgress?function o(n){e.once("change:isRenderingInProgress",((e,r,i)=>{i?o(n):t(n)}))}(this):t(this)}}class hm extends um{constructor(e,t,o,n={}){super(e,t,o);const r=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=n.label||(()=>r("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const o=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),o)}))}}var pm=o(5523),gm={attributes:{"data-cke":!0}};gm.setAttributes=Wr(),gm.insert=qr().bind(null,"head"),gm.domAPI=Lr(),gm.insertStyleElement=Ur();Or()(pm.Z,gm);pm.Z&&pm.Z.locals&&pm.Z.locals;class mm extends Sh{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",o.to("class")]},children:this.children});const n=new Sh(e);n.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"]},children:[{text:o.to("label")}]}),this.children.add(n)}}class fm extends Nr{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class bm extends(H()){constructor(e,t){super(),t&&va(this,t),e&&this.set(e)}}var km=o(1757),wm={attributes:{"data-cke":!0}};wm.setAttributes=Wr(),wm.insert=qr().bind(null,"head"),wm.domAPI=Lr(),wm.insertStyleElement=Ur();Or()(km.Z,wm);km.Z&&km.Z.locals&&km.Z.locals;var _m=o(3553),ym={attributes:{"data-cke":!0}};ym.setAttributes=Wr(),ym.insert=qr().bind(null,"head"),ym.domAPI=Lr(),ym.insertStyleElement=Ur();Or()(_m.Z,ym);_m.Z&&_m.Z.locals&&_m.Z.locals;const Am=Hn("px");class Cm extends Br{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new f("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const o=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),o.set(e.view,e),this._viewToStack.set(e.view,o),o===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new f("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new f("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new Wg(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new vm(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,o)=>{if(o<2)return"";const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[n,o])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new xm(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:o=!0,singleViewMode:n=!1}){this.view.class=t,this.view.withArrow=o,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),n&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class vm extends Sh{constructor(e){super(e);const t=e.t,o=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Ar,this.buttonPrevView=this._createButtonView(t("Previous"),''),this.buttonNextView=this._createButtonView(t("Next"),''),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",o.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:o.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const o=new op(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o}}class xm extends Sh{constructor(e,t){super(e);const o=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",o.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:o.to("top",Am),left:o.to("left",Am),width:o.to("width",Am),height:o.to("height",Am)}},children:this.content}),this.on("change:numberOfPanels",((e,t,o,n)=>{o>n?this._addPanels(o-n):this._removePanels(n-o),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new Sh;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:o,height:n}=new Fn(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:o,height:n})}}}var Em=o(3609),Dm={attributes:{"data-cke":!0}};Dm.setAttributes=Wr(),Dm.insert=qr().bind(null,"head"),Dm.domAPI=Lr(),Dm.insertStyleElement=Ur();Or()(Em.Z,Dm);Em.Z&&Em.Z.locals&&Em.Z.locals,Hn("px");Hn("px");var Sm=o(6706),Tm={attributes:{"data-cke":!0}};Tm.setAttributes=Wr(),Tm.insert=qr().bind(null,"head"),Tm.domAPI=Lr(),Tm.insertStyleElement=Ur();Or()(Sm.Z,Tm);Sm.Z&&Sm.Z.locals&&Sm.Z.locals,Hn("px");Hn("px");const{pilcrow:Bm}=uh;class Im extends sm{constructor(e,t){super(e),this.view=t}init(){const e=this.editor,t=this.view,o=e.editing.view,n=t.editable,r=o.document.getRoot();n.name=r.rootName,t.render();const i=n.element;this.setEditableElement(n.name,i),t.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(i),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){super.destroy();const e=this.view;this.editor.editing.view.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.editor,t=this.view;t.toolbar.fillFromConfig(e.config.get("toolbar"),this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,o=t.document.getRoot(),n=(e.sourceElement,e.config.get("placeholder"));if(n){const e="string"==typeof n?n:n[o.rootName];e&&Jr({view:t,element:o,text:e,isDirectHost:!1,keepOnFocus:!0})}}}class Pm extends dm{constructor(e,t,o={}){super(e);const n=e.t;this.toolbar=new Fp(e,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),this.editable=new hm(e,t,o.editableElement,{label:e=>n("Rich Text Editor. Editing area: %0",e.name)}),this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}})}render(){super.render(),this.registerChild([this.toolbar,this.editable])}}class Rm extends(lh(ch(ah))){constructor(e,t={}){if(!zm(e)&&void 0!==t.initialData)throw new f("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return zm(e)?(t=e,t instanceof HTMLTextAreaElement?t.value:t.innerHTML):e;var t}(e)),zm(e)&&(this.sourceElement=e,function(e,t){if(t.ckeditorInstance)throw new f("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}(this,e)),this.model.document.createRoot();const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new Pm(this.locale,this.editing.view,{editableElement:this.sourceElement,shouldToolbarGroupWhenFull:o});this.ui=new Im(this,n)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(e)}))}static create(e,t={}){return new Promise((o=>{if(zm(e)&&"TEXTAREA"===e.tagName)throw new f("editor-wrong-element",null);const n=new this(e,t);o(n.initPlugins().then((()=>n.ui.init())).then((()=>n.data.init(n.config.get("initialData")))).then((()=>n.fire("ready"))).then((()=>n)))}))}}function zm(e){return _n(e)}Rm.Context=Mr,Rm.EditorWatchdog=bh,Rm.ContextWatchdog=class extends hh{constructor(e,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new wh,this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(kh,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=_h(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new bh(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((o,{error:n,causesRestart:r})=>{this._fire("itemError",{itemId:e.id,error:n}),r&&this._actionQueues.enqueue(e.id,(()=>new Promise((o=>{const n=()=>{t.off("restart",n),this._fire("itemRestart",{itemId:e.id}),o()};t.on("restart",n)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=_h(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(kh,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(kh,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=ph(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return mh(this._context,e.context)}};class Mm extends(S()){constructor(){super(...arguments),this._stack=[]}add(e,t){const o=this._stack,n=o[0];this._insertDescriptor(e);const r=o[0];n===r||Nm(n,r)||this.fire("change:top",{oldDescriptor:n,newDescriptor:r,writer:t})}remove(e,t){const o=this._stack,n=o[0];this._removeDescriptor(e);const r=o[0];n===r||Nm(n,r)||this.fire("change:top",{oldDescriptor:n,newDescriptor:r,writer:t})}_insertDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e.id));if(Nm(e,t[o]))return;o>-1&&t.splice(o,1);let n=0;for(;t[n]&&Fm(t[n],e);)n++;t.splice(n,0,e)}_removeDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e));o>-1&&t.splice(o,1)}}function Nm(e,t){return e&&t&&e.priority==t.priority&&Om(e.classes)==Om(t.classes)}function Fm(e,t){return e.priority>t.priority||!(e.priorityOm(t.classes)}function Om(e){return Array.isArray(e)?e.sort().join(","):e}const Vm="widget-type-around";function Lm(e,t,o){return!!e&&$m(e)&&!o.isInline(t)}function jm(e){return e.getAttribute(Vm)}const qm='',Hm="ck-widget",Wm="ck-widget_selected";function $m(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function Um(e,t,o={}){if(!e.is("containerElement"))throw new f("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(Hm,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=Qm,t.setCustomProperty("widgetLabel",[],e),o.label&&function(e,t){const o=e.getCustomProperty("widgetLabel");o.push(t)}(e,o.label),o.hasSelectionHandle&&function(e,t){const o=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),o=new Xh;return o.set("content",qm),o.render(),t.appendChild(o.element),t}));t.insert(t.createPositionAt(e,0),o),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),Zm(e,t),e}function Gm(e,t,o){if(t.classes&&o.addClass(mr(t.classes),e),t.attributes)for(const n in t.attributes)o.setAttribute(n,t.attributes[n],e)}function Km(e,t,o){if(t.classes&&o.removeClass(mr(t.classes),e),t.attributes)for(const n in t.attributes)o.removeAttribute(n,e)}function Zm(e,t,o=Gm,n=Km){const r=new Mm;r.on("change:top",((t,r)=>{r.oldDescriptor&&n(e,r.oldDescriptor,r.writer),r.newDescriptor&&o(e,r.newDescriptor,r.writer)}));t.setCustomProperty("addHighlight",((e,t,o)=>r.add(t,o)),e),t.setCustomProperty("removeHighlight",((e,t,o)=>r.remove(t,o)),e)}function Jm(e,t,o={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),o.label&&t.setAttribute("aria-label",o.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((o,n,r)=>{t.setAttribute("contenteditable",r?"false":"true",e)})),e.on("change:isFocused",((o,n,r)=>{r?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),Zm(e,t),e}function Qm(){return null}class Ym extends Br{static get pluginName(){return"OPMacroToc"}static get buttonName(){return"insertToc"}init(){const e=this.editor,t=e.model,o=e.conversion;t.schema.register("op-macro-toc",{allowWhere:"$block",isBlock:!0,isLimit:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"toc"},model:"op-macro-toc"}),o.for("editingDowncast").elementToElement({model:"op-macro-toc",view:(e,{writer:t})=>Um(this.createTocViewElement(t),t,{label:this.label})}),o.for("dataDowncast").elementToElement({model:"op-macro-toc",view:(e,{writer:t})=>this.createTocDataElement(t)}),e.ui.componentFactory.add(Ym.buttonName,(t=>{const o=new op(t);return o.set({label:this.label,withText:!0}),o.on("execute",(()=>{e.model.change((t=>{const o=t.createElement("op-macro-toc",{});e.model.insertContent(o,e.model.document.selection)}))})),o}))}get label(){return window.I18n.t("js.editor.macro.toc")}createTocViewElement(e){const t=e.createText(this.label),o=e.createContainerElement("div");return e.insert(e.createPositionAt(o,0),t),o}createTocDataElement(e){return e.createContainerElement("macro",{class:"toc"})}}const Xm=Symbol("isOPEmbeddedTable");function ef(e){const t=e.getSelectedElement();return!(!t||!function(e){return!!e.getCustomProperty(Xm)&&$m(e)}(t))}function tf(e){return _.get(e.config,"_config.openProject.context.resource")}function of(e){return _.get(e.config,"_config.openProject.pluginContext")}function nf(e,t){return of(e).services[t]}function rf(e){return nf(e,"pathHelperService")}class sf extends Br{static get pluginName(){return"EmbeddedTableEditing"}static get buttonName(){return"insertEmbeddedTable"}init(){const e=this.editor,t=e.model,o=e.conversion,n=of(e);this.text={button:window.I18n.t("js.editor.macro.embedded_table.button"),macro_text:window.I18n.t("js.editor.macro.embedded_table.text")},t.schema.register("op-macro-embedded-table",{allowWhere:"$block",allowAttributes:["opEmbeddedTableQuery"],isBlock:!0,isObject:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"embedded-table"},model:(e,{writer:t})=>{const o=e.getAttribute("data-query-props");return t.createElement("op-macro-embedded-table",{opEmbeddedTableQuery:o?JSON.parse(o):{}})}}),o.for("editingDowncast").elementToElement({model:"op-macro-embedded-table",view:(e,{writer:t})=>{return o=this.createEmbeddedTableView(t),n=t,this.label,n.setCustomProperty(Xm,!0,o),Um(o,n,{label:"your label here"});var o,n}}),o.for("dataDowncast").elementToElement({model:"op-macro-embedded-table",view:(e,{writer:t})=>this.createEmbeddedTableDataElement(e,t)}),e.ui.componentFactory.add(sf.buttonName,(t=>{const o=new op(t);return o.set({label:this.text.button,withText:!0}),o.on("execute",(()=>n.runInZone((()=>{n.services.externalQueryConfiguration.show({currentQuery:{},callback:t=>e.model.change((o=>{const n=o.createElement("op-macro-embedded-table",{opEmbeddedTableQuery:t});e.model.insertContent(n,e.model.document.selection)}))})})))),o}))}createEmbeddedTableView(e){const t=e.createText(this.text.macro_text),o=e.createContainerElement("div");return e.insert(e.createPositionAt(o,0),t),o}createEmbeddedTableDataElement(e,t){const o=e.getAttribute("opEmbeddedTableQuery")||{};return t.createContainerElement("macro",{class:"embedded-table","data-query-props":JSON.stringify(o)})}}class af{constructor(e,t=20){this._batch=null,this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}class lf extends Pr{constructor(e,t){super(e),this._buffer=new af(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,o=t.document,n=e.text||"",r=n.length;let i=o.selection;if(e.selection?i=e.selection:e.range&&(i=t.createSelection(e.range)),!t.canEditAt(i))return;const s=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock(),t.deleteContent(i),n&&t.insertContent(e.createText(n,o.selection.getAttributes()),i),s?e.setSelection(s):i.is("documentSelection")||e.setSelection(i),this._buffer.unlock(),this._buffer.input(r)}))}}const cf=["insertText","insertReplacementText"];class df extends Aa{constructor(e){super(e),n.isAndroid&&cf.push("insertCompositionText");const t=e.document;t.on("beforeinput",((o,n)=>{if(!this.isEnabled)return;const{data:r,targetRanges:i,inputType:s,domEvent:a}=n;if(!cf.includes(s))return;const l=new d(t,"insertText");t.fire(l,new xa(e,a,{text:r,selection:e.createSelection(i)})),l.stop.called&&o.stop()})),t.on("compositionend",((o,{data:r,domEvent:i})=>{this.isEnabled&&!n.isAndroid&&r&&t.fire("insertText",new xa(e,i,{text:r,selection:t.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class uf extends Br{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,o=e.editing.view,r=t.document.selection;o.addObserver(df);const i=new lf(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",i),e.commands.add("input",i),this.listenTo(o.document,"insertText",((r,i)=>{o.document.isComposing||i.preventDefault();const{text:s,selection:a,resultRange:l}=i,c=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));let d=s;if(n.isAndroid){const e=Array.from(c[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");e&&(e.length<=d.length?d.startsWith(e)&&(d=d.substring(e.length),c[0].start=c[0].start.getShiftedBy(e.length)):e.startsWith(d)&&(c[0].start=c[0].start.getShiftedBy(d.length),d=""))}const u={text:d,selection:t.createSelection(c)};l&&(u.resultRange=e.editing.mapper.toModelRange(l)),e.execute("insertText",u)})),n.isAndroid?this.listenTo(o.document,"keydown",((e,n)=>{!r.isCollapsed&&229==n.keyCode&&o.document.isComposing&&hf(t,i)})):this.listenTo(o.document,"compositionstart",(()=>{r.isCollapsed||hf(t,i)}))}}function hf(e,t){if(!t.isEnabled)return;const o=t.buffer;o.lock(),e.enqueueChange(o.batch,(()=>{e.deleteContent(e.document.selection)})),o.unlock()}class pf extends Pr{constructor(e,t){super(e),this.direction=t,this._buffer=new af(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,o=t.document;t.enqueueChange(this._buffer.batch,(n=>{this._buffer.lock();const r=n.createSelection(e.selection||o.selection);if(!t.canEditAt(r))return;const i=e.sequence||1,s=r.isCollapsed;if(r.isCollapsed&&t.modifySelection(r,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(i))return void this._replaceEntireContentWithParagraph(n);if(this._shouldReplaceFirstBlockWithParagraph(r,i))return void this.editor.execute("paragraph",{selection:r});if(r.isCollapsed)return;let a=0;r.getFirstRange().getMinimalFlatRanges().forEach((e=>{a+=Z(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(r,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),n.setSelection(r),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,o=t.document.selection,n=t.schema.getLimitElement(o);if(!(o.isCollapsed&&o.containsEntireContent(n)))return!1;if(!t.schema.checkChild(n,"paragraph"))return!1;const r=n.getChild(0);return!r||!r.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,o=t.document.selection,n=t.schema.getLimitElement(o),r=e.createElement("paragraph");e.remove(e.createRangeIn(n)),e.insert(r,n),e.setSelection(r,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const o=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const n=e.getFirstPosition(),r=o.schema.getLimitElement(n),i=r.getChild(0);return n.parent==i&&(!!e.containsEntireContent(i)&&(!!o.schema.checkChild(r,"paragraph")&&"paragraph"!=i.name))}}const gf="word",mf="selection",ff="backward",bf="forward",kf={deleteContent:{unit:mf,direction:ff},deleteContentBackward:{unit:"codePoint",direction:ff},deleteWordBackward:{unit:gf,direction:ff},deleteHardLineBackward:{unit:mf,direction:ff},deleteSoftLineBackward:{unit:mf,direction:ff},deleteContentForward:{unit:"character",direction:bf},deleteWordForward:{unit:gf,direction:bf},deleteHardLineForward:{unit:mf,direction:bf},deleteSoftLineForward:{unit:mf,direction:bf}};class wf extends Aa{constructor(e){super(e);const t=e.document;let o=0;t.on("keydown",(()=>{o++})),t.on("keyup",(()=>{o=0})),t.on("beforeinput",((r,i)=>{if(!this.isEnabled)return;const{targetRanges:s,domEvent:a,inputType:l}=i,c=kf[l];if(!c)return;const d={direction:c.direction,unit:c.unit,sequence:o};d.unit==mf&&(d.selectionToRemove=e.createSelection(s[0])),"deleteContentBackward"===l&&(n.isAndroid&&(d.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let o=0;for(const{nextPosition:e}of t){if(e.parent.is("$text")){const t=e.parent.data,n=e.offset;if(Er(t,n)||Dr(t,n)||Tr(t,n))continue;o++}else o++;if(o>1)return!0}return!1}(s)&&(d.unit=mf,d.selectionToRemove=e.createSelection(s)));const u=new _s(t,"delete",s[0]);t.fire(u,new xa(e,a,d)),u.stop.called&&r.stop()})),n.isBlink&&function(e){const t=e.view,o=t.document;let n=null,r=!1;function i(e){return e==cr.backspace||e==cr.delete}function s(e){return e==cr.backspace?ff:bf}o.on("keydown",((e,{keyCode:t})=>{n=t,r=!1})),o.on("keyup",((a,{keyCode:l,domEvent:c})=>{const d=o.selection,u=e.isEnabled&&l==n&&i(l)&&!d.isCollapsed&&!r;if(n=null,u){const e=d.getFirstRange(),n=new _s(o,"delete",e),r={unit:mf,direction:s(l),selectionToRemove:d};o.fire(n,new xa(t,c,r))}})),o.on("beforeinput",((e,{inputType:t})=>{const o=kf[t];i(n)&&o&&o.direction==s(n)&&(r=!0)}),{priority:"high"}),o.on("beforeinput",((e,{inputType:t,data:o})=>{n==cr.delete&&"insertText"==t&&""==o&&e.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class _f extends Br{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,o=t.document,n=e.model.document;t.addObserver(wf),this._undoOnBackspace=!1;const r=new pf(e,"forward");e.commands.add("deleteForward",r),e.commands.add("forwardDelete",r),e.commands.add("delete",new pf(e,"backward")),this.listenTo(o,"delete",((n,r)=>{o.isComposing||r.preventDefault();const{direction:i,sequence:s,selectionToRemove:a,unit:l}=r,c="forward"===i?"deleteForward":"delete",d={sequence:s};if("selection"==l){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=l;e.execute(c,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(o,"delete",((t,o)=>{this._undoOnBackspace&&"backward"==o.direction&&1==o.sequence&&"codePoint"==o.unit&&(this._undoOnBackspace=!1,e.execute("undo"),o.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(n,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class yf extends Br{static get requires(){return[uf,_f]}static get pluginName(){return"Typing"}}function Af(e,t){let o=e.start;return{text:Array.from(e.getItems()).reduce(((e,n)=>n.is("$text")||n.is("$textProxy")?e+n.data:(o=t.createPositionAfter(n),"")),""),range:t.createRange(o,e.end)}}class Cf extends(H()){constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:o})=>{o&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const o=this.model,n=o.document.selection,r=o.createRange(o.createPositionAt(n.focus.parent,0),n.focus),{text:i,range:s}=Af(r,o),a=this.testCallback(i);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const o=Object.assign(t,{text:i,range:s});"object"==typeof a&&Object.assign(o,a),this.fire(`matched:${e}`,o)}}}class vf extends Br{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,o=e.editing.view,n=e.locale,r=t.document.selection;this.listenTo(o.document,"arrowKey",((e,t)=>{if(!r.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const o=t.keyCode==cr.arrowright,i=t.keyCode==cr.arrowleft;if(!o&&!i)return;const s=n.contentLanguageDirection;let a=!1;a="ltr"===s&&o||"rtl"===s&&i?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()}),{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(r,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&Sf(r.getFirstPosition(),this.attributes)||this._restoreGravity())}))}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,o=this.editor.model.document.selection,n=o.getFirstPosition();return!this._isGravityOverridden&&((!n.isAtStart||!xf(o,t))&&(!!Sf(n,t)&&(Df(e),this._overrideGravity(),!0)))}_handleBackwardMovement(e){const t=this.attributes,o=this.editor.model,n=o.document.selection,r=n.getFirstPosition();return this._isGravityOverridden?(Df(e),this._restoreGravity(),Ef(o,t,r),!0):r.isAtStart?!!xf(n,t)&&(Df(e),Ef(o,t,r),!0):!!function(e,t){const o=e.getShiftedBy(-1);return Sf(o,t)}(r,t)&&(r.isAtEnd&&!xf(n,t)&&Sf(r,t)?(Df(e),Ef(o,t,r),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function xf(e,t){for(const o of t)if(e.hasAttribute(o))return!0;return!1}function Ef(e,t,o){const n=o.nodeBefore;e.change((e=>{n?e.setSelectionAttribute(n.getAttributes()):e.removeSelectionAttribute(t)}))}function Df(e){e.preventDefault()}function Sf(e,t){const{nodeBefore:o,nodeAfter:n}=e;for(const e of t){const t=o?o.getAttribute(e):void 0;if((n?n.getAttribute(e):void 0)!==t)return!0}return!1}Tf('"'),Tf("'"),Tf("'"),Tf('"'),Tf('"'),Tf("'");function Tf(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function Bf(e,t,o,n){return n.createRange(If(e,t,o,!0,n),If(e,t,o,!1,n))}function If(e,t,o,n,r){let i=e.textNode||(n?e.nodeBefore:e.nodeAfter),s=null;for(;i&&i.getAttribute(t)==o;)s=i,i=n?i.previousSibling:i.nextSibling;return s?r.createPositionAt(s,n?"before":"after"):e}function Pf(e,t,o,n){const r=e.editing.view,i=new Set;r.document.registerPostFixer((r=>{const s=e.model.document.selection;let a=!1;if(s.hasAttribute(t)){const l=Bf(s.getFirstPosition(),t,s.getAttribute(t),e.model),c=e.editing.mapper.toViewRange(l);for(const e of c.getItems())e.is("element",o)&&!e.hasClass(n)&&(r.addClass(n,e),i.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){r.change((e=>{for(const t of i.values())e.removeClass(n,t),i.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}function*Rf(e,t){for(const o of t)o&&e.getAttributeProperties(o[0]).copyOnEnter&&(yield o)}class zf extends Pr{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,o=t.document.selection,n=t.schema,r=o.isCollapsed,i=o.getFirstRange(),s=i.start.parent,a=i.end.parent;if(n.isLimit(s)||n.isLimit(a))return r||s!=a||t.deleteContent(o),!1;if(r){const t=Rf(e.model.schema,o.getAttributes());return Mf(e,i.start),e.setSelectionAttribute(t),!0}{const n=!(i.start.isAtStart&&i.end.isAtEnd),r=s==a;if(t.deleteContent(o,{leaveUnmerged:n}),n){if(r)return Mf(e,o.focus),!0;e.setSelection(a,0)}}return!1}}function Mf(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}const Nf={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class Ff extends Aa{constructor(e){super(e);const t=this.document;let o=!1;t.on("keydown",((e,t)=>{o=t.shiftKey})),t.on("beforeinput",((r,i)=>{if(!this.isEnabled)return;let s=i.inputType;n.isSafari&&o&&"insertParagraph"==s&&(s="insertLineBreak");const a=i.domEvent,l=Nf[s];if(!l)return;const c=new _s(t,"enter",i.targetRanges[0]);t.fire(c,new xa(e,a,{isSoft:l.isSoft})),c.stop.called&&r.stop()}))}observe(){}stopObserving(){}}class Of extends Br{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,o=t.document;t.addObserver(Ff),e.commands.add("enter",new zf(e)),this.listenTo(o,"enter",((n,r)=>{o.isComposing||r.preventDefault(),r.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}class Vf extends Pr{execute(){const e=this.editor.model,t=e.document;e.change((o=>{!function(e,t,o){const n=o.isCollapsed,r=o.getFirstRange(),i=r.start.parent,s=r.end.parent,a=i==s;if(n){const n=Rf(e.schema,o.getAttributes());Lf(e,t,r.end),t.removeSelectionAttribute(o.getAttributeKeys()),t.setSelectionAttribute(n)}else{const n=!(r.start.isAtStart&&r.end.isAtEnd);e.deleteContent(o,{leaveUnmerged:n}),a?Lf(e,t,o.focus):n&&t.setSelection(s,0)}}(e,o,t.selection),this.fire("afterExecute",{writer:o})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const o=t.anchor;if(!o||!e.checkChild(o,"softBreak"))return!1;const n=t.getFirstRange(),r=n.start.parent,i=n.end.parent;if((jf(r,e)||jf(i,e))&&r!==i)return!1;return!0}(e.schema,t.selection)}}function Lf(e,t,o){const n=t.createElement("softBreak");e.insertContent(n,o),t.setSelection(n,"after")}function jf(e,t){return!e.is("rootElement")&&(t.isLimit(e)||jf(e.parent,t))}class qf extends Br{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,o=e.conversion,n=e.editing.view,r=n.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),o.for("upcast").elementToElement({model:"softBreak",view:"br"}),o.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),n.addObserver(Ff),e.commands.add("shiftEnter",new Vf(e)),this.listenTo(r,"enter",((t,o)=>{r.isComposing||o.preventDefault(),o.isSoft&&(e.execute("shiftEnter"),n.scrollToTheSelection())}),{priority:"low"})}}var Hf=o(5137),Wf={attributes:{"data-cke":!0}};Wf.setAttributes=Wr(),Wf.insert=qr().bind(null,"head"),Wf.domAPI=Lr(),Wf.insertStyleElement=Ur();Or()(Hf.Z,Wf);Hf.Z&&Hf.Z.locals&&Hf.Z.locals;const $f=["before","after"],Uf=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,Gf="ck-widget__type-around_disabled";class Kf extends Br{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[Of,_f]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((o,n,r)=>{t.change((e=>{for(const o of t.document.roots)r?e.removeClass(Gf,o):e.addClass(Gf,o)})),r||e.model.change((e=>{e.removeSelectionAttribute(Vm)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const o=this.editor,n=o.editing.view,r=o.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);o.execute("insertParagraph",{position:o.model.createPositionAt(e,t),attributes:r}),n.focus(),n.scrollToTheSelection()}_listenToIfEnabled(e,t,o,n){this.listenTo(e,t,((...e)=>{this.isEnabled&&o(...e)}),n)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=jm(e);if(!t)return!1;const o=e.getSelectedElement();return this._insertParagraph(o,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,o=e.locale.t,n={before:o("Insert paragraph before block"),after:o("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,r,i)=>{const s=i.mapper.toViewElement(r.item);if(s&&Lm(s,r.item,t)){!function(e,t,o){const n=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const o=this.toDomElement(e);return function(e,t){for(const o of $f){const n=new Th({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${o}`],title:t[o],"aria-hidden":"true"},children:[e.ownerDocument.importNode(Uf,!0)]});e.appendChild(n.render())}}(o,t),function(e){const t=new Th({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(o),o}));e.insert(e.createPositionAt(o,"end"),n)}(i.writer,n,s);s.getCustomProperty("widgetLabel").push((()=>this.isEnabled?o("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,o=t.document.selection,n=t.schema,r=e.editing.view;function i(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(r.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[$m,"$text"],priority:"high"}),this._listenToIfEnabled(o,"change:range",((t,o)=>{o.directChange&&e.model.change((e=>{e.removeSelectionAttribute(Vm)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=o.getSelectedElement();if(t){if(Lm(e.editing.mapper.toViewElement(t),t,n))return}e.model.change((e=>{e.removeSelectionAttribute(Vm)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,o)=>{const r=o.writer;if(this._currentFakeCaretModelElement){const e=o.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(r.removeClass($f.map(i),e),this._currentFakeCaretModelElement=null)}const s=t.selection.getSelectedElement();if(!s)return;const a=o.mapper.toViewElement(s);if(!Lm(a,s,n))return;const l=jm(t.selection);l&&(r.addClass(i(l),a),this._currentFakeCaretModelElement=s)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,o,n)=>{n||e.model.change((e=>{e.removeSelectionAttribute(Vm)}))}))}_handleArrowKeyPress(e,t){const o=this.editor,n=o.model,r=n.document.selection,i=n.schema,s=o.editing.view,a=function(e,t){const o=gr(e,t);return"down"===o||"right"===o}(t.keyCode,o.locale.contentLanguageDirection),l=s.document.selection.getSelectedElement();let c;Lm(l,o.editing.mapper.toModelElement(l),i)?c=this._handleArrowKeyPressOnSelectedWidget(a):r.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),c&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,o=jm(t.document.selection);return t.change((t=>{if(!o)return t.setSelectionAttribute(Vm,e?"after":"before"),!0;if(!(o===(e?"after":"before")))return t.removeSelectionAttribute(Vm),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,o=t.model,n=o.schema,r=t.plugins.get("Widget"),i=r._getObjectElementNextToSelection(e);return!!Lm(t.editing.mapper.toViewElement(i),i,n)&&(o.change((t=>{r._setSelectionOverElement(i),t.setSelectionAttribute(Vm,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,o=t.model,n=o.schema,r=t.editing.mapper,i=o.document.selection,s=e?i.getLastPosition().nodeBefore:i.getFirstPosition().nodeAfter;return!!Lm(r.toViewElement(s),s,n)&&(o.change((t=>{t.setSelection(s,"on"),t.setSelectionAttribute(Vm,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((o,n)=>{const r=n.domTarget.closest(".ck-widget__type-around__button");if(!r)return;const i=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(r),s=function(e,t){const o=e.closest(".ck-widget");return t.mapDomToView(o)}(r,t.domConverter),a=e.editing.mapper.toModelElement(s);this._insertParagraph(a,i),n.preventDefault(),o.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,o=e.editing.view;this._listenToIfEnabled(o.document,"enter",((o,n)=>{if("atTarget"!=o.eventPhase)return;const r=t.getSelectedElement(),i=e.editing.mapper.toViewElement(r),s=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:Lm(i,r,s)&&(this._insertParagraph(r,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),o.stop())}),{context:$m})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=e.selection)}),{priority:"high"}),n.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,o=e.model,n=o.schema;this._listenToIfEnabled(t.document,"delete",((t,r)=>{if("atTarget"!=t.eventPhase)return;const i=jm(o.document.selection);if(!i)return;const s=r.direction,a=o.document.selection.getSelectedElement(),l="forward"==s;if("before"===i===l)e.execute("delete",{selection:o.createSelection(a,"on")});else{const t=n.getNearestSelectionRange(o.createPositionAt(a,i),s);if(t)if(t.isCollapsed){const r=o.createSelection(t.start);if(o.modifySelection(r,{direction:s}),r.focus.isEqual(t.start)){const e=function(e,t){let o=t;for(const n of t.getAncestors({parentFirst:!0})){if(n.childCount>1||e.isLimit(n))break;o=n}return o}(n,t.start.parent);o.deleteContent(o.createSelection(e,"on"),{doNotAutoparagraph:!0})}else o.change((o=>{o.setSelection(t),e.execute(l?"deleteForward":"delete")}))}else o.change((o=>{o.setSelection(t),e.execute(l?"deleteForward":"delete")}))}r.preventDefault(),t.stop()}),{context:$m})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,o=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[n,r])=>{if(r&&!r.is("documentSelection"))return;const i=jm(o);return i?(e.stop(),t.change((e=>{const r=o.getSelectedElement(),s=t.createPositionAt(r,i),a=e.createSelection(s),l=t.insertContent(n,a);return e.setSelection(a),l}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,o)=>{const[,n,r={}]=o;if(n&&!n.is("documentSelection"))return;const i=jm(t);i&&(r.findOptimalPosition=i,o[3]=r)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[o])=>{if(o&&!o.is("documentSelection"))return;jm(t)&&e.stop()}),{priority:"high"})}}function Zf(e){const t=e.model;return(o,n)=>{const r=n.keyCode==cr.arrowup,i=n.keyCode==cr.arrowdown,s=n.shiftKey,a=t.document.selection;if(!r&&!i)return;const l=i;if(s&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,l))return;const c=function(e,t,o){const n=e.model;if(o){const e=t.isCollapsed?t.focus:t.getLastPosition(),o=Jf(n,e,"forward");if(!o)return null;const r=n.createRange(e,o),i=Qf(n.schema,r,"backward");return i?n.createRange(e,i):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),o=Jf(n,e,"backward");if(!o)return null;const r=n.createRange(o,e),i=Qf(n.schema,r,"forward");return i?n.createRange(i,e):null}}(e,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(s)return}(c.isCollapsed||function(e,t,o){const n=e.model,r=e.view.domConverter;if(o){const e=n.createSelection(t.start);n.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=n.createRange(e.focus,t.end))}const i=e.mapper.toViewRange(t),s=r.viewRangeToDom(i),a=Fn.getDomRangeRects(s);let l;for(const e of a)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,c,l))&&(t.change((e=>{const o=l?c.end:c.start;if(s){const n=t.createSelection(a.anchor);n.setFocus(o),e.setSelection(n)}else e.setSelection(o)})),o.stop(),n.preventDefault(),n.stopPropagation())}}}function Jf(e,t,o){const n=e.schema,r=e.createRangeIn(t.root),i="forward"==o?"elementStart":"elementEnd";for(const{previousPosition:e,item:s,type:a}of r.getWalker({startPosition:t,direction:o})){if(n.isLimit(s)&&!n.isInline(s))return e;if(a==i&&n.isBlock(s))return null}return null}function Qf(e,t,o){const n="backward"==o?t.end:t.start;if(e.checkChild(n,"$text"))return n;for(const{nextPosition:n}of t.getWalker({direction:o}))if(e.checkChild(n,"$text"))return n;return null}var Yf=o(6507),Xf={attributes:{"data-cke":!0}};Xf.setAttributes=Wr(),Xf.insert=qr().bind(null,"head"),Xf.domAPI=Lr(),Xf.insertStyleElement=Ur();Or()(Yf.Z,Xf);Yf.Z&&Yf.Z.locals&&Yf.Z.locals;class eb extends Br{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[Kf,_f]}init(){const e=this.editor,t=e.editing.view,o=t.document;this.editor.editing.downcastDispatcher.on("selection",((t,o,n)=>{const r=n.writer,i=o.selection;if(i.isCollapsed)return;const s=i.getSelectedElement();if(!s)return;const a=e.editing.mapper.toViewElement(s);var l;$m(a)&&(n.consumable.consume(i,"selection")&&r.setSelection(r.createRangeOn(a),{fake:!0,label:(l=a,l.getCustomProperty("widgetLabel").reduce(((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t),""))}))})),this.editor.editing.downcastDispatcher.on("selection",((e,t,o)=>{this._clearPreviouslySelectedWidgets(o.writer);const n=o.writer,r=n.document.selection;let i=null;for(const e of r.getRanges())for(const t of e){const e=t.item;$m(e)&&!tb(e,i)&&(n.addClass(Wm,e),this._previouslySelected.add(e),i=e)}}),{priority:"low"}),t.addObserver(yu),this.listenTo(o,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(o,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[$m,"$text"]}),this.listenTo(o,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(o,"arrowKey",Zf(this.editor.editing),{context:"$text"}),this.listenTo(o,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"})}_onMousedown(e,t){const o=this.editor,r=o.editing.view,i=r.document;let s=t.target;if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if($m(t))return!1;t=t.parent}return!1}(s)){if((n.isSafari||n.isGecko)&&t.domEvent.detail>=3){const e=o.editing.mapper,n=s.is("attributeElement")?s.findAncestor((e=>!e.is("attributeElement"))):s,r=e.toModelElement(n);t.preventDefault(),this.editor.model.change((e=>{e.setSelection(r,"in")}))}return}if(!$m(s)&&(s=s.findAncestor($m),!s))return;n.isAndroid&&t.preventDefault(),i.isFocused||r.focus();const a=o.editing.mapper.toModelElement(s);this._setSelectionOverElement(a)}_handleSelectionChangeOnArrowKeyPress(e,t){const o=t.keyCode,n=this.editor.model,r=n.schema,i=n.document.selection,s=i.getSelectedElement(),a=gr(o,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,c="up"==a||"down"==a;if(s&&r.isObject(s)){const o=l?i.getLastPosition():i.getFirstPosition(),s=r.getNearestSelectionRange(o,l?"forward":"backward");return void(s&&(n.change((e=>{e.setSelection(s)})),t.preventDefault(),e.stop()))}if(!i.isCollapsed&&!t.shiftKey){const o=i.getFirstPosition(),s=i.getLastPosition(),a=o.nodeAfter,c=s.nodeBefore;return void((a&&r.isObject(a)||c&&r.isObject(c))&&(n.change((e=>{e.setSelection(l?s:o)})),t.preventDefault(),e.stop()))}if(!i.isCollapsed)return;const d=this._getObjectElementNextToSelection(l);if(d&&r.isObject(d)){if(r.isInline(d)&&c)return;this._setSelectionOverElement(d),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const o=this.editor.model,n=o.schema,r=o.document.selection.getSelectedElement();r&&n.isObject(r)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);return o?(this.editor.model.change((e=>{let n=t.anchor.parent;for(;n.isEmpty;){const t=n;n=t.parent,e.remove(t)}this._setSelectionOverElement(o)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,o=t.schema,n=t.document.selection,r=t.createSelection(n);if(t.modifySelection(r,{direction:e?"forward":"backward"}),r.isEqual(n))return null;const i=e?r.focus.nodeBefore:r.focus.nodeAfter;return i&&o.isObject(i)?i:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(Wm,t);this._previouslySelected.clear()}}function tb(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class ob extends Br{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[Cm]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!$m(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:o,getRelatedElement:n,balloonClassName:r="ck-toolbar-container"}){if(!o.length)return void b("widget-toolbar-no-items",{toolbarId:e});const i=this.editor,s=i.t,a=new Fp(i.locale);if(a.ariaLabel=t||s("Widget toolbar"),this._toolbarDefinitions.has(e))throw new f("widget-toolbar-duplicated",this,{toolbarId:e});const l={view:a,getRelatedElement:n,balloonClassName:r,itemsConfig:o,initialized:!1};i.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const e=n(i.editing.view.document.selection);e&&this._showToolbar(l,e)},afterBlur:()=>{this._hideToolbar(l)}}),this._toolbarDefinitions.set(e,l)}_updateToolbarsVisibility(){let e=0,t=null,o=null;for(const n of this._toolbarDefinitions.values()){const r=n.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&r)if(this.editor.ui.focusTracker.isFocused){const i=r.getAncestors().length;i>e&&(e=i,t=r,o=n)}else this._isToolbarVisible(n)&&this._hideToolbar(n);else this._isToolbarInBalloon(n)&&this._hideToolbar(n)}o&&this._showToolbar(o,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?nb(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:rb(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);nb(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function nb(e,t){const o=e.plugins.get("ContextualBalloon"),n=rb(e,t);o.updatePosition(n)}function rb(e,t){const o=e.editing.view,n=Wg.defaultPositions;return{target:o.domConverter.mapViewToDom(t),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class ib extends(H()){constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,o){const n=new Fn(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const o of t)if(e.classList.contains(sb(o)))return o}(e),this._referenceCoordinates=function(e,t){const o=new Fn(e),n=t.split("-"),r={x:"right"==n[1]?o.right:o.left,y:"bottom"==n[0]?o.bottom:o.top};return r.x+=e.ownerDocument.defaultView.scrollX,r.y+=e.ownerDocument.defaultView.scrollY,r}(t,function(e){const t=e.split("-"),o={top:"bottom",bottom:"top",left:"right",right:"left"};return`${o[t[0]]}-${o[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=n.width,this._originalHeight=n.height,this._aspectRatio=n.width/n.height;const r=o.style.width;r&&r.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(r):this._originalWidthPercents=function(e,t){const o=e.parentElement;let n=parseFloat(o.ownerDocument.defaultView.getComputedStyle(o).width);const r=5;let i=0,s=o;for(;isNaN(n);){if(s=s.parentElement,++i>r)return 0;n=parseFloat(o.ownerDocument.defaultView.getComputedStyle(s).width)}return t.width/n*100}(o,n)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function sb(e){return`ck-widget__resizer__handle-${e}`}class ab extends Sh{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,o,n)=>"px"===e.unit?`${t}×${o}`:`${n}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,o)=>t<50||o<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}class lb extends(H()){constructor(e){super(),this._viewResizerWrapper=null,this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((o=>{const n=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const o=this.toDomElement(t);return e._appendHandles(o),e._appendSizeUI(o),o}));o.insert(o.createPositionAt(t,"end"),n),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(e){this._state=new ib(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change((e=>{const o=this._options.unit||"%",n=("%"===o?t.widthPercents:t.width)+o;e.setStyle("width",n,this._options.viewElement)}));const o=this._getHandleHost(),n=new Fn(o),r=Math.round(n.width),i=Math.round(n.height),s=new Fn(o);t.width=Math.round(s.width),t.height=Math.round(s.height),this.redraw(n),this.state.update({...t,handleHostWidth:r,handleHostHeight:i})}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(t)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((o=t)&&o.ownerDocument&&o.ownerDocument.contains(o)))return;var o;const n=t.parentElement,r=this._getHandleHost(),i=this._viewResizerWrapper,s=[i.getStyle("width"),i.getStyle("height"),i.getStyle("left"),i.getStyle("top")];let a;if(n.isSameNode(r)){const t=e||new Fn(r);a=[t.width+"px",t.height+"px",void 0,void 0]}else a=[r.offsetWidth+"px",r.offsetHeight+"px",r.offsetLeft+"px",r.offsetTop+"px"];"same"!==J(s,a)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},i)}))}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,o={x:(n=e).pageX,y:n.pageY};var n;const r=!this._options.isCentered||this._options.isCentered(this),i={x:t._referenceCoordinates.x-(o.x+t.originalWidth),y:o.y-t.originalHeight-t._referenceCoordinates.y};r&&t.activeHandlePosition.endsWith("-right")&&(i.x=o.x-(t._referenceCoordinates.x+t.originalWidth)),r&&(i.x*=2);let s=Math.abs(t.originalWidth+i.x),a=Math.abs(t.originalHeight+i.y);return"width"==(s/t.aspectRatio>a?"width":"height")?a=s/t.aspectRatio:s=a*t.aspectRatio,{width:Math.round(s),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*s*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)e.appendChild(new Th({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(o=n,`ck-widget__resizer__handle-${o}`)}}).render());var o}_appendSizeUI(e){this._sizeView=new ab,this._sizeView.render(),e.appendChild(this._sizeView.element)}}var cb=o(2263),db={attributes:{"data-cke":!0}};db.setAttributes=Wr(),db.insert=qr().bind(null,"head"),db.domAPI=Lr(),db.insertStyleElement=Ur();Or()(cb.Z,db);cb.Z&&cb.Z.locals&&cb.Z.locals;class ub extends Br{constructor(){super(...arguments),this._resizers=new Map}static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=In.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(yu),this._observer=new(Dn()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=fh((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(In.window,"resize",this._redrawSelectedResizerThrottled);const o=this.editor.editing.view.document.selection;o.on("change",(()=>{const e=o.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()}))}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new lb(e),o=this.editor.plugins;if(t.attach(),o.has("WidgetToolbarRepository")){const e=o.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const n=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(n)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const o=t.domTarget;lb.isResizeHandle(o)&&(this._activeResizer=this._getResizerByHandle(o)||null,this._activeResizer&&(this._activeResizer.begin(o),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}function hb(e,t,o){e.ui.componentFactory.add(t,(t=>{const n=new op(t);return n.set({label:I18n.t("js.button_edit"),icon:'\n',tooltip:!0}),n.on("execute",(()=>{const t=e.model.document.selection.getSelectedElement();t&&o(t)})),n}))}const pb="ck-toolbar-container";function gb(e,t,o,n){const r=t.config.get(o+".toolbar");if(!r||!r.length)return;const i=t.plugins.get("ContextualBalloon"),s=new Fp(t.locale);function a(){t.ui.focusTracker.isFocused&&n(t.editing.view.document.selection)?c()?function(e,t){const o=e.plugins.get("ContextualBalloon");if(t(e.editing.view.document.selection)){const t=mb(e);o.updatePosition(t)}}(t,n):i.hasView(s)||i.add({view:s,position:mb(t),balloonClassName:pb}):l()}function l(){c()&&i.remove(s)}function c(){return i.visibleView==s}s.fillFromConfig(r,t.ui.componentFactory),e.listenTo(t.editing.view,"render",a),e.listenTo(t.ui.focusTracker,"change:isFocused",a,{priority:"low"})}function mb(e){const t=e.editing.view,o=Wg.defaultPositions;return{target:t.domConverter.viewToDom(t.document.selection.getSelectedElement()),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast]}}class fb extends Br{static get requires(){return[Cm]}static get pluginName(){return"EmbeddedTableToolbar"}init(){const e=this.editor,t=this.editor.model,o=of(e);hb(e,"opEditEmbeddedTableQuery",(e=>{const n=o.services.externalQueryConfiguration,r=e.getAttribute("opEmbeddedTableQuery")||{};o.runInZone((()=>{n.show({currentQuery:r,callback:o=>t.change((t=>{t.setAttribute("opEmbeddedTableQuery",o,e)}))})}))}))}afterInit(){gb(this,this.editor,"OPMacroEmbeddedTable",ef)}}const bb=Symbol("isWpButtonMacroSymbol");function kb(e){const t=e.getSelectedElement();return!(!t||!function(e){return!!e.getCustomProperty(bb)&&$m(e)}(t))}class wb extends Br{static get pluginName(){return"OPMacroWpButtonEditing"}static get buttonName(){return"insertWorkPackageButton"}init(){const e=this.editor,t=e.model,o=e.conversion,n=of(e);t.schema.register("op-macro-wp-button",{allowWhere:["$block"],allowAttributes:["type","classes"],isBlock:!0,isLimit:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"create_work_package_link"},model:(e,{writer:t})=>{const o=e.getAttribute("data-type")||"",n=e.getAttribute("data-classes")||"";return t.createElement("op-macro-wp-button",{type:o,classes:n})}}),o.for("editingDowncast").elementToElement({model:"op-macro-wp-button",view:(e,{writer:t})=>this.createMacroViewElement(e,t)}),o.for("dataDowncast").elementToElement({model:"op-macro-wp-button",view:(e,{writer:t})=>t.createContainerElement("macro",{class:"create_work_package_link","data-type":e.getAttribute("type")||"","data-classes":e.getAttribute("classes")||""})}),e.ui.componentFactory.add(wb.buttonName,(t=>{const o=new op(t);return o.set({label:window.I18n.t("js.editor.macro.work_package_button.button"),withText:!0}),o.on("execute",(()=>{n.services.macros.configureWorkPackageButton().then((t=>e.model.change((o=>{const n=o.createElement("op-macro-wp-button",{});o.setAttribute("type",t.type,n),o.setAttribute("classes",t.classes,n),e.model.insertContent(n,e.model.document.selection)}))))})),o}))}macroLabel(e){return e?window.I18n.t("js.editor.macro.work_package_button.with_type",{typename:e}):window.I18n.t("js.editor.macro.work_package_button.without_type")}createMacroViewElement(e,t){e.getAttribute("type");const o=e.getAttribute("classes")||"",n=this.macroLabel(),r=t.createText(n),i=t.createContainerElement("span",{class:o});return t.insert(t.createPositionAt(i,0),r),function(e,t,o){return t.setCustomProperty(bb,!0,e),Um(e,t,{label:o})}(i,t,{label:n})}}class _b extends Br{static get requires(){return[Cm]}static get pluginName(){return"OPMacroWpButtonToolbar"}init(){const e=this.editor,t=(this.editor.model,of(e));hb(e,"opEditWpMacroButton",(o=>{const n=t.services.macros,r=o.getAttribute("type"),i=o.getAttribute("classes");n.configureWorkPackageButton(r,i).then((t=>e.model.change((e=>{e.setAttribute("classes",t.classes,o),e.setAttribute("type",t.type,o)}))))}))}afterInit(){gb(this,this.editor,"OPMacroWpButton",kb)}}class yb extends(H()){constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((o,n)=>{t.onload=()=>{const e=t.result;this._data=e,o(e)},t.onerror=()=>{n("error")},t.onabort=()=>{n("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}class Ab extends Br{constructor(){super(...arguments),this.loaders=new _r,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[dh]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return b("filerepository-no-upload-adapter"),null;const t=new Cb(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof Cb?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,o)=>{e===t&&this._loadersMap.delete(o)}))}_updatePendingAction(){const e=this.editor.plugins.get(dh);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,o=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(o(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",o)}}else e.remove(this._pendingAction),this._pendingAction=null}}class Cb extends(H()){constructor(e,t){super(),this.id=h(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new yb,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new f("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new f("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((o,n)=>{t.rejecter=n,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,o(e)})).catch((e=>{t.isFulfilled=!0,n(e)}))})),t}}class vb extends Sh{constructor(e){super(e),this.buttonView=new op(e),this._fileInputView=new xb(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",(()=>{this._fileInputView.open()}))}focus(){this.buttonView.focus()}}class xb extends Sh{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}class Eb{constructor(e,t,o){this.loader=e,this.resource=t,this.editor=o}upload(){const e=this.resource,t=nf(this.editor,"attachmentsResourceService");return e?this.loader.file.then((o=>t.attachFiles(e,[o]).toPromise().then((e=>(this.editor.model.fire("op:attachment-added",e),this.buildResponse(e[0])))).catch((e=>{console.error("Failed upload %O",e)})))):(console.warn("resource not available in this CKEditor instance"),Promise.reject("Not possible to upload attachments without resource"))}buildResponse(e){return{default:e._links.staticDownloadLocation.href}}abort(){return!1}}class Db extends Ea{constructor(e){super(e),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const t=this.document;function o(e){return(o,n)=>{n.preventDefault();const r=n.dropRange?[n.dropRange]:null,i=new d(t,e);t.fire(i,{dataTransfer:n.dataTransfer,method:o.name,targetRanges:r,target:n.target,domEvent:n.domEvent}),i.stop.called&&n.stopPropagation()}}this.listenTo(t,"paste",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",o("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,o="drop"==e.type||"paste"==e.type,n={dataTransfer:new gl(t,{cacheFiles:o})};"drop"!=e.type&&"dragover"!=e.type||(n.dropRange=function(e,t){const o=t.target.ownerDocument,n=t.clientX,r=t.clientY;let i;o.caretRangeFromPoint&&o.caretRangeFromPoint(n,r)?i=o.caretRangeFromPoint(n,r):t.rangeParent&&(i=o.createRange(),i.setStart(t.rangeParent,t.rangeOffset),i.collapse(!0));if(i)return e.domConverter.domRangeToView(i);return null}(this.view,e)),this.fire(e.type,e,n)}}const Sb=["figcaption","li"];function Tb(e){let t="";if(e.is("$text")||e.is("$textProxy"))t=e.data;else if(e.is("element","img")&&e.hasAttribute("alt"))t=e.getAttribute("alt");else if(e.is("element","br"))t="\n";else{let o=null;for(const n of e.getChildren()){const e=Tb(n);o&&(o.is("containerElement")||n.is("containerElement"))&&(Sb.includes(o.name)||Sb.includes(n.name)?t+="\n":t+="\n\n"),t+=e,o=n}}return t}class Bb extends Br{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(Db),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const e=this.editor,t=e.model,o=e.editing.view,n=o.document;this.listenTo(n,"clipboardInput",((t,o)=>{"paste"!=o.method||e.model.canEditAt(e.model.document.selection)||t.stop()}),{priority:"highest"}),this.listenTo(n,"clipboardInput",((e,t)=>{const n=t.dataTransfer;let r;if(t.content)r=t.content;else{let e="";n.getData("text/html")?e=function(e){return e.replace(/(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(//g,"")}(n.getData("text/html")):n.getData("text/plain")&&(((i=(i=n.getData("text/plain")).replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/\t/g,"    ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||i.includes("
"))&&(i=`

${i}

`),e=i),r=this.editor.data.htmlProcessor.toView(e)}var i;const s=new d(this,"inputTransformation");this.fire(s,{content:r,dataTransfer:n,targetRanges:t.targetRanges,method:t.method}),s.stop.called&&e.stop(),o.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,o)=>{if(o.content.isEmpty)return;const n=this.editor.data.toModel(o.content,"$clipboardHolder");0!=n.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:n,method:o.method,dataTransfer:o.dataTransfer,targetRanges:o.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,o)=>{o.resultRange=t.insertContent(o.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,o=e.editing.view.document,n=(n,r)=>{const i=r.dataTransfer;r.preventDefault();const s=e.data.toView(e.model.getSelectedContent(t.selection));o.fire("clipboardOutput",{dataTransfer:i,content:s,method:n.name})};this.listenTo(o,"copy",n,{priority:"low"}),this.listenTo(o,"cut",((t,o)=>{e.model.canEditAt(e.model.document.selection)?n(t,o):o.preventDefault()}),{priority:"low"}),this.listenTo(o,"clipboardOutput",((o,n)=>{n.content.isEmpty||(n.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(n.content)),n.dataTransfer.setData("text/plain",Tb(n.content))),"cut"==n.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}var Ib=o(390),Pb={attributes:{"data-cke":!0}};Pb.setAttributes=Wr(),Pb.insert=qr().bind(null,"head"),Pb.domAPI=Lr(),Pb.insertStyleElement=Ur();Or()(Ib.Z,Pb);Ib.Z&&Ib.Z.locals&&Ib.Z.locals;class Rb extends Br{static get pluginName(){return"DragDrop"}static get requires(){return[Bb,eb]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=fh((e=>this._updateDropMarker(e)),40),this._removeDropMarkerDelayed=xr((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=xr((()=>this._clearDraggableAttributes()),40),e.plugins.has("DragDropExperimental")?this.forceDisabled("DragDropExperimental"):(t.addObserver(Db),t.addObserver(yu),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,o)=>{o||this._finalizeDragging(!1)})),n.isAndroid&&this.forceDisabled("noAndroidSupport"))}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,o=t.document,r=e.editing.view,i=r.document;this.listenTo(i,"dragstart",((n,r)=>{const s=o.selection;if(r.target&&r.target.is("editableElement"))return void r.preventDefault();const a=r.target?Nb(r.target):null;if(a){const o=e.editing.mapper.toModelElement(a);if(this._draggedRange=Kl.fromRange(t.createRangeOn(o)),e.plugins.has("WidgetToolbarRepository")){e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}}else if(!i.selection.isCollapsed){const e=i.selection.getSelectedElement();e&&$m(e)||(this._draggedRange=Kl.fromRange(s.getFirstRange()))}if(!this._draggedRange)return void r.preventDefault();this._draggingUid=h();const l=this.isEnabled&&e.model.canEditAt(this._draggedRange);r.dataTransfer.effectAllowed=l?"copyMove":"copy",r.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const c=t.createSelection(this._draggedRange.toRange()),d=e.data.toView(t.getSelectedContent(c));i.fire("clipboardOutput",{dataTransfer:r.dataTransfer,content:d,method:"dragstart"}),l||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(i,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(i,"dragenter",(()=>{this.isEnabled&&r.focus()})),this.listenTo(i,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(i,"dragging",((t,o)=>{if(!this.isEnabled)return void(o.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const r=zb(e,o.targetRanges,o.target);e.model.canEditAt(r)?(this._draggedRange||(o.dataTransfer.dropEffect="copy"),n.isGecko||("copy"==o.dataTransfer.effectAllowed?o.dataTransfer.dropEffect="copy":["all","copyMove"].includes(o.dataTransfer.effectAllowed)&&(o.dataTransfer.dropEffect="move")),r&&this._updateDropMarkerThrottled(r)):o.dataTransfer.dropEffect="none"}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",((t,o)=>{if("drop"!=o.method)return;const n=zb(e,o.targetRanges,o.target);if(this._removeDropMarker(),!n||!e.model.canEditAt(n))return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=o.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==Mb(o.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(n,!0))return this._finalizeDragging(!1),void t.stop();o.targetRanges=[e.editing.mapper.toViewRange(n)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(Bb);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(o)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o="move"==Mb(t.dataTransfer),n=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(n&&o)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,o=t.document;this.listenTo(o,"mousedown",((r,i)=>{if(n.isAndroid||!i)return;this._clearDraggableAttributesDelayed.cancel();let s=Nb(i.target);if(n.isBlink&&!s&&!o.selection.isCollapsed){const e=o.selection.getSelectedElement();if(!e||!$m(e)){const e=o.selection.editableElement;e&&!e.isReadOnly&&(s=e)}}s&&(t.change((e=>{e.setAttribute("draggable","true",s)})),this._draggableElement=e.editing.mapper.toModelElement(s))})),this.listenTo(o,"mouseup",(()=>{n.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:o})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return o.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("⁠",e.createElement("span"),"⁠"),t}))}})}_updateDropMarker(e){const t=this.editor,o=t.model.markers;t.model.change((t=>{o.has("drop-target")?o.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_finalizeDragging(e){const t=this.editor,o=t.model;if(this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&o.deleteContent(o.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function zb(e,t,o){const r=e.model,i=e.editing.mapper;let s=null;const a=t?t[0].start:null;if(o.is("uiElement")&&(o=o.parent),s=function(e,t){const o=e.model,n=e.editing.mapper;if($m(t))return o.createRangeOn(n.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor((e=>$m(e)||e.is("editableElement")));if($m(e))return o.createRangeOn(n.toModelElement(e))}return null}(e,o),s)return s;const l=function(e,t){const o=e.editing.mapper,n=e.editing.view,r=o.toModelElement(t);if(r)return r;const i=n.createPositionBefore(t),s=o.findMappedViewAncestor(i);return o.toModelElement(s)}(e,o),c=a?i.toModelPosition(a):null;return c?(s=function(e,t,o){const n=e.model;if(!n.schema.checkChild(o,"$block"))return null;const r=n.createPositionAt(o,0),i=t.path.slice(0,r.path.length),s=n.createPositionFromPath(t.root,i),a=s.nodeAfter;if(a&&n.schema.isObject(a))return n.createRangeOn(a);return null}(e,c,l),s||(s=r.schema.getNearestSelectionRange(c,n.isGecko?"forward":"backward"),s||function(e,t){const o=e.model;let n=t;for(;n;){if(o.schema.isObject(n))return o.createRangeOn(n);n=n.parent}return null}(e,c.parent))):function(e,t){const o=e.model,n=o.schema,r=o.createPositionAt(t,0);return n.getNearestSelectionRange(r,"forward")}(e,l)}function Mb(e){return n.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function Nb(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor($m);if($m(e))return e;const t=e.findAncestor((e=>$m(e)||e.is("editableElement")));return $m(t)?t:null}class Fb extends Br{static get pluginName(){return"PastePlainText"}static get requires(){return[Bb]}init(){const e=this.editor,t=e.model,o=e.editing.view,n=o.document,r=t.document.selection;let i=!1;o.addObserver(Db),this.listenTo(n,"keydown",((e,t)=>{i=t.shiftKey})),e.plugins.get(Bb).on("contentInsertion",((e,o)=>{(i||function(e,t){if(e.childCount>1)return!1;const o=e.getChild(0);if(t.isObject(o))return!1;return 0==Array.from(o.getAttributeKeys()).length}(o.content,t.schema))&&t.change((e=>{const n=Array.from(r.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0}),n.push(...r.getAttributes());const i=e.createRangeIn(o.content);for(const t of i.getItems())t.is("$textProxy")&&e.setAttributes(n,t)}))}))}}class Ob extends Br{static get pluginName(){return"Clipboard"}static get requires(){return[Bb,Rb,Fb]}}Hn("px");class Vb extends Pr{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",((e,t)=>{t[1]={...t[1]};const o=t[1];o.batchType||(o.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,o={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:o}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,o){const n=this.editor.model,r=n.document,i=[],s=e.map((e=>e.getTransformedByOperations(o))),a=s.flat();for(const e of s){const t=e.filter((e=>e.root!=r.graveyard)).filter((e=>!jb(e,a)));t.length&&(Lb(t),i.push(t[0]))}i.length&&n.change((e=>{e.setSelection(i,{backward:t})}))}_undo(e,t){const o=this.editor.model,n=o.document;this._createdBatches.add(t);const r=e.operations.slice().filter((e=>e.isDocumentOperation));r.reverse();for(const e of r){const r=e.baseVersion+1,i=Array.from(n.history.getOperations(r)),s=Dd([e.getReversed()],i,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let r of s){const i=r.affectedSelectable;i&&!o.canEditAt(i)&&(r=new bd(r.baseVersion)),t.addOperation(r),o.applyOperation(r),n.history.setOperationAsUndone(e,r)}}}}function Lb(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;tt!==e&&t.containsRange(e,!0)))}class qb extends Vb{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,o=this._stack.splice(t,1)[0],n=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(n,(()=>{this._undo(o.batch,n);const e=this.editor.model.document.history.getOperations(o.batch.baseVersion);this._restoreSelection(o.selection.ranges,o.selection.isBackward,e),this.fire("revert",o.batch,n)})),this.refresh()}}class Hb extends Vb{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const o=e.batch.operations[e.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(o);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch,t)})),this.refresh()}}class Wb extends Br{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const e=this.editor;this._undoCommand=new qb(e),this._redoCommand=new Hb(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const o=t[0];if(!o.isDocumentOperation)return;const n=o.batch,r=this._redoCommand.createdBatches.has(n),i=this._undoCommand.createdBatches.has(n);this._batchRegistry.has(n)||(this._batchRegistry.add(n),n.isUndoable&&(r?this._undoCommand.addBatch(n):i||(this._undoCommand.addBatch(n),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,o)=>{this._redoCommand.addBatch(o)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}const $b='',Ub='';class Gb extends Br{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,o=e.t,n="ltr"==t.uiLanguageDirection?$b:Ub,r="ltr"==t.uiLanguageDirection?Ub:$b;this._addButton("undo",o("Undo"),"CTRL+Z",n),this._addButton("redo",o("Redo"),"CTRL+Y",r)}_addButton(e,t,o,n){const r=this.editor;r.ui.componentFactory.add(e,(i=>{const s=r.commands.get(e),a=new op(i);return a.set({label:t,icon:n,keystroke:o,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",(()=>{r.execute(e),r.editing.view.focus()})),a}))}}class Kb extends Br{static get requires(){return[Wb,Gb]}static get pluginName(){return"Undo"}}function Zb(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot("children")])}function Jb(e,t){const o=e.plugins.get("ImageUtils"),n=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>{if(!o.isInlineImageView(e))return null;if(!n)return r(e);return("block"==e.getStyle("display")||e.findAncestor(o.isBlockImageView)?"imageBlock":"imageInline")!==t?null:r(e)};function r(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function Qb(e,t){const o=yr(t.getSelectedBlocks());return!o||e.isObject(o)||o.isEmpty&&"listItem"!=o.name?"imageBlock":"imageInline"}class Yb extends Br{static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,o=null){const n=this.editor,r=n.model,i=r.document.selection;o=Xb(n,t||i,o),e={...Object.fromEntries(i.getAttributes()),...e};for(const t in e)r.schema.checkAttribute(o,t)||delete e[t];return r.change((n=>{const i=n.createElement(o,e);return r.insertObject(i,t,null,{setSelection:"on",findOptimalPosition:t||"imageInline"==o?void 0:"auto"}),i.parent?i:null}))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const o=e.getSelectedElement();if(o&&this.isImageWidget(o))return o;let n=t.parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){const o=Xb(e,t,null);if("imageBlock"==o){const o=function(e,t){const o=function(e,t){const o=e.getSelectedElement();if(o){const n=jm(e);if(n)return t.createRange(t.createPositionAt(o,n))}return uu(e,t)}(e,t),n=o.start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(t,e.model);if(e.model.schema.checkChild(o,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every((e=>!e.is("element","imageBlock")))}(e)}toImageWidget(e,t,o){t.setCustomProperty("image",!0,e);return Um(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${o}`:o}})}isImageWidget(e){return!!e.getCustomProperty("image")&&$m(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:o}of t.createRangeIn(e))if(this.isInlineImageView(o))return o}}function Xb(e,t,o){const n=e.model.schema,r=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?o||("inline"===r?"imageInline":"block"===r?"imageBlock":t.is("selection")?Qb(n,t):n.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));class ek extends Pr{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,o=t.plugins.get("ImageUtils"),n=t.model,r=o.getClosestSelectedImageElement(n.document.selection);n.change((t=>{t.setAttribute("alt",e.newValue,r)}))}}class tk extends Br{static get requires(){return[Yb]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new ek(this.editor))}}var ok=o(6831),nk={attributes:{"data-cke":!0}};nk.setAttributes=Wr(),nk.insert=qr().bind(null,"head"),nk.domAPI=Lr(),nk.insertStyleElement=Ur();Or()(ok.Z,nk);ok.Z&&ok.Z.locals&&ok.Z.locals;var rk=o(1590),ik={attributes:{"data-cke":!0}};ik.setAttributes=Wr(),ik.insert=qr().bind(null,"head"),ik.domAPI=Lr(),ik.insertStyleElement=Ur();Or()(rk.Z,ik);rk.Z&&rk.Z.locals&&rk.Z.locals;class sk extends Sh{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new Ar,this.keystrokes=new Cr,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),uh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),uh.cancel,"ck-button-cancel","cancel"),this._focusables=new xh,this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),Ch({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,o,n){const r=new op(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:o}}),n&&r.delegate("execute").to(this,n),r}_createLabeledInputView(){const e=this.locale.t,t=new kp(this.locale,ig);return t.label=e("Text alternative"),t}}function ak(e){const t=e.editing.view,o=Wg.defaultPositions,n=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(n.getClosestSelectedImageWidget(t.document.selection)),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}class lk extends Br{static get requires(){return[Cm]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",(o=>{const n=e.commands.get("imageTextAlternative"),r=new op(o);return r.set({label:t("Change image text alternative"),icon:uh.lowVision,tooltip:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",(e=>!!e)),this.listenTo(r,"execute",(()=>{this._showForm()})),r}))}_createForm(){const e=this.editor,t=e.editing.view.document,o=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Ah(sk))(e.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)})),this.listenTo(this._form,"cancel",(()=>{this._hideForm(!0)})),this._form.keystrokes.set("Esc",((e,t)=>{this._hideForm(!0),t()})),this.listenTo(e.ui,"update",(()=>{o.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const o=ak(e);t.updatePosition(o)}}(e):this._hideForm(!0)})),yh({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),o=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:ak(e)}),o.fieldView.value=o.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class ck extends Br{static get requires(){return[tk,lk]}static get pluginName(){return"ImageTextAlternative"}}function dk(e,t){const o=(t,o,n)=>{if(!n.consumable.consume(o.item,t.name))return;const r=n.writer,i=n.mapper.toViewElement(o.item),s=e.findViewImgElement(i);if(null===o.attributeNewValue){const e=o.attributeOldValue;e&&e.data&&(r.removeAttribute("srcset",s),r.removeAttribute("sizes",s),e.width&&r.removeAttribute("width",s))}else{const e=o.attributeNewValue;e&&e.data&&(r.setAttribute("srcset",e.data,s),r.setAttribute("sizes","100vw",s),e.width&&r.setAttribute("width",e.width,s))}};return e=>{e.on(`attribute:srcset:${t}`,o)}}function uk(e,t,o){const n=(t,o,n)=>{if(!n.consumable.consume(o.item,t.name))return;const r=n.writer,i=n.mapper.toViewElement(o.item),s=e.findViewImgElement(i);r.setAttribute(o.attributeKey,o.attributeNewValue||"",s)};return e=>{e.on(`attribute:${o}:${t}`,n)}}class hk extends Aa{observe(e){this.listenTo(e,"load",((e,t)=>{const o=t.target;this.checkShouldIgnoreEventFromTarget(o)||"IMG"==o.tagName&&this._fireEvents(t)}),{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class pk extends Pr{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&b("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&b("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=mr(e.source),o=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),r=Object.fromEntries(o.getAttributes());t.forEach(((e,t)=>{const i=o.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&i&&n.isImage(i)){const t=this.editor.model.createPositionAfter(i);n.insertImage({...e,...r},t)}else n.insertImage({...e,...r})}))}}class gk extends Pr{refresh(){const e=this.editor.plugins.get("ImageUtils"),t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=e.isImage(t),this.value=this.isEnabled?t.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement();this.editor.model.change((o=>{o.setAttribute("src",e.source,t),o.removeAttribute("srcset",t),o.removeAttribute("sizes",t)}))}}class mk extends Br{static get requires(){return[Yb]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(hk),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{const t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}});const o=new pk(e),n=new gk(e);e.commands.add("insertImage",o),e.commands.add("replaceImageSource",n),e.commands.add("imageInsert",o)}}class fk extends Pr{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(){const e=this.editor,t=this.editor.model,o=e.plugins.get("ImageUtils"),n=o.getClosestSelectedImageElement(t.document.selection),r=Object.fromEntries(n.getAttributes());return r.src||r.uploadId?t.change((e=>{const i=Array.from(t.markers).filter((e=>e.getRange().containsItem(n))),s=o.insertImage(r,t.createSelection(n,"on"),this._modelElementName);if(!s)return null;const a=e.createRangeOn(s);for(const t of i){const o=t.getRange(),n="$graveyard"!=o.root.rootName?o.getJoined(a,!0):a;e.updateMarker(t,{range:n})}return{oldElement:n,newElement:s}})):null}}class bk extends Br{static get requires(){return[mk,Yb,Bb]}static get pluginName(){return"ImageBlockEditing"}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new fk(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,o=e.conversion,n=e.plugins.get("ImageUtils");o.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>Zb(t)}),o.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:o})=>n.toImageWidget(Zb(o),o,t("image widget"))}),o.for("downcast").add(uk(n,"imageBlock","src")).add(uk(n,"imageBlock","alt")).add(dk(n,"imageBlock")),o.for("upcast").elementToElement({view:Jb(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)}).add(function(e){const t=(t,o,n)=>{if(!n.consumable.test(o.viewItem,{name:!0,classes:"image"}))return;const r=e.findViewImgElement(o.viewItem);if(!r||!n.consumable.test(r,{name:!0}))return;n.consumable.consume(o.viewItem,{name:!0,classes:"image"});const i=yr(n.convertItem(r,o.modelCursor).modelRange.getItems());i?(n.convertChildren(o.viewItem,i),n.updateConversionResult(i,o)):n.consumable.revert(o.viewItem,{name:!0,classes:"image"})};return e=>{e.on("element:figure",t)}}(n))}_setupClipboardIntegration(){const e=this.editor,t=e.model,o=e.editing.view,n=e.plugins.get("ImageUtils"),r=e.plugins.get("ClipboardPipeline");this.listenTo(r,"inputTransformation",((r,i)=>{const s=Array.from(i.content.getChildren());let a;if(!s.every(n.isInlineImageView))return;a=i.targetRanges?e.editing.mapper.toModelRange(i.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageBlock"===Qb(t.schema,l)){const e=new Au(o.document),t=s.map((t=>e.createElement("figure",{class:"image"},t)));i.content=e.createDocumentFragment(t)}}))}}var kk=o(9048),wk={attributes:{"data-cke":!0}};wk.setAttributes=Wr(),wk.insert=qr().bind(null,"head"),wk.domAPI=Lr(),wk.insertStyleElement=Ur();Or()(kk.Z,wk);kk.Z&&kk.Z.locals&&kk.Z.locals;class _k extends Br{static get requires(){return[mk,Yb,Bb]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor,t=e.model.schema;t.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),t.addChildCheck(((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1})),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new fk(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,o=e.conversion,n=e.plugins.get("ImageUtils");o.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),o.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:o})=>n.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(o),o,t("image widget"))}),o.for("downcast").add(uk(n,"imageInline","src")).add(uk(n,"imageInline","alt")).add(dk(n,"imageInline")),o.for("upcast").elementToElement({view:Jb(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,o=e.editing.view,n=e.plugins.get("ImageUtils"),r=e.plugins.get("ClipboardPipeline");this.listenTo(r,"inputTransformation",((r,i)=>{const s=Array.from(i.content.getChildren());let a;if(!s.every(n.isBlockImageView))return;a=i.targetRanges?e.editing.mapper.toModelRange(i.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageInline"===Qb(t.schema,l)){const e=new Au(o.document),t=s.map((t=>1===t.childCount?(Array.from(t.getAttributes()).forEach((o=>e.setAttribute(...o,n.findViewImgElement(t)))),t.getChild(0)):t));i.content=e.createDocumentFragment(t)}}))}}class yk extends Br{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[Yb]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),o=e.getFirstPosition().findAncestor("caption");return o&&t.isBlockImage(o.parent)?o:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}class Ak extends Pr{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),o=e.plugins.get("ImageUtils");if(!e.plugins.has(bk))return this.isEnabled=!1,void(this.value=!1);const n=e.model.document.selection,r=n.getSelectedElement();if(!r){const e=t.getCaptionFromModelSelection(n);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=o.isImage(r),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(r):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change((e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)}))}_showImageCaption(e,t){const o=this.editor.model.document.selection,n=this.editor.plugins.get("ImageCaptionEditing"),r=this.editor.plugins.get("ImageUtils");let i=o.getSelectedElement();const s=n._getSavedCaption(i);r.isInlineImage(i)&&(this.editor.execute("imageTypeBlock"),i=o.getSelectedElement());const a=s||e.createElement("caption");e.append(a,i),t&&e.setSelection(a,"in")}_hideImageCaption(e){const t=this.editor,o=t.model.document.selection,n=t.plugins.get("ImageCaptionEditing"),r=t.plugins.get("ImageCaptionUtils");let i,s=o.getSelectedElement();s?i=r.getCaptionFromImageModelElement(s):(i=r.getCaptionFromModelSelection(o),s=i.parent),n._saveCaption(s,i),e.setSelection(s,"on"),e.remove(i)}}class Ck extends Br{static get requires(){return[Yb,yk]}static get pluginName(){return"ImageCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new Ak(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,o=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),r=e.t;e.conversion.for("upcast").elementToElement({view:e=>n.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>o.isBlockImage(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:n})=>{if(!o.isBlockImage(e.parent))return null;const i=n.createEditableElement("figcaption");n.setCustomProperty("imageCaption",!0,i),Jr({view:t,element:i,text:r("Enter image caption"),keepOnFocus:!0});const s=e.parent.getAttribute("alt");return Jm(i,n,{label:s?r("Caption for image: %0",[s]):r("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),o=e.plugins.get("ImageCaptionUtils"),n=e.commands.get("imageTypeInline"),r=e.commands.get("imageTypeBlock"),i=e=>{if(!e.return)return;const{oldElement:n,newElement:r}=e.return;if(!n)return;if(t.isBlockImage(n)){const e=o.getCaptionFromImageModelElement(n);if(e)return void this._saveCaption(r,e)}const i=this._getSavedCaption(n);i&&this._saveCaption(r,i)};n&&this.listenTo(n,"execute",i,{priority:"low"}),r&&this.listenTo(r,"execute",i,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?xl.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,o=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",(()=>{const r=t.document.differ.getChanges();for(const t of r){if("alt"!==t.attributeKey)continue;const r=t.range.start.nodeAfter;if(o.isBlockImage(r)){const t=n.getCaptionFromImageModelElement(r);if(!t)return;e.editing.reconvertItem(t)}}}))}}class vk extends Br{static get requires(){return[yk]}static get pluginName(){return"ImageCaptionUI"}init(){const e=this.editor,t=e.editing.view,o=e.plugins.get("ImageCaptionUtils"),n=e.t;e.ui.componentFactory.add("toggleImageCaption",(r=>{const i=e.commands.get("toggleImageCaption"),s=new op(r);return s.set({icon:uh.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(i,"value","isEnabled"),s.bind("label").to(i,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(s,"execute",(()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const n=o.getCaptionFromModelSelection(e.model.document.selection);if(n){const o=e.editing.mapper.toViewElement(n);t.scrollToTheSelection(),t.change((e=>{e.addClass("image__caption_highlighted",o)}))}e.editing.view.focus()})),s}))}}var xk=o(8662),Ek={attributes:{"data-cke":!0}};Ek.setAttributes=Wr(),Ek.insert=qr().bind(null,"head"),Ek.domAPI=Lr(),Ek.insertStyleElement=Ur();Or()(xk.Z,Ek);xk.Z&&xk.Z.locals&&xk.Z.locals;function Dk(e){const t=e.map((e=>e.replace("+","\\+")));return new RegExp(`^image\\/(${t.join("|")})$`)}function Sk(e){return new Promise(((t,o)=>{const n=e.getAttribute("src");fetch(n).then((e=>e.blob())).then((e=>{const o=Tk(e,n),r=o.replace("image/",""),i=new File([e],`image.${r}`,{type:o});t(i)})).catch((e=>e&&"TypeError"===e.name?function(e){return function(e){return new Promise(((t,o)=>{const n=In.document.createElement("img");n.addEventListener("load",(()=>{const e=In.document.createElement("canvas");e.width=n.width,e.height=n.height;e.getContext("2d").drawImage(n,0,0),e.toBlob((e=>e?t(e):o()))})),n.addEventListener("error",(()=>o())),n.src=e}))}(e).then((t=>{const o=Tk(t,e),n=o.replace("image/","");return new File([t],`image.${n}`,{type:o})}))}(n).then(t).catch(o):o(e)))}))}function Tk(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class Bk extends Br{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=e.t,o=o=>{const n=new vb(o),r=e.commands.get("uploadImage"),i=e.config.get("image.upload.types"),s=Dk(i);return n.set({acceptedType:i.map((e=>`image/${e}`)).join(","),allowMultipleFiles:!0}),n.buttonView.set({label:t("Insert image"),icon:uh.image,tooltip:!0}),n.buttonView.bind("isEnabled").to(r),n.on("done",((t,o)=>{const n=Array.from(o).filter((e=>s.test(e.type)));n.length&&(e.execute("uploadImage",{file:n}),e.editing.view.focus())})),n};e.ui.componentFactory.add("uploadImage",o),e.ui.componentFactory.add("imageUpload",o)}}var Ik=o(5870),Pk={attributes:{"data-cke":!0}};Pk.setAttributes=Wr(),Pk.insert=qr().bind(null,"head"),Pk.domAPI=Lr(),Pk.insertStyleElement=Ur();Or()(Ik.Z,Pk);Ik.Z&&Ik.Z.locals&&Ik.Z.locals;var Rk=o(9899),zk={attributes:{"data-cke":!0}};zk.setAttributes=Wr(),zk.insert=qr().bind(null,"head"),zk.domAPI=Lr(),zk.insertStyleElement=Ur();Or()(Rk.Z,zk);Rk.Z&&Rk.Z.locals&&Rk.Z.locals;var Mk=o(9825),Nk={attributes:{"data-cke":!0}};Nk.setAttributes=Wr(),Nk.insert=qr().bind(null,"head"),Nk.domAPI=Lr(),Nk.insertStyleElement=Ur();Or()(Mk.Z,Nk);Mk.Z&&Mk.Z.locals&&Mk.Z.locals;class Fk extends Br{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.uploadStatusChange=(e,t,o)=>{const n=this.editor,r=t.item,i=r.getAttribute("uploadId");if(!o.consumable.consume(t.item,e.name))return;const s=n.plugins.get("ImageUtils"),a=n.plugins.get(Ab),l=i?t.attributeNewValue:null,c=this.placeholder,d=n.editing.mapper.toViewElement(r),u=o.writer;if("reading"==l)return Ok(d,u),void Vk(s,c,d,u);if("uploading"==l){const e=a.loaders.get(i);return Ok(d,u),void(e?(Lk(d,u),function(e,t,o,n){const r=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),r),o.on("change:uploadedPercent",((e,t,o)=>{n.change((e=>{e.setStyle("width",o+"%",r)}))}))}(d,u,e,n.editing.view),function(e,t,o,n){if(n.data){const r=e.findViewImgElement(t);o.setAttribute("src",n.data,r)}}(s,d,u,e)):Vk(s,c,d,u))}"complete"==l&&a.loaders.get(i)&&function(e,t,o){const n=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),n),setTimeout((()=>{o.change((e=>e.remove(e.createRangeOn(n))))}),3e3)}(d,u,n.editing.view),function(e,t){qk(e,t,"progressBar")}(d,u),Lk(d,u),function(e,t){t.removeClass("ck-appear",e)}(d,u)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function Ok(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function Vk(e,t,o,n){o.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",o);const r=e.findViewImgElement(o);r.getAttribute("src")!==t&&n.setAttribute("src",t,r),jk(o,"placeholder")||n.insert(n.createPositionAfter(r),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(n))}function Lk(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),qk(e,t,"placeholder")}function jk(e,t){for(const o of e.getChildren())if(o.getCustomProperty(t))return o}function qk(e,t,o){const n=jk(e,o);n&&t.remove(t.createRangeOn(n))}class Hk extends Pr{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),o=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(o)}execute(e){const t=mr(e.file),o=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),r=Object.fromEntries(o.getAttributes());t.forEach(((e,t)=>{const i=o.getSelectedElement();if(t&&i&&n.isImage(i)){const t=this.editor.model.createPositionAfter(i);this._uploadImage(e,r,t)}else this._uploadImage(e,r)}))}_uploadImage(e,t,o){const n=this.editor,r=n.plugins.get(Ab).createLoader(e),i=n.plugins.get("ImageUtils");r&&i.insertImage({...t,uploadId:r.id},o)}}class Wk extends Br{static get requires(){return[Ab,fm,Bb,Yb]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,o=e.conversion,n=e.plugins.get(Ab),r=e.plugins.get("ImageUtils"),i=e.plugins.get("ClipboardPipeline"),s=Dk(e.config.get("image.upload.types")),a=new Hk(e);e.commands.add("uploadImage",a),e.commands.add("imageUpload",a),o.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,o)=>{if(n=o.dataTransfer,Array.from(n.types).includes("text/html")&&""!==n.getData("text/html"))return;var n;const r=Array.from(o.dataTransfer.files).filter((e=>!!e&&s.test(e.type)));r.length&&(t.stop(),e.model.change((t=>{o.targetRanges&&t.setSelection(o.targetRanges.map((t=>e.editing.mapper.toModelRange(t)))),e.model.enqueueChange((()=>{e.execute("uploadImage",{file:r})}))})))})),this.listenTo(i,"inputTransformation",((t,o)=>{const i=Array.from(e.editing.view.createRangeIn(o.content)).map((e=>e.item)).filter((e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src")||!t.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!t.getAttribute("src").match(/^blob:/g))}(r,e)&&!e.getAttribute("uploadProcessed"))).map((e=>({promise:Sk(e),imageElement:e})));if(!i.length)return;const s=new Au(e.editing.view.document);for(const e of i){s.setAttribute("uploadProcessed",!0,e.imageElement);const t=n.createLoader(e.promise);t&&(s.setAttribute("src","",e.imageElement),s.setAttribute("uploadId",t.id,e.imageElement))}})),e.editing.view.document.on("dragover",((e,t)=>{t.preventDefault()})),t.on("change",(()=>{const o=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),r=new Set;for(const t of o)if("insert"==t.type&&"$text"!=t.name){const o=t.position.nodeAfter,i="$graveyard"==t.position.root.rootName;for(const t of $k(e,o)){const e=t.getAttribute("uploadId");if(!e)continue;const o=n.loaders.get(e);o&&(i?r.has(e)||o.abort():(r.add(e),this._uploadImageElements.set(e,t),"idle"==o.status&&this._readAndUpload(o)))}}})),this.on("uploadComplete",((e,{imageElement:t,data:o})=>{const n=o.urls?o.urls:o;this.editor.model.change((e=>{e.setAttribute("src",n.default,t),this._parseAndSetSrcsetAttributeOnImage(n,t,e)}))}),{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,o=t.model,r=t.locale.t,i=t.plugins.get(Ab),s=t.plugins.get(fm),a=t.plugins.get("ImageUtils"),l=this._uploadImageElements;return o.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","reading",l.get(e.id))})),e.read().then((()=>{const r=e.upload(),i=l.get(e.id);if(n.isSafari){const e=t.editing.mapper.toViewElement(i),o=a.findViewImgElement(e);t.editing.view.once("render",(()=>{if(!o.parent)return;const e=t.editing.view.domConverter.mapViewToDom(o.parent);if(!e)return;const n=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=n}))}return o.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","uploading",i)})),r})).then((t=>{o.enqueueChange({isUndoable:!1},(o=>{const n=l.get(e.id);o.setAttribute("uploadStatus","complete",n),this.fire("uploadComplete",{data:t,imageElement:n})})),c()})).catch((t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&s.showWarning(t,{title:r("Upload failed"),namespace:"upload"}),o.enqueueChange({isUndoable:!1},(t=>{t.remove(l.get(e.id))})),c()}));function c(){o.enqueueChange({isUndoable:!1},(t=>{const o=l.get(e.id);t.removeAttribute("uploadId",o),t.removeAttribute("uploadStatus",o),l.delete(e.id)})),i.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,o){let n=0;const r=Object.keys(e).filter((e=>{const t=parseInt(e,10);if(!isNaN(t))return n=Math.max(n,t),!0})).map((t=>`${e[t]} ${t}w`)).join(", ");""!=r&&o.setAttribute("srcset",{data:r,width:n},t)}}function $k(e,t){const o=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter((e=>o.isImage(e.item))).map((e=>e.item))}class Uk extends Br{static get pluginName(){return"ImageUpload"}static get requires(){return[Wk,Bk,Fk]}}var Gk=o(5150),Kk={attributes:{"data-cke":!0}};Kk.setAttributes=Wr(),Kk.insert=qr().bind(null,"head"),Kk.domAPI=Lr(),Kk.insertStyleElement=Ur();Or()(Gk.Z,Kk);Gk.Z&&Gk.Z.locals&&Gk.Z.locals;var Zk=o(9292),Jk={attributes:{"data-cke":!0}};Jk.setAttributes=Wr(),Jk.insert=qr().bind(null,"head"),Jk.domAPI=Lr(),Jk.insertStyleElement=Ur();Or()(Zk.Z,Jk);Zk.Z&&Zk.Z.locals&&Zk.Z.locals;class Qk extends Pr{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!t,t&&t.hasAttribute("width")?this.value={width:t.getAttribute("width"),height:null}:this.value=null}execute(e){const t=this.editor,o=t.model,n=t.plugins.get("ImageUtils").getClosestSelectedImageElement(o.document.selection);this.value={width:e.width,height:null},n&&o.change((t=>{t.setAttribute("width",e.width,n)}))}}class Yk extends Br{static get requires(){return[Yb]}static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new Qk(e);this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:"width"}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:"width"})}_registerConverters(e){const t=this.editor;t.conversion.for("downcast").add((t=>t.on(`attribute:width:${e}`,((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer,r=o.mapper.toViewElement(t.item);null!==t.attributeNewValue?(n.setStyle("width",t.attributeNewValue,r),n.addClass("image_resized",r)):(n.removeStyle("width",r),n.removeClass("image_resized",r))})))),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{width:/.+/}},model:{key:"width",value:e=>e.getStyle("width")}})}}const Xk={small:uh.objectSizeSmall,medium:uh.objectSizeMedium,large:uh.objectSizeLarge,original:uh.objectSizeFull};class ew extends Br{static get requires(){return[Yk]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),o=e.commands.get("resizeImage");this.bind("isEnabled").to(o);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:o,value:n,icon:r}=e,i=n?n+this._resizeUnit:null;t.ui.componentFactory.add(o,(o=>{const n=new op(o),s=t.commands.get("resizeImage"),a=this._getOptionLabelValue(e,!0);if(!Xk[r])throw new f("imageresizebuttons-missing-icon",t,e);return n.set({label:a,icon:Xk[r],tooltip:a,isToggleable:!0}),n.bind("isEnabled").to(this),n.bind("isOn").to(s,"value",tw(i)),this.listenTo(n,"execute",(()=>{t.execute("resizeImage",{width:i})})),n}))}_registerImageResizeDropdown(e){const t=this.editor,o=t.t,n=e.find((e=>!e.value)),r=r=>{const i=t.commands.get("resizeImage"),s=Xp(r,Sp),a=s.buttonView,l=o("Resize image");return a.set({tooltip:l,commandValue:n.value,icon:Xk.medium,isToggleable:!0,label:this._getOptionLabelValue(n),withText:!0,class:"ck-resize-image-button",ariaLabel:l,ariaLabelledBy:void 0}),a.bind("label").to(i,"value",(e=>e&&e.width?e.width:this._getOptionLabelValue(n))),s.bind("isEnabled").to(this),og(s,(()=>this._getResizeDropdownListItemDefinitions(e,i)),{ariaLabel:o("Image resize list"),role:"menu"}),this.listenTo(s,"execute",(e=>{t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus()})),s};t.ui.componentFactory.add("resizeImage",r),t.ui.componentFactory.add("imageResize",r)}_getOptionLabelValue(e,t=!1){const o=this.editor.t;return e.label?e.label:t?e.value?o("Resize image to %0",e.value+this._resizeUnit):o("Resize image to the original size"):e.value?e.value+this._resizeUnit:o("Original")}_getResizeDropdownListItemDefinitions(e,t){const o=new _r;return e.map((e=>{const n=e.value?e.value+this._resizeUnit:null,r={type:"button",model:new bm({commandName:"resizeImage",commandValue:n,label:this._getOptionLabelValue(e),role:"menuitemradio",withText:!0,icon:null})};r.model.bind("isOn").to(t,"value",tw(n)),o.add(r)})),o}}function tw(e){return t=>null===e&&t===e||null!==t&&t.width===e}const ow=/(image|image-inline)/,nw="image_resized";class rw extends Br{static get requires(){return[ub]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view;t.addObserver(hk),this.listenTo(t.document,"imageLoaded",((o,n)=>{if(!n.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const r=e.editing.view.domConverter,i=r.domToView(n.target).findAncestor({classes:ow});let s=this.editor.plugins.get(ub).getResizerByViewElement(i);if(s)return void s.redraw();const a=e.editing.mapper,l=a.toModelElement(i);s=e.plugins.get(ub).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:l,viewElement:i,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:()=>r.mapViewToDom(a.toViewElement(l.parent)),isCentered(){const e=l.getAttribute("imageStyle");return!e||"block"==e||"alignCenter"==e},onCommit(o){t.change((e=>{e.removeClass(nw,i)})),e.execute("resizeImage",{width:o})}}),s.on("updateSize",(()=>{i.hasClass(nw)||t.change((e=>{e.addClass(nw,i)}))})),s.bind("isEnabled").to(this)}))}}var iw=o(1043),sw={attributes:{"data-cke":!0}};sw.setAttributes=Wr(),sw.insert=qr().bind(null,"head"),sw.domAPI=Lr(),sw.insertStyleElement=Ur();Or()(iw.Z,sw);iw.Z&&iw.Z.locals&&iw.Z.locals;class aw extends Pr{constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map((e=>{if(e.isDefault)for(const t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]})))}refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(e={}){const t=this.editor,o=t.model,n=t.plugins.get("ImageUtils");o.change((t=>{const r=e.value;let i=n.getClosestSelectedImageElement(o.document.selection);r&&this.shouldConvertImageType(r,i)&&(this.editor.execute(n.isBlockImage(i)?"imageTypeInline":"imageTypeBlock"),i=n.getClosestSelectedImageElement(o.document.selection)),!r||this._styles.get(r).isDefault?t.removeAttribute("imageStyle",i):t.setAttribute("imageStyle",r,i)}))}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const{objectFullWidth:lw,objectInline:cw,objectLeft:dw,objectRight:uw,objectCenter:hw,objectBlockLeft:pw,objectBlockRight:gw}=uh,mw={get inline(){return{name:"inline",title:"In line",icon:cw,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:dw,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:pw,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:hw,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:uw,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:gw,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:hw,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:uw,modelElements:["imageBlock"],className:"image-style-side"}}},fw={full:lw,left:pw,right:gw,center:hw,inlineLeft:dw,inlineRight:uw,inline:cw},bw=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function kw(e){b("image-style-configuration-definition-invalid",e)}const ww={normalizeStyles:function(e){const t=(e.configuredStyles.options||[]).map((e=>function(e){e="string"==typeof e?mw[e]?{...mw[e]}:{name:e}:function(e,t){const o={...t};for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(o[n]=e[n]);return o}(mw[e.name],e);"string"==typeof e.icon&&(e.icon=fw[e.icon]||e.icon);return e}(e))).filter((t=>function(e,{isBlockPluginLoaded:t,isInlinePluginLoaded:o}){const{modelElements:n,name:r}=e;if(!(n&&n.length&&r))return kw({style:e}),!1;{const r=[t?"imageBlock":null,o?"imageInline":null];if(!n.some((e=>r.includes(e))))return b("image-style-missing-dependency",{style:e,missingPlugins:n.map((e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(t,e)));return t},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...bw]:[]},warnInvalidStyle:kw,DEFAULT_OPTIONS:mw,DEFAULT_ICONS:fw,DEFAULT_DROPDOWN_DEFINITIONS:bw};function _w(e,t){for(const o of t)if(o.name===e)return o}class yw extends Br{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[Yb]}init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=ww,o=this.editor,n=o.plugins.has("ImageBlockEditing"),r=o.plugins.has("ImageInlineEditing");o.config.define("image.styles",t(n,r)),this.normalizedStyles=e({configuredStyles:o.config.get("image.styles"),isBlockPluginLoaded:n,isInlinePluginLoaded:r}),this._setupConversion(n,r),this._setupPostFixer(),o.commands.add("imageStyle",new aw(o,this.normalizedStyles))}_setupConversion(e,t){const o=this.editor,n=o.model.schema,r=(i=this.normalizedStyles,(e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=_w(t.attributeNewValue,i),r=_w(t.attributeOldValue,i),s=o.mapper.toViewElement(t.item),a=o.writer;r&&a.removeClass(r.className,s),n&&a.addClass(n.className,s)});var i;const s=function(e){const t={imageInline:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageInline"))),imageBlock:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageBlock")))};return(e,o,n)=>{if(!o.modelRange)return;const r=o.viewItem,i=yr(o.modelRange.getItems());if(i&&n.schema.checkAttribute(i,"imageStyle"))for(const e of t[i.name])n.consumable.consume(r,{classes:e.className})&&n.writer.setAttribute("imageStyle",e.name,i)}}(this.normalizedStyles);o.editing.downcastDispatcher.on("attribute:imageStyle",r),o.data.downcastDispatcher.on("attribute:imageStyle",r),e&&(n.extend("imageBlock",{allowAttributes:"imageStyle"}),o.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),t&&(n.extend("imageInline",{allowAttributes:"imageStyle"}),o.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,o=e.plugins.get(Yb),n=new Map(this.normalizedStyles.map((e=>[e.name,e])));t.registerPostFixer((e=>{let r=!1;for(const i of t.differ.getChanges())if("insert"==i.type||"attribute"==i.type&&"imageStyle"==i.attributeKey){let t="insert"==i.type?i.position.nodeAfter:i.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!o.isImage(t))continue;const s=t.getAttribute("imageStyle");if(!s)continue;const a=n.get(s);a&&a.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),r=!0)}return r}))}}var Aw=o(4622),Cw={attributes:{"data-cke":!0}};Cw.setAttributes=Wr(),Cw.insert=qr().bind(null,"head"),Cw.domAPI=Lr(),Cw.insertStyleElement=Ur();Or()(Aw.Z,Cw);Aw.Z&&Aw.Z.locals&&Aw.Z.locals;class vw extends Br{static get requires(){return[yw]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],o=xw(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of o)this._createButton(e);const n=xw([...t.filter(N),...ww.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of n)this._createDropdown(e,o)}_createDropdown(e,t){const o=this.editor.ui.componentFactory;o.add(e.name,(n=>{let r;const{defaultItem:i,items:s,title:a}=e,l=s.filter((e=>t.find((({name:t})=>Ew(t)===e)))).map((e=>{const t=o.create(e);return e===i&&(r=t),t}));s.length!==l.length&&ww.warnInvalidStyle({dropdown:e});const c=Xp(n,Kp),d=c.buttonView,u=d.arrowView;return eg(c,l,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:Dw(a,r.label),class:null,tooltip:!0}),u.unbind("label"),u.set({label:a}),d.bind("icon").toMany(l,"isOn",((...e)=>{const t=e.findIndex(ji);return t<0?r.icon:l[t].icon})),d.bind("label").toMany(l,"isOn",((...e)=>{const t=e.findIndex(ji);return Dw(a,t<0?r.label:l[t].label)})),d.bind("isOn").toMany(l,"isOn",((...e)=>e.some(ji))),d.bind("class").toMany(l,"isOn",((...e)=>e.some(ji)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{l.some((({isOn:e})=>e))?c.isOpen=!c.isOpen:r.fire("execute")})),c.bind("isEnabled").toMany(l,"isEnabled",((...e)=>e.some(ji))),this.listenTo(c,"execute",(()=>{this.editor.editing.view.focus()})),c}))}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(Ew(t),(o=>{const n=this.editor.commands.get("imageStyle"),r=new op(o);return r.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",(e=>e===t)),r.on("execute",this._executeCommand.bind(this,t)),r}))}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function xw(e,t){for(const o of e)t[o.title]&&(o.title=t[o.title]);return e}function Ew(e){return`imageStyle:${e}`}function Dw(e,t){return(e?e+": ":"")+t}const Sw=Symbol("isWpButtonMacroSymbol");function Tw(e){const t=e.getSelectedElement();return!(!t||!function(e){return!!e.getCustomProperty(Sw)&&$m(e)}(t))}class Bw extends Br{static get pluginName(){return"OPChildPagesEditing"}static get buttonName(){return"insertChildPages"}init(){const e=this.editor,t=e.model,o=e.conversion;t.schema.register("op-macro-child-pages",{allowWhere:["$block"],allowAttributes:["page"],isBlock:!0,isLimit:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"child_pages"},model:(e,{writer:t})=>{const o=e.getAttribute("data-page")||"",n="true"==e.getAttribute("data-include-parent");return t.createElement("op-macro-child-pages",{page:o,includeParent:n})}}),o.for("editingDowncast").elementToElement({model:"op-macro-child-pages",view:(e,{writer:t})=>this.createMacroViewElement(e,t)}).add((e=>e.on("attribute:page",this.modelAttributeToView.bind(this)))).add((e=>e.on("attribute:includeParent",this.modelAttributeToView.bind(this)))),o.for("dataDowncast").elementToElement({model:"op-macro-child-pages",view:(e,{writer:t})=>t.createContainerElement("macro",{class:"child_pages","data-page":e.getAttribute("page")||"","data-include-parent":e.getAttribute("includeParent")||""})}),e.ui.componentFactory.add(Bw.buttonName,(t=>{const o=new op(t);return o.set({label:window.I18n.t("js.editor.macro.child_pages.button"),withText:!0}),o.on("execute",(()=>{e.model.change((t=>{const o=t.createElement("op-macro-child-pages",{});e.model.insertContent(o,e.model.document.selection)}))})),o}))}modelAttributeToView(e,t,o){const n=t.item;if(!n.is("element","op-macro-child-pages"))return;o.consumable.consume(t.item,e.name);const r=o.mapper.toViewElement(n);o.writer.remove(o.writer.createRangeIn(r)),this.setPlaceholderContent(o.writer,n,r)}macroLabel(){return window.I18n.t("js.editor.macro.child_pages.text")}pageLabel(e){return e&&e.length>0?e:window.I18n.t("js.editor.macro.child_pages.this_page")}includeParentText(e){return e?` (${window.I18n.t("js.editor.macro.child_pages.include_parent")})`:""}createMacroViewElement(e,t){const o=t.createContainerElement("div");return this.setPlaceholderContent(t,e,o),function(e,t,o){return t.setCustomProperty(Sw,!0,e),Um(e,t,{label:o})}(o,t,{label:this.macroLabel()})}setPlaceholderContent(e,t,o){const n=t.getAttribute("page"),r=t.getAttribute("includeParent"),i=this.macroLabel(),s=this.pageLabel(n),a=e.createContainerElement("span",{class:"macro-value"});let l=[e.createText(`${i} `)];e.insert(e.createPositionAt(a,0),e.createText(`${s}`)),l.push(a),l.push(e.createText(this.includeParentText(r))),e.insert(e.createPositionAt(o,0),l)}}class Iw extends Br{static get requires(){return[Cm]}static get pluginName(){return"OPChildPagesToolbar"}init(){const e=this.editor,t=this.editor.model,o=of(e);hb(e,"opEditChildPagesMacroButton",(e=>{const n=o.services.macros,r=e.getAttribute("page"),i=e.getAttribute("includeParent"),s=r&&r.length>0?r:"";n.configureChildPages(s,i).then((o=>t.change((t=>{t.setAttribute("page",o.page,e),t.setAttribute("includeParent",o.includeParent,e)}))))}))}afterInit(){gb(this,this.editor,"OPChildPages",Tw)}}class Pw extends Pr{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let o=e.schema.getLimitElement(t);if(t.containsEntireContent(o)||!Rw(e.schema,o))do{if(o=o.parent,!o)return}while(!Rw(e.schema,o));e.change((e=>{e.setSelection(o,"in")}))}}function Rw(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const zw=hr("Ctrl+A");class Mw extends Br{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new Pw(e)),this.listenTo(t,"keydown",((t,o)=>{ur(o)===zw&&(e.execute("selectAll"),o.preventDefault())}))}}class Nw extends Br{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(t=>{const o=e.commands.get("selectAll"),n=new op(t),r=t.t;return n.set({label:r("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),n.bind("isEnabled").to(o,"isEnabled"),this.listenTo(n,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),n}))}}class Fw extends Br{static get requires(){return[Mw,Nw]}static get pluginName(){return"SelectAll"}}const Ow="ckCsrfToken",Vw="abcdefghijklmnopqrstuvwxyz0123456789";function Lw(){let e=function(e){e=e.toLowerCase();const t=document.cookie.split(";");for(const o of t){const t=o.split("=");if(decodeURIComponent(t[0].trim().toLowerCase())===e)return decodeURIComponent(t[1])}return null}(Ow);var t,o;return e&&40==e.length||(e=function(e){let t="";const o=new Uint8Array(e);window.crypto.getRandomValues(o);for(let e=0;e.5?n.toUpperCase():n}return t}(40),t=Ow,o=e,document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(o)+";path=/"),e}class jw{constructor(e,t,o){this.loader=e,this.url=t,this.t=o}upload(){return this.loader.file.then((e=>new Promise(((t,o)=>{this._initRequest(),this._initListeners(t,o,e),this._sendRequest(e)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,o){const n=this.xhr,r=this.loader,i=(0,this.t)("Cannot upload file:")+` ${o.name}.`;n.addEventListener("error",(()=>t(i))),n.addEventListener("abort",(()=>t())),n.addEventListener("load",(()=>{const o=n.response;if(!o||!o.uploaded)return t(o&&o.error&&o.error.message?o.error.message:i);e({default:o.url})})),n.upload&&n.upload.addEventListener("progress",(e=>{e.lengthComputable&&(r.uploadTotal=e.total,r.uploaded=e.loaded)}))}_sendRequest(e){const t=new FormData;t.append("upload",e),t.append("ckCsrfToken",Lw()),this.xhr.send(t)}}function qw(e,t,o,n){let r,i=null;"function"==typeof n?r=n:(i=e.commands.get(n),r=()=>{e.execute(n)}),e.model.document.on("change:data",((s,a)=>{if(i&&!i.isEnabled||!t.isEnabled)return;const l=yr(e.model.document.selection.getRanges());if(!l.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const c=Array.from(e.model.document.differ.getChanges()),d=c[0];if(1!=c.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const u=d.position.parent;if(u.is("element","codeBlock"))return;if(u.is("element","listItem")&&"function"!=typeof n&&!["numberedList","bulletedList","todoList"].includes(n))return;if(i&&!0===i.value)return;const h=u.getChild(0),p=e.model.createRangeOn(h);if(!p.containsRange(l)&&!l.end.isEqual(p.end))return;const g=o.exec(h.data.substr(0,l.end.offset));g&&e.model.enqueueChange((t=>{const o=t.createPositionAt(u,0),n=t.createPositionAt(u,g[0].length),i=new Kl(o,n);if(!1!==r({match:g})){t.remove(i);const o=e.model.document.selection.getFirstRange(),n=t.createRangeIn(u);!u.isEmpty||n.isEqual(o)||n.containsRange(o,!0)||t.remove(u)}i.detach(),e.model.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function Hw(e,t,o,n){let r,i;o instanceof RegExp?r=o:i=o,i=i||(e=>{let t;const o=[],n=[];for(;null!==(t=r.exec(e))&&!(t&&t.length<4);){let{index:e,1:r,2:i,3:s}=t;const a=r+i+s;e+=t[0].length-a.length;const l=[e,e+r.length],c=[e+r.length+i.length,e+r.length+i.length+s.length];o.push(l),o.push(c),n.push([e+r.length,e+r.length+i.length])}return{remove:o,format:n}}),e.model.document.on("change:data",((o,r)=>{if(r.isUndo||!r.isLocal||!t.isEnabled)return;const s=e.model,a=s.document.selection;if(!a.isCollapsed)return;const l=Array.from(s.document.differ.getChanges()),c=l[0];if(1!=l.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const d=a.focus,u=d.parent,{text:h,range:p}=function(e,t){let o=e.start;const n=Array.from(e.getItems()).reduce(((e,n)=>!n.is("$text")&&!n.is("$textProxy")||n.getAttribute("code")?(o=t.createPositionAfter(n),""):e+n.data),"");return{text:n,range:t.createRange(o,e.end)}}(s.createRange(s.createPositionAt(u,0),d),s),g=i(h),m=Ww(p.start,g.format,s),f=Ww(p.start,g.remove,s);m.length&&f.length&&s.enqueueChange((t=>{if(!1!==n(t,m)){for(const e of f.reverse())t.remove(e);s.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function Ww(e,t,o){return t.filter((e=>void 0!==e[0]&&void 0!==e[1])).map((t=>o.createRange(e.getShiftedBy(t[0]),e.getShiftedBy(t[1]))))}function $w(e,t){return(o,n)=>{if(!e.commands.get(t).isEnabled)return!1;const r=e.model.schema.getValidRanges(n,t);for(const e of r)o.setAttribute(t,!0,e);o.removeSelectionAttribute(t)}}class Uw extends Pr{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,o=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(o.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const r=t.schema.getValidRanges(o.getRanges(),this.attributeKey);for(const t of r)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,o=e.document.selection;if(o.isCollapsed)return o.hasAttribute(this.attributeKey);for(const e of o.getRanges())for(const o of e.getItems())if(t.checkAttribute(o,this.attributeKey))return o.hasAttribute(this.attributeKey);return!1}}const Gw="bold";class Kw extends Br{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Gw}),e.model.schema.setAttributeProperties(Gw,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Gw,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t&&("bold"==t||Number(t)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add(Gw,new Uw(e,Gw)),e.keystrokes.set("CTRL+B",Gw)}}const Zw="bold";class Jw extends Br{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Zw,(o=>{const n=e.commands.get(Zw),r=new op(o);return r.set({label:t("Bold"),icon:uh.bold,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute(Zw),e.editing.view.focus()})),r}))}}const Qw="code";class Yw extends Br{static get pluginName(){return"CodeEditing"}static get requires(){return[vf]}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Qw}),e.model.schema.setAttributeProperties(Qw,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:Qw,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),e.commands.add(Qw,new Uw(e,Qw)),e.plugins.get(vf).registerAttribute(Qw),Pf(e,Qw,"code","ck-code_selected")}}var Xw=o(8180),e_={attributes:{"data-cke":!0}};e_.setAttributes=Wr(),e_.insert=qr().bind(null,"head"),e_.domAPI=Lr(),e_.insertStyleElement=Ur();Or()(Xw.Z,e_);Xw.Z&&Xw.Z.locals&&Xw.Z.locals;const t_="code";class o_ extends Br{static get pluginName(){return"CodeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(t_,(o=>{const n=e.commands.get(t_),r=new op(o);return r.set({label:t("Code"),icon:'',tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute(t_),e.editing.view.focus()})),r}))}}const n_="italic";class r_ extends Br{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:n_}),e.model.schema.setAttributeProperties(n_,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:n_,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(n_,new Uw(e,n_)),e.keystrokes.set("CTRL+I",n_)}}const i_="italic";class s_ extends Br{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(i_,(o=>{const n=e.commands.get(i_),r=new op(o);return r.set({label:t("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute(i_),e.editing.view.focus()})),r}))}}const a_="strikethrough";class l_ extends Br{static get pluginName(){return"StrikethroughEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:a_}),e.model.schema.setAttributeProperties(a_,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:a_,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(a_,new Uw(e,a_)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}const c_="strikethrough";class d_ extends Br{static get pluginName(){return"StrikethroughUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(c_,(o=>{const n=e.commands.get(c_),r=new op(o);return r.set({label:t("Strikethrough"),icon:'',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute(c_),e.editing.view.focus()})),r}))}}class u_ extends Pr{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,o=t.schema,n=t.document.selection,r=Array.from(n.getSelectedBlocks()),i=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(i){const t=r.filter((e=>h_(e)||g_(o,e)));this._applyQuote(e,t)}else this._removeQuote(e,r.filter(h_))}))}_getValue(){const e=yr(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!h_(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,o=yr(e.getSelectedBlocks());return!!o&&g_(t,o)}_removeQuote(e,t){p_(e,t).reverse().forEach((t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const o=e.createPositionBefore(t.start.parent);return void e.move(t,o)}t.end.isAtEnd||e.split(t.end);const o=e.createPositionAfter(t.end.parent);e.move(t,o)}))}_applyQuote(e,t){const o=[];p_(e,t).reverse().forEach((t=>{let n=h_(t.start);n||(n=e.createElement("blockQuote"),e.wrap(t,n)),o.push(n)})),o.reverse().reduce(((t,o)=>t.nextSibling==o?(e.merge(e.createPositionAfter(t)),t):o))}}function h_(e){return"blockQuote"==e.parent.name?e.parent:null}function p_(e,t){let o,n=0;const r=[];for(;n{const n=e.model.document.differ.getChanges();for(const e of n)if("insert"==e.type){const n=e.position.nodeAfter;if(!n)continue;if(n.is("element","blockQuote")&&n.isEmpty)return o.remove(n),!0;if(n.is("element","blockQuote")&&!t.checkChild(e.position,n))return o.unwrap(n),!0;if(n.is("element")){const e=o.createRangeIn(n);for(const n of e.getItems())if(n.is("element","blockQuote")&&!t.checkChild(o.createPositionBefore(n),n))return o.unwrap(n),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return o.remove(t),!0}return!1}));const o=this.editor.editing.view.document,n=e.model.document.selection,r=e.commands.get("blockQuote");this.listenTo(o,"enter",((t,o)=>{if(!n.isCollapsed||!r.value)return;n.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),o.preventDefault(),t.stop())}),{context:"blockquote"}),this.listenTo(o,"delete",((t,o)=>{if("backward"!=o.direction||!n.isCollapsed||!r.value)return;const i=n.getLastPosition().parent;i.isEmpty&&!i.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),o.preventDefault(),t.stop())}),{context:"blockquote"})}}var f_=o(636),b_={attributes:{"data-cke":!0}};b_.setAttributes=Wr(),b_.insert=qr().bind(null,"head"),b_.domAPI=Lr(),b_.insertStyleElement=Ur();Or()(f_.Z,b_);f_.Z&&f_.Z.locals&&f_.Z.locals;class k_ extends Br{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",(o=>{const n=e.commands.get("blockQuote"),r=new op(o);return r.set({label:t("Block quote"),icon:uh.quote,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute("blockQuote"),e.editing.view.focus()})),r}))}}class w_ extends Pr{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=yr(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&__(t,e.schema)}execute(e={}){const t=this.editor.model,o=t.document,n=e.selection||o.selection;t.canEditAt(n)&&t.change((e=>{const o=n.getSelectedBlocks();for(const n of o)!n.is("element","paragraph")&&__(n,t.schema)&&e.rename(n,"paragraph")}))}}function __(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class y_ extends Pr{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,o=e.attributes;let n=e.position;t.canEditAt(n)&&t.change((e=>{const r=e.createElement("paragraph");if(o&&t.schema.setAllowedAttributes(r,o,e),!t.schema.checkChild(n.parent,r)){const o=t.schema.findAllowedParent(n,r);if(!o)return;n=e.split(n,o).position}t.insertContent(r,n),e.setSelection(r,"in")}))}}class A_ extends Br{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new w_(e)),e.commands.add("insertParagraph",new y_(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>A_.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}A_.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class C_ extends Pr{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=yr(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t=>v_(e,t,this.editor.model.schema)))}execute(e){const t=this.editor.model,o=t.document,n=e.value;t.change((e=>{const r=Array.from(o.selection.getSelectedBlocks()).filter((e=>v_(e,n,t.schema)));for(const t of r)t.is("element",n)||e.rename(t,n)}))}}function v_(e,t,o){return o.checkChild(e.parent,t)&&!o.isObject(e)}const x_="paragraph";class E_ extends Br{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[A_]}init(){const e=this.editor,t=e.config.get("heading.options"),o=[];for(const n of t)"paragraph"!==n.model&&(e.model.schema.register(n.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(n),o.push(n.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new C_(e,o))}afterInit(){const e=this.editor,t=e.commands.get("enter"),o=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",((t,n)=>{const r=e.model.document.selection.getFirstPosition().parent;o.some((e=>r.is("element",e.model)))&&!r.is("element",x_)&&0===r.childCount&&n.writer.rename(r,x_)}))}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:p.get("low")+1})}}var D_=o(3230),S_={attributes:{"data-cke":!0}};S_.setAttributes=Wr(),S_.insert=qr().bind(null,"head"),S_.domAPI=Lr(),S_.insertStyleElement=Ur();Or()(D_.Z,S_);D_.Z&&D_.Z.locals&&D_.Z.locals;class T_ extends Br{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,o=function(e){const t=e.t,o={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map((e=>{const t=o[e.title];return t&&t!=e.title&&(e.title=t),e}))}(e),n=t("Choose heading"),r=t("Heading");e.ui.componentFactory.add("heading",(t=>{const i={},s=new _r,a=e.commands.get("heading"),l=e.commands.get("paragraph"),c=[a];for(const e of o){const t={type:"button",model:new bm({label:e.title,class:e.class,role:"menuitemradio",withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(l,"value"),t.model.set("commandName","paragraph"),c.push(l)):(t.model.bind("isOn").to(a,"value",(t=>t===e.model)),t.model.set({commandName:"heading",commandValue:e.model})),s.add(t),i[e.model]=e.title}const d=Xp(t);return og(d,s,{ariaLabel:r,role:"menu"}),d.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(c,"isEnabled",((...e)=>e.some((e=>e)))),d.buttonView.bind("label").to(a,"value",l,"value",((e,t)=>{const o=e||t&&"paragraph";return"boolean"==typeof o?n:i[o]?i[o]:n})),this.listenTo(d,"execute",(t=>{const{commandName:o,commandValue:n}=t.source;e.execute(o,n?{value:n}:void 0),e.editing.view.focus()})),d}))}}new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);class B_{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach((e=>this._definitions.add(e))):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",((e,t,o)=>{if(!o.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!o.schema.isInline(t.item))return;const n=o.writer,r=n.document.selection;for(const e of this._definitions){const i=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,i);for(const t in e.styles)n.setStyle(t,e.styles[t],i);n.setCustomProperty("link",!0,i),e.callback(t.attributeNewValue)?t.item.is("selection")?n.wrap(r.getFirstRange(),i):n.wrap(o.mapper.toViewRange(t.range),i):n.unwrap(o.mapper.toViewRange(t.range),i)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,t,{writer:o,mapper:n})=>{const r=n.toViewElement(t.item),i=Array.from(r.getChildren()).find((e=>e.is("element","a")));for(const e of this._definitions){const n=vr(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of n)"class"===e?o.addClass(t,i):o.setAttribute(e,t,i);e.classes&&o.addClass(e.classes,i);for(const t in e.styles)o.setStyle(t,e.styles[t],i)}else{for(const[e,t]of n)"class"===e?o.removeClass(t,i):o.removeAttribute(e,i);e.classes&&o.removeClass(e.classes,i);for(const t in e.styles)o.removeStyle(t,i)}}}))}}}const I_=function(e,t,o){var n=e.length;return o=void 0===o?n:o,!t&&o>=n?e:Ti(e,t,o)};var P_=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const R_=function(e){return P_.test(e)};const z_=function(e){return e.split("")};var M_="\\ud800-\\udfff",N_="["+M_+"]",F_="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",O_="\\ud83c[\\udffb-\\udfff]",V_="[^"+M_+"]",L_="(?:\\ud83c[\\udde6-\\uddff]){2}",j_="[\\ud800-\\udbff][\\udc00-\\udfff]",q_="(?:"+F_+"|"+O_+")"+"?",H_="[\\ufe0e\\ufe0f]?",W_=H_+q_+("(?:\\u200d(?:"+[V_,L_,j_].join("|")+")"+H_+q_+")*"),$_="(?:"+[V_+F_+"?",F_,L_,j_,N_].join("|")+")",U_=RegExp(O_+"(?="+O_+")|"+$_+W_,"g");const G_=function(e){return e.match(U_)||[]};const K_=function(e){return R_(e)?G_(e):z_(e)};const Z_=function(e){return function(t){t=vi(t);var o=R_(t)?K_(t):void 0,n=o?o[0]:t.charAt(0),r=o?I_(o,1).join(""):t.slice(1);return n[e]()+r}}("toUpperCase"),J_=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Q_=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,Y_=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,X_=/^((\w+:(\/{2,})?)|(\W))/i,ey="Ctrl+K";function ty(e,{writer:t}){const o=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,o),o}function oy(e){const t=String(e);return function(e){const t=e.replace(J_,"");return!!t.match(Q_)}(t)?t:"#"}function ny(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function ry(e,t){const o=(n=e,Y_.test(n)?"mailto:":t);var n;const r=!!o&&!iy(e);return e&&r?o+e:e}function iy(e){return X_.test(e)}function sy(e){window.open(e,"_blank","noopener")}class ay extends Pr{constructor(){super(...arguments),this.manualDecorators=new _r,this.automaticDecorators=new B_}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,o=t.getSelectedElement()||yr(t.getSelectedBlocks());ny(o,e.schema)?(this.value=o.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(o,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const o=this.editor.model,n=o.document.selection,r=[],i=[];for(const e in t)t[e]?r.push(e):i.push(e);o.change((t=>{if(n.isCollapsed){const s=n.getFirstPosition();if(n.hasAttribute("linkHref")){const a=ly(n);let l=Bf(s,"linkHref",n.getAttribute("linkHref"),o);n.getAttribute("linkHref")===a&&(l=this._updateLinkContent(o,t,l,e)),t.setAttribute("linkHref",e,l),r.forEach((e=>{t.setAttribute(e,!0,l)})),i.forEach((e=>{t.removeAttribute(e,l)})),t.setSelection(t.createPositionAfter(l.end.nodeBefore))}else if(""!==e){const i=vr(n.getAttributes());i.set("linkHref",e),r.forEach((e=>{i.set(e,!0)}));const{end:a}=o.insertContent(t.createText(e,i),s);t.setSelection(a)}["linkHref",...r,...i].forEach((e=>{t.removeSelectionAttribute(e)}))}else{const s=o.schema.getValidRanges(n.getRanges(),"linkHref"),a=[];for(const e of n.getSelectedBlocks())o.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const l=a.slice();for(const e of s)this._isRangeToUpdate(e,a)&&l.push(e);for(const s of l){let a=s;if(1===l.length){const r=ly(n);n.getAttribute("linkHref")===r&&(a=this._updateLinkContent(o,t,s,e),t.setSelection(t.createSelection(a)))}t.setAttribute("linkHref",e,a),r.forEach((e=>{t.setAttribute(e,!0,a)})),i.forEach((e=>{t.removeAttribute(e,a)}))}}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,o=t.document.selection,n=o.getSelectedElement();return ny(n,t.schema)?n.getAttribute(e):o.getAttribute(e)}_isRangeToUpdate(e,t){for(const o of t)if(o.containsRange(e))return!1;return!0}_updateLinkContent(e,t,o,n){const r=t.createText(n,{linkHref:n});return e.insertContent(r,o)}}function ly(e){if(e.isCollapsed){const t=e.getFirstPosition();return t.textNode&&t.textNode.data}{const t=Array.from(e.getFirstRange().getItems());if(t.length>1)return null;const o=t[0];return o.is("$text")||o.is("$textProxy")?o.data:null}}class cy extends Pr{refresh(){const e=this.editor.model,t=e.document.selection,o=t.getSelectedElement();ny(o,e.schema)?this.isEnabled=e.schema.checkAttribute(o,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,o=t.document.selection,n=e.commands.get("link");t.change((e=>{const r=o.isCollapsed?[Bf(o.getFirstPosition(),"linkHref",o.getAttribute("linkHref"),t)]:t.schema.getValidRanges(o.getRanges(),"linkHref");for(const t of r)if(e.removeAttribute("linkHref",t),n)for(const o of n.manualDecorators)e.removeAttribute(o.id,t)}))}}class dy extends(H()){constructor({id:e,label:t,attributes:o,classes:n,styles:r,defaultValue:i}){super(),this.id=e,this.set("value",void 0),this.defaultValue=i,this.label=t,this.attributes=o,this.classes=n,this.styles=r}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var uy=o(399),hy={attributes:{"data-cke":!0}};hy.setAttributes=Wr(),hy.insert=qr().bind(null,"head"),hy.domAPI=Lr(),hy.insertStyleElement=Ur();Or()(uy.Z,hy);uy.Z&&uy.Z.locals&&uy.Z.locals;const py="automatic",gy=/^(https?:)?\/\//;class my extends Br{static get pluginName(){return"LinkEditing"}static get requires(){return[vf,uf,Bb]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:ty}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>ty(oy(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new ay(e)),e.commands.add("unlink",new cy(e));const t=function(e,t){const o={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach((e=>("label"in e&&o[e.label]&&(e.label=o[e.label]),e))),t}(e.t,function(e){const t=[];if(e)for(const[o,n]of Object.entries(e)){const e=Object.assign({},n,{id:`link${Z_(o)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter((e=>e.mode===py))),this._enableManualDecorators(t.filter((e=>"manual"===e.mode)));e.plugins.get(vf).registerAttribute("linkHref"),Pf(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink(),this._enableClipboardIntegration()}_enableAutomaticDecorators(e){const t=this.editor,o=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&o.add({id:"linkIsExternal",mode:py,callback:e=>!!e&&gy.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),o.add(e),o.length&&t.conversion.for("downcast").add(o.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,o=t.commands.get("link").manualDecorators;e.forEach((e=>{t.model.schema.extend("$text",{allowAttributes:e.id});const n=new dy(e);o.add(n),t.conversion.for("downcast").attributeToElement({model:n.id,view:(e,{writer:t,schema:o},{item:r})=>{if((r.is("selection")||o.isInline(r))&&e){const e=t.createAttributeElement("a",n.attributes,{priority:5});n.classes&&t.addClass(n.classes,e);for(const o in n.styles)t.setStyle(o,n.styles[o],e);return t.setCustomProperty("link",!0,e),e}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...n._createPattern()},model:{key:n.id}})}))}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((e,t)=>{if(!(n.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let o=t.domTarget;if("a"!=o.tagName.toLowerCase()&&(o=o.closest("a")),!o)return;const r=o.getAttribute("href");r&&(e.stop(),t.preventDefault(),sy(r))}),{context:"$capture"}),this.listenTo(t,"keydown",((t,o)=>{const n=e.commands.get("link").value;!!n&&o.keyCode===cr.enter&&o.altKey&&(t.stop(),sy(n))}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(e,"insertContent",(()=>{const o=t.anchor.nodeBefore,n=t.anchor.nodeAfter;t.hasAttribute("linkHref")&&o&&o.hasAttribute("linkHref")&&(n&&n.hasAttribute("linkHref")||e.change((t=>{fy(t,ky(e.schema))})))}),{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,t=e.model;e.editing.view.addObserver(yu);let o=!1;this.listenTo(e.editing.view.document,"mousedown",(()=>{o=!0})),this.listenTo(e.editing.view.document,"selectionChange",(()=>{if(!o)return;o=!1;const e=t.document.selection;if(!e.isCollapsed)return;if(!e.hasAttribute("linkHref"))return;const n=e.getFirstPosition(),r=Bf(n,"linkHref",e.getAttribute("linkHref"),t);(n.isTouching(r.start)||n.isTouching(r.end))&&t.change((e=>{fy(e,ky(t.schema))}))}))}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let o=null,n=!1;this.listenTo(t.document,"delete",(()=>{n=!0}),{priority:"high"}),this.listenTo(e.model,"deleteContent",(()=>{const t=e.model.document.selection;t.isCollapsed||(n?n=!1:by(e)&&function(e){const t=e.document.selection,o=t.getFirstPosition(),n=t.getLastPosition(),r=o.nodeAfter;if(!r)return!1;if(!r.is("$text"))return!1;if(!r.hasAttribute("linkHref"))return!1;const i=n.textNode||n.nodeBefore;if(r===i)return!0;return Bf(o,"linkHref",r.getAttribute("linkHref"),e).containsRange(e.createRange(o,n),!0)}(e.model)&&(o=t.getAttributes()))}),{priority:"high"}),this.listenTo(e.model,"insertContent",((t,[r])=>{n=!1,by(e)&&o&&(e.model.change((e=>{for(const[t,n]of o)e.setAttribute(t,n,r)})),o=null)}),{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,o=t.document.selection,n=e.editing.view;let r=!1,i=!1;this.listenTo(n.document,"delete",((e,t)=>{i="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{r=!1;const e=o.getFirstPosition(),n=o.getAttribute("linkHref");if(!n)return;const i=Bf(e,"linkHref",n,t);r=i.containsPosition(e)||i.end.isEqual(e)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{i&&(i=!1,r||e.model.enqueueChange((e=>{fy(e,ky(t.schema))})))}),{priority:"low"})}_enableClipboardIntegration(){const e=this.editor,t=e.model,o=this.editor.config.get("link.defaultProtocol");o&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",((e,n)=>{t.change((e=>{const t=e.createRangeIn(n.content);for(const n of t.getItems())if(n.hasAttribute("linkHref")){const t=ry(n.getAttribute("linkHref"),o);e.setAttribute("linkHref",t,n)}}))}))}}function fy(e,t){e.removeSelectionAttribute("linkHref");for(const o of t)e.removeSelectionAttribute(o)}function by(e){return e.model.change((e=>e.batch)).isTyping}function ky(e){return e.getDefinition("$text").allowAttributes.filter((e=>e.startsWith("link")))}var wy=o(4827),_y={attributes:{"data-cke":!0}};_y.setAttributes=Wr(),_y.insert=qr().bind(null,"head"),_y.domAPI=Lr(),_y.insertStyleElement=Ur();Or()(wy.Z,_y);wy.Z&&wy.Z.locals&&wy.Z.locals;class yy extends Sh{constructor(e,t){super(e),this.focusTracker=new Ar,this.keystrokes=new Cr,this._focusables=new xh;const o=e.t;this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(o("Save"),uh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(o("Cancel"),uh.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const n=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&n.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:n,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),Ch({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new kp(this.locale,ig);return t.label=e("Link URL"),t}_createButton(e,t,o,n){const r=new op(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:o}}),n&&r.delegate("execute").to(this,n),r}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const o of e.manualDecorators){const n=new ip(this.locale);n.set({name:o.id,label:o.label,withText:!0}),n.bind("isOn").toMany([o,e],"value",((e,t)=>void 0===t&&void 0===e?!!o.defaultValue:!!e)),n.on("execute",(()=>{o.set("value",!n.isOn)})),t.add(n)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new Sh;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}var Ay=o(9465),Cy={attributes:{"data-cke":!0}};Cy.setAttributes=Wr(),Cy.insert=qr().bind(null,"head"),Cy.domAPI=Lr(),Cy.insertStyleElement=Ur();Or()(Ay.Z,Cy);Ay.Z&&Ay.Z.locals&&Ay.Z.locals;class vy extends Sh{constructor(e){super(e),this.focusTracker=new Ar,this.keystrokes=new Cr,this._focusables=new xh;const t=e.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'',"unlink"),this.editButtonView=this._createButton(t("Edit link"),uh.pencil,"edit"),this.set("href",void 0),this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,o){const n=new op(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.delegate("execute").to(this,o),n}_createPreviewButton(){const e=new op(this.locale),t=this.bindTemplate,o=this.t;return e.set({withText:!0,tooltip:o("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&oy(e))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||o("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}const xy="link-ui";class Ey extends Br{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[Cm]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(_u),this._balloon=e.plugins.get(Cm),this._createToolbarLinkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:xy,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:xy,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new vy(e.locale),o=e.commands.get("link"),n=e.commands.get("unlink");return t.bind("href").to(o,"value"),t.editButtonView.bind("isEnabled").to(o),t.unlinkButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",(()=>{this._addFormView()})),this.listenTo(t,"unlink",(()=>{e.execute("unlink"),this._hideUI()})),t.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),t.keystrokes.set(ey,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),o=e.config.get("link.defaultProtocol"),n=new(Ah(yy))(e.locale,t);return n.urlInputView.fieldView.bind("value").to(t,"value"),n.urlInputView.bind("isEnabled").to(t,"isEnabled"),n.saveButtonView.bind("isEnabled").to(t),this.listenTo(n,"submit",(()=>{const{value:t}=n.urlInputView.fieldView.element,r=ry(t,o);e.execute("link",r,n.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(n,"cancel",(()=>{this._closeFormView()})),n.keystrokes.set("Esc",((e,t)=>{this._closeFormView(),t()})),n}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),o=e.t;e.ui.componentFactory.add("link",(e=>{const n=new op(e);return n.isEnabled=!0,n.label=o("Link"),n.icon='',n.keystroke=ey,n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(t,"isEnabled"),n.bind("isOn").to(t,"value",(e=>!!e)),this.listenTo(n,"execute",(()=>this._showUI(!0))),n}))}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),e.keystrokes.set(ey,((t,o)=>{o(),e.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((e,t)=>{this._isUIVisible&&(this._hideUI(),t())})),yh({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let o=this._getSelectedLinkElement(),n=i();const r=()=>{const e=this._getSelectedLinkElement(),t=i();o&&!e||!o&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),o=e,n=t};function i(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",r),this.listenTo(this._balloon,"change:visibleView",r)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return!!this.formView&&e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,o=e.document;let n;if(t.markers.has(xy)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(xy)),o=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));n=e.domConverter.viewRangeToDom(o)}else n=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(o.selection.getFirstRange())};return{target:n}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,o=t.getSelectedElement();if(t.isCollapsed||o&&$m(o))return Dy(t.getFirstPosition());{const o=t.getFirstRange().getTrimmed(),n=Dy(o.start),r=Dy(o.end);return n&&n==r&&e.createRangeIn(n).getTrimmed().isEqual(o)?n:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const o=e.document.selection.getFirstRange();if(e.markers.has(xy))t.updateMarker(xy,{range:o});else if(o.start.isAtEnd){const n=o.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:o});t.addMarker(xy,{usingOperation:!1,affectsData:!1,range:t.createRange(n,o.end)})}else t.addMarker(xy,{usingOperation:!1,affectsData:!1,range:o})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(xy)&&e.change((e=>{e.removeMarker(xy)}))}}function Dy(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))||null}const Sy=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class Ty extends Br{static get requires(){return[_f]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new Cf(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=By(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,o)=>{const{batch:n,range:r,url:i}=o;if(!n.isTyping)return;const s=r.end.getShiftedBy(-1),a=s.getShiftedBy(-i.length),l=e.model.createRange(a,s);this._applyAutoLink(i,l)})),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,o=e.commands.get("enter");o&&o.on("execute",(()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const o=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(o)}))}_enableShiftEnterHandling(){const e=this.editor,t=e.model,o=e.commands.get("shiftEnter");o&&o.on("execute",(()=>{const e=t.document.selection.getFirstPosition(),o=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(o)}))}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:o,range:n}=Af(e,t),r=By(o);if(r){const e=t.createRange(n.end.getShiftedBy(-r.length),n.end);this._applyAutoLink(r,e)}}_applyAutoLink(e,t){const o=this.editor.model,n=ry(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,o)&&iy(n)&&!function(e){const t=e.start.nodeAfter;return!!t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(n,t)}_persistAutoLink(e,t){const o=this.editor.model,n=this.editor.plugins.get("Delete");o.enqueueChange((r=>{r.setAttribute("linkHref",e,t),o.enqueueChange((()=>{n.requestUndoOnBackspace()}))}))}}function By(e){const t=Sy.exec(e);return t?t[2]:null}var Iy=o(3858),Py={attributes:{"data-cke":!0}};Py.setAttributes=Wr(),Py.insert=qr().bind(null,"head"),Py.domAPI=Lr(),Py.insertStyleElement=Ur();Or()(Iy.Z,Py);Iy.Z&&Iy.Z.locals&&Iy.Z.locals;Symbol.iterator;Symbol.iterator;var Ry=o(8676),zy={attributes:{"data-cke":!0}};zy.setAttributes=Wr(),zy.insert=qr().bind(null,"head"),zy.domAPI=Lr(),zy.insertStyleElement=Ur();Or()(Ry.Z,zy);Ry.Z&&Ry.Z.locals&&Ry.Z.locals;var My=o(9989),Ny={attributes:{"data-cke":!0}};Ny.setAttributes=Wr(),Ny.insert=qr().bind(null,"head"),Ny.domAPI=Lr(),Ny.insertStyleElement=Ur();Or()(My.Z,Ny);My.Z&&My.Z.locals&&My.Z.locals;function Fy(e,t){const o=t.mapper,n=t.writer,r="numbered"==e.getAttribute("listType")?"ol":"ul",i=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=Gy,t}(n),s=n.createContainerElement(r,null);return n.insert(n.createPositionAt(s,0),i),o.bindElements(e,i),i}function Oy(e,t,o,n){const r=t.parent,i=o.mapper,s=o.writer;let a=i.toViewPosition(n.createPositionBefore(e));const l=jy(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=i.toViewElement(l);a=s.breakContainer(s.createPositionAfter(e))}else if(c&&"listItem"==c.name){a=i.toViewPosition(n.createPositionAt(c,"end"));const e=i.findMappedViewAncestor(a),t=Hy(e);a=t?s.createPositionBefore(t):s.createPositionAt(e,"end")}else a=i.toViewPosition(n.createPositionBefore(e));if(a=Ly(a),s.insert(a,r),c&&"listItem"==c.name){const e=i.toViewElement(c),o=s.createRange(s.createPositionAt(e,0),a).getWalker({ignoreElementEnd:!0});for(const e of o)if(e.item.is("element","li")){const n=s.breakContainer(s.createPositionBefore(e.item)),r=e.item.parent,i=s.createPositionAt(t,"end");Vy(s,i.nodeBefore,i.nodeAfter),s.move(s.createRangeOn(r),i),o._position=n}}else{const o=r.nextSibling;if(o&&(o.is("element","ul")||o.is("element","ol"))){let n=null;for(const t of o.getChildren()){const o=i.toModelElement(t);if(!(o&&o.getAttribute("listIndent")>e.getAttribute("listIndent")))break;n=t}n&&(s.breakContainer(s.createPositionAfter(n)),s.move(s.createRangeOn(n.parent),s.createPositionAt(t,"end")))}}Vy(s,r,r.nextSibling),Vy(s,r.previousSibling,r)}function Vy(e,t,o){return!t||!o||"ul"!=t.name&&"ol"!=t.name||t.name!=o.name||t.getAttribute("class")!==o.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function Ly(e){return e.getLastMatchingPosition((e=>e.item.is("uiElement")))}function jy(e,t){const o=!!t.sameIndent,n=!!t.smallerIndent,r=t.listIndent;let i=e;for(;i&&"listItem"==i.name;){const e=i.getAttribute("listIndent");if(o&&r==e||n&&r>e)return i;i="forward"===t.direction?i.nextSibling:i.previousSibling}return null}function qy(e,t,o,n){e.ui.componentFactory.add(t,(r=>{const i=e.commands.get(t),s=new op(r);return s.set({label:o,icon:n,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(i,"value","isEnabled"),s.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),s}))}function Hy(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}function Wy(e,t){const o=[],n=e.parent,r={ignoreElementEnd:!1,startPosition:e,shallow:!0,direction:t},i=n.getAttribute("listIndent"),s=[...new El(r)].filter((e=>e.item.is("element"))).map((e=>e.item));for(const e of s){if(!e.is("element","listItem"))break;if(e.getAttribute("listIndent")i)){if(e.getAttribute("listType")!==n.getAttribute("listType"))break;if(e.getAttribute("listStyle")!==n.getAttribute("listStyle"))break;if(e.getAttribute("listReversed")!==n.getAttribute("listReversed"))break;if(e.getAttribute("listStart")!==n.getAttribute("listStart"))break;"backward"===t?o.unshift(e):o.push(e)}}return o}const $y=["disc","circle","square"],Uy=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function Gy(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:ds.call(this)}class Ky extends Br{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;qy(this.editor,"numberedList",e("Numbered List"),''),qy(this.editor,"bulletedList",e("Bulleted List"),'')}}const Zy={},Jy={},Qy={},Yy=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:e,typeAttribute:t,listType:o}of Yy)Zy[e]=o,Jy[e]=t,t&&(Qy[t]=e);var Xy=o(3195),eA={attributes:{"data-cke":!0}};eA.setAttributes=Wr(),eA.insert=qr().bind(null,"head"),eA.domAPI=Lr(),eA.insertStyleElement=Ur();Or()(Xy.Z,eA);Xy.Z&&Xy.Z.locals&&Xy.Z.locals;var tA=o(7133),oA={attributes:{"data-cke":!0}};oA.setAttributes=Wr(),oA.insert=qr().bind(null,"head"),oA.domAPI=Lr(),oA.insertStyleElement=Ur();Or()(tA.Z,oA);tA.Z&&tA.Z.locals&&tA.Z.locals;var nA=o(4553),rA={attributes:{"data-cke":!0}};rA.setAttributes=Wr(),rA.insert=qr().bind(null,"head"),rA.domAPI=Lr(),rA.insertStyleElement=Ur();Or()(nA.Z,rA);nA.Z&&nA.Z.locals&&nA.Z.locals;class iA extends Pr{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let o=Array.from(t.selection.getSelectedBlocks());e.change((e=>{const t=o[o.length-1];let n=t.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>t.getAttribute("listIndent");)o.push(n),n=n.nextSibling;this._indentBy<0&&(o=o.reverse());for(const t of o){const o=t.getAttribute("listIndent")+this._indentBy;o<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",o,t)}this.fire("_executeCleanup",o)}))}_checkEnabled(){const e=yr(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),o=e.getAttribute("listType");let n=e.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=t;){if(n.getAttribute("listIndent")==t)return n.getAttribute("listType")==o;n=n.previousSibling}return!1}return!0}}class sA extends Pr{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,o=t.document,n=Array.from(o.selection.getSelectedBlocks()).filter((e=>lA(e,t.schema))),r=void 0!==e.forceValue?!e.forceValue:this.value;t.change((e=>{if(r){let t=n[n.length-1].nextSibling,o=Number.POSITIVE_INFINITY,r=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e=o;)i>r.getAttribute("listIndent")&&(i=r.getAttribute("listIndent")),r.getAttribute("listIndent")==i&&e[t?"unshift":"push"](r),r=r[t?"previousSibling":"nextSibling"]}}function lA(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class cA extends Br{static get pluginName(){return"ListUtils"}getListTypeFromListStyleType(e){return function(e){return $y.includes(e)?"bulleted":Uy.includes(e)?"numbered":null}(e)}getSelectedListItems(e){return function(e){let t=[...e.document.selection.getSelectedBlocks()].filter((e=>e.is("element","listItem"))).map((t=>{const o=e.change((e=>e.createPositionAt(t,0)));return[...Wy(o,"backward"),...Wy(o,"forward")]})).flat();return t=[...new Set(t)],t}(e)}getSiblingNodes(e,t){return Wy(e,t)}}function dA(e){return(t,o,n)=>{const r=n.consumable;if(!r.test(o.item,"insert")||!r.test(o.item,"attribute:listType")||!r.test(o.item,"attribute:listIndent"))return;r.consume(o.item,"insert"),r.consume(o.item,"attribute:listType"),r.consume(o.item,"attribute:listIndent");const i=o.item;Oy(i,Fy(i,n),n,e)}}const uA=(e,t,o)=>{if(!o.consumable.test(t.item,e.name))return;const n=o.mapper.toViewElement(t.item),r=o.writer;r.breakContainer(r.createPositionBefore(n)),r.breakContainer(r.createPositionAfter(n));const i=n.parent,s="numbered"==t.attributeNewValue?"ol":"ul";r.rename(s,i)},hA=(e,t,o)=>{o.consumable.consume(t.item,e.name);const n=o.mapper.toViewElement(t.item).parent,r=o.writer;Vy(r,n,n.nextSibling),Vy(r,n.previousSibling,n)};const pA=(e,t,o)=>{if(o.consumable.test(t.item,e.name)&&"listItem"!=t.item.name){let e=o.mapper.toViewPosition(t.range.start);const n=o.writer,r=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=n.breakContainer(e),"li"==e.parent.name);){const t=e,o=n.createPositionAt(e.parent,"end");if(!t.isEqual(o)){const e=n.remove(n.createRange(t,o));r.push(e)}e=n.createPositionAfter(e.parent)}if(r.length>0){for(let t=0;t0){const t=Vy(n,o,o.nextSibling);t&&t.parent==o&&e.offset--}}Vy(n,e.nodeBefore,e.nodeAfter)}}},gA=(e,t,o)=>{const n=o.mapper.toViewPosition(t.position),r=n.nodeBefore,i=n.nodeAfter;Vy(o.writer,r,i)},mA=(e,t,o)=>{if(o.consumable.consume(t.viewItem,{name:!0})){const e=o.writer,n=e.createElement("listItem"),r=function(e){let t=0,o=e.parent;for(;o;){if(o.is("element","li"))t++;else{const e=o.previousSibling;e&&e.is("element","li")&&t++}o=o.parent}return t}(t.viewItem);e.setAttribute("listIndent",r,n);const i=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",i,n),!o.safeInsert(n,t.modelCursor))return;const s=function(e,t,o){const{writer:n,schema:r}=o;let i=n.createPositionAfter(e);for(const s of t)if("ul"==s.name||"ol"==s.name)i=o.convertItem(s,i).modelCursor;else{const t=o.convertItem(s,n.createPositionAt(e,"end")),a=t.modelRange.start.nodeAfter;a&&a.is("element")&&!r.checkChild(e,a.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:_A(t.modelCursor),i=n.createPositionAfter(e))}return i}(n,t.viewItem.getChildren(),o);t.modelRange=e.createRange(t.modelCursor,s),o.updateConversionResult(n,t)}},fA=(e,t,o)=>{if(o.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e){!(t.is("element","li")||AA(t))&&t._remove()}}},bA=(e,t,o)=>{if(o.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let o=!1;for(const t of e)o&&!AA(t)&&t._remove(),AA(t)&&(o=!0)}};function kA(e){return(t,o)=>{if(o.isPhantom)return;const n=o.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const t=o.mapper.toViewElement(n),r=t.getAncestors().find(AA),i=e.createPositionAt(t,0).getWalker();for(const e of i){if("elementStart"==e.type&&e.item.is("element","li")){o.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==r){o.viewPosition=e.nextPosition;break}}}}}const wA=function(e,[t,o]){const n=this;let r,i=t.is("documentFragment")?t.getChild(0):t;if(r=o?n.createSelection(o):n.document.selection,i&&i.is("element","listItem")){const e=r.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;i&&i.is("element","listItem");)i._setAttribute("listIndent",i.getAttribute("listIndent")+e),i=i.nextSibling}}};function _A(e){const t=new El({startPosition:e});let o;do{o=t.next()}while(!o.value.item.is("element","listItem"));return o.value.item}function yA(e,t,o,n,r,i){const s=jy(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e}),a=r.mapper,l=r.writer,c=s?s.getAttribute("listIndent"):null;let d;if(s)if(c==e){const e=a.toViewElement(s).parent;d=l.createPositionAfter(e)}else{const e=i.createPositionAt(s,"end");d=a.toViewPosition(e)}else d=o;d=Ly(d);for(const e of[...n.getChildren()])AA(e)&&(d=l.move(l.createRangeOn(e),d).end,Vy(l,e,e.nextSibling),Vy(l,e.previousSibling,e))}function AA(e){return e.is("element","ol")||e.is("element","ul")}class CA extends Br{static get pluginName(){return"ListEditing"}static get requires(){return[Of,_f,cA]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,o=e.editing;var n;e.model.document.registerPostFixer((t=>function(e,t){const o=e.document.differ.getChanges(),n=new Map;let r=!1;for(const n of o)if("insert"==n.type&&"listItem"==n.name)i(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const o=n.position.nodeAfter;o.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",o),r=!0),o.hasAttribute("listType")&&(t.removeAttribute("listType",o),r=!0),o.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",o),r=!0),o.hasAttribute("listReversed")&&(t.removeAttribute("listReversed",o),r=!0),o.hasAttribute("listStart")&&(t.removeAttribute("listStart",o),r=!0);for(const t of Array.from(e.createRangeIn(o)).filter((e=>e.item.is("element","listItem"))))i(t.previousPosition)}i(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?i(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&i(n.range.start);for(const e of n.values())s(e),a(e);return r;function i(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(n.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,n.has(e))return;n.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&n.set(t,t)}}function s(e){let o=0,n=null;for(;e&&e.is("element","listItem");){const i=e.getAttribute("listIndent");if(i>o){let s;null===n?(n=i-o,s=o):(n>i&&(n=i),s=i-n),t.setAttribute("listIndent",s,e),r=!0}else n=null,o=e.getAttribute("listIndent")+1;e=e.nextSibling}}function a(e){let o=[],n=null;for(;e&&e.is("element","listItem");){const i=e.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>i&&(o=o.slice(0,i+1)),0!=i)if(o[i]){const n=o[i];e.getAttribute("listType")!=n&&(t.setAttribute("listType",n,e),r=!0)}else o[i]=e.getAttribute("listType");n=e,e=e.nextSibling}}}(e.model,t))),o.mapper.registerViewToModelLength("li",vA),t.mapper.registerViewToModelLength("li",vA),o.mapper.on("modelToViewPosition",kA(o.view)),o.mapper.on("viewToModelPosition",(n=e.model,(e,t)=>{const o=t.viewPosition,r=o.parent,i=t.mapper;if("ul"==r.name||"ol"==r.name){if(o.isAtEnd){const e=i.toModelElement(o.nodeBefore),r=i.getModelLength(o.nodeBefore);t.modelPosition=n.createPositionBefore(e).getShiftedBy(r)}else{const e=i.toModelElement(o.nodeAfter);t.modelPosition=n.createPositionBefore(e)}e.stop()}else if("li"==r.name&&o.nodeBefore&&("ul"==o.nodeBefore.name||"ol"==o.nodeBefore.name)){const s=i.toModelElement(r);let a=1,l=o.nodeBefore;for(;l&&AA(l);)a+=i.getModelLength(l),l=l.previousSibling;t.modelPosition=n.createPositionBefore(s).getShiftedBy(a),e.stop()}})),t.mapper.on("modelToViewPosition",kA(o.view)),e.conversion.for("editingDowncast").add((t=>{t.on("insert",pA,{priority:"high"}),t.on("insert:listItem",dA(e.model)),t.on("attribute:listType:listItem",uA,{priority:"high"}),t.on("attribute:listType:listItem",hA,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,o,n)=>{if(!n.consumable.consume(o.item,"attribute:listIndent"))return;const r=n.mapper.toViewElement(o.item),i=n.writer;i.breakContainer(i.createPositionBefore(r)),i.breakContainer(i.createPositionAfter(r));const s=r.parent,a=s.previousSibling,l=i.createRangeOn(s);i.remove(l),a&&a.nextSibling&&Vy(i,a,a.nextSibling),yA(o.attributeOldValue+1,o.range.start,l.start,r,n,e),Oy(o.item,r,n,e);for(const e of o.item.getChildren())n.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,o,n)=>{const r=n.mapper.toViewPosition(o.position).getLastMatchingPosition((e=>!e.item.is("element","li"))).nodeAfter,i=n.writer;i.breakContainer(i.createPositionBefore(r)),i.breakContainer(i.createPositionAfter(r));const s=r.parent,a=s.previousSibling,l=i.createRangeOn(s),c=i.remove(l);a&&a.nextSibling&&Vy(i,a,a.nextSibling),yA(n.mapper.toModelElement(r).getAttribute("listIndent")+1,o.position,l.start,r,n,e);for(const e of i.createRangeIn(c).getItems())n.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",gA,{priority:"low"})})),e.conversion.for("dataDowncast").add((t=>{t.on("insert",pA,{priority:"high"}),t.on("insert:listItem",dA(e.model))})),e.conversion.for("upcast").add((e=>{e.on("element:ul",fA,{priority:"high"}),e.on("element:ol",fA,{priority:"high"}),e.on("element:li",bA,{priority:"high"}),e.on("element:li",mA)})),e.model.on("insertContent",wA,{priority:"high"}),e.commands.add("numberedList",new sA(e,"numbered")),e.commands.add("bulletedList",new sA(e,"bulleted")),e.commands.add("indentList",new iA(e,"forward")),e.commands.add("outdentList",new iA(e,"backward"));const r=o.view.document;this.listenTo(r,"enter",((e,t)=>{const o=this.editor.model.document,n=o.selection.getLastPosition().parent;o.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())}),{context:"li"}),this.listenTo(r,"delete",((e,t)=>{if("backward"!==t.direction)return;const o=this.editor.model.document.selection;if(!o.isCollapsed)return;const n=o.getFirstPosition();if(!n.isAtStart)return;const r=n.parent;if("listItem"!==r.name)return;r.previousSibling&&"listItem"===r.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop())}),{context:"li"}),this.listenTo(e.editing.view.document,"tab",((t,o)=>{const n=o.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(e.execute(n),o.stopPropagation(),o.preventDefault(),t.stop())}),{context:"li"})}afterInit(){const e=this.editor.commands,t=e.get("indent"),o=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),o&&o.registerChildCommand(e.get("outdentList"))}}function vA(e){let t=1;for(const o of e.getChildren())if("ul"==o.name||"ol"==o.name)for(const e of o.getChildren())t+=vA(e);return t}const xA="todoListChecked";class EA extends Pr{constructor(e){super(e),this._selectedElements=[],this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every((e=>!!e.getAttribute(xA))),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const e=this.editor.model,t=e.schema,o=e.document.selection.getFirstRange(),n=o.start.parent,r=[];t.checkAttribute(n,xA)&&r.push(n);for(const e of o.getItems())t.checkAttribute(e,xA)&&!r.includes(e)&&r.push(e);return r}execute(e={}){this.editor.model.change((t=>{for(const o of this._selectedElements){(void 0===e.forceValue?!this.value:e.forceValue)?t.setAttribute(xA,!0,o):t.removeAttribute(xA,o)}}))}}const DA=(e,t,o)=>{const n=t.modelCursor,r=n.parent,i=t.viewItem;if("checkbox"!=i.getAttribute("type")||"listItem"!=r.name||!n.isAtStart)return;if(!o.consumable.consume(i,{name:!0}))return;const s=o.writer;s.setAttribute("listType","todo",r),t.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,r),t.modelRange=s.createRange(n)};function SA(e){return(t,o)=>{const n=o.modelPosition,r=n.parent;if(!r.is("element","listItem")||"todo"!=r.getAttribute("listType"))return;const i=BA(o.mapper.toViewElement(r),e);i&&(o.viewPosition=o.mapper.findPositionIn(i,n.offset))}}function TA(e,t,o,n){return t.createUIElement("label",{class:"todo-list__label",contenteditable:!1},(function(t){const r=ge(document,"input",{type:"checkbox",tabindex:"-1"});o&&r.setAttribute("checked","checked"),r.addEventListener("change",(()=>n(e)));const i=this.toDomElement(t);return i.appendChild(r),i}))}function BA(e,t){const o=t.createRangeIn(e);for(const e of o)if(e.item.is("containerElement","span")&&e.item.hasClass("todo-list__label__description"))return e.item}const IA=hr("Ctrl+Enter");class PA extends Br{static get pluginName(){return"TodoListEditing"}static get requires(){return[CA]}init(){const e=this.editor,{editing:t,data:o,model:n}=e;n.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),n.schema.addAttributeCheck(((e,t)=>{const o=e.last;if("todoListChecked"==t&&"listItem"==o.name&&"todo"!=o.getAttribute("listType"))return!1})),e.commands.add("todoList",new sA(e,"todo"));const r=new EA(e);var i,s;e.commands.add("checkTodoList",r),e.commands.add("todoListCheck",r),o.downcastDispatcher.on("insert:listItem",function(e){return(t,o,n)=>{const r=n.consumable;if(!r.test(o.item,"insert")||!r.test(o.item,"attribute:listType")||!r.test(o.item,"attribute:listIndent"))return;if("todo"!=o.item.getAttribute("listType"))return;const i=o.item;r.consume(i,"insert"),r.consume(i,"attribute:listType"),r.consume(i,"attribute:listIndent"),r.consume(i,"attribute:todoListChecked");const s=n.writer,a=Fy(i,n);s.addClass("todo-list",a.parent);const l=s.createContainerElement("label",{class:"todo-list__label"}),c=s.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),d=s.createContainerElement("span",{class:"todo-list__label__description"});i.getAttribute("todoListChecked")&&s.setAttribute("checked","checked",c),s.insert(s.createPositionAt(a,0),l),s.insert(s.createPositionAt(l,0),c),s.insert(s.createPositionAfter(c),d),Oy(i,a,n,e)}}(n),{priority:"high"}),o.upcastDispatcher.on("element:input",DA,{priority:"high"}),t.downcastDispatcher.on("insert:listItem",function(e,t){return(o,n,r)=>{const i=r.consumable;if(!i.test(n.item,"insert")||!i.test(n.item,"attribute:listType")||!i.test(n.item,"attribute:listIndent"))return;if("todo"!=n.item.getAttribute("listType"))return;const s=n.item;i.consume(s,"insert"),i.consume(s,"attribute:listType"),i.consume(s,"attribute:listIndent"),i.consume(s,"attribute:todoListChecked");const a=r.writer,l=Fy(s,r),c=!!s.getAttribute("todoListChecked"),d=TA(s,a,c,t),u=a.createContainerElement("span",{class:"todo-list__label__description"});a.addClass("todo-list",l.parent),a.insert(a.createPositionAt(l,0),d),a.insert(a.createPositionAfter(d),u),Oy(s,l,r,e)}}(n,(e=>this._handleCheckmarkChange(e))),{priority:"high"}),t.downcastDispatcher.on("attribute:listType:listItem",(i=e=>this._handleCheckmarkChange(e),s=t.view,(e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.mapper.toViewElement(t.item),r=o.writer,a=function(e,t){const o=t.createRangeIn(e);for(const e of o)if(e.item.is("uiElement","label"))return e.item}(n,s);if("todo"==t.attributeNewValue){const e=!!t.item.getAttribute("todoListChecked"),o=TA(t.item,r,e,i),s=r.createContainerElement("span",{class:"todo-list__label__description"}),a=r.createRangeIn(n),l=Hy(n),c=Ly(a.start),d=l?r.createPositionBefore(l):a.end,u=r.createRange(c,d);r.addClass("todo-list",n.parent),r.move(u,r.createPositionAt(s,0)),r.insert(r.createPositionAt(n,0),o),r.insert(r.createPositionAfter(o),s)}else if("todo"==t.attributeOldValue){const e=BA(n,s);r.removeClass("todo-list",n.parent),r.remove(a),r.move(r.createRangeIn(e),r.createPositionBefore(e)),r.remove(e)}})),t.downcastDispatcher.on("attribute:todoListChecked:listItem",function(e){return(t,o,n)=>{if("todo"!=o.item.getAttribute("listType"))return;if(!n.consumable.consume(o.item,"attribute:todoListChecked"))return;const{mapper:r,writer:i}=n,s=!!o.item.getAttribute("todoListChecked"),a=r.toViewElement(o.item).getChild(0),l=TA(o.item,i,s,e);i.insert(i.createPositionAfter(a),l),i.remove(a)}}((e=>this._handleCheckmarkChange(e)))),t.mapper.on("modelToViewPosition",SA(t.view)),o.mapper.on("modelToViewPosition",SA(t.view)),this.listenTo(t.view.document,"arrowKey",function(e,t){return(o,n)=>{if("left"!=gr(n.keyCode,t.contentLanguageDirection))return;const r=e.schema,i=e.document.selection;if(!i.isCollapsed)return;const s=i.getFirstPosition(),a=s.parent;if("listItem"===a.name&&"todo"==a.getAttribute("listType")&&s.isAtStart){const t=r.getNearestSelectionRange(e.createPositionBefore(a),"backward");t&&e.change((e=>e.setSelection(t))),n.preventDefault(),n.stopPropagation(),o.stop()}}}(n,e.locale),{context:"li"}),this.listenTo(t.view.document,"keydown",((t,o)=>{ur(o)===IA&&(e.execute("checkTodoList"),t.stop())}),{priority:"high"});const a=new Set;this.listenTo(n,"applyOperation",((e,t)=>{const o=t[0];if("rename"==o.type&&"listItem"==o.oldName){const e=o.position.nodeAfter;e.hasAttribute("todoListChecked")&&a.add(e)}else if("changeAttribute"==o.type&&"listType"==o.key&&"todo"===o.oldValue)for(const e of o.range.getItems())e.hasAttribute("todoListChecked")&&"todo"!==e.getAttribute("listType")&&a.add(e)})),n.document.registerPostFixer((e=>{let t=!1;for(const o of a)e.removeAttribute("todoListChecked",o),t=!0;return a.clear(),t}))}_handleCheckmarkChange(e){const t=this.editor,o=t.model,n=Array.from(o.document.selection.getRanges());o.change((o=>{o.setSelection(e,"end"),t.execute("checkTodoList"),o.setSelection(n)}))}}class RA extends Br{static get pluginName(){return"TodoListUI"}init(){const e=this.editor.t;qy(this.editor,"todoList",e("To-do List"),'')}}var zA=o(1588),MA={attributes:{"data-cke":!0}};MA.setAttributes=Wr(),MA.insert=qr().bind(null,"head"),MA.domAPI=Lr(),MA.insertStyleElement=Ur();Or()(zA.Z,MA);zA.Z&&zA.Z.locals&&zA.Z.locals;const NA=Symbol("isOPCodeBlock");function FA(e){return!!e.getCustomProperty(NA)&&$m(e)}function OA(e){const t=e.getSelectedElement();return!(!t||!FA(t))}function VA(e,t,o){const n=t.createContainerElement("pre",{title:window.I18n.t("js.editor.macro.toolbar_help")});return LA(t,e,n),function(e,t,o){return t.setCustomProperty(NA,!0,e),Um(e,t,{label:o})}(n,t,o)}function LA(e,t,o){const n=(t.getAttribute("opCodeblockLanguage")||"language-text").replace(/^language-/,""),r=e.createContainerElement("div",{class:"op-uc-code-block--language"});jA(e,n,r,"text"),e.insert(e.createPositionAt(o,0),r);jA(e,t.getAttribute("opCodeblockContent"),o,"(empty)")}function jA(e,t,o,n){const r=e.createText(t||n);e.insert(e.createPositionAt(o,0),r)}class qA extends Ea{constructor(e){super(e),this.domEventType="dblclick"}onDomEvent(e){this.fire(e.type,e)}}class HA extends Br{static get pluginName(){return"CodeBlockEditing"}init(){const e=this.editor,t=e.model.schema,o=e.conversion,n=e.editing.view,r=n.document,i=of(e);var s,a;t.register("codeblock",{isObject:!0,isBlock:!0,allowContentOf:"$block",allowWhere:["$root","$block"],allowIn:["$root"],allowAttributes:["opCodeblockLanguage","opCodeblockContent"]}),o.for("upcast").add(function(){return t=>{t.on("element:pre",e,{priority:"high"})};function e(e,t,o){if(!o.consumable.test(t.viewItem,{name:!0}))return;const n=Array.from(t.viewItem.getChildren()).find((e=>e.is("element","code")));if(!n||!o.consumable.consume(n,{name:!0}))return;const r=o.writer.createElement("codeblock");o.writer.setAttribute("opCodeblockLanguage",n.getAttribute("class"),r);const i=o.splitToAllowedParent(r,t.modelCursor);if(i){o.writer.insert(r,i.position);const e=n.getChild(0);o.consumable.consume(e,{name:!0});const s=e.data.replace(/\n$/,"");o.writer.setAttribute("opCodeblockContent",s,r),t.modelRange=new zl(o.writer.createPositionBefore(r),o.writer.createPositionAfter(r)),t.modelCursor=t.modelRange.end}}}()),o.for("editingDowncast").elementToElement({model:"codeblock",view:(e,{writer:t})=>VA(e,t,"Code block")}).add(function(){return t=>{t.on("attribute:opCodeblockContent",e),t.on("attribute:opCodeblockLanguage",e)};function e(e,t,o){const n=t.item;o.consumable.consume(t.item,e.name);const r=o.mapper.toViewElement(n);o.writer.remove(o.writer.createRangeOn(r.getChild(1))),o.writer.remove(o.writer.createRangeOn(r.getChild(0))),LA(o.writer,n,r)}}()),o.for("dataDowncast").add(function(){return t=>{t.on("insert:codeblock",e,{priority:"high"})};function e(e,t,o){const n=t.item,r=n.getAttribute("opCodeblockLanguage")||"language-text",i=n.getAttribute("opCodeblockContent");o.consumable.consume(n,"insert");const s=o.writer,a=s.createContainerElement("pre"),l=s.createContainerElement("div",{class:"op-uc-code-block--language"}),c=s.createContainerElement("code",{class:r}),d=s.createText(r),u=s.createText(i);s.insert(s.createPositionAt(c,0),u),s.insert(s.createPositionAt(l,0),d),s.insert(s.createPositionAt(a,0),l),s.insert(s.createPositionAt(a,0),c),o.mapper.bindElements(n,c),o.mapper.bindElements(n,a),o.mapper.bindElements(n,l);const h=o.mapper.toViewPosition(t.range.start);s.insert(h,a),e.stop()}}()),this.editor.editing.mapper.on("viewToModelPosition",(s=this.editor.model,a=e=>e.hasClass("op-uc-code-block"),(e,t)=>{const{mapper:o,viewPosition:n}=t,r=o.findMappedViewAncestor(n);if(!a(r))return;const i=o.toModelElement(r);t.modelPosition=s.createPositionAt(i,n.isAtStart?"before":"after")})),n.addObserver(qA),this.listenTo(r,"dblclick",((t,o)=>{let n=o.target,r=o.domEvent;if(r.shiftKey||r.altKey||r.metaKey)return;if(!FA(n)&&(n=n.findAncestor(FA),!n))return;o.preventDefault(),o.stopPropagation();const s=e.editing.mapper.toModelElement(n),a=i.services.macros,l=s.getAttribute("opCodeblockLanguage"),c=s.getAttribute("opCodeblockContent");a.editCodeBlock(c,l).then((t=>e.model.change((e=>{e.setAttribute("opCodeblockLanguage",t.languageClass,s),e.setAttribute("opCodeblockContent",t.content,s)}))))})),e.ui.componentFactory.add("insertCodeBlock",(t=>{const o=new op(t);return o.set({label:window.I18n.t("js.editor.macro.code_block.button"),icon:'\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n image/svg+xml\n \n \n \n \n\n',tooltip:!0}),o.on("execute",(()=>{i.services.macros.editCodeBlock().then((t=>e.model.change((o=>{const n=o.createElement("codeblock");o.setAttribute("opCodeblockLanguage",t.languageClass,n),o.setAttribute("opCodeblockContent",t.content,n),e.model.insertContent(n,e.model.document.selection)}))))})),o}))}}class WA extends Br{static get requires(){return[Cm]}static get pluginName(){return"CodeBlockToolbar"}init(){const e=this.editor,t=this.editor.model,o=of(e);hb(e,"opEditCodeBlock",(e=>{const n=o.services.macros,r=e.getAttribute("opCodeblockLanguage"),i=e.getAttribute("opCodeblockContent");n.editCodeBlock(i,r).then((o=>t.change((t=>{t.setAttribute("opCodeblockLanguage",o.languageClass,e),t.setAttribute("opCodeblockContent",o.content,e)}))))}))}afterInit(){gb(this,this.editor,"OPCodeBlock",OA)}}function $A(e){return e.__currentlyDisabled=e.__currentlyDisabled||[],e.ui.view.toolbar?e.ui.view.toolbar.items._items:[]}function UA(e,t){jQuery.each($A(e),(function(o,n){let r=n;n instanceof vb?r=n.buttonView:n!==t&&n.hasOwnProperty("isEnabled")||(r=null),r&&(r.isEnabled?r.isEnabled=!1:e.__currentlyDisabled.push(r))}))}function GA(e){jQuery.each($A(e),(function(t,o){let n=o;o instanceof vb&&(n=o.buttonView),e.__currentlyDisabled.indexOf(n)<0&&(n.isEnabled=!0)})),e.__currentlyDisabled=[]}function KA(e,t){const{modelAttribute:o,styleName:n,viewElement:r,defaultValue:i,reduceBoxSides:s=!1,shouldUpcast:a=(()=>!0)}=t;e.for("upcast").attributeToAttribute({view:{name:r,styles:{[n]:/[\s\S]+/}},model:{key:o,value:e=>{if(!a(e))return;const t=e.getNormalizedStyle(n),o=s?YA(t):t;return i!==o?o:void 0}}})}function ZA(e,t,o,n){e.for("upcast").add((e=>e.on("element:"+t,((e,t,r)=>{if(!t.modelRange)return;const i=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter((e=>t.viewItem.hasStyle(e)));if(!i.length)return;const s={styles:i};if(!r.consumable.test(t.viewItem,s))return;const a=[...t.modelRange.getItems({shallow:!0})].pop();r.consumable.consume(t.viewItem,s);const l={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},c={style:YA(l.style),color:YA(l.color),width:YA(l.width)};c.style!==n.style&&r.writer.setAttribute(o.style,c.style,a),c.color!==n.color&&r.writer.setAttribute(o.color,c.color,a),c.width!==n.width&&r.writer.setAttribute(o.width,c.width,a)}))))}function JA(e,t){const{modelElement:o,modelAttribute:n,styleName:r}=t;e.for("downcast").attributeToAttribute({model:{name:o,key:n},view:e=>({key:"style",value:{[r]:e}})})}function QA(e,t){const{modelAttribute:o,styleName:n}=t;e.for("downcast").add((e=>e.on(`attribute:${o}:table`,((e,t,o)=>{const{item:r,attributeNewValue:i}=t,{mapper:s,writer:a}=o;if(!o.consumable.consume(t.item,e.name))return;const l=[...s.toViewElement(r).getChildren()].find((e=>e.is("element","table")));i?a.setStyle(n,i,l):a.removeStyle(n,l)}))))}function YA(e){if(!e)return;const t=["top","right","bottom","left"];if(!t.every((t=>e[t])))return e;const o=e.top;return t.every((t=>e[t]===o))?o:e}function XA(e,t,o,n,r=1){null!=t&&null!=r&&t>r?n.setAttribute(e,t,o):n.removeAttribute(e,o)}function eC(e,t,o={}){const n=e.createElement("tableCell",o);return e.insertElement("paragraph",n),e.insert(n,t),n}function tC(e,t){const o=t.parent.parent,n=parseInt(o.getAttribute("headingColumns")||"0"),{column:r}=e.getCellLocation(t);return!!n&&r{e.on("element:table",((e,t,o)=>{const n=t.viewItem;if(!o.consumable.test(n,{name:!0}))return;const{rows:r,headingRows:i,headingColumns:s}=function(e){let t,o=0;const n=[],r=[];let i;for(const s of Array.from(e.getChildren())){if("tbody"!==s.name&&"thead"!==s.name&&"tfoot"!==s.name)continue;"thead"!==s.name||i||(i=s);const e=Array.from(s.getChildren()).filter((e=>e.is("element","tr")));for(const a of e)if(i&&s===i||"tbody"===s.name&&Array.from(a.getChildren()).length&&Array.from(a.getChildren()).every((e=>e.is("element","th"))))o++,n.push(a);else{r.push(a);const e=iC(a);(!t||eo.convertItem(e,o.writer.createPositionAt(l,"end")))),o.convertChildren(n,o.writer.createPositionAt(l,"end")),l.isEmpty){const e=o.writer.createElement("tableRow");o.writer.insert(e,o.writer.createPositionAt(l,"end")),eC(o.writer,o.writer.createPositionAt(e,"end"))}o.updateConversionResult(l,t)}}))}}function rC(e){return t=>{t.on(`element:${e}`,((e,t,{writer:o})=>{if(!t.modelRange)return;const n=t.modelRange.start.nodeAfter,r=o.createPositionAt(n,0);if(t.viewItem.isEmpty)return void o.insertElement("paragraph",r);const i=Array.from(n.getChildren());if(i.every((e=>e.is("element","$marker")))){const e=o.createElement("paragraph");o.insert(e,o.createPositionAt(n,0));for(const t of i)o.move(o.createRangeOn(t),o.createPositionAt(e,"end"))}}),{priority:"low"})}}function iC(e){let t=0,o=0;const n=Array.from(e.getChildren()).filter((e=>"th"===e.name||"td"===e.name));for(;o1||r>1)&&this._recordSpans(o,r,n),this._shouldSkipSlot()||(t=this._formatOutValue(o)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,o=this._column){return{done:!1,value:new aC(this,e,t,o)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||o||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,o){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;e{const r=o.getAttribute("headingRows")||0,i=n.createContainerElement("table",null,[]),s=n.createContainerElement("figure",{class:"table"},i);r>0&&n.insert(n.createPositionAt(i,"end"),n.createContainerElement("thead",null,n.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=r))));for(const{positionOffset:e,filter:o}of t.additionalSlots)n.insert(n.createPositionAt(i,e),n.createSlot(o));return n.insert(n.createPositionAt(i,"after"),n.createSlot((e=>!e.is("element","tableRow")&&!t.additionalSlots.some((({filter:t})=>t(e)))))),t.asWidget?function(e,t){return t.setCustomProperty("table",!0,e),Um(e,t,{hasSelectionHandle:!0})}(s,n):s}}function cC(e={}){return(t,{writer:o})=>{const n=t.parent,r=n.parent,i=r.getChildIndex(n),s=new sC(r,{row:i}),a=r.getAttribute("headingRows")||0,l=r.getAttribute("headingColumns")||0;let c=null;for(const n of s)if(n.cell==t){const t=n.row{if(!t.parent.is("element","tableCell"))return null;if(!uC(t))return null;if(e.asWidget)return o.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const e=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,e),e}}}function uC(e){return 1==e.parent.childCount&&!!e.getAttributeKeys().next().done}class hC extends Pr{refresh(){const e=this.editor.model,t=e.document.selection,o=e.schema;this.isEnabled=function(e,t){const o=e.getFirstPosition().parent,n=o===o.root?o:o.parent;return t.checkChild(n,"table")}(t,o)}execute(e={}){const t=this.editor,o=t.model,n=t.plugins.get("TableUtils"),r=t.config.get("table.defaultHeadings.rows"),i=t.config.get("table.defaultHeadings.columns");void 0===e.headingRows&&r&&(e.headingRows=r),void 0===e.headingColumns&&i&&(e.headingColumns=i),o.change((t=>{const r=n.createTable(t,e);o.insertObject(r,null,null,{findOptimalPosition:"auto"}),t.setSelection(t.createPositionAt(r.getNodeByPath([0,0,0]),0))}))}}class pC extends Pr{constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="above"===this.order,r=o.getSelectionAffectedTableCells(t),i=o.getRowIndexes(r),s=n?i.first:i.last,a=r[0].findAncestor("table");o.insertRows(a,{at:n?s:s+1,copyStructureFromAbove:!n})}}class gC extends Pr{constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="left"===this.order,r=o.getSelectionAffectedTableCells(t),i=o.getColumnIndexes(r),s=n?i.first:i.last,a=r[0].findAncestor("table");o.insertColumns(a,{columns:1,at:n?s:s+1})}}class mC extends Pr{constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}function fC(e,t,o){const{startRow:n,startColumn:r,endRow:i,endColumn:s}=t,a=o.createElement("table"),l=i-n+1;for(let e=0;e0){XA("headingRows",i-o,e,r,0)}const s=parseInt(t.getAttribute("headingColumns")||"0");if(s>0){XA("headingColumns",s-n,e,r,0)}}(a,e,n,r,o),a}function bC(e,t,o=0){const n=[],r=new sC(e,{startRow:o,endRow:t-1});for(const e of r){const{row:o,cellHeight:r}=e;o1&&(a.rowspan=l);const c=parseInt(e.getAttribute("colspan")||"1");c>1&&(a.colspan=c);const d=i+s,u=[...new sC(r,{startRow:i,endRow:d,includeAllSlots:!0})];let h,p=null;for(const t of u){const{row:n,column:r,cell:i}=t;i===e&&void 0===h&&(h=r),void 0!==h&&h===r&&n===d&&(p=eC(o,t.getPositionBefore(),a))}return XA("rowspan",s,e,o),p}function wC(e,t){const o=[],n=new sC(e);for(const e of n){const{column:n,cellWidth:r}=e;n1&&(i.colspan=s);const a=parseInt(e.getAttribute("rowspan")||"1");a>1&&(i.rowspan=a);const l=eC(n,n.createPositionAfter(e),i);return XA("colspan",r,e,n),l}function yC(e,t,o,n,r,i){const s=parseInt(e.getAttribute("colspan")||"1"),a=parseInt(e.getAttribute("rowspan")||"1");if(o+s-1>r){XA("colspan",r-o+1,e,i,1)}if(t+a-1>n){XA("rowspan",n-t+1,e,i,1)}}function AC(e,t){const o=t.getColumns(e),n=new Array(o).fill(0);for(const{column:t}of new sC(e))n[t]++;const r=n.reduce(((e,t,o)=>t?e:[...e,o]),[]);if(r.length>0){const o=r[r.length-1];return t.removeColumns(e,{at:o}),!0}return!1}function CC(e,t){const o=[],n=t.getRows(e);for(let t=0;t0){const n=o[o.length-1];return t.removeRows(e,{at:n}),!0}return!1}function vC(e,t){AC(e,t)||CC(e,t)}function xC(e,t){const o=Array.from(new sC(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(o.every((({cellHeight:e})=>1===e)))return t.lastRow;const n=o[0].cellHeight-1;return t.lastRow+n}function EC(e,t){const o=Array.from(new sC(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(o.every((({cellWidth:e})=>1===e)))return t.lastColumn;const n=o[0].cellWidth-1;return t.lastColumn+n}class DC extends Pr{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,o=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],n=this.value,r=this.direction;e.change((e=>{const t="right"==r||"down"==r,i=t?o:n,s=t?n:o,a=s.parent;!function(e,t,o){SC(e)||(SC(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end")));o.remove(e)}(s,i,e);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(o.getAttribute(l)||"1"),d=parseInt(n.getAttribute(l)||"1");e.setAttribute(l,c+d,i),e.setSelection(e.createRangeIn(i));const u=this.editor.plugins.get("TableUtils");vC(a.findAncestor("table"),u)}))}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),o=t.getTableCellsContainingSelection(e.selection)[0];if(!o)return;const n=this.isHorizontal?function(e,t,o){const n=e.parent,r=n.parent,i="right"==t?e.nextSibling:e.previousSibling,s=(r.getAttribute("headingColumns")||0)>0;if(!i)return;const a="right"==t?e:i,l="right"==t?i:e,{column:c}=o.getCellLocation(a),{column:d}=o.getCellLocation(l),u=parseInt(a.getAttribute("colspan")||"1"),h=tC(o,a),p=tC(o,l);if(s&&h!=p)return;return c+u===d?i:void 0}(o,this.direction,t):function(e,t,o){const n=e.parent,r=n.parent,i=r.getChildIndex(n);if("down"==t&&i===o.getRows(r)-1||"up"==t&&0===i)return null;const s=parseInt(e.getAttribute("rowspan")||"1"),a=r.getAttribute("headingRows")||0,l="down"==t&&i+s===a,c="up"==t&&i===a;if(a&&(l||c))return null;const d=parseInt(e.getAttribute("rowspan")||"1"),u="down"==t?i+d:i,h=[...new sC(r,{endRow:u})],p=h.find((t=>t.cell===e)),g=p.column,m=h.find((({row:e,cellHeight:o,column:n})=>n===g&&("down"==t?e===u:u===e+o)));return m&&m.cell?m.cell:null}(o,this.direction,t);if(!n)return;const r=this.isHorizontal?"rowspan":"colspan",i=parseInt(o.getAttribute(r)||"1");return parseInt(n.getAttribute(r)||"1")===i?n:void 0}}function SC(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}class TC extends Pr{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),r=e.getRows(n)-1,i=e.getRowIndexes(t),s=0===i.first&&i.last===r;this.isEnabled=!s}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),r=o[0],i=r.findAncestor("table"),s=t.getCellLocation(r).column;e.change((e=>{const o=n.last-n.first+1;t.removeRows(i,{at:n.first,rows:o});const r=function(e,t,o,n){const r=e.getChild(Math.min(t,n-1));let i=r.getChild(0),s=0;for(const e of r.getChildren()){if(s>o)return i;i=e,s+=parseInt(e.getAttribute("colspan")||"1")}return i}(i,n.first,s,t.getRows(i));e.setSelection(e.createPositionAt(r,0))}))}}class BC extends Pr{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),r=e.getColumns(n),{first:i,last:s}=e.getColumnIndexes(t);this.isEnabled=s-ie.cell===t)).column,last:r.find((e=>e.cell===o)).column},s=function(e,t,o,n){const r=parseInt(o.getAttribute("colspan")||"1");return r>1?o:t.previousSibling||o.nextSibling?o.nextSibling||t.previousSibling:n.first?e.reverse().find((({column:e})=>ee>n.last)).cell}(r,t,o,i);this.editor.model.change((t=>{const o=i.last-i.first+1;e.removeColumns(n,{at:i.first,columns:o}),t.setSelection(t.createPositionAt(s,0))}))}}class IC extends Pr{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o.length>0;this.isEnabled=n,this.value=n&&o.every((e=>this._isInHeading(e,e.parent.parent)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),r=n[0].findAncestor("table"),{first:i,last:s}=t.getRowIndexes(n),a=this.value?i:s+1,l=r.getAttribute("headingRows")||0;o.change((e=>{if(a){const t=bC(r,a,a>l?l:0);for(const{cell:o}of t)kC(o,a,e)}XA("headingRows",a,r,e,0)}))}_isInHeading(e,t){const o=parseInt(t.getAttribute("headingRows")||"0");return!!o&&e.parent.index0;this.isEnabled=n,this.value=n&&o.every((e=>tC(t,e)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),r=n[0].findAncestor("table"),{first:i,last:s}=t.getColumnIndexes(n),a=this.value?i:s+1;o.change((e=>{if(a){const t=wC(r,a);for(const{cell:o,column:n}of t)_C(o,n,a,e)}XA("headingColumns",a,r,e,0)}))}}class RC extends Br{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,o=t.parent,n=o.getChildIndex(t),r=new sC(o,{row:n});for(const{cell:t,row:o,column:n}of r)if(t===e)return{row:o,column:n}}createTable(e,t){const o=e.createElement("table"),n=t.rows||2,r=t.columns||2;return zC(e,o,0,n,r),t.headingRows&&XA("headingRows",Math.min(t.headingRows,n),o,e,0),t.headingColumns&&XA("headingColumns",Math.min(t.headingColumns,r),o,e,0),o}insertRows(e,t={}){const o=this.editor.model,n=t.at||0,r=t.rows||1,i=void 0!==t.copyStructureFromAbove,s=t.copyStructureFromAbove?n-1:n,a=this.getRows(e),l=this.getColumns(e);if(n>a)throw new f("tableutils-insertrows-insert-out-of-range",this,{options:t});o.change((t=>{const o=e.getAttribute("headingRows")||0;if(o>n&&XA("headingRows",o+r,e,t,0),!i&&(0===n||n===a))return void zC(t,e,n,r,l);const c=i?Math.max(n,s):n,d=new sC(e,{endRow:c}),u=new Array(l).fill(1);for(const{row:e,column:o,cellHeight:a,cellWidth:l,cell:c}of d){const d=e+a-1,h=e<=s&&s<=d;e0&&eC(t,r,n>1?{colspan:n}:void 0),e+=Math.abs(n)-1}}}))}insertColumns(e,t={}){const o=this.editor.model,n=t.at||0,r=t.columns||1;o.change((t=>{const o=e.getAttribute("headingColumns");nr-1)throw new f("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});o.change((t=>{const o={first:i,last:s},{cellsToMove:n,cellsToTrim:r}=function(e,{first:t,last:o}){const n=new Map,r=[];for(const{row:i,column:s,cellHeight:a,cell:l}of new sC(e,{endRow:o})){const e=i+a-1;if(i>=t&&i<=o&&e>o){const e=a-(o-i+1);n.set(s,{cell:l,rowspan:e})}if(i=t){let n;n=e>=o?o-t+1:e-t+1,r.push({cell:l,rowspan:a-n})}}return{cellsToMove:n,cellsToTrim:r}}(e,o);if(n.size){!function(e,t,o,n){const r=new sC(e,{includeAllSlots:!0,row:t}),i=[...r],s=e.getChild(t);let a;for(const{column:e,cell:t,isAnchor:r}of i)if(o.has(e)){const{cell:t,rowspan:r}=o.get(e),i=a?n.createPositionAfter(a):n.createPositionAt(s,0);n.move(n.createRangeOn(t),i),XA("rowspan",r,t,n),a=t}else r&&(a=t)}(e,s+1,n,t)}for(let o=s;o>=i;o--)t.remove(e.getChild(o));for(const{rowspan:e,cell:o}of r)XA("rowspan",e,o,t);!function(e,{first:t,last:o},n){const r=e.getAttribute("headingRows")||0;if(t{!function(e,t,o){const n=e.getAttribute("headingColumns")||0;if(n&&t.first=n;o--)for(const{cell:n,column:r,cellWidth:i}of[...new sC(e)])r<=o&&i>1&&r+i>o?XA("colspan",i-1,n,t):r===o&&t.remove(n);CC(e,this)||AC(e,this)}))}splitCellVertically(e,t=2){const o=this.editor.model,n=e.parent.parent,r=parseInt(e.getAttribute("rowspan")||"1"),i=parseInt(e.getAttribute("colspan")||"1");o.change((o=>{if(i>1){const{newCellsSpan:n,updatedSpan:s}=NC(i,t);XA("colspan",s,e,o);const a={};n>1&&(a.colspan=n),r>1&&(a.rowspan=r);MC(i>t?t-1:i-1,o,o.createPositionAfter(e),a)}if(it===e)),c=a.filter((({cell:t,cellWidth:o,column:n})=>t!==e&&n===l||nl));for(const{cell:e,cellWidth:t}of c)o.setAttribute("colspan",t+s,e);const d={};r>1&&(d.rowspan=r),MC(s,o,o.createPositionAfter(e),d);const u=n.getAttribute("headingColumns")||0;u>l&&XA("headingColumns",u+s,n,o)}}))}splitCellHorizontally(e,t=2){const o=this.editor.model,n=e.parent,r=n.parent,i=r.getChildIndex(n),s=parseInt(e.getAttribute("rowspan")||"1"),a=parseInt(e.getAttribute("colspan")||"1");o.change((o=>{if(s>1){const n=[...new sC(r,{startRow:i,endRow:i+s-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=NC(s,t);XA("rowspan",c,e,o);const{column:d}=n.find((({cell:t})=>t===e)),u={};l>1&&(u.rowspan=l),a>1&&(u.colspan=a);for(const e of n){const{column:t,row:n}=e;n>=i+c&&t===d&&(n+i+c)%l==0&&MC(1,o,e.getPositionBefore(),u)}}if(si){const e=r+n;o.setAttribute("rowspan",e,t)}const c={};a>1&&(c.colspan=a),zC(o,r,i+1,n,1,c);const d=r.getAttribute("headingRows")||0;d>i&&XA("headingRows",d+n,r,o)}}))}getColumns(e){return[...e.getChild(0).getChildren()].reduce(((e,t)=>e+parseInt(t.getAttribute("colspan")||"1")),0)}getRows(e){return Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0)}createTableWalker(e,t={}){return new sC(e,t)}getSelectedTableCells(e){const t=[];for(const o of this.sortRanges(e.getRanges())){const e=o.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];for(const o of e.getRanges()){const e=o.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map((e=>e.parent.index));return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),o=[...new sC(t)].filter((t=>e.includes(t.cell))).map((e=>e.column));return this._getFirstLastIndexesObject(o)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,o=new Set;let n=0;for(const r of e){const{row:e,column:i}=this.getCellLocation(r),s=parseInt(r.getAttribute("rowspan"))||1,a=parseInt(r.getAttribute("colspan"))||1;t.add(e),o.add(i),s>1&&t.add(e+s-1),a>1&&o.add(i+a-1),n+=s*a}const r=function(e,t){const o=Array.from(e.values()),n=Array.from(t.values()),r=Math.max(...o),i=Math.min(...o),s=Math.max(...n),a=Math.min(...n);return(r-i+1)*(s-a+1)}(t,o);return r==n}sortRanges(e){return Array.from(e).sort(FC)}_getFirstLastIndexesObject(e){const t=e.sort(((e,t)=>e-t));return{first:t[0],last:t[t.length-1]}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),o=this.getRowIndexes(e),n=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(o,n))return!1;const r=this.getColumnIndexes(e),i=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(r,i)}_areIndexesInSameSection({first:e,last:t},o){return e{const n=t.getSelectedTableCells(e.document.selection),r=n.shift(),{mergeWidth:i,mergeHeight:s}=function(e,t,o){let n=0,r=0;for(const e of t){const{row:t,column:i}=o.getCellLocation(e);n=jC(e,i,n,"colspan"),r=jC(e,t,r,"rowspan")}const{row:i,column:s}=o.getCellLocation(e),a=n-s,l=r-i;return{mergeWidth:a,mergeHeight:l}}(r,n,t);XA("colspan",i,r,o),XA("rowspan",s,r,o);for(const e of n)VC(e,r,o);vC(r.findAncestor("table"),t),o.setSelection(r,"in")}))}}function VC(e,t,o){LC(e)||(LC(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end"))),o.remove(e)}function LC(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}function jC(e,t,o,n){const r=parseInt(e.getAttribute(n)||"1");return Math.max(o,t+r)}class qC extends Pr{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),r=o[0].findAncestor("table"),i=[];for(let t=n.first;t<=n.last;t++)for(const o of r.getChild(t).getChildren())i.push(e.createRangeOn(o));e.change((e=>{e.setSelection(i)}))}}class HC extends Pr{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o[0],r=o.pop(),i=n.findAncestor("table"),s=e.getCellLocation(n),a=e.getCellLocation(r),l=Math.min(s.column,a.column),c=Math.max(s.column,a.column),d=[];for(const e of new sC(i,{startColumn:l,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change((e=>{e.setSelection(d)}))}}function WC(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;const r=new Set;for(const t of o){let o=null;"insert"==t.type&&"table"==t.name&&(o=t.position.nodeAfter),"insert"!=t.type&&"remove"!=t.type||"tableRow"!=t.name&&"tableCell"!=t.name||(o=t.position.findAncestor("table")),GC(t)&&(o=t.range.start.findAncestor("table")),o&&!r.has(o)&&(n=$C(o,e)||n,n=UC(o,e)||n,r.add(o))}return n}(t,e)))}function $C(e,t){let o=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||"0"),o=Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0),n=[];for(const{row:r,cell:i,cellHeight:s}of new sC(e)){if(s<2)continue;const e=re){const t=e-r;n.push({cell:i,rowspan:t})}}return n}(e);if(n.length){o=!0;for(const e of n)XA("rowspan",e.rowspan,e.cell,t,1)}return o}function UC(e,t){let o=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:o}of new sC(e,{includeAllSlots:!0}))t[o]++;return t}(e),r=[];for(const[t,o]of n.entries())!o&&e.getChild(t).is("element","tableRow")&&r.push(t);if(r.length){o=!0;for(const o of r.reverse())t.remove(e.getChild(o)),n.splice(o,1)}const i=n.filter(((t,o)=>e.getChild(o).is("element","tableRow"))),s=i[0];if(!i.every((e=>e===s))){const n=i.reduce(((e,t)=>t>e?t:e),0);for(const[r,s]of i.entries()){const i=n-s;if(i){for(let o=0;ofunction(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o)"insert"==t.type&&"table"==t.name&&(n=ZC(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=JC(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=QC(t.position.nodeAfter,e)||n),"remove"!=t.type&&"insert"!=t.type||!YC(t)||(n=QC(t.position.parent,e)||n);return n}(t,e)))}function ZC(e,t){let o=!1;for(const n of e.getChildren())n.is("element","tableRow")&&(o=JC(n,t)||o);return o}function JC(e,t){let o=!1;for(const n of e.getChildren())o=QC(n,t)||o;return o}function QC(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const o=Array.from(e.getChildren()).filter((e=>e.is("$text")));for(const e of o)t.wrap(t.createRangeOn(e),"paragraph");return!!o.length}function YC(e){return!!e.position.parent.is("element","tableCell")&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function XC(e,t){if(!e.is("element","paragraph"))return!1;const o=t.toViewElement(e);return!!o&&uC(e)!==o.is("element","span")}var ev=o(4777),tv={attributes:{"data-cke":!0}};tv.setAttributes=Wr(),tv.insert=qr().bind(null,"head"),tv.domAPI=Lr(),tv.insertStyleElement=Ur();Or()(ev.Z,tv);ev.Z&&ev.Z.locals&&ev.Z.locals;class ov extends Br{static get pluginName(){return"TableEditing"}static get requires(){return[RC]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,o=t.schema,n=e.conversion,r=e.plugins.get(RC);o.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),o.register("tableRow",{allowIn:"table",isLimit:!0}),o.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.for("upcast").add((e=>{e.on("element:figure",((e,t,o)=>{if(!o.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(t.viewItem,{name:!0,classes:"table"});const r=yr(o.convertItem(n,t.modelCursor).modelRange.getItems());r?(o.convertChildren(t.viewItem,o.writer.createPositionAt(r,"end")),o.updateConversionResult(r,t)):o.consumable.revert(t.viewItem,{name:!0,classes:"table"})}))})),n.for("upcast").add(nC()),n.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:lC(r,{asWidget:!0,additionalSlots:this._additionalSlots})}),n.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:lC(r,{additionalSlots:this._additionalSlots})}),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add((e=>{e.on("element:tr",((e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()}),{priority:"high"})})),n.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(rC("td")),n.for("upcast").add(rC("th")),n.for("editingDowncast").elementToElement({model:"tableCell",view:cC({asWidget:!0})}),n.for("dataDowncast").elementToElement({model:"tableCell",view:cC()}),n.for("editingDowncast").elementToElement({model:"paragraph",view:dC({asWidget:!0}),converterPriority:"high"}),n.for("dataDowncast").elementToElement({model:"paragraph",view:dC(),converterPriority:"high"}),n.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),n.for("upcast").attributeToAttribute({model:{key:"colspan",value:nv("colspan")},view:"colspan"}),n.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("upcast").attributeToAttribute({model:{key:"rowspan",value:nv("rowspan")},view:"rowspan"}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new hC(e)),e.commands.add("insertTableRowAbove",new pC(e,{order:"above"})),e.commands.add("insertTableRowBelow",new pC(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new gC(e,{order:"left"})),e.commands.add("insertTableColumnRight",new gC(e,{order:"right"})),e.commands.add("removeTableRow",new TC(e)),e.commands.add("removeTableColumn",new BC(e)),e.commands.add("splitTableCellVertically",new mC(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new mC(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new OC(e)),e.commands.add("mergeTableCellRight",new DC(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new DC(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new DC(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new DC(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new PC(e)),e.commands.add("setTableRowHeader",new IC(e)),e.commands.add("selectTableRow",new qC(e)),e.commands.add("selectTableColumn",new HC(e)),WC(t),KC(t),this.listenTo(t.document,"change:data",(()=>{!function(e,t){const o=e.document.differ;for(const e of o.getChanges()){let o,n=!1;if("attribute"==e.type){const t=e.range.start.nodeAfter;if(!t||!t.is("element","table"))continue;if("headingRows"!=e.attributeKey&&"headingColumns"!=e.attributeKey)continue;o=t,n="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(o=e.position.findAncestor("table"),n="tableRow"==e.name);if(!o)continue;const r=o.getAttribute("headingRows")||0,i=o.getAttribute("headingColumns")||0,s=new sC(o);for(const e of s){const o=e.rowXC(e,t.mapper)));for(const e of o)t.reconvertItem(e)}}(t,e.editing)}))}registerAdditionalSlot(e){this._additionalSlots.push(e)}}function nv(e){return t=>{const o=parseInt(t.getAttribute(e));return Number.isNaN(o)||o<=0?null:o}}var rv=o(8085),iv={attributes:{"data-cke":!0}};iv.setAttributes=Wr(),iv.insert=qr().bind(null,"head"),iv.domAPI=Lr(),iv.insertStyleElement=Ur();Or()(rv.Z,iv);rv.Z&&rv.Z.locals&&rv.Z.locals;class sv extends Sh{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new Cr,this.focusTracker=new Ar,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",((e,t)=>`${t} × ${e}`)),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to((e=>{e.preventDefault()})),click:t.to((()=>{this.fire("execute")}))}}),this.on("boxover",((e,t)=>{const{row:o,column:n}=t.target.dataset;this.items.get(10*(parseInt(o,10)-1)+(parseInt(n,10)-1)).focus()})),this.focusTracker.on("change:focusedElement",((e,t,o)=>{if(!o)return;const{row:n,column:r}=o.dataset;this.set({rows:parseInt(n),columns:parseInt(r)})})),this.on("change:columns",(()=>this._highlightGridBoxes())),this.on("change:rows",(()=>this._highlightGridBoxes()))}render(){super.render(),vh({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map(((o,n)=>{const r=Math.floor(n/10){const n=e.commands.get("insertTable"),r=Xp(o);let i;return r.bind("isEnabled").to(n),r.buttonView.set({icon:'',label:t("Insert table"),tooltip:!0}),r.on("change:isOpen",(()=>{i||(i=new sv(o),r.panelView.children.add(i),i.delegate("execute").to(r),r.on("execute",(()=>{e.execute("insertTable",{rows:i.rows,columns:i.columns}),e.editing.view.focus()})))})),r})),e.ui.componentFactory.add("tableColumn",(e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:o?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:o?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),'',n,e)})),e.ui.componentFactory.add("tableRow",(e=>{const o=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),'',o,e)})),e.ui.componentFactory.add("mergeTableCells",(e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:o?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:o?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),'',n,e)}))}_prepareDropdown(e,t,o,n){const r=this.editor,i=Xp(n),s=this._fillDropdownWithListOptions(i,o);return i.buttonView.set({label:e,icon:t,tooltip:!0}),i.bind("isEnabled").toMany(s,"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(i,"execute",(e=>{r.execute(e.source.commandName),e.source instanceof ip||r.editing.view.focus()})),i}_prepareMergeSplitButtonDropdown(e,t,o,n){const r=this.editor,i=Xp(n,Kp),s="mergeTableCells",a=r.commands.get(s),l=this._fillDropdownWithListOptions(i,o);return i.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),i.bind("isEnabled").toMany([a,...l],"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(i.buttonView,"execute",(()=>{r.execute(s),r.editing.view.focus()})),this.listenTo(i,"execute",(e=>{r.execute(e.source.commandName),r.editing.view.focus()})),i}_fillDropdownWithListOptions(e,t){const o=this.editor,n=[],r=new _r;for(const e of t)lv(e,o,n,r);return og(e,r),n}}function lv(e,t,o,n){if("button"===e.type||"switchbutton"===e.type){const n=e.model=new bm(e.model),{commandName:r,bindIsOn:i}=e.model,s=t.commands.get(r);o.push(s),n.set({commandName:r}),n.bind("isEnabled").to(s),i&&n.bind("isOn").to(s,"value"),n.set({withText:!0})}n.add(e)}var cv=o(5593),dv={attributes:{"data-cke":!0}};dv.setAttributes=Wr(),dv.insert=qr().bind(null,"head"),dv.domAPI=Lr(),dv.insertStyleElement=Ur();Or()(cv.Z,dv);cv.Z&&cv.Z.locals&&cv.Z.locals;class uv extends Br{static get pluginName(){return"TableSelection"}static get requires(){return[RC,RC]}init(){const e=this.editor,t=e.model,o=e.editing.view;this.listenTo(t,"deleteContent",((e,t)=>this._handleDeleteContent(e,t)),{priority:"high"}),this.listenTo(o.document,"insertText",((e,t)=>this._handleInsertTextEvent(e,t)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(RC),t=this.editor.model.document.selection,o=e.getSelectedTableCells(t);return 0==o.length?null:o}getSelectionAsFragment(){const e=this.editor.plugins.get(RC),t=this.getSelectedTableCells();return t?this.editor.model.change((o=>{const n=o.createDocumentFragment(),{first:r,last:i}=e.getColumnIndexes(t),{first:s,last:a}=e.getRowIndexes(t),l=t[0].findAncestor("table");let c=a,d=i;if(e.isSelectionRectangular(t)){const e={firstColumn:r,lastColumn:i,firstRow:s,lastRow:a};c=xC(l,e),d=EC(l,e)}const u=fC(l,{startRow:s,startColumn:r,endRow:c,endColumn:d},o);return o.insert(u,n,0),n})):null}setCellSelection(e,t){const o=this._getCellsToSelect(e,t);this.editor.model.change((e=>{e.setSelection(o.cells.map((t=>e.createRangeOn(t))),{backward:o.backward})}))}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=yr(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add((e=>e.on("selection",((e,o,n)=>{const r=n.writer;!function(e){for(const o of t)e.removeClass("ck-editor__editable_selected",o);t.clear()}(r);const i=this.getSelectedTableCells();if(!i)return;for(const e of i){const o=n.mapper.toViewElement(e);r.addClass("ck-editor__editable_selected",o),t.add(o)}const s=n.mapper.toViewElement(i[i.length-1]);r.setSelection(s,0)}),{priority:"lowest"})))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",(()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change((o=>{const n=o.createPositionAt(t[0],0),r=e.model.schema.getNearestSelectionRange(n);o.setSelection(r)}))}}))}_handleDeleteContent(e,t){const o=this.editor.plugins.get(RC),n=t[0],r=t[1],i=this.editor.model,s=!r||"backward"==r.direction,a=o.getSelectedTableCells(n);a.length&&(e.stop(),i.change((e=>{const t=a[s?a.length-1:0];i.change((e=>{for(const t of a)i.deleteContent(e.createSelection(t,"in"))}));const o=i.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(o):n.setTo(o)})))}_handleInsertTextEvent(e,t){const o=this.editor,n=this.getSelectedTableCells();if(!n)return;const r=o.editing.view,i=o.editing.mapper,s=n.map((e=>r.createRangeOn(i.toViewElement(e))));t.selection=r.createSelection(s)}_getCellsToSelect(e,t){const o=this.editor.plugins.get("TableUtils"),n=o.getCellLocation(e),r=o.getCellLocation(t),i=Math.min(n.row,r.row),s=Math.max(n.row,r.row),a=Math.min(n.column,r.column),l=Math.max(n.column,r.column),c=new Array(s-i+1).fill(null).map((()=>[])),d={startRow:i,endRow:s,startColumn:a,endColumn:l};for(const{row:t,cell:o}of new sC(e.findAncestor("table"),d))c[t-i].push(o);const u=r.rowe.reverse())),{cells:c.flat(),backward:u||h}}}class hv extends Br{static get pluginName(){return"TableClipboard"}static get requires(){return[uv,RC]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",((e,t)=>this._onCopyCut(e,t))),this.listenTo(t,"cut",((e,t)=>this._onCopyCut(e,t))),this.listenTo(e.model,"insertContent",((e,[t,o])=>this._onInsertContent(e,t,o)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const o=this.editor.plugins.get(uv);if(!o.getSelectedTableCells())return;if("cut"==e.name&&!this.editor.model.canEditAt(this.editor.model.document.selection))return;t.preventDefault(),e.stop();const n=this.editor.data,r=this.editor.editing.view.document,i=n.toView(o.getSelectionAsFragment());r.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:i,method:e.name})}_onInsertContent(e,t,o){if(o&&!o.is("documentSelection"))return;const n=this.editor.model,r=this.editor.plugins.get(RC);let i=this.getTableIfOnlyTableInContent(t,n);if(!i)return;const s=r.getSelectionAffectedTableCells(n.document.selection);s.length?(e.stop(),n.change((e=>{const t={width:r.getColumns(i),height:r.getRows(i)},o=function(e,t,o,n){const r=e[0].findAncestor("table"),i=n.getColumnIndexes(e),s=n.getRowIndexes(e),a={firstColumn:i.first,lastColumn:i.last,firstRow:s.first,lastRow:s.last},l=1===e.length;l&&(a.lastRow+=t.height-1,a.lastColumn+=t.width-1,function(e,t,o,n){const r=n.getColumns(e),i=n.getRows(e);o>r&&n.insertColumns(e,{at:r,columns:o-r});t>i&&n.insertRows(e,{at:i,rows:t-i})}(r,a.lastRow+1,a.lastColumn+1,n));l||!n.isSelectionRectangular(e)?function(e,t,o){const{firstRow:n,lastRow:r,firstColumn:i,lastColumn:s}=t,a={first:n,last:r},l={first:i,last:s};gv(e,i,a,o),gv(e,s+1,a,o),pv(e,n,l,o),pv(e,r+1,l,o,n)}(r,a,o):(a.lastRow=xC(r,a),a.lastColumn=EC(r,a));return a}(s,t,e,r),n=o.lastRow-o.firstRow+1,a=o.lastColumn-o.firstColumn+1,l={startRow:0,startColumn:0,endRow:Math.min(n,t.height)-1,endColumn:Math.min(a,t.width)-1};i=fC(i,l,e);const c=s[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(i,t,c,o,e);if(this.editor.plugins.get("TableSelection").isEnabled){const t=r.sortRanges(d.map((t=>e.createRangeOn(t))));e.setSelection(t)}else e.setSelection(d[0],0)}))):vC(i,r)}_replaceSelectedCellsWithPasted(e,t,o,n,r){const{width:i,height:s}=t,a=function(e,t,o){const n=new Array(o).fill(null).map((()=>new Array(t).fill(null)));for(const{column:t,row:o,cell:r}of new sC(e))n[o][t]=r;return n}(e,i,s),l=[...new sC(o,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of l){const{row:t,column:o}=e;o===n.firstColumn&&(d=e.getPositionBefore());const l=t-n.firstRow,u=o-n.firstColumn,h=a[l%s][u%i],p=h?r.cloneElement(h):null,g=this._replaceTableSlotCell(e,p,d,r);g&&(yC(g,t,o,n.lastRow,n.lastColumn,r),c.push(g),d=r.createPositionAfter(g))}const u=parseInt(o.getAttribute("headingRows")||"0"),h=parseInt(o.getAttribute("headingColumns")||"0"),p=n.firstRowmv(e,t,o))).map((({cell:e})=>kC(e,t,n)))}function gv(e,t,o,n){if(t<1)return;return wC(e,t).filter((({row:e,cellHeight:t})=>mv(e,t,o))).map((({cell:e,column:o})=>_C(e,o,t,n)))}function mv(e,t,o){const n=e+t-1,{first:r,last:i}=o;return e>=r&&e<=i||e=r}class fv extends Br{static get pluginName(){return"TableKeyboard"}static get requires(){return[uv,RC]}init(){const e=this.editor.editing.view.document;this.listenTo(e,"arrowKey",((...e)=>this._onArrowKey(...e)),{context:"table"}),this.listenTo(e,"tab",((...e)=>this._handleTabOnSelectedTable(...e)),{context:"figure"}),this.listenTo(e,"tab",((...e)=>this._handleTab(...e)),{context:["th","td"]})}_handleTabOnSelectedTable(e,t){const o=this.editor,n=o.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),o.model.change((e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))})))}_handleTab(e,t){const o=this.editor,n=this.editor.plugins.get(RC),r=this.editor.plugins.get("TableSelection"),i=o.model.document.selection,s=!t.shiftKey;let a=n.getTableCellsContainingSelection(i)[0];if(a||(a=r.getFocusCell()),!a)return;t.preventDefault(),t.stopPropagation(),e.stop();const l=a.parent,c=l.parent,d=c.getChildIndex(l),u=l.getChildIndex(a),h=0===u;if(!s&&h&&0===d)return void o.model.change((e=>{e.setSelection(e.createRangeOn(c))}));const p=u===l.childCount-1,g=d===n.getRows(c)-1;if(s&&g&&p&&(o.execute("insertTableRowBelow"),d===n.getRows(c)-1))return void o.model.change((e=>{e.setSelection(e.createRangeOn(c))}));let m;if(s&&p){const e=c.getChild(d+1);m=e.getChild(0)}else if(!s&&h){const e=c.getChild(d-1);m=e.getChild(e.childCount-1)}else m=l.getChild(u+(s?1:-1));o.model.change((e=>{e.setSelection(e.createRangeIn(m))}))}_onArrowKey(e,t){const o=this.editor,n=gr(t.keyCode,o.locale.contentLanguageDirection);this._handleArrowKeys(n,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const o=this.editor.plugins.get(RC),n=this.editor.plugins.get("TableSelection"),r=this.editor.model,i=r.document.selection,s=["right","down"].includes(e),a=o.getSelectedTableCells(i);if(a.length){let o;return o=t?n.getFocusCell():s?a[a.length-1]:a[0],this._navigateFromCellInDirection(o,e,t),!0}const l=i.focus.findAncestor("tableCell");if(!l)return!1;if(!i.isCollapsed)if(t){if(i.isBackward==s&&!i.containsEntireContent(l))return!1}else{const e=i.getSelectedElement();if(!e||!r.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(i,l,s)&&(this._navigateFromCellInDirection(l,e,t),!0)}_isSelectionAtCellEdge(e,t,o){const n=this.editor.model,r=this.editor.model.schema,i=o?e.getLastPosition():e.getFirstPosition();if(!r.getLimitElement(i).is("element","tableCell")){return n.createPositionAt(t,o?"end":0).isTouching(i)}const s=n.createSelection(i);return n.modifySelection(s,{direction:o?"forward":"backward"}),i.isEqual(s.focus)}_navigateFromCellInDirection(e,t,o=!1){const n=this.editor.model,r=e.findAncestor("table"),i=[...new sC(r,{includeAllSlots:!0})],{row:s,column:a}=i[i.length-1],l=i.find((({cell:t})=>t==e));let{row:c,column:d}=l;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>s||d<0&&c<=0||d>a&&c>=s)return void n.change((e=>{e.setSelection(e.createRangeOn(r))}));d<0?(d=o?0:a,c--):d>a&&(d=o?a:0,c++);const u=i.find((e=>e.row==c&&e.column==d)).cell,h=["right","down"].includes(t),p=this.editor.plugins.get("TableSelection");if(o&&p.isEnabled){const t=p.getAnchorCell()||e;p.setCellSelection(t,u)}else{const e=n.createPositionAt(u,h?0:"end");n.change((t=>{t.setSelection(e)}))}}}class bv extends Ea{constructor(){super(...arguments),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class kv extends Br{static get pluginName(){return"TableMouse"}static get requires(){return[uv,RC]}init(){this.editor.editing.view.addObserver(bv),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(RC);let o=!1;const n=e.plugins.get(uv);this.listenTo(e.editing.view.document,"mousedown",((r,i)=>{const s=e.model.document.selection;if(!this.isEnabled||!n.isEnabled)return;if(!i.domEvent.shiftKey)return;const a=n.getAnchorCell()||t.getTableCellsContainingSelection(s)[0];if(!a)return;const l=this._getModelTableCellFromDomEvent(i);l&&wv(a,l)&&(o=!0,n.setCellSelection(a,l),i.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{o=!1})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{o&&e.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,o,n=!1,r=!1;const i=e.plugins.get(uv);this.listenTo(e.editing.view.document,"mousedown",((e,o)=>{this.isEnabled&&i.isEnabled&&(o.domEvent.shiftKey||o.domEvent.ctrlKey||o.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(o)))})),this.listenTo(e.editing.view.document,"mousemove",((e,s)=>{if(!s.domEvent.buttons)return;if(!t)return;const a=this._getModelTableCellFromDomEvent(s);a&&wv(t,a)&&(o=a,n||o==t||(n=!0)),n&&(r=!0,i.setCellSelection(t,o),s.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{n=!1,r=!1,t=null,o=null})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{r&&e.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,o=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(o).parent.findAncestor("tableCell",{includeSelf:!0})}}function wv(e,t){return e.parent.parent==t.parent.parent}var _v=o(4104),yv={attributes:{"data-cke":!0}};yv.setAttributes=Wr(),yv.insert=qr().bind(null,"head"),yv.domAPI=Lr(),yv.insertStyleElement=Ur();Or()(_v.Z,yv);_v.Z&&_v.Z.locals&&_v.Z.locals;function Av(e){const t=e.getSelectedElement();return t&&vv(t)?t:null}function Cv(e){const t=e.getFirstPosition();if(!t)return null;let o=t.parent;for(;o;){if(o.is("element")&&vv(o))return o;o=o.parent}return null}function vv(e){return!!e.getCustomProperty("table")&&$m(e)}var xv=o(4082),Ev={attributes:{"data-cke":!0}};Ev.setAttributes=Wr(),Ev.insert=qr().bind(null,"head"),Ev.domAPI=Lr(),Ev.insertStyleElement=Ur();Or()(xv.Z,Ev);xv.Z&&xv.Z.locals&&xv.Z.locals;class Dv extends Sh{constructor(e,t){super(e),this.set("value",""),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.options=t,this.focusTracker=new Ar,this._focusables=new xh,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new Cr,this._stillTyping=!1,this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color"]},children:[this.dropdownView,this.inputView]}),this.on("change:value",((e,t,o)=>this._setInputValue(o)))}render(){super.render(),this.keystrokes.listenTo(this.dropdownView.panelView.element)}focus(){this.inputView.focus()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,o=this.bindTemplate,n=this._createColorGrid(e),r=Xp(e),i=new Sh,s=this._createRemoveColorButton();return i.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:o.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",o.if("value","ck-hidden",(e=>""!=e))]}}]}),r.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),r.buttonView.children.add(i),r.buttonView.label=t("Color picker"),r.buttonView.tooltip=!0,r.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",r.panelView.children.add(s),r.panelView.children.add(n),r.bind("isEnabled").to(this,"isReadOnly",(e=>!e)),this._focusables.add(s),this._focusables.add(n),this.focusTracker.add(s.element),this.focusTracker.add(n.element),r}_createInputTextView(){const e=this.locale,t=new Ap(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",(()=>{const e=t.element.value,o=this.options.colorDefinitions.find((t=>e===t.label));this._stillTyping=!0,this.value=o&&o.color||e})),t.on("blur",(()=>{this._stillTyping=!1,this._setInputValue(t.element.value)})),t.delegate("input").to(this),t}_createRemoveColorButton(){const e=this.locale,t=e.t,o=new op(e),n=this.options.defaultColorValue||"",r=t(n?"Restore default":"Remove color");return o.class="ck-input-color__remove-color",o.withText=!0,o.icon=uh.eraser,o.label=r,o.on("execute",(()=>{this.value=n,this.dropdownView.isOpen=!1,this.fire("input")})),o}_createColorGrid(e){const t=new hp(e,{colorDefinitions:this.options.colorDefinitions,columns:this.options.columns});return t.on("execute",((e,t)=>{this.value=t.value,this.dropdownView.isOpen=!1,this.fire("input")})),t.bind("selectedColor").to(this,"value"),t}_setInputValue(e){if(!this._stillTyping){const t=Sv(e),o=this.options.colorDefinitions.find((e=>t===Sv(e.color)));this.inputView.value=o?o.label:e||""}}}function Sv(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const Tv=e=>""===e;function Bv(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function Iv(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function Pv(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function Rv(e){return e=e.trim(),Tv(e)||Tu(e)}function zv(e){return e=e.trim(),Tv(e)||Lv(e)||Ru(e)||(t=e,zu.test(t));var t}function Mv(e){return e=e.trim(),Tv(e)||Lv(e)||Ru(e)}function Nv(e,t){const o=new _r,n=Bv(e.t);for(const r in n){const i={type:"button",model:new bm({_borderStyleValue:r,label:n[r],role:"menuitemradio",withText:!0})};"none"===r?i.model.bind("isOn").to(e,"borderStyle",(e=>"none"===t?!e:e===r)):i.model.bind("isOn").to(e,"borderStyle",(e=>e===r)),o.add(i)}return o}function Fv(e){const{view:t,icons:o,toolbar:n,labels:r,propertyName:i,nameToValue:s,defaultValue:a}=e;for(const e in r){const l=new op(t.locale);l.set({label:r[e],icon:o[e],tooltip:r[e]});const c=s?s(e):e;l.bind("isOn").to(t,i,(e=>{let t=e;return""===e&&a&&(t=a),c===t})),l.on("execute",(()=>{t[i]=c})),n.items.add(l)}}const Ov=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function Vv(e){return(t,o,n)=>{const r=new Dv(t.locale,{colorDefinitions:(i=e.colorConfig,i.map((e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}})))),columns:e.columns,defaultColorValue:e.defaultColorValue});var i;return r.inputView.set({id:o,ariaDescribedById:n}),r.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),r.bind("hasError").to(t,"errorText",(e=>!!e)),r.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused").to(r),r}}function Lv(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}var jv=o(9865),qv={attributes:{"data-cke":!0}};qv.setAttributes=Wr(),qv.insert=qr().bind(null,"head"),qv.domAPI=Lr(),qv.insertStyleElement=Ur();Or()(jv.Z,qv);jv.Z&&jv.Z.locals&&jv.Z.locals;class Hv extends Sh{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",o.to("class")],role:o.to("_role"),"aria-labelledby":o.to("_ariaLabelledBy")},children:this.children})}}var Wv=o(4880),$v={attributes:{"data-cke":!0}};$v.setAttributes=Wr(),$v.insert=qr().bind(null,"head"),$v.domAPI=Lr(),$v.insertStyleElement=Ur();Or()(Wv.Z,$v);Wv.Z&&Wv.Z.locals&&Wv.Z.locals;var Uv=o(198),Gv={attributes:{"data-cke":!0}};Gv.setAttributes=Wr(),Gv.insert=qr().bind(null,"head"),Gv.domAPI=Lr(),Gv.insertStyleElement=Ur();Or()(Uv.Z,Gv);Uv.Z&&Uv.Z.locals&&Uv.Z.locals;var Kv=o(5737),Zv={attributes:{"data-cke":!0}};Zv.setAttributes=Wr(),Zv.insert=qr().bind(null,"head"),Zv.domAPI=Lr(),Zv.insertStyleElement=Ur();Or()(Kv.Z,Zv);Kv.Z&&Kv.Z.locals&&Kv.Z.locals;const Jv={left:uh.alignLeft,center:uh.alignCenter,right:uh.alignRight,justify:uh.alignJustify,top:uh.alignTop,middle:uh.alignMiddle,bottom:uh.alignBottom};class Qv extends Sh{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:r,borderRowLabel:i}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:p,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new Ar,this.keystrokes=new Cr,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=r,this.backgroundInput=a,this.paddingInput=this._createPaddingField(),this.widthInput=l,this.heightInput=d,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=p;const{saveButtonView:m,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=m,this.cancelButtonView=f,this._focusables=new xh,this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new mm(e,{label:this.t("Cell properties")})),this.children.add(new Hv(e,{labelView:i,children:[i,o,r,n],class:"ck-table-form__border-row"})),this.children.add(new Hv(e,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new Hv(e,{children:[new Hv(e,{labelView:u,children:[u,l,c,d],class:"ck-table-form__dimensions-row"}),new Hv(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new Hv(e,{labelView:g,children:[g,h,p],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new Hv(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Ch({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderColorInput.fieldView.dropdownView.buttonView,this.borderWidthInput,this.backgroundInput,this.backgroundInput.fieldView.dropdownView.buttonView,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=Vv({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color}),n=this.locale,r=this.t,i=r("Style"),s=new mp(n);s.text=r("Border");const a=Bv(r),l=new kp(n,sg);l.set({label:i,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:i,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:i}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>a[e||"none"])),l.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),l.bind("isEmpty").to(this,"borderStyle",(e=>!e)),og(l.fieldView,Nv(this,t.style),{role:"menu",ariaLabel:i});const c=new kp(n,ig);c.set({label:r("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",Yv),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new kp(n,o);return d.set({label:r("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",Yv),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,o,n,r)=>{Yv(n)||(this.borderColor="",this.borderWidth=""),Yv(r)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:s,borderStyleDropdown:l,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Background");const n=Vv({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor}),r=new kp(e,n);return r.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),r.fieldView.bind("value").to(this,"backgroundColor"),r.fieldView.on("input",(()=>{this.backgroundColor=r.fieldView.value})),{backgroundRowLabel:o,backgroundInput:r}}_createDimensionFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Dimensions");const n=new kp(e,ig);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const r=new Sh(e);r.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const i=new kp(e,ig);return i.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),i.fieldView.bind("value").to(this,"height"),i.fieldView.on("input",(()=>{this.height=i.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:r,heightInput:i}}_createPaddingField(){const e=this.locale,t=this.t,o=new kp(e,ig);return o.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),o.fieldView.bind("value").to(this,"padding"),o.fieldView.on("input",(()=>{this.padding=o.fieldView.element.value})),o}_createAlignmentFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Table cell text alignment");const n=new Fp(e),r="rtl"===e.contentLanguageDirection;n.set({isCompact:!0,ariaLabel:t("Horizontal text alignment toolbar")}),Fv({view:this,icons:Jv,toolbar:n,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(r){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const i=new Fp(e);return i.set({isCompact:!0,ariaLabel:t("Vertical text alignment toolbar")}),Fv({view:this,icons:Jv,toolbar:i,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:n,verticalAlignmentToolbar:i,alignmentLabel:o}}_createActionButtons(){const e=this.locale,t=this.t,o=new op(e),n=new op(e),r=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return o.set({label:t("Save"),icon:uh.check,class:"ck-button-save",type:"submit",withText:!0}),o.bind("isEnabled").toMany(r,"errorText",((...e)=>e.every((e=>!e)))),n.set({label:t("Cancel"),icon:uh.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:o,cancelButtonView:n}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,o=t("Align cell text to the left"),n=t("Align cell text to the center"),r=t("Align cell text to the right"),i=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:r,center:n,left:o,justify:i}:{left:o,center:n,right:r,justify:i}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function Yv(e){return"none"!==e}const Xv=Wg.defaultPositions,ex=[Xv.northArrowSouth,Xv.northArrowSouthWest,Xv.northArrowSouthEast,Xv.southArrowNorth,Xv.southArrowNorthWest,Xv.southArrowNorthEast,Xv.viewportStickyNorth];function tx(e,t){const o=e.plugins.get("ContextualBalloon");if(Cv(e.editing.view.document.selection)){let n;n="cell"===t?nx(e):ox(e),o.updatePosition(n)}}function ox(e){const t=e.model.document.selection.getFirstPosition().findAncestor("table"),o=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(o),positions:ex}}function nx(e){const t=e.editing.mapper,o=e.editing.view.domConverter,n=e.model.document.selection;if(n.rangeCount>1)return{target:()=>function(e,t){const o=t.editing.mapper,n=t.editing.view.domConverter,r=Array.from(e).map((e=>{const t=rx(e.start),r=o.toViewElement(t);return new Fn(n.mapViewToDom(r))}));return Fn.getBoundingRect(r)}(n.getRanges(),e),positions:ex};const r=rx(n.getFirstPosition()),i=t.toViewElement(r);return{target:o.mapViewToDom(i),positions:ex}}function rx(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}function ix(e){if(!e||!N(e))return e;const{top:t,right:o,bottom:n,left:r}=e;return t==o&&o==n&&n==r?t:void 0}function sx(e,t){const o=parseFloat(e);return Number.isNaN(o)||String(o)!==String(e)?e:`${o}${t}`}function ax(e,t={}){const o={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...e};return t.includeAlignmentProperty&&!o.alignment&&(o.alignment="center"),t.includePaddingProperty&&!o.padding&&(o.padding=""),t.includeVerticalAlignmentProperty&&!o.verticalAlignment&&(o.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!o.horizontalAlignment&&(o.horizontalAlignment=t.isRightToLeftContent?"right":"left"),o}const lx={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class cx extends Br{static get requires(){return[Cm]}static get pluginName(){return"TableCellPropertiesUI"}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:Ov,backgroundColors:Ov})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=ax(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(Cm),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",(o=>{const n=new op(o);n.set({label:t("Cell properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const r=Object.values(lx).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(r,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableCellProperties"),o=ap(t.borderColors),n=sp(e.locale,o),r=ap(t.backgroundColors),i=sp(e.locale,r),s=new Qv(e.locale,{borderColors:n,backgroundColors:i,defaultTableCellProperties:this._defaultTableCellProperties}),a=e.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),yh({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const l=Iv(a),c=Pv(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableCellBorderColor",errorText:l,validator:Rv})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableCellBorderWidth",errorText:c,validator:Mv})),s.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:s.paddingInput,commandName:"tableCellPadding",errorText:c,validator:zv})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableCellWidth",errorText:c,validator:zv})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableCellHeight",errorText:c,validator:zv})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableCellBackgroundColor",errorText:l,validator:Rv})),s.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),s.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(lx).map((([t,o])=>{const n=this._defaultTableCellProperties[t]||"";return[t,e.get(o).value||n]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:nx(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;Cv(e.editing.view.document.selection)?this._isViewVisible&&tx(e,"cell"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:r}=e,i=La((()=>{o.errorText=r}),500);return(e,r,s)=>{i.cancel(),this._isReady&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),o.errorText=null):i())}}}class dx extends Pr{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:o}=e,n=this.editor.model,r=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n.document.selection),i=this._getValueToSet(t);n.enqueueChange(o,(e=>{i?r.forEach((t=>e.setAttribute(this.attributeName,i,t))):r.forEach((t=>e.removeAttribute(this.attributeName,t)))}))}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every((e=>this._getAttribute(e)===t))?t:void 0}}class ux extends dx{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=sx(e,"px"))!==this._defaultValue)return e}}class hx extends Br{static get pluginName(){return"TableCellWidthEditing"}static get requires(){return[ov]}init(){const e=this.editor,t=ax(e.config.get("table.tableCellProperties.defaultProperties"));oC(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:t.width}),e.commands.add("tableCellWidth",new ux(e,t.width))}}class px extends dx{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=sx(e,"px");if(t!==this._defaultValue)return t}}class gx extends dx{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=sx(e,"px");if(t!==this._defaultValue)return t}}class mx extends dx{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class fx extends dx{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class bx extends dx{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class kx extends dx{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class wx extends dx{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class _x extends dx{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=sx(e,"px");if(t!==this._defaultValue)return t}}const yx=/^(top|middle|bottom)$/,Ax=/^(left|center|right|justify)$/;class Cx extends Br{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[ov,hx]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const n=ax(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(Ku),function(e,t,o){const n={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(n)}),ZA(t,"td",n,o),ZA(t,"th",n,o),JA(t,{modelElement:"tableCell",modelAttribute:n.style,styleName:"border-style"}),JA(t,{modelElement:"tableCell",modelAttribute:n.color,styleName:"border-color"}),JA(t,{modelElement:"tableCell",modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableCellBorderStyle",new kx(e,n.borderStyle)),e.commands.add("tableCellBorderColor",new wx(e,n.borderColor)),e.commands.add("tableCellBorderWidth",new _x(e,n.borderWidth)),oC(t,o,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableCellHeight",new gx(e,n.height)),e.data.addStyleProcessorRules(rh),oC(t,o,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),e.commands.add("tableCellPadding",new px(e,n.padding)),e.data.addStyleProcessorRules(Gu),oC(t,o,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableCellBackgroundColor",new mx(e,n.backgroundColor)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:e=>({key:"style",value:{"text-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":Ax}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:Ax}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new bx(e,n.horizontalAlignment)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:e=>({key:"style",value:{"vertical-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":yx}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:yx}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===o?null:t}}})}(t,o,n.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new fx(e,n.verticalAlignment))}}class vx extends Pr{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor.model.document.selection.getFirstPosition().findAncestor("table");this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,o=t.document.selection,{value:n,batch:r}=e,i=o.getFirstPosition().findAncestor("table"),s=this._getValueToSet(n);t.enqueueChange(r,(e=>{s?e.setAttribute(this.attributeName,s,i):e.removeAttribute(this.attributeName,i)}))}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}}class xx extends vx{constructor(e,t){super(e,"tableBackgroundColor",t)}}class Ex extends vx{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Dx extends vx{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Sx extends vx{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=ix(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=sx(e,"px");if(t!==this._defaultValue)return t}}class Tx extends vx{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=sx(e,"px"))!==this._defaultValue)return e}}class Bx extends vx{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if((e=sx(e,"px"))!==this._defaultValue)return e}}class Ix extends vx{constructor(e,t){super(e,"tableAlignment",t)}}const Px=/^(left|center|right)$/,Rx=/^(left|none|right)$/;class zx extends Br{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[ov]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const n=ax(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules(Ku),function(e,t,o){const n={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(n)}),ZA(t,"table",n,o),QA(t,{modelAttribute:n.color,styleName:"border-color"}),QA(t,{modelAttribute:n.style,styleName:"border-style"}),QA(t,{modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableBorderColor",new Ex(e,n.borderColor)),e.commands.add("tableBorderStyle",new Dx(e,n.borderStyle)),e.commands.add("tableBorderWidth",new Sx(e,n.borderWidth)),function(e,t,o){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:Rx}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===o?null:t}}}).attributeToAttribute({view:{attributes:{align:Px}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.alignment),e.commands.add("tableAlignment",new Ix(e,n.alignment)),Mx(t,o,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),e.commands.add("tableWidth",new Tx(e,n.width)),Mx(t,o,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableHeight",new Bx(e,n.height)),e.data.addStyleProcessorRules(Gu),function(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),KA(t,{viewElement:"table",...o}),QA(t,o)}(t,o,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableBackgroundColor",new xx(e,n.backgroundColor))}}function Mx(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),KA(t,{viewElement:/^(table|figure)$/,shouldUpcast:e=>!("table"==e.name&&"figure"==e.parent.name),...o}),JA(t,{modelElement:"table",...o})}var Nx=o(9221),Fx={attributes:{"data-cke":!0}};Fx.setAttributes=Wr(),Fx.insert=qr().bind(null,"head"),Fx.domAPI=Lr(),Fx.insertStyleElement=Ur();Or()(Nx.Z,Fx);Nx.Z&&Nx.Z.locals&&Nx.Z.locals;const Ox={left:uh.objectLeft,center:uh.objectCenter,right:uh.objectRight};class Vx extends Sh{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:r,borderRowLabel:i}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:p}=this._createAlignmentFields();this.focusTracker=new Ar,this.keystrokes=new Cr,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=r,this.backgroundInput=a,this.widthInput=l,this.heightInput=d,this.alignmentToolbar=h;const{saveButtonView:g,cancelButtonView:m}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=m,this._focusables=new xh,this._focusCycler=new Tp({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new mm(e,{label:this.t("Table properties")})),this.children.add(new Hv(e,{labelView:i,children:[i,o,r,n],class:"ck-table-form__border-row"})),this.children.add(new Hv(e,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new Hv(e,{children:[new Hv(e,{labelView:u,children:[u,l,c,d],class:"ck-table-form__dimensions-row"}),new Hv(e,{labelView:p,children:[p,h],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new Hv(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Ch({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderColorInput.fieldView.dropdownView.buttonView,this.borderWidthInput,this.backgroundInput,this.backgroundInput.fieldView.dropdownView.buttonView,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=Vv({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color}),n=this.locale,r=this.t,i=r("Style"),s=new mp(n);s.text=r("Border");const a=Bv(r),l=new kp(n,sg);l.set({label:i,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:i,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:i}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>a[e||"none"])),l.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),l.bind("isEmpty").to(this,"borderStyle",(e=>!e)),og(l.fieldView,Nv(this,t.style),{role:"menu",ariaLabel:i});const c=new kp(n,ig);c.set({label:r("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",Lx),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new kp(n,o);return d.set({label:r("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",Lx),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,o,n,r)=>{Lx(n)||(this.borderColor="",this.borderWidth=""),Lx(r)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:s,borderStyleDropdown:l,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Background");const n=Vv({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor}),r=new kp(e,n);return r.set({label:t("Color"),class:"ck-table-properties-form__background"}),r.fieldView.bind("value").to(this,"backgroundColor"),r.fieldView.on("input",(()=>{this.backgroundColor=r.fieldView.value})),{backgroundRowLabel:o,backgroundInput:r}}_createDimensionFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Dimensions");const n=new kp(e,ig);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const r=new Sh(e);r.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const i=new kp(e,ig);return i.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),i.fieldView.bind("value").to(this,"height"),i.fieldView.on("input",(()=>{this.height=i.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:r,heightInput:i}}_createAlignmentFields(){const e=this.locale,t=this.t,o=new mp(e);o.text=t("Alignment");const n=new Fp(e);return n.set({isCompact:!0,ariaLabel:t("Table alignment toolbar")}),Fv({view:this,icons:Ox,toolbar:n,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:o,alignmentToolbar:n}}_createActionButtons(){const e=this.locale,t=this.t,o=new op(e),n=new op(e),r=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return o.set({label:t("Save"),icon:uh.check,class:"ck-button-save",type:"submit",withText:!0}),o.bind("isEnabled").toMany(r,"errorText",((...e)=>e.every((e=>!e)))),n.set({label:t("Cancel"),icon:uh.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:o,cancelButtonView:n}}get _alignmentLabels(){const e=this.locale,t=this.t,o=t("Align table to the left"),n=t("Center table"),r=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:r,center:n,left:o}:{left:o,center:n,right:r}}}function Lx(e){return"none"!==e}const jx={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class qx extends Br{static get requires(){return[Cm]}static get pluginName(){return"TablePropertiesUI"}constructor(e){super(e),this.view=null,e.config.define("table.tableProperties",{borderColors:Ov,backgroundColors:Ov})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=ax(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(Cm),e.ui.componentFactory.add("tableProperties",(o=>{const n=new op(o);n.set({label:t("Table properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const r=Object.values(jx).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(r,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableProperties"),o=ap(t.borderColors),n=sp(e.locale,o),r=ap(t.backgroundColors),i=sp(e.locale,r),s=new Vx(e.locale,{borderColors:n,backgroundColors:i,defaultTableProperties:this._defaultTableProperties}),a=e.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),yh({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const l=Iv(a),c=Pv(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableBorderColor",errorText:l,validator:Rv})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableBorderWidth",errorText:c,validator:Mv})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableBackgroundColor",errorText:l,validator:Rv})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableWidth",errorText:c,validator:zv})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableHeight",errorText:c,validator:zv})),s.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(jx).map((([t,o])=>{const n=t,r=this._defaultTableProperties[n]||"";return[n,e.get(o).value||r]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:ox(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;Cv(e.editing.view.document.selection)?this._isViewVisible&&tx(e,"table"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:r}=e,i=La((()=>{o.errorText=r}),500);return(e,r,s)=>{i.cancel(),this._isReady&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),o.errorText=null):i())}}}var Hx=o(9888),Wx={attributes:{"data-cke":!0}};Wx.setAttributes=Wr(),Wx.insert=qr().bind(null,"head"),Wx.domAPI=Lr(),Wx.insertStyleElement=Ur();Or()(Hx.Z,Wx);Hx.Z&&Hx.Z.locals&&Hx.Z.locals;var $x=o(728),Ux={attributes:{"data-cke":!0}};Ux.setAttributes=Wr(),Ux.insert=qr().bind(null,"head"),Ux.domAPI=Lr(),Ux.insertStyleElement=Ur();Or()($x.Z,Ux);$x.Z&&$x.Z.locals&&$x.Z.locals;function Gx(e,t){if(!e.childCount)return;const o=new Au(e.document),n=function(e,t){const o=t.createRangeIn(e),n=new si({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),r=[];for(const e of o)if("elementStart"===e.type&&n.match(e.item)){const t=Jx(e.item);r.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return r}(e,o);if(!n.length)return;let r=null,i=1;n.forEach(((e,s)=>{const a=function(e,t){if(!e)return!0;if(e.id!==t.id)return t.indent-e.indent!=1;const o=t.element.previousSibling;if(!o)return!0;return n=o,!(n.is("element","ol")||n.is("element","ul"));var n}(n[s-1],e),l=a?null:n[s-1],c=(u=e,(d=l)?u.indent-d.indent:u.indent-1);var d,u;if(a&&(r=null,i=1),!r||0!==c){const n=function(e,t){const o=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi"),n=/mso-level-number-format:([^;]{0,100});/gi,r=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,i=o.exec(t);let s="decimal",a="ol",l=null;if(i&&i[1]){const t=n.exec(i[1]);if(t&&t[1]&&(s=t[1].trim(),a="bullet"!==s&&"image"!==s?"ol":"ul"),"bullet"===s){const t=function(e){const t=function(e){if(e.getChild(0).is("$text"))return null;for(const t of e.getChildren()){if(!t.is("element","span"))continue;const e=t.getChild(0);if(e)return e.is("$text")?e:e.getChild(0)}return null}(e);if(!t)return null;const o=t._data;if("o"===o)return"circle";if("·"===o)return"disc";if("§"===o)return"square";return null}(e.element);t&&(s=t)}else{const e=r.exec(i[1]);e&&e[1]&&(l=parseInt(e[1]))}}return{type:a,startIndex:l,style:Kx(s)}}(e,t);if(r){if(e.indent>i){const e=r.getChild(r.childCount-1),t=e.getChild(e.childCount-1);r=Zx(n,t,o),i+=1}else if(e.indent1&&o.setAttribute("start",e.startIndex,r),r}function Jx(e){const t={},o=e.getStyle("mso-list");if(o){const e=o.match(/(^|\s{1,100})l(\d+)/i),n=o.match(/\s{0,100}lfo(\d+)/i),r=o.match(/\s{0,100}level(\d+)/i);e&&n&&r&&(t.id=e[2],t.order=n[1],t.indent=parseInt(r[1]))}return t}function Qx(e,t){if(!e.childCount)return;const o=new Au(e.document),n=function(e,t){const o=t.createRangeIn(e),n=new si({name:/v:(.+)/}),r=[];for(const e of o){if("elementStart"!=e.type)continue;const t=e.item,o=t.previousSibling,i=o&&o.is("element")?o.name:null;n.match(t)&&t.getAttribute("o:gfxdata")&&"v:shapetype"!==i&&r.push(e.item.getAttribute("id"))}return r}(e,o);!function(e,t,o){const n=o.createRangeIn(t),r=new si({name:"img"}),i=[];for(const t of n)if(t.item.is("element")&&r.match(t.item)){const o=t.item,n=o.getAttribute("v:shapes")?o.getAttribute("v:shapes").split(" "):[];n.length&&n.every((t=>e.indexOf(t)>-1))?i.push(o):o.getAttribute("src")||i.push(o)}for(const e of i)o.remove(e)}(n,e,o),function(e,t,o){const n=o.createRangeIn(t),r=[];for(const t of n)if("elementStart"==t.type&&t.item.is("element","v:shape")){const o=t.item.getAttribute("id");if(e.includes(o))continue;i(t.item.parent.getChildren(),o)||r.push(t.item)}for(const e of r){const t={src:s(e)};e.hasAttribute("alt")&&(t.alt=e.getAttribute("alt"));const n=o.createElement("img",t);o.insertChild(e.index+1,n,e.parent)}function i(e,t){for(const o of e)if(o.is("element")){if("img"==o.name&&o.getAttribute("v:shapes")==t)return!0;if(i(o.getChildren(),t))return!0}return!1}function s(e){for(const t of e.getChildren())if(t.is("element")&&t.getAttribute("src"))return t.getAttribute("src")}}(n,e,o),function(e,t){const o=t.createRangeIn(e),n=new si({name:/v:(.+)/}),r=[];for(const e of o)"elementStart"==e.type&&n.match(e.item)&&r.push(e.item);for(const e of r)t.remove(e)}(e,o);const r=function(e,t){const o=t.createRangeIn(e),n=new si({name:"img"}),r=[];for(const e of o)e.item.is("element")&&n.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&r.push(e.item);return r}(e,o);r.length&&function(e,t,o){if(e.length===t.length)for(let n=0;nString.fromCharCode(parseInt(e,16)))).join(""))}const Xx=//i,eE=/xmlns:o="urn:schemas-microsoft-com/i;class tE{constructor(e){this.document=e}isActive(e){return Xx.test(e)||eE.test(e)}execute(e){const{body:t,stylesString:o}=e._parsedData;Gx(t,o),Qx(t,e.dataTransfer.getData("text/rtf")),e.content=t}}function oE(e,t,o,{blockElements:n,inlineObjectElements:r}){let i=o.createPositionAt(e,"forward"==t?"after":"before");return i=i.getLastMatchingPosition((({item:e})=>e.is("element")&&!n.includes(e.name)&&!r.includes(e.name)),{direction:t}),"forward"==t?i.nodeAfter:i.nodeBefore}function nE(e,t){return!!e&&e.is("element")&&t.includes(e.name)}const rE=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class iE{constructor(e){this.document=e}isActive(e){return rE.test(e)}execute(e){const t=new Au(this.document),{body:o}=e._parsedData;!function(e,t){for(const o of e.getChildren())if(o.is("element","b")&&"normal"===o.getStyle("font-weight")){const n=e.getChildIndex(o);t.remove(o),t.insertChild(n,o.getChildren(),e)}}(o,t),function(e,t){for(const o of t.createRangeIn(e)){const e=o.item;if(e.is("element","li")){const o=e.getChild(0);o&&o.is("element","p")&&t.unwrapElement(o)}}}(o,t),function(e,t){const o=new Ds(t.document.stylesProcessor),n=new ka(o,{renderingMode:"data"}),r=n.blockElements,i=n.inlineObjectElements,s=[];for(const o of t.createRangeIn(e)){const e=o.item;if(e.is("element","br")){const o=oE(e,"forward",t,{blockElements:r,inlineObjectElements:i}),n=oE(e,"backward",t,{blockElements:r,inlineObjectElements:i}),a=nE(o,r);(nE(n,r)||a)&&s.push(e)}}for(const e of s)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}(o,t),e.content=o}}const sE=/(\s+)<\/span>/g,((e,t)=>1===t.length?" ":Array(t.length+1).join("  ").substr(0,t.length)))}function cE(e,t){const o=new DOMParser,n=function(e){return lE(lE(e)).replace(/([^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/ <\//g," <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)<")}(function(e){const t="",o="",n=e.indexOf(t);if(n<0)return e;const r=e.indexOf(o,n+t.length);return e.substring(0,n+t.length)+(r>=0?e.substring(r):"")}(e=e.replace(/|';\nvar processing = '<[?][\\\\s\\\\S]*?[?]>';\nvar declaration = ']*>';\nvar cdata = '';\n\nvar HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment +\n '|' + processing + '|' + declaration + '|' + cdata + ')');\nvar HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');\n\nmodule.exports.HTML_TAG_RE = HTML_TAG_RE;\nmodule.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE;\n","// Utilities\n//\n'use strict';\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction isString(obj) { return _class(obj) === '[object String]'; }\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n return _hasOwnProperty.call(object, key);\n}\n\n// Merge objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n\n sources.forEach(function (source) {\n if (!source) { return; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be object');\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n\n return obj;\n}\n\n// Remove element from array and put another array at those position.\n// Useful for some operations with tokens\nfunction arrayReplaceAt(src, pos, newElements) {\n return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) { return false; }\n // never used\n if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }\n // control codes\n if (c >= 0x00 && c <= 0x08) { return false; }\n if (c === 0x0B) { return false; }\n if (c >= 0x0E && c <= 0x1F) { return false; }\n if (c >= 0x7F && c <= 0x9F) { return false; }\n // out of range\n if (c > 0x10FFFF) { return false; }\n return true;\n}\n\nfunction fromCodePoint(c) {\n /*eslint no-bitwise:0*/\n if (c > 0xffff) {\n c -= 0x10000;\n var surrogate1 = 0xd800 + (c >> 10),\n surrogate2 = 0xdc00 + (c & 0x3ff);\n\n return String.fromCharCode(surrogate1, surrogate2);\n }\n return String.fromCharCode(c);\n}\n\n\nvar UNESCAPE_MD_RE = /\\\\([!\"#$%&'()*+,\\-.\\/:;<=>?@[\\\\\\]^_`{|}~])/g;\nvar ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');\n\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\n\nvar entities = require('./entities');\n\nfunction replaceEntityPattern(match, name) {\n var code = 0;\n\n if (has(entities, name)) {\n return entities[name];\n }\n\n if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ?\n parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);\n\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n\n return match;\n}\n\n/*function replaceEntities(str) {\n if (str.indexOf('&') < 0) { return str; }\n\n return str.replace(ENTITY_RE, replaceEntityPattern);\n}*/\n\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) { return str; }\n return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\nfunction unescapeAll(str) {\n if (str.indexOf('\\\\') < 0 && str.indexOf('&') < 0) { return str; }\n\n return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {\n if (escaped) { return escaped; }\n return replaceEntityPattern(match, entity);\n });\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\nfunction escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n return str;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g;\n\nfunction escapeRE(str) {\n return str.replace(REGEXP_ESCAPE_RE, '\\\\$&');\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isSpace(code) {\n switch (code) {\n case 0x09:\n case 0x20:\n return true;\n }\n return false;\n}\n\n// Zs (unicode class) || [\\t\\f\\v\\r\\n]\nfunction isWhiteSpace(code) {\n if (code >= 0x2000 && code <= 0x200A) { return true; }\n switch (code) {\n case 0x09: // \\t\n case 0x0A: // \\n\n case 0x0B: // \\v\n case 0x0C: // \\f\n case 0x0D: // \\r\n case 0x20:\n case 0xA0:\n case 0x1680:\n case 0x202F:\n case 0x205F:\n case 0x3000:\n return true;\n }\n return false;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n/*eslint-disable max-len*/\nvar UNICODE_PUNCT_RE = require('uc.micro/categories/P/regex');\n\n// Currently without astral characters support.\nfunction isPunctChar(ch) {\n return UNICODE_PUNCT_RE.test(ch);\n}\n\n\n// Markdown ASCII punctuation characters.\n//\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n//\n// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.\n//\nfunction isMdAsciiPunct(ch) {\n switch (ch) {\n case 0x21/* ! */:\n case 0x22/* \" */:\n case 0x23/* # */:\n case 0x24/* $ */:\n case 0x25/* % */:\n case 0x26/* & */:\n case 0x27/* ' */:\n case 0x28/* ( */:\n case 0x29/* ) */:\n case 0x2A/* * */:\n case 0x2B/* + */:\n case 0x2C/* , */:\n case 0x2D/* - */:\n case 0x2E/* . */:\n case 0x2F/* / */:\n case 0x3A/* : */:\n case 0x3B/* ; */:\n case 0x3C/* < */:\n case 0x3D/* = */:\n case 0x3E/* > */:\n case 0x3F/* ? */:\n case 0x40/* @ */:\n case 0x5B/* [ */:\n case 0x5C/* \\ */:\n case 0x5D/* ] */:\n case 0x5E/* ^ */:\n case 0x5F/* _ */:\n case 0x60/* ` */:\n case 0x7B/* { */:\n case 0x7C/* | */:\n case 0x7D/* } */:\n case 0x7E/* ~ */:\n return true;\n default:\n return false;\n }\n}\n\n// Hepler to unify [reference labels].\n//\nfunction normalizeReference(str) {\n // Trim and collapse whitespace\n //\n str = str.trim().replace(/\\s+/g, ' ');\n\n // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug\n // fixed in v12 (couldn't find any details).\n //\n // So treat this one as a special case\n // (remove this when node v10 is no longer supported).\n //\n if ('ẞ'.toLowerCase() === 'Ṿ') {\n str = str.replace(/ẞ/g, 'ß');\n }\n\n // .toLowerCase().toUpperCase() should get rid of all differences\n // between letter variants.\n //\n // Simple .toLowerCase() doesn't normalize 125 code points correctly,\n // and .toUpperCase doesn't normalize 6 of them (list of exceptions:\n // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently\n // uppercased versions).\n //\n // Here's an example showing how it happens. Lets take greek letter omega:\n // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)\n //\n // Unicode entries:\n // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;\n // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398\n // 03D1;GREEK THETA SYMBOL;Ll;0;L; 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398\n // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L; 0398;;;;N;;;;03B8;\n //\n // Case-insensitive comparison should treat all of them as equivalent.\n //\n // But .toLowerCase() doesn't change ϑ (it's already lowercase),\n // and .toUpperCase() doesn't change ϴ (already uppercase).\n //\n // Applying first lower then upper case normalizes any character:\n // '\\u0398\\u03f4\\u03b8\\u03d1'.toLowerCase().toUpperCase() === '\\u0398\\u0398\\u0398\\u0398'\n //\n // Note: this is equivalent to unicode case folding; unicode normalization\n // is a different step that is not required here.\n //\n // Final result should be uppercased, because it's later stored in an object\n // (this avoid a conflict with Object.prototype members,\n // most notably, `__proto__`)\n //\n return str.toLowerCase().toUpperCase();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n// Re-export libraries commonly used in both markdown-it and its plugins,\n// so plugins won't have to depend on them explicitly, which reduces their\n// bundled size (e.g. a browser build).\n//\nexports.lib = {};\nexports.lib.mdurl = require('mdurl');\nexports.lib.ucmicro = require('uc.micro');\n\nexports.assign = assign;\nexports.isString = isString;\nexports.has = has;\nexports.unescapeMd = unescapeMd;\nexports.unescapeAll = unescapeAll;\nexports.isValidEntityCode = isValidEntityCode;\nexports.fromCodePoint = fromCodePoint;\n// exports.replaceEntities = replaceEntities;\nexports.escapeHtml = escapeHtml;\nexports.arrayReplaceAt = arrayReplaceAt;\nexports.isSpace = isSpace;\nexports.isWhiteSpace = isWhiteSpace;\nexports.isMdAsciiPunct = isMdAsciiPunct;\nexports.isPunctChar = isPunctChar;\nexports.escapeRE = escapeRE;\nexports.normalizeReference = normalizeReference;\n","// Just a shortcut for bulk export\n'use strict';\n\n\nexports.parseLinkLabel = require('./parse_link_label');\nexports.parseLinkDestination = require('./parse_link_destination');\nexports.parseLinkTitle = require('./parse_link_title');\n","// Parse link destination\n//\n'use strict';\n\n\nvar unescapeAll = require('../common/utils').unescapeAll;\n\n\nmodule.exports = function parseLinkDestination(str, pos, max) {\n var code, level,\n lines = 0,\n start = pos,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (str.charCodeAt(pos) === 0x3C /* < */) {\n pos++;\n while (pos < max) {\n code = str.charCodeAt(pos);\n if (code === 0x0A /* \\n */) { return result; }\n if (code === 0x3C /* < */) { return result; }\n if (code === 0x3E /* > */) {\n result.pos = pos + 1;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n }\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n pos++;\n }\n\n // no closing '>'\n return result;\n }\n\n // this should be ... } else { ... branch\n\n level = 0;\n while (pos < max) {\n code = str.charCodeAt(pos);\n\n if (code === 0x20) { break; }\n\n // ascii control characters\n if (code < 0x20 || code === 0x7F) { break; }\n\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n if (str.charCodeAt(pos + 1) === 0x20) { break; }\n pos += 2;\n continue;\n }\n\n if (code === 0x28 /* ( */) {\n level++;\n if (level > 32) { return result; }\n }\n\n if (code === 0x29 /* ) */) {\n if (level === 0) { break; }\n level--;\n }\n\n pos++;\n }\n\n if (start === pos) { return result; }\n if (level !== 0) { return result; }\n\n result.str = unescapeAll(str.slice(start, pos));\n result.lines = lines;\n result.pos = pos;\n result.ok = true;\n return result;\n};\n","// Parse link label\n//\n// this function assumes that first character (\"[\") already matches;\n// returns the end of the label\n//\n'use strict';\n\nmodule.exports = function parseLinkLabel(state, start, disableNested) {\n var level, found, marker, prevPos,\n labelEnd = -1,\n max = state.posMax,\n oldPos = state.pos;\n\n state.pos = start + 1;\n level = 1;\n\n while (state.pos < max) {\n marker = state.src.charCodeAt(state.pos);\n if (marker === 0x5D /* ] */) {\n level--;\n if (level === 0) {\n found = true;\n break;\n }\n }\n\n prevPos = state.pos;\n state.md.inline.skipToken(state);\n if (marker === 0x5B /* [ */) {\n if (prevPos === state.pos - 1) {\n // increase level if we find text `[`, which is not a part of any token\n level++;\n } else if (disableNested) {\n state.pos = oldPos;\n return -1;\n }\n }\n }\n\n if (found) {\n labelEnd = state.pos;\n }\n\n // restore old state\n state.pos = oldPos;\n\n return labelEnd;\n};\n","// Parse link title\n//\n'use strict';\n\n\nvar unescapeAll = require('../common/utils').unescapeAll;\n\n\nmodule.exports = function parseLinkTitle(str, pos, max) {\n var code,\n marker,\n lines = 0,\n start = pos,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (pos >= max) { return result; }\n\n marker = str.charCodeAt(pos);\n\n if (marker !== 0x22 /* \" */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return result; }\n\n pos++;\n\n // if opening marker is \"(\", switch it to closing marker \")\"\n if (marker === 0x28) { marker = 0x29; }\n\n while (pos < max) {\n code = str.charCodeAt(pos);\n if (code === marker) {\n result.pos = pos + 1;\n result.lines = lines;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n } else if (code === 0x28 /* ( */ && marker === 0x29 /* ) */) {\n return result;\n } else if (code === 0x0A) {\n lines++;\n } else if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos++;\n if (str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n\n pos++;\n }\n\n return result;\n};\n","// Main parser class\n\n'use strict';\n\n\nvar utils = require('./common/utils');\nvar helpers = require('./helpers');\nvar Renderer = require('./renderer');\nvar ParserCore = require('./parser_core');\nvar ParserBlock = require('./parser_block');\nvar ParserInline = require('./parser_inline');\nvar LinkifyIt = require('linkify-it');\nvar mdurl = require('mdurl');\nvar punycode = require('punycode');\n\n\nvar config = {\n default: require('./presets/default'),\n zero: require('./presets/zero'),\n commonmark: require('./presets/commonmark')\n};\n\n////////////////////////////////////////////////////////////////////////////////\n//\n// This validator can prohibit more than really needed to prevent XSS. It's a\n// tradeoff to keep code simple and to be secure by default.\n//\n// If you need different setup - override validator method as you wish. Or\n// replace it with dummy function and use external sanitizer.\n//\n\nvar BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;\nvar GOOD_DATA_RE = /^data:image\\/(gif|png|jpeg|webp);/;\n\nfunction validateLink(url) {\n // url should be normalized at this point, and existing entities are decoded\n var str = url.trim().toLowerCase();\n\n return BAD_PROTO_RE.test(str) ? (GOOD_DATA_RE.test(str) ? true : false) : true;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nvar RECODE_HOSTNAME_FOR = [ 'http:', 'https:', 'mailto:' ];\n\nfunction normalizeLink(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toASCII(parsed.hostname);\n } catch (er) { /**/ }\n }\n }\n\n return mdurl.encode(mdurl.format(parsed));\n}\n\nfunction normalizeLinkText(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toUnicode(parsed.hostname);\n } catch (er) { /**/ }\n }\n }\n\n // add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720\n return mdurl.decode(mdurl.format(parsed), mdurl.decode.defaultChars + '%');\n}\n\n\n/**\n * class MarkdownIt\n *\n * Main parser/renderer class.\n *\n * ##### Usage\n *\n * ```javascript\n * // node.js, \"classic\" way:\n * var MarkdownIt = require('markdown-it'),\n * md = new MarkdownIt();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // node.js, the same, but with sugar:\n * var md = require('markdown-it')();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // browser without AMD, added to \"window\" on script load\n * // Note, there are no dash.\n * var md = window.markdownit();\n * var result = md.render('# markdown-it rulezz!');\n * ```\n *\n * Single line rendering, without paragraph wrap:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * var result = md.renderInline('__markdown-it__ rulezz!');\n * ```\n **/\n\n/**\n * new MarkdownIt([presetName, options])\n * - presetName (String): optional, `commonmark` / `zero`\n * - options (Object)\n *\n * Creates parser instanse with given config. Can be called without `new`.\n *\n * ##### presetName\n *\n * MarkdownIt provides named presets as a convenience to quickly\n * enable/disable active syntax rules and options for common use cases.\n *\n * - [\"commonmark\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -\n * configures parser to strict [CommonMark](http://commonmark.org/) mode.\n * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -\n * similar to GFM, used when no preset name given. Enables all available rules,\n * but still without html, typographer & autolinker.\n * - [\"zero\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -\n * all rules disabled. Useful to quickly setup your config via `.enable()`.\n * For example, when you need only `bold` and `italic` markup and nothing else.\n *\n * ##### options:\n *\n * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!\n * That's not safe! You may need external sanitizer to protect output from XSS.\n * It's better to extend features via plugins, instead of enabling HTML.\n * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags\n * (`
`). This is needed only for full CommonMark compatibility. In real\n * world you will need HTML output.\n * - __breaks__ - `false`. Set `true` to convert `\\n` in paragraphs into `
`.\n * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.\n * Can be useful for external highlighters.\n * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.\n * - __typographer__ - `false`. Set `true` to enable [some language-neutral\n * replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +\n * quotes beautification (smartquotes).\n * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement\n * pairs, when typographer enabled and smartquotes on. For example, you can\n * use `'«»„“'` for Russian, `'„“‚‘'` for German, and\n * `['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›']` for French (including nbsp).\n * - __highlight__ - `null`. Highlighter function for fenced code blocks.\n * Highlighter `function (str, lang)` should return escaped HTML. It can also\n * return empty string if the source was not changed and should be escaped\n * externaly. If result starts with `):\n *\n * ```javascript\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * // Actual default values\n * var md = require('markdown-it')({\n * highlight: function (str, lang) {\n * if (lang && hljs.getLanguage(lang)) {\n * try {\n * return '
' +\n *                hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +\n *                '
';\n * } catch (__) {}\n * }\n *\n * return '
' + md.utils.escapeHtml(str) + '
';\n * }\n * });\n * ```\n *\n **/\nfunction MarkdownIt(presetName, options) {\n if (!(this instanceof MarkdownIt)) {\n return new MarkdownIt(presetName, options);\n }\n\n if (!options) {\n if (!utils.isString(presetName)) {\n options = presetName || {};\n presetName = 'default';\n }\n }\n\n /**\n * MarkdownIt#inline -> ParserInline\n *\n * Instance of [[ParserInline]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.inline = new ParserInline();\n\n /**\n * MarkdownIt#block -> ParserBlock\n *\n * Instance of [[ParserBlock]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.block = new ParserBlock();\n\n /**\n * MarkdownIt#core -> Core\n *\n * Instance of [[Core]] chain executor. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n this.core = new ParserCore();\n\n /**\n * MarkdownIt#renderer -> Renderer\n *\n * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering\n * rules for new token types, generated by plugins.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * function myToken(tokens, idx, options, env, self) {\n * //...\n * return result;\n * };\n *\n * md.renderer.rules['my_token'] = myToken\n * ```\n *\n * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).\n **/\n this.renderer = new Renderer();\n\n /**\n * MarkdownIt#linkify -> LinkifyIt\n *\n * [linkify-it](https://github.com/markdown-it/linkify-it) instance.\n * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)\n * rule.\n **/\n this.linkify = new LinkifyIt();\n\n /**\n * MarkdownIt#validateLink(url) -> Boolean\n *\n * Link validation function. CommonMark allows too much in links. By default\n * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas\n * except some embedded image types.\n *\n * You can change this behaviour:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * // enable everything\n * md.validateLink = function () { return true; }\n * ```\n **/\n this.validateLink = validateLink;\n\n /**\n * MarkdownIt#normalizeLink(url) -> String\n *\n * Function used to encode link url to a machine-readable format,\n * which includes url-encoding, punycode, etc.\n **/\n this.normalizeLink = normalizeLink;\n\n /**\n * MarkdownIt#normalizeLinkText(url) -> String\n *\n * Function used to decode link url to a human-readable format`\n **/\n this.normalizeLinkText = normalizeLinkText;\n\n\n // Expose utils & helpers for easy acces from plugins\n\n /**\n * MarkdownIt#utils -> utils\n *\n * Assorted utility functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).\n **/\n this.utils = utils;\n\n /**\n * MarkdownIt#helpers -> helpers\n *\n * Link components parser functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).\n **/\n this.helpers = utils.assign({}, helpers);\n\n\n this.options = {};\n this.configure(presetName);\n\n if (options) { this.set(options); }\n}\n\n\n/** chainable\n * MarkdownIt.set(options)\n *\n * Set parser options (in the same format as in constructor). Probably, you\n * will never need it, but you can change options after constructor call.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .set({ html: true, breaks: true })\n * .set({ typographer, true });\n * ```\n *\n * __Note:__ To achieve the best possible performance, don't modify a\n * `markdown-it` instance options on the fly. If you need multiple configurations\n * it's best to create multiple instances and initialize each with separate\n * config.\n **/\nMarkdownIt.prototype.set = function (options) {\n utils.assign(this.options, options);\n return this;\n};\n\n\n/** chainable, internal\n * MarkdownIt.configure(presets)\n *\n * Batch load of all options and compenent settings. This is internal method,\n * and you probably will not need it. But if you will - see available presets\n * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)\n *\n * We strongly recommend to use presets instead of direct config loads. That\n * will give better compatibility with next versions.\n **/\nMarkdownIt.prototype.configure = function (presets) {\n var self = this, presetName;\n\n if (utils.isString(presets)) {\n presetName = presets;\n presets = config[presetName];\n if (!presets) { throw new Error('Wrong `markdown-it` preset \"' + presetName + '\", check name'); }\n }\n\n if (!presets) { throw new Error('Wrong `markdown-it` preset, can\\'t be empty'); }\n\n if (presets.options) { self.set(presets.options); }\n\n if (presets.components) {\n Object.keys(presets.components).forEach(function (name) {\n if (presets.components[name].rules) {\n self[name].ruler.enableOnly(presets.components[name].rules);\n }\n if (presets.components[name].rules2) {\n self[name].ruler2.enableOnly(presets.components[name].rules2);\n }\n });\n }\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.enable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to enable\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable list or rules. It will automatically find appropriate components,\n * containing rules with given names. If rule not found, and `ignoreInvalid`\n * not set - throws exception.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .enable(['sub', 'sup'])\n * .disable('smartquotes');\n * ```\n **/\nMarkdownIt.prototype.enable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) { list = [ list ]; }\n\n [ 'core', 'block', 'inline' ].forEach(function (chain) {\n result = result.concat(this[chain].ruler.enable(list, true));\n }, this);\n\n result = result.concat(this.inline.ruler2.enable(list, true));\n\n var missed = list.filter(function (name) { return result.indexOf(name) < 0; });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);\n }\n\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.disable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * The same as [[MarkdownIt.enable]], but turn specified rules off.\n **/\nMarkdownIt.prototype.disable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) { list = [ list ]; }\n\n [ 'core', 'block', 'inline' ].forEach(function (chain) {\n result = result.concat(this[chain].ruler.disable(list, true));\n }, this);\n\n result = result.concat(this.inline.ruler2.disable(list, true));\n\n var missed = list.filter(function (name) { return result.indexOf(name) < 0; });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);\n }\n return this;\n};\n\n\n/** chainable\n * MarkdownIt.use(plugin, params)\n *\n * Load specified plugin with given params into current parser instance.\n * It's just a sugar to call `plugin(md, params)` with curring.\n *\n * ##### Example\n *\n * ```javascript\n * var iterator = require('markdown-it-for-inline');\n * var md = require('markdown-it')()\n * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {\n * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');\n * });\n * ```\n **/\nMarkdownIt.prototype.use = function (plugin /*, params, ... */) {\n var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));\n plugin.apply(plugin, args);\n return this;\n};\n\n\n/** internal\n * MarkdownIt.parse(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Parse input string and return list of block tokens (special token type\n * \"inline\" will contain list of inline tokens). You should not call this\n * method directly, until you write custom renderer (for example, to produce\n * AST).\n *\n * `env` is used to pass data between \"distributed\" rules and return additional\n * metadata like reference info, needed for the renderer. It also can be used to\n * inject data in specific cases. Usually, you will be ok to pass `{}`,\n * and then pass updated object to renderer.\n **/\nMarkdownIt.prototype.parse = function (src, env) {\n if (typeof src !== 'string') {\n throw new Error('Input data should be a String');\n }\n\n var state = new this.core.State(src, this, env);\n\n this.core.process(state);\n\n return state.tokens;\n};\n\n\n/**\n * MarkdownIt.render(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Render markdown string into html. It does all magic for you :).\n *\n * `env` can be used to inject additional metadata (`{}` by default).\n * But you will not need it with high probability. See also comment\n * in [[MarkdownIt.parse]].\n **/\nMarkdownIt.prototype.render = function (src, env) {\n env = env || {};\n\n return this.renderer.render(this.parse(src, env), this.options, env);\n};\n\n\n/** internal\n * MarkdownIt.parseInline(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the\n * block tokens list with the single `inline` element, containing parsed inline\n * tokens in `children` property. Also updates `env` object.\n **/\nMarkdownIt.prototype.parseInline = function (src, env) {\n var state = new this.core.State(src, this, env);\n\n state.inlineMode = true;\n this.core.process(state);\n\n return state.tokens;\n};\n\n\n/**\n * MarkdownIt.renderInline(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Similar to [[MarkdownIt.render]] but for single paragraph content. Result\n * will NOT be wrapped into `

` tags.\n **/\nMarkdownIt.prototype.renderInline = function (src, env) {\n env = env || {};\n\n return this.renderer.render(this.parseInline(src, env), this.options, env);\n};\n\n\nmodule.exports = MarkdownIt;\n","/** internal\n * class ParserBlock\n *\n * Block-level tokenizer.\n **/\n'use strict';\n\n\nvar Ruler = require('./ruler');\n\n\nvar _rules = [\n // First 2 params - rule name & source. Secondary array - list of rules,\n // which can be terminated by this one.\n [ 'table', require('./rules_block/table'), [ 'paragraph', 'reference' ] ],\n [ 'code', require('./rules_block/code') ],\n [ 'fence', require('./rules_block/fence'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'blockquote', require('./rules_block/blockquote'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'hr', require('./rules_block/hr'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],\n [ 'list', require('./rules_block/list'), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'reference', require('./rules_block/reference') ],\n [ 'html_block', require('./rules_block/html_block'), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'heading', require('./rules_block/heading'), [ 'paragraph', 'reference', 'blockquote' ] ],\n [ 'lheading', require('./rules_block/lheading') ],\n [ 'paragraph', require('./rules_block/paragraph') ]\n];\n\n\n/**\n * new ParserBlock()\n **/\nfunction ParserBlock() {\n /**\n * ParserBlock#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of block rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() });\n }\n}\n\n\n// Generate tokens for input range\n//\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n var ok, i,\n rules = this.ruler.getRules(''),\n len = rules.length,\n line = startLine,\n hasEmptyLines = false,\n maxNesting = state.md.options.maxNesting;\n\n while (line < endLine) {\n state.line = line = state.skipEmptyLines(line);\n if (line >= endLine) { break; }\n\n // Termination condition for nested calls.\n // Nested calls currently used for blockquotes & lists\n if (state.sCount[line] < state.blkIndent) { break; }\n\n // If nesting level exceeded - skip tail to the end. That's not ordinary\n // situation and we should not care about content.\n if (state.level >= maxNesting) {\n state.line = endLine;\n break;\n }\n\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.line`\n // - update `state.tokens`\n // - return true\n\n for (i = 0; i < len; i++) {\n ok = rules[i](state, line, endLine, false);\n if (ok) { break; }\n }\n\n // set state.tight if we had an empty line before current tag\n // i.e. latest empty line should not count\n state.tight = !hasEmptyLines;\n\n // paragraph might \"eat\" one newline after it in nested lists\n if (state.isEmpty(state.line - 1)) {\n hasEmptyLines = true;\n }\n\n line = state.line;\n\n if (line < endLine && state.isEmpty(line)) {\n hasEmptyLines = true;\n line++;\n state.line = line;\n }\n }\n};\n\n\n/**\n * ParserBlock.parse(str, md, env, outTokens)\n *\n * Process input string and push block tokens into `outTokens`\n **/\nParserBlock.prototype.parse = function (src, md, env, outTokens) {\n var state;\n\n if (!src) { return; }\n\n state = new this.State(src, md, env, outTokens);\n\n this.tokenize(state, state.line, state.lineMax);\n};\n\n\nParserBlock.prototype.State = require('./rules_block/state_block');\n\n\nmodule.exports = ParserBlock;\n","/** internal\n * class Core\n *\n * Top-level rules executor. Glues block/inline parsers and does intermediate\n * transformations.\n **/\n'use strict';\n\n\nvar Ruler = require('./ruler');\n\n\nvar _rules = [\n [ 'normalize', require('./rules_core/normalize') ],\n [ 'block', require('./rules_core/block') ],\n [ 'inline', require('./rules_core/inline') ],\n [ 'linkify', require('./rules_core/linkify') ],\n [ 'replacements', require('./rules_core/replacements') ],\n [ 'smartquotes', require('./rules_core/smartquotes') ],\n // `text_join` finds `text_special` tokens (for escape sequences)\n // and joins them with the rest of the text\n [ 'text_join', require('./rules_core/text_join') ]\n];\n\n\n/**\n * new Core()\n **/\nfunction Core() {\n /**\n * Core#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of core rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n}\n\n\n/**\n * Core.process(state)\n *\n * Executes core chain rules.\n **/\nCore.prototype.process = function (state) {\n var i, l, rules;\n\n rules = this.ruler.getRules('');\n\n for (i = 0, l = rules.length; i < l; i++) {\n rules[i](state);\n }\n};\n\nCore.prototype.State = require('./rules_core/state_core');\n\n\nmodule.exports = Core;\n","/** internal\n * class ParserInline\n *\n * Tokenizes paragraph content.\n **/\n'use strict';\n\n\nvar Ruler = require('./ruler');\n\n\n////////////////////////////////////////////////////////////////////////////////\n// Parser rules\n\nvar _rules = [\n [ 'text', require('./rules_inline/text') ],\n [ 'linkify', require('./rules_inline/linkify') ],\n [ 'newline', require('./rules_inline/newline') ],\n [ 'escape', require('./rules_inline/escape') ],\n [ 'backticks', require('./rules_inline/backticks') ],\n [ 'strikethrough', require('./rules_inline/strikethrough').tokenize ],\n [ 'emphasis', require('./rules_inline/emphasis').tokenize ],\n [ 'link', require('./rules_inline/link') ],\n [ 'image', require('./rules_inline/image') ],\n [ 'autolink', require('./rules_inline/autolink') ],\n [ 'html_inline', require('./rules_inline/html_inline') ],\n [ 'entity', require('./rules_inline/entity') ]\n];\n\n// `rule2` ruleset was created specifically for emphasis/strikethrough\n// post-processing and may be changed in the future.\n//\n// Don't use this for anything except pairs (plugins working with `balance_pairs`).\n//\nvar _rules2 = [\n [ 'balance_pairs', require('./rules_inline/balance_pairs') ],\n [ 'strikethrough', require('./rules_inline/strikethrough').postProcess ],\n [ 'emphasis', require('./rules_inline/emphasis').postProcess ],\n // rules for pairs separate '**' into its own text tokens, which may be left unused,\n // rule below merges unused segments back with the rest of the text\n [ 'fragments_join', require('./rules_inline/fragments_join') ]\n];\n\n\n/**\n * new ParserInline()\n **/\nfunction ParserInline() {\n var i;\n\n /**\n * ParserInline#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of inline rules.\n **/\n this.ruler = new Ruler();\n\n for (i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n\n /**\n * ParserInline#ruler2 -> Ruler\n *\n * [[Ruler]] instance. Second ruler used for post-processing\n * (e.g. in emphasis-like rules).\n **/\n this.ruler2 = new Ruler();\n\n for (i = 0; i < _rules2.length; i++) {\n this.ruler2.push(_rules2[i][0], _rules2[i][1]);\n }\n}\n\n\n// Skip single token by running all rules in validation mode;\n// returns `true` if any rule reported success\n//\nParserInline.prototype.skipToken = function (state) {\n var ok, i, pos = state.pos,\n rules = this.ruler.getRules(''),\n len = rules.length,\n maxNesting = state.md.options.maxNesting,\n cache = state.cache;\n\n\n if (typeof cache[pos] !== 'undefined') {\n state.pos = cache[pos];\n return;\n }\n\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n // Increment state.level and decrement it later to limit recursion.\n // It's harmless to do here, because no tokens are created. But ideally,\n // we'd need a separate private state variable for this purpose.\n //\n state.level++;\n ok = rules[i](state, true);\n state.level--;\n\n if (ok) { break; }\n }\n } else {\n // Too much nesting, just skip until the end of the paragraph.\n //\n // NOTE: this will cause links to behave incorrectly in the following case,\n // when an amount of `[` is exactly equal to `maxNesting + 1`:\n //\n // [[[[[[[[[[[[[[[[[[[[[foo]()\n //\n // TODO: remove this workaround when CM standard will allow nested links\n // (we can replace it by preventing links from being parsed in\n // validation mode)\n //\n state.pos = state.posMax;\n }\n\n if (!ok) { state.pos++; }\n cache[pos] = state.pos;\n};\n\n\n// Generate tokens for input range\n//\nParserInline.prototype.tokenize = function (state) {\n var ok, i,\n rules = this.ruler.getRules(''),\n len = rules.length,\n end = state.posMax,\n maxNesting = state.md.options.maxNesting;\n\n while (state.pos < end) {\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.pos`\n // - update `state.tokens`\n // - return true\n\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n ok = rules[i](state, false);\n if (ok) { break; }\n }\n }\n\n if (ok) {\n if (state.pos >= end) { break; }\n continue;\n }\n\n state.pending += state.src[state.pos++];\n }\n\n if (state.pending) {\n state.pushPending();\n }\n};\n\n\n/**\n * ParserInline.parse(str, md, env, outTokens)\n *\n * Process input string and push inline tokens into `outTokens`\n **/\nParserInline.prototype.parse = function (str, md, env, outTokens) {\n var i, rules, len;\n var state = new this.State(str, md, env, outTokens);\n\n this.tokenize(state);\n\n rules = this.ruler2.getRules('');\n len = rules.length;\n\n for (i = 0; i < len; i++) {\n rules[i](state);\n }\n};\n\n\nParserInline.prototype.State = require('./rules_inline/state_inline');\n\n\nmodule.exports = ParserInline;\n","// Commonmark default options\n\n'use strict';\n\n\nmodule.exports = {\n options: {\n html: true, // Enable HTML tags in source\n xhtmlOut: true, // Use '/' to close single tags (
)\n breaks: false, // Convert '\\n' in paragraphs into
\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with )\n breaks: false, // Convert '\\n' in paragraphs into
\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with )\n breaks: false, // Convert '\\n' in paragraphs into
\n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with ' +\n escapeHtml(tokens[idx].content) +\n '';\n};\n\n\ndefault_rules.code_block = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n\n return '' +\n escapeHtml(tokens[idx].content) +\n '\\n';\n};\n\n\ndefault_rules.fence = function (tokens, idx, options, env, slf) {\n var token = tokens[idx],\n info = token.info ? unescapeAll(token.info).trim() : '',\n langName = '',\n langAttrs = '',\n highlighted, i, arr, tmpAttrs, tmpToken;\n\n if (info) {\n arr = info.split(/(\\s+)/g);\n langName = arr[0];\n langAttrs = arr.slice(2).join('');\n }\n\n if (options.highlight) {\n highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content);\n } else {\n highlighted = escapeHtml(token.content);\n }\n\n if (highlighted.indexOf(''\n + highlighted\n + '\\n';\n }\n\n\n return '

'\n        + highlighted\n        + '
\\n';\n};\n\n\ndefault_rules.image = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n\n // \"alt\" attr MUST be set, even if empty. Because it's mandatory and\n // should be placed on proper position for tests.\n //\n // Replace content with actual value\n\n token.attrs[token.attrIndex('alt')][1] =\n slf.renderInlineAsText(token.children, options, env);\n\n return slf.renderToken(tokens, idx, options);\n};\n\n\ndefault_rules.hardbreak = function (tokens, idx, options /*, env */) {\n return options.xhtmlOut ? '
\\n' : '
\\n';\n};\ndefault_rules.softbreak = function (tokens, idx, options /*, env */) {\n return options.breaks ? (options.xhtmlOut ? '
\\n' : '
\\n') : '\\n';\n};\n\n\ndefault_rules.text = function (tokens, idx /*, options, env */) {\n return escapeHtml(tokens[idx].content);\n};\n\n\ndefault_rules.html_block = function (tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\ndefault_rules.html_inline = function (tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\n\n\n/**\n * new Renderer()\n *\n * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.\n **/\nfunction Renderer() {\n\n /**\n * Renderer#rules -> Object\n *\n * Contains render rules for tokens. Can be updated and extended.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.renderer.rules.strong_open = function () { return ''; };\n * md.renderer.rules.strong_close = function () { return ''; };\n *\n * var result = md.renderInline(...);\n * ```\n *\n * Each rule is called as independent static function with fixed signature:\n *\n * ```javascript\n * function my_token_render(tokens, idx, options, env, renderer) {\n * // ...\n * return renderedHTML;\n * }\n * ```\n *\n * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)\n * for more details and examples.\n **/\n this.rules = assign({}, default_rules);\n}\n\n\n/**\n * Renderer.renderAttrs(token) -> String\n *\n * Render token attributes to string.\n **/\nRenderer.prototype.renderAttrs = function renderAttrs(token) {\n var i, l, result;\n\n if (!token.attrs) { return ''; }\n\n result = '';\n\n for (i = 0, l = token.attrs.length; i < l; i++) {\n result += ' ' + escapeHtml(token.attrs[i][0]) + '=\"' + escapeHtml(token.attrs[i][1]) + '\"';\n }\n\n return result;\n};\n\n\n/**\n * Renderer.renderToken(tokens, idx, options) -> String\n * - tokens (Array): list of tokens\n * - idx (Numbed): token index to render\n * - options (Object): params of parser instance\n *\n * Default token renderer. Can be overriden by custom function\n * in [[Renderer#rules]].\n **/\nRenderer.prototype.renderToken = function renderToken(tokens, idx, options) {\n var nextToken,\n result = '',\n needLf = false,\n token = tokens[idx];\n\n // Tight list paragraphs\n if (token.hidden) {\n return '';\n }\n\n // Insert a newline between hidden paragraph and subsequent opening\n // block-level tag.\n //\n // For example, here we should insert a newline before blockquote:\n // - a\n // >\n //\n if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {\n result += '\\n';\n }\n\n // Add token name, e.g. ``.\n //\n needLf = false;\n }\n }\n }\n }\n\n result += needLf ? '>\\n' : '>';\n\n return result;\n};\n\n\n/**\n * Renderer.renderInline(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * The same as [[Renderer.render]], but for single token of `inline` type.\n **/\nRenderer.prototype.renderInline = function (tokens, options, env) {\n var type,\n result = '',\n rules = this.rules;\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (typeof rules[type] !== 'undefined') {\n result += rules[type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options);\n }\n }\n\n return result;\n};\n\n\n/** internal\n * Renderer.renderInlineAsText(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Special kludge for image `alt` attributes to conform CommonMark spec.\n * Don't try to use it! Spec requires to show `alt` content with stripped markup,\n * instead of simple escaping.\n **/\nRenderer.prototype.renderInlineAsText = function (tokens, options, env) {\n var result = '';\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n if (tokens[i].type === 'text') {\n result += tokens[i].content;\n } else if (tokens[i].type === 'image') {\n result += this.renderInlineAsText(tokens[i].children, options, env);\n } else if (tokens[i].type === 'softbreak') {\n result += '\\n';\n }\n }\n\n return result;\n};\n\n\n/**\n * Renderer.render(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Takes token stream and generates HTML. Probably, you will never need to call\n * this method directly.\n **/\nRenderer.prototype.render = function (tokens, options, env) {\n var i, len, type,\n result = '',\n rules = this.rules;\n\n for (i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (type === 'inline') {\n result += this.renderInline(tokens[i].children, options, env);\n } else if (typeof rules[type] !== 'undefined') {\n result += rules[tokens[i].type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options, env);\n }\n }\n\n return result;\n};\n\nmodule.exports = Renderer;\n","/**\n * class Ruler\n *\n * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and\n * [[MarkdownIt#inline]] to manage sequences of functions (rules):\n *\n * - keep rules in defined order\n * - assign the name to each rule\n * - enable/disable rules\n * - add/replace rules\n * - allow assign rules to additional named chains (in the same)\n * - cacheing lists of active rules\n *\n * You will not need use this class directly until write plugins. For simple\n * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and\n * [[MarkdownIt.use]].\n **/\n'use strict';\n\n\n/**\n * new Ruler()\n **/\nfunction Ruler() {\n // List of added rules. Each element is:\n //\n // {\n // name: XXX,\n // enabled: Boolean,\n // fn: Function(),\n // alt: [ name2, name3 ]\n // }\n //\n this.__rules__ = [];\n\n // Cached rule chains.\n //\n // First level - chain name, '' for default.\n // Second level - diginal anchor for fast filtering by charcodes.\n //\n this.__cache__ = null;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Helper methods, should not be used directly\n\n\n// Find rule index by name\n//\nRuler.prototype.__find__ = function (name) {\n for (var i = 0; i < this.__rules__.length; i++) {\n if (this.__rules__[i].name === name) {\n return i;\n }\n }\n return -1;\n};\n\n\n// Build rules lookup cache\n//\nRuler.prototype.__compile__ = function () {\n var self = this;\n var chains = [ '' ];\n\n // collect unique names\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) { return; }\n\n rule.alt.forEach(function (altName) {\n if (chains.indexOf(altName) < 0) {\n chains.push(altName);\n }\n });\n });\n\n self.__cache__ = {};\n\n chains.forEach(function (chain) {\n self.__cache__[chain] = [];\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) { return; }\n\n if (chain && rule.alt.indexOf(chain) < 0) { return; }\n\n self.__cache__[chain].push(rule.fn);\n });\n });\n};\n\n\n/**\n * Ruler.at(name, fn [, options])\n * - name (String): rule name to replace.\n * - fn (Function): new rule function.\n * - options (Object): new rule options (not mandatory).\n *\n * Replace rule by name with new function & options. Throws error if name not\n * found.\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * Replace existing typographer replacement rule with new one:\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.at('replacements', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.at = function (name, fn, options) {\n var index = this.__find__(name);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + name); }\n\n this.__rules__[index].fn = fn;\n this.__rules__[index].alt = opt.alt || [];\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.before(beforeName, ruleName, fn [, options])\n * - beforeName (String): new rule will be added before this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain before one with given name. See also\n * [[Ruler.after]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n var index = this.__find__(beforeName);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + beforeName); }\n\n this.__rules__.splice(index, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.after(afterName, ruleName, fn [, options])\n * - afterName (String): new rule will be added after this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain after one with given name. See also\n * [[Ruler.before]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.inline.ruler.after('text', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n var index = this.__find__(afterName);\n var opt = options || {};\n\n if (index === -1) { throw new Error('Parser rule not found: ' + afterName); }\n\n this.__rules__.splice(index + 1, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n/**\n * Ruler.push(ruleName, fn [, options])\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Push new rule to the end of chain. See also\n * [[Ruler.before]], [[Ruler.after]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.push('my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\nRuler.prototype.push = function (ruleName, fn, options) {\n var opt = options || {};\n\n this.__rules__.push({\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n\n/**\n * Ruler.enable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to enable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.disable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.enable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n var result = [];\n\n // Search by name and enable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) { return; }\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = true;\n result.push(name);\n }, this);\n\n this.__cache__ = null;\n return result;\n};\n\n\n/**\n * Ruler.enableOnly(list [, ignoreInvalid])\n * - list (String|Array): list of rule names to enable (whitelist).\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names, and disable everything else. If any rule name\n * not found - throw Error. Errors can be disabled by second param.\n *\n * See also [[Ruler.disable]], [[Ruler.enable]].\n **/\nRuler.prototype.enableOnly = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n this.__rules__.forEach(function (rule) { rule.enabled = false; });\n\n this.enable(list, ignoreInvalid);\n};\n\n\n/**\n * Ruler.disable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Disable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.enable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.disable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) { list = [ list ]; }\n\n var result = [];\n\n // Search by name and disable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) { return; }\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = false;\n result.push(name);\n }, this);\n\n this.__cache__ = null;\n return result;\n};\n\n\n/**\n * Ruler.getRules(chainName) -> Array\n *\n * Return array of active functions (rules) for given chain name. It analyzes\n * rules configuration, compiles caches if not exists and returns result.\n *\n * Default chain name is `''` (empty string). It can't be skipped. That's\n * done intentionally, to keep signature monomorphic for high speed.\n **/\nRuler.prototype.getRules = function (chainName) {\n if (this.__cache__ === null) {\n this.__compile__();\n }\n\n // Chain can be empty, if rules disabled. But we still have to return Array.\n return this.__cache__[chainName] || [];\n};\n\nmodule.exports = Ruler;\n","// Block quotes\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function blockquote(state, startLine, endLine, silent) {\n var adjustTab,\n ch,\n i,\n initial,\n l,\n lastLineEmpty,\n lines,\n nextLine,\n offset,\n oldBMarks,\n oldBSCount,\n oldIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n spaceAfterMarker,\n terminate,\n terminatorRules,\n token,\n isOutdented,\n oldLineMax = state.lineMax,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n // check the block quote marker\n if (state.src.charCodeAt(pos++) !== 0x3E/* > */) { return false; }\n\n // we know that it's going to be a valid blockquote,\n // so no point trying to find the end of it in silent mode\n if (silent) { return true; }\n\n // set offset past spaces and \">\"\n initial = offset = state.sCount[startLine] + 1;\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20 /* space */) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[startLine] + offset) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n oldBMarks = [ state.bMarks[startLine] ];\n state.bMarks[startLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[startLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n oldBSCount = [ state.bsCount[startLine] ];\n state.bsCount[startLine] = state.sCount[startLine] + 1 + (spaceAfterMarker ? 1 : 0);\n\n lastLineEmpty = pos >= max;\n\n oldSCount = [ state.sCount[startLine] ];\n state.sCount[startLine] = offset - initial;\n\n oldTShift = [ state.tShift[startLine] ];\n state.tShift[startLine] = pos - state.bMarks[startLine];\n\n terminatorRules = state.md.block.ruler.getRules('blockquote');\n\n oldParentType = state.parentType;\n state.parentType = 'blockquote';\n\n // Search the end of the block\n //\n // Block ends with either:\n // 1. an empty line outside:\n // ```\n // > test\n //\n // ```\n // 2. an empty line inside:\n // ```\n // >\n // test\n // ```\n // 3. another tag:\n // ```\n // > test\n // - - -\n // ```\n for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {\n // check if it's outdented, i.e. it's inside list item and indented\n // less than said list item:\n //\n // ```\n // 1. anything\n // > current blockquote\n // 2. checking this line\n // ```\n isOutdented = state.sCount[nextLine] < state.blkIndent;\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos >= max) {\n // Case 1: line is not inside the blockquote, and this line is empty.\n break;\n }\n\n if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) {\n // This line is inside the blockquote.\n\n // set offset past spaces and \">\"\n initial = offset = state.sCount[nextLine] + 1;\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20 /* space */) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[nextLine] + offset) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n state.bMarks[nextLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n lastLineEmpty = pos >= max;\n\n oldBSCount.push(state.bsCount[nextLine]);\n state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);\n\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] = offset - initial;\n\n oldTShift.push(state.tShift[nextLine]);\n state.tShift[nextLine] = pos - state.bMarks[nextLine];\n continue;\n }\n\n // Case 2: line is not inside the blockquote, and the last line was empty.\n if (lastLineEmpty) { break; }\n\n // Case 3: another tag found.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n // Quirk to enforce \"hard termination mode\" for paragraphs;\n // normally if you call `tokenize(state, startLine, nextLine)`,\n // paragraphs will look below nextLine for paragraph continuation,\n // but if blockquote is terminated by another tag, they shouldn't\n state.lineMax = nextLine;\n\n if (state.blkIndent !== 0) {\n // state.blkIndent was non-zero, we now set it to zero,\n // so we need to re-calculate all offsets to appear as\n // if indent wasn't changed\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] -= state.blkIndent;\n }\n\n break;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]);\n\n // A negative indentation means that this is a paragraph continuation\n //\n state.sCount[nextLine] = -1;\n }\n\n oldIndent = state.blkIndent;\n state.blkIndent = 0;\n\n token = state.push('blockquote_open', 'blockquote', 1);\n token.markup = '>';\n token.map = lines = [ startLine, 0 ];\n\n state.md.block.tokenize(state, startLine, nextLine);\n\n token = state.push('blockquote_close', 'blockquote', -1);\n token.markup = '>';\n\n state.lineMax = oldLineMax;\n state.parentType = oldParentType;\n lines[1] = state.line;\n\n // Restore original tShift; this might not be necessary since the parser\n // has already been here, but just to make sure we can do that.\n for (i = 0; i < oldTShift.length; i++) {\n state.bMarks[i + startLine] = oldBMarks[i];\n state.tShift[i + startLine] = oldTShift[i];\n state.sCount[i + startLine] = oldSCount[i];\n state.bsCount[i + startLine] = oldBSCount[i];\n }\n state.blkIndent = oldIndent;\n\n return true;\n};\n","// Code block (4 spaces padded)\n\n'use strict';\n\n\nmodule.exports = function code(state, startLine, endLine/*, silent*/) {\n var nextLine, last, token;\n\n if (state.sCount[startLine] - state.blkIndent < 4) { return false; }\n\n last = nextLine = startLine + 1;\n\n while (nextLine < endLine) {\n if (state.isEmpty(nextLine)) {\n nextLine++;\n continue;\n }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n nextLine++;\n last = nextLine;\n continue;\n }\n break;\n }\n\n state.line = last;\n\n token = state.push('code_block', 'code', 0);\n token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + '\\n';\n token.map = [ startLine, state.line ];\n\n return true;\n};\n","// fences (``` lang, ~~~ lang)\n\n'use strict';\n\n\nmodule.exports = function fence(state, startLine, endLine, silent) {\n var marker, len, params, nextLine, mem, token, markup,\n haveEndMarker = false,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (pos + 3 > max) { return false; }\n\n marker = state.src.charCodeAt(pos);\n\n if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {\n return false;\n }\n\n // scan marker length\n mem = pos;\n pos = state.skipChars(pos, marker);\n\n len = pos - mem;\n\n if (len < 3) { return false; }\n\n markup = state.src.slice(mem, pos);\n params = state.src.slice(pos, max);\n\n if (marker === 0x60 /* ` */) {\n if (params.indexOf(String.fromCharCode(marker)) >= 0) {\n return false;\n }\n }\n\n // Since start is found, we can report success here in validation mode\n if (silent) { return true; }\n\n // search end of block\n nextLine = startLine;\n\n for (;;) {\n nextLine++;\n if (nextLine >= endLine) {\n // unclosed block should be autoclosed by end of document.\n // also block seems to be autoclosed by end of parent\n break;\n }\n\n pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max && state.sCount[nextLine] < state.blkIndent) {\n // non-empty line with negative indent should stop the list:\n // - ```\n // test\n break;\n }\n\n if (state.src.charCodeAt(pos) !== marker) { continue; }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n // closing fence should be indented less than 4 spaces\n continue;\n }\n\n pos = state.skipChars(pos, marker);\n\n // closing code fence must be at least as long as the opening one\n if (pos - mem < len) { continue; }\n\n // make sure tail has spaces only\n pos = state.skipSpaces(pos);\n\n if (pos < max) { continue; }\n\n haveEndMarker = true;\n // found!\n break;\n }\n\n // If a fence has heading spaces, they should be removed from its inner block\n len = state.sCount[startLine];\n\n state.line = nextLine + (haveEndMarker ? 1 : 0);\n\n token = state.push('fence', 'code', 0);\n token.info = params;\n token.content = state.getLines(startLine + 1, nextLine, len, true);\n token.markup = markup;\n token.map = [ startLine, state.line ];\n\n return true;\n};\n","// heading (#, ##, ...)\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function heading(state, startLine, endLine, silent) {\n var ch, level, tmp, token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x23/* # */ || pos >= max) { return false; }\n\n // count heading level\n level = 1;\n ch = state.src.charCodeAt(++pos);\n while (ch === 0x23/* # */ && pos < max && level <= 6) {\n level++;\n ch = state.src.charCodeAt(++pos);\n }\n\n if (level > 6 || (pos < max && !isSpace(ch))) { return false; }\n\n if (silent) { return true; }\n\n // Let's cut tails like ' ### ' from the end of string\n\n max = state.skipSpacesBack(max, pos);\n tmp = state.skipCharsBack(max, 0x23, pos); // #\n if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {\n max = tmp;\n }\n\n state.line = startLine + 1;\n\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = '########'.slice(0, level);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = state.src.slice(pos, max).trim();\n token.map = [ startLine, state.line ];\n token.children = [];\n\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = '########'.slice(0, level);\n\n return true;\n};\n","// Horizontal rule\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function hr(state, startLine, endLine, silent) {\n var marker, cnt, ch, token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n marker = state.src.charCodeAt(pos++);\n\n // Check hr marker\n if (marker !== 0x2A/* * */ &&\n marker !== 0x2D/* - */ &&\n marker !== 0x5F/* _ */) {\n return false;\n }\n\n // markers can be mixed with spaces, but there should be at least 3 of them\n\n cnt = 1;\n while (pos < max) {\n ch = state.src.charCodeAt(pos++);\n if (ch !== marker && !isSpace(ch)) { return false; }\n if (ch === marker) { cnt++; }\n }\n\n if (cnt < 3) { return false; }\n\n if (silent) { return true; }\n\n state.line = startLine + 1;\n\n token = state.push('hr', 'hr', 0);\n token.map = [ startLine, state.line ];\n token.markup = Array(cnt + 1).join(String.fromCharCode(marker));\n\n return true;\n};\n","// HTML block\n\n'use strict';\n\n\nvar block_names = require('../common/html_blocks');\nvar HTML_OPEN_CLOSE_TAG_RE = require('../common/html_re').HTML_OPEN_CLOSE_TAG_RE;\n\n// An array of opening and corresponding closing sequences for html tags,\n// last argument defines whether it can terminate a paragraph or not\n//\nvar HTML_SEQUENCES = [\n [ /^<(script|pre|style|textarea)(?=(\\s|>|$))/i, /<\\/(script|pre|style|textarea)>/i, true ],\n [ /^/, true ],\n [ /^<\\?/, /\\?>/, true ],\n [ /^/, true ],\n [ /^/, true ],\n [ new RegExp('^|$))', 'i'), /^$/, true ],\n [ new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\\\s*$'), /^$/, false ]\n];\n\n\nmodule.exports = function html_block(state, startLine, endLine, silent) {\n var i, nextLine, token, lineText,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (!state.md.options.html) { return false; }\n\n if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n lineText = state.src.slice(pos, max);\n\n for (i = 0; i < HTML_SEQUENCES.length; i++) {\n if (HTML_SEQUENCES[i][0].test(lineText)) { break; }\n }\n\n if (i === HTML_SEQUENCES.length) { return false; }\n\n if (silent) {\n // true if this sequence can be a terminator, false otherwise\n return HTML_SEQUENCES[i][2];\n }\n\n nextLine = startLine + 1;\n\n // If we are here - we detected HTML block.\n // Let's roll down till block end.\n if (!HTML_SEQUENCES[i][1].test(lineText)) {\n for (; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n lineText = state.src.slice(pos, max);\n\n if (HTML_SEQUENCES[i][1].test(lineText)) {\n if (lineText.length !== 0) { nextLine++; }\n break;\n }\n }\n }\n\n state.line = nextLine;\n\n token = state.push('html_block', '', 0);\n token.map = [ startLine, nextLine ];\n token.content = state.getLines(startLine, nextLine, state.blkIndent, true);\n\n return true;\n};\n","// lheading (---, ===)\n\n'use strict';\n\n\nmodule.exports = function lheading(state, startLine, endLine/*, silent*/) {\n var content, terminate, i, l, token, pos, max, level, marker,\n nextLine = startLine + 1, oldParentType,\n terminatorRules = state.md.block.ruler.getRules('paragraph');\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n oldParentType = state.parentType;\n state.parentType = 'paragraph'; // use paragraph to match terminatorRules\n\n // jump line-by-line until empty one or EOF\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n //\n // Check for underline in setext header\n //\n if (state.sCount[nextLine] >= state.blkIndent) {\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max) {\n marker = state.src.charCodeAt(pos);\n\n if (marker === 0x2D/* - */ || marker === 0x3D/* = */) {\n pos = state.skipChars(pos, marker);\n pos = state.skipSpaces(pos);\n\n if (pos >= max) {\n level = (marker === 0x3D/* = */ ? 1 : 2);\n break;\n }\n }\n }\n }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n if (!level) {\n // Didn't find valid underline\n return false;\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n\n state.line = nextLine + 1;\n\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = String.fromCharCode(marker);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [ startLine, state.line - 1 ];\n token.children = [];\n\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = String.fromCharCode(marker);\n\n state.parentType = oldParentType;\n\n return true;\n};\n","// Lists\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\n// Search `[-+*][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipBulletListMarker(state, startLine) {\n var marker, pos, max, ch;\n\n pos = state.bMarks[startLine] + state.tShift[startLine];\n max = state.eMarks[startLine];\n\n marker = state.src.charCodeAt(pos++);\n // Check bullet\n if (marker !== 0x2A/* * */ &&\n marker !== 0x2D/* - */ &&\n marker !== 0x2B/* + */) {\n return -1;\n }\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" -test \" - is not a list item\n return -1;\n }\n }\n\n return pos;\n}\n\n// Search `\\d+[.)][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipOrderedListMarker(state, startLine) {\n var ch,\n start = state.bMarks[startLine] + state.tShift[startLine],\n pos = start,\n max = state.eMarks[startLine];\n\n // List marker should have at least 2 chars (digit + dot)\n if (pos + 1 >= max) { return -1; }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }\n\n for (;;) {\n // EOL -> fail\n if (pos >= max) { return -1; }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {\n\n // List marker should have no more than 9 digits\n // (prevents integer overflow in browsers)\n if (pos - start >= 10) { return -1; }\n\n continue;\n }\n\n // found valid marker\n if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {\n break;\n }\n\n return -1;\n }\n\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n }\n return pos;\n}\n\nfunction markTightParagraphs(state, idx) {\n var i, l,\n level = state.level + 2;\n\n for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n state.tokens[i + 2].hidden = true;\n state.tokens[i].hidden = true;\n i += 2;\n }\n }\n}\n\n\nmodule.exports = function list(state, startLine, endLine, silent) {\n var ch,\n contentStart,\n i,\n indent,\n indentAfterMarker,\n initial,\n isOrdered,\n itemLines,\n l,\n listLines,\n listTokIdx,\n markerCharCode,\n markerValue,\n max,\n nextLine,\n offset,\n oldListIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n oldTight,\n pos,\n posAfterMarker,\n prevEmptyEnd,\n start,\n terminate,\n terminatorRules,\n token,\n isTerminatingParagraph = false,\n tight = true;\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n // Special case:\n // - item 1\n // - item 2\n // - item 3\n // - item 4\n // - this one is a paragraph continuation\n if (state.listIndent >= 0 &&\n state.sCount[startLine] - state.listIndent >= 4 &&\n state.sCount[startLine] < state.blkIndent) {\n return false;\n }\n\n // limit conditions when list can interrupt\n // a paragraph (validation mode only)\n if (silent && state.parentType === 'paragraph') {\n // Next list item should still terminate previous list item;\n //\n // This code can fail if plugins use blkIndent as well as lists,\n // but I hope the spec gets fixed long before that happens.\n //\n if (state.sCount[startLine] >= state.blkIndent) {\n isTerminatingParagraph = true;\n }\n }\n\n // Detect list type and position after marker\n if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {\n isOrdered = true;\n start = state.bMarks[startLine] + state.tShift[startLine];\n markerValue = Number(state.src.slice(start, posAfterMarker - 1));\n\n // If we're starting a new ordered list right after\n // a paragraph, it should start with 1.\n if (isTerminatingParagraph && markerValue !== 1) return false;\n\n } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {\n isOrdered = false;\n\n } else {\n return false;\n }\n\n // If we're starting a new unordered list right after\n // a paragraph, first line should not be empty.\n if (isTerminatingParagraph) {\n if (state.skipSpaces(posAfterMarker) >= state.eMarks[startLine]) return false;\n }\n\n // We should terminate list on style change. Remember first one to compare.\n markerCharCode = state.src.charCodeAt(posAfterMarker - 1);\n\n // For validation mode we can terminate immediately\n if (silent) { return true; }\n\n // Start list\n listTokIdx = state.tokens.length;\n\n if (isOrdered) {\n token = state.push('ordered_list_open', 'ol', 1);\n if (markerValue !== 1) {\n token.attrs = [ [ 'start', markerValue ] ];\n }\n\n } else {\n token = state.push('bullet_list_open', 'ul', 1);\n }\n\n token.map = listLines = [ startLine, 0 ];\n token.markup = String.fromCharCode(markerCharCode);\n\n //\n // Iterate list items\n //\n\n nextLine = startLine;\n prevEmptyEnd = false;\n terminatorRules = state.md.block.ruler.getRules('list');\n\n oldParentType = state.parentType;\n state.parentType = 'list';\n\n while (nextLine < endLine) {\n pos = posAfterMarker;\n max = state.eMarks[nextLine];\n\n initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[startLine] + state.tShift[startLine]);\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine]) % 4;\n } else if (ch === 0x20) {\n offset++;\n } else {\n break;\n }\n\n pos++;\n }\n\n contentStart = pos;\n\n if (contentStart >= max) {\n // trimming space in \"- \\n 3\" case, indent is 1 here\n indentAfterMarker = 1;\n } else {\n indentAfterMarker = offset - initial;\n }\n\n // If we have more than 4 spaces, the indent is 1\n // (the rest is just indented code block)\n if (indentAfterMarker > 4) { indentAfterMarker = 1; }\n\n // \" - test\"\n // ^^^^^ - calculating total length of this thing\n indent = initial + indentAfterMarker;\n\n // Run subparser & write tokens\n token = state.push('list_item_open', 'li', 1);\n token.markup = String.fromCharCode(markerCharCode);\n token.map = itemLines = [ startLine, 0 ];\n if (isOrdered) {\n token.info = state.src.slice(start, posAfterMarker - 1);\n }\n\n // change current state, then restore it after parser subcall\n oldTight = state.tight;\n oldTShift = state.tShift[startLine];\n oldSCount = state.sCount[startLine];\n\n // - example list\n // ^ listIndent position will be here\n // ^ blkIndent position will be here\n //\n oldListIndent = state.listIndent;\n state.listIndent = state.blkIndent;\n state.blkIndent = indent;\n\n state.tight = true;\n state.tShift[startLine] = contentStart - state.bMarks[startLine];\n state.sCount[startLine] = offset;\n\n if (contentStart >= max && state.isEmpty(startLine + 1)) {\n // workaround for this case\n // (list item is empty, list terminates before \"foo\"):\n // ~~~~~~~~\n // -\n //\n // foo\n // ~~~~~~~~\n state.line = Math.min(state.line + 2, endLine);\n } else {\n state.md.block.tokenize(state, startLine, endLine, true);\n }\n\n // If any of list item is tight, mark list as tight\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n }\n // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n prevEmptyEnd = (state.line - startLine) > 1 && state.isEmpty(state.line - 1);\n\n state.blkIndent = state.listIndent;\n state.listIndent = oldListIndent;\n state.tShift[startLine] = oldTShift;\n state.sCount[startLine] = oldSCount;\n state.tight = oldTight;\n\n token = state.push('list_item_close', 'li', -1);\n token.markup = String.fromCharCode(markerCharCode);\n\n nextLine = startLine = state.line;\n itemLines[1] = nextLine;\n contentStart = state.bMarks[startLine];\n\n if (nextLine >= endLine) { break; }\n\n //\n // Try to check if list is terminated or continued.\n //\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { break; }\n\n // fail if terminating block found\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n\n // fail if list has another type\n if (isOrdered) {\n posAfterMarker = skipOrderedListMarker(state, nextLine);\n if (posAfterMarker < 0) { break; }\n start = state.bMarks[nextLine] + state.tShift[nextLine];\n } else {\n posAfterMarker = skipBulletListMarker(state, nextLine);\n if (posAfterMarker < 0) { break; }\n }\n\n if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }\n }\n\n // Finalize list\n if (isOrdered) {\n token = state.push('ordered_list_close', 'ol', -1);\n } else {\n token = state.push('bullet_list_close', 'ul', -1);\n }\n token.markup = String.fromCharCode(markerCharCode);\n\n listLines[1] = nextLine;\n state.line = nextLine;\n\n state.parentType = oldParentType;\n\n // mark paragraphs tight if needed\n if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n\n return true;\n};\n","// Paragraph\n\n'use strict';\n\n\nmodule.exports = function paragraph(state, startLine/*, endLine*/) {\n var content, terminate, i, l, token, oldParentType,\n nextLine = startLine + 1,\n terminatorRules = state.md.block.ruler.getRules('paragraph'),\n endLine = state.lineMax;\n\n oldParentType = state.parentType;\n state.parentType = 'paragraph';\n\n // jump line-by-line until empty one or EOF\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n\n state.line = nextLine;\n\n token = state.push('paragraph_open', 'p', 1);\n token.map = [ startLine, state.line ];\n\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [ startLine, state.line ];\n token.children = [];\n\n token = state.push('paragraph_close', 'p', -1);\n\n state.parentType = oldParentType;\n\n return true;\n};\n","'use strict';\n\n\nvar normalizeReference = require('../common/utils').normalizeReference;\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function reference(state, startLine, _endLine, silent) {\n var ch,\n destEndPos,\n destEndLineNo,\n endLine,\n href,\n i,\n l,\n label,\n labelEnd,\n oldParentType,\n res,\n start,\n str,\n terminate,\n terminatorRules,\n title,\n lines = 0,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine],\n nextLine = startLine + 1;\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n\n if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false; }\n\n // Simple check to quickly interrupt scan on [link](url) at the start of line.\n // Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54\n while (++pos < max) {\n if (state.src.charCodeAt(pos) === 0x5D /* ] */ &&\n state.src.charCodeAt(pos - 1) !== 0x5C/* \\ */) {\n if (pos + 1 === max) { return false; }\n if (state.src.charCodeAt(pos + 1) !== 0x3A/* : */) { return false; }\n break;\n }\n }\n\n endLine = state.lineMax;\n\n // jump line-by-line until empty one or EOF\n terminatorRules = state.md.block.ruler.getRules('reference');\n\n oldParentType = state.parentType;\n state.parentType = 'reference';\n\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { continue; }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) { break; }\n }\n\n str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n max = str.length;\n\n for (pos = 1; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x5B /* [ */) {\n return false;\n } else if (ch === 0x5D /* ] */) {\n labelEnd = pos;\n break;\n } else if (ch === 0x0A /* \\n */) {\n lines++;\n } else if (ch === 0x5C /* \\ */) {\n pos++;\n if (pos < max && str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n }\n\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false; }\n\n // [label]: destination 'title'\n // ^^^ skip optional whitespace here\n for (pos = labelEnd + 2; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^^^^^ parse this\n res = state.md.helpers.parseLinkDestination(str, pos, max);\n if (!res.ok) { return false; }\n\n href = state.md.normalizeLink(res.str);\n if (!state.md.validateLink(href)) { return false; }\n\n pos = res.pos;\n lines += res.lines;\n\n // save cursor state, we could require to rollback later\n destEndPos = pos;\n destEndLineNo = lines;\n\n // [label]: destination 'title'\n // ^^^ skipping those spaces\n start = pos;\n for (; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^ parse this\n res = state.md.helpers.parseLinkTitle(str, pos, max);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n lines += res.lines;\n } else {\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n }\n\n // skip trailing spaces until the rest of the line\n while (pos < max) {\n ch = str.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n pos++;\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n if (title) {\n // garbage at the end of the line after title,\n // but it could still be a valid reference if we roll back\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n while (pos < max) {\n ch = str.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n pos++;\n }\n }\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n // garbage at the end of the line\n return false;\n }\n\n label = normalizeReference(str.slice(1, labelEnd));\n if (!label) {\n // CommonMark 0.20 disallows empty labels\n return false;\n }\n\n // Reference can not terminate anything. This check is for safety only.\n /*istanbul ignore if*/\n if (silent) { return true; }\n\n if (typeof state.env.references === 'undefined') {\n state.env.references = {};\n }\n if (typeof state.env.references[label] === 'undefined') {\n state.env.references[label] = { title: title, href: href };\n }\n\n state.parentType = oldParentType;\n\n state.line = startLine + lines + 1;\n return true;\n};\n","// Parser state class\n\n'use strict';\n\nvar Token = require('../token');\nvar isSpace = require('../common/utils').isSpace;\n\n\nfunction StateBlock(src, md, env, tokens) {\n var ch, s, start, pos, len, indent, offset, indent_found;\n\n this.src = src;\n\n // link to parser instance\n this.md = md;\n\n this.env = env;\n\n //\n // Internal state vartiables\n //\n\n this.tokens = tokens;\n\n this.bMarks = []; // line begin offsets for fast jumps\n this.eMarks = []; // line end offsets for fast jumps\n this.tShift = []; // offsets of the first non-space characters (tabs not expanded)\n this.sCount = []; // indents for each line (tabs expanded)\n\n // An amount of virtual spaces (tabs expanded) between beginning\n // of each line (bMarks) and real beginning of that line.\n //\n // It exists only as a hack because blockquotes override bMarks\n // losing information in the process.\n //\n // It's used only when expanding tabs, you can think about it as\n // an initial tab length, e.g. bsCount=21 applied to string `\\t123`\n // means first tab should be expanded to 4-21%4 === 3 spaces.\n //\n this.bsCount = [];\n\n // block parser variables\n this.blkIndent = 0; // required block content indent (for example, if we are\n // inside a list, it would be positioned after list marker)\n this.line = 0; // line index in src\n this.lineMax = 0; // lines count\n this.tight = false; // loose/tight mode for lists\n this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)\n this.listIndent = -1; // indent of the current list block (-1 if there isn't any)\n\n // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'\n // used in lists to determine if they interrupt a paragraph\n this.parentType = 'root';\n\n this.level = 0;\n\n // renderer\n this.result = '';\n\n // Create caches\n // Generate markers.\n s = this.src;\n indent_found = false;\n\n for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) {\n ch = s.charCodeAt(pos);\n\n if (!indent_found) {\n if (isSpace(ch)) {\n indent++;\n\n if (ch === 0x09) {\n offset += 4 - offset % 4;\n } else {\n offset++;\n }\n continue;\n } else {\n indent_found = true;\n }\n }\n\n if (ch === 0x0A || pos === len - 1) {\n if (ch !== 0x0A) { pos++; }\n this.bMarks.push(start);\n this.eMarks.push(pos);\n this.tShift.push(indent);\n this.sCount.push(offset);\n this.bsCount.push(0);\n\n indent_found = false;\n indent = 0;\n offset = 0;\n start = pos + 1;\n }\n }\n\n // Push fake entry to simplify cache bounds checks\n this.bMarks.push(s.length);\n this.eMarks.push(s.length);\n this.tShift.push(0);\n this.sCount.push(0);\n this.bsCount.push(0);\n\n this.lineMax = this.bMarks.length - 1; // don't count last fake line\n}\n\n// Push new token to \"stream\".\n//\nStateBlock.prototype.push = function (type, tag, nesting) {\n var token = new Token(type, tag, nesting);\n token.block = true;\n\n if (nesting < 0) this.level--; // closing tag\n token.level = this.level;\n if (nesting > 0) this.level++; // opening tag\n\n this.tokens.push(token);\n return token;\n};\n\nStateBlock.prototype.isEmpty = function isEmpty(line) {\n return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];\n};\n\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {\n for (var max = this.lineMax; from < max; from++) {\n if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n break;\n }\n }\n return from;\n};\n\n// Skip spaces from given position.\nStateBlock.prototype.skipSpaces = function skipSpaces(pos) {\n var ch;\n\n for (var max = this.src.length; pos < max; pos++) {\n ch = this.src.charCodeAt(pos);\n if (!isSpace(ch)) { break; }\n }\n return pos;\n};\n\n// Skip spaces from given position in reverse.\nStateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {\n if (pos <= min) { return pos; }\n\n while (pos > min) {\n if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1; }\n }\n return pos;\n};\n\n// Skip char codes from given position\nStateBlock.prototype.skipChars = function skipChars(pos, code) {\n for (var max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== code) { break; }\n }\n return pos;\n};\n\n// Skip char codes reverse from given position - 1\nStateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {\n if (pos <= min) { return pos; }\n\n while (pos > min) {\n if (code !== this.src.charCodeAt(--pos)) { return pos + 1; }\n }\n return pos;\n};\n\n// cut lines range from source.\nStateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {\n var i, lineIndent, ch, first, last, queue, lineStart,\n line = begin;\n\n if (begin >= end) {\n return '';\n }\n\n queue = new Array(end - begin);\n\n for (i = 0; line < end; line++, i++) {\n lineIndent = 0;\n lineStart = first = this.bMarks[line];\n\n if (line + 1 < end || keepLastLF) {\n // No need for bounds check because we have fake entry on tail.\n last = this.eMarks[line] + 1;\n } else {\n last = this.eMarks[line];\n }\n\n while (first < last && lineIndent < indent) {\n ch = this.src.charCodeAt(first);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;\n } else {\n lineIndent++;\n }\n } else if (first - lineStart < this.tShift[line]) {\n // patched tShift masked characters to look like spaces (blockquotes, list markers)\n lineIndent++;\n } else {\n break;\n }\n\n first++;\n }\n\n if (lineIndent > indent) {\n // partially expanding tabs in code blocks, e.g '\\t\\tfoobar'\n // with indent=2 becomes ' \\tfoobar'\n queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);\n } else {\n queue[i] = this.src.slice(first, last);\n }\n }\n\n return queue.join('');\n};\n\n// re-export Token class to use in block rules\nStateBlock.prototype.Token = Token;\n\n\nmodule.exports = StateBlock;\n","// GFM table, https://github.github.com/gfm/#tables-extension-\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nfunction getLine(state, line) {\n var pos = state.bMarks[line] + state.tShift[line],\n max = state.eMarks[line];\n\n return state.src.slice(pos, max);\n}\n\nfunction escapedSplit(str) {\n var result = [],\n pos = 0,\n max = str.length,\n ch,\n isEscaped = false,\n lastPos = 0,\n current = '';\n\n ch = str.charCodeAt(pos);\n\n while (pos < max) {\n if (ch === 0x7c/* | */) {\n if (!isEscaped) {\n // pipe separating cells, '|'\n result.push(current + str.substring(lastPos, pos));\n current = '';\n lastPos = pos + 1;\n } else {\n // escaped pipe, '\\|'\n current += str.substring(lastPos, pos - 1);\n lastPos = pos;\n }\n }\n\n isEscaped = (ch === 0x5c/* \\ */);\n pos++;\n\n ch = str.charCodeAt(pos);\n }\n\n result.push(current + str.substring(lastPos));\n\n return result;\n}\n\n\nmodule.exports = function table(state, startLine, endLine, silent) {\n var ch, lineText, pos, i, l, nextLine, columns, columnCount, token,\n aligns, t, tableLines, tbodyLines, oldParentType, terminate,\n terminatorRules, firstCh, secondCh;\n\n // should have at least two lines\n if (startLine + 2 > endLine) { return false; }\n\n nextLine = startLine + 1;\n\n if (state.sCount[nextLine] < state.blkIndent) { return false; }\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; }\n\n // first character of the second line should be '|', '-', ':',\n // and no other characters are allowed but spaces;\n // basically, this is the equivalent of /^[-:|][-:|\\s]*$/ regexp\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n if (pos >= state.eMarks[nextLine]) { return false; }\n\n firstCh = state.src.charCodeAt(pos++);\n if (firstCh !== 0x7C/* | */ && firstCh !== 0x2D/* - */ && firstCh !== 0x3A/* : */) { return false; }\n\n if (pos >= state.eMarks[nextLine]) { return false; }\n\n secondCh = state.src.charCodeAt(pos++);\n if (secondCh !== 0x7C/* | */ && secondCh !== 0x2D/* - */ && secondCh !== 0x3A/* : */ && !isSpace(secondCh)) {\n return false;\n }\n\n // if first character is '-', then second character must not be a space\n // (due to parsing ambiguity with list)\n if (firstCh === 0x2D/* - */ && isSpace(secondCh)) { return false; }\n\n while (pos < state.eMarks[nextLine]) {\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */ && !isSpace(ch)) { return false; }\n\n pos++;\n }\n\n lineText = getLine(state, startLine + 1);\n\n columns = lineText.split('|');\n aligns = [];\n for (i = 0; i < columns.length; i++) {\n t = columns[i].trim();\n if (!t) {\n // allow empty columns before and after table, but not in between columns;\n // e.g. allow ` |---| `, disallow ` ---||--- `\n if (i === 0 || i === columns.length - 1) {\n continue;\n } else {\n return false;\n }\n }\n\n if (!/^:?-+:?$/.test(t)) { return false; }\n if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {\n aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right');\n } else if (t.charCodeAt(0) === 0x3A/* : */) {\n aligns.push('left');\n } else {\n aligns.push('');\n }\n }\n\n lineText = getLine(state, startLine).trim();\n if (lineText.indexOf('|') === -1) { return false; }\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }\n columns = escapedSplit(lineText);\n if (columns.length && columns[0] === '') columns.shift();\n if (columns.length && columns[columns.length - 1] === '') columns.pop();\n\n // header row will define an amount of columns in the entire table,\n // and align row should be exactly the same (the rest of the rows can differ)\n columnCount = columns.length;\n if (columnCount === 0 || columnCount !== aligns.length) { return false; }\n\n if (silent) { return true; }\n\n oldParentType = state.parentType;\n state.parentType = 'table';\n\n // use 'blockquote' lists for termination because it's\n // the most similar to tables\n terminatorRules = state.md.block.ruler.getRules('blockquote');\n\n token = state.push('table_open', 'table', 1);\n token.map = tableLines = [ startLine, 0 ];\n\n token = state.push('thead_open', 'thead', 1);\n token.map = [ startLine, startLine + 1 ];\n\n token = state.push('tr_open', 'tr', 1);\n token.map = [ startLine, startLine + 1 ];\n\n for (i = 0; i < columns.length; i++) {\n token = state.push('th_open', 'th', 1);\n if (aligns[i]) {\n token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i].trim();\n token.children = [];\n\n token = state.push('th_close', 'th', -1);\n }\n\n token = state.push('tr_close', 'tr', -1);\n token = state.push('thead_close', 'thead', -1);\n\n for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) { break; }\n\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) { break; }\n lineText = getLine(state, nextLine).trim();\n if (!lineText) { break; }\n if (state.sCount[nextLine] - state.blkIndent >= 4) { break; }\n columns = escapedSplit(lineText);\n if (columns.length && columns[0] === '') columns.shift();\n if (columns.length && columns[columns.length - 1] === '') columns.pop();\n\n if (nextLine === startLine + 2) {\n token = state.push('tbody_open', 'tbody', 1);\n token.map = tbodyLines = [ startLine + 2, 0 ];\n }\n\n token = state.push('tr_open', 'tr', 1);\n token.map = [ nextLine, nextLine + 1 ];\n\n for (i = 0; i < columnCount; i++) {\n token = state.push('td_open', 'td', 1);\n if (aligns[i]) {\n token.attrs = [ [ 'style', 'text-align:' + aligns[i] ] ];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i] ? columns[i].trim() : '';\n token.children = [];\n\n token = state.push('td_close', 'td', -1);\n }\n token = state.push('tr_close', 'tr', -1);\n }\n\n if (tbodyLines) {\n token = state.push('tbody_close', 'tbody', -1);\n tbodyLines[1] = nextLine;\n }\n\n token = state.push('table_close', 'table', -1);\n tableLines[1] = nextLine;\n\n state.parentType = oldParentType;\n state.line = nextLine;\n return true;\n};\n","'use strict';\n\n\nmodule.exports = function block(state) {\n var token;\n\n if (state.inlineMode) {\n token = new state.Token('inline', '', 0);\n token.content = state.src;\n token.map = [ 0, 1 ];\n token.children = [];\n state.tokens.push(token);\n } else {\n state.md.block.parse(state.src, state.md, state.env, state.tokens);\n }\n};\n","'use strict';\n\nmodule.exports = function inline(state) {\n var tokens = state.tokens, tok, i, l;\n\n // Parse inlines\n for (i = 0, l = tokens.length; i < l; i++) {\n tok = tokens[i];\n if (tok.type === 'inline') {\n state.md.inline.parse(tok.content, state.md, state.env, tok.children);\n }\n }\n};\n","// Replace link-like texts with link nodes.\n//\n// Currently restricted by `md.validateLink()` to http/https/ftp\n//\n'use strict';\n\n\nvar arrayReplaceAt = require('../common/utils').arrayReplaceAt;\n\n\nfunction isLinkOpen(str) {\n return /^\\s]/i.test(str);\n}\nfunction isLinkClose(str) {\n return /^<\\/a\\s*>/i.test(str);\n}\n\n\nmodule.exports = function linkify(state) {\n var i, j, l, tokens, token, currentToken, nodes, ln, text, pos, lastPos,\n level, htmlLinkLevel, url, fullUrl, urlText,\n blockTokens = state.tokens,\n links;\n\n if (!state.md.options.linkify) { return; }\n\n for (j = 0, l = blockTokens.length; j < l; j++) {\n if (blockTokens[j].type !== 'inline' ||\n !state.md.linkify.pretest(blockTokens[j].content)) {\n continue;\n }\n\n tokens = blockTokens[j].children;\n\n htmlLinkLevel = 0;\n\n // We scan from the end, to keep position when new tags added.\n // Use reversed logic in links start/end match\n for (i = tokens.length - 1; i >= 0; i--) {\n currentToken = tokens[i];\n\n // Skip content of markdown links\n if (currentToken.type === 'link_close') {\n i--;\n while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {\n i--;\n }\n continue;\n }\n\n // Skip content of html tag links\n if (currentToken.type === 'html_inline') {\n if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {\n htmlLinkLevel--;\n }\n if (isLinkClose(currentToken.content)) {\n htmlLinkLevel++;\n }\n }\n if (htmlLinkLevel > 0) { continue; }\n\n if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {\n\n text = currentToken.content;\n links = state.md.linkify.match(text);\n\n // Now split string to nodes\n nodes = [];\n level = currentToken.level;\n lastPos = 0;\n\n // forbid escape sequence at the start of the string,\n // this avoids http\\://example.com/ from being linkified as\n // http://example.com/\n if (links.length > 0 &&\n links[0].index === 0 &&\n i > 0 &&\n tokens[i - 1].type === 'text_special') {\n links = links.slice(1);\n }\n\n for (ln = 0; ln < links.length; ln++) {\n url = links[ln].url;\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) { continue; }\n\n urlText = links[ln].text;\n\n // Linkifier might send raw hostnames like \"example.com\", where url\n // starts with domain name. So we prepend http:// in those cases,\n // and remove it afterwards.\n //\n if (!links[ln].schema) {\n urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\\/\\//, '');\n } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {\n urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');\n } else {\n urlText = state.md.normalizeLinkText(urlText);\n }\n\n pos = links[ln].index;\n\n if (pos > lastPos) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos, pos);\n token.level = level;\n nodes.push(token);\n }\n\n token = new state.Token('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.level = level++;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n\n token = new state.Token('text', '', 0);\n token.content = urlText;\n token.level = level;\n nodes.push(token);\n\n token = new state.Token('link_close', 'a', -1);\n token.level = --level;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n\n lastPos = links[ln].lastIndex;\n }\n if (lastPos < text.length) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos);\n token.level = level;\n nodes.push(token);\n }\n\n // replace current node\n blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);\n }\n }\n }\n};\n","// Normalize input string\n\n'use strict';\n\n\n// https://spec.commonmark.org/0.29/#line-ending\nvar NEWLINES_RE = /\\r\\n?|\\n/g;\nvar NULL_RE = /\\0/g;\n\n\nmodule.exports = function normalize(state) {\n var str;\n\n // Normalize newlines\n str = state.src.replace(NEWLINES_RE, '\\n');\n\n // Replace NULL characters\n str = str.replace(NULL_RE, '\\uFFFD');\n\n state.src = str;\n};\n","// Simple typographic replacements\n//\n// (c) (C) → ©\n// (tm) (TM) → ™\n// (r) (R) → ®\n// +- → ±\n// (p) (P) -> §\n// ... → … (also ?.... → ?.., !.... → !..)\n// ???????? → ???, !!!!! → !!!, `,,` → `,`\n// -- → –, --- → —\n//\n'use strict';\n\n// TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - multiplications 2 x 4 -> 2 × 4\n\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/;\n\n// Workaround for phantomjs - need regex without /g flag,\n// or root check will fail every second time\nvar SCOPED_ABBR_TEST_RE = /\\((c|tm|r)\\)/i;\n\nvar SCOPED_ABBR_RE = /\\((c|tm|r)\\)/ig;\nvar SCOPED_ABBR = {\n c: '©',\n r: '®',\n tm: '™'\n};\n\nfunction replaceFn(match, name) {\n return SCOPED_ABBR[name.toLowerCase()];\n}\n\nfunction replace_scoped(inlineTokens) {\n var i, token, inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\nfunction replace_rare(inlineTokens) {\n var i, token, inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n if (RARE_RE.test(token.content)) {\n token.content = token.content\n .replace(/\\+-/g, '±')\n // .., ..., ....... -> …\n // but ?..... & !..... -> ?.. & !..\n .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..')\n .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')\n // em-dash\n .replace(/(^|[^-])---(?=[^-]|$)/mg, '$1\\u2014')\n // en-dash\n .replace(/(^|\\s)--(?=\\s|$)/mg, '$1\\u2013')\n .replace(/(^|[^-\\s])--(?=[^-\\s]|$)/mg, '$1\\u2013');\n }\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\n\nmodule.exports = function replace(state) {\n var blkIdx;\n\n if (!state.md.options.typographer) { return; }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n if (state.tokens[blkIdx].type !== 'inline') { continue; }\n\n if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {\n replace_scoped(state.tokens[blkIdx].children);\n }\n\n if (RARE_RE.test(state.tokens[blkIdx].content)) {\n replace_rare(state.tokens[blkIdx].children);\n }\n\n }\n};\n","// Convert straight quotation marks to typographic ones\n//\n'use strict';\n\n\nvar isWhiteSpace = require('../common/utils').isWhiteSpace;\nvar isPunctChar = require('../common/utils').isPunctChar;\nvar isMdAsciiPunct = require('../common/utils').isMdAsciiPunct;\n\nvar QUOTE_TEST_RE = /['\"]/;\nvar QUOTE_RE = /['\"]/g;\nvar APOSTROPHE = '\\u2019'; /* ’ */\n\n\nfunction replaceAt(str, index, ch) {\n return str.slice(0, index) + ch + str.slice(index + 1);\n}\n\nfunction process_inlines(tokens, state) {\n var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar,\n isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace,\n canOpen, canClose, j, isSingle, stack, openQuote, closeQuote;\n\n stack = [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n\n thisLevel = tokens[i].level;\n\n for (j = stack.length - 1; j >= 0; j--) {\n if (stack[j].level <= thisLevel) { break; }\n }\n stack.length = j + 1;\n\n if (token.type !== 'text') { continue; }\n\n text = token.content;\n pos = 0;\n max = text.length;\n\n /*eslint no-labels:0,block-scoped-var:0*/\n OUTER:\n while (pos < max) {\n QUOTE_RE.lastIndex = pos;\n t = QUOTE_RE.exec(text);\n if (!t) { break; }\n\n canOpen = canClose = true;\n pos = t.index + 1;\n isSingle = (t[0] === \"'\");\n\n // Find previous character,\n // default to space if it's the beginning of the line\n //\n lastChar = 0x20;\n\n if (t.index - 1 >= 0) {\n lastChar = text.charCodeAt(t.index - 1);\n } else {\n for (j = i - 1; j >= 0; j--) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20\n if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);\n break;\n }\n }\n\n // Find next character,\n // default to space if it's the end of the line\n //\n nextChar = 0x20;\n\n if (pos < max) {\n nextChar = text.charCodeAt(pos);\n } else {\n for (j = i + 1; j < tokens.length; j++) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20\n if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n nextChar = tokens[j].content.charCodeAt(0);\n break;\n }\n }\n\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n canOpen = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n canOpen = false;\n }\n }\n\n if (isLastWhiteSpace) {\n canClose = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n canClose = false;\n }\n }\n\n if (nextChar === 0x22 /* \" */ && t[0] === '\"') {\n if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {\n // special case: 1\"\" - count first quote as an inch\n canClose = canOpen = false;\n }\n }\n\n if (canOpen && canClose) {\n // Replace quotes in the middle of punctuation sequence, but not\n // in the middle of the words, i.e.:\n //\n // 1. foo \" bar \" baz - not replaced\n // 2. foo-\"-bar-\"-baz - replaced\n // 3. foo\"bar\"baz - not replaced\n //\n canOpen = isLastPunctChar;\n canClose = isNextPunctChar;\n }\n\n if (!canOpen && !canClose) {\n // middle of word\n if (isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n continue;\n }\n\n if (canClose) {\n // this could be a closing quote, rewind the stack to get a match\n for (j = stack.length - 1; j >= 0; j--) {\n item = stack[j];\n if (stack[j].level < thisLevel) { break; }\n if (item.single === isSingle && stack[j].level === thisLevel) {\n item = stack[j];\n\n if (isSingle) {\n openQuote = state.md.options.quotes[2];\n closeQuote = state.md.options.quotes[3];\n } else {\n openQuote = state.md.options.quotes[0];\n closeQuote = state.md.options.quotes[1];\n }\n\n // replace token.content *before* tokens[item.token].content,\n // because, if they are pointing at the same token, replaceAt\n // could mess up indices when quote length != 1\n token.content = replaceAt(token.content, t.index, closeQuote);\n tokens[item.token].content = replaceAt(\n tokens[item.token].content, item.pos, openQuote);\n\n pos += closeQuote.length - 1;\n if (item.token === i) { pos += openQuote.length - 1; }\n\n text = token.content;\n max = text.length;\n\n stack.length = j;\n continue OUTER;\n }\n }\n }\n\n if (canOpen) {\n stack.push({\n token: i,\n pos: t.index,\n single: isSingle,\n level: thisLevel\n });\n } else if (canClose && isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n }\n }\n}\n\n\nmodule.exports = function smartquotes(state) {\n /*eslint max-depth:0*/\n var blkIdx;\n\n if (!state.md.options.typographer) { return; }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n if (state.tokens[blkIdx].type !== 'inline' ||\n !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {\n continue;\n }\n\n process_inlines(state.tokens[blkIdx].children, state);\n }\n};\n","// Core state object\n//\n'use strict';\n\nvar Token = require('../token');\n\n\nfunction StateCore(src, md, env) {\n this.src = src;\n this.env = env;\n this.tokens = [];\n this.inlineMode = false;\n this.md = md; // link to parser instance\n}\n\n// re-export Token class to use in core rules\nStateCore.prototype.Token = Token;\n\n\nmodule.exports = StateCore;\n","// Join raw text tokens with the rest of the text\n//\n// This is set as a separate rule to provide an opportunity for plugins\n// to run text replacements after text join, but before escape join.\n//\n// For example, `\\:)` shouldn't be replaced with an emoji.\n//\n'use strict';\n\n\nmodule.exports = function text_join(state) {\n var j, l, tokens, curr, max, last,\n blockTokens = state.tokens;\n\n for (j = 0, l = blockTokens.length; j < l; j++) {\n if (blockTokens[j].type !== 'inline') continue;\n\n tokens = blockTokens[j].children;\n max = tokens.length;\n\n for (curr = 0; curr < max; curr++) {\n if (tokens[curr].type === 'text_special') {\n tokens[curr].type = 'text';\n }\n }\n\n for (curr = last = 0; curr < max; curr++) {\n if (tokens[curr].type === 'text' &&\n curr + 1 < max &&\n tokens[curr + 1].type === 'text') {\n\n // collapse two adjacent text nodes\n tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n } else {\n if (curr !== last) { tokens[last] = tokens[curr]; }\n\n last++;\n }\n }\n\n if (curr !== last) {\n tokens.length = last;\n }\n }\n};\n","// Process autolinks ''\n\n'use strict';\n\n\n/*eslint max-len:0*/\nvar EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/;\nvar AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.\\-]{1,31}):([^<>\\x00-\\x20]*)$/;\n\n\nmodule.exports = function autolink(state, silent) {\n var url, fullUrl, token, ch, start, max,\n pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n start = state.pos;\n max = state.posMax;\n\n for (;;) {\n if (++pos >= max) return false;\n\n ch = state.src.charCodeAt(pos);\n\n if (ch === 0x3C /* < */) return false;\n if (ch === 0x3E /* > */) break;\n }\n\n url = state.src.slice(start + 1, pos);\n\n if (AUTOLINK_RE.test(url)) {\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) { return false; }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'autolink';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += url.length + 2;\n return true;\n }\n\n if (EMAIL_RE.test(url)) {\n fullUrl = state.md.normalizeLink('mailto:' + url);\n if (!state.md.validateLink(fullUrl)) { return false; }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'autolink';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += url.length + 2;\n return true;\n }\n\n return false;\n};\n","// Parse backticks\n\n'use strict';\n\n\nmodule.exports = function backtick(state, silent) {\n var start, max, marker, token, matchStart, matchEnd, openerLength, closerLength,\n pos = state.pos,\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x60/* ` */) { return false; }\n\n start = pos;\n pos++;\n max = state.posMax;\n\n // scan marker length\n while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; }\n\n marker = state.src.slice(start, pos);\n openerLength = marker.length;\n\n if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {\n if (!silent) state.pending += marker;\n state.pos += openerLength;\n return true;\n }\n\n matchStart = matchEnd = pos;\n\n // Nothing found in the cache, scan until the end of the line (or until marker is found)\n while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {\n matchEnd = matchStart + 1;\n\n // scan marker length\n while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++; }\n\n closerLength = matchEnd - matchStart;\n\n if (closerLength === openerLength) {\n // Found matching closer length.\n if (!silent) {\n token = state.push('code_inline', 'code', 0);\n token.markup = marker;\n token.content = state.src.slice(pos, matchStart)\n .replace(/\\n/g, ' ')\n .replace(/^ (.+) $/, '$1');\n }\n state.pos = matchEnd;\n return true;\n }\n\n // Some different length found, put it in cache as upper limit of where closer can be found\n state.backticks[closerLength] = matchStart;\n }\n\n // Scanned through the end, didn't find anything\n state.backticksScanned = true;\n\n if (!silent) state.pending += marker;\n state.pos += openerLength;\n return true;\n};\n","// For each opening emphasis-like marker find a matching closing one\n//\n'use strict';\n\n\nfunction processDelimiters(state, delimiters) {\n var closerIdx, openerIdx, closer, opener, minOpenerIdx, newMinOpenerIdx,\n isOddMatch, lastJump,\n openersBottom = {},\n max = delimiters.length;\n\n if (!max) return;\n\n // headerIdx is the first delimiter of the current (where closer is) delimiter run\n var headerIdx = 0;\n var lastTokenIdx = -2; // needs any value lower than -1\n var jumps = [];\n\n for (closerIdx = 0; closerIdx < max; closerIdx++) {\n closer = delimiters[closerIdx];\n\n jumps.push(0);\n\n // markers belong to same delimiter run if:\n // - they have adjacent tokens\n // - AND markers are the same\n //\n if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) {\n headerIdx = closerIdx;\n }\n\n lastTokenIdx = closer.token;\n\n // Length is only used for emphasis-specific \"rule of 3\",\n // if it's not defined (in strikethrough or 3rd party plugins),\n // we can default it to 0 to disable those checks.\n //\n closer.length = closer.length || 0;\n\n if (!closer.close) continue;\n\n // Previously calculated lower bounds (previous fails)\n // for each marker, each delimiter length modulo 3,\n // and for whether this closer can be an opener;\n // https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460\n if (!openersBottom.hasOwnProperty(closer.marker)) {\n openersBottom[closer.marker] = [ -1, -1, -1, -1, -1, -1 ];\n }\n\n minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length % 3)];\n\n openerIdx = headerIdx - jumps[headerIdx] - 1;\n\n newMinOpenerIdx = openerIdx;\n\n for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) {\n opener = delimiters[openerIdx];\n\n if (opener.marker !== closer.marker) continue;\n\n if (opener.open && opener.end < 0) {\n\n isOddMatch = false;\n\n // from spec:\n //\n // If one of the delimiters can both open and close emphasis, then the\n // sum of the lengths of the delimiter runs containing the opening and\n // closing delimiters must not be a multiple of 3 unless both lengths\n // are multiples of 3.\n //\n if (opener.close || closer.open) {\n if ((opener.length + closer.length) % 3 === 0) {\n if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {\n isOddMatch = true;\n }\n }\n }\n\n if (!isOddMatch) {\n // If previous delimiter cannot be an opener, we can safely skip\n // the entire sequence in future checks. This is required to make\n // sure algorithm has linear complexity (see *_*_*_*_*_... case).\n //\n lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ?\n jumps[openerIdx - 1] + 1 :\n 0;\n\n jumps[closerIdx] = closerIdx - openerIdx + lastJump;\n jumps[openerIdx] = lastJump;\n\n closer.open = false;\n opener.end = closerIdx;\n opener.close = false;\n newMinOpenerIdx = -1;\n // treat next token as start of run,\n // it optimizes skips in **<...>**a**<...>** pathological case\n lastTokenIdx = -2;\n break;\n }\n }\n }\n\n if (newMinOpenerIdx !== -1) {\n // If match for this delimiter run failed, we want to set lower bound for\n // future lookups. This is required to make sure algorithm has linear\n // complexity.\n //\n // See details here:\n // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442\n //\n openersBottom[closer.marker][(closer.open ? 3 : 0) + ((closer.length || 0) % 3)] = newMinOpenerIdx;\n }\n }\n}\n\n\nmodule.exports = function link_pairs(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n processDelimiters(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n processDelimiters(state, tokens_meta[curr].delimiters);\n }\n }\n};\n","// Process *this* and _that_\n//\n'use strict';\n\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nmodule.exports.tokenize = function emphasis(state, silent) {\n var i, scanned, token,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) { return false; }\n\n if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { return false; }\n\n scanned = state.scanDelims(state.pos, marker === 0x2A);\n\n for (i = 0; i < scanned.length; i++) {\n token = state.push('text', '', 0);\n token.content = String.fromCharCode(marker);\n\n state.delimiters.push({\n // Char code of the starting marker (number).\n //\n marker: marker,\n\n // Total length of these series of delimiters.\n //\n length: scanned.length,\n\n // A position of the token this delimiter corresponds to.\n //\n token: state.tokens.length - 1,\n\n // If this delimiter is matched as a valid opener, `end` will be\n // equal to its position, otherwise it's `-1`.\n //\n end: -1,\n\n // Boolean flags that determine if this delimiter could open or close\n // an emphasis.\n //\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n\n return true;\n};\n\n\nfunction postProcess(state, delimiters) {\n var i,\n startDelim,\n endDelim,\n token,\n ch,\n isStrong,\n max = delimiters.length;\n\n for (i = max - 1; i >= 0; i--) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {\n continue;\n }\n\n // Process only opening markers\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end];\n\n // If the previous delimiter has the same marker and is adjacent to this one,\n // merge those into one strong delimiter.\n //\n // `whatever` -> `whatever`\n //\n isStrong = i > 0 &&\n delimiters[i - 1].end === startDelim.end + 1 &&\n // check that first two markers match and adjacent\n delimiters[i - 1].marker === startDelim.marker &&\n delimiters[i - 1].token === startDelim.token - 1 &&\n // check that last two markers are adjacent (we can safely assume they match)\n delimiters[startDelim.end + 1].token === endDelim.token + 1;\n\n ch = String.fromCharCode(startDelim.marker);\n\n token = state.tokens[startDelim.token];\n token.type = isStrong ? 'strong_open' : 'em_open';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = 1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n\n token = state.tokens[endDelim.token];\n token.type = isStrong ? 'strong_close' : 'em_close';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = -1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n\n if (isStrong) {\n state.tokens[delimiters[i - 1].token].content = '';\n state.tokens[delimiters[startDelim.end + 1].token].content = '';\n i--;\n }\n }\n}\n\n\n// Walk through delimiter list and replace text tokens with tags\n//\nmodule.exports.postProcess = function emphasis(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n","// Process html entity - {, ¯, ", ...\n\n'use strict';\n\nvar entities = require('../common/entities');\nvar has = require('../common/utils').has;\nvar isValidEntityCode = require('../common/utils').isValidEntityCode;\nvar fromCodePoint = require('../common/utils').fromCodePoint;\n\n\nvar DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;\nvar NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;\n\n\nmodule.exports = function entity(state, silent) {\n var ch, code, match, token, pos = state.pos, max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x26/* & */) return false;\n\n if (pos + 1 >= max) return false;\n\n ch = state.src.charCodeAt(pos + 1);\n\n if (ch === 0x23 /* # */) {\n match = state.src.slice(pos).match(DIGITAL_RE);\n if (match) {\n if (!silent) {\n code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);\n\n token = state.push('text_special', '', 0);\n token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);\n token.markup = match[0];\n token.info = 'entity';\n }\n state.pos += match[0].length;\n return true;\n }\n } else {\n match = state.src.slice(pos).match(NAMED_RE);\n if (match) {\n if (has(entities, match[1])) {\n if (!silent) {\n token = state.push('text_special', '', 0);\n token.content = entities[match[1]];\n token.markup = match[0];\n token.info = 'entity';\n }\n state.pos += match[0].length;\n return true;\n }\n }\n }\n\n return false;\n};\n","// Process escaped chars and hardbreaks\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\nvar ESCAPED = [];\n\nfor (var i = 0; i < 256; i++) { ESCAPED.push(0); }\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'\n .split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1; });\n\n\nmodule.exports = function escape(state, silent) {\n var ch1, ch2, origStr, escapedStr, token, pos = state.pos, max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x5C/* \\ */) return false;\n pos++;\n\n // '\\' at the end of the inline block\n if (pos >= max) return false;\n\n ch1 = state.src.charCodeAt(pos);\n\n if (ch1 === 0x0A) {\n if (!silent) {\n state.push('hardbreak', 'br', 0);\n }\n\n pos++;\n // skip leading whitespaces from next line\n while (pos < max) {\n ch1 = state.src.charCodeAt(pos);\n if (!isSpace(ch1)) break;\n pos++;\n }\n\n state.pos = pos;\n return true;\n }\n\n escapedStr = state.src[pos];\n\n if (ch1 >= 0xD800 && ch1 <= 0xDBFF && pos + 1 < max) {\n ch2 = state.src.charCodeAt(pos + 1);\n\n if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {\n escapedStr += state.src[pos + 1];\n pos++;\n }\n }\n\n origStr = '\\\\' + escapedStr;\n\n if (!silent) {\n token = state.push('text_special', '', 0);\n\n if (ch1 < 256 && ESCAPED[ch1] !== 0) {\n token.content = escapedStr;\n } else {\n token.content = origStr;\n }\n\n token.markup = origStr;\n token.info = 'escape';\n }\n\n state.pos = pos + 1;\n return true;\n};\n","// Clean up tokens after emphasis and strikethrough postprocessing:\n// merge adjacent text nodes into one and re-calculate all token levels\n//\n// This is necessary because initially emphasis delimiter markers (*, _, ~)\n// are treated as their own separate text tokens. Then emphasis rule either\n// leaves them as text (needed to merge with adjacent text) or turns them\n// into opening/closing tags (which messes up levels inside).\n//\n'use strict';\n\n\nmodule.exports = function fragments_join(state) {\n var curr, last,\n level = 0,\n tokens = state.tokens,\n max = state.tokens.length;\n\n for (curr = last = 0; curr < max; curr++) {\n // re-calculate levels after emphasis/strikethrough turns some text nodes\n // into opening/closing tags\n if (tokens[curr].nesting < 0) level--; // closing tag\n tokens[curr].level = level;\n if (tokens[curr].nesting > 0) level++; // opening tag\n\n if (tokens[curr].type === 'text' &&\n curr + 1 < max &&\n tokens[curr + 1].type === 'text') {\n\n // collapse two adjacent text nodes\n tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n } else {\n if (curr !== last) { tokens[last] = tokens[curr]; }\n\n last++;\n }\n }\n\n if (curr !== last) {\n tokens.length = last;\n }\n};\n","// Process html tags\n\n'use strict';\n\n\nvar HTML_TAG_RE = require('../common/html_re').HTML_TAG_RE;\n\n\nfunction isLinkOpen(str) {\n return /^\\s]/i.test(str);\n}\nfunction isLinkClose(str) {\n return /^<\\/a\\s*>/i.test(str);\n}\n\n\nfunction isLetter(ch) {\n /*eslint no-bitwise:0*/\n var lc = ch | 0x20; // to lower case\n return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);\n}\n\n\nmodule.exports = function html_inline(state, silent) {\n var ch, match, max, token,\n pos = state.pos;\n\n if (!state.md.options.html) { return false; }\n\n // Check start\n max = state.posMax;\n if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||\n pos + 2 >= max) {\n return false;\n }\n\n // Quick fail on second char\n ch = state.src.charCodeAt(pos + 1);\n if (ch !== 0x21/* ! */ &&\n ch !== 0x3F/* ? */ &&\n ch !== 0x2F/* / */ &&\n !isLetter(ch)) {\n return false;\n }\n\n match = state.src.slice(pos).match(HTML_TAG_RE);\n if (!match) { return false; }\n\n if (!silent) {\n token = state.push('html_inline', '', 0);\n token.content = state.src.slice(pos, pos + match[0].length);\n\n if (isLinkOpen(token.content)) state.linkLevel++;\n if (isLinkClose(token.content)) state.linkLevel--;\n }\n state.pos += match[0].length;\n return true;\n};\n","// Process ![image]( \"title\")\n\n'use strict';\n\nvar normalizeReference = require('../common/utils').normalizeReference;\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function image(state, silent) {\n var attrs,\n code,\n content,\n label,\n labelEnd,\n labelStart,\n pos,\n ref,\n res,\n title,\n token,\n tokens,\n start,\n href = '',\n oldPos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(state.pos) !== 0x21/* ! */) { return false; }\n if (state.src.charCodeAt(state.pos + 1) !== 0x5B/* [ */) { return false; }\n\n labelStart = state.pos + 2;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) { return false; }\n\n pos = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n //\n // Inline link\n //\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n pos++;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n if (pos >= max) { return false; }\n\n // [link]( \"title\" )\n // ^^^^^^ parsing link destination\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n }\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n start = pos;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n\n // [link]( \"title\" )\n // ^^^^^^^ parsing link title\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n } else {\n title = '';\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n state.pos = oldPos;\n return false;\n }\n pos++;\n } else {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') { return false; }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n }\n\n // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n if (!label) { label = state.src.slice(labelStart, labelEnd); }\n\n ref = state.env.references[normalizeReference(label)];\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href = ref.href;\n title = ref.title;\n }\n\n //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n if (!silent) {\n content = state.src.slice(labelStart, labelEnd);\n\n state.md.inline.parse(\n content,\n state.md,\n state.env,\n tokens = []\n );\n\n token = state.push('image', 'img', 0);\n token.attrs = attrs = [ [ 'src', href ], [ 'alt', '' ] ];\n token.children = tokens;\n token.content = content;\n\n if (title) {\n attrs.push([ 'title', title ]);\n }\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n","// Process [link]( \"stuff\")\n\n'use strict';\n\nvar normalizeReference = require('../common/utils').normalizeReference;\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function link(state, silent) {\n var attrs,\n code,\n label,\n labelEnd,\n labelStart,\n pos,\n res,\n ref,\n token,\n href = '',\n title = '',\n oldPos = state.pos,\n max = state.posMax,\n start = state.pos,\n parseReference = true;\n\n if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false; }\n\n labelStart = state.pos + 1;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) { return false; }\n\n pos = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n //\n // Inline link\n //\n\n // might have found a valid shortcut link, disable reference parsing\n parseReference = false;\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n pos++;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n if (pos >= max) { return false; }\n\n // [link]( \"title\" )\n // ^^^^^^ parsing link destination\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n start = pos;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n\n // [link]( \"title\" )\n // ^^^^^^^ parsing link title\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (!isSpace(code) && code !== 0x0A) { break; }\n }\n }\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n // parsing a valid shortcut link failed, fallback to reference\n parseReference = true;\n }\n pos++;\n }\n\n if (parseReference) {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') { return false; }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n }\n\n // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n if (!label) { label = state.src.slice(labelStart, labelEnd); }\n\n ref = state.env.references[normalizeReference(label)];\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href = ref.href;\n title = ref.title;\n }\n\n //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n if (!silent) {\n state.pos = labelStart;\n state.posMax = labelEnd;\n\n token = state.push('link_open', 'a', 1);\n token.attrs = attrs = [ [ 'href', href ] ];\n if (title) {\n attrs.push([ 'title', title ]);\n }\n\n state.linkLevel++;\n state.md.inline.tokenize(state);\n state.linkLevel--;\n\n token = state.push('link_close', 'a', -1);\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n","// Process links like https://example.org/\n\n'use strict';\n\n\n// RFC3986: scheme = ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\nvar SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;\n\n\nmodule.exports = function linkify(state, silent) {\n var pos, max, match, proto, link, url, fullUrl, token;\n\n if (!state.md.options.linkify) return false;\n if (state.linkLevel > 0) return false;\n\n pos = state.pos;\n max = state.posMax;\n\n if (pos + 3 > max) return false;\n if (state.src.charCodeAt(pos) !== 0x3A/* : */) return false;\n if (state.src.charCodeAt(pos + 1) !== 0x2F/* / */) return false;\n if (state.src.charCodeAt(pos + 2) !== 0x2F/* / */) return false;\n\n match = state.pending.match(SCHEME_RE);\n if (!match) return false;\n\n proto = match[1];\n\n link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length));\n if (!link) return false;\n\n url = link.url;\n\n // disallow '*' at the end of the link (conflicts with emphasis)\n url = url.replace(/\\*+$/, '');\n\n fullUrl = state.md.normalizeLink(url);\n if (!state.md.validateLink(fullUrl)) return false;\n\n if (!silent) {\n state.pending = state.pending.slice(0, -proto.length);\n\n token = state.push('link_open', 'a', 1);\n token.attrs = [ [ 'href', fullUrl ] ];\n token.markup = 'linkify';\n token.info = 'auto';\n\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n\n token = state.push('link_close', 'a', -1);\n token.markup = 'linkify';\n token.info = 'auto';\n }\n\n state.pos += url.length - proto.length;\n return true;\n};\n","// Proceess '\\n'\n\n'use strict';\n\nvar isSpace = require('../common/utils').isSpace;\n\n\nmodule.exports = function newline(state, silent) {\n var pmax, max, ws, pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x0A/* \\n */) { return false; }\n\n pmax = state.pending.length - 1;\n max = state.posMax;\n\n // ' \\n' -> hardbreak\n // Lookup in pending chars is bad practice! Don't copy to other rules!\n // Pending string is stored in concat mode, indexed lookups will cause\n // convertion to flat mode.\n if (!silent) {\n if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n // Find whitespaces tail of pending chars.\n ws = pmax - 1;\n while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 0x20) ws--;\n\n state.pending = state.pending.slice(0, ws);\n state.push('hardbreak', 'br', 0);\n } else {\n state.pending = state.pending.slice(0, -1);\n state.push('softbreak', 'br', 0);\n }\n\n } else {\n state.push('softbreak', 'br', 0);\n }\n }\n\n pos++;\n\n // skip heading spaces for next line\n while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }\n\n state.pos = pos;\n return true;\n};\n","// Inline parser state\n\n'use strict';\n\n\nvar Token = require('../token');\nvar isWhiteSpace = require('../common/utils').isWhiteSpace;\nvar isPunctChar = require('../common/utils').isPunctChar;\nvar isMdAsciiPunct = require('../common/utils').isMdAsciiPunct;\n\n\nfunction StateInline(src, md, env, outTokens) {\n this.src = src;\n this.env = env;\n this.md = md;\n this.tokens = outTokens;\n this.tokens_meta = Array(outTokens.length);\n\n this.pos = 0;\n this.posMax = this.src.length;\n this.level = 0;\n this.pending = '';\n this.pendingLevel = 0;\n\n // Stores { start: end } pairs. Useful for backtrack\n // optimization of pairs parse (emphasis, strikes).\n this.cache = {};\n\n // List of emphasis-like delimiters for current tag\n this.delimiters = [];\n\n // Stack of delimiter lists for upper level tags\n this._prev_delimiters = [];\n\n // backtick length => last seen position\n this.backticks = {};\n this.backticksScanned = false;\n\n // Counter used to disable inline linkify-it execution\n // inside and markdown links\n this.linkLevel = 0;\n}\n\n\n// Flush pending text\n//\nStateInline.prototype.pushPending = function () {\n var token = new Token('text', '', 0);\n token.content = this.pending;\n token.level = this.pendingLevel;\n this.tokens.push(token);\n this.pending = '';\n return token;\n};\n\n\n// Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\nStateInline.prototype.push = function (type, tag, nesting) {\n if (this.pending) {\n this.pushPending();\n }\n\n var token = new Token(type, tag, nesting);\n var token_meta = null;\n\n if (nesting < 0) {\n // closing tag\n this.level--;\n this.delimiters = this._prev_delimiters.pop();\n }\n\n token.level = this.level;\n\n if (nesting > 0) {\n // opening tag\n this.level++;\n this._prev_delimiters.push(this.delimiters);\n this.delimiters = [];\n token_meta = { delimiters: this.delimiters };\n }\n\n this.pendingLevel = this.level;\n this.tokens.push(token);\n this.tokens_meta.push(token_meta);\n return token;\n};\n\n\n// Scan a sequence of emphasis-like markers, and determine whether\n// it can start an emphasis sequence or end an emphasis sequence.\n//\n// - start - position to scan from (it should point at a valid marker);\n// - canSplitWord - determine if these markers can be found inside a word\n//\nStateInline.prototype.scanDelims = function (start, canSplitWord) {\n var pos = start, lastChar, nextChar, count, can_open, can_close,\n isLastWhiteSpace, isLastPunctChar,\n isNextWhiteSpace, isNextPunctChar,\n left_flanking = true,\n right_flanking = true,\n max = this.posMax,\n marker = this.src.charCodeAt(start);\n\n // treat beginning of the line as a whitespace\n lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;\n\n while (pos < max && this.src.charCodeAt(pos) === marker) { pos++; }\n\n count = pos - start;\n\n // treat end of the line as a whitespace\n nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;\n\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n left_flanking = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n left_flanking = false;\n }\n }\n\n if (isLastWhiteSpace) {\n right_flanking = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n right_flanking = false;\n }\n }\n\n if (!canSplitWord) {\n can_open = left_flanking && (!right_flanking || isLastPunctChar);\n can_close = right_flanking && (!left_flanking || isNextPunctChar);\n } else {\n can_open = left_flanking;\n can_close = right_flanking;\n }\n\n return {\n can_open: can_open,\n can_close: can_close,\n length: count\n };\n};\n\n\n// re-export Token class to use in block rules\nStateInline.prototype.Token = Token;\n\n\nmodule.exports = StateInline;\n","// ~~strike through~~\n//\n'use strict';\n\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nmodule.exports.tokenize = function strikethrough(state, silent) {\n var i, scanned, token, len, ch,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) { return false; }\n\n if (marker !== 0x7E/* ~ */) { return false; }\n\n scanned = state.scanDelims(state.pos, true);\n len = scanned.length;\n ch = String.fromCharCode(marker);\n\n if (len < 2) { return false; }\n\n if (len % 2) {\n token = state.push('text', '', 0);\n token.content = ch;\n len--;\n }\n\n for (i = 0; i < len; i += 2) {\n token = state.push('text', '', 0);\n token.content = ch + ch;\n\n state.delimiters.push({\n marker: marker,\n length: 0, // disable \"rule of 3\" length checks meant for emphasis\n token: state.tokens.length - 1,\n end: -1,\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n\n return true;\n};\n\n\nfunction postProcess(state, delimiters) {\n var i, j,\n startDelim,\n endDelim,\n token,\n loneMarkers = [],\n max = delimiters.length;\n\n for (i = 0; i < max; i++) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x7E/* ~ */) {\n continue;\n }\n\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end];\n\n token = state.tokens[startDelim.token];\n token.type = 's_open';\n token.tag = 's';\n token.nesting = 1;\n token.markup = '~~';\n token.content = '';\n\n token = state.tokens[endDelim.token];\n token.type = 's_close';\n token.tag = 's';\n token.nesting = -1;\n token.markup = '~~';\n token.content = '';\n\n if (state.tokens[endDelim.token - 1].type === 'text' &&\n state.tokens[endDelim.token - 1].content === '~') {\n\n loneMarkers.push(endDelim.token - 1);\n }\n }\n\n // If a marker sequence has an odd number of characters, it's splitted\n // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the\n // start of the sequence.\n //\n // So, we have to move all those markers after subsequent s_close tags.\n //\n while (loneMarkers.length) {\n i = loneMarkers.pop();\n j = i + 1;\n\n while (j < state.tokens.length && state.tokens[j].type === 's_close') {\n j++;\n }\n\n j--;\n\n if (i !== j) {\n token = state.tokens[j];\n state.tokens[j] = state.tokens[i];\n state.tokens[i] = token;\n }\n }\n}\n\n\n// Walk through delimiter list and replace text tokens with tags\n//\nmodule.exports.postProcess = function strikethrough(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n","// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n\n'use strict';\n\n\n// Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n\n// !!!! Don't confuse with \"Markdown ASCII Punctuation\" chars\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\nfunction isTerminatorChar(ch) {\n switch (ch) {\n case 0x0A/* \\n */:\n case 0x21/* ! */:\n case 0x23/* # */:\n case 0x24/* $ */:\n case 0x25/* % */:\n case 0x26/* & */:\n case 0x2A/* * */:\n case 0x2B/* + */:\n case 0x2D/* - */:\n case 0x3A/* : */:\n case 0x3C/* < */:\n case 0x3D/* = */:\n case 0x3E/* > */:\n case 0x40/* @ */:\n case 0x5B/* [ */:\n case 0x5C/* \\ */:\n case 0x5D/* ] */:\n case 0x5E/* ^ */:\n case 0x5F/* _ */:\n case 0x60/* ` */:\n case 0x7B/* { */:\n case 0x7D/* } */:\n case 0x7E/* ~ */:\n return true;\n default:\n return false;\n }\n}\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos;\n\n while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n pos++;\n }\n\n if (pos === state.pos) { return false; }\n\n if (!silent) { state.pending += state.src.slice(state.pos, pos); }\n\n state.pos = pos;\n\n return true;\n};\n\n// Alternative implementation, for memory.\n//\n// It costs 10% of performance, but allows extend terminators list, if place it\n// to `ParcerInline` property. Probably, will switch to it sometime, such\n// flexibility required.\n\n/*\nvar TERMINATOR_RE = /[\\n!#$%&*+\\-:<=>@[\\\\\\]^_`{}~]/;\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos,\n idx = state.src.slice(pos).search(TERMINATOR_RE);\n\n // first char is terminator -> empty text\n if (idx === 0) { return false; }\n\n // no terminator -> text till end of string\n if (idx < 0) {\n if (!silent) { state.pending += state.src.slice(pos); }\n state.pos = state.src.length;\n return true;\n }\n\n if (!silent) { state.pending += state.src.slice(pos, pos + idx); }\n\n state.pos += idx;\n\n return true;\n};*/\n","// Token class\n\n'use strict';\n\n\n/**\n * class Token\n **/\n\n/**\n * new Token(type, tag, nesting)\n *\n * Create new token and fill passed properties.\n **/\nfunction Token(type, tag, nesting) {\n /**\n * Token#type -> String\n *\n * Type of the token (string, e.g. \"paragraph_open\")\n **/\n this.type = type;\n\n /**\n * Token#tag -> String\n *\n * html tag name, e.g. \"p\"\n **/\n this.tag = tag;\n\n /**\n * Token#attrs -> Array\n *\n * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`\n **/\n this.attrs = null;\n\n /**\n * Token#map -> Array\n *\n * Source map info. Format: `[ line_begin, line_end ]`\n **/\n this.map = null;\n\n /**\n * Token#nesting -> Number\n *\n * Level change (number in {-1, 0, 1} set), where:\n *\n * - `1` means the tag is opening\n * - `0` means the tag is self-closing\n * - `-1` means the tag is closing\n **/\n this.nesting = nesting;\n\n /**\n * Token#level -> Number\n *\n * nesting level, the same as `state.level`\n **/\n this.level = 0;\n\n /**\n * Token#children -> Array\n *\n * An array of child nodes (inline and img tokens)\n **/\n this.children = null;\n\n /**\n * Token#content -> String\n *\n * In a case of self-closing tag (code, html, fence, etc.),\n * it has contents of this tag.\n **/\n this.content = '';\n\n /**\n * Token#markup -> String\n *\n * '*' or '_' for emphasis, fence string for fence, etc.\n **/\n this.markup = '';\n\n /**\n * Token#info -> String\n *\n * Additional information:\n *\n * - Info string for \"fence\" tokens\n * - The value \"auto\" for autolink \"link_open\" and \"link_close\" tokens\n * - The string value of the item marker for ordered-list \"list_item_open\" tokens\n **/\n this.info = '';\n\n /**\n * Token#meta -> Object\n *\n * A place for plugins to store an arbitrary data\n **/\n this.meta = null;\n\n /**\n * Token#block -> Boolean\n *\n * True for block-level tokens, false for inline tokens.\n * Used in renderer to calculate line breaks\n **/\n this.block = false;\n\n /**\n * Token#hidden -> Boolean\n *\n * If it's true, ignore this element when rendering. Used for tight lists\n * to hide paragraphs.\n **/\n this.hidden = false;\n}\n\n\n/**\n * Token.attrIndex(name) -> Number\n *\n * Search attribute index by name.\n **/\nToken.prototype.attrIndex = function attrIndex(name) {\n var attrs, i, len;\n\n if (!this.attrs) { return -1; }\n\n attrs = this.attrs;\n\n for (i = 0, len = attrs.length; i < len; i++) {\n if (attrs[i][0] === name) { return i; }\n }\n return -1;\n};\n\n\n/**\n * Token.attrPush(attrData)\n *\n * Add `[ name, value ]` attribute to list. Init attrs if necessary\n **/\nToken.prototype.attrPush = function attrPush(attrData) {\n if (this.attrs) {\n this.attrs.push(attrData);\n } else {\n this.attrs = [ attrData ];\n }\n};\n\n\n/**\n * Token.attrSet(name, value)\n *\n * Set `name` attribute to `value`. Override old value if exists.\n **/\nToken.prototype.attrSet = function attrSet(name, value) {\n var idx = this.attrIndex(name),\n attrData = [ name, value ];\n\n if (idx < 0) {\n this.attrPush(attrData);\n } else {\n this.attrs[idx] = attrData;\n }\n};\n\n\n/**\n * Token.attrGet(name)\n *\n * Get the value of attribute `name`, or null if it does not exist.\n **/\nToken.prototype.attrGet = function attrGet(name) {\n var idx = this.attrIndex(name), value = null;\n if (idx >= 0) {\n value = this.attrs[idx][1];\n }\n return value;\n};\n\n\n/**\n * Token.attrJoin(name, value)\n *\n * Join value to existing attribute via space. Or create new attribute if not\n * exists. Useful to operate with token classes.\n **/\nToken.prototype.attrJoin = function attrJoin(name, value) {\n var idx = this.attrIndex(name);\n\n if (idx < 0) {\n this.attrPush([ name, value ]);\n } else {\n this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;\n }\n};\n\n\nmodule.exports = Token;\n","\n'use strict';\n\n\n/* eslint-disable no-bitwise */\n\nvar decodeCache = {};\n\nfunction getDecodeCache(exclude) {\n var i, ch, cache = decodeCache[exclude];\n if (cache) { return cache; }\n\n cache = decodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n cache.push(ch);\n }\n\n for (i = 0; i < exclude.length; i++) {\n ch = exclude.charCodeAt(i);\n cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);\n }\n\n return cache;\n}\n\n\n// Decode percent-encoded string.\n//\nfunction decode(string, exclude) {\n var cache;\n\n if (typeof exclude !== 'string') {\n exclude = decode.defaultChars;\n }\n\n cache = getDecodeCache(exclude);\n\n return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) {\n var i, l, b1, b2, b3, b4, chr,\n result = '';\n\n for (i = 0, l = seq.length; i < l; i += 3) {\n b1 = parseInt(seq.slice(i + 1, i + 3), 16);\n\n if (b1 < 0x80) {\n result += cache[b1];\n continue;\n }\n\n if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {\n // 110xxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n\n if ((b2 & 0xC0) === 0x80) {\n chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F);\n\n if (chr < 0x80) {\n result += '\\ufffd\\ufffd';\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 3;\n continue;\n }\n }\n\n if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {\n // 1110xxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F);\n\n if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {\n result += '\\ufffd\\ufffd\\ufffd';\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 6;\n continue;\n }\n }\n\n if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {\n // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n b4 = parseInt(seq.slice(i + 10, i + 12), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {\n chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F);\n\n if (chr < 0x10000 || chr > 0x10FFFF) {\n result += '\\ufffd\\ufffd\\ufffd\\ufffd';\n } else {\n chr -= 0x10000;\n result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));\n }\n\n i += 9;\n continue;\n }\n }\n\n result += '\\ufffd';\n }\n\n return result;\n });\n}\n\n\ndecode.defaultChars = ';/?:@&=+$,#';\ndecode.componentChars = '';\n\n\nmodule.exports = decode;\n","\n'use strict';\n\n\nvar encodeCache = {};\n\n\n// Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\nfunction getEncodeCache(exclude) {\n var i, ch, cache = encodeCache[exclude];\n if (cache) { return cache; }\n\n cache = encodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n\n if (/^[0-9a-z]$/i.test(ch)) {\n // always allow unencoded alphanumeric characters\n cache.push(ch);\n } else {\n cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));\n }\n }\n\n for (i = 0; i < exclude.length; i++) {\n cache[exclude.charCodeAt(i)] = exclude[i];\n }\n\n return cache;\n}\n\n\n// Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n// - string - string to encode\n// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)\n// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)\n//\nfunction encode(string, exclude, keepEscaped) {\n var i, l, code, nextCode, cache,\n result = '';\n\n if (typeof exclude !== 'string') {\n // encode(string, keepEscaped)\n keepEscaped = exclude;\n exclude = encode.defaultChars;\n }\n\n if (typeof keepEscaped === 'undefined') {\n keepEscaped = true;\n }\n\n cache = getEncodeCache(exclude);\n\n for (i = 0, l = string.length; i < l; i++) {\n code = string.charCodeAt(i);\n\n if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {\n if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n result += string.slice(i, i + 3);\n i += 2;\n continue;\n }\n }\n\n if (code < 128) {\n result += cache[code];\n continue;\n }\n\n if (code >= 0xD800 && code <= 0xDFFF) {\n if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n nextCode = string.charCodeAt(i + 1);\n if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n result += encodeURIComponent(string[i] + string[i + 1]);\n i++;\n continue;\n }\n }\n result += '%EF%BF%BD';\n continue;\n }\n\n result += encodeURIComponent(string[i]);\n }\n\n return result;\n}\n\nencode.defaultChars = \";/?:@&=+$,-_.!~*'()#\";\nencode.componentChars = \"-_.!~*'()\";\n\n\nmodule.exports = encode;\n","\n'use strict';\n\n\nmodule.exports = function format(url) {\n var result = '';\n\n result += url.protocol || '';\n result += url.slashes ? '//' : '';\n result += url.auth ? url.auth + '@' : '';\n\n if (url.hostname && url.hostname.indexOf(':') !== -1) {\n // ipv6 address\n result += '[' + url.hostname + ']';\n } else {\n result += url.hostname || '';\n }\n\n result += url.port ? ':' + url.port : '';\n result += url.pathname || '';\n result += url.search || '';\n result += url.hash || '';\n\n return result;\n};\n","'use strict';\n\n\nmodule.exports.encode = require('./encode');\nmodule.exports.decode = require('./decode');\nmodule.exports.format = require('./format');\nmodule.exports.parse = require('./parse');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n//\n// Changes from joyent/node:\n//\n// 1. No leading slash in paths,\n// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`\n//\n// 2. Backslashes are not replaced with slashes,\n// so `http:\\\\example.org\\` is treated like a relative path\n//\n// 3. Trailing colon is treated like a part of the path,\n// i.e. in `http://example.org:foo` pathname is `:foo`\n//\n// 4. Nothing is URL-encoded in the resulting object,\n// (in joyent/node some chars in auth and paths are encoded)\n//\n// 5. `url.parse()` does not have `parseQueryString` argument\n//\n// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,\n// which can be constructed using other parts of the url.\n//\n\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.pathname = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = [ '<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t' ],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = [ '{', '}', '|', '\\\\', '^', '`' ].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = [ '\\'' ].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = [ '%', '/', '?', ';', '#' ].concat(autoEscape),\n hostEndingChars = [ '/', '?', '#' ],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n /* eslint-disable no-script-url */\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n };\n /* eslint-enable no-script-url */\n\nfunction urlParse(url, slashesDenoteHost) {\n if (url && url instanceof Url) { return url; }\n\n var u = new Url();\n u.parse(url, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, slashesDenoteHost) {\n var i, l, lowerProto, hec, slashes,\n rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n lowerProto = proto.toLowerCase();\n this.protocol = proto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (i = 0; i < hostEndingChars.length; i++) {\n hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = auth;\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (i = 0; i < nonHostChars.length; i++) {\n hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) {\n hostEnd = rest.length;\n }\n\n if (rest[hostEnd - 1] === ':') { hostEnd--; }\n var host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost(host);\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) { continue; }\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n }\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n }\n }\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n rest = rest.slice(0, qm);\n }\n if (rest) { this.pathname = rest; }\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '';\n }\n\n return this;\n};\n\nUrl.prototype.parseHost = function(host) {\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) { this.hostname = host; }\n};\n\nmodule.exports = urlParse;\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement, attributes) {\n Object.keys(attributes).forEach(function (key) {\n styleElement.setAttribute(key, attributes[key]);\n });\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join(\"\\n\");\n };\n}();\n\n/* istanbul ignore next */\nfunction apply(styleElement, index, remove, obj) {\n var css;\n if (remove) {\n css = \"\";\n } else {\n css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n }\n\n // For old IE\n /* istanbul ignore if */\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = styleElement.childNodes;\n if (childNodes[index]) {\n styleElement.removeChild(childNodes[index]);\n }\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index]);\n } else {\n styleElement.appendChild(cssNode);\n }\n }\n}\nvar singletonData = {\n singleton: null,\n singletonCounter: 0\n};\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") return {\n update: function update() {},\n remove: function remove() {}\n };\n\n // eslint-disable-next-line no-undef,no-use-before-define\n var styleIndex = singletonData.singletonCounter++;\n var styleElement =\n // eslint-disable-next-line no-undef,no-use-before-define\n singletonData.singleton || (\n // eslint-disable-next-line no-undef,no-use-before-define\n singletonData.singleton = options.insertStyleElement(options));\n return {\n update: function update(obj) {\n apply(styleElement, styleIndex, false, obj);\n },\n remove: function remove(obj) {\n apply(styleElement, styleIndex, true, obj);\n }\n };\n}\nmodule.exports = domAPI;","module.exports=/[\\0-\\x1F\\x7F-\\x9F]/","module.exports=/[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/","module.exports=/[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4E\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD803[\\uDF55-\\uDF59]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC8\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDC4B-\\uDC4F\\uDC5B\\uDC5D\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDE60-\\uDE6C\\uDF3C-\\uDF3E]|\\uD806[\\uDC3B\\uDE3F-\\uDE46\\uDE9A-\\uDE9C\\uDE9E-\\uDEA2]|\\uD807[\\uDC41-\\uDC45\\uDC70\\uDC71\\uDEF7\\uDEF8]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD81B[\\uDE97-\\uDE9A]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/","module.exports=/[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/","'use strict';\n\nexports.Any = require('./properties/Any/regex');\nexports.Cc = require('./categories/Cc/regex');\nexports.Cf = require('./categories/Cf/regex');\nexports.P = require('./categories/P/regex');\nexports.Z = require('./categories/Z/regex');\n","module.exports=/[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// no jsonp function","/**\n * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/* globals navigator:false */\n/**\n * @module utils/env\n */\n/**\n * Safely returns `userAgent` from browser's navigator API in a lower case.\n * If navigator API is not available it will return an empty string.\n */\nexport function getUserAgent() {\n // In some environments navigator API might not be available.\n try {\n return navigator.userAgent.toLowerCase();\n }\n catch (e) {\n return '';\n }\n}\nconst userAgent = getUserAgent();\n/**\n * A namespace containing environment and browser information.\n */\nconst env = {\n isMac: isMac(userAgent),\n isWindows: isWindows(userAgent),\n isGecko: isGecko(userAgent),\n isSafari: isSafari(userAgent),\n isiOS: isiOS(userAgent),\n isAndroid: isAndroid(userAgent),\n isBlink: isBlink(userAgent),\n features: {\n isRegExpUnicodePropertySupported: isRegExpUnicodePropertySupported()\n }\n};\nexport default env;\n/**\n * Checks if User Agent represented by the string is running on Macintosh.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is running on Macintosh or not.\n */\nexport function isMac(userAgent) {\n return userAgent.indexOf('macintosh') > -1;\n}\n/**\n * Checks if User Agent represented by the string is running on Windows.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is running on Windows or not.\n */\nexport function isWindows(userAgent) {\n return userAgent.indexOf('windows') > -1;\n}\n/**\n * Checks if User Agent represented by the string is Firefox (Gecko).\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is Firefox or not.\n */\nexport function isGecko(userAgent) {\n return !!userAgent.match(/gecko\\/\\d+/);\n}\n/**\n * Checks if User Agent represented by the string is Safari.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is Safari or not.\n */\nexport function isSafari(userAgent) {\n return userAgent.indexOf(' applewebkit/') > -1 && userAgent.indexOf('chrome') === -1;\n}\n/**\n * Checks if User Agent represented by the string is running in iOS.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is running in iOS or not.\n */\nexport function isiOS(userAgent) {\n // \"Request mobile site\" || \"Request desktop site\".\n return !!userAgent.match(/iphone|ipad/i) || (isMac(userAgent) && navigator.maxTouchPoints > 0);\n}\n/**\n * Checks if User Agent represented by the string is Android mobile device.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is Safari or not.\n */\nexport function isAndroid(userAgent) {\n return userAgent.indexOf('android') > -1;\n}\n/**\n * Checks if User Agent represented by the string is Blink engine.\n *\n * @param userAgent **Lowercase** `navigator.userAgent` string.\n * @returns Whether User Agent is Blink engine or not.\n */\nexport function isBlink(userAgent) {\n // The Edge browser before switching to the Blink engine used to report itself as Chrome (and \"Edge/\")\n // but after switching to the Blink it replaced \"Edge/\" with \"Edg/\".\n return userAgent.indexOf('chrome/') > -1 && userAgent.indexOf('edge/') < 0;\n}\n/**\n * Checks if the current environment supports ES2018 Unicode properties like `\\p{P}` or `\\p{L}`.\n * More information about unicode properties might be found\n * [in Unicode Standard Annex #44](https://www.unicode.org/reports/tr44/#GC_Values_Table).\n */\nexport function isRegExpUnicodePropertySupported() {\n let isSupported = false;\n // Feature detection for Unicode properties. Added in ES2018. Currently Firefox does not support it.\n // See https://github.com/ckeditor/ckeditor5-mention/issues/44#issuecomment-487002174.\n try {\n // Usage of regular expression literal cause error during build (ckeditor/ckeditor5-dev#534).\n isSupported = 'ć'.search(new RegExp('[\\\\p{L}]', 'u')) === 0;\n }\n catch (error) {\n // Firefox throws a SyntaxError when the group is unsupported.\n }\n return isSupported;\n}\n","/**\n * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module utils/fastdiff\n */\n/**\n * Finds positions of the first and last change in the given string/array and generates a set of changes:\n *\n * ```ts\n * fastDiff( '12a', '12xyza' );\n * // [ { index: 2, type: 'insert', values: [ 'x', 'y', 'z' ] } ]\n *\n * fastDiff( '12a', '12aa' );\n * // [ { index: 3, type: 'insert', values: [ 'a' ] } ]\n *\n * fastDiff( '12xyza', '12a' );\n * // [ { index: 2, type: 'delete', howMany: 3 } ]\n *\n * fastDiff( [ '1', '2', 'a', 'a' ], [ '1', '2', 'a' ] );\n * // [ { index: 3, type: 'delete', howMany: 1 } ]\n *\n * fastDiff( [ '1', '2', 'a', 'b', 'c', '3' ], [ '2', 'a', 'b' ] );\n * // [ { index: 0, type: 'insert', values: [ '2', 'a', 'b' ] }, { index: 3, type: 'delete', howMany: 6 } ]\n * ```\n *\n * Passed arrays can contain any type of data, however to compare them correctly custom comparator function\n * should be passed as a third parameter:\n *\n * ```ts\n * fastDiff( [ { value: 1 }, { value: 2 } ], [ { value: 1 }, { value: 3 } ], ( a, b ) => {\n * \treturn a.value === b.value;\n * } );\n * // [ { index: 1, type: 'insert', values: [ { value: 3 } ] }, { index: 2, type: 'delete', howMany: 1 } ]\n * ```\n *\n * The resulted set of changes can be applied to the input in order to transform it into the output, for example:\n *\n * ```ts\n * let input = '12abc3';\n * const output = '2ab';\n * const changes = fastDiff( input, output );\n *\n * changes.forEach( change => {\n * \tif ( change.type == 'insert' ) {\n * \t\tinput = input.substring( 0, change.index ) + change.values.join( '' ) + input.substring( change.index );\n * \t} else if ( change.type == 'delete' ) {\n * \t\tinput = input.substring( 0, change.index ) + input.substring( change.index + change.howMany );\n * \t}\n * } );\n *\n * // input equals output now\n * ```\n *\n * or in case of arrays:\n *\n * ```ts\n * let input = [ '1', '2', 'a', 'b', 'c', '3' ];\n * const output = [ '2', 'a', 'b' ];\n * const changes = fastDiff( input, output );\n *\n * changes.forEach( change => {\n * \tif ( change.type == 'insert' ) {\n * \t\tinput = input.slice( 0, change.index ).concat( change.values, input.slice( change.index ) );\n * \t} else if ( change.type == 'delete' ) {\n * \t\tinput = input.slice( 0, change.index ).concat( input.slice( change.index + change.howMany ) );\n * \t}\n * } );\n *\n * // input equals output now\n * ```\n *\n * By passing `true` as the fourth parameter (`atomicChanges`) the output of this function will become compatible with\n * the {@link module:utils/diff~diff `diff()`} function:\n *\n * ```ts\n * fastDiff( '12a', '12xyza', undefined, true );\n * // [ 'equal', 'equal', 'insert', 'insert', 'insert', 'equal' ]\n * ```\n *\n * The default output format of this function is compatible with the output format of\n * {@link module:utils/difftochanges~diffToChanges `diffToChanges()`}. The `diffToChanges()` input format is, in turn,\n * compatible with the output of {@link module:utils/diff~diff `diff()`}:\n *\n * ```ts\n * const a = '1234';\n * const b = '12xyz34';\n *\n * // Both calls will return the same results (grouped changes format).\n * fastDiff( a, b );\n * diffToChanges( diff( a, b ) );\n *\n * // Again, both calls will return the same results (atomic changes format).\n * fastDiff( a, b, undefined, true );\n * diff( a, b );\n * ```\n *\n * @typeParam T The type of array elements.\n * @typeParam AtomicChanges The type of `atomicChanges` parameter (selects the result type).\n * @param a Input array or string.\n * @param b Input array or string.\n * @param cmp Optional function used to compare array values, by default `===` (strict equal operator) is used.\n * @param atomicChanges Whether an array of `inset|delete|equal` operations should\n * be returned instead of changes set. This makes this function compatible with {@link module:utils/diff~diff `diff()`}.\n * Defaults to `false`.\n * @returns Array of changes. The elements are either {@link module:utils/diff~DiffResult} or {@link module:utils/difftochanges~Change},\n * depending on `atomicChanges` parameter.\n */\nexport default function fastDiff(a, b, cmp, atomicChanges) {\n // Set the comparator function.\n cmp = cmp || function (a, b) {\n return a === b;\n };\n // Convert the string (or any array-like object - eg. NodeList) to an array by using the slice() method because,\n // unlike Array.from(), it returns array of UTF-16 code units instead of the code points of a string.\n // One code point might be a surrogate pair of two code units. All text offsets are expected to be in code units.\n // See ckeditor/ckeditor5#3147.\n //\n // We need to make sure here that fastDiff() works identical to diff().\n const arrayA = Array.isArray(a) ? a : Array.prototype.slice.call(a);\n const arrayB = Array.isArray(b) ? b : Array.prototype.slice.call(b);\n // Find first and last change.\n const changeIndexes = findChangeBoundaryIndexes(arrayA, arrayB, cmp);\n // Transform into changes array.\n const result = atomicChanges ?\n changeIndexesToAtomicChanges(changeIndexes, arrayB.length) :\n changeIndexesToChanges(arrayB, changeIndexes);\n return result;\n}\n/**\n * Finds position of the first and last change in the given arrays. For example:\n *\n * ```ts\n * const indexes = findChangeBoundaryIndexes( [ '1', '2', '3', '4' ], [ '1', '3', '4', '2', '4' ] );\n * console.log( indexes ); // { firstIndex: 1, lastIndexOld: 3, lastIndexNew: 4 }\n * ```\n *\n * The above indexes means that in the first array the modified part is `1[23]4` and in the second array it is `1[342]4`.\n * Based on such indexes, array with `insert`/`delete` operations which allows transforming first value into the second one\n * can be generated.\n */\nfunction findChangeBoundaryIndexes(arr1, arr2, cmp) {\n // Find the first difference between passed values.\n const firstIndex = findFirstDifferenceIndex(arr1, arr2, cmp);\n // If arrays are equal return -1 indexes object.\n if (firstIndex === -1) {\n return { firstIndex: -1, lastIndexOld: -1, lastIndexNew: -1 };\n }\n // Remove the common part of each value and reverse them to make it simpler to find the last difference between them.\n const oldArrayReversed = cutAndReverse(arr1, firstIndex);\n const newArrayReversed = cutAndReverse(arr2, firstIndex);\n // Find the first difference between reversed values.\n // It should be treated as \"how many elements from the end the last difference occurred\".\n //\n // For example:\n //\n // \t\t\t\tinitial\t->\tafter cut\t-> reversed:\n // oldValue:\t'321ba'\t->\t'21ba'\t\t-> 'ab12'\n // newValue:\t'31xba'\t->\t'1xba'\t\t-> 'abx1'\n // lastIndex:\t\t\t\t\t\t\t-> 2\n //\n // So the last change occurred two characters from the end of the arrays.\n const lastIndex = findFirstDifferenceIndex(oldArrayReversed, newArrayReversed, cmp);\n // Use `lastIndex` to calculate proper offset, starting from the beginning (`lastIndex` kind of starts from the end).\n const lastIndexOld = arr1.length - lastIndex;\n const lastIndexNew = arr2.length - lastIndex;\n return { firstIndex, lastIndexOld, lastIndexNew };\n}\n/**\n * Returns a first index on which given arrays differ. If both arrays are the same, -1 is returned.\n */\nfunction findFirstDifferenceIndex(arr1, arr2, cmp) {\n for (let i = 0; i < Math.max(arr1.length, arr2.length); i++) {\n if (arr1[i] === undefined || arr2[i] === undefined || !cmp(arr1[i], arr2[i])) {\n return i;\n }\n }\n return -1; // Return -1 if arrays are equal.\n}\n/**\n * Returns a copy of the given array with `howMany` elements removed starting from the beginning and in reversed order.\n *\n * @param arr Array to be processed.\n * @param howMany How many elements from array beginning to remove.\n * @returns Shortened and reversed array.\n */\nfunction cutAndReverse(arr, howMany) {\n return arr.slice(howMany).reverse();\n}\n/**\n * Generates changes array based on change indexes from `findChangeBoundaryIndexes` function. This function will\n * generate array with 0 (no changes), 1 (deletion or insertion) or 2 records (insertion and deletion).\n *\n * @param newArray New array for which change indexes were calculated.\n * @param changeIndexes Change indexes object from `findChangeBoundaryIndexes` function.\n * @returns Array of changes compatible with {@link module:utils/difftochanges~diffToChanges} format.\n */\nfunction changeIndexesToChanges(newArray, changeIndexes) {\n const result = [];\n const { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n // Order operations as 'insert', 'delete' array to keep compatibility with {@link module:utils/difftochanges~diffToChanges}\n // in most cases. However, 'diffToChanges' does not stick to any order so in some cases\n // (for example replacing '12345' with 'abcd') it will generate 'delete', 'insert' order.\n if (lastIndexNew - firstIndex > 0) {\n result.push({\n index: firstIndex,\n type: 'insert',\n values: newArray.slice(firstIndex, lastIndexNew)\n });\n }\n if (lastIndexOld - firstIndex > 0) {\n result.push({\n index: firstIndex + (lastIndexNew - firstIndex),\n type: 'delete',\n howMany: lastIndexOld - firstIndex\n });\n }\n return result;\n}\n/**\n * Generates array with set `equal|insert|delete` operations based on change indexes from `findChangeBoundaryIndexes` function.\n *\n * @param changeIndexes Change indexes object from `findChangeBoundaryIndexes` function.\n * @param newLength Length of the new array on which `findChangeBoundaryIndexes` calculated change indexes.\n * @returns Array of changes compatible with {@link module:utils/diff~diff} format.\n */\nfunction changeIndexesToAtomicChanges(changeIndexes, newLength) {\n const { firstIndex, lastIndexOld, lastIndexNew } = changeIndexes;\n // No changes.\n if (firstIndex === -1) {\n return Array(newLength).fill('equal');\n }\n let result = [];\n if (firstIndex > 0) {\n result = result.concat(Array(firstIndex).fill('equal'));\n }\n if (lastIndexNew - firstIndex > 0) {\n result = result.concat(Array(lastIndexNew - firstIndex).fill('insert'));\n }\n if (lastIndexOld - firstIndex > 0) {\n result = result.concat(Array(lastIndexOld - firstIndex).fill('delete'));\n }\n if (lastIndexNew < newLength) {\n result = result.concat(Array(newLength - lastIndexNew).fill('equal'));\n }\n return result;\n}\n","/**\n * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module utils/diff\n */\nimport fastDiff from './fastdiff';\n// The following code is based on the \"O(NP) Sequence Comparison Algorithm\"\n// by Sun Wu, Udi Manber, Gene Myers, Webb Miller.\n/**\n * Calculates the difference between two arrays or strings producing an array containing a list of changes\n * necessary to transform input into output.\n *\n * ```ts\n * diff( 'aba', 'acca' ); // [ 'equal', 'insert', 'insert', 'delete', 'equal' ]\n * ```\n *\n * This function is based on the \"O(NP) Sequence Comparison Algorithm\" by Sun Wu, Udi Manber, Gene Myers, Webb Miller.\n * Unfortunately, while it gives the most precise results, its to complex for longer strings/arrow (above 200 items).\n * Therefore, `diff()` automatically switches to {@link module:utils/fastdiff~fastDiff `fastDiff()`} when detecting\n * such a scenario. The return formats of both functions are identical.\n *\n * @param a Input array or string.\n * @param b Output array or string.\n * @param cmp Optional function used to compare array values, by default === is used.\n * @returns Array of changes.\n */\nexport default function diff(a, b, cmp) {\n // Set the comparator function.\n cmp = cmp || function (a, b) {\n return a === b;\n };\n const aLength = a.length;\n const bLength = b.length;\n // Perform `fastDiff` for longer strings/arrays (see #269).\n if (aLength > 200 || bLength > 200 || aLength + bLength > 300) {\n return diff.fastDiff(a, b, cmp, true);\n }\n // Temporary action type statics.\n let _insert, _delete;\n // Swapped the arrays to use the shorter one as the first one.\n if (bLength < aLength) {\n const tmp = a;\n a = b;\n b = tmp;\n // We swap the action types as well.\n _insert = 'delete';\n _delete = 'insert';\n }\n else {\n _insert = 'insert';\n _delete = 'delete';\n }\n const m = a.length;\n const n = b.length;\n const delta = n - m;\n // Edit scripts, for each diagonal.\n const es = {};\n // Furthest points, the furthest y we can get on each diagonal.\n const fp = {};\n function snake(k) {\n // We use -1 as an alternative below to handle initial values ( instead of filling the fp with -1 first ).\n // Furthest points (y) on the diagonal below k.\n const y1 = (fp[k - 1] !== undefined ? fp[k - 1] : -1) + 1;\n // Furthest points (y) on the diagonal above k.\n const y2 = fp[k + 1] !== undefined ? fp[k + 1] : -1;\n // The way we should go to get further.\n const dir = y1 > y2 ? -1 : 1;\n // Clone previous changes array (if any).\n if (es[k + dir]) {\n es[k] = es[k + dir].slice(0);\n }\n // Create changes array.\n if (!es[k]) {\n es[k] = [];\n }\n // Push the action.\n es[k].push(y1 > y2 ? _insert : _delete);\n // Set the beginning coordinates.\n let y = Math.max(y1, y2);\n let x = y - k;\n // Traverse the diagonal as long as the values match.\n while (x < m && y < n && cmp(a[x], b[y])) {\n x++;\n y++;\n // Push no change action.\n es[k].push('equal');\n }\n return y;\n }\n let p = 0;\n let k;\n // Traverse the graph until we reach the end of the longer string.\n do {\n // Updates furthest points and edit scripts for diagonals below delta.\n for (k = -p; k < delta; k++) {\n fp[k] = snake(k);\n }\n // Updates furthest points and edit scripts for diagonals above delta.\n for (k = delta + p; k > delta; k--) {\n fp[k] = snake(k);\n }\n // Updates furthest point and edit script for the delta diagonal.\n // note that the delta diagonal is the one which goes through the sink (m, n).\n fp[delta] = snake(delta);\n p++;\n } while (fp[delta] !== n);\n // Return the final list of edit changes.\n // We remove the first item that represents the action for the injected nulls.\n return es[delta].slice(1);\n}\n// Store the API in static property to easily overwrite it in tests.\n// Too bad dependency injection does not work in Webpack + ES 6 (const) + Babel.\ndiff.fastDiff = fastDiff;\n","/**\n * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module utils/spy\n */\n/**\n * Creates a spy function (ala Sinon.js) that can be used to inspect call to it.\n *\n * The following are the present features:\n *\n * * spy.called: property set to `true` if the function has been called at least once.\n *\n * @returns The spy function.\n */\nfunction spy() {\n return function spy() {\n spy.called = true;\n };\n}\nexport default spy;\n","/**\n * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module utils/eventinfo\n */\nimport spy from './spy';\n/**\n * The event object passed to event callbacks. It is used to provide information about the event as well as a tool to\n * manipulate it.\n */\nexport default class EventInfo {\n /**\n * @param source The emitter.\n * @param name The event name.\n */\n constructor(source, name) {\n this.source = source;\n this.name = name;\n this.path = [];\n // The following methods are defined in the constructor because they must be re-created per instance.\n this.stop = spy();\n this.off = spy();\n }\n}\n","/**\n * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module utils/uid\n */\n/**\n * A hash table of hex numbers to avoid using toString() in uid() which is costly.\n * [ '00', '01', '02', ..., 'fe', 'ff' ]\n */\nconst HEX_NUMBERS = new Array(256).fill('')\n .map((_, index) => ('0' + (index).toString(16)).slice(-2));\n/**\n * Returns a unique id. The id starts with an \"e\" character and a randomly generated string of\n * 32 alphanumeric characters.\n *\n * **Note**: The characters the unique id is built from correspond to the hex number notation\n * (from \"0\" to \"9\", from \"a\" to \"f\"). In other words, each id corresponds to an \"e\" followed\n * by 16 8-bit numbers next to each other.\n *\n * @returns An unique id string.\n */\nexport default function uid() {\n // Let's create some positive random 32bit integers first.\n //\n // 1. Math.random() is a float between 0 and 1.\n // 2. 0x100000000 is 2^32 = 4294967296.\n // 3. >>> 0 enforces integer (in JS all numbers are floating point).\n //\n // For instance:\n //\t\tMath.random() * 0x100000000 = 3366450031.853859\n // but\n //\t\tMath.random() * 0x100000000 >>> 0 = 3366450031.\n const r1 = Math.random() * 0x100000000 >>> 0;\n const r2 = Math.random() * 0x100000000 >>> 0;\n const r3 = Math.random() * 0x100000000 >>> 0;\n const r4 = Math.random() * 0x100000000 >>> 0;\n // Make sure that id does not start with number.\n return 'e' +\n HEX_NUMBERS[r1 >> 0 & 0xFF] +\n HEX_NUMBERS[r1 >> 8 & 0xFF] +\n HEX_NUMBERS[r1 >> 16 & 0xFF] +\n HEX_NUMBERS[r1 >> 24 & 0xFF] +\n HEX_NUMBERS[r2 >> 0 & 0xFF] +\n HEX_NUMBERS[r2 >> 8 & 0xFF] +\n HEX_NUMBERS[r2 >> 16 & 0xFF] +\n HEX_NUMBERS[r2 >> 24 & 0xFF] +\n HEX_NUMBERS[r3 >> 0 & 0xFF] +\n HEX_NUMBERS[r3 >> 8 & 0xFF] +\n HEX_NUMBERS[r3 >> 16 & 0xFF] +\n HEX_NUMBERS[r3 >> 24 & 0xFF] +\n HEX_NUMBERS[r4 >> 0 & 0xFF] +\n HEX_NUMBERS[r4 >> 8 & 0xFF] +\n HEX_NUMBERS[r4 >> 16 & 0xFF] +\n HEX_NUMBERS[r4 >> 24 & 0xFF];\n}\n","/**\n * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * Provides group of constants to use instead of hardcoding numeric priority values.\n */\nconst priorities = {\n get(priority = 'normal') {\n if (typeof priority != 'number') {\n return this[priority] || this.normal;\n }\n else {\n return priority;\n }\n },\n highest: 100000,\n high: 1000,\n normal: 0,\n low: -1000,\n lowest: -100000\n};\nexport default priorities;\n","/**\n * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\nimport priorities from './priorities';\n/**\n * Inserts any object with priority at correct index by priority so registered objects are always sorted from highest to lowest priority.\n *\n * @param objects Array of objects with priority to insert object to.\n * @param objectToInsert Object with `priority` property.\n */\nexport default function insertToPriorityArray(objects, objectToInsert) {\n const priority = priorities.get(objectToInsert.priority);\n for (let i = 0; i < objects.length; i++) {\n if (priorities.get(objects[i].priority) < priority) {\n objects.splice(i, 0, objectToInsert);\n return;\n }\n }\n objects.push(objectToInsert);\n}\n","/**\n * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module utils/ckeditorerror\n */\n/* globals console */\n/**\n * URL to the documentation with error codes.\n */\nexport const DOCUMENTATION_URL = 'https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html';\n/**\n * The CKEditor error class.\n *\n * You should throw `CKEditorError` when:\n *\n * * An unexpected situation occurred and the editor (most probably) will not work properly. Such exception will be handled\n * by the {@link module:watchdog/watchdog~Watchdog watchdog} (if it is integrated),\n * * If the editor is incorrectly integrated or the editor API is used in the wrong way. This way you will give\n * feedback to the developer as soon as possible. Keep in mind that for common integration issues which should not\n * stop editor initialization (like missing upload adapter, wrong name of a toolbar component) we use\n * {@link module:utils/ckeditorerror~logWarning `logWarning()`} and\n * {@link module:utils/ckeditorerror~logError `logError()`}\n * to improve developers experience and let them see the a working editor as soon as possible.\n *\n * ```ts\n * /**\n * * Error thrown when a plugin cannot be loaded due to JavaScript errors, lack of plugins with a given name, etc.\n * *\n * * @error plugin-load\n * * @param pluginName The name of the plugin that could not be loaded.\n * * @param moduleName The name of the module which tried to load this plugin.\n * *\\/\n * throw new CKEditorError( 'plugin-load', {\n * \tpluginName: 'foo',\n * \tmoduleName: 'bar'\n * } );\n * ```\n */\nexport default class CKEditorError extends Error {\n /**\n * Creates an instance of the CKEditorError class.\n *\n * @param errorName The error id in an `error-name` format. A link to this error documentation page will be added\n * to the thrown error's `message`.\n * @param context A context of the error by which the {@link module:watchdog/watchdog~Watchdog watchdog}\n * is able to determine which editor crashed. It should be an editor instance or a property connected to it. It can be also\n * a `null` value if the editor should not be restarted in case of the error (e.g. during the editor initialization).\n * The error context should be checked using the `areConnectedThroughProperties( editor, context )` utility\n * to check if the object works as the context.\n * @param data Additional data describing the error. A stringified version of this object\n * will be appended to the error message, so the data are quickly visible in the console. The original\n * data object will also be later available under the {@link #data} property.\n */\n constructor(errorName, context, data) {\n super(getErrorMessage(errorName, data));\n this.name = 'CKEditorError';\n this.context = context;\n this.data = data;\n }\n /**\n * Checks if the error is of the `CKEditorError` type.\n */\n is(type) {\n return type === 'CKEditorError';\n }\n /**\n * A utility that ensures that the thrown error is a {@link module:utils/ckeditorerror~CKEditorError} one.\n * It is useful when combined with the {@link module:watchdog/watchdog~Watchdog} feature, which can restart the editor in case\n * of a {@link module:utils/ckeditorerror~CKEditorError} error.\n *\n * @param err The error to rethrow.\n * @param context An object connected through properties with the editor instance. This context will be used\n * by the watchdog to verify which editor should be restarted.\n */\n static rethrowUnexpectedError(err, context) {\n if (err.is && err.is('CKEditorError')) {\n throw err;\n }\n /**\n * An unexpected error occurred inside the CKEditor 5 codebase. This error will look like the original one\n * to make the debugging easier.\n *\n * This error is only useful when the editor is initialized using the {@link module:watchdog/watchdog~Watchdog} feature.\n * In case of such error (or any {@link module:utils/ckeditorerror~CKEditorError} error) the watchdog should restart the editor.\n *\n * @error unexpected-error\n */\n const error = new CKEditorError(err.message, context);\n // Restore the original stack trace to make the error look like the original one.\n // See https://github.com/ckeditor/ckeditor5/issues/5595 for more details.\n error.stack = err.stack;\n throw error;\n }\n}\n/**\n * Logs a warning to the console with a properly formatted message and adds a link to the documentation.\n * Use whenever you want to log a warning to the console.\n *\n * ```ts\n * /**\n * * There was a problem processing the configuration of the toolbar. The item with the given\n * * name does not exist, so it was omitted when rendering the toolbar.\n * *\n * * @error toolbarview-item-unavailable\n * * @param {String} name The name of the component.\n * *\\/\n * logWarning( 'toolbarview-item-unavailable', { name } );\n * ```\n *\n * See also {@link module:utils/ckeditorerror~CKEditorError} for an explanation when to throw an error and when to log\n * a warning or an error to the console.\n *\n * @param errorName The error name to be logged.\n * @param data Additional data to be logged.\n */\nexport function logWarning(errorName, data) {\n console.warn(...formatConsoleArguments(errorName, data));\n}\n/**\n * Logs an error to the console with a properly formatted message and adds a link to the documentation.\n * Use whenever you want to log an error to the console.\n *\n * ```ts\n * /**\n * * There was a problem processing the configuration of the toolbar. The item with the given\n * * name does not exist, so it was omitted when rendering the toolbar.\n * *\n * * @error toolbarview-item-unavailable\n * * @param {String} name The name of the component.\n * *\\/\n * logError( 'toolbarview-item-unavailable', { name } );\n * ```\n *\n * **Note**: In most cases logging a warning using {@link module:utils/ckeditorerror~logWarning} is enough.\n *\n * See also {@link module:utils/ckeditorerror~CKEditorError} for an explanation when to use each method.\n *\n * @param errorName The error name to be logged.\n * @param data Additional data to be logged.\n */\nexport function logError(errorName, data) {\n console.error(...formatConsoleArguments(errorName, data));\n}\n/**\n * Returns formatted link to documentation message.\n */\nfunction getLinkToDocumentationMessage(errorName) {\n return `\\nRead more: ${DOCUMENTATION_URL}#error-${errorName}`;\n}\n/**\n * Returns formatted error message.\n */\nfunction getErrorMessage(errorName, data) {\n const processedObjects = new WeakSet();\n const circularReferencesReplacer = (key, value) => {\n if (typeof value === 'object' && value !== null) {\n if (processedObjects.has(value)) {\n return `[object ${value.constructor.name}]`;\n }\n processedObjects.add(value);\n }\n return value;\n };\n const stringifiedData = data ? ` ${JSON.stringify(data, circularReferencesReplacer)}` : '';\n const documentationLink = getLinkToDocumentationMessage(errorName);\n return errorName + stringifiedData + documentationLink;\n}\n/**\n * Returns formatted console error arguments.\n */\nfunction formatConsoleArguments(errorName, data) {\n const documentationMessage = getLinkToDocumentationMessage(errorName);\n return data ? [errorName, data, documentationMessage] : [errorName, documentationMessage];\n}\n","/**\n * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module utils/version\n */\n/* globals window, global */\nimport CKEditorError from './ckeditorerror';\nconst version = '38.0.1';\nexport default version;\n// The second argument is not a month. It is `monthIndex` and starts from `0`.\nexport const releaseDate = new Date(2023, 4, 23);\n/* istanbul ignore next -- @preserve */\nconst windowOrGlobal = typeof window === 'object' ? window : global;\n/* istanbul ignore next -- @preserve */\nif (windowOrGlobal.CKEDITOR_VERSION) {\n /**\n * This error is thrown when due to a mistake in how CKEditor 5 was installed or initialized, some\n * of its modules were duplicated (evaluated and executed twice). Module duplication leads to inevitable runtime\n * errors.\n *\n * There are many situations in which some modules can be loaded twice. In the worst case scenario,\n * you may need to check your project for each of these issues and fix them all.\n *\n * # Trying to add a plugin to an existing build\n *\n * If you import an existing CKEditor 5 build and a plugin like this:\n *\n * ```ts\n * import ClassicEditor from '@ckeditor/ckeditor5-build-classic';\n * import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight';\n * ```\n *\n * Then your project loads some CKEditor 5 packages twice. How does it happen?\n *\n * The build package contains a file which is already compiled with webpack. This means\n * that it contains all the necessary code from e.g. `@ckeditor/ckeditor5-engine` and `@ckeditor/ckeditor5-utils`.\n *\n * However, the `Highlight` plugin imports some of the modules from these packages, too. If you ask webpack to\n * build such a project, you will end up with the modules being included (and run) twice — first, because they are\n * included inside the build package, and second, because they are required by the `Highlight` plugin.\n *\n * Therefore, **you must never add plugins to an existing build** unless your plugin has no dependencies.\n *\n * Adding plugins to a build is done by taking the source version of this build (so, before it was built with webpack)\n * and adding plugins there. In this situation, webpack will know that it only needs to load each plugin once.\n *\n * Read more in the {@glink installation/plugins/installing-plugins Installing plugins} guide.\n *\n * # Confused an editor build with an editor implementation\n *\n * This scenario is very similar to the previous one, but has a different origin.\n *\n * Let's assume that you wanted to use CKEditor 5 from source, as explained in the\n * {@glink installation/advanced/alternative-setups/integrating-from-source-webpack \"Building from source\"} section\n * or in the {@glink framework/quick-start \"Quick start\"} guide of CKEditor 5 Framework.\n *\n * The correct way to do so is to import an editor and plugins and run them together like this:\n *\n * ```ts\n * import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';\n * import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';\n * import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';\n * import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';\n * import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';\n *\n * ClassicEditor\n * \t.create( document.querySelector( '#editor' ), {\n * \t\tplugins: [ Essentials, Paragraph, Bold, Italic ],\n * \t\ttoolbar: [ 'bold', 'italic' ]\n * \t} )\n * \t.then( editor => {\n * \t\tconsole.log( 'Editor was initialized', editor );\n * \t} )\n * \t.catch( error => {\n * \t\tconsole.error( error.stack );\n * \t} );\n * ```\n *\n * However, you might have mistakenly imported a build instead of the source `ClassicEditor`. In this case\n * your imports will look like this:\n *\n * ```ts\n * import ClassicEditor from '@ckeditor/ckeditor5-build-classic';\n * import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';\n * import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';\n * import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';\n * import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';\n * ```\n *\n * This creates the same situation as in the previous section because you use a build together with source plugins.\n *\n * Remember: `@ckeditor/ckeditor5-build-*` packages contain editor builds and `@ckeditor/ckeditor5-editor-*` contain source editors.\n *\n * # Loading two or more builds on one page\n *\n * If you use CKEditor 5 builds, you might have loaded two (or more) `ckeditor.js` files on one web page.\n * Check your web page for duplicated `