@ncino/web-components 4.0.0-preview.9 → 4.0.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.
Files changed (254) hide show
  1. package/dist/assets/node_modules/.pnpm/{ckeditor5@45.0.0 → ckeditor5@45.1.0}/node_modules/ckeditor5/dist/ckeditor5.css +1 -1
  2. package/dist/components/accordion/gator/base/accordion.gator.js +1 -1
  3. package/dist/components/accordion/gator/group/accordion-group.gator.js +1 -1
  4. package/dist/components/alert/gator/base/alert.gator.js +1 -1
  5. package/dist/components/banner/gator/banner.gator.js +1 -1
  6. package/dist/components/button/gator/button.gator.js +1 -1
  7. package/dist/components/card/gator/base/card.gator.js +4 -2
  8. package/dist/components/checkbox/checkbox.gator.js +1 -1
  9. package/dist/components/combobox/base/combobox.js +1 -1
  10. package/dist/components/combobox/base/combobox.slds.js +8 -8
  11. package/dist/components/date-picker/base/datepicker.js +1 -1
  12. package/dist/components/date-picker/base/gator/datepicker.gator.js +15 -14
  13. package/dist/components/display-card/gator/display-card.gator.js +1 -1
  14. package/dist/components/headline-card/gator/headline-card.gator.js +1 -1
  15. package/dist/components/icon/gator/icon.gator.js +4 -4
  16. package/dist/components/icon/gator/index.js +1 -1
  17. package/dist/components/icon/gator/templates/chart-bar-horizontal.js +5 -0
  18. package/dist/components/icon/gator/templates/chart-bar.js +5 -0
  19. package/dist/components/icon/gator/templates/chart-donut.js +5 -0
  20. package/dist/components/icon/gator/templates/chart-line.js +5 -0
  21. package/dist/components/icon/gator/templates/chart-pie.js +5 -0
  22. package/dist/components/icon/gator/templates/chart-scatter.js +5 -0
  23. package/dist/components/icon/gator/templates/checkerboard.js +5 -0
  24. package/dist/components/icon/gator/templates/exclude-square.js +5 -0
  25. package/dist/components/icon/gator/templates/grid-four.js +5 -0
  26. package/dist/components/icon/gator/templates/grid-nine.js +5 -0
  27. package/dist/components/icon/gator/templates/index.js +1 -1
  28. package/dist/components/icon/gator/templates/kanban.js +5 -0
  29. package/dist/components/icon/gator/templates/lightbulb-filament.js +5 -0
  30. package/dist/components/icon/gator/templates/list-star.js +5 -0
  31. package/dist/components/icon/gator/templates/selection.js +5 -0
  32. package/dist/components/icon/gator/templates/square-split-horizontal.js +5 -0
  33. package/dist/components/icon/gator/templates/square-split-vertical.js +5 -0
  34. package/dist/components/icon/gator/templates/square.js +5 -0
  35. package/dist/components/icon/gator/templates/table.js +5 -0
  36. package/dist/components/icon/gator/templates/text-aa.js +5 -0
  37. package/dist/components/icon/gator/templates/trend-up.js +5 -0
  38. package/dist/components/input/base/input-base.gator.js +6 -5
  39. package/dist/components/input/base/input-base.js +1 -1
  40. package/dist/components/input/gator/dropdown/input-dropdown.gator.js +6 -5
  41. package/dist/components/input/gator/help-text/help-text.gator.js +1 -1
  42. package/dist/components/input/gator/input-date/input-date.gator.js +52 -18
  43. package/dist/components/input/gator/input-file/file-uploaded-preview/file-upload-preview.gator.js +1 -1
  44. package/dist/components/input/gator/input-file/input-file.gator.js +1 -1
  45. package/dist/components/input/gator/input-label/input-label.gator.js +4 -4
  46. package/dist/components/input/gator/input-text/input-text.gator.js +5 -3
  47. package/dist/components/input/gator/input-textarea/input-textarea.gator.js +4 -3
  48. package/dist/components/input/gator/input-time/input-time.gator.js +2 -2
  49. package/dist/components/input-rich-text/ckeditor-config.js +1 -1
  50. package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
  51. package/dist/components/list/gator/list-item/list-item.gator.js +1 -1
  52. package/dist/components/menu/base/gator/menu.gator.js +3 -3
  53. package/dist/components/menu/menu-item/menu-item.js +1 -1
  54. package/dist/components/panel/gator/panel.storybook-test.js +1 -1
  55. package/dist/components/popover/gator/popover.gator.js +49 -0
  56. package/dist/components/popover/index.js +1 -0
  57. package/dist/components/popover/popover.js +1 -0
  58. package/dist/components/radio-group/radio-group.gator.js +1 -1
  59. package/dist/components/selection-box/selection-box.gator.js +1 -1
  60. package/dist/components/table/gator/table-pagination/table-pagination.gator.js +1 -1
  61. package/dist/index.gator.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-alignment@45.0.0 → @ckeditor_ckeditor5-alignment@45.1.0}/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +1 -1
  64. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autoformat@45.0.0 → @ckeditor_ckeditor5-autoformat@45.1.0}/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -1
  65. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autosave@45.0.0 → @ckeditor_ckeditor5-autosave@45.1.0}/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -1
  66. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-basic-styles@45.0.0 → @ckeditor_ckeditor5-basic-styles@45.1.0}/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +1 -1
  67. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-block-quote@45.0.0 → @ckeditor_ckeditor5-block-quote@45.1.0}/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +1 -1
  68. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-clipboard@45.0.0 → @ckeditor_ckeditor5-clipboard@45.1.0}/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +2 -2
  69. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-cloud-services@45.0.0 → @ckeditor_ckeditor5-cloud-services@45.1.0}/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +1 -1
  70. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-code-block@45.1.0/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +7 -0
  71. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +4 -0
  72. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@45.1.0/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +4 -0
  73. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-engine@45.0.0 → @ckeditor_ckeditor5-engine@45.1.0}/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +11 -11
  74. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-enter@45.0.0 → @ckeditor_ckeditor5-enter@45.1.0}/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -1
  75. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-essentials@45.0.0 → @ckeditor_ckeditor5-essentials@45.1.0}/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -1
  76. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-find-and-replace@45.0.0 → @ckeditor_ckeditor5-find-and-replace@45.1.0}/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +1 -1
  77. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-font@45.0.0 → @ckeditor_ckeditor5-font@45.1.0}/node_modules/@ckeditor/ckeditor5-font/dist/index.js +1 -1
  78. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-heading@45.0.0 → @ckeditor_ckeditor5-heading@45.1.0}/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -1
  79. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-highlight@45.0.0 → @ckeditor_ckeditor5-highlight@45.1.0}/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +1 -1
  80. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-horizontal-line@45.0.0 → @ckeditor_ckeditor5-horizontal-line@45.1.0}/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +1 -1
  81. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-embed@45.0.0 → @ckeditor_ckeditor5-html-embed@45.1.0}/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +1 -1
  82. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-support@45.0.0 → @ckeditor_ckeditor5-html-support@45.1.0}/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +4 -4
  83. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@45.1.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +10 -0
  84. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-indent@45.0.0 → @ckeditor_ckeditor5-indent@45.1.0}/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +1 -1
  85. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-language@45.0.0 → @ckeditor_ckeditor5-language@45.1.0}/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -1
  86. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-link@45.0.0 → @ckeditor_ckeditor5-link@45.1.0}/node_modules/@ckeditor/ckeditor5-link/dist/index.js +2 -2
  87. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-list@45.0.0 → @ckeditor_ckeditor5-list@45.1.0}/node_modules/@ckeditor/ckeditor5-list/dist/index.js +1 -1
  88. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-markdown-gfm@45.0.0 → @ckeditor_ckeditor5-markdown-gfm@45.1.0}/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +1 -1
  89. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-media-embed@45.0.0 → @ckeditor_ckeditor5-media-embed@45.1.0}/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +1 -1
  90. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-mention@45.0.0 → @ckeditor_ckeditor5-mention@45.1.0}/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -1
  91. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-page-break@45.0.0 → @ckeditor_ckeditor5-page-break@45.1.0}/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +1 -1
  92. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paragraph@45.0.0 → @ckeditor_ckeditor5-paragraph@45.1.0}/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +1 -1
  93. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paste-from-office@45.0.0 → @ckeditor_ckeditor5-paste-from-office@45.1.0}/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +5 -5
  94. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-remove-format@45.0.0 → @ckeditor_ckeditor5-remove-format@45.1.0}/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +1 -1
  95. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-select-all@45.0.0 → @ckeditor_ckeditor5-select-all@45.1.0}/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +1 -1
  96. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-show-blocks@45.0.0 → @ckeditor_ckeditor5-show-blocks@45.1.0}/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +1 -1
  97. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-source-editing@45.0.0 → @ckeditor_ckeditor5-source-editing@45.1.0}/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +1 -1
  98. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-special-characters@45.0.0 → @ckeditor_ckeditor5-special-characters@45.1.0}/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +1 -1
  99. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-style@45.0.0 → @ckeditor_ckeditor5-style@45.1.0}/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -1
  100. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@45.1.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +16 -0
  101. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@45.1.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +13 -0
  102. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@45.1.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +28 -0
  103. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-undo@45.0.0 → @ckeditor_ckeditor5-undo@45.1.0}/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +1 -1
  104. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-upload@45.0.0 → @ckeditor_ckeditor5-upload@45.1.0}/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -1
  105. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-utils@45.0.0 → @ckeditor_ckeditor5-utils@45.1.0}/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +15 -15
  106. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@45.1.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +4 -0
  107. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
  108. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
  109. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +1 -1
  110. package/dist/node_modules/.pnpm/{@storybook_instrumenter@8.6.12_storybook@8.6.12_prettier@3.5.3_ → @storybook_instrumenter@8.6.14_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/instrumenter/dist/index.js +1 -1
  111. package/dist/node_modules/.pnpm/{@storybook_test@8.6.12_storybook@8.6.12_prettier@3.5.3_ → @storybook_test@8.6.14_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/test/dist/index.js +2 -2
  112. package/dist/node_modules/.pnpm/{@vitest_expect@3.1.3 → @vitest_expect@3.1.4}/node_modules/@vitest/expect/dist/index.js +1 -1
  113. package/dist/node_modules/.pnpm/{@vitest_runner@3.1.3 → @vitest_runner@3.1.4}/node_modules/@vitest/runner/dist/index.js +1 -1
  114. package/dist/node_modules/.pnpm/{@vitest_snapshot@3.1.3 → @vitest_snapshot@3.1.4}/node_modules/@vitest/snapshot/dist/index.js +1 -1
  115. package/dist/node_modules/.pnpm/{@vitest_utils@3.1.3 → @vitest_utils@3.1.4}/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +1 -1
  116. package/dist/node_modules/.pnpm/{@vitest_utils@3.1.3 → @vitest_utils@3.1.4}/node_modules/@vitest/utils/dist/diff.js +1 -1
  117. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js +1 -0
  118. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/applyBind.js +1 -0
  119. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js +1 -0
  120. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js +1 -0
  121. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js +1 -0
  122. package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js +1 -0
  123. package/dist/node_modules/.pnpm/call-bind@1.0.8/node_modules/call-bind/index.js +1 -0
  124. package/dist/node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js +1 -0
  125. package/dist/node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js +1 -0
  126. package/dist/node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js +1 -0
  127. package/dist/node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js +1 -0
  128. package/dist/node_modules/.pnpm/for-each@0.3.5/node_modules/for-each/index.js +1 -0
  129. package/dist/node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js +1 -0
  130. package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js +1 -0
  131. package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js +1 -0
  132. package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js +1 -0
  133. package/dist/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js +1 -0
  134. package/dist/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js +1 -0
  135. package/dist/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js +1 -0
  136. package/dist/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js +1 -0
  137. package/dist/node_modules/.pnpm/is-arguments@1.2.0/node_modules/is-arguments/index.js +1 -0
  138. package/dist/node_modules/.pnpm/is-generator-function@1.1.0/node_modules/is-generator-function/index.js +1 -0
  139. package/dist/node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js +1 -0
  140. package/dist/node_modules/.pnpm/{is-typed-array@1.1.13 → is-typed-array@1.1.15}/node_modules/is-typed-array/index.js +1 -1
  141. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js +1 -0
  142. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js +1 -0
  143. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js +1 -0
  144. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js +1 -0
  145. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js +1 -0
  146. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js +1 -0
  147. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js +1 -0
  148. package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js +1 -0
  149. package/dist/node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js +1 -0
  150. package/dist/node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js +1 -1
  151. package/dist/node_modules/.pnpm/{vitest@3.1.3_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.3_@vitest_ui@3_2e2b9607d5b1537fcaa69fd02e1b9b3d → vitest@3.1.4_@types_debug@4.1.12_@types_node@22.15.21_@vitest_browser@3.1.4_@vitest_ui@_b157c97eca1209d41387a466815fb09f}/node_modules/vitest/dist/chunks/utils.CgTj3MsC.js +1 -1
  152. package/dist/node_modules/.pnpm/{vitest@3.1.3_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.3_@vitest_ui@3_2e2b9607d5b1537fcaa69fd02e1b9b3d → vitest@3.1.4_@types_debug@4.1.12_@types_node@22.15.21_@vitest_browser@3.1.4_@vitest_ui@_b157c97eca1209d41387a466815fb09f}/node_modules/vitest/dist/chunks/vi.ClIskdbk.js +1 -1
  153. package/dist/node_modules/.pnpm/which-typed-array@1.1.19/node_modules/which-typed-array/index.js +1 -0
  154. package/dist/packages/web-components/public/styles/gator/gator-global-styles.css.js +1 -0
  155. package/dist/packages/web-components/src/components/alert/gator/base/alert.gator.scss.js +1 -1
  156. package/dist/packages/web-components/src/components/banner/gator/banner.gator.scss.js +1 -1
  157. package/dist/packages/web-components/src/components/card/gator/base/card.gator.scss.js +1 -1
  158. package/dist/packages/web-components/src/components/chip/gator/chip.gator.scss.js +1 -1
  159. package/dist/packages/web-components/src/components/date-picker/base/gator/datepicker.gator.scss.js +1 -1
  160. package/dist/packages/web-components/src/components/icon/gator/icon.gator.scss.js +1 -1
  161. package/dist/packages/web-components/src/components/icon-button/gator/icon-button.gator.scss.js +1 -1
  162. package/dist/packages/web-components/src/components/input/gator/dropdown/input-dropdown.gator.scss.js +1 -1
  163. package/dist/packages/web-components/src/components/input/gator/help-text/help-text.gator.scss.js +1 -1
  164. package/dist/packages/web-components/src/components/input/gator/input-date/input-date.gator.scss.js +1 -1
  165. package/dist/packages/web-components/src/components/input/gator/input-label/input-label.gator.scss.js +1 -1
  166. package/dist/packages/web-components/src/components/input/input.gator.scss.js +1 -1
  167. package/dist/packages/web-components/src/components/popover/gator/popover.gator.scss.js +1 -0
  168. package/dist/packages/web-components/src/components/popover/popover.scss.js +1 -0
  169. package/dist/packages/web-components/src/components/text-detail/gator/text-detail.gator.scss.js +1 -1
  170. package/dist/packages/web-components/src/components/toast/gator/base/toast.gator.scss.js +1 -1
  171. package/dist/packages/web-components/src/tokens/semantic.tokens.scss.js +1 -1
  172. package/dist/types/components/combobox/base/combobox.slds.d.ts +6 -0
  173. package/dist/types/components/date-picker/base/datepicker.d.ts +2 -16
  174. package/dist/types/components/date-picker/base/gator/datepicker.gator.d.ts +2 -16
  175. package/dist/types/components/icon/gator/icon.gator.d.ts +9 -2
  176. package/dist/types/components/icon/gator/templates/chart-bar-horizontal.d.ts +1 -0
  177. package/dist/types/components/icon/gator/templates/chart-bar.d.ts +1 -0
  178. package/dist/types/components/icon/gator/templates/chart-donut.d.ts +1 -0
  179. package/dist/types/components/icon/gator/templates/chart-line.d.ts +1 -0
  180. package/dist/types/components/icon/gator/templates/chart-pie.d.ts +1 -0
  181. package/dist/types/components/icon/gator/templates/chart-scatter.d.ts +1 -0
  182. package/dist/types/components/icon/gator/templates/checkerboard.d.ts +1 -0
  183. package/dist/types/components/icon/gator/templates/exclude-square.d.ts +1 -0
  184. package/dist/types/components/icon/gator/templates/grid-four.d.ts +1 -0
  185. package/dist/types/components/icon/gator/templates/grid-nine.d.ts +1 -0
  186. package/dist/types/components/icon/gator/templates/index.d.ts +20 -0
  187. package/dist/types/components/icon/gator/templates/kanban.d.ts +1 -0
  188. package/dist/types/components/icon/gator/templates/lightbulb-filament.d.ts +1 -0
  189. package/dist/types/components/icon/gator/templates/list-star.d.ts +1 -0
  190. package/dist/types/components/icon/gator/templates/selection.d.ts +1 -0
  191. package/dist/types/components/icon/gator/templates/square-split-horizontal.d.ts +1 -0
  192. package/dist/types/components/icon/gator/templates/square-split-vertical.d.ts +1 -0
  193. package/dist/types/components/icon/gator/templates/square.d.ts +1 -0
  194. package/dist/types/components/icon/gator/templates/table.d.ts +1 -0
  195. package/dist/types/components/icon/gator/templates/text-aa.d.ts +1 -0
  196. package/dist/types/components/icon/gator/templates/trend-up.d.ts +1 -0
  197. package/dist/types/components/icon-button/gator/icon-button.gator.d.ts +1 -1
  198. package/dist/types/components/input/base/input-base.d.ts +5 -0
  199. package/dist/types/components/input/base/input-base.gator.d.ts +6 -0
  200. package/dist/types/components/input/gator/dropdown/input-dropdown.gator.d.ts +7 -2
  201. package/dist/types/components/input/gator/input-date/input-date.gator.d.ts +50 -37
  202. package/dist/types/components/input/gator/input-label/input-label.gator.d.ts +4 -1
  203. package/dist/types/components/input/gator/input-text/input-text.gator.d.ts +1 -2
  204. package/dist/types/components/loading-spinner/gator/loading-spinner.gator.test.d.ts +0 -0
  205. package/dist/types/components/popover/gator/popover.gator.d.ts +31 -0
  206. package/dist/types/components/popover/gator/popover.gator.test.d.ts +0 -0
  207. package/dist/types/components/popover/index.d.ts +1 -0
  208. package/dist/types/components/popover/popover.d.ts +79 -0
  209. package/dist/types/index.d.ts +1 -0
  210. package/dist/types/index.gator.d.ts +1 -0
  211. package/dist/types/utils/accessibility-utils.d.ts +1 -0
  212. package/dist/types/utils/components/slot-placeholder/slot-placeholder.d.ts +1 -1
  213. package/dist/types/utils/storybook-args.d.ts +9 -0
  214. package/dist/types/utils/vitest-utils.d.ts +1 -0
  215. package/dist/utils/accessibility-utils.js +1 -1
  216. package/dist/utils/components/slot-placeholder/slot-placeholder.js +3 -4
  217. package/dist/utils/storybook-args.js +1 -1
  218. package/dist/utils/vitest-a11y-utils.js +1 -1
  219. package/dist/utils/vitest-utils.js +1 -1
  220. package/package.json +8 -6
  221. package/web-types.json +217 -127
  222. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-code-block@45.0.0/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +0 -7
  223. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +0 -4
  224. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@45.0.0/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +0 -4
  225. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@45.0.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +0 -10
  226. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@45.0.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +0 -16
  227. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@45.0.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +0 -13
  228. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +0 -28
  229. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@45.0.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +0 -4
  230. package/dist/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js +0 -1
  231. package/dist/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js +0 -1
  232. package/dist/node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js +0 -1
  233. package/dist/node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js +0 -1
  234. package/dist/node_modules/.pnpm/is-generator-function@1.0.10/node_modules/is-generator-function/index.js +0 -1
  235. package/dist/node_modules/.pnpm/which-typed-array@1.1.15/node_modules/which-typed-array/index.js +0 -1
  236. package/dist/packages/web-components/src/components/input/gator/input-label/input-label.gator.tokens.scss.js +0 -1
  237. /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-icons@45.0.0 → @ckeditor_ckeditor5-icons@45.1.0}/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +0 -0
  238. /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-watchdog@45.0.0 → @ckeditor_ckeditor5-watchdog@45.1.0}/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +0 -0
  239. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/channels/index.js +0 -0
  240. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/client-logger/index.js +0 -0
  241. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/core-events/index.js +0 -0
  242. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/csf/index.js +0 -0
  243. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/preview-api/index.js +0 -0
  244. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/preview-errors.js +0 -0
  245. /package/dist/node_modules/.pnpm/{@vitest_browser@3.1.3_msw@2.7.3_@types_node@22.15.3_typescript@5.8.3__playwright@1.52.0_874804df4c9de8b0f916251804782fb9 → @vitest_browser@3.1.4_msw@2.7.3_@types_node@22.15.21_typescript@5.8.3__playwright@1.52._ce6a4a1e71cccb66c0847e643d956555}/node_modules/@vitest/browser/context.js +0 -0
  246. /package/dist/node_modules/.pnpm/{@vitest_pretty-format@3.1.3 → @vitest_pretty-format@3.1.4}/node_modules/@vitest/pretty-format/dist/index.js +0 -0
  247. /package/dist/node_modules/.pnpm/{@vitest_runner@3.1.3 → @vitest_runner@3.1.4}/node_modules/@vitest/runner/dist/chunk-tasks.js +0 -0
  248. /package/dist/node_modules/.pnpm/{@vitest_spy@3.1.3 → @vitest_spy@3.1.4}/node_modules/@vitest/spy/dist/index.js +0 -0
  249. /package/dist/node_modules/.pnpm/{@vitest_utils@3.1.3 → @vitest_utils@3.1.4}/node_modules/@vitest/utils/dist/error.js +0 -0
  250. /package/dist/node_modules/.pnpm/{@vitest_utils@3.1.3 → @vitest_utils@3.1.4}/node_modules/@vitest/utils/dist/helpers.js +0 -0
  251. /package/dist/node_modules/.pnpm/{@vitest_utils@3.1.3 → @vitest_utils@3.1.4}/node_modules/@vitest/utils/dist/index.js +0 -0
  252. /package/dist/node_modules/.pnpm/{@vitest_utils@3.1.3 → @vitest_utils@3.1.4}/node_modules/@vitest/utils/dist/source-map.js +0 -0
  253. /package/dist/node_modules/.pnpm/{vitest@3.1.3_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.3_@vitest_ui@3_2e2b9607d5b1537fcaa69fd02e1b9b3d → vitest@3.1.4_@types_debug@4.1.12_@types_node@22.15.21_@vitest_browser@3.1.4_@vitest_ui@_b157c97eca1209d41387a466815fb09f}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -0
  254. /package/dist/node_modules/.pnpm/{vitest@3.1.3_@types_debug@4.1.12_@types_node@22.15.3_@vitest_browser@3.1.3_@vitest_ui@3_2e2b9607d5b1537fcaa69fd02e1b9b3d → vitest@3.1.4_@types_debug@4.1.12_@types_node@22.15.21_@vitest_browser@3.1.4_@vitest_ui@_b157c97eca1209d41387a466815fb09f}/node_modules/vitest/dist/chunks/date.CDOsz-HY.js +0 -0
