@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Plugin as f,Command as _}from"../../../../../@ckeditor_ckeditor5-core@47.5.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Clipboard as Xe,ClipboardPipeline as H}from"../../../../../@ckeditor_ckeditor5-clipboard@47.5.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{ModelLivePosition as F,ModelLiveRange as Ye,UpcastWriter as G,enableViewPlaceholder as Qe,ModelElement as et,Observer as tt}from"../../../../../@ckeditor_ckeditor5-engine@47.5.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Undo as it}from"../../../../../@ckeditor_ckeditor5-undo@47.5.0/node_modules/@ckeditor/ckeditor5-undo/dist/index.js";import{Delete as nt}from"../../../../../@ckeditor_ckeditor5-typing@47.5.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{global as A,DomEmitterMixin as st,logWarning as w,CKEditorError as ot,Collection as at,env as rt,first as K,FocusTracker as J,KeystrokeHandler as P,Rect as lt,toArray as he}from"../../../../../@ckeditor_ckeditor5-utils@47.5.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{Widget as fe,WidgetToolbarRepository as ne,toWidget as ct,isWidget as mt,toWidgetEditable as ut,WidgetResize as L,calculateResizeHostAncestorWidth as pe,findOptimalInsertionRange as gt}from"../../../../../@ckeditor_ckeditor5-widget@47.5.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{SplitButtonView as Ie,createDropdown as Z,MenuBarMenuView as dt,MenuBarMenuListView as ht,MenuBarMenuListItemView as ft,ButtonView as b,Dialog as pt,MenuBarMenuListItemButtonView as It,ContextualBalloon as be,CssTransitionDisablerMixin as we,clickOutsideHandler as _e,UIModel as se,addToolbarToDropdown as bt,Notification as oe,FileDialogButtonView as ae,MenuBarMenuListItemFileDialogButtonView as wt,View as O,ViewCollection as X,FocusCycler as Y,CollapsibleView as _t,submitHandler as N,LabeledFieldView as Q,createLabeledInputText as ye,BalloonPanelView as yt,DropdownButtonView as vt,addListToDropdown as Ct,FormRowView as ve,FormHeaderView as Ce,createLabeledInputNumber as Et}from"../../../../../@ckeditor_ckeditor5-ui@47.5.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{IconImage as kt,IconCaption as St,IconImageUrl as Ut,IconObjectSizeFull as Vt,IconObjectSizeCustom as Bt,IconObjectSizeLarge as At,IconObjectSizeMedium as Tt,IconObjectSizeSmall as xt,IconTextAlternative as zt,IconImageUpload as Rt,IconObjectInline as Ee,IconObjectInlineRight as W,IconObjectInlineLeft as ke,IconObjectCenter as j,IconObjectRight as Se,IconObjectLeft as Ue,IconObjectFullWidth as Pt,IconPreviousArrow as Ve}from"../../../../../@ckeditor_ckeditor5-icons@47.5.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{FileRepository as C}from"../../../../../@ckeditor_ckeditor5-upload@47.5.0/node_modules/@ckeditor/ckeditor5-upload/dist/index.js";import Ot from"../../../../../../../_virtual/isEqual.js";import{isObject as Be}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isObject.js";import{identity as k}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/identity.js";function Nt(o){return o.createContainerElement("span",{class:"image-inline"},o.createEmptyElement("img"))}function re(o){return o.createContainerElement("figure",{class:"image"},[o.createEmptyElement("img"),o.createSlot("children")])}function Ae(o,e){const t=o.plugins.get("ImageUtils"),i=o.plugins.has("ImageInlineEditing")&&o.plugins.has("ImageBlockEditing");return a=>t.isInlineImageView(a)?i&&(a.getStyle("display")=="block"||a.findAncestor(t.isBlockImageView)?"imageBlock":"imageInline")!==e?null:n(a):null;function n(a){const s={name:!0};return a.hasAttribute("src")&&(s.attributes=["src"]),s}}function ee(o,e){const t=K(e.getSelectedBlocks());return!t||o.isObject(t)||t.isEmpty&&t.name!="listItem"?"imageBlock":"imageInline"}function T(o){return o&&o.endsWith("px")?parseInt(o):null}function x(o){const e=T(o.getStyle("width")),t=T(o.getStyle("height"));return!!(e&&t)}const Ft=/^(image|image-inline)$/;class I extends f{_domEmitter=new(st());static get pluginName(){return"ImageUtils"}static get isOfficialPlugin(){return!0}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,i=null,n={}){const a=this.editor,s=a.model,r=s.document.selection,l=Te(a,t||r,i);e={...Object.fromEntries(r.getAttributes()),...e};for(const c in e)s.schema.checkAttribute(l,c)||delete e[c];return s.change(c=>{const{setImageSizes:m=!0}=n,u=c.createElement(l,e);return s.insertObject(u,t,null,{setSelection:"on",findOptimalPosition:!t&&l!="imageInline"?"auto":void 0}),u.parent?(m&&this.setImageNaturalSizeAttributes(u),u):null})}setImageNaturalSizeAttributes(e){const t=e.getAttribute("src");t&&(e.getAttribute("width")||e.getAttribute("height")||this.editor.model.change(i=>{const n=new A.window.Image;this._domEmitter.listenTo(n,"load",()=>{!e.getAttribute("width")&&!e.getAttribute("height")&&this.editor.model.enqueueChange(i.batch,a=>{a.setAttribute("width",n.naturalWidth,e),a.setAttribute("height",n.naturalHeight,e)}),this._domEmitter.stopListening(n,"load")}),n.src=t}))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const i=e.getSelectedElement();if(i&&this.isImageWidget(i))return i;let n=t.parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(e){return e.findAncestor({classes:Ft})}isImageAllowed(){const t=this.editor.model.document.selection;return Lt(this.editor,t)&&Dt(t)}toImageWidget(e,t,i){return t.setCustomProperty("image",!0,e),ct(e,t,{label:()=>{const s=this.findViewImgElement(e).getAttribute("alt");return s?`${s} ${i}`:i}})}isImageWidget(e){return!!e.getCustomProperty("image")&&mt(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:i}of t.createRangeIn(e))if(this.isInlineImageView(i))return i}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function Lt(o,e){if(Te(o,e,null)=="imageBlock"){const i=Mt(e,o.model);if(o.model.schema.checkChild(i,"imageBlock"))return!0}else if(o.model.schema.checkChild(e.focus,"imageInline"))return!0;return!1}function Dt(o){return[...o.focus.getAncestors()].every(e=>!e.is("element","imageBlock"))}function Mt(o,e){const i=gt(o,e).start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}function Te(o,e,t){const i=o.model.schema,n=o.config.get("image.insert.type");return o.plugins.has("ImageBlockEditing")?o.plugins.has("ImageInlineEditing")?t||(n==="inline"?"imageInline":n!=="auto"?"imageBlock":e.is("selection")?ee(i,e):i.checkChild(e,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}const Wt=new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));class rn extends f{static get requires(){return[Xe,I,it,nt]}static get pluginName(){return"AutoImage"}static get isOfficialPlugin(){return!0}_timeoutId;_positionToInsert;constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",()=>{const n=t.selection.getFirstRange(),a=F.fromPosition(n.start);a.stickiness="toPrevious";const s=F.fromPosition(n.end);s.stickiness="toNext",t.once("change:data",()=>{this._embedImageBetweenPositions(a,s),a.detach(),s.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(A.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedImageBetweenPositions(e,t){const i=this.editor,n=new Ye(e,t),a=n.getWalker({ignoreElementEnd:!0}),s=Object.fromEntries(i.model.document.selection.getAttributes()),r=this.editor.plugins.get("ImageUtils");let l="";for(const c of a)c.item.is("$textProxy")&&(l+=c.item.data);if(l=l.trim(),!l.match(Wt)){n.detach();return}this._positionToInsert=F.fromPosition(e),this._timeoutId=setTimeout(()=>{if(!i.commands.get("insertImage").isEnabled){n.detach();return}i.model.change(u=>{this._timeoutId=null,u.remove(n),n.detach();let g;this._positionToInsert.root.rootName!=="$graveyard"&&(g=this._positionToInsert.toPosition()),r.insertImage({...s,src:l},g),this._positionToInsert.detach(),this._positionToInsert=null}),i.plugins.get("Delete").requestUndoOnBackspace()},100)}}class jt extends _{refresh(){const i=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!i,this.isEnabled&&i.hasAttribute("alt")?this.value=i.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,i=t.plugins.get("ImageUtils"),n=t.model,a=i.getClosestSelectedImageElement(n.document.selection);n.change(s=>{s.setAttribute("alt",e.newValue,a)})}}class qt extends f{static get requires(){return[I]}static get pluginName(){return"ImageTextAlternativeEditing"}static get isOfficialPlugin(){return!0}init(){this.editor.commands.add("imageTextAlternative",new jt(this.editor))}}class $t extends O{focusTracker;keystrokes;labeledInput;backButtonView;saveButtonView;children;_focusables;_focusCycler;constructor(e){super(e),this.focusTracker=new J,this.keystrokes=new P,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.labeledInput=this._createLabeledInputView(),this.children=this.createCollection([this._createHeaderView()]),this.children.add(new ve(e,{children:[this.labeledInput,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding"]})),this._focusables=new X,this.keystrokes.set("Esc",(t,i)=>{this.fire("cancel"),i()}),this._focusCycler=new Y({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),N({view:this}),[this.backButtonView,this.labeledInput,this.saveButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createBackButton(){const e=this.locale.t,t=new b(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:Ve,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createSaveButton(){const e=this.locale.t,t=new b(this.locale);return t.set({label:e("Save"),withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),t}_createHeaderView(){const e=this.locale.t,t=new Ce(this.locale,{label:e("Text Alternative")});return t.children.add(this.backButtonView,0),t}_createLabeledInputView(){const e=this.locale.t,t=new Q(this.locale,ye);return t.label=e("Text alternative"),t.class="ck-labeled-field-view_full-width",t}}function Ht(o){const e=o.plugins.get("ContextualBalloon");if(o.plugins.get("ImageUtils").getClosestSelectedImageWidget(o.editing.view.document.selection)){const i=te(o);e.updatePosition(i)}}function te(o){const e=o.editing.view,t=yt.defaultPositions,i=o.plugins.get("ImageUtils");return{target:e.domConverter.mapViewToDom(i.getClosestSelectedImageWidget(e.document.selection)),positions:[t.northArrowSouth,t.northArrowSouthWest,t.northArrowSouthEast,t.southArrowNorth,t.southArrowNorthWest,t.southArrowNorthEast,t.viewportStickyNorth]}}class Gt extends f{_balloon;_form;static get requires(){return[be]}static get pluginName(){return"ImageTextAlternativeUI"}static get isOfficialPlugin(){return!0}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",i=>{const n=e.commands.get("imageTextAlternative"),a=new b(i);return a.set({label:t("Change image text alternative"),icon:zt,tooltip:!0}),a.bind("isEnabled").to(n,"isEnabled"),a.bind("isOn").to(n,"value",s=>!!s),this.listenTo(a,"execute",()=>{this._showForm()}),a})}_createForm(){const e=this.editor,i=e.editing.view.document,n=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(we($t))(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this.listenTo(e.ui,"update",()=>{n.getClosestSelectedImageWidget(i.selection)?this._isVisible&&Ht(e):this._hideForm(!0)}),_e({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),i=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:te(e)}),i.fieldView.value=i.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class xe extends f{static get requires(){return[qt,Gt]}static get pluginName(){return"ImageTextAlternative"}static get isOfficialPlugin(){return!0}}function Kt(o){const e=(t,i,n)=>{if(!n.consumable.test(i.viewItem,{name:!0,classes:"image"}))return;const a=o.findViewImgElement(i.viewItem);if(!a||!n.consumable.test(a,{name:!0}))return;n.consumable.consume(i.viewItem,{name:!0,classes:"image"});const s=n.convertItem(a,i.modelCursor),r=K(s.modelRange.getItems());if(!r){n.consumable.revert(i.viewItem,{name:!0,classes:"image"});return}n.convertChildren(i.viewItem,r),n.updateConversionResult(r,i)};return t=>{t.on("element:figure",e)}}function ze(o,e){const t=(i,n,a)=>{if(!a.consumable.consume(n.item,i.name))return;const s=a.writer,r=a.mapper.toViewElement(n.item),l=o.findViewImgElement(r);n.attributeNewValue===null?(s.removeAttribute("srcset",l),s.removeAttribute("sizes",l)):n.attributeNewValue&&(s.setAttribute("srcset",n.attributeNewValue,l),s.setAttribute("sizes","100vw",l))};return i=>{i.on(`attribute:srcset:${e}`,t)}}function z(o,e,t){const i=(n,a,s)=>{if(!s.consumable.consume(a.item,n.name))return;const r=s.writer,l=s.mapper.toViewElement(a.item),c=o.findViewImgElement(l);r.setAttribute(a.attributeKey,a.attributeNewValue||"",c)};return n=>{n.on(`attribute:${t}:${e}`,i)}}class ie extends tt{observe(e){this.listenTo(e,"load",(t,i)=>{const n=i.target;this.checkShouldIgnoreEventFromTarget(n)||n.tagName=="IMG"&&this._fireEvents(i)},{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class Jt extends _{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||t==="block"&&w("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||t==="inline"&&w("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=he(e.source),i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),a=Object.fromEntries(i.getAttributes());t.forEach((s,r)=>{const l=i.getSelectedElement();if(typeof s=="string"&&(s={src:s}),r&&l&&n.isImage(l)){const c=this.editor.model.createPositionAfter(l);n.insertImage({...s,...a},c,e.imageType)}else e.breakBlock?n.insertImage({...s,...a},i.getFirstPosition(),e.imageType):n.insertImage({...s,...a},null,e.imageType)})}}class Zt extends _{constructor(e){super(e),this.decorate("cleanupImage")}refresh(){const t=this.editor.plugins.get("ImageUtils"),i=this.editor.model.document.selection.getSelectedElement();this.isEnabled=t.isImage(i),this.value=this.isEnabled?i.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement(),i=this.editor.plugins.get("ImageUtils");this.editor.model.change(n=>{n.setAttribute("src",e.source,t),this.cleanupImage(n,t),i.setImageNaturalSizeAttributes(t)})}cleanupImage(e,t){e.removeAttribute("srcset",t),e.removeAttribute("sizes",t),e.removeAttribute("sources",t),e.removeAttribute("width",t),e.removeAttribute("height",t),e.removeAttribute("alt",t)}}class Re extends f{static get requires(){return[I]}static get pluginName(){return"ImageEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(ie),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const i=new Jt(e),n=new Zt(e);e.commands.add("insertImage",i),e.commands.add("replaceImageSource",n),e.commands.add("imageInsert",i)}}class Pe extends f{static get requires(){return[I]}static get pluginName(){return"ImageSizeAttributes"}static get isOfficialPlugin(){return!0}afterInit(){this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline")}_registerSchema(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["width","height"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["width","height"]})}_registerConverters(e){const t=this.editor,i=t.plugins.get("ImageUtils"),n=e==="imageBlock"?"figure":"img";t.conversion.for("upcast").attributeToAttribute({view:{name:n,styles:{width:/.+/}},model:{key:"width",value:s=>x(s)?T(s.getStyle("width")):null}}).attributeToAttribute({view:{name:n,key:"width"},model:"width"}).attributeToAttribute({view:{name:n,styles:{height:/.+/}},model:{key:"height",value:s=>x(s)?T(s.getStyle("height")):null}}).attributeToAttribute({view:{name:n,key:"height"},model:"height"}),t.conversion.for("editingDowncast").add(s=>{a(s,"width","width",!0,!0),a(s,"height","height",!0,!0)}),t.conversion.for("dataDowncast").add(s=>{a(s,"width","width",!1),a(s,"height","height",!1)}),t.conversion.for("upcast").add(s=>{s.on("element:img",(r,l,c)=>{const m=l.viewItem.getAttribute("width"),u=l.viewItem.getAttribute("height");m&&u&&c.consumable.consume(l.viewItem,{styles:["aspect-ratio"]})})});function a(s,r,l,c,m=!1){s.on(`attribute:${r}:${e}`,(u,g,d)=>{if(!d.consumable.consume(g.item,u.name))return;const h=d.writer,p=d.mapper.toViewElement(g.item),v=i.findViewImgElement(p);g.attributeNewValue!==null?h.setAttribute(l,g.attributeNewValue,v):h.removeAttribute(l,v);const y=g.item.getAttribute("width"),E=g.item.getAttribute("height"),V=y&&E;if(V&&m&&h.setAttribute("loading","lazy",v),g.item.hasAttribute("sources"))return;const Ze=g.item.hasAttribute("resizedWidth");e==="imageInline"&&!Ze&&!c||V&&h.setStyle("aspect-ratio",`${y}/${E}`,v)})}}}class Oe extends _{_modelElementName;constructor(e,t){super(e),this._modelElementName=t}refresh(){const t=this.editor.plugins.get("ImageUtils"),i=t.getClosestSelectedImageElement(this.editor.model.document.selection);this._modelElementName==="imageBlock"?this.isEnabled=t.isInlineImage(i):this.isEnabled=t.isBlockImage(i)}execute(e={}){const t=this.editor,i=this.editor.model,n=t.plugins.get("ImageUtils"),a=n.getClosestSelectedImageElement(i.document.selection),s=Object.fromEntries(a.getAttributes());return!s.src&&!s.uploadId?null:i.change(r=>{const{setImageSizes:l=!0}=e,c=Array.from(i.markers).filter(g=>g.getRange().containsItem(a)),m=n.insertImage(s,i.createSelection(a,"on"),this._modelElementName,{setImageSizes:l});if(!m)return null;const u=r.createRangeOn(m);for(const g of c){const d=g.getRange(),h=d.root.rootName!="$graveyard"?d.getJoined(u,!0):u;r.updateMarker(g,{range:h})}return{oldElement:a,newElement:m}})}}class Ne extends f{static get requires(){return[I]}static get pluginName(){return"ImagePlaceholder"}static get isOfficialPlugin(){return!0}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const e=this.editor.model.schema;e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["placeholder"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const e=this.editor,t=e.conversion,i=e.plugins.get("ImageUtils");t.for("editingDowncast").add(n=>{n.on("attribute:placeholder",(a,s,r)=>{if(!r.consumable.test(s.item,a.name)||!s.item.is("element","imageBlock")&&!s.item.is("element","imageInline"))return;r.consumable.consume(s.item,a.name);const l=r.writer,c=r.mapper.toViewElement(s.item),m=i.findViewImgElement(c);s.attributeNewValue?(l.addClass("image_placeholder",m),l.setStyle("background-image",`url(${s.attributeNewValue})`,m),l.setCustomProperty("editingPipeline:doNotReuseOnce",!0,m)):(l.removeClass("image_placeholder",m),l.removeStyle("background-image",m))})})}_setupLoadListener(){const e=this.editor,t=e.model,i=e.editing,n=i.view,a=e.plugins.get("ImageUtils");n.addObserver(ie),this.listenTo(n.document,"imageLoaded",(s,r)=>{const l=n.domConverter.mapDomToView(r.target);if(!l)return;const c=a.getImageWidgetFromImageView(l);if(!c)return;const m=i.mapper.toModelElement(c);!m||!m.hasAttribute("placeholder")||t.enqueueChange({isUndoable:!1},u=>{u.removeAttribute("placeholder",m)})})}}class Fe extends f{static get requires(){return[Re,Pe,I,Ne,H]}static get pluginName(){return"ImageBlockEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new Oe(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,n=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToStructure({model:"imageBlock",view:(a,{writer:s})=>re(s)}),i.for("editingDowncast").elementToStructure({model:"imageBlock",view:(a,{writer:s})=>n.toImageWidget(re(s),s,t("image widget"))}),i.for("downcast").add(z(n,"imageBlock","src")).add(z(n,"imageBlock","alt")).add(ze(n,"imageBlock")),i.for("upcast").elementToElement({view:Ae(e,"imageBlock"),model:(a,{writer:s})=>s.createElement("imageBlock",a.hasAttribute("src")?{src:a.getAttribute("src")}:void 0)}).add(Kt(n))}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,n=e.plugins.get("ImageUtils"),a=e.plugins.get("ClipboardPipeline");this.listenTo(a,"inputTransformation",(s,r)=>{const l=Array.from(r.content.getChildren());let c;if(!l.every(n.isInlineImageView))return;r.targetRanges?c=e.editing.mapper.toModelRange(r.targetRanges[0]):c=t.document.selection.getFirstRange();const m=t.createSelection(c);if(ee(t.schema,m)==="imageBlock"){const u=new G(i.document),g=l.map(d=>u.createElement("figure",{class:"image"},d));r.content=u.createDocumentFragment(g)}}),this.listenTo(a,"contentInsertion",(s,r)=>{r.method==="paste"&&t.change(l=>{const c=l.createRangeIn(r.content);for(const m of c.getItems())m.is("element","imageBlock")&&n.setImageNaturalSizeAttributes(m)})})}}class Xt extends O{focusTracker;keystrokes;_focusables;_focusCycler;children;constructor(e,t=[]){super(e),this.focusTracker=new J,this.keystrokes=new P,this._focusables=new X,this.children=this.createCollection(),this._focusCycler=new Y({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const i of t)this.children.add(i),this._focusables.add(i),i instanceof _t&&this._focusables.addMany(i.children);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),N({view:this});for(const t of this._focusables)this.focusTracker.add(t.element);this.keystrokes.listenTo(this.element);const e=t=>t.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}class U extends f{static get pluginName(){return"ImageInsertUI"}static get isOfficialPlugin(){return!0}static get requires(){return[I]}dropdownView;_integrations=new Map;constructor(e){super(e),e.config.define("image.insert.integrations",["upload","assetManager","url"])}init(){const e=this.editor,t=e.model.document.selection,i=e.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(e.model.document,"change",()=>{this.isImageSelected=i.isImage(t.getSelectedElement())});const n=s=>this._createToolbarComponent(s),a=s=>this._createMenuBarComponent(s);e.ui.componentFactory.add("insertImage",n),e.ui.componentFactory.add("imageInsert",n),e.ui.componentFactory.add("menuBar:insertImage",a)}registerIntegration({name:e,observable:t,buttonViewCreator:i,formViewCreator:n,menuBarButtonViewCreator:a,requiresForm:s=!1,override:r=!1}){this._integrations.has(e)&&!r&&w("image-insert-integration-exists",{name:e}),this._integrations.set(e,{observable:t,buttonViewCreator:i,menuBarButtonViewCreator:a,formViewCreator:n,requiresForm:s})}_createToolbarComponent(e){const t=this.editor,i=e.t,n=this._prepareIntegrations();if(!n.length)return null;let a;const s=n[0];if(n.length==1){if(!s.requiresForm)return s.buttonViewCreator(!0);a=s.buttonViewCreator(!0)}else{const c=s.buttonViewCreator(!1);a=new Ie(e,c),a.tooltip=!0,a.bind("label").to(this,"isImageSelected",m=>i(m?"Replace image":"Insert image"))}const r=this.dropdownView=Z(e,a),l=n.map(({observable:c})=>typeof c=="function"?c():c);return r.bind("isEnabled").toMany(l,"isEnabled",(...c)=>c.some(m=>m)),r.once("change:isOpen",()=>{const c=n.flatMap(({formViewCreator:u})=>u(n.length==1)),m=new Xt(t.locale,c);r.panelView.children.add(m)}),r}_createMenuBarComponent(e){const t=e.t,i=this._prepareIntegrations();if(!i.length)return null;const n=i.flatMap(({menuBarButtonViewCreator:r})=>r(i.length==1)),a=new dt(e),s=new ht(e);a.panelView.children.add(s),a.buttonView.set({icon:kt,label:t("Image")});for(const r of n){const l=new ft(e,a);l.children.add(r),s.items.add(l),r.delegate("execute").to(a)}return a}_prepareIntegrations(){const t=this.editor.config.get("image.insert.integrations"),i=[];if(!t.length)return w("image-insert-integrations-not-specified"),i;for(const n of t){if(!this._integrations.has(n)){["upload","assetManager","url"].includes(n)||w("image-insert-unknown-integration",{item:n});continue}i.push(this._integrations.get(n))}return i.length||w("image-insert-integrations-not-registered"),i}}class ln extends f{static get requires(){return[Fe,fe,xe,U]}static get pluginName(){return"ImageBlock"}static get isOfficialPlugin(){return!0}}class Yt extends f{static get requires(){return[Re,Pe,I,Ne,H]}static get pluginName(){return"ImageInlineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"],disallowIn:["caption"]}),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new Oe(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,n=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToElement({model:"imageInline",view:(a,{writer:s})=>s.createEmptyElement("img")}),i.for("editingDowncast").elementToStructure({model:"imageInline",view:(a,{writer:s})=>n.toImageWidget(Nt(s),s,t("image widget"))}),i.for("downcast").add(z(n,"imageInline","src")).add(z(n,"imageInline","alt")).add(ze(n,"imageInline")),i.for("upcast").elementToElement({view:Ae(e,"imageInline"),model:(a,{writer:s})=>s.createElement("imageInline",a.hasAttribute("src")?{src:a.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,n=e.plugins.get("ImageUtils"),a=e.plugins.get("ClipboardPipeline");this.listenTo(a,"inputTransformation",(s,r)=>{const l=Array.from(r.content.getChildren());let c;if(!l.every(n.isBlockImageView))return;r.targetRanges?c=e.editing.mapper.toModelRange(r.targetRanges[0]):c=t.document.selection.getFirstRange();const m=t.createSelection(c);if(ee(t.schema,m)==="imageInline"){const u=new G(i.document),g=l.map(d=>d.childCount===1?(Array.from(d.getAttributes()).forEach(h=>u.setAttribute(...h,n.findViewImgElement(d))),d.getChild(0)):d);r.content=u.createDocumentFragment(g)}}),this.listenTo(a,"contentInsertion",(s,r)=>{r.method==="paste"&&t.change(l=>{const c=l.createRangeIn(r.content);for(const m of c.getItems())m.is("element","imageInline")&&n.setImageNaturalSizeAttributes(m)})})}}class cn extends f{static get requires(){return[Yt,fe,xe,U]}static get pluginName(){return"ImageInline"}static get isOfficialPlugin(){return!0}}class Le extends f{static get pluginName(){return"ImageCaptionUtils"}static get isOfficialPlugin(){return!0}static get requires(){return[I]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),i=e.getFirstPosition().findAncestor("caption");return i&&t.isBlockImage(i.parent)?i:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return e.name=="figcaption"&&t.isBlockImageView(e.parent)?{name:!0}:null}}class Qt extends _{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),i=e.plugins.get("ImageUtils");if(!e.plugins.has(Fe)){this.isEnabled=!1,this.value=!1;return}const n=e.model.document.selection,a=n.getSelectedElement();if(!a){const s=t.getCaptionFromModelSelection(n);this.isEnabled=!!s,this.value=!!s;return}this.isEnabled=i.isImage(a),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(a):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change(i=>{this.value?this._hideImageCaption(i):this._showImageCaption(i,t)})}_showImageCaption(e,t){const n=this.editor.model.document.selection,a=this.editor.plugins.get("ImageCaptionEditing"),s=this.editor.plugins.get("ImageUtils");let r=n.getSelectedElement();const l=a._getSavedCaption(r);s.isInlineImage(r)&&(this.editor.execute("imageTypeBlock"),r=n.getSelectedElement());const c=l||e.createElement("caption");e.append(c,r),t&&e.setSelection(c,"in")}_hideImageCaption(e){const t=this.editor,i=t.model.document.selection,n=t.plugins.get("ImageCaptionEditing"),a=t.plugins.get("ImageCaptionUtils");let s=i.getSelectedElement(),r;s?r=a.getCaptionFromImageModelElement(s):(r=a.getCaptionFromModelSelection(i),s=r.parent),n._saveCaption(s,r),e.setSelection(s,"on"),e.remove(r)}}class ei extends f{static get requires(){return[I,Le]}static get pluginName(){return"ImageCaptionEditing"}static get isOfficialPlugin(){return!0}_savedCaptionsMap;constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new Qt(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),a=e.t;e.conversion.for("upcast").elementToElement({view:s=>n.matchImageCaptionViewElement(s),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(s,{writer:r})=>i.isBlockImage(s.parent)?r.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(s,{writer:r})=>{if(!i.isBlockImage(s.parent))return null;const l=r.createEditableElement("figcaption");r.setCustomProperty("imageCaption",!0,l),l.placeholder=a("Enter image caption"),Qe({view:t,element:l,keepOnFocus:!0});const c=s.parent.getAttribute("alt"),m=c?a("Caption for image: %0",[c]):a("Caption for the image");return ut(l,r,{label:m})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils"),n=e.commands.get("imageTypeInline"),a=e.commands.get("imageTypeBlock"),s=r=>{if(!r.return)return;const{oldElement:l,newElement:c}=r.return;if(!l)return;if(t.isBlockImage(l)){const u=i.getCaptionFromImageModelElement(l);if(u){this._saveCaption(c,u);return}}const m=this._getSavedCaption(l);m&&this._saveCaption(c,m)};n&&this.listenTo(n,"execute",s,{priority:"low"}),a&&this.listenTo(a,"execute",s,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?et.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,i=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",()=>{const a=t.document.differ.getChanges();for(const s of a){if(s.attributeKey!=="alt")continue;const r=s.range.start.nodeAfter;if(i.isBlockImage(r)){const l=n.getCaptionFromImageModelElement(r);if(!l)return;e.editing.reconvertItem(l)}}})}}class ti extends f{static get requires(){return[Le]}static get pluginName(){return"ImageCaptionUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageCaptionUtils"),n=e.t;e.ui.componentFactory.add("toggleImageCaption",a=>{const s=e.commands.get("toggleImageCaption"),r=new b(a);return r.set({icon:St,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(s,"value","isEnabled"),r.bind("label").to(s,"value",l=>n(l?"Toggle caption off":"Toggle caption on")),this.listenTo(r,"execute",()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const l=i.getCaptionFromModelSelection(e.model.document.selection);if(l){const c=e.editing.mapper.toViewElement(l);t.scrollToTheSelection(),t.change(m=>{m.addClass("image__caption_highlighted",c)})}e.editing.view.focus()}),r})}}class mn extends f{static get requires(){return[ei,ti]}static get pluginName(){return"ImageCaption"}static get isOfficialPlugin(){return!0}}function De(o){const e=o.map(t=>t.replace("+","\\+"));return new RegExp(`^image\\/(${e.join("|")})$`)}function ii(o){return new Promise((e,t)=>{const i=o.getAttribute("src");fetch(i).then(n=>n.blob()).then(n=>{const a=Me(n,i),r=`image.${a.replace("image/","")}`,l=new File([n],r,{type:a});e(l)}).catch(n=>n&&n.name==="TypeError"?si(i).then(e).catch(t):t(n))})}function ni(o,e){return!o.isInlineImageView(e)||!e.getAttribute("src")?!1:!!e.getAttribute("src").match(/^data:image\/\w+;base64,/g)||!!e.getAttribute("src").match(/^blob:/g)}function Me(o,e){return o.type?o.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}function si(o){return oi(o).then(e=>{const t=Me(e,o),n=`image.${t.replace("image/","")}`;return new File([e],n,{type:t})})}function oi(o){return new Promise((e,t)=>{const i=A.document.createElement("img");i.addEventListener("load",()=>{const n=A.document.createElement("canvas");n.width=i.width,n.height=i.height,n.getContext("2d").drawImage(i,0,0),n.toBlob(s=>s?e(s):t())}),i.addEventListener("error",()=>t()),i.src=o})}class ai extends f{static get pluginName(){return"ImageUploadUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("uploadImage",()=>this._createToolbarButton()),e.ui.componentFactory.add("imageUpload",()=>this._createToolbarButton()),e.ui.componentFactory.add("menuBar:uploadImage",()=>this._createMenuBarButton("standalone")),e.plugins.has("ImageInsertUI")&&e.plugins.get("ImageInsertUI").registerIntegration({name:"upload",observable:()=>e.commands.get("uploadImage"),buttonViewCreator:()=>this._createToolbarButton(),formViewCreator:()=>this._createDropdownButton(),menuBarButtonViewCreator:t=>this._createMenuBarButton(t?"insertOnly":"insertNested")})}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("uploadImage"),a=t.config.get("image.upload.types"),s=De(a),r=new e(t.locale),l=i.t;return r.set({acceptedType:a.map(c=>`image/${c}`).join(","),allowMultipleFiles:!0,label:l("Upload from computer"),icon:Rt}),r.bind("isEnabled").to(n),r.on("done",(c,m)=>{const u=Array.from(m).filter(g=>s.test(g.type));u.length&&(t.execute("uploadImage",{file:u}),t.editing.view.focus())}),r}_createToolbarButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),i=this.editor.commands.get("uploadImage"),n=this._createButton(ae);return n.tooltip=!0,n.bind("label").to(t,"isImageSelected",i,"isAccessAllowed",(a,s)=>e(s?a?"Replace image from computer":"Upload image from computer":"You have no image upload permissions.")),n}_createDropdownButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),i=this._createButton(ae);return i.withText=!0,i.bind("label").to(t,"isImageSelected",n=>e(n?"Replace from computer":"Upload from computer")),i.on("execute",()=>{t.dropdownView.isOpen=!1}),i}_createMenuBarButton(e){const t=this.editor.locale.t,i=this._createButton(wt);switch(i.withText=!0,e){case"standalone":i.label=t("Image from computer");break;case"insertOnly":i.label=t("Image");break;case"insertNested":i.label=t("From computer");break}return i}}class ri extends f{static get pluginName(){return"ImageUploadProgress"}static get isOfficialPlugin(){return!0}placeholder;constructor(e){super(e),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}uploadStatusChange=(e,t,i)=>{const n=this.editor,a=t.item,s=a.getAttribute("uploadId");if(!i.consumable.consume(t.item,e.name))return;const r=n.plugins.get("ImageUtils"),l=n.plugins.get(C),c=s?t.attributeNewValue:null,m=this.placeholder,u=n.editing.mapper.toViewElement(a),g=i.writer;if(c=="reading"){le(u,g),ce(r,m,u,g);return}if(c=="uploading"){const d=l.loaders.get(s);le(u,g),d?(me(u,g),ci(u,g,d,n.editing.view),hi(r,u,g,d)):ce(r,m,u,g);return}c=="complete"&&l.loaders.get(s)&&ui(u,g,n.editing.view),mi(u,g),me(u,g),li(u,g)}}function le(o,e){o.hasClass("ck-appear")||e.addClass("ck-appear",o)}function li(o,e){e.removeClass("ck-appear",o)}function ce(o,e,t,i){t.hasClass("ck-image-upload-placeholder")||i.addClass("ck-image-upload-placeholder",t);const n=o.findViewImgElement(t);n.getAttribute("src")!==e&&i.setAttribute("src",e,n),We(t,"placeholder")||i.insert(i.createPositionAfter(n),di(i))}function me(o,e){o.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",o),je(o,e,"placeholder")}function ci(o,e,t,i){const n=gi(e);e.insert(e.createPositionAt(o,"end"),n),t.on("change:uploadedPercent",(a,s,r)=>{i.change(l=>{l.setStyle("width",r+"%",n)})})}function mi(o,e){je(o,e,"progressBar")}function ui(o,e,t){const i=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(o,"end"),i),setTimeout(()=>{t.change(n=>n.remove(n.createRangeOn(i)))},3e3)}function gi(o){const e=o.createUIElement("div",{class:"ck-progress-bar"});return o.setCustomProperty("progressBar",!0,e),e}function di(o){const e=o.createUIElement("div",{class:"ck-upload-placeholder-loader"});return o.setCustomProperty("placeholder",!0,e),e}function We(o,e){for(const t of o.getChildren())if(t.getCustomProperty(e))return t}function je(o,e,t){const i=We(o,t);i&&e.remove(e.createRangeOn(i))}function hi(o,e,t,i){if(i.data){const n=o.findViewImgElement(e);t.setAttribute("src",i.data,n)}}class fi extends _{constructor(e){super(e),this.set("isAccessAllowed",!0)}refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(i)}execute(e){const t=he(e.file),i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),a=Object.fromEntries(i.getAttributes());t.forEach((s,r)=>{const l=i.getSelectedElement();if(r&&l&&n.isImage(l)){const c=this.editor.model.createPositionAfter(l);this._uploadImage(s,a,c)}else this._uploadImage(s,a)})}_uploadImage(e,t,i){const n=this.editor,s=n.plugins.get(C).createLoader(e),r=n.plugins.get("ImageUtils");s&&r.insertImage({...t,uploadId:s.id},i)}}class pi extends f{static get requires(){return[C,oe,H,I]}static get pluginName(){return"ImageUploadEditing"}static get isOfficialPlugin(){return!0}_uploadImageElements;_uploadedImages=new Map;constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,i=e.conversion,n=e.plugins.get(C),a=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline"),r=De(e.config.get("image.upload.types")),l=new fi(e);e.commands.add("uploadImage",l),e.commands.add("imageUpload",l),i.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}).add(c=>c.on("element:img",(m,u,g)=>{if(!g.consumable.test(u.viewItem,{attributes:["data-ck-upload-id"]}))return;const d=u.viewItem.getAttribute("data-ck-upload-id");if(!d)return;const[h]=Array.from(u.modelRange.getItems({shallow:!0})),p=n.loaders.get(d);h&&(g.writer.setAttribute("uploadId",d,h),g.consumable.consume(u.viewItem,{attributes:["data-ck-upload-id"]}),p&&p.data&&g.writer.setAttribute("uploadStatus",p.status,h))},{priority:"low"})),this.listenTo(e.editing.view.document,"clipboardInput",(c,m)=>{if(Ii(m.dataTransfer))return;const u=Array.from(m.dataTransfer.files).filter(d=>d?r.test(d.type):!1);if(!u.length)return;if(c.stop(),e.model.change(d=>{m.targetRanges&&d.setSelection(m.targetRanges.map(h=>e.editing.mapper.toModelRange(h))),e.execute("uploadImage",{file:u})}),!e.commands.get("uploadImage").isAccessAllowed){const d=e.plugins.get("Notification"),h=e.locale.t;d.showWarning(h("You have no image upload permissions."),{namespace:"image"})}}),this.listenTo(s,"inputTransformation",(c,m)=>{const u=Array.from(e.editing.view.createRangeIn(m.content)).map(d=>d.item).filter(d=>ni(a,d)&&!d.getAttribute("uploadProcessed")).map(d=>({promise:ii(d),imageElement:d}));if(!u.length)return;const g=new G(e.editing.view.document);for(const d of u){g.setAttribute("uploadProcessed",!0,d.imageElement);const h=n.createLoader(d.promise);h&&(g.setAttribute("src","",d.imageElement),g.setAttribute("uploadId",h.id,d.imageElement))}}),e.editing.view.document.on("dragover",(c,m)=>{m.preventDefault()}),t.on("change",()=>{const c=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),m=new Set;for(const u of c)if(u.type=="insert"&&u.name!="$text"){const g=u.position.nodeAfter,d=u.position.root.rootName=="$graveyard";for(const h of bi(e,g)){const p=h.getAttribute("uploadId"),v=h.getAttribute("uploadStatus");if(!p||v=="complete")continue;const y=n.loaders.get(p);if(!y){!d&&this._uploadedImages.has(p)&&e.model.enqueueChange({isUndoable:!1},E=>{E.setAttribute("uploadStatus","complete",h),this.fire("uploadComplete",{data:this._uploadedImages.get(p),imageElement:h})});continue}d?m.has(p)||Array.from(this._uploadImageElements.get(p)).every(V=>V.root.rootName=="$graveyard")&&y.abort():(m.add(p),this._uploadImageElements.has(p)?this._uploadImageElements.get(p).add(h):this._uploadImageElements.set(p,new Set([h])),y.status=="idle"&&this._readAndUpload(y))}}}),this.on("uploadComplete",(c,{imageElement:m,data:u})=>{const g=u.urls?u.urls:u;this.editor.model.change(d=>{d.setAttribute("src",g.default,m),this._parseAndSetSrcsetAttributeOnImage(g,m,d),a.setImageNaturalSizeAttributes(m)})},{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&(e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this._registerConverters("imageBlock")),this.editor.plugins.has("ImageInlineEditing")&&(e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]}),this._registerConverters("imageInline"))}_readAndUpload(e){const t=this.editor,i=t.model,n=t.locale.t,a=t.plugins.get(C),s=t.plugins.get(oe),r=t.plugins.get("ImageUtils"),l=this._uploadImageElements;return i.enqueueChange({isUndoable:!1},m=>{const u=l.get(e.id);for(const g of u)m.setAttribute("uploadStatus","reading",g)}),e.read().then(()=>{const m=e.upload();t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Uploading image"));for(const u of l.get(e.id)){if(rt.isSafari){const g=t.editing.mapper.toViewElement(u),d=r.findViewImgElement(g);t.editing.view.once("render",()=>{if(!d.parent)return;const h=t.editing.view.domConverter.mapViewToDom(d.parent);if(!h)return;const p=h.style.display;h.style.display="none",h._ckHack=h.offsetHeight,h.style.display=p})}i.enqueueChange({isUndoable:!1},g=>{g.setAttribute("uploadStatus","uploading",u)})}return m}).then(m=>{i.enqueueChange({isUndoable:!1},u=>{for(const g of l.get(e.id))u.setAttribute("uploadStatus","complete",g),this.fire("uploadComplete",{data:m,imageElement:g});t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Image upload complete")),this._uploadedImages.set(e.id,m)}),c()}).catch(m=>{if(t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Error during image upload")),e.status!=="error"&&e.status!=="aborted")throw m;e.status=="error"&&m&&s.showWarning(m,{title:n("Upload failed"),namespace:"upload"}),i.enqueueChange({isUndoable:!1},u=>{for(const g of l.get(e.id))g.root.rootName!=="$graveyard"&&u.remove(g)}),c()});function c(){i.enqueueChange({isUndoable:!1},m=>{for(const u of l.get(e.id))m.removeAttribute("uploadId",u),m.removeAttribute("uploadStatus",u);l.delete(e.id)}),a.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,i){let n=0;const a=Object.keys(e).filter(s=>{const r=parseInt(s,10);if(!isNaN(r))return n=Math.max(n,r),!0}).map(s=>`${e[s]} ${s}w`).join(", ");if(a!=""){const s={srcset:a};!t.hasAttribute("width")&&!t.hasAttribute("height")&&(s.width=n),i.setAttributes(s,t)}}_registerConverters(e){const{conversion:t,plugins:i}=this.editor,n=i.get(C),a=i.get(I);t.for("dataDowncast").add(s=>{s.on(`attribute:uploadId:${e}`,(r,l,c)=>{if(!c.consumable.test(l.item,r.name))return;const m=n.loaders.get(l.attributeNewValue);if(!m||!m.data)return null;const u=c.mapper.toViewElement(l.item),g=a.findViewImgElement(u);g&&(c.consumable.consume(l.item,r.name),c.writer.setAttribute("data-ck-upload-id",m.id,g))})})}}function Ii(o){return Array.from(o.types).includes("text/html")&&o.getData("text/html")!==""}function bi(o,e){const t=o.plugins.get("ImageUtils");return Array.from(o.model.createRangeOn(e)).filter(i=>t.isImage(i.item)).map(i=>i.item)}class wi extends f{static get pluginName(){return"ImageUpload"}static get isOfficialPlugin(){return!0}static get requires(){return[pi,ai,ri]}}class _i extends O{urlInputView;keystrokes;constructor(e){super(e),this.set("imageURLInputValue",""),this.set("isImageSelected",!1),this.set("isEnabled",!0),this.keystrokes=new P,this.urlInputView=this._createUrlInputView(),this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-url"],tabindex:"-1"},children:[this.urlInputView,{tag:"div",attributes:{class:["ck","ck-image-insert-url__action-row"]}}]})}render(){super.render(),N({view:this}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}_createUrlInputView(){const e=this.locale,t=e.t,i=new Q(e,ye);return i.bind("label").to(this,"isImageSelected",n=>t(n?"Update image URL":"Insert image via URL")),i.bind("isEnabled").to(this),i.fieldView.inputMode="url",i.fieldView.placeholder="https://example.com/image.png",i.fieldView.bind("value").to(this,"imageURLInputValue",n=>n||""),i.fieldView.on("input",()=>{this.imageURLInputValue=i.fieldView.element.value.trim()}),i}focus(){this.urlInputView.focus()}}class yi extends f{_imageInsertUI;_formView;static get pluginName(){return"ImageInsertViaUrlUI"}static get isOfficialPlugin(){return!0}static get requires(){return[U,pt]}init(){this.editor.ui.componentFactory.add("insertImageViaUrl",()=>this._createToolbarButton()),this.editor.ui.componentFactory.add("menuBar:insertImageViaUrl",()=>this._createMenuBarButton("standalone"))}afterInit(){this._imageInsertUI=this.editor.plugins.get("ImageInsertUI"),this._imageInsertUI.registerIntegration({name:"url",observable:()=>this.editor.commands.get("insertImage"),buttonViewCreator:()=>this._createToolbarButton(),formViewCreator:()=>this._createDropdownButton(),menuBarButtonViewCreator:e=>this._createMenuBarButton(e?"insertOnly":"insertNested")})}_createInsertUrlButton(e){const t=new e(this.editor.locale);return t.icon=Ut,t.on("execute",()=>{this._showModal()}),t}_createToolbarButton(){const e=this.editor.locale.t,t=this._createInsertUrlButton(b);return t.tooltip=!0,t.bind("label").to(this._imageInsertUI,"isImageSelected",i=>e(i?"Update image URL":"Insert image via URL")),t}_createDropdownButton(){const e=this.editor.locale.t,t=this._createInsertUrlButton(b);return t.withText=!0,t.bind("label").to(this._imageInsertUI,"isImageSelected",i=>e(i?"Update image URL":"Insert via URL")),t}_createMenuBarButton(e){const t=this.editor.locale.t,i=this._createInsertUrlButton(It);switch(i.withText=!0,e){case"standalone":i.label=t("Image via URL");break;case"insertOnly":i.label=t("Image");break;case"insertNested":i.label=t("Via URL");break}return i}_createInsertUrlView(){const e=this.editor,t=e.locale,i=e.commands.get("replaceImageSource"),n=e.commands.get("insertImage"),a=new _i(t);return a.bind("isImageSelected").to(this._imageInsertUI),a.bind("isEnabled").toMany([n,i],"isEnabled",(...s)=>s.some(r=>r)),a}_showModal(){const e=this.editor,i=e.locale.t,n=e.plugins.get("Dialog");this._formView||(this._formView=this._createInsertUrlView(),this._formView.on("submit",()=>this._handleSave()));const a=e.commands.get("replaceImageSource");this._formView.imageURLInputValue=a.value||"",n.show({id:"insertImageViaUrl",title:i("Image via URL"),isModal:!0,content:this._formView,actionButtons:[{label:i("Cancel"),withText:!0,onExecute:()=>n.hide()},{label:this._imageInsertUI.isImageSelected?i("Save"):i("Insert"),class:"ck-button-action",withText:!0,onExecute:()=>this._handleSave()}]})}_handleSave(){this.editor.commands.get("replaceImageSource").isEnabled?this.editor.execute("replaceImageSource",{source:this._formView.imageURLInputValue}):this.editor.execute("insertImage",{source:this._formView.imageURLInputValue}),this.editor.plugins.get("Dialog").hide()}}class vi extends f{static get pluginName(){return"ImageInsertViaUrl"}static get isOfficialPlugin(){return!0}static get requires(){return[yi,U]}}class un extends f{static get pluginName(){return"ImageInsert"}static get isOfficialPlugin(){return!0}static get requires(){return[wi,vi,U]}}class Ci extends _{refresh(){const e=this.editor,i=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!i,!i||!i.hasAttribute("resizedWidth")?this.value=null:this.value={width:i.getAttribute("resizedWidth"),height:null}}execute(e){const t=this.editor,i=t.model,n=t.plugins.get("ImageUtils"),a=n.getClosestSelectedImageElement(i.document.selection);this.value={width:e.width,height:null},a&&i.change(s=>{s.setAttribute("resizedWidth",e.width,a),s.removeAttribute("resizedHeight",a),n.setImageNaturalSizeAttributes(a)})}}class qe extends f{static get requires(){return[I]}static get pluginName(){return"ImageResizeEditing"}static get licenseFeatureCode(){return"IR"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:custom",value:"custom",icon:"custom"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new Ci(e);this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}afterInit(){this._registerSchema()}_registerSchema(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&(e.extend("imageBlock",{allowAttributes:["resizedWidth","resizedHeight"]}),e.setAttributeProperties("resizedWidth",{isFormatting:!0}),e.setAttributeProperties("resizedHeight",{isFormatting:!0})),this.editor.plugins.has("ImageInlineEditing")&&(e.extend("imageInline",{allowAttributes:["resizedWidth","resizedHeight"]}),e.setAttributeProperties("resizedWidth",{isFormatting:!0}),e.setAttributeProperties("resizedHeight",{isFormatting:!0}))}_registerConverters(e){const t=this.editor,i=t.plugins.get("ImageUtils");t.conversion.for("downcast").add(n=>n.on(`attribute:resizedWidth:${e}`,(a,s,r)=>{if(!r.consumable.consume(s.item,a.name))return;const l=r.writer,c=r.mapper.toViewElement(s.item);s.attributeNewValue!==null?(l.setStyle("width",s.attributeNewValue,c),l.addClass("image_resized",c)):(l.removeStyle("width",c),l.removeClass("image_resized",c))})),t.conversion.for("dataDowncast").attributeToAttribute({model:{name:e,key:"resizedHeight"},view:n=>({key:"style",value:{height:n}})}),t.conversion.for("editingDowncast").add(n=>n.on(`attribute:resizedHeight:${e}`,(a,s,r)=>{if(!r.consumable.consume(s.item,a.name))return;const l=r.writer,c=r.mapper.toViewElement(s.item),m=e==="imageInline"?i.findViewImgElement(c):c;s.attributeNewValue!==null?l.setStyle("height",s.attributeNewValue,m):l.removeStyle("height",m)})),t.conversion.for("upcast").attributeToAttribute({view:{name:e==="imageBlock"?"figure":"img",styles:{width:/.+/}},model:{key:"resizedWidth",value:n=>x(n)?null:n.getStyle("width")}}),t.conversion.for("upcast").attributeToAttribute({view:{name:e==="imageBlock"?"figure":"img",styles:{height:/.+/}},model:{key:"resizedHeight",value:n=>x(n)?null:n.getStyle("height")}}),t.conversion.for("upcast").add(n=>{n.on(`element:${e==="imageBlock"?"figure":"img"}`,(a,s,r)=>{r.consumable.consume(s.viewItem,{classes:["image_resized"]})})})}}const D={small:xt,medium:Tt,large:At,custom:Bt,original:Vt};class Ei extends f{static get requires(){return[qe]}static get pluginName(){return"ImageResizeButtons"}static get isOfficialPlugin(){return!0}_resizeUnit;constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),i=e.commands.get("resizeImage");this.bind("isEnabled").to(i);for(const n of t)this._registerImageResizeButton(n);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:i,value:n,icon:a}=e;t.ui.componentFactory.add(i,s=>{const r=new b(s),l=t.commands.get("resizeImage"),c=this._getOptionLabelValue(e,!0);if(!D[a])throw new ot("imageresizebuttons-missing-icon",t,e);if(r.set({label:c,icon:D[a],tooltip:c,isToggleable:!0}),r.bind("isEnabled").to(this),t.plugins.has("ImageCustomResizeUI")&&S(e)){const m=t.plugins.get("ImageCustomResizeUI");this.listenTo(r,"execute",()=>{m._showForm(this._resizeUnit)})}else{const m=n?n+this._resizeUnit:null;r.bind("isOn").to(l,"value",l,"isEnabled",q(m)),this.listenTo(r,"execute",()=>{t.execute("resizeImage",{width:m})})}return r})}_registerImageResizeDropdown(e){const t=this.editor,i=t.t,n=e.find(s=>!s.value),a=s=>{const r=t.commands.get("resizeImage"),l=Z(s,vt),c=l.buttonView,m=i("Resize image");return c.set({tooltip:m,commandValue:n.value,icon:D.medium,isToggleable:!0,label:this._getOptionLabelValue(n),withText:!0,class:"ck-resize-image-button",ariaLabel:m,ariaLabelledBy:void 0}),c.bind("label").to(r,"value",u=>u&&u.width?u.width:this._getOptionLabelValue(n)),l.bind("isEnabled").to(this),Ct(l,()=>this._getResizeDropdownListItemDefinitions(e,r),{ariaLabel:i("Image resize list"),role:"menu"}),this.listenTo(l,"execute",u=>{"onClick"in u.source?u.source.onClick():(t.execute(u.source.commandName,{width:u.source.commandValue}),t.editing.view.focus())}),l};t.ui.componentFactory.add("resizeImage",a),t.ui.componentFactory.add("imageResize",a)}_getOptionLabelValue(e,t=!1){const i=this.editor.t;return e.label?e.label:t?S(e)?i("Custom image size"):e.value?i("Resize image to %0",e.value+this._resizeUnit):i("Resize image to the original size"):S(e)?i("Custom"):e.value?e.value+this._resizeUnit:i("Original")}_getResizeDropdownListItemDefinitions(e,t){const{editor:i}=this,n=new at,a=e.map(s=>S(s)?{...s,valueWithUnits:"custom"}:s.value?{...s,valueWithUnits:`${s.value}${this._resizeUnit}`}:{...s,valueWithUnits:null});for(const s of a){let r=null;if(i.plugins.has("ImageCustomResizeUI")&&S(s)){const l=i.plugins.get("ImageCustomResizeUI");r={type:"button",model:new se({label:this._getOptionLabelValue(s),role:"menuitemradio",withText:!0,icon:null,onClick:()=>{l._showForm(this._resizeUnit)}})};const c=Object.values(a).map(m=>m.valueWithUnits);r.model.bind("isOn").to(t,"value",t,"isEnabled",ki(c))}else r={type:"button",model:new se({commandName:"resizeImage",commandValue:s.valueWithUnits,label:this._getOptionLabelValue(s),role:"menuitemradio",withText:!0,icon:null})},r.model.bind("isOn").to(t,"value",t,"isEnabled",q(s.valueWithUnits));r.model.bind("isEnabled").to(t,"isEnabled"),n.add(r)}return n}}function S(o){return o.value==="custom"}function q(o){return(e,t)=>{const i=e;return i===void 0||!t?!1:o===null&&i===o?!0:i!==null&&i.width===o}}function ki(o){return(e,t)=>!o.some(i=>q(i)(e,t))}const Si="figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img",M="image_resized";class Ui extends f{static get requires(){return[L,I]}static get pluginName(){return"ImageResizeHandles"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils");t.addObserver(ie),this.listenTo(t.document,"imageLoaded",(n,a)=>{if(!a.target.matches(Si))return;const s=e.editing.view.domConverter,r=s.domToView(a.target),l=i.getImageWidgetFromImageView(r);let c=this.editor.plugins.get(L).getResizerByViewElement(l);if(c){c.redraw();return}const m=e.editing.mapper,u=m.toModelElement(l);c=e.plugins.get(L).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:u,viewElement:l,editor:e,getHandleHost(g){return g.querySelector("img")},getResizeHost(){return s.mapViewToDom(m.toViewElement(u))},isCentered(){return u.getAttribute("imageStyle")=="alignCenter"},onCommit(g){t.change(d=>{d.removeClass(M,l)}),e.execute("resizeImage",{width:g})}}),c.on("updateSize",()=>{l.hasClass(M)||t.change(d=>{d.addClass(M,l)});const g=u.name==="imageInline"?r:l;g.getStyle("height")&&t.change(d=>{d.removeStyle("height",g)})}),c.bind("isEnabled").to(this)})}}function $e(o){if(!o)return null;const[,e,t]=o.trim().match(/([.,\d]+)(%|px)$/)||[],i=Number.parseFloat(e);return Number.isNaN(i)?null:{value:i,unit:t}}function He(o,e,t){return t==="px"?{value:e.value,unit:"px"}:{value:e.value/o*100,unit:"%"}}function Ge(o){const{editing:e}=o,i=o.plugins.get("ImageUtils").getClosestSelectedImageElement(o.model.document.selection);if(!i)return null;const n=e.mapper.toViewElement(i),a=e.view.domConverter.mapViewToDom(n);return{model:i,view:n,dom:a}}function Vi(o,e){const t=Ge(o);if(!t)return null;const i=$e(t.model.getAttribute("resizedWidth")||null);if(!i)return null;if(i.unit===e)return i;const n=pe(t.dom),a={value:new lt(t.dom).width};return He(n,a,e)}class Bi extends O{focusTracker;keystrokes;unit;backButtonView;saveButtonView;labeledInput;children;_focusables;_focusCycler;_validators;constructor(e,t,i){super(e),this.focusTracker=new J,this.keystrokes=new P,this.unit=t,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.labeledInput=this._createLabeledInputView(),this.children=this.createCollection([this._createHeaderView()]),this.children.add(new ve(e,{children:[this.labeledInput,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding"]})),this._focusables=new X,this._validators=i,this.keystrokes.set("Esc",(n,a)=>{this.fire("cancel"),a()}),this._focusCycler=new Y({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-image-custom-resize-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),N({view:this}),[this.backButtonView,this.labeledInput,this.saveButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createBackButton(){const e=this.locale.t,t=new b(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:Ve,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createSaveButton(){const e=this.locale.t,t=new b(this.locale);return t.set({label:e("Save"),withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),t}_createHeaderView(){const e=this.locale.t,t=new Ce(this.locale,{label:e("Image Resize")});return t.children.add(this.backButtonView,0),t}_createLabeledInputView(){const e=this.locale.t,t=new Q(this.locale,Et);return t.label=e("Resize image (in %0)",this.unit),t.class="ck-labeled-field-view_full-width",t.fieldView.set({step:.1}),t}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.labeledInput.errorText=t,!1}return!0}resetFormStatus(){this.labeledInput.errorText=null}get rawSize(){const{element:e}=this.labeledInput.fieldView;return e?e.value:null}get parsedSize(){const{rawSize:e}=this;if(e===null)return null;const t=Number.parseFloat(e);return Number.isNaN(t)?null:t}get sizeWithUnits(){const{parsedSize:e,unit:t}=this;return e===null?null:`${e}${t}`}}function Ai(o,e){const t=Ge(o);if(!t)return null;const i=pe(t.dom),n=$e(window.getComputedStyle(t.dom).minWidth)||{value:1},a=Math.max(.1,He(i,n,e).value);return{unit:e,lower:a,upper:e==="px"?i:100}}class Ti extends f{_balloon;_form;static get requires(){return[be]}static get pluginName(){return"ImageCustomResizeUI"}static get isOfficialPlugin(){return!0}destroy(){super.destroy(),this._form&&this._form.destroy()}_createForm(e){const t=this.editor;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(we(Bi))(t.locale,e,xi(t)),this._form.render(),this.listenTo(this._form,"submit",()=>{this._form.isValid()&&(t.execute("resizeImage",{width:this._form.sizeWithUnits}),this._hideForm(!0))}),this.listenTo(this._form.labeledInput,"change:errorText",()=>{t.ui.update()}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),_e({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(e){if(this._isVisible)return;this._form||this._createForm(e);const t=this.editor,i=this._form.labeledInput;this._form.disableCssTransitions(),this._form.resetFormStatus(),this._isInBalloon||this._balloon.add({view:this._form,position:te(t)});const n=Vi(t,e),a=n?n.value.toFixed(1):"",s=Ai(t,e);i.fieldView.value=i.fieldView.element.value=a,s&&Object.assign(i.fieldView,{min:s.lower.toFixed(1),max:Math.ceil(s.upper).toFixed(1)}),this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}function xi(o){const e=o.t;return[t=>{if(t.rawSize.trim()==="")return e("The value must not be empty.");if(t.parsedSize===null)return e("The value should be a plain number.")}]}class gn extends f{static get requires(){return[qe,Ui,Ti,Ei]}static get pluginName(){return"ImageResize"}static get isOfficialPlugin(){return!0}}class zi extends _{_defaultStyles;_styles;constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map(i=>{if(i.isDefault)for(const n of i.modelElements)this._defaultStyles[n]=i.name;return[i.name,i]}))}refresh(){const i=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!i,this.isEnabled?i.hasAttribute("imageStyle")?this.value=i.getAttribute("imageStyle"):this.value=this._defaultStyles[i.name]:this.value=!1}execute(e={}){const t=this.editor,i=t.model,n=t.plugins.get("ImageUtils");i.change(a=>{const s=e.value,{setImageSizes:r=!0}=e;let l=n.getClosestSelectedImageElement(i.document.selection);s&&this.shouldConvertImageType(s,l)&&(this.editor.execute(n.isBlockImage(l)?"imageTypeInline":"imageTypeBlock",{setImageSizes:r}),l=n.getClosestSelectedImageElement(i.document.selection)),!s||this._styles.get(s).isDefault?a.removeAttribute("imageStyle",l):a.setAttribute("imageStyle",s,l),r&&n.setImageNaturalSizeAttributes(l)})}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const B={get inline(){return{name:"inline",title:"In line",icon:Ee,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:ke,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:Ue,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:j,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:W,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:Se,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:j,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:W,modelElements:["imageBlock"],className:"image-style-side"}}},Ri={full:Pt,left:Ue,right:Se,center:j,inlineLeft:ke,inlineRight:W,inline:Ee},Pi=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function Oi(o){return(o.configuredStyles.options||[]).map(i=>Li(i)).filter(i=>Di(i,o))}function Ni(o,e){return o&&e?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:o?{options:["block","side"]}:e?{options:["inline","alignLeft","alignRight"]}:{}}function Fi(o){return o.has("ImageBlockEditing")&&o.has("ImageInlineEditing")?[...Pi]:[]}function Li(o){return typeof o=="string"?B[o]?o={...B[o]}:o={name:o}:o=Mi(B[o.name],o),typeof o.icon=="string"&&(o.icon=Ri[o.icon]||o.icon),o}function Di(o,{isBlockPluginLoaded:e,isInlinePluginLoaded:t}){const{modelElements:i,name:n}=o;if(!i||!i.length||!n)return Ke({style:o}),!1;{const a=[e?"imageBlock":null,t?"imageInline":null];if(!i.some(s=>a.includes(s)))return w("image-style-missing-dependency",{style:o,missingPlugins:i.map(s=>s==="imageBlock"?"ImageBlockEditing":"ImageInlineEditing")}),!1}return!0}function Mi(o,e){const t={...e};for(const i in o)Object.prototype.hasOwnProperty.call(e,i)||(t[i]=o[i]);return t}function Ke(o){w("image-style-configuration-definition-invalid",o)}const R={normalizeStyles:Oi,getDefaultStylesConfiguration:Ni,getDefaultDropdownDefinitions:Fi,warnInvalidStyle:Ke};function Wi(o){return(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=$(t.attributeNewValue,o),a=$(t.attributeOldValue,o),s=i.mapper.toViewElement(t.item),r=i.writer;a&&r.removeClass(a.className,s),n&&r.addClass(n.className,s)}}function ji(o){const e={imageInline:o.filter(t=>!t.isDefault&&t.modelElements.includes("imageInline")),imageBlock:o.filter(t=>!t.isDefault&&t.modelElements.includes("imageBlock"))};return(t,i,n)=>{if(!i.modelRange)return;const a=i.viewItem,s=K(i.modelRange.getItems());if(s&&n.schema.checkAttribute(s,"imageStyle")){for(const r of e[s.name])n.consumable.consume(a,{classes:r.className})&&n.writer.setAttribute("imageStyle",r.name,s);qi(n,a,s,o)}}}function qi(o,e,t,i){if(!o.consumable.test(e,{styles:["float"]}))return;let n=null;switch(e.getStyle("float")){case"left":n="alignLeft";break;case"right":n="alignRight";break}if(!n)return;const a=$(n,i);if(!a)return;const s=B[a.name];Ot(a,s)&&(o.writer.setAttribute("imageStyle",n,t),o.consumable.consume(e,{styles:["float"]}))}function $(o,e){for(const t of e)if(t.name===o)return t}class Je extends f{static get pluginName(){return"ImageStyleEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[I]}normalizedStyles;init(){const e=this.editor,t=e.plugins.has("ImageBlockEditing"),i=e.plugins.has("ImageInlineEditing");e.config.define("image.styles",R.getDefaultStylesConfiguration(t,i)),this.normalizedStyles=R.normalizeStyles({configuredStyles:e.config.get("image.styles"),isBlockPluginLoaded:t,isInlinePluginLoaded:i}),this._setupConversion(t,i),this._setupPostFixer(),e.commands.add("imageStyle",new zi(e,this.normalizedStyles))}_setupConversion(e,t){const i=this.editor,n=i.model.schema,a=Wi(this.normalizedStyles),s=ji(this.normalizedStyles);i.editing.downcastDispatcher.on("attribute:imageStyle",a),i.data.downcastDispatcher.on("attribute:imageStyle",a),e&&(n.extend("imageBlock",{allowAttributes:"imageStyle"}),n.setAttributeProperties("imageStyle",{isFormatting:!0}),i.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),t&&(n.extend("imageInline",{allowAttributes:"imageStyle"}),n.setAttributeProperties("imageStyle",{isFormatting:!0}),i.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,i=e.plugins.get(I),n=new Map(this.normalizedStyles.map(a=>[a.name,a]));t.registerPostFixer(a=>{let s=!1;for(const r of t.differ.getChanges())if(r.type=="insert"||r.type=="attribute"&&r.attributeKey=="imageStyle"){let l=r.type=="insert"?r.position.nodeAfter:r.range.start.nodeAfter;if(l&&l.is("element","paragraph")&&l.childCount>0&&(l=l.getChild(0)),!i.isImage(l))continue;const c=l.getAttribute("imageStyle");if(!c)continue;const m=n.get(c);(!m||!m.modelElements.includes(l.name))&&(a.removeAttribute("imageStyle",l),s=!0)}return s})}}class $i extends f{static get requires(){return[Je]}static get pluginName(){return"ImageStyleUI"}static get isOfficialPlugin(){return!0}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],i=e.get("ImageStyleEditing"),n=ue(i.normalizedStyles,this.localizedDefaultStylesTitles);for(const s of n)this._createButton(s);const a=ue([...t.filter(Be),...R.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const s of a)this._createDropdown(s,n)}_createDropdown(e,t){const i=this.editor.ui.componentFactory;i.add(e.name,n=>{let a;const{defaultItem:s,items:r,title:l}=e,c=r.filter(d=>t.find(({name:h})=>ge(h)===d)).map(d=>{const h=i.create(d);return d===s&&(a=h),h});r.length!==c.length&&R.warnInvalidStyle({dropdown:e});const m=Z(n,Ie),u=m.buttonView,g=u.arrowView;return bt(m,c,{enableActiveItemFocusOnDropdownOpen:!0}),u.set({label:de(l,a.label),class:null,tooltip:!0}),g.unbind("label"),g.set({label:l}),u.bind("icon").toMany(c,"isOn",(...d)=>{const h=d.findIndex(k);return h<0?a.icon:c[h].icon}),u.bind("label").toMany(c,"isOn",(...d)=>{const h=d.findIndex(k);return de(l,h<0?a.label:c[h].label)}),u.bind("isOn").toMany(c,"isOn",(...d)=>d.some(k)),u.bind("class").toMany(c,"isOn",(...d)=>d.some(k)?"ck-splitbutton_flatten":void 0),u.on("execute",()=>{c.some(({isOn:d})=>d)?m.isOpen=!m.isOpen:a.fire("execute")}),m.bind("isEnabled").toMany(c,"isEnabled",(...d)=>d.some(k)),this.listenTo(m,"execute",()=>{this.editor.editing.view.focus()}),m})}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(ge(t),i=>{const n=this.editor.commands.get("imageStyle"),a=new b(i);return a.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),a.bind("isEnabled").to(n,"isEnabled"),a.bind("isOn").to(n,"value",s=>s===t),a.on("execute",this._executeCommand.bind(this,t)),a})}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function ue(o,e){for(const t of o)e[t.title]&&(t.title=e[t.title]);return o}function ge(o){return`imageStyle:${o}`}function de(o,e){return(o?o+": ":"")+e}class dn extends f{static get requires(){return[Je,$i]}static get pluginName(){return"ImageStyle"}static get isOfficialPlugin(){return!0}}class hn extends f{static get requires(){return[ne,I]}static get pluginName(){return"ImageToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(ne),n=e.plugins.get("ImageUtils");i.register("image",{ariaLabel:t("Image toolbar"),items:Hi(e.config.get("image.toolbar")||[]),getRelatedElement:a=>n.getClosestSelectedImageWidget(a)})}}function Hi(o){return o.map(e=>Be(e)?e.name:e)}export{rn as AutoImage,ln as ImageBlock,Fe as ImageBlockEditing,mn as ImageCaption,ei as ImageCaptionEditing,ti as ImageCaptionUI,Le as ImageCaptionUtils,Ti as ImageCustomResizeUI,Re as ImageEditing,cn as ImageInline,Yt as ImageInlineEditing,un as ImageInsert,U as ImageInsertUI,vi as ImageInsertViaUrl,yi as ImageInsertViaUrlUI,ie as ImageLoadObserver,Ne as ImagePlaceholder,gn as ImageResize,Ei as ImageResizeButtons,qe as ImageResizeEditing,Ui as ImageResizeHandles,Pe as ImageSizeAttributes,dn as ImageStyle,zi as ImageStyleCommand,Je as ImageStyleEditing,$i as ImageStyleUI,xe as ImageTextAlternative,jt as ImageTextAlternativeCommand,qt as ImageTextAlternativeEditing,Gt as ImageTextAlternativeUI,hn as ImageToolbar,Oe as ImageTypeCommand,wi as ImageUpload,pi as ImageUploadEditing,ri as ImageUploadProgress,ai as ImageUploadUI,I as ImageUtils,Jt as InsertImageCommand,Zt as ReplaceImageSourceCommand,Ci as ResizeImageCommand,Qt as ToggleImageCaptionCommand,fi as UploadImageCommand,Pi as _IMAGE_DEFAULT_DROPDOWN_DEFINITIONS,Ri as _IMAGE_DEFAULT_ICONS,B as _IMAGE_DEFAULT_OPTIONS,Bi as _ImageCustomResizeFormView,Xt as _ImageInsertFormView,_i as _ImageInsertUrlView,R as _ImageStyleUtils,$t as _ImageTextAlternativeFormView,x as _checkIfImageWidthAndHeightStylesAreBothSet,re as _createBlockImageViewElement,Nt as _createInlineImageViewElement,ee as _determineImageTypeForInsertionAtSelection,z as _downcastImageAttribute,ze as _downcastImageSrcsetAttribute,ii as _fetchLocalImage,te as _getImageBalloonPositionData,T as _getImageSizeValueIfInPx,Ae as _getImageViewElementMatcher,Ge as _getSelectedImageEditorNodes,Ai as _getSelectedImagePossibleResizeRange,Vi as _getSelectedImageWidthInUnits,ni as _isLocalImage,Wi as _modelToViewImageStyleAttribute,Ht as _repositionImageContextualBalloon,He as _tryCastImageDimensionsToUnit,$e as _tryParseImageDimensionWithUnit,Kt as _upcastImageFigure,ji as _viewToModelImageStyleAttribute,De as createImageTypeRegExp,Ii as isHtmlInDataTransfer};
|
|
1
|
+
import{Plugin as f,Command as _}from"../../../../../@ckeditor_ckeditor5-core@47.6.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Clipboard as Xe,ClipboardPipeline as H}from"../../../../../@ckeditor_ckeditor5-clipboard@47.6.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{ModelLivePosition as F,ModelLiveRange as Ye,UpcastWriter as G,enableViewPlaceholder as Qe,ModelElement as et,Observer as tt}from"../../../../../@ckeditor_ckeditor5-engine@47.6.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Undo as it}from"../../../../../@ckeditor_ckeditor5-undo@47.6.0/node_modules/@ckeditor/ckeditor5-undo/dist/index.js";import{Delete as nt}from"../../../../../@ckeditor_ckeditor5-typing@47.6.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{global as A,DomEmitterMixin as st,logWarning as w,CKEditorError as ot,Collection as at,env as rt,first as K,FocusTracker as J,KeystrokeHandler as P,Rect as lt,toArray as he}from"../../../../../@ckeditor_ckeditor5-utils@47.6.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{Widget as fe,WidgetToolbarRepository as ne,toWidget as ct,isWidget as mt,toWidgetEditable as ut,WidgetResize as L,calculateResizeHostAncestorWidth as pe,findOptimalInsertionRange as gt}from"../../../../../@ckeditor_ckeditor5-widget@47.6.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{SplitButtonView as Ie,createDropdown as Z,MenuBarMenuView as dt,MenuBarMenuListView as ht,MenuBarMenuListItemView as ft,ButtonView as b,Dialog as pt,MenuBarMenuListItemButtonView as It,ContextualBalloon as be,CssTransitionDisablerMixin as we,clickOutsideHandler as _e,UIModel as se,addToolbarToDropdown as bt,Notification as oe,FileDialogButtonView as ae,MenuBarMenuListItemFileDialogButtonView as wt,View as O,ViewCollection as X,FocusCycler as Y,CollapsibleView as _t,submitHandler as N,LabeledFieldView as Q,createLabeledInputText as ye,BalloonPanelView as yt,DropdownButtonView as vt,addListToDropdown as Ct,FormRowView as ve,FormHeaderView as Ce,createLabeledInputNumber as Et}from"../../../../../@ckeditor_ckeditor5-ui@47.6.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{IconImage as kt,IconCaption as St,IconImageUrl as Ut,IconTextAlternative as Vt,IconImageUpload as Bt,IconObjectSizeFull as At,IconObjectSizeCustom as Tt,IconObjectSizeLarge as xt,IconObjectSizeMedium as zt,IconObjectSizeSmall as Rt,IconObjectInlineRight as W,IconObjectCenter as j,IconObjectRight as Ee,IconObjectLeft as ke,IconObjectInlineLeft as Se,IconObjectInline as Ue,IconObjectFullWidth as Pt,IconPreviousArrow as Ve}from"../../../../../@ckeditor_ckeditor5-icons@47.6.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{FileRepository as C}from"../../../../../@ckeditor_ckeditor5-upload@47.6.0/node_modules/@ckeditor/ckeditor5-upload/dist/index.js";import Ot from"../../../../../../../_virtual/isEqual.js";import{isObject as Be}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isObject.js";import{identity as k}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/identity.js";function Nt(o){return o.createContainerElement("span",{class:"image-inline"},o.createEmptyElement("img"))}function re(o){return o.createContainerElement("figure",{class:"image"},[o.createEmptyElement("img"),o.createSlot("children")])}function Ae(o,e){const t=o.plugins.get("ImageUtils"),i=o.plugins.has("ImageInlineEditing")&&o.plugins.has("ImageBlockEditing");return a=>t.isInlineImageView(a)?i&&(a.getStyle("display")=="block"||a.findAncestor(t.isBlockImageView)?"imageBlock":"imageInline")!==e?null:n(a):null;function n(a){const s={name:!0};return a.hasAttribute("src")&&(s.attributes=["src"]),s}}function ee(o,e){const t=K(e.getSelectedBlocks());return!t||o.isObject(t)||t.isEmpty&&t.name!="listItem"?"imageBlock":"imageInline"}function T(o){return o&&o.endsWith("px")?parseInt(o):null}function x(o){const e=T(o.getStyle("width")),t=T(o.getStyle("height"));return!!(e&&t)}const Ft=/^(image|image-inline)$/;class I extends f{_domEmitter=new(st());static get pluginName(){return"ImageUtils"}static get isOfficialPlugin(){return!0}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,i=null,n={}){const a=this.editor,s=a.model,r=s.document.selection,l=Te(a,t||r,i);e={...Object.fromEntries(r.getAttributes()),...e};for(const c in e)s.schema.checkAttribute(l,c)||delete e[c];return s.change(c=>{const{setImageSizes:m=!0}=n,u=c.createElement(l,e);return s.insertObject(u,t,null,{setSelection:"on",findOptimalPosition:!t&&l!="imageInline"?"auto":void 0}),u.parent?(m&&this.setImageNaturalSizeAttributes(u),u):null})}setImageNaturalSizeAttributes(e){const t=e.getAttribute("src");t&&(e.getAttribute("width")||e.getAttribute("height")||this.editor.model.change(i=>{const n=new A.window.Image;this._domEmitter.listenTo(n,"load",()=>{!e.getAttribute("width")&&!e.getAttribute("height")&&this.editor.model.enqueueChange(i.batch,a=>{a.setAttribute("width",n.naturalWidth,e),a.setAttribute("height",n.naturalHeight,e)}),this._domEmitter.stopListening(n,"load")}),n.src=t}))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const i=e.getSelectedElement();if(i&&this.isImageWidget(i))return i;let n=t.parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(e){return e.findAncestor({classes:Ft})}isImageAllowed(){const t=this.editor.model.document.selection;return Lt(this.editor,t)&&Dt(t)}toImageWidget(e,t,i){return t.setCustomProperty("image",!0,e),ct(e,t,{label:()=>{const s=this.findViewImgElement(e).getAttribute("alt");return s?`${s} ${i}`:i}})}isImageWidget(e){return!!e.getCustomProperty("image")&&mt(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:i}of t.createRangeIn(e))if(this.isInlineImageView(i))return i}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function Lt(o,e){if(Te(o,e,null)=="imageBlock"){const i=Mt(e,o.model);if(o.model.schema.checkChild(i,"imageBlock"))return!0}else if(o.model.schema.checkChild(e.focus,"imageInline"))return!0;return!1}function Dt(o){return[...o.focus.getAncestors()].every(e=>!e.is("element","imageBlock"))}function Mt(o,e){const i=gt(o,e).start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}function Te(o,e,t){const i=o.model.schema,n=o.config.get("image.insert.type");return o.plugins.has("ImageBlockEditing")?o.plugins.has("ImageInlineEditing")?t||(n==="inline"?"imageInline":n!=="auto"?"imageBlock":e.is("selection")?ee(i,e):i.checkChild(e,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}const Wt=new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));class rn extends f{static get requires(){return[Xe,I,it,nt]}static get pluginName(){return"AutoImage"}static get isOfficialPlugin(){return!0}_timeoutId;_positionToInsert;constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",()=>{const n=t.selection.getFirstRange(),a=F.fromPosition(n.start);a.stickiness="toPrevious";const s=F.fromPosition(n.end);s.stickiness="toNext",t.once("change:data",()=>{this._embedImageBetweenPositions(a,s),a.detach(),s.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(A.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedImageBetweenPositions(e,t){const i=this.editor,n=new Ye(e,t),a=n.getWalker({ignoreElementEnd:!0}),s=Object.fromEntries(i.model.document.selection.getAttributes()),r=this.editor.plugins.get("ImageUtils");let l="";for(const c of a)c.item.is("$textProxy")&&(l+=c.item.data);if(l=l.trim(),!l.match(Wt)){n.detach();return}this._positionToInsert=F.fromPosition(e),this._timeoutId=setTimeout(()=>{if(!i.commands.get("insertImage").isEnabled){n.detach();return}i.model.change(u=>{this._timeoutId=null,u.remove(n),n.detach();let g;this._positionToInsert.root.rootName!=="$graveyard"&&(g=this._positionToInsert.toPosition()),r.insertImage({...s,src:l},g),this._positionToInsert.detach(),this._positionToInsert=null}),i.plugins.get("Delete").requestUndoOnBackspace()},100)}}class jt extends _{refresh(){const i=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!i,this.isEnabled&&i.hasAttribute("alt")?this.value=i.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,i=t.plugins.get("ImageUtils"),n=t.model,a=i.getClosestSelectedImageElement(n.document.selection);n.change(s=>{s.setAttribute("alt",e.newValue,a)})}}class qt extends f{static get requires(){return[I]}static get pluginName(){return"ImageTextAlternativeEditing"}static get isOfficialPlugin(){return!0}init(){this.editor.commands.add("imageTextAlternative",new jt(this.editor))}}class $t extends O{focusTracker;keystrokes;labeledInput;backButtonView;saveButtonView;children;_focusables;_focusCycler;constructor(e){super(e),this.focusTracker=new J,this.keystrokes=new P,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.labeledInput=this._createLabeledInputView(),this.children=this.createCollection([this._createHeaderView()]),this.children.add(new ve(e,{children:[this.labeledInput,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding"]})),this._focusables=new X,this.keystrokes.set("Esc",(t,i)=>{this.fire("cancel"),i()}),this._focusCycler=new Y({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),N({view:this}),[this.backButtonView,this.labeledInput,this.saveButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createBackButton(){const e=this.locale.t,t=new b(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:Ve,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createSaveButton(){const e=this.locale.t,t=new b(this.locale);return t.set({label:e("Save"),withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),t}_createHeaderView(){const e=this.locale.t,t=new Ce(this.locale,{label:e("Text Alternative")});return t.children.add(this.backButtonView,0),t}_createLabeledInputView(){const e=this.locale.t,t=new Q(this.locale,ye);return t.label=e("Text alternative"),t.class="ck-labeled-field-view_full-width",t}}function Ht(o){const e=o.plugins.get("ContextualBalloon");if(o.plugins.get("ImageUtils").getClosestSelectedImageWidget(o.editing.view.document.selection)){const i=te(o);e.updatePosition(i)}}function te(o){const e=o.editing.view,t=yt.defaultPositions,i=o.plugins.get("ImageUtils");return{target:e.domConverter.mapViewToDom(i.getClosestSelectedImageWidget(e.document.selection)),positions:[t.northArrowSouth,t.northArrowSouthWest,t.northArrowSouthEast,t.southArrowNorth,t.southArrowNorthWest,t.southArrowNorthEast,t.viewportStickyNorth]}}class Gt extends f{_balloon;_form;static get requires(){return[be]}static get pluginName(){return"ImageTextAlternativeUI"}static get isOfficialPlugin(){return!0}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",i=>{const n=e.commands.get("imageTextAlternative"),a=new b(i);return a.set({label:t("Change image text alternative"),icon:Vt,tooltip:!0}),a.bind("isEnabled").to(n,"isEnabled"),a.bind("isOn").to(n,"value",s=>!!s),this.listenTo(a,"execute",()=>{this._showForm()}),a})}_createForm(){const e=this.editor,i=e.editing.view.document,n=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(we($t))(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this.listenTo(e.ui,"update",()=>{n.getClosestSelectedImageWidget(i.selection)?this._isVisible&&Ht(e):this._hideForm(!0)}),_e({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),i=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:te(e)}),i.fieldView.value=i.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class xe extends f{static get requires(){return[qt,Gt]}static get pluginName(){return"ImageTextAlternative"}static get isOfficialPlugin(){return!0}}function Kt(o){const e=(t,i,n)=>{if(!n.consumable.test(i.viewItem,{name:!0,classes:"image"}))return;const a=o.findViewImgElement(i.viewItem);if(!a||!n.consumable.test(a,{name:!0}))return;n.consumable.consume(i.viewItem,{name:!0,classes:"image"});const s=n.convertItem(a,i.modelCursor),r=K(s.modelRange.getItems());if(!r){n.consumable.revert(i.viewItem,{name:!0,classes:"image"});return}n.convertChildren(i.viewItem,r),n.updateConversionResult(r,i)};return t=>{t.on("element:figure",e)}}function ze(o,e){const t=(i,n,a)=>{if(!a.consumable.consume(n.item,i.name))return;const s=a.writer,r=a.mapper.toViewElement(n.item),l=o.findViewImgElement(r);n.attributeNewValue===null?(s.removeAttribute("srcset",l),s.removeAttribute("sizes",l)):n.attributeNewValue&&(s.setAttribute("srcset",n.attributeNewValue,l),s.setAttribute("sizes","100vw",l))};return i=>{i.on(`attribute:srcset:${e}`,t)}}function z(o,e,t){const i=(n,a,s)=>{if(!s.consumable.consume(a.item,n.name))return;const r=s.writer,l=s.mapper.toViewElement(a.item),c=o.findViewImgElement(l);r.setAttribute(a.attributeKey,a.attributeNewValue||"",c)};return n=>{n.on(`attribute:${t}:${e}`,i)}}class ie extends tt{observe(e){this.listenTo(e,"load",(t,i)=>{const n=i.target;this.checkShouldIgnoreEventFromTarget(n)||n.tagName=="IMG"&&this._fireEvents(i)},{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class Jt extends _{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||t==="block"&&w("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||t==="inline"&&w("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=he(e.source),i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),a=Object.fromEntries(i.getAttributes());t.forEach((s,r)=>{const l=i.getSelectedElement();if(typeof s=="string"&&(s={src:s}),r&&l&&n.isImage(l)){const c=this.editor.model.createPositionAfter(l);n.insertImage({...s,...a},c,e.imageType)}else e.breakBlock?n.insertImage({...s,...a},i.getFirstPosition(),e.imageType):n.insertImage({...s,...a},null,e.imageType)})}}class Zt extends _{constructor(e){super(e),this.decorate("cleanupImage")}refresh(){const t=this.editor.plugins.get("ImageUtils"),i=this.editor.model.document.selection.getSelectedElement();this.isEnabled=t.isImage(i),this.value=this.isEnabled?i.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement(),i=this.editor.plugins.get("ImageUtils");this.editor.model.change(n=>{n.setAttribute("src",e.source,t),this.cleanupImage(n,t),i.setImageNaturalSizeAttributes(t)})}cleanupImage(e,t){e.removeAttribute("srcset",t),e.removeAttribute("sizes",t),e.removeAttribute("sources",t),e.removeAttribute("width",t),e.removeAttribute("height",t),e.removeAttribute("alt",t)}}class Re extends f{static get requires(){return[I]}static get pluginName(){return"ImageEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(ie),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const i=new Jt(e),n=new Zt(e);e.commands.add("insertImage",i),e.commands.add("replaceImageSource",n),e.commands.add("imageInsert",i)}}class Pe extends f{static get requires(){return[I]}static get pluginName(){return"ImageSizeAttributes"}static get isOfficialPlugin(){return!0}afterInit(){this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline")}_registerSchema(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["width","height"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["width","height"]})}_registerConverters(e){const t=this.editor,i=t.plugins.get("ImageUtils"),n=e==="imageBlock"?"figure":"img";t.conversion.for("upcast").attributeToAttribute({view:{name:n,styles:{width:/.+/}},model:{key:"width",value:s=>x(s)?T(s.getStyle("width")):null}}).attributeToAttribute({view:{name:n,key:"width"},model:"width"}).attributeToAttribute({view:{name:n,styles:{height:/.+/}},model:{key:"height",value:s=>x(s)?T(s.getStyle("height")):null}}).attributeToAttribute({view:{name:n,key:"height"},model:"height"}),t.conversion.for("editingDowncast").add(s=>{a(s,"width","width",!0,!0),a(s,"height","height",!0,!0)}),t.conversion.for("dataDowncast").add(s=>{a(s,"width","width",!1),a(s,"height","height",!1)}),t.conversion.for("upcast").add(s=>{s.on("element:img",(r,l,c)=>{const m=l.viewItem.getAttribute("width"),u=l.viewItem.getAttribute("height");m&&u&&c.consumable.consume(l.viewItem,{styles:["aspect-ratio"]})})});function a(s,r,l,c,m=!1){s.on(`attribute:${r}:${e}`,(u,g,d)=>{if(!d.consumable.consume(g.item,u.name))return;const h=d.writer,p=d.mapper.toViewElement(g.item),v=i.findViewImgElement(p);g.attributeNewValue!==null?h.setAttribute(l,g.attributeNewValue,v):h.removeAttribute(l,v);const y=g.item.getAttribute("width"),E=g.item.getAttribute("height"),V=y&&E;if(V&&m&&h.setAttribute("loading","lazy",v),g.item.hasAttribute("sources"))return;const Ze=g.item.hasAttribute("resizedWidth");e==="imageInline"&&!Ze&&!c||V&&h.setStyle("aspect-ratio",`${y}/${E}`,v)})}}}class Oe extends _{_modelElementName;constructor(e,t){super(e),this._modelElementName=t}refresh(){const t=this.editor.plugins.get("ImageUtils"),i=t.getClosestSelectedImageElement(this.editor.model.document.selection);this._modelElementName==="imageBlock"?this.isEnabled=t.isInlineImage(i):this.isEnabled=t.isBlockImage(i)}execute(e={}){const t=this.editor,i=this.editor.model,n=t.plugins.get("ImageUtils"),a=n.getClosestSelectedImageElement(i.document.selection),s=Object.fromEntries(a.getAttributes());return!s.src&&!s.uploadId?null:i.change(r=>{const{setImageSizes:l=!0}=e,c=Array.from(i.markers).filter(g=>g.getRange().containsItem(a)),m=n.insertImage(s,i.createSelection(a,"on"),this._modelElementName,{setImageSizes:l});if(!m)return null;const u=r.createRangeOn(m);for(const g of c){const d=g.getRange(),h=d.root.rootName!="$graveyard"?d.getJoined(u,!0):u;r.updateMarker(g,{range:h})}return{oldElement:a,newElement:m}})}}class Ne extends f{static get requires(){return[I]}static get pluginName(){return"ImagePlaceholder"}static get isOfficialPlugin(){return!0}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const e=this.editor.model.schema;e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["placeholder"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const e=this.editor,t=e.conversion,i=e.plugins.get("ImageUtils");t.for("editingDowncast").add(n=>{n.on("attribute:placeholder",(a,s,r)=>{if(!r.consumable.test(s.item,a.name)||!s.item.is("element","imageBlock")&&!s.item.is("element","imageInline"))return;r.consumable.consume(s.item,a.name);const l=r.writer,c=r.mapper.toViewElement(s.item),m=i.findViewImgElement(c);s.attributeNewValue?(l.addClass("image_placeholder",m),l.setStyle("background-image",`url(${s.attributeNewValue})`,m),l.setCustomProperty("editingPipeline:doNotReuseOnce",!0,m)):(l.removeClass("image_placeholder",m),l.removeStyle("background-image",m))})})}_setupLoadListener(){const e=this.editor,t=e.model,i=e.editing,n=i.view,a=e.plugins.get("ImageUtils");n.addObserver(ie),this.listenTo(n.document,"imageLoaded",(s,r)=>{const l=n.domConverter.mapDomToView(r.target);if(!l)return;const c=a.getImageWidgetFromImageView(l);if(!c)return;const m=i.mapper.toModelElement(c);!m||!m.hasAttribute("placeholder")||t.enqueueChange({isUndoable:!1},u=>{u.removeAttribute("placeholder",m)})})}}class Fe extends f{static get requires(){return[Re,Pe,I,Ne,H]}static get pluginName(){return"ImageBlockEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new Oe(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,n=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToStructure({model:"imageBlock",view:(a,{writer:s})=>re(s)}),i.for("editingDowncast").elementToStructure({model:"imageBlock",view:(a,{writer:s})=>n.toImageWidget(re(s),s,t("image widget"))}),i.for("downcast").add(z(n,"imageBlock","src")).add(z(n,"imageBlock","alt")).add(ze(n,"imageBlock")),i.for("upcast").elementToElement({view:Ae(e,"imageBlock"),model:(a,{writer:s})=>s.createElement("imageBlock",a.hasAttribute("src")?{src:a.getAttribute("src")}:void 0)}).add(Kt(n))}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,n=e.plugins.get("ImageUtils"),a=e.plugins.get("ClipboardPipeline");this.listenTo(a,"inputTransformation",(s,r)=>{const l=Array.from(r.content.getChildren());let c;if(!l.every(n.isInlineImageView))return;r.targetRanges?c=e.editing.mapper.toModelRange(r.targetRanges[0]):c=t.document.selection.getFirstRange();const m=t.createSelection(c);if(ee(t.schema,m)==="imageBlock"){const u=new G(i.document),g=l.map(d=>u.createElement("figure",{class:"image"},d));r.content=u.createDocumentFragment(g)}}),this.listenTo(a,"contentInsertion",(s,r)=>{r.method==="paste"&&t.change(l=>{const c=l.createRangeIn(r.content);for(const m of c.getItems())m.is("element","imageBlock")&&n.setImageNaturalSizeAttributes(m)})})}}class Xt extends O{focusTracker;keystrokes;_focusables;_focusCycler;children;constructor(e,t=[]){super(e),this.focusTracker=new J,this.keystrokes=new P,this._focusables=new X,this.children=this.createCollection(),this._focusCycler=new Y({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const i of t)this.children.add(i),this._focusables.add(i),i instanceof _t&&this._focusables.addMany(i.children);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),N({view:this});for(const t of this._focusables)this.focusTracker.add(t.element);this.keystrokes.listenTo(this.element);const e=t=>t.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}class U extends f{static get pluginName(){return"ImageInsertUI"}static get isOfficialPlugin(){return!0}static get requires(){return[I]}dropdownView;_integrations=new Map;constructor(e){super(e),e.config.define("image.insert.integrations",["upload","assetManager","url"])}init(){const e=this.editor,t=e.model.document.selection,i=e.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(e.model.document,"change",()=>{this.isImageSelected=i.isImage(t.getSelectedElement())});const n=s=>this._createToolbarComponent(s),a=s=>this._createMenuBarComponent(s);e.ui.componentFactory.add("insertImage",n),e.ui.componentFactory.add("imageInsert",n),e.ui.componentFactory.add("menuBar:insertImage",a)}registerIntegration({name:e,observable:t,buttonViewCreator:i,formViewCreator:n,menuBarButtonViewCreator:a,requiresForm:s=!1,override:r=!1}){this._integrations.has(e)&&!r&&w("image-insert-integration-exists",{name:e}),this._integrations.set(e,{observable:t,buttonViewCreator:i,menuBarButtonViewCreator:a,formViewCreator:n,requiresForm:s})}_createToolbarComponent(e){const t=this.editor,i=e.t,n=this._prepareIntegrations();if(!n.length)return null;let a;const s=n[0];if(n.length==1){if(!s.requiresForm)return s.buttonViewCreator(!0);a=s.buttonViewCreator(!0)}else{const c=s.buttonViewCreator(!1);a=new Ie(e,c),a.tooltip=!0,a.bind("label").to(this,"isImageSelected",m=>i(m?"Replace image":"Insert image"))}const r=this.dropdownView=Z(e,a),l=n.map(({observable:c})=>typeof c=="function"?c():c);return r.bind("isEnabled").toMany(l,"isEnabled",(...c)=>c.some(m=>m)),r.once("change:isOpen",()=>{const c=n.flatMap(({formViewCreator:u})=>u(n.length==1)),m=new Xt(t.locale,c);r.panelView.children.add(m)}),r}_createMenuBarComponent(e){const t=e.t,i=this._prepareIntegrations();if(!i.length)return null;const n=i.flatMap(({menuBarButtonViewCreator:r})=>r(i.length==1)),a=new dt(e),s=new ht(e);a.panelView.children.add(s),a.buttonView.set({icon:kt,label:t("Image")});for(const r of n){const l=new ft(e,a);l.children.add(r),s.items.add(l),r.delegate("execute").to(a)}return a}_prepareIntegrations(){const t=this.editor.config.get("image.insert.integrations"),i=[];if(!t.length)return w("image-insert-integrations-not-specified"),i;for(const n of t){if(!this._integrations.has(n)){["upload","assetManager","url"].includes(n)||w("image-insert-unknown-integration",{item:n});continue}i.push(this._integrations.get(n))}return i.length||w("image-insert-integrations-not-registered"),i}}class ln extends f{static get requires(){return[Fe,fe,xe,U]}static get pluginName(){return"ImageBlock"}static get isOfficialPlugin(){return!0}}class Yt extends f{static get requires(){return[Re,Pe,I,Ne,H]}static get pluginName(){return"ImageInlineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"],disallowIn:["caption"]}),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new Oe(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,n=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToElement({model:"imageInline",view:(a,{writer:s})=>s.createEmptyElement("img")}),i.for("editingDowncast").elementToStructure({model:"imageInline",view:(a,{writer:s})=>n.toImageWidget(Nt(s),s,t("image widget"))}),i.for("downcast").add(z(n,"imageInline","src")).add(z(n,"imageInline","alt")).add(ze(n,"imageInline")),i.for("upcast").elementToElement({view:Ae(e,"imageInline"),model:(a,{writer:s})=>s.createElement("imageInline",a.hasAttribute("src")?{src:a.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,n=e.plugins.get("ImageUtils"),a=e.plugins.get("ClipboardPipeline");this.listenTo(a,"inputTransformation",(s,r)=>{const l=Array.from(r.content.getChildren());let c;if(!l.every(n.isBlockImageView))return;r.targetRanges?c=e.editing.mapper.toModelRange(r.targetRanges[0]):c=t.document.selection.getFirstRange();const m=t.createSelection(c);if(ee(t.schema,m)==="imageInline"){const u=new G(i.document),g=l.map(d=>d.childCount===1?(Array.from(d.getAttributes()).forEach(h=>u.setAttribute(...h,n.findViewImgElement(d))),d.getChild(0)):d);r.content=u.createDocumentFragment(g)}}),this.listenTo(a,"contentInsertion",(s,r)=>{r.method==="paste"&&t.change(l=>{const c=l.createRangeIn(r.content);for(const m of c.getItems())m.is("element","imageInline")&&n.setImageNaturalSizeAttributes(m)})})}}class cn extends f{static get requires(){return[Yt,fe,xe,U]}static get pluginName(){return"ImageInline"}static get isOfficialPlugin(){return!0}}class Le extends f{static get pluginName(){return"ImageCaptionUtils"}static get isOfficialPlugin(){return!0}static get requires(){return[I]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),i=e.getFirstPosition().findAncestor("caption");return i&&t.isBlockImage(i.parent)?i:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return e.name=="figcaption"&&t.isBlockImageView(e.parent)?{name:!0}:null}}class Qt extends _{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),i=e.plugins.get("ImageUtils");if(!e.plugins.has(Fe)){this.isEnabled=!1,this.value=!1;return}const n=e.model.document.selection,a=n.getSelectedElement();if(!a){const s=t.getCaptionFromModelSelection(n);this.isEnabled=!!s,this.value=!!s;return}this.isEnabled=i.isImage(a),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(a):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change(i=>{this.value?this._hideImageCaption(i):this._showImageCaption(i,t)})}_showImageCaption(e,t){const n=this.editor.model.document.selection,a=this.editor.plugins.get("ImageCaptionEditing"),s=this.editor.plugins.get("ImageUtils");let r=n.getSelectedElement();const l=a._getSavedCaption(r);s.isInlineImage(r)&&(this.editor.execute("imageTypeBlock"),r=n.getSelectedElement());const c=l||e.createElement("caption");e.append(c,r),t&&e.setSelection(c,"in")}_hideImageCaption(e){const t=this.editor,i=t.model.document.selection,n=t.plugins.get("ImageCaptionEditing"),a=t.plugins.get("ImageCaptionUtils");let s=i.getSelectedElement(),r;s?r=a.getCaptionFromImageModelElement(s):(r=a.getCaptionFromModelSelection(i),s=r.parent),n._saveCaption(s,r),e.setSelection(s,"on"),e.remove(r)}}class ei extends f{static get requires(){return[I,Le]}static get pluginName(){return"ImageCaptionEditing"}static get isOfficialPlugin(){return!0}_savedCaptionsMap;constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new Qt(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),a=e.t;e.conversion.for("upcast").elementToElement({view:s=>n.matchImageCaptionViewElement(s),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(s,{writer:r})=>i.isBlockImage(s.parent)?r.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(s,{writer:r})=>{if(!i.isBlockImage(s.parent))return null;const l=r.createEditableElement("figcaption");r.setCustomProperty("imageCaption",!0,l),l.placeholder=a("Enter image caption"),Qe({view:t,element:l,keepOnFocus:!0});const c=s.parent.getAttribute("alt"),m=c?a("Caption for image: %0",[c]):a("Caption for the image");return ut(l,r,{label:m})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils"),n=e.commands.get("imageTypeInline"),a=e.commands.get("imageTypeBlock"),s=r=>{if(!r.return)return;const{oldElement:l,newElement:c}=r.return;if(!l)return;if(t.isBlockImage(l)){const u=i.getCaptionFromImageModelElement(l);if(u){this._saveCaption(c,u);return}}const m=this._getSavedCaption(l);m&&this._saveCaption(c,m)};n&&this.listenTo(n,"execute",s,{priority:"low"}),a&&this.listenTo(a,"execute",s,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?et.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,i=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",()=>{const a=t.document.differ.getChanges();for(const s of a){if(s.attributeKey!=="alt")continue;const r=s.range.start.nodeAfter;if(i.isBlockImage(r)){const l=n.getCaptionFromImageModelElement(r);if(!l)return;e.editing.reconvertItem(l)}}})}}class ti extends f{static get requires(){return[Le]}static get pluginName(){return"ImageCaptionUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageCaptionUtils"),n=e.t;e.ui.componentFactory.add("toggleImageCaption",a=>{const s=e.commands.get("toggleImageCaption"),r=new b(a);return r.set({icon:St,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(s,"value","isEnabled"),r.bind("label").to(s,"value",l=>n(l?"Toggle caption off":"Toggle caption on")),this.listenTo(r,"execute",()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const l=i.getCaptionFromModelSelection(e.model.document.selection);if(l){const c=e.editing.mapper.toViewElement(l);t.scrollToTheSelection(),t.change(m=>{m.addClass("image__caption_highlighted",c)})}e.editing.view.focus()}),r})}}class mn extends f{static get requires(){return[ei,ti]}static get pluginName(){return"ImageCaption"}static get isOfficialPlugin(){return!0}}function De(o){const e=o.map(t=>t.replace("+","\\+"));return new RegExp(`^image\\/(${e.join("|")})$`)}function ii(o){return new Promise((e,t)=>{const i=o.getAttribute("src");fetch(i).then(n=>n.blob()).then(n=>{const a=Me(n,i),r=`image.${a.replace("image/","")}`,l=new File([n],r,{type:a});e(l)}).catch(n=>n&&n.name==="TypeError"?si(i).then(e).catch(t):t(n))})}function ni(o,e){return!o.isInlineImageView(e)||!e.getAttribute("src")?!1:!!e.getAttribute("src").match(/^data:image\/\w+;base64,/g)||!!e.getAttribute("src").match(/^blob:/g)}function Me(o,e){return o.type?o.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}function si(o){return oi(o).then(e=>{const t=Me(e,o),n=`image.${t.replace("image/","")}`;return new File([e],n,{type:t})})}function oi(o){return new Promise((e,t)=>{const i=A.document.createElement("img");i.addEventListener("load",()=>{const n=A.document.createElement("canvas");n.width=i.width,n.height=i.height,n.getContext("2d").drawImage(i,0,0),n.toBlob(s=>s?e(s):t())}),i.addEventListener("error",()=>t()),i.src=o})}class ai extends f{static get pluginName(){return"ImageUploadUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("uploadImage",()=>this._createToolbarButton()),e.ui.componentFactory.add("imageUpload",()=>this._createToolbarButton()),e.ui.componentFactory.add("menuBar:uploadImage",()=>this._createMenuBarButton("standalone")),e.plugins.has("ImageInsertUI")&&e.plugins.get("ImageInsertUI").registerIntegration({name:"upload",observable:()=>e.commands.get("uploadImage"),buttonViewCreator:()=>this._createToolbarButton(),formViewCreator:()=>this._createDropdownButton(),menuBarButtonViewCreator:t=>this._createMenuBarButton(t?"insertOnly":"insertNested")})}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("uploadImage"),a=t.config.get("image.upload.types"),s=De(a),r=new e(t.locale),l=i.t;return r.set({acceptedType:a.map(c=>`image/${c}`).join(","),allowMultipleFiles:!0,label:l("Upload from computer"),icon:Bt}),r.bind("isEnabled").to(n),r.on("done",(c,m)=>{const u=Array.from(m).filter(g=>s.test(g.type));u.length&&(t.execute("uploadImage",{file:u}),t.editing.view.focus())}),r}_createToolbarButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),i=this.editor.commands.get("uploadImage"),n=this._createButton(ae);return n.tooltip=!0,n.bind("label").to(t,"isImageSelected",i,"isAccessAllowed",(a,s)=>e(s?a?"Replace image from computer":"Upload image from computer":"You have no image upload permissions.")),n}_createDropdownButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),i=this._createButton(ae);return i.withText=!0,i.bind("label").to(t,"isImageSelected",n=>e(n?"Replace from computer":"Upload from computer")),i.on("execute",()=>{t.dropdownView.isOpen=!1}),i}_createMenuBarButton(e){const t=this.editor.locale.t,i=this._createButton(wt);switch(i.withText=!0,e){case"standalone":i.label=t("Image from computer");break;case"insertOnly":i.label=t("Image");break;case"insertNested":i.label=t("From computer");break}return i}}class ri extends f{static get pluginName(){return"ImageUploadProgress"}static get isOfficialPlugin(){return!0}placeholder;constructor(e){super(e),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}uploadStatusChange=(e,t,i)=>{const n=this.editor,a=t.item,s=a.getAttribute("uploadId");if(!i.consumable.consume(t.item,e.name))return;const r=n.plugins.get("ImageUtils"),l=n.plugins.get(C),c=s?t.attributeNewValue:null,m=this.placeholder,u=n.editing.mapper.toViewElement(a),g=i.writer;if(c=="reading"){le(u,g),ce(r,m,u,g);return}if(c=="uploading"){const d=l.loaders.get(s);le(u,g),d?(me(u,g),ci(u,g,d,n.editing.view),hi(r,u,g,d)):ce(r,m,u,g);return}c=="complete"&&l.loaders.get(s)&&ui(u,g,n.editing.view),mi(u,g),me(u,g),li(u,g)}}function le(o,e){o.hasClass("ck-appear")||e.addClass("ck-appear",o)}function li(o,e){e.removeClass("ck-appear",o)}function ce(o,e,t,i){t.hasClass("ck-image-upload-placeholder")||i.addClass("ck-image-upload-placeholder",t);const n=o.findViewImgElement(t);n.getAttribute("src")!==e&&i.setAttribute("src",e,n),We(t,"placeholder")||i.insert(i.createPositionAfter(n),di(i))}function me(o,e){o.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",o),je(o,e,"placeholder")}function ci(o,e,t,i){const n=gi(e);e.insert(e.createPositionAt(o,"end"),n),t.on("change:uploadedPercent",(a,s,r)=>{i.change(l=>{l.setStyle("width",r+"%",n)})})}function mi(o,e){je(o,e,"progressBar")}function ui(o,e,t){const i=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(o,"end"),i),setTimeout(()=>{t.change(n=>n.remove(n.createRangeOn(i)))},3e3)}function gi(o){const e=o.createUIElement("div",{class:"ck-progress-bar"});return o.setCustomProperty("progressBar",!0,e),e}function di(o){const e=o.createUIElement("div",{class:"ck-upload-placeholder-loader"});return o.setCustomProperty("placeholder",!0,e),e}function We(o,e){for(const t of o.getChildren())if(t.getCustomProperty(e))return t}function je(o,e,t){const i=We(o,t);i&&e.remove(e.createRangeOn(i))}function hi(o,e,t,i){if(i.data){const n=o.findViewImgElement(e);t.setAttribute("src",i.data,n)}}class fi extends _{constructor(e){super(e),this.set("isAccessAllowed",!0)}refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(i)}execute(e){const t=he(e.file),i=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),a=Object.fromEntries(i.getAttributes());t.forEach((s,r)=>{const l=i.getSelectedElement();if(r&&l&&n.isImage(l)){const c=this.editor.model.createPositionAfter(l);this._uploadImage(s,a,c)}else this._uploadImage(s,a)})}_uploadImage(e,t,i){const n=this.editor,s=n.plugins.get(C).createLoader(e),r=n.plugins.get("ImageUtils");s&&r.insertImage({...t,uploadId:s.id},i)}}class pi extends f{static get requires(){return[C,oe,H,I]}static get pluginName(){return"ImageUploadEditing"}static get isOfficialPlugin(){return!0}_uploadImageElements;_uploadedImages=new Map;constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,i=e.conversion,n=e.plugins.get(C),a=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline"),r=De(e.config.get("image.upload.types")),l=new fi(e);e.commands.add("uploadImage",l),e.commands.add("imageUpload",l),i.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}).add(c=>c.on("element:img",(m,u,g)=>{if(!g.consumable.test(u.viewItem,{attributes:["data-ck-upload-id"]}))return;const d=u.viewItem.getAttribute("data-ck-upload-id");if(!d)return;const[h]=Array.from(u.modelRange.getItems({shallow:!0})),p=n.loaders.get(d);h&&(g.writer.setAttribute("uploadId",d,h),g.consumable.consume(u.viewItem,{attributes:["data-ck-upload-id"]}),p&&p.data&&g.writer.setAttribute("uploadStatus",p.status,h))},{priority:"low"})),this.listenTo(e.editing.view.document,"clipboardInput",(c,m)=>{if(Ii(m.dataTransfer))return;const u=Array.from(m.dataTransfer.files).filter(d=>d?r.test(d.type):!1);if(!u.length)return;if(c.stop(),e.model.change(d=>{m.targetRanges&&d.setSelection(m.targetRanges.map(h=>e.editing.mapper.toModelRange(h))),e.execute("uploadImage",{file:u})}),!e.commands.get("uploadImage").isAccessAllowed){const d=e.plugins.get("Notification"),h=e.locale.t;d.showWarning(h("You have no image upload permissions."),{namespace:"image"})}}),this.listenTo(s,"inputTransformation",(c,m)=>{const u=Array.from(e.editing.view.createRangeIn(m.content)).map(d=>d.item).filter(d=>ni(a,d)&&!d.getAttribute("uploadProcessed")).map(d=>({promise:ii(d),imageElement:d}));if(!u.length)return;const g=new G(e.editing.view.document);for(const d of u){g.setAttribute("uploadProcessed",!0,d.imageElement);const h=n.createLoader(d.promise);h&&(g.setAttribute("src","",d.imageElement),g.setAttribute("uploadId",h.id,d.imageElement))}}),e.editing.view.document.on("dragover",(c,m)=>{m.preventDefault()}),t.on("change",()=>{const c=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),m=new Set;for(const u of c)if(u.type=="insert"&&u.name!="$text"){const g=u.position.nodeAfter,d=u.position.root.rootName=="$graveyard";for(const h of bi(e,g)){const p=h.getAttribute("uploadId"),v=h.getAttribute("uploadStatus");if(!p||v=="complete")continue;const y=n.loaders.get(p);if(!y){!d&&this._uploadedImages.has(p)&&e.model.enqueueChange({isUndoable:!1},E=>{E.setAttribute("uploadStatus","complete",h),this.fire("uploadComplete",{data:this._uploadedImages.get(p),imageElement:h})});continue}d?m.has(p)||Array.from(this._uploadImageElements.get(p)).every(V=>V.root.rootName=="$graveyard")&&y.abort():(m.add(p),this._uploadImageElements.has(p)?this._uploadImageElements.get(p).add(h):this._uploadImageElements.set(p,new Set([h])),y.status=="idle"&&this._readAndUpload(y))}}}),this.on("uploadComplete",(c,{imageElement:m,data:u})=>{const g=u.urls?u.urls:u;this.editor.model.change(d=>{d.setAttribute("src",g.default,m),this._parseAndSetSrcsetAttributeOnImage(g,m,d),a.setImageNaturalSizeAttributes(m)})},{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&(e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this._registerConverters("imageBlock")),this.editor.plugins.has("ImageInlineEditing")&&(e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]}),this._registerConverters("imageInline"))}_readAndUpload(e){const t=this.editor,i=t.model,n=t.locale.t,a=t.plugins.get(C),s=t.plugins.get(oe),r=t.plugins.get("ImageUtils"),l=this._uploadImageElements;return i.enqueueChange({isUndoable:!1},m=>{const u=l.get(e.id);for(const g of u)m.setAttribute("uploadStatus","reading",g)}),e.read().then(()=>{const m=e.upload();t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Uploading image"));for(const u of l.get(e.id)){if(rt.isSafari){const g=t.editing.mapper.toViewElement(u),d=r.findViewImgElement(g);t.editing.view.once("render",()=>{if(!d.parent)return;const h=t.editing.view.domConverter.mapViewToDom(d.parent);if(!h)return;const p=h.style.display;h.style.display="none",h._ckHack=h.offsetHeight,h.style.display=p})}i.enqueueChange({isUndoable:!1},g=>{g.setAttribute("uploadStatus","uploading",u)})}return m}).then(m=>{i.enqueueChange({isUndoable:!1},u=>{for(const g of l.get(e.id))u.setAttribute("uploadStatus","complete",g),this.fire("uploadComplete",{data:m,imageElement:g});t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Image upload complete")),this._uploadedImages.set(e.id,m)}),c()}).catch(m=>{if(t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Error during image upload")),e.status!=="error"&&e.status!=="aborted")throw m;e.status=="error"&&m&&s.showWarning(m,{title:n("Upload failed"),namespace:"upload"}),i.enqueueChange({isUndoable:!1},u=>{for(const g of l.get(e.id))g.root.rootName!=="$graveyard"&&u.remove(g)}),c()});function c(){i.enqueueChange({isUndoable:!1},m=>{for(const u of l.get(e.id))m.removeAttribute("uploadId",u),m.removeAttribute("uploadStatus",u);l.delete(e.id)}),a.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,i){let n=0;const a=Object.keys(e).filter(s=>{const r=parseInt(s,10);if(!isNaN(r))return n=Math.max(n,r),!0}).map(s=>`${e[s]} ${s}w`).join(", ");if(a!=""){const s={srcset:a};!t.hasAttribute("width")&&!t.hasAttribute("height")&&(s.width=n),i.setAttributes(s,t)}}_registerConverters(e){const{conversion:t,plugins:i}=this.editor,n=i.get(C),a=i.get(I);t.for("dataDowncast").add(s=>{s.on(`attribute:uploadId:${e}`,(r,l,c)=>{if(!c.consumable.test(l.item,r.name))return;const m=n.loaders.get(l.attributeNewValue);if(!m||!m.data)return null;const u=c.mapper.toViewElement(l.item),g=a.findViewImgElement(u);g&&(c.consumable.consume(l.item,r.name),c.writer.setAttribute("data-ck-upload-id",m.id,g))})})}}function Ii(o){return Array.from(o.types).includes("text/html")&&o.getData("text/html")!==""}function bi(o,e){const t=o.plugins.get("ImageUtils");return Array.from(o.model.createRangeOn(e)).filter(i=>t.isImage(i.item)).map(i=>i.item)}class wi extends f{static get pluginName(){return"ImageUpload"}static get isOfficialPlugin(){return!0}static get requires(){return[pi,ai,ri]}}class _i extends O{urlInputView;keystrokes;constructor(e){super(e),this.set("imageURLInputValue",""),this.set("isImageSelected",!1),this.set("isEnabled",!0),this.keystrokes=new P,this.urlInputView=this._createUrlInputView(),this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-url"],tabindex:"-1"},children:[this.urlInputView,{tag:"div",attributes:{class:["ck","ck-image-insert-url__action-row"]}}]})}render(){super.render(),N({view:this}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}_createUrlInputView(){const e=this.locale,t=e.t,i=new Q(e,ye);return i.bind("label").to(this,"isImageSelected",n=>t(n?"Update image URL":"Insert image via URL")),i.bind("isEnabled").to(this),i.fieldView.inputMode="url",i.fieldView.placeholder="https://example.com/image.png",i.fieldView.bind("value").to(this,"imageURLInputValue",n=>n||""),i.fieldView.on("input",()=>{this.imageURLInputValue=i.fieldView.element.value.trim()}),i}focus(){this.urlInputView.focus()}}class yi extends f{_imageInsertUI;_formView;static get pluginName(){return"ImageInsertViaUrlUI"}static get isOfficialPlugin(){return!0}static get requires(){return[U,pt]}init(){this.editor.ui.componentFactory.add("insertImageViaUrl",()=>this._createToolbarButton()),this.editor.ui.componentFactory.add("menuBar:insertImageViaUrl",()=>this._createMenuBarButton("standalone"))}afterInit(){this._imageInsertUI=this.editor.plugins.get("ImageInsertUI"),this._imageInsertUI.registerIntegration({name:"url",observable:()=>this.editor.commands.get("insertImage"),buttonViewCreator:()=>this._createToolbarButton(),formViewCreator:()=>this._createDropdownButton(),menuBarButtonViewCreator:e=>this._createMenuBarButton(e?"insertOnly":"insertNested")})}_createInsertUrlButton(e){const t=new e(this.editor.locale);return t.icon=Ut,t.on("execute",()=>{this._showModal()}),t}_createToolbarButton(){const e=this.editor.locale.t,t=this._createInsertUrlButton(b);return t.tooltip=!0,t.bind("label").to(this._imageInsertUI,"isImageSelected",i=>e(i?"Update image URL":"Insert image via URL")),t}_createDropdownButton(){const e=this.editor.locale.t,t=this._createInsertUrlButton(b);return t.withText=!0,t.bind("label").to(this._imageInsertUI,"isImageSelected",i=>e(i?"Update image URL":"Insert via URL")),t}_createMenuBarButton(e){const t=this.editor.locale.t,i=this._createInsertUrlButton(It);switch(i.withText=!0,e){case"standalone":i.label=t("Image via URL");break;case"insertOnly":i.label=t("Image");break;case"insertNested":i.label=t("Via URL");break}return i}_createInsertUrlView(){const e=this.editor,t=e.locale,i=e.commands.get("replaceImageSource"),n=e.commands.get("insertImage"),a=new _i(t);return a.bind("isImageSelected").to(this._imageInsertUI),a.bind("isEnabled").toMany([n,i],"isEnabled",(...s)=>s.some(r=>r)),a}_showModal(){const e=this.editor,i=e.locale.t,n=e.plugins.get("Dialog");this._formView||(this._formView=this._createInsertUrlView(),this._formView.on("submit",()=>this._handleSave()));const a=e.commands.get("replaceImageSource");this._formView.imageURLInputValue=a.value||"",n.show({id:"insertImageViaUrl",title:i("Image via URL"),isModal:!0,content:this._formView,actionButtons:[{label:i("Cancel"),withText:!0,onExecute:()=>n.hide()},{label:this._imageInsertUI.isImageSelected?i("Save"):i("Insert"),class:"ck-button-action",withText:!0,onExecute:()=>this._handleSave()}]})}_handleSave(){this.editor.commands.get("replaceImageSource").isEnabled?this.editor.execute("replaceImageSource",{source:this._formView.imageURLInputValue}):this.editor.execute("insertImage",{source:this._formView.imageURLInputValue}),this.editor.plugins.get("Dialog").hide()}}class vi extends f{static get pluginName(){return"ImageInsertViaUrl"}static get isOfficialPlugin(){return!0}static get requires(){return[yi,U]}}class un extends f{static get pluginName(){return"ImageInsert"}static get isOfficialPlugin(){return!0}static get requires(){return[wi,vi,U]}}class Ci extends _{refresh(){const e=this.editor,i=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!i,!i||!i.hasAttribute("resizedWidth")?this.value=null:this.value={width:i.getAttribute("resizedWidth"),height:null}}execute(e){const t=this.editor,i=t.model,n=t.plugins.get("ImageUtils"),a=n.getClosestSelectedImageElement(i.document.selection);this.value={width:e.width,height:null},a&&i.change(s=>{s.setAttribute("resizedWidth",e.width,a),s.removeAttribute("resizedHeight",a),n.setImageNaturalSizeAttributes(a)})}}class qe extends f{static get requires(){return[I]}static get pluginName(){return"ImageResizeEditing"}static get licenseFeatureCode(){return"IR"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:custom",value:"custom",icon:"custom"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new Ci(e);this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}afterInit(){this._registerSchema()}_registerSchema(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&(e.extend("imageBlock",{allowAttributes:["resizedWidth","resizedHeight"]}),e.setAttributeProperties("resizedWidth",{isFormatting:!0}),e.setAttributeProperties("resizedHeight",{isFormatting:!0})),this.editor.plugins.has("ImageInlineEditing")&&(e.extend("imageInline",{allowAttributes:["resizedWidth","resizedHeight"]}),e.setAttributeProperties("resizedWidth",{isFormatting:!0}),e.setAttributeProperties("resizedHeight",{isFormatting:!0}))}_registerConverters(e){const t=this.editor,i=t.plugins.get("ImageUtils");t.conversion.for("downcast").add(n=>n.on(`attribute:resizedWidth:${e}`,(a,s,r)=>{if(!r.consumable.consume(s.item,a.name))return;const l=r.writer,c=r.mapper.toViewElement(s.item);s.attributeNewValue!==null?(l.setStyle("width",s.attributeNewValue,c),l.addClass("image_resized",c)):(l.removeStyle("width",c),l.removeClass("image_resized",c))})),t.conversion.for("dataDowncast").attributeToAttribute({model:{name:e,key:"resizedHeight"},view:n=>({key:"style",value:{height:n}})}),t.conversion.for("editingDowncast").add(n=>n.on(`attribute:resizedHeight:${e}`,(a,s,r)=>{if(!r.consumable.consume(s.item,a.name))return;const l=r.writer,c=r.mapper.toViewElement(s.item),m=e==="imageInline"?i.findViewImgElement(c):c;s.attributeNewValue!==null?l.setStyle("height",s.attributeNewValue,m):l.removeStyle("height",m)})),t.conversion.for("upcast").attributeToAttribute({view:{name:e==="imageBlock"?"figure":"img",styles:{width:/.+/}},model:{key:"resizedWidth",value:n=>x(n)?null:n.getStyle("width")}}),t.conversion.for("upcast").attributeToAttribute({view:{name:e==="imageBlock"?"figure":"img",styles:{height:/.+/}},model:{key:"resizedHeight",value:n=>x(n)?null:n.getStyle("height")}}),t.conversion.for("upcast").add(n=>{n.on(`element:${e==="imageBlock"?"figure":"img"}`,(a,s,r)=>{r.consumable.consume(s.viewItem,{classes:["image_resized"]})})})}}const D={small:Rt,medium:zt,large:xt,custom:Tt,original:At};class Ei extends f{static get requires(){return[qe]}static get pluginName(){return"ImageResizeButtons"}static get isOfficialPlugin(){return!0}_resizeUnit;constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),i=e.commands.get("resizeImage");this.bind("isEnabled").to(i);for(const n of t)this._registerImageResizeButton(n);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:i,value:n,icon:a}=e;t.ui.componentFactory.add(i,s=>{const r=new b(s),l=t.commands.get("resizeImage"),c=this._getOptionLabelValue(e,!0);if(!D[a])throw new ot("imageresizebuttons-missing-icon",t,e);if(r.set({label:c,icon:D[a],tooltip:c,isToggleable:!0}),r.bind("isEnabled").to(this),t.plugins.has("ImageCustomResizeUI")&&S(e)){const m=t.plugins.get("ImageCustomResizeUI");this.listenTo(r,"execute",()=>{m._showForm(this._resizeUnit)})}else{const m=n?n+this._resizeUnit:null;r.bind("isOn").to(l,"value",l,"isEnabled",q(m)),this.listenTo(r,"execute",()=>{t.execute("resizeImage",{width:m})})}return r})}_registerImageResizeDropdown(e){const t=this.editor,i=t.t,n=e.find(s=>!s.value),a=s=>{const r=t.commands.get("resizeImage"),l=Z(s,vt),c=l.buttonView,m=i("Resize image");return c.set({tooltip:m,commandValue:n.value,icon:D.medium,isToggleable:!0,label:this._getOptionLabelValue(n),withText:!0,class:"ck-resize-image-button",ariaLabel:m,ariaLabelledBy:void 0}),c.bind("label").to(r,"value",u=>u&&u.width?u.width:this._getOptionLabelValue(n)),l.bind("isEnabled").to(this),Ct(l,()=>this._getResizeDropdownListItemDefinitions(e,r),{ariaLabel:i("Image resize list"),role:"menu"}),this.listenTo(l,"execute",u=>{"onClick"in u.source?u.source.onClick():(t.execute(u.source.commandName,{width:u.source.commandValue}),t.editing.view.focus())}),l};t.ui.componentFactory.add("resizeImage",a),t.ui.componentFactory.add("imageResize",a)}_getOptionLabelValue(e,t=!1){const i=this.editor.t;return e.label?e.label:t?S(e)?i("Custom image size"):e.value?i("Resize image to %0",e.value+this._resizeUnit):i("Resize image to the original size"):S(e)?i("Custom"):e.value?e.value+this._resizeUnit:i("Original")}_getResizeDropdownListItemDefinitions(e,t){const{editor:i}=this,n=new at,a=e.map(s=>S(s)?{...s,valueWithUnits:"custom"}:s.value?{...s,valueWithUnits:`${s.value}${this._resizeUnit}`}:{...s,valueWithUnits:null});for(const s of a){let r=null;if(i.plugins.has("ImageCustomResizeUI")&&S(s)){const l=i.plugins.get("ImageCustomResizeUI");r={type:"button",model:new se({label:this._getOptionLabelValue(s),role:"menuitemradio",withText:!0,icon:null,onClick:()=>{l._showForm(this._resizeUnit)}})};const c=Object.values(a).map(m=>m.valueWithUnits);r.model.bind("isOn").to(t,"value",t,"isEnabled",ki(c))}else r={type:"button",model:new se({commandName:"resizeImage",commandValue:s.valueWithUnits,label:this._getOptionLabelValue(s),role:"menuitemradio",withText:!0,icon:null})},r.model.bind("isOn").to(t,"value",t,"isEnabled",q(s.valueWithUnits));r.model.bind("isEnabled").to(t,"isEnabled"),n.add(r)}return n}}function S(o){return o.value==="custom"}function q(o){return(e,t)=>{const i=e;return i===void 0||!t?!1:o===null&&i===o?!0:i!==null&&i.width===o}}function ki(o){return(e,t)=>!o.some(i=>q(i)(e,t))}const Si="figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img",M="image_resized";class Ui extends f{static get requires(){return[L,I]}static get pluginName(){return"ImageResizeHandles"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils");t.addObserver(ie),this.listenTo(t.document,"imageLoaded",(n,a)=>{if(!a.target.matches(Si))return;const s=e.editing.view.domConverter,r=s.domToView(a.target),l=i.getImageWidgetFromImageView(r);let c=this.editor.plugins.get(L).getResizerByViewElement(l);if(c){c.redraw();return}const m=e.editing.mapper,u=m.toModelElement(l);c=e.plugins.get(L).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:u,viewElement:l,editor:e,getHandleHost(g){return g.querySelector("img")},getResizeHost(){return s.mapViewToDom(m.toViewElement(u))},isCentered(){return u.getAttribute("imageStyle")=="alignCenter"},onCommit(g){t.change(d=>{d.removeClass(M,l)}),e.execute("resizeImage",{width:g})}}),c.on("updateSize",()=>{l.hasClass(M)||t.change(d=>{d.addClass(M,l)});const g=u.name==="imageInline"?r:l;g.getStyle("height")&&t.change(d=>{d.removeStyle("height",g)})}),c.bind("isEnabled").to(this)})}}function $e(o){if(!o)return null;const[,e,t]=o.trim().match(/([.,\d]+)(%|px)$/)||[],i=Number.parseFloat(e);return Number.isNaN(i)?null:{value:i,unit:t}}function He(o,e,t){return t==="px"?{value:e.value,unit:"px"}:{value:e.value/o*100,unit:"%"}}function Ge(o){const{editing:e}=o,i=o.plugins.get("ImageUtils").getClosestSelectedImageElement(o.model.document.selection);if(!i)return null;const n=e.mapper.toViewElement(i),a=e.view.domConverter.mapViewToDom(n);return{model:i,view:n,dom:a}}function Vi(o,e){const t=Ge(o);if(!t)return null;const i=$e(t.model.getAttribute("resizedWidth")||null);if(!i)return null;if(i.unit===e)return i;const n=pe(t.dom),a={value:new lt(t.dom).width};return He(n,a,e)}class Bi extends O{focusTracker;keystrokes;unit;backButtonView;saveButtonView;labeledInput;children;_focusables;_focusCycler;_validators;constructor(e,t,i){super(e),this.focusTracker=new J,this.keystrokes=new P,this.unit=t,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.labeledInput=this._createLabeledInputView(),this.children=this.createCollection([this._createHeaderView()]),this.children.add(new ve(e,{children:[this.labeledInput,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding"]})),this._focusables=new X,this._validators=i,this.keystrokes.set("Esc",(n,a)=>{this.fire("cancel"),a()}),this._focusCycler=new Y({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-image-custom-resize-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),N({view:this}),[this.backButtonView,this.labeledInput,this.saveButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createBackButton(){const e=this.locale.t,t=new b(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:Ve,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createSaveButton(){const e=this.locale.t,t=new b(this.locale);return t.set({label:e("Save"),withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),t}_createHeaderView(){const e=this.locale.t,t=new Ce(this.locale,{label:e("Image Resize")});return t.children.add(this.backButtonView,0),t}_createLabeledInputView(){const e=this.locale.t,t=new Q(this.locale,Et);return t.label=e("Resize image (in %0)",this.unit),t.class="ck-labeled-field-view_full-width",t.fieldView.set({step:.1}),t}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.labeledInput.errorText=t,!1}return!0}resetFormStatus(){this.labeledInput.errorText=null}get rawSize(){const{element:e}=this.labeledInput.fieldView;return e?e.value:null}get parsedSize(){const{rawSize:e}=this;if(e===null)return null;const t=Number.parseFloat(e);return Number.isNaN(t)?null:t}get sizeWithUnits(){const{parsedSize:e,unit:t}=this;return e===null?null:`${e}${t}`}}function Ai(o,e){const t=Ge(o);if(!t)return null;const i=pe(t.dom),n=$e(window.getComputedStyle(t.dom).minWidth)||{value:1},a=Math.max(.1,He(i,n,e).value);return{unit:e,lower:a,upper:e==="px"?i:100}}class Ti extends f{_balloon;_form;static get requires(){return[be]}static get pluginName(){return"ImageCustomResizeUI"}static get isOfficialPlugin(){return!0}destroy(){super.destroy(),this._form&&this._form.destroy()}_createForm(e){const t=this.editor;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(we(Bi))(t.locale,e,xi(t)),this._form.render(),this.listenTo(this._form,"submit",()=>{this._form.isValid()&&(t.execute("resizeImage",{width:this._form.sizeWithUnits}),this._hideForm(!0))}),this.listenTo(this._form.labeledInput,"change:errorText",()=>{t.ui.update()}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),_e({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(e){if(this._isVisible)return;this._form||this._createForm(e);const t=this.editor,i=this._form.labeledInput;this._form.disableCssTransitions(),this._form.resetFormStatus(),this._isInBalloon||this._balloon.add({view:this._form,position:te(t)});const n=Vi(t,e),a=n?n.value.toFixed(1):"",s=Ai(t,e);i.fieldView.value=i.fieldView.element.value=a,s&&Object.assign(i.fieldView,{min:s.lower.toFixed(1),max:Math.ceil(s.upper).toFixed(1)}),this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}function xi(o){const e=o.t;return[t=>{if(t.rawSize.trim()==="")return e("The value must not be empty.");if(t.parsedSize===null)return e("The value should be a plain number.")}]}class gn extends f{static get requires(){return[qe,Ui,Ti,Ei]}static get pluginName(){return"ImageResize"}static get isOfficialPlugin(){return!0}}class zi extends _{_defaultStyles;_styles;constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map(i=>{if(i.isDefault)for(const n of i.modelElements)this._defaultStyles[n]=i.name;return[i.name,i]}))}refresh(){const i=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!i,this.isEnabled?i.hasAttribute("imageStyle")?this.value=i.getAttribute("imageStyle"):this.value=this._defaultStyles[i.name]:this.value=!1}execute(e={}){const t=this.editor,i=t.model,n=t.plugins.get("ImageUtils");i.change(a=>{const s=e.value,{setImageSizes:r=!0}=e;let l=n.getClosestSelectedImageElement(i.document.selection);s&&this.shouldConvertImageType(s,l)&&(this.editor.execute(n.isBlockImage(l)?"imageTypeInline":"imageTypeBlock",{setImageSizes:r}),l=n.getClosestSelectedImageElement(i.document.selection)),!s||this._styles.get(s).isDefault?a.removeAttribute("imageStyle",l):a.setAttribute("imageStyle",s,l),r&&n.setImageNaturalSizeAttributes(l)})}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const B={get inline(){return{name:"inline",title:"In line",icon:Ue,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:Se,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:ke,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:j,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:W,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:Ee,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:j,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:W,modelElements:["imageBlock"],className:"image-style-side"}}},Ri={full:Pt,left:ke,right:Ee,center:j,inlineLeft:Se,inlineRight:W,inline:Ue},Pi=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function Oi(o){return(o.configuredStyles.options||[]).map(i=>Li(i)).filter(i=>Di(i,o))}function Ni(o,e){return o&&e?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:o?{options:["block","side"]}:e?{options:["inline","alignLeft","alignRight"]}:{}}function Fi(o){return o.has("ImageBlockEditing")&&o.has("ImageInlineEditing")?[...Pi]:[]}function Li(o){return typeof o=="string"?B[o]?o={...B[o]}:o={name:o}:o=Mi(B[o.name],o),typeof o.icon=="string"&&(o.icon=Ri[o.icon]||o.icon),o}function Di(o,{isBlockPluginLoaded:e,isInlinePluginLoaded:t}){const{modelElements:i,name:n}=o;if(!i||!i.length||!n)return Ke({style:o}),!1;{const a=[e?"imageBlock":null,t?"imageInline":null];if(!i.some(s=>a.includes(s)))return w("image-style-missing-dependency",{style:o,missingPlugins:i.map(s=>s==="imageBlock"?"ImageBlockEditing":"ImageInlineEditing")}),!1}return!0}function Mi(o,e){const t={...e};for(const i in o)Object.prototype.hasOwnProperty.call(e,i)||(t[i]=o[i]);return t}function Ke(o){w("image-style-configuration-definition-invalid",o)}const R={normalizeStyles:Oi,getDefaultStylesConfiguration:Ni,getDefaultDropdownDefinitions:Fi,warnInvalidStyle:Ke};function Wi(o){return(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const n=$(t.attributeNewValue,o),a=$(t.attributeOldValue,o),s=i.mapper.toViewElement(t.item),r=i.writer;a&&r.removeClass(a.className,s),n&&r.addClass(n.className,s)}}function ji(o){const e={imageInline:o.filter(t=>!t.isDefault&&t.modelElements.includes("imageInline")),imageBlock:o.filter(t=>!t.isDefault&&t.modelElements.includes("imageBlock"))};return(t,i,n)=>{if(!i.modelRange)return;const a=i.viewItem,s=K(i.modelRange.getItems());if(s&&n.schema.checkAttribute(s,"imageStyle")){for(const r of e[s.name])n.consumable.consume(a,{classes:r.className})&&n.writer.setAttribute("imageStyle",r.name,s);qi(n,a,s,o)}}}function qi(o,e,t,i){if(!o.consumable.test(e,{styles:["float"]}))return;let n=null;switch(e.getStyle("float")){case"left":n="alignLeft";break;case"right":n="alignRight";break}if(!n)return;const a=$(n,i);if(!a)return;const s=B[a.name];Ot(a,s)&&(o.writer.setAttribute("imageStyle",n,t),o.consumable.consume(e,{styles:["float"]}))}function $(o,e){for(const t of e)if(t.name===o)return t}class Je extends f{static get pluginName(){return"ImageStyleEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[I]}normalizedStyles;init(){const e=this.editor,t=e.plugins.has("ImageBlockEditing"),i=e.plugins.has("ImageInlineEditing");e.config.define("image.styles",R.getDefaultStylesConfiguration(t,i)),this.normalizedStyles=R.normalizeStyles({configuredStyles:e.config.get("image.styles"),isBlockPluginLoaded:t,isInlinePluginLoaded:i}),this._setupConversion(t,i),this._setupPostFixer(),e.commands.add("imageStyle",new zi(e,this.normalizedStyles))}_setupConversion(e,t){const i=this.editor,n=i.model.schema,a=Wi(this.normalizedStyles),s=ji(this.normalizedStyles);i.editing.downcastDispatcher.on("attribute:imageStyle",a),i.data.downcastDispatcher.on("attribute:imageStyle",a),e&&(n.extend("imageBlock",{allowAttributes:"imageStyle"}),n.setAttributeProperties("imageStyle",{isFormatting:!0}),i.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),t&&(n.extend("imageInline",{allowAttributes:"imageStyle"}),n.setAttributeProperties("imageStyle",{isFormatting:!0}),i.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,i=e.plugins.get(I),n=new Map(this.normalizedStyles.map(a=>[a.name,a]));t.registerPostFixer(a=>{let s=!1;for(const r of t.differ.getChanges())if(r.type=="insert"||r.type=="attribute"&&r.attributeKey=="imageStyle"){let l=r.type=="insert"?r.position.nodeAfter:r.range.start.nodeAfter;if(l&&l.is("element","paragraph")&&l.childCount>0&&(l=l.getChild(0)),!i.isImage(l))continue;const c=l.getAttribute("imageStyle");if(!c)continue;const m=n.get(c);(!m||!m.modelElements.includes(l.name))&&(a.removeAttribute("imageStyle",l),s=!0)}return s})}}class $i extends f{static get requires(){return[Je]}static get pluginName(){return"ImageStyleUI"}static get isOfficialPlugin(){return!0}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],i=e.get("ImageStyleEditing"),n=ue(i.normalizedStyles,this.localizedDefaultStylesTitles);for(const s of n)this._createButton(s);const a=ue([...t.filter(Be),...R.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const s of a)this._createDropdown(s,n)}_createDropdown(e,t){const i=this.editor.ui.componentFactory;i.add(e.name,n=>{let a;const{defaultItem:s,items:r,title:l}=e,c=r.filter(d=>t.find(({name:h})=>ge(h)===d)).map(d=>{const h=i.create(d);return d===s&&(a=h),h});r.length!==c.length&&R.warnInvalidStyle({dropdown:e});const m=Z(n,Ie),u=m.buttonView,g=u.arrowView;return bt(m,c,{enableActiveItemFocusOnDropdownOpen:!0}),u.set({label:de(l,a.label),class:null,tooltip:!0}),g.unbind("label"),g.set({label:l}),u.bind("icon").toMany(c,"isOn",(...d)=>{const h=d.findIndex(k);return h<0?a.icon:c[h].icon}),u.bind("label").toMany(c,"isOn",(...d)=>{const h=d.findIndex(k);return de(l,h<0?a.label:c[h].label)}),u.bind("isOn").toMany(c,"isOn",(...d)=>d.some(k)),u.bind("class").toMany(c,"isOn",(...d)=>d.some(k)?"ck-splitbutton_flatten":void 0),u.on("execute",()=>{c.some(({isOn:d})=>d)?m.isOpen=!m.isOpen:a.fire("execute")}),m.bind("isEnabled").toMany(c,"isEnabled",(...d)=>d.some(k)),this.listenTo(m,"execute",()=>{this.editor.editing.view.focus()}),m})}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(ge(t),i=>{const n=this.editor.commands.get("imageStyle"),a=new b(i);return a.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),a.bind("isEnabled").to(n,"isEnabled"),a.bind("isOn").to(n,"value",s=>s===t),a.on("execute",this._executeCommand.bind(this,t)),a})}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function ue(o,e){for(const t of o)e[t.title]&&(t.title=e[t.title]);return o}function ge(o){return`imageStyle:${o}`}function de(o,e){return(o?o+": ":"")+e}class dn extends f{static get requires(){return[Je,$i]}static get pluginName(){return"ImageStyle"}static get isOfficialPlugin(){return!0}}class hn extends f{static get requires(){return[ne,I]}static get pluginName(){return"ImageToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(ne),n=e.plugins.get("ImageUtils");i.register("image",{ariaLabel:t("Image toolbar"),items:Hi(e.config.get("image.toolbar")||[]),getRelatedElement:a=>n.getClosestSelectedImageWidget(a)})}}function Hi(o){return o.map(e=>Be(e)?e.name:e)}export{rn as AutoImage,ln as ImageBlock,Fe as ImageBlockEditing,mn as ImageCaption,ei as ImageCaptionEditing,ti as ImageCaptionUI,Le as ImageCaptionUtils,Ti as ImageCustomResizeUI,Re as ImageEditing,cn as ImageInline,Yt as ImageInlineEditing,un as ImageInsert,U as ImageInsertUI,vi as ImageInsertViaUrl,yi as ImageInsertViaUrlUI,ie as ImageLoadObserver,Ne as ImagePlaceholder,gn as ImageResize,Ei as ImageResizeButtons,qe as ImageResizeEditing,Ui as ImageResizeHandles,Pe as ImageSizeAttributes,dn as ImageStyle,zi as ImageStyleCommand,Je as ImageStyleEditing,$i as ImageStyleUI,xe as ImageTextAlternative,jt as ImageTextAlternativeCommand,qt as ImageTextAlternativeEditing,Gt as ImageTextAlternativeUI,hn as ImageToolbar,Oe as ImageTypeCommand,wi as ImageUpload,pi as ImageUploadEditing,ri as ImageUploadProgress,ai as ImageUploadUI,I as ImageUtils,Jt as InsertImageCommand,Zt as ReplaceImageSourceCommand,Ci as ResizeImageCommand,Qt as ToggleImageCaptionCommand,fi as UploadImageCommand,Pi as _IMAGE_DEFAULT_DROPDOWN_DEFINITIONS,Ri as _IMAGE_DEFAULT_ICONS,B as _IMAGE_DEFAULT_OPTIONS,Bi as _ImageCustomResizeFormView,Xt as _ImageInsertFormView,_i as _ImageInsertUrlView,R as _ImageStyleUtils,$t as _ImageTextAlternativeFormView,x as _checkIfImageWidthAndHeightStylesAreBothSet,re as _createBlockImageViewElement,Nt as _createInlineImageViewElement,ee as _determineImageTypeForInsertionAtSelection,z as _downcastImageAttribute,ze as _downcastImageSrcsetAttribute,ii as _fetchLocalImage,te as _getImageBalloonPositionData,T as _getImageSizeValueIfInPx,Ae as _getImageViewElementMatcher,Ge as _getSelectedImageEditorNodes,Ai as _getSelectedImagePossibleResizeRange,Vi as _getSelectedImageWidthInUnits,ni as _isLocalImage,Wi as _modelToViewImageStyleAttribute,Ht as _repositionImageContextualBalloon,He as _tryCastImageDimensionsToUnit,$e as _tryParseImageDimensionWithUnit,Kt as _upcastImageFigure,ji as _viewToModelImageStyleAttribute,De as createImageTypeRegExp,Ii as isHtmlInDataTransfer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Plugin as h,MultiCommand as B,Command as w}from"../../../../../@ckeditor_ckeditor5-core@47.6.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{ButtonView as E,MenuBarMenuListItemButtonView as F}from"../../../../../@ckeditor_ckeditor5-ui@47.6.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{IconIndent as C,IconOutdent as A}from"../../../../../@ckeditor_ckeditor5-icons@47.6.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{addMarginStylesRules as x}from"../../../../../@ckeditor_ckeditor5-engine@47.6.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{first as y}from"../../../../../@ckeditor_ckeditor5-utils@47.6.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{_isListItemBlock as v}from"../../../../../@ckeditor_ckeditor5-list@47.6.0/node_modules/@ckeditor/ckeditor5-list/dist/index.js";class U extends h{static get pluginName(){return"IndentEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.commands.add("indent",new B(t)),t.commands.add("outdent",new B(t))}}class S extends h{static get pluginName(){return"IndentUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale,n=t.t,s=e.uiLanguageDirection=="ltr"?C:A,i=e.uiLanguageDirection=="ltr"?A:C;this._defineButton("indent",n("Increase indent"),s),this._defineButton("outdent",n("Decrease indent"),i)}_defineButton(t,e,n){const s=this.editor;s.ui.componentFactory.add(t,()=>{const i=this._createButton(E,t,e,n);return i.set({tooltip:!0}),i}),s.ui.componentFactory.add("menuBar:"+t,()=>this._createButton(F,t,e,n))}_createButton(t,e,n,s){const i=this.editor,o=i.commands.get(e),r=new t(i.locale);return r.set({label:n,icon:s}),r.bind("isEnabled").to(o,"isEnabled"),this.listenTo(r,"execute",()=>{i.execute(e),i.editing.view.focus()}),r}}class j extends h{static get pluginName(){return"Indent"}static get isOfficialPlugin(){return!0}static get requires(){return[U,S]}}class I extends w{_indentBehavior;constructor(t,e){super(t),this._indentBehavior=e}refresh(){const e=this.editor.model,n=y(e.document.selection.getSelectedBlocks());if(!n||!this._isIndentationChangeAllowed(n)){this.isEnabled=!1;return}this.isEnabled=this._indentBehavior.checkEnabled(n.getAttribute("blockIndent"))}execute(){const t=this.editor.model,e=this._getBlocksToChange();t.change(n=>{for(const s of e){const i=s.getAttribute("blockIndent"),o=this._indentBehavior.getNextIndent(i);o?n.setAttribute("blockIndent",o,s):n.removeAttribute("blockIndent",s)}})}_getBlocksToChange(){const e=this.editor.model.document.selection;return Array.from(e.getSelectedBlocks()).filter(s=>this._isIndentationChangeAllowed(s))}_isIndentationChangeAllowed(t){const e=this.editor;return e.model.schema.checkAttribute(t,"blockIndent")?!e.plugins.has("ListUtils")||!this._indentBehavior.isForward?!0:!e.plugins.get("ListUtils").isListItemBlock(t):!1}}class m{isForward;offset;unit;constructor(t){this.isForward=t.direction==="forward",this.offset=t.offset,this.unit=t.unit}checkEnabled(t){const e=parseFloat(t||"0");return this.isForward||e>0}getNextIndent(t){const e=parseFloat(t||"0"),n=!t||t.endsWith(this.unit);if(e<0)return;if(!n)return this.isForward?this.offset+this.unit:void 0;const s=this.isForward?this.offset:-this.offset,i=e+s;return i>0?i+this.unit:void 0}}class f{isForward;classes;constructor(t){this.isForward=t.direction==="forward",this.classes=t.classes}checkEnabled(t){const e=this.classes.indexOf(t);return this.isForward?e<this.classes.length-1:e>=0}getNextIndent(t){const e=this.classes.indexOf(t),n=this.isForward?1:-1,s=e+n,i=Math.min(s,this.classes.length-1);return this.classes[i]}}class b extends w{_indentBehavior;constructor(t,e){super(t),this._indentBehavior=e}refresh(){const t=this._getFirstListItemIfSelectionIsAtListStart(this.editor.model.document.selection);this.isEnabled=!!t&&this._indentBehavior.checkEnabled(t.getAttribute("blockIndentList"))}execute(t={}){const n=this.editor.model,s=n.document.selection;n.change(i=>{const o=this._getFirstListItemIfSelectionIsAtListStart(s),r=[];if(t.firstListOnly)r.push(o);else{const c=Array.from(s.getSelectedBlocks());for(const l of c)v(l)&&l.getAttribute("listIndent")===0&&n.schema.checkAttribute(l,"blockIndentList")&&r.push(l)}for(const c of r){const l=c.getAttribute("blockIndentList"),a=this._indentBehavior.getNextIndent(l);a?i.setAttribute("blockIndentList",a,c):i.removeAttribute("blockIndentList",c)}})}_getFirstListItemIfSelectionIsAtListStart(t){const e=t.getFirstPosition(),n=this.editor.plugins.get("ListUtils"),s=e.parent,i=this.editor.model.schema;return e.isAtStart&&v(s)&&s.getAttribute("listIndent")==0&&i.checkAttribute(s,"blockIndentList")&&n.isFirstListItemInList(s)?s:null}}class k extends w{_indentBehavior;constructor(t,e){super(t),this._indentBehavior=e}refresh(){this.isEnabled=this._getAffectedListItems().length>0}execute(){this.editor.model.change(n=>{for(const s of this._getAffectedListItems())n.removeAttribute("blockIndentListItem",s)})}_getAffectedListItems(){const e=this.editor.model.document.selection,n=this.editor.plugins.get("ListUtils"),s=Array.from(e.getSelectedBlocks());return n.expandListBlocksToCompleteItems(s).filter(o=>this._isIndentationChangeAllowed(o))}_isIndentationChangeAllowed(t){if(!t.hasAttribute("blockIndentListItem"))return!1;const e=parseFloat(t.getAttribute("blockIndentListItem"));return isNaN(e)?!this._indentBehavior.isForward:this._indentBehavior.isForward&&e<0||!this._indentBehavior.isForward&&e>0}}class O extends h{static get pluginName(){return"IndentBlockListIntegration"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;if(!this.editor.plugins.has("ListEditing"))return;const e=t.config.get("indentBlock");e.classes&&e.classes.length?(this._setupConversionUsingClassesForListBlock(e.classes),this._setupConversionUsingClassesForListItemBlock(e.classes),t.commands.add("indentBlockList",new b(t,new f({direction:"forward",classes:e.classes}))),t.commands.add("outdentBlockList",new b(t,new f({direction:"backward",classes:e.classes}))),t.commands.add("indentBlockListItem",new k(t,new f({direction:"forward",classes:e.classes}))),t.commands.add("outdentBlockListItem",new k(t,new f({direction:"backward",classes:e.classes})))):(t.data.addStyleProcessorRules(x),this._setupConversionUsingOffsetForListBlock(),this._setupConversionUsingOffsetForListItemBlock(),t.commands.add("indentBlockList",new b(t,new m({direction:"forward",offset:e.offset,unit:e.unit}))),t.commands.add("outdentBlockList",new b(t,new m({direction:"backward",offset:e.offset,unit:e.unit}))),t.commands.add("indentBlockListItem",new k(t,new m({direction:"forward",offset:e.offset,unit:e.unit}))),t.commands.add("outdentBlockListItem",new k(t,new m({direction:"backward",offset:e.offset,unit:e.unit})))),t.plugins.get("ListEditing").on("postFixer",(s,{listNodes:i,writer:o})=>{for(const{node:r,previousNodeInList:c}of i)c&&c.getAttribute("listType")==r.getAttribute("listType")&&(_("blockIndentList",r,c,o)&&(s.return=!0),c.getAttribute("listItemId")==r.getAttribute("listItemId")&&_("blockIndentListItem",r,c,o)&&(s.return=!0))}),this.listenTo(t.editing.view.document,"tab",(s,i)=>{const o=i.shiftKey?"outdentBlockList":"indentBlockList";this.editor.commands.get(o).isEnabled&&(t.execute(o,{firstListOnly:!0}),i.stopPropagation(),i.preventDefault(),s.stop())},{context:"li",priority:"high"})}afterInit(){const t=this.editor,e=t.model,n=e.schema;if(!t.plugins.has("ListEditing"))return;n.extend("$listItem",{allowAttributes:["blockIndentList","blockIndentListItem"]}),n.setAttributeProperties("blockIndentList",{isFormatting:!0}),n.setAttributeProperties("blockIndentListItem",{isFormatting:!0}),e.schema.addAttributeCheck(l=>{if(!l.last.getAttribute("listItemId"))return!1},"blockIndentList"),e.schema.addAttributeCheck(l=>{if(!l.last.getAttribute("listItemId"))return!1},"blockIndentListItem");const s=(l,a)=>{t.model.change(u=>{for(const g of a)g.hasAttribute("listItemId")&&(g.hasAttribute("blockIndentList")&&u.removeAttribute("blockIndentList",g),g.hasAttribute("blockIndentListItem")&&u.removeAttribute("blockIndentListItem",g))})},i=t.commands.get("indentList"),o=t.commands.get("outdentList");i&&this.listenTo(i,"afterExecute",s),o&&this.listenTo(o,"afterExecute",s);const r=t.commands.get("indent"),c=t.commands.get("outdent");r.registerChildCommand(t.commands.get("indentBlockList")),c.registerChildCommand(t.commands.get("outdentBlockList")),r.registerChildCommand(t.commands.get("indentBlockListItem")),c.registerChildCommand(t.commands.get("outdentBlockListItem"))}_setupConversionUsingOffsetForListBlock(){const t=this.editor,e=t.conversion,s=t.locale.contentLanguageDirection==="rtl"?"margin-right":"margin-left",i=t.plugins.get("ListEditing");e.for("upcast").add(o=>{o.on("element:ol",p("blockIndentList",s)),o.on("element:ul",p("blockIndentList",s))}),i.registerDowncastStrategy({scope:"list",attributeName:"blockIndentList",setAttributeOnDowncast(o,r,c){r&&o.setStyle(s,r,c)}})}_setupConversionUsingOffsetForListItemBlock(){const t=this.editor,e=t.locale,n=t.conversion,s=e.contentLanguageDirection==="rtl"?"margin-right":"margin-left",i=t.plugins.get("ListEditing");n.for("upcast").add(o=>{o.on("element:li",p("blockIndentListItem",s),{priority:"low"})}),i.registerDowncastStrategy({scope:"item",attributeName:"blockIndentListItem",setAttributeOnDowncast(o,r,c){r&&o.setStyle(s,r,c)}})}_setupConversionUsingClassesForListBlock(t){const e=this.editor,n=e.conversion,s=e.plugins.get("ListEditing");n.for("upcast").add(i=>{i.on("element:ol",L("blockIndentList",t)),i.on("element:ul",L("blockIndentList",t))}),s.registerDowncastStrategy({scope:"list",attributeName:"blockIndentList",setAttributeOnDowncast(i,o,r){o&&i.addClass(o,r)}})}_setupConversionUsingClassesForListItemBlock(t){const e=this.editor,n=e.conversion,s=e.plugins.get("ListEditing");n.for("upcast").add(i=>{i.on("element:li",L("blockIndentListItem",t),{priority:"low"})}),s.registerDowncastStrategy({scope:"item",attributeName:"blockIndentListItem",setAttributeOnDowncast(i,o,r){o&&i.addClass(o,r)}})}}function L(d,t){return(e,n,s)=>{const{writer:i,consumable:o}=s;n.modelRange||Object.assign(n,s.convertChildren(n.viewItem,n.modelCursor));const r=Array.from(n.viewItem.getClassNames()),c=t.find(u=>r.includes(u));if(c===void 0)return;let l=!1,a;for(const u of n.modelRange.getItems({shallow:!0}))a===void 0&&(a=u.getAttribute("listIndent")),!u.hasAttribute(d)&&u.getAttribute("listIndent")===a&&(i.setAttribute(d,c,u),l=!0);l&&o.consume(n.viewItem,{classes:c})}}function p(d,t){return(e,n,s)=>{const{writer:i,consumable:o}=s;n.modelRange||Object.assign(n,s.convertChildren(n.viewItem,n.modelCursor));const r=n.viewItem.getStyle(t);let c=!1,l;for(const a of n.modelRange.getItems({shallow:!0}))l===void 0&&(l=a.getAttribute("listIndent")),!a.hasAttribute(d)&&a.getAttribute("listIndent")===l&&(i.setAttribute(d,r,a),c=!0);c&&o.consume(n.viewItem,{styles:t})}}function _(d,t,e,n){const s=e.getAttribute(d);return t.getAttribute(d)===s?!1:(s?n.setAttribute(d,s,t):n.removeAttribute(d,t),!0)}const D=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class q extends h{constructor(t){super(t),t.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}static get isOfficialPlugin(){return!0}static get requires(){return[O]}init(){const t=this.editor,e=t.config.get("indentBlock");e.classes&&e.classes.length?(this._setupConversionUsingClasses(e.classes),t.commands.add("indentBlock",new I(t,new f({direction:"forward",classes:e.classes}))),t.commands.add("outdentBlock",new I(t,new f({direction:"backward",classes:e.classes})))):(t.data.addStyleProcessorRules(x),this._setupConversionUsingOffset(),t.commands.add("indentBlock",new I(t,new m({direction:"forward",offset:e.offset,unit:e.unit}))),t.commands.add("outdentBlock",new I(t,new m({direction:"backward",offset:e.offset,unit:e.unit}))))}afterInit(){const t=this.editor,e=t.model.schema,n=t.commands.get("indent"),s=t.commands.get("outdent"),i=t.config.get("heading.options");(i&&i.map(c=>c.model)||D).forEach(c=>{e.isRegistered(c)&&e.extend(c,{allowAttributes:"blockIndent"})}),e.setAttributeProperties("blockIndent",{isFormatting:!0}),n.registerChildCommand(t.commands.get("indentBlock")),s.registerChildCommand(t.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const t=this.editor.conversion,n=this.editor.locale.contentLanguageDirection==="rtl"?"margin-right":"margin-left";t.for("upcast").attributeToAttribute({view:{styles:{[n]:/[\s\S]+/}},model:{key:"blockIndent",value:s=>{if(!s.is("element","li"))return s.getStyle(n)}}}),t.for("downcast").attributeToAttribute({model:"blockIndent",view:s=>({key:"style",value:{[n]:s}})})}_setupConversionUsingClasses(t){const e={model:{key:"blockIndent",values:[]},view:{}};for(const n of t)e.model.values.push(n),e.view[n]={key:"class",value:[n]};this.editor.conversion.attributeToAttribute(e)}}export{j as Indent,q as IndentBlock,I as IndentBlockCommand,b as IndentBlockListCommand,O as IndentBlockListIntegration,k as IndentBlockListItemCommand,U as IndentEditing,S as IndentUI,f as _IndentUsingClasses,m as _IndentUsingOffset};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Plugin as m,Command as x}from"../../../../../@ckeditor_ckeditor5-core@47.
|
|
1
|
+
import{Plugin as m,Command as x}from"../../../../../@ckeditor_ckeditor5-core@47.6.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{ModelDocumentSelection as p}from"../../../../../@ckeditor_ckeditor5-engine@47.6.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Collection as w,getLanguageDirection as L}from"../../../../../@ckeditor_ckeditor5-utils@47.6.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{createDropdown as h,addListToDropdown as C,MenuBarMenuView as A,MenuBarMenuListView as P,ListSeparatorView as T,MenuBarMenuListItemView as V,MenuBarMenuListItemButtonView as y,UIModel as b}from"../../../../../@ckeditor_ckeditor5-ui@47.6.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";function f(c,e){return e=e||L(c),`${c}:${e}`}function v(c){const[e,t]=c.split(":");return{languageCode:e,textDirection:t}}class D extends x{refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"language")}execute({languageCode:e,textDirection:t}={}){const r=this.editor.model,o=r.document.selection,u=e?f(e,t):!1;r.change(g=>{if(o.isCollapsed)u?g.setSelectionAttribute("language",u):g.removeSelectionAttribute("language");else{const a=r.schema.getValidRanges(o.getRanges(),"language",{includeEmptyRanges:!0});for(const i of a){let n=i,l="language";i.isCollapsed&&(n=i.start.parent,l=p._getStoreAttributeKey("language")),u?g.setAttribute(l,u,n):g.removeAttribute(l,n)}}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,r=e.document.selection;if(r.isCollapsed)return r.getAttribute("language")||!1;for(const s of r.getRanges())for(const o of s.getItems())if(t.checkAttribute(o,"language"))return o.getAttribute("language")||!1;return!1}}class M extends m{static get pluginName(){return"TextPartLanguageEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("language",{textPartLanguage:[{title:"Arabic",languageCode:"ar"},{title:"French",languageCode:"fr"},{title:"Spanish",languageCode:"es"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"language"}),e.model.schema.setAttributeProperties("language",{copyOnEnter:!0}),this._defineConverters(),e.commands.add("textPartLanguage",new D(e))}_defineConverters(){const e=this.editor.conversion;e.for("upcast").elementToAttribute({model:{key:"language",value:t=>{const r=t.getAttribute("lang"),s=t.getAttribute("dir");return f(r,s)}},view:{name:"span",attributes:{lang:/[\s\S]+/}}}),e.for("downcast").attributeToElement({model:"language",view:(t,{writer:r},s)=>{if(!t||!s.item.is("$textProxy")&&!s.item.is("documentSelection"))return;const{languageCode:o,textDirection:u}=v(t);return r.createAttributeElement("span",{lang:o,dir:u})}})}}class I extends m{static get pluginName(){return"TextPartLanguageUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,r=t("Choose language"),s=t("Language");e.ui.componentFactory.add("textPartLanguage",o=>{const{definitions:u,titles:g}=this._getItemMetadata(),a=e.commands.get("textPartLanguage"),i=h(o);return C(i,u,{ariaLabel:s,role:"menu"}),i.buttonView.set({ariaLabel:s,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:s}),i.extendTemplate({attributes:{class:["ck-text-fragment-language-dropdown"]}}),i.bind("isEnabled").to(a,"isEnabled"),i.buttonView.bind("label").to(a,"value",n=>n&&g[n]||r),i.buttonView.bind("ariaLabel").to(a,"value",n=>{const l=n&&g[n];return l?`${l}, ${s}`:s}),this.listenTo(i,"execute",n=>{a.execute({languageCode:n.source.languageCode,textDirection:n.source.textDirection}),e.editing.view.focus()}),i}),e.ui.componentFactory.add("menuBar:textPartLanguage",o=>{const{definitions:u}=this._getItemMetadata(),g=e.commands.get("textPartLanguage"),a=new A(o);a.buttonView.set({label:s});const i=new P(o);i.set({ariaLabel:t("Language"),role:"menu"});for(const n of u){if(n.type!="button"){i.items.add(new T(o));continue}const l=new V(o,a),d=new y(o);d.set({role:"menuitemradio",isToggleable:!0}),d.bind(...Object.keys(n.model)).to(n.model),d.delegate("execute").to(a),l.children.add(d),i.items.add(l)}return a.bind("isEnabled").to(g,"isEnabled"),a.panelView.children.add(i),a.on("execute",n=>{g.execute({languageCode:n.source.languageCode,textDirection:n.source.textDirection}),e.editing.view.focus()}),a})}_getItemMetadata(){const e=this.editor,t=new w,r={},s=e.commands.get("textPartLanguage"),o=e.config.get("language.textPartLanguage"),u=e.locale.t,g=u("Remove language");t.add({type:"button",model:new b({label:g,languageCode:!1,withText:!0})}),t.add({type:"separator"});for(const a of o){const i={type:"button",model:new b({label:a.title,languageCode:a.languageCode,role:"menuitemradio",textDirection:a.textDirection,withText:!0})},n=f(a.languageCode,a.textDirection);i.model.bind("isOn").to(s,"value",l=>l===n),t.add(i),r[n]=a.title}return{definitions:t,titles:r}}}class B extends m{static get requires(){return[M,I]}static get pluginName(){return"TextPartLanguage"}static get isOfficialPlugin(){return!0}}export{B as TextPartLanguage,D as TextPartLanguageCommand,M as TextPartLanguageEditing,I as TextPartLanguageUI,v as _parseLanguageAttribute,f as _stringifyLanguageAttribute};
|