@ckeditor/ckeditor5-track-changes 31.1.0 → 34.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 (117) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +5 -2
  3. package/build/track-changes.js +5 -0
  4. package/build/translations/az.js +1 -0
  5. package/build/translations/cs.js +1 -0
  6. package/build/translations/da.js +1 -0
  7. package/build/translations/de.js +1 -0
  8. package/build/translations/el.js +1 -0
  9. package/build/translations/en-au.js +1 -0
  10. package/build/translations/es.js +1 -0
  11. package/build/translations/et.js +1 -0
  12. package/build/translations/fr.js +1 -0
  13. package/build/translations/gl.js +1 -0
  14. package/build/translations/hi.js +1 -0
  15. package/build/translations/hr.js +1 -0
  16. package/build/translations/id.js +1 -0
  17. package/build/translations/it.js +1 -0
  18. package/build/translations/nl.js +1 -0
  19. package/build/translations/pl.js +1 -0
  20. package/build/translations/pt-br.js +1 -0
  21. package/build/translations/sk.js +1 -0
  22. package/build/translations/sr-latn.js +1 -0
  23. package/build/translations/sr.js +1 -0
  24. package/build/translations/tk.js +1 -0
  25. package/build/translations/tr.js +1 -0
  26. package/build/translations/zh-cn.js +1 -0
  27. package/build/translations/zh.js +1 -0
  28. package/ckeditor5-metadata.json +3 -0
  29. package/lang/contexts.json +1 -1
  30. package/lang/translations/az.po +387 -0
  31. package/lang/translations/cs.po +32 -32
  32. package/lang/translations/da.po +2 -2
  33. package/lang/translations/de.po +2 -2
  34. package/lang/translations/el.po +387 -0
  35. package/lang/translations/en-au.po +7 -7
  36. package/lang/translations/en.po +2 -2
  37. package/lang/translations/es.po +37 -37
  38. package/lang/translations/et.po +2 -2
  39. package/lang/translations/fr.po +2 -2
  40. package/lang/translations/gl.po +5 -5
  41. package/lang/translations/hi.po +2 -2
  42. package/lang/translations/hr.po +15 -15
  43. package/lang/translations/id.po +370 -0
  44. package/lang/translations/it.po +4 -4
  45. package/lang/translations/nl.po +2 -2
  46. package/lang/translations/pl.po +2 -2
  47. package/lang/translations/pt-br.po +4 -4
  48. package/lang/translations/sk.po +59 -59
  49. package/lang/translations/sr-latn.po +4 -4
  50. package/lang/translations/sr.po +4 -4
  51. package/lang/translations/tk.po +2 -2
  52. package/lang/translations/tr.po +2 -2
  53. package/lang/translations/zh-cn.po +2 -2
  54. package/lang/translations/zh.po +2 -2
  55. package/package.json +4 -7
  56. package/src/commands/acceptallsuggestionscommand.js +2 -2
  57. package/src/commands/acceptselectedsuggestionscommand.js +2 -2
  58. package/src/commands/acceptsuggestioncommand.js +2 -2
  59. package/src/commands/discardallsuggestionscommand.js +2 -2
  60. package/src/commands/discardselectedsuggestionscommand.js +2 -2
  61. package/src/commands/discardsuggestioncommand.js +2 -2
  62. package/src/commands/trackchangescommand.js +2 -2
  63. package/src/index.js +23 -0
  64. package/src/integrations/alignment.js +2 -2
  65. package/src/integrations/basicstyles.js +2 -2
  66. package/src/integrations/blockquote.js +2 -2
  67. package/src/integrations/codeblock.js +2 -2
  68. package/src/integrations/comments.js +2 -2
  69. package/src/integrations/deletecommand.js +2 -2
  70. package/src/integrations/entercommand.js +2 -2
  71. package/src/integrations/font.js +2 -2
  72. package/src/integrations/heading.js +2 -2
  73. package/src/integrations/highlight.js +2 -2
  74. package/src/integrations/horizontalline.js +2 -2
  75. package/src/integrations/image.js +2 -2
  76. package/src/integrations/indent.js +2 -2
  77. package/src/integrations/inputcommand.js +2 -2
  78. package/src/integrations/link.js +2 -2
  79. package/src/integrations/list.js +2 -2
  80. package/src/integrations/mediaembed.js +2 -2
  81. package/src/integrations/mention.js +2 -2
  82. package/src/integrations/pagebreak.js +2 -2
  83. package/src/integrations/paragraph.js +2 -2
  84. package/src/integrations/removeformat.js +2 -2
  85. package/src/integrations/restrictededitingmode.js +2 -2
  86. package/src/integrations/shiftentercommand.js +2 -2
  87. package/src/integrations/standardeditingmode.js +2 -2
  88. package/src/integrations/table.js +2 -2
  89. package/src/integrations/tableclipboard.js +2 -2
  90. package/src/integrations/tableheadings.js +2 -2
  91. package/src/integrations/tablemergesplit.js +2 -2
  92. package/src/integrations/title.js +2 -2
  93. package/src/integrations/undo.js +2 -2
  94. package/src/integrations/utils.js +2 -2
  95. package/src/suggestion.js +2 -2
  96. package/src/suggestiondescriptionfactory.js +2 -2
  97. package/src/trackchanges.js +2 -2
  98. package/src/trackchangesdata.js +2 -2
  99. package/src/trackchangesediting.js +2 -2
  100. package/src/trackchangesui.js +2 -2
  101. package/src/ui/suggestioncontroller.js +2 -2
  102. package/src/ui/view/basesuggestionthreadview.js +2 -2
  103. package/src/ui/view/suggestionthreadview.js +2 -2
  104. package/src/utils/getselectedsuggestions.js +2 -2
  105. package/src/utils/hashobject.js +2 -2
  106. package/src/utils/normalizedescription.js +2 -2
  107. package/src/utils/sortsuggestions.js +2 -2
  108. package/theme/icons/track-changes-accept.svg +1 -1
  109. package/theme/icons/track-changes-discard.svg +1 -1
  110. package/theme/icons/track-changes.svg +1 -1
  111. package/theme/integrations/horizontalline.css +0 -15
  112. package/theme/integrations/image.css +0 -55
  113. package/theme/integrations/mediaembed.css +0 -19
  114. package/theme/integrations/pagebreak.css +0 -15
  115. package/theme/integrations/table.css +0 -147
  116. package/theme/suggestion.css +0 -87
  117. package/theme/suggestionmarker.css +0 -161
package/LICENSE.md CHANGED
@@ -2,7 +2,7 @@ Software License Agreement
2
2
  ==========================
3
3
 