@@ -1,4 +1,4 @@
1
- import{Plugin as m,Command as E}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Observer as b,BubblingEventInfo as v,DomEventData as k}from"../../../../../@ckeditor_ckeditor5-engine@45.0.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{env as S}from"../../../../../@ckeditor_ckeditor5-utils@45.0.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
1
+ import{Plugin as m,Command as E}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Observer as b,BubblingEventInfo as v,DomEventData as k}from"../../../../../@ckeditor_ckeditor5-engine@45.1.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{env as S}from"../../../../../@ckeditor_ckeditor5-utils@45.1.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  *//**
@@ -1,4 +1,4 @@
1
- import{Plugin as t}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Clipboard as r}from"../../../../../@ckeditor_ckeditor5-clipboard@45.0.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{Enter as i,ShiftEnter as e}from"../../../../../@ckeditor_ckeditor5-enter@45.0.0/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{SelectAll as o}from"../../../../../@ckeditor_ckeditor5-select-all@45.0.0/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js";import{Typing as s}from"../../../../../@ckeditor_ckeditor5-typing@45.0.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{Undo as m}from"../../../../../@ckeditor_ckeditor5-undo@45.0.0/node_modules/@ckeditor/ckeditor5-undo/dist/index.js";import{AccessibilityHelp as l}from"../../../../../@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
1
+ import{Plugin as t}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Clipboard as r}from"../../../../../@ckeditor_ckeditor5-clipboard@45.1.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{Enter as i,ShiftEnter as e}from"../../../../../@ckeditor_ckeditor5-enter@45.1.0/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{SelectAll as o}from"../../../../../@ckeditor_ckeditor5-select-all@45.1.0/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js";import{Typing as s}from"../../../../../@ckeditor_ckeditor5-typing@45.1.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{Undo as m}from"../../../../../@ckeditor_ckeditor5-undo@45.1.0/node_modules/@ckeditor/ckeditor5-undo/dist/index.js";import{AccessibilityHelp as l}from"../../../../../@ckeditor_ckeditor5-ui@45.1.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class d extends t{static get requires(){return[l,r,i,o,e,s,m]}static get pluginName(){return"Essentials"}static get isOfficialPlugin(){return!0}}export{d as Essentials};
@@ -1,4 +1,4 @@
1
- var v=Object.defineProperty;var F=(c,r,t)=>r in c?v(c,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[r]=t;var u=(c,r,t)=>F(c,typeof r!="symbol"?r+"":r,t);import{Plugin as _,Command as w}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{IconFindReplace as b,IconPreviousArrow as V}from"../../../../../@ckeditor_ckeditor5-icons@45.0.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{Dialog as B,DropdownView as A,createDropdown as I,FormHeaderView as E,ButtonView as k,MenuBarMenuListItemButtonView as D,DialogViewPosition as O,CssTransitionDisablerMixin as S,View as p,ViewCollection as P,FocusCycler as N,submitHandler as M,CollapsibleView as H,SwitchButtonView as R,LabeledFieldView as W,createLabeledInputText as $}from"../../../../../@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{scrollViewportToShowTarget as L,Collection as x,uid as U,ObservableMixin as q,FocusTracker as G,KeystrokeHandler as K,isVisible as j,Rect as z}from"../../../../../@ckeditor_ckeditor5-utils@45.0.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{debounce as Q}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/debounce.js";import{escapeRegExp as Z}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js";/**
1
+ var v=Object.defineProperty;var F=(c,r,t)=>r in c?v(c,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[r]=t;var u=(c,r,t)=>F(c,typeof r!="symbol"?r+"":r,t);import{Plugin as _,Command as w}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{IconFindReplace as b,IconPreviousArrow as V}from"../../../../../@ckeditor_ckeditor5-icons@45.1.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{Dialog as B,DropdownView as A,createDropdown as I,FormHeaderView as E,ButtonView as k,MenuBarMenuListItemButtonView as D,DialogViewPosition as O,CssTransitionDisablerMixin as S,View as p,ViewCollection as P,FocusCycler as N,submitHandler as M,CollapsibleView as H,SwitchButtonView as R,LabeledFieldView as W,createLabeledInputText as $}from"../../../../../@ckeditor_ckeditor5-ui@45.1.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{scrollViewportToShowTarget as L,Collection as x,uid as U,ObservableMixin as q,FocusTracker as G,KeystrokeHandler as K,isVisible as j,Rect as z}from"../../../../../@ckeditor_ckeditor5-utils@45.1.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{debounce as Q}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/debounce.js";import{escapeRegExp as Z}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class J extends p{constructor(t){super(t);u(this,"children");u(this,"_findInputView");u(this,"_replaceInputView");u(this,"_findButtonView");u(this,"_findPrevButtonView");u(this,"_findNextButtonView");u(this,"_advancedOptionsCollapsibleView");u(this,"_matchCaseSwitchView");u(this,"_wholeWordsOnlySwitchView");u(this,"_replaceButtonView");u(this,"_replaceAllButtonView");u(this,"_inputsDivView");u(this,"_actionButtonsDivView");u(this,"_focusTracker");u(this,"_keystrokes");u(this,"_focusables");u(this,"focusCycler");const e=t.t;this.children=this.createCollection(),this.set("matchCount",0),this.set("highlightOffset",0),this.set("isDirty",!1),this.set("_areCommandsEnabled",{}),this.set("_resultsCounterText",""),this.set("_matchCase",!1),this.set("_wholeWordsOnly",!1),this.bind("_searchResultsFound").to(this,"matchCount",this,"isDirty",(i,s)=>i>0&&!s),this._findInputView=this._createInputField(e("Find in text…")),this._findPrevButtonView=this._createButton({label:e("Previous result"),class:"ck-button-prev",icon:V,keystroke:"Shift+F3",tooltip:!0}),this._findNextButtonView=this._createButton({label:e("Next result"),class:"ck-button-next",icon:V,keystroke:"F3",tooltip:!0}),this._replaceInputView=this._createInputField(e("Replace with…"),"ck-labeled-field-replace"),this._inputsDivView=this._createInputsDiv(),this._matchCaseSwitchView=this._createMatchCaseSwitch(),this._wholeWordsOnlySwitchView=this._createWholeWordsOnlySwitch(),this._advancedOptionsCollapsibleView=this._createAdvancedOptionsCollapsible(),this._replaceAllButtonView=this._createButton({label:e("Replace all"),class:"ck-button-replaceall",withText:!0}),this._replaceButtonView=this._createButton({label:e("Replace"),class:"ck-button-replace",withText:!0}),this._findButtonView=this._createButton({label:e("Find"),class:"ck-button-find ck-button-action",withText:!0}),this._actionButtonsDivView=this._createActionButtonsDiv(),this._focusTracker=new G,this._keystrokes=new K,this._focusables=new P,this.focusCycler=new N({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this._keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.addMany([this._inputsDivView,this._advancedOptionsCollapsibleView,this._actionButtonsDivView]),this.setTemplate({tag:"form",attributes:{class:["ck","ck-find-and-replace-form"],tabindex:"-1"},children:this.children})}render(){super.render(),M({view:this}),this._initFocusCycling(),this._initKeystrokeHandling()}destroy(){super.destroy(),this._focusTracker.destroy(),this._keystrokes.destroy()}focus(t){t===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}reset(){this._findInputView.errorText=null,this.isDirty=!0}get _textToFind(){return this._findInputView.fieldView.element.value}get _textToReplace(){return this._replaceInputView.fieldView.element.value}_createInputsDiv(){const t=this.locale,e=t.t,i=new p(t);return this._findInputView.fieldView.on("input",()=>{this.isDirty=!0}),this._findPrevButtonView.delegate("execute").to(this,"findPrevious"),this._findNextButtonView.delegate("execute").to(this,"findNext"),this._findPrevButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",({findPrevious:s})=>s),this._findNextButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",({findNext:s})=>s),this._injectFindResultsCounter(),this._replaceInputView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",({replace:s},n)=>s&&n),this._replaceInputView.bind("infoText").to(this._replaceInputView,"isEnabled",this._replaceInputView,"isFocused",(s,n)=>s||!n?"":e("Tip: Find some text first in order to replace it.")),i.setTemplate({tag:"div",attributes:{class:["ck","ck-find-and-replace-form__inputs"]},children:[this._findInputView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView]}),i}_onFindButtonExecute(){if(!this._textToFind){const t=this.t;this._findInputView.errorText=t("Text to find must not be empty.");return}this.isDirty=!1,this.fire("findNext",{searchText:this._textToFind,matchCase:this._matchCase,wholeWords:this._wholeWordsOnly})}_injectFindResultsCounter(){const t=this.locale,e=t.t,i=this.bindTemplate,s=new p(this.locale);this.bind("_resultsCounterText").to(this,"highlightOffset",this,"matchCount",(o,a)=>e("%0 of %1",[o,a])),s.setTemplate({tag:"span",attributes:{class:["ck","ck-results-counter",i.if("isDirty","ck-hidden")]},children:[{text:i.to("_resultsCounterText")}]});const n=()=>{const o=this._findInputView.fieldView.element;if(!o||!j(o))return;const a=new z(s.element).width,d=t.uiLanguageDirection==="ltr"?"paddingRight":"paddingLeft";a?o.style[d]=`calc( 2 * var(--ck-spacing-standard) + ${a}px )`:o.style[d]=""};this.on("change:_resultsCounterText",n,{priority:"low"}),this.on("change:isDirty",n,{priority:"low"}),this._findInputView.template.children[0].children.push(s)}_createAdvancedOptionsCollapsible(){const t=this.locale.t,e=new H(this.locale,[this._matchCaseSwitchView,this._wholeWordsOnlySwitchView]);return e.set({label:t("Advanced options"),isCollapsed:!0}),e}_createActionButtonsDiv(){const t=new p(this.locale);return this._replaceButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",({replace:e},i)=>e&&i),this._replaceAllButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",({replaceAll:e},i)=>e&&i),this._replaceButtonView.on("execute",()=>{this.fire("replace",{searchText:this._textToFind,replaceText:this._textToReplace})}),this._replaceAllButtonView.on("execute",()=>{this.fire("replaceAll",{searchText:this._textToFind,replaceText:this._textToReplace}),this.focus()}),this._findButtonView.on("execute",this._onFindButtonExecute.bind(this)),t.setTemplate({tag:"div",attributes:{class:["ck","ck-find-and-replace-form__actions"]},children:[this._replaceAllButtonView,this._replaceButtonView,this._findButtonView]}),t}_createMatchCaseSwitch(){const t=this.locale.t,e=new R(this.locale);return e.set({label:t("Match case"),withText:!0}),e.bind("isOn").to(this,"_matchCase"),e.on("execute",()=>{this._matchCase=!this._matchCase,this.isDirty=!0}),e}_createWholeWordsOnlySwitch(){const t=this.locale.t,e=new R(this.locale);return e.set({label:t("Whole words only"),withText:!0}),e.bind("isOn").to(this,"_wholeWordsOnly"),e.on("execute",()=>{this._wholeWordsOnly=!this._wholeWordsOnly,this.isDirty=!0}),e}_initFocusCycling(){[this._findInputView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView,this._advancedOptionsCollapsibleView.buttonView,this._matchCaseSwitchView,this._wholeWordsOnlySwitchView,this._replaceAllButtonView,this._replaceButtonView,this._findButtonView].forEach(e=>{this._focusables.add(e),this._focusTracker.add(e.element)})}_initKeystrokeHandling(){const t=i=>i.stopPropagation(),e=i=>{i.stopPropagation(),i.preventDefault()};this._keystrokes.listenTo(this.element),this._keystrokes.set("f3",i=>{e(i),this._findNextButtonView.fire("execute")}),this._keystrokes.set("shift+f3",i=>{e(i),this._findPrevButtonView.fire("execute")}),this._keystrokes.set("enter",i=>{const s=i.target;s===this._findInputView.fieldView.element?(this._areCommandsEnabled.findNext?this._findNextButtonView.fire("execute"):this._findButtonView.fire("execute"),e(i)):s===this._replaceInputView.fieldView.element&&!this.isDirty&&(this._replaceButtonView.fire("execute"),e(i))}),this._keystrokes.set("shift+enter",i=>{i.target===this._findInputView.fieldView.element&&(this._areCommandsEnabled.findPrevious?this._findPrevButtonView.fire("execute"):this._findButtonView.fire("execute"),e(i))}),this._keystrokes.set("arrowright",t),this._keystrokes.set("arrowleft",t),this._keystrokes.set("arrowup",t),this._keystrokes.set("arrowdown",t)}_createButton(t){const e=new k(this.locale);return e.set(t),e}_createInputField(t,e){const i=new W(this.locale,$);return i.label=t,i.class=e,i}}class X extends _{constructor(t){super(t);u(this,"formView");t.config.define("findAndReplace.uiType","dialog"),this.formView=null}static get requires(){return[B]}static get pluginName(){return"FindAndReplaceUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.config.get("findAndReplace.uiType")==="dropdown",i=t.commands.get("find"),s=this.editor.t;t.ui.componentFactory.add("findAndReplace",()=>{let n;return e?(n=this._createDropdown(),n.bind("isEnabled").to(i)):n=this._createDialogButtonForToolbar(),t.keystrokes.set("Ctrl+F",(o,a)=>{if(i.isEnabled){if(n instanceof A){const d=n.buttonView;d.isOn||d.fire("execute")}else n.isOn?t.plugins.get("Dialog").view.focus():n.fire("execute");a()}}),n}),e||t.ui.componentFactory.add("menuBar:findAndReplace",()=>this._createDialogButtonForMenuBar()),t.accessibility.addKeystrokeInfos({keystrokes:[{label:s("Find in the document"),keystroke:"CTRL+F"}]})}_createDropdown(){const t=this.editor,e=t.locale.t,i=I(t.locale);return i.once("change:isOpen",()=>{this.formView=this._createFormView(),this.formView.children.add(new E(t.locale,{label:e("Find and replace")}),0),i.panelView.children.add(this.formView)}),i.on("change:isOpen",(s,n,o)=>{o?this._setupFormView():this.fire("searchReseted")},{priority:"low"}),i.buttonView.set({icon:b,label:e("Find and replace"),keystroke:"CTRL+F",tooltip:!0}),i}_createDialogButtonForToolbar(){const t=this.editor,e=this._createButton(k),i=t.plugins.get("Dialog");return e.set({tooltip:!0}),e.bind("isOn").to(i,"id",s=>s==="findAndReplace"),e.on("execute",()=>{e.isOn?i.hide():this._showDialog()}),e}_createDialogButtonForMenuBar(){const t=this._createButton(D),e=this.editor.plugins.get("Dialog"),i=this.editor.plugins.get("Dialog");return t.set({role:"menuitemcheckbox",isToggleable:!0}),t.bind("isOn").to(i,"id",s=>s==="findAndReplace"),t.on("execute",()=>{if(e.id==="findAndReplace"){e.hide();return}this._showDialog()}),t}_createButton(t){const e=this.editor,i=e.commands.get("find"),s=new t(e.locale),n=e.locale.t;return s.bind("isEnabled").to(i),s.set({icon:b,label:n("Find and replace"),keystroke:"CTRL+F"}),s}_showDialog(){const t=this.editor,e=t.plugins.get("Dialog"),i=t.locale.t;this.formView||(this.formView=this._createFormView()),e.show({id:"findAndReplace",title:i("Find and replace"),content:this.formView,position:O.EDITOR_TOP_SIDE,onShow:()=>{this._setupFormView()},onHide:()=>{this.fire("searchReseted")}})}_createFormView(){const t=this.editor,e=new(S(J))(t.locale),i=t.commands,n=this.editor.plugins.get("FindAndReplaceEditing").state;e.bind("highlightOffset").to(n,"highlightedOffset"),e.listenTo(n.results,"change",()=>{e.matchCount=n.results.length});const o=i.get("findNext"),a=i.get("findPrevious"),d=i.get("replace"),l=i.get("replaceAll");return e.bind("_areCommandsEnabled").to(o,"isEnabled",a,"isEnabled",d,"isEnabled",l,"isEnabled",(h,g,f,m)=>({findNext:h,findPrevious:g,replace:f,replaceAll:m})),e.delegate("findNext","findPrevious","replace","replaceAll").to(this),e.on("change:isDirty",(h,g,f)=>{f&&this.fire("searchReseted")}),e}_setupFormView(){this.formView.disableCssTransitions(),this.formView.reset(),this.formView._findInputView.fieldView.select(),this.formView.enableCssTransitions()}}class Y extends w{constructor(t,e){super(t);u(this,"_state");this.isEnabled=!0,this.affectsData=!1,this._state=e}execute(t,{matchCase:e,wholeWords:i}={}){const{editor:s}=this,{model:n}=s,o=s.plugins.get("FindAndReplaceUtils");let a,d="";typeof t=="string"?a=(...g)=>({results:o.findByTextCallback(t,{matchCase:e,wholeWords:i})(...g),searchText:t}):a=t;const l=a;a=(...g)=>{const f=l(...g);return f&&"searchText"in f&&(d=f.searchText),f};const h=n.document.getRootNames().reduce((g,f)=>o.updateFindResultFromRange(n.createRangeIn(n.document.getRoot(f)),n,a,g),null);return this._state.clear(n),this._state.results.addMany(h),this._state.highlightedResult=h.get(0),this._state.searchText=d,a&&(this._state.lastSearchCallback=a),this._state.matchCase=!!e,this._state.matchWholeWords=!!i,{results:h,findCallback:a}}}class ee extends q(){constructor(r){super(),this.set("results",new x),this.set("highlightedResult",null),this.set("highlightedOffset",0),this.set("searchText",""),this.set("replaceText",""),this.set("lastSearchCallback",null),this.set("matchCase",!1),this.set("matchWholeWords",!1),this.results.on("change",(t,{removed:e,index:i})=>{if(Array.from(e).length){let s=!1;if(r.change(n=>{for(const o of e)this.highlightedResult===o&&(s=!0),r.markers.has(o.marker.name)&&n.removeMarker(o.marker)}),s){const n=i>=this.results.length?0:i;this.highlightedResult=this.results.get(n)}}}),this.on("change:highlightedResult",()=>{this.refreshHighlightOffset(r)})}clear(r){this.searchText="",r.change(t=>{if(this.highlightedResult){const e=this.highlightedResult.marker.name.split(":")[1],i=r.markers.get(`findResultHighlighted:${e}`);i&&t.removeMarker(i)}[...this.results].forEach(({marker:e})=>{t.removeMarker(e)})}),this.results.clear()}refreshHighlightOffset(r){const{highlightedResult:t,results:e}=this;t?this.highlightedOffset=C(r,[...e]).indexOf(t)+1:this.highlightedOffset=0}}function C(c,r){const t={before:-1,same:0,after:1,different:1};return c.document.getRootNames().flatMap(e=>r.filter(i=>i.marker.getStart().root.rootName===e).sort((i,s)=>t[i.marker.getStart().compareWith(s.marker.getStart())]))}class y extends w{constructor(t,e){super(t);u(this,"_state");this.isEnabled=!0,this._state=e,this._isEnabledBasedOnSelection=!1}_replace(t,e){const{model:i}=this.editor,s=e.marker.getRange();i.canEditAt(s)&&i.change(n=>{if(s.root.rootName==="$graveyard"){this._state.results.remove(e);return}let o={};for(const a of s.getItems())if(a.is("$text")||a.is("$textProxy")){o=a.getAttributes();break}i.insertContent(n.createText(t,o),s),this._state.results.has(e)&&this._state.results.remove(e)})}}class te extends y{execute(r,t){const e=Math.max(this._state.highlightedOffset-1,0);if(this._replace(r,t),this._state.results.length){const i=C(this.editor.model,[...this._state.results]);this._state.highlightedResult=i[e%i.length]}}}class ie extends y{execute(r,t){const{editor:e}=this,{model:i}=e,s=e.plugins.get("FindAndReplaceUtils"),n=t instanceof x?t:i.document.getRootNames().reduce((o,a)=>s.updateFindResultFromRange(i.createRangeIn(i.document.getRoot(a)),i,s.findByTextCallback(t,this._state),o),null);n.length&&i.change(()=>{[...n].forEach(o=>{this._replace(r,o)})})}}class T extends w{constructor(t,e){super(t);u(this,"_state");this.affectsData=!1,this._state=e,this.isEnabled=!1,this.listenTo(this._state.results,"change",()=>{this.isEnabled=this._state.results.length>1})}refresh(){this.isEnabled=this._state.results.length>1}execute(){const t=this._state.results,e=t.getIndex(this._state.highlightedResult),i=e+1>=t.length?0:e+1;this._state.highlightedResult=this._state.results.get(i)}}class se extends T{execute(){const t=this._state.results.getIndex(this._state.highlightedResult),e=t-1<0?this._state.results.length-1:t-1;this._state.highlightedResult=this._state.results.get(e)}}class ne extends _{static get pluginName(){return"FindAndReplaceUtils"}static get isOfficialPlugin(){return!0}updateFindResultFromRange(r,t,e,i){const s=i||new x,n=o=>s.find(a=>{const{marker:d}=a,l=d.getRange(),h=o.getRange();return l.isEqual(h)});return t.change(o=>{[...r].forEach(({type:a,item:d})=>{if(a==="elementStart"&&t.schema.checkChild(d,"$text")){let l=e({item:d,text:this.rangeToText(t.createRangeIn(d))});if(!l)return;"results"in l&&(l=l.results),l.forEach(h=>{const g=`findResult:${U()}`,f=o.addMarker(g,{usingOperation:!1,affectsData:!1,range:o.createRange(o.createPositionAt(d,h.start),o.createPositionAt(d,h.end))}),m=re(s,f);n(f)||s.add({id:g,label:h.label,marker:f},m)})}})}),s}rangeToText(r){return Array.from(r.getItems({shallow:!0})).reduce((t,e)=>e.is("$text")||e.is("$textProxy")?t+e.data:`${t}
@@ -1,4 +1,4 @@
1
- var j=Object.defineProperty;var H=(t,e,o)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var C=(t,e,o)=>H(t,typeof e!="symbol"?e+"":e,o);import{Plugin as h,Command as Y}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{createDropdown as A,addListToDropdown as L,MenuBarMenuView as V,MenuBarMenuListView as T,MenuBarMenuListItemView as E,MenuBarMenuListItemButtonView as D,normalizeColorOptions as W,getLocalizedColorOptions as Z,focusChildOnDropdownOpen as J,ColorSelectorView as I,ViewModel as _}from"../../../../../@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{CKEditorError as $,Collection as R}from"../../../../../@ckeditor_ckeditor5-utils@45.0.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconFontBackground as Q,IconFontColor as X,IconFontFamily as N,IconFontSize as z}from"../../../../../@ckeditor_ckeditor5-icons@45.0.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{addBackgroundRules as ee,isLength as te,isPercentage as oe}from"../../../../../@ckeditor_ckeditor5-engine@45.0.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";/**
1
+ var j=Object.defineProperty;var H=(t,e,o)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var C=(t,e,o)=>H(t,typeof e!="symbol"?e+"":e,o);import{Plugin as h,Command as Y}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{createDropdown as A,addListToDropdown as L,MenuBarMenuView as V,MenuBarMenuListView as T,MenuBarMenuListItemView as E,MenuBarMenuListItemButtonView as D,normalizeColorOptions as W,getLocalizedColorOptions as Z,focusChildOnDropdownOpen as J,ColorSelectorView as I,ViewModel as _}from"../../../../../@ckeditor_ckeditor5-ui@45.1.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{CKEditorError as $,Collection as R}from"../../../../../@ckeditor_ckeditor5-utils@45.1.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconFontBackground as Q,IconFontColor as X,IconFontFamily as N,IconFontSize as z}from"../../../../../@ckeditor_ckeditor5-icons@45.1.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{addBackgroundRules as ee,isLength as te,isPercentage as oe}from"../../../../../@ckeditor_ckeditor5-engine@45.1.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class x extends Y{constructor(o,n){super(o);C(this,"attributeKey");this.attributeKey=n}refresh(){const o=this.editor.model,n=o.document;this.value=n.selection.getAttribute(this.attributeKey),this.isEnabled=o.schema.checkAttributeInSelection(n.selection,this.attributeKey)}execute(o={}){const n=this.editor.model,r=n.document.selection,c=o.value,u=o.batch,s=l=>{if(r.isCollapsed)c?l.setSelectionAttribute(this.attributeKey,c):l.removeSelectionAttribute(this.attributeKey);else{const p=n.schema.getValidRanges(r.getRanges(),this.attributeKey);for(const g of p)c?l.setAttribute(this.attributeKey,c,g):l.removeAttribute(this.attributeKey,g)}};u?n.enqueueChange(u,l=>{s(l)}):n.change(l=>{s(l)})}}const d="fontSize",f="fontFamily",w="fontColor",y="fontBackgroundColor";function M(t,e){const o={model:{key:t,values:[]},view:{},upcastAlso:{}};for(const n of e)o.model.values.push(n.model),o.view[n.model]=n.view,n.upcastAlso&&(o.upcastAlso[n.model]=n.upcastAlso);return o}function U(t){return e=>ie(e.getStyle(t))}function G(t){return(e,{writer:o})=>o.createAttributeElement("span",{style:`${t}:${e}`},{priority:7})}function ne({dropdownView:t,colors:e,columns:o,removeButtonLabel:n,colorPickerLabel:i,documentColorsLabel:r,documentColorsCount:c,colorPickerViewConfig:u}){const s=t.locale,l=new I(s,{colors:e,columns:o,removeButtonLabel:n,colorPickerLabel:i,documentColorsLabel:r,documentColorsCount:c,colorPickerViewConfig:u});return t.colorSelectorView=l,t.panelView.children.add(l),l}function ie(t){return t.replace(/\s/g,"")}class re extends x{constructor(e){super(e,f)}}/**
@@ -1,4 +1,4 @@
1
- var v=Object.defineProperty;var E=(r,e,t)=>e in r?v(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var w=(r,e,t)=>E(r,typeof e!="symbol"?e+"":e,t);import{Plugin as f,Command as V}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Paragraph as x}from"../../../../../@ckeditor_ckeditor5-paragraph@45.0.0/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js";import{priorities as M,Collection as C,first as k}from"../../../../../@ckeditor_ckeditor5-utils@45.0.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{ViewModel as L,createDropdown as P,addListToDropdown as T,MenuBarMenuView as y,MenuBarMenuListView as B,MenuBarMenuListItemView as O,MenuBarMenuListItemButtonView as N}from"../../../../../@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import"../../../../../@ckeditor_ckeditor5-engine@45.0.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";/**
1
+ var v=Object.defineProperty;var E=(r,e,t)=>e in r?v(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var w=(r,e,t)=>E(r,typeof e!="symbol"?e+"":e,t);import{Plugin as f,Command as V}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Paragraph as x}from"../../../../../@ckeditor_ckeditor5-paragraph@45.1.0/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js";import{priorities as M,Collection as C,first as k}from"../../../../../@ckeditor_ckeditor5-utils@45.1.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{ViewModel as L,createDropdown as P,addListToDropdown as T,MenuBarMenuView as y,MenuBarMenuListView as B,MenuBarMenuListItemView as O,MenuBarMenuListItemButtonView as N}from"../../../../../@ckeditor_ckeditor5-ui@45.1.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import"../../../../../@ckeditor_ckeditor5-engine@45.1.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class I extends V{constructor(t,n){super(t);w(this,"modelElements");this.modelElements=n}refresh(){const t=k(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some(n=>b(t,n,this.editor.model.schema))}execute(t){const n=this.editor.model,l=n.document,m=t.value;n.change(c=>{const s=Array.from(l.selection.getSelectedBlocks()).filter(g=>b(g,m,n.schema));for(const g of s)g.is("element",m)||c.rename(g,m)})}}function b(r,e,t){return t.checkChild(r.parent,e)&&!t.isObject(r)}const H="paragraph";class _ extends f{static get pluginName(){return"HeadingEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[x]}init(){const e=this.editor,t=e.config.get("heading.options"),n=[];for(const l of t)l.model!=="paragraph"&&(e.model.schema.register(l.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(l),n.push(l.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new I(e,n))}afterInit(){const e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(l,m)=>{const c=e.model.document.selection.getFirstPosition().parent;n.some(g=>c.is("element",g.model))&&!c.is("element",H)&&c.childCount===0&&m.writer.rename(c,H)})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:M.low+1})}}/**
@@ -1,4 +1,4 @@
1
- import{Plugin as w,Command as V}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{IconEraser as k,IconMarker as x,IconPen as B}from"../../../../../@ckeditor_ckeditor5-icons@45.0.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as y,createDropdown as E,addToolbarToDropdown as H,MenuBarMenuView as M,MenuBarMenuListView as A,MenuBarMenuListItemView as f,MenuBarMenuListItemButtonView as v,ListSeparatorView as T,SplitButtonView as I,ToolbarSeparatorView as P}from"../../../../../@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
1
+ import{Plugin as w,Command as V}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{IconEraser as k,IconMarker as x,IconPen as B}from"../../../../../@ckeditor_ckeditor5-icons@45.1.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as y,createDropdown as E,addToolbarToDropdown as H,MenuBarMenuView as M,MenuBarMenuListView as A,MenuBarMenuListItemView as f,MenuBarMenuListItemButtonView as v,ListSeparatorView as T,SplitButtonView as I,ToolbarSeparatorView as P}from"../../../../../@ckeditor_ckeditor5-ui@45.1.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class O extends V{refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute("highlight"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"highlight")}execute(e={}){const t=this.editor.model,r=t.document.selection,o=e.value;t.change(i=>{if(r.isCollapsed){const s=r.getFirstPosition();if(r.hasAttribute("highlight")){const n=c=>c.item.hasAttribute("highlight")&&c.item.getAttribute("highlight")===this.value,h=s.getLastMatchingPosition(n,{direction:"backward"}),l=s.getLastMatchingPosition(n),u=i.createRange(h,l);!o||this.value===o?(s.isEqual(l)||i.removeAttribute("highlight",u),i.removeSelectionAttribute("highlight")):(s.isEqual(l)||i.setAttribute("highlight",o,u),i.setSelectionAttribute("highlight",o))}else o&&i.setSelectionAttribute("highlight",o)}else{const s=t.schema.getValidRanges(r.getRanges(),"highlight");for(const n of s)o?i.setAttribute("highlight",o,n):i.removeAttribute("highlight",n)}})}}class _ extends w{static get pluginName(){return"HighlightEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("highlight",{options:[{model:"yellowMarker",class:"marker-yellow",title:"Yellow marker",color:"var(--ck-highlight-marker-yellow)",type:"marker"},{model:"greenMarker",class:"marker-green",title:"Green marker",color:"var(--ck-highlight-marker-green)",type:"marker"},{model:"pinkMarker",class:"marker-pink",title:"Pink marker",color:"var(--ck-highlight-marker-pink)",type:"marker"},{model:"blueMarker",class:"marker-blue",title:"Blue marker",color:"var(--ck-highlight-marker-blue)",type:"marker"},{model:"redPen",class:"pen-red",title:"Red pen",color:"var(--ck-highlight-pen-red)",type:"pen"},{model:"greenPen",class:"pen-green",title:"Green pen",color:"var(--ck-highlight-pen-green)",type:"pen"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"highlight"});const t=e.config.get("highlight.options");e.conversion.attributeToElement(R(t)),e.commands.add("highlight",new O(e))}}function R(d){const e={model:{key:"highlight",values:[]},view:{}};for(const t of d)e.model.values.push(t.model),e.view[t.model]={name:"mark",classes:t.class};return e}class S extends w{get localizedOptionTitles(){const e=this.editor.t;return{"Yellow marker":e("Yellow marker"),"Green marker":e("Green marker"),"Pink marker":e("Pink marker"),"Blue marker":e("Blue marker"),"Red pen":e("Red pen"),"Green pen":e("Green pen")}}static get pluginName(){return"HighlightUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.config.get("highlight.options");for(const t of e)this._addHighlighterButton(t);this._addRemoveHighlightButton(),this._addDropdown(e),this._addMenuBarButton(e)}_addRemoveHighlightButton(){const e=this.editor.t,t=this.editor.commands.get("highlight");this._addButton("removeHighlight",e("Remove highlight"),k,null,g=>{g.bind("isEnabled").to(t,"isEnabled")})}_addHighlighterButton(e){const t=this.editor.commands.get("highlight");this._addButton("highlight:"+e.model,e.title,b(e.type),e.model,g);function g(r){r.bind("isEnabled").to(t,"isEnabled"),r.bind("isOn").to(t,"value",o=>o===e.model),r.iconView.fillColor=e.color,r.isToggleable=!0}}_addButton(e,t,g,r,o){const i=this.editor;i.ui.componentFactory.add(e,s=>{const n=new y(s),h=this.localizedOptionTitles[t]?this.localizedOptionTitles[t]:t;return n.set({label:h,icon:g,tooltip:!0}),n.on("execute",()=>{i.execute("highlight",{value:r}),i.editing.view.focus()}),o(n),n})}_addDropdown(e){const t=this.editor,g=t.t,r=t.ui.componentFactory,o=e[0],i=e.reduce((s,n)=>(s[n.model]=n,s),{});r.add("highlight",s=>{const n=t.commands.get("highlight"),h=E(s,I),l=h.buttonView;l.set({label:g("Highlight"),tooltip:!0,lastExecuted:o.model,commandValue:o.model,isToggleable:!0}),l.bind("icon").to(n,"value",a=>b(c(a,"type"))),l.bind("color").to(n,"value",a=>c(a,"color")),l.bind("commandValue").to(n,"value",a=>c(a,"model")),l.bind("isOn").to(n,"value",a=>!!a),l.delegate("execute").to(h);const u=()=>{const a=e.map(m=>{const p=r.create("highlight:"+m.model);return this.listenTo(p,"execute",()=>{h.buttonView.set({lastExecuted:m.model})}),p});return a.push(new P),a.push(r.create("removeHighlight")),a};h.bind("isEnabled").to(n,"isEnabled"),H(h,u,{enableActiveItemFocusOnDropdownOpen:!0,ariaLabel:g("Text highlight toolbar")}),C(h),l.on("execute",()=>{t.execute("highlight",{value:l.commandValue})}),this.listenTo(h,"execute",()=>{t.editing.view.focus()});function c(a,m){const p=!a||a===l.lastExecuted?l.lastExecuted:a;return i[p][m]}return h})}_addMenuBarButton(e){const t=this.editor,g=t.t,r=t.commands.get("highlight");t.ui.componentFactory.add("menuBar:highlight",o=>{const i=new M(o);i.buttonView.set({label:g("Highlight"),icon:b("marker")}),i.bind("isEnabled").to(r),i.buttonView.iconView.fillColor="transparent";const s=new A(o);for(const l of e){const u=new f(o,i),c=new v(o);c.set({label:l.title,icon:b(l.type),role:"menuitemradio",isToggleable:!0}),c.iconView.fillColor=l.color,c.delegate("execute").to(i),c.bind("isOn").to(r,"value",a=>a===l.model),c.on("execute",()=>{t.execute("highlight",{value:l.model}),t.editing.view.focus()}),u.children.add(c),s.items.add(u)}s.items.add(new T(o));const n=new f(o,i),h=new v(o);return h.set({label:g("Remove highlight"),icon:k}),h.delegate("execute").to(i),h.on("execute",()=>{t.execute("highlight",{value:null}),t.editing.view.focus()}),n.children.add(h),s.items.add(n),i.panelView.children.add(s),i})}}function C(d){d.buttonView.actionView.iconView.bind("fillColor").to(d.buttonView,"color")}function b(d){return d==="marker"?x:B}class G extends w{static get requires(){return[_,S]}static get pluginName(){return"Highlight"}static get isOfficialPlugin(){return!0}}export{G as Highlight,_ as HighlightEditing,S as HighlightUI};
@@ -1,4 +1,4 @@
1
- import{Plugin as s,Command as m}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Widget as u,toWidget as d,findOptimalInsertionRange as h}from"../../../../../@ckeditor_ckeditor5-widget@45.0.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{IconHorizontalLine as g}from"../../../../../@ckeditor_ckeditor5-icons@45.0.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as z,MenuBarMenuListItemButtonView as L}from"../../../../../@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
1
+ import{Plugin as s,Command as m}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Widget as u,toWidget as d,findOptimalInsertionRange as h}from"../../../../../@ckeditor_ckeditor5-widget@45.1.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{IconHorizontalLine as g}from"../../../../../@ckeditor_ckeditor5-icons@45.1.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as z,MenuBarMenuListItemButtonView as L}from"../../../../../@ckeditor_ckeditor5-ui@45.1.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class p extends m{refresh(){const t=this.editor.model,e=t.schema,n=t.document.selection;this.isEnabled=f(n,e,t)}execute(){const t=this.editor.model;t.change(e=>{const n=e.createElement("horizontalLine");t.insertObject(n,null,null,{setSelection:"after"})})}}function f(o,t,e){const n=E(o,e);return t.checkChild(n,"horizontalLine")}function E(o,t){const n=h(o,t).start.parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}class H extends s{static get pluginName(){return"HorizontalLineEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.model.schema,n=t.t,a=t.conversion;e.register("horizontalLine",{inheritAllFrom:"$blockObject"}),a.for("dataDowncast").elementToElement({model:"horizontalLine",view:(r,{writer:i})=>i.createEmptyElement("hr")}),a.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(r,{writer:i})=>{const c=n("Horizontal line"),l=i.createContainerElement("div",null,i.createEmptyElement("hr"));return i.addClass("ck-horizontal-line",l),i.setCustomProperty("hr",!0,l),b(l,i,c)}}),a.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),t.commands.add("horizontalLine",new p(t))}}function b(o,t,e){return t.setCustomProperty("horizontalLine",!0,o),d(o,t,{label:e})}class v extends s{static get pluginName(){return"HorizontalLineUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.ui.componentFactory.add("horizontalLine",()=>{const e=this._createButton(z);return e.set({tooltip:!0}),e}),t.ui.componentFactory.add("menuBar:horizontalLine",()=>this._createButton(L))}_createButton(t){const e=this.editor,n=e.locale,a=e.commands.get("horizontalLine"),r=new t(e.locale),i=n.t;return r.set({label:i("Horizontal line"),icon:g}),r.bind("isEnabled").to(a,"isEnabled"),this.listenTo(r,"execute",()=>{e.execute("horizontalLine"),e.editing.view.focus()}),r}}class B extends s{static get requires(){return[H,v,u]}static get pluginName(){return"HorizontalLine"}static get isOfficialPlugin(){return!0}}export{B as HorizontalLine,H as HorizontalLineEditing,v as HorizontalLineUI};
@@ -1,4 +1,4 @@
1
- var S=Object.defineProperty;var A=(c,t,e)=>t in c?S(c,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[t]=e;var H=(c,t,e)=>A(c,typeof t!="symbol"?t+"":t,e);import{Plugin as f,Command as T}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Widget as I,toWidget as L,findOptimalInsertionRange as D}from"../../../../../@ckeditor_ckeditor5-widget@45.0.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{ButtonView as x,MenuBarMenuListItemButtonView as M}from"../../../../../@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{logWarning as y,createElement as b}from"../../../../../@ckeditor_ckeditor5-utils@45.0.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconHtml as O,IconPencil as P,IconCheck as W,IconCancel as z}from"../../../../../@ckeditor_ckeditor5-icons@45.0.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";/**
1
+ var S=Object.defineProperty;var A=(c,t,e)=>t in c?S(c,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[t]=e;var H=(c,t,e)=>A(c,typeof t!="symbol"?t+"":t,e);import{Plugin as f,Command as T}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Widget as I,toWidget as L,findOptimalInsertionRange as D}from"../../../../../@ckeditor_ckeditor5-widget@45.1.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{ButtonView as x,MenuBarMenuListItemButtonView as M}from"../../../../../@ckeditor_ckeditor5-ui@45.1.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{logWarning as y,createElement as b}from"../../../../../@ckeditor_ckeditor5-utils@45.1.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconHtml as O,IconPencil as P,IconCheck as W,IconCancel as z}from"../../../../../@ckeditor_ckeditor5-icons@45.1.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class F extends T{refresh(){const t=this.editor.model,e=t.schema,n=t.document.selection,i=k(n);this.isEnabled=j(n,e,t),this.value=i?i.getAttribute("value")||"":null}execute(t){const e=this.editor.model,n=e.document.selection;e.change(i=>{let d;this.value!==null?d=k(n):(d=i.createElement("rawHtml"),e.insertObject(d,null,null,{setSelection:"on"})),i.setAttribute("value",t,d)})}}function j(c,t,e){const n=N(c,e);return t.checkChild(n,"rawHtml")}function N(c,t){const n=D(c,t).start.parent;return n.isEmpty&&!n.is("rootElement")?n.parent:n}function k(c){const t=c.getSelectedElement();return t&&t.is("element","rawHtml")?t:null}class U extends f{constructor(e){super(e);H(this,"_widgetButtonViewReferences",new Set);e.config.define("htmlEmbed",{showPreviews:!1,sanitizeHtml:n=>(y("html-embed-provide-sanitize-function"),{html:n,hasChanged:!1})})}static get pluginName(){return"HtmlEmbedEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("rawHtml",{inheritAllFrom:"$blockObject",allowAttributes:["value"]}),e.commands.add("htmlEmbed",new F(e)),this._setupConversion()}_setupConversion(){const e=this.editor,n=e.t,i=e.editing.view,d=this._widgetButtonViewReferences,E=e.config.get("htmlEmbed");this.editor.editing.view.on("render",()=>{for(const o of d){if(o.element&&o.element.isConnected)return;o.destroy(),d.delete(o)}},{priority:"lowest"}),e.data.registerRawContentMatcher({name:"div",classes:"raw-html-embed"}),e.conversion.for("upcast").elementToElement({view:{name:"div",classes:"raw-html-embed"},model:(o,{writer:a})=>a.createElement("rawHtml",{value:o.getCustomProperty("$rawContent")})}),e.conversion.for("dataDowncast").elementToElement({model:"rawHtml",view:(o,{writer:a})=>a.createRawElement("div",{class:"raw-html-embed"},function(s){s.innerHTML=o.getAttribute("value")||""})}),e.conversion.for("editingDowncast").elementToStructure({model:{name:"rawHtml",attributes:["value"]},view:(o,{writer:a})=>{let s,l,r;const m=a.createRawElement("div",{class:"raw-html-embed__content-wrapper"},function(w){s=w,g({editor:e,domElement:w,state:l,props:r}),s.addEventListener("mousedown",()=>{if(l.isEditable){const h=e.model;h.document.selection.getSelectedElement()!==o&&h.change(V=>V.setSelection(o,"on"))}},!0)}),p={makeEditable(){l=Object.assign({},l,{isEditable:!0}),g({domElement:s,editor:e,state:l,props:r}),i.change(w=>{w.setAttribute("data-cke-ignore-events","true",m)}),s.querySelector("textarea").focus()},save(w){w!==l.getRawHtmlValue()?(e.execute("htmlEmbed",w),e.editing.view.focus()):this.cancel()},cancel(){l=Object.assign({},l,{isEditable:!1}),g({domElement:s,editor:e,state:l,props:r}),e.editing.view.focus(),i.change(w=>{w.removeAttribute("data-cke-ignore-events",m)})}};l={showPreviews:E.showPreviews,isEditable:!1,getRawHtmlValue:()=>o.getAttribute("value")||""},r={sanitizeHtml:E.sanitizeHtml,textareaPlaceholder:n("Paste raw HTML here..."),onEditClick(){p.makeEditable()},onSaveClick(w){p.save(w)},onCancelClick(){p.cancel()}};const u=a.createContainerElement("div",{class:"raw-html-embed","data-html-embed-label":n("HTML snippet"),dir:e.locale.uiLanguageDirection},m);return a.setCustomProperty("rawHtmlApi",p,u),a.setCustomProperty("rawHtml",!0,u),L(u,a,{label:n("HTML snippet"),hasSelectionHandle:!0})}});function g({editor:o,domElement:a,state:s,props:l}){a.textContent="";const r=a.ownerDocument;let m;if(s.isEditable){const u={isDisabled:!1,placeholder:l.textareaPlaceholder};m=C({domDocument:r,state:s,props:u}),a.append(m)}else if(s.showPreviews){const u={sanitizeHtml:l.sanitizeHtml};a.append(R({domDocument:r,state:s,props:u,editor:o}))}else{const u={isDisabled:!0,placeholder:l.textareaPlaceholder};a.append(C({domDocument:r,state:s,props:u}))}const p={onEditClick:l.onEditClick,onSaveClick:()=>{l.onSaveClick(m.value)},onCancelClick:l.onCancelClick};a.prepend(_({editor:o,domDocument:r,state:s,props:p}))}function _({editor:o,domDocument:a,state:s,props:l}){const r=b(a,"div",{class:"raw-html-embed__buttons-wrapper"});if(s.isEditable){const m=v(o,"save",l.onSaveClick),p=v(o,"cancel",l.onCancelClick);r.append(m.element,p.element),d.add(m).add(p)}else{const m=v(o,"edit",l.onEditClick);r.append(m.element),d.add(m)}return r}function C({domDocument:o,state:a,props:s}){const l=b(o,"textarea",{placeholder:s.placeholder,class:"ck ck-reset ck-input ck-input-text raw-html-embed__source"});return l.disabled=s.isDisabled,l.value=a.getRawHtmlValue(),l}function R({editor:o,domDocument:a,state:s,props:l}){const r=l.sanitizeHtml(s.getRawHtmlValue()),m=s.getRawHtmlValue().length>0?n("No preview available"):n("Empty snippet content"),p=b(a,"div",{class:"ck ck-reset_all raw-html-embed__preview-placeholder"},m),u=b(a,"div",{class:"raw-html-embed__preview-content",dir:o.locale.contentLanguageDirection}),h=a.createRange().createContextualFragment(r.html);return u.appendChild(h),b(a,"div",{class:"raw-html-embed__preview"},[p,u])}}}function v(c,t,e){const{t:n}=c.locale,i=new x(c.locale),d=c.commands.get("htmlEmbed");return i.set({class:`raw-html-embed__${t}-button`,icon:P,tooltip:!0,tooltipPosition:c.locale.uiLanguageDirection==="rtl"?"e":"w"}),i.render(),t==="edit"?(i.set({icon:P,label:n("Edit source")}),i.bind("isEnabled").to(d)):t==="save"?(i.set({icon:W,label:n("Save changes")}),i.bind("isEnabled").to(d)):i.set({icon:z,label:n("Cancel")}),i.on("execute",e),i}class $ extends f{static get pluginName(){return"HtmlEmbedUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,n=t.locale.t;t.ui.componentFactory.add("htmlEmbed",()=>{const i=this._createButton(x);return i.set({tooltip:!0,label:n("Insert HTML")}),i}),t.ui.componentFactory.add("menuBar:htmlEmbed",()=>{const i=this._createButton(M);return i.set({label:n("HTML snippet")}),i})}_createButton(t){const e=this.editor,n=e.commands.get("htmlEmbed"),i=new t(e.locale);return i.set({icon:O}),i.bind("isEnabled").to(n,"isEnabled"),this.listenTo(i,"execute",()=>{e.execute("htmlEmbed"),e.editing.view.focus(),e.editing.view.document.selection.getSelectedElement().getCustomProperty("rawHtmlApi").makeEditable()}),i}}class Y extends f{static get requires(){return[U,$,I]}static get pluginName(){return"HtmlEmbed"}static get isOfficialPlugin(){return!0}}export{Y as HtmlEmbed,U as HtmlEmbedEditing,$ as HtmlEmbedUI};
@@ -1,12 +1,12 @@
1
- var Q=Object.defineProperty;var Y=(s,r,e)=>r in s?Q(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var v=(s,r,e)=>Y(s,typeof r!="symbol"?r+"":r,e);import{Plugin as f}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{logWarning as J,global as H,uid as M,priorities as k,CKEditorError as Z,toArray as F,isValidAttributeName as ee}from"../../../../../@ckeditor_ckeditor5-utils@45.0.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{UpcastWriter as x,HtmlDataProcessor as te,Matcher as N,StylesMap as re}from"../../../../../@ckeditor_ckeditor5-engine@45.0.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Widget as ie,toWidget as X}from"../../../../../@ckeditor_ckeditor5-widget@45.0.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{Enter as oe}from"../../../../../@ckeditor_ckeditor5-enter@45.0.0/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{isEqual as L}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqual.js";import{mergeWith as le}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/mergeWith.js";import{startCase as ne}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/startCase.js";import{isPlainObject as se}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js";import{cloneDeep as me}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.js";/**
1
+ var Q=Object.defineProperty;var Y=(s,r,e)=>r in s?Q(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var v=(s,r,e)=>Y(s,typeof r!="symbol"?r+"":r,e);import{Plugin as g}from"../../../../../@ckeditor_ckeditor5-core@45.1.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{logWarning as J,global as H,uid as M,priorities as k,CKEditorError as Z,toArray as F,isValidAttributeName as ee}from"../../../../../@ckeditor_ckeditor5-utils@45.1.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{UpcastWriter as x,HtmlDataProcessor as te,Matcher as N,StylesMap as re}from"../../../../../@ckeditor_ckeditor5-engine@45.1.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Widget as ie,toWidget as X}from"../../../../../@ckeditor_ckeditor5-widget@45.1.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{Enter as oe}from"../../../../../@ckeditor_ckeditor5-enter@45.1.0/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{isEqual as L}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqual.js";import{mergeWith as le}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/mergeWith.js";import{startCase as ne}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/startCase.js";import{isPlainObject as se}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js";import{cloneDeep as me}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */function p(s,r,e,t){r&&ae(s,r,t),e&&w(s,e,t)}function w(s,r,e){if(r.attributes)for(const[t,i]of Object.entries(r.attributes))s.setAttribute(t,i,e);r.styles&&s.setStyle(r.styles,e),r.classes&&s.addClass(r.classes,e)}function ae(s,r,e){if(r.attributes)for(const[t]of Object.entries(r.attributes))s.removeAttribute(t,e);if(r.styles)for(const t of Object.keys(r.styles))s.removeStyle(t,e);r.classes&&s.removeClass(r.classes,e)}function ue(s,r){const e=me(s);let t="attributes";for(t in r)t=="classes"?e[t]=Array.from(new Set([...s[t]||[],...r[t]])):e[t]={...s[t],...r[t]};return e}function y(s,r,e,t,i){const o=r.getAttribute(e),l={};for(const n of["attributes","styles","classes"]){if(n!=t){o&&o[n]&&(l[n]=o[n]);continue}if(t=="classes"){const a=new Set(o&&o.classes||[]);i(a),a.size&&(l[n]=Array.from(a));continue}const m=new Map(Object.entries(o&&o[n]||{}));i(m),m.size&&(l[n]=Object.fromEntries(m))}Object.keys(l).length?r.is("documentSelection")?s.setSelectionAttribute(e,l):s.setAttribute(e,l,r):o&&(r.is("documentSelection")?s.removeSelectionAttribute(e):s.removeAttribute(e,r))}function ce(s){return ne(s).replace(/ /g,"")}function b(s){return`html${ce(s)}Attributes`}function V({model:s}){return(r,e)=>e.writer.createElement(s,{htmlContent:r.getCustomProperty("$rawContent")})}function de(s,{view:r,isInline:e}){const t=s.t;return(i,{writer:o})=>{const l=t("HTML object"),n=$(r,i,o),m=i.getAttribute(b(r));o.addClass("html-object-embed__content",n),m&&w(o,m,n);const a=o.createContainerElement(e?"span":"div",{class:"html-object-embed","data-html-object-embed-label":l},n);return X(a,o,{label:l})}}function $(s,r,e){return e.createRawElement(s,null,(t,i)=>{i.setContentOf(t,r.getAttribute("htmlContent"))})}function he({view:s,model:r,allowEmpty:e},t){return o=>{o.on(`element:${s}`,(l,n,m)=>{let a=t.processViewAttributes(n.viewItem,m);if(!(!a&&!m.consumable.test(n.viewItem,{name:!0}))){if(a=a||{},m.consumable.consume(n.viewItem,{name:!0}),n.modelRange||(n=Object.assign(n,m.convertChildren(n.viewItem,n.modelCursor))),e&&n.modelRange.isCollapsed&&Object.keys(a).length){const u=m.writer.createElement("htmlEmptyElement");if(!m.safeInsert(u,n.modelCursor))return;const c=m.getSplitParts(u);n.modelRange=m.writer.createRange(n.modelRange.start,m.writer.createPositionAfter(c[c.length-1])),m.updateConversionResult(u,n),i(u,a,m);return}for(const u of n.modelRange.getItems())i(u,a,m)}},{priority:"low"})};function i(o,l,n){if(n.schema.checkAttribute(o,r)){const m=o.getAttribute(r),a=ue(l,m||{});n.writer.setAttribute(r,a,o)}}}function j({model:s,view:r},e){return(t,{writer:i,consumable:o})=>{if(!t.hasAttribute(s))return null;const l=i.createContainerElement(r),n=t.getAttribute(s);return o.consume(t,`attribute:${s}`),w(i,n,l),l.getFillerOffset=()=>null,e?X(l,i):l}}function fe({priority:s,view:r}){return(e,t)=>{if(!e)return;const{writer:i}=t,o=i.createAttributeElement(r,null,{priority:s});return w(i,e,o),o}}function C({view:s},r){return e=>{e.on(`element:${s}`,(t,i,o)=>{if(!i.modelRange||i.modelRange.isCollapsed)return;const l=r.processViewAttributes(i.viewItem,o);l&&o.writer.setAttribute(b(i.viewItem.name),l,i.modelRange)},{priority:"low"})}}function O({view:s,model:r}){return e=>{e.on(`attribute:${b(s)}:${r}`,(t,i,o)=>{if(!o.consumable.consume(i.item,t.name))return;const{attributeOldValue:l,attributeNewValue:n}=i,m=o.writer,a=o.mapper.toViewElement(i.item);p(m,l,n,a)})}}/**
5
5
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
6
6
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
7
- */var W={block:[{model:"codeBlock",view:"pre"},{model:"paragraph",view:"p"},{model:"blockQuote",view:"blockquote"},{model:"listItem",view:"li"},{model:"pageBreak",view:"div"},{model:"rawHtml",view:"div"},{model:"table",view:"table"},{model:"tableRow",view:"tr"},{model:"tableCell",view:"td"},{model:"tableCell",view:"th"},{model:"tableColumnGroup",view:"colgroup"},{model:"tableColumn",view:"col"},{model:"caption",view:"caption"},{model:"caption",view:"figcaption"},{model:"imageBlock",view:"img"},{model:"imageInline",view:"img"},{model:"horizontalLine",view:"hr"},{model:"htmlP",view:"p",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlBlockquote",view:"blockquote",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlTable",view:"table",modelSchema:{allowWhere:"$block",isBlock:!0}},{model:"htmlTbody",view:"tbody",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlThead",view:"thead",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlTfoot",view:"tfoot",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlCaption",view:"caption",modelSchema:{allowIn:"htmlTable",allowChildren:"$text",isBlock:!1}},{model:"htmlColgroup",view:"colgroup",modelSchema:{allowIn:"htmlTable",allowChildren:"col",isBlock:!1}},{model:"htmlCol",view:"col",modelSchema:{allowIn:"htmlColgroup",isBlock:!1}},{model:"htmlTr",view:"tr",modelSchema:{allowIn:["htmlTable","htmlThead","htmlTbody"],isLimit:!0}},{model:"htmlTd",view:"td",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlTh",view:"th",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlFigure",view:"figure",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFigcaption",view:"figcaption",modelSchema:{allowIn:"htmlFigure",allowChildren:"$text",isBlock:!1}},{model:"htmlAddress",view:"address",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlAside",view:"aside",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlMain",view:"main",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDetails",view:"details",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSummary",view:"summary",modelSchema:{allowChildren:["htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6","$text"],allowIn:"htmlDetails",isBlock:!1}},{model:"htmlDiv",view:"div",paragraphLikeModel:"htmlDivParagraph",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlFieldset",view:"fieldset",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlLegend",view:"legend",modelSchema:{allowIn:"htmlFieldset",allowChildren:"$text"}},{model:"htmlHeader",view:"header",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFooter",view:"footer",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlForm",view:"form",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlHgroup",view:"hgroup",modelSchema:{allowIn:["$root","$container"],allowChildren:["paragraph","htmlP","htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6"],isBlock:!1}},{model:"htmlH1",view:"h1",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH2",view:"h2",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH3",view:"h3",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH4",view:"h4",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH5",view:"h5",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH6",view:"h6",modelSchema:{inheritAllFrom:"$block"}},{model:"$htmlList",modelSchema:{allowWhere:"$container",allowChildren:["$htmlList","htmlLi"],isBlock:!1}},{model:"htmlDir",view:"dir",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlMenu",view:"menu",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlUl",view:"ul",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlOl",view:"ol",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlLi",view:"li",modelSchema:{allowIn:"$htmlList",allowChildren:"$text",isBlock:!1}},{model:"htmlPre",view:"pre",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlArticle",view:"article",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSection",view:"section",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlNav",view:"nav",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDivDl",view:"div",modelSchema:{allowChildren:["htmlDt","htmlDd"],allowIn:"htmlDl"}},{model:"htmlDl",view:"dl",modelSchema:{allowWhere:"$container",allowChildren:["htmlDt","htmlDd","htmlDivDl"],isBlock:!1}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",isBlock:!1}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",isBlock:!1}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlHr",view:"hr",isEmpty:!0,modelSchema:{inheritAllFrom:"$blockObject"}}],inline:[{model:"htmlLiAttributes",view:"li",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlOlAttributes",view:"ol",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlUlAttributes",view:"ul",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"table"},{model:"htmlTheadAttributes",view:"thead",appliesToBlock:"table"},{model:"htmlTbodyAttributes",view:"tbody",appliesToBlock:"table"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"imageBlock"},{model:"htmlAcronym",view:"acronym",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTt",view:"tt",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlFont",view:"font",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTime",view:"time",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlVar",view:"var",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBig",view:"big",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSmall",view:"small",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSamp",view:"samp",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlQ",view:"q",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlOutput",view:"output",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlKbd",view:"kbd",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdi",view:"bdi",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdo",view:"bdo",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlAbbr",view:"abbr",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlA",view:"a",priority:5,coupledAttribute:"linkHref"},{model:"htmlStrong",view:"strong",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlB",view:"b",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlI",view:"i",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlEm",view:"em",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlS",view:"s",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDel",view:"del",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlIns",view:"ins",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlU",view:"u",coupledAttribute:"underline",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSub",view:"sub",coupledAttribute:"subscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSup",view:"sup",coupledAttribute:"superscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCode",view:"code",coupledAttribute:"code",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlMark",view:"mark",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSpan",view:"span",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCite",view:"cite",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlLabel",view:"label",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDfn",view:"dfn",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlObject",view:"object",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlIframe",view:"iframe",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlInput",view:"input",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlButton",view:"button",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlTextarea",view:"textarea",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlSelect",view:"select",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlVideo",view:"video",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlEmbed",view:"embed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlOembed",view:"oembed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlAudio",view:"audio",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlImg",view:"img",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlCanvas",view:"canvas",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlMeter",view:"meter",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlProgress",view:"progress",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlScript",view:"script",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlStyle",view:"style",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlCustomElement",view:"$customElement",modelSchema:{allowWhere:["$text","$block"],allowAttributesOf:"$inlineObject",isInline:!0}}]};class S extends f{constructor(){super(...arguments);v(this,"_definitions",[])}static get pluginName(){return"DataSchema"}static get isOfficialPlugin(){return!0}init(){for(const e of W.block)this.registerBlockElement(e);for(const e of W.inline)this.registerInlineElement(e)}registerBlockElement(e){this._definitions.push({...e,isBlock:!0})}registerInlineElement(e){this._definitions.push({...e,isInline:!0})}extendBlockElement(e){this._extendDefinition({...e,isBlock:!0})}extendInlineElement(e){this._extendDefinition({...e,isInline:!0})}getDefinitionsForView(e,t=!1){const i=new Set;for(const o of this._getMatchingViewDefinitions(e)){if(t)for(const l of this._getReferences(o.model))i.add(l);i.add(o)}return i}getDefinitionsForModel(e){return this._definitions.filter(t=>t.model==e)}_getMatchingViewDefinitions(e){return this._definitions.filter(t=>t.view&&ge(e,t.view))}*_getReferences(e){const t=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"],i=this._definitions.filter(o=>o.model==e);for(const{modelSchema:o}of i)if(o)for(const l of t)for(const n of F(o[l]||[])){const m=this._definitions.filter(a=>a.model==n);for(const a of m)n!==e&&(yield*this._getReferences(a.model),yield a)}}_extendDefinition(e){const t=Array.from(this._definitions.entries()).filter(([,i])=>i.model==e.model);if(t.length==0){this._definitions.push(e);return}for(const[i,o]of t)this._definitions[i]=le({},o,e,(l,n)=>Array.isArray(l)?l.concat(n):void 0)}}function ge(s,r){return typeof s=="string"?s===r:s instanceof RegExp?s.test(r):!1}class d extends f{constructor(e){super(e);v(this,"_dataSchema");v(this,"_allowedAttributes");v(this,"_disallowedAttributes");v(this,"_allowedElements");v(this,"_disallowedElements");v(this,"_dataInitialized");v(this,"_coupledAttributes");this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new N,this._disallowedAttributes=new N,this._allowedElements=new Set,this._disallowedElements=new Set,this._dataInitialized=!1,this._coupledAttributes=null,this._registerElementsAfterInit(),this._registerElementHandlers(),this._registerCoupledAttributesPostFixer(),this._registerAssociatedHtmlAttributesPostFixer()}static get pluginName(){return"DataFilter"}static get isOfficialPlugin(){return!0}static get requires(){return[S,ie]}loadAllowedConfig(e){for(const t of e){const i=t.name||/[\s\S]+/,o=z(t);this.allowElement(i),o.forEach(l=>this.allowAttributes(l))}}loadDisallowedConfig(e){for(const t of e){const i=t.name||/[\s\S]+/,o=z(t);o.length==0?this.disallowElement(i):o.forEach(l=>this.disallowAttributes(l))}}loadAllowedEmptyElementsConfig(e){for(const t of e)this.allowEmptyElement(t)}allowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))this._addAllowedElement(t),this._coupledAttributes=null}disallowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!1))this._disallowedElements.add(t.view)}allowEmptyElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))t.isInline&&this._dataSchema.extendInlineElement({...t,allowEmpty:!0})}allowAttributes(e){this._allowedAttributes.add(e)}disallowAttributes(e){this._disallowedAttributes.add(e)}processViewAttributes(e,t){const{consumable:i}=t;return q(e,this._disallowedAttributes,i),be(e,q(e,this._allowedAttributes,i))}_addAllowedElement(e){if(!this._allowedElements.has(e)){if(this._allowedElements.add(e),"appliesToBlock"in e&&typeof e.appliesToBlock=="string")for(const t of this._dataSchema.getDefinitionsForModel(e.appliesToBlock))t.isBlock&&this._addAllowedElement(t);this._dataInitialized&&this.editor.data.once("set",()=>{this._fireRegisterEvent(e)},{priority:k.highest+1})}}_registerElementsAfterInit(){this.editor.data.on("init",()=>{this._dataInitialized=!0;for(const e of this._allowedElements)this._fireRegisterEvent(e)},{priority:k.highest+1})}_registerElementHandlers(){this.on("register",(e,t)=>{const i=this.editor.model.schema;if(t.isObject&&!i.isRegistered(t.model))this._registerObjectElement(t);else if(t.isBlock)this._registerBlockElement(t);else if(t.isInline)this._registerInlineElement(t);else throw new Z("data-filter-invalid-definition",null,t);e.stop()},{priority:"lowest"})}_registerCoupledAttributesPostFixer(){const e=this.editor.model,t=e.document.selection;e.document.registerPostFixer(i=>{const o=e.document.differ.getChanges();let l=!1;const n=this._getCoupledAttributesMap();for(const m of o){if(m.type!="attribute"||m.attributeNewValue!==null)continue;const a=n.get(m.attributeKey);if(a)for(const{item:u}of m.range.getWalker())for(const c of a)u.hasAttribute(c)&&(i.removeAttribute(c,u),l=!0)}return l}),this.listenTo(t,"change:attribute",(i,{attributeKeys:o})=>{const l=new Set,n=this._getCoupledAttributesMap();for(const m of o){if(t.hasAttribute(m))continue;const a=n.get(m);if(a)for(const u of a)t.hasAttribute(u)&&l.add(u)}l.size!=0&&e.change(m=>{for(const a of l)m.removeSelectionAttribute(a)})})}_registerAssociatedHtmlAttributesPostFixer(){const e=this.editor.model;e.document.registerPostFixer(t=>{const i=e.document.differ.getChanges();let o=!1;for(const l of i)if(!(l.type!=="insert"||l.name==="$text"))for(const n of l.attributes.keys())!n.startsWith("html")||!n.endsWith("Attributes")||e.schema.checkAttribute(l.name,n)||(t.removeAttribute(n,l.position.nodeAfter),o=!0);return o})}_getCoupledAttributesMap(){if(this._coupledAttributes)return this._coupledAttributes;this._coupledAttributes=new Map;for(const e of this._allowedElements)if(e.coupledAttribute&&e.model){const t=this._coupledAttributes.get(e.coupledAttribute);t?t.push(e.model):this._coupledAttributes.set(e.coupledAttribute,[e.model])}return this._coupledAttributes}_fireRegisterEvent(e){e.view&&this._disallowedElements.has(e.view)||this.fire(e.view?`register:${e.view}`:"register",e)}_registerObjectElement(e){const t=this.editor,i=t.model.schema,o=t.conversion,{view:l,model:n}=e;i.register(n,e.modelSchema);/* istanbul ignore next: paranoid check -- @preserve */l&&(i.extend(e.model,{allowAttributes:[b(l),"htmlContent"]}),t.data.registerRawContentMatcher({name:l}),o.for("upcast").elementToElement({view:l,model:V(e),converterPriority:k.low+2}),o.for("upcast").add(C(e,this)),o.for("editingDowncast").elementToStructure({model:{name:n,attributes:[b(l)]},view:de(t,e)}),o.for("dataDowncast").elementToElement({model:n,view:(m,{writer:a})=>$(l,m,a)}),o.for("dataDowncast").add(O(e)))}_registerBlockElement(e){const t=this.editor,i=t.model.schema,o=t.conversion,{view:l,model:n}=e;if(!i.isRegistered(e.model)){if(!e.modelSchema||(i.register(e.model,e.modelSchema),!l))return;o.for("upcast").elementToElement({model:n,view:l,converterPriority:k.low+2}),o.for("downcast").elementToElement({model:n,view:(m,{writer:a})=>e.isEmpty?a.createEmptyElement(l):a.createContainerElement(l)})}l&&(i.extend(e.model,{allowAttributes:b(l)}),o.for("upcast").add(C(e,this)),o.for("downcast").add(O(e)))}_registerInlineElement(e){const t=this.editor,i=t.model.schema,o=t.conversion,l=e.model;e.appliesToBlock||(i.extend("$text",{allowAttributes:l}),e.attributeProperties&&i.setAttributeProperties(l,e.attributeProperties),o.for("upcast").add(he(e,this)),o.for("downcast").attributeToElement({model:l,view:fe(e)}),e.allowEmpty&&(i.setAttributeProperties(l,{copyFromObject:!1}),i.isRegistered("htmlEmptyElement")||i.register("htmlEmptyElement",{inheritAllFrom:"$inlineObject"}),t.data.htmlProcessor.domConverter.registerInlineObjectMatcher(n=>n.name==e.view&&n.isEmpty&&Array.from(n.getAttributeKeys()).length?{name:!0}:null),o.for("editingDowncast").elementToElement({model:"htmlEmptyElement",view:j(e,!0)}),o.for("dataDowncast").elementToElement({model:"htmlEmptyElement",view:j(e)})))}}function q(s,r,e){const t=r.matchAll(s)||[],i=s.document.stylesProcessor;return t.reduce((o,{match:l})=>{for(const[n,m]of l.attributes||[])if(n=="style"){const a=m,u=i.getRelatedStyles(a).filter(c=>c.split("-").length>a.split("-").length).sort((c,h)=>h.split("-").length-c.split("-").length);for(const c of u)e.consume(s,{styles:[c]})&&o.styles.push(c);e.consume(s,{styles:[a]})&&o.styles.push(a)}else if(n=="class"){const a=m;e.consume(s,{classes:[a]})&&o.classes.push(a)}else e.consume(s,{attributes:[n]})&&o.attributes.push(n);return o},{attributes:[],classes:[],styles:[]})}function be(s,{attributes:r,classes:e,styles:t}){return!r.length&&!e.length&&!t.length?null:{...r.length&&{attributes:pe(s,r)},...t.length&&{styles:we(s,t)},...e.length&&{classes:e}}}function pe(s,r){const e={};for(const t of r){const i=s.getAttribute(t);i!==void 0&&ee(t)&&(e[t]=i)}return e}function we(s,r){const e=new re(s.document.stylesProcessor);for(const t of r){const i=s.getStyle(t);i!==void 0&&e.set(t,i)}return Object.fromEntries(e.getStylesEntries())}function B(s,r){const{name:e}=s,t=s[r];return se(t)?Object.entries(t).map(([i,o])=>({name:e,[r]:{[i]:o}})):Array.isArray(t)?t.map(i=>({name:e,[r]:[i]})):[s]}function z(s){const{name:r,attributes:e,classes:t,styles:i}=s,o=[];return e&&o.push(...B({name:r,attributes:e},"attributes")),t&&o.push(...B({name:r,classes:t},"classes")),i&&o.push(...B({name:r,styles:i},"styles")),o}class Ae extends f{static get requires(){return[d]}static get pluginName(){return"CodeBlockElementSupport"}static get isOfficialPlugin(){return!0}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const r=this.editor.plugins.get(d);r.on("register:pre",(e,t)=>{if(t.model!=="codeBlock")return;const i=this.editor,o=i.model.schema,l=i.conversion;o.extend("codeBlock",{allowAttributes:["htmlPreAttributes","htmlContentAttributes"]}),l.for("upcast").add(ve(r)),l.for("downcast").add(ye()),e.stop()})}}function ve(s){return r=>{r.on("element:code",(e,t,i)=>{const o=t.viewItem,l=o.parent;if(!l||!l.is("element","pre"))return;n(l,"htmlPreAttributes"),n(o,"htmlContentAttributes");function n(m,a){const u=s.processViewAttributes(m,i);u&&i.writer.setAttribute(a,u,t.modelRange)}},{priority:"low"})}}function ye(){return s=>{s.on("attribute:htmlPreAttributes:codeBlock",(r,e,t)=>{if(!t.consumable.consume(e.item,r.name))return;const{attributeOldValue:i,attributeNewValue:o}=e,n=t.mapper.toViewElement(e.item).parent;p(t.writer,i,o,n)}),s.on("attribute:htmlContentAttributes:codeBlock",(r,e,t)=>{if(!t.consumable.consume(e.item,r.name))return;const{attributeOldValue:i,attributeNewValue:o}=e,l=t.mapper.toViewElement(e.item);p(t.writer,i,o,l)})}}class Ee extends f{static get requires(){return[d]}static get pluginName(){return"DualContentModelElementSupport"}static get isOfficialPlugin(){return!0}init(){this.editor.plugins.get(d).on("register",(e,t)=>{const i=t,o=this.editor,l=o.model.schema,n=o.conversion;if(!i.paragraphLikeModel||l.isRegistered(i.model)||l.isRegistered(i.paragraphLikeModel))return;const m={model:i.paragraphLikeModel,view:i.view};l.register(i.model,i.modelSchema),l.register(m.model,{inheritAllFrom:"$block"}),n.for("upcast").elementToElement({view:i.view,model:(a,{writer:u})=>this._hasBlockContent(a)?u.createElement(i.model):u.createElement(m.model),converterPriority:k.low+.5}),n.for("downcast").elementToElement({view:i.view,model:i.model}),this._addAttributeConversion(i),n.for("downcast").elementToElement({view:m.view,model:m.model}),this._addAttributeConversion(m),e.stop()})}_hasBlockContent(r){const e=this.editor.editing.view,t=e.domConverter.blockElements;for(const i of e.createRangeIn(r).getItems())if(i.is("element")&&t.includes(i.name))return!0;return!1}_addAttributeConversion(r){const e=this.editor,t=e.conversion,i=e.plugins.get(d);e.model.schema.extend(r.model,{allowAttributes:b(r.view)}),t.for("upcast").add(C(r,i)),t.for("downcast").add(O(r))}}class Ce extends f{static get requires(){return[S,oe]}static get pluginName(){return"HeadingElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("HeadingEditing"))return;const e=r.config.get("heading.options");this.registerHeadingElements(r,e)}registerHeadingElements(r,e){const t=r.plugins.get(S),i=[];for(const o of e)"model"in o&&"view"in o&&(t.registerBlockElement({view:o.view,model:o.model}),i.push(o.model));t.extendBlockElement({model:"htmlHgroup",modelSchema:{allowChildren:i}}),t.extendBlockElement({model:"htmlSummary",modelSchema:{allowChildren:i}})}}/**
7
+ */var W={block:[{model:"codeBlock",view:"pre"},{model:"paragraph",view:"p"},{model:"blockQuote",view:"blockquote"},{model:"listItem",view:"li"},{model:"pageBreak",view:"div"},{model:"rawHtml",view:"div"},{model:"table",view:"table"},{model:"tableRow",view:"tr"},{model:"tableCell",view:"td"},{model:"tableCell",view:"th"},{model:"tableColumnGroup",view:"colgroup"},{model:"tableColumn",view:"col"},{model:"caption",view:"caption"},{model:"caption",view:"figcaption"},{model:"imageBlock",view:"img"},{model:"imageInline",view:"img"},{model:"horizontalLine",view:"hr"},{model:"htmlP",view:"p",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlBlockquote",view:"blockquote",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlTable",view:"table",modelSchema:{allowWhere:"$block",isBlock:!0}},{model:"htmlTbody",view:"tbody",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlThead",view:"thead",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlTfoot",view:"tfoot",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlCaption",view:"caption",modelSchema:{allowIn:"htmlTable",allowChildren:"$text",isBlock:!1}},{model:"htmlColgroup",view:"colgroup",modelSchema:{allowIn:"htmlTable",allowChildren:"col",isBlock:!1}},{model:"htmlCol",view:"col",modelSchema:{allowIn:"htmlColgroup",isBlock:!1}},{model:"htmlTr",view:"tr",modelSchema:{allowIn:["htmlTable","htmlThead","htmlTbody"],isLimit:!0}},{model:"htmlTd",view:"td",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlTh",view:"th",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlFigure",view:"figure",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFigcaption",view:"figcaption",modelSchema:{allowIn:"htmlFigure",allowChildren:"$text",isBlock:!1}},{model:"htmlAddress",view:"address",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlAside",view:"aside",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlMain",view:"main",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDetails",view:"details",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSummary",view:"summary",modelSchema:{allowChildren:["htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6","$text"],allowIn:"htmlDetails",isBlock:!1}},{model:"htmlDiv",view:"div",paragraphLikeModel:"htmlDivParagraph",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlFieldset",view:"fieldset",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlLegend",view:"legend",modelSchema:{allowIn:"htmlFieldset",allowChildren:"$text"}},{model:"htmlHeader",view:"header",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFooter",view:"footer",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlForm",view:"form",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlHgroup",view:"hgroup",modelSchema:{allowIn:["$root","$container"],allowChildren:["paragraph","htmlP","htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6"],isBlock:!1}},{model:"htmlH1",view:"h1",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH2",view:"h2",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH3",view:"h3",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH4",view:"h4",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH5",view:"h5",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH6",view:"h6",modelSchema:{inheritAllFrom:"$block"}},{model:"$htmlList",modelSchema:{allowWhere:"$container",allowChildren:["$htmlList","htmlLi"],isBlock:!1}},{model:"htmlDir",view:"dir",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlMenu",view:"menu",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlUl",view:"ul",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlOl",view:"ol",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlLi",view:"li",modelSchema:{allowIn:"$htmlList",allowChildren:"$text",isBlock:!1}},{model:"htmlPre",view:"pre",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlArticle",view:"article",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSection",view:"section",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlNav",view:"nav",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDivDl",view:"div",modelSchema:{allowChildren:["htmlDt","htmlDd"],allowIn:"htmlDl"}},{model:"htmlDl",view:"dl",modelSchema:{allowWhere:"$container",allowChildren:["htmlDt","htmlDd","htmlDivDl"],isBlock:!1}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",isBlock:!1}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",isBlock:!1}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlHr",view:"hr",isEmpty:!0,modelSchema:{inheritAllFrom:"$blockObject"}}],inline:[{model:"htmlLiAttributes",view:"li",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlOlAttributes",view:"ol",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlUlAttributes",view:"ul",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"table"},{model:"htmlTheadAttributes",view:"thead",appliesToBlock:"table"},{model:"htmlTbodyAttributes",view:"tbody",appliesToBlock:"table"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"imageBlock"},{model:"htmlAcronym",view:"acronym",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTt",view:"tt",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlFont",view:"font",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTime",view:"time",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlVar",view:"var",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBig",view:"big",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSmall",view:"small",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSamp",view:"samp",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlQ",view:"q",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlOutput",view:"output",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlKbd",view:"kbd",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdi",view:"bdi",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdo",view:"bdo",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlAbbr",view:"abbr",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlA",view:"a",priority:5,coupledAttribute:"linkHref"},{model:"htmlStrong",view:"strong",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlB",view:"b",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlI",view:"i",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlEm",view:"em",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlS",view:"s",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDel",view:"del",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlIns",view:"ins",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlU",view:"u",coupledAttribute:"underline",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSub",view:"sub",coupledAttribute:"subscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSup",view:"sup",coupledAttribute:"superscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCode",view:"code",coupledAttribute:"code",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlMark",view:"mark",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSpan",view:"span",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCite",view:"cite",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlLabel",view:"label",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDfn",view:"dfn",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlObject",view:"object",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlIframe",view:"iframe",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlInput",view:"input",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlButton",view:"button",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlTextarea",view:"textarea",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlSelect",view:"select",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlVideo",view:"video",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlEmbed",view:"embed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlOembed",view:"oembed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlAudio",view:"audio",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlImg",view:"img",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlCanvas",view:"canvas",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlMeter",view:"meter",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlProgress",view:"progress",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlScript",view:"script",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlStyle",view:"style",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlCustomElement",view:"$customElement",modelSchema:{allowWhere:["$text","$block"],allowAttributesOf:"$inlineObject",isInline:!0}}]};class S extends g{constructor(){super(...arguments);v(this,"_definitions",[])}static get pluginName(){return"DataSchema"}static get isOfficialPlugin(){return!0}init(){for(const e of W.block)this.registerBlockElement(e);for(const e of W.inline)this.registerInlineElement(e)}registerBlockElement(e){this._definitions.push({...e,isBlock:!0})}registerInlineElement(e){this._definitions.push({...e,isInline:!0})}extendBlockElement(e){this._extendDefinition({...e,isBlock:!0})}extendInlineElement(e){this._extendDefinition({...e,isInline:!0})}getDefinitionsForView(e,t=!1){const i=new Set;for(const o of this._getMatchingViewDefinitions(e)){if(t)for(const l of this._getReferences(o.model))i.add(l);i.add(o)}return i}getDefinitionsForModel(e){return this._definitions.filter(t=>t.model==e)}_getMatchingViewDefinitions(e){return this._definitions.filter(t=>t.view&&ge(e,t.view))}*_getReferences(e){const t=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"],i=this._definitions.filter(o=>o.model==e);for(const{modelSchema:o}of i)if(o)for(const l of t)for(const n of F(o[l]||[])){const m=this._definitions.filter(a=>a.model==n);for(const a of m)n!==e&&(yield*this._getReferences(a.model),yield a)}}_extendDefinition(e){const t=Array.from(this._definitions.entries()).filter(([,i])=>i.model==e.model);if(t.length==0){this._definitions.push(e);return}for(const[i,o]of t)this._definitions[i]=le({},o,e,(l,n)=>Array.isArray(l)?l.concat(n):void 0)}}function ge(s,r){return typeof s=="string"?s===r:s instanceof RegExp?s.test(r):!1}class h extends g{constructor(e){super(e);v(this,"_dataSchema");v(this,"_allowedAttributes");v(this,"_disallowedAttributes");v(this,"_allowedElements");v(this,"_disallowedElements");v(this,"_dataInitialized");v(this,"_coupledAttributes");this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new N,this._disallowedAttributes=new N,this._allowedElements=new Set,this._disallowedElements=new Set,this._dataInitialized=!1,this._coupledAttributes=null,this._registerElementsAfterInit(),this._registerElementHandlers(),this._registerCoupledAttributesPostFixer(),this._registerAssociatedHtmlAttributesPostFixer()}static get pluginName(){return"DataFilter"}static get isOfficialPlugin(){return!0}static get requires(){return[S,ie]}loadAllowedConfig(e){for(const t of e){const i=t.name||/[\s\S]+/,o=z(t);this.allowElement(i),o.forEach(l=>this.allowAttributes(l))}}loadDisallowedConfig(e){for(const t of e){const i=t.name||/[\s\S]+/,o=z(t);o.length==0?this.disallowElement(i):o.forEach(l=>this.disallowAttributes(l))}}loadAllowedEmptyElementsConfig(e){for(const t of e)this.allowEmptyElement(t)}allowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))this._addAllowedElement(t),this._coupledAttributes=null}disallowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!1))this._disallowedElements.add(t.view)}allowEmptyElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))t.isInline&&this._dataSchema.extendInlineElement({...t,allowEmpty:!0})}allowAttributes(e){this._allowedAttributes.add(e)}disallowAttributes(e){this._disallowedAttributes.add(e)}processViewAttributes(e,t){const{consumable:i}=t;return q(e,this._disallowedAttributes,i),be(e,q(e,this._allowedAttributes,i))}_addAllowedElement(e){if(!this._allowedElements.has(e)){if(this._allowedElements.add(e),"appliesToBlock"in e&&typeof e.appliesToBlock=="string")for(const t of this._dataSchema.getDefinitionsForModel(e.appliesToBlock))t.isBlock&&this._addAllowedElement(t);this._dataInitialized&&this.editor.data.once("set",()=>{this._fireRegisterEvent(e)},{priority:k.highest+1})}}_registerElementsAfterInit(){this.editor.data.on("init",()=>{this._dataInitialized=!0;for(const e of this._allowedElements)this._fireRegisterEvent(e)},{priority:k.highest+1})}_registerElementHandlers(){this.on("register",(e,t)=>{const i=this.editor.model.schema;if(t.isObject&&!i.isRegistered(t.model))this._registerObjectElement(t);else if(t.isBlock)this._registerBlockElement(t);else if(t.isInline)this._registerInlineElement(t);else throw new Z("data-filter-invalid-definition",null,t);e.stop()},{priority:"lowest"})}_registerCoupledAttributesPostFixer(){const e=this.editor.model,t=e.document.selection;e.document.registerPostFixer(i=>{const o=e.document.differ.getChanges();let l=!1;const n=this._getCoupledAttributesMap();for(const m of o){if(m.type!="attribute"||m.attributeNewValue!==null)continue;const a=n.get(m.attributeKey);if(a)for(const{item:u}of m.range.getWalker())for(const c of a)u.hasAttribute(c)&&(i.removeAttribute(c,u),l=!0)}return l}),this.listenTo(t,"change:attribute",(i,{attributeKeys:o})=>{const l=new Set,n=this._getCoupledAttributesMap();for(const m of o){if(t.hasAttribute(m))continue;const a=n.get(m);if(a)for(const u of a)t.hasAttribute(u)&&l.add(u)}l.size!=0&&e.change(m=>{for(const a of l)m.removeSelectionAttribute(a)})})}_registerAssociatedHtmlAttributesPostFixer(){const e=this.editor.model;e.document.registerPostFixer(t=>{const i=e.document.differ.getChanges();let o=!1;for(const l of i)if(!(l.type!=="insert"||l.name==="$text"))for(const n of l.attributes.keys())!n.startsWith("html")||!n.endsWith("Attributes")||e.schema.checkAttribute(l.name,n)||(t.removeAttribute(n,l.position.nodeAfter),o=!0);return o})}_getCoupledAttributesMap(){if(this._coupledAttributes)return this._coupledAttributes;this._coupledAttributes=new Map;for(const e of this._allowedElements)if(e.coupledAttribute&&e.model){const t=this._coupledAttributes.get(e.coupledAttribute);t?t.push(e.model):this._coupledAttributes.set(e.coupledAttribute,[e.model])}return this._coupledAttributes}_fireRegisterEvent(e){e.view&&this._disallowedElements.has(e.view)||this.fire(e.view?`register:${e.view}`:"register",e)}_registerObjectElement(e){const t=this.editor,i=t.model.schema,o=t.conversion,{view:l,model:n}=e;i.register(n,e.modelSchema);/* istanbul ignore next: paranoid check -- @preserve */l&&(i.extend(e.model,{allowAttributes:[b(l),"htmlContent"]}),t.data.registerRawContentMatcher({name:l}),o.for("upcast").elementToElement({view:l,model:V(e),converterPriority:k.low+2}),o.for("upcast").add(C(e,this)),o.for("editingDowncast").elementToStructure({model:{name:n,attributes:[b(l)]},view:de(t,e)}),o.for("dataDowncast").elementToElement({model:n,view:(m,{writer:a})=>$(l,m,a)}),o.for("dataDowncast").add(O(e)))}_registerBlockElement(e){const t=this.editor,i=t.model.schema,o=t.conversion,{view:l,model:n}=e;if(!i.isRegistered(e.model)){if(!e.modelSchema||(i.register(e.model,e.modelSchema),!l))return;o.for("upcast").elementToElement({model:n,view:l,converterPriority:k.low+2}),o.for("downcast").elementToElement({model:n,view:(m,{writer:a})=>e.isEmpty?a.createEmptyElement(l):a.createContainerElement(l)})}l&&(i.extend(e.model,{allowAttributes:b(l)}),o.for("upcast").add(C(e,this)),o.for("downcast").add(O(e)))}_registerInlineElement(e){const t=this.editor,i=t.model.schema,o=t.conversion,l=e.model;if(!e.appliesToBlock&&(i.extend("$text",{allowAttributes:l}),e.attributeProperties&&i.setAttributeProperties(l,e.attributeProperties),o.for("upcast").add(he(e,this)),o.for("downcast").attributeToElement({model:l,view:fe(e)}),!!e.allowEmpty)){if(i.setAttributeProperties(l,{copyFromObject:!1}),!i.isRegistered("htmlEmptyElement")){i.register("htmlEmptyElement",{inheritAllFrom:"$inlineObject"});const n=m=>Array.from(m.getAttributeKeys()).some(a=>a.startsWith("html"));t.model.document.registerPostFixer(m=>{const a=t.model.document.differ.getChanges(),u=new Set;for(const c of a)if(c.type!=="remove"){if(c.type==="attribute"&&c.attributeNewValue===null)for(const{item:d}of c.range)d.is("element","htmlEmptyElement")&&!n(d)&&u.add(d);if(c.type==="insert"&&c.position.nodeAfter){const d=c.position.nodeAfter;for(const{item:f}of m.createRangeOn(d))f.is("element","htmlEmptyElement")&&!n(f)&&u.add(f)}}for(const c of u)m.remove(c);return u.size>0})}t.data.htmlProcessor.domConverter.registerInlineObjectMatcher(n=>n.name==e.view&&n.isEmpty&&Array.from(n.getAttributeKeys()).length?{name:!0}:null),o.for("editingDowncast").elementToElement({model:"htmlEmptyElement",view:j(e,!0)}),o.for("dataDowncast").elementToElement({model:"htmlEmptyElement",view:j(e)})}}}function q(s,r,e){const t=r.matchAll(s)||[],i=s.document.stylesProcessor;return t.reduce((o,{match:l})=>{for(const[n,m]of l.attributes||[])if(n=="style"){const a=m,u=i.getRelatedStyles(a).filter(c=>c.split("-").length>a.split("-").length).sort((c,d)=>d.split("-").length-c.split("-").length);for(const c of u)e.consume(s,{styles:[c]})&&o.styles.push(c);e.consume(s,{styles:[a]})&&o.styles.push(a)}else if(n=="class"){const a=m;e.consume(s,{classes:[a]})&&o.classes.push(a)}else e.consume(s,{attributes:[n]})&&o.attributes.push(n);return o},{attributes:[],classes:[],styles:[]})}function be(s,{attributes:r,classes:e,styles:t}){return!r.length&&!e.length&&!t.length?null:{...r.length&&{attributes:pe(s,r)},...t.length&&{styles:we(s,t)},...e.length&&{classes:e}}}function pe(s,r){const e={};for(const t of r){const i=s.getAttribute(t);i!==void 0&&ee(t)&&(e[t]=i)}return e}function we(s,r){const e=new re(s.document.stylesProcessor);for(const t of r){const i=s.getStyle(t);i!==void 0&&e.set(t,i)}return Object.fromEntries(e.getStylesEntries())}function B(s,r){const{name:e}=s,t=s[r];return se(t)?Object.entries(t).map(([i,o])=>({name:e,[r]:{[i]:o}})):Array.isArray(t)?t.map(i=>({name:e,[r]:[i]})):[s]}function z(s){const{name:r,attributes:e,classes:t,styles:i}=s,o=[];return e&&o.push(...B({name:r,attributes:e},"attributes")),t&&o.push(...B({name:r,classes:t},"classes")),i&&o.push(...B({name:r,styles:i},"styles")),o}class Ae extends g{static get requires(){return[h]}static get pluginName(){return"CodeBlockElementSupport"}static get isOfficialPlugin(){return!0}init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const r=this.editor.plugins.get(h);r.on("register:pre",(e,t)=>{if(t.model!=="codeBlock")return;const i=this.editor,o=i.model.schema,l=i.conversion;o.extend("codeBlock",{allowAttributes:["htmlPreAttributes","htmlContentAttributes"]}),l.for("upcast").add(ve(r)),l.for("downcast").add(ye()),e.stop()})}}function ve(s){return r=>{r.on("element:code",(e,t,i)=>{const o=t.viewItem,l=o.parent;if(!l||!l.is("element","pre"))return;n(l,"htmlPreAttributes"),n(o,"htmlContentAttributes");function n(m,a){const u=s.processViewAttributes(m,i);u&&i.writer.setAttribute(a,u,t.modelRange)}},{priority:"low"})}}function ye(){return s=>{s.on("attribute:htmlPreAttributes:codeBlock",(r,e,t)=>{if(!t.consumable.consume(e.item,r.name))return;const{attributeOldValue:i,attributeNewValue:o}=e,n=t.mapper.toViewElement(e.item).parent;p(t.writer,i,o,n)}),s.on("attribute:htmlContentAttributes:codeBlock",(r,e,t)=>{if(!t.consumable.consume(e.item,r.name))return;const{attributeOldValue:i,attributeNewValue:o}=e,l=t.mapper.toViewElement(e.item);p(t.writer,i,o,l)})}}class Ee extends g{static get requires(){return[h]}static get pluginName(){return"DualContentModelElementSupport"}static get isOfficialPlugin(){return!0}init(){this.editor.plugins.get(h).on("register",(e,t)=>{const i=t,o=this.editor,l=o.model.schema,n=o.conversion;if(!i.paragraphLikeModel||l.isRegistered(i.model)||l.isRegistered(i.paragraphLikeModel))return;const m={model:i.paragraphLikeModel,view:i.view};l.register(i.model,i.modelSchema),l.register(m.model,{inheritAllFrom:"$block"}),n.for("upcast").elementToElement({view:i.view,model:(a,{writer:u})=>this._hasBlockContent(a)?u.createElement(i.model):u.createElement(m.model),converterPriority:k.low+.5}),n.for("downcast").elementToElement({view:i.view,model:i.model}),this._addAttributeConversion(i),n.for("downcast").elementToElement({view:m.view,model:m.model}),this._addAttributeConversion(m),e.stop()})}_hasBlockContent(r){const e=this.editor.editing.view,t=e.domConverter.blockElements;for(const i of e.createRangeIn(r).getItems())if(i.is("element")&&t.includes(i.name))return!0;return!1}_addAttributeConversion(r){const e=this.editor,t=e.conversion,i=e.plugins.get(h);e.model.schema.extend(r.model,{allowAttributes:b(r.view)}),t.for("upcast").add(C(r,i)),t.for("downcast").add(O(r))}}class Ce extends g{static get requires(){return[S,oe]}static get pluginName(){return"HeadingElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("HeadingEditing"))return;const e=r.config.get("heading.options");this.registerHeadingElements(r,e)}registerHeadingElements(r,e){const t=r.plugins.get(S),i=[];for(const o of e)"model"in o&&"view"in o&&(t.registerBlockElement({view:o.view,model:o.model}),i.push(o.model));t.extendBlockElement({model:"htmlHgroup",modelSchema:{allowChildren:i}}),t.extendBlockElement({model:"htmlSummary",modelSchema:{allowChildren:i}})}}/**
8
8
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
9
9
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
10
- */function P(s,r,e){const t=s.createRangeOn(r);for(const{item:i}of t.getWalker())if(i.is("element",e))return i}class Se extends f{static get requires(){return[d]}static get pluginName(){return"ImageElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("ImageInlineEditing")&&!r.plugins.has("ImageBlockEditing"))return;const e=r.model.schema,t=r.conversion,i=r.plugins.get(d);i.on("register:figure",()=>{t.for("upcast").add(Oe(i))}),i.on("register:img",(o,l)=>{l.model!=="imageBlock"&&l.model!=="imageInline"||(e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["htmlImgAttributes","htmlFigureAttributes","htmlLinkAttributes"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["htmlA","htmlImgAttributes"]}),t.for("upcast").add(ke(i)),t.for("downcast").add(Pe()),r.plugins.has("LinkImage")&&t.for("upcast").add(Fe(i,r)),o.stop())})}}function ke(s){return r=>{r.on("element:img",(e,t,i)=>{if(!t.modelRange)return;const o=t.viewItem,l=s.processViewAttributes(o,i);l&&i.writer.setAttribute("htmlImgAttributes",l,t.modelRange)},{priority:"low"})}}function Fe(s,r){const e=r.plugins.get("ImageUtils");return t=>{t.on("element:a",(i,o,l)=>{const n=o.viewItem;if(!e.findViewImgElement(n))return;const a=o.modelCursor.parent;if(!a.is("element","imageBlock"))return;const u=s.processViewAttributes(n,l);u&&l.writer.setAttribute("htmlLinkAttributes",u,a)},{priority:"low"})}}function Oe(s){return r=>{r.on("element:figure",(e,t,i)=>{const o=t.viewItem;if(!t.modelRange||!o.hasClass("image"))return;const l=s.processViewAttributes(o,i);l&&i.writer.setAttribute("htmlFigureAttributes",l,t.modelRange)},{priority:"low"})}}function Pe(){return s=>{r("htmlImgAttributes"),e("img","htmlImgAttributes"),e("figure","htmlFigureAttributes"),e("a","htmlLinkAttributes");function r(t){s.on(`attribute:${t}:imageInline`,(i,o,l)=>{if(!l.consumable.consume(o.item,i.name))return;const{attributeOldValue:n,attributeNewValue:m}=o,a=l.mapper.toViewElement(o.item);p(l.writer,n,m,a)},{priority:"low"})}function e(t,i){s.on(`attribute:${i}:imageBlock`,(o,l,n)=>{if(!n.consumable.test(l.item,o.name))return;const{attributeOldValue:m,attributeNewValue:a}=l,u=n.mapper.toViewElement(l.item),c=P(n.writer,u,t);c&&(p(n.writer,m,a,c),n.consumable.consume(l.item,o.name))},{priority:"low"}),t==="a"&&s.on("attribute:linkHref:imageBlock",(o,l,n)=>{if(!n.consumable.consume(l.item,"attribute:htmlLinkAttributes:imageBlock"))return;const m=n.mapper.toViewElement(l.item),a=P(n.writer,m,"a");w(n.writer,l.item.getAttribute("htmlLinkAttributes"),a)},{priority:"low"})}}}class Te extends f{static get requires(){return[d]}static get pluginName(){return"MediaEmbedElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("MediaEmbed")||r.config.get("mediaEmbed.previewsInData"))return;const e=r.model.schema,t=r.conversion,i=this.editor.plugins.get(d),o=this.editor.plugins.get(S),l=r.config.get("mediaEmbed.elementName");o.registerBlockElement({model:"media",view:l}),i.on("register:figure",()=>{t.for("upcast").add(Ie(i))}),i.on(`register:${l}`,(n,m)=>{m.model==="media"&&(e.extend("media",{allowAttributes:[b(l),"htmlFigureAttributes"]}),t.for("upcast").add($e(i,l)),t.for("dataDowncast").add(De(l)),n.stop())})}}function $e(s,r){const e=(t,i,o)=>{const l=i.viewItem;n(l,b(r));function n(m,a){const u=s.processViewAttributes(m,o);u&&o.writer.setAttribute(a,u,i.modelRange)}};return t=>{t.on(`element:${r}`,e,{priority:"low"})}}function Ie(s){return r=>{r.on("element:figure",(e,t,i)=>{const o=t.viewItem;if(!t.modelRange||!o.hasClass("media"))return;const l=s.processViewAttributes(o,i);l&&i.writer.setAttribute("htmlFigureAttributes",l,t.modelRange)},{priority:"low"})}}function De(s){return r=>{e(s,b(s)),e("figure","htmlFigureAttributes");function e(t,i){r.on(`attribute:${i}:media`,(o,l,n)=>{if(!n.consumable.consume(l.item,o.name))return;const{attributeOldValue:m,attributeNewValue:a}=l,u=n.mapper.toViewElement(l.item),c=P(n.writer,u,t);p(n.writer,m,a,c)})}}}class _e extends f{static get requires(){return[d]}static get pluginName(){return"ScriptElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor.plugins.get(d);r.on("register:script",(e,t)=>{const i=this.editor,o=i.model.schema,l=i.conversion;o.register("htmlScript",t.modelSchema),o.extend("htmlScript",{allowAttributes:["htmlScriptAttributes","htmlContent"],isContent:!0}),i.data.registerRawContentMatcher({name:"script"}),l.for("upcast").elementToElement({view:"script",model:V(t)}),l.for("upcast").add(C(t,r)),l.for("downcast").elementToElement({model:"htmlScript",view:(n,{writer:m})=>$("script",n,m)}),l.for("downcast").add(O(t)),e.stop()})}}const Be=["width","max-width","min-width","height","min-height","max-height"];class Re extends f{static get requires(){return[d]}static get pluginName(){return"TableElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("TableEditing"))return;const e=r.model.schema,t=r.conversion,i=r.plugins.get(d),o=r.plugins.get("TableUtils");i.on("register:figure",()=>{t.for("upcast").add(He(i))}),i.on("register:table",(l,n)=>{n.model==="table"&&(e.extend("table",{allowAttributes:["htmlTableAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),t.for("upcast").add(Ve(i)),t.for("downcast").add(Me()),r.model.document.registerPostFixer(xe(r.model,o)),l.stop())})}}function xe(s,r){return e=>{const t=s.document.differ.getChanges();let i=!1;for(const o of t){if(o.type!="attribute"||o.attributeKey!="headingRows")continue;const l=o.range.start.nodeAfter,n=l.getAttribute("htmlTheadAttributes"),m=l.getAttribute("htmlTbodyAttributes");n&&!o.attributeNewValue?(e.removeAttribute("htmlTheadAttributes",l),i=!0):m&&o.attributeNewValue==r.getRows(l)&&(e.removeAttribute("htmlTbodyAttributes",l),i=!0)}return i}}function Ve(s){return r=>{r.on("element:table",(e,t,i)=>{if(!t.modelRange)return;const o=t.viewItem;l(o,"htmlTableAttributes");for(const n of o.getChildren())n.is("element","thead")&&l(n,"htmlTheadAttributes"),n.is("element","tbody")&&l(n,"htmlTbodyAttributes");function l(n,m){const a=s.processViewAttributes(n,i);a&&i.writer.setAttribute(m,a,t.modelRange)}},{priority:"low"})}}function He(s){return r=>{r.on("element:figure",(e,t,i)=>{const o=t.viewItem;if(!t.modelRange||!o.hasClass("table"))return;const l=s.processViewAttributes(o,i);l&&i.writer.setAttribute("htmlFigureAttributes",l,t.modelRange)},{priority:"low"})}}function Me(){return s=>{r("table","htmlTableAttributes"),r("figure","htmlFigureAttributes"),r("thead","htmlTheadAttributes"),r("tbody","htmlTbodyAttributes");function r(e,t){s.on(`attribute:${t}:table`,(i,o,l)=>{if(!l.consumable.test(o.item,i.name))return;const n=l.mapper.toViewElement(o.item),m=P(l.writer,n,e);if(m)if(l.consumable.consume(o.item,i.name),t==="htmlTableAttributes"&&n!==m){const a=U(o.attributeOldValue),u=U(o.attributeNewValue);p(l.writer,a.tableAttributes,u.tableAttributes,m),p(l.writer,a.figureAttributes,u.figureAttributes,n)}else p(l.writer,o.attributeOldValue,o.attributeNewValue,m)})}}}function U(s){const r={},e={...s};if(!s||!("styles"in s))return{figureAttributes:r,tableAttributes:e};e.styles={};for(const[t,i]of Object.entries(s.styles))Be.includes(t)?r.styles={...r.styles,[t]:i}:e.styles={...e.styles,[t]:i};return{figureAttributes:r,tableAttributes:e}}class Ne extends f{static get requires(){return[d]}static get pluginName(){return"StyleElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor.plugins.get(d);r.on("register:style",(e,t)=>{const i=this.editor,o=i.model.schema,l=i.conversion;o.register("htmlStyle",t.modelSchema),o.extend("htmlStyle",{allowAttributes:["htmlStyleAttributes","htmlContent"],isContent:!0}),i.data.registerRawContentMatcher({name:"style"}),l.for("upcast").elementToElement({view:"style",model:V(t)}),l.for("upcast").add(C(t,r)),l.for("downcast").elementToElement({model:"htmlStyle",view:(n,{writer:m})=>$("style",n,m)}),l.for("downcast").add(O(t)),e.stop()})}}class Le extends f{static get requires(){return[d]}static get pluginName(){return"ListElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("ListEditing"))return;const e=r.model.schema,t=r.conversion,i=r.plugins.get(d),o=r.plugins.get("ListEditing"),l=r.plugins.get("ListUtils"),n=["ul","ol","li"];o.registerDowncastStrategy({scope:"item",attributeName:"htmlLiAttributes",setAttributeOnDowncast:w}),o.registerDowncastStrategy({scope:"list",attributeName:"htmlUlAttributes",setAttributeOnDowncast:w}),o.registerDowncastStrategy({scope:"list",attributeName:"htmlOlAttributes",setAttributeOnDowncast:w}),i.on("register",(m,a)=>{if(!n.includes(a.view)||(m.stop(),e.checkAttribute("$block","htmlLiAttributes")))return;const u=n.map(c=>b(c));e.extend("$listItem",{allowAttributes:u}),t.for("upcast").add(c=>{c.on("element:ul",R("htmlUlAttributes",i),{priority:"low"}),c.on("element:ol",R("htmlOlAttributes",i),{priority:"low"}),c.on("element:li",R("htmlLiAttributes",i),{priority:"low"})})}),o.on("postFixer",(m,{listNodes:a,writer:u})=>{for(const{node:c,previousNodeInList:h}of a)if(h){if(h.getAttribute("listType")==c.getAttribute("listType")){const g=G(h.getAttribute("listType")),A=h.getAttribute(g);!L(c.getAttribute(g),A)&&u.model.schema.checkAttribute(c,g)&&(u.setAttribute(g,A,c),m.return=!0)}if(h.getAttribute("listItemId")==c.getAttribute("listItemId")){const g=h.getAttribute("htmlLiAttributes");!L(c.getAttribute("htmlLiAttributes"),g)&&u.model.schema.checkAttribute(c,"htmlLiAttributes")&&(u.setAttribute("htmlLiAttributes",g,c),m.return=!0)}}}),o.on("postFixer",(m,{listNodes:a,writer:u})=>{for(const{node:c}of a){const h=c.getAttribute("listType");!l.isNumberedListType(h)&&c.getAttribute("htmlOlAttributes")&&(u.removeAttribute("htmlOlAttributes",c),m.return=!0),l.isNumberedListType(h)&&c.getAttribute("htmlUlAttributes")&&(u.removeAttribute("htmlUlAttributes",c),m.return=!0)}})}afterInit(){const r=this.editor;if(!r.commands.get("indentList"))return;const e=r.commands.get("indentList");this.listenTo(e,"afterExecute",(t,i)=>{r.model.change(o=>{for(const l of i){const n=G(l.getAttribute("listType"));r.model.schema.checkAttribute(l,n)&&o.setAttribute(n,{},l)}})})}}function R(s,r){return(e,t,i)=>{const o=t.viewItem;t.modelRange||Object.assign(t,i.convertChildren(t.viewItem,t.modelCursor));const l=r.processViewAttributes(o,i);for(const n of t.modelRange.getItems({shallow:!0}))n.hasAttribute("listItemId")&&(n.hasAttribute("htmlUlAttributes")||n.hasAttribute("htmlOlAttributes")||i.writer.model.schema.checkAttribute(n,s)&&i.writer.setAttribute(s,l||{},n))}}function G(s){return s==="numbered"||s=="customNumbered"?"htmlOlAttributes":"htmlUlAttributes"}class je extends f{static get requires(){return[d]}static get pluginName(){return"HorizontalLineElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("HorizontalLineEditing"))return;const e=r.model.schema,t=r.conversion,i=r.plugins.get(d);i.on("register:hr",(o,l)=>{l.model==="horizontalLine"&&(e.extend("horizontalLine",{allowAttributes:["htmlHrAttributes"]}),t.for("upcast").add(C(l,i)),t.for("downcast").add(We()),o.stop())})}}function We(){return s=>{s.on("attribute:htmlHrAttributes:horizontalLine",(r,e,t)=>{if(!t.consumable.test(e.item,r.name))return;const{attributeOldValue:i,attributeNewValue:o}=e,l=t.mapper.toViewElement(e.item),n=P(t.writer,l,"hr");n&&(p(t.writer,i,o,n),t.consumable.consume(e.item,r.name))},{priority:"low"})}}class qe extends f{static get requires(){return[d,S]}static get pluginName(){return"CustomElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor.plugins.get(d),e=this.editor.plugins.get(S);r.on("register:$customElement",(t,i)=>{t.stop();const o=this.editor,l=o.model.schema,n=o.conversion,m=o.editing.view.domConverter.unsafeElements,a=o.data.htmlProcessor.domConverter.preElements;l.register(i.model,i.modelSchema),l.extend(i.model,{allowAttributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"],isContent:!0}),o.data.htmlProcessor.domConverter.registerRawContentMatcher({name:"template"}),n.for("upcast").elementToElement({view:/.*/,model:(u,c)=>{if(u.name=="$comment"||!ze(u.name)||e.getDefinitionsForView(u.name).size)return null;m.includes(u.name)||m.push(u.name),a.includes(u.name)||a.push(u.name);const h=c.writer.createElement(i.model,{htmlElementName:u.name}),g=r.processViewAttributes(u,c);g&&c.writer.setAttribute("htmlCustomElementAttributes",g,h);let A;if(u.is("element","template")&&u.getCustomProperty("$rawContent"))A=u.getCustomProperty("$rawContent");else{const I=new x(u.document).createDocumentFragment(u),D=o.data.htmlProcessor.domConverter.viewToDom(I),_=D.firstChild;for(;_.firstChild;)D.appendChild(_.firstChild);_.remove(),A=o.data.htmlProcessor.htmlWriter.getHtml(D)}c.writer.setAttribute("htmlContent",A,h);for(const{item:T}of o.editing.view.createRangeIn(u))c.consumable.consume(T,{name:!0});return h},converterPriority:"low"}),n.for("editingDowncast").elementToElement({model:{name:i.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(u,{writer:c})=>{const h=u.getAttribute("htmlElementName"),g=c.createRawElement(h);return u.hasAttribute("htmlCustomElementAttributes")&&w(c,u.getAttribute("htmlCustomElementAttributes"),g),g}}),n.for("dataDowncast").elementToElement({model:{name:i.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(u,{writer:c})=>{const h=u.getAttribute("htmlElementName"),g=u.getAttribute("htmlContent"),A=c.createRawElement(h,null,(T,I)=>{I.setContentOf(T,g)});return u.hasAttribute("htmlCustomElementAttributes")&&w(c,u.getAttribute("htmlCustomElementAttributes"),A),A}})})}}function ze(s){try{document.createElement(s)}catch{return!1}return!0}class lt extends f{static get pluginName(){return"GeneralHtmlSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[d,Ae,Ee,Ce,Se,Te,_e,Re,Ne,Le,je,qe]}init(){const r=this.editor,e=r.plugins.get(d);e.loadAllowedEmptyElementsConfig(r.config.get("htmlSupport.allowEmpty")||[]),e.loadAllowedConfig(r.config.get("htmlSupport.allow")||[]),e.loadDisallowedConfig(r.config.get("htmlSupport.disallow")||[])}getGhsAttributeNameForElement(r){const e=this.editor.plugins.get("DataSchema"),t=Array.from(e.getDefinitionsForView(r,!1)),i=t.find(o=>o.isInline&&!t[0].isObject);return i?i.model:b(r)}addModelHtmlClass(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"classes",m=>{for(const a of F(e))m.add(a)})})}removeModelHtmlClass(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"classes",m=>{for(const a of F(e))m.delete(a)})})}setModelHtmlAttributes(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"attributes",m=>{for(const[a,u]of Object.entries(e))m.set(a,u)})})}removeModelHtmlAttributes(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"attributes",m=>{for(const a of F(e))m.delete(a)})})}setModelHtmlStyles(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"styles",m=>{for(const[a,u]of Object.entries(e))m.set(a,u)})})}removeModelHtmlStyles(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"styles",m=>{for(const a of F(e))m.delete(a)})})}}function*E(s,r,e){if(r)if(!(Symbol.iterator in r)&&r.is("documentSelection")&&r.isCollapsed)s.schema.checkAttributeInSelection(r,e)&&(yield r);else for(const t of Ue(s,r,e))yield*t.getItems({shallow:!0})}function Ue(s,r,e){return!(Symbol.iterator in r)&&(r.is("node")||r.is("$text")||r.is("$textProxy"))?s.schema.checkAttribute(r,e)?[s.createRangeOn(r)]:[]:s.schema.getValidRanges(s.createSelection(r).getRanges(),e)}class nt extends f{static get pluginName(){return"HtmlComment"}static get isOfficialPlugin(){return!0}init(){const r=this.editor,e=new Map;r.data.processor.skipComments=!1,r.model.schema.addAttributeCheck((t,i)=>{if(t.endsWith("$root")&&i.startsWith("$comment"))return!0}),r.conversion.for("upcast").elementToMarker({view:"$comment",model:t=>{const o=`$comment:${M()}`,l=t.getCustomProperty("$rawContent");return e.set(o,l),o}}),r.conversion.for("dataDowncast").markerToElement({model:"$comment",view:(t,{writer:i})=>{let o;for(const a of this.editor.model.document.getRootNames())if(o=this.editor.model.document.getRoot(a),o.hasAttribute(t.markerName))break;const l=t.markerName,n=o.getAttribute(l),m=i.createUIElement("$comment");return i.setCustomProperty("$rawContent",n,m),m}}),r.model.document.registerPostFixer(t=>{let i=!1;const o=r.model.document.differ.getChangedMarkers().filter(l=>l.name.startsWith("$comment:"));for(const l of o){const{oldRange:n,newRange:m}=l.data;if(!(n&&m&&n.root==m.root)){if(n){const a=n.root;a.hasAttribute(l.name)&&(t.removeAttribute(l.name,a),i=!0)}if(m){const a=m.root;a.rootName=="$graveyard"?(t.removeMarker(l.name),i=!0):a.hasAttribute(l.name)||(t.setAttribute(l.name,e.get(l.name)||"",a),i=!0)}}}return i}),r.data.on("set",()=>{for(const t of r.model.markers.getMarkersGroup("$comment"))this.removeHtmlComment(t.name)},{priority:"high"}),r.model.on("deleteContent",(t,[i])=>{for(const o of i.getRanges()){const l=r.model.schema.getLimitElement(o),n=r.model.createPositionAt(l,0),m=r.model.createPositionAt(l,"end");let a;n.isTouching(o.start)&&m.isTouching(o.end)?a=this.getHtmlCommentsInRange(r.model.createRange(n,m)):a=this.getHtmlCommentsInRange(o,{skipBoundaries:!0});for(const u of a)this.removeHtmlComment(u)}},{priority:"high"})}createHtmlComment(r,e){const t=M(),o=this.editor.model,l=o.document.getRoot(r.root.rootName),n=`$comment:${t}`;return o.change(m=>{const a=m.createRange(r);return m.addMarker(n,{usingOperation:!0,affectsData:!0,range:a}),m.setAttribute(n,e,l),n})}removeHtmlComment(r){const e=this.editor,t=e.model.markers.get(r);return t?(e.model.change(i=>{i.removeMarker(t)}),!0):!1}getHtmlCommentData(r){const t=this.editor.model.markers.get(r);if(!t)return null;let i="";for(const o of this.editor.model.document.getRoots())if(o.hasAttribute(r)){i=o.getAttribute(r);break}return{content:i,position:t.getStart()}}getHtmlCommentsInRange(r,{skipBoundaries:e=!1}={}){const t=!e;return Array.from(this.editor.model.markers.getMarkersGroup("$comment")).filter(o=>i(o,r)).map(o=>o.name);function i(o,l){const n=o.getRange().start;return(n.isAfter(l.start)||t&&n.isEqual(l.start))&&(n.isBefore(l.end)||t&&n.isEqual(l.end))}}}class Ge extends te{toView(r){if(!/<(?:html|body|head|meta)(?:\s[^>]*)?>/i.test(r.trim().slice(0,1e4)))return super.toView(r);let e="",t="";r=r.trim().replace(/<\?xml\s[^?]*\?>/i,m=>(t=m,"")),r=r.trim().replace(/^<!DOCTYPE\s[^>]*?>/i,m=>(e=m,""));const i=this._toDom(r),o=this.domConverter.domToView(i,{skipComments:this.skipComments}),l=new x(o.document);l.setCustomProperty("$fullPageDocument",i.ownerDocument.documentElement.outerHTML,o);const n=Array.from(i.ownerDocument.querySelectorAll("head style"));return l.setCustomProperty("$fullPageHeadStyles",n,o),e&&l.setCustomProperty("$fullPageDocType",e,o),t&&l.setCustomProperty("$fullPageXmlDeclaration",t,o),o}toData(r){let e=super.toData(r);const t=r.getCustomProperty("$fullPageDocument"),i=r.getCustomProperty("$fullPageDocType"),o=r.getCustomProperty("$fullPageXmlDeclaration");return t&&(e=t.replace(/<\/body\s*>/,e+"$&"),i&&(e=i+`
10
+ */function P(s,r,e){const t=s.createRangeOn(r);for(const{item:i}of t.getWalker())if(i.is("element",e))return i}class Se extends g{static get requires(){return[h]}static get pluginName(){return"ImageElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("ImageInlineEditing")&&!r.plugins.has("ImageBlockEditing"))return;const e=r.model.schema,t=r.conversion,i=r.plugins.get(h);i.on("register:figure",()=>{t.for("upcast").add(Oe(i))}),i.on("register:img",(o,l)=>{l.model!=="imageBlock"&&l.model!=="imageInline"||(e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["htmlImgAttributes","htmlFigureAttributes","htmlLinkAttributes"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["htmlA","htmlImgAttributes"]}),t.for("upcast").add(ke(i)),t.for("downcast").add(Pe()),r.plugins.has("LinkImage")&&t.for("upcast").add(Fe(i,r)),o.stop())})}}function ke(s){return r=>{r.on("element:img",(e,t,i)=>{if(!t.modelRange)return;const o=t.viewItem,l=s.processViewAttributes(o,i);l&&i.writer.setAttribute("htmlImgAttributes",l,t.modelRange)},{priority:"low"})}}function Fe(s,r){const e=r.plugins.get("ImageUtils");return t=>{t.on("element:a",(i,o,l)=>{const n=o.viewItem;if(!e.findViewImgElement(n))return;const a=o.modelCursor.parent;if(!a.is("element","imageBlock"))return;const u=s.processViewAttributes(n,l);u&&l.writer.setAttribute("htmlLinkAttributes",u,a)},{priority:"low"})}}function Oe(s){return r=>{r.on("element:figure",(e,t,i)=>{const o=t.viewItem;if(!t.modelRange||!o.hasClass("image"))return;const l=s.processViewAttributes(o,i);l&&i.writer.setAttribute("htmlFigureAttributes",l,t.modelRange)},{priority:"low"})}}function Pe(){return s=>{r("htmlImgAttributes"),e("img","htmlImgAttributes"),e("figure","htmlFigureAttributes"),e("a","htmlLinkAttributes");function r(t){s.on(`attribute:${t}:imageInline`,(i,o,l)=>{if(!l.consumable.consume(o.item,i.name))return;const{attributeOldValue:n,attributeNewValue:m}=o,a=l.mapper.toViewElement(o.item);p(l.writer,n,m,a)},{priority:"low"})}function e(t,i){s.on(`attribute:${i}:imageBlock`,(o,l,n)=>{if(!n.consumable.test(l.item,o.name))return;const{attributeOldValue:m,attributeNewValue:a}=l,u=n.mapper.toViewElement(l.item),c=P(n.writer,u,t);c&&(p(n.writer,m,a,c),n.consumable.consume(l.item,o.name))},{priority:"low"}),t==="a"&&s.on("attribute:linkHref:imageBlock",(o,l,n)=>{if(!n.consumable.consume(l.item,"attribute:htmlLinkAttributes:imageBlock"))return;const m=n.mapper.toViewElement(l.item),a=P(n.writer,m,"a");w(n.writer,l.item.getAttribute("htmlLinkAttributes"),a)},{priority:"low"})}}}class Te extends g{static get requires(){return[h]}static get pluginName(){return"MediaEmbedElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("MediaEmbed")||r.config.get("mediaEmbed.previewsInData"))return;const e=r.model.schema,t=r.conversion,i=this.editor.plugins.get(h),o=this.editor.plugins.get(S),l=r.config.get("mediaEmbed.elementName");o.registerBlockElement({model:"media",view:l}),i.on("register:figure",()=>{t.for("upcast").add(Ie(i))}),i.on(`register:${l}`,(n,m)=>{m.model==="media"&&(e.extend("media",{allowAttributes:[b(l),"htmlFigureAttributes"]}),t.for("upcast").add($e(i,l)),t.for("dataDowncast").add(De(l)),n.stop())})}}function $e(s,r){const e=(t,i,o)=>{const l=i.viewItem;n(l,b(r));function n(m,a){const u=s.processViewAttributes(m,o);u&&o.writer.setAttribute(a,u,i.modelRange)}};return t=>{t.on(`element:${r}`,e,{priority:"low"})}}function Ie(s){return r=>{r.on("element:figure",(e,t,i)=>{const o=t.viewItem;if(!t.modelRange||!o.hasClass("media"))return;const l=s.processViewAttributes(o,i);l&&i.writer.setAttribute("htmlFigureAttributes",l,t.modelRange)},{priority:"low"})}}function De(s){return r=>{e(s,b(s)),e("figure","htmlFigureAttributes");function e(t,i){r.on(`attribute:${i}:media`,(o,l,n)=>{if(!n.consumable.consume(l.item,o.name))return;const{attributeOldValue:m,attributeNewValue:a}=l,u=n.mapper.toViewElement(l.item),c=P(n.writer,u,t);p(n.writer,m,a,c)})}}}class _e extends g{static get requires(){return[h]}static get pluginName(){return"ScriptElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor.plugins.get(h);r.on("register:script",(e,t)=>{const i=this.editor,o=i.model.schema,l=i.conversion;o.register("htmlScript",t.modelSchema),o.extend("htmlScript",{allowAttributes:["htmlScriptAttributes","htmlContent"],isContent:!0}),i.data.registerRawContentMatcher({name:"script"}),l.for("upcast").elementToElement({view:"script",model:V(t)}),l.for("upcast").add(C(t,r)),l.for("downcast").elementToElement({model:"htmlScript",view:(n,{writer:m})=>$("script",n,m)}),l.for("downcast").add(O(t)),e.stop()})}}const Be=["width","max-width","min-width","height","min-height","max-height"];class Re extends g{static get requires(){return[h]}static get pluginName(){return"TableElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("TableEditing"))return;const e=r.model.schema,t=r.conversion,i=r.plugins.get(h),o=r.plugins.get("TableUtils");i.on("register:figure",()=>{t.for("upcast").add(He(i))}),i.on("register:table",(l,n)=>{n.model==="table"&&(e.extend("table",{allowAttributes:["htmlTableAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),t.for("upcast").add(Ve(i)),t.for("downcast").add(Me()),r.model.document.registerPostFixer(xe(r.model,o)),l.stop())})}}function xe(s,r){return e=>{const t=s.document.differ.getChanges();let i=!1;for(const o of t){if(o.type!="attribute"||o.attributeKey!="headingRows")continue;const l=o.range.start.nodeAfter,n=l.getAttribute("htmlTheadAttributes"),m=l.getAttribute("htmlTbodyAttributes");n&&!o.attributeNewValue?(e.removeAttribute("htmlTheadAttributes",l),i=!0):m&&o.attributeNewValue==r.getRows(l)&&(e.removeAttribute("htmlTbodyAttributes",l),i=!0)}return i}}function Ve(s){return r=>{r.on("element:table",(e,t,i)=>{if(!t.modelRange)return;const o=t.viewItem;l(o,"htmlTableAttributes");for(const n of o.getChildren())n.is("element","thead")&&l(n,"htmlTheadAttributes"),n.is("element","tbody")&&l(n,"htmlTbodyAttributes");function l(n,m){const a=s.processViewAttributes(n,i);a&&i.writer.setAttribute(m,a,t.modelRange)}},{priority:"low"})}}function He(s){return r=>{r.on("element:figure",(e,t,i)=>{const o=t.viewItem;if(!t.modelRange||!o.hasClass("table"))return;const l=s.processViewAttributes(o,i);l&&i.writer.setAttribute("htmlFigureAttributes",l,t.modelRange)},{priority:"low"})}}function Me(){return s=>{r("table","htmlTableAttributes"),r("figure","htmlFigureAttributes"),r("thead","htmlTheadAttributes"),r("tbody","htmlTbodyAttributes");function r(e,t){s.on(`attribute:${t}:table`,(i,o,l)=>{if(!l.consumable.test(o.item,i.name))return;const n=l.mapper.toViewElement(o.item),m=P(l.writer,n,e);if(m)if(l.consumable.consume(o.item,i.name),t==="htmlTableAttributes"&&n!==m){const a=U(o.attributeOldValue),u=U(o.attributeNewValue);p(l.writer,a.tableAttributes,u.tableAttributes,m),p(l.writer,a.figureAttributes,u.figureAttributes,n)}else p(l.writer,o.attributeOldValue,o.attributeNewValue,m)})}}}function U(s){const r={},e={...s};if(!s||!("styles"in s))return{figureAttributes:r,tableAttributes:e};e.styles={};for(const[t,i]of Object.entries(s.styles))Be.includes(t)?r.styles={...r.styles,[t]:i}:e.styles={...e.styles,[t]:i};return{figureAttributes:r,tableAttributes:e}}class Ne extends g{static get requires(){return[h]}static get pluginName(){return"StyleElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor.plugins.get(h);r.on("register:style",(e,t)=>{const i=this.editor,o=i.model.schema,l=i.conversion;o.register("htmlStyle",t.modelSchema),o.extend("htmlStyle",{allowAttributes:["htmlStyleAttributes","htmlContent"],isContent:!0}),i.data.registerRawContentMatcher({name:"style"}),l.for("upcast").elementToElement({view:"style",model:V(t)}),l.for("upcast").add(C(t,r)),l.for("downcast").elementToElement({model:"htmlStyle",view:(n,{writer:m})=>$("style",n,m)}),l.for("downcast").add(O(t)),e.stop()})}}class Le extends g{static get requires(){return[h]}static get pluginName(){return"ListElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("ListEditing"))return;const e=r.model.schema,t=r.conversion,i=r.plugins.get(h),o=r.plugins.get("ListEditing"),l=r.plugins.get("ListUtils"),n=["ul","ol","li"];o.registerDowncastStrategy({scope:"item",attributeName:"htmlLiAttributes",setAttributeOnDowncast:w}),o.registerDowncastStrategy({scope:"list",attributeName:"htmlUlAttributes",setAttributeOnDowncast:w}),o.registerDowncastStrategy({scope:"list",attributeName:"htmlOlAttributes",setAttributeOnDowncast:w}),i.on("register",(m,a)=>{if(!n.includes(a.view)||(m.stop(),e.checkAttribute("$block","htmlLiAttributes")))return;const u=n.map(c=>b(c));e.extend("$listItem",{allowAttributes:u}),t.for("upcast").add(c=>{c.on("element:ul",R("htmlUlAttributes",i),{priority:"low"}),c.on("element:ol",R("htmlOlAttributes",i),{priority:"low"}),c.on("element:li",R("htmlLiAttributes",i),{priority:"low"})})}),o.on("postFixer",(m,{listNodes:a,writer:u})=>{for(const{node:c,previousNodeInList:d}of a)if(d){if(d.getAttribute("listType")==c.getAttribute("listType")){const f=G(d.getAttribute("listType")),A=d.getAttribute(f);!L(c.getAttribute(f),A)&&u.model.schema.checkAttribute(c,f)&&(u.setAttribute(f,A,c),m.return=!0)}if(d.getAttribute("listItemId")==c.getAttribute("listItemId")){const f=d.getAttribute("htmlLiAttributes");!L(c.getAttribute("htmlLiAttributes"),f)&&u.model.schema.checkAttribute(c,"htmlLiAttributes")&&(u.setAttribute("htmlLiAttributes",f,c),m.return=!0)}}}),o.on("postFixer",(m,{listNodes:a,writer:u})=>{for(const{node:c}of a){const d=c.getAttribute("listType");!l.isNumberedListType(d)&&c.getAttribute("htmlOlAttributes")&&(u.removeAttribute("htmlOlAttributes",c),m.return=!0),l.isNumberedListType(d)&&c.getAttribute("htmlUlAttributes")&&(u.removeAttribute("htmlUlAttributes",c),m.return=!0)}})}afterInit(){const r=this.editor;if(!r.commands.get("indentList"))return;const e=r.commands.get("indentList");this.listenTo(e,"afterExecute",(t,i)=>{r.model.change(o=>{for(const l of i){const n=G(l.getAttribute("listType"));r.model.schema.checkAttribute(l,n)&&o.setAttribute(n,{},l)}})})}}function R(s,r){return(e,t,i)=>{const o=t.viewItem;t.modelRange||Object.assign(t,i.convertChildren(t.viewItem,t.modelCursor));const l=r.processViewAttributes(o,i);for(const n of t.modelRange.getItems({shallow:!0}))n.hasAttribute("listItemId")&&(n.hasAttribute("htmlUlAttributes")||n.hasAttribute("htmlOlAttributes")||i.writer.model.schema.checkAttribute(n,s)&&i.writer.setAttribute(s,l||{},n))}}function G(s){return s==="numbered"||s=="customNumbered"?"htmlOlAttributes":"htmlUlAttributes"}class je extends g{static get requires(){return[h]}static get pluginName(){return"HorizontalLineElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor;if(!r.plugins.has("HorizontalLineEditing"))return;const e=r.model.schema,t=r.conversion,i=r.plugins.get(h);i.on("register:hr",(o,l)=>{l.model==="horizontalLine"&&(e.extend("horizontalLine",{allowAttributes:["htmlHrAttributes"]}),t.for("upcast").add(C(l,i)),t.for("downcast").add(We()),o.stop())})}}function We(){return s=>{s.on("attribute:htmlHrAttributes:horizontalLine",(r,e,t)=>{if(!t.consumable.test(e.item,r.name))return;const{attributeOldValue:i,attributeNewValue:o}=e,l=t.mapper.toViewElement(e.item),n=P(t.writer,l,"hr");n&&(p(t.writer,i,o,n),t.consumable.consume(e.item,r.name))},{priority:"low"})}}class qe extends g{static get requires(){return[h,S]}static get pluginName(){return"CustomElementSupport"}static get isOfficialPlugin(){return!0}init(){const r=this.editor.plugins.get(h),e=this.editor.plugins.get(S);r.on("register:$customElement",(t,i)=>{t.stop();const o=this.editor,l=o.model.schema,n=o.conversion,m=o.editing.view.domConverter.unsafeElements,a=o.data.htmlProcessor.domConverter.preElements;l.register(i.model,i.modelSchema),l.extend(i.model,{allowAttributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"],isContent:!0}),o.data.htmlProcessor.domConverter.registerRawContentMatcher({name:"template"}),n.for("upcast").elementToElement({view:/.*/,model:(u,c)=>{if(u.name=="$comment"||!ze(u.name)||e.getDefinitionsForView(u.name).size)return null;m.includes(u.name)||m.push(u.name),a.includes(u.name)||a.push(u.name);const d=c.writer.createElement(i.model,{htmlElementName:u.name}),f=r.processViewAttributes(u,c);f&&c.writer.setAttribute("htmlCustomElementAttributes",f,d);let A;if(u.is("element","template")&&u.getCustomProperty("$rawContent"))A=u.getCustomProperty("$rawContent");else{const I=new x(u.document).createDocumentFragment(u),D=o.data.htmlProcessor.domConverter.viewToDom(I),_=D.firstChild;for(;_.firstChild;)D.appendChild(_.firstChild);_.remove(),A=o.data.htmlProcessor.htmlWriter.getHtml(D)}c.writer.setAttribute("htmlContent",A,d);for(const{item:T}of o.editing.view.createRangeIn(u))c.consumable.consume(T,{name:!0});return d},converterPriority:"low"}),n.for("editingDowncast").elementToElement({model:{name:i.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(u,{writer:c})=>{const d=u.getAttribute("htmlElementName"),f=c.createRawElement(d);return u.hasAttribute("htmlCustomElementAttributes")&&w(c,u.getAttribute("htmlCustomElementAttributes"),f),f}}),n.for("dataDowncast").elementToElement({model:{name:i.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(u,{writer:c})=>{const d=u.getAttribute("htmlElementName"),f=u.getAttribute("htmlContent"),A=c.createRawElement(d,null,(T,I)=>{I.setContentOf(T,f)});return u.hasAttribute("htmlCustomElementAttributes")&&w(c,u.getAttribute("htmlCustomElementAttributes"),A),A}})})}}function ze(s){try{document.createElement(s)}catch{return!1}return!0}class lt extends g{static get pluginName(){return"GeneralHtmlSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[h,Ae,Ee,Ce,Se,Te,_e,Re,Ne,Le,je,qe]}init(){const r=this.editor,e=r.plugins.get(h);e.loadAllowedEmptyElementsConfig(r.config.get("htmlSupport.allowEmpty")||[]),e.loadAllowedConfig(r.config.get("htmlSupport.allow")||[]),e.loadDisallowedConfig(r.config.get("htmlSupport.disallow")||[])}getGhsAttributeNameForElement(r){const e=this.editor.plugins.get("DataSchema"),t=Array.from(e.getDefinitionsForView(r,!1)),i=t.find(o=>o.isInline&&!t[0].isObject);return i?i.model:b(r)}addModelHtmlClass(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"classes",m=>{for(const a of F(e))m.add(a)})})}removeModelHtmlClass(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"classes",m=>{for(const a of F(e))m.delete(a)})})}setModelHtmlAttributes(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"attributes",m=>{for(const[a,u]of Object.entries(e))m.set(a,u)})})}removeModelHtmlAttributes(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"attributes",m=>{for(const a of F(e))m.delete(a)})})}setModelHtmlStyles(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"styles",m=>{for(const[a,u]of Object.entries(e))m.set(a,u)})})}removeModelHtmlStyles(r,e,t){const i=this.editor.model,o=this.getGhsAttributeNameForElement(r);i.change(l=>{for(const n of E(i,t,o))y(l,n,o,"styles",m=>{for(const a of F(e))m.delete(a)})})}}function*E(s,r,e){if(r)if(!(Symbol.iterator in r)&&r.is("documentSelection")&&r.isCollapsed)s.schema.checkAttributeInSelection(r,e)&&(yield r);else for(const t of Ue(s,r,e))yield*t.getItems({shallow:!0})}function Ue(s,r,e){return!(Symbol.iterator in r)&&(r.is("node")||r.is("$text")||r.is("$textProxy"))?s.schema.checkAttribute(r,e)?[s.createRangeOn(r)]:[]:s.schema.getValidRanges(s.createSelection(r).getRanges(),e)}class nt extends g{static get pluginName(){return"HtmlComment"}static get isOfficialPlugin(){return!0}init(){const r=this.editor,e=new Map;r.data.processor.skipComments=!1,r.model.schema.addAttributeCheck((t,i)=>{if(t.endsWith("$root")&&i.startsWith("$comment"))return!0}),r.conversion.for("upcast").elementToMarker({view:"$comment",model:t=>{const o=`$comment:${M()}`,l=t.getCustomProperty("$rawContent");return e.set(o,l),o}}),r.conversion.for("dataDowncast").markerToElement({model:"$comment",view:(t,{writer:i})=>{let o;for(const a of this.editor.model.document.getRootNames())if(o=this.editor.model.document.getRoot(a),o.hasAttribute(t.markerName))break;const l=t.markerName,n=o.getAttribute(l),m=i.createUIElement("$comment");return i.setCustomProperty("$rawContent",n,m),m}}),r.model.document.registerPostFixer(t=>{let i=!1;const o=r.model.document.differ.getChangedMarkers().filter(l=>l.name.startsWith("$comment:"));for(const l of o){const{oldRange:n,newRange:m}=l.data;if(!(n&&m&&n.root==m.root)){if(n){const a=n.root;a.hasAttribute(l.name)&&(t.removeAttribute(l.name,a),i=!0)}if(m){const a=m.root;a.rootName=="$graveyard"?(t.removeMarker(l.name),i=!0):a.hasAttribute(l.name)||(t.setAttribute(l.name,e.get(l.name)||"",a),i=!0)}}}return i}),r.data.on("set",()=>{for(const t of r.model.markers.getMarkersGroup("$comment"))this.removeHtmlComment(t.name)},{priority:"high"}),r.model.on("deleteContent",(t,[i])=>{for(const o of i.getRanges()){const l=r.model.schema.getLimitElement(o),n=r.model.createPositionAt(l,0),m=r.model.createPositionAt(l,"end");let a;n.isTouching(o.start)&&m.isTouching(o.end)?a=this.getHtmlCommentsInRange(r.model.createRange(n,m)):a=this.getHtmlCommentsInRange(o,{skipBoundaries:!0});for(const u of a)this.removeHtmlComment(u)}},{priority:"high"})}createHtmlComment(r,e){const t=M(),o=this.editor.model,l=o.document.getRoot(r.root.rootName),n=`$comment:${t}`;return o.change(m=>{const a=m.createRange(r);return m.addMarker(n,{usingOperation:!0,affectsData:!0,range:a}),m.setAttribute(n,e,l),n})}removeHtmlComment(r){const e=this.editor,t=e.model.markers.get(r);return t?(e.model.change(i=>{i.removeMarker(t)}),!0):!1}getHtmlCommentData(r){const t=this.editor.model.markers.get(r);if(!t)return null;let i="";for(const o of this.editor.model.document.getRoots())if(o.hasAttribute(r)){i=o.getAttribute(r);break}return{content:i,position:t.getStart()}}getHtmlCommentsInRange(r,{skipBoundaries:e=!1}={}){const t=!e;return Array.from(this.editor.model.markers.getMarkersGroup("$comment")).filter(o=>i(o,r)).map(o=>o.name);function i(o,l){const n=o.getRange().start;return(n.isAfter(l.start)||t&&n.isEqual(l.start))&&(n.isBefore(l.end)||t&&n.isEqual(l.end))}}}class Ge extends te{toView(r){if(!/<(?:html|body|head|meta)(?:\s[^>]*)?>/i.test(r.trim().slice(0,1e4)))return super.toView(r);let e="",t="";r=r.trim().replace(/<\?xml\s[^?]*\?>/i,m=>(t=m,"")),r=r.trim().replace(/^<!DOCTYPE\s[^>]*?>/i,m=>(e=m,""));const i=this._toDom(r),o=this.domConverter.domToView(i,{skipComments:this.skipComments}),l=new x(o.document);l.setCustomProperty("$fullPageDocument",i.ownerDocument.documentElement.outerHTML,o);const n=Array.from(i.ownerDocument.querySelectorAll("head style"));return l.setCustomProperty("$fullPageHeadStyles",n,o),e&&l.setCustomProperty("$fullPageDocType",e,o),t&&l.setCustomProperty("$fullPageXmlDeclaration",t,o),o}toData(r){let e=super.toData(r);const t=r.getCustomProperty("$fullPageDocument"),i=r.getCustomProperty("$fullPageDocType"),o=r.getCustomProperty("$fullPageXmlDeclaration");return t&&(e=t.replace(/<\/body\s*>/,e+"$&"),i&&(e=i+`
11
11
  `+e),o&&(e=o+`
12
- `+e)),e}}class st extends f{static get pluginName(){return"FullPage"}static get isOfficialPlugin(){return!0}constructor(r){super(r),r.config.define("htmlSupport.fullPage",{allowRenderStylesFromHead:!1,sanitizeCss:e=>(J("css-full-page-provide-sanitize-function"),{css:e,hasChanged:!1})}),r.data.processor=new Ge(r.data.viewDocument)}init(){const r=this.editor,e=["$fullPageDocument","$fullPageDocType","$fullPageXmlDeclaration","$fullPageHeadStyles"];r.model.schema.extend("$root",{allowAttributes:e}),r.data.on("toModel",(t,[i])=>{const o=r.model.document.getRoot();r.model.change(l=>{for(const n of e){const m=i.getCustomProperty(n);m&&l.setAttribute(n,m,o)}}),K(r)&&this._renderStylesFromHead(o)},{priority:"low"}),r.data.on("toView",(t,[i])=>{if(!i.is("rootElement"))return;const o=i,l=t.return;if(!o.hasAttribute("$fullPageDocument"))return;const n=new x(l.document);for(const m of e){const a=o.getAttribute(m);a&&n.setCustomProperty(m,a,l)}},{priority:"low"}),r.data.on("set",()=>{const t=r.model.document.getRoot();r.model.change(i=>{for(const o of e)t.hasAttribute(o)&&i.removeAttribute(o,t)})},{priority:"high"}),r.data.on("get",(t,i)=>{i[0]||(i[0]={}),i[0].trim=!1},{priority:"high"})}destroy(){super.destroy(),K(this.editor)&&this._removeStyleElementsFromDom()}_removeStyleElementsFromDom(){const r=Array.from(H.document.querySelectorAll(`[data-full-page-style-id="${this.editor.id}"]`));for(const e of r)e.remove()}_renderStyleElementsInDom(r){const e=this.editor,t=r.getAttribute("$fullPageHeadStyles");if(!t)return;const i=e.config.get("htmlSupport.fullPage.sanitizeCss");for(const o of t){o.setAttribute("data-full-page-style-id",e.id);const l=i(o.innerText);l.hasChanged&&(o.innerText=l.css),H.document.head.append(o)}}_renderStylesFromHead(r){this._removeStyleElementsFromDom(),this._renderStyleElementsInDom(r)}}function K(s){return s.config.get("htmlSupport.fullPage.allowRenderStylesFromHead")}export{d as DataFilter,S as DataSchema,st as FullPage,lt as GeneralHtmlSupport,nt as HtmlComment,Ge as HtmlPageDataProcessor};
12
+ `+e)),e}}class st extends g{static get pluginName(){return"FullPage"}static get isOfficialPlugin(){return!0}constructor(r){super(r),r.config.define("htmlSupport.fullPage",{allowRenderStylesFromHead:!1,sanitizeCss:e=>(J("css-full-page-provide-sanitize-function"),{css:e,hasChanged:!1})}),r.data.processor=new Ge(r.data.viewDocument)}init(){const r=this.editor,e=["$fullPageDocument","$fullPageDocType","$fullPageXmlDeclaration","$fullPageHeadStyles"];r.model.schema.extend("$root",{allowAttributes:e}),r.data.on("toModel",(t,[i])=>{const o=r.model.document.getRoot();r.model.change(l=>{for(const n of e){const m=i.getCustomProperty(n);m&&l.setAttribute(n,m,o)}}),K(r)&&this._renderStylesFromHead(o)},{priority:"low"}),r.data.on("toView",(t,[i])=>{if(!i.is("rootElement"))return;const o=i,l=t.return;if(!o.hasAttribute("$fullPageDocument"))return;const n=new x(l.document);for(const m of e){const a=o.getAttribute(m);a&&n.setCustomProperty(m,a,l)}},{priority:"low"}),r.data.on("set",()=>{const t=r.model.document.getRoot();r.model.change(i=>{for(const o of e)t.hasAttribute(o)&&i.removeAttribute(o,t)})},{priority:"high"}),r.data.on("get",(t,i)=>{i[0]||(i[0]={}),i[0].trim=!1},{priority:"high"})}destroy(){super.destroy(),K(this.editor)&&this._removeStyleElementsFromDom()}_removeStyleElementsFromDom(){const r=Array.from(H.document.querySelectorAll(`[data-full-page-style-id="${this.editor.id}"]`));for(const e of r)e.remove()}_renderStyleElementsInDom(r){const e=this.editor,t=r.getAttribute("$fullPageHeadStyles");if(!t)return;const i=e.config.get("htmlSupport.fullPage.sanitizeCss");for(const o of t){o.setAttribute("data-full-page-style-id",e.id);const l=i(o.innerText);l.hasChanged&&(o.innerText=l.css),H.document.head.append(o)}}_renderStylesFromHead(r){this._removeStyleElementsFromDom(),this._renderStyleElementsInDom(r)}}function K(s){return s.config.get("htmlSupport.fullPage.allowRenderStylesFromHead")}export{h as DataFilter,S as DataSchema,st as FullPage,lt as GeneralHtmlSupport,nt as HtmlComment,Ge as HtmlPageDataProcessor};