@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251027.0 → 0.0.0-nightly-20251028.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.
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md.
4
- */(()=>{var t={14:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),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-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.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 .footnote>a{pointer-events:none}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265: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)}},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")},374: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}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},450: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),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:f,updater:p,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}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},774: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)}}}},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")},945:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),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}},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:()=>L,FootnotesEditing:()=>v,FootnotesProperties:()=>xt,FootnotesPropertiesEditing:()=>pt,FootnotesPropertiesUI:()=>kt,FootnotesStartCommand:()=>lt,FootnotesStyleCommand:()=>rt,FootnotesTracker:()=>f,FootnotesUI:()=>X,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);function r(){const t=["slice","position","$text","createRangeOn","4KeNqeS","1644237bGbxvX","136835dzzCTf","76770ISARHK","delete","_elementName","has","set","add","_trackedElements","86VNvBzn","$graveyard","rootName","from","flat","_model","elementName","values","root","837910rzOMfB","16FYIrDV","push","_getElementKey","nodeAfter","638890ZYqqxo","remove","getElementKey","insert","clear","127005hQrMxF","length","get","name","element","reset","8973omYMSw","getItems","attributes","type","getChanges"];return(r=function(){return t})()}function a(t,e){const o=r();return(a=function(t,e){return o[t-=499]})(t,e)}const c=a;!function(t){const e=a,o=t();for(;;)try{if(131818===parseInt(e(534))/1+parseInt(e(515))/2*(parseInt(e(540))/3)+parseInt(e(505))/4*(-parseInt(e(507))/5)+-parseInt(e(508))/6+-parseInt(e(529))/7*(parseInt(e(525))/8)+parseInt(e(506))/9+-parseInt(e(524))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(r);class l{[c(520)];[c(510)];[c(527)];[c(514)]=new Map;constructor(t,e){const o=c;this[o(520)]=t,this[o(510)]=e[o(521)],this[o(527)]=e[o(531)]}[c(539)](){const t=c;this[t(514)][t(533)]()}[c(500)](t){const e=c,o=new Set,n=new Map;for(const i of t){if(e(532)===i[e(499)]&&e(503)!==i[e(537)]&&i[e(502)][e(528)]){const t=this[e(520)][e(504)](i[e(502)][e(528)]);for(const o of t[e(541)]()){if(!o.is(e(538),this[e(510)]))continue;const t=this[e(527)](o);n[e(511)](t)||n[e(512)](t,[]),n[e(536)](t)[e(526)](o)}}if(e(530)===i[e(499)]&&i[e(537)]===this[e(510)]){const t=this[e(527)]({getAttribute:t=>i[e(542)][e(536)](t)});o[e(513)](t)}}for(const[t,n]of this[e(514)])e(516)===n[e(523)][e(517)]&&o[e(513)](t);for(const t of o)this[e(514)][e(509)](t);for(const[t,o]of n)this[e(514)][e(512)](t,o[o[e(535)]-1]);const i=new Set;for(const[t,s]of n)o[e(511)](t)&&(i[e(513)](s[0]),s[e(535)]>1?n[e(512)](t,s[e(501)](1)):n[e(509)](t),o[e(509)](t));return{removed:Array[e(518)](o),inserted:Array[e(518)](n[e(522)]())[e(519)](),moved:Array[e(518)](i)}}}const u=h;!function(t){const e=h,o=t();for(;;)try{if(547688===-parseInt(e(489))/1+-parseInt(e(455))/2*(parseInt(e(518))/3)+parseInt(e(550))/4+-parseInt(e(546))/5+-parseInt(e(516))/6*(parseInt(e(523))/7)+-parseInt(e(515))/8+parseInt(e(460))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(d);class f extends t.Plugin{[u(472)]=[];[u(453)]=null;[u(490)]=null;[u(519)];[u(463)];[u(476)];static get[u(480)](){return u(464)}static get[u(478)](){return!0}static get[u(543)](){return!0}constructor(t){const e=u;super(t),this[e(519)]=new l(this[e(503)][e(545)],{elementName:e(529),getElementKey:()=>e(551)}),this[e(463)]=new l(this[e(503)][e(545)],{elementName:e(513),getElementKey:t=>t[e(533)](e(531))}),this[e(476)]=new l(this[e(503)][e(545)],{elementName:e(496),getElementKey:t=>t[e(533)](e(531))})}[u(466)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(507)][t(456)](e=>{const n=t,i=o[n(507)][n(544)][n(526)]();let s=!1;return this[n(459)](e,i)&&(s=!0),this[n(499)](e,i)&&(s=!0),this[n(528)](e,i)&&(s=!0),this[n(452)](e)&&(s=!0),this[n(488)](e)&&(s=!0),this[n(502)](e)&&(s=!0),s}),this[t(541)](o[t(507)],t(521),()=>{const e=t;o[e(508)]({isUndoable:!1},t=>{this[e(498)](t)})},{priority:t(534)}),this[t(541)](n,t(458),()=>{const e=t;this[e(472)]=[],this[e(519)][e(549)](),this[e(463)][e(549)](),this[e(476)][e(549)]()},{priority:t(525)})}[u(494)](){return this[u(453)]}[u(473)](t){const e=u;return this[e(472)][e(486)](e=>e.id===t)||null}[u(506)](){const t=u;return Array[t(485)](this[t(472)])}[u(512)](){return this[u(490)]}[u(461)](t){this[u(490)]=t}[u(501)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(472)][o(475)];i++)this[o(522)](t,i)&&(n=!0);return n}[u(495)](t,e){const o=u,n=t[o(491)](o(529),{});return t[o(493)](n,e),this[o(453)]=n,n}[u(498)](t){const e=u;if(!this[e(472)][e(475)]||this[e(453)])return;const o=this[e(472)][0][e(471)][e(504)],n=this[e(495)](t,o);for(const o of this[e(472)])o[e(548)][e(524)]||t[e(477)](o[e(548)],n,e(532));this[e(501)](t)}[u(459)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(519)][o(526)](e);if(r[o(475)]&&(this[o(453)]=r[0]),i[o(475)])if(i[o(475)]>1||this[o(453)]&&i[o(481)](t=>t!==this[o(453)])){const e=t[o(491)](o(529),{}),s=[];this[o(453)]&&s[o(539)](this[o(453)]),s[o(539)](...i),t[o(477)](e,s[0],o(536));for(const n of s)t[o(520)](t[o(487)](n),t[o(467)](e,o(532))),t[o(469)](n);this[o(453)]=e,this[o(501)](t),n=!0}else this[o(453)]=i[0];if(s[o(475)]&&o(535)===this[o(453)]?.[o(504)][o(497)]){for(const e of this[o(472)])t[o(469)](e[o(471)]),n=!0;this[o(472)]=[],this[o(453)]=null}return n}[u(499)](t,e){const o=u;let n=!1;const i=this[o(503)][o(474)][o(468)](o(517)),{inserted:s,moved:r}=this[o(476)][o(526)](e);for(const e of[...r,...s]){const s=e[o(533)](o(531)),r=this[o(473)](s);r&&(r[o(548)]=e),p(t,i,e)&&(n=!0)}return n}[u(528)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(463)][o(526)](e);for(const e of i)this[o(482)](t,e)&&(n=!0);for(const e of s)this[o(462)](t,e)&&(n=!0);for(const e of r)this[o(538)](t,e)&&(n=!0);return n}[u(488)](t){const e=u;if(!this[e(453)])return!1;let o=!1;if(this[e(453)][e(552)]!==this[e(472)][e(475)]){const n=[];for(const t of this[e(453)][e(537)]()){const i=t[e(533)](e(531));this[e(473)](i)||(n[e(505)](t),o=!0)}for(const o of n)t[e(469)](o)}const n=new Set,i=[];for(const t of this[e(453)][e(537)]()){const s=t[e(533)](e(531));n[e(540)](s)?(i[e(505)](t),o=!0):n[e(527)](s)}for(const o of i)t[e(469)](o);return this[e(453)][e(552)]||(t[e(469)](this[e(453)]),this[e(453)]=null,o=!0),o}[u(462)](t,e){const o=u;if(this[o(472)][o(486)](t=>t[o(471)]===e))return!1;let n=!1;const i=e[o(533)](o(531)),s=this[o(473)](i);s&&(t[o(469)](s[o(471)]),this[o(472)]=this[o(472)][o(470)](t=>t.id!==i),n=!0);let r=this[o(453)]?function(t,e){const n=o;for(const o of t[n(537)]())if(o[n(533)](n(531))===e)return o;return null}(this[o(453)],i):null;r||(r=t[o(491)](o(496),{footnoteId:i}),this[o(453)]&&(t[o(477)](r,this[o(453)],o(532)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(503)][o(545)],this[o(472)],e);return this[o(472)][o(492)](c,0,a),this[o(501)](t,c)&&(n=!0),n}[u(482)](t,e){const o=u,n=this[o(472)][o(530)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(472)][n];return o(535)!==s[o(548)][o(504)][o(497)]&&(t[o(469)](s[o(548)]),i=!0),this[o(472)][o(492)](n,1),this[o(501)](t,n)&&(i=!0),i}[u(538)](t,e){const o=u,n=e[o(533)](o(531)),i=this[o(472)][o(530)](t=>t.id===n),s=this[o(472)][i];let r=!1;s[o(471)]=e,this[o(472)][o(492)](i,1);const a=m(this[o(503)][o(545)],this[o(472)],e);return this[o(472)][o(492)](a,0,s),this[o(501)](t,Math[o(479)](i,a))&&(r=!0),r}[u(522)](t,e){const o=u;if(!this[o(453)])return!1;const n=this[o(472)][e];let i;return i=this[o(490)]?this[o(490)]({footnote:n,container:this[o(453)],digits:String(this[o(472)][o(475)])[o(475)],value:e+1}):String(e+1),n[o(471)][o(533)](o(465))!=i&&(t[o(500)](o(465),i,n[o(471)]),!0)}[u(502)](t){const e=u;if(!this[e(453)]||this[e(472)][e(475)]<2)return!1;if(function(t,o){const n=e;if(t[n(475)]!==o[n(475)])return!1;for(let e=0;e<t[n(475)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(472)][e(457)](t=>t.id),Array[e(485)](this[e(453)][e(537)]())[e(457)](t=>t[e(533)](e(531)))))return!1;let o=!1;for(let n=0;n<this[e(472)][e(475)];n++){const i=this[e(472)][n],s=t[e(514)](i[e(548)]),r=t[e(467)](this[e(453)],n);s[e(483)](r)||(t[e(520)](t[e(547)](i[e(548)]),r),o=!0)}return o}[u(452)](t){const e=u;if(!this[e(472)][e(475)])return!1;const{model:o}=this[e(503)];let n=!1;for(let i=0;i<this[e(472)][e(475)]-1;i++){const s=this[e(472)][i],r=this[e(472)][i+1],a=o[e(514)](s[e(471)]),c=o[e(514)](r[e(471)]);e(511)===a[e(510)](c)&&(this[e(538)](t,s[e(471)]),i=-1,n=!0)}return n}}function d(){const t=["_updateFootnoteRefCounter","35QDXruL","parent","high","getChanges","add","_handleFootnoteReferencesChanges","footnotesDefinitions","findIndex","footnoteId","end","getAttribute","low","$graveyard","before","getChildren","_handleMovedFootnoteReference","push","has","listenTo","paragraph","isPremiumPlugin","differ","model","4896810BuTONK","createRangeOn","definition","reset","256612VqErwu","singleton","childCount","_ensureFootnotesReferencesHaveProperOrder","_footnotesDefinitions","getRootNames","8LfViiX","registerPostFixer","map","set","_handleFootnotesDefinitionsObjectChanges","43116516rAtLZr","setFootnoteFormatter","_handleInsertedFootnoteReference","_footnoteRefsTracker","FootnotesTracker","footnoteCounter","init","createPositionAt","get","remove","filter","reference","_footnotes","getFootnote","config","length","_footnoteDefsTracker","insert","isOfficialPlugin","min","pluginName","some","_handleRemoveFootnoteReferenceById","isEqual","indexOf","from","find","createRangeIn","_handleFootnotesDefinitionsObjectSync","668235gwddYT","_footnoteFormatter","createElement","splice","append","getFootnotesDefinitionsObjectElement","_insertEmptyFootnotesDefinitionsContainer","footnoteDefinition","rootName","_ensureFootnotesDefinitionsContainerExists","_handleFootnoteDefinitionsChanges","setAttribute","_updateFootnotesCounters","_sortFootnoteDefinitions","editor","root","unshift","getFootnotes","document","enqueueChange","footnoteInlineContent","compareWith","after","getFootnotesFormatter","footnoteRef","createPositionBefore","8402024LGILhX","869394brJBKN","footnotes.multiBlock","663633TcTRYd","_footnoteDefsContainerTracker","move","change:data"];return(d=function(){return t})()}function h(t,e){const o=d();return(h=function(t,e){return o[t-=452]})(t,e)}function p(t,e,o){const n=u;if(o[n(552)])return!1;const i=n(e?542:509);return t[n(477)](t[n(491)](i),o),!0}function m(t,e,o){const n=u;if(0===e[n(475)])return 0;const i=t[n(514)](o);for(let o=0;o<e[n(475)];o++){const s=e[o],r=t[n(514)](s[n(471)]);if(n(536)===i[n(510)](r))return o}const s=o[n(504)];let r=-1;for(let t=e[n(475)]-1;t>=0;t--)if(e[t][n(471)][n(504)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(507)][n(454)](),c=a[n(484)](s[n(497)]),l=a[c+1];if(l)for(let t=0;t<e[n(475)];t++)if(e[t][n(471)][n(504)][n(497)]===l)return t;return e[n(475)]}const g=y;function w(){const t=["get","length","1097459RtaPqv","execute","isBlock","getItems","_moveSelectionToFootnoteDefinition","916428GSnaOg","5257350phPlGV","4761774TgddVo","footnoteRef","refresh","document","createElement","_getPositionToInsertFootnote","selection","change","isEnabled","2367236FRkhcP","FootnotesEditing","editor","checkChild","49PmXAxl","test","model","plugins","3XFVZrh","footnoteId","1158284nQHLoA","insert-footnote-command-executed-with-invalid-id","getFirstRange","isObject","string","insertObject","9461160OjumyN","end"];return(w=function(){return t})()}function y(t,e){const o=w();return(y=function(t,e){return o[t-=225]})(t,e)}!function(t){const e=y,o=t();for(;;)try{if(609243===-parseInt(e(234))/1+parseInt(e(260))/2*(-parseInt(e(258))/3)+parseInt(e(250))/4+parseInt(e(240))/5+-parseInt(e(239))/6*(parseInt(e(254))/7)+parseInt(e(230))/8+parseInt(e(241))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(w);class b extends t.Command{[g(243)](){const t=g,e=this[t(252)][t(256)][t(244)][t(247)],o=this[t(246)](e);this[t(249)]=!!o}[g(235)](t){const e=g,{editor:o}=this,{model:n}=o,{selection:s}=n[e(244)],r=this[e(246)](s);if(!r)return;const a=o[e(257)][e(232)](e(251)),c=t?.[e(259)]??(0,i.uid)();!function(t){const o=e;return o(228)==typeof t&&t[o(233)]>0&&!/\s/[o(255)](t)&&!/^\d/[o(255)](t)}(c)?(0,i.logWarning)(e(225)):(n[e(248)](t=>{const o=e,i=t[o(245)](o(242),{footnoteId:c});n[o(229)](i,r,null)}),a[e(238)](c))}[g(246)](t){const e=g,{model:o}=this[e(252)],{schema:n}=o,i=t[e(226)]();for(const t of i[e(237)]())if(n[e(236)](t)||n[e(227)](t))return null;const s=i[e(231)];return n[e(253)](s,e(242))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[f]}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 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])],f(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 u=(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(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=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(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])](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])]: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=>{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])](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:1761523200;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(f).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(f).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})=>P(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(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+Shift+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Shift+D"}]}),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","sup")||!i.hasClass("footnote"))&&s.getSelectedElement()===i},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:o}=e,n=o.getChild(0).getAttribute("href");this._moveSelectionToFootnoteDefinition(n.slice(1)),t.stop(),e.preventDefault()},{priority:"high",context:t=>t.is("element","sup")&&t.hasClass("footnote")&&o}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:o}=e;if(!o.is("element","a"))return;let n=o.getAttribute("href");if(!n?.startsWith("#"))return;n=n.slice(1);let i=!1;(n.startsWith("ref-")&&this._moveSelectionToFootnoteReference(n.slice(4))||this._moveSelectionToFootnoteDefinition(n))&&(i=!0),i&&(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 P(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 S=o(331);function _(){const t=["insert","pluginName","parse","getFootnotesDefinitionsObjectElement","data","29205539pitjsi","_insertEmptyFootnotesDefinitionsContainer","toModel","toData","createRangeIn","requires","47838BoNFWK","dataTransfer","getFirstRange","drop","sourceEditorId","element","create","footnoteDefinition","2884021Wjxbgy","2327144amMNCR","append","getFootnotes","_handlePasteFootnotesDefinitions","toView","add","end","method","find","1tnizwg","get","document","422892okTCOx","editing","footnoteId","isOfficialPlugin","8KDxfNc","footnotesDefinitions","getData","application/ckeditor5-footnotes","70oFrLiM","setAttribute","createElement","getAttribute","_defineClipboardIntegration","clipboardInput","isPremiumPlugin","reduce","getFootnote","listenTo","1456695FxdILa","root","stringify","init","_handleCopyFootnotesDefinitions","from","definition","content","htmlProcessor","footnoteRef","setData","change","290zLrAaq","push","359004KJMEHZ","editor","outputTransformation","contentInsertion","FootnotesClipboard","entries","remove","length","selection"];return(_=function(){return t})()}function D(t,e){const o=_();return(D=function(t,e){return o[t-=342]})(t,e)}const A=D;!function(t){const e=D,o=t();for(;;)try{if(634314===-parseInt(e(378))/1*(parseInt(e(369))/2)+parseInt(e(413))/3+parseInt(e(381))/4+parseInt(e(411))/5*(parseInt(e(360))/6)+-parseInt(e(368))/7*(parseInt(e(385))/8)+parseInt(e(399))/9*(-parseInt(e(389))/10)+parseInt(e(354))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(_);class L extends t.Plugin{static get[A(350)](){return A(344)}static get[A(359)](){return[v,S.ClipboardPipeline]}static get[A(384)](){return!0}static get[A(395)](){return!0}[A(402)](){this[A(393)]()}[A(393)](){const t=A;this[t(403)](),this[t(372)]()}[A(403)](){const t=A,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(379)](S.ClipboardPipeline),s=o[t(379)](f);this[t(398)](i,t(342),(o,i)=>{const r=t,a=function(t,e){const o=D,n=new Set;for(const{item:i}of t[o(358)](e))i.is(o(365),o(408))&&n[o(374)](i[o(392)](o(383)));return Array[o(404)](n)}(n,i[r(406)]);if(!a[r(347)])return;const c=s[r(371)](),l=a[r(396)]((t,o)=>{const n=r,i=c[n(377)](t=>t.id===o);if(i){const o=e[n(353)][n(373)](i[n(405)],{isClipboardPipeline:!0}),s=e[n(353)][n(407)][n(357)](o);t[i.id]=s}return t},Object[r(366)](null));i[r(361)][r(409)](r(388),JSON[r(401)](l))})}[A(372)](){const t=A,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(382)],r=n[t(379)](S.ClipboardPipeline),a=n[t(379)](f);let c=null;this[t(398)](s[t(380)],t(394),(e,o)=>{const n=t,i=o[n(361)][n(387)](n(388));c=i?JSON[n(351)](i):null}),this[t(398)](r,t(343),(n,s)=>{const r=t;if(!c)return;const l=s[r(364)]===this[r(414)].id;l&&r(363)===s[r(376)]||o[r(410)](t=>{const n=r;!function(t,e){const o=D,n=[];for(const{item:i}of t[o(358)](e))i.is(o(365),o(386))&&n[o(412)](i);for(const e of n)t[o(346)](e)}(t,s[n(406)]);let u=a[n(352)]();if(!u){const e=o[n(380)][n(348)][n(362)]()[n(400)];u=a[n(355)](t,e)}const f=function(t,e,o){const s=n,r=Object[s(366)](null);for(const{item:n}of t[s(358)](e))if(n.is(s(365),s(408))){const e=n[s(392)](s(383));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(390)](s(383),r[e],n)}return r}(t,s[n(406)],t=>!l||null!==a[n(397)](t));for(const[o,i]of Object[n(345)](c)){const s=f[o]||o,r=t[n(391)](n(367),{footnoteId:s}),a=e[n(353)][n(407)][n(373)](i),c=e[n(353)][n(356)](a,r);t[n(370)](c,r),t[n(349)](r,u,n(375))}c=null})})}}var T=o(311),V=o(355),O=o(450),N=o.n(O),R=o(774),K=o.n(R),M=o(265),j=o.n(M),B=o(410),z=o.n(B),W=o(238),q=o.n(W),H=o(14),U={attributes:{"data-cke":!0}};U.setAttributes=z(),U.insert=j().bind(null,"head"),U.domAPI=K(),U.insertStyleElement=q();N()(H.A,U);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,T.ButtonView)),e.add("menuBar:insertFootnote",G(t,T.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 T.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}}var Y=Q;function Q(t,e){var o=J();return(Q=function(t,e){return o[t-=347]})(t,e)}!function(t){for(var e=Q,o=t();;)try{if(355746===-parseInt(e(360))/1+-parseInt(e(347))/2*(parseInt(e(358))/3)+parseInt(e(348))/4*(-parseInt(e(349))/5)+parseInt(e(353))/6+-parseInt(e(357))/7+-parseInt(e(354))/8+parseInt(e(350))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(J);class $ extends t.Plugin{static get[Y(356)](){return Y(359)}static get[Y(355)](){return[v,L,X]}static get[Y(352)](){return!0}static get[Y(351)](){return!0}}function J(){var t=["4tGcFpd","2814390QVkIYj","22996035AmhBut","isPremiumPlugin","isOfficialPlugin","423306kAusXJ","2579704IEufpj","requires","pluginName","3621443VSMUph","6gJfrAm","Footnotes","300106zAskQU","567124HAGenM"];return(J=function(){return t})()}function Z(){const t=["lower-roman","4782022kqgpiH","9199992CxjPxh","lower-latin","decimal-leading-zero","6254692HRccHh","202716mCkZvn","decimal","lower-alpha","3579000kYyoyx","2wTolsw","upper-roman","392902qfohOo","upper-latin","11193952CutpCz","upper-alpha"];return(Z=function(){return t})()}const tt=et;function et(t,e){const o=Z();return(et=function(t,e){return o[t-=306]})(t,e)}!function(t){const e=et,o=t();for(;;)try{if(936457===-parseInt(e(315))/1+parseInt(e(313))/2*(-parseInt(e(309))/3)+parseInt(e(308))/4+-parseInt(e(312))/5+-parseInt(e(321))/6+parseInt(e(320))/7+parseInt(e(317))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Z);const ot=[tt(310),tt(307),tt(306),tt(316),tt(311),tt(318),tt(319),tt(314)];function nt(){const t=["includes","getAttribute","4582370GpFWRN","refresh","isEnabled","3eXpmFY","_updateFootnotesCounters","value","1515150mhYIzU","plugins","1270352gyUwQc","35055180VTfbEP","change","7MSwbHB","model","493366sXuwFc","footnotesListStyle","execute","get","getFootnotesDefinitionsObjectElement","6200616lhEOOw","setAttribute","14208432xZiaFR"];return(nt=function(){return t})()}function it(t,e){const o=nt();return(it=function(t,e){return o[t-=449]})(t,e)}const st=it;!function(t){const e=it,o=t();for(;;)try{if(928532===parseInt(e(457))/1+-parseInt(e(462))/2*(parseInt(e(452))/3)+-parseInt(e(467))/4+-parseInt(e(449))/5+parseInt(e(455))/6+-parseInt(e(460))/7*(parseInt(e(469))/8)+parseInt(e(458))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(nt);class rt extends t.Command{[st(450)](){const t=st,{editor:e}=this,o=e[t(456)][t(465)](f)[t(466)]();this[t(451)]=!!o,this[t(454)]=o?.[t(471)](t(463))??null}[st(464)]({value:t}){const e=st,{editor:o}=this,n=o[e(456)][e(465)](f),i=n[e(466)]();i&&ot[e(470)](t)&&o[e(461)][e(459)](o=>{const s=e;o[s(468)](s(463),t,i),n[s(453)](o)})}}const at=ct;function ct(t,e){const o=ut();return(ct=function(t,e){return o[t-=459]})(t,e)}!function(t){const e=ct,o=t();for(;;)try{if(971353===parseInt(e(466))/1*(parseInt(e(476))/2)+-parseInt(e(481))/3*(-parseInt(e(483))/4)+parseInt(e(479))/5+parseInt(e(470))/6+parseInt(e(463))/7*(parseInt(e(461))/8)+parseInt(e(459))/9*(-parseInt(e(465))/10)+-parseInt(e(462))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ut);class lt extends t.Command{[at(469)](){const t=at,{editor:e}=this,o=e[t(467)][t(460)](f)[t(473)]();this[t(468)]=!!o,this[t(475)]=o?.[t(471)](t(477))??null}[at(478)]({value:t}){const e=at,{editor:o}=this,n=o[e(467)][e(460)](f),i=n[e(473)]();i&&Number[e(482)](t)&&o[e(474)][e(480)](o=>{const s=e;o[s(464)](s(477),t,i),n[s(472)](o)})}}function ut(){const t=["10924422LnTavK","getAttribute","_updateFootnotesCounters","getFootnotesDefinitionsObjectElement","model","value","158yTfDOp","footnotesListStart","execute","5051620pkamkV","change","3oxXFzE","isInteger","1878944geywqn","109593rlBqgY","get","3890448tQUWcE","39134293QebjwF","7udltav","setAttribute","50CuTkPm","10162pPTMnp","plugins","isEnabled","refresh"];return(ut=function(){return t})()}const ft=ht;function dt(){const t=["from","footnotes-list","createRangeOn","4954833xbIhsM","footnotesListStyle","toUpperCase","parent","position","list-style-type","start","getAttribute","upcast","upper-alpha","registerPostFixer","item","footnotesListStart","toViewElement","differ","define","1617729VENLcl","decimal","pluginName","editor","padStart","getStyle","find","type","_definePostfixer","attribute:footnotesListStyle:footnotesDefinitions","2547153BmCOjF","mapper","setStyle","footnotesStart","5KqPGzG","config","name","_getDefaultListStyle","setFootnoteFormatter","getChildren","isNaN","fromCharCode","lower-latin","nodeAfter","element","requires","lower-alpha","FootnotesPropertiesEditing","get","modelCursor","consumable","max","isPremiumPlugin","schema","init","commands","viewItem","hasClass","attribute:footnotesListStart:footnotesDefinitions","6261200mvYOhb","removeAttribute","footnotesDefinitions","413082AqONyN","consume","parseInt","removeStyle","downcast","floor","checkAttribute","extend","_defineConverters","152782ZgKheJ","$text","plugins","isOfficialPlugin","getItems","decimal-leading-zero","for","setAttribute","footnotesStyle","_updateFootnotesCounters","25710058czEFlp","insert","24WIBezK","upper-roman","_defineFormatter","element:ol","add","footnotes.footnotesProperties.defaultStartIndex","hasAttribute","lower-roman","model","_getDefaultStartIndex","13lxzTYc","footnotes.footnotesProperties.defaultListStyle","document","_formatFootnoteListValue","upper-latin","10BDPrRe","toLowerCase","getChanges","_defineSchema","writer"];return(dt=function(){return t})()}function ht(t,e){const o=dt();return(ht=function(t,e){return o[t-=219]})(t,e)}!function(t){const e=ht,o=t();for(;;)try{if(790391===-parseInt(e(313))/1*(parseInt(e(291))/2)+parseInt(e(240))/3+-parseInt(e(279))/4+parseInt(e(254))/5*(-parseInt(e(282))/6)+-parseInt(e(250))/7*(-parseInt(e(303))/8)+-parseInt(e(224))/9+parseInt(e(318))/10*(parseInt(e(301))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(dt);class pt extends t.Plugin{static get[ft(242)](){return ft(267)}static get[ft(265)](){return[v,f]}static get[ft(294)](){return!0}static get[ft(272)](){return!0}[ft(274)](){const t=ft,{editor:e}=this;e[t(255)][t(239)](t(314),t(241)),e[t(255)][t(239)](t(308),1),e[t(275)][t(307)](t(299),new rt(e)),e[t(275)][t(307)](t(253),new lt(e)),this[t(219)](),this[t(290)](),this[t(305)](),this[t(248)]()}[ft(219)](){const t=ft,{editor:e}=this,{schema:o}=e[t(311)];o[t(289)](t(281),{allowAttributes:[t(225),t(236)]})}[ft(290)](){const t=ft,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(297)](t(232))[t(307)](e=>{const o=t;e.on(o(306),(t,e,n)=>{const s=o,r=e[s(276)],a=e[s(269)]?.[s(227)];r[s(277)](s(222))&&a?.is(s(264),s(281))&&(function(t,e,o,n){const i=s;if(!n[i(288)](e,i(236)))return;let r=1;const a=o[i(270)][i(283)](t,{attributes:i(230)});if(a){const e=Number[i(284)](t[i(231)](i(230)),10);Number[i(260)](e)||(r=e)}!a&&e[i(309)](i(236))||o[i(220)][i(298)](i(236),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(288)](e,i(225)))return;let r=i(241),a=!1;if(o[i(270)][i(283)](t,{attributes:i(247)})){const e={1:i(241),a:i(266),A:i(233),i:i(310),I:i(304)}[t[i(231)](i(247))];e&&(r=e),a=!0}o[i(270)][i(283)](t,{styles:i(229)})&&(r=t[i(245)](i(229)),a=!0),!a&&e[i(309)](i(225))||o[i(220)][i(298)](i(225),r,e)}(r,a,n,i))})}),o[t(297)](t(286))[t(307)](e=>{const o=t;e.on(o(278),(t,e,n)=>{const i=o;if(!n[i(270)][i(283)](e[i(235)],t[i(256)]))return;const s=mt(e[i(235)],n[i(251)]),{attributeNewValue:r}=e;null==r||1===r?n[i(220)][i(280)](i(230),s):n[i(220)][i(298)](i(230),String(r),s)}),e.on(o(249),(t,e,n)=>{const i=o;if(!n[i(270)][i(283)](e[i(235)],t[i(256)]))return;const s=mt(e[i(235)],n[i(251)]),{attributeNewValue:r}=e;r&&i(241)!==r?n[i(220)][i(252)](i(229),r,s):n[i(220)][i(285)](i(229),s)})})}[ft(248)](){const t=ft,{editor:e}=this,{model:o}=e,n=e[t(293)][t(268)](f),i=this[t(257)](),s=this[t(312)]();o[t(315)][t(234)](e=>{const r=t,a=o[r(315)][r(238)][r(320)]();let c=!1;for(const t of a){if(r(302)!==t[r(247)]||r(292)===t[r(256)])continue;const n=o[r(223)](t[r(228)][r(263)]);for(const t of n[r(295)]())t.is(r(264),r(281))&&(!t[r(309)](r(236))&&o[r(273)][r(288)](t,r(236))&&(e[r(298)](r(236),s,t),c=!0),!t[r(309)](r(225))&&o[r(273)][r(288)](t,r(225))&&(e[r(298)](r(225),i,t),c=!0))}return c&&n[r(300)](e),c})}[ft(305)](){const t=ft,{editor:e}=this;e[t(293)][t(268)](f)[t(258)](e=>this[t(316)](e))}[ft(257)](){const t=ft;return this[t(243)][t(255)][t(268)](t(314))}[ft(312)](){const t=ft;return this[t(243)][t(255)][t(268)](t(308))}[ft(316)]({container:t,value:e,digits:o}){const n=ft,i=t[n(231)](n(225)),s=t[n(231)](n(236)),r=Math[n(287)](e)+(s??1)-1;switch(i){case n(296):return function(t,e){const o=n;return String(t)[o(244)](e,"0")}(r,Math[n(271)](2,o));case n(266):case n(262):return gt(r,!1);case n(233):case n(317):return gt(r,!0);case n(310):return yt(r,!1);case n(304):return yt(r,!0);default:return String(r)}}}function mt(t,e){const o=ft,n=e[o(237)](t);return Array[o(221)](n[o(259)]())[o(246)](t=>t.is(o(264),"ol")&&t[o(277)](o(222)))}function gt(t,e){const o=ft;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(261)](97+t)+n,i=Math[o(287)]((i-1)/26)}return e?n[o(226)]():n}const wt=[{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 yt(t,e){const o=ft;let n="",i=t;for(const{value:t,numeral:e}of wt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(319)]()}class bt extends T.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new T.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new T.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,T.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 T.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 T.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 T.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 T.LabeledFieldView(this.locale,T.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,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("Footnotes start index must be greater than 0.")}),e}}var vt=o(945),It={attributes:{"data-cke":!0}};It.setAttributes=z(),It.insert=j().bind(null,"head"),It.domAPI=K(),It.insertStyleElement=q();N()(vt.A,It);vt.A&&vt.A.locals&&vt.A.locals;class kt extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[T.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,T.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 T.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 bt(t.locale,{styleGridAriaLabel:n,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),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}=T.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 Ct=Ft;function Ft(t,e){var o=Et();return(Ft=function(t,e){return o[t-=286]})(t,e)}!function(t){for(var e=Ft,o=t();;)try{if(608564===parseInt(e(290))/1+-parseInt(e(293))/2*(-parseInt(e(297))/3)+parseInt(e(294))/4*(parseInt(e(302))/5)+-parseInt(e(288))/6*(parseInt(e(299))/7)+-parseInt(e(287))/8*(parseInt(e(289))/9)+parseInt(e(291))/10*(-parseInt(e(292))/11)+parseInt(e(300))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Et);class xt extends t.Plugin{static get[Ct(296)](){return Ct(286)}static get[Ct(301)](){return[pt,kt]}static get[Ct(295)](){return!0}static get[Ct(298)](){return!0}}function Et(){var t=["10uDmKVv","FootnotesProperties","2408oFyKwD","266568QVFOqW","27414SSRQHC","1093176JeuDsj","3530CEBBrC","440srjyfK","2ZVFvxG","517744DzoauY","isOfficialPlugin","pluginName","993723KxMVlU","isPremiumPlugin","35FCWCaP","940572VWrDnM","requires"];return(Et=function(){return t})()}function Pt(){var t=["6720826xMocfs","1868022arfLHj","1Aqxhdx","916ytpWSR","10NIFbFX","1525134qQRWOD","11HdDbNP","2931JvzDtA","7827112UmLBCc","37172810wRswSO","1492230fcPZVs"];return(Pt=function(){return t})()}function St(t,e){var o=Pt();return(St=function(t,e){return o[t-=353]})(t,e)}!function(t){for(var e=St,o=t();;)try{if(534972===parseInt(e(358))/1*(-parseInt(e(361))/2)+parseInt(e(363))/3*(parseInt(e(359))/4)+parseInt(e(360))/5*(-parseInt(e(355))/6)+-parseInt(e(356))/7+-parseInt(e(353))/8+-parseInt(e(357))/9+-parseInt(e(354))/10*(-parseInt(e(362))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
4
+ */(()=>{var t={14:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),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-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.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},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265: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)}},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")},374: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}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},450: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),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:f,updater:p,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}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},774: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)}}}},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")},945:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),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}},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:()=>Y,FootnotesClipboard:()=>T,FootnotesEditing:()=>v,FootnotesProperties:()=>Et,FootnotesPropertiesEditing:()=>ht,FootnotesPropertiesUI:()=>kt,FootnotesStartCommand:()=>ut,FootnotesStyleCommand:()=>rt,FootnotesTracker:()=>h,FootnotesUI:()=>G,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);const r=a;function a(t,e){const o=l();return(a=function(t,e){return o[t-=294]})(t,e)}!function(t){const e=a,o=t();for(;;)try{if(773139===-parseInt(e(314))/1+-parseInt(e(307))/2+-parseInt(e(332))/3*(parseInt(e(323))/4)+-parseInt(e(298))/5+-parseInt(e(320))/6*(-parseInt(e(306))/7)+-parseInt(e(330))/8+parseInt(e(337))/9*(parseInt(e(310))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(l);class c{[r(316)];[r(305)];[r(302)];[r(309)]=new Map;constructor(t,e){const o=r;this[o(316)]=t,this[o(305)]=e[o(317)],this[o(302)]=e[o(326)]}[r(304)](){const t=r;this[t(309)][t(328)]()}[r(311)](t){const e=r,o=new Set,n=new Map;for(const i of t){if(e(322)===i[e(294)]&&e(329)!==i[e(301)]&&i[e(321)][e(336)]){const t=this[e(316)][e(308)](i[e(321)][e(336)]);for(const o of t[e(295)]()){if(!o.is(e(297),this[e(305)]))continue;const t=this[e(302)](o);n[e(331)](t)||n[e(312)](t,[]),n[e(299)](t)[e(333)](o)}}if(e(324)===i[e(294)]&&i[e(301)]===this[e(305)]){const t=this[e(302)]({getAttribute:t=>i[e(313)][e(299)](t)});o[e(319)](t)}}for(const[t,n]of this[e(309)])e(315)===n[e(303)][e(327)]&&o[e(319)](t);for(const t of o)this[e(309)][e(335)](t);for(const[t,o]of n)this[e(309)][e(312)](t,o[o[e(334)]-1]);const i=new Set;for(const[t,s]of n)o[e(331)](t)&&(i[e(319)](s[0]),s[e(334)]>1?n[e(312)](t,s[e(318)](1)):n[e(335)](t),o[e(335)](t));return{removed:Array[e(325)](o),inserted:Array[e(325)](n[e(300)]())[e(296)](),moved:Array[e(325)](i)}}}function l(){const t=["flat","element","2191040vqTzNH","get","values","name","_getElementKey","root","reset","_elementName","10232278CPDTyR","1491428OCnGKI","createRangeOn","_trackedElements","190060LQuTKM","getChanges","set","attributes","1342255aesCdB","$graveyard","_model","elementName","slice","add","6GqNEqo","position","insert","600672fskERg","remove","from","getElementKey","rootName","clear","$text","8790096HaVgLt","has","15mXoaMy","push","length","delete","nodeAfter","1746pwZGQc","type","getItems"];return(l=function(){return t})()}const u=f;function f(t,e){const o=d();return(f=function(t,e){return o[t-=407]})(t,e)}function d(){const t=["getChildren","footnoteDefinition","init","_ensureFootnotesDefinitionsContainerExists","insert","getChanges","_handleRemoveFootnoteReferenceById","low","reset","set","has","pluginName","getFootnote","move","compareWith","findIndex","createPositionAt","get","find","config","getFootnotesDefinitionsObjectElement","footnoteInlineContent","root","createPositionBefore","_updateFootnotesCounters","end","getRootNames","setFootnoteFormatter","_footnoteRefsTracker","createElement","editor","_updateFootnoteRefCounter","_handleFootnoteDefinitionsChanges","childCount","5slMLdV","rootName","splice","footnoteCounter","getAttribute","_handleMovedFootnoteReference","append","map","27CmUreR","indexOf","getFootnotesFormatter","add","some","min","isEqual","_footnotesDefinitions","before","from","6392976gqdpqr","push","unshift","_insertEmptyFootnotesDefinitionsContainer","parent","_footnotes","footnotes.multiBlock","high","setAttribute","_footnoteDefsTracker","FootnotesTracker","footnoteId","getFootnotes","document","7BZEfXu","806465TuCjBc","3hXWYyE","9338432qMYPBu","isPremiumPlugin","_footnoteFormatter","enqueueChange","definition","remove","change:data","paragraph","_handleFootnoteReferencesChanges","2439182vJwDDP","length","singleton","createRangeIn","registerPostFixer","3913940GYvkip","_sortFootnoteDefinitions","$graveyard","isOfficialPlugin","reference","263870WuCCFJ","differ","_handleFootnotesDefinitionsObjectChanges","after","_handleFootnotesDefinitionsObjectSync","_ensureFootnotesReferencesHaveProperOrder","model","_footnoteDefsContainerTracker","footnoteRef","footnotesDefinitions","_handleInsertedFootnoteReference","createRangeOn","listenTo","2694659LPiLZL"];return(d=function(){return t})()}!function(t){const e=f,o=t();for(;;)try{if(861099===-parseInt(e(423))/1+parseInt(e(434))/2*(-parseInt(e(424))/3)+-parseInt(e(439))/4*(-parseInt(e(492))/5)+parseInt(e(408))/6+-parseInt(e(422))/7*(-parseInt(e(425))/8)+-parseInt(e(500))/9*(parseInt(e(444))/10)+-parseInt(e(457))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(d);class h extends t.Plugin{[u(413)]=[];[u(507)]=null;[u(427)]=null;[u(451)];[u(486)];[u(417)];static get[u(469)](){return u(418)}static get[u(442)](){return!0}static get[u(426)](){return!0}constructor(t){const e=u;super(t),this[e(451)]=new c(this[e(488)][e(450)],{elementName:e(453),getElementKey:()=>e(436)}),this[e(486)]=new c(this[e(488)][e(450)],{elementName:e(452),getElementKey:t=>t[e(496)](e(419))}),this[e(417)]=new c(this[e(488)][e(450)],{elementName:e(459),getElementKey:t=>t[e(496)](e(419))})}[u(460)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(421)][t(438)](e=>{const n=t,i=o[n(421)][n(445)][n(463)]();let s=!1;return this[n(446)](e,i)&&(s=!0),this[n(490)](e,i)&&(s=!0),this[n(433)](e,i)&&(s=!0),this[n(449)](e)&&(s=!0),this[n(448)](e)&&(s=!0),this[n(440)](e)&&(s=!0),s}),this[t(456)](o[t(421)],t(431),()=>{const e=t;o[e(428)]({isUndoable:!1},t=>{this[e(461)](t)})},{priority:t(465)}),this[t(456)](n,t(467),()=>{const e=t;this[e(413)]=[],this[e(451)][e(466)](),this[e(486)][e(466)](),this[e(417)][e(466)]()},{priority:t(415)})}[u(478)](){return this[u(507)]}[u(470)](t){const e=u;return this[e(413)][e(476)](e=>e.id===t)||null}[u(420)](){const t=u;return Array[t(407)](this[t(413)])}[u(502)](){return this[u(427)]}[u(485)](t){this[u(427)]=t}[u(482)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(413)][o(435)];i++)this[o(489)](t,i)&&(n=!0);return n}[u(411)](t,e){const o=u,n=t[o(487)](o(453),{});return t[o(498)](n,e),this[o(507)]=n,n}[u(461)](t){const e=u;if(!this[e(413)][e(435)]||this[e(507)])return;const o=this[e(413)][0][e(443)][e(480)],n=this[e(411)](t,o);for(const o of this[e(413)])o[e(429)][e(412)]||t[e(462)](o[e(429)],n,e(483));this[e(482)](t)}[u(446)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(451)][o(463)](e);if(r[o(435)]&&(this[o(507)]=r[0]),i[o(435)])if(i[o(435)]>1||this[o(507)]&&i[o(504)](t=>t!==this[o(507)])){const e=t[o(487)](o(453),{}),s=[];this[o(507)]&&s[o(409)](this[o(507)]),s[o(409)](...i),t[o(462)](e,s[0],o(508));for(const n of s)t[o(471)](t[o(437)](n),t[o(474)](e,o(483))),t[o(430)](n);this[o(507)]=e,this[o(482)](t),n=!0}else this[o(507)]=i[0];if(s[o(435)]&&o(441)===this[o(507)]?.[o(480)][o(493)]){for(const e of this[o(413)])t[o(430)](e[o(443)]),n=!0;this[o(413)]=[],this[o(507)]=null}return n}[u(490)](t,e){const o=u;let n=!1;const i=this[o(488)][o(477)][o(475)](o(414)),{inserted:s,moved:r}=this[o(417)][o(463)](e);for(const e of[...r,...s]){const s=e[o(496)](o(419)),r=this[o(470)](s);r&&(r[o(429)]=e),p(t,i,e)&&(n=!0)}return n}[u(433)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(486)][o(463)](e);for(const e of i)this[o(464)](t,e)&&(n=!0);for(const e of s)this[o(454)](t,e)&&(n=!0);for(const e of r)this[o(497)](t,e)&&(n=!0);return n}[u(448)](t){const e=u;if(!this[e(507)])return!1;let o=!1;if(this[e(507)][e(491)]!==this[e(413)][e(435)]){const n=[];for(const t of this[e(507)][e(458)]()){const i=t[e(496)](e(419));this[e(470)](i)||(n[e(410)](t),o=!0)}for(const o of n)t[e(430)](o)}const n=new Set,i=[];for(const t of this[e(507)][e(458)]()){const s=t[e(496)](e(419));n[e(468)](s)?(i[e(410)](t),o=!0):n[e(503)](s)}for(const o of i)t[e(430)](o);return this[e(507)][e(491)]||(t[e(430)](this[e(507)]),this[e(507)]=null,o=!0),o}[u(454)](t,e){const o=u;if(this[o(413)][o(476)](t=>t[o(443)]===e))return!1;let n=!1;const i=e[o(496)](o(419)),s=this[o(413)][o(473)](t=>t.id===i);-1!==s&&(t[o(430)](this[o(413)][s][o(443)]),this[o(413)][o(494)](s,1),n=!0);let r=this[o(507)]?function(t,e){const n=o;for(const o of t[n(458)]())if(o[n(496)](n(419))===e)return o;return null}(this[o(507)],i):null;r||(r=t[o(487)](o(459),{footnoteId:i}),this[o(507)]&&(t[o(462)](r,this[o(507)],o(483)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(488)][o(450)],this[o(413)],e);this[o(413)][o(494)](c,0,a);let l=c;return-1!==s&&(l=Math[o(505)](c,s)),this[o(482)](t,l)&&(n=!0),n}[u(464)](t,e){const o=u,n=this[o(413)][o(473)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(413)][n];return o(441)!==s[o(429)][o(480)][o(493)]&&(t[o(430)](s[o(429)]),i=!0),this[o(413)][o(494)](n,1),this[o(482)](t,n)&&(i=!0),i}[u(497)](t,e){const o=u,n=e[o(496)](o(419)),i=this[o(413)][o(473)](t=>t.id===n),s=this[o(413)][i];let r=!1;s[o(443)]=e,this[o(413)][o(494)](i,1);const a=m(this[o(488)][o(450)],this[o(413)],e);return this[o(413)][o(494)](a,0,s),this[o(482)](t,Math[o(505)](i,a))&&(r=!0),r}[u(489)](t,e){const o=u;if(!this[o(507)])return!1;const n=this[o(413)][e];let i;return i=this[o(427)]?this[o(427)]({footnote:n,container:this[o(507)],digits:String(this[o(413)][o(435)])[o(435)],value:e+1}):String(e+1),n[o(443)][o(496)](o(495))!=i&&(t[o(416)](o(495),i,n[o(443)]),!0)}[u(440)](t){const e=u;if(!this[e(507)]||this[e(413)][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(413)][e(499)](t=>t.id),Array[e(407)](this[e(507)][e(458)]())[e(499)](t=>t[e(496)](e(419)))))return!1;let o=!1;for(let n=0;n<this[e(413)][e(435)];n++){const i=this[e(413)][n],s=t[e(481)](i[e(429)]),r=t[e(474)](this[e(507)],n);s[e(506)](r)||(t[e(471)](t[e(455)](i[e(429)]),r),o=!0)}return o}[u(449)](t){const e=u;if(!this[e(413)][e(435)])return!1;const{model:o}=this[e(488)];let n=!1;for(let i=0;i<this[e(413)][e(435)]-1;i++){const s=this[e(413)][i],r=this[e(413)][i+1],a=o[e(481)](s[e(443)]),c=o[e(481)](r[e(443)]);e(447)===a[e(472)](c)&&(this[e(497)](t,s[e(443)]),i=-1,n=!0)}return n}}function p(t,e,o){const n=u;if(o[n(491)])return!1;const i=n(e?432:479);return t[n(462)](t[n(487)](i),o),!0}function m(t,e,o){const n=u;if(0===e[n(435)])return 0;const i=t[n(481)](o);for(let o=0;o<e[n(435)];o++){const s=e[o],r=t[n(481)](s[n(443)]);if(n(508)===i[n(472)](r))return o}const s=o[n(480)];let r=-1;for(let t=e[n(435)]-1;t>=0;t--)if(e[t][n(443)][n(480)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(421)][n(484)](),c=a[n(501)](s[n(493)]),l=a[c+1];if(l)for(let t=0;t<e[n(435)];t++)if(e[t][n(443)][n(480)][n(493)]===l)return t;return e[n(435)]}const g=w;function w(t,e){const o=y();return(w=function(t,e){return o[t-=179]})(t,e)}function y(){const t=["11331pWUrtr","end","refresh","test","length","selection","editor","2833950XGWodV","_getPositionToInsertFootnote","isObject","footnoteId","createElement","15OfdBOP","get","document","execute","isBlock","insertObject","footnoteRef","plugins","insert-footnote-command-executed-with-invalid-id","FootnotesEditing","isEnabled","_moveSelectionToFootnoteDefinition","string","1715763QwXzKx","model","change","136367wlLpJC","getItems","checkChild","4651880YbGQZr","15170xkdlFp","2020302AdQidw","1959276rISGEh","32qyyvVP","getFirstRange"];return(y=function(){return t})()}!function(t){const e=w,o=t();for(;;)try{if(705635===-parseInt(e(179))/1+parseInt(e(185))/2+parseInt(e(195))/3+-parseInt(e(182))/4+parseInt(e(200))/5*(parseInt(e(184))/6)+-parseInt(e(213))/7*(-parseInt(e(186))/8)+-parseInt(e(188))/9*(parseInt(e(183))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(y);class b extends t.Command{[g(190)](){const t=g,e=this[t(194)][t(214)][t(202)][t(193)],o=this[t(196)](e);this[t(210)]=!!o}[g(203)](t){const e=g,{editor:o}=this,{model:n}=o,{selection:s}=n[e(202)],r=this[e(196)](s);if(!r)return;const a=o[e(207)][e(201)](e(209)),c=t?.[e(198)]??(0,i.uid)();!function(t){const o=e;return o(212)==typeof t&&t[o(192)]>0&&!/\s/[o(191)](t)&&!/^\d/[o(191)](t)}(c)?(0,i.logWarning)(e(208)):(n[e(215)](t=>{const o=e,i=t[o(199)](o(206),{footnoteId:c});n[o(205)](i,r,null)}),a[e(211)](c))}[g(196)](t){const e=g,{model:o}=this[e(194)],{schema:n}=o,i=t[e(187)]();for(const t of i[e(180)]())if(n[e(204)](t)||n[e(197)](t))return null;const s=i[e(189)];return n[e(181)](s,e(206))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[h]}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 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])],f(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 u=(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(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=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(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])](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])]: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=>{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])](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:1761609600;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(h).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(h).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})=>P(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(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+Shift+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Shift+D"}]}),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 P(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 S=o(331);function _(){const t=["contentInsertion","1554476xBTTUE","end","editing","716FRNoSV","_defineClipboardIntegration","application/ckeditor5-footnotes","_handlePasteFootnotesDefinitions","toModel","editor","isOfficialPlugin","pluginName","1753030iJyWUw","drop","footnoteId","method","data","create","426KMzoju","from","stringify","2987zVrYmG","selection","getData","createElement","footnoteDefinition","find","997338TTitXj","footnotesDefinitions","length","outputTransformation","init","getFirstRange","toView","6784840Jtunxq","reduce","change","root","_handleCopyFootnotesDefinitions","FootnotesClipboard","getAttribute","htmlProcessor","get","16079670ylGfbX","push","listenTo","dataTransfer","toData","createRangeIn","content","65891wJtQbr","_insertEmptyFootnotesDefinitionsContainer","getFootnotesDefinitionsObjectElement","setAttribute","definition","insert","isPremiumPlugin","requires","getFootnotes","getFootnote","footnoteRef","append","setData","remove","sourceEditorId","parse","entries","document","clipboardInput","element","add"];return(_=function(){return t})()}function D(t,e){const o=_();return(D=function(t,e){return o[t-=218]})(t,e)}const A=D;!function(t){const e=D,o=t();for(;;)try{if(831935===-parseInt(e(236))/1*(parseInt(e(219))/2)+parseInt(e(242))/3+-parseInt(e(287))/4+parseInt(e(227))/5+-parseInt(e(233))/6*(-parseInt(e(265))/7)+-parseInt(e(249))/8+parseInt(e(258))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(_);class T extends t.Plugin{static get[A(226)](){return A(254)}static get[A(272)](){return[v,S.ClipboardPipeline]}static get[A(225)](){return!0}static get[A(271)](){return!0}[A(246)](){this[A(220)]()}[A(220)](){const t=A;this[t(253)](),this[t(222)]()}[A(253)](){const t=A,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(257)](S.ClipboardPipeline),s=o[t(257)](h);this[t(260)](i,t(245),(o,i)=>{const r=t,a=function(t,e){const o=D,n=new Set;for(const{item:i}of t[o(263)](e))i.is(o(284),o(275))&&n[o(285)](i[o(255)](o(229)));return Array[o(234)](n)}(n,i[r(264)]);if(!a[r(244)])return;const c=s[r(273)](),l=a[r(250)]((t,o)=>{const n=r,i=c[n(241)](t=>t.id===o);if(i){const o=e[n(231)][n(248)](i[n(269)],{isClipboardPipeline:!0}),s=e[n(231)][n(256)][n(262)](o);t[i.id]=s}return t},Object[r(232)](null));i[r(261)][r(277)](r(221),JSON[r(235)](l))})}[A(222)](){const t=A,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(218)],r=n[t(257)](S.ClipboardPipeline),a=n[t(257)](h);let c=null;this[t(260)](s[t(282)],t(283),(e,o)=>{const n=t,i=o[n(261)][n(238)](n(221));c=i?JSON[n(280)](i):null}),this[t(260)](r,t(286),(n,s)=>{const r=t;if(!c)return;const l=s[r(279)]===this[r(224)].id;l&&r(228)===s[r(230)]||o[r(251)](t=>{const n=r;!function(t,e){const o=D,n=[];for(const{item:i}of t[o(263)](e))i.is(o(284),o(243))&&n[o(259)](i);for(const e of n)t[o(278)](e)}(t,s[n(264)]);let u=a[n(267)]();if(!u){const e=o[n(282)][n(237)][n(247)]()[n(252)];u=a[n(266)](t,e)}const f=function(t,e,o){const s=n,r=Object[s(232)](null);for(const{item:n}of t[s(263)](e))if(n.is(s(284),s(275))){const e=n[s(255)](s(229));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(268)](s(229),r[e],n)}return r}(t,s[n(264)],t=>!l||null!==a[n(274)](t));for(const[o,i]of Object[n(281)](c)){const s=f[o]||o,r=t[n(239)](n(240),{footnoteId:s}),a=e[n(231)][n(256)][n(248)](i),c=e[n(231)][n(223)](a,r);t[n(276)](c,r),t[n(270)](r,u,n(288))}c=null})})}}var L=o(311),V=o(355),R=o(450),N=o.n(R),O=o(774),K=o.n(O),j=o(265),M=o.n(j),B=o(410),W=o.n(B),U=o(238),z=o.n(U),q=o(14),X={attributes:{"data-cke":!0}};X.setAttributes=W(),X.insert=M().bind(null,"head"),X.domAPI=K(),X.insertStyleElement=z();N()(q.A,X);q.A&&q.A.locals&&q.A.locals;class G 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",H(t,L.ButtonView)),e.add("menuBar:insertFootnote",H(t,L.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 H(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof L.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 J(){var t=["isOfficialPlugin","Footnotes","6RyLjOr","requires","734430BJFjwl","isPremiumPlugin","507928QWqxRZ","243174uGgoyC","3655813UMCEPd","41231dlePTk","1307904vYVciJ","26YseiLJ","1529325EyFzyD","pluginName"];return(J=function(){return t})()}var Z=Q;function Q(t,e){var o=J();return(Q=function(t,e){return o[t-=373]})(t,e)}!function(t){for(var e=Q,o=t();;)try{if(375107===parseInt(e(382))/1*(parseInt(e(384))/2)+parseInt(e(380))/3+parseInt(e(379))/4+parseInt(e(377))/5+-parseInt(e(375))/6*(parseInt(e(381))/7)+-parseInt(e(383))/8+parseInt(e(385))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(J);class Y extends t.Plugin{static get[Z(386)](){return Z(374)}static get[Z(376)](){return[v,T,G]}static get[Z(373)](){return!0}static get[Z(378)](){return!0}}function $(t,e){const o=tt();return($=function(t,e){return o[t-=454]})(t,e)}function tt(){const t=["upper-latin","lower-latin","1473328YUoolD","decimal-leading-zero","6UPCedA","upper-alpha","1717524hOSemF","upper-roman","944840NGDxKU","lower-alpha","decimal","134974gNiPig","2696716KFuYyU","lower-roman","3726RlgXNb","406392IwXScd","52080vxmxat"];return(tt=function(){return t})()}const et=$;!function(t){const e=$,o=t();for(;;)try{if(844790===parseInt(e(464))/1+parseInt(e(468))/2+parseInt(e(466))/3*(parseInt(e(457))/4)+-parseInt(e(470))/5+parseInt(e(460))/6+-parseInt(e(456))/7+-parseInt(e(461))/8*(parseInt(e(459))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(tt);const ot=[et(455),et(465),et(463),et(462),et(454),et(467),et(458),et(469)],nt=st;function it(){const t=["36oIbPHz","refresh","2419030dXmZBN","11oDQRtQ","3850023XEgAaO","change","278585PSnkua","includes","getFootnotesDefinitionsObjectElement","getAttribute","isEnabled","11292AADnXW","setAttribute","44222748wFbsgE","footnotesListStyle","640hNDZts","execute","value","826Covmbc","2807srhaST","plugins","get","model","3709vkHplU","127647EaSqog","_updateFootnotesCounters"];return(it=function(){return t})()}function st(t,e){const o=it();return(st=function(t,e){return o[t-=162]})(t,e)}!function(t){const e=st,o=t();for(;;)try{if(804075===parseInt(e(184))/1*(-parseInt(e(179))/2)+parseInt(e(165))/3+-parseInt(e(187))/4*(parseInt(e(167))/5)+parseInt(e(172))/6*(-parseInt(e(180))/7)+-parseInt(e(176))/8*(parseInt(e(185))/9)+-parseInt(e(163))/10*(parseInt(e(164))/11)+parseInt(e(174))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(it);class rt extends t.Command{[nt(162)](){const t=nt,{editor:e}=this,o=e[t(181)][t(182)](h)[t(169)]();this[t(171)]=!!o,this[t(178)]=o?.[t(170)](t(175))??null}[nt(177)]({value:t}){const e=nt,{editor:o}=this,n=o[e(181)][e(182)](h),i=n[e(169)]();i&&ot[e(168)](t)&&o[e(183)][e(166)](o=>{const s=e;o[s(173)](s(175),t,i),n[s(186)](o)})}}const at=lt;function ct(){const t=["_updateFootnotesCounters","3719221IyzZNt","372652eWbwGe","change","execute","10hmdoCk","isInteger","607560aUnZWj","model","getFootnotesDefinitionsObjectElement","31136qykMHv","getAttribute","get","8464YffdXW","isEnabled","6CpRRCX","1emsBLw","footnotesListStart","249110mygwus","setAttribute","1719TVZjCM","176180zGbDlR","value","plugins","refresh"];return(ct=function(){return t})()}function lt(t,e){const o=ct();return(lt=function(t,e){return o[t-=463]})(t,e)}!function(t){const e=lt,o=t();for(;;)try{if(132426===parseInt(e(474))/1*(-parseInt(e(476))/2)+-parseInt(e(465))/3+parseInt(e(468))/4+-parseInt(e(479))/5+parseInt(e(473))/6*(-parseInt(e(485))/7)+parseInt(e(471))/8*(parseInt(e(478))/9)+-parseInt(e(463))/10*(-parseInt(e(484))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ct);class ut extends t.Command{[at(482)](){const t=at,{editor:e}=this,o=e[t(481)][t(470)](h)[t(467)]();this[t(472)]=!!o,this[t(480)]=o?.[t(469)](t(475))??null}[at(487)]({value:t}){const e=at,{editor:o}=this,n=o[e(481)][e(470)](h),i=n[e(467)]();i&&Number[e(464)](t)&&o[e(466)][e(486)](o=>{const s=e;o[s(477)](s(475),t,i),n[s(483)](o)})}}const ft=dt;function dt(t,e){const o=mt();return(dt=function(t,e){return o[t-=375]})(t,e)}!function(t){const e=dt,o=t();for(;;)try{if(917607===parseInt(e(382))/1*(parseInt(e(427))/2)+parseInt(e(417))/3*(-parseInt(e(461))/4)+-parseInt(e(472))/5+parseInt(e(379))/6+-parseInt(e(462))/7*(parseInt(e(381))/8)+-parseInt(e(399))/9+parseInt(e(459))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(mt);class ht extends t.Plugin{static get[ft(404)](){return ft(441)}static get[ft(422)](){return[v,h]}static get[ft(474)](){return!0}static get[ft(421)](){return!0}[ft(443)](){const t=ft,{editor:e}=this;e[t(378)][t(442)](t(454),t(471)),e[t(378)][t(442)](t(389),1),e[t(393)][t(386)](t(466),new rt(e)),e[t(393)][t(386)](t(465),new ut(e)),this[t(473)](),this[t(387)](),this[t(446)](),this[t(429)]()}[ft(473)](){const t=ft,{editor:e}=this,{schema:o}=e[t(435)];o[t(464)](t(447),{allowAttributes:[t(445),t(418)]})}[ft(387)](){const t=ft,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(468)](t(409))[t(386)](e=>{const o=t;e.on(o(439),(t,e,n)=>{const s=o,r=e[s(423)],a=e[s(410)]?.[s(419)];r[s(398)](s(437))&&a?.is(s(405),s(447))&&(function(t,e,o,n){const i=s;if(!n[i(384)](e,i(418)))return;let r=1;const a=o[i(453)][i(392)](t,{attributes:i(457)});if(a){const e=Number[i(444)](t[i(376)](i(457)),10);Number[i(448)](e)||(r=e)}!a&&e[i(451)](i(418))||o[i(402)][i(420)](i(418),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(384)](e,i(445)))return;let r=i(471),a=!1;if(o[i(453)][i(392)](t,{attributes:i(385)})){const e={1:i(471),a:i(397),A:i(388),i:i(458),I:i(450)}[t[i(376)](i(385))];e&&(r=e),a=!0}o[i(453)][i(392)](t,{styles:i(395)})&&(r=t[i(469)](i(395)),a=!0),!a&&e[i(451)](i(445))||o[i(402)][i(420)](i(445),r,e)}(r,a,n,i))})}),o[t(468)](t(415))[t(386)](e=>{const o=t;e.on(o(411),(t,e,n)=>{const i=o;if(!n[i(453)][i(392)](e[i(400)],t[i(449)]))return;const s=pt(e[i(400)],n[i(403)]),{attributeNewValue:r}=e;null==r||1===r?n[i(402)][i(380)](i(457),s):n[i(402)][i(420)](i(457),String(r),s)}),e.on(o(425),(t,e,n)=>{const i=o;if(!n[i(453)][i(392)](e[i(400)],t[i(449)]))return;const s=pt(e[i(400)],n[i(403)]),{attributeNewValue:r}=e;r&&i(471)!==r?n[i(402)][i(396)](i(395),r,s):n[i(402)][i(391)](i(395),s)})})}[ft(429)](){const t=ft,{editor:e}=this,{model:o}=e,n=e[t(424)][t(456)](h),i=this[t(436)](),s=this[t(433)]();o[t(467)][t(438)](e=>{const r=t,a=o[r(467)][r(414)][r(390)]();let c=!1;for(const t of a){if(r(431)!==t[r(385)]||r(452)===t[r(449)])continue;const n=o[r(377)](t[r(375)][r(432)]);for(const t of n[r(440)]())t.is(r(405),r(447))&&(!t[r(451)](r(418))&&o[r(426)][r(384)](t,r(418))&&(e[r(420)](r(418),s,t),c=!0),!t[r(451)](r(445))&&o[r(426)][r(384)](t,r(445))&&(e[r(420)](r(445),i,t),c=!0))}return c&&n[r(455)](e),c})}[ft(446)](){const t=ft,{editor:e}=this;e[t(424)][t(456)](h)[t(412)](e=>this[t(434)](e))}[ft(436)](){const t=ft;return this[t(413)][t(378)][t(456)](t(454))}[ft(433)](){const t=ft;return this[t(413)][t(378)][t(456)](t(389))}[ft(434)]({container:t,value:e,digits:o}){const n=ft,i=t[n(376)](n(445)),s=t[n(376)](n(418)),r=Math[n(383)](e)+(s??1)-1;switch(i){case n(416):return function(t,e){const o=n;return String(t)[o(460)](e,"0")}(r,Math[n(430)](2,o));case n(397):case n(401):return gt(r,!1);case n(388):case n(463):return gt(r,!0);case n(458):return yt(r,!1);case n(450):return yt(r,!0);default:return String(r)}}}function pt(t,e){const o=ft,n=e[o(408)](t);return Array[o(406)](n[o(428)]())[o(470)](t=>t.is(o(405),"ol")&&t[o(398)](o(437)))}function mt(){const t=["FootnotesPropertiesEditing","define","init","parseInt","footnotesListStyle","_defineFormatter","footnotesDefinitions","isNaN","name","upper-roman","hasAttribute","$text","consumable","footnotes.footnotesProperties.defaultListStyle","_updateFootnotesCounters","get","start","lower-roman","20755010HJmTqC","padStart","732cEGypo","63LhVMsA","upper-latin","extend","footnotesStart","footnotesStyle","document","for","getStyle","find","decimal","4107800zTRBpk","_defineSchema","isOfficialPlugin","toUpperCase","position","getAttribute","createRangeOn","config","10949658qyxAVI","removeAttribute","862232uhDnrr","18887OrtPVo","floor","checkAttribute","type","add","_defineConverters","upper-alpha","footnotes.footnotesProperties.defaultStartIndex","getChanges","removeStyle","consume","commands","fromCharCode","list-style-type","setStyle","lower-alpha","hasClass","13783275jRaxkF","item","lower-latin","writer","mapper","pluginName","element","from","toLowerCase","toViewElement","upcast","modelCursor","attribute:footnotesListStart:footnotesDefinitions","setFootnoteFormatter","editor","differ","downcast","decimal-leading-zero","21360jRbUyg","footnotesListStart","parent","setAttribute","isPremiumPlugin","requires","viewItem","plugins","attribute:footnotesListStyle:footnotesDefinitions","schema","174nwLBnT","getChildren","_definePostfixer","max","insert","nodeAfter","_getDefaultStartIndex","_formatFootnoteListValue","model","_getDefaultListStyle","footnotes-list","registerPostFixer","element:ol","getItems"];return(mt=function(){return t})()}function gt(t,e){const o=ft;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(394)](97+t)+n,i=Math[o(383)]((i-1)/26)}return e?n[o(475)]():n}const wt=[{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 yt(t,e){const o=ft;let n="",i=t;for(const{value:t,numeral:e}of wt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(407)]()}class bt extends L.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new L.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new L.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,L.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 L.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 L.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 L.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 L.LabeledFieldView(this.locale,L.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,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("Footnotes start index must be greater than 0.")}),e}}var vt=o(945),It={attributes:{"data-cke":!0}};It.setAttributes=W(),It.insert=M().bind(null,"head"),It.domAPI=K(),It.insertStyleElement=z();N()(vt.A,It);vt.A&&vt.A.locals&&vt.A.locals;class kt extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[L.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,L.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 L.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 bt(t.locale,{styleGridAriaLabel:n,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),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}=L.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]})}}function Ct(){var t=["FootnotesProperties","49866McSufx","50859MLZpup","252175yGMEGA","isOfficialPlugin","pluginName","5043CzcrUD","92059XfZaCb","548OhdwaT","30280ouDPoq","isPremiumPlugin","296QZbsAX","3099440oGjuvR","requires","245HbetjW","4AajMFc"];return(Ct=function(){return t})()}var Ft=xt;function xt(t,e){var o=Ct();return(xt=function(t,e){return o[t-=225]})(t,e)}!function(t){for(var e=xt,o=t();;)try{if(207518===parseInt(e(233))/1*(parseInt(e(225))/2)+-parseInt(e(232))/3*(-parseInt(e(234))/4)+parseInt(e(235))/5+-parseInt(e(227))/6*(parseInt(e(240))/7)+-parseInt(e(237))/8*(parseInt(e(228))/9)+parseInt(e(238))/10+-parseInt(e(229))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Ct);class Et extends t.Plugin{static get[Ft(231)](){return Ft(226)}static get[Ft(239)](){return[ht,kt]}static get[Ft(230)](){return!0}static get[Ft(236)](){return!0}}function Pt(t,e){var o=St();return(Pt=function(t,e){return o[t-=476]})(t,e)}function St(){var t=["3215xTCari","438790pXVYKZ","57345fmbWCx","3720jGeMii","50XavgFp","633703pxbTXJ","340sVgeNP","413256RJAiQm","18tEfvyh","1788604SkgRgw","1506160kBzjDi"];return(St=function(){return t})()}!function(t){for(var e=Pt,o=t();;)try{if(289057===-parseInt(e(478))/1+parseInt(e(486))/2*(parseInt(e(484))/3)+-parseInt(e(480))/4+parseInt(e(482))/5*(-parseInt(e(485))/6)+parseInt(e(476))/7+parseInt(e(481))/8*(-parseInt(e(479))/9)+parseInt(e(477))/10*(parseInt(e(483))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(St)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
@@ -39,9 +39,6 @@
39
39
  left:10px;
40
40
  right:auto;
41
41
  }
42
- .ck.ck-editor__editable .footnote > a{
43
- pointer-events:none;
44
- }
45
42
  .ck.ck-editor__editable .footnotes-divider{
46
43
  margin-top:0;
47
44
  }
package/dist/index.css CHANGED
@@ -125,9 +125,6 @@
125
125
  left: 10px;
126
126
  right: auto;
127
127
  }
128
- .ck.ck-editor__editable .footnote > a {
129
- pointer-events: none;
130
- }
131
128
  .ck.ck-editor__editable .footnotes-divider {
132
129
  margin-top: 0;
133
130
  }