4
4
  **CKEditor 5 track changes** (https://ckeditor.com/collaboration/track-changes/)<br>
5
- Copyright (c) 2003-2021, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
5
+ Copyright (c) 2003-2022, [CKSource](http://cksource.com) Holding sp. z o.o. All rights reserved.
6
6
 
7
7
  CKEditor 5 track changes feature is licensed under a commercial license and is protected by copyright law.
8
8
  For more details about available licensing options please contact us at sales@cksource.com.
@@ -19,4 +19,4 @@ The following libraries are included in CKEditor 5 track changes under the [MIT
19
19
  Trademarks
20
20
  ----------
21
21
 
22
- **CKEditor** is a trademark of [CKSource](http://cksource.com) Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
22
+ **CKEditor** is a trademark of [CKSource](http://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # CKEditor 5 track changes
2
2
 
3
+ [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-track-changes.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-track-changes)
4
+ ![Dependency Status](https://img.shields.io/librariesio/release/npm/@ckeditor/ckeditor5-track-changes)
5
+
3
6
  [CKEditor 5 track changes](https://ckeditor.com/collaboration/track-changes/) is a collaboration feature that makes it possible to track every change done by the user, mark the changes in the WYSIWYG editor content and show as suggestions.
4
7
 
5
8
  The user is able to track all basic actions available in the rich text editor, including:
@@ -50,11 +53,11 @@ As a licensed CKEditor 5 track changes user you can report bugs and request feat
50
53
  ## License
51
54
 
52
55
  **CKEditor 5 track changes** (https://ckeditor.com/collaboration/track-changes/)<br>
53
- Copyright (c) 2003-2021, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
56
+ Copyright (c) 2003-2022, [CKSource](http://cksource.com) Holding sp. z o.o. All rights reserved.
54
57
 
55
58
  CKEditor 5 track changes feature is licensed under a commercial license and is protected by copyright law.
56
59
  For more details about available licensing options please contact us at sales@cksource.com.
57
60
 
58
61
  ### Trademarks
59
62
 
60
- **CKEditor** is a trademark of [CKSource](http://cksource.com) Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
63
+ **CKEditor** is a trademark of [CKSource](http://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
@@ -0,0 +1,5 @@
1
+ !function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"*Change to:* %0":"*Change to:* %0","*Check item*":"*Check item*","*Format:* %0":"*Format:* %0","*Indent:* %0":"*Indent:* %0","*Insert:* %0":"*Insert:* %0","*Merge cells*":"*Merge cells*","*Merge:* %0":"*Merge:* %0","*Outdent:* %0":"*Outdent:* %0","*Remove all formatting*":"*Remove all formatting*","*Remove format:* %0":"*Remove format:* %0","*Remove highlight*":"*Remove highlight*","*Remove image text alternative*":"*Remove image text alternative*","*Remove link*":"*Remove link*","*Remove:* %0":"*Remove:* %0","*Replace table cells*":"*Replace table cells*","*Reset font background color*":"*Reset font background color*","*Reset font color*":"*Reset font color*","*Reset font family*":"*Reset font family*","*Reset font size*":"*Reset font size*","*Reset image width*":"*Reset image width*","*Set font background color:* %0":"*Set font background color:* %0","*Set font color:* %0":"*Set font color:* %0","*Set font family:* %0":"*Set font family:* %0","*Set font size:* %0":"*Set font size:* %0","*Set highlight:* %0":"*Set highlight:* %0","*Set image text alternative:* %0":"*Set image text alternative:* %0","*Set image width:* %0":"*Set image width:* %0","*Set link:* %0":"*Set link:* %0","*Split cell:* horizontally":"*Split cell:* horizontally","*Split cell:* vertically":"*Split cell:* vertically","*Split:* %0":"*Split:* %0","*Uncheck item*":"*Uncheck item*","Accept all selected suggestions":"Accept all selected suggestions","Accept all suggestions":"Accept all suggestions","Accept suggestion":"Accept suggestion","Discard all selected suggestions":"Discard all selected suggestions","Discard all suggestions":"Discard all suggestions","Discard suggestion":"Discard suggestion",ELEMENT_BLOCK_QUOTE:"block quote",ELEMENT_BULLETED_LIST:"bulleted list",ELEMENT_CAPTION:"caption",ELEMENT_CODE_BLOCK:["code block","%0 code blocks"],ELEMENT_HEADING:["heading (level %1)","%0 headings (level %1)"],ELEMENT_HEADING_CUSTOM:["heading (%1)","%0 headings (%1)"],ELEMENT_HORIZONTAL_LINE:["horizontal line","%0 horizontal lines"],ELEMENT_IMAGE:["image","%0 images"],ELEMENT_INLINE_IMAGE:["image","%0 images"],ELEMENT_LINE_BREAK:["line break","%0 line breaks"],ELEMENT_LIST_ITEM:["list item","%0 list items"],ELEMENT_MEDIA:["media item","%0 media items"],ELEMENT_NUMBERED_LIST:"numbered list",ELEMENT_PAGE_BREAK:["page break","%0 page breaks"],ELEMENT_PARAGRAPH:["paragraph","%0 paragraphs"],ELEMENT_SPACE:["space","%0 spaces"],ELEMENT_TABLE:["table","%0 tables"],ELEMENT_TABLE_COLUMN:["table column","%0 table columns"],ELEMENT_TABLE_COLUMN_WITH_TEXT:["table column *with text* %1","%0 table columns *with text* %1"],ELEMENT_TABLE_ROW:["table row","%0 table rows"],ELEMENT_TABLE_ROW_WITH_TEXT:["table row *with text* %1","%0 table rows *with text* %1"],ELEMENT_TABLE_WITH_TEXT:"table *with text* %0",ELEMENT_TITLE:"title",ELEMENT_TODO_LIST:"to-do list",FORMAT_ALIGN_TO_CENTER:"align to center",FORMAT_ALIGN_TO_LEFT:"align to left",FORMAT_ALIGN_TO_RIGHT:"align to right",FORMAT_BOLD:"bold",FORMAT_CODE:"code",FORMAT_HEADER_COLUMN:"header column",FORMAT_HEADER_ROW:"header row",FORMAT_HIGHLIGHT:"highlight",FORMAT_ITALIC:"italic",FORMAT_JUSTIFY_TEXT:"justify",FORMAT_REGULAR_COLUMN:"regular column",FORMAT_REGULAR_ROW:"regular row",FORMAT_RESTRICTED_DISABLED:"*Disable in restricted editing mode*",FORMAT_RESTRICTED_ENABLED:"*Enable in restricted editing mode*",FORMAT_SIDE_IMAGE:"side image",FORMAT_STRIKETHROUGH:"strikethrough",FORMAT_SUBSCRIPT:"subscript",FORMAT_SUPERSCRIPT:"superscript",FORMAT_UNDERLINE:"underline",PENDING_ACTION_SUGGESTION:"Unsaved change in suggestion.",REPLACE_TEXT:"*Replace:* %0 *with* %1","Track changes":"Track changes"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
2
+ /*!
3
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
4
+ * For licensing, see LICENSE.md.
5
+ */(()=>{var e={596:e=>{e.exports='\x3c!--\n\n What you\'re currently looking at is the source code of a legally protected, proprietary software.\n CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,\n all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.\n\n Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n\n!--\x3e\n\n<svg viewBox="0 0 20 20" width="20" height="20" xmlns="http://www.w3.org/2000/svg"><g fill="#000" fill-rule="nonzero"><path d="M1 3.28C1 2.574 1.574 2 2.272 2h10.23c.703 0 1.272.573 1.272 1.28v12.768c0 .708-.574 1.281-1.271 1.281H2.272A1.276 1.276 0 0 1 1 16.049V3.28zm11.503 12.954c-.008 0-.006-12.77-.006-12.77 0-.003-10.225-.004-10.225-.004.007 0 .005 12.77.005 12.77 0 .003 10.226.004 10.226.004zm-8.31-9.58c0-.353.292-.64.636-.64h5.116c.351 0 .636.284.636.64a.641.641 0 0 1-.636.638H4.829a.636.636 0 0 1-.635-.639zm0 2.554c0-.352.292-.638.636-.638h5.116c.351 0 .636.283.636.638a.641.641 0 0 1-.636.639H4.829a.636.636 0 0 1-.635-.639zm0 2.555c0-.353.289-.639.633-.639h2.567c.35 0 .633.284.633.64a.639.639 0 0 1-.633.638H4.826a.634.634 0 0 1-.632-.639z"/><path d="M10.515 17.958l.154-.23c-.195-.099-.304-.193-.328-.28-.024-.09.001-.275.076-.552.062-.165.099-.296.111-.393.013-.159.013-.319 0-.478-.138-.41-.2-.686-.187-.83.013-.145.117-.335.313-.57l4.465-6.208c.356-.6 1.059-.56 2.11.119 1.051.68 1.443 1.271 1.177 1.771L14.53 17.14c-.105.271-.22.444-.347.516-.128.07-.399.118-.813.138a2.954 2.954 0 0 0-.487.21 2.044 2.044 0 0 0-.347.31c-.193.174-.332.262-.416.262-.064 0-.178-.05-.346-.15l-.204.27-1.056-.738h.001zm-.184.274l1.039.727-.259.34H9.614l.717-1.067z"/></g></svg>\n'},417:(e,t,n)=>{e.exports=n(720)("./src/collaboration-core.js")},704:(e,t,n)=>{e.exports=n(79)("./src/core.js")},492:(e,t,n)=>{e.exports=n(79)("./src/engine.js")},331:(e,t,n)=>{e.exports=n(79)("./src/enter.js")},181:(e,t,n)=>{e.exports=n(79)("./src/typing.js")},273:(e,t,n)=>{e.exports=n(79)("./src/ui.js")},209:(e,t,n)=>{e.exports=n(79)("./src/utils.js")},995:(e,t,n)=>{e.exports=n(79)("./src/widget.js")},720:e=>{"use strict";e.exports=CKEditor5.collaborationDll},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function n(o){var s=t[o];if(void 0!==s)return s.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{BaseSuggestionThreadView:()=>hr,TrackChanges:()=>jr,TrackChangesData:()=>Wr});var e=n(704),t=n(209),s=n(273),i=n(417),r=n(492),a=n(995);const c=["execute","value","_enabledCommands","clearForceDisabled","isEnabled","refresh","has","editor","_disableUnsupportedCommands","affectsData","forceDisabled","commands","TrackChangesCommand","_enableCommands"];var l,g;l=c,g=235,function(e){for(;--e;)l.push(l.shift())}(++g);const u=function(e,t){return c[e-=0]};class d extends e.Command{constructor(e,t){super(e),this[u("0x5")]=t,this[u("0x4")]=!1,this[u("0x8")]()}[u("0x8")](){this[u("0x7")]=!0}[u("0x3")](){this[u("0x4")]=!this[u("0x4")],this[u("0x4")]?this[u("0xb")]():this._enableCommands()}_disableUnsupportedCommands(){for(const e of this[u("0xa")][u("0x0")][u("0x0")]())e[u("0xc")]&&!this[u("0x5")][u("0x9")](e)&&e[u("0xd")](u("0x1"))}[u("0x2")](){for(const e of this[u("0xa")][u("0x0")][u("0x0")]())e[u("0xc")]&&!this[u("0x5")][u("0x9")](e)&&e[u("0x6")](u("0x1"))}}const m=["get","TrackChangesEditing","execute","acceptSuggestion","track-changes-accept-suggestion-not-found","isEnabled","_suggestions","refresh","plugins"];var h,f;h=m,f=414,function(e){for(;--e;)h.push(h.shift())}(++f);const p=function(e,t){return m[e-=0]};class b extends e.Command{constructor(e,t){super(e),this._suggestions=t,this[p("0x7")]()}[p("0x7")](){this[p("0x5")]=!0}[p("0x2")](e){const n=this[p("0x6")][p("0x0")](e);if(!n)throw new t.CKEditorError(p("0x4"),this);this.editor[p("0x8")][p("0x0")](p("0x1"))[p("0x3")](n)}}const x=["track-changes-discard-suggestion-not-found","isEnabled","execute","plugins","get","_suggestions","TrackChangesEditing","refresh"];var y,C;y=x,C=164,function(e){for(;--e;)y.push(y.shift())}(++C);const _=function(e,t){return x[e-=0]};class k extends e.Command{constructor(e,t){super(e),this[_("0x1")]=t,this.refresh()}[_("0x3")](){this[_("0x5")]=!0}[_("0x6")](e){const n=this[_("0x1")][_("0x0")](e);if(!n)throw new t.CKEditorError(_("0x4"),this);this.editor[_("0x7")].get(_("0x2")).discardSuggestion(n)}}var v,E,T=["deletion","type"];v=T,E=264,function(e){for(;--e;)v.push(v.shift())}(++E);var R=function(e,t){return T[e-=0]};function S(e){return e.sort(((e,t)=>R("0x0")==e[R("0x1")]&&R("0x0")!=t[R("0x1")]?-1:"deletion"!=e[R("0x1")]&&R("0x0")==t.type?1:0))}const w=["execute","editor","change","model","refresh","from","_acceptSuggestionCommand","_suggestions","isInContent","some","isEnabled","values"];var A,I;A=w,I=140,function(e){for(;--e;)A.push(A.shift())}(++I);const M=function(e,t){return w[e-=0]};class N extends e.Command{constructor(e,t,n){super(e),this[M("0xa")]=t,this[M("0xb")]=n,this[M("0x8")]()}[M("0x8")](){const e=this[M("0xa")];this[M("0x2")]=e[M("0x2")]&&Array.from(this[M("0xb")][M("0x3")]())[M("0x1")]((e=>e.isInContent))}[M("0x4")](){this[M("0x5")][M("0x7")][M("0x6")]((()=>{const e=S(Array[M("0x9")](this._suggestions[M("0x3")]()));for(const t of e)t[M("0x0")]&&this[M("0xa")][M("0x4")](t.id)}))}}const F=["getRange","from","isTouching","start","isCollapsed","add","isIntersecting","isInContent","getRanges","end"];var P,O;P=F,O=253,function(e){for(;--e;)P.push(P.shift())}(++O);const L=function(e,t){return F[e-=0]};function B(e,t){const n=Array[L("0x8")](e[L("0x5")]()),o=new Set;for(const s of t)if(s[L("0x4")])for(const t of n)for(const n of s.getMarkers()){const i=n[L("0x7")]();(t[L("0x3")](i)||e[L("0x1")]&&!s.isMultiRange&&s.next&&i[L("0x6")][L("0x9")](t[L("0x0")]))&&o[L("0x2")](s)}return o}const j=["refresh","change","_acceptSuggestionCommand","isEnabled","_selectedSuggestions","execute","model","editor","_suggestions","from","values"];var D,U;D=j,U=135,function(e){for(;--e;)D.push(D.shift())}(++U);const H=function(e,t){return j[e-=0]};class V extends e.Command{constructor(e,t,n){super(e),this[H("0xa")]=t,this[H("0x5")]=n,this[H("0x1")]=new Set,this[H("0x8")]()}[H("0x8")](){const e=this[H("0xa")],t=this.editor[H("0x3")].document.selection,n=Array[H("0x6")](this[H("0x5")][H("0x7")]());this[H("0x1")]=B(t,n),this.isEnabled=e[H("0x0")]&&!!this._selectedSuggestions.size}[H("0x2")](){this[H("0x4")][H("0x3")][H("0x9")]((()=>{const e=S(Array[H("0x6")](this[H("0x1")]));for(const t of e)this[H("0xa")][H("0x2")](t.id)}))}}const z=["model","change","some","_suggestions","isEnabled","isInContent","refresh","_discardSuggestionCommand","values","editor","execute"];var G,W;G=z,W=243,function(e){for(;--e;)G.push(G.shift())}(++W);const q=function(e,t){return z[e-=0]};class $ extends e.Command{constructor(e,t,n){super(e),this[q("0x6")]=t,this[q("0x2")]=n,this[q("0x5")]()}[q("0x5")](){const e=this[q("0x6")];this[q("0x3")]=e[q("0x3")]&&Array.from(this[q("0x2")][q("0x7")]())[q("0x1")]((e=>e[q("0x4")]))}[q("0x9")](){this[q("0x8")][q("0xa")][q("0x0")]((()=>{for(const e of this[q("0x2")][q("0x7")]())e[q("0x4")]&&this[q("0x6")].execute(e.id)}))}}const K=["from","editor","model","_discardSuggestionCommand","_selectedSuggestions","refresh","_suggestions","isEnabled","selection","document","values","size","execute"];var X,Q;X=K,Q=231,function(e){for(;--e;)X.push(X.shift())}(++Q);const J=function(e,t){return K[e-=0]};class Y extends e.Command{constructor(e,t,n){super(e),this[J("0x6")]=t,this[J("0x9")]=n,this[J("0x7")]=new Set,this[J("0x8")]()}[J("0x8")](){const e=this[J("0x6")],t=this[J("0x4")][J("0x5")][J("0xc")][J("0xb")],n=Array[J("0x3")](this[J("0x9")][J("0x0")]());this[J("0x7")]=B(t,n),this.isEnabled=e[J("0xa")]&&!!this[J("0x7")][J("0x1")]}[J("0x2")](){this.editor[J("0x5")].change((()=>{for(const e of this[J("0x7")])this[J("0x6")][J("0x2")](e.id)}))}}const Z=function(){this.__data__=[],this.size=0};const ee=function(e,t){return e===t||e!=e&&t!=t};const te=function(e,t){for(var n=e.length;n--;)if(ee(e[n][0],t))return n;return-1};var ne=Array.prototype.splice;const oe=function(e){var t=this.__data__,n=te(t,e);return!(n<0)&&(n==t.length-1?t.pop():ne.call(t,n,1),--this.size,!0)};const se=function(e){var t=this.__data__,n=te(t,e);return n<0?void 0:t[n][1]};const ie=function(e){return te(this.__data__,e)>-1};const re=function(e,t){var n=this.__data__,o=te(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this};function ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}ae.prototype.clear=Z,ae.prototype.delete=oe,ae.prototype.get=se,ae.prototype.has=ie,ae.prototype.set=re;const ce=ae;const le=function(){this.__data__=new ce,this.size=0};const ge=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const ue=function(e){return this.__data__.get(e)};const de=function(e){return this.__data__.has(e)};const me="object"==typeof global&&global&&global.Object===Object&&global;var he="object"==typeof self&&self&&self.Object===Object&&self;const fe=me||he||Function("return this")();const pe=fe.Symbol;var be=Object.prototype,xe=be.hasOwnProperty,ye=be.toString,Ce=pe?pe.toStringTag:void 0;const _e=function(e){var t=xe.call(e,Ce),n=e[Ce];try{e[Ce]=void 0;var o=!0}catch(e){}var s=ye.call(e);return o&&(t?e[Ce]=n:delete e[Ce]),s};var ke=Object.prototype.toString;const ve=function(e){return ke.call(e)};var Ee=pe?pe.toStringTag:void 0;const Te=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ee&&Ee in Object(e)?_e(e):ve(e)};const Re=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const Se=function(e){if(!Re(e))return!1;var t=Te(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const we=fe["__core-js_shared__"];var Ae,Ie=(Ae=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+Ae:"";const Me=function(e){return!!Ie&&Ie in e};var Ne=Function.prototype.toString;const Fe=function(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Pe=/^\[object .+?Constructor\]$/,Oe=Function.prototype,Le=Object.prototype,Be=Oe.toString,je=Le.hasOwnProperty,De=RegExp("^"+Be.call(je).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Ue=function(e){return!(!Re(e)||Me(e))&&(Se(e)?De:Pe).test(Fe(e))};const He=function(e,t){return null==e?void 0:e[t]};const Ve=function(e,t){var n=He(e,t);return Ue(n)?n:void 0};const ze=Ve(fe,"Map");const Ge=Ve(Object,"create");const We=function(){this.__data__=Ge?Ge(null):{},this.size=0};const qe=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var $e=Object.prototype.hasOwnProperty;const Ke=function(e){var t=this.__data__;if(Ge){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return $e.call(t,e)?t[e]:void 0};var Xe=Object.prototype.hasOwnProperty;const Qe=function(e){var t=this.__data__;return Ge?void 0!==t[e]:Xe.call(t,e)};const Je=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ge&&void 0===t?"__lodash_hash_undefined__":t,this};function Ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Ye.prototype.clear=We,Ye.prototype.delete=qe,Ye.prototype.get=Ke,Ye.prototype.has=Qe,Ye.prototype.set=Je;const Ze=Ye;const et=function(){this.size=0,this.__data__={hash:new Ze,map:new(ze||ce),string:new Ze}};const tt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const nt=function(e,t){var n=e.__data__;return tt(t)?n["string"==typeof t?"string":"hash"]:n.map};const ot=function(e){var t=nt(this,e).delete(e);return this.size-=t?1:0,t};const st=function(e){return nt(this,e).get(e)};const it=function(e){return nt(this,e).has(e)};const rt=function(e,t){var n=nt(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this};function at(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}at.prototype.clear=et,at.prototype.delete=ot,at.prototype.get=st,at.prototype.has=it,at.prototype.set=rt;const ct=at;const lt=function(e,t){var n=this.__data__;if(n instanceof ce){var o=n.__data__;if(!ze||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new ct(o)}return n.set(e,t),this.size=n.size,this};function gt(e){var t=this.__data__=new ce(e);this.size=t.size}gt.prototype.clear=le,gt.prototype.delete=ge,gt.prototype.get=ue,gt.prototype.has=de,gt.prototype.set=lt;const ut=gt;const dt=function(e,t){for(var n=-1,o=null==e?0:e.length;++n<o&&!1!==t(e[n],n,e););return e};const mt=function(){try{var e=Ve(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const ht=function(e,t,n){"__proto__"==t&&mt?mt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var ft=Object.prototype.hasOwnProperty;const pt=function(e,t,n){var o=e[t];ft.call(e,t)&&ee(o,n)&&(void 0!==n||t in e)||ht(e,t,n)};const bt=function(e,t,n,o){var s=!n;n||(n={});for(var i=-1,r=t.length;++i<r;){var a=t[i],c=o?o(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),s?ht(n,a,c):pt(n,a,c)}return n};const xt=function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o};const yt=function(e){return null!=e&&"object"==typeof e};const Ct=function(e){return yt(e)&&"[object Arguments]"==Te(e)};var _t=Object.prototype,kt=_t.hasOwnProperty,vt=_t.propertyIsEnumerable;const Et=Ct(function(){return arguments}())?Ct:function(e){return yt(e)&&kt.call(e,"callee")&&!vt.call(e,"callee")};const Tt=Array.isArray;const Rt=function(){return!1};var St="object"==typeof exports&&exports&&!exports.nodeType&&exports,wt=St&&"object"==typeof module&&module&&!module.nodeType&&module,At=wt&&wt.exports===St?fe.Buffer:void 0;const It=(At?At.isBuffer:void 0)||Rt;var Mt=/^(?:0|[1-9]\d*)$/;const Nt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Mt.test(e))&&e>-1&&e%1==0&&e<t};const Ft=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var Pt={};Pt["[object Float32Array]"]=Pt["[object Float64Array]"]=Pt["[object Int8Array]"]=Pt["[object Int16Array]"]=Pt["[object Int32Array]"]=Pt["[object Uint8Array]"]=Pt["[object Uint8ClampedArray]"]=Pt["[object Uint16Array]"]=Pt["[object Uint32Array]"]=!0,Pt["[object Arguments]"]=Pt["[object Array]"]=Pt["[object ArrayBuffer]"]=Pt["[object Boolean]"]=Pt["[object DataView]"]=Pt["[object Date]"]=Pt["[object Error]"]=Pt["[object Function]"]=Pt["[object Map]"]=Pt["[object Number]"]=Pt["[object Object]"]=Pt["[object RegExp]"]=Pt["[object Set]"]=Pt["[object String]"]=Pt["[object WeakMap]"]=!1;const Ot=function(e){return yt(e)&&Ft(e.length)&&!!Pt[Te(e)]};const Lt=function(e){return function(t){return e(t)}};var Bt="object"==typeof exports&&exports&&!exports.nodeType&&exports,jt=Bt&&"object"==typeof module&&module&&!module.nodeType&&module,Dt=jt&&jt.exports===Bt&&me.process;const Ut=function(){try{var e=jt&&jt.require&&jt.require("util").types;return e||Dt&&Dt.binding&&Dt.binding("util")}catch(e){}}();var Ht=Ut&&Ut.isTypedArray;const Vt=Ht?Lt(Ht):Ot;var zt=Object.prototype.hasOwnProperty;const Gt=function(e,t){var n=Tt(e),o=!n&&Et(e),s=!n&&!o&&It(e),i=!n&&!o&&!s&&Vt(e),r=n||o||s||i,a=r?xt(e.length,String):[],c=a.length;for(var l in e)!t&&!zt.call(e,l)||r&&("length"==l||s&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Nt(l,c))||a.push(l);return a};var Wt=Object.prototype;const qt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Wt)};const $t=function(e,t){return function(n){return e(t(n))}};const Kt=$t(Object.keys,Object);var Xt=Object.prototype.hasOwnProperty;const Qt=function(e){if(!qt(e))return Kt(e);var t=[];for(var n in Object(e))Xt.call(e,n)&&"constructor"!=n&&t.push(n);return t};const Jt=function(e){return null!=e&&Ft(e.length)&&!Se(e)};const Yt=function(e){return Jt(e)?Gt(e):Qt(e)};const Zt=function(e,t){return e&&bt(t,Yt(t),e)};const en=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var tn=Object.prototype.hasOwnProperty;const nn=function(e){if(!Re(e))return en(e);var t=qt(e),n=[];for(var o in e)("constructor"!=o||!t&&tn.call(e,o))&&n.push(o);return n};const on=function(e){return Jt(e)?Gt(e,!0):nn(e)};const sn=function(e,t){return e&&bt(t,on(t),e)};var rn="object"==typeof exports&&exports&&!exports.nodeType&&exports,an=rn&&"object"==typeof module&&module&&!module.nodeType&&module,cn=an&&an.exports===rn?fe.Buffer:void 0,ln=cn?cn.allocUnsafe:void 0;const gn=function(e,t){if(t)return e.slice();var n=e.length,o=ln?ln(n):new e.constructor(n);return e.copy(o),o};const un=function(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t};const dn=function(e,t){for(var n=-1,o=null==e?0:e.length,s=0,i=[];++n<o;){var r=e[n];t(r,n,e)&&(i[s++]=r)}return i};const mn=function(){return[]};var hn=Object.prototype.propertyIsEnumerable,fn=Object.getOwnPropertySymbols;const pn=fn?function(e){return null==e?[]:(e=Object(e),dn(fn(e),(function(t){return hn.call(e,t)})))}:mn;const bn=function(e,t){return bt(e,pn(e),t)};const xn=function(e,t){for(var n=-1,o=t.length,s=e.length;++n<o;)e[s+n]=t[n];return e};const yn=$t(Object.getPrototypeOf,Object);const Cn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)xn(t,pn(e)),e=yn(e);return t}:mn;const _n=function(e,t){return bt(e,Cn(e),t)};const kn=function(e,t,n){var o=t(e);return Tt(e)?o:xn(o,n(e))};const vn=function(e){return kn(e,Yt,pn)};const En=function(e){return kn(e,on,Cn)};const Tn=Ve(fe,"DataView");const Rn=Ve(fe,"Promise");const Sn=Ve(fe,"Set");const wn=Ve(fe,"WeakMap");var An="[object Map]",In="[object Promise]",Mn="[object Set]",Nn="[object WeakMap]",Fn="[object DataView]",Pn=Fe(Tn),On=Fe(ze),Ln=Fe(Rn),Bn=Fe(Sn),jn=Fe(wn),Dn=Te;(Tn&&Dn(new Tn(new ArrayBuffer(1)))!=Fn||ze&&Dn(new ze)!=An||Rn&&Dn(Rn.resolve())!=In||Sn&&Dn(new Sn)!=Mn||wn&&Dn(new wn)!=Nn)&&(Dn=function(e){var t=Te(e),n="[object Object]"==t?e.constructor:void 0,o=n?Fe(n):"";if(o)switch(o){case Pn:return Fn;case On:return An;case Ln:return In;case Bn:return Mn;case jn:return Nn}return t});const Un=Dn;var Hn=Object.prototype.hasOwnProperty;const Vn=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Hn.call(e,"index")&&(n.index=e.index,n.input=e.input),n};const zn=fe.Uint8Array;const Gn=function(e){var t=new e.constructor(e.byteLength);return new zn(t).set(new zn(e)),t};const Wn=function(e,t){var n=t?Gn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var qn=/\w*$/;const $n=function(e){var t=new e.constructor(e.source,qn.exec(e));return t.lastIndex=e.lastIndex,t};var Kn=pe?pe.prototype:void 0,Xn=Kn?Kn.valueOf:void 0;const Qn=function(e){return Xn?Object(Xn.call(e)):{}};const Jn=function(e,t){var n=t?Gn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};const Yn=function(e,t,n){var o=e.constructor;switch(t){case"[object ArrayBuffer]":return Gn(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return Wn(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Jn(e,n);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return $n(e);case"[object Symbol]":return Qn(e)}};var Zn=Object.create;const eo=function(){function e(){}return function(t){if(!Re(t))return{};if(Zn)return Zn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const to=function(e){return"function"!=typeof e.constructor||qt(e)?{}:eo(yn(e))};const no=function(e){return yt(e)&&"[object Map]"==Un(e)};var oo=Ut&&Ut.isMap;const so=oo?Lt(oo):no;const io=function(e){return yt(e)&&"[object Set]"==Un(e)};var ro=Ut&&Ut.isSet;const ao=ro?Lt(ro):io;var co="[object Arguments]",lo="[object Function]",go="[object Object]",uo={};uo[co]=uo["[object Array]"]=uo["[object ArrayBuffer]"]=uo["[object DataView]"]=uo["[object Boolean]"]=uo["[object Date]"]=uo["[object Float32Array]"]=uo["[object Float64Array]"]=uo["[object Int8Array]"]=uo["[object Int16Array]"]=uo["[object Int32Array]"]=uo["[object Map]"]=uo["[object Number]"]=uo["[object Object]"]=uo["[object RegExp]"]=uo["[object Set]"]=uo["[object String]"]=uo["[object Symbol]"]=uo["[object Uint8Array]"]=uo["[object Uint8ClampedArray]"]=uo["[object Uint16Array]"]=uo["[object Uint32Array]"]=!0,uo["[object Error]"]=uo[lo]=uo["[object WeakMap]"]=!1;const mo=function e(t,n,o,s,i,r){var a,c=1&n,l=2&n,g=4&n;if(o&&(a=i?o(t,s,i,r):o(t)),void 0!==a)return a;if(!Re(t))return t;var u=Tt(t);if(u){if(a=Vn(t),!c)return un(t,a)}else{var d=Un(t),m=d==lo||"[object GeneratorFunction]"==d;if(It(t))return gn(t,c);if(d==go||d==co||m&&!i){if(a=l||m?{}:to(t),!c)return l?_n(t,sn(a,t)):bn(t,Zt(a,t))}else{if(!uo[d])return i?t:{};a=Yn(t,d,c)}}r||(r=new ut);var h=r.get(t);if(h)return h;r.set(t,a),ao(t)?t.forEach((function(s){a.add(e(s,n,o,s,t,r))})):so(t)&&t.forEach((function(s,i){a.set(i,e(s,n,o,i,t,r))}));var f=u?void 0:(g?l?En:vn:l?on:Yt)(t);return dt(f||t,(function(s,i){f&&(s=t[i=s]),pt(a,i,e(s,n,o,i,t,r))})),a};const ho=function(e){return mo(e,5)};const fo=function(e){return"symbol"==typeof e||yt(e)&&"[object Symbol]"==Te(e)};var po=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bo=/^\w*$/;const xo=function(e,t){if(Tt(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!fo(e))||(bo.test(e)||!po.test(e)||null!=t&&e in Object(t))};function yo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var o=arguments,s=t?t.apply(this,o):o[0],i=n.cache;if(i.has(s))return i.get(s);var r=e.apply(this,o);return n.cache=i.set(s,r)||i,r};return n.cache=new(yo.Cache||ct),n}yo.Cache=ct;const Co=yo;var _o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ko=/\\(\\)?/g;const vo=function(e){var t=Co(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(_o,(function(e,n,o,s){t.push(o?s.replace(ko,"$1"):n||e)})),t}));const Eo=function(e,t){for(var n=-1,o=null==e?0:e.length,s=Array(o);++n<o;)s[n]=t(e[n],n,e);return s};var To=pe?pe.prototype:void 0,Ro=To?To.toString:void 0;const So=function e(t){if("string"==typeof t)return t;if(Tt(t))return Eo(t,e)+"";if(fo(t))return Ro?Ro.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n};const wo=function(e){return null==e?"":So(e)};const Ao=function(e,t){return Tt(e)?e:xo(e,t)?[e]:vo(wo(e))};const Io=function(e){if("string"==typeof e||fo(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const Mo=function(e,t,n,o){if(!Re(e))return e;for(var s=-1,i=(t=Ao(t,e)).length,r=i-1,a=e;null!=a&&++s<i;){var c=Io(t[s]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(s!=r){var g=a[c];void 0===(l=o?o(g,c,a):void 0)&&(l=Re(g)?g:Nt(t[s+1])?[]:{})}pt(a,c,l),a=a[c]}return e};const No=function(e,t,n){return null==e?e:Mo(e,t,n)};const Fo=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const Po=function(e){return this.__data__.has(e)};function Oo(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ct;++t<n;)this.add(e[t])}Oo.prototype.add=Oo.prototype.push=Fo,Oo.prototype.has=Po;const Lo=Oo;const Bo=function(e,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1};const jo=function(e,t){return e.has(t)};const Do=function(e,t,n,o,s,i){var r=1&n,a=e.length,c=t.length;if(a!=c&&!(r&&c>a))return!1;var l=i.get(e),g=i.get(t);if(l&&g)return l==t&&g==e;var u=-1,d=!0,m=2&n?new Lo:void 0;for(i.set(e,t),i.set(t,e);++u<a;){var h=e[u],f=t[u];if(o)var p=r?o(f,h,u,t,e,i):o(h,f,u,e,t,i);if(void 0!==p){if(p)continue;d=!1;break}if(m){if(!Bo(t,(function(e,t){if(!jo(m,t)&&(h===e||s(h,e,n,o,i)))return m.push(t)}))){d=!1;break}}else if(h!==f&&!s(h,f,n,o,i)){d=!1;break}}return i.delete(e),i.delete(t),d};const Uo=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,o){n[++t]=[o,e]})),n};const Ho=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var Vo=pe?pe.prototype:void 0,zo=Vo?Vo.valueOf:void 0;const Go=function(e,t,n,o,s,i,r){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new zn(e),new zn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ee(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Uo;case"[object Set]":var c=1&o;if(a||(a=Ho),e.size!=t.size&&!c)return!1;var l=r.get(e);if(l)return l==t;o|=2,r.set(e,t);var g=Do(a(e),a(t),o,s,i,r);return r.delete(e),g;case"[object Symbol]":if(zo)return zo.call(e)==zo.call(t)}return!1};var Wo=Object.prototype.hasOwnProperty;const qo=function(e,t,n,o,s,i){var r=1&n,a=vn(e),c=a.length;if(c!=vn(t).length&&!r)return!1;for(var l=c;l--;){var g=a[l];if(!(r?g in t:Wo.call(t,g)))return!1}var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var m=!0;i.set(e,t),i.set(t,e);for(var h=r;++l<c;){var f=e[g=a[l]],p=t[g];if(o)var b=r?o(p,f,g,t,e,i):o(f,p,g,e,t,i);if(!(void 0===b?f===p||s(f,p,n,o,i):b)){m=!1;break}h||(h="constructor"==g)}if(m&&!h){var x=e.constructor,y=t.constructor;x==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof y&&y instanceof y||(m=!1)}return i.delete(e),i.delete(t),m};var $o="[object Arguments]",Ko="[object Array]",Xo="[object Object]",Qo=Object.prototype.hasOwnProperty;const Jo=function(e,t,n,o,s,i){var r=Tt(e),a=Tt(t),c=r?Ko:Un(e),l=a?Ko:Un(t),g=(c=c==$o?Xo:c)==Xo,u=(l=l==$o?Xo:l)==Xo,d=c==l;if(d&&It(e)){if(!It(t))return!1;r=!0,g=!1}if(d&&!g)return i||(i=new ut),r||Vt(e)?Do(e,t,n,o,s,i):Go(e,t,c,n,o,s,i);if(!(1&n)){var m=g&&Qo.call(e,"__wrapped__"),h=u&&Qo.call(t,"__wrapped__");if(m||h){var f=m?e.value():e,p=h?t.value():t;return i||(i=new ut),s(f,p,n,o,i)}}return!!d&&(i||(i=new ut),qo(e,t,n,o,s,i))};const Yo=function e(t,n,o,s,i){return t===n||(null==t||null==n||!yt(t)&&!yt(n)?t!=t&&n!=n:Jo(t,n,o,s,e,i))};const Zo=function(e,t){return Yo(e,t)};const es=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const ts=function(e,t){for(var n=0,o=(t=Ao(t,e)).length;null!=e&&n<o;)e=e[Io(t[n++])];return n&&n==o?e:void 0};const ns=function(e,t,n){var o=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(s);++o<s;)i[o]=e[o+t];return i};const os=function(e,t){return t.length<2?e:ts(e,ns(t,0,-1))};const ss=function(e,t){return t=Ao(t,e),null==(e=os(e,t))||delete e[Io(es(t))]};const is=function(e,t){return null==e||ss(e,t)},rs=["subType","from","getAllAdjacentSuggestions","toJSON","removeMarker","next","accept","addMarkerName","head","type","removeAttribute","isMultiRange","nodeBefore","length","_onAttributesChange","data","clear","getContainedElement","previous","_model","onAccept","substr","getFirstRange","isIntersectingWithRange","getMarkerNames","isInContent","_onAccept","getRanges","commentThread","createdAt","removeMarkers","get","isIntersecting","onAttributesChange","setAttribute","set","hasComments","getFirstMarker","onDiscard","suggestion:","addMarker","map","start","author","addRange","_markerNames","_onDiscard","change","getItems","add","filter","split","getMultiRangeId","getMarkers","delete","attributes","push","getRange","nodeAfter","size"];var as,cs;as=rs,cs=210,function(e){for(;--e;)as.push(as.shift())}(++cs);const ls=function(e,t){return rs[e-=0]};class gs{constructor(e,t){this.id=t.id,this[ls("0x27")]=t[ls("0x27")],this.subType=t[ls("0x1e")]||null,this.author=t[ls("0xd")],this[ls("0x2d")]=null,this[ls("0x31")]=e,this[ls("0x38")]=t[ls("0x32")],this[ls("0x10")]=t[ls("0x8")],this._onAttributesChange=t[ls("0x3")],this._markerNames=new Set,this[ls("0x5")]("createdAt",null),this[ls("0x5")](ls("0x19"),t.attributes||{}),this[ls("0x5")](ls("0x30"),null),this[ls("0x5")](ls("0x23"),null),this.set(ls("0x3a"),null),this.set("_saved",!1),this.decorate(ls("0x24")),this.decorate("discard")}get[ls("0x26")](){let e=this;for(;e[ls("0x30")];)e=e[ls("0x30")];return e}get[ls("0x6")](){return!!this[ls("0x3a")]&&this.commentThread[ls("0x2b")]>0}get[ls("0x29")](){return 0!=this._markerNames[ls("0x1d")]&&6==Array[ls("0x1f")](this[ls("0xf")])[0][ls("0x15")](":")[ls("0x2b")]}get[ls("0x37")](){return null!==this.getFirstMarker()}addMarkerName(e){this[ls("0xf")][ls("0x13")](e)}[ls("0x36")](){return Array[ls("0x1f")](this[ls("0xf")])}[ls("0x17")](){return this[ls("0x36")]().map((e=>this[ls("0x31")].markers[ls("0x1")](e)))[ls("0x14")]((e=>e))}getFirstMarker(){return this.getMarkers()[0]||null}[ls("0x0")](){this._model[ls("0x11")]((e=>{for(const t of this[ls("0x17")]())e[ls("0x22")](t)})),this[ls("0xf")][ls("0x2e")]()}[ls("0x22")](e){this[ls("0x31")][ls("0x11")]((t=>{t.removeMarker(e)})),this._markerNames[ls("0x18")](e)}[ls("0xe")](e){const t=ls("0x9")+this[ls("0x27")]+":"+this.subType+":"+this.id+":"+this[ls("0xd")].id+":"+gs.getMultiRangeId();this[ls("0x25")](t),this._model[ls("0x11")]((n=>{n[ls("0xa")](t,{range:e,usingOperation:!0,affectsData:!0})}))}[ls("0x35")](e){for(const t of this[ls("0x39")]())if(t[ls("0x2")](e))return!0;return!1}getRanges(){return this.getMarkers()[ls("0xb")]((e=>e.getRange()))}[ls("0x12")](){return this[ls("0x39")]().reduce(((e,t)=>[...e,...t[ls("0x12")]()]),[])}[ls("0x34")](){return this[ls("0x7")]()[ls("0x1b")]()}[ls("0x2f")](){const e=this[ls("0x39")]();if(1!=e[ls("0x2b")])return null;const t=e[0],n=t[ls("0xc")][ls("0x1c")],o=t.end[ls("0x2a")];return n instanceof r.Element?n!=o?null:n:null}[ls("0x24")](){this._onAccept(this[ls("0x39")](),this[ls("0x2d")],this[ls("0x19")]),this[ls("0x0")]()}discard(){this[ls("0x10")](this[ls("0x39")](),this[ls("0x2d")],this.attributes),this[ls("0x0")]()}[ls("0x20")](){const e=[];let t=this.head;for(;t;)e[ls("0x1a")](t),t=t[ls("0x23")];return e}[ls("0x4")](e,t){const n=ho(this[ls("0x19")]);No(n,e,t),Zo(n,this[ls("0x19")])||(this[ls("0x19")]=n,this[ls("0x2c")](n))}[ls("0x28")](e){const t=ho(this[ls("0x19")]);is(t,e),Zo(t,this.attributes)||(this.attributes=t,this[ls("0x2c")](this[ls("0x19")]))}[ls("0x21")](){return{id:this.id,type:this[ls("0x1e")]?this[ls("0x27")]+":"+this.subType:this[ls("0x27")],authorId:this[ls("0xd")].id,createdAt:this[ls("0x3b")],hasComments:this[ls("0x6")],data:this[ls("0x2d")],attributes:this[ls("0x19")]}}static[ls("0x16")](){return(0,t.uid)()[ls("0x33")](1,5)}}(0,t.mix)(gs,t.ObservableMixin);class us{constructor(e,t){this._customCallbacks=[],this._itemLabels=new Map,this._schema=e,this._locale=t}getDescriptions(e){const t=[];for(let n=0;n<e.length;n++){const o=e[n];if(!o.isInContent)continue;let s=!1;for(const e of this._customCallbacks){const n=e(o);if(n){n.type&&t.push(n),s=!0;break}}if(!s){this._addDescriptionItems(t,o);const s=e[n+1];if(s&&!o.getFirstRange().end.isEqual(s.getFirstRange().start)){const e=t[t.length-1],n="insertion"==o.type?"add":"remove";e&&"text"==e.type&&(e[n]+="\n")}}}return this._resolveDescriptionItems(t)}registerDescriptionCallback(e){this._customCallbacks.push(e)}registerElementLabel(e,t){this._itemLabels.set(e,t)}getItemLabel(e,t=1){const n=this._itemLabels.get(e)||e;return"function"==typeof n?n(t):1!==t?t+" "+n+"s":""+n}_addDescriptionItems(e,t){const n=t.getFirstRange().getWalker(),o="insertion"==t.type?"add":"remove";for(const t of n){const s=t.item,i=e[e.length-1];if(s.is("textProxy"))i&&i.type.indexOf("Container")>-1&&e.pop(),i&&"text"==i.type?i[o]+=s.data:e.push({type:"text",add:"add"==o?s.data:"",remove:"remove"==o?s.data:""});else if(this._schema.isObject(s)){if(i&&i.type.indexOf("Container")>-1&&e.pop(),"elementEnd"==t.type)continue;i&&i.type==o+"Object"&&i.name==s.name?i.quantity++:e.push({type:o+"Object",name:s.name,quantity:1}),n.skip((e=>!("elementEnd"==e.type&&e.item==s)))}else if(this._schema.checkChild(s,"$text")||s.is("element","softBreak")){if("add"==o&&"elementStart"==t.type||"remove"==o&&"elementEnd"==t.type)continue;if(i&&-1==i.type.indexOf("Container")){"text"==i.type&&(i[o]+="\n");continue}let n;if(n="add"==o?s.nextSibling&&!this._schema.isObject(s.nextSibling)?s.nextSibling:null:s.previousSibling&&!this._schema.isObject(s.previousSibling)?s.previousSibling:null,s.isEmpty||n&&n.isEmpty){const t=n&&n.isEmpty?n.name:s.name;i&&i.type==o+"EmptyContainer"&&i.name==t?i.quantity++:e.push({type:o+"EmptyContainer",name:t,quantity:1})}else e.push({type:o+"Container",name:s.name})}}}_resolveDescriptionItems(e){const{t}=this._locale,n=[];for(const o of e){switch(o.type){case"text":if(o.add=o.add.replace(/(\S)\u000A+(\S)/g,"$1 $2").replace(/\u000A/g,""),o.remove=o.remove.replace(/(\S)\u000A+(\S)/g,"$1 $2").replace(/\u000A/g,""),""!=o.add&&""!=o.remove){n.push({type:"replace",content:t({string:"*Replace:* %0 *with* %1",id:"REPLACE_TEXT"},['"'+o.remove+'"','"'+o.add+'"'])});continue}if(null!=o.add.match(/^ +$/)){n.push({type:"insertion",content:t("*Insert:* %0",t({string:"space",plural:"%0 spaces",id:"ELEMENT_SPACE"},o.add.length))});continue}if(null!=o.remove.match(/^ +$/)){n.push({type:"deletion",content:t("*Remove:* %0",t({string:"space",plural:"%0 spaces",id:"ELEMENT_SPACE"},o.remove.length))});continue}if(""!=o.add){n.push({type:"insertion",content:t("*Insert:* %0",'"'+o.add+'"')});continue}n.push({type:"deletion",content:t("*Remove:* %0",'"'+o.remove+'"')});continue;case"addEmptyContainer":case"addObject":n.push({type:"insertion",content:t("*Insert:* %0",this.getItemLabel(o.name,o.quantity))});continue;case"removeEmptyContainer":case"removeObject":n.push({type:"deletion",content:t("*Remove:* %0",this.getItemLabel(o.name,o.quantity))});continue;case"addContainer":n.push({type:"insertion",content:t("*Split:* %0",this.getItemLabel(o.name,o.quantity))});continue;case"removeContainer":n.push({type:"deletion",content:t("*Merge:* %0",this.getItemLabel(o.name,o.quantity))});continue}n.push(o)}return n}}class ds extends e.Plugin{afterInit(){const e=this.editor,{t}=e.locale;if(!e.plugins.has("AlignmentEditing"))return;const n=e.plugins.get("TrackChangesEditing");n.enableCommand("alignment",((t,o={})=>{let s=o.value;o.value||(s="ltr"===e.locale.contentLanguageDirection?"left":"right");const i=Array.from(this.editor.model.document.selection.getSelectedBlocks()).filter((e=>function(e,t,n){const o=e.getAttribute("alignment")||null;return t.checkAttribute(e,"alignment")&&n!=o}(e,this.editor.model.schema,s)));e.model.change((()=>{for(const e of i)n.markBlockFormat(e,{commandName:"alignment",commandParams:[{value:s}]})}))})),n._descriptionFactory.registerDescriptionCallback((e=>{const{data:n}=e;if(n&&"alignment"==n.commandName){const e=n.commandParams[0].value;return{type:"format",content:t("*Format:* %0",function(e){switch(e){case"left":return t({string:"align to left",id:"FORMAT_ALIGN_TO_LEFT"});case"right":return t({string:"align to right",id:"FORMAT_ALIGN_TO_RIGHT"});case"center":return t({string:"align to center",id:"FORMAT_ALIGN_TO_CENTER"});case"justify":return t({string:"justify",id:"FORMAT_JUSTIFY_TEXT"})}}(e))}}}))}}const ms=["isAtEnd","bindElementToMarker","writer","markerRange","toViewElement","type","push","isLimit","addClass","getAttribute","listItem","mapper","ck-suggestion-marker-","model","createUIElement","item","nextSibling","element","plugins","activeMarkers","addHighlight","markerName","getItems","getWalker","includes","toViewPosition","isContent","get","TrackChangesEditing","hasAttribute","insert","isBlock","span","elementEnd","test","schema","listIndent","previousPosition"];var hs,fs;hs=ms,fs=476,function(e){for(;--e;)hs.push(hs.shift())}(++fs);const ps=function(e,t){return ms[e-=0]};function bs(e,t,n){const o=[];for(const s of t[ps("0x2")]())s[ps("0x9")](e)&&o.push(n.createRangeOn(s));return o}function xs(e){const t=[];if(e.is(ps("0x23"),ps("0x1c"))){let n=e[ps("0x22")];for(;n&&n.is(ps("0x23"),ps("0x1c"))&&n[ps("0x1b")](ps("0x10"))>0;)t[ps("0x18")](n),n=n.nextSibling}return t}function ys(e,t,{showActiveMarker:n=!0}={}){const o=e[ps("0x24")][ps("0x7")](ps("0x8"));return(s,i,r)=>{if(!r.consumable[ps("0xe")](i[ps("0x15")],s.name))return;const a=i[ps("0x15")][ps("0x3")](),c=i.markerRange.start,l=e[ps("0x1f")][ps("0xf")];let g=null,u=null,d=!1,m=!1;for(const e of a){const t=e[ps("0x21")];d=d||l[ps("0x6")](t);const n=r[ps("0x1d")][ps("0x16")](t);if(n&&n.getCustomProperty(ps("0x0")))return;ps("0xd")==e[ps("0x17")]&&l[ps("0xb")](t)&&!l[ps("0x19")](t)&&(t.nextSibling||c[ps("0x12")]?g&&g.parent==t||(g=t,h(e[ps("0x11")]),m=!0):u=u||e[ps("0x11")])}function h(e){const s=r[ps("0x14")][ps("0x20")](ps("0xc"),{class:ps("0x1e")+t}),a=r[ps("0x1d")][ps("0x5")](e);n&&o[ps("0x25")][ps("0x4")](i.markerName)&&r[ps("0x14")][ps("0x1a")]("ck-suggestion-marker--active",s),r.writer[ps("0xa")](a,s),r[ps("0x1d")][ps("0x13")](s,i[ps("0x1")])}d||m||!u||h(u)}}const Cs=["BoldEditing","ItalicEditing","UnderlineEditing","CodeEditing","StrikethroughEditing","SubscriptEditing","SuperscriptEditing"];class _s extends e.Plugin{afterInit(){const e=this.editor,t=e.model,n=e.plugins.get("TrackChangesEditing"),{t:o}=e.locale;for(const o of Cs){if(!e.plugins.has(o))continue;const s=o.slice(0,-7).toLowerCase(),i=e.commands.get(s);n.enableCommand(s,((e,o={})=>{const r=t.document.selection;if(r.isCollapsed)return void e(o);const a=void 0!==o.forceValue?o.forceValue:!i.value;t.change((()=>{const e=Array.from(r.getRanges());for(const o of e){const e=a?[o]:bs(s,o,t);for(const t of e)n.markInlineFormat(t,{commandName:s,commandParams:[{forceValue:a}]})}}))}))}function s(e,t){n._descriptionFactory.registerDescriptionCallback((n=>{const{data:s}=n;if(s&&s.commandName===e)return s.commandParams[0].forceValue?{type:"format",content:o("*Format:* %0",t)}:{type:"format",content:o("*Remove format:* %0",t)}}))}s("bold",o({string:"bold",id:"FORMAT_BOLD"})),s("italic",o({string:"italic",id:"FORMAT_ITALIC"})),s("underline",o({string:"underline",id:"FORMAT_UNDERLINE"})),s("code",o({string:"code",id:"FORMAT_CODE"})),s("strikethrough",o({string:"strikethrough",id:"FORMAT_STRIKETHROUGH"})),s("subscript",o({string:"subscript",id:"FORMAT_SUBSCRIPT"})),s("superscript",o({string:"superscript",id:"FORMAT_SUPERSCRIPT"}))}}class ks extends e.Plugin{afterInit(){const e=this.editor,{t}=e.locale;if(!e.plugins.has("BlockQuoteEditing"))return;const n=e.plugins.get("TrackChangesEditing"),o=this.editor.commands.get("blockQuote");n.enableCommand("blockQuote",((t,s={})=>{const i=this.editor.model.document.selection,r=s&&void 0!==s.forceValue?s.forceValue:!o.value;let a=[];if(r){const t=Array.from(i.getSelectedBlocks()).filter((e=>vs(e)||function(e,t){const n=t.checkChild(e.parent,"blockQuote"),o=t.checkChild(["$root","blockQuote"],e);return n&&o}(e,this.editor.model.schema)));a=Es(t,e.model)}else{const t=Array.from(i.getSelectedBlocks()).filter((e=>vs(e)));a=Es(t,e.model)}e.model.change((()=>{for(const e of a)n.markBlockFormat(e,{commandName:"blockQuote",commandParams:[{forceValue:r}]})}))})),n._descriptionFactory.registerDescriptionCallback((e=>{const{data:n}=e;if(n&&"blockQuote"==n.commandName){const e=t({string:"block quote",id:"ELEMENT_BLOCK_QUOTE"});return n.commandParams[0].forceValue?{type:"format",content:t("*Format:* %0",e)}:{type:"format",content:t("*Remove format:* %0",e)}}}))}}function vs(e){return"blockQuote"==e.parent.name}function Es(e,t){let n,o=0;const s=[],i=t.schema;for(;o<e.length;){const r=e[o],a=e[o+1];n||(n=t.createPositionBefore(r)),Ts(t,r,a)||(s.push(t.createRange(n,i.isObject(r)?t.createPositionAfter(r):t.createPositionAt(r,"end"))),n=null),o++}return s}function Ts(e,t,n){if(!n)return!1;const o=e.createPositionAfter(t),s=e.createPositionBefore(n),i=new r.TreeWalker({boundaries:e.createRange(o,s)});for(const t of i)if("text"==t.type||e.schema.isLimit(t.item))return!1;return!0}class Rs extends e.Plugin{afterInit(){const e=this.editor,{t}=e.locale;e.plugins.has("CodeBlock")&&e.plugins.get("TrackChangesEditing")._descriptionFactory.registerElementLabel("codeBlock",(e=>t({string:"code block",plural:"%0 code blocks",id:"ELEMENT_CODE_BLOCK"},e)))}}var Ss,ws,As=["enableCommand","CommentsEditing","get","plugins","requires","editor","addCommentThread","TrackChangesEditing"];Ss=As,ws=195,function(e){for(;--e;)Ss.push(Ss.shift())}(++ws);var Is=function(e,t){return As[e-=0]};class Ms extends e.Plugin{static get[Is("0x1")](){return[Is("0x6")]}init(){this[Is("0x2")][Is("0x0")][Is("0x7")](Is("0x4"))[Is("0x5")](Is("0x3"))}}var Ns=n(181);const Fs=["document","model","init","unlock","high","writer","addMarker:suggestion:deletion","mapper","start","get","markerNameToElements","forward","plugins","createSelection","setSelection","editing","fromRange","buffer","deleteForward","createRange","downcastDispatcher","detach","markerName","$graveyard","delete","removeMarker:suggestion:deletion","enableCommand","selection","batch","modifySelection","lock","getFirstRange","requires","data","options","end","unbindElementFromMarkerName","merge","uiElement"];var Ps,Os;Ps=Fs,Os=210,function(e){for(;--e;)Ps.push(Ps.shift())}(++Os);const Ls=function(e,t){return Fs[e-=0]};class Bs extends e.Plugin{static get[Ls("0x11")](){return[Ns.Delete]}[Ls("0x1a")](){const e=this.editor,t=e[Ls("0x24")][Ls("0x21")]("TrackChangesEditing");t[Ls("0xb")](Ls("0x9"));const n=e.commands[Ls("0x21")]("deleteForward");t[Ls("0xb")](Ls("0x3"),((t,o={})=>{const s=e[Ls("0x19")][Ls("0x25")](e[Ls("0x19")][Ls("0x18")][Ls("0xc")]);s.isCollapsed&&e.model[Ls("0xe")](s,{direction:Ls("0x23"),unit:o.unit});const i=s[Ls("0x10")](),a=r.LiveRange[Ls("0x1")](i);let c;t(o),c=Ls("0x8")==a.root.rootName?e.model[Ls("0x4")](i.start):e[Ls("0x19")].createRange(a[Ls("0x20")],a[Ls("0x14")]),a[Ls("0x6")](),e[Ls("0x19")].enqueueChange(n[Ls("0x2")][Ls("0xd")],(e=>{n[Ls("0x2")][Ls("0xf")](),e[Ls("0x26")](e[Ls("0x4")](c[Ls("0x14")])),n.buffer[Ls("0x1b")]()}))})),e[Ls("0x0")][Ls("0x5")].on(Ls("0x1e"),ys(e,Ls("0x16")),{priority:"high"}),e[Ls("0x12")][Ls("0x5")].on("addMarker:suggestion:deletion",((t,n,o)=>{o[Ls("0x13")].showSuggestionHighlights&&ys(e,Ls("0x16"),{showActiveMarker:!1})(t,n,o)}),{priority:"high"}),e[Ls("0x0")].downcastDispatcher.on(Ls("0xa"),((e,t,n)=>{const o=n[Ls("0x1f")][Ls("0x22")](t[Ls("0x7")]);if(o)for(const e of o)e.is(Ls("0x17"))&&(n.mapper[Ls("0x15")](e,t[Ls("0x7")]),n[Ls("0x1d")].remove(e))}),{priority:Ls("0x1c")})}}var js=n(331);const Ds=["enableCommand","editing","isAtEnd","showSuggestionHighlights","change","get","createRange","requires","isLimit","downcastDispatcher","data","selection","addMarker:suggestion:insertion","start","options","isCollapsed","high","removeMarker:suggestion:insertion","enter","init","end","ck-suggestion-marker-split","parent","model","setSelection","markerName","editor","split","getFirstRange","document","isAtStart","mapper","unbindElementFromMarkerName","schema","markerNameToElements","hasClass","nextSibling"];var Us,Hs;Us=Ds,Hs=336,function(e){for(;--e;)Us.push(Us.shift())}(++Hs);const Vs=function(e,t){return Ds[e-=0]};class zs extends e.Plugin{static get[Vs("0x4")](){return[js.Enter]}[Vs("0x10")](){const e=this[Vs("0x17")],t=e.plugins[Vs("0x2")]("TrackChangesEditing");t[Vs("0x22")](Vs("0xf"),(n=>{e[Vs("0x14")][Vs("0x1")]((o=>{const s=e[Vs("0x14")][Vs("0x1a")][Vs("0x8")],i=s.getFirstPosition(),a=s[Vs("0xc")],c=r.LiveRange.fromRange(s[Vs("0x19")]()),l=c[Vs("0xa")].parent,g=c[Vs("0x11")].parent,u=!(c[Vs("0xa")][Vs("0x1b")]&&c[Vs("0x11")][Vs("0x24")]),d=l==g,m=!(e[Vs("0x14")][Vs("0x1e")][Vs("0x5")](l)||e[Vs("0x14")][Vs("0x1e")][Vs("0x5")](g))&&(a||u&&d);if(n(),m){const n=e[Vs("0x14")].createPositionAt(i[Vs("0x13")][Vs("0x21")],0),s=o[Vs("0x3")](i,n);t.markInsertion(s)}else o[Vs("0x15")](o[Vs("0x3")](c[Vs("0x11")]));c.detach()}))})),e[Vs("0x23")][Vs("0x6")].on(Vs("0x9"),ys(e,Vs("0x18")),{priority:Vs("0xd")}),e[Vs("0x23")][Vs("0x6")].on(Vs("0xe"),((e,t,n)=>{const o=n[Vs("0x1c")][Vs("0x1f")](t[Vs("0x16")]);if(o)for(const e of o)e[Vs("0x20")](Vs("0x12"))&&(n[Vs("0x1c")][Vs("0x1d")](e,t[Vs("0x16")]),n.writer.remove(e))}),{priority:"high"}),e[Vs("0x7")][Vs("0x6")].on(Vs("0x9"),((t,n,o)=>{o[Vs("0xb")][Vs("0x0")]&&ys(e,Vs("0x18"),{showActiveMarker:!1})(t,n,o)}),{priority:"high"})}}const Gs=[{pluginName:"FontSizeEditing",commandName:"fontSize"},{pluginName:"FontFamilyEditing",commandName:"fontFamily"},{pluginName:"FontColorEditing",commandName:"fontColor"},{pluginName:"FontBackgroundColorEditing",commandName:"fontBackgroundColor"}];class Ws extends e.Plugin{afterInit(){const{t:e}=this.editor.locale;for(const{pluginName:e,commandName:t}of Gs)this.editor.plugins.has(e)&&this._enableCommand(t);this.editor.plugins.get("TrackChangesEditing")._descriptionFactory.registerDescriptionCallback((t=>{const{data:n}=t;if(null!=n){if("fontSize"==n.commandName){const t=n.commandParams[0].value;if(t){const n=this.editor.plugins.get("FontSize").normalizeSizeOptions(this.editor.config.get("fontSize.options")).find((e=>e.model==t)).title,o=this.editor.locale._t(n).toLowerCase();return{type:"format",content:e("*Set font size:* %0",o)}}return{type:"format",content:e("*Reset font size*")}}if("fontFamily"==n.commandName){const t=n.commandParams[0].value;return t?{type:"format",content:e("*Set font family:* %0",t)}:{type:"format",content:e("*Reset font family*")}}if("fontColor"==n.commandName){const t=n.commandParams[0].value;if(t){const n=(0,s.normalizeColorOptions)(this.editor.config.get("fontColor.colors")).find((e=>e.model==t));let o=t,i="";return n&&(o=n.label,i=this.editor.locale._t(o).toLowerCase()),{type:"format",content:e("*Set font color:* %0",i).trim(),color:{value:t,title:i||o}}}return{type:"format",content:e("*Reset font color*")}}if("fontBackgroundColor"==n.commandName){const t=n.commandParams[0].value;if(t){const n=(0,s.normalizeColorOptions)(this.editor.config.get("fontBackgroundColor.colors")).find((e=>e.model==t));let o=t,i="";return n&&(o=n.label,i=this.editor.locale._t(o).toLowerCase()),{type:"format",content:e("*Set font background color:* %0",i).trim(),color:{value:t,title:i||o}}}return{type:"format",content:e("*Reset font background color*")}}}}))}_enableCommand(e){const t=this.editor;t.plugins.get("TrackChangesEditing").enableCommand(e,((n,o={})=>{const s=t.model.document.selection,i=o.value;s.isCollapsed?n(o):t.model.change((()=>{const n=Array.from(s.getRanges());for(const o of n){const n=i?[o]:bs(e,o,t.model);for(const o of n)t.plugins.get("TrackChangesEditing").markInlineFormat(o,{commandName:e,commandParams:[{value:i}]})}}))}))}}class qs extends e.Plugin{afterInit(){const e=this.editor,{t}=e.locale,n=e.config.get("heading.options");if(!e.plugins.has("HeadingEditing"))return;const o=e.plugins.get("TrackChangesEditing");o.enableCommand("heading",((t,n)=>{const s=n.value,i=Array.from(this.editor.model.document.selection.getSelectedBlocks()).filter((e=>{return t=e,n=s,(o=this.editor.model.schema).checkChild(t.parent,n)&&!o.isObject(t)&&t.name!=n;var t,n,o}));e.model.change((()=>{for(const e of i)o.markBlockFormat(e,{commandName:"heading",commandParams:[n],formatGroupId:"blockName"},xs(e))}))}));for(const e of n)"paragraph"!=e.model&&o._descriptionFactory.registerElementLabel(e.model,(t=>{const n=$s(e.model);return null!==n?s(t,n):i(t,e.title)}));function s(e,n){return t({string:"heading (level %1)",plural:"%0 headings (level %1)",id:"ELEMENT_HEADING"},[e,n])}function i(e,n){return t({string:"heading (%1)",plural:"%0 headings (%1)",id:"ELEMENT_HEADING_CUSTOM"},[e,n])}o._descriptionFactory.registerDescriptionCallback((e=>{const{type:o,data:r}=e;if("formatBlock"==o&&r&&"heading"==r.commandName){const e=r.commandParams[0].value,o=$s(e);if(null!==o)return{type:"format",content:t("*Change to:* %0",s(1,o))};const a=n.find((t=>t.model===e)).title;return{type:"format",content:t("*Change to:* %0",i(1,a))}}}))}}function $s(e){const t=e.match(/^heading(\d+)$/);return t?t[1]:null}class Ks extends e.Plugin{afterInit(){const e=this.editor;if(!e.plugins.has("HighlightEditing"))return;const t=e.plugins.get("TrackChangesEditing");t.enableCommand("highlight",((n,o={})=>{const s=e.model.document.selection,i=s.getAttribute("highlight");let r=o.value,a=[];if(s.isCollapsed){const t=s.getFirstPosition();if(!s.hasAttribute("highlight"))return void n(o);{const n=e=>e.item.getAttribute("highlight")===i,o=t.getLastMatchingPosition(n,{direction:"backward"}),s=t.getLastMatchingPosition(n);a=[e.model.createRange(o,s)],r==i&&(r=null)}}else for(const t of s.getRanges())r?a.push(t):a.push(...bs("highlight",t,e.model));e.model.change((()=>{for(const e of a)t.markInlineFormat(e,{commandName:"highlight",commandParams:[{value:r}]})}))}));const{t:n}=e.locale;t._descriptionFactory.registerDescriptionCallback((t=>{const{type:o,data:s}=t;if("formatInline"==o&&s&&"highlight"==s.commandName){const t=s.commandParams[0].value;if(t){const o=e.config.get("highlight.options").find((e=>e.model==t)),s=e.locale._t(o.title).toLowerCase();return{type:"format",content:n("*Set highlight:* %0",s),color:{value:o.color,title:o.title}}}return{type:"format",content:n("*Remove highlight*",n({string:"highlight",id:"FORMAT_HIGHLIGHT"}))}}}))}}class Xs extends e.Plugin{afterInit(){const e=this.editor;if(!e.plugins.has("HorizontalLineEditing"))return;e.plugins.get("TrackChangesEditing").enableCommand("horizontalLine");const t=e.plugins.get("TrackChangesEditing"),{t:n}=e.locale;t._descriptionFactory.registerElementLabel("horizontalLine",(e=>n({string:"horizontal line",plural:"%0 horizontal lines",id:"ELEMENT_HORIZONTAL_LINE"},e))),e.conversion.for("dataDowncast").elementToStructure({model:"horizontalLine",view:(e,{writer:t,options:n})=>{if(!n.showSuggestionHighlights)return;const o=t.createContainerElement("div"),s=t.createEmptyElement("hr");return t.addClass("ck-horizontal-line",o),t.insert(t.createPositionAt(o,0),s),o},converterPriority:"high"})}}class Qs extends e.Plugin{afterInit(){const e=this.editor;if(!e.plugins.has("ImageEditing"))return;const n=e.plugins.get("TrackChangesEditing"),o=e.plugins.get("ImageUtils"),s={},{t:i}=e.locale;if(n.enableCommand("insertImage"),n._descriptionFactory.registerElementLabel("imageBlock",(e=>i({string:"image",plural:"%0 images",id:"ELEMENT_IMAGE"},e))),n._descriptionFactory.registerElementLabel("imageInline",(e=>i({string:"image",plural:"%0 images",id:"ELEMENT_INLINE_IMAGE"},e))),n._descriptionFactory.registerElementLabel("caption",i({string:"caption",id:"ELEMENT_CAPTION"})),e.plugins.has("ImageUploadEditing")&&n.enableCommand("uploadImage"),e.plugins.has("ImageBlockEditing")&&e.plugins.has("ImageInlineEditing")&&(n.enableCommand("imageTypeInline",((t,s)=>{const i=o.getClosestSelectedImageElement(e.model.document.selection);e.model.change((()=>{n.markBlockFormat(i,{commandName:"imageTypeInline",commandParams:[s]},[],"convertBlockImageToInline")}))})),n.enableCommand("imageTypeBlock",((t,s)=>{e.model.change((i=>{let a=o.getClosestSelectedImageElement(e.model.document.selection),c=i.createRangeOn(a);const l=r.LivePosition.fromPosition(c.start,"toPrevious"),g=r.LivePosition.fromPosition(c.end,"toNext");n.forceDefaultExecution((()=>t(s))),a=o.getClosestSelectedImageElement(e.model.document.selection),c=i.createRangeOn(a);const u=i.createRange(l,g);l.detach(),g.detach(),n.markBlockFormat(a,{commandName:"imageTypeInline"},[],"convertInlineImageToBlock"),u.start.isBefore(c.start)&&n.markInsertion(i.createRange(u.start,c.start),"convertInlineImageToBlock"),c.end.isBefore(u.end)&&n.markInsertion(i.createRange(c.end,u.end),"convertInlineImageToBlock")}))})),n._suggestionFactory.registerCustomCallback("formatBlock","convertInlineImageToBlock","join",(()=>{})),n._suggestionFactory.registerCustomCallback("formatBlock","convertInlineImageToBlock","accept",(()=>{})),n._suggestionFactory.registerCustomCallback("formatBlock","convertInlineImageToBlock","discard",n._suggestionFactory.getSuggestionCallback("formatBlock","","accept")),n._suggestionFactory.registerCustomCallback("insertion","convertInlineImageToBlock","join",(()=>{})),n._suggestionFactory.registerCustomCallback("insertion","convertInlineImageToBlock","discard",(([t])=>{const o=n._suggestionFactory.getSuggestionCallback("insertion","","discard");let s=t.start,i=t.end;const r=e.model.schema.getNearestSelectionRange(s,"backward"),a=e.model.schema.getNearestSelectionRange(i,"forward");r.isCollapsed&&(s=r.start),a.isCollapsed&&(i=a.end),o([e.model.createRange(s,i)])})),n._suggestionFactory.registerCustomCallback("formatBlock","convertInlineImageToBlock","chain",l),n._suggestionFactory.registerCustomCallback("insertion","convertInlineImageToBlock","chain",l)),e.plugins.has("ImageCaptionEditing")&&(n.enableCommand("toggleImageCaption",((t,s)=>{const i=e.plugins.get("ImageCaptionUtils");let r=o.getClosestSelectedImageElement(e.model.document.selection),a=i.getCaptionFromImageModelElement(r);e.model.change((()=>{if(a)return void n.markDeletion(e.model.createRangeOn(a));const c=o.isBlockImage(r);t(s),r=o.getClosestSelectedImageElement(e.model.document.selection),a=i.getCaptionFromImageModelElement(r),n.markInsertion(e.model.createRangeOn(a),c?null:"imageCaption")}))})),n._suggestionFactory.registerCustomCallback("insertion","imageCaption","chain",l)),e.plugins.has("ImageStyleEditing")){n.enableCommand("imageStyle",((s,i)=>{const r=e.plugins.get("Users").me,a=e.commands.get("imageStyle");let c=o.getClosestSelectedImageElement(e.model.document.selection),l=e.model.createRangeOn(c),g=a.value;if(g==i.value)return;const u={commandName:"imageStyle",commandParams:[i],formatGroupId:(0,t.uid)()};e.model.change((()=>{if(n.getSuggestions().filter((e=>e.isInContent&&r==e.author&&("formatBlock"==e.type||"formatInline"==e.type)&&("imageStylePreApply"==e.subType||"imageStylePostApply"==e.subType)&&e.getFirstRange().isEqual(l))).forEach((e=>n.discardSuggestion(e.head))),c=o.getClosestSelectedImageElement(e.model.document.selection),l=e.model.createRangeOn(c),a.refresh(),e.commands.get("imageTypeInline").refresh(),e.commands.get("imageTypeBlock").refresh(),g=a.value,g!=i.value)return o.isInlineImage(c)&&a.shouldConvertImageType(i.value,c)?(s(i),c=o.getClosestSelectedImageElement(e.model.document.selection),void n.markBlockFormat(c,{...u,commandReversedParams:[{value:g||null}]},[],"imageStylePreApply")):void(o.isBlockImage(c)?n.markBlockFormat(c,u,[],"imageStylePostApply"):n.markInlineFormat(l,u,"imageStylePostApply"))}))}));for(const t of e.plugins.get("ImageStyleEditing").normalizedStyles)s[t.name]=t.title.toLowerCase();n._suggestionFactory.registerCustomCallback("formatBlock","imageStylePreApply","join",(()=>{})),n._suggestionFactory.registerCustomCallback("formatBlock","imageStylePostApply","join",(()=>{})),n._suggestionFactory.registerCustomCallback("formatInline","imageStylePostApply","join",(()=>{})),n._suggestionFactory.registerCustomCallback("formatBlock","imageStylePreApply","accept",(()=>{})),n._suggestionFactory.registerCustomCallback("formatBlock","imageStylePreApply","discard",((e,t)=>{n._suggestionFactory.getSuggestionCallback("formatBlock","","accept")(e,{commandName:t.commandName,commandParams:t.commandReversedParams})})),n._suggestionFactory.registerCustomCallback("formatBlock","imageStylePreApply","chain",l)}const a=[{type:"formatBlock",subType:"imageStylePreApply"},{type:"insertion",subType:"imageCaption"},{type:"formatBlock",subType:"convertInlineImageToBlock"},{type:"insertion",subType:"convertInlineImageToBlock"}];function c(e,t){const s=a.findIndex((({type:t,subType:n})=>e.type==t&&e.subType==n)),i=a.findIndex((({type:e,subType:n})=>t.type==e&&t.subType==n));if(s<0||i<0)return!1;const r=e.getFirstRange(),c=t.getFirstRange();if((0==s||1==s)&&2==i&&r.isIntersecting(c))return!0;if(2==s&&3==i){const e=n._findSuggestions(r,"insertion").filter((({suggestion:e,meta:t})=>t.isOwn&&"convertInlineImageToBlock"==e.subType));if(e.length>1&&c.end.isEqual(r.start))return!0;if(1==e.length&&(r.start.isEqual(c.end)||r.end.isEqual(c.start)))return!0}if(3==s&&3==i&&r.start.isBefore(c.start)){const e=r.end.nodeAfter,t=c.start.nodeBefore;return o.isBlockImage(e)&&e===t}return!1}function l(e,t){return c(e,t)?[e,t]:c(t,e)?[t,e]:null}e.model.document.registerPostFixer((()=>{let t=!1;const s=Array.from(e.model.document.differ.getChangedMarkers());for(const{name:e,data:i}of s){const{group:s,type:r,subType:a,id:c}=n._splitMarkerName(e);if("suggestion"==s&&n.hasSuggestion(c)){if("formatBlock"==r&&("imageStylePreApply"==a||"imageStylePostApply"==a)){const e=n.getSuggestion(c);if(i.newRange){const s=e.getFirstRange().getContainedElement();if(o.isBlockImage(s))continue;n.discardSuggestion(e),t=!0}}if("insertion"==r&&"imageCaption"==a&&!i.newRange){const e=n.getSuggestion(c);e.next&&e.next.isInContent&&(n.discardSuggestion(e.next),t=!0)}}}return t})),e.plugins.has("ImageResize")&&n.enableCommand("resizeImage",((t,s)=>{const i=o.getClosestSelectedImageElement(e.model.document.selection);i.getAttribute("width")!=s.width&&e.model.change((()=>{n.markBlockFormat(i,{commandName:"resizeImage",commandParams:[s]})}))})),e.plugins.has("ImageTextAlternativeEditing")&&n.enableCommand("imageTextAlternative",((t,s)=>{const i=o.getClosestSelectedImageElement(e.model.document.selection);(i.hasAttribute("alt")?i.getAttribute("alt"):"")!=s.newValue&&e.model.change((()=>{n.markBlockFormat(i,{commandName:"imageTextAlternative",commandParams:[s]})}))})),n._descriptionFactory.registerDescriptionCallback((e=>{if(a.find((({type:t,subType:n})=>e.type==t&&e.subType==n)))return e.previous?{}:void 0})),n._descriptionFactory.registerDescriptionCallback((e=>{if("insertion"==e.type||"deletion"==e.type){const t=e.getContainedElement();if(t&&t.is("element","caption"))return{type:"insertion"==e.type?"addObject":"removeObject",name:t.name,quantity:1}}})),n._descriptionFactory.registerDescriptionCallback((e=>"formatBlock"==e.type&&"convertInlineImageToBlock"==e.subType?{type:"format",content:"Inline image to block image"}:"formatBlock"==e.type&&"convertBlockImageToInline"==e.subType?{type:"format",content:"Block image to inline image"}:void 0)),n._descriptionFactory.registerDescriptionCallback((e=>{const{data:t}=e;if(t){if("imageStyle"==t.commandName){const e=t.commandParams[0].value;return n="side"===e?i({string:"side image",id:"FORMAT_SIDE_IMAGE"}):s[e]||e,{type:"format",content:i("*Format:* %0",n)}}if("imageTextAlternative"==t.commandName){const e=t.commandParams[0].newValue;return e?{type:"format",content:i("*Set image text alternative:* %0",'"'+e+'"')}:{type:"format",content:i("*Remove image text alternative*")}}if("resizeImage"==t.commandName){const e=t.commandParams[0].width;return e?{type:"format",content:i("*Set image width:* %0",e)}:{type:"format",content:i("*Reset image width*")}}}var n}))}}class Js extends e.Plugin{afterInit(){const e=this.editor,t=e.plugins.get("TrackChangesEditing");e.plugins.has("IndentEditing")&&(t.enableCommand("indent"),t.enableCommand("outdent"));const{t:n}=e.locale;if(e.plugins.has("IndentBlock")){for(const n of["indentBlock","outdentBlock"])t.enableCommand(n,(()=>{const o=Array.from(this.editor.model.document.selection.getSelectedBlocks()).filter((e=>this.editor.model.schema.checkAttribute(e,"blockIndent")));e.model.change((()=>{for(const e of o)t.markBlockFormat(e,{commandName:n,commandParams:[{value:""}],formatGroupId:"indentBlock"})}))}));t._descriptionFactory.registerDescriptionCallback((e=>{const{data:o}=e;if(!o)return;if("indentBlock"!=o.commandName&&"outdentBlock"!=o.commandName)return;const s=e.getItems()[0],i=t._descriptionFactory.getItemLabel(s.name);return"indentBlock"==o.commandName?{type:"format",content:n("*Indent:* %0",i)}:"outdentBlock"==o.commandName?{type:"format",content:n("*Outdent:* %0",i)}:void 0}))}}}var Ys,Zs,ei=["TrackChangesEditing","init","input","editor","plugins","enableCommand","get"];Ys=ei,Zs=250,function(e){for(;--e;)Ys.push(Ys.shift())}(++Zs);var ti=function(e,t){return ei[e-=0]};class ni extends e.Plugin{static get requires(){return[Ns.Input]}[ti("0x3")](){this[ti("0x5")][ti("0x6")][ti("0x1")](ti("0x2"))[ti("0x0")](ti("0x4"))}}class oi extends e.Plugin{afterInit(){const e=this.editor;if(!e.plugins.has("LinkEditing"))return;const t=e.plugins.get("TrackChangesEditing");t.enableCommand("link",((n,o)=>{const s=e.model.document.selection;let i=[];if(s.isCollapsed){if(!s.hasAttribute("linkHref"))return void n(o);{const t=(0,Ns.findAttributeRange)(s.getFirstPosition(),"linkHref",s.getAttribute("linkHref"),e.model);i=[t]}}else i=Array.from(s.getRanges());e.model.change((()=>{for(const e of i)t.markInlineFormat(e,{commandName:"link",commandParams:[o]})}))})),t.enableCommand("unlink",(()=>{const n=this.editor.model,o=n.document.selection;n.change((()=>{let n=[];n=o.isCollapsed?[(0,Ns.findAttributeRange)(o.getFirstPosition(),"linkHref",o.getAttribute("linkHref"),e.model)]:bs("linkHref",o.getFirstRange(),e.model);for(const e of n)t.markInlineFormat(e,{commandName:"unlink",commandParams:[]})}))})),t._descriptionFactory.registerDescriptionCallback((t=>{const{data:n}=t,{t:o}=e.locale;if(n)return"link"==n.commandName?{type:"format",content:o("*Set link:* %0",'"'+n.commandParams[0]+'"')}:"unlink"==n.commandName?{type:"format",content:o("*Remove link*")}:void 0}))}}class si extends e.Plugin{afterInit(){const e=this.editor;if(!e.plugins.has("ListEditing"))return;const t=e.plugins.get("TrackChangesEditing"),n=e.plugins.has("TodoListEditing");function o(n){return()=>{const o=e.model.document.selection,s=e.commands.get(n);if(s.value)return void e.execute("paragraph",{});const i=n.slice(0,-4),r=function(e,t,n){let o=Array.from(e).filter((e=>{return t=e,(o=n).checkChild(t.parent,"listItem")&&!o.isObject(t);var t,o}));o=o.filter((e=>!e.is("element","listItem")||e.getAttribute("listType")!=t));const s=new Set;for(const e of o)e.is("element","listItem")?s.add(ii(e)):s.add(e);return Array.from(s)}(o.getSelectedBlocks(),i,e.model.schema);e.model.change((()=>{for(const e of r)t.markBlockFormat(e,{commandName:n,commandParams:[{forceValue:!s.value}],formatGroupId:"blockName"},ri(e))}))}}function s(n){return()=>{const o=function(e){const t=(e=Array.from(e)).findIndex((e=>"listItem"!=e.name));return t>-1&&(e=e.slice(0,t)),e}(e.model.document.selection.getSelectedBlocks()),s=e.model.createRange(e.model.createPositionAt(o[0],"before"),e.model.createPositionAt(o[o.length-1],"end"));e.model.change((()=>{t.markBlockFormat(s,{commandName:n,commandParams:[],formatGroupId:"listIndent"},function(e){const t=new Set;for(const n of e){let e=n.nextSibling;for(;e&&e.getAttribute("listIndent")>n.getAttribute("listIndent");)t.add(e),e=e.nextSibling}return Array.from(t)}(o))}))}}t.enableCommand("numberedList",o("numberedList")),t.enableCommand("bulletedList",o("bulletedList")),n&&t.enableCommand("todoList",o("todoList")),t.enableCommand("indentList",s("indentList")),t.enableCommand("outdentList",s("outdentList")),n&&t.enableCommand("checkTodoList",(()=>{const n=e.commands.get("checkTodoList"),o=Array.from(n._selectedElements);o.filter((e=>e.getAttribute("todoListChecked")!=n.value)),e.model.change((()=>{for(const e of o)t.markBlockFormat(e,{commandName:"checkTodoList",commandParams:[{forceValue:!n.value}]})}))}));const{t:i}=e.locale;t._descriptionFactory.registerElementLabel("listItem",(e=>i({string:"list item",plural:"%0 list items",id:"ELEMENT_LIST_ITEM"},e))),t._descriptionFactory.registerDescriptionCallback((e=>{const{data:t}=e;if(t){if("numberedList"==t.commandName||"bulletedList"==t.commandName||"todoList"==t.commandName)switch(t.commandName.replace("List","")){case"bulleted":return n(i({string:"bulleted list",id:"ELEMENT_BULLETED_LIST"}));case"numbered":return n(i({string:"numbered list",id:"ELEMENT_NUMBERED_LIST"}));case"todo":return n(i({string:"to-do list",id:"ELEMENT_TODO_LIST"}))}if("indentList"==t.commandName)return{type:"format",content:i("*Indent:* %0",i({string:"list item",id:"ELEMENT_LIST_ITEM"}))};if("outdentList"==t.commandName)return{type:"format",content:i("*Outdent:* %0",i({string:"list item",id:"ELEMENT_LIST_ITEM"}))};if("checkTodoList"==t.commandName)return t.commandParams[0].forceValue?{type:"format",content:i("*Check item*")}:{type:"format",content:i("*Uncheck item*")}}function n(e){return{type:"format",content:i("*Change to:* %0",e)}}}))}}function ii(e){const t=e.getAttribute("listIndent");if(0==t)return e;let n=e;for(;e.previousSibling&&e.previousSibling.is("element","listItem");){const o=e.previousSibling.getAttribute("listIndent");if(o==t)n=e.previousSibling;else if(o<t)break;e=e.previousSibling}return n}function ri(e){const t=[];if(e.is("element","listItem")&&e.getAttribute("listIndent")>0){let n=e.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")==e.getAttribute("listIndent");)t.push(n),n=n.nextSibling}return t}class ai extends e.Plugin{afterInit(){const e=this.editor;if(!e.plugins.has("MediaEmbedEditing"))return;const t=e.plugins.get("TrackChangesEditing"),{t:n}=e.locale;t.enableCommand("mediaEmbed"),t._descriptionFactory.registerElementLabel("media",(e=>n({string:"media item",plural:"%0 media items",id:"ELEMENT_MEDIA"},e))),e.conversion.for("dataDowncast").elementToElement({model:"media",view:(e,{writer:t,options:n})=>{if(n.showSuggestionHighlights)return t.createEmptyElement("div")},converterPriority:"high"}),e.data.downcastDispatcher.on("attribute:url:media",((e,t,n)=>{n.options.showSuggestionHighlights&&e.stop()}),{priority:"high"})}}const ci=["editor","afterInit","MentionEditing","TrackChangesEditing","plugins","has","mention","get"];var li,gi;li=ci,gi=215,function(e){for(;--e;)li.push(li.shift())}(++gi);const ui=function(e,t){return ci[e-=0]};class di extends e.Plugin{[ui("0x2")](){const e=this[ui("0x1")];e[ui("0x5")][ui("0x6")](ui("0x3"))&&e[ui("0x5")][ui("0x0")](ui("0x4")).enableCommand(ui("0x7"))}}class mi extends e.Plugin{afterInit(){const e=this.editor;if(!e.plugins.has("PageBreakEditing"))return;e.plugins.get("TrackChangesEditing").enableCommand("pageBreak");const t=e.plugins.get("TrackChangesEditing"),{t:n}=e.locale;t._descriptionFactory.registerElementLabel("pageBreak",(e=>n({string:"page break",plural:"%0 page breaks",id:"ELEMENT_PAGE_BREAK"},e)))}}class hi extends e.Plugin{afterInit(){const e=this.editor;if(!e.plugins.has("Paragraph"))return;const{t}=e.locale,n=e.plugins.get("TrackChangesEditing");n._descriptionFactory.registerElementLabel("paragraph",(e=>t({string:"paragraph",plural:"%0 paragraphs",id:"ELEMENT_PARAGRAPH"},e))),n.enableCommand("paragraph",((t,o={})=>{const s=e.model.document,i=o.selection||s.selection,r=Array.from(i.getSelectedBlocks()).filter((e=>{return t=e,(n=this.editor.model.schema).checkChild(t.parent,"paragraph")&&!n.isObject(t)&&"paragraph"!=t.name;var t,n}));e.model.change((()=>{for(const e of r)n.markBlockFormat(e,{commandName:"paragraph",commandParams:[],formatGroupId:"blockName"},xs(e))}))})),n._descriptionFactory.registerDescriptionCallback((e=>{const{data:n}=e;if(n&&"paragraph"==n.commandName)return{type:"format",content:t("*Change to:* %0",t({string:"paragraph",plural:"%0 paragraphs",id:"ELEMENT_PARAGRAPH"}))}})),n.enableCommand("insertParagraph"),e.editing.downcastDispatcher.on("addMarker:suggestion:insertion",fi(e),{priority:"highest"}),e.data.downcastDispatcher.on("addMarker:suggestion:insertion",((t,n,o)=>{o.options.showSuggestionHighlights&&fi(e,{showActiveMarker:!1})(t,n,o)}),{priority:"highest"});const o=n._descriptionFactory;o.registerDescriptionCallback((n=>{if("insertion"!==n.type)return;const{start:s,end:i}=n.getFirstRange();if(!s.isTouching(i)||!s.nodeAfter)return;const r=e.model.schema,a=s.nodeAfter;return r.isBlock(a)&&!r.isLimit(a)&&r.checkChild(a,"$text")?{type:"insertion",content:t("*Insert:* %0",o.getItemLabel(a.name,1))}:void 0}))}}function fi(e,{showActiveMarker:t=!0}={}){return(n,o,s)=>{const i=e.plugins.get("TrackChangesEditing"),r=o.markerRange.start,a=o.markerRange.end,c=e.model.schema;if(!r.isTouching(a)||!r.nodeAfter)return;const l=r.nodeAfter;if(c.isBlock(l)&&!c.isLimit(l)&&c.checkChild(l,"$text")){if(!s.consumable.consume(o.markerRange,n.name))return;const e=s.writer.createUIElement("span",{class:"ck-suggestion-marker-split"}),r=s.mapper.toViewPosition(a);t&&i.activeMarkers.includes(o.markerName)&&s.writer.addClass("ck-suggestion-marker--active",e),s.writer.insert(r,e),s.mapper.bindElementToMarker(e,o.markerName)}}}class pi extends e.Plugin{afterInit(){const e=this.editor;if(!e.plugins.has("RemoveFormatEditing"))return;const t=e.plugins.get("TrackChangesEditing");t.enableCommand("removeFormat",(n=>{const o=e.model.document.selection;o.isCollapsed?n():e.model.change((()=>{const n=Array.from(o.getRanges());for(const o of n)for(const n of o.getItems())bi(n,e.model.schema)&&t.markInlineFormat(e.model.createRangeOn(n),{commandName:"removeFormat",commandParams:[]})}))}));const{t:n}=e.locale;t._descriptionFactory.registerDescriptionCallback((e=>{const{data:t}=e;if(t&&"removeFormat"==t.commandName)return{type:"format",content:n("*Remove all formatting*")}}))}}function bi(e,t){for(const[n]of e.getAttributes()){const e=t.getAttributeProperties(n);if(e&&e.isFormatting)return!0}return!1}const xi=["discardSelectedSuggestions","TrackChangesEditing","goToPreviousRestrictedEditingException","editor","enableCommand","acceptSelectedSuggestions","acceptSuggestion","discardSuggestion","trackChanges","afterInit","acceptAllSuggestions","plugins","has","get","RestrictedEditingModeEditing"];var yi,Ci;yi=xi,Ci=139,function(e){for(;--e;)yi.push(yi.shift())}(++Ci);const _i=function(e,t){return xi[e-=0]};class ki extends e.Plugin{[_i("0x5")](){const e=this[_i("0xe")];if(!e[_i("0x7")][_i("0x8")](_i("0xa")))return;const t=e[_i("0x7")][_i("0x9")](_i("0xc"));t.enableCommand(_i("0xd")),t[_i("0x0")]("goToNextRestrictedEditingException");const n=e[_i("0x7")][_i("0x9")]("RestrictedEditingModeEditing");n[_i("0x0")](_i("0x4")),n[_i("0x0")](_i("0x2")),n[_i("0x0")](_i("0x3")),n.enableCommand(_i("0x6")),n.enableCommand("discardAllSuggestions"),n.enableCommand(_i("0x1")),n[_i("0x0")](_i("0xb"))}}class vi extends e.Plugin{static get requires(){return[js.ShiftEnter]}init(){const e=this.editor,t=e.plugins.get("TrackChangesEditing"),n=e.t;t.enableCommand("shiftEnter"),e.editing.downcastDispatcher.on("addMarker:suggestion:insertion",Ei(e),{priority:"high"}),e.editing.downcastDispatcher.on("addMarker:suggestion:deletion",Ei(e),{priority:"high"}),e.data.downcastDispatcher.on("addMarker:suggestion",((t,n,o)=>{o.options.showSuggestionHighlights&&Ei(e,{showActiveMarker:!1})(t,n,o)})),t._descriptionFactory.registerElementLabel("softBreak",(e=>n({id:"ELEMENT_LINE_BREAK",string:"line break",plural:"%0 line breaks"},e)))}}function Ei(e,{showActiveMarker:t=!0}={}){return(n,o,s)=>{const i=e.plugins.get("TrackChangesEditing");if(!s.consumable.test(o.markerRange,n.name))return;const r=e.model;for(const e of o.markerRange.getItems()){if(!e.is("element","softBreak"))continue;const n="deletion"==o.markerName.split(":")[1]?"merge":"split",a=s.writer.createUIElement("span",{class:"ck-suggestion-marker-"+n}),c=s.mapper.toViewPosition(r.createPositionBefore(e));t&&i.activeMarkers.includes(o.markerName)&&s.writer.addClass("ck-suggestion-marker--active",a),s.writer.insert(c,a),s.mapper.bindElementToMarker(a,o.markerName)}}}class Ti extends e.Plugin{afterInit(){const e=this.editor,t=e.model;if(!e.plugins.has("StandardEditingModeEditing"))return;const n=e.plugins.get("TrackChangesEditing"),o="restrictedEditingException",s=e.commands.get(o);n.enableCommand(o,((e,i={})=>{const r=t.document.selection;if(r.isCollapsed)return void e(i);const a=void 0!==i.forceValue?i.forceValue:!s.value;t.change((()=>{const e=Array.from(r.getRanges());for(const s of e){const e=a?[s]:bs(o,s,t);for(const t of e)n.markInlineFormat(t,{commandName:o,commandParams:[{forceValue:a}]})}}))}));const i=e.t;n._descriptionFactory.registerDescriptionCallback((e=>{const{data:t}=e;if(t&&t.commandName==o)return t.commandParams[0].forceValue?{type:"format",content:i({string:"*Enable in restricted editing mode*",id:"FORMAT_RESTRICTED_ENABLED"})}:{type:"format",content:i({string:"*Disable in restricted editing mode*",id:"FORMAT_RESTRICTED_DISABLED"})}}))}}class Ri extends e.Plugin{constructor(e){super(e),this._tablePostFixingSubtypes=["tableRow","tableColumn"]}afterInit(){const e=this.editor,t=e.model.document.selection;if(!e.plugins.has("TableEditing"))return;const{t:n}=e.locale,o=e.plugins.get("TrackChangesEditing"),s=e.plugins.get("TableUtils");o._descriptionFactory.registerElementLabel("table",(e=>n({string:"table",plural:"%0 tables",id:"ELEMENT_TABLE"},e))),this._setupColumnsRowsFixing(),o.enableCommand("insertTable"),o.enableCommand("selectTableRow"),o.enableCommand("selectTableColumn");for(const n of["insertTableRowAbove","insertTableRowBelow"]){const i=e.commands.get(n);o.enableCommand(n,(n=>{e.model.change((e=>{n();const r="above"===i.order,a=s.getSelectionAffectedTableCells(t),c=s.getRowIndexes(a),l=r?c.first-1:c.last+1,g=a[0].findAncestor("table"),u=s.createTableWalker(g,{startRow:l,endRow:l}),d=Array.from(u).map((t=>e.createRangeOn(t.cell)));o.markMultiRangeInsertion(d,"tableRow")}))}))}for(const n of["insertTableColumnLeft","insertTableColumnRight"]){const i=e.commands.get(n);o.enableCommand(n,(n=>{e.model.change((e=>{n();const r="left"===i.order,a=s.getSelectionAffectedTableCells(t),c=s.getColumnIndexes(a),l=r?c.first-1:c.last+1,g=a[0].findAncestor("table"),u=s.createTableWalker(g,{startRow:0,column:l,includeAllSlots:!1}),d=Array.from(u).map((t=>e.createRangeOn(t.cell)));o.markMultiRangeInsertion(d,"tableColumn")}))}))}for(const n of["removeTableRow","removeTableColumn"]){const i=n.substr(11),r=i.toLowerCase(),a=r.substr(0,3)+"span",c="table"+i,l="min"+i,g="max"+i;o.enableCommand(n,(()=>{e.model.change((e=>{const i=s.getSelectionAffectedTableCells(t),u=i[0].findAncestor("table");let d;if("removeTableRow"==n){const e=s.getRowIndexes(i);d={startRow:e.first,endRow:e.last,includeAllSlots:!0}}else{const e=s.getColumnIndexes(i);d={startColumn:e.first,endColumn:e.last,includeAllSlots:!0}}const m=s.createTableWalker(u,d),h=Array.from(m).map((({cell:e})=>e)),f=Si(h.filter((e=>e.hasAttribute(a)))),p=Si(h.filter((e=>!e.hasAttribute(a)))).map((t=>e.createRangeOn(t))),b=o.markMultiRangeDeletion(p,c);if(b&&("tableRow"==b.subType||"tableColumn"==b.subType)){const t=this._getSuggestionCoords(b);for(const n of f){const o=e.createRangeOn(n),i=s.getCellLocation(n),c=n.getAttribute(a)-1,u=t[l],d=t[g];u<=i[r]&&i[r]+c<=d&&b.addRange(o)}}}))}))}function i(n){const o=Array.from(t.getRanges()).map((e=>r.LiveRange.fromRange(e)));e.model.change((t=>{const s=t.batch;n=n.filter((e=>"$graveyard"!=e.root.rootName)),t.setSelection(n),e.commands.get("removeTableRow").refresh(),e.execute("removeTableRow",{forceDefaultExecution:!0}),e.model.enqueueChange((()=>{e.model.enqueueChange(s,(e=>{const t=o.filter((e=>"$graveyard"!=e.root.rootName));t.length>0&&e.setSelection(t);for(const e of o)e.detach()}))}))}))}function c(n){e.model.change((o=>{const s=Array.from(t.getRanges()).map((e=>r.LiveRange.fromRange(e))),i=[];for(const e of n)for(const t of e.getItems({shallow:!0}))i.push(t);for(const t of i)"$graveyard"!=t.root.rootName&&(o.setSelection(o.createPositionAt(t,0)),e.commands.get("removeTableColumn").refresh(),e.execute("removeTableColumn",{forceDefaultExecution:!0}));const a=s.filter((e=>"$graveyard"!=e.root.rootName));a.length>0&&o.setSelection(a);for(const e of s)e.detach()}))}function l(e,t){return t.every((t=>e.some((e=>e.end.isEqual(t.start)||t.end.isEqual(e.start)))))}function g(e,t){return e.some((e=>t.some((t=>e.end.isTouching(t.start)))))}e.data.downcastDispatcher.on("addMarker:suggestion",((e,t,n)=>{if(!n.options.showSuggestionHighlights)return;const o=t.item;if(!o)return;const s=n.mapper.toViewElement(o);function i(e){return Array.isArray(e)?e:[e]}s&&"tableCell"===o.name&&(0,a.setHighlightHandling)(s,n.writer,((e,t,n)=>n.addClass(i(t.classes),e)),((e,t,n)=>n.removeClass(i(t.classes),e)))}),{priority:"highest"}),o._descriptionFactory.registerDescriptionCallback((e=>{if("insertion"!=e.type&&"deletion"!=e.type)return;const t=e.getContainedElement();if(null!=t&&t.is("element","table")){if("insertion"==e.type){const t=e.getItems().filter((e=>e.is("textProxy"))).map((e=>e.data));if(t.length)return{type:"insertion",content:n("*Insert:* %0",n({string:"table *with text* %0",id:"ELEMENT_TABLE_WITH_TEXT"},'"'+t.join(" ")+'"'))}}if("deletion"==e.type){const t=e.getItems().filter((e=>e.is("textProxy"))).map((e=>e.data));if(t.length)return{type:"deletion",content:n("*Remove:* %0",n({string:"table *with text* %0",id:"ELEMENT_TABLE_WITH_TEXT"},'"'+t.join(" ")+'"'))}}}})),o._descriptionFactory.registerDescriptionCallback((e=>{if("tableRow"==e.subType){const t=e.getItems().filter((e=>e.is("textProxy"))).map((e=>e.data)),o=this._getSuggestionCoords(e),s=o.maxRow-o.minRow+1;if("insertion"==e.type)return t.length?{type:"insertion",content:n("*Insert:* %0",n({string:"table row *with text* %1",plural:"%0 table rows *with text* %1",id:"ELEMENT_TABLE_ROW_WITH_TEXT"},[s,'"'+t.join(" ")+'"']))}:{type:"insertion",content:n("*Insert:* %0",n({string:"table row",plural:"%0 table rows",id:"ELEMENT_TABLE_ROW"},s))};if("deletion"==e.type)return t.length?{type:"deletion",content:n("*Remove:* %0",n({string:"table row *with text* %1",plural:"%0 table rows *with text* %1",id:"ELEMENT_TABLE_ROW_WITH_TEXT"},[s,'"'+t.join(" ")+'"']))}:{type:"deletion",content:n("*Remove:* %0",n({string:"table row",plural:"%0 table rows",id:"ELEMENT_TABLE_ROW"},s))}}if("tableColumn"==e.subType){const t=e.getItems().filter((e=>e.is("textProxy"))).map((e=>e.data)),o=this._getSuggestionCoords(e),s=o.maxColumn-o.minColumn+1;if("insertion"==e.type)return t.length?{type:"insertion",content:n("*Insert:* %0",n({string:"table column *with text* %1",plural:"%0 table columns *with text* %1",id:"ELEMENT_TABLE_COLUMN_WITH_TEXT"},[s,'"'+t.join(" ")+'"']))}:{type:"insertion",content:n("*Insert:* %0",n({string:"table column",plural:"%0 table columns",id:"ELEMENT_TABLE_COLUMN"},s))};if("deletion"==e.type)return t.length?{type:"deletion",content:n("*Remove:* %0",n({string:"table column *with text* %1",plural:"%0 table columns *with text* %1",id:"ELEMENT_TABLE_COLUMN_WITH_TEXT"},[s,'"'+t.join(" ")+'"']))}:{type:"deletion",content:n("*Remove:* %0",n({string:"table column",plural:"%0 table columns",id:"ELEMENT_TABLE_COLUMN"},s))}}})),o._suggestionFactory.registerCustomCallback("insertion","tableRow","discard",i),o._suggestionFactory.registerCustomCallback("deletion","tableRow","accept",i),o._suggestionFactory.registerCustomCallback("insertion","tableColumn","discard",c),o._suggestionFactory.registerCustomCallback("deletion","tableColumn","accept",c),o._suggestionFactory.registerCustomCallback("insertion","tableColumn","join",l),o._suggestionFactory.registerCustomCallback("deletion","tableColumn","join",l),o._suggestionFactory.registerCustomCallback("insertion","tableRow","join",g),o._suggestionFactory.registerCustomCallback("deletion","tableRow","join",g)}_acceptFormatSuggestionCallbackFactory(){const e=this.editor,t=e.model.document.selection;return(n,o)=>{e.model.change((s=>{const{commandName:i,commandParams:a}=o;let c=n[0].end.nodeBefore;a&&a[0]&&!1===a[0].forceValue&&(c=n[0].start.nodeAfter);const l=s.createRangeIn(c);if("$graveyard"==l.root.rootName)return;const g=Array.from(t.getRanges()).map((e=>r.LiveRange.fromRange(e)));s.setSelection(l),e.commands.get(i).refresh(),a.push({forceDefaultExecution:!0}),e.execute(i,...a);const u=g.filter((e=>"$graveyard"!=e.root.rootName));u.length>0&&s.setSelection(u);for(const e of g)e.detach()}))}}_getCoordsForCells(e){const t=this.editor.plugins.get("TableUtils");let n=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER;for(const r of e){if("$graveyard"==r.root.rootName)continue;const{row:e,column:a}=t.getCellLocation(r),c=r.hasAttribute("rowspan")?r.getAttribute("rowspan")-1:0,l=r.hasAttribute("colspan")?r.getAttribute("colspan")-1:0;n=e<n?e:n,o=e+c>o?e+c:o,s=a<s?a:s,i=a+l>i?a+l:i}return{minRow:n,maxRow:o,minColumn:s,maxColumn:i}}_setupColumnsRowsFixing(){const e=this.editor,t=e.plugins.get("TrackChangesEditing"),n=e.plugins.get("TableUtils");this._tableSuggestions=new Set,e.model.document.on("change:data",(()=>{const n=Array.from(e.model.document.differ.getChangedMarkers());for(const{name:e,data:o}of n){const{group:n,id:s,subType:i}=t._splitMarkerName(e);if("suggestion"!=n)continue;if(null!=o.oldRange)continue;const r=t.getSuggestion(s);this._tablePostFixingSubtypes.includes(i)&&this._tableSuggestions.add(r)}}),{priority:"low"});const o=(e,t)=>{let o=!1;const s=t.createRangeOn(e),i=e.findAncestor("table"),r=n.getCellLocation(e);for(const t of this._tableSuggestions){const n=t.subType,a=n.startsWith("tablePaste"),c=n.substr(a?10:5),l=c.toLowerCase(),g=l.substr(0,3)+"span",u="min"+c,d="max"+c;if(!t.isInContent)continue;if(i!=t.getFirstRange().start.findAncestor("table"))continue;if(t.isIntersectingWithRange(s))continue;const m=e.hasAttribute(g)?e.getAttribute(g)-1:0,h=this._getSuggestionCoords(t),f=h[u],p=h[d];f<=r[l]&&r[l]+m<=p&&(t.addRange(s),o=!0)}return o};e.model.document.registerPostFixer((t=>{let n=!1;for(const s of e.model.document.differ.getChanges())if("insert"==s.type)if("tableRow"==s.name)for(const e of s.position.nodeAfter.getChildren())n=n||o(e,t);else"tableCell"==s.name&&(n=n||o(s.position.nodeAfter,t));return n}))}_getSuggestionCoords(e){return this._getCoordsForCells(e.getRanges().map((e=>e.start.nodeAfter)))}}function Si(e){return Array.from(new Set(e).values())}class wi extends e.Plugin{static get requires(){return[Ri]}afterInit(){const e=this.editor,t=e.model.document.selection;if(!e.plugins.has("TableEditing"))return;const{t:n}=e.locale,o=e.plugins.get("TrackChangesEditing"),s=e.plugins.get("TableUtils"),i=e.plugins.get(Ri);i._tablePostFixingSubtypes.push("mergeTableCells"),o.enableCommand("mergeTableCells",(()=>{const t=s.getSelectionAffectedTableCells(e.model.document.selection);e.model.change((()=>{o.markMultiRangeBlockFormat(t,{commandName:"mergeTableCells",commandParams:[]},[],"mergeTableCells")}))})),e.commands.get("mergeTableCells").on("execute",((t,n)=>{e.commands.get("trackChanges").value&&(n.length>0&&n[n.length-1]&&n[n.length-1].forceDefaultExecution||o._isForcedDefaultExecutionBlock||this._areSelectedCellsMergable()||t.stop())}),{priority:"highest"});for(const t of["mergeTableCellUp","mergeTableCellRight","mergeTableCellDown","mergeTableCellLeft"]){const n=e.commands.get(t);o.enableCommand(t,(()=>{const t=e.model.document.selection.getFirstPosition().getAncestors().find((e=>e.is("element","tableCell"))),s=n.value;e.model.change((()=>{o.markMultiRangeBlockFormat([t,s],{commandName:"mergeTableCells",commandParams:[]},[],"mergeTableCells")}))}))}for(const t of["splitTableCellVertically","splitTableCellHorizontally"]){const n=e.commands.get(t);o.enableCommand(t,(()=>{const i=s.getSelectionAffectedTableCells(e.model.document.selection)[0],r=i.findAncestor("table"),{column:a,row:c}=s.getCellLocation(i);let l=[];if("horizontally"==n.direction){const e=s.createTableWalker(r,{startRow:c,endRow:c,includeAllSlots:!0});l=Array.from(e).map((e=>e.cell))}else{const e=s.createTableWalker(r,{column:a,includeAllSlots:!0});l=Array.from(e).map((e=>e.cell))}e.model.change((e=>{o.markBlockFormat(e.createRangeOn(i),{commandName:t,commandParams:[]},l,t)}))}))}o._descriptionFactory.registerDescriptionCallback((e=>{const{data:t}=e;if(t)return"mergeTableCells"==t.commandName?{type:"format",content:n("*Merge cells*")}:void 0})),o._descriptionFactory.registerDescriptionCallback((e=>{const{data:t}=e;if(t)return"splitTableCellVertically"==t.commandName?{type:"format",content:n("*Split cell:* vertically")}:"splitTableCellHorizontally"==t.commandName?{type:"format",content:n("*Split cell:* horizontally")}:void 0}));const a=i._acceptFormatSuggestionCallbackFactory();for(const e of["mergeTableCellUp","mergeTableCellRight","mergeTableCellDown","mergeTableCellLeft"])o._suggestionFactory.registerCustomCallback("formatBlock",e,"accept",a);for(const e of["splitTableCellVertically","splitTableCellHorizontally"])o._suggestionFactory.registerCustomCallback("formatBlock",e,"accept",a);o._suggestionFactory.registerCustomCallback("formatBlock","mergeTableCells","accept",(n=>{e.model.change((o=>{const s=Array.from(t.getRanges()).map((e=>r.LiveRange.fromRange(e)));o.setSelection(n),e.commands.get("mergeTableCells").refresh(),e.execute("mergeTableCells",{forceDefaultExecution:!0});const i=s.filter((e=>"$graveyard"!=e.root.rootName));i.length>0&&o.setSelection(i);for(const e of s)e.detach()}))}));for(const t of["mergeTableCellUp","mergeTableCellDown","mergeTableCellLeft","mergeTableCellRight"]){const n=e.commands.get(t);n.on("set:isEnabled",((t,o,s)=>{if(s){const o=e.model.document.selection.getFirstPosition().getAncestors().find((e=>e.is("element","tableCell")));this._areMergableCells(n.value,o)||(t.return=!1,t.stop())}}),{priority:"low"})}}_areSelectedCellsMergable(){const e=this.editor.commands.get("mergeTableCells"),t=this.editor.plugins.get("TableUtils");if(!e.isEnabled)return!1;const n=t.getSelectionAffectedTableCells(this.editor.model.document.selection);for(const e of n)for(const t of n)if(e!=t&&!this._areMergableCells(e,t))return!1;return!0}_areMergableCells(e,t){const n=this.editor.plugins.get("TrackChangesEditing"),o=this.editor.model.createRangeOn(e),s=this.editor.model.createRangeOn(t),i=new Set,r=new Set;for(const e of n.getSuggestions())if(("insertion"==e.type||"deletion"==e.type||"mergeTableCells"==e.subType)&&e.isInContent)for(const t of e.getRanges())t.containsRange(o,!0)&&i.add(e.type+":"+e.author.id),t.containsRange(s,!0)&&r.add(e.type+":"+e.author.id);if(i.size!=r.size)return!1;for(const e of i)if(!r.has(e))return!1;return!0}}class Ai extends e.Plugin{static get requires(){return[Ri]}afterInit(){const e=this.editor;if(!e.plugins.has("TableEditing"))return;const{t}=e.locale,n=e.plugins.get("TrackChangesEditing"),o=e.plugins.get("TableUtils"),s=e.plugins.get(Ri);function i({showActiveMarker:e=!0,setDataAttribute:t=!0}={}){return(s,i,r)=>{const{type:a,id:c}=n._splitMarkerName(i.markerName),l=n.getSuggestion(c);if(!l.data||"setTableColumnHeader"!=l.data.commandName)return;if(i.item)return void s.stop();if(!r.consumable.consume(i.markerRange,s.name))return;const g=i.markerRange.start.nodeAfter,u=i.markerRange.end.nodeBefore,d=g.parent.parent,{column:m}=o.getCellLocation(g),{column:h}=o.getCellLocation(u);for(let s=m;s<=h;s++){const l=o.createTableWalker(d,{column:s,includeAllSlots:!1});for(const o of l){const s=o.cell,l=r.mapper.toViewElement(s);r.writer.addClass("ck-suggestion-marker-"+a,l),t&&r.writer.setAttribute("data-suggestion",c,l),r.mapper.bindElementToMarker(l,i.markerName),e&&(n.activeMarkers.includes(i.markerName)?r.writer.addClass("ck-suggestion-marker--active",l):r.writer.removeClass("ck-suggestion-marker--active",l))}}}}n.enableCommand("setTableRowHeader",((t,s)=>{const i=o.getSelectionAffectedTableCells(e.model.document.selection),r=o.getRowIndexes(i),a=i[0].findAncestor("table"),c=a.getAttribute("headingRows")||0,l=s&&null!==s.forceValue?s.forceValue:!e.commands.get("setTableRowHeader").value,g=l?r.last:r.first,u=a.getChild(g);let d;if(l){const t=a.getChild(c);if(u.index<t.index)return;d=e.model.createRange(e.model.createPositionBefore(t.getChild(0)),e.model.createPositionAfter(u.getChild(u.childCount-1)))}else{const t=a.getChild(c-1);if(!t)return;d=e.model.createRange(e.model.createPositionBefore(u.getChild(0)),e.model.createPositionAfter(t.getChild(t.childCount-1)))}e.model.change((()=>{n.markBlockFormat(d,{commandName:"setTableRowHeader",commandParams:[{forceValue:l}]},[],"setTableRowHeader")}))})),n.enableCommand("setTableColumnHeader",((t,o)=>{const s=e.plugins.get("TableUtils"),i=s.getSelectionAffectedTableCells(e.model.document.selection),r=s.getColumnIndexes(i),a=i[0].findAncestor("table"),c=a.getAttribute("headingColumns")||0,l=o&&null!==o.forceValue?o.forceValue:!e.commands.get("setTableColumnHeader").value;let g;const u=a.getChild(0),d=l?r.last:r.first,m=s.createTableWalker(a,{startRow:0,column:d,includeAllSlots:!1}),h=Array.from(m)[0].cell;if(l){const t=u.getChild(c);if(h.isBefore(t))return;g=e.model.createRange(e.model.createPositionBefore(t),e.model.createPositionAfter(h))}else{const t=u.getChild(c-1);if(!t)return;g=e.model.createRange(e.model.createPositionBefore(h),e.model.createPositionAfter(t))}e.model.change((()=>{n.markBlockFormat(g,{commandName:"setTableColumnHeader",commandParams:[{forceValue:l}]},[],"setTableColumnHeader")}))})),e.editing.downcastDispatcher.on("addMarker:suggestion",i(),{priority:"highest"}),e.data.downcastDispatcher.on("addMarker:suggestion",((e,t,n)=>{n.options.showSuggestionHighlights&&i({showActiveMarker:!1,setDataAttribute:!1})(e,t,n)}),{priority:"highest"}),e.editing.downcastDispatcher.on("removeMarker:suggestion",((e,t,o)=>{const{type:s,id:i}=n._splitMarkerName(t.markerName),r=n.getSuggestion(i);if(!r.data||"setTableColumnHeader"!=r.data.commandName)return;const a=o.mapper.markerNameToElements(t.markerName);if(a)for(const e of a)o.writer.removeClass("ck-suggestion-marker-"+s,e),o.writer.removeClass("ck-suggestion-marker--active",e),o.writer.removeAttribute("data-suggestion",e),o.mapper.unbindElementFromMarkerName(e,t.markerName)}),{priority:"highest"}),n._descriptionFactory.registerDescriptionCallback((e=>{const{data:n}=e;if(n){if("setTableRowHeader"==n.commandName){const e=n.commandParams[0].forceValue;return o(t(e?{string:"header row",id:"FORMAT_HEADER_ROW"}:{string:"regular row",id:"FORMAT_REGULAR_ROW"}))}if("setTableColumnHeader"==n.commandName){const e=n.commandParams[0].forceValue;return o(t(e?{string:"header column",id:"FORMAT_HEADER_COLUMN"}:{string:"regular column",id:"FORMAT_REGULAR_COLUMN"}))}}function o(e){return{type:"format",content:t("*Format:* %0",e)}}}));const r=s._acceptFormatSuggestionCallbackFactory();n._suggestionFactory.registerCustomCallback("formatBlock","setTableRowHeader","accept",r),n._suggestionFactory.registerCustomCallback("formatBlock","setTableColumnHeader","accept",r)}}const Ii=["tableCellBorderWidth","tableCellBorderColor","tableCellBorderStyle","tableCellHorizontalAlignment","tableCellVerticalAlignment","tableCellBackgroundColor","tableCellPadding"],Mi=Object.fromEntries(Ii.map((e=>[e,null])));class Ni extends e.Plugin{static get requires(){return[Ri]}afterInit(){const e=this.editor;if(!e.plugins.has("TableClipboard"))return;const{t:n}=e.locale,o=e.plugins.get("TrackChangesEditing"),s=e.plugins.get("TableUtils"),i=e.plugins.get(Ri),r=e.plugins.get("TableClipboard");i._tablePostFixingSubtypes.push("tablePasteRow","tablePasteColumn"),e.model.schema.register("tableCellSuggestion",{allowIn:"tableCell",allowContentOf:"tableCell",isLimit:!0}),e.conversion.elementToElement({model:"tableCellSuggestion",view:"suggestion-td"});let a=null;e.model.on("insertContent",((n,i)=>{const[c,l]=i,g=i[i.length-1];g&&g.forceDefaultExecution||o._isForcedDefaultExecutionBlock||this.editor.commands.get("trackChanges").value&&function(e,t,n,o,s){if(t&&!t.is("documentSelection"))return!1;const i=s.getTableIfOnlyTableInContent(e,n);if(!i||!Pi(i,null,o))return!1;const r=o.getSelectionAffectedTableCells(n.document.selection);if(!r.length)return!1;const a=r[0].findAncestor("table"),c=o.getRowIndexes(r),l=o.getColumnIndexes(r),g={startRow:c.first,endRow:c.last,startColumn:l.first,endColumn:l.last};return 1==r.length&&(g.endRow+=o.getRows(i)-1,g.endColumn+=o.getColumns(i)-1),Pi(a,g,o)}(c,l,e.model,s,r)&&(n.stop(),a={cells:[],insertionRanges:[],deletionRanges:[],rowInsertionRanges:[],rowInsertionIndexes:[],columnInsertionRanges:[],columnInsertionIndexes:[]},e.model.change((()=>{e.model.insertContent(i[0],i[1],i[2],i[3],{forceDefaultExecution:!0});const n=(0,t.uid)(),{rowInsertionRanges:s,columnInsertionRanges:r,insertionRanges:c,deletionRanges:l,cells:g}=a;s.length&&o.markMultiRangeInsertion(s,"tablePasteRow",{tablePasteChainId:n}),r.length&&o.markMultiRangeInsertion(r,"tablePasteColumn",{tablePasteChainId:n}),c.length&&o.markMultiRangeInsertion(c,"tablePaste",{tablePasteChainId:n,skipNestingCheck:!0}),l.length&&o.markMultiRangeDeletion(l,"tablePaste",{tablePasteChainId:n,skipNestingCheck:!0});const u=o.markMultiRangeBlockFormat(g.map((({element:e})=>e)),{formatGroupId:(0,t.uid)()},[],"tablePasteCell",{tablePasteChainId:n});if(u){const t=u.getMarkers(),n=[];for(const{element:o,attributes:s}of g){if(!s)continue;const i=e.model.createRangeOn(o),r=t.find((e=>e.getRange().isEqual(i)));r&&n.push([r.name,s])}n.length&&u.setAttribute("markerAttributes",Object.fromEntries(n))}a=null})))}),{priority:t.priorities.high+10}),e.plugins.get("TableClipboard").on("_replaceTableSlotCell",((e,t)=>{const[n,o,,s]=t;if(!a)return;e.stop();const i=n.cell,r=o,c=Fi(i),l=Fi(r);e.return=i;let g=null,u=null;if(l||c)if(c&&!l){s.remove(i.getChild(0));for(const e of Array.from(r.getChildren()))s.insert(e,i,"end");const e=a.rowInsertionIndexes.includes(n.row),t=a.columnInsertionIndexes.includes(n.column);e||t||(g=s.createRangeIn(i))}else l&&!c&&(u=s.createRangeIn(i));else{const e=s.createElement("tableCellSuggestion"),t=s.createElement("tableCellSuggestion");s.wrap(s.createRangeIn(i),t),s.insert(e,i,0);for(const t of Array.from(r.getChildren()))s.insert(t,e,"end");g=s.createRangeOn(e),u=s.createRangeOn(t)}const d=Array.from(r.getAttributes()).filter((([e])=>Ii.includes(e)));a.cells.push({element:i,attributes:d.length?Object.fromEntries(d):null}),g&&a.insertionRanges.push(g),u&&a.deletionRanges.push(u)}),{priority:"high"}),s.on("insertColumns",((t,n)=>{const[o,i={}]=n;if(!a)return;const r=i.at||0,c=i.columns||1;a.columnInsertionIndexes=new Array(c).fill(r).map(((e,t)=>e+t));for(const{cell:t}of s.createTableWalker(o,{startColumn:r,endColumn:r+c-1}))a.columnInsertionRanges.push(e.model.createRangeOn(t))}),{priority:"low"}),s.on("insertRows",((t,n)=>{const[o,i={}]=n;if(!a)return;const r=i.at||0,c=i.rows||1;a.rowInsertionIndexes=new Array(c).fill(r).map(((e,t)=>e+t));for(const{cell:t}of s.createTableWalker(o,{startRow:r,endRow:r+c-1}))a.rowInsertionRanges.push(e.model.createRangeOn(t))}),{priority:"low"}),o._descriptionFactory.registerDescriptionCallback((e=>{if(e.subType&&e.subType.startsWith("tablePaste"))return e.previous?{}:{type:"insertion",content:n("*Replace table cells*")}}));const c=()=>{};for(const e of["tablePaste","tablePasteColumn","tablePasteRow","tablePasteCell"])o._suggestionFactory.registerCustomCallback("insertion",e,"join",c),o._suggestionFactory.registerCustomCallback("deletion",e,"join",c);o._suggestionFactory.registerCustomCallback("formatBlock","tablePasteCell","discard",c),o._suggestionFactory.registerCustomCallback("formatBlock","tablePasteCell","accept",((t,n,o)=>{const s=t.map((e=>e.getContainedElement())).filter((e=>e)),i=new Map(s.map((e=>[e,null])));if(a)for(const{element:e,attributes:t}of a.cells)t&&i.set(e,t);else if(o&&o.markerAttributes)for(const[t,n]of Object.entries(o.markerAttributes)){const o=e.model.markers.get(t),s=o?o.getRange().getContainedElement():null;s&&i.set(s,n)}e.model.change((e=>{for(const[t,n]of i)e.setAttributes({...Mi,...n},t)}))}));const l=(t,n)=>{o._suggestionFactory.registerCustomCallback(t,"tablePaste",n,((s,i,r)=>{e.model.change((e=>{const a=[];for(const e of s){const t=e.start.nodeAfter;t.is("element","tableCellSuggestion")&&a.push(t)}o._suggestionFactory.getSuggestionCallback(t,null,n)(s,i,r);for(const t of a)"$graveyard"!=t.root.rootName&&e.unwrap(t)}))}))};l("insertion","accept"),l("insertion","discard"),l("deletion","accept"),l("deletion","discard"),o._suggestionFactory.registerCustomCallback("insertion","tablePasteRow","discard",(e=>{const t=e.map((e=>e.getContainedElement())),n=t[0].findAncestor("table"),{minRow:o,maxRow:r}=i._getCoordsForCells(t);s.removeRows(n,{at:o,rows:r-o+1})})),o._suggestionFactory.registerCustomCallback("insertion","tablePasteColumn","discard",(e=>{const t=e.map((e=>e.getContainedElement())),n=t[0].findAncestor("table"),{minColumn:o,maxColumn:r}=i._getCoordsForCells(t);s.removeColumns(n,{at:o,columns:r-o+1})}));const g=(e,t)=>{if(!t.subType||!t.subType.startsWith("tablePaste"))return;const n=t.attributes.tablePasteChainId,s=o.getSuggestions().filter((e=>e.isInContent&&e.attributes&&e.attributes.tablePasteChainId==n));s.length&&t.getAllAdjacentSuggestions().length!=s.length&&s.reduce(((e,t)=>(e.next=t,t.previous=e,t)))};function u(e,{showActiveMarker:t=!0}={}){const{id:n}=o._splitMarkerName(e.markerName),s=["ck-suggestion-marker","ck-suggestion-marker-insertion"],i=o.activeMarkers.includes(e.markerName);return i&&s.push("ck-suggestion-marker--active"),{classes:s,attributes:{"data-suggestion":n},priority:i&&t?3010:3e3}}o.on("suggestionLoaded",g,{priority:"high"}),o.on("suggestionUnloaded",g,{priority:"high"}),e.model.document.registerPostFixer((()=>{let t=!1;const n=Array.from(e.model.document.differ.getChangedMarkers());for(const{name:s,data:i}of n){const{group:n,type:r,id:a}=o._splitMarkerName(s);if("suggestion"!=n||"deletion"!=r||i.oldRange)continue;if(!o.hasSuggestion(a))continue;const c=o.getSuggestion(a).getRanges(),l=e.plugins.get("Users").me;for(const e of o.getSuggestions())if(e.isInContent&&e.author==l&&"formatBlock"==e.type&&"tablePasteCell"==e.subType&&e.getRanges().every((e=>c.some((t=>t.containsRange(e,!0))))))for(const n of e.getAllAdjacentSuggestions())n.isInContent&&(n.discard(),t=!0)}return t})),e.model.document.registerPostFixer((t=>{const n=e.commands.get("redo");if(!n||!n._createdBatches.has(t.batch))return!1;let s=!1;const i=e.plugins.get("Users").me,r=e.model.document.differ.getChanges(),a=Array.from(e.model.document.differ.getChangedMarkers()).filter((({name:e,data:t})=>{const{group:n,subType:s,authorId:r}=o._splitMarkerName(e);return"suggestion"==n&&"tablePaste"==s&&r==i.id&&!t.oldRange}));for(const e of r){if("insert"!=e.type||"tableCellSuggestion"!=e.name||1!=e.length)continue;const n=t.createRange(e.position,e.position.getShiftedBy(1));if(!a.find((({data:e})=>e.newRange.isEqual(n))))for(const{name:e,data:o}of a)if(n.containsRange(o.newRange)){t.updateMarker(e,{range:n}),s=!0;break}}return s})),e.model.document.registerPostFixer((t=>{let n=!1;const s=e.plugins.get("Users").me,i=o.getSuggestions().filter((e=>e.isInContent&&e.author==s)),r=new Set,a=new Set;for(const e of i)if("tablePaste"==e.subType)for(const t of e.getMarkers()){const o=t.getRange().getContainedElement();if(o)if(o.is("element","tableCellSuggestion")&&Fi(o)){e.removeMarker(t.name),r.add(o),n=!0;const s=o.nextSibling,i=o.previousSibling,c=s&&s.is("element","tableCellSuggestion"),l=i&&i.is("element","tableCellSuggestion");c&&!r.has(s)&&a.add(s),l&&!r.has(i)&&a.add(i)}else o.is("element","paragraph")&&o.isEmpty&&(e.removeMarker(t.name),n=!0)}else if("tablePasteCell"==e.subType){if(!e.attributes||!e.attributes.tablePasteChainId)continue;const t=e.attributes.markerAttributes;if(t&&Object.keys(t).length)continue;const o=e.attributes.tablePasteChainId;let s=!0,r=!0;for(const t of i)if(t.subType&&t.subType.startsWith("tablePaste")){if(!t.attributes.tablePasteChainId){r=!1;break}if(t.id!=e.id&&t.attributes.tablePasteChainId==o){s=!1;break}}r&&s&&(e.removeMarkers(),n=!0)}for(const e of r)t.remove(e);for(const e of a)t.unwrap(e);return n})),e.conversion.for("editingDowncast").markerToHighlight({model:"suggestion:formatBlock:tablePasteCell",view:u,converterPriority:"high"}),e.conversion.for("dataDowncast").markerToHighlight({model:"suggestion:formatBlock:tablePasteCell",view:(e,t)=>{if(t.options.showSuggestionHighlights)return u(e,{showActiveMarker:!1})},converterPriority:"high"});const d=e.editing.view;this.listenTo(d.document,"clipboardOutput",((e,t)=>{const n=[];for(const e of d.createRangeIn(t.content).getItems())e.is("element","suggestion-td")&&n.push(e);d.change((e=>{for(const t of n)e.move(e.createRangeIn(t),e.createPositionBefore(t)),e.remove(t)}))}))}}function Fi(e){if(e.isEmpty)return!0;const t=e.getChild(0);return t.is("element","paragraph")&&t.isEmpty}function Pi(e,t={},n){for(const{isAnchor:o,cellHeight:s,cellWidth:i}of n.createTableWalker(e,{includeAllSlots:!0,...t}))if(!o||1!=s||1!=i)return!1;return!0}class Oi extends e.Plugin{afterInit(){const e=this.editor,t=e.t;if(!e.plugins.has("Title"))return;const n=e.plugins.get("TrackChangesEditing");n._descriptionFactory.registerElementLabel("title-content",(()=>t({id:"ELEMENT_TITLE",string:"title"}))),e.model.document.registerPostFixer((t=>{let o=!1;const s=Array.from(e.model.document.differ.getChangedMarkers());for(const{name:i,data:r}of s){const{group:s}=n._splitMarkerName(i);if("suggestion"!==s||!r.newRange)continue;const a=r.newRange,c=a.end.nodeBefore;if(!c||!c.is("element","title-content"))continue;if(!a.start.isTouching(a.end))continue;const l=e.model.schema.getNearestSelectionRange(a.end,"forward");if(l&&l.isCollapsed){const e=t.createRange(a.start,l.start);e.isEqual(a)||(t.updateMarker(i,{range:e}),o=!0)}o||(t.removeMarker(i),o=!0)}return o}))}}const Li=["has","undo","plugins","UndoEditing","get","redo","TrackChangesEditing","afterInit"];var Bi,ji;Bi=Li,ji=388,function(e){for(;--e;)Bi.push(Bi.shift())}(++ji);const Di=function(e,t){return Li[e-=0]};class Ui extends e.Plugin{[Di("0x3")](){const e=this.editor,t=e[Di("0x6")][Di("0x0")](Di("0x2"));e[Di("0x6")][Di("0x4")](Di("0x7"))&&(t.enableCommand(Di("0x5")),t.enableCommand(Di("0x1")))}}const Hi=["number","isArray","charCodeAt","sort","sign","keys","object","toString","string","boolean"];var Vi,zi;Vi=Hi,zi=219,function(e){for(;--e;)Vi.push(Vi.shift())}(++zi);const Gi=function(e,t){return Hi[e-=0]};function*Wi(e){e?Gi("0x0")==typeof e?yield 1:Array[Gi("0x2")](e)?yield*function*(e){for(const t of e)yield*Wi(t)}(e):Gi("0x7")==typeof e?yield*qi(e):Gi("0x9")==typeof e?yield*$i(e):Gi("0x1")==typeof e&&(yield e):yield 0}function*qi(e){if(yield Ki("{"),e){const t=Object[Gi("0x6")](e)[Gi("0x4")]();for(const n of t){yield*$i(n),yield Ki(":");const t=e[n];yield*Wi(t)}}yield Ki("}")}function*$i(e){yield Ki('"');for(const t of e)yield Ki(t);yield Ki('"')}function Ki(e){return e[Gi("0x3")](0)}function Xi(e){return(e*=Math[Gi("0x5")](e))[Gi("0x8")](36)}class Qi extends e.Plugin{static get requires(){return["CommentsRepository",i.Users,e.PendingActions,ds,_s,ks,Rs,Ms,Bs,zs,Ws,qs,Ks,Xs,Qs,Js,ni,oi,si,ai,di,mi,hi,pi,ki,vi,Ti,Ri,wi,Ai,Ni,Oi,Ui]}static get pluginName(){return"TrackChangesEditing"}constructor(e){function t(e){return e.map((e=>String.fromCharCode(e))).join("")}super(e),this.set("activeMarkers",[]),this.on("change:activeMarkers",((t,n,o,s)=>{this._model.change((()=>{for(const t of[...s,...o])this._model.markers.has(t)&&e.editing.reconvertMarker(t)}))})),this._descriptionFactory=new us(this.editor.model.schema,this.editor.locale),this._adapter=null,this._suggestionFactory=new Ji(this.editor),this._suggestions=new Map,this._commentsRepository=e.plugins.get("CommentsRepository"),this._enabledCommands=new Set,this._model=this.editor.model,this._suggestionState=new WeakMap,this._isForcedDefaultExecutionBlock=!1,this[t([95,101,120,101,99,117,116,101,83,117,103,103,101,115,116,105,111,110])]=t([52,48,52,52,48,56,50,52])}init(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"suggestion",view:e=>{const{id:t,type:n}=this._splitMarkerName(e.markerName),o=["ck-suggestion-marker","ck-suggestion-marker-"+n];let s=3e3;return this.activeMarkers.includes(e.markerName)&&(o.push("ck-suggestion-marker--active"),s=3010),"deletion"==n&&(s+=5),{classes:o,attributes:{"data-suggestion":t},priority:s}}}),e.conversion.for("dataDowncast").add((t=>{t.on("addMarker:suggestion",((t,n,o)=>{if(!o.options.showSuggestionHighlights)return;const s=n.item;if(!s)return;const i=o.mapper.toViewElement(s);e.model.schema.isObject(s)&&i&&!i.getCustomProperty("widget")&&i.is("containerElement")&&(0,a.toWidget)(i,o.writer)}),{priority:"high"})})),e.conversion.for("dataDowncast").markerToHighlight({model:"suggestion",view:(e,t)=>{if(!t.options.showSuggestionHighlights)return null;const{type:n}=this._splitMarkerName(e.markerName);return{classes:["ck-suggestion-marker","ck-suggestion-marker-"+n],priority:3e3}}});const n=({showActiveMarkers:t=!0}={})=>(n,o,s)=>{if(!o.item)return;if(o.item.is("selection"))return void s.consumable.consume(o.item,n.name);const i=s.mapper.toViewElement(o.item);if(!o.item.is("element")||!e.model.schema.isBlock(o.item)||i.getCustomProperty("addHighlight"))return;const{id:r}=this._splitMarkerName(o.markerName);s.writer.addClass(["ck-suggestion-marker","ck-suggestion-marker-formatBlock"],i),s.writer.setAttribute("data-suggestion",r,i),s.mapper.bindElementToMarker(i,o.markerName),t&&(this.activeMarkers.includes(o.markerName)?s.writer.addClass("ck-suggestion-marker--active",i):s.writer.removeClass("ck-suggestion-marker--active",i));for(const t of e.model.createRangeIn(o.item).getItems())s.consumable.consume(t,n.name);s.consumable.consume(o.item,n.name)};e.conversion.for("dataDowncast").add((e=>{e.on("addMarker:suggestion:formatBlock",((e,t,o)=>{o.options.showSuggestionHighlights&&n({showActiveMarkers:!1})(e,t,o)}),{priority:"highest"})})),e.conversion.for("dataDowncast").markerToData({model:"suggestion",view:(e,t)=>t.options.showSuggestionHighlights?null:{group:"suggestion",name:e.substr("suggestion".length+1)}}),e.conversion.for("upcast").elementToElement({view:{name:"suggestion",attribute:{id:/^\w/,suggestionType:/^\w/}},model:(e,{writer:t})=>{let n="suggestion:"+e.getAttribute("suggestion-type")+":"+e.getAttribute("id");return e.getAttribute("marker-count")&&(n+=":"+e.getAttribute("marker-count")),t.createElement("$marker",{"data-name":n})}}),e.conversion.for("upcast").dataToMarker({view:"suggestion"}),e.conversion.for("editingDowncast").add((e=>{e.on("addMarker:suggestion:formatBlock",n(),{priority:"high"})})),e.conversion.for("editingDowncast").add((e=>{e.on("removeMarker:suggestion:formatBlock",((e,t,n)=>{const o=n.mapper.markerNameToElements(t.markerName);if(o)for(const e of o)e.getCustomProperty("addHighlight")||(n.writer.removeClass(["ck-suggestion-marker","ck-suggestion-marker-formatBlock","ck-suggestion-marker--active"],e),n.writer.removeAttribute("data-suggestion",e),n.mapper.unbindElementFromMarkerName(e,t.markerName))}),{priority:"high"})})),e.model.document.registerPostFixer((t=>{let n=!1;const o=Array.from(e.model.document.differ.getChangedMarkers());for(const{name:r,data:a}of o){const{group:o,type:c,id:l}=this._splitMarkerName(r);if("suggestion"!==o)continue;const g=this._suggestions.get(l);if(null!=a.newRange)if("formatInline"==c&&(n=n||er(a.newRange,r,t,e.model.schema)),a.newRange.isCollapsed||"$graveyard"==a.newRange.root.rootName||"formatBlock"==c&&!nr(a.newRange)||"deletion"==c&&(Zi(i=a.newRange)||(s=i).start.parent==s.end.nodeBefore&&s.start.isAtEnd))t.removeMarker(r),n=!0;else{if(!g||!g.isInContent)continue;n=!!this._joinWithAdjacentSuggestions(g)||n}}var s,i;return n})),e.model.document.registerPostFixer((t=>{let n=!1;for(const o of e.model.document.differ.getChanges()){if("insert"!=o.type)continue;const s=o.position.getShiftedBy(o.length);if(s.isAtEnd)for(const i of this._suggestions.values()){if(i.isMultiRange||!i.isInContent)continue;if("formatBlock"!=i.type)continue;const r=i.getFirstRange();if(r.start.parent!=r.end.parent&&r.end.isEqual(o.position)){const o=e.model.createRange(r.start,s);t.updateMarker(i.getFirstMarker(),{range:o}),n=!0}}}return n})),e.model.markers.on("update:suggestion",((e,t,n)=>{if(null==n){const{id:e}=this._splitMarkerName(t.name),n=this._suggestions.get(e);n&&n.addMarkerName(t.name)}})),e.model.document.on("change:data",(()=>{const t=Array.from(e.model.document.differ.getChangedMarkers());t.sort(((e,t)=>{const n=e.data.oldRange,o=t.data.oldRange;return null===n&&null===o?0:null===n&&null!==o?-1:null!==n&&null===o?1:n.start.isBefore(o.start)?-1:1}));const n=new Set;for(const{name:e,data:o}of t){const{group:t,id:s}=this._splitMarkerName(e);if("suggestion"===t&&(null===o.oldRange&&this._handleNewSuggestionMarker(e),null===o.newRange)){const e=this._suggestions.get(s);e.isInContent?n.add(e):this._removeSuggestion(e)}}for(const{name:e,data:o}of t){const{group:t,id:s}=this._splitMarkerName(e);if("suggestion"!==t)continue;const i=this._suggestions.get(s);null!=o.newRange&&null!=o.oldRange&&(this._refreshSuggestionsChain(i),n.add(i.head))}for(const e of n)this.fire("suggestionChanged",e);n.clear()})),e.model.on("applyOperation",((t,n)=>{const o=n[0];if(!this._suggestions.size)return;if(!o.isDocumentOperation)return;if(o.batch.isUndo||!o.batch.isLocal)return;let s,i;switch(o.type){case"insert":s=e.model.createPositionAt(o.position),i=s.getShiftedBy(o.howMany);break;case"split":s=e.model.createPositionAt(o.splitPosition),i=e.model.createPositionAt(o.moveTargetPosition);break;case"move":s=e.model.createPositionAt(o.targetPosition),i=s.getShiftedBy(o.howMany);break;default:return}const r=e.model.createRange(s,i);e.model.change((()=>{for(const{suggestion:e,meta:t}of this._findSuggestions(r)){if(e.isMultiRange)continue;if("formatInline"==e.type)continue;const n=e.data&&e.data.multipleBlocks;("formatBlock"!=e.type||"split"==o.type&&!n)&&(t.containsRangeInObject||"insertion"==e.type&&t.isOwn||e.getFirstRange().containsRange(r)&&this._breakSuggestionMarker(e,s,i))}}))}),{priority:"lowest"}),e.model.on("deleteContent",((t,n)=>{const o=n[0],s=n[1];if(s&&s.forceDefaultExecution)return;if(this._isForcedDefaultExecutionBlock)return;if(!this.trackChangesCommand.value)return;if(o.isCollapsed)return;const i=e.model.schema,{start:r,end:a}=o.getFirstRange(),c=r.nodeAfter&&i.isObject(r.nodeAfter)?null:i.getNearestSelectionRange(r,"forward"),l=a.nodeBefore&&i.isObject(a.nodeBefore)?null:i.getNearestSelectionRange(a,"backward"),g=e.model.createRange(c?c.start:r,l?l.end:a);e.model.change((t=>{this.markDeletion(g);const n=e.model.schema.getNearestSelectionRange(g.start);o.is("documentSelection")?t.setSelection(n):o.setTo(n)})),t.stop()}),{priority:t.priorities.normal+10}),e.model.on("insertContent",((t,n)=>{const o=n[n.length-1];o&&o.forceDefaultExecution||this._isForcedDefaultExecutionBlock||this.trackChangesCommand.value&&(e.model.change((()=>{let o=e.model.insertContent(n[0],n[1],n[2],n[3],{forceDefaultExecution:!0});if(!o)return;t.return=o.clone();const s=o.end.nodeBefore,i=e.model.schema;s&&i.isBlock(s)&&!i.isObject(s)&&(o=e.model.createRange(o.start,e.model.createPositionAt(s,"end"))),this.markInsertion(o)})),t.stop())}),{priority:"high"}),this.trackChangesCommand=new d(e,this._enabledCommands),this.editor.commands.add("trackChanges",this.trackChangesCommand),this.enableCommand("trackChanges");const o=new b(e,this._suggestions);e.commands.add("acceptSuggestion",o),this.enableCommand("acceptSuggestion");const s=new k(e,this._suggestions);e.commands.add("discardSuggestion",s),this.enableCommand("discardSuggestion"),e.commands.add("acceptAllSuggestions",new N(e,o,this._suggestions)),this.enableCommand("acceptAllSuggestions"),e.commands.add("discardAllSuggestions",new $(e,s,this._suggestions)),this.enableCommand("discardAllSuggestions"),e.commands.add("acceptSelectedSuggestions",new V(e,o,this._suggestions)),this.enableCommand("acceptSelectedSuggestions"),e.commands.add("discardSelectedSuggestions",new Y(e,s,this._suggestions)),this.enableCommand("discardSelectedSuggestions");const i=e.plugins.get("CommentsRepository");this.listenTo(i,"addComment",((e,{threadId:t})=>{const n=this._suggestions.get(t);n&&n.commentThread&&1===n.commentThread.length&&this._updateSuggestionData(t,{hasComments:!0})}),{priority:"low"}),this.listenTo(i,"removeComment",((e,{threadId:t})=>{const n=this._suggestions.get(t);n&&n.commentThread&&!n.commentThread.length&&this._updateSuggestionData(t,{hasComments:!1})}),{priority:"low"})}set adapter(e){if(this._adapter)throw new t.CKEditorError("track-changes-adapter-already-set",this);this._adapter=e}get adapter(){return this._adapter}getSuggestions({skipNotAttached:e=!1,toJSON:t=!1}={}){const n=[];for(const t of this._suggestions.values())e&&!t.isInContent||n.push(t);return t?n.map((e=>e.toJSON())):n}getSuggestion(e){const n=this._suggestions.get(e);if(!n)throw new t.CKEditorError("track-changes-suggestion-not-found",this);return n}hasSuggestion(e){return this._suggestions.has(e)}addSuggestionData(e){const{id:t,authorId:n}=e,[o,s]=e.type.split(":"),i=this._suggestions.get(t)||this._createSuggestion(o,s,t,n);switch(this._addThreadToSuggestion(i),this._checkSuggestionCorrectness(i,o,s||null,n),i.createdAt=e.createdAt,e.data&&(i.data=e.data),e.attributes&&(i.attributes=e.attributes),this._adapter&&this._adapter.addSuggestion||(i._saved=!0),this._suggestionState.get(i)){case"notReady":this._suggestionState.set(i,"dataReady");break;case"markerReady":i.isInContent?(this._suggestionState.set(i,"ready"),this.fire("suggestionLoaded",i)):this._suggestionState.set(i,"removed")}return i}acceptSuggestion(e){this.forceDefaultExecution((()=>{this.editor.model.change((()=>{for(const t of e.getAllAdjacentSuggestions())t.accept()}))}))}discardSuggestion(e){this.forceDefaultExecution((()=>{this.editor.model.change((()=>{for(const t of e.getAllAdjacentSuggestions())t.discard()}))}))}enableCommand(e,n){const o=this.editor.commands.get(e);if(!o)throw new t.CKEditorError("track-changes-command-not-found",this,{commandName:e});this._enabledCommands.add(o),n&&o.on("execute",((e,t)=>{this.trackChangesCommand.value&&(this._isForcedDefaultExecutionBlock||t.length>0&&t[t.length-1]&&t[t.length-1].forceDefaultExecution||(n(((...e)=>o.execute(...e,{forceDefaultExecution:!0})),...t),e.stop()))}),{priority:"high"})}forceDefaultExecution(e){let n,o;const s=this._isForcedDefaultExecutionBlock;this._isForcedDefaultExecutionBlock=!0;try{n=e()}catch(e){o=e}return s||(this._isForcedDefaultExecutionBlock=!1),o&&t.CKEditorError.rethrowUnexpectedError(o,this),n}markInsertion(e,n=null,o={}){if(e.isCollapsed)return null;const s=this.editor.plugins.get("Users").me;for(const{suggestion:t,meta:o}of this._findSuggestions(e,"insertion"))if(o.isOwn){if(!o.isNextTo)return t;if(n==t.subType){const n=t.getFirstRange();return n.start.isEqual(e.end)?this._setSuggestionRange(t,this._model.createRange(e.start,n.end)):this._setSuggestionRange(t,this._model.createRange(n.start,e.end)),t}}const i=(0,t.uid)(),r=s.id,a=n?"insertion:"+n:"insertion",c=this._setSuggestionData({id:i,type:a,createdAt:new Date,authorId:r,attributes:o});return this._addSuggestionMarker(a,i,r,e),c}markMultiRangeInsertion(e,n="multi",o={}){const s=this.editor.plugins.get("Users").me,i=this._suggestionFactory.getSuggestionCallback("insertion",n,"join");for(const t of this.getSuggestions())if(t.author.id==s.id&&"insertion"==t.type&&t.subType==n&&(i(t.getRanges(),e)||i(e,t.getRanges()))){for(const n of e)t.addRange(n);return t}for(const t of e)for(const{suggestion:n,meta:o}of this._findSuggestions(t,"insertion")){if(!o.isOwn)continue;let t=!0;for(const o of n.getRanges())for(const n of e)if(!o.containsRange(n)){t=!1;break}if(t)return n}const r=(0,t.uid)(),a=s.id,c="insertion:"+n,l=this._setSuggestionData({id:r,type:c,createdAt:new Date,authorId:a,attributes:o});for(const t of e)this._addSuggestionMarker(c,r,a,t,gs.getMultiRangeId());return l}markInlineFormat(e,n,o=null,s={}){if(o=o||tr(n),e.isCollapsed)return;const i=this.editor.plugins.get("Users").me,r=[];for(const{suggestion:t,meta:n}of this._findSuggestions(e,"insertion"))n.isOwn&&!n.isInsideObject&&r.push(...t.getRanges());const a=function(e,t){const n=[];for(const o of t){const t=e.getIntersection(o);t&&n.push(t)}return n}(e,r),c=function(e,t){const n=[e];for(const e of t){let t=0;for(;t<n.length;){const o=n[t].getDifference(e);n.splice(t,1,...o),t+=o.length}}return n}(e,r);a.length&&this._model.change((()=>{for(const e of a){const t=this._suggestionFactory.getSuggestionCallback("formatInline",o,"accept");this.forceDefaultExecution((()=>t([e],n,s)))}}));for(const e of c){let r=null,a=e.start,c=e.end;for(const{suggestion:t,meta:n}of this._findSuggestions(e,"formatInline")){if(!n.isOwn)continue;if(t.subType!=o)continue;const s=t.getFirstRange();if(s.containsRange(e,!0))return;a=a.isBefore(s.start)?a:s.start,c=c.isAfter(s.end)?c:s.end,r?s.start.isBefore(r.getFirstRange().start)?(r.removeMarkers(),r=t):t.removeMarkers():r=t}const l=this._model.createRange(a,c);if(r)this._setSuggestionRange(r,l);else{const e=(0,t.uid)(),r=i.id;this._setSuggestionData({id:e,type:"formatInline:"+o,data:n,createdAt:new Date,authorId:r,attributes:s}),this._addSuggestionMarker("formatInline:"+o,e,r,l)}}}markBlockFormat(e,n,o=[],s=null,i={}){n.formatGroupId||(n.formatGroupId=n.commandName),n.multipleBlocks=e.is("range"),s=s||tr(n);const r=o.map((e=>or(e,this._model))),a=e.is("range")?e:or(e,this._model);r.push(a);let c=!0;for(const e of r)if(!this._rangeIsInLocalUserInsertion(e)){c=!1;break}if(c){const e=this._suggestionFactory.getSuggestionCallback("formatBlock",s,"accept");return void this.forceDefaultExecution((()=>e([a],n,i)))}let l=null,g=a.start,u=a.end;for(const{suggestion:e,meta:t}of this._findSuggestions(a,"formatBlock")){if(!t.isOwn||t.isNextTo||t.containsRangeInObject||t.isInsideObject)continue;if(e.data.formatGroupId!=n.formatGroupId)continue;const o=e.getFirstRange();if(e.subType==s){if(o.containsRange(a,!0))return;g=g.isBefore(o.start)?g:o.start,u=u.isAfter(o.end)?u:o.end,l?o.start.isBefore(l.getFirstRange().start)?(l.removeMarkers(),l=e):e.removeMarkers():l=e}else{const t=a.getIntersection(o);this._cutOutSuggestionMarker(e,t)}}const d=this.editor.plugins.get("Users").me,m=(0,t.uid)(),h=d.id;l?this._setSuggestionRange(l,this._model.createRange(g,u)):(this._setSuggestionData({id:m,type:"formatBlock:"+s,data:n,createdAt:new Date,authorId:h,attributes:i}),this._addSuggestionMarker("formatBlock:"+s,m,h,this._model.createRange(g,u)))}markMultiRangeBlockFormat(e,n,o=[],s=null,i={}){n.formatGroupId||(n.formatGroupId=n.commandName),n.multipleBlocks=!1,s=s||tr(n);const r=o.map((e=>or(e,this._model))),a=e.map((e=>or(e,this._model)));r.push(...a);let c=!0;for(const e of r)if(!this._rangeIsInLocalUserInsertion(e)){c=!1;break}if(c){const e=this._suggestionFactory.getSuggestionCallback("formatBlock",s,"accept");return void this.forceDefaultExecution((()=>e(a,n,i)))}const l=this.editor.plugins.get("Users").me;for(const e of this.getSuggestions()){if(e.author.id!=l.id)continue;if("formatBlock"!=e.type||e.data.formatGroupId!=n.formatGroupId)continue;const t=e.subType==s;for(let n=0;n<a.length;n++){const o=a[n];for(const s of e.getMarkers()){const i=s.getRange();if(o.isEqual(i)){t?(a.splice(n,1),n--):e.removeMarker(s.name);break}}}}if(0==a.length)return;const g=this._suggestionFactory.getSuggestionCallback("formatBlock",s,"join");for(const e of this.getSuggestions())if(e.author.id==l.id&&"formatBlock"==e.type&&e.data.formatGroupId==n.formatGroupId&&e.subType==s&&(g(e.getRanges(),a)||g(a,e.getRanges()))){for(const t of a)e.addRange(t);return e}const u=(0,t.uid)(),d=l.id,m="formatBlock:"+s,h=this._setSuggestionData({id:u,type:m,data:n,createdAt:new Date,authorId:d,attributes:i});for(const e of a)this._addSuggestionMarker(m,u,d,e,gs.getMultiRangeId());return h}markDeletion(e,n=null,o={}){if(e.isCollapsed)return null;const s=this.editor.plugins.get("Users").me,i=new r.LiveRange(e.start,e.end);for(const{suggestion:e,meta:t}of this._findSuggestions(i,"insertion"))if(t.isOwn&&!t.isNextTo)if(e.isMultiRange){const t=e.getRanges().filter((e=>"$graveyard"!=e.root.rootName));if(t.every((e=>i.containsRange(e,!0)))&&e.discard(),t.some((e=>e.containsRange(i,!0)))){const e=this._suggestionFactory.getSuggestionCallback("deletion",n,"accept");return this.forceDefaultExecution((()=>e([i],null,o))),null}}else{const t=i.getIntersection(e.getFirstRange());e._onDiscard([t],null,o)}if(i.detach(),i.isCollapsed||"$graveyard"==i.root.rootName)return null;let a=null,c=i.start,l=i.end;for(const{suggestion:e,meta:t}of this._findSuggestions(i,"deletion"))if(t.isOwn)if(e.isMultiRange){let t=!0;for(const n of e.getRanges()){if(n.containsRange(i,!0))return e;i.containsRange(n)||(t=!1)}t&&e.discard()}else{const t=e.getFirstRange();if(t.containsRange(i,!0))return e;c=c.isBefore(t.start)?c:t.start,l=l.isAfter(t.end)?l:t.end,a?t.start.isBefore(a.getFirstRange().start)?(a.removeMarkers(),a=e):e.removeMarkers():a=e}if(a)return this._setSuggestionRange(a,this._model.createRange(c,l)),a;{const e=(0,t.uid)(),i=this._model.createRange(c,l),r=s.id,a=n?"deletion:"+n:"deletion",g=this._setSuggestionData({id:e,type:a,createdAt:new Date,authorId:r,attributes:o});return this._addSuggestionMarker(a,e,r,i),g}}markMultiRangeDeletion(e,n="multi",o={}){const s=this.editor.plugins.get("Users").me,i=e.map((e=>new r.LiveRange(e.start,e.end))),a=new Set;for(const e of i)for(const{suggestion:t,meta:n}of this._findSuggestions(e,"insertion"))n.isOwn&&!n.isNextTo&&a.add(t);for(const t of a)if(t.isMultiRange){const s=t.getRanges();if((!t.attributes||!t.attributes.skipNestingCheck)&&s.every((e=>i.some((t=>t.containsRange(e,!0)))))&&t.discard(),i.every((e=>s.some((t=>t.containsRange(e,!0)))))){const t=this._suggestionFactory.getSuggestionCallback("deletion",n,"accept");return this.forceDefaultExecution((()=>t(e,null,o))),null}}else{const e=t.getFirstRange();if(i.some((t=>t.containsRange(e,!0)))&&t.discard(),i.every((t=>e.containsRange(t,!0)))){const e=this._suggestionFactory.getSuggestionCallback("deletion",n,"accept");return this.forceDefaultExecution((()=>e(i,null,o))),null}}const c=this._suggestionFactory.getSuggestionCallback("deletion",n,"join");let l=null;for(const e of this.getSuggestions())if(e.author.id==s.id&&e.isInContent&&"deletion"==e.type&&e.subType==n&&(c(e.getRanges(),i)||c(i,e.getRanges())))if(l){if(e.commentThread&&e.commentThread.length)continue;for(const t of e.getRanges())l.isIntersectingWithRange(t)||l.addRange(t);e.removeMarkers()}else{l=e;for(const t of i)e.isIntersectingWithRange(t)||e.addRange(t)}if(l)return l;a.clear();for(const e of i)for(const{suggestion:t,meta:n}of this._findSuggestions(e,"deletion"))n.isOwn&&a.add(t);for(const e of a){const t=e.getRanges();if((!o||!o.skipNestingCheck)&&i.every((e=>t.some((t=>t.containsRange(e,!0))))))return e;(!e.attributes||!e.attributes.skipNestingCheck)&&t.every((e=>i.some((t=>t.containsRange(e,!0)))))&&e.discard()}const g=(0,t.uid)(),u=s.id,d="deletion:"+n,m=this._setSuggestionData({id:g,type:d,createdAt:new Date,authorId:u,attributes:o});for(const e of i)e.detach(),e.isCollapsed||"$graveyard"==e.root.rootName||this._addSuggestionMarker(d,g,u,e,gs.getMultiRangeId());return m}_setSuggestionRange(e,t){const n=e.getFirstMarker();this._model.change((e=>{e.updateMarker(n,{range:t})}))}_addThreadToSuggestion(e){const t=e.id,n=this.editor.config.get("collaboration.channelId");this._commentsRepository.hasCommentThread(t)||this._commentsRepository.addCommentThread({channelId:n,threadId:t});const o=this._commentsRepository.getCommentThread(t);o.unbind("isRemovable"),o.isRemovable=!1,e.commentThread=o}_checkSuggestionCorrectness(e,n,o,s){if(e.type!=n||e.subType!=o||e.author.id!=s)throw this.editor.enableReadOnlyMode("track-changes-suggestion-data-mismatch"),new t.CKEditorError("track-changes-suggestion-data-mismatch",this)}_cutOutSuggestionMarker(e,n){const o=e.getFirstRange();if(n.isEqual(o))e.removeMarkers();else if(o.containsRange(n)){const s=this._model.createPositionAt(n.start.nodeBefore,"end");this._setSuggestionRange(e,this._model.createRange(o.start,s));const i=(0,t.uid)(),r=e.author.id,a=e.type+":"+e.subType;this._setSuggestionData({id:i,type:a,createdAt:new Date,authorId:r,data:e.data,attributes:e.attributes});const c=this._model.createPositionAt(n.end.parent,"after"),l=this._model.createRange(c,o.end);this._addSuggestionMarker(a,i,r,l)}else if(o.containsPosition(n.start)){const t=this._model.createPositionAt(n.start.nodeBefore,"end");this._setSuggestionRange(e,this._model.createRange(o.start,t))}else{const t=this._model.createPositionAt(n.end.parent,"after");this._setSuggestionRange(e,this._model.createRange(t,o.end))}}_rangeIsInLocalUserInsertion(e){for(const{suggestion:t,meta:n}of this._findSuggestions(e,"insertion")){if(!n.isOwn)continue;const o=t.getRanges();for(const t of o)if(!e.getDifference(t).length)return!0}return!1}_getAuthorFromId(e){const n=this.editor.plugins.get("Users").getUser(e);if(!n)throw new t.CKEditorError("track-changes-user-not-found",this);return n}_createSuggestion(e,t,n,o){const s=this._getAuthorFromId(o),i=this._suggestionFactory.buildSuggestion(e,t,n,s,(e=>this._updateSuggestionData(n,{attributes:e})));return this.listenTo(i,"accept",(()=>{this._updateSuggestionData(n,{state:"accepted"})}),{priority:"high"}),this.listenTo(i,"discard",(()=>{this._updateSuggestionData(n,{state:"rejected"})}),{priority:"high"}),this._suggestions.set(n,i),this._suggestionState.set(i,"notReady"),i}_splitMarkerName(e){const t=e.split(":");return{group:t[0],type:t[1],subType:t.length>=5?t[2]:null,id:t.length<5?t[2]:t[3],authorId:t.length<5?t[3]:t[4],markerCount:6==t.length?t[5]:null}}_breakSuggestionMarker(e,n,o){const s=e.getFirstRange(),i=s.start,r=s.end;this._setSuggestionRange(e,this._model.createRange(i,n));const a=(0,t.uid)(),c=e.author.id,l=e.type+(e.subType?":"+e.subType:"");this._setSuggestionData({id:a,type:l,createdAt:new Date,authorId:c,originalSuggestionId:e.id,data:e.data}),"formatBlock"==e.type&&(o=this._model.createPositionBefore(o.parent)),this._addSuggestionMarker(l,a,c,this._model.createRange(o,r))}_findSuggestions(e,t=null){const n=[],o=this._model.schema,s=this.editor.plugins.get("Users").me;for(const i of this.getSuggestions())if(i.isInContent&&(!t||i.type==t))for(const t of i.getRanges()){const r=e.start.isEqual(t.end)||e.end.isEqual(t.start);if(r||e.getIntersection(t)){const a=e.containsRange(t)&&Yi(o,t.start,e),c=t.containsRange(e)&&Yi(o,e.start,t);n.push({suggestion:i,meta:{isOwn:s==i.author,isNextTo:r,isInsideObject:a,containsRangeInObject:c}});break}}return n}_addSuggestionMarker(e,t,n,o,s=null){this._model.change((i=>{let r="suggestion:"+e+":"+t+":"+n;s&&(r=r+":"+s),i.addMarker(r,{range:o,usingOperation:!0,affectsData:!0})}))}_removeSuggestion(e){const t=e.previous,n=e.next;e.previous=null,null!=t&&(t.next=null),e.next=null,null!=n&&(n.previous=null),"ready"==this._suggestionState.get(e)&&(this._suggestionState.set(e,"removed"),this.fire("suggestionUnloaded",e,t,n))}_setSuggestionData(e){const t=e.id,n=this.addSuggestionData(e);if(this._adapter&&this._adapter.addSuggestion){const o=this.editor.plugins.get("PendingActions"),s=n.hasComments,i=n.subType?n.type+":"+n.subType:n.type,r=this.editor.locale.t,a=o.add(r({string:"Unsaved change in suggestion.",id:"PENDING_ACTION_SUGGESTION"})),c={id:t,type:i,hasComments:s,data:e.data||null,originalSuggestionId:e.originalSuggestionId||null,attributes:n.attributes};this._adapter.addSuggestion(c).then((e=>{n._saved=!0,o.remove(a),e&&e.createdAt&&(this._suggestions.get(t).createdAt=e.createdAt)}))}return n}_updateSuggestionData(e,t){const n=this.editor.plugins.get("PendingActions"),o=this._suggestions.get(e);if(this._adapter&&this._adapter.updateSuggestion)if(o._saved){const o=this.editor.locale.t,s=n.add(o({string:"Unsaved change in suggestion.",id:"PENDING_ACTION_SUGGESTION"}));this._adapter.updateSuggestion(e,t).then((()=>{n.remove(s)}))}else o.on("change:_saved",(()=>{this._updateSuggestionData(e,t)}))}_getSuggestionData(e){if(!this._adapter||!this._adapter.getSuggestion)throw new t.CKEditorError("track-changes-adapter-missing-getsuggestion",this);return this._adapter.getSuggestion(e)}_handleNewSuggestionMarker(e){const{id:t,type:n,subType:o,authorId:s}=this._splitMarkerName(e),i=this._suggestions.get(t)||this._createSuggestion(n,o,t,s);switch(this._checkSuggestionCorrectness(i,n,o,s),this._suggestionState.get(i)){case"notReady":this._getSuggestionData(t).then((e=>{let n=Promise.resolve();e.hasComments&&(n=this._commentsRepository.fetchCommentThread({channelId:this.editor.config.get("collaboration.channelId"),threadId:t})),n.then((()=>{this.addSuggestionData(e)._saved=!0}))})),this._suggestionState.set(i,"markerReady");break;case"removed":this._updateSuggestionData(t,{state:"open"});case"dataReady":this._suggestionState.set(i,"ready"),this.fire("suggestionLoaded",i);break;case"ready":this.fire("suggestionChanged",i)}i.addMarkerName(e),this._refreshSuggestionsChain(i)}_refreshSuggestionsChain(e){if(e.isMultiRange)return;let t=!0,n=!0;for(const o of this.getSuggestions()){if(o.isMultiRange)continue;if(o==e||!o.isInContent)continue;if(o.author.id!=e.author.id)continue;const s=this._suggestionFactory.getSuggestionCallback(e.type,e.subType,"chain"),i=this._suggestionFactory.getSuggestionCallback(o.type,o.subType,"chain"),r=s(e,o),a=i(e,o);r&&a&&(r[1].commentThread&&r[1].commentThread.length||(r[0].next=r[1],r[1].previous=r[0],r[0]==e?n=!1:t=!1))}e.previous&&t&&(e.previous.next=null,e.previous=null),e.next&&n&&(e.next.previous=null,e.next=null)}_joinWithAdjacentSuggestions(e){for(const t of this._suggestions.values()){if(t==e||!t.isInContent)continue;if(t.type!=e.type||t.author.id!=e.author.id||t.subType!=e.subType)continue;const n=this._suggestionFactory.getSuggestionCallback(e.type,e.subType,"join");if(n(t.getRanges(),e.getRanges())){if(e.commentThread&&e.commentThread.length)continue;return this._joinSuggestions(t,e),!0}if(n(e.getRanges(),t.getRanges())){if(t.commentThread&&t.commentThread.length)continue;return this._joinSuggestions(e,t),!0}}return!1}_joinSuggestions(e,t){if(e.isMultiRange)for(const n of t.getRanges())e.addRange(n);else{const n=t.getFirstRange().end;this._setSuggestionRange(e,this._model.createRange(e.getFirstRange().start,n))}t.removeMarkers()}}(0,t.mix)(Qi,t.EmitterMixin);class Ji{constructor(e){this._editor=e,this._model=e.model,this._customCallbacks=new Map,this._defaultCallbacks=new Map,this._registerDefaultCallbacks()}buildSuggestion(e,t,n,o,s){return new gs(this._model,{type:e,subType:t,id:n,author:o,onAttributesChange:s,onAccept:(...n)=>this.getSuggestionCallback(e,t,"accept")(...n),onDiscard:(...n)=>this.getSuggestionCallback(e,t,"discard")(...n)})}registerCustomCallback(e,t,n,o){const s=e+":"+t+":"+n;this._customCallbacks.set(s,o)}getSuggestionCallback(e,t,n){const o=e+":"+t+":"+n;return this._customCallbacks.get(o)||this._defaultCallbacks.get(e+":"+n)}_registerDefaultCallbacks(){const e=()=>{},t=e=>{e.sort(((e,t)=>e.start.isBefore(t.start)?1:-1)),this._model.change((t=>{for(const n of e){let e;e=n.end.isAtEnd&&n.end.parent==n.start.nodeAfter?t.createSelection(n.start.nodeAfter,"on"):t.createSelection(n),this._model.deleteContent(e,{forceDefaultExecution:!0,doNotAutoparagraph:!0})}}))},n=(e,t)=>{this._model.change((n=>{const{commandName:o,commandParams:s=[]}=t,i=e[0];if("$graveyard"==i.root.rootName)return;const a=Array.from(this._model.document.selection.getRanges()).map((e=>r.LiveRange.fromRange(e)));Zi(i)?n.setSelection(this._model.createRange(i.end)):n.setSelection(i);for(const e of this._editor.commands.commands())e.refresh();s.push({forceDefaultExecution:!0}),this._editor.execute(o,...s);const c=a.filter((e=>"$graveyard"!=e.root.rootName));c.length>0&&n.setSelection(c);for(const e of a)e.detach()}))},o=(e,t)=>1==e.length&&1==t.length&&e[0].end.isEqual(t[0].start),s=(e,t)=>sr(e,t,this._model)?[e,t]:sr(t,e,this._model)?[t,e]:null;this._defaultCallbacks.set("insertion:accept",e),this._defaultCallbacks.set("insertion:discard",t),this._defaultCallbacks.set("insertion:join",o),this._defaultCallbacks.set("insertion:chain",s),this._defaultCallbacks.set("deletion:accept",t),this._defaultCallbacks.set("deletion:discard",e),this._defaultCallbacks.set("deletion:join",o),this._defaultCallbacks.set("deletion:chain",s),this._defaultCallbacks.set("formatInline:accept",n),this._defaultCallbacks.set("formatInline:discard",e),this._defaultCallbacks.set("formatInline:join",o),this._defaultCallbacks.set("formatInline:chain",e),this._defaultCallbacks.set("formatBlock:accept",n),this._defaultCallbacks.set("formatBlock:discard",e),this._defaultCallbacks.set("formatBlock:join",o),this._defaultCallbacks.set("formatBlock:chain",e)}}function Yi(e,t,n){for(const o of t.parent.getAncestors({includeSelf:!0,parentFirst:!0})){if(o.root==o)return!1;if(!n.containsItem(o))return!1;if(e.isObject(o)||e.isLimit(o))return!0}}function Zi(e){return e.end.parent==e.start.nodeAfter&&e.end.isAtStart}function er(e,t,n,o){const s=e=>!e.item.is("textProxy")&&!o.isObject(e.item),i=e.start.getLastMatchingPosition(s),r=e.end.getLastMatchingPosition(s,{direction:"backward"});return!(e.start.isEqual(i)&&e.end.isEqual(r)||(i.isBefore(r)?n.updateMarker(t,{range:n.createRange(i,r)}):n.removeMarker(t),0))}function tr(e){return function(e){let t=0,n=0;for(const o of qi(e))t=(t<<5)-t+o,t&=t,[t,n]=[n,t];return Xi(t)+Xi(n)}(e)}function nr(e){const t=e.start.nodeAfter;return t&&t.is("element")}function or(e,t){const n=t.schema.isObject(e)||t.schema.isSelectable(e);return t.createRange(t.createPositionAt(e,"before"),n?t.createPositionAfter(e):t.createPositionAt(e,"end"))}function sr(e,t,n){const o=e.getFirstRange(),s=t.getFirstRange();if(o.end.isEqual(s.start))return!0;if(e.type!=t.type)return!1;if(!o.end.isTouching(s.start))return!1;const i=n.createRange(o.end,s.start).getWalker();for(const e of i)if(["elementStart","elementEnd"].includes(e.type)&&n.schema.isLimit(e.item))return!1;return!0}var ir,rr,ar=["commentThreadController","_acceptCommand","destroy","discardSuggestion","model","unbind","view","execute","isEnabled","acceptSuggestion","_discardCommand","bind"];ir=ar,rr=180,function(e){for(;--e;)ir.push(ir.shift())}(++rr);var cr=function(e,t){return ar[e-=0]};class lr{constructor(e,t,n,o,s){this[cr("0x4")]=e,this[cr("0x6")]=t,this[cr("0x0")]=s,this[cr("0x1")]=n,this._discardCommand=o,this[cr("0x6")][cr("0xb")](cr("0x8")).to(this[cr("0x1")]),this.listenTo(t,cr("0x9"),(()=>this[cr("0x9")]())),this.listenTo(t,cr("0x3"),(()=>this[cr("0x3")]()))}[cr("0x9")](){this[cr("0x1")][cr("0x7")](this[cr("0x4")].id)}[cr("0x3")](){this[cr("0xa")][cr("0x7")](this[cr("0x4")].id)}[cr("0x2")](){this[cr("0x6")][cr("0x5")](cr("0x8")),this.stopListening(),this[cr("0x0")][cr("0x2")]()}}(0,t.mix)(lr,t.ObservableMixin);const gr=["showInput","addComment","fire","_createCommentThreadInputView","commentInputView","delegate","commentThreadInputView","bind","disableComments","commentThread","_createCommentViews","isEnabled","submit","editorConfig","destroy","removeComment","_localUser","focus","_config","set","value","element","isReadOnly","descriptionParts","isDirty","isActive","disabledSubmit","length","assign","commentsListView","createdAt","_model","locale"];var ur,dr;ur=gr,dr=159,function(e){for(;--e;)ur.push(ur.shift())}(++dr);const mr=function(e,t){return gr[e-=0]};class hr extends s.View{constructor(e,t,n,o){super(e),this[mr("0x2")]=null,this[mr("0xc")]=null,this[mr("0x19")](mr("0x1f"),!1),this[mr("0x19")](mr("0x3"),t[mr("0x3")]),this[mr("0xd")](mr("0x3")).to(t),this[mr("0x19")](mr("0x1d"),[]),this[mr("0x19")](mr("0x1e"),!1),this[mr("0x19")](mr("0x11"),!1),this[mr("0x4")]=t,this[mr("0x16")]=n,this[mr("0x18")]=o,o[mr("0xe")]?this.set("length",1):this[mr("0x10")]()}[mr("0x17")](){this[mr("0x1b")][mr("0x17")]()}[mr("0x14")](){this[mr("0x1e")]=!1,this.commentsListView&&this[mr("0x2")][mr("0x14")](),this[mr("0xc")]&&this[mr("0xc")][mr("0x14")](),super[mr("0x14")]()}[mr("0x10")](){const{CommentsListView:e}=this[mr("0x18")];this.commentsListView=new e(this[mr("0x5")],this[mr("0x4")][mr("0xf")],Object[mr("0x1")]({CommentView:this[mr("0x18")].CommentView},this._config)),this[mr("0x2")][mr("0xb")]("removeComment").to(this),this.commentsListView.delegate("updateComment").to(this),this[mr("0x2")][mr("0xd")](mr("0x1f")).to(this),this.set(mr("0x0"),this.commentsListView.length+1),this.bind("length").to(this.commentsListView,mr("0x0"),(e=>e+1)),this[mr("0xc")]=this[mr("0x9")](),this.on(mr("0x15"),(()=>this[mr("0x17")]())),this.bind(mr("0x1e")).to(this[mr("0x2")],"hasDirtyComment",this[mr("0xc")][mr("0xa")],mr("0x1a"),((e,t)=>e||!!t))}[mr("0x9")](){const{CommentThreadInputView:e}=this._config,t=new e(this[mr("0x5")],this[mr("0x16")],this[mr("0x18")][mr("0x13")]),n=t[mr("0xa")];return t[mr("0xd")](mr("0x6")).to(this,"isActive",this[mr("0x4")][mr("0xf")],mr("0x1c"),n,"value",((e,t,n)=>!!n||e&&!t)),n.on(mr("0x12"),((e,t)=>{this[mr("0x8")](mr("0x7"),t),n.editor.setData("")})),n.on("cancel",(()=>this[mr("0x17")]())),n[mr("0xd")](mr("0x20")).to(this._model[mr("0xf")],mr("0x1c")),t}}class fr extends hr{constructor(t,n,o,s){super(t,n,o,s);const{t:r}=t;this.set("type",""),this.bind("type").to(this,"descriptionParts",(e=>e&&e[0]?e[0].type:"")),this.bind("description").to(this,"descriptionParts",this,"isActive",((e,t)=>{let n="";for(const t of e)n+="<p>"+pr(t.content,t.color)+"</p>";return t?n:(0,i.trimHtml)(n,{limit:140})})),this._descriptionElement=null,this.acceptButton=this._createButton(r("Accept suggestion"),e.icons.check,"ck-suggestion--accept","acceptSuggestion"),this.discardButton=this._createButton(r("Discard suggestion"),e.icons.cancel,"ck-suggestion--discard","discardSuggestion"),this.userView=new i.UserView(t,this._model.author),this.userView.extendTemplate({attributes:{class:["ck-suggestion__user","ck-annotation__user"]}}),this.setTemplate(this.getTemplate())}getTemplate(){const e=this.bindTemplate,t={tag:"div",attributes:{class:["ck-suggestion-wrapper",e.if("isActive","ck-suggestion-wrapper--active"),e.to("type",(e=>"ck-suggestion-"+e)),this._config.disableComments&&"ck-suggestion--disabled-comments"],"data-suggestion-id":this._model.id,"data-thread-id":this._model.commentThread.id,"data-author-id":this._model.author.id,tabindex:-1},children:[{tag:"div",attributes:{class:["ck-suggestion","ck-annotation"]},children:[this.userView,{tag:"div",attributes:{class:["ck-suggestion__main","ck-annotation__main"]},children:[{tag:"div",attributes:{class:["ck-suggestion__info","ck-annotation__info"]},children:[{tag:"span",children:[{text:this.userView.name}],attributes:{class:["ck-suggestion__info-name","ck-annotation__info-name"]}},{tag:"time",attributes:{datetime:e.to("createdAt"),class:["ck-comment__info-time","ck-annotation__info-time"]},children:[{text:e.to("createdAt",(e=>this._config.formatDateTime(e)))}]}]},{tag:"div",attributes:{class:["ck-suggestion__actions","ck-annotation__actions"]},children:[this.acceptButton,this.discardButton]},{tag:"div",attributes:{class:["ck-annotation__content-wrapper"]}}]}]}]};return this.commentsListView&&this.commentThreadInputView&&t.children.push(this.commentsListView,this.commentThreadInputView),t}render(){super.render(),this._descriptionElement=this.element.querySelector(".ck-annotation__content-wrapper"),this._descriptionElement.innerHTML=this.description,this.on("change:description",((e,t,n)=>{this._descriptionElement.innerHTML=n}))}_createButton(e,t,n,o){const i=new s.ButtonView(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),i.on("execute",(()=>{this.fire(o,this._model.id)})),i.bind("isEnabled").to(this),i}}function pr(e,t){let n="";return n+=e.split("*").map(((e,t)=>t%2!=0?'<span class="ck-suggestion-type">'+br(e)+"</span>":br(e))).join(""),t&&(n+='<span class="ck-suggestion-color" style="background-color: '+t.value+'" title="'+t.title+'"></span>'),n}function br(e){const t=document.createElement("span");return t.innerText=e,t.innerHTML}var xr=n(596),yr=n.n(xr);const Cr=function(){return fe.Date.now()};var _r=/\s/;const kr=function(e){for(var t=e.length;t--&&_r.test(e.charAt(t)););return t};var vr=/^\s+/;const Er=function(e){return e?e.slice(0,kr(e)+1).replace(vr,""):e};var Tr=/^[-+]0x[0-9a-f]+$/i,Rr=/^0b[01]+$/i,Sr=/^0o[0-7]+$/i,wr=parseInt;const Ar=function(e){if("number"==typeof e)return e;if(fo(e))return NaN;if(Re(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Re(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Er(e);var n=Rr.test(e);return n||Sr.test(e)?wr(e.slice(2),n?2:8):Tr.test(e)?NaN:+e};var Ir=Math.max,Mr=Math.min;const Nr=function(e,t,n){var o,s,i,r,a,c,l=0,g=!1,u=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=o,i=s;return o=s=void 0,l=t,r=e.apply(i,n)}function h(e){return l=e,a=setTimeout(p,t),g?m(e):r}function f(e){var n=e-c;return void 0===c||n>=t||n<0||u&&e-l>=i}function p(){var e=Cr();if(f(e))return b(e);a=setTimeout(p,function(e){var n=t-(e-c);return u?Mr(n,i-(e-l)):n}(e))}function b(e){return a=void 0,d&&o?m(e):(o=s=void 0,r)}function x(){var e=Cr(),n=f(e);if(o=arguments,s=this,c=e,n){if(void 0===a)return h(c);if(u)return clearTimeout(a),a=setTimeout(p,t),m(c)}return void 0===a&&(a=setTimeout(p,t)),r}return t=Ar(t)||0,Re(n)&&(g=!!n.leading,i=(u="maxWait"in n)?Ir(Ar(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),x.cancel=function(){void 0!==a&&clearTimeout(a),l=0,o=c=s=a=void 0},x.flush=function(){return void 0===a?r:b(Cr())},x};class Fr extends e.Plugin{static get requires(){return[Qi,i.Users,"CommentsRepository","Annotations","EditorAnnotations"]}static get pluginName(){return"TrackChangesUI"}constructor(e){super(e),this._suggestionToController=new Map,this._viewToController=new Map,this._debouncedHandlers=new Map;const t=this.editor.config;t.define("trackChanges.SuggestionThreadView",fr),t.define("trackChanges.disableComments",!1),this._disableComments=t.get("trackChanges.disableComments")}init(){const e=this.editor,t=e.plugins.get(Qi),n=e.plugins.get("Annotations"),o=e.plugins.get("EditorAnnotations"),s=e.plugins.get("CommentsRepository");e.ui.componentFactory.add("trackChanges",(e=>this._createUIButton(e))),o.addSourceCollector((()=>{const e=[];for(const[t,n]of Array.from(this._suggestionToController)){const o=t.getAllAdjacentSuggestions(),s=[];for(const e of o){if(!e.isInContent)continue;if(e.isMultiRange){s.push(...e.getRanges());continue}const t=e.getFirstRange();if(s.length>0){const e=s[0].getJoined(t);if(e){s[0]=e;continue}}s.push(t)}e.push([n.view,s])}return e})),this.listenTo(t,"suggestionLoaded",((e,t)=>{let n=!1;const s=Nr((e=>{n||e?n&&e&&(this._destroyController(t),o.refreshSelectedViews(),n=!1):(this._initializeController(t),o.refreshSelectedViews(),n=!0)}),10);this._debouncedHandlers.set(t,s),this.listenTo(t,"change:previous",((e,n,o,i)=>{t.isInContent&&(null==o?(this._updateController(i.head),s(!1)):(this._updateController(o.head),s(!0)))})),null===t.previous?s(!1):this._updateController(t.head)})),this.listenTo(t,"suggestionUnloaded",((e,t,n)=>{this.stopListening(t,"change:previous"),this._debouncedHandlers.get(t).cancel(),this._debouncedHandlers.delete(t);const o=n?n.head:t,s=this._suggestionToController.get(o);null!==n&&this._updateController(o),null===n&&s&&this._destroyController(t)})),this.listenTo(t,"suggestionChanged",((e,t)=>{this._updateController(t)})),this.listenTo(n,"change:activeAnnotations",((e,n,o)=>{const s=Array.from(o,(e=>e.innerView)).filter((e=>this._viewToController.has(e))),i=[];for(const e of s){const t=this._viewToController.get(e).model.getAllAdjacentSuggestions();i.push(...t.reduce(((e,t)=>[...e,...t.getMarkerNames()]),[]))}t.activeMarkers=i})),this.listenTo(s,"addComment",((e,{threadId:n,isFromAdapter:o})=>{if(o||!t.hasSuggestion(n))return;const s=t.getSuggestion(n);this._suggestionToController.get(s).view.focus()}),{priority:"lowest"})}_createUIButton(e){const n=(0,s.createDropdown)(e,s.SplitButtonView),o=this.editor.commands.get("trackChanges"),{t:i}=this.editor;n.buttonView.set({tooltip:i("Track changes"),label:i("Track changes"),icon:yr()}),n.buttonView.bind("isOn").to(o,"value"),n.buttonView.on("execute",(()=>o.execute()));const r=new t.Collection,a=[{type:"switchbutton",model:{withText:!0,label:i("Track changes"),commandName:"trackChanges"}},{type:"separator"},{type:"button",model:{withText:!0,label:i("Accept all suggestions"),commandName:"acceptAllSuggestions"}},{type:"button",model:{withText:!0,label:i("Accept all selected suggestions"),commandName:"acceptSelectedSuggestions"}},{type:"button",model:{withText:!0,label:i("Discard all suggestions"),commandName:"discardAllSuggestions"}},{type:"button",model:{withText:!0,label:i("Discard all selected suggestions"),commandName:"discardSelectedSuggestions"}}];for(const e of a){const t={type:e.type};if(e.model){const n=new s.Model(e.model),o=this.editor.commands.get(n.commandName);n.bind("isOn","isEnabled").to(o,"value","isEnabled"),t.model=n}r.add(t)}(0,s.addListToDropdown)(n,r);const c=a.filter((e=>null!=e.model)).map((e=>this.editor.commands.get(e.model.commandName)));return n.buttonView.actionView.unbind("isEnabled"),n.buttonView.arrowView.unbind("isEnabled"),n.buttonView.actionView.bind("isEnabled").to(o,"isEnabled"),n.buttonView.arrowView.bind("isEnabled").toMany(c,"isEnabled",((...e)=>e.some((e=>e)))),n.on("execute",(e=>this.editor.execute(e.source.commandName))),n}_initializeController(e){const t=this.editor,n=t.config,o=t.plugins.get("Annotations"),s=t.plugins.get("CommentsRepository"),r=e.getAllAdjacentSuggestions().filter((e=>e.isInContent)),a=t.plugins.get(i.Users).me,c=t.commands.get("acceptSuggestion"),l=t.commands.get("discardSuggestion"),g=n.get("trackChanges").SuggestionThreadView,{CommentsListView:u,CommentThreadInputView:d}=t.plugins.get("CommentsUI"),m=new g(t.locale,e,a,{disableComments:this._disableComments,editorConfig:n.get("comments.editorConfig"),maxCommentsWhenCollapsed:n.get("comments.maxCommentsWhenCollapsed"),maxThreadTotalWeight:n.get("comments.maxThreadTotalWeight"),maxCommentCharsWhenCollapsed:n.get("comments.maxCommentCharsWhenCollapsed"),formatDateTime:(0,i.getDateTimeFormatter)(n.get("locale")),CommentView:n.get("comments").CommentView,CommentsListView:u,CommentThreadInputView:d}),h=s.createCommentThreadController(e.commentThread,m),f=new lr(e,m,c,l,h);m.descriptionParts=t.plugins.get("TrackChangesEditing")._descriptionFactory.getDescriptions(r),this._suggestionToController.set(e,f),this._viewToController.set(m,f);const p=o.createAnnotationView(this.editor.locale,m);p.bind("isDirty").to(m,"isDirty"),p.bind("length").to(m),p.bind("type").to(m,"type",(e=>"suggestion-"+e));const b=o.createAnnotation({view:p,target:()=>{const e=r[0].getFirstMarker();if(!e)return null;const n=e.getRange().getContainedElement();return n&&!t.editing.mapper.toViewElement(n)?null:(0,i.getMarkerDomElement)(t.editing,e)||null},type:()=>"suggestion-"+f.view.type});o.add(b);const x=t.plugins.get("PendingActions");let y;m.on("change:isDirty",((e,t,n)=>{if(n){const e=this.editor.locale.t;y=x.add(e({string:"Unsaved change in suggestion.",id:"PENDING_ACTION_SUGGESTION"}))}else x.remove(y),y=null}))}_destroyController(e){const t=this.editor.plugins.get("Annotations"),n=this._suggestionToController.get(e),o=n.view,s=t.getByInnerView(o);s&&t.remove(s),this._suggestionToController.delete(e),this._viewToController.delete(o),n.destroy(),o.destroy()}_updateController(e){if(!e.isInContent||!this._suggestionToController.has(e))return;const t=this.editor.plugins.get("TrackChangesEditing"),n=this._suggestionToController.get(e),o=e.getAllAdjacentSuggestions();n.view.descriptionParts=t._descriptionFactory.getDescriptions(o)}destroy(){super.destroy();for(const e of this._suggestionToController.keys())this._destroyController(e);for(const e of this._debouncedHandlers.values())e.cancel();this._debouncedHandlers.clear()}}var Pr,Or,Lr=["getSuggestions","plugins","editor","Comments","getSuggestion","addSuggestion","addSuggestionData","get","adapter","requires"];Pr=Lr,Or=346,function(e){for(;--e;)Pr.push(Pr.shift())}(++Or);var Br=function(e,t){return Lr[e-=0]};class jr extends e.Plugin{static get[Br("0x3")](){return[Qi,Fr,Br("0x7")]}static get pluginName(){return"TrackChanges"}set adapter(e){this[Br("0x6")][Br("0x5")][Br("0x1")](Qi)[Br("0x2")]=e}get adapter(){return this.editor.plugins[Br("0x1")](Qi)[Br("0x2")]}[Br("0x9")](e){return this[Br("0x6")][Br("0x5")][Br("0x1")](Qi)[Br("0x0")](e)}[Br("0x4")](e){return this.editor[Br("0x5")][Br("0x1")](Qi)[Br("0x4")](e)}[Br("0x8")](e){return this[Br("0x6")][Br("0x5")].get(Qi)[Br("0x8")](e)}}const Dr=["add","string","extraPlugins","reduce","track-changes-data-invalid-editor-creator","data","names","toolbar","requires","trackChangesData.editorCreator","discardAllSuggestions","concat","has","find","getDataWithDiscardedSuggestions","init","getUser","push","plugins","context","document","config","CommentsRepository","div","result","addSuggestionData","editorCreator","users","RealTimeCollaborativeTrackChanges","model","pluginName","TrackChangesEditing","createDocumentFragment","appendChild","editor","createElement","execute","addUser","_adapter","getSuggestions","getRootNames","define","name","includes","get","TrackChangesData","Autosave","map","every","constructor","destroy","trackChangesData","Users","useAnonymousUser","function"];var Ur,Hr;Ur=Dr,Hr=250,function(e){for(;--e;)Ur.push(Ur.shift())}(++Hr);const Vr=function(e,t){return Dr[e-=0]},zr=["initialData",Vr("0x2c"),Vr("0x20")],Gr=["RealTimeCollaborativeEditing","RealTimeCollaborativeComments",Vr("0x35"),Vr("0x10")];class Wr extends e.Plugin{static get[Vr("0x21")](){return[Qi]}static get[Vr("0x0")](){return Vr("0xf")}[Vr("0x28")](){const e=this[Vr("0x4")];if(e[Vr("0x2e")][Vr("0xb")](Vr("0x22"),(t=>e[Vr("0x13")].create("",t))),Vr("0x18")!=typeof e[Vr("0x2e")].get(Vr("0x15"))[Vr("0x33")])throw new t.CKEditorError(Vr("0x1d"))}getDataWithAcceptedSuggestions(e){return $r(this[Vr("0x4")],!0,e)}[Vr("0x27")](e){return $r(this[Vr("0x4")],!1,e)}}class qr extends e.Plugin{static get[Vr("0x0")](){return"TrackChangesDataGetter"}[Vr("0x28")](){this[Vr("0x31")]="end",this.editor.plugins[Vr("0xe")](Vr("0x2f"))[Vr("0x8")]={getCommentThread:()=>new Promise((()=>{}))},this[Vr("0x4")][Vr("0x2b")].get(Vr("0x1"))[Vr("0x8")]=null}}async function $r(e,t,n){const o=function(e){const t={};for(const n of e[Vr("0x2e")][Vr("0x1f")]())zr[Vr("0xd")](n)||(t[n]=e[Vr("0x2e")][Vr("0xe")](n));const n=e[Vr("0x13")].builtinPlugins||[],o=t[Vr("0x1b")]||[];delete t.extraPlugins;const s=n.concat(t[Vr("0x2b")])[Vr("0x24")](o)[Vr("0x11")]((e=>Vr("0x1a")==typeof e?n[Vr("0x26")]((t=>t[Vr("0x0")]==e)):e)),i=Array.from(new Set(s));return t[Vr("0x2b")]=i.filter((e=>Kr(e,new Set))),t.plugins[Vr("0x2a")](qr),t.plugins[Vr("0x2a")](Qi),t}(e),s=document[Vr("0x2")](),i=e[Vr("0x2e")][Vr("0xe")](Vr("0x15")).editorCreator,r=await i(o,(()=>function(e){const t=document[Vr("0x5")](Vr("0x30"));return e[Vr("0x3")](t),t}(s)));!function(e,t){const n=e[Vr("0x36")][Vr("0x2d")][Vr("0xa")]()[Vr("0x1c")](((t,n)=>(t[n]=e[Vr("0x1e")][Vr("0xe")]({rootName:n}),t)),{}),o=e[Vr("0x2b")][Vr("0xe")]("Users")[Vr("0x34")][Vr("0x11")]((e=>({id:e.id}))),s=e.plugins[Vr("0xe")](Vr("0x1"))[Vr("0x9")]({skipNotAttached:!0,toJSON:!0}),i=t.plugins[Vr("0xe")](Vr("0x16")),r=t[Vr("0x2b")][Vr("0xe")]("TrackChangesEditing");for(const e of o)i[Vr("0x29")](e.id)||i[Vr("0x7")](e);i.me||i[Vr("0x17")]();for(const e of s)r[Vr("0x32")](e);t[Vr("0x1e")].set(n)}(e,r),r[Vr("0x6")](t?"acceptAllSuggestions":Vr("0x23"));const a=r[Vr("0x1e")][Vr("0xe")](n);return await r[Vr("0x14")](),a}function Kr(e,t){if(t[Vr("0x25")](e))return!0;t[Vr("0x19")](e);const n="function"==typeof e?e[Vr("0x0")]||e[Vr("0xc")]:e;return(!n||!Gr.includes(n))&&(!e[Vr("0x21")]||e[Vr("0x21")][Vr("0x12")]((e=>Kr(e,t))))}})(),(window.CKEditor5=window.CKEditor5||{}).trackChanges=o})();
@@ -0,0 +1 @@
1
+ !function(E){const T=E.az=E.az||{};T.dictionary=Object.assign(T.dictionary||{},{"*Change to:* %0":"","*Check item*":"*Elementi yoxlayın*","*Format:* %0":"*Format:* %0","*Indent:* %0":"","*Insert:* %0":"","*Merge cells*":"","*Merge:* %0":"","*Outdent:* %0":"","*Remove all formatting*":"","*Remove format:* %0":"","*Remove highlight*":"","*Remove image text alternative*":"","*Remove link*":"","*Remove:* %0":"","*Replace table cells*":"","*Reset font background color*":"","*Reset font color*":"","*Reset font family*":"","*Reset font size*":"","*Reset image width*":"","*Set font background color:* %0":"","*Set font color:* %0":"","*Set font family:* %0":"","*Set font size:* %0":"","*Set highlight:* %0":"","*Set image text alternative:* %0":"","*Set image width:* %0":"","*Set link:* %0":"","*Split cell:* horizontally":"","*Split cell:* vertically":"","*Split:* %0":"","*Uncheck item*":"","Accept all selected suggestions":"","Accept all suggestions":"","Accept suggestion":"","Discard all selected suggestions":"","Discard all suggestions":"","Discard suggestion":"",ELEMENT_BLOCK_QUOTE:"",ELEMENT_BULLETED_LIST:"",ELEMENT_CAPTION:"",ELEMENT_CODE_BLOCK:["",""],ELEMENT_HEADING:["",""],ELEMENT_HEADING_CUSTOM:["",""],ELEMENT_HORIZONTAL_LINE:["",""],ELEMENT_IMAGE:["",""],ELEMENT_INLINE_IMAGE:["",""],ELEMENT_LINE_BREAK:["",""],ELEMENT_LIST_ITEM:["",""],ELEMENT_MEDIA:["",""],ELEMENT_NUMBERED_LIST:"",ELEMENT_PAGE_BREAK:["",""],ELEMENT_PARAGRAPH:["",""],ELEMENT_SPACE:["",""],ELEMENT_TABLE:["",""],ELEMENT_TABLE_COLUMN:["",""],ELEMENT_TABLE_COLUMN_WITH_TEXT:["",""],ELEMENT_TABLE_ROW:["",""],ELEMENT_TABLE_ROW_WITH_TEXT:["",""],ELEMENT_TABLE_WITH_TEXT:"",ELEMENT_TITLE:"",ELEMENT_TODO_LIST:"",FORMAT_ALIGN_TO_CENTER:"",FORMAT_ALIGN_TO_LEFT:"",FORMAT_ALIGN_TO_RIGHT:"",FORMAT_BOLD:"",FORMAT_CODE:"",FORMAT_HEADER_COLUMN:"",FORMAT_HEADER_ROW:"",FORMAT_HIGHLIGHT:"",FORMAT_ITALIC:"",FORMAT_JUSTIFY_TEXT:"",FORMAT_REGULAR_COLUMN:"",FORMAT_REGULAR_ROW:"",FORMAT_RESTRICTED_DISABLED:"",FORMAT_RESTRICTED_ENABLED:"",FORMAT_SIDE_IMAGE:"",FORMAT_STRIKETHROUGH:"",FORMAT_SUBSCRIPT:"",FORMAT_SUPERSCRIPT:"",FORMAT_UNDERLINE:"",PENDING_ACTION_SUGGESTION:"",REPLACE_TEXT:"","Track changes":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(t){const e=t.cs=t.cs||{};e.dictionary=Object.assign(e.dictionary||{},{"*Change to:* %0":"*Změnit na:* %0","*Check item*":"*Označit položku*","*Format:* %0":"*Formát:* %0","*Indent:* %0":"*Odsazení:* %0","*Insert:* %0":"*Vložit:* %0","*Merge cells*":"*Sloučit buňky*","*Merge:* %0":"*Sloučit:* %0","*Outdent:* %0":"*Předsadit:* %0","*Remove all formatting*":"*Odstranit všechno formátování*","*Remove format:* %0":"*Odstranit formátování:* %0","*Remove highlight*":"*Odstranit zvýraznění*","*Remove image text alternative*":"*Odstranit textovou alternativu obrázku*","*Remove link*":"*Odstranit odkaz*","*Remove:* %0":"*Odstranit:* %0","*Replace table cells*":"*Nahradit buňky tabulky*","*Reset font background color*":"*Resetovat pozadí písma*","*Reset font color*":"*Resetovat barvu písma*","*Reset font family*":"*Resetovat typ písma*","*Reset font size*":"*Resetovat velikost písma*","*Reset image width*":"*Resetovat šířku obrázku*","*Set font background color:* %0":"*Nastavit barvu pozadí písma:* %0","*Set font color:* %0":"*Nastavit barvu písma:* %0","*Set font family:* %0":"*Nastavit typ písma:* %0","*Set font size:* %0":"*Nastavit velikost písma:* %0","*Set highlight:* %0":"*Nastavit zvýraznění:* %0","*Set image text alternative:* %0":"*Nastavit alternativní text obrázku:* %0","*Set image width:* %0":"*Nastavit šířku obrázku:* %0","*Set link:* %0":"*Nastavit odkaz:* %0","*Split cell:* horizontally":"*Rozdělit buňku:* horizontální","*Split cell:* vertically":"*Rozdělit buňku:* vertikální","*Split:* %0":"*Rozdělit:* %0","*Uncheck item*":"*Odznačit položku*","Accept all selected suggestions":"Přijmout všechny označené návrhy","Accept all suggestions":"Přijmout všechny návrhy","Accept suggestion":"Přijmout návrh","Discard all selected suggestions":"Zamítnout všechny označené návrhy","Discard all suggestions":"Zamítnout všechny návrhy","Discard suggestion":"Zamítnout návrh",ELEMENT_BLOCK_QUOTE:"Citace",ELEMENT_BULLETED_LIST:"Odrážkový seznam",ELEMENT_CAPTION:"",ELEMENT_CODE_BLOCK:["blok kódu","%0 bloky kódu","%0 bloků kódu","%0 bloků kódu"],ELEMENT_HEADING:["nadpis (level %1)","%0 nadpisy (level %1)","%0 nadpisů (level %1)","%0 nadpisů (level %1)"],ELEMENT_HEADING_CUSTOM:["","","",""],ELEMENT_HORIZONTAL_LINE:["horizontální čára","%0 horizontální čáry","%0 horizontálních čar","%0 horizontálních čar"],ELEMENT_IMAGE:["obrázek","%0 obrázky","%0 obrázků","%0 obrázků"],ELEMENT_INLINE_IMAGE:["%0 obrázek","%0 obrázky","%0 obrázků","%0 obrázků"],ELEMENT_LINE_BREAK:["","","",""],ELEMENT_LIST_ITEM:["%0 položka seznamu","%0 položky seznamu","%0 položek seznamu","%0 položek seznamu"],ELEMENT_MEDIA:["","","",""],ELEMENT_NUMBERED_LIST:"číslovaný zoznam",ELEMENT_PAGE_BREAK:["%0 zalomení stránky","%0 zalomení stránky","%0 zalomení stránky","%0 zalomení stránky"],ELEMENT_PARAGRAPH:["%0 odstavec","%0 odstavce","%0 odstavců","%0 odstavců"],ELEMENT_SPACE:["%0 mezera","%0 mezery","%0 mezer","%0 mezer"],ELEMENT_TABLE:["%0 tabulka","%0 tabulky","%0 tabulek","%0 tabulek"],ELEMENT_TABLE_COLUMN:["%0 sloupec tabulky","%0 sloupce tabulky","%0 sloupců tabulky","%0 sloupců tabulky"],ELEMENT_TABLE_COLUMN_WITH_TEXT:["","","",""],ELEMENT_TABLE_ROW:["","","",""],ELEMENT_TABLE_ROW_WITH_TEXT:["","","",""],ELEMENT_TABLE_WITH_TEXT:"tabulka *s textem* %0",ELEMENT_TITLE:"název",ELEMENT_TODO_LIST:"seznam úkolů",FORMAT_ALIGN_TO_CENTER:"Zarovnat na střed",FORMAT_ALIGN_TO_LEFT:"Zarovnat vlevo",FORMAT_ALIGN_TO_RIGHT:"Zarovnat vpravo",FORMAT_BOLD:"Tučné písmo",FORMAT_CODE:"Kód",FORMAT_HEADER_COLUMN:"Buňka hlavičky",FORMAT_HEADER_ROW:"Řádek hlavičky",FORMAT_HIGHLIGHT:"Zvýraznit",FORMAT_ITALIC:"Kurzíva",FORMAT_JUSTIFY_TEXT:"Vyrovnat",FORMAT_REGULAR_COLUMN:"Klasická buňka",FORMAT_REGULAR_ROW:"Klasický řádek",FORMAT_RESTRICTED_DISABLED:"",FORMAT_RESTRICTED_ENABLED:"",FORMAT_SIDE_IMAGE:"Boční obrázek",FORMAT_STRIKETHROUGH:"Přeškrtnuté",FORMAT_SUBSCRIPT:"Dolní index",FORMAT_SUPERSCRIPT:"Horný index",FORMAT_UNDERLINE:"Podčiarknuť",PENDING_ACTION_SUGGESTION:"Neuložené změna v návrhu.",REPLACE_TEXT:"*Nahradit:* %0 *za* %1","Track changes":"Sledovat změny"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(e){const t=e.da=e.da||{};t.dictionary=Object.assign(t.dictionary||{},{"*Change to:* %0":"*Erstat med:* %0","*Check item*":"","*Format:* %0":"*Formater:* %0","*Indent:* %0":"*Indryk:* %0","*Insert:* %0":"*Indsæt:* %0","*Merge cells*":"*Flet celler*","*Merge:* %0":"*Flet:* %0","*Outdent:* %0":"","*Remove all formatting*":"*Ryd al formatering*","*Remove format:* %0":"","*Remove highlight*":"","*Remove image text alternative*":"","*Remove link*":"*Fjern link*","*Remove:* %0":"*Fjern:* %0","*Replace table cells*":"*Erstat celler*","*Reset font background color*":"*Nulstil baggrundsfarve*","*Reset font color*":"*Nulstil tekstfarve*","*Reset font family*":"*Nulstil skrifttype*","*Reset font size*":"*Nulstil skriftstørrelse*","*Reset image width*":"*Nulstil billedbrede*","*Set font background color:* %0":"*Sæt baggrundsfarve:* %0","*Set font color:* %0":"*Sæt tekstfarve:* %0","*Set font family:* %0":"*Sæt skrifttype:* %0","*Set font size:* %0":"*Sæt skriftstørrelse:* %0","*Set highlight:* %0":"","*Set image text alternative:* %0":"","*Set image width:* %0":"*Set billedbrede:* %0","*Set link:* %0":"*Sæt link:* %0","*Split cell:* horizontally":"","*Split cell:* vertically":"","*Split:* %0":"","*Uncheck item*":"","Accept all selected suggestions":"Accepter alle valgte ændringer","Accept all suggestions":"Accepter alle ændringer","Accept suggestion":"Accepter ændring","Discard all selected suggestions":"Afvis alle valgte ændringer","Discard all suggestions":"Afvis alle ændringer","Discard suggestion":"Afvis ændring",ELEMENT_BLOCK_QUOTE:"",ELEMENT_BULLETED_LIST:"punktliste",ELEMENT_CAPTION:"billedtekst",ELEMENT_CODE_BLOCK:["",""],ELEMENT_HEADING:["",""],ELEMENT_HEADING_CUSTOM:["",""],ELEMENT_HORIZONTAL_LINE:["",""],ELEMENT_IMAGE:["billede","%0 billeder"],ELEMENT_INLINE_IMAGE:["",""],ELEMENT_LINE_BREAK:["linjeskift","%0 linjeskift"],ELEMENT_LIST_ITEM:["",""],ELEMENT_MEDIA:["",""],ELEMENT_NUMBERED_LIST:"",ELEMENT_PAGE_BREAK:["sideskift","%0 sideskift"],ELEMENT_PARAGRAPH:["afsnit","%0 afsnit"],ELEMENT_SPACE:["mellemrum","%0 mellemrum"],ELEMENT_TABLE:["tabel","%0 tabeller"],ELEMENT_TABLE_COLUMN:["søjle","%0 søjler"],ELEMENT_TABLE_COLUMN_WITH_TEXT:["søjle *med tekst* %1","%0 søjle *med tekst* %1"],ELEMENT_TABLE_ROW:["række","%0 rækker"],ELEMENT_TABLE_ROW_WITH_TEXT:["række *med tekst* %1","%0 rækker *med tekst* %1"],ELEMENT_TABLE_WITH_TEXT:"tabel *med tekst* %0",ELEMENT_TITLE:"titel",ELEMENT_TODO_LIST:"opgaveliste",FORMAT_ALIGN_TO_CENTER:"centreret",FORMAT_ALIGN_TO_LEFT:"venstrejuster",FORMAT_ALIGN_TO_RIGHT:"højrejuster",FORMAT_BOLD:"fed",FORMAT_CODE:"kode",FORMAT_HEADER_COLUMN:"Søjleoverskrift",FORMAT_HEADER_ROW:"",FORMAT_HIGHLIGHT:"fremhæv",FORMAT_ITALIC:"kursiv",FORMAT_JUSTIFY_TEXT:"Lige marginer",FORMAT_REGULAR_COLUMN:"",FORMAT_REGULAR_ROW:"",FORMAT_RESTRICTED_DISABLED:"*Deaktiver i begrænset tilstand*",FORMAT_RESTRICTED_ENABLED:"*Aktiver i begrænset tilstand*",FORMAT_SIDE_IMAGE:"",FORMAT_STRIKETHROUGH:"gennemstreg",FORMAT_SUBSCRIPT:"sænket skrift",FORMAT_SUPERSCRIPT:"hævet skrift",FORMAT_UNDERLINE:"understreg",PENDING_ACTION_SUGGESTION:"*Ikke gemte ændringer i forslag*",REPLACE_TEXT:"*Erstat* %0 *med* %1","Track changes":"Registrer ændringer"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(e){const t=e.de=e.de||{};t.dictionary=Object.assign(t.dictionary||{},{"*Change to:* %0":"*Ändern in:* %0","*Check item*":"*Eintrag abhaken*","*Format:* %0":"*Formatieren:* %0","*Indent:* %0":"*Einzug vergrößern*: %0","*Insert:* %0":"*Einfügen:* %0","*Merge cells*":"*Zellen verbinden*","*Merge:* %0":"*Verbinden:* %0","*Outdent:* %0":"*Einzug verkleinern:*: %0","*Remove all formatting*":"*Alle Formatierungen entfernen*","*Remove format:* %0":"*Formatierung entfernen:* %0","*Remove highlight*":"","*Remove image text alternative*":"*Alternativtext des Bildes entfernen*","*Remove link*":"*Link entfernen*","*Remove:* %0":"*Entfernen:* %0","*Replace table cells*":"*Tabellenzellen ersetzen*","*Reset font background color*":"*Hintergrundfarbe der Schrift zurücksetzen*","*Reset font color*":"*Schriftfarbe zurücksetzen*","*Reset font family*":"*Schriftart zurücksetzen*","*Reset font size*":"*Schriftgröße zurücksetzen*","*Reset image width*":"*Bildbreite zurücksetzen*","*Set font background color:* %0":"*Hintergrundfarbe der Schrift festlegen:* %0","*Set font color:* %0":"*Schriftfarbe festlegen:* %0","*Set font family:* %0":"*Schriftart festlegen:* %0","*Set font size:* %0":"*Schriftgröße festlegen:* %0","*Set highlight:* %0":"","*Set image text alternative:* %0":"*Alternativtext des Bildes festlegen:* %0","*Set image width:* %0":"*Bildbreite festlegen:* %0","*Set link:* %0":"*Link festlegen:* %0","*Split cell:* horizontally":"*Zelle trennen:* horizontal","*Split cell:* vertically":"*Zelle trennen*: vertikal","*Split:* %0":"*Trennen:* %0","*Uncheck item*":"*Eintrag nicht abhaken*","Accept all selected suggestions":"Alle ausgewählten Vorschläge akzeptieren","Accept all suggestions":"Alle Vorschläge akzeptieren","Accept suggestion":"Vorschlag akzeptieren","Discard all selected suggestions":"Alle ausgewählten Vorschläge verwerfen","Discard all suggestions":"Alle Vorschläge verwerfen","Discard suggestion":"Vorschlag verwerfen",ELEMENT_BLOCK_QUOTE:"Zitat",ELEMENT_BULLETED_LIST:"Aufzählungsliste",ELEMENT_CAPTION:"Bildunterschrift",ELEMENT_CODE_BLOCK:["Code-Block","%0 Code-Blöcke"],ELEMENT_HEADING:["Überschrift (Ebene %1)","%0 Überschriften (Ebene %1)"],ELEMENT_HEADING_CUSTOM:["Überschrift (%1)","%0 Überschriften (%1)"],ELEMENT_HORIZONTAL_LINE:["Horizontale Linie","%0 horizontale Linien"],ELEMENT_IMAGE:["Bild","%0 Bilder"],ELEMENT_INLINE_IMAGE:["Bildunterschrift","%0 Bilder"],ELEMENT_LINE_BREAK:["Zeilenumbruch","%0 Zeilenumbrüche"],ELEMENT_LIST_ITEM:["Listeneintrag","%0 Listeneinträge"],ELEMENT_MEDIA:["Medium","%0 Medien"],ELEMENT_NUMBERED_LIST:"Nummerierte Liste",ELEMENT_PAGE_BREAK:["Seitenumbruch","%0 Seitenumbrüche"],ELEMENT_PARAGRAPH:["Absatz","%0 Absätze"],ELEMENT_SPACE:["Leerzeichen","%0 Leerzeichen"],ELEMENT_TABLE:["Tabelle","%0 Tabellen"],ELEMENT_TABLE_COLUMN:["Tabellenspalte","%0 Tabellenspalten"],ELEMENT_TABLE_COLUMN_WITH_TEXT:["Tabellenspalte *mit Text* %1","%0 Tabellenspalten *mit Text* %1"],ELEMENT_TABLE_ROW:["Tabellenzeile","%0 Tabellenzeilen"],ELEMENT_TABLE_ROW_WITH_TEXT:["Tabellenzeile *mit Text* %1","%0 Tabellenzeilen *mit Text* %1"],ELEMENT_TABLE_WITH_TEXT:"Tabelle *mit Text* %0",ELEMENT_TITLE:"Titel",ELEMENT_TODO_LIST:"To-do-Liste",FORMAT_ALIGN_TO_CENTER:"Zentriert ausrichten",FORMAT_ALIGN_TO_LEFT:"Linksbündig ausrichten",FORMAT_ALIGN_TO_RIGHT:"Rechtsbündig ausrichten",FORMAT_BOLD:"fett",FORMAT_CODE:"Code",FORMAT_HEADER_COLUMN:"Kopfspalte",FORMAT_HEADER_ROW:"Kopfzeile",FORMAT_HIGHLIGHT:"hervorheben",FORMAT_ITALIC:"kursiv",FORMAT_JUSTIFY_TEXT:"Blocksatz",FORMAT_REGULAR_COLUMN:"Normale Spalte",FORMAT_REGULAR_ROW:"Normale Zeile",FORMAT_RESTRICTED_DISABLED:"*Im eingeschränkten Bearbeitungsmodus deaktivieren*",FORMAT_RESTRICTED_ENABLED:"*Im eingeschränkten Bearbeitungsmodus aktivieren*",FORMAT_SIDE_IMAGE:"Seitenbild",FORMAT_STRIKETHROUGH:"durchgestrichen",FORMAT_SUBSCRIPT:"tiefgestellt",FORMAT_SUPERSCRIPT:"hochgestellt",FORMAT_UNDERLINE:"unterstrichen",PENDING_ACTION_SUGGESTION:"Ungesichtere Änderung im Vorschlag.",REPLACE_TEXT:"*Ersetzen:* %0 *mit* %1","Track changes":"Änderungen verfolgen"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(E){const T=E.el=E.el||{};T.dictionary=Object.assign(T.dictionary||{},{"*Change to:* %0":"*Αλλαγή σε:* %0","*Check item*":"*Έλεγχος αντικειμένου*","*Format:* %0":"*Μορφοποίηση:* %0","*Indent:* %0":"*Εσοχή:* %0","*Insert:* %0":"*Εισαγωγή:* %0","*Merge cells*":"*Συγχώνευση κελιών*","*Merge:* %0":"*Συγχώνευση:* %0","*Outdent:* %0":"*Εξοχή:* %0","*Remove all formatting*":"*Απομάκρυνση όλης της μορφοποίησης*","*Remove format:* %0":"*Απομάκρυνση μορφοποίησης:* %0","*Remove highlight*":"*Απομάκρυνση επισήμανσης*","*Remove image text alternative*":"*Απομάκρυνση εναλλακτικού κειμένου εικόνας*","*Remove link*":"*Απομάκρυνση συνδέσμου*","*Remove:* %0":"*Απομάκρυνση:* %0","*Replace table cells*":"*Αντικατάσταση κελιών πίνακα*","*Reset font background color*":"*Επαναφορά χρώματος υποβάθρου γραμματοσειράς*","*Reset font color*":"*Επαναφορά χρώματος γραμματοσειράς*","*Reset font family*":"*Επαναφορά οικογένειας γραμματοσειρών*","*Reset font size*":"*Επαναφορά μεγέθους γραμματοσειράς*","*Reset image width*":"*Επαναφορά πλάτους εικόνας*","*Set font background color:* %0":"*Ορισμός χρώματος υποβάθρου γραμματοσειράς:* %0","*Set font color:* %0":"*Ορισμός χρώματος γραμματοσειράς:* %0","*Set font family:* %0":"*Ορισμός οικογένειας γραμματοσειρών:* %0","*Set font size:* %0":"*Ορισμός μεγέθους γραμματοσειράς:* %0","*Set highlight:* %0":"*Ορισμός επισήμανσης:* %0","*Set image text alternative:* %0":"*Ορισμός εναλλακτικού κειμένου εικόνας:* %0","*Set image width:* %0":"*Ορισμός πλάτους εικόνας:* %0","*Set link:* %0":"*Ορισμός συνδέσμου:* %0","*Split cell:* horizontally":"*Διαχωρισμός κελιού:* οριζόντια","*Split cell:* vertically":"*Διαχωρισμός κελιού:* κάθετα","*Split:* %0":"*Διαχωρισμός:* %0","*Uncheck item*":"*Αποεπιλογή αντικειμένου*","Accept all selected suggestions":"Αποδοχή όλων των επιλεγμένων προτάσεων","Accept all suggestions":"Αποδοχή όλων των προτάσεων","Accept suggestion":"Αποδοχή πρότασης","Discard all selected suggestions":"Απόρριψη όλων των επιλεγμένων προτάσεων","Discard all suggestions":"Απόρριψη όλων των προτάσεων","Discard suggestion":"Απόρριψη πρότασης",ELEMENT_BLOCK_QUOTE:"περιοχή παράθεσης",ELEMENT_BULLETED_LIST:"λίστα με κουκίδες",ELEMENT_CAPTION:"λεζάντα",ELEMENT_CODE_BLOCK:["περιοχή κώδικα","%0 περιοχές κώδικα"],ELEMENT_HEADING:["κεφαλίδα (επίπεδο %1)","%0 κεφαλίδες (επίπεδο %1)"],ELEMENT_HEADING_CUSTOM:["κεφαλίδα (%1)","%0 κεφαλίδες (%1)"],ELEMENT_HORIZONTAL_LINE:["οριζόντια γραμμή","%0 οριζόντιες γραμμές"],ELEMENT_IMAGE:["εικόνα","%0 εικόνες"],ELEMENT_INLINE_IMAGE:["εικόνα","%0 εικόνες"],ELEMENT_LINE_BREAK:["αλλαγή γραμμής","%0 αλλαγές γραμμής"],ELEMENT_LIST_ITEM:["αντικείμενο λίστας","%0 αντικείμενα λίστας"],ELEMENT_MEDIA:["αντικείμενο πολυμέσων","%0 αντικείμενα πολυμέσων"],ELEMENT_NUMBERED_LIST:"λίστα με αριθμούς",ELEMENT_PAGE_BREAK:["αλλαγή σελίδας","%0 αλλαγές σελίδας"],ELEMENT_PARAGRAPH:["παράγραφος","%0 παράγραφοι"],ELEMENT_SPACE:["διάστημα","%0 διαστήματα"],ELEMENT_TABLE:["πίνακας","%0 πίνακες"],ELEMENT_TABLE_COLUMN:["στήλη πίνακα","%0 στήλες πίνακα"],ELEMENT_TABLE_COLUMN_WITH_TEXT:["στήλη πίνακα *με κείμενο* %1","%0 στήλες πίνακα *με κείμενο* %1"],ELEMENT_TABLE_ROW:["γραμμή πίνακα","%0 γραμμές πίνακα"],ELEMENT_TABLE_ROW_WITH_TEXT:["γραμμή πίνακα *με κείμενο* %1","%0 γραμμές πίνακα *με κείμενο* %1"],ELEMENT_TABLE_WITH_TEXT:"πίνακας *με κείμενο* %0",ELEMENT_TITLE:"τίτλος",ELEMENT_TODO_LIST:"λίστα προγραμματισμένων ενεργειών",FORMAT_ALIGN_TO_CENTER:"στοίχιση στο κέντρο",FORMAT_ALIGN_TO_LEFT:"στοίχιση στα αριστερά",FORMAT_ALIGN_TO_RIGHT:"στοίχιση στα δεξιά",FORMAT_BOLD:"έντονα",FORMAT_CODE:"κώδικας",FORMAT_HEADER_COLUMN:"στήλη κεφαλίδας",FORMAT_HEADER_ROW:"γραμμή κεφαλίδας",FORMAT_HIGHLIGHT:"επισήμανση",FORMAT_ITALIC:"πλάγια",FORMAT_JUSTIFY_TEXT:"πλήρης στοίχιση",FORMAT_REGULAR_COLUMN:"κανονική στήλη",FORMAT_REGULAR_ROW:"κανονική γραμμή",FORMAT_RESTRICTED_DISABLED:"*Απενεργοποιημένη με κατάσταση απαγορευμένης επεξεργασίας*",FORMAT_RESTRICTED_ENABLED:"*Ενεργοποιημένη με κατάσταση απαγορευμένης επεξεργασίας*",FORMAT_SIDE_IMAGE:"πλευρική εικόνα",FORMAT_STRIKETHROUGH:"διακριτή διαγραφή",FORMAT_SUBSCRIPT:"δείκτης",FORMAT_SUPERSCRIPT:"εκθέτης",FORMAT_UNDERLINE:"υπογράμμιση",PENDING_ACTION_SUGGESTION:"Μη αποθηκευμένη αλλαγή στην πρόταση",REPLACE_TEXT:"*Αντικατάσταση:* %0 *με* %1","Track changes":"Καταγραφή αλλαγών"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(e){const t=e["en-au"]=e["en-au"]||{};t.dictionary=Object.assign(t.dictionary||{},{"*Change to:* %0":"*Change to:* %0","*Check item*":"*Check item*","*Format:* %0":"*Format:* %0","*Indent:* %0":"*Indent:* %0","*Insert:* %0":"*Insert:* %0","*Merge cells*":"*Merge cells*","*Merge:* %0":"*Merge:* %0","*Outdent:* %0":"*Outdent:* %0","*Remove all formatting*":"*Remove all formatting*","*Remove format:* %0":"*Remove format:* %0","*Remove highlight*":"*Remove highlight*","*Remove image text alternative*":"*Remove image text alternative*","*Remove link*":"*Remove link*","*Remove:* %0":"*Remove:* %0","*Replace table cells*":"*Replace table cells*","*Reset font background color*":"*Reset font background colour*","*Reset font color*":"*Reset font colour*","*Reset font family*":"*Reset font family*","*Reset font size*":"*Reset font size*","*Reset image width*":"*Reset image width*","*Set font background color:* %0":"*Set font background colour:* %0","*Set font color:* %0":"*Set font colour:* %0","*Set font family:* %0":"*Set font family:* %0","*Set font size:* %0":"*Set font size:* %0","*Set highlight:* %0":"*Set highlight:* %0","*Set image text alternative:* %0":"*Set image text alternative:* %0","*Set image width:* %0":"*Set image width:* %0","*Set link:* %0":"*Set link:* %0","*Split cell:* horizontally":"*Split cell:* horizontally","*Split cell:* vertically":"*Split cell:* vertically","*Split:* %0":"*Split:* %0","*Uncheck item*":"*Uncheck item*","Accept all selected suggestions":"Accept all selected suggestions","Accept all suggestions":"Accept all suggestions","Accept suggestion":"Accept suggestion","Discard all selected suggestions":"Discard all selected suggestions","Discard all suggestions":"Discard all suggestions","Discard suggestion":"Discard suggestion",ELEMENT_BLOCK_QUOTE:"block quote",ELEMENT_BULLETED_LIST:"bulleted list",ELEMENT_CAPTION:"caption",ELEMENT_CODE_BLOCK:["code block","%0 code blocks"],ELEMENT_HEADING:["heading (level %1)","%0 headings (level %1)"],ELEMENT_HEADING_CUSTOM:["heading (%1)","%0 headings (%1)"],ELEMENT_HORIZONTAL_LINE:["horizontal line","%0 horizontal lines"],ELEMENT_IMAGE:["image","%0 images"],ELEMENT_INLINE_IMAGE:["image","%0 images"],ELEMENT_LINE_BREAK:["line break","%0 line breaks"],ELEMENT_LIST_ITEM:["list item","%0 list items"],ELEMENT_MEDIA:["media item","%0 media items"],ELEMENT_NUMBERED_LIST:"numbered list",ELEMENT_PAGE_BREAK:["page break","%0 page breaks"],ELEMENT_PARAGRAPH:["paragraph","%0 paragraphs"],ELEMENT_SPACE:["space","%0 spaces"],ELEMENT_TABLE:["table","%0 tables"],ELEMENT_TABLE_COLUMN:["table column","%0 table columns"],ELEMENT_TABLE_COLUMN_WITH_TEXT:["table column *with text* %1","%0 table columns *with text* %1"],ELEMENT_TABLE_ROW:["table row","%0 table rows"],ELEMENT_TABLE_ROW_WITH_TEXT:["table row *with text* %1","%0 table rows *with text* %1"],ELEMENT_TABLE_WITH_TEXT:"table *with text* %0",ELEMENT_TITLE:"title",ELEMENT_TODO_LIST:"to-do list",FORMAT_ALIGN_TO_CENTER:"align to centre",FORMAT_ALIGN_TO_LEFT:"align to left",FORMAT_ALIGN_TO_RIGHT:"align to right",FORMAT_BOLD:"bold",FORMAT_CODE:"code",FORMAT_HEADER_COLUMN:"header column",FORMAT_HEADER_ROW:"header row",FORMAT_HIGHLIGHT:"highlight",FORMAT_ITALIC:"italic",FORMAT_JUSTIFY_TEXT:"justify",FORMAT_REGULAR_COLUMN:"regular column",FORMAT_REGULAR_ROW:"regular row",FORMAT_RESTRICTED_DISABLED:"*Disable in restricted editing mode*",FORMAT_RESTRICTED_ENABLED:"*Enable in restricted editing mode*",FORMAT_SIDE_IMAGE:"side image",FORMAT_STRIKETHROUGH:"strikethrough",FORMAT_SUBSCRIPT:"subscript",FORMAT_SUPERSCRIPT:"superscript",FORMAT_UNDERLINE:"underline",PENDING_ACTION_SUGGESTION:"Unsaved change in suggestion.",REPLACE_TEXT:"*Replace:* %0 *with* %1","Track changes":"Track changes"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(e){const a=e.es=e.es||{};a.dictionary=Object.assign(a.dictionary||{},{"*Change to:* %0":"","*Check item*":"","*Format:* %0":"","*Indent:* %0":"","*Insert:* %0":"","*Merge cells*":"","*Merge:* %0":"","*Outdent:* %0":"","*Remove all formatting*":"","*Remove format:* %0":"","*Remove highlight*":"","*Remove image text alternative*":"","*Remove link*":"","*Remove:* %0":"","*Replace table cells*":"","*Reset font background color*":"","*Reset font color*":"","*Reset font family*":"","*Reset font size*":"","*Reset image width*":"","*Set font background color:* %0":"","*Set font color:* %0":"","*Set font family:* %0":"","*Set font size:* %0":"","*Set highlight:* %0":"","*Set image text alternative:* %0":"","*Set image width:* %0":"","*Set link:* %0":"","*Split cell:* horizontally":"","*Split cell:* vertically":"","*Split:* %0":"","*Uncheck item*":"","Accept all selected suggestions":"Aceptar todas las sugerencias seleccionadas","Accept all suggestions":"Aceptar todas las sugerencias","Accept suggestion":"Aceptar sugerencia","Discard all selected suggestions":"Descartar todas las sugerencias seleccionadas","Discard all suggestions":"Descartar todas las sugerencias","Discard suggestion":"Descartar sugerencia",ELEMENT_BLOCK_QUOTE:"cita de bloque",ELEMENT_BULLETED_LIST:"lista con topos",ELEMENT_CAPTION:"",ELEMENT_CODE_BLOCK:["Bloque de código","%0 bloques de código"],ELEMENT_HEADING:["encabezado (nivel %1)","%0 encabezados (nivel %1)"],ELEMENT_HEADING_CUSTOM:["encabezado (%1)","%0 encabezados (%1)"],ELEMENT_HORIZONTAL_LINE:["Línea horizontal","%0 líneas horizontales"],ELEMENT_IMAGE:["imagen","%0 imágenes"],ELEMENT_INLINE_IMAGE:["imagen","%0 imágenes"],ELEMENT_LINE_BREAK:["",""],ELEMENT_LIST_ITEM:["ítem de lista","%0 items de lista"],ELEMENT_MEDIA:["",""],ELEMENT_NUMBERED_LIST:"Lista numerada",ELEMENT_PAGE_BREAK:["",""],ELEMENT_PARAGRAPH:["párrafo","%0 párrafos"],ELEMENT_SPACE:["espacio","%0 espacios"],ELEMENT_TABLE:["tabla","%0 tablas"],ELEMENT_TABLE_COLUMN:["columna de tabla","%0 columnas de tabla"],ELEMENT_TABLE_COLUMN_WITH_TEXT:["columna de tabla *con texto* %1","%0 columnas de tabla *con texto* %1"],ELEMENT_TABLE_ROW:["fila de tabla","%0 filas de tabla"],ELEMENT_TABLE_ROW_WITH_TEXT:["fila de tabla *con texto* %1","%0 filas de tabla *con texto* %1"],ELEMENT_TABLE_WITH_TEXT:"tabla *con texto* %0",ELEMENT_TITLE:"título",ELEMENT_TODO_LIST:"lista de pendientes",FORMAT_ALIGN_TO_CENTER:"alinear al centro",FORMAT_ALIGN_TO_LEFT:"alinear a la izquierda",FORMAT_ALIGN_TO_RIGHT:"alinear a la derecha",FORMAT_BOLD:"negrita",FORMAT_CODE:"código",FORMAT_HEADER_COLUMN:"columna de cabecera",FORMAT_HEADER_ROW:"fila de cabecera",FORMAT_HIGHLIGHT:"resalte",FORMAT_ITALIC:"itálica",FORMAT_JUSTIFY_TEXT:"justificar",FORMAT_REGULAR_COLUMN:"columna normal",FORMAT_REGULAR_ROW:"fila normal",FORMAT_RESTRICTED_DISABLED:"",FORMAT_RESTRICTED_ENABLED:"",FORMAT_SIDE_IMAGE:"imagen lateral",FORMAT_STRIKETHROUGH:"tachado",FORMAT_SUBSCRIPT:"subíndice",FORMAT_SUPERSCRIPT:"superíndice",FORMAT_UNDERLINE:"subrayado",PENDING_ACTION_SUGGESTION:"",REPLACE_TEXT:"*Reemplazar* %0 *con* %1","Track changes":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));