@ncino/web-components 9.2.0-preview.3 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/axe.js +1 -1
- package/dist/components/accordion/gator/base/accordion.gator.js +7 -7
- package/dist/components/accordion/gator/group/accordion-group.gator.js +1 -1
- package/dist/components/alert/gator/base/alert.gator.js +1 -1
- package/dist/components/alert/gator/subtitle/alert-subtitle.gator.js +2 -2
- package/dist/components/alert/gator/title/alert-title.gator.js +2 -2
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/avatar/gator/avatar.gator.js +1 -1
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/badge/gator/badge.gator.js +2 -2
- package/dist/components/badge/slds/badge.slds.js +1 -1
- package/dist/components/banner/banner.js +1 -1
- package/dist/components/banner/gator/banner.gator.js +1 -1
- package/dist/components/boolean/boolean.gator.js +1 -1
- package/dist/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.js +2 -2
- package/dist/components/breadcrumbs/gator/container/breadcrumbs.gator.js +2 -2
- package/dist/components/button/gator/button.gator.js +1 -1
- package/dist/components/button/slds/button.slds.js +1 -1
- package/dist/components/button-card/gator/button-card.gator.js +2 -2
- package/dist/components/button-group/gator/button-group.gator.js +1 -1
- package/dist/components/card/card.js +1 -1
- package/dist/components/card/gator/base/card.gator.js +2 -2
- package/dist/components/card/gator/content/card-content.gator.js +1 -1
- package/dist/components/card/gator/footer/card-footer.gator.js +1 -1
- package/dist/components/card/gator/header/card-header.gator.js +2 -2
- package/dist/components/checkbox/checkbox.gator.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.gator.js +2 -2
- package/dist/components/chip/gator/chip.gator.js +2 -2
- package/dist/components/combobox/base/combobox.js +1 -1
- package/dist/components/combobox/base/combobox.slds.js +1 -1
- package/dist/components/combobox/combobox-item/combobox-item.js +1 -1
- package/dist/components/combobox/combobox-item/combobox-item.slds.js +1 -1
- package/dist/components/date-picker/base/gator/datepicker.gator.js +2 -2
- package/dist/components/date-picker/year-month-selector/year-month-selector.gator.js +2 -2
- package/dist/components/display-card/gator/display-card.gator.js +2 -2
- package/dist/components/divider/gator/divider.gator.js +2 -2
- package/dist/components/fab/gator/fab.gator.js +2 -2
- package/dist/components/guided-nav/gator/guided-nav/guided-nav.gator.js +1 -1
- package/dist/components/guided-nav/gator/guided-nav-step/guided-nav-step.gator.js +1 -1
- package/dist/components/guided-nav/gator/guided-nav-substep/guided-nav-substep.gator.js +1 -1
- package/dist/components/headline-card/gator/headline-card.gator.js +1 -1
- package/dist/components/icon/gator/icon.gator.js +2 -2
- package/dist/components/icon/gator/index.js +1 -1
- package/dist/components/icon/gator/templates/add-link.js +1 -1
- package/dist/components/icon/gator/templates/airplane.js +1 -1
- package/dist/components/icon/gator/templates/alarm.js +1 -1
- package/dist/components/icon/gator/templates/apartment.js +1 -1
- package/dist/components/icon/gator/templates/arrow-around.js +1 -1
- package/dist/components/icon/gator/templates/arrow-down.js +1 -1
- package/dist/components/icon/gator/templates/arrow-left.js +1 -1
- package/dist/components/icon/gator/templates/arrow-line-left.js +1 -1
- package/dist/components/icon/gator/templates/arrow-line-right.js +1 -1
- package/dist/components/icon/gator/templates/arrow-right.js +1 -1
- package/dist/components/icon/gator/templates/arrow-up.js +1 -1
- package/dist/components/icon/gator/templates/arrows-down-up.js +8 -0
- package/dist/components/icon/gator/templates/bank.js +1 -1
- package/dist/components/icon/gator/templates/bell-disabled.js +1 -1
- package/dist/components/icon/gator/templates/bell.js +1 -1
- package/dist/components/icon/gator/templates/binoculars.js +1 -1
- package/dist/components/icon/gator/templates/book.js +1 -1
- package/dist/components/icon/gator/templates/box.js +1 -1
- package/dist/components/icon/gator/templates/brain.js +1 -1
- package/dist/components/icon/gator/templates/cake.js +1 -1
- package/dist/components/icon/gator/templates/calculator.js +1 -1
- package/dist/components/icon/gator/templates/calendar.js +1 -1
- package/dist/components/icon/gator/templates/camera.js +1 -1
- package/dist/components/icon/gator/templates/caret-up-down.js +1 -1
- package/dist/components/icon/gator/templates/case.js +1 -1
- package/dist/components/icon/gator/templates/chart-bar-horizontal.js +1 -1
- package/dist/components/icon/gator/templates/chart-bar.js +1 -1
- package/dist/components/icon/gator/templates/chart-donut.js +1 -1
- package/dist/components/icon/gator/templates/chart-line.js +1 -1
- package/dist/components/icon/gator/templates/chart-pie.js +1 -1
- package/dist/components/icon/gator/templates/chart-rise.js +1 -1
- package/dist/components/icon/gator/templates/chart-scatter.js +1 -1
- package/dist/components/icon/gator/templates/chat-circle-ai.js +1 -1
- package/dist/components/icon/gator/templates/chat-circle-dots.js +1 -1
- package/dist/components/icon/gator/templates/chat-circle-slash.js +1 -1
- package/dist/components/icon/gator/templates/chat-circle-text.js +1 -1
- package/dist/components/icon/gator/templates/chat-circle.js +1 -1
- package/dist/components/icon/gator/templates/chat.js +1 -1
- package/dist/components/icon/gator/templates/check-circle-filled.js +1 -1
- package/dist/components/icon/gator/templates/check-circle.js +1 -1
- package/dist/components/icon/gator/templates/check.js +1 -1
- package/dist/components/icon/gator/templates/checkbox-indeterminate.js +1 -1
- package/dist/components/icon/gator/templates/checkbox-selected.js +1 -1
- package/dist/components/icon/gator/templates/checkbox.js +1 -1
- package/dist/components/icon/gator/templates/checkerboard.js +1 -1
- package/dist/components/icon/gator/templates/chevron-down.js +1 -1
- package/dist/components/icon/gator/templates/chevron-left.js +1 -1
- package/dist/components/icon/gator/templates/chevron-right.js +1 -1
- package/dist/components/icon/gator/templates/chevron-up.js +1 -1
- package/dist/components/icon/gator/templates/circle-arrow-down.js +1 -1
- package/dist/components/icon/gator/templates/circle-arrow-left.js +1 -1
- package/dist/components/icon/gator/templates/circle-arrow-right.js +1 -1
- package/dist/components/icon/gator/templates/circle-arrow-up.js +1 -1
- package/dist/components/icon/gator/templates/circle-dashed.js +1 -1
- package/dist/components/icon/gator/templates/circle-filled.js +1 -1
- package/dist/components/icon/gator/templates/circle.js +1 -1
- package/dist/components/icon/gator/templates/city.js +1 -1
- package/dist/components/icon/gator/templates/clipboard.js +1 -1
- package/dist/components/icon/gator/templates/clock-clockwise.js +1 -1
- package/dist/components/icon/gator/templates/clock-counter-clockwise.js +1 -1
- package/dist/components/icon/gator/templates/clock.js +1 -1
- package/dist/components/icon/gator/templates/collapse.js +1 -1
- package/dist/components/icon/gator/templates/cone.js +1 -1
- package/dist/components/icon/gator/templates/contact-info.js +1 -1
- package/dist/components/icon/gator/templates/copy.js +1 -1
- package/dist/components/icon/gator/templates/credit-card.js +1 -1
- package/dist/components/icon/gator/templates/crop.js +1 -1
- package/dist/components/icon/gator/templates/crosshairs.js +1 -1
- package/dist/components/icon/gator/templates/currency-dollar-simple.js +1 -1
- package/dist/components/icon/gator/templates/currency-eur.js +1 -1
- package/dist/components/icon/gator/templates/currency-gbp.js +1 -1
- package/dist/components/icon/gator/templates/currency-inr.js +1 -1
- package/dist/components/icon/gator/templates/currency-jpy.js +1 -1
- package/dist/components/icon/gator/templates/currency-krw.js +1 -1
- package/dist/components/icon/gator/templates/currency-kzt.js +1 -1
- package/dist/components/icon/gator/templates/currency-ngn.js +1 -1
- package/dist/components/icon/gator/templates/currency-rub.js +1 -1
- package/dist/components/icon/gator/templates/cursor-arrow.js +1 -1
- package/dist/components/icon/gator/templates/cursor-hand.js +1 -1
- package/dist/components/icon/gator/templates/cursor.js +1 -1
- package/dist/components/icon/gator/templates/dashboard.js +1 -1
- package/dist/components/icon/gator/templates/delete.js +1 -1
- package/dist/components/icon/gator/templates/dna.js +1 -1
- package/dist/components/icon/gator/templates/document-add.js +1 -1
- package/dist/components/icon/gator/templates/document-ai.js +1 -1
- package/dist/components/icon/gator/templates/document-check.js +1 -1
- package/dist/components/icon/gator/templates/document-e-sign.js +1 -1
- package/dist/components/icon/gator/templates/document-image.js +1 -1
- package/dist/components/icon/gator/templates/document-pdf.js +1 -1
- package/dist/components/icon/gator/templates/document-sign.js +1 -1
- package/dist/components/icon/gator/templates/document-zip.js +1 -1
- package/dist/components/icon/gator/templates/document.js +1 -1
- package/dist/components/icon/gator/templates/dollar-bills.js +1 -1
- package/dist/components/icon/gator/templates/dollar-house.js +1 -1
- package/dist/components/icon/gator/templates/down-payment.js +1 -1
- package/dist/components/icon/gator/templates/download.js +1 -1
- package/dist/components/icon/gator/templates/drag-drop.js +1 -1
- package/dist/components/icon/gator/templates/earth.js +1 -1
- package/dist/components/icon/gator/templates/exclude-square.js +1 -1
- package/dist/components/icon/gator/templates/exit-circle.js +1 -1
- package/dist/components/icon/gator/templates/exit-left.js +1 -1
- package/dist/components/icon/gator/templates/exit.js +1 -1
- package/dist/components/icon/gator/templates/expand-arrows.js +1 -1
- package/dist/components/icon/gator/templates/expand.js +1 -1
- package/dist/components/icon/gator/templates/export.js +1 -1
- package/dist/components/icon/gator/templates/eye-closed.js +1 -1
- package/dist/components/icon/gator/templates/eye-crossed.js +1 -1
- package/dist/components/icon/gator/templates/eye.js +1 -1
- package/dist/components/icon/gator/templates/facebook-logo.js +1 -1
- package/dist/components/icon/gator/templates/file-code.js +1 -1
- package/dist/components/icon/gator/templates/files.js +1 -1
- package/dist/components/icon/gator/templates/filter-funnel.js +1 -1
- package/dist/components/icon/gator/templates/filters-2.js +1 -1
- package/dist/components/icon/gator/templates/filters.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ad-andorra.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ae-united-arab-emirates.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-af-afghanistan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ag-antigua-and-barbuda.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ai-anguilla.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-al-albania.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-am-armenia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ao-angola.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-aq-antarctica.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ar-argentina.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-as-american-smoa.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-at-austria.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-au-australia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-aw-aruba.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ax-aland-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-az-azerbaijan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ba-bosnia-and-herzegovina.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bb-barbados.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bd-bangladesh.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-be-belgium.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bf-burkina-faso.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bg-bulgaria.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bh-bahrain.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bi-burundi.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bj-benin.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bl-saint-barthelemy.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bm-bermuda.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bn-brunei-darussalam.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bo-bolivia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bq-bo-bonaire.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bq-sa-sba.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bq-se-snt-eustatius.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-br-brazil.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bs-bahamas.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bt-bhutan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bv-bouvet-island.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bw-botswana.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-by-belarus.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-bz-belize.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ca-canada.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cc-cocos-keeling-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cd-democratic-republic-of-the-congo.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cf-central-african-republic.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cg-republic-of-the-congo.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ch-switzerland.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ci-c/303/264te-divoire-ivory-coast.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ck-cook-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cl-chile.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cm-cameroon.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cn-china.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-co-colombia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cr-costa-rica.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cu-cuba.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cv-cabo-verde.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cw-cura/303/247ao.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cx-christmas-island.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cy-cyprus.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-cz-czech-republic.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-de-germany.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-dj-djibouti.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-dk-denmark.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-dm-dominica.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-do-dominican-republic.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-dz-algeria.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ec-ecuador.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ee-estonia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-eg-egypt.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-eh-western-sahara.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-er-eritrea.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-es-sain.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-et-ethiopia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-fi-finland.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-fj-fiji.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-fk-falkland-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-fm-federated-states-of-micronesia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-fo-faroe-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-fr-france.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ga-gabon.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gb-eng-england.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gb-nir-northern-ireland.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gb-sct-sotland.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gb-ukm-united-kingdom.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gb-wls-wales.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gd-grenada.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ge-georgia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gf-french-guiana.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gg-guernsey.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gh-ghana.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gi-gibraltar.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gl-greenland.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gm-gambia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gn-guinea.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gp-guadeloupe-2.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gp-guadeloupe.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gq-equatorial-guinea.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gr-greece.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gs-s-georgia-and-s-sandwich-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gt-guatemala.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gu-guam.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gw-guinea-bissau.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-gy-guyana.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-hk-hong-kong.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-hm-heard-and-mcdonald-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-hn-honduras.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-hr-croatia-hrvatska.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ht-haiti.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-hu-hungary.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-id-indonesia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ie-ireland.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-il-isreal.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-im-isle-of-man.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-in-india.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-io-british-indian-ocean-territory.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-iq-iraq.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ir-iran.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-is-iceland.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-it-italy.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-je-jersey.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-jm-jamaica.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-jo-jordan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-jp-japan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ke-kenia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-kg-kyrgyzstan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-kh-cambodia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ki--kiribati.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-km-comoros.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-kn-saint-kitts-and-nevis.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-kp-korea-north.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-kr-korea-south.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-kw-kuwait.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ky-cayman-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-kz-kazakhstan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-la-laos.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-lb-lebanon.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-lc-saint-lucia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-li-liechtenstein.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-lk-sri-lanka.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-lr-liberia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ls-lesotho.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-lt-lithuania.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-lu-luxembourg.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-lv-latvia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ly-libya.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ma-morocco.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mc-monaco.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-md-moldova.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-me-montenegro.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mf-saint-martin.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mg-madagascar.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mh-marshall-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mk-north-macedonia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ml-mali.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mm-myanmar.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mn-mongolia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mo-macao.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mp-northern-mariana-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mq-martinique-2.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mq-martinique.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mr-mauritania.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ms-montserrat.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mt-malta.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mu-mauritius.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mv-maldives.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mw-malawi.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mx-mexico.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-my-malaysia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-mz-mozambique.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-na-namibia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-nc-new-caledonia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ne-niger.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-nf-norfolk-island.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ng-nigeria.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ni-nicaragua.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-nl-netherlands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-no-norway.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-np-nepal.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-nr-nauru.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-nu-niue.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-nz-new-zealand-aotearoa.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-om-oman.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pa-panama.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pe-peru.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pf-french-polynesia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pg-papua-new-guinea.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ph-philippines.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pk-pakistan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pl-poland.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pm-saint-pierre-and-miquelon.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pm-st-pierre-and-miquelon.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pn-pitcairn-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pr-puerto-rico.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ps-palestinian-territory.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pt-portugal.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-pw-palau.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-py-paraguay.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-qa-qatar.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-re-reunion.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ro-romania.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-rs-srbia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ru-russian-federation.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-rw-rwanda.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sa-sudi-arabia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sb-slomon-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sc-sychelles.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sd-sdan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-se-seden.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sg-sngapore.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sh-sint-helena.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-si-sovenia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sj-salbard-and-jan-mayen.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sk-sovakia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sl-serra-leone.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sm-sn-marino.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sn-snegal.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-so-smalia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sr-sriname.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ss-south-sudan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-st-so-tome-and-principe.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sv-el-slvador.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sx-snt-maarten.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sy-sria.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-sz-saziland.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tc-turks-and-caicos-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-td-chad.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tf-french-southern-and-antarctic-lands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tg-togo.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-th-thailand.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tj-tajikistan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tk-tokelau.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tl-timor-leste.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tm-turkmenistan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tn-tunisia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-to-tonga.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tr-turkey.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tt-trinidad-and-tobago.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tv-tuvalu.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tw-taiwan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-tz-tanzania.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ua-ukraine.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ug-uganda.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-um-united-states-minor-outlying-islands.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-us-united-states.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-uy-uruguay.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-uz-uzbekistan.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-va-vatican-city-state.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-vc-saint-vincent-and-the-grenadines.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ve-venezuela.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-vg-virgin-islands-british.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-vi-virgin-islands-us.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-vn-vietnam.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-vu-vanuatu.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-wf-wallis-and-futuna.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ws-smoa.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-ye-yemen.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-yt-unf-mayotte.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-za-south-africa.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-zm-zambia.js +1 -1
- package/dist/components/icon/gator/templates/flags/flag-zw-zimbabwe.js +1 -1
- package/dist/components/icon/gator/templates/flame.js +1 -1
- package/dist/components/icon/gator/templates/flash-off.js +1 -1
- package/dist/components/icon/gator/templates/flash-on.js +1 -1
- package/dist/components/icon/gator/templates/folder.js +1 -1
- package/dist/components/icon/gator/templates/gauge.js +1 -1
- package/dist/components/icon/gator/templates/grid-four.js +1 -1
- package/dist/components/icon/gator/templates/grid-nine.js +1 -1
- package/dist/components/icon/gator/templates/hammer.js +1 -1
- package/dist/components/icon/gator/templates/hand-pointing.js +1 -1
- package/dist/components/icon/gator/templates/heart.js +1 -1
- package/dist/components/icon/gator/templates/home-door.js +1 -1
- package/dist/components/icon/gator/templates/home-finance-arrow.js +1 -1
- package/dist/components/icon/gator/templates/home-finance.js +1 -1
- package/dist/components/icon/gator/templates/home-search.js +1 -1
- package/dist/components/icon/gator/templates/house-simple.js +1 -1
- package/dist/components/icon/gator/templates/house.js +1 -1
- package/dist/components/icon/gator/templates/inbox.js +1 -1
- package/dist/components/icon/gator/templates/index.js +1 -1
- package/dist/components/icon/gator/templates/info.js +1 -1
- package/dist/components/icon/gator/templates/instagram-logo.js +1 -1
- package/dist/components/icon/gator/templates/interest-rate.js +1 -1
- package/dist/components/icon/gator/templates/invoice.js +1 -1
- package/dist/components/icon/gator/templates/kanban.js +1 -1
- package/dist/components/icon/gator/templates/label.js +1 -1
- package/dist/components/icon/gator/templates/laptop.js +1 -1
- package/dist/components/icon/gator/templates/layout.js +1 -1
- package/dist/components/icon/gator/templates/lightbulb-filament.js +1 -1
- package/dist/components/icon/gator/templates/lightbulb.js +1 -1
- package/dist/components/icon/gator/templates/link.js +1 -1
- package/dist/components/icon/gator/templates/linkedin-logo.js +1 -1
- package/dist/components/icon/gator/templates/list-star.js +1 -1
- package/dist/components/icon/gator/templates/list.js +1 -1
- package/dist/components/icon/gator/templates/loading-spinner-gif.js +1 -1
- package/dist/components/icon/gator/templates/loading.js +1 -1
- package/dist/components/icon/gator/templates/lock.js +1 -1
- package/dist/components/icon/gator/templates/magic-wand.js +1 -1
- package/dist/components/icon/gator/templates/mail-open.js +1 -1
- package/dist/components/icon/gator/templates/mail.js +1 -1
- package/dist/components/icon/gator/templates/mailbox.js +1 -1
- package/dist/components/icon/gator/templates/map.js +1 -1
- package/dist/components/icon/gator/templates/menu-hamburger.js +1 -1
- package/dist/components/icon/gator/templates/microsoft-excel-logo.js +1 -1
- package/dist/components/icon/gator/templates/microsoft-outlook-logo.js +1 -1
- package/dist/components/icon/gator/templates/microsoft-powerpoint-logo.js +1 -1
- package/dist/components/icon/gator/templates/microsoft-teams-logo.js +1 -1
- package/dist/components/icon/gator/templates/microsoft-word-logo.js +1 -1
- package/dist/components/icon/gator/templates/minus-circle.js +1 -1
- package/dist/components/icon/gator/templates/minus-square.js +1 -1
- package/dist/components/icon/gator/templates/minus.js +1 -1
- package/dist/components/icon/gator/templates/mobile-phone-2.js +1 -1
- package/dist/components/icon/gator/templates/monitor.js +1 -1
- package/dist/components/icon/gator/templates/move-doc.js +1 -1
- package/dist/components/icon/gator/templates/move.js +1 -1
- package/dist/components/icon/gator/templates/music.js +1 -1
- package/dist/components/icon/gator/templates/number-0.js +1 -1
- package/dist/components/icon/gator/templates/number-1.js +1 -1
- package/dist/components/icon/gator/templates/number-10.js +1 -1
- package/dist/components/icon/gator/templates/number-2.js +1 -1
- package/dist/components/icon/gator/templates/number-3.js +1 -1
- package/dist/components/icon/gator/templates/number-4.js +1 -1
- package/dist/components/icon/gator/templates/number-5.js +1 -1
- package/dist/components/icon/gator/templates/number-6.js +1 -1
- package/dist/components/icon/gator/templates/number-7.js +1 -1
- package/dist/components/icon/gator/templates/number-8.js +1 -1
- package/dist/components/icon/gator/templates/number-9.js +1 -1
- package/dist/components/icon/gator/templates/overflow-menu.js +1 -1
- package/dist/components/icon/gator/templates/paper-airplane.js +1 -1
- package/dist/components/icon/gator/templates/paperclip.js +1 -1
- package/dist/components/icon/gator/templates/pause-circle.js +1 -1
- package/dist/components/icon/gator/templates/pause.js +1 -1
- package/dist/components/icon/gator/templates/payments/payment-amazon-pay.js +1 -1
- package/dist/components/icon/gator/templates/payments/payment-amex.js +1 -1
- package/dist/components/icon/gator/templates/payments/payment-apple-pay.js +1 -1
- package/dist/components/icon/gator/templates/payments/payment-discover.js +1 -1
- package/dist/components/icon/gator/templates/payments/payment-google-pay.js +1 -1
- package/dist/components/icon/gator/templates/payments/payment-mastercard.js +1 -1
- package/dist/components/icon/gator/templates/payments/payment-visa.js +1 -1
- package/dist/components/icon/gator/templates/pen.js +1 -1
- package/dist/components/icon/gator/templates/pencil-paper.js +1 -1
- package/dist/components/icon/gator/templates/pencil.js +1 -1
- package/dist/components/icon/gator/templates/people-multiple.js +1 -1
- package/dist/components/icon/gator/templates/people-share.js +1 -1
- package/dist/components/icon/gator/templates/percent.js +1 -1
- package/dist/components/icon/gator/templates/person-add.js +1 -1
- package/dist/components/icon/gator/templates/person-check.js +1 -1
- package/dist/components/icon/gator/templates/person-lock.js +1 -1
- package/dist/components/icon/gator/templates/person.js +1 -1
- package/dist/components/icon/gator/templates/phone-alert.js +1 -1
- package/dist/components/icon/gator/templates/phone-mobile.js +1 -1
- package/dist/components/icon/gator/templates/phone.js +1 -1
- package/dist/components/icon/gator/templates/picture.js +1 -1
- package/dist/components/icon/gator/templates/pin.js +1 -1
- package/dist/components/icon/gator/templates/pinterest-logo.js +1 -1
- package/dist/components/icon/gator/templates/play-circle.js +1 -1
- package/dist/components/icon/gator/templates/play.js +1 -1
- package/dist/components/icon/gator/templates/plugs-connected.js +1 -1
- package/dist/components/icon/gator/templates/plugs.js +1 -1
- package/dist/components/icon/gator/templates/plus-circle.js +1 -1
- package/dist/components/icon/gator/templates/plus.js +1 -1
- package/dist/components/icon/gator/templates/printer.js +1 -1
- package/dist/components/icon/gator/templates/question-chat-bubble.js +1 -1
- package/dist/components/icon/gator/templates/question-circle.js +1 -1
- package/dist/components/icon/gator/templates/question-mark.js +1 -1
- package/dist/components/icon/gator/templates/radio-selected.js +1 -1
- package/dist/components/icon/gator/templates/radio.js +1 -1
- package/dist/components/icon/gator/templates/receipt.js +1 -1
- package/dist/components/icon/gator/templates/restricted-filled.js +1 -1
- package/dist/components/icon/gator/templates/restricted.js +1 -1
- package/dist/components/icon/gator/templates/robot.js +1 -1
- package/dist/components/icon/gator/templates/sandals.js +1 -1
- package/dist/components/icon/gator/templates/save.js +1 -1
- package/dist/components/icon/gator/templates/screen.js +1 -1
- package/dist/components/icon/gator/templates/search.js +1 -1
- package/dist/components/icon/gator/templates/selection.js +1 -1
- package/dist/components/icon/gator/templates/send-filled.js +1 -1
- package/dist/components/icon/gator/templates/send.js +1 -1
- package/dist/components/icon/gator/templates/settings.js +1 -1
- package/dist/components/icon/gator/templates/share-1.js +1 -1
- package/dist/components/icon/gator/templates/share-2.js +1 -1
- package/dist/components/icon/gator/templates/shield-lock.js +1 -1
- package/dist/components/icon/gator/templates/shield-warning.js +1 -1
- package/dist/components/icon/gator/templates/sidebar-simple.js +1 -1
- package/dist/components/icon/gator/templates/sidebar.js +1 -1
- package/dist/components/icon/gator/templates/smart-home.js +1 -1
- package/dist/components/icon/gator/templates/sort-arrow-solid-down.js +1 -1
- package/dist/components/icon/gator/templates/sort-arrow-solid-left.js +1 -1
- package/dist/components/icon/gator/templates/sort-arrow-solid-right.js +1 -1
- package/dist/components/icon/gator/templates/sort-arrow-solid-up-down.js +1 -1
- package/dist/components/icon/gator/templates/sort-arrow-solid-up.js +1 -1
- package/dist/components/icon/gator/templates/sort-reverse-variant.js +1 -1
- package/dist/components/icon/gator/templates/sort-variant.js +1 -1
- package/dist/components/icon/gator/templates/sparkle-filled.js +1 -1
- package/dist/components/icon/gator/templates/sparkle.js +1 -1
- package/dist/components/icon/gator/templates/speech-bubble.js +1 -1
- package/dist/components/icon/gator/templates/square-split-horizontal.js +1 -1
- package/dist/components/icon/gator/templates/square-split-vertical.js +1 -1
- package/dist/components/icon/gator/templates/square.js +1 -1
- package/dist/components/icon/gator/templates/stack.js +1 -1
- package/dist/components/icon/gator/templates/stamp.js +1 -1
- package/dist/components/icon/gator/templates/star-four-filled.js +1 -1
- package/dist/components/icon/gator/templates/star-four.js +1 -1
- package/dist/components/icon/gator/templates/star.js +1 -1
- package/dist/components/icon/gator/templates/stopwatch.js +1 -1
- package/dist/components/icon/gator/templates/sun.js +1 -1
- package/dist/components/icon/gator/templates/sync.js +1 -1
- package/dist/components/icon/gator/templates/tab-arrows.js +1 -1
- package/dist/components/icon/gator/templates/table.js +1 -1
- package/dist/components/icon/gator/templates/target.js +1 -1
- package/dist/components/icon/gator/templates/text-aa.js +1 -1
- package/dist/components/icon/gator/templates/thumbs-down.js +1 -1
- package/dist/components/icon/gator/templates/thumbs-up.js +1 -1
- package/dist/components/icon/gator/templates/tools.js +1 -1
- package/dist/components/icon/gator/templates/touch-id.js +1 -1
- package/dist/components/icon/gator/templates/trash.js +1 -1
- package/dist/components/icon/gator/templates/trend-up.js +1 -1
- package/dist/components/icon/gator/templates/twitter-logo.js +1 -1
- package/dist/components/icon/gator/templates/unlink.js +1 -1
- package/dist/components/icon/gator/templates/unlock.js +1 -1
- package/dist/components/icon/gator/templates/upload.js +1 -1
- package/dist/components/icon/gator/templates/video.js +1 -1
- package/dist/components/icon/gator/templates/waffle.js +1 -1
- package/dist/components/icon/gator/templates/warning-circle.js +1 -1
- package/dist/components/icon/gator/templates/warning-diamond.js +1 -1
- package/dist/components/icon/gator/templates/warning-filled.js +1 -1
- package/dist/components/icon/gator/templates/warning-octagon.js +1 -1
- package/dist/components/icon/gator/templates/warning.js +1 -1
- package/dist/components/icon/gator/templates/wet-sign.js +1 -1
- package/dist/components/icon/gator/templates/wifi-off.js +1 -1
- package/dist/components/icon/gator/templates/wifi.js +1 -1
- package/dist/components/icon/gator/templates/x-logo.js +1 -1
- package/dist/components/icon/gator/templates/yelp-logo.js +1 -1
- package/dist/components/icon/gator/templates/youtube-logo.js +1 -1
- package/dist/components/icon/gator/templates/zillow-logo.js +1 -1
- package/dist/components/icon/icon.js +1 -1
- package/dist/components/icon/slds/icon.slds.js +1 -1
- package/dist/components/icon-button/gator/icon-button.gator.js +2 -2
- package/dist/components/illustration/gator/illustration.gator.js +1 -1
- package/dist/components/illustration/gator/templates/add-note.js +1 -1
- package/dist/components/illustration/gator/templates/address.js +1 -1
- package/dist/components/illustration/gator/templates/appointment-confirmed.js +1 -1
- package/dist/components/illustration/gator/templates/assets.js +1 -1
- package/dist/components/illustration/gator/templates/auto-money.js +1 -1
- package/dist/components/illustration/gator/templates/balloons.js +1 -1
- package/dist/components/illustration/gator/templates/bank-account.js +1 -1
- package/dist/components/illustration/gator/templates/brief-case.js +1 -1
- package/dist/components/illustration/gator/templates/calendar-home.js +1 -1
- package/dist/components/illustration/gator/templates/change-data.js +1 -1
- package/dist/components/illustration/gator/templates/check-with-pencil.js +1 -1
- package/dist/components/illustration/gator/templates/co-borrower.js +1 -1
- package/dist/components/illustration/gator/templates/co-borrowers-incomplete.js +1 -1
- package/dist/components/illustration/gator/templates/co-borrowers.js +1 -1
- package/dist/components/illustration/gator/templates/commercial.js +1 -1
- package/dist/components/illustration/gator/templates/condo.js +1 -1
- package/dist/components/illustration/gator/templates/connectivity.js +1 -1
- package/dist/components/illustration/gator/templates/consumer.js +1 -1
- package/dist/components/illustration/gator/templates/contact-search.js +1 -1
- package/dist/components/illustration/gator/templates/conversation-multiple.js +1 -1
- package/dist/components/illustration/gator/templates/credit-card.js +1 -1
- package/dist/components/illustration/gator/templates/crop-background.js +1 -1
- package/dist/components/illustration/gator/templates/crop-page.js +1 -1
- package/dist/components/illustration/gator/templates/declarations-legal.js +1 -1
- package/dist/components/illustration/gator/templates/deliver.js +1 -1
- package/dist/components/illustration/gator/templates/demographic-info.js +1 -1
- package/dist/components/illustration/gator/templates/document-add.js +1 -1
- package/dist/components/illustration/gator/templates/document-signature.js +1 -1
- package/dist/components/illustration/gator/templates/download-app.js +1 -1
- package/dist/components/illustration/gator/templates/empty-box.js +1 -1
- package/dist/components/illustration/gator/templates/family-home.js +1 -1
- package/dist/components/illustration/gator/templates/home-search.js +1 -1
- package/dist/components/illustration/gator/templates/house-5.js +1 -1
- package/dist/components/illustration/gator/templates/house-6.js +1 -1
- package/dist/components/illustration/gator/templates/house-fireworks.js +1 -1
- package/dist/components/illustration/gator/templates/house-under-construction.js +1 -1
- package/dist/components/illustration/gator/templates/house-with-shield.js +1 -1
- package/dist/components/illustration/gator/templates/inquiry.js +1 -1
- package/dist/components/illustration/gator/templates/locked.js +1 -1
- package/dist/components/illustration/gator/templates/make-an-offer.js +1 -1
- package/dist/components/illustration/gator/templates/mortgage.js +1 -1
- package/dist/components/illustration/gator/templates/network-error.js +1 -1
- package/dist/components/illustration/gator/templates/page-1.js +1 -1
- package/dist/components/illustration/gator/templates/page-2.js +1 -1
- package/dist/components/illustration/gator/templates/page-3.js +1 -1
- package/dist/components/illustration/gator/templates/paper-3.js +1 -1
- package/dist/components/illustration/gator/templates/paper-7.js +1 -1
- package/dist/components/illustration/gator/templates/person-2.js +1 -1
- package/dist/components/illustration/gator/templates/personal-info.js +1 -1
- package/dist/components/illustration/gator/templates/portfolio-analytics.js +1 -1
- package/dist/components/illustration/gator/templates/price-search.js +1 -1
- package/dist/components/illustration/gator/templates/quick-links.js +1 -1
- package/dist/components/illustration/gator/templates/register.js +1 -1
- package/dist/components/illustration/gator/templates/schedule-home-tour.js +1 -1
- package/dist/components/illustration/gator/templates/small-business.js +1 -1
- package/dist/components/illustration/gator/templates/social-security.js +1 -1
- package/dist/components/illustration/gator/templates/start-conversation.js +1 -1
- package/dist/components/illustration/gator/templates/status-no-x.js +1 -1
- package/dist/components/illustration/gator/templates/status.js +1 -1
- package/dist/components/illustration/gator/templates/success.js +1 -1
- package/dist/components/illustration/gator/templates/talkluments.js +1 -1
- package/dist/components/illustration/gator/templates/thumbs-down-man.js +1 -1
- package/dist/components/illustration/gator/templates/town-home.js +1 -1
- package/dist/components/illustration/gator/templates/transfer.js +1 -1
- package/dist/components/illustration/gator/templates/treasury.js +1 -1
- package/dist/components/illustration/gator/templates/unsecured-line-of-credit.js +1 -1
- package/dist/components/illustration/gator/templates/upload-cloud.js +1 -1
- package/dist/components/illustration/gator/templates/your-bank-placeholder.js +1 -1
- package/dist/components/illustration/gator/templates/your-bank.js +1 -1
- package/dist/components/image-card/gator/image-card.gator.js +1 -1
- package/dist/components/input/base/input-base.gator.js +3 -3
- package/dist/components/input/gator/dropdown/input-dropdown.gator.js +1 -1
- package/dist/components/input/gator/help-text/help-text.gator.js +3 -3
- package/dist/components/input/gator/input-currency/input-currency.gator.js +2 -2
- package/dist/components/input/gator/input-date/input-date.gator.js +2 -2
- package/dist/components/input/gator/input-file/file-uploaded-preview/file-upload-preview.gator.js +1 -1
- package/dist/components/input/gator/input-file/input-file.gator.js +1 -1
- package/dist/components/input/gator/input-group/input-group.gator.js +1 -1
- package/dist/components/input/gator/input-label/input-label.gator.js +1 -1
- package/dist/components/input/gator/input-phone/input-phone.gator.js +1 -1
- package/dist/components/input/gator/input-search/input-search.gator.js +1 -1
- package/dist/components/input/gator/input-text/input-text.gator.js +1 -1
- package/dist/components/input/gator/input-textarea/input-textarea.gator.js +1 -1
- package/dist/components/input/gator/input-time/input-time.gator.js +1 -1
- package/dist/components/input/slds/input-error/input-error.slds.js +1 -1
- package/dist/components/input/slds/input-label/input-label.slds.js +2 -2
- package/dist/components/input/slds/input-text/input-text.slds.js +1 -1
- package/dist/components/input-rich-text/ckeditor-config.js +1 -1
- package/dist/components/input-rich-text/input-rich-text.js +1 -1
- package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
- package/dist/components/list/gator/list/list.gator.js +1 -1
- package/dist/components/list/gator/list-item/list-item.gator.js +1 -1
- package/dist/components/loading-spinner/gator/loading-spinner.gator.js +2 -2
- package/dist/components/loading-spinner/loading-spinner.js +1 -1
- package/dist/components/menu/base/gator/menu.gator.js +2 -2
- package/dist/components/menu/base/slds/menu.slds.js +2 -2
- package/dist/components/menu/menu-divider/menu-divider.js +1 -1
- package/dist/components/menu/menu-divider/menu-divider.slds.js +1 -1
- package/dist/components/menu/menu-item/gator/menu-item.gator.js +1 -1
- package/dist/components/menu/menu-item/menu-item.js +1 -1
- package/dist/components/menu/menu-item/slds/menu-item.slds.js +1 -1
- package/dist/components/menu/menu-submenu/menu-submenu.js +1 -1
- package/dist/components/menu/menu-submenu/menu-submenu.slds.js +1 -1
- package/dist/components/modal/gator/modal.gator.js +1 -1
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/page-header/gator/page-header.gator.js +2 -2
- package/dist/components/panel/gator/panel.gator.js +2 -2
- package/dist/components/panel/gator/panel.storybook-test.js +1 -1
- package/dist/components/pill/pill.js +1 -1
- package/dist/components/pill/pill.slds.js +1 -1
- package/dist/components/popover/gator/popover.gator.js +1 -1
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/progress-bar/gator/progress-bar.gator.js +1 -1
- package/dist/components/progress-ring/gator/progress-ring.gator.js +1 -1
- package/dist/components/progress-stepper/base/progress-stepper.gator.js +1 -1
- package/dist/components/progress-stepper/stepper-item/stepper-item.gator.js +1 -1
- package/dist/components/radio/radio.gator.js +1 -1
- package/dist/components/radio-group/radio-group.gator.js +1 -1
- package/dist/components/scoped-notification/scoped-notification.js +1 -1
- package/dist/components/scoped-notification/scoped-notification.slds.js +1 -1
- package/dist/components/selection-box/selection-box.gator.js +1 -1
- package/dist/components/selection-box-group/selection-box-group.gator.js +1 -1
- package/dist/components/selector/gator/selector.gator.js +2 -2
- package/dist/components/skeleton-loader/gator/skeleton-loader.gator.js +1 -1
- package/dist/components/skip-link/gator/base/skip-link.gator.js +2 -2
- package/dist/components/skip-link/gator/list-item/skip-link-list-item.gator.js +1 -1
- package/dist/components/switch/gator/switch.gator.js +1 -1
- package/dist/components/table/gator/__tests__/test-table-data.js +1 -1
- package/dist/components/table/gator/table-bulk-controls/table-bulk-controls.gator.js +1 -1
- package/dist/components/table/gator/table-cells/index.js +1 -0
- package/dist/components/table/gator/table-cells/table-cell-avatar.gator.js +5 -0
- package/dist/components/table/gator/table-cells/table-cell-base.gator.js +9 -0
- package/dist/components/table/gator/table-cells/table-cell-button.gator.js +7 -0
- package/dist/components/table/gator/table-cells/table-cell-checkbox.gator.js +7 -0
- package/dist/components/table/gator/table-cells/table-cell-chip.gator.js +3 -0
- package/dist/components/table/gator/table-cells/table-cell-icon-button.gator.js +23 -0
- package/dist/components/table/gator/table-cells/table-cell-input-dropdown.gator.js +10 -0
- package/dist/components/table/gator/table-cells/table-cell-input-text.gator.js +8 -0
- package/dist/components/table/gator/table-cells/table-cell-text-link.gator.js +3 -0
- package/dist/components/table/gator/table-cells/table-cell-text.gator.js +1 -0
- package/dist/components/table/gator/table-controls/table-controls.gator.js +1 -1
- package/dist/components/table/gator/table-pagination/table-pagination.gator.js +1 -1
- package/dist/components/table/gator/table.gator.js +135 -45
- package/dist/components/table/table-cell-config.js +1 -0
- package/dist/components/table/table-column-definition.js +1 -0
- package/dist/components/table/table-format-utils.js +1 -0
- package/dist/components/tabs/gator/tab/tab.gator.js +1 -1
- package/dist/components/tabs/gator/tabset/tabset.gator.js +1 -1
- package/dist/components/text-detail/gator/text-detail.gator.js +8 -8
- package/dist/components/text-link/gator/text-link.gator.js +2 -2
- package/dist/components/time-picker/gator/time-picker.gator.js +1 -1
- package/dist/components/toast/gator/base/toast.gator.js +2 -2
- package/dist/components/toast/gator/subtitle/toast-subtitle.gator.js +2 -2
- package/dist/components/toast/gator/title/toast-title.gator.js +2 -2
- package/dist/components/toast/toast.js +1 -1
- package/dist/components/toast-container/gator/toast-container.gator.js +4 -4
- package/dist/components/toaster/gator/toaster.gator.js +2 -2
- package/dist/components/tooltip/gator/tooltip.gator.js +1 -1
- package/dist/components/tooltip/slds/tooltip.slds.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/design-tokens.source.json +1 -0
- package/dist/generated/locale-codes.js +1 -0
- package/dist/generated/locales/es-419.js +10 -0
- package/dist/generated/locales/fr-CA.js +10 -0
- package/dist/generated/locales/zh-Hans.js +11 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-alignment@47.5.0 → @ckeditor_ckeditor5-alignment@47.6.0}/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autoformat@47.5.0 → @ckeditor_ckeditor5-autoformat@47.6.0}/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autosave@47.5.0 → @ckeditor_ckeditor5-autosave@47.6.0}/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-basic-styles@47.5.0 → @ckeditor_ckeditor5-basic-styles@47.6.0}/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-block-quote@47.5.0 → @ckeditor_ckeditor5-block-quote@47.6.0}/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-clipboard@47.5.0 → @ckeditor_ckeditor5-clipboard@47.6.0}/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-cloud-services@47.5.0 → @ckeditor_ckeditor5-cloud-services@47.6.0}/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-code-block@47.5.0 → @ckeditor_ckeditor5-code-block@47.6.0}/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-core@47.5.0 → @ckeditor_ckeditor5-core@47.6.0}/node_modules/@ckeditor/ckeditor5-core/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-editor-classic@47.5.0 → @ckeditor_ckeditor5-editor-classic@47.6.0}/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-engine@47.5.0 → @ckeditor_ckeditor5-engine@47.6.0}/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-enter@47.5.0 → @ckeditor_ckeditor5-enter@47.6.0}/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-essentials@47.5.0 → @ckeditor_ckeditor5-essentials@47.6.0}/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-find-and-replace@47.5.0 → @ckeditor_ckeditor5-find-and-replace@47.6.0}/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-font@47.5.0 → @ckeditor_ckeditor5-font@47.6.0}/node_modules/@ckeditor/ckeditor5-font/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-heading@47.5.0 → @ckeditor_ckeditor5-heading@47.6.0}/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-highlight@47.5.0 → @ckeditor_ckeditor5-highlight@47.6.0}/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-horizontal-line@47.5.0 → @ckeditor_ckeditor5-horizontal-line@47.6.0}/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-embed@47.5.0 → @ckeditor_ckeditor5-html-embed@47.6.0}/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@47.6.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +3 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-icons@47.5.0 → @ckeditor_ckeditor5-icons@47.6.0}/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-image@47.5.0 → @ckeditor_ckeditor5-image@47.6.0}/node_modules/@ckeditor/ckeditor5-image/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@47.6.0/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-language@47.5.0 → @ckeditor_ckeditor5-language@47.6.0}/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@47.6.0/node_modules/@ckeditor/ckeditor5-link/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@47.6.0/node_modules/@ckeditor/ckeditor5-list/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-markdown-gfm@47.5.0 → @ckeditor_ckeditor5-markdown-gfm@47.6.0}/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-media-embed@47.5.0 → @ckeditor_ckeditor5-media-embed@47.6.0}/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-mention@47.5.0 → @ckeditor_ckeditor5-mention@47.6.0}/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-page-break@47.5.0 → @ckeditor_ckeditor5-page-break@47.6.0}/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paragraph@47.5.0 → @ckeditor_ckeditor5-paragraph@47.6.0}/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paste-from-office@47.6.0/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-remove-format@47.5.0 → @ckeditor_ckeditor5-remove-format@47.6.0}/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-select-all@47.5.0 → @ckeditor_ckeditor5-select-all@47.6.0}/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-show-blocks@47.5.0 → @ckeditor_ckeditor5-show-blocks@47.6.0}/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-source-editing@47.5.0 → @ckeditor_ckeditor5-source-editing@47.6.0}/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-special-characters@47.5.0 → @ckeditor_ckeditor5-special-characters@47.6.0}/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-style@47.5.0 → @ckeditor_ckeditor5-style@47.6.0}/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@47.6.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-typing@47.5.0 → @ckeditor_ckeditor5-typing@47.6.0}/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-ui@47.5.0 → @ckeditor_ckeditor5-ui@47.6.0}/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-undo@47.5.0 → @ckeditor_ckeditor5-undo@47.6.0}/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-upload@47.5.0 → @ckeditor_ckeditor5-upload@47.6.0}/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@47.6.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +8 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-widget@47.5.0 → @ckeditor_ckeditor5-widget@47.6.0}/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.4/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -0
- package/dist/node_modules/.pnpm/{@floating-ui_dom@1.7.4 → @floating-ui_dom@1.7.5}/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/default-msg.js +1 -1
- package/dist/node_modules/.pnpm/{@vitest_expect@4.0.15 → @vitest_expect@4.0.18}/node_modules/@vitest/expect/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@vitest_pretty-format@4.0.15 → @vitest_pretty-format@4.0.18}/node_modules/@vitest/pretty-format/dist/index.js +4 -4
- package/dist/node_modules/.pnpm/{@vitest_runner@4.0.15 → @vitest_runner@4.0.18}/node_modules/@vitest/runner/dist/chunk-tasks.js +1 -1
- package/dist/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/index.js +9 -0
- package/dist/node_modules/.pnpm/{@vitest_snapshot@4.0.15 → @vitest_snapshot@4.0.18}/node_modules/@vitest/snapshot/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/diff.js +42 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/display.js +2 -0
- package/dist/node_modules/.pnpm/axe-core@4.11.1/node_modules/axe-core/axe.js +20 -0
- package/dist/node_modules/.pnpm/{chai@6.2.1 → chai@6.2.2}/node_modules/chai/index.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/object/pick.js +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isNil.js +1 -0
- package/dist/node_modules/.pnpm/hast-util-minify-whitespace@1.0.1/node_modules/hast-util-minify-whitespace/lib/index.js +1 -1
- package/dist/node_modules/.pnpm/hast-util-phrasing@3.0.1/node_modules/hast-util-phrasing/lib/index.js +1 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.37/node_modules/libphonenumber-js/es6/format.js +1 -0
- package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +2 -2
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.37/node_modules/libphonenumber-js/metadata.min.json.js +1 -0
- package/dist/node_modules/.pnpm/{lit-element@4.2.1 → lit-element@4.2.2}/node_modules/lit-element/lit-element.js +1 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directive-helpers.js +1 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/class-map.js +1 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/live.js +1 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.js +1 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js +3 -0
- package/dist/node_modules/.pnpm/mdast-util-from-markdown@2.0.3/node_modules/mdast-util-from-markdown/lib/index.js +1 -0
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.js +1 -1
- package/dist/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.js +1 -1
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.js +1 -1
- package/dist/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.js +1 -1
- package/dist/node_modules/.pnpm/{storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/test/index.js +3 -3
- package/dist/node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/entrypoints/hex.js +1 -1
- package/dist/node_modules/.pnpm/{vitest@4.0.15_@types_node@24.10.1_@vitest_browser-playwright@4.0.15_@vitest_ui@4.0.15_j_de8744cadc3bcf01c58195dfa0e650cb → vitest@4.0.18_@types_node@24.10.13_@vitest_browser-playwright@4.0.18_@vitest_ui@4.0.18__cf0e1d2cbbe808e71fa49297d0a4a6dd}/node_modules/vitest/dist/chunks/vi.2VT5v0um.js +1 -1
- package/dist/packages/web-components/src/components/popover/gator/popover.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/table/gator/table.gator.scss.js +1 -1
- package/dist/types/components/icon/gator/templates/arrows-down-up.d.ts +1 -0
- package/dist/types/components/icon/gator/templates/index.d.ts +1 -0
- package/dist/types/components/popover/popover.d.ts +2 -0
- package/dist/types/components/table/gator/__tests__/test-table-data.d.ts +27 -0
- package/dist/types/components/table/gator/table-cells/index.d.ts +0 -0
- package/dist/types/components/table/gator/table-cells/table-cell-avatar.gator.d.ts +4 -0
- package/dist/types/components/table/gator/table-cells/table-cell-base.gator.d.ts +22 -0
- package/dist/types/components/table/gator/table-cells/table-cell-button.gator.d.ts +4 -0
- package/dist/types/components/table/gator/table-cells/table-cell-checkbox.gator.d.ts +4 -0
- package/dist/types/components/table/gator/table-cells/table-cell-chip.gator.d.ts +4 -0
- package/dist/types/components/table/gator/table-cells/table-cell-icon-button.gator.d.ts +5 -0
- package/dist/types/components/table/gator/table-cells/table-cell-input-dropdown.gator.d.ts +4 -0
- package/dist/types/components/table/gator/table-cells/table-cell-input-text.gator.d.ts +4 -0
- package/dist/types/components/table/gator/table-cells/table-cell-text-link.gator.d.ts +4 -0
- package/dist/types/components/table/gator/table-cells/table-cell-text.gator.d.ts +4 -0
- package/dist/types/components/table/gator/table.gator.d.ts +36 -5
- package/dist/types/components/table/table-cell-config.d.ts +56 -0
- package/dist/types/components/table/table-column-definition.d.ts +56 -0
- package/dist/types/components/table/table-format-utils.d.ts +3 -0
- package/dist/types/components/table/table.d.ts +2 -11
- package/dist/types/generated/locale-codes.d.ts +13 -0
- package/dist/types/generated/locales/es-419.d.ts +65 -0
- package/dist/types/generated/locales/fr-CA.d.ts +65 -0
- package/dist/types/generated/locales/zh-Hans.d.ts +65 -0
- package/dist/utils/components/gradient-background.js +1 -1
- package/dist/utils/components/illustration-list/illustration-list.gator.js +1 -1
- package/dist/utils/components/ngc-component.js +1 -1
- package/dist/utils/components/slot-placeholder/slot-placeholder.js +1 -1
- package/dist/utils/components/testable-lit-element/testable-lit-element.js +1 -1
- package/dist/utils/mixins/interactive-component.js +1 -1
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/package.json +37 -43
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@47.5.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +0 -3
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@47.5.0/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@47.5.0/node_modules/@ckeditor/ckeditor5-link/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@47.5.0/node_modules/@ckeditor/ckeditor5-list/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paste-from-office@47.5.0/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@47.5.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@47.5.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +0 -8
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_runner@4.0.15/node_modules/@vitest/runner/dist/index.js +0 -4
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/diff.js +0 -42
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/display.js +0 -2
- package/dist/node_modules/.pnpm/axe-core@4.11.0/node_modules/axe-core/axe.js +0 -20
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.31/node_modules/libphonenumber-js/es6/format.js +0 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.31/node_modules/libphonenumber-js/metadata.min.json.js +0 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +0 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js +0 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/live.js +0 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/repeat.js +0 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js +0 -3
- package/dist/node_modules/.pnpm/mdast-util-from-markdown@2.0.2/node_modules/mdast-util-from-markdown/lib/index.js +0 -1
- /package/dist/assets/node_modules/.pnpm/{ckeditor5@47.5.0 → ckeditor5@47.6.0}/node_modules/ckeditor5/dist/ckeditor5.css +0 -0
- /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-watchdog@47.5.0 → @ckeditor_ckeditor5-watchdog@47.6.0}/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_spy@4.0.15 → @vitest_spy@4.0.18}/node_modules/@vitest/spy/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@4.0.15 → @vitest_utils@4.0.18}/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@4.0.15 → @vitest_utils@4.0.18}/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@4.0.15 → @vitest_utils@4.0.18}/node_modules/@vitest/utils/dist/error.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@4.0.15 → @vitest_utils@4.0.18}/node_modules/@vitest/utils/dist/helpers.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@4.0.15 → @vitest_utils@4.0.18}/node_modules/@vitest/utils/dist/serialize.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@4.0.15 → @vitest_utils@4.0.18}/node_modules/@vitest/utils/dist/source-map.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@4.0.15 → @vitest_utils@4.0.18}/node_modules/@vitest/utils/dist/timers.js +0 -0
- /package/dist/node_modules/.pnpm/{decode-named-character-reference@1.2.0 → decode-named-character-reference@1.3.0}/node_modules/decode-named-character-reference/index.dom.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/ParseError.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/PhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/isObject.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/isPossible.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/isValid.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/metadata.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/normalizeArguments.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/parse.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/es6/tools/semver-compare.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.31 → libphonenumber-js@1.12.37}/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +0 -0
- /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/async-directive.js +0 -0
- /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/directive.js +0 -0
- /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/directives/if-defined.js +0 -0
- /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/directives/ref.js +0 -0
- /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/directives/unsafe-html.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-3LY4VQVK.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-A242L54C.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-Q5RYDXT3.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-VIJ7SQRO.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-ZUWEVLDX.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/client-logger/index.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/core-events/index.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/instrumenter/index.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@4.0.15_@types_node@24.10.1_@vitest_browser-playwright@4.0.15_@vitest_ui@4.0.15_j_de8744cadc3bcf01c58195dfa0e650cb → vitest@4.0.18_@types_node@24.10.13_@vitest_browser-playwright@4.0.18_@vitest_ui@4.0.18__cf0e1d2cbbe808e71fa49297d0a4a6dd}/node_modules/vitest/browser/context.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@4.0.15_@types_node@24.10.1_@vitest_browser-playwright@4.0.15_@vitest_ui@4.0.15_j_de8744cadc3bcf01c58195dfa0e650cb → vitest@4.0.18_@types_node@24.10.13_@vitest_browser-playwright@4.0.18_@vitest_ui@4.0.18__cf0e1d2cbbe808e71fa49297d0a4a6dd}/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@4.0.15_@types_node@24.10.1_@vitest_browser-playwright@4.0.15_@vitest_ui@4.0.15_j_de8744cadc3bcf01c58195dfa0e650cb → vitest@4.0.18_@types_node@24.10.13_@vitest_browser-playwright@4.0.18_@vitest_ui@4.0.18__cf0e1d2cbbe808e71fa49297d0a4a6dd}/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js +0 -0
- /package/dist/packages/styles/{src → dist}/gator/tokens/primitive.tokens.css.js +0 -0
- /package/dist/packages/styles/{src → dist}/gator/tokens/semantic.tokens.css.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Plugin as A,Command as R}from"../../../../../@ckeditor_ckeditor5-core@47.6.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Widget as fn,WidgetToolbarRepository as Ye,toWidgetEditable as kt,isWidget as pn,toWidget as Cn}from"../../../../../@ckeditor_ckeditor5-widget@47.6.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{Collection as It,first as Te,getLocalizedArrowKeyCodeDirection as wn,uid as Tn,DomEmitterMixin as yn,global as ue,Rect as de,CKEditorError as Qe,KeystrokeHandler as ye,FocusTracker as _e,priorities as _n,toUnit as An}from"../../../../../@ckeditor_ckeditor5-utils@47.6.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconTable as et,IconTableColumn as vn,IconTableRow as Sn,IconTableMergeCell as Rn,IconCaption as kn,IconTableCellProperties as In,IconTableProperties as xn,IconCheck as xt,IconCancel as Pt,IconObjectInlineRight as Pn,IconObjectCenter as En,IconObjectInlineLeft as Vn,IconAlignBottom as Ln,IconAlignMiddle as Wn,IconAlignTop as Nn,IconAlignJustify as Bn,IconAlignRight as Fn,IconAlignCenter as Dn,IconAlignLeft as Mn}from"../../../../../@ckeditor_ckeditor5-icons@47.6.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{createDropdown as se,MenuBarMenuView as On,SwitchButtonView as Hn,addListToDropdown as He,ButtonView as N,ContextualBalloon as me,normalizeColorOptions as he,getLocalizedColorOptions as ge,clickOutsideHandler as Et,SplitButtonView as zn,View as z,addKeyboardHandlingForGrid as Un,UIModel as Vt,ViewCollection as ze,FocusCycler as Ue,FormHeaderView as Lt,FormRowView as x,submitHandler as Wt,LabelView as D,LabeledFieldView as P,createLabeledDropdown as Nt,createLabeledInputText as H,ToolbarView as xe,BalloonPanelView as O,InputTextView as $n,ColorSelectorView as jn}from"../../../../../@ckeditor_ckeditor5-ui@47.6.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{ClipboardMarkersUtils as Re,ClipboardPipeline as tt}from"../../../../../@ckeditor_ckeditor5-clipboard@47.6.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{enableViewPlaceholder as Gn,ModelElement as Kn,addBorderStylesRules as Bt,addPaddingStylesRules as qn,addBackgroundStylesRules as Ft,addMarginStylesRules as Xn,DomEventObserver as Jn,isColorStyleValue as Zn,isLengthStyleValue as Dt,isPercentageStyleValue as Yn}from"../../../../../@ckeditor_ckeditor5-engine@47.6.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{debounce as Mt}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/debounce.js";import{isEqual as nt}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqual.js";import{throttle as Qn}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/throttle.js";import{isObject as eo}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isObject.js";const to=/^(left|center|right)$/,no=/^(left|none|right)$/;function $e(i,e){const{modelAttribute:t,styleName:n,attributeName:o,attributeType:l,viewElement:s,defaultValue:r,shouldUpcast:c=()=>!0,reduceBoxSides:a=!1}=e;i.for("upcast").attributeToAttribute({view:{name:s,styles:{[n]:/[\s\S]+/}},model:{key:t,value:(u,d,m)=>{if(!c(u))return;const h=E(r,"",m),g=u.getNormalizedStyle(n),b=a?ae(g):g;if(h!==b)return b;d.consumable.consume(u,{styles:n})}}}),o&&i.for("upcast").attributeToAttribute({view:{name:s,attributes:{[o]:/.+/}},model:{key:t,value:(u,d,m)=>{if(u.name=="figure"||u.hasStyle(n)||u.name=="table"&&u.parent.name=="figure"&&u.parent.hasStyle(n))return;const h=E(r,"",m);let g=u.getAttribute(o);if(g&&l=="length"){const b=parseFloat(g);isNaN(b)?g=h:g=b+(g.includes("%")?"%":"px")}if(h!==g)return g;d.consumable.consume(u,{attributes:o})}}})}function Pe(i,e,t,n){const{conversion:o}=i;o.for("upcast").add(l=>l.on("element:"+e,(s,r,c)=>{if(!r.modelRange)return;const a=["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(f=>r.viewItem.hasStyle(f));if(!a.length)return;const u={styles:a};if(!c.consumable.test(r.viewItem,u))return;const d=[...r.modelRange.getItems({shallow:!0})].pop(),m=d.findAncestor("table",{includeSelf:!0});let h=n;m&&m.getAttribute("tableType")=="layout"&&(h={style:"none",color:"",width:""}),c.consumable.consume(r.viewItem,u);const g={style:r.viewItem.getNormalizedStyle("border-style"),color:r.viewItem.getNormalizedStyle("border-color"),width:r.viewItem.getNormalizedStyle("border-width")},b={style:ae(g.style),color:ae(g.color),width:ae(g.width)};b.style!==h.style&&c.writer.setAttribute(t.style,b.style,d),b.color!==h.color&&c.writer.setAttribute(t.color,b.color,d),b.width!==h.width&&c.writer.setAttribute(t.width,b.width,d)})),i.config.get("experimentalFlags.upcastTableBorderZeroAttributes")&&o.for("upcast").add(l=>{l.on(`element:${e}`,(s,r,c)=>{const{modelRange:a,viewItem:u}=r,d=u.is("element","table")?u:u.findAncestor("table");if(!c.consumable.test(d,{attributes:"border"})||d.getAttribute("border")!=="0")return;const m=a?.start?.nodeAfter;!m||Object.values(t).some(h=>m.hasAttribute(h))||(c.writer.setAttribute(t.style,"none",m),u.is("element","table")&&c.consumable.consume(u,{attributes:"border"}))})})}function X(i,e){const{modelElement:t,modelAttribute:n,styleName:o}=e;i.for("downcast").attributeToAttribute({model:{name:t,key:n},view:l=>({key:"style",value:{[o]:l}})})}function re(i,e){const{modelAttribute:t,styleName:n}=e;i.for("downcast").add(o=>o.on(`attribute:${t}:table`,(l,s,r)=>{const{item:c,attributeNewValue:a}=s,{mapper:u,writer:d}=r;if(!r.consumable.consume(s.item,l.name))return;const m=[...u.toViewElement(c).getChildren()].find(h=>h.is("element","table"));a?d.setStyle(n,a,m):d.removeStyle(n,m)}))}function E(i,e,t){const n=t.modelRange&&Te(t.modelRange.getItems({shallow:!0})),o=n&&n.is("element")&&n.findAncestor("table",{includeSelf:!0});return o&&o.getAttribute("tableType")==="layout"?e:i}function ae(i){if(!i)return;const e=["top","right","bottom","left"];if(!e.every(l=>i[l]))return i;const n=i.top;return e.every(l=>i[l]===n)?n:i}const S={left:{className:"table-style-align-left"},center:{className:"table-style-align-center"},right:{className:"table-style-align-right"},blockLeft:{className:"table-style-block-align-left"},blockRight:{className:"table-style-block-align-right"}},oo=[{view:{name:/^(table|figure)$/,styles:{float:no}},getAlign:i=>{let e=i.getStyle("float");return e==="none"&&(e="center"),e},getConsumables(i){const e=i.getStyle("float"),t=["float"];return e==="left"&&i.hasStyle("margin-right")?t.push("margin-right"):e==="right"&&i.hasStyle("margin-left")&&t.push("margin-left"),{styles:t}}},{view:{name:/^(table|figure)$/,styles:{"margin-left":"auto","margin-right":"auto"}},getAlign:()=>"center",getConsumables:()=>({styles:["margin-left","margin-right"]})},{view:{name:/^(table|figure)$/,key:"class",value:"table-style-align-left"},getAlign:()=>"left",getConsumables(){return{classes:S.left.className}}},{view:{name:/^(table|figure)$/,key:"class",value:S.right.className},getAlign:()=>"right",getConsumables(){return{classes:S.right.className}}},{view:{name:/^(table|figure)$/,key:"class",value:S.center.className},getAlign:()=>"center",getConsumables(){return{classes:S.center.className}}},{view:{name:/^(table|figure)$/,key:"class",value:S.blockLeft.className},getAlign:()=>"blockLeft",getConsumables(){return{classes:S.blockLeft.className}}},{view:{name:/^(table|figure)$/,key:"class",value:S.blockRight.className},getAlign:()=>"blockRight",getConsumables(){return{classes:S.blockRight.className}}},{view:{name:/^(table|figure)$/,styles:{"margin-left":"0","margin-right":"auto"}},getAlign:()=>"blockLeft",getConsumables(){return{styles:["margin-left","margin-right"]}}},{view:{name:/^(table|figure)$/,styles:{"margin-left":"auto","margin-right":"0"}},getAlign:()=>"blockRight",getConsumables(){return{styles:["margin-left","margin-right"]}}},{view:{name:"table",attributes:{align:to}},getAlign:i=>i.getAttribute("align"),getConsumables(){return{attributes:"align"}}}],te={center:{align:"center",style:"margin-left: auto; margin-right: auto;",className:"table-style-align-center"},left:{align:"left",style:"float: left;",className:"table-style-align-left"},right:{align:"right",style:"float: right;",className:"table-style-align-right"},blockLeft:{align:void 0,style:"margin-left: 0; margin-right: auto;",className:S.blockLeft.className},blockRight:{align:void 0,style:"margin-left: auto; margin-right: 0;",className:S.blockRight.className}};class w{_table;_startRow;_endRow;_startColumn;_endColumn;_includeAllSlots;_skipRows;_row;_rowIndex;_column;_cellIndex;_spannedCells;_nextCellAtColumn;_jumpedToStartRow=!1;constructor(e,t={}){this._table=e,this._startRow=t.row!==void 0?t.row:t.startRow||0,this._endRow=t.row!==void 0?t.row:t.endRow,this._startColumn=t.column!==void 0?t.column:t.startColumn||0,this._endColumn=t.column!==void 0?t.column:t.endColumn,this._includeAllSlots=!!t.includeAllSlots,this._skipRows=new Set,this._row=0,this._rowIndex=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){this._canJumpToStartRow()&&this._jumpToNonSpannedRowClosestToStartRow();const e=this._table.getChild(this._rowIndex);if(!e||this._isOverEndRow())return{done:!0,value:void 0};if(!e.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let t=null;const n=this._getSpanned();if(n)this._includeAllSlots&&!this._shouldSkipSlot()&&(t=this._formatOutValue(n.cell,n.row,n.column));else{const o=e.getChild(this._cellIndex);if(!o)return this._advanceToNextRow();const l=parseInt(o.getAttribute("colspan")||"1"),s=parseInt(o.getAttribute("rowspan")||"1");(l>1||s>1)&&this._recordSpans(o,s,l),this._shouldSkipSlot()||(t=this._formatOutValue(o)),this._nextCellAtColumn=this._column+l}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 this._endRow!==void 0&&this._row>this._endRow}_isOverEndColumn(){return this._endColumn!==void 0&&this._column>this._endColumn}_formatOutValue(e,t=this._row,n=this._column){return{done:!1,value:new lo(this,e,t,n)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._row<this._startRow,n=this._column<this._startColumn,o=this._endColumn!==void 0&&this._column>this._endColumn;return e||t||n||o}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,n){const o={cell:e,row:this._row,column:this._column};for(let l=this._row;l<this._row+t;l++)for(let s=this._column;s<this._column+n;s++)(l!=this._row||s!=this._column)&&this._markSpannedCell(l,s,o)}_markSpannedCell(e,t,n){this._spannedCells.has(e)||this._spannedCells.set(e,new Map),this._spannedCells.get(e).set(t,n)}_canJumpToStartRow(){return!!this._startRow&&this._startRow>0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const e=this._getRowLength(0);for(let t=this._startRow;!this._jumpedToStartRow;t--)e===this._getRowLength(t)&&(this._row=t,this._rowIndex=t,this._jumpedToStartRow=!0)}_getRowLength(e){return[...this._table.getChild(e).getChildren()].reduce((n,o)=>n+parseInt(o.getAttribute("colspan")||"1"),0)}}class lo{cell;row;column;cellAnchorRow;cellAnchorColumn;_cellIndex;_rowIndex;_table;constructor(e,t,n,o){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=n,this.cellAnchorColumn=o,this._cellIndex=e._cellIndex,this._rowIndex=e._rowIndex,this._table=e._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||"1")}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||"1")}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function _(i,e,t,n,o=1){e!=null&&o!==void 0&&o!==null&&e>o?n.setAttribute(i,e,t):n.removeAttribute(i,t)}function U(i,e,t={}){const n=i.createElement("tableCell",t);return i.insertElement("paragraph",n),i.insert(n,e),n}function Ee(i,e){const t=e.parent.parent,n=parseInt(t.getAttribute("headingColumns")||"0"),{column:o}=i.getCellLocation(e);return!!n&&o<n}function ce(i,e,t){const{modelAttribute:n}=t;i.extend("tableCell",{allowAttributes:[n]}),i.setAttributeProperties(n,{isFormatting:!0}),$e(e,{viewElement:/^(td|th)$/,...t}),X(e,{modelElement:"tableCell",...t})}function W(i){const e=i.getSelectedElement();return e&&e.is("element","table")?e:i.getFirstPosition().findAncestor("table")}function io(i){const e=new Map;for(const t of i){const n=t.findAncestor("table");e.has(n)||e.set(n,[]),e.get(n).push(t)}return e}function K({table:i,row:e,column:t}){const n=new w(i,{row:e,column:t});for(const{cell:o}of n)if(o.getAttribute("tableCellType")!=="header")return!1;return!0}function L(i){const{model:e,config:t}=i;return e.schema.checkAttribute("tableCell","tableCellType")&&t.get("experimentalFlags.tableCellTypeSupport")===!0}function Ot(i,e,t){const{startRow:n,startColumn:o,endRow:l,endColumn:s}=e,r=t.createElement("table"),c=i.getAttribute("tableType");c&&t.setAttribute("tableType",c,r);const a=l-n+1;for(let d=0;d<a;d++)t.insertElement("tableRow",r,"end");const u=[...new w(i,{startRow:n,endRow:l,startColumn:o,endColumn:s,includeAllSlots:!0})];for(const{row:d,column:m,cell:h,isAnchor:g,cellAnchorRow:b,cellAnchorColumn:f}of u){const p=d-n,C=r.getChild(p);if(!g)(b<n||f<o)&&U(t,t.createPositionAt(C,"end"));else{const T=t.cloneElement(h);t.append(T,C),jt(T,d,m,l,s,t)}}return so(r,i,n,o,t),r}function Ht(i,e,t=0){const n=[],o=new w(i,{startRow:t,endRow:e-1});for(const l of o){const{row:s,cellHeight:r}=l,c=s+r-1;s<e&&e<=c&&n.push(l)}return n}function zt(i,e,t){const n=i.parent,o=n.parent,l=n.index,s=parseInt(i.getAttribute("rowspan")),r=e-l,c={},a=s-r;a>1&&(c.rowspan=a);const u=parseInt(i.getAttribute("colspan")||"1");u>1&&(c.colspan=u);const d=l,m=d+r,h=[...new w(o,{startRow:d,endRow:m,includeAllSlots:!0})];let g=null,b;for(const f of h){const{row:p,column:C,cell:T}=f;T===i&&b===void 0&&(b=C),b!==void 0&&b===C&&p===m&&(g=U(t,f.getPositionBefore(),c))}return _("rowspan",r,i,t),g}function Ut(i,e){const t=[],n=new w(i);for(const o of n){const{column:l,cellWidth:s}=o,r=l+s-1;l<e&&e<=r&&t.push(o)}return t}function $t(i,e,t,n){const o=parseInt(i.getAttribute("colspan")),l=t-e,s={},r=o-l;r>1&&(s.colspan=r);const c=parseInt(i.getAttribute("rowspan")||"1");c>1&&(s.rowspan=c);const a=U(n,n.createPositionAfter(i),s);return _("colspan",l,i,n),a}function jt(i,e,t,n,o,l){const s=parseInt(i.getAttribute("colspan")||"1"),r=parseInt(i.getAttribute("rowspan")||"1");if(t+s-1>o){const u=o-t+1;_("colspan",u,i,l,1)}if(e+r-1>n){const u=n-e+1;_("rowspan",u,i,l,1)}}function so(i,e,t,n,o){const l=parseInt(e.getAttribute("headingRows")||"0");if(l>0){const r=l-t;_("headingRows",r,i,o,0)}const s=parseInt(e.getAttribute("headingColumns")||"0");if(s>0){const r=s-n;_("headingColumns",r,i,o,0)}}function Ve(i,e){const t=e.getColumns(i),n=new Array(t).fill(0);for(const{column:l}of new w(i))n[l]++;const o=n.reduce((l,s,r)=>s?l:[...l,r],[]);if(o.length>0){const l=o[o.length-1];return e.removeColumns(i,{at:l}),!0}return!1}function Le(i,e){const t=[],n=e.getRows(i);for(let o=0;o<n;o++)i.getChild(o).isEmpty&&t.push(o);if(t.length>0){const o=t[t.length-1];return e.removeRows(i,{at:o}),!0}return!1}function je(i,e){Ve(i,e)||Le(i,e)}function Gt(i,e){const t=Array.from(new w(i,{startColumn:e.firstColumn,endColumn:e.lastColumn,row:e.lastRow}));if(t.every(({cellHeight:l})=>l===1))return e.lastRow;const o=t[0].cellHeight-1;return e.lastRow+o}function Kt(i,e){const t=Array.from(new w(i,{startRow:e.firstRow,endRow:e.lastRow,column:e.lastColumn}));if(t.every(({cellWidth:l})=>l===1))return e.lastColumn;const o=t[0].cellWidth-1;return e.lastColumn+o}function qt(i){for(const e of i.getChildren())if(e.is("element","table"))return e}function ro(){return i=>{i.on("element:figure",(e,t,n)=>{if(!n.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const o=qt(t.viewItem);if(!o||!n.consumable.test(o,{name:!0}))return;n.consumable.consume(t.viewItem,{name:!0,classes:"table"});const l=n.convertItem(o,t.modelCursor),s=Te(l.modelRange.getItems());if(!s||!s.is("element","table")){n.consumable.revert(t.viewItem,{name:!0,classes:"table"}),l.modelRange&&!l.modelRange.isCollapsed&&(t.modelRange=l.modelRange,t.modelCursor=l.modelCursor);return}n.convertChildren(t.viewItem,n.writer.createPositionAt(s,"end")),n.updateConversionResult(s,t)})}}function ao(){return i=>{i.on("element:table",(e,t,n)=>{const o=t.viewItem;if(!n.consumable.test(o,{name:!0}))return;const{rows:l,headingRows:s,headingColumns:r}=uo(o),c={};r&&(c.headingColumns=r),s&&(c.headingRows=s);const a=n.writer.createElement("table",c);if(n.safeInsert(a,t.modelCursor)){if(n.consumable.consume(o,{name:!0}),l.forEach(u=>n.convertItem(u,n.writer.createPositionAt(a,"end"))),n.convertChildren(o,n.writer.createPositionAt(a,"end")),a.isEmpty){const u=n.writer.createElement("tableRow");n.writer.insert(u,n.writer.createPositionAt(a,"end")),U(n.writer,n.writer.createPositionAt(u,"end"))}n.updateConversionResult(a,t)}})}}function co(){return i=>{i.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&t.modelCursor.index==0&&e.stop()},{priority:"high"})}}function ot(i){return e=>{e.on(`element:${i}`,(t,n,{writer:o})=>{if(!n.modelRange)return;const l=n.modelRange.start.nodeAfter,s=o.createPositionAt(l,0);if(n.viewItem.isEmpty){o.insertElement("paragraph",s);return}const r=Array.from(l.getChildren());if(r.every(c=>c.is("element","$marker"))){const c=o.createElement("paragraph");o.insert(c,o.createPositionAt(l,0));for(const a of r)o.move(o.createRangeOn(a),o.createPositionAt(c,"end"))}},{priority:"low"})}}function uo(i){let e,t=!0;const n=[],o=[];let l;for(const r of Array.from(i.getChildren())){if(r.name!=="tbody"&&r.name!=="thead"&&r.name!=="tfoot")continue;r.name==="thead"&&!l&&(t=!0,l=r);const c=Array.from(r.getChildren()).filter(u=>u.is("element","tr"));let a=null;for(const u of c){const d=Array.from(u.getChildren()).filter(m=>m.is("element","td")||m.is("element","th"));l&&r===l||r.name==="tbody"&&d.length>0&&(a===null||d.length===a)&&d.every(m=>m.is("element","th"))&&t?(n.push(u),t=!0):(o.push(u),t=!1),a=Math.max(a||0,d.length)}}const s=mo(o);for(const r of s){let c=0;for(;c<r.length&&r[c]?.name==="th";)c+=1;(e===void 0||c<e)&&(e=c)}return{headingRows:n.length,headingColumns:e||0,rows:[...n,...o]}}function mo(i){let e=new Map,t=0;const n=i.map(o=>{const l=[],s=Array.from(o.getChildren()).filter(c=>c.name==="th"||c.name==="td"),r=new Map;for(;s.length||l.length<t;){const c=e.get(l.length);if(c&&c.remaining>0)l.push(c.cell);else{const a=s.shift();if(a){const u=parseInt(a.getAttribute("colspan")||"1"),d=parseInt(a.getAttribute("rowspan")||"1");for(let m=0;m<u;m++)d>1&&r.set(l.length,{cell:a,remaining:d-1}),l.push(a)}else{l.push(null);continue}}}for(const[c,a]of e.entries())a.remaining-=1,a.remaining>0&&!r.has(c)&&r.set(c,a);return e=r,t=Math.max(t,l.length),l});for(const o of n)for(;o.length<t;)o.push(null);return n}function $(i){if(!i||!eo(i))return i;const{top:e,right:t,bottom:n,left:o}=i;if(e==t&&t==n&&n==o)return e}function j(i,e){const t=parseFloat(i);return Number.isNaN(t)||String(t)!==String(i)?i:`${t}${e}`}function Ae(i,e={}){const t={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...i};return e.includeAlignmentProperty&&!t.alignment&&(t.alignment="center"),e.includePaddingProperty&&!t.padding&&(t.padding=""),e.includeVerticalAlignmentProperty&&!t.verticalAlignment&&(t.verticalAlignment="middle"),e.includeHorizontalAlignmentProperty&&!t.horizontalAlignment&&(t.horizontalAlignment=e.isRightToLeftContent?"right":"left"),t}function Ge(i,e){return Ae({borderStyle:"double",borderColor:"hsl(0, 0%, 70%)",borderWidth:"1px",...i},e)}function Ke(i,e){return Ae({borderStyle:"solid",borderColor:"hsl(0, 0%, 75%)",borderWidth:"1px",...i},e)}function lt(i,e){return(t,{writer:n})=>{const o=t.getAttribute("headingRows")||0,l=n.createContainerElement("table",null,[]),s=n.createContainerElement("figure",{class:"table"},l);o>0&&n.insert(n.createPositionAt(l,"end"),n.createContainerElement("thead",null,n.createSlot(r=>r.is("element","tableRow")&&r.index<o))),o<i.getRows(t)&&n.insert(n.createPositionAt(l,"end"),n.createContainerElement("tbody",null,n.createSlot(r=>r.is("element","tableRow")&&r.index>=o)));for(const{positionOffset:r,filter:c}of e.additionalSlots)n.insert(n.createPositionAt(l,r),n.createSlot(c));return n.insert(n.createPositionAt(l,"after"),n.createSlot(r=>r.is("element","tableRow")?!1:!e.additionalSlots.some(({filter:c})=>c(r)))),e.asWidget?go(s,n):s}}function ho(){return(i,{writer:e})=>i.isEmpty?e.createEmptyElement("tr"):e.createContainerElement("tr")}function it(i){return(t,{writer:n})=>{if(i.cellTypeEnabled?.()){const d=t.getAttribute("tableCellType")==="header"?"th":"td";return e(n,d)}const o=t.parent,l=o.parent,s=l.getChildIndex(o),r=new w(l,{row:s}),c=l.getAttribute("headingRows")||0,a=l.getAttribute("headingColumns")||0;let u=null;for(const d of r)if(d.cell==t){const m=d.row<c||d.column<a;u=e(n,m?"th":"td");break}return u};function e(t,n){return i.asWidget?kt(t.createEditableElement(n),t,{withAriaRole:!1}):t.createContainerElement(n)}}function st(i={}){return(e,{writer:t})=>{if(!e.parent.is("element","tableCell")||!Xt(e))return null;if(i.asWidget)return t.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const n=t.createContainerElement("p");return t.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}}function Xt(i){return i.parent.childCount==1&&!bo(i)}function go(i,e){return e.setCustomProperty("table",!0,i),Cn(i,e,{hasSelectionHandle:!0})}function bo(i){for(const e of i.getAttributeKeys())if(!(e.startsWith("selection:")||e=="htmlEmptyBlock"))return!0;return!1}function fo(i){return(e,t)=>{const n=i.plugins.has("PlainTableOutput"),o=t.options.isClipboardPipeline,l=i.config.get("experimentalFlags.useExtendedTableBlockAlignment"),s=qe(i,e);return n||s||l&&o?Co(e,t,i):null}}function po(i){return(e,{writer:t,options:n})=>{const o=i.plugins.has("PlainTableOutput"),l=n.isClipboardPipeline,s=i.config.get("experimentalFlags.useExtendedTableBlockAlignment"),r=qe(i,e);return(o||r||s&&l)&&e.parent.name==="table"?t.createContainerElement("caption"):null}}function Co(i,e,t){const n=e.writer,o=i.getAttribute("headingRows")||0,l=n.createSlot(m=>m.is("element","tableRow")&&m.index<o),s=n.createSlot(m=>m.is("element","tableRow")&&m.index>=o),r=n.createSlot(m=>!m.is("element","tableRow")),c=n.createContainerElement("thead",null,l),a=n.createContainerElement("tbody",null,s),u=[];o&&u.push(c),o<i.childCount&&u.push(a);const d={class:"table"};if(t.plugins.has("TablePropertiesEditing")&&e.options.isClipboardPipeline){const m=Ge(t.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),h=i.getAttribute("tableAlignment");let g=m.alignment;i.getAttribute("tableType")==="layout"&&(g="");const b=h||g;b&&(d.class+=" "+te[b].className,d.style=te[b].style,te[b].align!==void 0&&(d.align=te[b].align))}return n.createContainerElement("table",d,[r,...u])}function wo(i){const e={"border-width":"tableBorderWidth","border-color":"tableBorderColor","border-style":"tableBorderStyle","background-color":"tableBackgroundColor"};for(const[t,n]of Object.entries(e))i.conversion.for("dataDowncast").add(o=>o.on(`attribute:${n}:table`,(l,s,r)=>{const{item:c,attributeNewValue:a}=s,{mapper:u,writer:d}=r,m=i.plugins.has("PlainTableOutput"),h=r.options.isClipboardPipeline,g=i.config.get("experimentalFlags.useExtendedTableBlockAlignment"),b=qe(i,c);if(!(m||b||g&&h)||!r.consumable.consume(c,l.name))return;const f=u.toViewElement(c);a?d.setStyle(t,a,f):d.removeStyle(t,f)},{priority:"high"}))}function qe(i,e){const t=i.plugins.has("TableLayoutEditing"),n=i.config.get("table.tableLayout.stripFigureFromContentTable")??!0,l=e.findAncestor("table",{includeSelf:!0})?.getAttribute("tableType");return t&&(n||l==="layout")}class To extends R{refresh(){const e=this.editor.model,t=e.document.selection,n=e.schema;this.isEnabled=yo(t,n)}execute(e={}){const t=this.editor,n=t.model,o=t.plugins.get("TableUtils"),l=t.config.get("table.defaultHeadings.rows"),s=t.config.get("table.defaultHeadings.columns");e.headingRows===void 0&&l&&(e.headingRows=l),e.headingColumns===void 0&&s&&(e.headingColumns=s),n.change(r=>{const c=o.createTable(r,e);n.insertObject(c,null,null,{findOptimalPosition:"auto"}),r.setSelection(r.createPositionAt(c.getNodeByPath([0,0,0]),0))})}}function yo(i,e){const t=i.getFirstPosition().parent,n=t===t.root?t:t.parent;return e.checkChild(n,"table")}class rt extends R{order;constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,n=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=n}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),o=this.order==="above",l=n.getSelectionAffectedTableCells(t),s=n.getRowIndexes(l),r=o?s.first:s.last,c=l[0].findAncestor("table");n.insertRows(c,{at:o?r:r+1,copyStructureFromAbove:!o})}}class at extends R{order;constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,n=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=n}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),o=this.order==="left",l=n.getSelectionAffectedTableCells(t),s=n.getColumnIndexes(l),r=o?s.first:s.last,c=l[0].findAncestor("table");n.insertColumns(c,{columns:1,at:o?r:r+1})}}class ct extends R{direction;constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length===1}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];this.direction==="horizontally"?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}class ne extends R{direction;isHorizontal;constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal=this.direction=="right"||this.direction=="left"}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],l=this.value,s=this.direction;e.change(r=>{const c=s=="right"||s=="down",a=c?o:l,u=c?l:o,d=u.parent;vo(u,a,r);const m=this.isHorizontal?"colspan":"rowspan",h=parseInt(o.getAttribute(m)||"1"),g=parseInt(l.getAttribute(m)||"1");r.setAttribute(m,h+g,a),r.setSelection(r.createRangeIn(a));const b=this.editor.plugins.get("TableUtils"),f=d.findAncestor("table");je(f,b)})}_getMergeableCell(){const t=this.editor.model.document,n=this.editor.plugins.get("TableUtils"),o=n.getTableCellsContainingSelection(t.selection)[0];if(!o)return;const l=this.isHorizontal?_o(o,this.direction,n):Ao(o,this.direction,n);if(!l)return;const s=this.isHorizontal?"rowspan":"colspan",r=parseInt(o.getAttribute(s)||"1");if(parseInt(l.getAttribute(s)||"1")===r)return l}}function _o(i,e,t){const o=i.parent.parent,l=e=="right"?i.nextSibling:i.previousSibling,s=(o.getAttribute("headingColumns")||0)>0;if(!l)return;const r=e=="right"?i:l,c=e=="right"?l:i,{column:a}=t.getCellLocation(r),{column:u}=t.getCellLocation(c),d=parseInt(r.getAttribute("colspan")||"1"),m=Ee(t,r),h=Ee(t,c);return s&&m!=h?void 0:a+d===u?l:void 0}function Ao(i,e,t){const n=i.parent,o=n.parent,l=o.getChildIndex(n);if(e=="down"&&l===t.getRows(o)-1||e=="up"&&l===0)return null;const s=parseInt(i.getAttribute("rowspan")||"1"),r=o.getAttribute("headingRows")||0,c=e=="down"&&l+s===r,a=e=="up"&&l===r;if(r&&(c||a))return null;const u=parseInt(i.getAttribute("rowspan")||"1"),d=e=="down"?l+u:l,m=[...new w(o,{endRow:d})],g=m.find(f=>f.cell===i).column,b=m.find(({row:f,cellHeight:p,column:C})=>C!==g?!1:e=="down"?f===d:d===f+p);return b&&b.cell?b.cell:null}function vo(i,e,t){ut(i)||(ut(e)&&t.remove(t.createRangeIn(e)),t.move(t.createRangeIn(i),t.createPositionAt(e,"end"))),t.remove(i)}function ut(i){const e=i.getChild(0);return i.childCount==1&&e.is("element","paragraph")&&e.isEmpty}class So extends R{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),n=t[0];if(n){const o=n.findAncestor("table"),s=e.getRows(o)-1,r=e.getRowIndexes(t),c=r.first===0&&r.last===s;this.isEnabled=!c}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),n=t.getSelectionAffectedTableCells(e.document.selection),o=t.getRowIndexes(n),l=n[0],s=l.findAncestor("table"),r=t.getCellLocation(l).column;e.change(c=>{const a=o.last-o.first+1;t.removeRows(s,{at:o.first,rows:a});const u=Ro(s,o.first,r,t.getRows(s));c.setSelection(c.createPositionAt(u,0))})}}function Ro(i,e,t,n){const o=i.getChild(Math.min(e,n-1));let l=o.getChild(0),s=0;for(const r of o.getChildren()){if(s>t)return l;l=r,s+=parseInt(r.getAttribute("colspan")||"1")}return l}class ko extends R{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),n=t[0];if(n){const o=n.findAncestor("table"),l=e.getColumns(o),{first:s,last:r}=e.getColumnIndexes(t);this.isEnabled=r-s<l-1}else this.isEnabled=!1}execute(){const e=this.editor.plugins.get("TableUtils"),[t,n]=xo(this.editor.model.document.selection,e),o=t.parent.parent,l=[...new w(o)],s={first:l.find(c=>c.cell===t).column,last:l.find(c=>c.cell===n).column},r=Io(l,t,n,s);this.editor.model.change(c=>{const a=s.last-s.first+1;e.removeColumns(o,{at:s.first,columns:a}),c.setSelection(c.createPositionAt(r,0))})}}function Io(i,e,t,n){return parseInt(t.getAttribute("colspan")||"1")>1?t:e.previousSibling||t.nextSibling?t.nextSibling||e.previousSibling:n.first?i.reverse().find(({column:l})=>l<n.first).cell:i.reverse().find(({column:l})=>l>n.last).cell}function xo(i,e){const t=e.getSelectionAffectedTableCells(i),n=t[0],o=t.pop(),l=[n,o];return n.isBefore(o)?l:l.reverse()}class Po extends R{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,n=e.getSelectionAffectedTableCells(t.document.selection);if(n.length===0){this.isEnabled=!1,this.value=!1;return}const o=n[0].findAncestor("table");this.isEnabled=t.schema.checkAttribute(o,"headingRows"),this.value=n.every(l=>this._isInHeading(l,l.parent.parent))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),n=this.editor.model,o=t.getSelectionAffectedTableCells(n.document.selection),l=o[0].findAncestor("table"),{first:s,last:r}=t.getRowIndexes(o),c=this.value?s:r+1,a=l.getAttribute("headingRows")||0;n.change(u=>{if(c){const d=c>a?a:0,m=Ht(l,c,d);for(const{cell:h}of m)zt(h,c,u)}t.setHeadingRowsCount(u,l,c)})}_isInHeading(e,t){const n=parseInt(t.getAttribute("headingRows")||"0");return!!n&&e.parent.index<n}}class Eo extends R{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,n=e.getSelectionAffectedTableCells(t.document.selection);if(n.length===0){this.isEnabled=!1,this.value=!1;return}const o=n[0].findAncestor("table");this.isEnabled=t.schema.checkAttribute(o,"headingColumns"),this.value=n.every(l=>Ee(e,l))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),n=this.editor.model,o=t.getSelectionAffectedTableCells(n.document.selection),l=o[0].findAncestor("table"),{first:s,last:r}=t.getColumnIndexes(o),c=this.value?s:r+1;n.change(a=>{if(c){const u=Ut(l,c);for(const{cell:d,column:m}of u)$t(d,m,c,a)}t.setHeadingColumnsCount(a,l,c)})}}const Vo=5,We=40,Lo=2,Wo=3;function No(i){const e=new Set;for(const t of i.document.differ.getChanges()){let n=null;switch(t.type){case"insert":n=["table","tableRow","tableCell"].includes(t.name)?t.position:null;break;case"remove":n=["tableRow","tableCell"].includes(t.name)?t.position:null;break;case"attribute":t.range.start.nodeAfter&&(n=["table","tableRow","tableCell"].includes(t.range.start.nodeAfter.name)?t.range.start:null);break}if(!n)continue;const o=n.nodeAfter&&n.nodeAfter.is("element","table")?n.nodeAfter:n.findAncestor("table");for(const l of i.createRangeOn(o).getItems())l.is("element","table")&&Y(l)&&e.add(l)}return e}function Bo(i,e){return We*100/Jt(i,e)}function Jt(i,e){const t=dt(i,"tbody",e)||dt(i,"thead",e),n=e.editing.view.domConverter.mapViewToDom(t);return Ne(n)}function dt(i,e,t){return[...[...t.editing.mapper.toViewElement(i).getChildren()].find(l=>l.is("element","table")).getChildren()].find(l=>l.is("element",e))}function Ne(i){const e=ue.window.getComputedStyle(i);return e.boxSizing==="border-box"?parseFloat(e.width)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderLeftWidth)-parseFloat(e.borderRightWidth):parseFloat(e.width)}function Fo(i,e){const t=e.getCellLocation(i).column,n=i.getAttribute("colspan")||1;return{leftEdge:t,rightEdge:t+n-1}}function I(i){const e=Math.pow(10,Lo),t=typeof i=="number"?i:parseFloat(i);return Math.round(t*e)/e}function Do(i,e,t){return i<=e?I(e):i>=t?I(t):I(i)}function Mo(i,e){return Array(i).fill(e)}function Z(i){return i.map(e=>typeof e=="number"?e:parseFloat(e)).filter(e=>!Number.isNaN(e)).reduce((e,t)=>e+t,0)}function Xe(i){const e=i.map(o=>o==="auto"||o===void 0?"auto":parseFloat(o.replace("%","")));let t=Oo(e);const n=Z(t);return n!==100&&(t=t.map(o=>I(o*100/n)).map((o,l,s)=>{if(!(l===s.length-1))return o;const c=Z(s);return I(o+100-c)})),t.map(o=>o+"%")}function Oo(i){const e=i.filter(o=>o==="auto").length;if(e===0)return i.map(o=>I(o));const t=Z(i),n=Math.max((100-t)/e,Vo);return i.map(o=>o==="auto"?n:o).map(o=>I(o))}function Ho(i){const e=ue.window.getComputedStyle(i);return e.boxSizing==="border-box"?parseInt(e.width):parseFloat(e.width)+parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderWidth)}function Zt(i,e,t,n){for(let o=0;o<Math.max(t.length,i.length);o++){const l=i[o],s=t[o];s?l?n.setAttribute("columnWidth",s,l):n.appendElement("tableColumn",{columnWidth:s},e):n.remove(l)}}function Y(i){if(i.is("element","tableColumnGroup"))return i;const e=i.getChildren();return Array.from(e).find(t=>t.is("element","tableColumnGroup"))}function Q(i){const e=Y(i);return e?Array.from(e.getChildren()):[]}function zo(i){return Q(i).map(e=>e.getAttribute("columnWidth"))}function Uo(i,e){return Q(i).reduce((n,o)=>{const l=o.getAttribute("columnWidth"),s=o.getAttribute("colSpan");if(!s)return n.push(l),n;for(let r=0;r<s;r++)n.push(l);return e.removeAttribute("colSpan",o),n},[])}class v extends A{static get pluginName(){return"TableUtils"}static get isOfficialPlugin(){return!0}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,n=t.parent,o=n.getChildIndex(t),l=new w(n,{row:o});for(const{cell:s,row:r,column:c}of l)if(s===e)return{row:r,column:c};}createTable(e,t){const n=e.createElement("table"),o=t.rows||2,l=t.columns||2;return ke(e,n,0,o,l),t.headingRows&&this.setHeadingRowsCount(e,n,Math.min(t.headingRows,o)),t.headingColumns&&this.setHeadingColumnsCount(e,n,Math.min(t.headingColumns,l)),n}insertRows(e,t={}){const n=this.editor.model,o=t.at||0,l=t.rows||1,s=t.copyStructureFromAbove!==void 0,r=t.copyStructureFromAbove?o-1:o,c=L(this.editor),a=this.getRows(e),u=this.getColumns(e);if(o>a)throw new Qe("tableutils-insertrows-insert-out-of-range",this,{options:t});n.change(d=>{let m=e.getAttribute("headingRows")||0;const h=e.getAttribute("headingColumns")||0;if(m>o&&(m+=l,this.setHeadingRowsCount(d,e,m,{shallow:!0})),!s&&(o===0||o===a)){const p=ke(d,e,o,l,u);if(c)for(let C=0;C<p.length;C++){const T=p[C];for(let y=0;y<u;y++){const k=T[y];(o+C<m||y<h)&&d.setAttribute("tableCellType","header",k)}}return}const g=s?Math.max(o,r):o,b=new w(e,{endRow:g}),f=new Array(u).fill(1);for(const{row:p,column:C,cellHeight:T,cellWidth:y,cell:k}of b){const B=p+T-1,F=p<o&&o<=B,Se=p<=r&&r<=B;F?(d.setAttribute("rowspan",T+l,k),f[C]=-y):s&&Se&&(f[C]=y)}for(let p=0;p<l;p++){const C=d.createElement("tableRow");d.insert(C,e,o);for(let T=0;T<f.length;T++){const y=f[T],k=d.createPositionAt(C,"end");if(y>0){const B=U(d,k,y>1?{colspan:y}:void 0);c&&(o+p<m||T<h)&&d.setAttribute("tableCellType","header",B)}T+=Math.abs(y)-1}}})}insertColumns(e,t={}){const n=this.editor.model,o=t.at||0,l=t.columns||1,s=L(this.editor);n.change(r=>{const c=e.getAttribute("headingRows")||0;let a=e.getAttribute("headingColumns");o<a&&(a+=l,this.setHeadingColumnsCount(r,e,a,{shallow:!0}));const u=this.getColumns(e);if(o===0||u===o){let m=0;for(const h of e.getChildren()){if(!h.is("element","tableRow"))continue;const g=q(l,r,r.createPositionAt(h,o?"end":0));if(s)for(let b=0;b<g.length;b++)(o+b<a||m<c)&&r.setAttribute("tableCellType","header",g[b]);m++}return}const d=new w(e,{column:o,includeAllSlots:!0});for(const m of d){const{row:h,cell:g,cellAnchorColumn:b,cellAnchorRow:f,cellWidth:p,cellHeight:C}=m;if(b<o){r.setAttribute("colspan",p+l,g);const T=f+C-1;for(let y=h;y<=T;y++)d.skipRow(y)}else{const T=q(l,r,m.getPositionBefore());if(s)for(let y=0;y<T.length;y++)(o+y<a||h<c)&&r.setAttribute("tableCellType","header",T[y])}}})}removeRows(e,t){const n=this.editor.model,o=t.rows||1,l=this.getRows(e),s=t.at,r=s+o-1;if(r>l-1)throw new Qe("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});n.change(c=>{const a={first:s,last:r},{cellsToMove:u,cellsToTrim:d}=Go(e,a);if(u.size){const m=r+1;Ko(e,m,u,c)}for(let m=r;m>=s;m--)c.remove(e.getChild(m));for(const{rowspan:m,cell:h}of d)_("rowspan",m,h,c);if(jo(e,a,c),Ve(e,this)||Le(e,this),L(this.editor)){let m=e.getAttribute("headingRows")||0;const h=this.getRows(e);for(;m<h&&K({table:e,row:m});)m++;this.setHeadingRowsCount(c,e,m,{shallow:!0})}})}removeColumns(e,t){const n=this.editor.model,o=t.at,l=t.columns||1,s=t.at+l-1;n.change(r=>{$o(e,{first:o,last:s},r);const c=Q(e);for(let a=s;a>=o;a--){for(const{cell:u,column:d,cellWidth:m}of[...new w(e)])d<=a&&m>1&&d+m>a?_("colspan",m-1,u,r):d===a&&r.remove(u);if(c[a]){const u=a===0?c[1]:c[a-1],d=parseFloat(c[a].getAttribute("columnWidth")),m=parseFloat(u.getAttribute("columnWidth"));r.remove(c[a]),r.setAttribute("columnWidth",d+m+"%",u)}}if(Le(e,this)||Ve(e,this),L(this.editor)){let a=e.getAttribute("headingColumns")||0;const u=this.getColumns(e);for(;a<u&&K({table:e,column:a});)a++;this.setHeadingColumnsCount(r,e,a,{shallow:!0})}})}splitCellVertically(e,t=2){const n=this.editor.model,l=e.parent.parent,s=parseInt(e.getAttribute("rowspan")||"1"),r=parseInt(e.getAttribute("colspan")||"1");n.change(c=>{if(r>1){const{newCellsSpan:a,updatedSpan:u}=mt(r,t);_("colspan",u,e,c);const d={};a>1&&(d.colspan=a),s>1&&(d.rowspan=s);const m=r>t?t-1:r-1;q(m,c,c.createPositionAfter(e),d)}if(r<t){const a=t-r,u=[...new w(l)],{column:d}=u.find(({cell:b})=>b===e),m=u.filter(({cell:b,cellWidth:f,column:p})=>{const C=b!==e&&p===d,T=p<d&&p+f>d;return C||T});for(const{cell:b,cellWidth:f}of m)c.setAttribute("colspan",f+a,b);const h={};s>1&&(h.rowspan=s),q(a,c,c.createPositionAfter(e),h);const g=l.getAttribute("headingColumns")||0;g>d&&_("headingColumns",g+a,l,c)}})}splitCellHorizontally(e,t=2){const n=this.editor.model,o=e.parent,l=o.parent,s=l.getChildIndex(o),r=parseInt(e.getAttribute("rowspan")||"1"),c=parseInt(e.getAttribute("colspan")||"1");n.change(a=>{if(r>1){const u=[...new w(l,{startRow:s,endRow:s+r-1,includeAllSlots:!0})],{newCellsSpan:d,updatedSpan:m}=mt(r,t);_("rowspan",m,e,a);const{column:h}=u.find(({cell:f})=>f===e),g={};d>1&&(g.rowspan=d),c>1&&(g.colspan=c);let b=0;for(const f of u){const{column:p,row:C}=f,T=C>=s+m,y=p===h;b>=d&&y&&(b=0),T&&y&&(b||q(1,a,f.getPositionBefore(),g),b++)}}if(r<t){const u=t-r,d=[...new w(l,{startRow:0,endRow:s})];for(const{cell:g,cellHeight:b,row:f}of d)if(g!==e&&f+b>s){const p=b+u;a.setAttribute("rowspan",p,g)}const m={};c>1&&(m.colspan=c),ke(a,l,s+1,u,1,m);const h=l.getAttribute("headingRows")||0;h>s&&_("headingRows",h+u,l,a)}})}getColumns(e){return[...e.getChild(0).getChildren()].filter(n=>n.is("element","tableCell")).reduce((n,o)=>{const l=parseInt(o.getAttribute("colspan")||"1");return n+l},0)}getRows(e){return Array.from(e.getChildren()).reduce((t,n)=>n.is("element","tableRow")?t+1:t,0)}createTableWalker(e,t={}){return new w(e,t)}getSelectedTableCells(e){const t=[];for(const n of this.sortRanges(e.getRanges())){const o=n.getContainedElement();o&&o.is("element","tableCell")&&t.push(o)}return t}setHeadingRowsCount(e,t,n,o={}){const{shallow:l,resetFormerHeadingCells:s=!0,autoExpand:r=!0}=o,c=t.getAttribute("headingRows")||0;if(n!==c&&(_("headingRows",n,t,e,0),!(l||!L(this.editor)))){for(const{cell:a,row:u,column:d}of new w(t,{endRow:n-1}))oe({table:t,writer:e,cell:a,row:u,column:d});if(s&&n<c)for(let a=n;a<c&&K({table:t,row:a});a++)for(const{cell:u,row:d,column:m}of new w(t,{row:a}))oe({table:t,writer:e,cell:u,row:d,column:m});if(r&&n>c){const a=this.getRows(t);for(;n<a&&K({table:t,row:n});)n++;_("headingRows",n,t,e,0)}}}setHeadingColumnsCount(e,t,n,o={}){const{shallow:l,resetFormerHeadingCells:s=!0,autoExpand:r=!0}=o,c=t.getAttribute("headingColumns")||0;if(n!==c&&(_("headingColumns",n,t,e,0),!(l||!L(this.editor)))){for(const{cell:a,row:u,column:d}of new w(t,{endColumn:n-1}))oe({table:t,writer:e,cell:a,row:u,column:d});if(s&&n<c)for(let a=n;a<c&&K({table:t,column:a});a++)for(const{cell:u,row:d,column:m}of new w(t,{column:a}))oe({table:t,writer:e,cell:u,row:d,column:m});if(r&&n>c){const a=this.getColumns(t);for(;n<a&&K({table:t,column:n});)n++;_("headingColumns",n,t,e,0)}}}getTableCellsContainingSelection(e){const t=[];for(const n of e.getRanges()){const o=n.start.findAncestor("tableCell");o&&t.push(o)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map(n=>n.parent.index);return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),o=[...new w(t)].filter(l=>e.includes(l.cell)).map(l=>l.column);return this._getFirstLastIndexesObject(o)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,n=new Set;let o=0;for(const s of e){const{row:r,column:c}=this.getCellLocation(s),a=parseInt(s.getAttribute("rowspan"))||1,u=parseInt(s.getAttribute("colspan"))||1;t.add(r),n.add(c),a>1&&t.add(r+a-1),u>1&&n.add(c+u-1),o+=a*u}return Xo(t,n)==o}sortRanges(e){return Array.from(e).sort(qo)}_getFirstLastIndexesObject(e){const t=e.sort((l,s)=>l-s),n=t[0],o=t[t.length-1];return{first:n,last:o}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),n=this.getRowIndexes(e),o=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(n,o))return!1;const l=this.getColumnIndexes(e),s=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(l,s)}_areIndexesInSameSection({first:e,last:t},n){const o=e<n,l=t<n;return o===l}}function ke(i,e,t,n,o,l={}){const s=[];for(let r=0;r<n;r++){const c=i.createElement("tableRow");i.insert(c,e,t),s.push(q(o,i,i.createPositionAt(c,"end"),l))}return s}function q(i,e,t,n={}){const o=[];let l=t;for(let s=0;s<i;s++){const r=U(e,l,n);o.push(r),l=e.createPositionAfter(r)}return o}function mt(i,e){if(i<e)return{newCellsSpan:1,updatedSpan:1};const t=Math.floor(i/e),n=i-t*e+t;return{newCellsSpan:t,updatedSpan:n}}function $o(i,e,t){const n=i.getAttribute("headingColumns")||0;if(n&&e.first<n){const o=Math.min(n-1,e.last)-e.first+1;t.setAttribute("headingColumns",n-o,i)}}function jo(i,{first:e,last:t},n){const o=i.getAttribute("headingRows")||0;if(e<o){const l=t<o?o-(t-e+1):e;_("headingRows",l,i,n,0)}}function Go(i,{first:e,last:t}){const n=new Map,o=[];for(const{row:l,column:s,cellHeight:r,cell:c}of new w(i,{endRow:t})){const a=l+r-1;if(l>=e&&l<=t&&a>t){const m=t-l+1,h=r-m;n.set(s,{cell:c,rowspan:h})}if(l<e&&a>=e){let m;a>=t?m=t-e+1:m=a-e+1,o.push({cell:c,rowspan:r-m})}}return{cellsToMove:n,cellsToTrim:o}}function Ko(i,e,t,n){const l=[...new w(i,{includeAllSlots:!0,row:e})],s=i.getChild(e);let r;for(const{column:c,cell:a,isAnchor:u}of l)if(t.has(c)){const{cell:d,rowspan:m}=t.get(c),h=r?n.createPositionAfter(r):n.createPositionAt(s,0);n.move(n.createRangeOn(d),h),_("rowspan",m,d,n),r=d}else u&&(r=a)}function qo(i,e){const t=i.start,n=e.start;return t.isBefore(n)?-1:1}function Xo(i,e){const t=Array.from(i.values()),n=Array.from(e.values()),o=Math.max(...t),l=Math.min(...t),s=Math.max(...n),r=Math.min(...n);return(o-l+1)*(s-r+1)}function oe({writer:i,table:e,row:t,column:n,cell:o}){const l=e.getAttribute("headingRows")||0,s=e.getAttribute("headingColumns")||0;t>=l&&n>=s?i.removeAttribute("tableCellType",o):i.setAttribute("tableCellType","header",o)}class Jo extends R{refresh(){const e=this.editor.plugins.get(v),t=e.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=e.isSelectionRectangular(t)}execute(){const e=this.editor.model,t=this.editor.plugins.get(v);e.change(n=>{const o=t.getSelectedTableCells(e.document.selection),l=o.shift(),{mergeWidth:s,mergeHeight:r}=Yo(l,o,t);_("colspan",s,l,n),_("rowspan",r,l,n);for(const a of o)Zo(a,l,n);const c=l.findAncestor("table");je(c,t),n.setSelection(l,"in")})}}function Zo(i,e,t){ht(i)||(ht(e)&&t.remove(t.createRangeIn(e)),t.move(t.createRangeIn(i),t.createPositionAt(e,"end"))),t.remove(i)}function ht(i){const e=i.getChild(0);return i.childCount==1&&e.is("element","paragraph")&&e.isEmpty}function Yo(i,e,t){let n=0,o=0;for(const a of e){const{row:u,column:d}=t.getCellLocation(a);n=gt(a,d,n,"colspan"),o=gt(a,u,o,"rowspan")}const{row:l,column:s}=t.getCellLocation(i),r=n-s,c=o-l;return{mergeWidth:r,mergeHeight:c}}function gt(i,e,t,n){const o=parseInt(i.getAttribute(n)||"1");return Math.max(t,e+o)}class Qo extends R{constructor(e){super(e),this.affectsData=!1}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),n=t.getSelectionAffectedTableCells(e.document.selection),o=t.getRowIndexes(n),l=n[0].findAncestor("table"),s=[];for(let r=o.first;r<=o.last;r++)for(const c of l.getChild(r).getChildren())s.push(e.createRangeOn(c));e.change(r=>{r.setSelection(s)})}}class el extends R{constructor(e){super(e),this.affectsData=!1}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,n=e.getSelectionAffectedTableCells(t.document.selection),o=n[0],l=n.pop(),s=o.findAncestor("table"),r=e.getCellLocation(o),c=e.getCellLocation(l),a=Math.min(r.column,c.column),u=Math.max(r.column,c.column),d=[];for(const m of new w(s,{startColumn:a,endColumn:u}))d.push(t.createRangeOn(m.cell));t.change(m=>{m.setSelection(d)})}}function tl(i){i.document.registerPostFixer(e=>nl(e,i))}function nl(i,e){const t=e.document.differ.getChanges();let n=!1;const o=new Set;for(const l of t){let s=null;l.type=="insert"&&l.name=="table"&&(s=l.position.nodeAfter),(l.type=="insert"||l.type=="remove")&&(l.name=="tableRow"||l.name=="tableCell")&&(s=l.position.findAncestor("table")),rl(l)&&(s=l.range.start.findAncestor("table")),s&&!o.has(s)&&(n=ol(s,i)||n,n=ll(s,i)||n,o.add(s))}return n}function ol(i,e){let t=!1;const n=il(i);if(n.length){t=!0;for(const o of n)_("rowspan",o.rowspan,o.cell,e,1)}return t}function ll(i,e){let t=!1;const n=sl(i),o=[];for(const[c,a]of n.entries())!a&&i.getChild(c).is("element","tableRow")&&o.push(c);if(o.length){t=!0;for(const c of o.reverse())e.remove(i.getChild(c)),n.splice(c,1)}const l=n.filter((c,a)=>i.getChild(a).is("element","tableRow")),s=l[0];if(!l.every(c=>c===s)){const c=l.reduce((a,u)=>u>a?u:a,0);for(const[a,u]of l.entries()){const d=c-u;if(d){for(let m=0;m<d;m++)U(e,e.createPositionAt(i.getChild(a),"end"));t=!0}}}return t}function il(i){const e=parseInt(i.getAttribute("headingRows")||"0"),t=Array.from(i.getChildren()).reduce((o,l)=>l.is("element","tableRow")?o+1:o,0),n=[];for(const{row:o,cell:l,cellHeight:s}of new w(i)){if(s<2)continue;const c=o<e?e:t;if(o+s>c){const a=c-o;n.push({cell:l,rowspan:a})}}return n}function sl(i){const e=new Array(i.childCount).fill(0);for(const{rowIndex:t}of new w(i,{includeAllSlots:!0}))e[t]++;return e}function rl(i){if(i.type!=="attribute")return!1;const e=i.attributeKey;return e==="headingRows"||e==="colspan"||e==="rowspan"}function al(i){i.document.registerPostFixer(e=>cl(e,i))}function cl(i,e){const t=e.document.differ.getChanges();let n=!1;for(const o of t)o.type=="insert"&&o.name=="table"&&(n=ul(o.position.nodeAfter,i)||n),o.type=="insert"&&o.name=="tableRow"&&(n=Yt(o.position.nodeAfter,i)||n),o.type=="insert"&&o.name=="tableCell"&&(n=Be(o.position.nodeAfter,i)||n),(o.type=="remove"||o.type=="insert")&&dl(o)&&(n=Be(o.position.parent,i)||n);return n}function ul(i,e){let t=!1;for(const n of i.getChildren())n.is("element","tableRow")&&(t=Yt(n,e)||t);return t}function Yt(i,e){let t=!1;for(const n of i.getChildren())t=Be(n,e)||t;return t}function Be(i,e){if(i.childCount==0)return e.insertElement("paragraph",i),!0;const t=Array.from(i.getChildren()).filter(n=>n.is("$text"));for(const n of t)e.wrap(e.createRangeOn(n),"paragraph");return!!t.length}function dl(i){return i.position.parent.is("element","tableCell")?i.type=="insert"&&i.name=="$text"||i.type=="remove":!1}function ml(i,e){const t=i.document.differ;for(const n of t.getChanges()){let o,l=!1;if(n.type=="attribute"){const a=n.range.start.nodeAfter;if(!a||!a.is("element","table")||n.attributeKey!="headingRows"&&n.attributeKey!="headingColumns")continue;o=a,l=n.attributeKey=="headingRows"}else(n.name=="tableRow"||n.name=="tableCell")&&(o=n.position.findAncestor("table"),l=n.name=="tableRow");if(!o)continue;const s=o.getAttribute("headingRows")||0,r=o.getAttribute("headingColumns")||0,c=new w(o);for(const a of c){const d=a.row<s||a.column<r?"th":"td",m=e.mapper.toViewElement(a.cell);m&&m.is("element")&&m.name!=d&&e.reconvertItem(l?a.cell.parent:a.cell)}}}function hl(i,e){const t=i.document.differ,n=new Set;for(const o of t.getChanges()){const l=o.type=="attribute"?o.range.start.parent:o.position.parent;l.is("element","tableCell")&&n.add(l)}for(const o of n.values()){const l=Array.from(o.getChildren()).filter(s=>gl(s,e.mapper));for(const s of l)e.reconvertItem(s)}}function gl(i,e){if(!i.is("element","paragraph"))return!1;const t=e.toViewElement(i);return t?Xt(i)!==t.is("element","span"):!1}class ee extends A{_additionalSlots;static get pluginName(){return"TableEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[v]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,n=t.schema,o=e.conversion,l=e.plugins.get(v);n.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),n.register("tableRow",{allowIn:"table",isLimit:!0}),n.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),o.for("upcast").add(ro()),o.for("upcast").add(ao()),o.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:lt(l,{asWidget:!0,additionalSlots:this._additionalSlots})}),o.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:lt(l,{additionalSlots:this._additionalSlots})}),o.for("upcast").elementToElement({model:"tableRow",view:"tr"}),o.for("upcast").add(co()),o.for("downcast").elementToElement({model:"tableRow",view:ho()}),o.for("upcast").elementToElement({model:"tableCell",view:"td"}),o.for("upcast").elementToElement({model:"tableCell",view:"th"}),o.for("upcast").add(ot("td")),o.for("upcast").add(ot("th")),o.for("editingDowncast").elementToElement({model:"tableCell",view:it({asWidget:!0,cellTypeEnabled:()=>L(this.editor)})}),o.for("dataDowncast").elementToElement({model:"tableCell",view:it({cellTypeEnabled:()=>L(this.editor)})}),o.for("editingDowncast").elementToElement({model:"paragraph",view:st({asWidget:!0}),converterPriority:"high"}),o.for("dataDowncast").elementToElement({model:"paragraph",view:st(),converterPriority:"high"}),o.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),o.for("upcast").attributeToAttribute({model:{key:"colspan",value:bt("colspan")},view:"colspan"}),o.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),o.for("upcast").attributeToAttribute({model:{key:"rowspan",value:bt("rowspan")},view:"rowspan"}),this._addPlainTableOutputConverters(),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.config.define("table.showHiddenBorders",!0),e.config.get("table.showHiddenBorders")&&e.editing.view.change(s=>{for(const r of e.editing.view.document.roots)s.addClass("ck-table-show-hidden-borders",r)}),e.commands.add("insertTable",new To(e)),e.commands.add("insertTableRowAbove",new rt(e,{order:"above"})),e.commands.add("insertTableRowBelow",new rt(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new at(e,{order:"left"})),e.commands.add("insertTableColumnRight",new at(e,{order:"right"})),e.commands.add("removeTableRow",new So(e)),e.commands.add("removeTableColumn",new ko(e)),e.commands.add("splitTableCellVertically",new ct(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new ct(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new Jo(e)),e.commands.add("mergeTableCellRight",new ne(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new ne(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new ne(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new ne(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new Eo(e)),e.commands.add("setTableRowHeader",new Po(e)),e.commands.add("selectTableRow",new Qo(e)),e.commands.add("selectTableColumn",new el(e)),tl(t),al(t),this.listenTo(t.document,"change:data",()=>{L(e)||ml(t,e.editing),hl(t,e.editing)})}registerAdditionalSlot(e){this._additionalSlots.push(e)}_addPlainTableOutputConverters(){const e=this.editor;e.conversion.for("dataDowncast").elementToStructure({model:"table",view:fo(e),converterPriority:"high"}),e.plugins.has("TableCaptionEditing")&&e.conversion.for("dataDowncast").elementToElement({model:"caption",view:po(e),converterPriority:"high"}),e.plugins.has("TablePropertiesEditing")&&wo(e)}}function bt(i){return e=>{const t=parseInt(e.getAttribute(i));return Number.isNaN(t)||t<=0?null:t}}class ft extends z{items;keystrokes;focusTracker;constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new ye,this.focusTracker=new _e,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(n,o)=>`${o} × ${n}`),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(n=>{n.preventDefault()}),click:t.to(()=>{this.fire("execute")})}}),this.on("boxover",(n,o)=>{const{row:l,column:s}=o.target.dataset;this.items.get((parseInt(l,10)-1)*10+(parseInt(s,10)-1)).focus()}),this.focusTracker.on("change:focusedElement",(n,o,l)=>{if(!l)return;const{row:s,column:r}=l.dataset;this.set({rows:parseInt(s),columns:parseInt(r)})}),this.on("change:columns",()=>this._highlightGridBoxes()),this.on("change:rows",()=>this._highlightGridBoxes())}render(){super.render(),Un({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)}reset(){this.set({rows:1,columns:1})}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map((n,o)=>{const l=Math.floor(o/10),s=o%10,r=l<e&&s<t;n.set("isOn",r)})}_createGridButton(e,t,n,o){const l=new N(e);return l.set({label:o,class:"ck-insert-table-dropdown-grid-box"}),l.extendTemplate({attributes:{"data-row":t,"data-column":n}}),l}_createGridCollection(){const e=[];for(let t=0;t<100;t++){const n=Math.floor(t/10),o=t%10,l=`${n+1} × ${o+1}`;e.push(this._createGridButton(this.locale,n+1,o+1,l))}return this.createCollection(e)}}class bl extends A{static get pluginName(){return"TableUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t,o=e.locale.contentLanguageDirection==="ltr";e.ui.componentFactory.add("insertTable",l=>{const s=e.commands.get("insertTable"),r=se(l);r.bind("isEnabled").to(s),r.buttonView.set({icon:et,label:t("Insert table"),tooltip:!0});let c;return r.on("change:isOpen",()=>{c||(c=new ft(l),r.panelView.children.add(c),c.delegate("execute").to(r),r.on("execute",()=>{e.execute("insertTable",{rows:c.rows,columns:c.columns}),e.editing.view.focus()}))}),r}),e.ui.componentFactory.add("menuBar:insertTable",l=>{const s=e.commands.get("insertTable"),r=new On(l),c=new ft(l);return c.delegate("execute").to(r),r.on("change:isOpen",(a,u,d)=>{d||c.reset()}),c.on("execute",()=>{e.execute("insertTable",{rows:c.rows,columns:c.columns}),e.editing.view.focus()}),r.buttonView.set({label:t("Table"),icon:et}),r.panelView.children.add(c),r.bind("isEnabled").to(s),r}),e.ui.componentFactory.add("tableColumn",l=>{const s=[{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"),vn,s,l)}),e.ui.componentFactory.add("tableRow",l=>{const s=[{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"),Sn,s,l)}),e.ui.componentFactory.add("mergeTableCells",l=>{const s=[{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"),Rn,s,l)})}_prepareDropdown(e,t,n,o){const l=this.editor,s=se(o),r=this._fillDropdownWithListOptions(s,n);return s.buttonView.set({label:e,icon:t,tooltip:!0}),s.bind("isEnabled").toMany(r,"isEnabled",(...c)=>c.some(a=>a)),this.listenTo(s,"execute",c=>{l.execute(c.source.commandName),c.source instanceof Hn||l.editing.view.focus()}),s}_prepareMergeSplitButtonDropdown(e,t,n,o){const l=this.editor,s=se(o,zn),r="mergeTableCells",c=l.commands.get(r),a=this._fillDropdownWithListOptions(s,n);return s.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),s.bind("isEnabled").toMany([c,...a],"isEnabled",(...u)=>u.some(d=>d)),this.listenTo(s.buttonView,"execute",()=>{l.execute(r),l.editing.view.focus()}),this.listenTo(s,"execute",u=>{l.execute(u.source.commandName),l.editing.view.focus()}),s}_fillDropdownWithListOptions(e,t){const n=this.editor,o=[],l=new It;for(const s of t)fl(s,n,o,l);return He(e,l),o}}function fl(i,e,t,n){if(i.type==="button"||i.type==="switchbutton"){const o=i.model=new Vt(i.model),{commandName:l,bindIsOn:s}=i.model,r=e.commands.get(l);t.push(r),o.set({commandName:l}),o.bind("isEnabled").to(r),s&&o.bind("isOn").to(r,"value"),o.set({withText:!0})}n.add(i)}class M extends A{static get pluginName(){return"TableSelection"}static get isOfficialPlugin(){return!0}static get requires(){return[v,v]}init(){const e=this.editor,t=e.model,n=e.editing.view;this.listenTo(t,"deleteContent",(o,l)=>this._handleDeleteContent(o,l),{priority:"high"}),this.listenTo(n.document,"insertText",(o,l)=>this._handleInsertTextEvent(o,l),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(v),t=this.editor.model.document.selection,n=e.getSelectedTableCells(t);return n.length==0?null:n}getSelectionAsFragment(){const e=this.editor.plugins.get(v),t=this.getSelectedTableCells();return t?this.editor.model.change(n=>{const o=n.createDocumentFragment(),{first:l,last:s}=e.getColumnIndexes(t),{first:r,last:c}=e.getRowIndexes(t),a=t[0].findAncestor("table");let u=c,d=s;if(e.isSelectionRectangular(t)){const g={firstColumn:l,lastColumn:s,firstRow:r,lastRow:c};u=Gt(a,g),d=Kt(a,g)}const h=Ot(a,{startRow:r,startColumn:l,endRow:u,endColumn:d},n);return n.insert(h,o,0),o}):null}setCellSelection(e,t){const n=this._getCellsToSelect(e,t);this.editor.model.change(o=>{o.setSelection(n.cells.map(l=>o.createRangeOn(l)),{backward:n.backward})})}getFocusCell(){const n=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return n&&n.is("element","tableCell")?n:null}getAnchorCell(){const e=this.editor.model.document.selection,n=Te(e.getRanges()).getContainedElement();return n&&n.is("element","tableCell")?n:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add(o=>o.on("selection",(l,s,r)=>{const c=r.writer;n(c);const a=this.getSelectedTableCells();if(!a)return;for(const d of a){const m=r.mapper.toViewElement(d);c.addClass("ck-editor__editable_selected",m),t.add(m)}const u=r.mapper.toViewElement(a[a.length-1]);c.setSelection(u,0)},{priority:"lowest"}));function n(o){for(const l of t)o.removeClass("ck-editor__editable_selected",l);t.clear()}}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change(n=>{const o=n.createPositionAt(t[0],0),l=e.model.schema.getNearestSelectionRange(o);n.setSelection(l)})}})}_handleDeleteContent(e,t){const n=this.editor.plugins.get(v),o=t[0],l=t[1],s=this.editor.model,r=!l||l.direction=="backward",c=n.getSelectedTableCells(o);c.length&&(e.stop(),s.change(a=>{const u=c[r?c.length-1:0];s.change(m=>{for(const h of c)s.deleteContent(m.createSelection(h,"in"))});const d=s.schema.getNearestSelectionRange(a.createPositionAt(u,0));o.is("documentSelection")?a.setSelection(d):o.setTo(d)}))}_handleInsertTextEvent(e,t){const n=this.editor,o=this.getSelectedTableCells();if(!o)return;const l=n.editing.view,s=n.editing.mapper,r=o.map(c=>l.createRangeOn(s.toViewElement(c)));t.selection=l.createSelection(r),t.preventDefault()}_getCellsToSelect(e,t){const n=this.editor.plugins.get("TableUtils"),o=n.getCellLocation(e),l=n.getCellLocation(t),s=Math.min(o.row,l.row),r=Math.max(o.row,l.row),c=Math.min(o.column,l.column),a=parseInt(t.getAttribute("colspan")||"1")-1,u=Math.max(o.column,l.column+a),d=new Array(r-s+1).fill(null).map(()=>[]),m={startRow:s,endRow:r,startColumn:c,endColumn:u};for(const{row:b,cell:f}of new w(e.findAncestor("table"),m))d[b-s].push(f);const h=l.row<o.row,g=l.column<o.column;return h&&d.reverse(),g&&d.forEach(b=>b.reverse()),{cells:d.flat(),backward:h||g}}}class pl extends A{static get pluginName(){return"TableClipboard"}static get isOfficialPlugin(){return!0}static get requires(){return[Re,tt,M,v]}init(){const t=this.editor.editing.view.document;this.listenTo(t,"copy",(n,o)=>this._onCopyCut(n,o)),this.listenTo(t,"cut",(n,o)=>this._onCopyCut(n,o)),this._listenToContentInsertion(),this.decorate("_replaceTableSlotCell")}_listenToContentInsertion(){const{editor:e}=this,t=e.plugins.get(tt),n=e.plugins.get(M);let o=!1;t.on("contentInsertion",(l,s)=>{o=s.method==="paste"}),this.listenTo(e.model,"insertContent",(l,[s,r])=>{(o||n.getSelectedTableCells()!==null)&&this._onInsertContent(l,s,r)},{priority:"high"}),t.on("contentInsertion",()=>{o=!1},{priority:"lowest"})}_onCopyCut(e,t){const n=this.editor.editing.view,o=this.editor.plugins.get(M),l=this.editor.plugins.get(Re);o.getSelectedTableCells()&&(e.name=="cut"&&!this.editor.model.canEditAt(this.editor.model.document.selection)||(t.preventDefault(),e.stop(),this.editor.model.enqueueChange({isUndoable:e.name==="cut"},()=>{const s=l._copySelectedFragmentWithMarkers(e.name,this.editor.model.document.selection,()=>o.getSelectionAsFragment());n.document.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:this.editor.data.toView(s),method:e.name})})))}_onInsertContent(e,t,n){if(n&&!n.is("documentSelection"))return;const o=this.editor.model,l=this.editor.plugins.get(v),s=this.editor.plugins.get(Re),r=this.getTableIfOnlyTableInContent(t,o);if(!r)return;const c=l.getSelectionAffectedTableCells(o.document.selection);if(!c.length){je(r,l);return}e.stop(),t.is("documentFragment")?s._pasteMarkersIntoTransformedElement(t.markers,a=>this._replaceSelectedCells(r,c,a)):this.editor.model.change(a=>{this._replaceSelectedCells(r,c,a)})}_replaceSelectedCells(e,t,n){const o=this.editor.plugins.get(v),l={width:o.getColumns(e),height:o.getRows(e)},s=Cl(t,l,n,o),r=s.lastRow-s.firstRow+1,c=s.lastColumn-s.firstColumn+1,a={startRow:0,startColumn:0,endRow:Math.min(r,l.height)-1,endColumn:Math.min(c,l.width)-1};e=Ot(e,a,n);const u=t[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(e,l,u,s,n);if(this.editor.plugins.get("TableSelection").isEnabled){const m=o.sortRanges(d.map(h=>n.createRangeOn(h)));n.setSelection(m)}else n.setSelection(d[0],0);return u}_replaceSelectedCellsWithPasted(e,t,n,o,l){const{width:s,height:r}=t,c=Tl(e,s,r),a=[...new w(n,{startRow:o.firstRow,endRow:o.lastRow,startColumn:o.firstColumn,endColumn:o.lastColumn,includeAllSlots:!0})],u=[];let d;for(const f of a){const{row:p,column:C}=f;C===o.firstColumn&&(d=f.getPositionBefore());const T=p-o.firstRow,y=C-o.firstColumn,k=c[T%r][y%s],B=k?l.cloneElement(k):null,F=this._replaceTableSlotCell(f,B,d,l);F&&(jt(F,p,C,o.lastRow,o.lastColumn,l),u.push(F),d=l.createPositionAfter(F))}const m=parseInt(n.getAttribute("headingRows")||"0"),h=parseInt(n.getAttribute("headingColumns")||"0"),g=o.firstRow<m&&m<=o.lastRow,b=o.firstColumn<h&&h<=o.lastColumn;if(g){const f={first:o.firstColumn,last:o.lastColumn},p=Fe(n,m,f,l,o.firstRow);u.push(...p)}if(b){const f={first:o.firstRow,last:o.lastRow},p=De(n,h,f,l);u.push(...p)}return u}_replaceTableSlotCell(e,t,n,o){const{cell:l,isAnchor:s}=e;return s&&o.remove(l),t?(o.insert(t,n),t):null}getTableIfOnlyTableInContent(e,t){if(!e.is("documentFragment")&&!e.is("element"))return null;if(e.is("element","table"))return e;if(e.childCount==1&&e.getChild(0).is("element","table"))return e.getChild(0);const n=t.createRangeIn(e);for(const o of n.getItems())if(o.is("element","table")){const l=t.createRange(n.start,t.createPositionBefore(o));if(t.hasContent(l,{ignoreWhitespaces:!0}))return null;const s=t.createRange(t.createPositionAfter(o),n.end);return t.hasContent(s,{ignoreWhitespaces:!0})?null:o}return null}}function Cl(i,e,t,n){const o=i[0].findAncestor("table"),l=n.getColumnIndexes(i),s=n.getRowIndexes(i),r={firstColumn:l.first,lastColumn:l.last,firstRow:s.first,lastRow:s.last},c=i.length===1;return c&&(r.lastRow+=e.height-1,r.lastColumn+=e.width-1,wl(o,r.lastRow+1,r.lastColumn+1,n)),c||!n.isSelectionRectangular(i)?yl(o,r,t):(r.lastRow=Gt(o,r),r.lastColumn=Kt(o,r)),r}function wl(i,e,t,n){const o=n.getColumns(i),l=n.getRows(i);t>o&&n.insertColumns(i,{at:o,columns:t-o}),e>l&&n.insertRows(i,{at:l,rows:e-l})}function Tl(i,e,t){const n=new Array(t).fill(null).map(()=>new Array(e).fill(null));for(const{column:o,row:l,cell:s}of new w(i))n[l][o]=s;return n}function yl(i,e,t){const{firstRow:n,lastRow:o,firstColumn:l,lastColumn:s}=e,r={first:n,last:o},c={first:l,last:s};De(i,l,r,t),De(i,s+1,r,t),Fe(i,n,c,t),Fe(i,o+1,c,t,n)}function Fe(i,e,t,n,o=0){return e<1?void 0:Ht(i,e,o).filter(({column:r,cellWidth:c})=>Qt(r,c,t)).map(({cell:r})=>zt(r,e,n))}function De(i,e,t,n){return e<1?void 0:Ut(i,e).filter(({row:s,cellHeight:r})=>Qt(s,r,t)).map(({cell:s,column:r})=>$t(s,r,e,n))}function Qt(i,e,t){const n=i+e-1,{first:o,last:l}=t,s=i>=o&&i<=l,r=i<o&&n>=o;return s||r}class _l extends A{static get pluginName(){return"TableKeyboard"}static get isOfficialPlugin(){return!0}static get requires(){return[M,v]}init(){const e=this.editor,n=e.editing.view.document,o=e.t;this.listenTo(n,"arrowKey",(...l)=>this._onArrowKey(...l),{context:"table"}),this.listenTo(n,"tab",(...l)=>this._handleTabOnSelectedTable(...l),{context:"figure"}),this.listenTo(n,"tab",(...l)=>this._handleTab(...l),{context:["th","td"]}),e.accessibility.addKeystrokeInfoGroup({id:"table",label:o("Keystrokes that can be used in a table cell"),keystrokes:[{label:o("Move the selection to the next cell"),keystroke:"Tab"},{label:o("Move the selection to the previous cell"),keystroke:"Shift+Tab"},{label:o("Insert a new table row (when in the last cell of a table)"),keystroke:"Tab"},{label:o("Navigate through the table"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]}]})}_handleTabOnSelectedTable(e,t){const l=this.editor.model.document.selection.getSelectedElement();!l||!l.is("element","table")||t.stopPropagation()}_handleTab(e,t){const n=this.editor,o=this.editor.plugins.get(v),l=this.editor.plugins.get("TableSelection"),s=n.model.document.selection,r=!t.shiftKey;let c=o.getTableCellsContainingSelection(s)[0];if(c||(c=l.getFocusCell()),!c)return;t.stopPropagation();const a=c.parent,u=a.parent,d=u.getChildIndex(a),h=a.getChildIndex(c)===a.childCount-1,g=d===o.getRows(u)-1;r&&g&&h&&n.execute("insertTableRowBelow")}_onArrowKey(e,t){const n=this.editor,o=t.keyCode,l=wn(o,n.locale.contentLanguageDirection);this._handleArrowKeys(l,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const n=this.editor.plugins.get(v),o=this.editor.plugins.get("TableSelection"),l=this.editor.model,s=l.document.selection,r=["right","down"].includes(e),c=n.getSelectedTableCells(s);if(c.length){let u;return t?u=o.getFocusCell():u=r?c[c.length-1]:c[0],this._navigateFromCellInDirection(u,e,t),!0}const a=s.focus.findAncestor("tableCell");if(!a)return!1;if(!s.isCollapsed)if(t){if(s.isBackward==r&&!s.containsEntireContent(a))return!1}else{const u=s.getSelectedElement();if(!u||!l.schema.isObject(u))return!1}return this._isSelectionAtCellEdge(s,a,r)?(this._navigateFromCellInDirection(a,e,t),!0):!1}_isSelectionAtCellEdge(e,t,n){const o=this.editor.model,l=this.editor.model.schema,s=n?e.getLastPosition():e.getFirstPosition();if(!l.getLimitElement(s).is("element","tableCell"))return o.createPositionAt(t,n?"end":0).isTouching(s);const r=o.createSelection(s);return o.modifySelection(r,{direction:n?"forward":"backward"}),s.isEqual(r.focus)}_navigateFromCellInDirection(e,t,n=!1){const o=this.editor.model,l=e.findAncestor("table"),s=[...new w(l,{includeAllSlots:!0})],{row:r,column:c}=s[s.length-1],a=s.find(({cell:C})=>C==e);let{row:u,column:d}=a;switch(t){case"left":d--;break;case"up":u--;break;case"right":d+=a.cellWidth;break;case"down":u+=a.cellHeight;break}const m=u<0||u>r,h=d<0&&u<=0,g=d>c&&u>=r;if(m||h||g){o.change(C=>{C.setSelection(C.createRangeOn(l))});return}d<0?(d=n?0:c,u--):d>c&&(d=n?c:0,u++);const b=s.find(C=>C.row==u&&C.column==d).cell,f=["right","down"].includes(t),p=this.editor.plugins.get("TableSelection");if(n&&p.isEnabled){const C=p.getAnchorCell()||e;p.setCellSelection(C,b)}else{const C=o.createPositionAt(b,f?0:"end");o.change(T=>{T.setSelection(C)})}}}class en extends Jn{domEventType=["mousemove","mouseleave"];onDomEvent(e){this.fire(e.type,e)}}class Al extends A{static get pluginName(){return"TableMouse"}static get isOfficialPlugin(){return!0}static get requires(){return[M,v]}init(){this.editor.editing.view.addObserver(en),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(v);let n=!1;const o=e.plugins.get(M);this.listenTo(e.editing.view.document,"mousedown",(l,s)=>{const r=e.model.document.selection;if(!this.isEnabled||!o.isEnabled||!s.domEvent.shiftKey)return;const c=o.getAnchorCell()||t.getTableCellsContainingSelection(r)[0];if(!c)return;const a=this._getModelTableCellFromDomEvent(s);a&&pt(c,a)&&(n=!0,o.setCellSelection(c,a),s.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{n=!1}),this.listenTo(e.editing.view.document,"selectionChange",l=>{n&&l.stop()},{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,n,o=!1,l=!1;const s=e.plugins.get(M);this.listenTo(e.editing.view.document,"mousedown",(r,c)=>{!this.isEnabled||!s.isEnabled||c.domEvent.shiftKey||c.domEvent.ctrlKey||c.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(c))}),this.listenTo(e.editing.view.document,"mousemove",(r,c)=>{if(!c.domEvent.buttons||!t)return;const a=this._getModelTableCellFromDomEvent(c);a&&pt(t,a)&&(n=a,!o&&n!=t&&(o=!0)),o&&(l=!0,s.setCellSelection(t,n),c.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{o=!1,l=!1,t=null,n=null}),this.listenTo(e.editing.view.document,"selectionChange",r=>{l&&r.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,n=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(n).parent.findAncestor("tableCell",{includeSelf:!0})}}function pt(i,e){return i.parent.parent==e.parent.parent}class Li extends A{static get requires(){return[ee,bl,M,Al,_l,pl,fn]}static get pluginName(){return"Table"}static get isOfficialPlugin(){return!0}}function be(i){const e=tn(i);return e||ve(i)}function tn(i){const e=i.getSelectedElement();return e&&nn(e)?e:null}function ve(i){const e=i.getFirstPosition();if(!e)return null;let t=e.parent;for(;t;){if(t.is("element")&&nn(t))return t;t=t.parent}return null}function nn(i){return i.is("element")&&!!i.getCustomProperty("table")&&pn(i)}class Wi extends A{static get requires(){return[Ye]}static get pluginName(){return"TableToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.t,n=e.plugins.get(Ye),o=e.config.get("table.contentToolbar"),l=e.config.get("table.tableToolbar");o&&n.register("tableContent",{ariaLabel:t("Table toolbar"),items:o,getRelatedElement:ve}),l&&n.register("table",{ariaLabel:t("Table toolbar"),items:l,getRelatedElement:tn})}}class vl extends z{options;focusTracker;focusCycler;_focusables;dropdownView;inputView;keystrokes;_stillTyping;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 _e,this._focusables=new ze,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new ye,this._stillTyping=!1,this.focusCycler=new Ue({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",(n,o,l)=>this._setInputValue(l))}render(){super.render(),[this.inputView,this.dropdownView.buttonView].forEach(e=>{this.focusTracker.add(e.element),this._focusables.add(e)}),this.keystrokes.listenTo(this.element)}focus(e){e===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,n=this.bindTemplate,o=this._createColorSelector(e),l=se(e),s=new z;return s.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:n.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",n.if("value","ck-hidden",r=>r!="")]}}]}),l.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),l.buttonView.children.add(s),l.buttonView.label=t("Color picker"),l.buttonView.tooltip=!0,l.panelPosition=e.uiLanguageDirection==="rtl"?"se":"sw",l.panelView.children.add(o),l.bind("isEnabled").to(this,"isReadOnly",r=>!r),l.on("change:isOpen",(r,c,a)=>{a&&(o.updateSelectedColors(),o.showColorGridsFragment())}),l}_createInputTextView(){const e=this.locale,t=new $n(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 n=t.element.value,o=this.options.colorDefinitions.find(l=>n===l.label);this._stillTyping=!0,this.value=o&&o.color||n}),t.on("blur",()=>{this._stillTyping=!1,this._setInputValue(t.element.value)}),t.delegate("input").to(this),t}_createColorSelector(e){const t=e.t,n=this.options.defaultColorValue||"",o=t(n?"Restore default":"Remove color"),l=new jn(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:o,colorPickerLabel:t("Color picker"),colorPickerViewConfig:this.options.colorPickerConfig===!1?!1:{...this.options.colorPickerConfig,hideInput:!0}});l.appendUI(),l.on("execute",(r,c)=>{if(c.source==="colorPickerSaveButton"){this.dropdownView.isOpen=!1;return}this.value=c.value||n,this.fire("input"),c.source!=="colorPicker"&&(this.dropdownView.isOpen=!1)});let s=this.value;return l.on("colorPicker:cancel",()=>{this.value=s,this.fire("input"),this.dropdownView.isOpen=!1}),l.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{s=this.value}),l.bind("selectedColor").to(this,"value"),l}_setInputValue(e){if(!this._stillTyping){const t=Ct(e),n=this.options.colorDefinitions.find(o=>t===Ct(o.color));n?this.inputView.value=n.label:this.inputView.value=e||""}}}function Ct(i){return i.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const Je=i=>i==="";function Ze(i){return{none:i("None"),solid:i("Solid"),dotted:i("Dotted"),dashed:i("Dashed"),double:i("Double"),groove:i("Groove"),ridge:i("Ridge"),inset:i("Inset"),outset:i("Outset")}}function on(i){return i('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function ln(i){return i('The value is invalid. Try "10px" or "2em" or simply "2".')}function fe(i){return i=i.trim().toLowerCase(),Je(i)||Zn(i)}function J(i){return i=i.trim(),Je(i)||an(i)||Dt(i)||Yn(i)}function sn(i){return i=i.trim(),Je(i)||an(i)||Dt(i)}function rn(i,e){const t=new It,n=Ze(i.t);for(const o in n){const l={type:"button",model:new Vt({_borderStyleValue:o,label:n[o],role:"menuitemradio",withText:!0})};o==="none"?l.model.bind("isOn").to(i,"borderStyle",s=>e==="none"?!s:s===o):l.model.bind("isOn").to(i,"borderStyle",s=>s===o),t.add(l)}return t}function Me(i){const{view:e,icons:t,toolbar:n,labels:o,propertyName:l,nameToValue:s,defaultValue:r}=i;for(const c in o){const a=new N(e.locale);a.set({role:"radio",isToggleable:!0,label:o[c],icon:t[c],tooltip:o[c]});const u=s?s(c):c;a.bind("isOn").to(e,l,d=>{let m=d;return d===""&&r&&(m=r),u===m}),a.on("execute",()=>{!r&&u&&e[l]===u?e[l]=void 0:e[l]=u}),n.items.add(a)}}const pe=[{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 Ce(i){return(e,t,n)=>{const o=new vl(e.locale,{colorDefinitions:Sl(i.colorConfig),columns:i.columns,defaultColorValue:i.defaultColorValue,colorPickerConfig:i.colorPickerConfig});return o.inputView.set({id:t,ariaDescribedById:n}),o.bind("isReadOnly").to(e,"isEnabled",l=>!l),o.bind("hasError").to(e,"errorText",l=>!!l),o.on("input",()=>{e.errorText=null}),e.bind("isEmpty","isFocused").to(o),o}}function an(i){const e=parseFloat(i);return!Number.isNaN(e)&&i===String(e)}function Sl(i){return i.map(e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}}))}class Rl extends z{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;paddingInput;widthInput;heightInput;horizontalAlignmentToolbar;verticalAlignmentToolbar;saveButtonView;cancelButtonView;_focusables;_focusCycler;constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:n,borderWidthInput:o,borderColorInput:l,borderRowLabel:s}=this._createBorderFields(),{backgroundRowLabel:r,backgroundInput:c}=this._createBackgroundFields(),{widthInput:a,operatorLabel:u,heightInput:d,dimensionsLabel:m}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:g,alignmentLabel:b}=this._createAlignmentFields();this.focusTracker=new _e,this.keystrokes=new ye,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=o,this.borderColorInput=l,this.backgroundInput=c,this.paddingInput=this._createPaddingField(),this.widthInput=a,this.heightInput=d,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=g;const{saveButtonView:f,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=f,this.cancelButtonView=p,this._focusables=new ze,this._focusCycler=new Ue({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Lt(e,{label:this.t("Cell properties")})),this.children.add(new x(e,{labelView:s,children:[s,n,l,o],class:"ck-table-form__border-row"})),this.children.add(new x(e,{labelView:r,children:[r,c],class:"ck-table-form__background-row"})),this.children.add(new x(e,{children:[new x(e,{labelView:m,children:[m,a,u,d],class:"ck-table-form__dimensions-row"}),new x(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new x(e,{labelView:b,children:[b,h,g],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new x(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(),Wt({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,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},n=Ce({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),o=this.locale,l=this.t,s=l("Style"),r=new D(o);r.text=l("Border");const c=Ze(l),a=new P(o,Nt);a.set({label:s,class:"ck-table-form__border-style"}),a.fieldView.buttonView.set({ariaLabel:s,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:s}),a.fieldView.buttonView.bind("label").to(this,"borderStyle",m=>c[m||"none"]),a.fieldView.on("execute",m=>{this.borderStyle=m.source._borderStyleValue}),a.bind("isEmpty").to(this,"borderStyle",m=>!m),He(a.fieldView,rn(this,t.style),{role:"menu",ariaLabel:s});const u=new P(o,H);u.set({label:l("Width"),class:"ck-table-form__border-width"}),u.fieldView.bind("value").to(this,"borderWidth"),u.bind("isEnabled").to(this,"borderStyle",le),u.fieldView.on("input",()=>{this.borderWidth=u.fieldView.element.value});const d=new P(o,n);return d.set({label:l("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",le),d.fieldView.on("input",()=>{this.borderColor=d.fieldView.value}),this.on("change:borderStyle",(m,h,g,b)=>{le(g)||(this.borderColor="",this.borderWidth=""),le(b)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:r,borderStyleDropdown:a,borderColorInput:d,borderWidthInput:u}}_createBackgroundFields(){const e=this.locale,t=this.t,n=new D(e);n.text=t("Background");const o=Ce({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),l=new P(e,o);return l.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),l.fieldView.bind("value").to(this,"backgroundColor"),l.fieldView.on("input",()=>{this.backgroundColor=l.fieldView.value}),{backgroundRowLabel:n,backgroundInput:l}}_createDimensionFields(){const e=this.locale,t=this.t,n=new D(e);n.text=t("Dimensions");const o=new P(e,H);o.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),o.fieldView.bind("value").to(this,"width"),o.fieldView.on("input",()=>{this.width=o.fieldView.element.value});const l=new z(e);l.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const s=new P(e,H);return s.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),s.fieldView.bind("value").to(this,"height"),s.fieldView.on("input",()=>{this.height=s.fieldView.element.value}),{dimensionsLabel:n,widthInput:o,operatorLabel:l,heightInput:s}}_createPaddingField(){const e=this.locale,t=this.t,n=new P(e,H);return n.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),n.fieldView.bind("value").to(this,"padding"),n.fieldView.on("input",()=>{this.padding=n.fieldView.element.value}),n}_createAlignmentFields(){const e=this.locale,t=this.t,n=new D(e),o={left:Mn,center:Dn,right:Fn,justify:Bn,top:Nn,middle:Wn,bottom:Ln};n.text=t("Table cell text alignment");const l=new xe(e),s=e.contentLanguageDirection==="rtl";l.set({isCompact:!0,role:"radiogroup",ariaLabel:t("Horizontal text alignment toolbar")}),Me({view:this,icons:o,toolbar:l,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:c=>{if(s){if(c==="left")return"right";if(c==="right")return"left"}return c},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const r=new xe(e);return r.set({isCompact:!0,role:"radiogroup",ariaLabel:t("Vertical text alignment toolbar")}),Me({view:this,icons:o,toolbar:r,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:l,verticalAlignmentToolbar:r,alignmentLabel:n}}_createActionButtons(){const e=this.locale,t=this.t,n=new N(e),o=new N(e),l=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return n.set({label:t("Save"),icon:xt,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(l,"errorText",(...s)=>s.every(r=>!r)),o.set({label:t("Cancel"),icon:Pt,class:"ck-button-cancel",withText:!0}),o.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:o}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,n=t("Align cell text to the left"),o=t("Align cell text to the center"),l=t("Align cell text to the right"),s=t("Justify cell text");return e.uiLanguageDirection==="rtl"?{right:l,center:o,left:n,justify:s}:{left:n,center:o,right:l,justify:s}}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 le(i){return i!=="none"}const Oe=[O.defaultPositions.northArrowSouth,O.defaultPositions.northArrowSouthWest,O.defaultPositions.northArrowSouthEast,O.defaultPositions.southArrowNorth,O.defaultPositions.southArrowNorthWest,O.defaultPositions.southArrowNorthEast,O.defaultPositions.viewportStickyNorth];function cn(i,e){const t=i.plugins.get("ContextualBalloon"),n=i.editing.view.document.selection;let o;e==="cell"?ve(n)&&(o=dn(i)):be(n)&&(o=un(i)),o&&t.updatePosition(o)}function un(i){const e=i.model.document.selection,t=W(e),n=i.editing.mapper.toViewElement(t);return{target:i.editing.view.domConverter.mapViewToDom(n),positions:Oe}}function dn(i){const e=i.editing.mapper,t=i.editing.view.domConverter,n=i.model.document.selection;if(n.rangeCount>1)return{target:()=>kl(n.getRanges(),i),positions:Oe};const o=mn(n.getFirstPosition()),l=e.toViewElement(o);return{target:t.mapViewToDom(l),positions:Oe}}function mn(i){return i.nodeAfter&&i.nodeAfter.is("element","tableCell")?i.nodeAfter:i.findAncestor("tableCell")}function kl(i,e){const t=e.editing.mapper,n=e.editing.view.domConverter,o=Array.from(i).map(l=>{const s=mn(l.start),r=t.toViewElement(s);return new de(n.mapViewToDom(r))});return de.getBoundingRect(o)}const Il=500,wt={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class xl extends A{_defaultContentTableCellProperties;_defaultLayoutTableCellProperties;_balloon;view;_viewWithContentTableDefaults;_viewWithLayoutTableDefaults;_undoStepBatch;_isReady;static get requires(){return[me]}static get pluginName(){return"TableCellPropertiesUI"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:pe,backgroundColors:pe})}init(){const e=this.editor,t=e.t;this._defaultContentTableCellProperties=Ke(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:e.locale.contentLanguageDirection==="rtl"}),this._defaultLayoutTableCellProperties=Ae(void 0,{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,isRightToLeftContent:e.locale.contentLanguageDirection==="rtl"}),this._balloon=e.plugins.get(me),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",n=>{const o=new N(n);o.set({label:t("Cell properties"),icon:In,tooltip:!0}),this.listenTo(o,"execute",()=>this._showView());const l=Object.values(wt).map(s=>e.commands.get(s));return o.bind("isEnabled").toMany(l,"isEnabled",(...s)=>s.some(r=>r)),o})}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(e){const t=this.editor,n=t.config.get("table.tableCellProperties"),o=he(n.borderColors),l=ge(t.locale,o),s=he(n.backgroundColors),r=ge(t.locale,s),c=n.colorPicker!==!1,a=new Rl(t.locale,{borderColors:l,backgroundColors:r,defaultTableCellProperties:e,colorPickerConfig:c?n.colorPicker||{}:!1}),u=t.t;a.render(),this.listenTo(a,"submit",()=>{this._hideView()}),this.listenTo(a,"cancel",()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()}),a.keystrokes.set("Esc",(h,g)=>{this._hideView(),g()}),Et({emitter:a,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const d=on(u),m=ln(u);return a.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),a.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:a.borderColorInput,commandName:"tableCellBorderColor",errorText:d,validator:fe})),a.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:a.borderWidthInput,commandName:"tableCellBorderWidth",errorText:m,validator:sn})),a.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:a.paddingInput,commandName:"tableCellPadding",errorText:m,validator:J})),a.on("change:width",this._getValidatedPropertyChangeCallback({viewField:a.widthInput,commandName:"tableCellWidth",errorText:m,validator:J})),a.on("change:height",this._getValidatedPropertyChangeCallback({viewField:a.heightInput,commandName:"tableCellHeight",errorText:m,validator:J})),a.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:a.backgroundInput,commandName:"tableCellBackgroundColor",errorText:d,validator:fe})),a.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),a.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),a}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(wt).map(([n,o])=>{const l=n,s=this.view===this._viewWithContentTableDefaults?this._defaultContentTableCellProperties[l]||"":this._defaultLayoutTableCellProperties[l]||"";return[n,e.get(o).value||s]}).forEach(([n,o])=>{(n==="borderColor"||n==="borderWidth")&&t.value==="none"||this.view.set(n,o)}),this._isReady=!0}_showView(){const e=this.editor,t=be(e.editing.view.document.selection),n=t&&e.editing.mapper.toModelElement(t),o=!n||n.getAttribute("tableType")!=="layout";o&&!this._viewWithContentTableDefaults?this._viewWithContentTableDefaults=this._createPropertiesView(this._defaultContentTableCellProperties):!o&&!this._viewWithLayoutTableDefaults&&(this._viewWithLayoutTableDefaults=this._createPropertiesView(this._defaultLayoutTableCellProperties)),this.view=o?this._viewWithContentTableDefaults:this._viewWithLayoutTableDefaults,this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:dn(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,t=e.editing.view.document;ve(t.selection)?this._isViewVisible&&cn(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,n,o)=>{this._isReady&&this.editor.execute(e,{value:o,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:n,validator:o,errorText:l}=e,s=Mt(()=>{n.errorText=l},Il);return(r,c,a)=>{s.cancel(),this._isReady&&(o(a)?(this.editor.execute(t,{value:a,batch:this._undoStepBatch}),n.errorText=null):s())}}}class V extends R{attributeName;_defaultValue;_defaultContentTableValue;_defaultLayoutTableValue;constructor(e,t,n){switch(super(e),this.attributeName=t,this._defaultContentTableValue=n,t){case"tableCellType":this._defaultLayoutTableValue="data";break;case"tableCellBorderStyle":this._defaultLayoutTableValue="none";break;case"tableCellHorizontalAlignment":this._defaultLayoutTableValue="left";break;case"tableCellVerticalAlignment":this._defaultLayoutTableValue="middle";break;default:this._defaultLayoutTableValue=void 0}}refresh(){const t=this.editor.model.document.selection,o=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(t),l=W(t);this._defaultValue=!l||l.getAttribute("tableType")!=="layout"?this._defaultContentTableValue:this._defaultLayoutTableValue,this.isEnabled=!!o.length,this.value=this._getSingleValue(o)}execute(e={}){const{value:t,batch:n}=e,o=this.editor.model,s=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(o.document.selection),r=this._getValueToSet(t);o.enqueueChange(n,c=>{r?s.forEach(a=>c.setAttribute(this.attributeName,r,a)):s.forEach(a=>c.removeAttribute(this.attributeName,a)),this.fire("afterExecute",{writer:c,tableCells:s,valueToSet:r})})}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);if(t!==this._defaultValue)return t}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every(o=>this._getAttribute(o)===t)?t:void 0}}class Pl extends V{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if(e=j(e,"px"),e!==this._defaultValue)return e}}class hn extends A{static get pluginName(){return"TableCellWidthEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[ee]}init(){const e=this.editor,t=Ke(e.config.get("table.tableCellProperties.defaultProperties"));ce(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",attributeName:"width",attributeType:"length",defaultValue:t.width}),e.commands.add("tableCellWidth",new Pl(e,t.width))}}class El extends V{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=$(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}_getValueToSet(e){const t=j(e,"px");if(t!==this._defaultValue)return t}}class Vl extends V{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=j(e,"px");if(t!==this._defaultValue)return t}}class Ll extends V{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class Wl extends V{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class Nl extends V{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class Bl extends V{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=$(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}}class Fl extends V{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=$(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}}class Dl extends V{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=$(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}_getValueToSet(e){const t=j(e,"px");if(t!==this._defaultValue)return t}}class Ml extends V{constructor(e){super(e,"tableCellType","data"),this.on("afterExecute",(t,n)=>{const{writer:o,tableCells:l}=n,s=this.editor.plugins.get(v),r=io(l);gn(s,o,r.keys())})}refresh(){super.refresh();const e=W(this.editor.model.document.selection);this.isEnabled&&e&&e.getAttribute("tableType")==="layout"&&(this.isEnabled=!1)}_getAttribute(e){return e?.getAttribute(this.attributeName)||"data"}}function gn(i,e,t){let n=!1;for(const o of t){let l=o.getAttribute("headingRows")||0,s=o.getAttribute("headingColumns")||0;const r=s>l;if(r){const a=Ie(i,o,"column",s,l);a!==s&&(i.setHeadingColumnsCount(e,o,a,{shallow:!0}),s=a,n=!0)}const c=Ie(i,o,"row",l,s);if(c!==l&&(i.setHeadingRowsCount(e,o,c,{shallow:!0}),l=c,n=!0),!r){const a=Ie(i,o,"column",s,l);a!==s&&(i.setHeadingColumnsCount(e,o,a,{shallow:!0}),n=!0)}}return n}function Ie(i,e,t,n,o){const l=t==="row"?i.getRows(e):i.getColumns(e);let s=n;for(let r=0;r<l;r++){const c=new w(e,{[t]:r});let a=!0,u=!1;for(const{cell:d,row:m,column:h}of c){if(d.getAttribute("tableCellType")!=="header"){a=!1;break}(t==="row"?h:m)>=o&&(u=!0)}if(!a)return Math.min(s,r);u&&(s=Math.max(s,r+1))}return Math.min(s,l)}const Tt=/^(top|middle|bottom)$/,yt=/^(left|center|right|justify)$/;class Ol extends A{static get pluginName(){return"TableCellPropertiesEditing"}static get licenseFeatureCode(){return"TCP"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}static get requires(){return[ee,hn]}init(){const e=this.editor,t=e.model.schema,n=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const o=Ke(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:e.locale.contentLanguageDirection==="rtl"});e.data.addStyleProcessorRules(Bt),Hl(e,{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}),e.commands.add("tableCellBorderStyle",new Bl(e,o.borderStyle)),e.commands.add("tableCellBorderColor",new Fl(e,o.borderColor)),e.commands.add("tableCellBorderWidth",new Dl(e,o.borderWidth)),ce(t,n,{modelAttribute:"tableCellHeight",styleName:"height",attributeName:"height",attributeType:"length",defaultValue:o.height}),e.commands.add("tableCellHeight",new Vl(e,o.height)),e.data.addStyleProcessorRules(qn),ce(t,n,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:o.padding}),e.commands.add("tableCellPadding",new El(e,o.padding)),e.data.addStyleProcessorRules(Ft),ce(t,n,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",attributeName:"bgcolor",attributeType:"color",defaultValue:o.backgroundColor}),e.commands.add("tableCellBackgroundColor",new Ll(e,o.backgroundColor)),zl(t,n,o.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new Nl(e,o.horizontalAlignment)),Ul(t,n,o.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new Wl(e,o.verticalAlignment)),e.config.get("experimentalFlags.tableCellTypeSupport")&&($l(e),e.commands.add("tableCellType",new Ml(e)))}}function Hl(i,e){const{conversion:t}=i,{schema:n}=i.model,o={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};n.extend("tableCell",{allowAttributes:Object.values(o)});for(const l of Object.values(o))n.setAttributeProperties(l,{isFormatting:!0});Pe(i,"td",o,e),Pe(i,"th",o,e),X(t,{modelElement:"tableCell",modelAttribute:o.style,styleName:"border-style"}),X(t,{modelElement:"tableCell",modelAttribute:o.color,styleName:"border-color"}),X(t,{modelElement:"tableCell",modelAttribute:o.width,styleName:"border-width"})}function zl(i,e,t){i.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),i.setAttributeProperties("tableCellHorizontalAlignment",{isFormatting:!0}),e.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:n=>({key:"style",value:{"text-align":n}})}),e.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":yt}},model:{key:"tableCellHorizontalAlignment",value:(n,o,l)=>{const s=E(t,"left",l),r=n.getStyle("text-align");if(r!==s)return r;o.consumable.consume(n,{styles:"text-align"})}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:yt}},model:{key:"tableCellHorizontalAlignment",value:(n,o,l)=>{const s=E(t,"left",l),r=n.getAttribute("align");if(r!==s)return r;o.consumable.consume(n,{attributes:"align"})}}})}function Ul(i,e,t){i.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),i.setAttributeProperties("tableCellVerticalAlignment",{isFormatting:!0}),e.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:n=>({key:"style",value:{"vertical-align":n}})}),e.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":Tt}},model:{key:"tableCellVerticalAlignment",value:(n,o,l)=>{const s=E(t,"middle",l),r=n.getStyle("vertical-align");if(r!==s)return r;o.consumable.consume(n,{styles:"vertical-align"})}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:Tt}},model:{key:"tableCellVerticalAlignment",value:(n,o,l)=>{const s=E(t,"middle",l),r=n.getAttribute("valign");if(r!==s)return r;o.consumable.consume(n,{attributes:"valign"})}}})}function $l(i){const{model:e,conversion:t,editing:n}=i,{schema:o}=e,l=i.plugins.get(v);o.extend("tableCell",{allowAttributes:["tableCellType"]}),o.setAttributeProperties("tableCellType",{isFormatting:!0}),o.addAttributeCheck(s=>{if(Array.from(s).reverse().find(c=>c.name==="table")?.getAttribute("tableType")==="layout")return!1},"tableCellType"),t.for("upcast").add(s=>{s.on("element:th",(r,c,a)=>{const{writer:u}=a,{modelRange:d}=c,m=d?.start.nodeAfter;m?.is("element","tableCell")&&u.setAttribute("tableCellType","header",m)}),s.on("element:table",(r,c,a)=>{const{writer:u}=a,{modelRange:d}=c,m=d?.start.nodeAfter;if(m?.is("element","table")&&m.getAttribute("tableType")==="layout"){for(const{cell:h}of new w(m))if(h.getAttribute("tableCellType")==="header"){u.setAttribute("tableType","content",m);break}}},{priority:_n.low-1})}),e.document.registerPostFixer(s=>{const r=e.document.differ.getChanges(),c=new Set;for(const a of r){if(a.type==="attribute"&&(a.attributeKey==="headingRows"||a.attributeKey==="headingColumns")){const u=a.range.start.nodeAfter;u?.is("element","table")&&u.root.rootName!=="$graveyard"&&c.add(u)}if(a.type==="attribute"&&a.attributeKey==="tableCellType"){const u=a.range.start.nodeAfter;if(u?.is("element","tableCell")&&u.root.rootName!=="$graveyard"){const d=u.findAncestor("table");d&&c.add(d)}}if(a.type==="insert"&&a.position.nodeAfter){for(const{item:u}of e.createRangeOn(a.position.nodeAfter))if(u.is("element","tableCell")&&u.getAttribute("tableCellType")&&u.root.rootName!=="$graveyard"){const d=u.findAncestor("table");d&&c.add(d)}}}return gn(l,s,c)}),e.document.on("change:data",()=>{const{differ:s}=e.document,r=new Set;for(const c of s.getChanges())if(c.type==="attribute"&&c.attributeKey==="tableCellType"){const a=c.range.start.nodeAfter;a.is("element","tableCell")&&r.add(a)}for(const c of r){const a=n.mapper.toViewElement(c),d=c.getAttribute("tableCellType")==="header"?"th":"td";a?.name!==d&&n.reconvertItem(c)}})}class Ni extends A{static get pluginName(){return"TableCellProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[Ol,xl]}}class jl extends R{refresh(){this.isEnabled=!0}execute(e={}){const{model:t,plugins:n}=this.editor;let{table:o=t.document.selection.getSelectedElement(),columnWidths:l,tableWidth:s}=e;l&&(l=Array.isArray(l)?l:l.split(",")),t.change(r=>{s?r.setAttribute("tableWidth",s,o):r.removeAttribute("tableWidth",o);const c=n.get("TableColumnResizeEditing").getColumnGroupElement(o);if(!l&&!c)return;if(!l)return r.remove(c);const a=Xe(l);if(c)Array.from(c.getChildren()).forEach((u,d)=>r.setAttribute("columnWidth",a[d],u));else{const u=r.createElement("tableColumnGroup");a.forEach(d=>r.appendElement("tableColumn",{columnWidth:d},u)),r.append(u,o)}})}}function Gl(i){return e=>e.on("element:colgroup",(t,n,o)=>{const l=n.modelCursor.findAncestor("table"),s=Y(l);if(!s)return;const r=Q(s),c=i.getColumns(l);let a=Uo(s,o.writer);a=Array.from({length:c},(u,d)=>a[d]||"auto"),(a.length!=r.length||a.includes("auto"))&&Zt(r,s,Xe(a),o.writer)},{priority:"low"})}function Kl(){return i=>i.on("insert:table",(e,t,n)=>{const o=n.writer,l=t.item,s=n.mapper.toViewElement(l),r=s.is("element","table")?s:Array.from(s.getChildren()).find(a=>a.is("element","table"));Y(l)?o.addClass("ck-table-resized",r):o.removeClass("ck-table-resized",r)},{priority:"low"})}function ql(){return i=>{i.on("element:table",(e,t,n)=>{n.consumable.consume(t.viewItem,{classes:"ck-table-resized"})})}}const _t=An("px");class Xl extends A{_isResizingActive;_resizingData;_domEmitter;_tableUtilsPlugin;_initialMouseEventData=null;static get requires(){return[ee,v]}static get pluginName(){return"TableColumnResizeEditing"}static get licenseFeatureCode(){return"TCR"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=new(yn()),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",(t,n,o)=>{const l=o?"removeClass":"addClass";e.editing.view.change(s=>{for(const r of e.editing.view.document.roots)s[l]("ck-column-resize_disabled",e.editing.view.document.getRoot(r.rootName))})})}init(){this._extendSchema(),this._registerPostFixer(),this._registerConverters(),this._registerResizingListeners(),this._registerResizerInserter();const e=this.editor,t=e.plugins.get("TableColumnResize");e.plugins.get("TableEditing").registerAdditionalSlot({filter:l=>l.is("element","tableColumnGroup"),positionOffset:0});const o=new jl(e);e.commands.add("resizeTableWidth",o),e.commands.add("resizeColumnWidths",o),this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",o,"isEnabled",(l,s,r)=>!l&&s&&r)}destroy(){this._domEmitter.stopListening(),super.destroy()}getColumnGroupElement(e){return Y(e)}getTableColumnElements(e){return Q(e)}getTableColumnsWidths(e){return zo(e)}_extendSchema(){const e=this.editor.model.schema;e.extend("table",{allowAttributes:["tableWidth"]}),e.register("tableColumnGroup",{allowIn:"table",isLimit:!0}),e.register("tableColumn",{allowIn:"tableColumnGroup",allowAttributes:["columnWidth","colSpan"],isLimit:!0}),e.setAttributeProperties("columnWidth",{isFormatting:!0})}_registerPostFixer(){const t=this.editor.model;t.document.registerPostFixer(l=>{let s=!1;for(const r of No(t)){const c=this.getColumnGroupElement(r),a=this.getTableColumnElements(c),u=this.getTableColumnsWidths(c);let d=Xe(u);d=n(d,r,this),!nt(u,d)&&(Zt(a,c,d,l),s=!0)}return s});function n(l,s,r){const c=r._tableUtilsPlugin.getColumns(s);if(c-l.length===0)return l;const u=l.map(m=>Number(m.replace("%",""))),d=o(r.editor.model.document.differ,s);for(const m of d){const h=c-u.length;if(h===0)continue;const g=h>0,b=r._tableUtilsPlugin.getCellLocation(m).column;if(g){const f=Bo(s,r.editor),p=Mo(h,f);u.splice(b,0,...p)}else{const f=u.splice(b,Math.abs(h));u[b]+=Z(f)}}return u.map(m=>m+"%")}function o(l,s){const r=new Set;for(const c of l.getChanges())if(c.type=="insert"&&c.position.nodeAfter&&c.position.nodeAfter.name=="tableCell"&&c.position.nodeAfter.getAncestors().includes(s))r.add(c.position.nodeAfter);else if(c.type=="remove"){const a=c.position.nodeBefore||c.position.nodeAfter;a.name=="tableCell"&&a.getAncestors().includes(s)&&r.add(a)}return r}}_registerConverters(){const t=this.editor.conversion;t.for("upcast").attributeToAttribute({view:{name:/^(figure|table)$/,styles:{width:/[\s\S]+/}},model:{key:"tableWidth",value:n=>{if(!n.parent.is("element","figure"))return n.getStyle("width")}}}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:n=>({name:"figure",key:"style",value:{width:n}})}),t.elementToElement({model:"tableColumnGroup",view:"colgroup"}),t.elementToElement({model:"tableColumn",view:"col"}),t.for("downcast").add(Kl()),t.for("upcast").add(ql()),t.for("upcast").add(Gl(this._tableUtilsPlugin)),t.for("upcast").attributeToAttribute({view:{name:"col",styles:{width:/.*/}},model:{key:"columnWidth",value:n=>{const o=n.getStyle("width");return!o||!o.endsWith("%")&&!o.endsWith("pt")?"auto":o}}}),t.for("upcast").attributeToAttribute({view:{name:"col",key:"span"},model:"colSpan"}),t.for("downcast").attributeToAttribute({model:{name:"tableColumn",key:"columnWidth"},view:n=>({key:"style",value:{width:n}})})}_registerResizingListeners(){const e=this.editor.editing.view;e.addObserver(en),e.document.on("mouseover",this._onMouseOverHandler.bind(this),{priority:"high"}),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),e.document.on("mouseout",this._onMouseOutHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(ue.window.document,"mousemove",Qn(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(ue.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_recalculateResizerElement(e){const t=this.editor,n=t.editing.view.domConverter,o=n.mapViewToDom(e.findAncestor("table")),l=n.mapViewToDom(e.findAncestor(u=>["td","th"].includes(u.name))),s=new de(o),r=new de(l),c=_t(Number((s.top-r.top).toFixed(4))),a=_t(Number((r.bottom-s.bottom).toFixed(4)));t.editing.view.change(u=>{u.setStyle("top",c,e),u.setStyle("bottom",a,e)})}_resetResizerStyles(e){this.editor.editing.view.change(t=>{t.removeStyle("top",e),t.removeStyle("bottom",e)})}_onMouseOverHandler(e,t){const n=t.target;n.hasClass("ck-table-column-resizer")&&this._isResizingAllowed&&this._recalculateResizerElement(n)}_onMouseOutHandler(e,t){const n=t.target;n.hasClass("ck-table-column-resizer")&&this._isResizingAllowed&&(this._isResizingActive||this._resetResizerStyles(n))}_onMouseDownHandler(e,t){const n=t.target;if(!n.hasClass("ck-table-column-resizer")||!this._isResizingAllowed)return;const o=this.editor,l=o.editing.mapper.toModelElement(n.findAncestor("figure"));o.model.canEditAt(l)&&(t.preventDefault(),e.stop(),this._initialMouseEventData=t)}_startResizingAfterThreshold(){const e=this._initialMouseEventData,{target:t}=e,n=this.editor.editing.mapper.toModelElement(t.findAncestor("figure")),o=t.findAncestor("table"),l=s(n,this._tableUtilsPlugin,this.editor);Array.from(o.getChildren()).find(a=>a.is("element","colgroup"))||this.editor.editing.view.change(a=>{r(a,l,o)}),this._isResizingActive=!0,this._resizingData=this._getResizingData(e,l),this.editor.editing.view.change(a=>c(a,o,this._resizingData));function s(a,u,d){const m=Array(u.getColumns(a)),h=new w(a);for(const g of h){const b=d.editing.mapper.toViewElement(g.cell),f=d.editing.view.domConverter.mapViewToDom(b),p=Ho(f);(!m[g.column]||p<m[g.column])&&(m[g.column]=I(p))}return m}function r(a,u,d){const m=a.createContainerElement("colgroup");for(let h=0;h<u.length;h++){const g=a.createEmptyElement("col"),b=`${I(u[h]/Z(u)*100)}%`;a.setStyle("width",b,g),a.insert(a.createPositionAt(m,"end"),g)}a.insert(a.createPositionAt(d,0),m)}function c(a,u,d){const m=d.widths.viewFigureWidth/d.widths.viewFigureParentWidth;a.addClass("ck-table-resized",u),a.addClass("ck-table-column-resizer__active",d.elements.viewResizer),a.setStyle("width",`${I(m*100)}%`,u.findAncestor("figure"))}}_onMouseMoveHandler(e,t){if(this._initialMouseEventData){const T=this._initialMouseEventData.domEvent;if(Math.abs(t.clientX-T.clientX)>=Wo)this._startResizingAfterThreshold(),this._initialMouseEventData=null;else return}if(!this._isResizingActive)return;if(!this._isResizingAllowed){this._onMouseUpHandler();return}const{columnPosition:n,flags:{isRightEdge:o,isTableCentered:l,isLtrContent:s},elements:{viewFigure:r,viewLeftColumn:c,viewRightColumn:a,viewResizer:u},widths:{viewFigureParentWidth:d,tableWidth:m,leftColumnWidth:h,rightColumnWidth:g}}=this._resizingData,b=-h+We,f=o?d-m:g-We,p=(s?1:-1)*(o&&l?2:1),C=Do((t.clientX-n)*p,Math.min(b,0),Math.max(f,0));C!==0&&(this.editor.editing.view.change(T=>{const y=I((h+C)*100/m);if(T.setStyle("width",`${y}%`,c),o){const k=I((m+C)*100/d);T.setStyle("width",`${k}%`,r)}else{const k=I((g-C)*100/m);T.setStyle("width",`${k}%`,a)}}),this._recalculateResizerElement(u))}_onMouseUpHandler(){if(this._initialMouseEventData=null,!this._isResizingActive)return;const{viewResizer:e,modelTable:t,viewFigure:n,viewColgroup:o}=this._resizingData.elements,l=this.editor,s=l.editing.view,r=this.getColumnGroupElement(t),c=Array.from(o.getChildren()).filter(f=>f.is("view:element")),a=r?this.getTableColumnsWidths(r):null,u=c.map(f=>f.getStyle("width")),d=!nt(a,u),m=t.getAttribute("tableWidth"),h=n.getStyle("width"),g=m!==h;(d||g)&&(this._isResizingAllowed?l.execute("resizeTableWidth",{table:t,tableWidth:`${I(h)}%`,columnWidths:u}):s.change(f=>{if(a)for(const p of c)f.setStyle("width",a.shift(),p);else f.remove(o);g&&(m?f.setStyle("width",m,n):f.removeStyle("width",n)),!a&&!m&&f.removeClass("ck-table-resized",[...n.getChildren()].find(p=>p.name==="table"))})),s.change(f=>{f.removeClass("ck-table-column-resizer__active",e)}),s.domConverter.mapViewToDom(e).matches(":hover")||this._resetResizerStyles(e),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,t){const n=this.editor,o=e.domEvent.clientX,l=e.target,s=l.findAncestor("td")||l.findAncestor("th"),r=n.editing.mapper.toModelElement(s),c=r.findAncestor("table"),a=Fo(r,this._tableUtilsPlugin).rightEdge,u=this._tableUtilsPlugin.getColumns(c)-1;let d=c.getAttribute("tableAlignment");c.getAttribute("tableType")!=="layout"&&(d||=n.config.get("table.tableProperties.defaultProperties.alignment"),d||="center");const m=a===u,h=n.locale.contentLanguageDirection!=="rtl",g=d==="center",b=s.findAncestor("table"),f=b.findAncestor("figure"),p=[...b.getChildren()].find(bn=>bn.is("element","colgroup")),C=p.getChild(a),T=m?void 0:p.getChild(a+1),y=Ne(n.editing.view.domConverter.mapViewToDom(f.parent)),k=Ne(n.editing.view.domConverter.mapViewToDom(f)),B=Jt(c,n),F=t[a],Se=m?void 0:t[a+1];return{columnPosition:o,flags:{isRightEdge:m,isTableCentered:g,isLtrContent:h},elements:{viewResizer:l,modelTable:c,viewFigure:f,viewColgroup:p,viewLeftColumn:C,viewRightColumn:T},widths:{viewFigureParentWidth:y,viewFigureWidth:k,tableWidth:B,leftColumnWidth:F,rightColumnWidth:Se}}}_registerResizerInserter(){this.editor.conversion.for("editingDowncast").add(e=>{e.on("insert:tableCell",(t,n,o)=>{const l=n.item,s=o.mapper.toViewElement(l),r=o.writer;r.insert(r.createPositionAt(s,"end"),r.createUIElement("div",{class:"ck-table-column-resizer"}))},{priority:"lowest"})})}}class Bi extends A{static get requires(){return[Xl,hn]}static get pluginName(){return"TableColumnResize"}static get isOfficialPlugin(){return!0}}class G extends R{attributeName;_defaultValue;_defaultContentTableValue;_defaultLayoutTableValue;constructor(e,t,n){super(e),this.attributeName=t,this._defaultContentTableValue=n,this._defaultLayoutTableValue=t==="tableBorderStyle"?"none":void 0}refresh(){const t=this.editor.model.document.selection,n=W(t);this._defaultValue=!n||n.getAttribute("tableType")!=="layout"?this._defaultContentTableValue:this._defaultLayoutTableValue,this.isEnabled=!!n,this.value=this._getValue(n)}execute(e={}){const t=this.editor.model,n=t.document.selection,{value:o,batch:l}=e,s=W(n),r=this._getValueToSet(o);t.enqueueChange(l,c=>{r?c.setAttribute(this.attributeName,r,s):c.removeAttribute(this.attributeName,s)})}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);if(t!==this._defaultValue)return t}_getValueToSet(e){if(e!==this._defaultValue)return e}}class Jl extends G{constructor(e,t){super(e,"tableBackgroundColor",t)}}class Zl extends G{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=$(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}}class Yl extends G{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=$(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}}class Ql extends G{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=$(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}_getValueToSet(e){const t=j(e,"px");if(t!==this._defaultValue)return t}}class ei extends G{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if(e=j(e,"px"),e!==this._defaultValue)return e}}class ti extends G{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if(e=j(e,"px"),e!==this._defaultValue)return e}}class ni extends G{constructor(e,t){super(e,"tableAlignment",t)}}class oi extends A{static get pluginName(){return"TablePropertiesEditing"}static get licenseFeatureCode(){return"TCP"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}static get requires(){return[ee]}init(){const e=this.editor,t=e.model.schema,n=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const o=Ge(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),l=e.config.get("table.tableProperties.alignment.useInlineStyles")!==!1;if(e.data.addStyleProcessorRules(Xn),e.data.addStyleProcessorRules(Bt),ii(e,{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}),e.commands.add("tableBorderColor",new Zl(e,o.borderColor)),e.commands.add("tableBorderStyle",new Yl(e,o.borderStyle)),e.commands.add("tableBorderWidth",new Ql(e,o.borderWidth)),e.config.get("experimentalFlags.useExtendedTableBlockAlignment")?si(t,n,o.alignment,l):ri(t,n,o.alignment),e.commands.add("tableAlignment",new ni(e,o.alignment)),vt(t,n,{modelAttribute:"tableWidth",styleName:"width",attributeName:"width",attributeType:"length",defaultValue:o.width}),e.commands.add("tableWidth",new ei(e,o.width)),vt(t,n,{modelAttribute:"tableHeight",styleName:"height",attributeName:"height",attributeType:"length",defaultValue:o.height}),e.commands.add("tableHeight",new ti(e,o.height)),e.data.addStyleProcessorRules(Ft),ui(t,n,{modelAttribute:"tableBackgroundColor",styleName:"background-color",attributeName:"bgcolor",attributeType:"color",defaultValue:o.backgroundColor}),e.commands.add("tableBackgroundColor",new Jl(e,o.backgroundColor)),e.config.get("experimentalFlags.useExtendedTableBlockAlignment")){const s=e.editing.view.document;this.listenTo(s,"clipboardOutput",(r,c)=>{e.editing.view.change(a=>{for(const{item:u}of a.createRangeIn(c.content))li(u,a);c.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(c.content))})},{priority:"lowest"})}}}function li(i,e){if(!i.is("element","table"))return;const t=i.getAttribute("align"),n=i.getStyle("float"),o=i.getStyle("margin-left"),l=i.getStyle("margin-right");if(t&&t==="center"||n&&n==="right"&&t&&t==="right"){At(e,t,i);return}n===void 0&&o==="auto"&&l==="0"&&At(e,"right",i)}function At(i,e,t){const n=i.createPositionBefore(t),o=i.createContainerElement("div",{align:e},t);i.insert(n,o)}function ii(i,e){const{conversion:t}=i,{schema:n}=i.model,o={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};n.extend("table",{allowAttributes:Object.values(o)});for(const l of Object.values(o))n.setAttributeProperties(l,{isFormatting:!0});Pe(i,"table",o,e),re(t,{modelAttribute:o.color,styleName:"border-color"}),re(t,{modelAttribute:o.style,styleName:"border-style"}),re(t,{modelAttribute:o.width,styleName:"border-width"})}function si(i,e,t,n){i.extend("table",{allowAttributes:["tableAlignment"]}),i.setAttributeProperties("tableAlignment",{isFormatting:!0}),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment",values:["left","center","right","blockLeft","blockRight"]},view:{left:n?{key:"style",value:{float:"left","margin-right":"var(--ck-content-table-style-spacing, 1.5em)"}}:{key:"class",value:S.left.className},right:n?{key:"style",value:{float:"right","margin-left":"var(--ck-content-table-style-spacing, 1.5em)"}}:{key:"class",value:S.right.className},center:n?{key:"style",value:{"margin-left":"auto","margin-right":"auto"}}:{key:"class",value:S.center.className},blockLeft:n?{key:"style",value:{"margin-left":"0","margin-right":"auto"}}:{key:"class",value:S.blockLeft.className},blockRight:n?{key:"style",value:{"margin-left":"auto","margin-right":"0"}}:{key:"class",value:S.blockRight.className}},converterPriority:"high"}),oo.forEach(o=>{e.for("upcast").attributeToAttribute({view:o.view,model:{key:"tableAlignment",value:(l,s,r)=>{if(di(l))return;const c=E(t,"",r),a=o.getAlign(l),u=o.getConsumables(l);if(s.consumable.consume(l,u),a!==c)return a}}})}),e.for("upcast").add(ai(t))}function ri(i,e,t){const n=/^(left|center|right)$/,o=/^(left|none|right)$/;i.extend("table",{allowAttributes:["tableAlignment"]}),i.setAttributeProperties("tableAlignment",{isFormatting:!0}),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment",values:["left","center","right"]},view:{left:{key:"style",value:{float:"left"}},right:{key:"style",value:{float:"right"}},center:(l,s,r)=>({key:"style",value:r.item.getAttribute("tableType")!=="layout"?{float:"none"}:{"margin-left":"auto","margin-right":"auto"}})},converterPriority:"high"}),e.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:o}},model:{key:"tableAlignment",value:(l,s,r)=>{if(l.name=="figure"&&!l.hasClass("table"))return;const c=E(t,"",r);let a=l.getStyle("float");if(a==="none"&&(a="center"),a!==c)return a;s.consumable.consume(l,{styles:"float"})}}}).attributeToAttribute({view:{name:/^(table|figure)$/,styles:{"margin-left":"auto","margin-right":"auto"}},model:{key:"tableAlignment",value:(l,s,r)=>{if(l.name=="figure"&&!l.hasClass("table"))return;const c=E(t,"",r),a="center";if(a!==c)return a;s.consumable.consume(l,{styles:["margin-left","margin-right"]})}}}).attributeToAttribute({view:{name:"table",attributes:{align:n}},model:{key:"tableAlignment",value:(l,s,r)=>{const c=E(t,"",r),a=l.getAttribute("align");if(a!==c)return a;s.consumable.consume(l,{attributes:"align"})}}})}function ai(i){return e=>{e.on("element:div",(t,n,o)=>{if(!o.consumable.test(n.viewItem,{name:!0,attributes:"align"}))return;const l=qt(n.viewItem);if(!l||!o.consumable.test(l,{name:!0}))return;o.consumable.consume(n.viewItem,{name:!0,attributes:"align"});const s=o.convertItem(l,n.modelCursor),r=Te(s.modelRange.getItems());if(!r||!r.is("element","table")){o.consumable.revert(n.viewItem,{name:!0,attributes:"align"}),s.modelRange&&!s.modelRange.isCollapsed&&(n.modelRange=s.modelRange,n.modelCursor=s.modelCursor);return}const c=n.viewItem.getAttribute("align"),a=l.getAttribute("align"),u=E(i,"",n),d=ci(c,a,u);d&&o.writer.setAttribute("tableAlignment",d,r),o.convertChildren(n.viewItem,o.writer.createPositionAt(r,"end")),o.updateConversionResult(r,n)})}}function ci(i,e,t){if(i)switch(i){case"right":return e==="right"?"right":e==="left"?"left":"blockRight";case"center":return"center";case"left":return e===void 0?"blockLeft":"left";default:return t}}function ui(i,e,t){const{modelAttribute:n}=t;i.extend("table",{allowAttributes:[n]}),i.setAttributeProperties(n,{isFormatting:!0}),$e(e,{viewElement:"table",...t}),re(e,t)}function vt(i,e,t){const{modelAttribute:n}=t;i.extend("table",{allowAttributes:[n]}),i.setAttributeProperties(n,{isFormatting:!0}),$e(e,{viewElement:/^(table|figure)$/,shouldUpcast:o=>!(o.name=="table"&&o.parent.name=="figure"||o.name=="figure"&&!o.hasClass("table")),...t}),X(e,{modelElement:"table",...t})}function di(i){return i.name=="figure"&&!i.hasClass("table")}class mi extends z{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;widthInput;heightInput;alignmentToolbar;saveButtonView;cancelButtonView;_focusables;_focusCycler;constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:n,borderWidthInput:o,borderColorInput:l,borderRowLabel:s}=this._createBorderFields(),{backgroundRowLabel:r,backgroundInput:c}=this._createBackgroundFields(),{widthInput:a,operatorLabel:u,heightInput:d,dimensionsLabel:m}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new _e,this.keystrokes=new ye,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=o,this.borderColorInput=l,this.backgroundInput=c,this.widthInput=a,this.heightInput=d,this.alignmentToolbar=h;const{saveButtonView:b,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=b,this.cancelButtonView=f,this._focusables=new ze,this._focusCycler=new Ue({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Lt(e,{label:this.t("Table properties")})),this.children.add(new x(e,{labelView:s,children:[s,n,l,o],class:"ck-table-form__border-row"})),this.children.add(new x(e,{labelView:r,children:[r,c],class:"ck-table-form__background-row"})),this.children.add(new x(e,{children:[new x(e,{labelView:m,children:[m,a,u,d],class:"ck-table-form__dimensions-row"}),new x(e,{labelView:g,children:[g,h],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new x(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(),Wt({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,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},n=Ce({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),o=this.locale,l=this.t,s=l("Style"),r=new D(o);r.text=l("Border");const c=Ze(l),a=new P(o,Nt);a.set({label:s,class:"ck-table-form__border-style"}),a.fieldView.buttonView.set({ariaLabel:s,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:s}),a.fieldView.buttonView.bind("label").to(this,"borderStyle",m=>c[m||"none"]),a.fieldView.on("execute",m=>{this.borderStyle=m.source._borderStyleValue}),a.bind("isEmpty").to(this,"borderStyle",m=>!m),He(a.fieldView,rn(this,t.style),{role:"menu",ariaLabel:s});const u=new P(o,H);u.set({label:l("Width"),class:"ck-table-form__border-width"}),u.fieldView.bind("value").to(this,"borderWidth"),u.bind("isEnabled").to(this,"borderStyle",ie),u.fieldView.on("input",()=>{this.borderWidth=u.fieldView.element.value});const d=new P(o,n);return d.set({label:l("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",ie),d.fieldView.on("input",()=>{this.borderColor=d.fieldView.value}),this.on("change:borderStyle",(m,h,g,b)=>{ie(g)||(this.borderColor="",this.borderWidth=""),ie(b)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:r,borderStyleDropdown:a,borderColorInput:d,borderWidthInput:u}}_createBackgroundFields(){const e=this.locale,t=this.t,n=new D(e);n.text=t("Background");const o=Ce({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),l=new P(e,o);return l.set({label:t("Color"),class:"ck-table-properties-form__background"}),l.fieldView.bind("value").to(this,"backgroundColor"),l.fieldView.on("input",()=>{this.backgroundColor=l.fieldView.value}),{backgroundRowLabel:n,backgroundInput:l}}_createDimensionFields(){const e=this.locale,t=this.t,n=new D(e);n.text=t("Dimensions");const o=new P(e,H);o.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),o.fieldView.bind("value").to(this,"width"),o.fieldView.on("input",()=>{this.width=o.fieldView.element.value});const l=new z(e);l.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const s=new P(e,H);return s.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),s.fieldView.bind("value").to(this,"height"),s.fieldView.on("input",()=>{this.height=s.fieldView.element.value}),{dimensionsLabel:n,widthInput:o,operatorLabel:l,heightInput:s}}_createAlignmentFields(){const e=this.locale,t=this.t,n=new D(e);n.text=t("Alignment");const o=new xe(e);return o.set({role:"radiogroup",isCompact:!0,ariaLabel:t("Table alignment toolbar")}),Me({view:this,icons:{left:Vn,center:En,right:Pn},toolbar:o,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:n,alignmentToolbar:o}}_createActionButtons(){const e=this.locale,t=this.t,n=new N(e),o=new N(e),l=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return n.set({label:t("Save"),icon:xt,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(l,"errorText",(...s)=>s.every(r=>!r)),o.set({label:t("Cancel"),icon:Pt,class:"ck-button-cancel",withText:!0}),o.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:o}}get _alignmentLabels(){const e=this.locale,t=this.t,n=t("Align table to the left"),o=t("Center table"),l=t("Align table to the right");return e.uiLanguageDirection==="rtl"?{right:l,center:o,left:n}:{left:n,center:o,right:l}}}function ie(i){return i!=="none"}const hi=500,St={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class gi extends A{_defaultContentTableProperties;_defaultLayoutTableProperties;_balloon;view=null;_viewWithContentTableDefaults=null;_viewWithLayoutTableDefaults=null;_undoStepBatch;_isReady;static get requires(){return[me]}static get pluginName(){return"TablePropertiesUI"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableProperties",{borderColors:pe,backgroundColors:pe})}init(){const e=this.editor;this._defaultContentTableProperties=Ge(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._defaultLayoutTableProperties=Ae(),this._balloon=e.plugins.get(me),e.ui.componentFactory.add("tableProperties",()=>this._createTablePropertiesButton())}_createTablePropertiesButton(){const e=this.editor,t=e.t,n=new N(e.locale);n.set({label:t("Table properties"),icon:xn,tooltip:!0}),this.listenTo(n,"execute",()=>this._showView());const o=Object.values(St).map(l=>e.commands.get(l));return n.bind("isEnabled").toMany(o,"isEnabled",(...l)=>l.some(s=>s)),n}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(e){const t=this.editor,n=t.config.get("table.tableProperties"),o=he(n.borderColors),l=ge(t.locale,o),s=he(n.backgroundColors),r=ge(t.locale,s),c=n.colorPicker!==!1,a=new mi(t.locale,{borderColors:l,backgroundColors:r,defaultTableProperties:e,colorPickerConfig:c?n.colorPicker||{}:!1}),u=t.t;a.render(),this.listenTo(a,"submit",()=>{this._hideView()}),this.listenTo(a,"cancel",()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._undoStepBatch),this._hideView()}),a.keystrokes.set("Esc",(h,g)=>{this._hideView(),g()}),Et({emitter:a,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const d=on(u),m=ln(u);return a.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),a.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:a.borderColorInput,commandName:"tableBorderColor",errorText:d,validator:fe})),a.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:a.borderWidthInput,commandName:"tableBorderWidth",errorText:m,validator:sn})),a.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:a.backgroundInput,commandName:"tableBackgroundColor",errorText:d,validator:fe})),a.on("change:width",this._getValidatedPropertyChangeCallback({viewField:a.widthInput,commandName:"tableWidth",errorText:m,validator:J})),a.on("change:height",this._getValidatedPropertyChangeCallback({viewField:a.heightInput,commandName:"tableHeight",errorText:m,validator:J})),a.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),a}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(St).map(([n,o])=>{const l=n,s=this.view===this._viewWithContentTableDefaults?this._defaultContentTableProperties[l]||"":this._defaultLayoutTableProperties[l]||"";return[l,e.get(o).value||s]}).forEach(([n,o])=>{(n==="borderColor"||n==="borderWidth")&&t.value==="none"||this.view.set(n,o)}),this._isReady=!0}_showView(){const e=this.editor,t=be(e.editing.view.document.selection),n=t&&e.editing.mapper.toModelElement(t),o=!n||n.getAttribute("tableType")!=="layout";o&&!this._viewWithContentTableDefaults?this._viewWithContentTableDefaults=this._createPropertiesView(this._defaultContentTableProperties):!o&&!this._viewWithLayoutTableDefaults&&(this._viewWithLayoutTableDefaults=this._createPropertiesView(this._defaultLayoutTableProperties)),this.view=o?this._viewWithContentTableDefaults:this._viewWithLayoutTableDefaults,this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:un(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,t=e.editing.view.document;be(t.selection)?this._isViewVisible&&cn(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,n,o)=>{this._isReady&&this.editor.execute(e,{value:o,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:n,validator:o,errorText:l}=e,s=Mt(()=>{n.errorText=l},hi);return(r,c,a)=>{s.cancel(),this._isReady&&(o(a)?(this.editor.execute(t,{value:a,batch:this._undoStepBatch}),n.errorText=null):s())}}}class Fi extends A{static get pluginName(){return"TableProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[oi,gi]}}function bi(i){i.document.registerPostFixer(e=>fi(e,i))}function fi(i,e){const t=e.document.differ.getChanges();let n=!1;for(const o of t){if(o.type!="insert")continue;const l=o.position.parent;if(l.is("element","table")||o.name=="table"){const s=o.name=="table"?o.position.nodeAfter:l,r=Array.from(s.getChildren()).filter(a=>a.is("element","caption")),c=r.shift();if(!c)continue;for(const a of r)i.move(i.createRangeIn(a),c,"end"),i.remove(a);c.nextSibling&&(i.move(i.createRangeOn(c),s,"end"),n=!0),n=!!r.length||n}}return n}function Rt(i){return!!i&&i.is("element","table")}function we(i){for(const e of i.getChildren())if(e.is("element","caption"))return e;return null}function pi(i){const e=W(i);return e?we(e):null}function Ci(i){const e=i.parent;return i.name=="figcaption"&&e&&e.is("element","figure")&&e.hasClass("table")?{name:!0}:i.name=="caption"&&e&&e.is("element","table")?{name:!0}:null}class wi extends R{refresh(){const e=this.editor,t=W(e.model.document.selection);this.isEnabled=!!t&&e.model.schema.checkChild(t,"caption"),this.isEnabled?this.value=!!we(t):this.value=!1}execute({focusCaptionOnShow:e=!1}={}){this.editor.model.change(t=>{this.value?this._hideTableCaption(t):this._showTableCaption(t,e)})}_showTableCaption(e,t){const n=this.editor.model,o=W(n.document.selection),r=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(o)||e.createElement("caption");n.insertContent(r,o,"end"),t&&e.setSelection(r,"in")}_hideTableCaption(e){const t=this.editor.model,n=W(t.document.selection),o=this.editor.plugins.get("TableCaptionEditing"),l=we(n);o._saveCaption(n,l),t.deleteContent(e.createSelection(l,"on"))}}class Ti extends A{_savedCaptionsMap=new WeakMap;_captionIdsMapping=new WeakMap;static get pluginName(){return"TableCaptionEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model.schema,n=e.editing.view,o=e.t,l=e.config.get("table.tableCaption.useCaptionElement");t.isRegistered("caption")?t.extend("caption",{allowIn:"table"}):t.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new wi(this.editor)),l&&e.plugins.get("TableEditing").registerAdditionalSlot({filter:r=>r.is("element","caption"),positionOffset:"end"}),e.conversion.for("upcast").elementToElement({view:Ci,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(s,{writer:r})=>Rt(s.parent)?r.createContainerElement(l?"caption":"figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(s,{writer:r})=>{if(!Rt(s.parent))return null;const c=r.createEditableElement(l?"caption":"figcaption");return r.setCustomProperty("tableCaption",!0,c),c.placeholder=o("Enter table caption"),Gn({view:n,element:c,keepOnFocus:!0}),kt(c,r)}}),e.conversion.for("editingDowncast").add(s=>{s.on("insert:table",(r,c,{writer:a,mapper:u})=>{const d=c.item,m=u.toViewElement(d);if(!m)return;const h=Array.from(m.getChildren()).find(p=>p.is("element","table"));if(!h)return;const g=we(d);if(!g){a.removeAttribute("aria-labelledby",h);return}const b=u.toViewElement(g);if(!b)return;let f;b.hasAttribute("id")?f=b.getAttribute("id"):f=this._captionIdsMapping.get(g)??`ck-editor__caption_${Tn()}`,this._captionIdsMapping.set(g,f),a.setAttribute("id",f,b),a.setAttribute("aria-labelledby",f,h)},{priority:"low"})}),bi(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Kn.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}class yi extends A{static get pluginName(){return"TableCaptionUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,n=e.t;e.ui.componentFactory.add("toggleTableCaption",o=>{const l=e.commands.get("toggleTableCaption"),s=new N(o);return s.set({icon:kn,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(l,"value","isEnabled"),s.bind("label").to(l,"value",r=>n(r?"Toggle caption off":"Toggle caption on")),this.listenTo(s,"execute",()=>{if(e.execute("toggleTableCaption",{focusCaptionOnShow:!0}),l.value){const r=pi(e.model.document.selection),c=e.editing.mapper.toViewElement(r);if(!c)return;t.scrollToTheSelection(),t.change(a=>{a.addClass("table__caption_highlighted",c)})}e.editing.view.focus()}),s})}}class Di extends A{static get pluginName(){return"TableCaption"}static get isOfficialPlugin(){return!0}static get requires(){return[Ti,yi]}}export{at as InsertColumnCommand,rt as InsertRowCommand,To as InsertTableCommand,ne as MergeCellCommand,Jo as MergeCellsCommand,ko as RemoveColumnCommand,So as RemoveRowCommand,el as SelectColumnCommand,Qo as SelectRowCommand,Eo as SetHeaderColumnCommand,Po as SetHeaderRowCommand,ct as SplitCellCommand,Li as Table,ni as TableAlignmentCommand,Jl as TableBackgroundColorCommand,Zl as TableBorderColorCommand,Yl as TableBorderStyleCommand,Ql as TableBorderWidthCommand,Di as TableCaption,Ti as TableCaptionEditing,yi as TableCaptionUI,Ll as TableCellBackgroundColorCommand,Fl as TableCellBorderColorCommand,Bl as TableCellBorderStyleCommand,Dl as TableCellBorderWidthCommand,Vl as TableCellHeightCommand,Nl as TableCellHorizontalAlignmentCommand,El as TableCellPaddingCommand,Ni as TableCellProperties,Ol as TableCellPropertiesEditing,xl as TableCellPropertiesUI,Rl as TableCellPropertiesView,V as TableCellPropertyCommand,Ml as TableCellTypeCommand,Wl as TableCellVerticalAlignmentCommand,Pl as TableCellWidthCommand,hn as TableCellWidthEditing,pl as TableClipboard,Bi as TableColumnResize,Xl as TableColumnResizeEditing,ee as TableEditing,ti as TableHeightCommand,_l as TableKeyboard,Al as TableMouse,Fi as TableProperties,oi as TablePropertiesEditing,gi as TablePropertiesUI,mi as TablePropertiesView,G as TablePropertyCommand,M as TableSelection,Wi as TableToolbar,bl as TableUI,v as TableUtils,w as TableWalker,ei as TableWidthCommand,jl as TableWidthsCommand,wi as ToggleTableCaptionCommand,ft as _InsertTableView,Vo as _TABLE_COLUMN_MIN_WIDTH_AS_PERCENTAGE,We as _TABLE_COLUMN_MIN_WIDTH_IN_PIXELS,Wo as _TABLE_COLUMN_RESIZE_DISTANCE_THRESHOLD,Lo as _TABLE_COLUMN_WIDTH_PRECISION,pe as _TABLE_DEFAULT_COLORS,vl as _TableColorInputView,en as _TableMouseEventsObserver,j as _addDefaultUnitToNumericValue,Kt as _adjustLastTableColumnIndex,Gt as _adjustLastTableRowIndex,Do as _clamp,fe as _colorTableFieldValidator,st as _convertParagraphInTableCell,U as _createEmptyTableCell,Mo as _createFilledArray,Ot as _cropTableToDimensions,lt as _downcastTable,re as _downcastTableAttribute,X as _downcastTableAttributeToStyle,it as _downcastTableCell,Kl as _downcastTableResizedClass,ho as _downcastTableRow,ce as _enableTableCellProperty,ot as _ensureParagraphInTableCell,Me as _fillTableOrCellToolbar,dn as _getBalloonTableCellPositionData,un as _getBalloonTablePositionData,Ze as _getBorderTableStyleLabels,No as _getChangedResizedTables,E as _getDefaultTableValueAdjusted,Ho as _getDomTableCellOuterWidth,Ne as _getElementWidthInPixels,Ut as _getHorizontallyOverlappingTableCells,Ce as _getLabeledTableColorInputCreator,on as _getLocalizedTableColorErrorText,ln as _getLocalizedTableLengthErrorText,Ae as _getNormalizedDefaultTableBaseProperties,Ke as _getNormalizedDefaultTableCellProperties,Ge as _getNormalizedDefaultTableProperties,tn as _getSelectedTableWidget,W as _getSelectionAffectedTable,be as _getSelectionAffectedTableWidget,$ as _getTableBorderBoxSingleValue,we as _getTableCaptionFromModelElement,pi as _getTableCaptionFromModelSelection,Fo as _getTableColumnEdgesIndexes,Q as _getTableColumnElements,Y as _getTableColumnGroupElement,Bo as _getTableColumnMinWidthAsPercentage,zo as _getTableColumnsWidths,rn as _getTableOrCellBorderStyleDefinitions,ve as _getTableWidgetAncestor,Jt as _getTableWidthInPixels,Ht as _getVerticallyOverlappingTableCells,bi as _injectTableCaptionPostFixer,al as _injectTableCellParagraphPostFixer,tl as _injectTableLayoutPostFixer,Xt as _isSingleTableParagraphWithoutAttributes,Ee as _isTableHeadingColumnCell,Rt as _isTableModelElement,J as _lengthTableFieldValidator,sn as _lineWidthTableFieldValidator,Ci as _matchTableCaptionViewElement,Xe as _normalizeTableColumnWidths,Ve as _removeEmptyTableColumns,Le as _removeEmptyTableRows,je as _removeEmptyTableRowsColumns,cn as _repositionTableContextualBalloon,co as _skipEmptyTableRow,zt as _splitTableCellHorizontally,$t as _splitTableCellVertically,Z as _sumArray,hl as _tableCellRefreshHandler,ml as _tableHeadingsRefreshHandler,I as _toPrecision,Uo as _translateTableColspanAttribute,jt as _trimTableCellIfNeeded,$e as _upcastNormalizedTableStyleToAttribute,ao as _upcastTable,Pe as _upcastTableBorderStyles,Gl as _upcastTableColgroupElement,ro as _upcastTableFigure,Zt as _updateTableColumnElements,_ as _updateTableNumericAttribute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Plugin as S,Command as z}from"../../../../../@ckeditor_ckeditor5-core@47.5.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{keyCodes as y,ObservableMixin as V,env as E,count as Y,isInsideSurrogatePair as J,isInsideCombinedSymbol as X,isInsideEmojiSequence as Z,EventInfo as ee}from"../../../../../@ckeditor_ckeditor5-utils@47.5.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{_tryFixingModelRange as $,BubblingEventInfo as D,ViewDocumentDomEventData as k,Observer as W,MouseObserver as te,TouchObserver as ne,ModelLiveRange as ie,FocusObserver as se}from"../../../../../@ckeditor_ckeditor5-engine@47.5.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{escapeRegExp as oe}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js";import{debounce as re}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/debounce.js";class U{model;limit;_isLocked;_size;_batch=null;_changeCallback;_selectionChangeCallback;constructor(e,t=20){this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(n,s)=>{s.isLocal&&s.isUndoable&&s!==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 ce extends z{_buffer;constructor(e,t){super(e),this._buffer=new U(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,s=e.text||"",i=s.length;let c=n.selection;if(e.selection?c=e.selection:e.range&&(c=t.createSelection(e.range)),!t.canEditAt(c))return;const r=e.resultRange;t.enqueueChange(this._buffer.batch,l=>{this._buffer.lock();const a=Array.from(n.selection.getAttributes());t.deleteContent(c),s&&t.insertContent(l.createText(s,a),c),r?l.setSelection(r):c.is("documentSelection")||l.setSelection(c),this._buffer.unlock(),this._buffer.input(i)})}}const Q=["insertText","insertReplacementText"],le=[...Q,"insertCompositionText"];class ae extends W{focusObserver;constructor(e){super(e),this.focusObserver=e.getObserver(se);const t=E.isAndroid?le:Q,n=e.document;n.on("beforeinput",(s,i)=>{if(!this.isEnabled)return;const{data:c,targetRanges:r,inputType:l,domEvent:a,isComposing:d}=i;if(!t.includes(l))return;this.focusObserver.flush();const u=new ee(n,"insertText");n.fire(u,new k(e,a,{text:c,selection:e.createSelection(r),isComposing:d})),u.stop.called&&s.stop()}),E.isAndroid||n.on("compositionend",(s,{data:i,domEvent:c})=>{this.isEnabled&&i&&n.fire("insertText",new k(e,c,{text:i,isComposing:!0}))},{priority:"low"})}observe(){}stopObserving(){}}class ue extends S{_typingQueue;static get pluginName(){return"Input"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model,n=e.editing.view,s=e.editing.mapper,i=t.document.selection;this._typingQueue=new de(e),n.addObserver(ae);const c=new ce(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",c),e.commands.add("input",c),this.listenTo(n.document,"beforeinput",()=>{this._typingQueue.flush("next beforeinput")},{priority:"high"}),this.listenTo(n.document,"insertText",(r,l)=>{const{text:a,selection:d}=l;if(n.document.selection.isFake&&d&&n.document.selection.isSimilar(d)&&l.preventDefault(),d&&Array.from(d.getRanges()).some(f=>!f.isCollapsed)&&l.preventDefault(),!c.isEnabled){l.preventDefault();return}let u;d&&(u=Array.from(d.getRanges()).filter(f=>f.root.is("rootElement")).map(f=>s.toModelRange(f)).map(f=>$(f,t.schema)||f)),(!u||!u.length)&&(u=Array.from(i.getRanges()));let h=a;if(E.isAndroid){const f=Array.from(u[0].getItems()).reduce((b,v)=>b+(v.is("$textProxy")?v.data:""),"");if(f&&(f.length<=h.length?h.startsWith(f)&&(h=h.substring(f.length),u[0].start=u[0].start.getShiftedBy(f.length)):f.startsWith(h)&&(u[0].start=u[0].start.getShiftedBy(h.length),h="")),h.length==0&&u[0].isCollapsed)return}const g={text:h,selection:t.createSelection(u)};this._typingQueue.push(g,!!l.isComposing),l.domEvent.defaultPrevented&&this._typingQueue.flush("beforeinput default prevented")}),E.isAndroid?this.listenTo(n.document,"keydown",(r,l)=>{i.isCollapsed||l.keyCode!=229||!n.document.isComposing||I(t,c)}):this.listenTo(n.document,"compositionstart",()=>{i.isCollapsed||I(t,c)},{priority:"high"}),this.listenTo(n.document,"mutations",(r,{mutations:l})=>{if(this._typingQueue.hasAffectedElements())for(const{node:a}of l){const d=he(a,s),u=s.toModelElement(d);if(this._typingQueue.isElementAffected(u)){this._typingQueue.flush("mutations");return}}}),this.listenTo(n.document,"compositionend",()=>{this._typingQueue.flush("before composition end")},{priority:"high"}),this.listenTo(n.document,"compositionend",()=>{this._typingQueue.flush("after composition end");const r=[];if(this._typingQueue.hasAffectedElements())for(const l of this._typingQueue.flushAffectedElements()){const a=s.toViewElement(l);a&&r.push({type:"children",node:a})}(r.length||!E.isAndroid)&&n.document.fire("mutations",{mutations:r})},{priority:"lowest"})}destroy(){super.destroy(),this._typingQueue.destroy()}}class de{editor;flushDebounced=re(()=>this.flush("timeout"),50);_queue=[];_isComposing=!1;_affectedElements=new Set;constructor(e){this.editor=e}destroy(){for(this.flushDebounced.cancel(),this._affectedElements.clear();this._queue.length;)this.shift()}get length(){return this._queue.length}push(e,t){const n={text:e.text};if(e.selection){n.selectionRanges=[];for(const s of e.selection.getRanges())n.selectionRanges.push(ie.fromRange(s)),this._affectedElements.add(s.start.parent)}this._queue.push(n),this._isComposing||=t,this.flushDebounced()}shift(){const e=this._queue.shift(),t={text:e.text};if(e.selectionRanges){const n=e.selectionRanges.map(s=>fe(s)).filter(s=>!!s);n.length&&(t.selection=this.editor.model.createSelection(n))}return t}flush(e){const t=this.editor,n=t.model,s=t.editing.view;if(this.flushDebounced.cancel(),!this._queue.length)return;const c=t.commands.get("insertText").buffer;n.enqueueChange(c.batch,()=>{for(c.lock();this._queue.length;){const r=this.shift();t.execute("insertText",r)}c.unlock(),this._isComposing||this._affectedElements.clear(),this._isComposing=!1}),s.scrollToTheSelection()}isElementAffected(e){return this._affectedElements.has(e)}hasAffectedElements(){return this._affectedElements.size>0}flushAffectedElements(){const e=Array.from(this._affectedElements);return this._affectedElements.clear(),e}}function I(o,e){if(!e.isEnabled)return;const t=e.buffer;t.lock(),o.enqueueChange(t.batch,()=>{o.deleteContent(o.document.selection)}),t.unlock()}function fe(o){const e=o.toRange();return o.detach(),e.root.rootName=="$graveyard"?null:e}function he(o,e){let t=o.is("$text")?o.parent:o;for(;!e.toModelElement(t);)t=t.parent;return t}class F extends z{direction;_buffer;constructor(e,t){super(e),this.direction=t,this._buffer=new U(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,s=>{this._buffer.lock();const i=s.createSelection(e.selection||n.selection);if(!t.canEditAt(i))return;const c=e.sequence||1,r=i.isCollapsed;if(i.isCollapsed&&t.modifySelection(i,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(c)){this._replaceEntireContentWithParagraph(s);return}if(this._shouldReplaceFirstBlockWithParagraph(i,c)){this.editor.execute("paragraph",{selection:i});return}if(i.isCollapsed)return;let l=0;i.getFirstRange().getMinimalFlatRanges().forEach(a=>{l+=Y(a.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(i,{doNotResetEntireContent:r,direction:this.direction}),this._buffer.input(l),s.setSelection(i),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,s=t.document.selection,i=t.schema.getLimitElement(s);if(!(s.isCollapsed&&s.containsEntireContent(i))||!t.schema.checkChild(i,"paragraph"))return!1;const r=i.getChild(0);return!(r&&r.is("element","paragraph"))}_replaceEntireContentWithParagraph(e){const t=this.editor.model,s=t.document.selection,i=t.schema.getLimitElement(s),c=e.createElement("paragraph");e.remove(e.createRangeIn(i)),e.insert(c,i),e.setSelection(c,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const n=this.editor.model;if(t>1||this.direction!="backward"||!e.isCollapsed)return!1;const s=e.getFirstPosition(),i=n.schema.getLimitElement(s),c=i.getChild(0);return!(s.parent!=c||!e.containsEntireContent(c)||!n.schema.checkChild(i,"paragraph")||c.name=="paragraph")}}const me="character",L="word",ge="codePoint",_="selection",C="backward",A="forward",j={deleteContent:{unit:_,direction:C},deleteContentBackward:{unit:ge,direction:C},deleteWordBackward:{unit:L,direction:C},deleteHardLineBackward:{unit:_,direction:C},deleteSoftLineBackward:{unit:_,direction:C},deleteContentForward:{unit:me,direction:A},deleteWordForward:{unit:L,direction:A},deleteHardLineForward:{unit:_,direction:A},deleteSoftLineForward:{unit:_,direction:A}};class pe extends W{constructor(e){super(e);const t=e.document;let n=0;t.on("keydown",()=>{n++}),t.on("keyup",()=>{n=0}),t.on("beforeinput",(s,i)=>{if(!this.isEnabled)return;const{targetRanges:c,domEvent:r,inputType:l}=i,a=j[l];if(!a)return;const d={direction:a.direction,unit:a.unit,sequence:n};d.unit==_&&(d.selectionToRemove=e.createSelection(c[0])),l==="deleteContentBackward"&&(E.isAndroid&&(d.sequence=1),_e(c)&&(d.unit=_,d.selectionToRemove=e.createSelection(c)));const u=new D(t,"delete",c[0]);t.fire(u,new k(e,r,d)),u.stop.called&&s.stop()}),E.isBlink&&be(this)}observe(){}stopObserving(){}}function be(o){const e=o.view,t=e.document;let n=null,s=!1;t.on("keydown",(r,{keyCode:l})=>{n=l,s=!1}),t.on("keyup",(r,{keyCode:l,domEvent:a})=>{const d=t.selection,u=o.isEnabled&&l==n&&i(l)&&!d.isCollapsed&&!s;if(n=null,u){const h=d.getFirstRange(),g=new D(t,"delete",h),f={unit:_,direction:c(l),selectionToRemove:d};t.fire(g,new k(e,a,f))}}),t.on("beforeinput",(r,{inputType:l})=>{const a=j[l];i(n)&&a&&a.direction==c(n)&&(s=!0)},{priority:"high"}),t.on("beforeinput",(r,{inputType:l,data:a})=>{n==y.delete&&l=="insertText"&&a==""&&r.stop()},{priority:"high"});function i(r){return r==y.backspace||r==y.delete}function c(r){return r==y.backspace?C:A}}function _e(o){if(o.length!=1||o[0].isCollapsed)return!1;const e=o[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let t=0;for(const{nextPosition:n,item:s}of e){if(n.parent.is("$text")){const i=n.parent.data,c=n.offset;if(J(i,c)||X(i,c)||Z(i,c))continue;t++}else(s.is("containerElement")||s.is("emptyElement"))&&t++;if(t>1)return!0}return!1}class ve extends S{_undoOnBackspace;static get pluginName(){return"Delete"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,n=t.document,s=e.model.document;t.addObserver(pe),this._undoOnBackspace=!1;const i=new F(e,"forward");e.commands.add("deleteForward",i),e.commands.add("forwardDelete",i),e.commands.add("delete",new F(e,"backward")),this.listenTo(n,"delete",(c,r)=>{n.isComposing||r.preventDefault();const{direction:l,sequence:a,selectionToRemove:d,unit:u}=r,h=l==="forward"?"deleteForward":"delete",g={sequence:a};if(u=="selection"){const f=Array.from(d.getRanges()).map(b=>e.editing.mapper.toModelRange(b)).map(b=>$(b,e.model.schema)||b);g.selection=e.model.createSelection(f)}else g.unit=u;e.execute(h,g),t.scrollToTheSelection()},{priority:"low"}),this.listenTo(n,"keydown",(c,r)=>{if(n.isComposing||r.keyCode!=y.backspace||!s.selection.isCollapsed)return;const l=e.model.schema.getLimitElement(s.selection),a=e.model.createPositionAt(l,0);if(a.isTouching(s.selection.getFirstPosition())){r.preventDefault();const d=e.model.schema.getNearestSelectionRange(a,"forward");if(!d)return;const u=t.createSelection(e.editing.mapper.toViewRange(d)),h=u.getFirstRange(),g=new D(document,"delete",h),f={unit:"selection",direction:"backward",selectionToRemove:u};n.fire(g,new k(t,r.domEvent,f))}}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",(c,r)=>{this._undoOnBackspace&&r.direction=="backward"&&r.sequence==1&&r.unit=="codePoint"&&(this._undoOnBackspace=!1,e.execute("undo"),r.preventDefault(),c.stop())},{context:"$capture"}),this.listenTo(s,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class Ie extends S{static get requires(){return[ue,ve]}static get pluginName(){return"Typing"}static get isOfficialPlugin(){return!0}}function ye(o,e){let t=o.start;return{text:Array.from(o.getWalker({ignoreElementEnd:!1})).reduce((s,{item:i})=>i.is("$text")||i.is("$textProxy")?s+i.data:(t=e.createPositionAfter(i),""),""),range:e.createRange(t,o.end)}}class Ee extends V(){model;testCallback;_hasMatch;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 t=this.model.document;this.listenTo(t.selection,"change:range",(n,{directChange:s})=>{if(s){if(!t.selection.isCollapsed){this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1);return}this._evaluateTextBeforeSelection("selection")}}),this.listenTo(t,"change:data",(n,s)=>{s.isUndo||!s.isLocal||this._evaluateTextBeforeSelection("data",{batch:s})})}_evaluateTextBeforeSelection(e,t={}){const n=this.model,i=n.document.selection,c=n.createRange(n.createPositionAt(i.focus.parent,0),i.focus),{text:r,range:l}=ye(c,n),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const d=Object.assign(t,{text:r,range:l});typeof a=="object"&&Object.assign(d,a),this.fire(`matched:${e}`,d)}}}class Fe extends S{attributes;_overrideUid;_isNextGravityRestorationSkipped=!1;static get pluginName(){return"TwoStepCaretMovement"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,n=e.editing.view,s=e.locale,i=t.document.selection;this.listenTo(n.document,"arrowKey",(c,r)=>{if(!i.isCollapsed||r.shiftKey||r.altKey||r.ctrlKey)return;const l=r.keyCode==y.arrowright,a=r.keyCode==y.arrowleft;if(!l&&!a)return;const d=s.contentLanguageDirection;let u=!1;d==="ltr"&&l||d==="rtl"&&a?u=this._handleForwardMovement(r):u=this._handleBackwardMovement(r),u===!0&&c.stop()},{context:"$text",priority:"highest"}),this.listenTo(i,"change:range",(c,r)=>{if(this._isNextGravityRestorationSkipped){this._isNextGravityRestorationSkipped=!1;return}this._isGravityOverridden&&(!r.directChange&&m(i.getFirstPosition(),this.attributes)||this._restoreGravity())}),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,n=this.editor.model,s=n.document.selection,i=s.getFirstPosition();return this._isGravityOverridden||i.isAtStart&&p(s,t)?!1:m(i,t)?(e&&w(e),p(s,t)&&m(i,t,!0)?x(n,t):this._overrideGravity(),!0):!1}_handleBackwardMovement(e){const t=this.attributes,n=this.editor.model,s=n.document.selection,i=s.getFirstPosition();return this._isGravityOverridden?(e&&w(e),this._restoreGravity(),m(i,t,!0)?x(n,t):R(n,t,i),!0):i.isAtStart?p(s,t)?(e&&w(e),R(n,t,i),!0):!1:!p(s,t)&&m(i,t,!0)?(e&&w(e),R(n,t,i),!0):q(i,t)?i.isAtEnd&&!p(s,t)&&m(i,t)?(e&&w(e),R(n,t,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):!1}_enableClickingAfterNode(){const e=this.editor,t=e.model,n=t.document.selection,s=e.editing.view.document;e.editing.view.addObserver(te),e.editing.view.addObserver(ne);let i=!1,c=!1;this.listenTo(s,"touchstart",()=>{c=!1,i=!0}),this.listenTo(s,"mousedown",()=>{c=!0}),this.listenTo(s,"selectionChange",()=>{const r=this.attributes;if(!c&&!i||(c=!1,i=!1,!n.isCollapsed)||!p(n,r))return;const l=n.getFirstPosition();m(l,r)&&(l.isAtStart||m(l,r,!0)?x(t,r):this._isGravityOverridden||this._overrideGravity())})}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,n=t.document.selection,s=this.attributes;this.listenTo(t,"insertContent",()=>{const i=n.getFirstPosition();p(n,s)&&m(i,s)&&x(t,s)},{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,n=t.document.selection,s=e.editing.view;let i=!1,c=!1;this.listenTo(s.document,"delete",(r,l)=>{i=l.direction==="backward"},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{if(!i)return;const r=n.getFirstPosition();c=p(n,this.attributes)&&!q(r,this.attributes)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{i&&(i=!1,!c&&e.model.enqueueChange(()=>{const r=n.getFirstPosition();p(n,this.attributes)&&m(r,this.attributes)&&(r.isAtStart||m(r,this.attributes,!0)?x(t,this.attributes):this._isGravityOverridden||this._overrideGravity())}))},{priority:"low"})}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 p(o,e){for(const t of e)if(o.hasAttribute(t))return!0;return!1}function R(o,e,t){const n=t.nodeBefore;o.change(s=>{if(n){const i=[],c=o.schema.isObject(n)&&o.schema.isInline(n);for(const[r,l]of n.getAttributes())o.schema.checkAttribute("$text",r)&&(!c||o.schema.getAttributeProperties(r).copyFromObject!==!1)&&i.push([r,l]);s.setSelectionAttribute(i)}else s.removeSelectionAttribute(e)})}function x(o,e){o.change(t=>{t.removeSelectionAttribute(e)})}function w(o){o.preventDefault()}function q(o,e){const t=o.getShiftedBy(-1);return m(t,e)}function m(o,e,t=!1){const{nodeBefore:n,nodeAfter:s}=o;for(const i of e){const c=n?n.getAttribute(i):void 0,r=s?s.getAttribute(i):void 0;if(!(t&&(c===void 0||r===void 0))&&r!==c)return!0}return!1}const N={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:T('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:T("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:T("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:T('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:T('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:T("'"),to:[null,"‚",null,"’"]}},M={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},Te=["symbols","mathematical","typography","quotes"];class Le extends S{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("typing",{transformations:{include:Te}})}init(){const t=this.editor.model.document.selection;t.on("change:range",()=>{const n=t.anchor,s=!!n&&n.parent.is("element","codeBlock"),i=t.hasAttribute("code");this.isEnabled=!(s||i)}),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,n=e.plugins.get("Delete"),s=Ae(e.config.get("typing.transformations")),i=r=>{for(const l of s)if(l.from.test(r))return{normalizedTransformation:l}},c=new Ee(e.model,i);c.on("matched:data",(r,l)=>{if(!l.batch.isTyping)return;const{from:a,to:d}=l.normalizedTransformation,u=a.exec(l.text),h=d(u.slice(1)),g=l.range;let f=u.index;t.enqueueChange(b=>{for(let v=1;v<u.length;v++){const B=u[v],O=h[v-1];if(O==null){f+=B.length;continue}const P=g.start.getShiftedBy(f),H=t.createRange(P,P.getShiftedBy(B.length)),K=we(P);t.insertContent(b.createText(O,K),H),f+=O.length}t.enqueueChange(()=>{n.requestUndoOnBackspace()})})}),c.bind("isEnabled").to(this)}}function Ce(o){return typeof o=="string"?new RegExp(`(${oe(o)})$`):o}function xe(o){return typeof o=="string"?()=>[o]:o instanceof Array?()=>o:o}function we(o){return(o.textNode?o.textNode:o.nodeAfter).getAttributes()}function T(o){return new RegExp(`(^|\\s)(${o})([^${o}]*)(${o})$`)}function Ae(o){const e=o.extra||[],t=o.remove||[],n=i=>!t.includes(i),s=o.include.concat(e).filter(n);return ke(s).filter(n).map(i=>typeof i=="string"&&N[i]?N[i]:i).filter(i=>typeof i=="object").map(i=>({from:Ce(i.from),to:xe(i.to)}))}function ke(o){const e=new Set;for(const t of o)if(typeof t=="string"&&M[t])for(const n of M[t])e.add(n);else e.add(t);return Array.from(e)}function Se(o,e,t,n){return n.createRange(G(o,e,t,!0,n),G(o,e,t,!1,n))}function G(o,e,t,n,s){let i=o.textNode||(n?o.nodeBefore:o.nodeAfter),c=null;for(;i&&i.getAttribute(e)==t;)c=i,i=n?i.previousSibling:i.nextSibling;return c?s.createPositionAt(c,n?"before":"after"):o}function qe(o,e,t,n){const s=o.editing.view,i=new Set;s.document.registerPostFixer(c=>{const r=o.model.document.selection;let l=!1;if(r.hasAttribute(e)){const a=Se(r.getFirstPosition(),e,r.getAttribute(e),o.model),d=o.editing.mapper.toViewRange(a);for(const u of d.getItems())u.is("element",t)&&!u.hasClass(n)&&(c.addClass(n,u),i.add(u),l=!0)}return l}),o.conversion.for("editingDowncast").add(c=>{c.on("insert",r,{priority:"highest"}),c.on("remove",r,{priority:"highest"}),c.on("attribute",r,{priority:"highest"}),c.on("selection",r,{priority:"highest"});function r(){s.change(l=>{for(const a of i.values())l.removeClass(n,a),i.delete(a)})}})}export{ve as Delete,F as DeleteCommand,ue as Input,ce as InsertTextCommand,Le as TextTransformation,Ee as TextWatcher,Fe as TwoStepCaretMovement,Ie as Typing,U as TypingChangeBuffer,pe as _DeleteObserver,Se as findAttributeRange,G as findAttributeRangeBound,ye as getLastTextLine,qe as inlineHighlight};
|
|
1
|
+
import{Plugin as S,Command as z}from"../../../../../@ckeditor_ckeditor5-core@47.6.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{keyCodes as y,ObservableMixin as V,env as E,count as Y,isInsideSurrogatePair as J,isInsideCombinedSymbol as X,isInsideEmojiSequence as Z,EventInfo as ee}from"../../../../../@ckeditor_ckeditor5-utils@47.6.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{_tryFixingModelRange as $,BubblingEventInfo as D,ViewDocumentDomEventData as k,Observer as W,MouseObserver as te,TouchObserver as ne,ModelLiveRange as ie,FocusObserver as se}from"../../../../../@ckeditor_ckeditor5-engine@47.6.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{escapeRegExp as oe}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js";import{debounce as re}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/debounce.js";class U{model;limit;_isLocked;_size;_batch=null;_changeCallback;_selectionChangeCallback;constructor(e,t=20){this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(n,s)=>{s.isLocal&&s.isUndoable&&s!==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 ce extends z{_buffer;constructor(e,t){super(e),this._buffer=new U(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,s=e.text||"",i=s.length;let c=n.selection;if(e.selection?c=e.selection:e.range&&(c=t.createSelection(e.range)),!t.canEditAt(c))return;const r=e.resultRange;t.enqueueChange(this._buffer.batch,l=>{this._buffer.lock();const a=Array.from(n.selection.getAttributes());t.deleteContent(c),s&&t.insertContent(l.createText(s,a),c),r?l.setSelection(r):c.is("documentSelection")||l.setSelection(c),this._buffer.unlock(),this._buffer.input(i)})}}const Q=["insertText","insertReplacementText"],le=[...Q,"insertCompositionText"];class ae extends W{focusObserver;constructor(e){super(e),this.focusObserver=e.getObserver(se);const t=E.isAndroid?le:Q,n=e.document;n.on("beforeinput",(s,i)=>{if(!this.isEnabled)return;const{data:c,targetRanges:r,inputType:l,domEvent:a,isComposing:d}=i;if(!t.includes(l))return;this.focusObserver.flush();const u=new ee(n,"insertText");n.fire(u,new k(e,a,{text:c,selection:e.createSelection(r),isComposing:d})),u.stop.called&&s.stop()}),E.isAndroid||n.on("compositionend",(s,{data:i,domEvent:c})=>{this.isEnabled&&i&&n.fire("insertText",new k(e,c,{text:i,isComposing:!0}))},{priority:"low"})}observe(){}stopObserving(){}}class ue extends S{_typingQueue;static get pluginName(){return"Input"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model,n=e.editing.view,s=e.editing.mapper,i=t.document.selection;this._typingQueue=new de(e),n.addObserver(ae);const c=new ce(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",c),e.commands.add("input",c),this.listenTo(n.document,"beforeinput",()=>{this._typingQueue.flush("next beforeinput")},{priority:"high"}),this.listenTo(n.document,"insertText",(r,l)=>{const{text:a,selection:d}=l;if(n.document.selection.isFake&&d&&n.document.selection.isSimilar(d)&&l.preventDefault(),d&&Array.from(d.getRanges()).some(f=>!f.isCollapsed)&&l.preventDefault(),!c.isEnabled){l.preventDefault();return}let u;d&&(u=Array.from(d.getRanges()).filter(f=>f.root.is("rootElement")).map(f=>s.toModelRange(f)).map(f=>$(f,t.schema)||f)),(!u||!u.length)&&(u=Array.from(i.getRanges()));let h=a;if(E.isAndroid){const f=Array.from(u[0].getItems()).reduce((b,v)=>b+(v.is("$textProxy")?v.data:""),"");if(f&&(f.length<=h.length?h.startsWith(f)&&(h=h.substring(f.length),u[0].start=u[0].start.getShiftedBy(f.length)):f.startsWith(h)&&(u[0].start=u[0].start.getShiftedBy(h.length),h="")),h.length==0&&u[0].isCollapsed)return}const g={text:h,selection:t.createSelection(u)};this._typingQueue.push(g,!!l.isComposing),l.domEvent.defaultPrevented&&this._typingQueue.flush("beforeinput default prevented")}),E.isAndroid?this.listenTo(n.document,"keydown",(r,l)=>{i.isCollapsed||l.keyCode!=229||!n.document.isComposing||I(t,c)}):this.listenTo(n.document,"compositionstart",()=>{i.isCollapsed||I(t,c)},{priority:"high"}),this.listenTo(n.document,"mutations",(r,{mutations:l})=>{if(this._typingQueue.hasAffectedElements())for(const{node:a}of l){const d=he(a,s),u=s.toModelElement(d);if(this._typingQueue.isElementAffected(u)){this._typingQueue.flush("mutations");return}}}),this.listenTo(n.document,"compositionend",()=>{this._typingQueue.flush("before composition end")},{priority:"high"}),this.listenTo(n.document,"compositionend",()=>{this._typingQueue.flush("after composition end");const r=[];if(this._typingQueue.hasAffectedElements())for(const l of this._typingQueue.flushAffectedElements()){const a=s.toViewElement(l);a&&r.push({type:"children",node:a})}(r.length||!E.isAndroid)&&n.document.fire("mutations",{mutations:r})},{priority:"lowest"})}destroy(){super.destroy(),this._typingQueue.destroy()}}class de{editor;flushDebounced=re(()=>this.flush("timeout"),50);_queue=[];_isComposing=!1;_affectedElements=new Set;constructor(e){this.editor=e}destroy(){for(this.flushDebounced.cancel(),this._affectedElements.clear();this._queue.length;)this.shift()}get length(){return this._queue.length}push(e,t){const n={text:e.text};if(e.selection){n.selectionRanges=[];for(const s of e.selection.getRanges())n.selectionRanges.push(ie.fromRange(s)),this._affectedElements.add(s.start.parent)}this._queue.push(n),this._isComposing||=t,this.flushDebounced()}shift(){const e=this._queue.shift(),t={text:e.text};if(e.selectionRanges){const n=e.selectionRanges.map(s=>fe(s)).filter(s=>!!s);n.length&&(t.selection=this.editor.model.createSelection(n))}return t}flush(e){const t=this.editor,n=t.model,s=t.editing.view;if(this.flushDebounced.cancel(),!this._queue.length)return;const c=t.commands.get("insertText").buffer;n.enqueueChange(c.batch,()=>{for(c.lock();this._queue.length;){const r=this.shift();t.execute("insertText",r)}c.unlock(),this._isComposing||this._affectedElements.clear(),this._isComposing=!1}),s.scrollToTheSelection()}isElementAffected(e){return this._affectedElements.has(e)}hasAffectedElements(){return this._affectedElements.size>0}flushAffectedElements(){const e=Array.from(this._affectedElements);return this._affectedElements.clear(),e}}function I(o,e){if(!e.isEnabled)return;const t=e.buffer;t.lock(),o.enqueueChange(t.batch,()=>{o.deleteContent(o.document.selection)}),t.unlock()}function fe(o){const e=o.toRange();return o.detach(),e.root.rootName=="$graveyard"?null:e}function he(o,e){let t=o.is("$text")?o.parent:o;for(;!e.toModelElement(t);)t=t.parent;return t}class F extends z{direction;_buffer;constructor(e,t){super(e),this.direction=t,this._buffer=new U(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,s=>{this._buffer.lock();const i=s.createSelection(e.selection||n.selection);if(!t.canEditAt(i))return;const c=e.sequence||1,r=i.isCollapsed;if(i.isCollapsed&&t.modifySelection(i,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(c)){this._replaceEntireContentWithParagraph(s);return}if(this._shouldReplaceFirstBlockWithParagraph(i,c)){this.editor.execute("paragraph",{selection:i});return}if(i.isCollapsed)return;let l=0;i.getFirstRange().getMinimalFlatRanges().forEach(a=>{l+=Y(a.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(i,{doNotResetEntireContent:r,direction:this.direction}),this._buffer.input(l),s.setSelection(i),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,s=t.document.selection,i=t.schema.getLimitElement(s);if(!(s.isCollapsed&&s.containsEntireContent(i))||!t.schema.checkChild(i,"paragraph"))return!1;const r=i.getChild(0);return!(r&&r.is("element","paragraph"))}_replaceEntireContentWithParagraph(e){const t=this.editor.model,s=t.document.selection,i=t.schema.getLimitElement(s),c=e.createElement("paragraph");e.remove(e.createRangeIn(i)),e.insert(c,i),e.setSelection(c,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const n=this.editor.model;if(t>1||this.direction!="backward"||!e.isCollapsed)return!1;const s=e.getFirstPosition(),i=n.schema.getLimitElement(s),c=i.getChild(0);return!(s.parent!=c||!e.containsEntireContent(c)||!n.schema.checkChild(i,"paragraph")||c.name=="paragraph")}}const me="character",L="word",ge="codePoint",_="selection",C="backward",A="forward",j={deleteContent:{unit:_,direction:C},deleteContentBackward:{unit:ge,direction:C},deleteWordBackward:{unit:L,direction:C},deleteHardLineBackward:{unit:_,direction:C},deleteSoftLineBackward:{unit:_,direction:C},deleteContentForward:{unit:me,direction:A},deleteWordForward:{unit:L,direction:A},deleteHardLineForward:{unit:_,direction:A},deleteSoftLineForward:{unit:_,direction:A}};class pe extends W{constructor(e){super(e);const t=e.document;let n=0;t.on("keydown",()=>{n++}),t.on("keyup",()=>{n=0}),t.on("beforeinput",(s,i)=>{if(!this.isEnabled)return;const{targetRanges:c,domEvent:r,inputType:l}=i,a=j[l];if(!a)return;const d={direction:a.direction,unit:a.unit,sequence:n};d.unit==_&&(d.selectionToRemove=e.createSelection(c[0])),l==="deleteContentBackward"&&(E.isAndroid&&(d.sequence=1),_e(c)&&(d.unit=_,d.selectionToRemove=e.createSelection(c)));const u=new D(t,"delete",c[0]);t.fire(u,new k(e,r,d)),u.stop.called&&s.stop()}),E.isBlink&&be(this)}observe(){}stopObserving(){}}function be(o){const e=o.view,t=e.document;let n=null,s=!1;t.on("keydown",(r,{keyCode:l})=>{n=l,s=!1}),t.on("keyup",(r,{keyCode:l,domEvent:a})=>{const d=t.selection,u=o.isEnabled&&l==n&&i(l)&&!d.isCollapsed&&!s;if(n=null,u){const h=d.getFirstRange(),g=new D(t,"delete",h),f={unit:_,direction:c(l),selectionToRemove:d};t.fire(g,new k(e,a,f))}}),t.on("beforeinput",(r,{inputType:l})=>{const a=j[l];i(n)&&a&&a.direction==c(n)&&(s=!0)},{priority:"high"}),t.on("beforeinput",(r,{inputType:l,data:a})=>{n==y.delete&&l=="insertText"&&a==""&&r.stop()},{priority:"high"});function i(r){return r==y.backspace||r==y.delete}function c(r){return r==y.backspace?C:A}}function _e(o){if(o.length!=1||o[0].isCollapsed)return!1;const e=o[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let t=0;for(const{nextPosition:n,item:s}of e){if(n.parent.is("$text")){const i=n.parent.data,c=n.offset;if(J(i,c)||X(i,c)||Z(i,c))continue;t++}else(s.is("containerElement")||s.is("emptyElement"))&&t++;if(t>1)return!0}return!1}class ve extends S{_undoOnBackspace;static get pluginName(){return"Delete"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,n=t.document,s=e.model.document;t.addObserver(pe),this._undoOnBackspace=!1;const i=new F(e,"forward");e.commands.add("deleteForward",i),e.commands.add("forwardDelete",i),e.commands.add("delete",new F(e,"backward")),this.listenTo(n,"delete",(c,r)=>{n.isComposing||r.preventDefault();const{direction:l,sequence:a,selectionToRemove:d,unit:u}=r,h=l==="forward"?"deleteForward":"delete",g={sequence:a};if(u=="selection"){const f=Array.from(d.getRanges()).map(b=>e.editing.mapper.toModelRange(b)).map(b=>$(b,e.model.schema)||b);g.selection=e.model.createSelection(f)}else g.unit=u;e.execute(h,g),t.scrollToTheSelection()},{priority:"low"}),this.listenTo(n,"keydown",(c,r)=>{if(n.isComposing||r.keyCode!=y.backspace||!s.selection.isCollapsed)return;const l=e.model.schema.getLimitElement(s.selection),a=e.model.createPositionAt(l,0);if(a.isTouching(s.selection.getFirstPosition())){r.preventDefault();const d=e.model.schema.getNearestSelectionRange(a,"forward");if(!d)return;const u=t.createSelection(e.editing.mapper.toViewRange(d)),h=u.getFirstRange(),g=new D(document,"delete",h),f={unit:"selection",direction:"backward",selectionToRemove:u};n.fire(g,new k(t,r.domEvent,f))}}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",(c,r)=>{this._undoOnBackspace&&r.direction=="backward"&&r.sequence==1&&r.unit=="codePoint"&&(this._undoOnBackspace=!1,e.execute("undo"),r.preventDefault(),c.stop())},{context:"$capture"}),this.listenTo(s,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class Ie extends S{static get requires(){return[ue,ve]}static get pluginName(){return"Typing"}static get isOfficialPlugin(){return!0}}function ye(o,e){let t=o.start;return{text:Array.from(o.getWalker({ignoreElementEnd:!1})).reduce((s,{item:i})=>i.is("$text")||i.is("$textProxy")?s+i.data:(t=e.createPositionAfter(i),""),""),range:e.createRange(t,o.end)}}class Ee extends V(){model;testCallback;_hasMatch;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 t=this.model.document;this.listenTo(t.selection,"change:range",(n,{directChange:s})=>{if(s){if(!t.selection.isCollapsed){this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1);return}this._evaluateTextBeforeSelection("selection")}}),this.listenTo(t,"change:data",(n,s)=>{s.isUndo||!s.isLocal||this._evaluateTextBeforeSelection("data",{batch:s})})}_evaluateTextBeforeSelection(e,t={}){const n=this.model,i=n.document.selection,c=n.createRange(n.createPositionAt(i.focus.parent,0),i.focus),{text:r,range:l}=ye(c,n),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const d=Object.assign(t,{text:r,range:l});typeof a=="object"&&Object.assign(d,a),this.fire(`matched:${e}`,d)}}}class Fe extends S{attributes;_overrideUid;_isNextGravityRestorationSkipped=!1;static get pluginName(){return"TwoStepCaretMovement"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,n=e.editing.view,s=e.locale,i=t.document.selection;this.listenTo(n.document,"arrowKey",(c,r)=>{if(!i.isCollapsed||r.shiftKey||r.altKey||r.ctrlKey)return;const l=r.keyCode==y.arrowright,a=r.keyCode==y.arrowleft;if(!l&&!a)return;const d=s.contentLanguageDirection;let u=!1;d==="ltr"&&l||d==="rtl"&&a?u=this._handleForwardMovement(r):u=this._handleBackwardMovement(r),u===!0&&c.stop()},{context:"$text",priority:"highest"}),this.listenTo(i,"change:range",(c,r)=>{if(this._isNextGravityRestorationSkipped){this._isNextGravityRestorationSkipped=!1;return}this._isGravityOverridden&&(!r.directChange&&m(i.getFirstPosition(),this.attributes)||this._restoreGravity())}),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,n=this.editor.model,s=n.document.selection,i=s.getFirstPosition();return this._isGravityOverridden||i.isAtStart&&p(s,t)?!1:m(i,t)?(e&&w(e),p(s,t)&&m(i,t,!0)?x(n,t):this._overrideGravity(),!0):!1}_handleBackwardMovement(e){const t=this.attributes,n=this.editor.model,s=n.document.selection,i=s.getFirstPosition();return this._isGravityOverridden?(e&&w(e),this._restoreGravity(),m(i,t,!0)?x(n,t):R(n,t,i),!0):i.isAtStart?p(s,t)?(e&&w(e),R(n,t,i),!0):!1:!p(s,t)&&m(i,t,!0)?(e&&w(e),R(n,t,i),!0):q(i,t)?i.isAtEnd&&!p(s,t)&&m(i,t)?(e&&w(e),R(n,t,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):!1}_enableClickingAfterNode(){const e=this.editor,t=e.model,n=t.document.selection,s=e.editing.view.document;e.editing.view.addObserver(te),e.editing.view.addObserver(ne);let i=!1,c=!1;this.listenTo(s,"touchstart",()=>{c=!1,i=!0}),this.listenTo(s,"mousedown",()=>{c=!0}),this.listenTo(s,"selectionChange",()=>{const r=this.attributes;if(!c&&!i||(c=!1,i=!1,!n.isCollapsed)||!p(n,r))return;const l=n.getFirstPosition();m(l,r)&&(l.isAtStart||m(l,r,!0)?x(t,r):this._isGravityOverridden||this._overrideGravity())})}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,n=t.document.selection,s=this.attributes;this.listenTo(t,"insertContent",()=>{const i=n.getFirstPosition();p(n,s)&&m(i,s)&&x(t,s)},{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,n=t.document.selection,s=e.editing.view;let i=!1,c=!1;this.listenTo(s.document,"delete",(r,l)=>{i=l.direction==="backward"},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{if(!i)return;const r=n.getFirstPosition();c=p(n,this.attributes)&&!q(r,this.attributes)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{i&&(i=!1,!c&&e.model.enqueueChange(()=>{const r=n.getFirstPosition();p(n,this.attributes)&&m(r,this.attributes)&&(r.isAtStart||m(r,this.attributes,!0)?x(t,this.attributes):this._isGravityOverridden||this._overrideGravity())}))},{priority:"low"})}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 p(o,e){for(const t of e)if(o.hasAttribute(t))return!0;return!1}function R(o,e,t){const n=t.nodeBefore;o.change(s=>{if(n){const i=[],c=o.schema.isObject(n)&&o.schema.isInline(n);for(const[r,l]of n.getAttributes())o.schema.checkAttribute("$text",r)&&(!c||o.schema.getAttributeProperties(r).copyFromObject!==!1)&&i.push([r,l]);s.setSelectionAttribute(i)}else s.removeSelectionAttribute(e)})}function x(o,e){o.change(t=>{t.removeSelectionAttribute(e)})}function w(o){o.preventDefault()}function q(o,e){const t=o.getShiftedBy(-1);return m(t,e)}function m(o,e,t=!1){const{nodeBefore:n,nodeAfter:s}=o;for(const i of e){const c=n?n.getAttribute(i):void 0,r=s?s.getAttribute(i):void 0;if(!(t&&(c===void 0||r===void 0))&&r!==c)return!0}return!1}const N={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:T('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:T("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:T("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:T('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:T('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:T("'"),to:[null,"‚",null,"’"]}},M={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},Te=["symbols","mathematical","typography","quotes"];class Le extends S{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("typing",{transformations:{include:Te}})}init(){const t=this.editor.model.document.selection;t.on("change:range",()=>{const n=t.anchor,s=!!n&&n.parent.is("element","codeBlock"),i=t.hasAttribute("code");this.isEnabled=!(s||i)}),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,n=e.plugins.get("Delete"),s=Ae(e.config.get("typing.transformations")),i=r=>{for(const l of s)if(l.from.test(r))return{normalizedTransformation:l}},c=new Ee(e.model,i);c.on("matched:data",(r,l)=>{if(!l.batch.isTyping)return;const{from:a,to:d}=l.normalizedTransformation,u=a.exec(l.text),h=d(u.slice(1)),g=l.range;let f=u.index;t.enqueueChange(b=>{for(let v=1;v<u.length;v++){const B=u[v],O=h[v-1];if(O==null){f+=B.length;continue}const P=g.start.getShiftedBy(f),H=t.createRange(P,P.getShiftedBy(B.length)),K=we(P);t.insertContent(b.createText(O,K),H),f+=O.length}t.enqueueChange(()=>{n.requestUndoOnBackspace()})})}),c.bind("isEnabled").to(this)}}function Ce(o){return typeof o=="string"?new RegExp(`(${oe(o)})$`):o}function xe(o){return typeof o=="string"?()=>[o]:o instanceof Array?()=>o:o}function we(o){return(o.textNode?o.textNode:o.nodeAfter).getAttributes()}function T(o){return new RegExp(`(^|\\s)(${o})([^${o}]*)(${o})$`)}function Ae(o){const e=o.extra||[],t=o.remove||[],n=i=>!t.includes(i),s=o.include.concat(e).filter(n);return ke(s).filter(n).map(i=>typeof i=="string"&&N[i]?N[i]:i).filter(i=>typeof i=="object").map(i=>({from:Ce(i.from),to:xe(i.to)}))}function ke(o){const e=new Set;for(const t of o)if(typeof t=="string"&&M[t])for(const n of M[t])e.add(n);else e.add(t);return Array.from(e)}function Se(o,e,t,n){return n.createRange(G(o,e,t,!0,n),G(o,e,t,!1,n))}function G(o,e,t,n,s){let i=o.textNode||(n?o.nodeBefore:o.nodeAfter),c=null;for(;i&&i.getAttribute(e)==t;)c=i,i=n?i.previousSibling:i.nextSibling;return c?s.createPositionAt(c,n?"before":"after"):o}function qe(o,e,t,n){const s=o.editing.view,i=new Set;s.document.registerPostFixer(c=>{const r=o.model.document.selection;let l=!1;if(r.hasAttribute(e)){const a=Se(r.getFirstPosition(),e,r.getAttribute(e),o.model),d=o.editing.mapper.toViewRange(a);for(const u of d.getItems())u.is("element",t)&&!u.hasClass(n)&&(c.addClass(n,u),i.add(u),l=!0)}return l}),o.conversion.for("editingDowncast").add(c=>{c.on("insert",r,{priority:"highest"}),c.on("remove",r,{priority:"highest"}),c.on("attribute",r,{priority:"highest"}),c.on("selection",r,{priority:"highest"});function r(){s.change(l=>{for(const a of i.values())l.removeClass(n,a),i.delete(a)})}})}export{ve as Delete,F as DeleteCommand,ue as Input,ce as InsertTextCommand,Le as TextTransformation,Ee as TextWatcher,Fe as TwoStepCaretMovement,Ie as Typing,U as TypingChangeBuffer,pe as _DeleteObserver,Se as findAttributeRange,G as findAttributeRangeBound,ye as getLastTextLine,qe as inlineHighlight};
|