@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251210.0 → 0.0.0-nightly-20251211.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 (164) hide show
  1. package/build/footnotes.js +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +9 -9
  150. package/src/commands/insertfootnotecommand.js +1 -1
  151. package/src/footnotes.js +1 -1
  152. package/src/footnotesclipboard.js +1 -1
  153. package/src/footnotesediting.js +1 -1
  154. package/src/footnotesproperties/commands/footnotesstartcommand.js +1 -1
  155. package/src/footnotesproperties/commands/footnotesstylecommand.js +1 -1
  156. package/src/footnotesproperties/footnotespropertiesconfig.js +1 -1
  157. package/src/footnotesproperties/footnotespropertiesediting.js +1 -1
  158. package/src/footnotesproperties/footnotespropertiesui.js +1 -1
  159. package/src/footnotesproperties/ui/footnotesdefinitionspropertiesview.js +1 -1
  160. package/src/footnotesproperties.js +1 -1
  161. package/src/footnotestracker.js +1 -1
  162. package/src/footnotesui.js +1 -1
  163. package/src/index.js +1 -1
  164. package/src/modelelementtracker.js +1 -1
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r},297:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=o(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},728:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},929:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=o(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var o=e.domAPI(e);o.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var s=n(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=o(s[r]);e[a].references--}for(var c=n(t,i),l=0;l<s.length;l++){var u=o(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>$,FootnotesClipboard:()=>_,FootnotesEditing:()=>v,FootnotesProperties:()=>Et,FootnotesPropertiesEditing:()=>mt,FootnotesPropertiesUI:()=>Ct,FootnotesStartCommand:()=>ft,FootnotesStyleCommand:()=>at,FootnotesTracker:()=>d,FootnotesUI:()=>X,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);const r=a;function a(t,e){const o=c();return(a=function(t,e){return o[t-=451]})(t,e)}function c(){const t=["getChanges","nodeAfter","2362265IIPIcT","8607762RKZPxJ","_trackedElements","getItems","length","reset","slice","insert","797406jKpnGW","_getElementKey","name","rootName","element","root","remove","elementName","1874416VoEUFW","34WUWJtH","from","attributes","getElementKey","add","clear","type","3237018uLHiUq","values","position","$text","delete","createRangeOn","_elementName","push","5165811pXIpfG","flat","_model","$graveyard","has","set","26603spTfyJ","12zPWGYG","get"];return(c=function(){return t})()}!function(t){const e=a,o=t();for(;;)try{if(428062===-parseInt(e(492))/1*(parseInt(e(471))/2)+-parseInt(e(462))/3*(-parseInt(e(493))/4)+-parseInt(e(454))/5+parseInt(e(478))/6+parseInt(e(486))/7+parseInt(e(470))/8+-parseInt(e(455))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(c);class l{[r(488)];[r(484)];[r(463)];[r(456)]=new Map;constructor(t,e){const o=r;this[o(488)]=t,this[o(484)]=e[o(469)],this[o(463)]=e[o(474)]}[r(459)](){const t=r;this[t(456)][t(476)]()}[r(452)](t){const e=r,o=new Set,n=new Map;for(const i of t){if(e(461)===i[e(477)]&&e(481)!==i[e(464)]&&i[e(480)][e(453)]){const t=this[e(488)][e(483)](i[e(480)][e(453)]);for(const o of t[e(457)]()){if(!o.is(e(466),this[e(484)]))continue;const t=this[e(463)](o);n[e(490)](t)||n[e(491)](t,[]),n[e(451)](t)[e(485)](o)}}if(e(468)===i[e(477)]&&i[e(464)]===this[e(484)]){const t=this[e(463)]({getAttribute:t=>i[e(473)][e(451)](t)});o[e(475)](t)}}for(const[t,n]of this[e(456)])e(489)===n[e(467)][e(465)]&&o[e(475)](t);for(const t of o)this[e(456)][e(482)](t);for(const[t,o]of n)this[e(456)][e(491)](t,o[o[e(458)]-1]);const i=new Set;for(const[t,s]of n)o[e(490)](t)&&(i[e(475)](s[0]),s[e(458)]>1?n[e(491)](t,s[e(460)](1)):n[e(482)](t),o[e(482)](t));return{removed:Array[e(472)](o),inserted:Array[e(472)](n[e(479)]())[e(487)](),moved:Array[e(472)](i)}}}const u=h;function f(){const t=["_handleFootnotesDefinitionsObjectChanges","move","model","setFootnoteFormatter","find","_footnoteDefsContainerTracker","footnotes.multiBlock","getRootNames","_footnoteFormatter","some","94568opLusA","change:data","createPositionBefore","reset","62770wqXYDu","has","_footnoteDefsTracker","2785902vuENhY","high","49464USikYH","findIndex","isPremiumPlugin","_updateFootnoteRefCounter","$graveyard","root","from","compareWith","_footnotesDefinitions","listenTo","_footnotes","_handleFootnoteReferencesChanges","_sortFootnoteDefinitions","_ensureFootnotesReferencesHaveProperOrder","_handleInsertedFootnoteReference","6958470rksSZH","getFootnote","singleton","min","createRangeOn","splice","insert","footnoteInlineContent","push","_ensureFootnotesDefinitionsContainerExists","setAttribute","set","length","parent","3202284BmPHRt","FootnotesTracker","end","reference","_handleRemoveFootnoteReferenceById","enqueueChange","getFootnotes","footnoteRef","createRangeIn","getChanges","indexOf","getFootnotesFormatter","footnoteDefinition","add","_handleFootnotesDefinitionsObjectSync","append","195MioaFB","config","before","_updateFootnotesCounters","get","unshift","getChildren","getAttribute","_handleMovedFootnoteReference","_footnoteRefsTracker","differ","init","remove","createElement","1926aEEaXj","footnoteId","map","paragraph","editor","54BwOvVo","definition","19825720GiNBvW","createPositionAt","after","_handleFootnoteDefinitionsChanges","pluginName","registerPostFixer","footnotesDefinitions","rootName","document","getFootnotesDefinitionsObjectElement","childCount","isEqual","footnoteCounter","isOfficialPlugin","_insertEmptyFootnotesDefinitionsContainer","low"];return(f=function(){return t})()}!function(t){const e=h,o=t();for(;;)try{if(941859===parseInt(e(403))/1*(parseInt(e(472))/2)+parseInt(e(437))/3+-parseInt(e(399))/4*(parseInt(e(453))/5)+-parseInt(e(423))/6+-parseInt(e(406))/7+parseInt(e(408))/8*(-parseInt(e(467))/9)+parseInt(e(474))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(f);class d extends t.Plugin{[u(418)]=[];[u(416)]=null;[u(397)]=null;[u(394)];[u(462)];[u(405)];static get[u(478)](){return u(438)}static get[u(487)](){return!0}static get[u(410)](){return!0}constructor(t){const e=u;super(t),this[e(394)]=new l(this[e(471)][e(492)],{elementName:e(480),getElementKey:()=>e(425)}),this[e(462)]=new l(this[e(471)][e(492)],{elementName:e(444),getElementKey:t=>t[e(460)](e(468))}),this[e(405)]=new l(this[e(471)][e(492)],{elementName:e(449),getElementKey:t=>t[e(460)](e(468))})}[u(464)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(482)][t(479)](e=>{const n=t,i=o[n(482)][n(463)][n(446)]();let s=!1;return this[n(490)](e,i)&&(s=!0),this[n(477)](e,i)&&(s=!0),this[n(419)](e,i)&&(s=!0),this[n(421)](e)&&(s=!0),this[n(451)](e)&&(s=!0),this[n(420)](e)&&(s=!0),s}),this[t(417)](o[t(482)],t(400),()=>{const e=t;o[e(442)]({isUndoable:!1},t=>{this[e(432)](t)})},{priority:t(489)}),this[t(417)](n,t(434),()=>{const e=t;this[e(418)]=[],this[e(394)][e(402)](),this[e(462)][e(402)](),this[e(405)][e(402)]()},{priority:t(407)})}[u(483)](){return this[u(416)]}[u(424)](t){const e=u;return this[e(418)][e(494)](e=>e.id===t)||null}[u(443)](){const t=u;return Array[t(414)](this[t(418)])}[u(448)](){return this[u(397)]}[u(493)](t){this[u(397)]=t}[u(456)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(418)][o(435)];i++)this[o(411)](t,i)&&(n=!0);return n}[u(488)](t,e){const o=u,n=t[o(466)](o(480),{});return t[o(452)](n,e),this[o(416)]=n,n}[u(432)](t){const e=u;if(!this[e(418)][e(435)]||this[e(416)])return;const o=this[e(418)][0][e(440)][e(413)],n=this[e(488)](t,o);for(const o of this[e(418)])o[e(473)][e(436)]||t[e(429)](o[e(473)],n,e(439));this[e(456)](t)}[u(490)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(394)][o(446)](e);if(r[o(435)]&&(this[o(416)]=r[0]),i[o(435)])if(i[o(435)]>1||this[o(416)]&&i[o(398)](t=>t!==this[o(416)])){const e=t[o(466)](o(480),{}),s=[];this[o(416)]&&s[o(431)](this[o(416)]),s[o(431)](...i),t[o(429)](e,s[0],o(455));for(const n of s)t[o(491)](t[o(445)](n),t[o(475)](e,o(439))),t[o(465)](n);this[o(416)]=e,this[o(456)](t),n=!0}else this[o(416)]=i[0];if(s[o(435)]&&o(412)===this[o(416)]?.[o(413)][o(481)]){for(const e of this[o(418)])t[o(465)](e[o(440)]),n=!0;this[o(418)]=[],this[o(416)]=null}return n}[u(477)](t,e){const o=u;let n=!1;const i=this[o(471)][o(454)][o(457)](o(395)),{inserted:s,moved:r}=this[o(405)][o(446)](e);for(const e of[...r,...s]){const s=e[o(460)](o(468)),r=this[o(424)](s);r&&(r[o(473)]=e),p(t,i,e)&&(n=!0)}return n}[u(419)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(462)][o(446)](e);for(const e of i)this[o(441)](t,e)&&(n=!0);for(const e of s)this[o(422)](t,e)&&(n=!0);for(const e of r)this[o(461)](t,e)&&(n=!0);return n}[u(451)](t){const e=u;if(!this[e(416)])return!1;let o=!1;if(this[e(416)][e(484)]!==this[e(418)][e(435)]){const n=[];for(const t of this[e(416)][e(459)]()){const i=t[e(460)](e(468));this[e(424)](i)||(n[e(458)](t),o=!0)}for(const o of n)t[e(465)](o)}const n=new Set,i=[];for(const t of this[e(416)][e(459)]()){const s=t[e(460)](e(468));n[e(404)](s)?(i[e(458)](t),o=!0):n[e(450)](s)}for(const o of i)t[e(465)](o);return this[e(416)][e(484)]||(t[e(465)](this[e(416)]),this[e(416)]=null,o=!0),o}[u(422)](t,e){const o=u;if(this[o(418)][o(494)](t=>t[o(440)]===e))return!1;let n=!1;const i=e[o(460)](o(468)),s=this[o(418)][o(409)](t=>t.id===i);-1!==s&&(t[o(465)](this[o(418)][s][o(440)]),this[o(418)][o(428)](s,1),n=!0);let r=this[o(416)]?function(t,e){const n=o;for(const o of t[n(459)]())if(o[n(460)](n(468))===e)return o;return null}(this[o(416)],i):null;r||(r=t[o(466)](o(449),{footnoteId:i}),this[o(416)]&&(t[o(429)](r,this[o(416)],o(439)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(471)][o(492)],this[o(418)],e);this[o(418)][o(428)](c,0,a);let l=c;return-1!==s&&(l=Math[o(426)](c,s)),this[o(456)](t,l)&&(n=!0),n}[u(441)](t,e){const o=u,n=this[o(418)][o(409)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(418)][n];return o(412)!==s[o(473)][o(413)][o(481)]&&(t[o(465)](s[o(473)]),i=!0),this[o(418)][o(428)](n,1),this[o(456)](t,n)&&(i=!0),i}[u(461)](t,e){const o=u,n=e[o(460)](o(468)),i=this[o(418)][o(409)](t=>t.id===n),s=this[o(418)][i];let r=!1;s[o(440)]=e,this[o(418)][o(428)](i,1);const a=m(this[o(471)][o(492)],this[o(418)],e);return this[o(418)][o(428)](a,0,s),this[o(456)](t,Math[o(426)](i,a))&&(r=!0),r}[u(411)](t,e){const o=u;if(!this[o(416)])return!1;const n=this[o(418)][e];let i;return i=this[o(397)]?this[o(397)]({footnote:n,container:this[o(416)],digits:String(this[o(418)][o(435)])[o(435)],value:e+1}):String(e+1),n[o(440)][o(460)](o(486))!=i&&(t[o(433)](o(486),i,n[o(440)]),!0)}[u(420)](t){const e=u;if(!this[e(416)]||this[e(418)][e(435)]<2)return!1;if(function(t,o){const n=e;if(t[n(435)]!==o[n(435)])return!1;for(let e=0;e<t[n(435)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(418)][e(469)](t=>t.id),Array[e(414)](this[e(416)][e(459)]())[e(469)](t=>t[e(460)](e(468)))))return!1;let o=!1;for(let n=0;n<this[e(418)][e(435)];n++){const i=this[e(418)][n],s=t[e(401)](i[e(473)]),r=t[e(475)](this[e(416)],n);s[e(485)](r)||(t[e(491)](t[e(427)](i[e(473)]),r),o=!0)}return o}[u(421)](t){const e=u;if(!this[e(418)][e(435)])return!1;const{model:o}=this[e(471)];let n=!1;for(let i=0;i<this[e(418)][e(435)]-1;i++){const s=this[e(418)][i],r=this[e(418)][i+1],a=o[e(401)](s[e(440)]),c=o[e(401)](r[e(440)]);e(476)===a[e(415)](c)&&(this[e(461)](t,s[e(440)]),i=-1,n=!0)}return n}}function p(t,e,o){const n=u;if(o[n(484)])return!1;const i=n(e?470:430);return t[n(429)](t[n(466)](i),o),!0}function h(t,e){const o=f();return(h=function(t,e){return o[t-=394]})(t,e)}function m(t,e,o){const n=u;if(0===e[n(435)])return 0;const i=t[n(401)](o);for(let o=0;o<e[n(435)];o++){const s=e[o],r=t[n(401)](s[n(440)]);if(n(455)===i[n(415)](r))return o}const s=o[n(413)];let r=-1;for(let t=e[n(435)]-1;t>=0;t--)if(e[t][n(440)][n(413)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(482)][n(396)](),c=a[n(447)](s[n(481)]),l=a[c+1];if(l)for(let t=0;t<e[n(435)];t++)if(e[t][n(440)][n(413)][n(481)]===l)return t;return e[n(435)]}const g=y;function w(){const t=["6tgrkvo","20gXWLDN","isEnabled","length","plugins","isBlock","footnoteId","insertObject","insert-footnote-command-executed-with-invalid-id","test","execute","1364830ReGFHA","get","2677905tasaPJ","selection","_getPositionToInsertFootnote","string","editor","getItems","getFirstRange","2718749xxRQRD","checkChild","document","3TIJbsZ","674222homXcj","_moveSelectionToFootnoteDefinition","188321qFJpSU","end","1832348OUYNJu","footnoteRef","isObject","refresh","createElement","change","8DxeORZ","FootnotesEditing","model","3313444sjiQdU"];return(w=function(){return t})()}function y(t,e){const o=w();return(y=function(t,e){return o[t-=177]})(t,e)}!function(t){const e=y,o=t();for(;;)try{if(422438===parseInt(e(194))/1+-parseInt(e(192))/2+-parseInt(e(191))/3*(-parseInt(e(205))/4)+parseInt(e(179))/5*(parseInt(e(206))/6)+parseInt(e(196))/7+-parseInt(e(202))/8*(parseInt(e(181))/9)+-parseInt(e(207))/10*(parseInt(e(188))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(w);class b extends t.Command{[g(199)](){const t=g,e=this[t(185)][t(204)][t(190)][t(182)],o=this[t(183)](e);this[t(208)]=!!o}[g(178)](t){const e=g,{editor:o}=this,{model:n}=o,{selection:s}=n[e(190)],r=this[e(183)](s);if(!r)return;const a=o[e(210)][e(180)](e(203)),c=t?.[e(212)]??(0,i.uid)();!function(t){const o=e;return o(184)==typeof t&&t[o(209)]>0&&!/\s/[o(177)](t)&&!/^\d/[o(177)](t)}(c)?(0,i.logWarning)(e(214)):(n[e(201)](t=>{const o=e,i=t[o(200)](o(197),{footnoteId:c});n[o(213)](i,r,null)}),a[e(193)](c))}[g(183)](t){const e=g,{model:o}=this[e(185)],{schema:n}=o,i=t[e(187)]();for(const t of i[e(186)]())if(n[e(211)](t)||n[e(198)](t))return null;const s=i[e(195)];return n[e(189)](s,e(197))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),o=window[m([68,97,116,101])][m([110,111,119])](),n=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{n[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=n[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;n[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),o[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function o(t){for(let o=0;o<t[m([108,101,110,103,116,104])];o++){const n=t[m([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function p(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function h(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let o=m([117]);for(let n=0;n<t[m([108,101,110,103,116,104])];n+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,n[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=h,n[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,n[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&o()?e:null;function o(){const t=e[m([106,116,105])],o=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),n={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete n[m([118,99])],f(n)==o}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),n[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function h(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(n){a(n)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),n=p(d(window[m([77,97,116,104])][m([99,101,105,108])](o/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,n)}function r(){const e=m([108,108,99,116,45])+d(f(t)),o=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return o?window[m([112,97,114,115,101,73,110,116])](p(o),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,o)=>{t[m([116,104,101,110])](e,o),window[m([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,o)=>{if(o[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{h(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const n=a[m([115,112,108,105,116])](m([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=l(e);o&&o[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(n),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+o),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1765324800;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](o))return!0;const n=o[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=n[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(n[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>n[m([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&h?new(window[m([80,114,111,109,105,115,101])])((t,o)=>{e[m([116,104,101,110])](t,o),h[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},o)}):e||h||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),o.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(i.reference,"on")}),o.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:o,editing:n}=t,{t:i}=t.locale;o.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:o})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;o.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of n.view.createRangeIn(i))t.is("$textProxy")?o.consume(t.textNode,{name:!0}):t.is("element")&&o.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),o.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),o.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:o})=>{const n=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,o),o,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",n)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:o}=t.locale,{conversion:n}=t;n.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),n.for("upcast").add(t=>{t.on("element:ol",(t,e,o)=>{const n=e.viewItem;if(!n.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!o.consumable.consume(n,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=o.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,o)=>{const n=e.viewItem;n.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&o.consumable.consume(n,{name:!0,classes:"footnotes-divider"})})}),n.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>x(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=x(n,{"data-footnotes-list-label":o("Footnotes")}),s=(0,e.toWidget)(i,n,{hasSelectionHandle:!0,label:o("Footnotes")});return n.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:o}=t,n=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,o)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!o.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=o.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!o.safeInsert(r,e.modelCursor))return;o.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(o.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),o.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(n)o.convertChildren(a,r);else{const t=o.writer.createElement("footnoteInlineContent");o.writer.insert(t,r),o.convertChildren(a,t)}o.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>T(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>T(t,e,o)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const o=t.document.differ,n=new Set;for(const t of o.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&n.add(e)}for(const t of n.values()){const o=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of o)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const o=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:o,t:n}=t,i=t.model.document.selection;t.keystrokes.set("Ctrl+Alt+F","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Alt+F"}]}),this.listenTo(o.view.document,"enter",(t,e)=>{const o=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(o){const n=o.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(n),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let o=!1;this.listenTo(e.view.document,"pointerdown",(t,n)=>{const{target:i}=n,s=e.view.document.selection;o=!!(i?.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n?.is("element","a"))return;if(n.parent?.is("element","sup")&&n.parent.hasClass("footnote")&&!o)return void e.preventDefault();let i=n.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:o})=>{if(!k(e))return null;if(!t)return o.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const o=e.toViewElement(t);return!!o&&k(t)!==o.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function x(t,e={}){const o=t.createEmptyElement("hr",{class:"footnotes-divider"}),n=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[o,n])}function E(t,e){const o=t.getAttribute("footnoteId"),n=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+o},function(t){const e=this.toDomElement(t);return e.textContent=n,e}),s=e.createContainerElement("sup",{id:"ref-"+o,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function T(t,o,n,{dataPipeline:i}={}){const{t:s}=n,r=t.getAttribute("footnoteId"),a=o.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?o.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(o.createEditableElement("div",{class:"footnote-content"}),o,{label:s("Footnote content.")});return o.insert(o.createPositionAt(c,0),o.createSlot()),o.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var P=o(331);const S=A;function D(){const t=["push","method","_defineClipboardIntegration","270313XOjavk","footnoteInlineContent","getFootnotes","createRangeIn","563087TFzuUc","759835liIDHl","htmlProcessor","footnotesDefinitions","content","_insertEmptyFootnotesDefinitionsContainer","32PaRPdL","_handleCopyFootnotesDefinitions","element","document","drop","listenTo","_handlePasteFootnotesDefinitions","reduce","setData","insert","stringify","parse","application/ckeditor5-footnotes","end","getFirstRange","562743tZJlXZ","includes","toView","footnoteId","get","setAttribute","change","length","FootnotesClipboard","root","remove","isOfficialPlugin","getFootnotesDefinitionsObjectElement","append","isPremiumPlugin","toModel","4wIxAlM","dataTransfer","55KRmSEx","sourceEditorId","getSelectedBlocks","createElement","outputTransformation","config","305367sFGnZU","getAttribute","entries","editor","footnotes.multiBlock","toData","find","selection","pluginName","680718iJCxfl","clipboardInput","contentInsertion","getRanges","from","create","footnoteDefinition","getFootnote","4PdZAma","add","1291420VTdVyz","editing","data","getData","flatMap","footnoteRef","requires","definition","init"];return(D=function(){return t})()}function A(t,e){const o=D();return(A=function(t,e){return o[t-=458]})(t,e)}!function(t){const e=A,o=t();for(;;)try{if(165636===-parseInt(e(527))/1+-parseInt(e(488))/2*(parseInt(e(496))/3)+-parseInt(e(513))/4*(parseInt(e(532))/5)+-parseInt(e(505))/6+-parseInt(e(531))/7*(-parseInt(e(537))/8)+-parseInt(e(472))/9+parseInt(e(515))/10*(parseInt(e(490))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(D);class _ extends t.Plugin{static get[S(504)](){return S(480)}static get[S(521)](){return[v,P.ClipboardPipeline]}static get[S(483)](){return!0}static get[S(486)](){return!0}[S(523)](){this[S(526)]()}[S(526)](){const t=S;this[t(458)](),this[t(463)]()}[S(458)](){const t=S,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(476)](P.ClipboardPipeline),s=o[t(476)](d);this[t(462)](i,t(494),(o,i)=>{const r=t,a=L(n[r(530)](i[r(535)]));if(!a[r(479)])return;const c=s[r(529)](),l=a[r(464)]((t,o)=>{const n=r,i=c[n(502)](t=>t.id===o);if(i){const o=e[n(517)][n(474)](i[n(522)],{isClipboardPipeline:!0}),s=e[n(517)][n(533)][n(501)](o);t[i.id]=s}return t},Object[r(510)](null));i[r(489)][r(465)](r(469),JSON[r(467)](l))})}[S(463)](){const t=S,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(516)],r=n[t(476)](P.ClipboardPipeline),a=n[t(476)](d),c=e[t(495)][t(476)](t(500));let l=null;this[t(462)](s[t(460)],t(506),(e,o)=>{const n=t,i=o[n(489)][n(518)](n(469));l=i?JSON[n(468)](i):null}),this[t(462)](r,t(507),(n,s)=>{const r=t,u=s[r(491)]===this[r(499)].id;u&&r(461)===s[r(525)]||o[r(478)](t=>{const n=r;let f=a[n(484)]();const d=!!f&&Array[n(509)](o[n(460)][n(503)][n(492)]())[n(473)](f);if((f&&!d||!f&&!l)&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(530)](e))n.is(o(459),o(534))&&i[o(524)](n);for(const e of i)t[o(482)](e)}(t,s[n(535)]),!l)return;const{selection:p}=o[n(460)],h=p[n(471)]()[n(481)];f&&!d||(f=function(t,e){const o=n;for(const{item:n}of t[o(530)](e))if(n.is(o(459),o(534)))return n;return null}(t,s[n(535)]),f||=a[n(536)](t,h));const m=Array[n(509)](p[n(508)]())[n(519)](L),g=function(t,e,o){const s=n,r=Object[s(510)](null);for(const{item:n}of t[s(530)](e))if(n.is(s(459),s(520))){const e=n[s(497)](s(475));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(477)](s(475),r[e],n)}return r}(t,s[n(535)],t=>{const e=n;return!u||!!a[e(512)](t)&&!m[e(473)](t)});for(const[o,i]of Object[n(498)](l)){const s=g[o]||o,r=t[n(493)](n(511),{footnoteId:s}),a=e[n(517)][n(533)][n(474)](i);let l;if(c)l=e[n(517)][n(487)](a,r);else{l=t[n(493)](n(528));const o=e[n(517)][n(487)](a,l);t[n(466)](o,l)}t[n(485)](l,r),t[n(466)](r,f,n(470))}l=null})})}}function L(t){const e=S,o=new Set;for(const{item:n}of t)n.is(e(459),e(520))&&o[e(514)](n[e(497)](e(475)));return Array[e(509)](o)}var R=o(311),V=o(355),N=o(929),O=o.n(N),K=o(297),j=o.n(K),M=o(102),U=o.n(M),B=o(123),W=o.n(B),z=o(741),q=o.n(z),H=o(728),J={attributes:{"data-cke":!0}};J.setAttributes=W(),J.insert=U().bind(null,"head"),J.domAPI=j(),J.insertStyleElement=q();O()(H.A,J);H.A&&H.A.locals&&H.A.locals;class X extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",G(t,R.ButtonView)),e.add("menuBar:insertFootnote",G(t,R.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const o=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in o){const n=e,i=o[n];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&o._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function G(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof R.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:V.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}function Y(){var t=["6492462sKCHBv","isOfficialPlugin","499640cDdHNn","5714305dCprXR","2537012MTymZw","isPremiumPlugin","13799394ZzfIzh","3079983AMoMaW","1143136swBaGq","pluginName","Footnotes","requires"];return(Y=function(){return t})()}var Z=Q;function Q(t,e){var o=Y();return(Q=function(t,e){return o[t-=349]})(t,e)}!function(t){for(var e=Q,o=t();;)try{if(746402===-parseInt(e(360))/1+parseInt(e(354))/2+-parseInt(e(359))/3+parseInt(e(356))/4+parseInt(e(355))/5+-parseInt(e(352))/6+parseInt(e(358))/7)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Y);class $ extends t.Plugin{static get[Z(349)](){return Z(350)}static get[Z(351)](){return[v,_,X]}static get[Z(353)](){return!0}static get[Z(357)](){return!0}}const tt=et;function et(t,e){const o=nt();return(et=function(t,e){return o[t-=132]})(t,e)}!function(t){const e=et,o=t();for(;;)try{if(832630===-parseInt(e(146))/1+parseInt(e(137))/2+-parseInt(e(141))/3+-parseInt(e(140))/4*(parseInt(e(145))/5)+-parseInt(e(133))/6*(parseInt(e(135))/7)+-parseInt(e(132))/8+parseInt(e(143))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(nt);const ot=[tt(147),tt(134),tt(139),tt(136),tt(148),tt(138),tt(144),tt(142)];function nt(){const t=["upper-roman","23712525TtvfDW","lower-roman","70DrupUU","120529RqkEsO","decimal","lower-alpha","12093296ozgbKQ","6BmJTel","decimal-leading-zero","58989pSOgRJ","upper-latin","2936850LhUfNF","upper-alpha","lower-latin","227312yNKgBn","2502930mnwvxs"];return(nt=function(){return t})()}const it=rt;function st(){const t=["3978591tzqBGD","6lQneQO","56oxBlUC","isEnabled","includes","835394MCUuEX","getAttribute","44thnzwv","get","3902530nUUtrU","_updateFootnotesCounters","footnotesListStyle","getFootnotesDefinitionsObjectElement","change","execute","650964ncLYSq","plugins","6314024rTjOAY","9DXTzYv","144190QLMGfT","refresh","value","setAttribute","model","275naxooP","24446qUWFQj"];return(st=function(){return t})()}function rt(t,e){const o=st();return(rt=function(t,e){return o[t-=116]})(t,e)}!function(t){const e=rt,o=t();for(;;)try{if(855634===parseInt(e(118))/1*(parseInt(e(121))/2)+parseInt(e(119))/3+parseInt(e(126))/4*(-parseInt(e(138))/5)+-parseInt(e(120))/6*(-parseInt(e(124))/7)+-parseInt(e(136))/8*(-parseInt(e(137))/9)+-parseInt(e(128))/10+-parseInt(e(117))/11*(parseInt(e(134))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(st);class at extends t.Command{[it(139)](){const t=it,{editor:e}=this,o=e[t(135)][t(127)](d)[t(131)]();this[t(122)]=!!o,this[t(140)]=o?.[t(125)](t(130))??null}[it(133)]({value:t}){const e=it,{editor:o}=this,n=o[e(135)][e(127)](d),i=n[e(131)]();i&&ot[e(123)](t)&&o[e(116)][e(132)](o=>{const s=e;o[s(141)](s(130),t,i),n[s(129)](o)})}}function ct(){const t=["1173690psrdaa","getAttribute","3859788cJrRWz","21773510najZxm","get","isInteger","refresh","1293zYkjtu","3303GVayOa","setAttribute","change","432qKLqzm","62tPZIap","1771ZszHlt","model","_updateFootnotesCounters","footnotesListStart","11124DWWfnr","value","execute","214wsKPXP","getFootnotesDefinitionsObjectElement","isEnabled","plugins","23960TKNAav"];return(ct=function(){return t})()}function lt(t,e){const o=ct();return(lt=function(t,e){return o[t-=358]})(t,e)}const ut=lt;!function(t){const e=lt,o=t();for(;;)try{if(799799===-parseInt(e(374))/1*(-parseInt(e(382))/2)+parseInt(e(369))/3*(-parseInt(e(379))/4)+parseInt(e(362))/5+parseInt(e(364))/6+-parseInt(e(375))/7*(-parseInt(e(373))/8)+-parseInt(e(370))/9*(parseInt(e(361))/10)+parseInt(e(365))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ct);class ft extends t.Command{[ut(368)](){const t=ut,{editor:e}=this,o=e[t(360)][t(366)](d)[t(358)]();this[t(359)]=!!o,this[t(380)]=o?.[t(363)](t(378))??null}[ut(381)]({value:t}){const e=ut,{editor:o}=this,n=o[e(360)][e(366)](d),i=n[e(358)]();i&&Number[e(367)](t)&&o[e(376)][e(372)](o=>{const s=e;o[s(371)](s(378),t,i),n[s(377)](o)})}}const dt=ht;function pt(){const t=["_formatFootnoteListValue","footnotesDefinitions","floor","_defineFormatter","footnotesListStart","get","977814xRFRdg","nodeAfter","_defineSchema","upper-roman","from","isOfficialPlugin","insert","toLowerCase","list-style-type","fromCharCode","footnotes-list","decimal-leading-zero","mapper","FootnotesPropertiesEditing","attribute:footnotesListStyle:footnotesDefinitions","differ","_defineConverters","setAttribute","6DnmpgX","1508360LyuKhC","footnotesListStyle","_getDefaultStartIndex","item","toUpperCase","type","add","getStyle","setStyle","define","position","getItems","_definePostfixer","_updateFootnotesCounters","pluginName","parseInt","$text","find","requires","writer","padStart","upper-alpha","footnotes.footnotesProperties.defaultListStyle","hasClass","document","parent","plugins","1083296yMHviP","footnotesStyle","consume","upper-latin","isNaN","isPremiumPlugin","lower-alpha","consumable","editor","schema","config","createRangeOn","lower-latin","25tXMbPy","669822pUqYCT","206084NbJxss","getAttribute","footnotesStart","_getDefaultListStyle","viewItem","14849NYjhYM","1895993rfDjLB","checkAttribute","getChildren","upcast","removeAttribute","element","2TpJnJY","max","init","hasAttribute","footnotes.footnotesProperties.defaultStartIndex","extend","setFootnoteFormatter","name","element:ol","registerPostFixer","commands","start","toViewElement","lower-roman","modelCursor","model","downcast","getChanges","for","attribute:footnotesListStart:footnotesDefinitions","decimal","removeStyle","10FUmXFS"];return(pt=function(){return t})()}function ht(t,e){const o=pt();return(ht=function(t,e){return o[t-=281]})(t,e)}!function(t){const e=ht,o=t();for(;;)try{if(136173===-parseInt(e(344))/1+parseInt(e(351))/2*(-parseInt(e(338))/3)+-parseInt(e(339))/4*(parseInt(e(337))/5)+-parseInt(e(296))/6*(-parseInt(e(297))/7)+parseInt(e(324))/8+parseInt(e(380))/9*(parseInt(e(373))/10)+parseInt(e(345))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(pt);class mt extends t.Plugin{static get[dt(311)](){return dt(291)}static get[dt(315)](){return[v,d]}static get[dt(283)](){return!0}static get[dt(329)](){return!0}[dt(353)](){const t=dt,{editor:e}=this;e[t(334)][t(306)](t(319),t(371)),e[t(334)][t(306)](t(355),1),e[t(361)][t(303)](t(325),new at(e)),e[t(361)][t(303)](t(341),new ft(e)),this[t(382)](),this[t(294)](),this[t(377)](),this[t(309)]()}[dt(382)](){const t=dt,{editor:e}=this,{schema:o}=e[t(366)];o[t(356)](t(375),{allowAttributes:[t(298),t(378)]})}[dt(294)](){const t=dt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(369)](t(348))[t(303)](e=>{const o=t;e.on(o(359),(t,e,n)=>{const s=o,r=e[s(343)],a=e[s(365)]?.[s(322)];r[s(320)](s(288))&&a?.is(s(350),s(375))&&(function(t,e,o,n){const i=s;if(!n[i(346)](e,i(378)))return;let r=1;const a=o[i(331)][i(326)](t,{attributes:i(362)});if(a){const e=Number[i(312)](t[i(340)](i(362)),10);Number[i(328)](e)||(r=e)}!a&&e[i(354)](i(378))||o[i(316)][i(295)](i(378),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(346)](e,i(298)))return;let r=i(371),a=!1;if(o[i(331)][i(326)](t,{attributes:i(302)})){const e={1:i(371),a:i(330),A:i(318),i:i(364),I:i(281)}[t[i(340)](i(302))];e&&(r=e),a=!0}o[i(331)][i(326)](t,{styles:i(286)})&&(r=function(t){const e=i;switch(t){case e(330):return e(336);case e(318):return e(327);default:return t}}(t[i(304)](i(286))),a=!0),!a&&e[i(354)](i(298))||o[i(316)][i(295)](i(298),r,e)}(r,a,n,i))})}),o[t(369)](t(367))[t(303)](e=>{const o=t;e.on(o(370),(t,e,n)=>{const i=o;if(!n[i(331)][i(326)](e[i(300)],t[i(358)]))return;const s=gt(e[i(300)],n[i(290)]),{attributeNewValue:r}=e;null==r||1===r?n[i(316)][i(349)](i(362),s):n[i(316)][i(295)](i(362),String(r),s)}),e.on(o(292),(t,e,n)=>{const i=o;if(!n[i(331)][i(326)](e[i(300)],t[i(358)]))return;const s=gt(e[i(300)],n[i(290)]),{attributeNewValue:r}=e;r&&i(371)!==r?n[i(316)][i(305)](i(286),r,s):n[i(316)][i(372)](i(286),s)})})}[dt(309)](){const t=dt,{editor:e}=this,{model:o}=e,n=e[t(323)][t(379)](d),i=this[t(342)](),s=this[t(299)]();o[t(321)][t(360)](e=>{const r=t,a=o[r(321)][r(293)][r(368)]();let c=!1;for(const t of a){if(r(284)!==t[r(302)]||r(313)===t[r(358)])continue;const n=o[r(335)](t[r(307)][r(381)]);for(const t of n[r(308)]())t.is(r(350),r(375))&&(!t[r(354)](r(378))&&o[r(333)][r(346)](t,r(378))&&(e[r(295)](r(378),s,t),c=!0),!t[r(354)](r(298))&&o[r(333)][r(346)](t,r(298))&&(e[r(295)](r(298),i,t),c=!0))}return c&&n[r(310)](e),c})}[dt(377)](){const t=dt,{editor:e}=this;e[t(323)][t(379)](d)[t(357)](e=>this[t(374)](e))}[dt(342)](){const t=dt;return this[t(332)][t(334)][t(379)](t(319))}[dt(299)](){const t=dt;return this[t(332)][t(334)][t(379)](t(355))}[dt(374)]({container:t,value:e,digits:o}){const n=dt,i=t[n(340)](n(298)),s=t[n(340)](n(378)),r=Math[n(376)](e)+(s??1)-1;switch(i){case n(289):return function(t,e){const o=n;return String(t)[o(317)](e,"0")}(r,Math[n(352)](2,o));case n(330):case n(336):return wt(r,!1);case n(318):case n(327):return wt(r,!0);case n(364):return bt(r,!1);case n(281):return bt(r,!0);default:return String(r)}}}function gt(t,e){const o=dt,n=e[o(363)](t);return Array[o(282)](n[o(347)]())[o(314)](t=>t.is(o(350),"ol")&&t[o(320)](o(288)))}function wt(t,e){const o=dt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(287)](97+t)+n,i=Math[o(376)]((i-1)/26)}return e?n[o(301)]():n}const yt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function bt(t,e){const o=dt;let n="",i=t;for(const{value:t,numeral:e}of yt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(285)]()}class vt extends R.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new R.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new R.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,o),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,R.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const o=new R.View(this.locale);return o.children=o.createCollection(),o.children.addMany(t),o.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:o.children}),o.children.delegate("execute").to(this),o.focus=function(){for(const t of this.children)if(t instanceof R.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},o.focusTracker=new i.FocusTracker,o.keystrokes=new i.KeystrokeHandler,o.render(),o.keystrokes.listenTo(o.element),this.children.add(o),o}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),o=[e],n=new R.CollapsibleView(this.locale,o);return n.set({label:t("Footnotes properties"),isCollapsed:!0}),n.buttonView.bind("isEnabled").toMany(o,"isEnabled",(...t)=>t.some(t=>t)),n.buttonView.on("change:isEnabled",(t,e,o)=>{o||(n.isCollapsed=!0)}),this.children.add(n),[e,n]}_createStartIndexPropertyView(){const{t}=this.locale,e=new R.LabeledFieldView(this.locale,R.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const o=e.fieldView.element,n=o.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid footnotes start index value."):o.checkValidity()?this.fire("footnotesListStart",{startIndex:n}):e.errorText=t(n<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var It=o(291),kt={attributes:{"data-cke":!0}};kt.setAttributes=W(),kt.insert=U().bind(null,"head"),kt.domAPI=j(),kt.insertStyleElement=q();O()(It.A,kt);It.A&&It.A.locals&&It.A.locals;class Ct extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[R.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var o;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(o=t,t=>{const{t:e}=t,n=o.commands.get("footnotesStyle"),i=(0,R.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(n,"isEnabled"),s.set({label:e("Footnotes style"),icon:V.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:o}=t.locale,n=o("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:V.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:V.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:V.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:V.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:V.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:V.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:o,icon:n,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new R.ButtonView(e);return a.set({label:o,icon:n,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new vt(t.locale,{styleGridAriaLabel:n,styleButtonViews:i}),r=t.commands.get("footnotesStart");return s.startIndexFieldView.bind("isEnabled").to(r),s.startIndexFieldView.fieldView.bind("value").to(r),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s.delegate("execute").to(e),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=R.BalloonPanelView;n.register("footnotesDefinitions",{ariaLabel:o("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}var Ft=xt;function xt(t,e){var o=Tt();return(xt=function(t,e){return o[t-=351]})(t,e)}!function(t){for(var e=xt,o=t();;)try{if(365046===-parseInt(e(352))/1*(-parseInt(e(355))/2)+-parseInt(e(358))/3*(-parseInt(e(353))/4)+parseInt(e(367))/5+-parseInt(e(356))/6*(parseInt(e(359))/7)+parseInt(e(364))/8*(-parseInt(e(351))/9)+parseInt(e(360))/10*(parseInt(e(354))/11)+-parseInt(e(361))/12*(parseInt(e(363))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Tt);class Et extends t.Plugin{static get[Ft(362)](){return Ft(365)}static get[Ft(368)](){return[mt,Ct]}static get[Ft(357)](){return!0}static get[Ft(366)](){return!0}}function Tt(){var t=["804282Leecun","isOfficialPlugin","3vlqqVM","7rYlytn","2980060ErQTMD","12cstLaK","pluginName","7152197TaOvXD","2265096XayFRQ","FootnotesProperties","isPremiumPlugin","1132155rJEOLh","requires","9UuqJuY","112cjAbtn","519208JZXDNG","11UJmZVe","12110AkImJR"];return(Tt=function(){return t})()}function Pt(t,e){var o=St();return(Pt=function(t,e){return o[t-=119]})(t,e)}function St(){var t=["876492CISUiS","3877492AyLTIl","2324264nJacGr","32515aiqNYR","3373pXIeuY","1878meWbFb","6915360kMQnNL","478QWEsmK","3972485sTZsGV","9Riursl"];return(St=function(){return t})()}!function(t){for(var e=Pt,o=t();;)try{if(801371===-parseInt(e(124))/1*(-parseInt(e(127))/2)+parseInt(e(120))/3+parseInt(e(121))/4+-parseInt(e(128))/5+parseInt(e(125))/6*(-parseInt(e(123))/7)+parseInt(e(122))/8*(parseInt(e(119))/9)+parseInt(e(126))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(St)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
5
+ */(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r},297:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=o(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},728:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var f=[].concat(t[l]);n&&r[f[0]]||(void 0!==s&&(void 0===f[5]||(f[1]="@layer".concat(f[5].length>0?" ".concat(f[5]):""," {").concat(f[1],"}")),f[5]=s),o&&(f[2]?(f[1]="@media ".concat(f[2]," {").concat(f[1],"}"),f[2]=o):f[2]=o),i&&(f[4]?(f[1]="@supports (".concat(f[4],") {").concat(f[1],"}"),f[4]=i):f[4]="".concat(i)),e.push(f))}},e}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},929:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],f=s[l]||0,u="".concat(l," ").concat(f);s[l]=f+1;var d=o(u),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,n);n.byIndex=a,e.splice(a,0,{identifier:u,updater:p,references:1})}r.push(u)}return r}function i(t,e){var o=e.domAPI(e);o.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var s=n(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=o(s[r]);e[a].references--}for(var c=n(t,i),l=0;l<s.length;l++){var f=o(s[l]);0===e[f].references&&(e[f].updater(),e.splice(f,1))}s=c}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>$,FootnotesClipboard:()=>T,FootnotesEditing:()=>v,FootnotesProperties:()=>St,FootnotesPropertiesEditing:()=>pt,FootnotesPropertiesUI:()=>Ct,FootnotesStartCommand:()=>ft,FootnotesStyleCommand:()=>at,FootnotesTracker:()=>d,FootnotesUI:()=>X,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);const r=a;function a(t,e){const o=c();return(a=function(t,e){return o[t-=391]})(t,e)}function c(){const t=["type","remove","$text","799803TkCREp","has","position","attributes","length","_getElementKey","flat","clear","root","set","2fHYzeJ","get","_trackedElements","elementName","element","11QAxbFh","getItems","1156370WiGiWy","getElementKey","5812068tFHUsA","values","32779476wCzLqS","55833fmrSQI","getChanges","add","rootName","insert","7DserwJ","nodeAfter","8odfbrU","reset","slice","from","$graveyard","7732lwTKvm","delete","240ASGvYJ","createRangeOn","_model","push","_elementName","7386830sKDXFk","name"];return(c=function(){return t})()}!function(t){const e=a,o=t();for(;;)try{if(493648===parseInt(e(423))/1*(-parseInt(e(411))/2)+parseInt(e(391))/3*(-parseInt(e(435))/4)+-parseInt(e(418))/5+parseInt(e(420))/6*(-parseInt(e(428))/7)+-parseInt(e(430))/8*(parseInt(e(401))/9)+-parseInt(e(396))/10*(parseInt(e(416))/11)+parseInt(e(422))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(c);class l{[r(393)];[r(395)];[r(406)];[r(413)]=new Map;constructor(t,e){const o=r;this[o(393)]=t,this[o(395)]=e[o(414)],this[o(406)]=e[o(419)]}[r(431)](){const t=r;this[t(413)][t(408)]()}[r(424)](t){const e=r,o=new Set,n=new Map;for(const i of t){if(e(427)===i[e(398)]&&e(400)!==i[e(397)]&&i[e(403)][e(429)]){const t=this[e(393)][e(392)](i[e(403)][e(429)]);for(const o of t[e(417)]()){if(!o.is(e(415),this[e(395)]))continue;const t=this[e(406)](o);n[e(402)](t)||n[e(410)](t,[]),n[e(412)](t)[e(394)](o)}}if(e(399)===i[e(398)]&&i[e(397)]===this[e(395)]){const t=this[e(406)]({getAttribute:t=>i[e(404)][e(412)](t)});o[e(425)](t)}}for(const[t,n]of this[e(413)])e(434)===n[e(409)][e(426)]&&o[e(425)](t);for(const t of o)this[e(413)][e(436)](t);for(const[t,o]of n)this[e(413)][e(410)](t,o[o[e(405)]-1]);const i=new Set;for(const[t,s]of n)o[e(402)](t)&&(i[e(425)](s[0]),s[e(405)]>1?n[e(410)](t,s[e(432)](1)):n[e(436)](t),o[e(436)](t));return{removed:Array[e(433)](o),inserted:Array[e(433)](n[e(421)]())[e(407)](),moved:Array[e(433)](i)}}}function f(){const t=["_insertEmptyFootnotesDefinitionsContainer","getChanges","pluginName","footnotes.multiBlock","_handleFootnotesDefinitionsObjectChanges","remove","get","find","singleton","setFootnoteFormatter","push","876372mSBilO","497XXroyo","footnoteId","isOfficialPlugin","886929eHYiRP","690wSsjRh","_handleMovedFootnoteReference","editor","childCount","getFootnotesDefinitionsObjectElement","low","definition","model","add","_handleFootnoteReferencesChanges","createRangeIn","high","footnoteDefinition","splice","isEqual","createPositionBefore","_handleFootnoteDefinitionsChanges","before","listenTo","rootName","indexOf","getFootnotesFormatter","845684LXqRYp","parent","_footnoteDefsTracker","55448mdYrRE","footnotesDefinitions","config","min","_footnoteDefsContainerTracker","enqueueChange","footnoteCounter","FootnotesTracker","$graveyard","_handleFootnotesDefinitionsObjectSync","reset","findIndex","createRangeOn","isPremiumPlugin","getChildren","36AlNnex","root","footnoteRef","_updateFootnoteRefCounter","_footnoteRefsTracker","map","length","getFootnote","move","compareWith","7435RUfwaT","some","1026990XyMmVN","append","createPositionAt","from","_handleRemoveFootnoteReferenceById","has","_ensureFootnotesDefinitionsContainerExists","footnoteInlineContent","registerPostFixer","setAttribute","_footnoteFormatter","getAttribute","_updateFootnotesCounters","501354FxNlTK","end","set","document","after","_footnotes","differ","paragraph","_handleInsertedFootnoteReference","insert","_ensureFootnotesReferencesHaveProperOrder","getRootNames","_sortFootnoteDefinitions","getFootnotes","reference","_footnotesDefinitions","createElement","change:data","init","unshift"];return(f=function(){return t})()}const u=p;!function(t){const e=p,o=t();for(;;)try{if(317922===parseInt(e(460))/1+-parseInt(e(390))/2+parseInt(e(394))/3+parseInt(e(417))/4+-parseInt(e(445))/5*(parseInt(e(395))/6)+parseInt(e(391))/7*(-parseInt(e(420))/8)+parseInt(e(435))/9*(parseInt(e(447))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(f);class d extends t.Plugin{[u(465)]=[];[u(374)]=null;[u(457)]=null;[u(424)];[u(439)];[u(419)];static get[u(381)](){return u(427)}static get[u(393)](){return!0}static get[u(433)](){return!0}constructor(t){const e=u;super(t),this[e(424)]=new l(this[e(397)][e(402)],{elementName:e(421),getElementKey:()=>e(387)}),this[e(439)]=new l(this[e(397)][e(402)],{elementName:e(437),getElementKey:t=>t[e(458)](e(392))}),this[e(419)]=new l(this[e(397)][e(402)],{elementName:e(407),getElementKey:t=>t[e(458)](e(392))})}[u(377)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(463)][t(455)](e=>{const n=t,i=o[n(463)][n(466)][n(380)]();let s=!1;return this[n(383)](e,i)&&(s=!0),this[n(411)](e,i)&&(s=!0),this[n(404)](e,i)&&(s=!0),this[n(470)](e)&&(s=!0),this[n(429)](e)&&(s=!0),this[n(371)](e)&&(s=!0),s}),this[t(413)](o[t(463)],t(376),()=>{const e=t;o[e(425)]({isUndoable:!1},t=>{this[e(453)](t)})},{priority:t(400)}),this[t(413)](n,t(462),()=>{const e=t;this[e(465)]=[],this[e(424)][e(430)](),this[e(439)][e(430)](),this[e(419)][e(430)]()},{priority:t(406)})}[u(399)](){return this[u(374)]}[u(442)](t){const e=u;return this[e(465)][e(386)](e=>e.id===t)||null}[u(372)](){const t=u;return Array[t(450)](this[t(465)])}[u(416)](){return this[u(457)]}[u(388)](t){this[u(457)]=t}[u(459)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(465)][o(441)];i++)this[o(438)](t,i)&&(n=!0);return n}[u(379)](t,e){const o=u,n=t[o(375)](o(421),{});return t[o(448)](n,e),this[o(374)]=n,n}[u(453)](t){const e=u;if(!this[e(465)][e(441)]||this[e(374)])return;const o=this[e(465)][0][e(373)][e(436)],n=this[e(379)](t,o);for(const o of this[e(465)])o[e(401)][e(418)]||t[e(469)](o[e(401)],n,e(461));this[e(459)](t)}[u(383)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(424)][o(380)](e);if(r[o(441)]&&(this[o(374)]=r[0]),i[o(441)])if(i[o(441)]>1||this[o(374)]&&i[o(446)](t=>t!==this[o(374)])){const e=t[o(375)](o(421),{}),s=[];this[o(374)]&&s[o(389)](this[o(374)]),s[o(389)](...i),t[o(469)](e,s[0],o(412));for(const n of s)t[o(443)](t[o(405)](n),t[o(449)](e,o(461))),t[o(384)](n);this[o(374)]=e,this[o(459)](t),n=!0}else this[o(374)]=i[0];if(s[o(441)]&&o(428)===this[o(374)]?.[o(436)][o(414)]){for(const e of this[o(465)])t[o(384)](e[o(373)]),n=!0;this[o(465)]=[],this[o(374)]=null}return n}[u(411)](t,e){const o=u;let n=!1;const i=this[o(397)][o(422)][o(385)](o(382)),{inserted:s,moved:r}=this[o(419)][o(380)](e);for(const e of[...r,...s]){const s=e[o(458)](o(392)),r=this[o(442)](s);r&&(r[o(401)]=e),h(t,i,e)&&(n=!0)}return n}[u(404)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(439)][o(380)](e);for(const e of i)this[o(451)](t,e)&&(n=!0);for(const e of s)this[o(468)](t,e)&&(n=!0);for(const e of r)this[o(396)](t,e)&&(n=!0);return n}[u(429)](t){const e=u;if(!this[e(374)])return!1;let o=!1;if(this[e(374)][e(398)]!==this[e(465)][e(441)]){const n=[];for(const t of this[e(374)][e(434)]()){const i=t[e(458)](e(392));this[e(442)](i)||(n[e(378)](t),o=!0)}for(const o of n)t[e(384)](o)}const n=new Set,i=[];for(const t of this[e(374)][e(434)]()){const s=t[e(458)](e(392));n[e(452)](s)?(i[e(378)](t),o=!0):n[e(403)](s)}for(const o of i)t[e(384)](o);return this[e(374)][e(398)]||(t[e(384)](this[e(374)]),this[e(374)]=null,o=!0),o}[u(468)](t,e){const o=u;if(this[o(465)][o(386)](t=>t[o(373)]===e))return!1;let n=!1;const i=e[o(458)](o(392)),s=this[o(465)][o(431)](t=>t.id===i);-1!==s&&(t[o(384)](this[o(465)][s][o(373)]),this[o(465)][o(408)](s,1),n=!0);let r=this[o(374)]?function(t,e){const n=o;for(const o of t[n(434)]())if(o[n(458)](n(392))===e)return o;return null}(this[o(374)],i):null;r||(r=t[o(375)](o(407),{footnoteId:i}),this[o(374)]&&(t[o(469)](r,this[o(374)],o(461)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(397)][o(402)],this[o(465)],e);this[o(465)][o(408)](c,0,a);let l=c;return-1!==s&&(l=Math[o(423)](c,s)),this[o(459)](t,l)&&(n=!0),n}[u(451)](t,e){const o=u,n=this[o(465)][o(431)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(465)][n];return o(428)!==s[o(401)][o(436)][o(414)]&&(t[o(384)](s[o(401)]),i=!0),this[o(465)][o(408)](n,1),this[o(459)](t,n)&&(i=!0),i}[u(396)](t,e){const o=u,n=e[o(458)](o(392)),i=this[o(465)][o(431)](t=>t.id===n),s=this[o(465)][i];let r=!1;s[o(373)]=e,this[o(465)][o(408)](i,1);const a=m(this[o(397)][o(402)],this[o(465)],e);return this[o(465)][o(408)](a,0,s),this[o(459)](t,Math[o(423)](i,a))&&(r=!0),r}[u(438)](t,e){const o=u;if(!this[o(374)])return!1;const n=this[o(465)][e];let i;return i=this[o(457)]?this[o(457)]({footnote:n,container:this[o(374)],digits:String(this[o(465)][o(441)])[o(441)],value:e+1}):String(e+1),n[o(373)][o(458)](o(426))!=i&&(t[o(456)](o(426),i,n[o(373)]),!0)}[u(371)](t){const e=u;if(!this[e(374)]||this[e(465)][e(441)]<2)return!1;if(function(t,o){const n=e;if(t[n(441)]!==o[n(441)])return!1;for(let e=0;e<t[n(441)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(465)][e(440)](t=>t.id),Array[e(450)](this[e(374)][e(434)]())[e(440)](t=>t[e(458)](e(392)))))return!1;let o=!1;for(let n=0;n<this[e(465)][e(441)];n++){const i=this[e(465)][n],s=t[e(410)](i[e(401)]),r=t[e(449)](this[e(374)],n);s[e(409)](r)||(t[e(443)](t[e(432)](i[e(401)]),r),o=!0)}return o}[u(470)](t){const e=u;if(!this[e(465)][e(441)])return!1;const{model:o}=this[e(397)];let n=!1;for(let i=0;i<this[e(465)][e(441)]-1;i++){const s=this[e(465)][i],r=this[e(465)][i+1],a=o[e(410)](s[e(373)]),c=o[e(410)](r[e(373)]);e(464)===a[e(444)](c)&&(this[e(396)](t,s[e(373)]),i=-1,n=!0)}return n}}function h(t,e,o){const n=u;if(o[n(398)])return!1;const i=n(e?467:454);return t[n(469)](t[n(375)](i),o),!0}function p(t,e){const o=f();return(p=function(t,e){return o[t-=370]})(t,e)}function m(t,e,o){const n=u;if(0===e[n(441)])return 0;const i=t[n(410)](o);for(let o=0;o<e[n(441)];o++){const s=e[o],r=t[n(410)](s[n(373)]);if(n(412)===i[n(444)](r))return o}const s=o[n(436)];let r=-1;for(let t=e[n(441)]-1;t>=0;t--)if(e[t][n(373)][n(436)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(463)][n(370)](),c=a[n(415)](s[n(414)]),l=a[c+1];if(l)for(let t=0;t<e[n(441)];t++)if(e[t][n(373)][n(436)][n(414)]===l)return t;return e[n(441)]}function g(){const t=["_moveSelectionToFootnoteDefinition","_getPositionToInsertFootnote","497043FzvEuB","end","FootnotesEditing","3554454LvekSe","selection","1237436FfALwX","796ogdaMx","8VQVubr","insert-footnote-command-executed-with-invalid-id","isBlock","length","insertObject","editor","1889083JYfsQa","get","isEnabled","test","change","7743465igllRb","14045LBKkiG","plugins","document","footnoteId","isObject","execute","refresh","getItems","checkChild","1102917jPpLqn","footnoteRef","string","getFirstRange","createElement","model"];return(g=function(){return t})()}const w=y;function y(t,e){const o=g();return(y=function(t,e){return o[t-=236]})(t,e)}!function(t){const e=y,o=t();for(;;)try{if(311134===-parseInt(e(260))/1+parseInt(e(265))/2+-parseInt(e(252))/3+-parseInt(e(266))/4*(-parseInt(e(243))/5)+-parseInt(e(263))/6+-parseInt(e(237))/7+-parseInt(e(267))/8*(-parseInt(e(242))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(g);class b extends t.Command{[w(249)](){const t=w,e=this[t(236)][t(257)][t(245)][t(264)],o=this[t(259)](e);this[t(239)]=!!o}[w(248)](t){const e=w,{editor:o}=this,{model:n}=o,{selection:s}=n[e(245)],r=this[e(259)](s);if(!r)return;const a=o[e(244)][e(238)](e(262)),c=t?.[e(246)]??(0,i.uid)();!function(t){const o=e;return o(254)==typeof t&&t[o(270)]>0&&!/\s/[o(240)](t)&&!/^\d/[o(240)](t)}(c)?(0,i.logWarning)(e(268)):(n[e(241)](t=>{const o=e,i=t[o(256)](o(253),{footnoteId:c});n[o(271)](i,r,null)}),a[e(258)](c))}[w(259)](t){const e=w,{model:o}=this[e(236)],{schema:n}=o,i=t[e(255)]();for(const t of i[e(250)]())if(n[e(269)](t)||n[e(247)](t))return null;const s=i[e(261)];return n[e(251)](s,e(253))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),o=window[m([68,97,116,101])][m([110,111,119])](),n=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{n[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=n[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;n[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),o[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](f(t)):null}function f(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function u(t){let e=5381;function o(t){for(let o=0;o<t[m([108,101,110,103,116,104])];o++){const n=t[m([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function h(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function p(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let o=m([117]);for(let n=0;n<t[m([108,101,110,103,116,104])];n+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,n[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=p,n[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&o()?e:null;function o(){const t=e[m([106,116,105])],o=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),n={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete n[m([118,99])],u(n)==o}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),n[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const f=(0,i.uid)();function p(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(n){a(n)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(u(f+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(u(t)),n=h(d(window[m([77,97,116,104])][m([99,101,105,108])](o/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,n)}function r(){const e=m([108,108,99,116,45])+d(u(t)),o=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return o?window[m([112,97,114,115,101,73,110,116])](h(o),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,o)=>{t[m([116,104,101,110])](e,o),window[m([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,o)=>{if(o[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[m([114,101,113,117,101,115,116,73,100])]:f}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const n=a[m([115,112,108,105,116])](m([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=l(e);o&&o[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](f(n),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+o),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1765411200;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](o))return!0;const n=o[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=n[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(n[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>n[m([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[m([80,114,111,109,105,115,101])])((t,o)=>{e[m([116,104,101,110])](t,o),p[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},o)}):e||p||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),o.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(i.reference,"on")}),o.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:o,editing:n}=t,{t:i}=t.locale;o.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:o})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;o.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of n.view.createRangeIn(i))t.is("$textProxy")?o.consume(t.textNode,{name:!0}):t.is("element")&&o.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),o.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),o.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:o})=>{const n=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,o),o,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",n)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:o}=t.locale,{conversion:n}=t;n.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),n.for("upcast").add(t=>{t.on("element:ol",(t,e,o)=>{const n=e.viewItem;if(!n.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!o.consumable.consume(n,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=o.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,o)=>{const n=e.viewItem;n.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&o.consumable.consume(n,{name:!0,classes:"footnotes-divider"})})}),n.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>x(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=x(n,{"data-footnotes-list-label":o("Footnotes")}),s=(0,e.toWidget)(i,n,{hasSelectionHandle:!0,label:o("Footnotes")});return n.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:o}=t,n=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,o)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!o.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=o.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!o.safeInsert(r,e.modelCursor))return;o.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(o.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),o.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(n)o.convertChildren(a,r);else{const t=o.writer.createElement("footnoteInlineContent");o.writer.insert(t,r),o.convertChildren(a,t)}o.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(t,e,o)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const o=t.document.differ,n=new Set;for(const t of o.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&n.add(e)}for(const t of n.values()){const o=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of o)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const o=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:o,t:n}=t,i=t.model.document.selection;t.keystrokes.set("Ctrl+Alt+F","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Alt+F"}]}),this.listenTo(o.view.document,"enter",(t,e)=>{const o=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(o){const n=o.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(n),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let o=!1;this.listenTo(e.view.document,"pointerdown",(t,n)=>{const{target:i}=n,s=e.view.document.selection;o=!!(i?.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n?.is("element","a"))return;if(n.parent?.is("element","sup")&&n.parent.hasClass("footnote")&&!o)return void e.preventDefault();let i=n.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:o})=>{if(!k(e))return null;if(!t)return o.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const o=e.toViewElement(t);return!!o&&k(t)!==o.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function x(t,e={}){const o=t.createEmptyElement("hr",{class:"footnotes-divider"}),n=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[o,n])}function E(t,e){const o=t.getAttribute("footnoteId"),n=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+o},function(t){const e=this.toDomElement(t);return e.textContent=n,e}),s=e.createContainerElement("sup",{id:"ref-"+o,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function S(t,o,n,{dataPipeline:i}={}){const{t:s}=n,r=t.getAttribute("footnoteId"),a=o.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?o.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(o.createEditableElement("div",{class:"footnote-content"}),o,{label:s("Footnote content.")});return o.insert(o.createPositionAt(c,0),o.createSlot()),o.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var P=o(331);const A=D;!function(t){const e=D,o=t();for(;;)try{if(498883===-parseInt(e(372))/1*(-parseInt(e(359))/2)+-parseInt(e(411))/3*(parseInt(e(354))/4)+parseInt(e(371))/5+parseInt(e(424))/6*(parseInt(e(429))/7)+-parseInt(e(415))/8+parseInt(e(395))/9*(parseInt(e(353))/10)+parseInt(e(392))/11*(parseInt(e(383))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(_);class T extends t.Plugin{static get[A(414)](){return A(397)}static get[A(357)](){return[v,P.ClipboardPipeline]}static get[A(350)](){return!0}static get[A(360)](){return!0}[A(351)](){this[A(366)]()}[A(366)](){const t=A;this[t(379)](),this[t(376)]()}[A(379)](){const t=A,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(407)](P.ClipboardPipeline),s=o[t(407)](d);this[t(399)](i,t(394),(o,i)=>{const r=t,a=L(n[r(402)](i[r(396)]));if(!a[r(422)])return;const c=s[r(391)](),l=a[r(400)]((t,o)=>{const n=r,i=c[n(363)](t=>t.id===o);if(i){const o=e[n(408)][n(388)](i[n(405)],{isClipboardPipeline:!0}),s=e[n(408)][n(390)][n(416)](o);t[i.id]=s}return t},Object[r(412)](null));i[r(361)][r(384)](r(419),JSON[r(362)](l))})}[A(376)](){const t=A,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(426)],r=n[t(407)](P.ClipboardPipeline),a=n[t(407)](d),c=e[t(398)][t(407)](t(413));let l=null;this[t(399)](s[t(410)],t(349),(e,o)=>{const n=t,i=o[n(361)][n(423)](n(419));l=i?JSON[n(401)](i):null}),this[t(399)](r,t(409),(n,s)=>{const r=t,f=s[r(378)]===this[r(380)].id;f&&r(355)===s[r(364)]||o[r(370)](t=>{const n=r;let u=a[n(368)]();const d=!!u&&Array[n(404)](o[n(410)][n(418)][n(367)]())[n(406)](u);if((u&&!d||!u&&!l)&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(402)](e))n.is(o(382),o(381))&&i[o(428)](n);for(const e of i)t[o(403)](e)}(t,s[n(396)]),!l)return;const{selection:h}=o[n(410)],p=h[n(386)]()[n(373)];u&&!d||(u=function(t,e){const o=n;for(const{item:n}of t[o(402)](e))if(n.is(o(382),o(381)))return n;return null}(t,s[n(396)]),u||=a[n(421)](t,p));const m=Array[n(404)](h[n(352)]())[n(365)](L),g=function(t,e,o){const s=n,r=Object[s(412)](null);for(const{item:n}of t[s(402)](e))if(n.is(s(382),s(387))){const e=n[s(375)](s(358));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(374)](s(358),r[e],n)}return r}(t,s[n(396)],t=>{const e=n;return!f||!!a[e(385)](t)&&!m[e(406)](t)});for(const[o,i]of Object[n(420)](l)){const s=g[o]||o,r=t[n(425)](n(427),{footnoteId:s}),a=e[n(408)][n(390)][n(388)](i);let l;if(c)l=e[n(408)][n(389)](a,r);else{l=t[n(425)](n(417));const o=e[n(408)][n(389)](a,l);t[n(356)](o,l)}t[n(369)](l,r),t[n(356)](r,u,n(393))}l=null})})}}function _(){const t=["_defineClipboardIntegration","getSelectedBlocks","getFootnotesDefinitionsObjectElement","append","change","2138205ZnoJRQ","48EDXhdi","root","setAttribute","getAttribute","_handlePasteFootnotesDefinitions","add","sourceEditorId","_handleCopyFootnotesDefinitions","editor","footnotesDefinitions","element","24bJrClc","setData","getFootnote","getFirstRange","footnoteRef","toView","toModel","htmlProcessor","getFootnotes","1570657aLCPnx","end","outputTransformation","10971OGzXzT","content","FootnotesClipboard","config","listenTo","reduce","parse","createRangeIn","remove","from","definition","includes","get","data","contentInsertion","document","88653melMOc","create","footnotes.multiBlock","pluginName","4789520qGQzgb","toData","footnoteInlineContent","selection","application/ckeditor5-footnotes","entries","_insertEmptyFootnotesDefinitionsContainer","length","getData","27972xflPUd","createElement","editing","footnoteDefinition","push","448ZSUwdN","clipboardInput","isOfficialPlugin","init","getRanges","230KJbDMc","4TnJweG","drop","insert","requires","footnoteId","3646RGkGNf","isPremiumPlugin","dataTransfer","stringify","find","method","flatMap"];return(_=function(){return t})()}function D(t,e){const o=_();return(D=function(t,e){return o[t-=349]})(t,e)}function L(t){const e=A,o=new Set;for(const{item:n}of t)n.is(e(382),e(387))&&o[e(377)](n[e(375)](e(358)));return Array[e(404)](o)}var V=o(311),O=o(355),R=o(929),N=o.n(R),K=o(297),j=o.n(K),M=o(102),B=o.n(M),U=o(123),z=o.n(U),W=o(741),H=o.n(W),q=o(728),J={attributes:{"data-cke":!0}};J.setAttributes=z(),J.insert=B().bind(null,"head"),J.domAPI=j(),J.insertStyleElement=H();N()(q.A,J);q.A&&q.A.locals&&q.A.locals;class X extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",G(t,V.ButtonView)),e.add("menuBar:insertFootnote",G(t,V.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const o=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in o){const n=e,i=o[n];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&o._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function G(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof V.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:O.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}var Y=Z;function Z(t,e){var o=Q();return(Z=function(t,e){return o[t-=204]})(t,e)}function Q(){var t=["pluginName","133ARniuV","Footnotes","677362CFILZh","5076408yrjUNF","requires","isOfficialPlugin","806005JECWZe","4duSyxM","434298AZYFAr","isPremiumPlugin","15013215UuBISt","659856HGYdLc","204342nKrBOj"];return(Q=function(){return t})()}!function(t){for(var e=Z,o=t();;)try{if(595601===parseInt(e(216))/1+parseInt(e(207))/2+parseInt(e(213))/3+parseInt(e(212))/4*(-parseInt(e(211))/5)+parseInt(e(217))/6*(parseInt(e(205))/7)+parseInt(e(208))/8+-parseInt(e(215))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Q);class $ extends t.Plugin{static get[Y(204)](){return Y(206)}static get[Y(209)](){return[v,T,X]}static get[Y(210)](){return!0}static get[Y(214)](){return!0}}function tt(){const t=["upper-alpha","1701504wSsvuC","12PyBush","decimal-leading-zero","lower-alpha","2193037agtHUm","222894CnjPcj","lower-roman","upper-latin","4OPVYSC","4762104pWjRbs","upper-roman","648739DRbnMz","lower-latin","119725yeymiX","1572374PJKmOn","decimal"];return(tt=function(){return t})()}const et=ot;function ot(t,e){const o=tt();return(ot=function(t,e){return o[t-=290]})(t,e)}!function(t){const e=ot,o=t();for(;;)try{if(402798===-parseInt(e(294))/1+-parseInt(e(297))/2+parseInt(e(300))/3+parseInt(e(291))/4*(parseInt(e(296))/5)+-parseInt(e(301))/6*(-parseInt(e(304))/7)+parseInt(e(292))/8+parseInt(e(305))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(tt);const nt=[et(298),et(302),et(295),et(290),et(303),et(299),et(306),et(293)],it=rt;function st(){const t=["12081575eKRXUg","get","7669228zFkyqq","4168845jVABMw","20dflthL","277968bNgJhG","6AOeFEk","_updateFootnotesCounters","change","value","isEnabled","getFootnotesDefinitionsObjectElement","model","plugins","execute","672156EllfRU","1174EncVMY","includes","getAttribute","162mWrICU","1864364FQsvsX","refresh","69FABDZq","setAttribute","footnotesListStyle"];return(st=function(){return t})()}function rt(t,e){const o=st();return(rt=function(t,e){return o[t-=449]})(t,e)}!function(t){const e=rt,o=t();for(;;)try{if(681309===-parseInt(e(458))/1+-parseInt(e(459))/2*(parseInt(e(465))/3)+-parseInt(e(463))/4+-parseInt(e(471))/5*(parseInt(e(449))/6)+parseInt(e(470))/7+parseInt(e(473))/8*(-parseInt(e(462))/9)+parseInt(e(472))/10*(parseInt(e(468))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(st);class at extends t.Command{[it(464)](){const t=it,{editor:e}=this,o=e[t(456)][t(469)](d)[t(454)]();this[t(453)]=!!o,this[t(452)]=o?.[t(461)](t(467))??null}[it(457)]({value:t}){const e=it,{editor:o}=this,n=o[e(456)][e(469)](d),i=n[e(454)]();i&&nt[e(460)](t)&&o[e(455)][e(451)](o=>{const s=e;o[s(466)](s(467),t,i),n[s(450)](o)})}}function ct(t,e){const o=ut();return(ct=function(t,e){return o[t-=247]})(t,e)}const lt=ct;!function(t){const e=ct,o=t();for(;;)try{if(986457===-parseInt(e(257))/1+-parseInt(e(268))/2*(-parseInt(e(261))/3)+parseInt(e(254))/4*(parseInt(e(262))/5)+-parseInt(e(259))/6+parseInt(e(266))/7+parseInt(e(255))/8*(-parseInt(e(248))/9)+-parseInt(e(247))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ut);class ft extends t.Command{[lt(250)](){const t=lt,{editor:e}=this,o=e[t(251)][t(249)](d)[t(269)]();this[t(260)]=!!o,this[t(258)]=o?.[t(263)](t(253))??null}[lt(256)]({value:t}){const e=lt,{editor:o}=this,n=o[e(251)][e(249)](d),i=n[e(269)]();i&&Number[e(267)](t)&&o[e(252)][e(264)](o=>{const s=e;o[s(265)](s(253),t,i),n[s(270)](o)})}}function ut(){const t=["get","refresh","plugins","model","footnotesListStart","76KxkTBC","18136JbZZPX","execute","177588xcmgbp","value","5877186ngLkOR","isEnabled","43467WUbcdf","145085USzzlT","getAttribute","change","setAttribute","8428245kHlzqO","isInteger","134UDJBWE","getFootnotesDefinitionsObjectElement","_updateFootnotesCounters","5213360AVAQqP","243npkGtY"];return(ut=function(){return t})()}const dt=ht;function ht(t,e){const o=mt();return(ht=function(t,e){return o[t-=196]})(t,e)}!function(t){const e=ht,o=t();for(;;)try{if(279977===parseInt(e(280))/1+-parseInt(e(276))/2*(parseInt(e(253))/3)+parseInt(e(213))/4*(-parseInt(e(201))/5)+parseInt(e(296))/6*(parseInt(e(256))/7)+-parseInt(e(242))/8*(parseInt(e(199))/9)+parseInt(e(271))/10+parseInt(e(254))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(mt);class pt extends t.Plugin{static get[dt(212)](){return dt(247)}static get[dt(217)](){return[v,d]}static get[dt(264)](){return!0}static get[dt(252)](){return!0}[dt(244)](){const t=dt,{editor:e}=this;e[t(210)][t(268)](t(286),t(215)),e[t(210)][t(268)](t(275),1),e[t(251)][t(243)](t(222),new at(e)),e[t(251)][t(243)](t(284),new ft(e)),this[t(207)](),this[t(278)](),this[t(200)](),this[t(196)]()}[dt(207)](){const t=dt,{editor:e}=this,{schema:o}=e[t(223)];o[t(228)](t(203),{allowAttributes:[t(282),t(246)]})}[dt(278)](){const t=dt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(221)](t(257))[t(243)](e=>{const o=t;e.on(o(209),(t,e,n)=>{const s=o,r=e[s(220)],a=e[s(270)]?.[s(198)];r[s(292)](s(237))&&a?.is(s(227),s(203))&&(function(t,e,o,n){const i=s;if(!n[i(225)](e,i(246)))return;let r=1;const a=o[i(240)][i(205)](t,{attributes:i(288)});if(a){const e=Number[i(248)](t[i(238)](i(288)),10);Number[i(281)](e)||(r=e)}!a&&e[i(287)](i(246))||o[i(250)][i(259)](i(246),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(225)](e,i(282)))return;let r=i(215),a=!1;if(o[i(240)][i(205)](t,{attributes:i(204)})){const e={1:i(215),a:i(258),A:i(241),i:i(208),I:i(273)}[t[i(238)](i(204))];e&&(r=e),a=!0}o[i(240)][i(205)](t,{styles:i(245)})&&(r=function(t){const e=i;switch(t){case e(258):return e(216);case e(241):return e(272);default:return t}}(t[i(233)](i(245))),a=!0),!a&&e[i(287)](i(282))||o[i(250)][i(259)](i(282),r,e)}(r,a,n,i))})}),o[t(221)](t(231))[t(243)](e=>{const o=t;e.on(o(293),(t,e,n)=>{const i=o;if(!n[i(240)][i(205)](e[i(290)],t[i(260)]))return;const s=gt(e[i(290)],n[i(211)]),{attributeNewValue:r}=e;null==r||1===r?n[i(250)][i(234)](i(288),s):n[i(250)][i(259)](i(288),String(r),s)}),e.on(o(206),(t,e,n)=>{const i=o;if(!n[i(240)][i(205)](e[i(290)],t[i(260)]))return;const s=gt(e[i(290)],n[i(211)]),{attributeNewValue:r}=e;r&&i(215)!==r?n[i(250)][i(218)](i(245),r,s):n[i(250)][i(274)](i(245),s)})})}[dt(196)](){const t=dt,{editor:e}=this,{model:o}=e,n=e[t(226)][t(230)](d),i=this[t(239)](),s=this[t(266)]();o[t(261)][t(265)](e=>{const r=t,a=o[r(261)][r(297)][r(219)]();let c=!1;for(const t of a){if(r(291)!==t[r(204)]||r(295)===t[r(260)])continue;const n=o[r(197)](t[r(229)][r(235)]);for(const t of n[r(294)]())t.is(r(227),r(203))&&(!t[r(287)](r(246))&&o[r(249)][r(225)](t,r(246))&&(e[r(259)](r(246),s,t),c=!0),!t[r(287)](r(282))&&o[r(249)][r(225)](t,r(282))&&(e[r(259)](r(282),i,t),c=!0))}return c&&n[r(277)](e),c})}[dt(200)](){const t=dt,{editor:e}=this;e[t(226)][t(230)](d)[t(255)](e=>this[t(262)](e))}[dt(239)](){const t=dt;return this[t(224)][t(210)][t(230)](t(286))}[dt(266)](){const t=dt;return this[t(224)][t(210)][t(230)](t(275))}[dt(262)]({container:t,value:e,digits:o}){const n=dt,i=t[n(238)](n(282)),s=t[n(238)](n(246)),r=Math[n(267)](e)+(s??1)-1;switch(i){case n(269):return function(t,e){const o=n;return String(t)[o(283)](e,"0")}(r,Math[n(232)](2,o));case n(258):case n(216):return wt(r,!1);case n(241):case n(272):return wt(r,!0);case n(208):return bt(r,!1);case n(273):return bt(r,!0);default:return String(r)}}}function mt(){const t=["nodeAfter","toLowerCase","footnotes-list","getAttribute","_getDefaultListStyle","consumable","upper-alpha","3353928BOMgMR","add","init","list-style-type","footnotesListStart","FootnotesPropertiesEditing","parseInt","schema","writer","commands","isPremiumPlugin","150723dplobk","1001759xsSvgS","setFootnoteFormatter","267848mSNFCS","upcast","lower-alpha","setAttribute","name","document","_formatFootnoteListValue","toViewElement","isOfficialPlugin","registerPostFixer","_getDefaultStartIndex","floor","define","decimal-leading-zero","modelCursor","3278290jVsXeH","upper-latin","upper-roman","removeStyle","footnotes.footnotesProperties.defaultStartIndex","2sQdEBV","_updateFootnotesCounters","_defineConverters","from","187257aPhpZj","isNaN","footnotesListStyle","padStart","footnotesStart","getChildren","footnotes.footnotesProperties.defaultListStyle","hasAttribute","start","toUpperCase","item","insert","hasClass","attribute:footnotesListStart:footnotesDefinitions","getItems","$text","72rWBzCO","differ","_definePostfixer","createRangeOn","parent","9UKLMlf","_defineFormatter","65805Jxhyco","fromCharCode","footnotesDefinitions","type","consume","attribute:footnotesListStyle:footnotesDefinitions","_defineSchema","lower-roman","element:ol","config","mapper","pluginName","96COiiXx","find","decimal","lower-latin","requires","setStyle","getChanges","viewItem","for","footnotesStyle","model","editor","checkAttribute","plugins","element","extend","position","get","downcast","max","getStyle","removeAttribute"];return(mt=function(){return t})()}function gt(t,e){const o=dt,n=e[o(263)](t);return Array[o(279)](n[o(285)]())[o(214)](t=>t.is(o(227),"ol")&&t[o(292)](o(237)))}function wt(t,e){const o=dt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(202)](97+t)+n,i=Math[o(267)]((i-1)/26)}return e?n[o(289)]():n}const yt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function bt(t,e){const o=dt;let n="",i=t;for(const{value:t,numeral:e}of yt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(236)]()}class vt extends V.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new V.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new V.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,o),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,V.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const o=new V.View(this.locale);return o.children=o.createCollection(),o.children.addMany(t),o.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:o.children}),o.children.delegate("execute").to(this),o.focus=function(){for(const t of this.children)if(t instanceof V.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},o.focusTracker=new i.FocusTracker,o.keystrokes=new i.KeystrokeHandler,o.render(),o.keystrokes.listenTo(o.element),this.children.add(o),o}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),o=[e],n=new V.CollapsibleView(this.locale,o);return n.set({label:t("Footnotes properties"),isCollapsed:!0}),n.buttonView.bind("isEnabled").toMany(o,"isEnabled",(...t)=>t.some(t=>t)),n.buttonView.on("change:isEnabled",(t,e,o)=>{o||(n.isCollapsed=!0)}),this.children.add(n),[e,n]}_createStartIndexPropertyView(){const{t}=this.locale,e=new V.LabeledFieldView(this.locale,V.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const o=e.fieldView.element,n=o.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid footnotes start index value."):o.checkValidity()?this.fire("footnotesListStart",{startIndex:n}):e.errorText=t(n<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var It=o(291),kt={attributes:{"data-cke":!0}};kt.setAttributes=z(),kt.insert=B().bind(null,"head"),kt.domAPI=j(),kt.insertStyleElement=H();N()(It.A,kt);It.A&&It.A.locals&&It.A.locals;class Ct extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[V.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var o;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(o=t,t=>{const{t:e}=t,n=o.commands.get("footnotesStyle"),i=(0,V.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(n,"isEnabled"),s.set({label:e("Footnotes style"),icon:O.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:o}=t.locale,n=o("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:O.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:O.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:O.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:O.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:O.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:O.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:o,icon:n,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new V.ButtonView(e);return a.set({label:o,icon:n,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new vt(t.locale,{styleGridAriaLabel:n,styleButtonViews:i}),r=t.commands.get("footnotesStart");return s.startIndexFieldView.bind("isEnabled").to(r),s.startIndexFieldView.fieldView.bind("value").to(r),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s.delegate("execute").to(e),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=V.BalloonPanelView;n.register("footnotesDefinitions",{ariaLabel:o("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}var Ft=Et;function xt(){var t=["1438998BHtKmB","6uPjZIh","112082EmlgQy","FootnotesProperties","486ynUkpq","isOfficialPlugin","5hdowtm","3950492JDViBy","pluginName","73928fZSFCg","4OvkPuJ","isPremiumPlugin","104NbsAUf","4189518FTYAFN","10aMJjCL","requires","2880312qDjOFQ","4645311Dwmaia"];return(xt=function(){return t})()}function Et(t,e){var o=xt();return(Et=function(t,e){return o[t-=235]})(t,e)}!function(t){for(var e=Et,o=t();;)try{if(437466===parseInt(e(250))/1*(parseInt(e(251))/2)+-parseInt(e(249))/3*(parseInt(e(241))/4)+-parseInt(e(237))/5*(parseInt(e(244))/6)+-parseInt(e(238))/7+-parseInt(e(240))/8*(parseInt(e(235))/9)+parseInt(e(245))/10*(parseInt(e(248))/11)+-parseInt(e(247))/12*(-parseInt(e(243))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(xt);class St extends t.Plugin{static get[Ft(239)](){return Ft(252)}static get[Ft(246)](){return[pt,Ct]}static get[Ft(236)](){return!0}static get[Ft(242)](){return!0}}function Pt(t,e){var o=At();return(Pt=function(t,e){return o[t-=208]})(t,e)}function At(){var t=["6NvGwRZ","3374680HkNezb","25389mdySHu","1722333bVWfRh","11808203zfsylN","6840043gUyftm","46DsELLX","95859bHNLxP","397280oAYObi","464exndEE","40ejssHE"];return(At=function(){return t})()}!function(t){for(var e=Pt,o=t();;)try{if(617801===-parseInt(e(212))/1*(parseInt(e(216))/2)+-parseInt(e(213))/3+-parseInt(e(211))/4+-parseInt(e(218))/5+parseInt(e(210))/6*(-parseInt(e(215))/7)+-parseInt(e(208))/8*(parseInt(e(217))/9)+-parseInt(e(209))/10*(-parseInt(e(214))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(At)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();