@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251022.0 → 0.0.0-nightly-20251024.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,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,':root{--ck-footnotes-list-widget-label-background-color:#757575;--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-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:1.9em 0 1.5em;padding-inline-start:3em;position:relative}.ck-content .footnotes:before{border-top:1px solid var(--ck-content-footnotes-list-separator-color);content:"";left:0;position:absolute;top:-1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes:before{left:auto;right:0}.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 .footnote>a{pointer-events:none}.ck.ck-editor__editable .footnotes-wrapper{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes-wrapper:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-list-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-wrapper[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-wrapper>.footnotes{margin-bottom:.65em;margin-top:1em}',""]);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,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)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]);o&&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),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),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(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=o.base?c[0]+o.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=n(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var n=e.domAPI(e);n.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;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=o(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var c=o(t,i),l=0;l<s.length;l++){var u=n(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,n)=>{t.exports=n(237)("./src/utils.js")},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function o(t,e,o,i){var s;if(o)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=n(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++,n=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(n,e,!1,t)},remove:function(t){o(n,e,!0,t)}}}},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},901:(t,e,n)=>{t.exports=n(237)("./src/widget.js")},945:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.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 n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Footnotes:()=>Z,FootnotesClipboard:()=>L,FootnotesEditing:()=>v,FootnotesProperties:()=>Et,FootnotesPropertiesEditing:()=>pt,FootnotesPropertiesUI:()=>It,FootnotesStartCommand:()=>lt,FootnotesStyleCommand:()=>st,FootnotesTracker:()=>d,FootnotesUI:()=>q,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);const r=c;!function(t){const e=c,n=t();for(;;)try{if(230865===parseInt(e(191))/1*(-parseInt(e(207))/2)+parseInt(e(205))/3+parseInt(e(199))/4*(parseInt(e(196))/5)+parseInt(e(187))/6+parseInt(e(198))/7*(parseInt(e(192))/8)+-parseInt(e(215))/9+-parseInt(e(212))/10*(-parseInt(e(184))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(l);class a{[r(224)];[r(220)];[r(214)];[r(186)]=new Map;constructor(t,e){const n=r;this[n(224)]=t,this[n(220)]=e[n(225)],this[n(214)]=e[n(209)]}[r(223)](){const t=r;this[t(186)][t(227)]()}[r(228)](t){const e=r,n=new Set,o=new Map;for(const i of t){if(e(213)===i[e(200)]&&e(194)!==i[e(188)]&&i[e(217)][e(197)]){const t=this[e(224)][e(203)](i[e(217)][e(197)]);for(const n of t[e(216)]()){if(!n.is(e(195),this[e(220)]))continue;const t=this[e(214)](n);o[e(201)](t)||o[e(219)](t,[]),o[e(206)](t)[e(226)](n)}}if(e(221)===i[e(200)]&&i[e(188)]===this[e(220)]){const t=this[e(214)]({getAttribute:t=>i[e(189)][e(206)](t)});n[e(190)](t)}}for(const[t,o]of this[e(186)])e(185)===o[e(202)][e(193)]&&n[e(190)](t);for(const t of n)this[e(186)][e(222)](t);for(const[t,n]of o)this[e(186)][e(219)](t,n[n[e(218)]-1]);const i=new Set;for(const[t,s]of o)n[e(201)](t)&&(i[e(190)](s[0]),s[e(218)]>1?o[e(219)](t,s[e(210)](1)):o[e(222)](t),n[e(222)](t));return{removed:Array[e(204)](n),inserted:Array[e(204)](o[e(211)]())[e(208)](),moved:Array[e(204)](i)}}}function c(t,e){const n=l();return(c=function(t,e){return n[t-=184]})(t,e)}function l(){const t=["values","230iFSgTi","insert","_getElementKey","3730023GRPayC","getItems","position","length","set","_elementName","remove","delete","reset","_model","elementName","push","clear","getChanges","62887zbdeoN","$graveyard","_trackedElements","1227828dphNSE","name","attributes","add","13GgtLEj","2056qiUSRp","rootName","$text","element","743160CRSGUm","nodeAfter","3094aQYfcD","4yxpXAu","type","has","root","createRangeOn","from","1038456EysWcO","get","46030gENeHh","flat","getElementKey","slice"];return(l=function(){return t})()}const u=f;function f(t,e){const n=p();return(f=function(t,e){return n[t-=194]})(t,e)}!function(t){const e=f,n=t();for(;;)try{if(151157===-parseInt(e(195))/1+parseInt(e(249))/2*(parseInt(e(262))/3)+-parseInt(e(221))/4+parseInt(e(265))/5+-parseInt(e(225))/6*(parseInt(e(228))/7)+parseInt(e(293))/8+parseInt(e(194))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(p);class d extends t.Plugin{[u(285)]=[];[u(205)]=null;[u(261)]=null;[u(224)];[u(238)];[u(268)];static get[u(230)](){return u(198)}static get[u(231)](){return!0}static get[u(248)](){return!0}constructor(t){const e=u;super(t),this[e(224)]=new a(this[e(284)][e(267)],{elementName:e(217),getElementKey:()=>e(263)}),this[e(238)]=new a(this[e(284)][e(267)],{elementName:e(236),getElementKey:t=>t[e(250)](e(269))}),this[e(268)]=new a(this[e(284)][e(267)],{elementName:e(239),getElementKey:t=>t[e(250)](e(269))})}[u(215)](){const t=u,{editor:e}=this,{model:n,data:o}=e;n[t(219)][t(276)](e=>{const o=t,i=n[o(219)][o(206)][o(259)]();let s=!1;return this[o(235)](e,i)&&(s=!0),this[o(281)](e,i)&&(s=!0),this[o(218)](e,i)&&(s=!0),this[o(227)](e)&&(s=!0),this[o(282)](e)&&(s=!0),this[o(258)](e)&&(s=!0),s}),this[t(274)](n[t(219)],t(252),()=>{const e=t;n[e(200)]({isUndoable:!1},t=>{this[e(233)](t)})},{priority:t(222)}),this[t(274)](o,t(211),()=>{const e=t;this[e(285)]=[],this[e(224)][e(208)](),this[e(238)][e(208)](),this[e(268)][e(208)]()},{priority:t(264)})}[u(201)](){return this[u(205)]}[u(212)](t){const e=u;return this[e(285)][e(241)](e=>e.id===t)||null}[u(283)](){const t=u;return Array[t(229)](this[t(285)])}[u(210)](){return this[u(261)]}[u(260)](t){this[u(261)]=t}[u(255)](t,e=0){const n=u;let o=!1;for(let i=e;i<this[n(285)][n(220)];i++)this[n(244)](t,i)&&(o=!0);return o}[u(247)](t,e){const n=u,o=t[n(290)](n(217),{});return t[n(251)](o,e),this[n(205)]=o,o}[u(233)](t){const e=u;if(!this[e(285)][e(220)]||this[e(205)])return;const n=this[e(285)][0][e(242)][e(207)],o=this[e(247)](t,n);for(const n of this[e(285)])n[e(289)][e(288)]||t[e(209)](n[e(289)],o,e(214));this[e(255)](t)}[u(235)](t,e){const n=u;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(224)][n(259)](e);if(r[n(220)]&&(this[n(205)]=r[0]),i[n(220)])if(i[n(220)]>1||this[n(205)]&&i[n(204)](t=>t!==this[n(205)])){const e=t[n(290)](n(217),{}),s=[];this[n(205)]&&s[n(275)](this[n(205)]),s[n(275)](...i),t[n(209)](e,s[0],n(271));for(const o of s)t[n(245)](t[n(243)](o),t[n(256)](e,n(214))),t[n(257)](o);this[n(205)]=e,this[n(255)](t),o=!0}else this[n(205)]=i[0];if(s[n(220)]&&n(237)===this[n(205)]?.[n(207)][n(270)]){for(const e of this[n(285)])t[n(257)](e[n(242)]),o=!0;this[n(285)]=[],this[n(205)]=null}return o}[u(281)](t,e){const n=u;let o=!1;const i=this[n(284)][n(292)][n(253)](n(286)),{inserted:s,moved:r}=this[n(268)][n(259)](e);for(const e of[...r,...s]){const s=e[n(250)](n(269)),r=this[n(212)](s);r&&(r[n(289)]=e),h(t,i,e)&&(o=!0)}return o}[u(218)](t,e){const n=u;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(238)][n(259)](e);for(const e of i)this[n(196)](t,e)&&(o=!0);for(const e of s)this[n(277)](t,e)&&(o=!0);for(const e of r)this[n(273)](t,e)&&(o=!0);return o}[u(282)](t){const e=u;if(!this[e(205)])return!1;let n=!1;if(this[e(205)][e(197)]!==this[e(285)][e(220)]){const o=[];for(const t of this[e(205)][e(280)]()){const i=t[e(250)](e(269));this[e(212)](i)||(o[e(226)](t),n=!0)}for(const n of o)t[e(257)](n)}const o=new Set,i=[];for(const t of this[e(205)][e(280)]()){const s=t[e(250)](e(269));o[e(199)](s)?(i[e(226)](t),n=!0):o[e(234)](s)}for(const n of i)t[e(257)](n);return this[e(205)][e(197)]||(t[e(257)](this[e(205)]),this[e(205)]=null,n=!0),n}[u(277)](t,e){const n=u;if(this[n(285)][n(241)](t=>t[n(242)]===e))return!1;let o=!1;const i=e[n(250)](n(269)),s=this[n(212)](i);s&&(t[n(257)](s[n(242)]),this[n(285)]=this[n(285)][n(272)](t=>t.id!==i),o=!0);let r=this[n(205)]?function(t,e){const o=n;for(const n of t[o(280)]())if(n[o(250)](o(269))===e)return n;return null}(this[n(205)],i):null;r||(r=t[n(290)](n(239),{footnoteId:i}),this[n(205)]&&(t[n(209)](r,this[n(205)],n(214)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(284)][n(267)],this[n(285)],e);return this[n(285)][n(266)](c,0,a),this[n(255)](t,c)&&(o=!0),o}[u(196)](t,e){const n=u,o=this[n(285)][n(240)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(285)][o];return n(237)!==s[n(289)][n(207)][n(270)]&&(t[n(257)](s[n(289)]),i=!0),this[n(285)][n(266)](o,1),this[n(255)](t,o)&&(i=!0),i}[u(273)](t,e){const n=u,o=e[n(250)](n(269)),i=this[n(285)][n(240)](t=>t.id===o),s=this[n(285)][i];let r=!1;s[n(242)]=e,this[n(285)][n(266)](i,1);const a=m(this[n(284)][n(267)],this[n(285)],e);return this[n(285)][n(266)](a,0,s),this[n(255)](t,Math[n(203)](i,a))&&(r=!0),r}[u(244)](t,e){const n=u;if(!this[n(205)])return!1;const o=this[n(285)][e];let i;return i=this[n(261)]?this[n(261)]({footnote:o,container:this[n(205)],digits:String(this[n(285)][n(220)])[n(220)],value:e+1}):String(e+1),o[n(242)][n(250)](n(202))!=i&&(t[n(213)](n(202),i,o[n(242)]),!0)}[u(258)](t){const e=u;if(!this[e(205)]||this[e(285)][e(220)]<2)return!1;if(function(t,n){const o=e;if(t[o(220)]!==n[o(220)])return!1;for(let e=0;e<t[o(220)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(285)][e(216)](t=>t.id),Array[e(229)](this[e(205)][e(280)]())[e(216)](t=>t[e(250)](e(269)))))return!1;let n=!1;for(let o=0;o<this[e(285)][e(220)];o++){const i=this[e(285)][o],s=t[e(223)](i[e(289)]),r=t[e(256)](this[e(205)],o);s[e(279)](r)||(t[e(245)](t[e(291)](i[e(289)]),r),n=!0)}return n}[u(227)](t){const e=u;if(!this[e(285)][e(220)])return!1;const{model:n}=this[e(284)];let o=!1;for(let i=0;i<this[e(285)][e(220)]-1;i++){const s=this[e(285)][i],r=this[e(285)][i+1],a=n[e(223)](s[e(242)]),c=n[e(223)](r[e(242)]);e(246)===a[e(287)](c)&&(this[e(273)](t,s[e(242)]),i=-1,o=!0)}return o}}function p(){const t=["some","_footnotesDefinitions","differ","root","reset","insert","getFootnotesFormatter","set","getFootnote","setAttribute","end","init","map","footnotesDefinitions","_handleFootnoteReferencesChanges","document","length","595512aNIjDx","low","createPositionBefore","_footnoteDefsContainerTracker","6uzaEhk","unshift","_ensureFootnotesReferencesHaveProperOrder","945315SoqngW","from","pluginName","isOfficialPlugin","paragraph","_ensureFootnotesDefinitionsContainerExists","add","_handleFootnotesDefinitionsObjectChanges","footnoteRef","$graveyard","_footnoteRefsTracker","footnoteDefinition","findIndex","find","reference","createRangeIn","_updateFootnoteRefCounter","move","after","_insertEmptyFootnotesDefinitionsContainer","isPremiumPlugin","33628aYbYZh","getAttribute","append","change:data","get","getRootNames","_updateFootnotesCounters","createPositionAt","remove","_sortFootnoteDefinitions","getChanges","setFootnoteFormatter","_footnoteFormatter","39MfOTJJ","singleton","high","854720mEAddR","splice","model","_footnoteDefsTracker","footnoteId","rootName","before","filter","_handleMovedFootnoteReference","listenTo","push","registerPostFixer","_handleInsertedFootnoteReference","footnoteInlineContent","isEqual","getChildren","_handleFootnoteDefinitionsChanges","_handleFootnotesDefinitionsObjectSync","getFootnotes","editor","_footnotes","footnotes.multiBlock","compareWith","parent","definition","createElement","createRangeOn","config","737984TeMbZD","indexOf","976059trwGna","155145HfhhJd","_handleRemoveFootnoteReferenceById","childCount","FootnotesTracker","has","enqueueChange","getFootnotesDefinitionsObjectElement","footnoteCounter","min"];return(p=function(){return t})()}function h(t,e,n){const o=u;if(n[o(197)])return!1;const i=o(e?232:278);return t[o(209)](t[o(290)](i),n),!0}function m(t,e,n){const o=u;if(0===e[o(220)])return 0;const i=t[o(223)](n);for(let n=0;n<e[o(220)];n++){const s=e[n],r=t[o(223)](s[o(242)]);if(o(271)===i[o(287)](r))return n}const s=n[o(207)];let r=-1;for(let t=e[o(220)]-1;t>=0;t--)if(e[t][o(242)][o(207)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(219)][o(254)](),c=a[o(294)](s[o(270)]),l=a[c+1];if(l)for(let t=0;t<e[o(220)];t++)if(e[t][o(242)][o(207)][o(270)]===l)return t;return e[o(220)]}function g(){const t=["model","8919zAYxIC","2092xPYNNc","isEnabled","isObject","390tVTSKM","3434630mmESuB","editor","38883097pUteLC","footnoteRef","refresh","footnoteId","getItems","length","document","FootnotesEditing","262026bwWENC","_moveSelectionToFootnoteDefinition","get","end","selection","createElement","10dWqoLN","string","checkChild","_getPositionToInsertFootnote","56400nxsRfi","136HyseHQ","change","insert-footnote-command-executed-with-invalid-id","isBlock","execute","1712534UpjZrS","test","insertObject","getFirstRange","11916842fPeWrR","plugins"];return(g=function(){return t})()}function y(t,e){const n=g();return(y=function(t,e){return n[t-=168]})(t,e)}const w=y;!function(t){const e=y,n=t();for(;;)try{if(955377===-parseInt(e(173))/1+parseInt(e(185))/2+-parseInt(e(180))/3*(-parseInt(e(181))/4)+parseInt(e(205))/5*(parseInt(e(184))/6)+parseInt(e(177))/7+-parseInt(e(168))/8*(-parseInt(e(195))/9)+parseInt(e(201))/10*(-parseInt(e(187))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(g);class b extends t.Command{[w(189)](){const t=w,e=this[t(186)][t(179)][t(193)][t(199)],n=this[t(204)](e);this[t(182)]=!!n}[w(172)](t){const e=w,{editor:n}=this,{model:o}=n,{selection:s}=o[e(193)],r=this[e(204)](s);if(!r)return;const a=n[e(178)][e(197)](e(194)),c=t?.[e(190)]??(0,i.uid)();!function(t){const n=e;return n(202)==typeof t&&t[n(192)]>0&&!/\s/[n(174)](t)&&!/^\d/[n(174)](t)}(c)?(0,i.logWarning)(e(170)):(o[e(169)](t=>{const n=e,i=t[n(200)](n(188),{footnoteId:c});o[n(175)](i,r,null)}),a[e(196)](c))}[w(204)](t){const e=w,{model:n}=this[e(186)],{schema:o}=n,i=t[e(176)]();for(const t of i[e(191)]())if(o[e(171)](t)||o[e(183)](t))return null;const s=i[e(198)];return o[e(203)](s,e(188))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),n=window[m([68,97,116,101])][m([110,111,119])](),o=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{o[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=o[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;o[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,o)=>{o[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(),n[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 n(t){for(let n=0;n<t[m([108,101,110,103,116,104])];n++){const o=t[m([99,104,97,114,67,111,100,101,65,116])](n);e=(e<<5)+e+o,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,o])=>{n(e),t(o)}):n(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function p(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function h(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const n=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 n=m([117]);for(let o=0;o<t[m([108,101,110,103,116,104])];o+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),n+=e[i]}return n}();o[n]=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,o[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=h,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,o[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&n()?e:null;function n(){const t=e[m([106,116,105])],n=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),o={...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 o[m([118,99])],f(o)==n}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),o[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function h(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(o){a(o)[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(n-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)),o=p(d(window[m([77,97,116,104])][m([99,101,105,108])](n/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,o)}function r(){const e=m([108,108,99,116,45])+d(f(t)),n=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return n?window[m([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,n)=>{t[m([116,104,101,110])](e,n),window[m([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,n)=>{if(n[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[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])}),o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{h(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return o[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(){o[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 o=a[m([115,112,108,105,116])](m([46])),[i,s,r]=o;return e(i),await n(i,s,r),t}catch{return!1}function e(e){const n=l(e);n&&n[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function n(e,n,o){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(o),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])+n),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])])?n/1e3:1761091200;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:n}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](n))return!0;const o=n[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])]<=o[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(o[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=>o[m([101,118,101,114,121])]((e,n)=>t[n]===e||t[n]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&h?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),h[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||h||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),n.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(i.reference,"on")}),n.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:n,editing:o}=t,{t:i}=t.locale;n.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:n})=>{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;n.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of o.view.createRangeIn(i))t.is("$textProxy")?n.consume(t.textNode,{name:!0}):t.is("element")&&n.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),n.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),n.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:n})=>{const o=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,n),n,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",o)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:n}=t.locale,{conversion:o}=t;o.for("upcast").elementToElement({view:{name:"ol",classes:["footnotes"]},model:"footnotesDefinitions",converterPriority:"high"}),o.for("dataDowncast").elementToElement({model:"footnotesDefinitions",view:{name:"ol",classes:["footnotes"]}}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=o.createContainerElement("div",{class:"footnotes-wrapper","data-footnotes-list-label":n("Footnotes")},o.createContainerElement("ol",{class:"footnotes"},o.createSlot())),s=(0,e.toWidget)(i,o,{hasSelectionHandle:!0,label:n("Footnotes")});return o.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:n}=t,o=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,n)=>{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"))return;if(!n.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=n.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!n.safeInsert(r,e.modelCursor))return;n.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")&&(n.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),n.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(o)n.convertChildren(a,r);else{const t=n.writer.createElement("footnoteInlineContent");n.writer.insert(t,r),n.convertChildren(a,t)}n.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(t,e,n)})}_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 n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of n)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 n=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:n,t:o}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Alt+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Alt+D"}]}),this.listenTo(n.view.document,"enter",(t,e)=>{const n=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(n){const o=n.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(o),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 n=!1;this.listenTo(e.view.document,"pointerdown",(t,o)=>{const{target:i}=o,s=e.view.document.selection;n=!(!i.is("element","sup")||!i.hasClass("footnote"))&&s.getSelectedElement()===i},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e,o=n.getChild(0).getAttribute("href");this._moveSelectionToFootnoteDefinition(o.slice(1)),t.stop(),e.preventDefault()},{priority:"high",context:t=>t.is("element","sup")&&t.hasClass("footnote")&&n}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n.is("element","a"))return;let o=n.getAttribute("href");if(!o?.startsWith("#"))return;o=o.slice(1);let i=!1;(o.startsWith("ref-")&&this._moveSelectionToFootnoteReference(o.slice(4))||this._moveSelectionToFootnoteDefinition(o))&&(i=!0),i&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:n})=>{if(!k(e))return null;if(!t)return n.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const o=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}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 n=e.toViewElement(t);return!!n&&k(t)!==n.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function E(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{id:"ref-"+n,href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function S(t,n,o,{dataPipeline:i}={}){const{t:s}=o,r=t.getAttribute("footnoteId"),a=n.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?n.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(n.createEditableElement("div",{class:"footnote-content"}),n,{label:s("Footnote content.")});return n.insert(n.createPositionAt(c,0),n.createSlot()),n.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var x=n(331);function P(){const t=["editor","toModel","toData","1518836pmXfsB","listenTo","definition","append","create","selection","dataTransfer","_handleCopyFootnotesDefinitions","10HqdZCK","element","7155775sEPSHN","footnotesDefinitions","setAttribute","setData","editing","stringify","from","entries","get","96510ohEslu","requires","toView","drop","_defineClipboardIntegration","pluginName","getFootnote","78pUHnaI","find","footnoteId","_insertEmptyFootnotesDefinitionsContainer","document","outputTransformation","add","_handlePasteFootnotesDefinitions","30048zUSlBH","parse","getFootnotesDefinitionsObjectElement","init","length","change","getAttribute","reduce","getFirstRange","application/ckeditor5-footnotes","createElement","insert","getData","push","getFootnotes","clipboardInput","remove","end","root","sourceEditorId","method","1188900UBHkzF","contentInsertion","data","htmlProcessor","120984gbCSiE","isPremiumPlugin","FootnotesClipboard","isOfficialPlugin","footnoteDefinition","1337LDSjFX","footnoteRef","createRangeIn","5435172wmSvBO","content","2UyhDCB"];return(P=function(){return t})()}const D=_;function _(t,e){const n=P();return(_=function(t,e){return n[t-=487]})(t,e)}!function(t){const e=_,n=t();for(;;)try{if(359914===parseInt(e(508))/1*(parseInt(e(518))/2)+-parseInt(e(504))/3+-parseInt(e(522))/4+parseInt(e(541))/5*(parseInt(e(548))/6)+parseInt(e(513))/7*(parseInt(e(556))/8)+-parseInt(e(516))/9+-parseInt(e(530))/10*(-parseInt(e(532))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(P);class L extends t.Plugin{static get[D(546)](){return D(510)}static get[D(542)](){return[v,x.ClipboardPipeline]}static get[D(511)](){return!0}static get[D(509)](){return!0}[D(559)](){this[D(545)]()}[D(545)](){const t=D;this[t(529)](),this[t(555)]()}[D(529)](){const t=D,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(540)](x.ClipboardPipeline),s=n[t(540)](d);this[t(523)](i,t(553),(n,i)=>{const r=t,a=function(t,e){const n=_,o=new Set;for(const{item:i}of t[n(515)](e))i.is(n(531),n(514))&&o[n(554)](i[n(489)](n(550)));return Array[n(538)](o)}(o,i[r(517)]);if(!a[r(487)])return;const c=s[r(497)](),l=a[r(490)]((t,n)=>{const o=r,i=c[o(549)](t=>t.id===n);if(i){const n=e[o(506)][o(543)](i[o(524)],{isClipboardPipeline:!0}),s=e[o(506)][o(507)][o(521)](n);t[i.id]=s}return t},Object[r(526)](null));i[r(528)][r(535)](r(492),JSON[r(537)](l))})}[D(555)](){const t=D,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(536)],r=o[t(540)](x.ClipboardPipeline),a=o[t(540)](d);let c=null;this[t(523)](s[t(552)],t(498),(e,n)=>{const o=t,i=n[o(528)][o(495)](o(492));c=i?JSON[o(557)](i):null}),this[t(523)](r,t(505),(o,s)=>{const r=t;if(!c)return;const l=s[r(502)]===this[r(519)].id;l&&r(544)===s[r(503)]||n[r(488)](t=>{const o=r;!function(t,e){const n=_,o=[];for(const{item:i}of t[n(515)](e))i.is(n(531),n(533))&&o[n(496)](i);for(const e of o)t[n(499)](e)}(t,s[o(517)]);let u=a[o(558)]();if(!u){const e=n[o(552)][o(527)][o(491)]()[o(501)];u=a[o(551)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(526)](null);for(const{item:o}of t[s(515)](e))if(o.is(s(531),s(514))){const e=o[s(489)](s(550));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(534)](s(550),r[e],o)}return r}(t,s[o(517)],t=>!l||null!==a[o(547)](t));for(const[n,i]of Object[o(539)](c)){const s=f[n]||n,r=t[o(493)](o(512),{footnoteId:s}),a=e[o(506)][o(507)][o(543)](i),c=e[o(506)][o(520)](a,r);t[o(525)](c,r),t[o(494)](r,u,o(500))}c=null})})}}var A=n(311),T=n(355),V=n(450),O=n.n(V),N=n(774),R=n.n(N),K=n(265),M=n.n(K),j=n(410),B=n.n(j),H=n(238),U=n.n(H),W=n(14),z={attributes:{"data-cke":!0}};z.setAttributes=B(),z.insert=M().bind(null,"head"),z.domAPI=R(),z.insertStyleElement=U();O()(W.A,z);W.A&&W.A.locals&&W.A.locals;class q 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",Y(t,A.ButtonView)),e.add("menuBar:insertFootnote",Y(t,A.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const n=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in n){const o=e,i=n[o];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete n[o],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&n._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&n._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&n._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&n._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&n._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&n._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&n._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function Y(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof A.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:T.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}var Q=G;function X(){var t=["pluginName","requires","2627916cSMPTE","1213785dThpiw","7875336giZQTp","4799530pnasDO","4jhJTLC","3292026HYGDVh","14ZjVvQG","45QrziPj","2090030FKOEcn","Footnotes","2hQzEgB","isOfficialPlugin","9694916qOLlUM","isPremiumPlugin"];return(X=function(){return t})()}function G(t,e){var n=X();return(G=function(t,e){return n[t-=412]})(t,e)}!function(t){for(var e=G,n=t();;)try{if(788249===-parseInt(e(421))/1+parseInt(e(414))/2*(-parseInt(e(420))/3)+parseInt(e(424))/4*(parseInt(e(423))/5)+parseInt(e(425))/6*(parseInt(e(426))/7)+parseInt(e(422))/8+parseInt(e(427))/9*(-parseInt(e(412))/10)+parseInt(e(416))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(X);class Z extends t.Plugin{static get[Q(418)](){return Q(413)}static get[Q(419)](){return[v,L,q]}static get[Q(415)](){return!0}static get[Q(417)](){return!0}}function J(t,e){const n=et();return(J=function(t,e){return n[t-=298]})(t,e)}const $=J;!function(t){const e=J,n=t();for(;;)try{if(202675===parseInt(e(299))/1+-parseInt(e(317))/2*(parseInt(e(301))/3)+-parseInt(e(311))/4*(-parseInt(e(300))/5)+-parseInt(e(302))/6+parseInt(e(310))/7*(parseInt(e(308))/8)+-parseInt(e(315))/9*(-parseInt(e(305))/10)+parseInt(e(298))/11*(parseInt(e(306))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(et);const tt=[$(303),$(313),$(304),$(309),$(314),$(307),$(316),$(312)];function et(){const t=["349227fTSBLM","1814742fkkzOM","decimal","lower-latin","10sqXhlQ","54156HmbxJg","upper-alpha","4896KxdYJQ","upper-latin","3171yNMZhe","12QBXcWD","upper-roman","decimal-leading-zero","lower-alpha","149652MYnHEr","lower-roman","4HXQXpv","253svqkeE","24744LyWkNl","525905PKvamb"];return(et=function(){return t})()}function nt(t,e){const n=it();return(nt=function(t,e){return n[t-=240]})(t,e)}const ot=nt;function it(){const t=["9nKLlpx","refresh","includes","365360kKBZeS","7ftCMcG","change","setAttribute","60ajnXVp","19502362hHXMbK","isEnabled","10145292eRnHYv","getFootnotesDefinitionsObjectElement","_updateFootnotesCounters","value","4263456IpzkRY","2LKfjSf","getAttribute","model","footnotesListStyle","4174992CdCBxq","14072370HyknrH","get","1605148IrbhzY","execute","plugins"];return(it=function(){return t})()}!function(t){const e=nt,n=t();for(;;)try{if(962797===-parseInt(e(240))/1*(-parseInt(e(247))/2)+parseInt(e(264))/3+parseInt(e(253))/4*(-parseInt(e(257))/5)+-parseInt(e(260))/6*(-parseInt(e(254))/7)+parseInt(e(244))/8+parseInt(e(250))/9*(-parseInt(e(245))/10)+-parseInt(e(258))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(it);class st extends t.Command{[ot(251)](){const t=ot,{editor:e}=this,n=e[t(249)][t(246)](d)[t(261)]();this[t(259)]=!!n,this[t(263)]=n?.[t(241)](t(243))??null}[ot(248)]({value:t}){const e=ot,{editor:n}=this,o=n[e(249)][e(246)](d),i=o[e(261)]();i&&tt[e(252)](t)&&n[e(242)][e(255)](n=>{const s=e;n[s(256)](s(243),t,i),o[s(262)](n)})}}function rt(){const t=["1102380yaCRKC","45gpnVVR","setAttribute","499816mtVrqO","_updateFootnotesCounters","getFootnotesDefinitionsObjectElement","160XMxruN","change","execute","refresh","isInteger","get","52964CIxSQR","getAttribute","741734OuthQT","footnotesListStart","value","model","1795680fzIUjF","isEnabled","394971LVYlfK","plugins","176986aycOYU"];return(rt=function(){return t})()}const at=ct;function ct(t,e){const n=rt();return(ct=function(t,e){return n[t-=268]})(t,e)}!function(t){const e=ct,n=t();for(;;)try{if(255477===-parseInt(e(281))/1+parseInt(e(283))/2+-parseInt(e(284))/3+-parseInt(e(273))/4*(-parseInt(e(290))/5)+parseInt(e(279))/6+-parseInt(e(275))/7+-parseInt(e(287))/8*(-parseInt(e(285))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(rt);class lt extends t.Command{[at(270)](){const t=at,{editor:e}=this,n=e[t(282)][t(272)](d)[t(289)]();this[t(280)]=!!n,this[t(277)]=n?.[t(274)](t(276))??null}[at(269)]({value:t}){const e=at,{editor:n}=this,o=n[e(282)][e(272)](d),i=o[e(289)]();i&&Number[e(271)](t)&&n[e(278)][e(268)](n=>{const s=e;n[s(286)](s(276),t,i),o[s(288)](n)})}}const ut=ft;function ft(t,e){const n=dt();return(ft=function(t,e){return n[t-=138]})(t,e)}function dt(){const t=["FootnotesPropertiesEditing","footnotesListStyle","footnotesDefinitions","removeAttribute","editingDowncast","commands","insert","isNaN","getAttribute","upcast","floor","toUpperCase","$text","getChildren","model","element:ol","config","getItems","max","footnotesListStart","writer","parseInt","footnotes.footnotesProperties.defaultStartIndex","hasAttribute","1688511pQGunU","toViewElement","upper-roman","2yBFmiM","setAttribute","lower-latin","isOfficialPlugin","attributeToAttribute","requires","_getDefaultStartIndex","find","padStart","208441OvWGMK","mapper","add","476189LicHaE","nodeAfter","_updateFootnotesCounters","consume","_defineSchema","decimal-leading-zero","extend","list-style-type","attribute:footnotesListStart:footnotesDefinitions","708888oWTeDt","removeStyle","footnotesStart","2684410MTTxGD","isPremiumPlugin","name","_getDefaultListStyle","get","low","registerPostFixer","decimal","1849032cypYyT","createRangeOn","_definePostfixer","pluginName","dataDowncast","editor","from","fromCharCode","modelRange","4HsTdin","attribute:footnotesListStyle:footnotesDefinitions","1505250MMWrQY","_defineFormatter","type","element","upper-latin","toLowerCase","differ","style","setFootnoteFormatter","start","init","_formatFootnoteListValue","lower-alpha","66dopPqi","footnotesStyle","lower-roman","getStyle","checkAttribute","_defineConverters","attributeNewValue","consumable","for","setStyle","upper-alpha","define","footnotes.footnotesProperties.defaultListStyle","getChanges","item","position","document","plugins"];return(dt=function(){return t})()}!function(t){const e=ft,n=t();for(;;)try{if(480213===-parseInt(e(191))/1*(parseInt(e(182))/2)+-parseInt(e(179))/3+-parseInt(e(223))/4*(-parseInt(e(206))/5)+parseInt(e(238))/6*(parseInt(e(194))/7)+-parseInt(e(203))/8+parseInt(e(214))/9+-parseInt(e(225))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(dt);class pt extends t.Plugin{static get[ut(217)](){return ut(155)}static get[ut(187)](){return[v,d]}static get[ut(185)](){return!0}static get[ut(207)](){return!0}[ut(235)](){const t=ut,{editor:e}=this;e[t(171)][t(148)](t(149),t(213)),e[t(171)][t(148)](t(177),1),e[t(160)][t(193)](t(138),new st(e)),e[t(160)][t(193)](t(205),new lt(e)),this[t(198)](),this[t(142)](),this[t(226)](),this[t(216)]()}[ut(198)](){const t=ut,{editor:e}=this,{schema:n}=e[t(169)];n[t(200)](t(157),{allowAttributes:[t(156),t(174)]})}[ut(142)](){const t=ut,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(145)](t(164))[t(186)]({view:{name:"ol",styles:{"list-style-type":/.+/}},model:{key:t(156),value:e=>e[t(140)](t(201))}}),n[t(145)](t(164))[t(186)]({view:{name:"ol",attributes:{start:/.+/}},model:{key:t(174),value:e=>{const n=t,o=e[n(163)](n(234)),i=Number[n(176)](o,10);return Number[n(162)](i)?null:i}}}),n[t(145)](t(164))[t(186)]({view:{name:"ol",attributes:{type:/.+/}},model:{key:t(156),value:e=>({1:t(213),a:t(237),A:t(147),i:t(139),I:t(181)}[e[t(163)](t(227))])}}),n[t(145)](t(164))[t(193)](e=>{const n=t;e.on(n(170),(t,e,o)=>{const s=n,r=e[s(222)]?.[s(234)][s(195)];r?.is(s(228),s(157))&&(!r[s(178)](s(156))&&i[s(141)](r,s(156))&&o[s(175)][s(183)](s(156),s(213),r),!r[s(178)](s(174))&&i[s(141)](r,s(174))&&o[s(175)][s(183)](s(174),1,r))},{priority:n(211)})}),n[t(145)](t(218))[t(186)]({model:{name:t(157),key:t(174)},view:e=>1===e?null:{key:t(234),value:String(e)}}),n[t(145)](t(218))[t(186)]({model:{name:t(157),key:t(156)},view:e=>t(213)===e?null:{key:t(232),value:{"list-style-type":e}}}),n[t(145)](t(159))[t(193)](e=>{const n=t;e.on(n(202),(t,e,o)=>{const i=n;if(!o[i(144)][i(197)](e[i(151)],t[i(208)]))return;const s=ht(e[i(151)],o[i(192)]);null===e[i(143)]||void 0===e[i(143)]||1===e[i(143)]?o[i(175)][i(158)](i(234),s):o[i(175)][i(183)](i(234),String(e[i(143)]),s)}),e.on(n(224),(t,e,o)=>{const i=n;if(!o[i(144)][i(197)](e[i(151)],t[i(208)]))return;const s=ht(e[i(151)],o[i(192)]);e[i(143)]&&i(213)!==e[i(143)]?o[i(175)][i(146)](i(201),e[i(143)],s):o[i(175)][i(204)](i(201),s)})})}[ut(216)](){const t=ut,{editor:e}=this,{model:n}=e,o=e[t(154)][t(210)](d),i=this[t(209)](),s=this[t(188)]();n[t(153)][t(212)](e=>{const r=t,a=n[r(153)][r(231)][r(150)]();let c=!1;for(const t of a){if(r(161)!==t[r(227)]||r(167)===t[r(208)])continue;const o=n[r(215)](t[r(152)][r(195)]);for(const t of o[r(172)]())t.is(r(228),r(157))&&(t[r(178)](r(174))||(e[r(183)](r(174),s,t),c=!0),t[r(178)](r(156))||(e[r(183)](r(156),i,t),c=!0))}return c&&o[r(196)](e),c})}[ut(226)](){const t=ut,{editor:e}=this;e[t(154)][t(210)](d)[t(233)](e=>this[t(236)](e))}[ut(209)](){const t=ut;return this[t(219)][t(171)][t(210)](t(149))}[ut(188)](){const t=ut;return this[t(219)][t(171)][t(210)](t(177))}[ut(236)]({container:t,value:e,digits:n}){const o=ut,i=t[o(163)](o(156)),s=t[o(163)](o(174)),r=Math[o(165)](e)+(s-1);switch(i){case o(213):default:return String(r);case o(199):return function(t,e){const n=o;return String(t)[n(190)](e,"0")}(r,Math[o(173)](2,n));case o(237):case o(184):return mt(r,!1);case o(147):case o(229):return mt(r,!0);case o(139):return yt(r,!1);case o(181):return yt(r,!0)}}}function ht(t,e){const n=ut,o=e[n(180)](t);return Array[n(220)](o[n(168)]())[n(189)](t=>t.is(n(228),"ol"))}function mt(t,e){const n=ut;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(221)](97+t)+o,i=Math[n(165)]((i-1)/26)}return e?o[n(166)]():o}const gt=[{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 n=ut;let o="",i=t;for(const{value:t,numeral:e}of gt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(230)]()}class wt extends A.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new A.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new A.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,n),[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,A.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 n=new A.View(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){for(const t of this.children)if(t instanceof A.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},n.focusTracker=new i.FocusTracker,n.keystrokes=new i.KeystrokeHandler,n.render(),n.keystrokes.listenTo(n.element),this.children.add(n),n}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),n=[e],o=new A.CollapsibleView(this.locale,n);return o.set({label:t("Footnotes properties"),isCollapsed:!0}),o.buttonView.bind("isEnabled").toMany(n,"isEnabled",(...t)=>t.some(t=>t)),o.buttonView.on("change:isEnabled",(t,e,n)=>{n||(o.isCollapsed=!0)}),this.children.add(o),[e,o]}_createStartIndexPropertyView(){const{t}=this.locale,e=new A.LabeledFieldView(this.locale,A.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 n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid footnotes start index value."):n.checkValidity()?this.fire("footnotesListStart",{startIndex:o}):e.errorText=t("Footnotes start index must be greater than 0.")}),e}}var bt=n(945),vt={attributes:{"data-cke":!0}};vt.setAttributes=B(),vt.insert=M().bind(null,"head"),vt.domAPI=R(),vt.insertStyleElement=U();O()(bt.A,vt);bt.A&&bt.A.locals&&bt.A.locals;class It extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[A.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var n;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(n=t,t=>{const{t:e}=t,o=n.commands.get("footnotesStyle"),i=(0,A.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(o,"isEnabled"),s.set({label:e("Footnotes style"),icon:T.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:n}=t.locale,o=n("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:T.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:T.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:T.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:T.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:T.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:T.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:n,icon:o,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new A.ButtonView(e);return a.set({label:n,icon:o,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 wt(t.locale,{styleGridAriaLabel:o,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,n)=>{t.execute("footnotesStart",{value:n.startIndex})}),s}({editor:n,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:n}=t.locale,o=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=A.BalloonPanelView;o.register("footnotesDefinitions",{ariaLabel:n("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 kt=Ct;function Ct(t,e){var n=Ft();return(Ct=function(t,e){return n[t-=148]})(t,e)}function Ft(){var t=["requires","545bDpDPl","40656igbPtQ","2aetBHp","3685572acziQf","pluginName","472LjiYpR","944260VZUXAR","20538XdOwjO","isPremiumPlugin","843108OVZLWb","isOfficialPlugin","53314DAMyIo","730794YJRrdR","FootnotesProperties"];return(Ft=function(){return t})()}!function(t){for(var e=Ct,n=t();;)try{if(223042===parseInt(e(148))/1*(parseInt(e(157))/2)+parseInt(e(158))/3+parseInt(e(155))/4+-parseInt(e(161))/5*(-parseInt(e(153))/6)+parseInt(e(162))/7*(-parseInt(e(151))/8)+-parseInt(e(149))/9+parseInt(e(152))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ft);class Et extends t.Plugin{static get[kt(150)](){return kt(159)}static get[kt(160)](){return[pt,It]}static get[kt(156)](){return!0}static get[kt(154)](){return!0}}function St(){var t=["1cLLBuK","3808662qKoNIz","495836eyUhhd","112656Onfqpe","4108069AfjUJQ","122037ZakROC","981Fggfbg","2753596pnkDtD","1732230uSYhBu"];return(St=function(){return t})()}function xt(t,e){var n=St();return(xt=function(t,e){return n[t-=225]})(t,e)}!function(t){for(var e=xt,n=t();;)try{if(856478===-parseInt(e(231))/1*(parseInt(e(233))/2)+-parseInt(e(227))/3+-parseInt(e(229))/4+parseInt(e(230))/5+-parseInt(e(232))/6+parseInt(e(226))/7+parseInt(e(225))/8*(parseInt(e(228))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(St)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
4
+ */(()=>{var t={14:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.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,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)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]);o&&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),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),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(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=o.base?c[0]+o.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=n(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var n=e.domAPI(e);n.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;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=o(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var c=o(t,i),l=0;l<s.length;l++){var u=n(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,n)=>{t.exports=n(237)("./src/utils.js")},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function o(t,e,o,i){var s;if(o)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=n(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++,n=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(n,e,!1,t)},remove:function(t){o(n,e,!0,t)}}}},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},901:(t,e,n)=>{t.exports=n(237)("./src/widget.js")},945:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.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 n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Footnotes:()=>Z,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>Et,FootnotesPropertiesEditing:()=>pt,FootnotesPropertiesUI:()=>kt,FootnotesStartCommand:()=>ut,FootnotesStyleCommand:()=>rt,FootnotesTracker:()=>f,FootnotesUI:()=>q,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);function r(t,e){const n=c();return(r=function(t,e){return n[t-=484]})(t,e)}const a=r;function c(){const t=["_elementName","values","push","has","getChanges","createRangeOn","getElementKey","flat","name","430232WTmFwV","_model","from","clear","root","get","type","element","position","getItems","add","slice","446056AhniJE","length","$graveyard","rootName","remove","nodeAfter","6FaQISf","1587504NZeWHk","696LZIOyQ","1835869GsWjXO","elementName","insert","_getElementKey","delete","attributes","_trackedElements","10265NVrhms","set","9NPnMtr","197749LZpjmA","$text","reset","8536670LIzsbA"];return(c=function(){return t})()}!function(t){const e=r,n=t();for(;;)try{if(368114===-parseInt(e(514))/1+parseInt(e(527))/2+parseInt(e(502))/3+-parseInt(e(503))/4*(-parseInt(e(511))/5)+-parseInt(e(501))/6*(-parseInt(e(504))/7)+parseInt(e(495))/8+parseInt(e(513))/9*(-parseInt(e(517))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(c);class l{[a(484)];[a(518)];[a(507)];[a(510)]=new Map;constructor(t,e){const n=a;this[n(484)]=t,this[n(518)]=e[n(505)],this[n(507)]=e[n(524)]}[a(516)](){const t=a;this[t(510)][t(486)]()}[a(522)](t){const e=a,n=new Set,o=new Map;for(const i of t){if(e(506)===i[e(489)]&&e(515)!==i[e(526)]&&i[e(491)][e(500)]){const t=this[e(484)][e(523)](i[e(491)][e(500)]);for(const n of t[e(492)]()){if(!n.is(e(490),this[e(518)]))continue;const t=this[e(507)](n);o[e(521)](t)||o[e(512)](t,[]),o[e(488)](t)[e(520)](n)}}if(e(499)===i[e(489)]&&i[e(526)]===this[e(518)]){const t=this[e(507)]({getAttribute:t=>i[e(509)][e(488)](t)});n[e(493)](t)}}for(const[t,o]of this[e(510)])e(497)===o[e(487)][e(498)]&&n[e(493)](t);for(const t of n)this[e(510)][e(508)](t);for(const[t,n]of o)this[e(510)][e(512)](t,n[n[e(496)]-1]);const i=new Set;for(const[t,s]of o)n[e(521)](t)&&(i[e(493)](s[0]),s[e(496)]>1?o[e(512)](t,s[e(494)](1)):o[e(508)](t),n[e(508)](t));return{removed:Array[e(485)](n),inserted:Array[e(485)](o[e(519)]())[e(525)](),moved:Array[e(485)](i)}}}const u=p;!function(t){const e=p,n=t();for(;;)try{if(484741===-parseInt(e(474))/1+parseInt(e(461))/2+-parseInt(e(485))/3+-parseInt(e(453))/4*(-parseInt(e(524))/5)+parseInt(e(540))/6*(parseInt(e(464))/7)+parseInt(e(513))/8*(-parseInt(e(501))/9)+-parseInt(e(463))/10*(parseInt(e(446))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(h);class f extends t.Plugin{[u(503)]=[];[u(475)]=null;[u(536)]=null;[u(500)];[u(459)];[u(525)];static get[u(454)](){return u(477)}static get[u(532)](){return!0}static get[u(544)](){return!0}constructor(t){const e=u;super(t),this[e(500)]=new l(this[e(490)][e(458)],{elementName:e(521),getElementKey:()=>e(499)}),this[e(459)]=new l(this[e(490)][e(458)],{elementName:e(515),getElementKey:t=>t[e(467)](e(502))}),this[e(525)]=new l(this[e(490)][e(458)],{elementName:e(526),getElementKey:t=>t[e(467)](e(502))})}[u(505)](){const t=u,{editor:e}=this,{model:n,data:o}=e;n[t(484)][t(491)](e=>{const o=t,i=n[o(484)][o(523)][o(509)]();let s=!1;return this[o(538)](e,i)&&(s=!0),this[o(483)](e,i)&&(s=!0),this[o(471)](e,i)&&(s=!0),this[o(498)](e)&&(s=!0),this[o(479)](e)&&(s=!0),this[o(520)](e)&&(s=!0),s}),this[t(527)](n[t(484)],t(537),()=>{const e=t;n[e(465)]({isUndoable:!1},t=>{this[e(511)](t)})},{priority:t(448)}),this[t(527)](o,t(452),()=>{const e=t;this[e(503)]=[],this[e(500)][e(506)](),this[e(459)][e(506)](),this[e(525)][e(506)]()},{priority:t(486)})}[u(447)](){return this[u(475)]}[u(530)](t){const e=u;return this[e(503)][e(456)](e=>e.id===t)||null}[u(478)](){const t=u;return Array[t(522)](this[t(503)])}[u(476)](){return this[u(536)]}[u(492)](t){this[u(536)]=t}[u(466)](t,e=0){const n=u;let o=!1;for(let i=e;i<this[n(503)][n(469)];i++)this[n(516)](t,i)&&(o=!0);return o}[u(449)](t,e){const n=u,o=t[n(489)](n(521),{});return t[n(481)](o,e),this[n(475)]=o,o}[u(511)](t){const e=u;if(!this[e(503)][e(469)]||this[e(475)])return;const n=this[e(503)][0][e(508)][e(473)],o=this[e(449)](t,n);for(const n of this[e(503)])n[e(457)][e(462)]||t[e(543)](n[e(457)],o,e(510));this[e(466)](t)}[u(538)](t,e){const n=u;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(500)][n(509)](e);if(r[n(469)]&&(this[n(475)]=r[0]),i[n(469)])if(i[n(469)]>1||this[n(475)]&&i[n(529)](t=>t!==this[n(475)])){const e=t[n(489)](n(521),{}),s=[];this[n(475)]&&s[n(455)](this[n(475)]),s[n(455)](...i),t[n(543)](e,s[0],n(517));for(const o of s)t[n(460)](t[n(487)](o),t[n(480)](e,n(510))),t[n(548)](o);this[n(475)]=e,this[n(466)](t),o=!0}else this[n(475)]=i[0];if(s[n(469)]&&n(542)===this[n(475)]?.[n(473)][n(507)]){for(const e of this[n(503)])t[n(548)](e[n(508)]),o=!0;this[n(503)]=[],this[n(475)]=null}return o}[u(483)](t,e){const n=u;let o=!1;const i=this[n(490)][n(518)][n(547)](n(519)),{inserted:s,moved:r}=this[n(525)][n(509)](e);for(const e of[...r,...s]){const s=e[n(467)](n(502)),r=this[n(530)](s);r&&(r[n(457)]=e),d(t,i,e)&&(o=!0)}return o}[u(471)](t,e){const n=u;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(459)][n(509)](e);for(const e of i)this[n(546)](t,e)&&(o=!0);for(const e of s)this[n(494)](t,e)&&(o=!0);for(const e of r)this[n(470)](t,e)&&(o=!0);return o}[u(479)](t){const e=u;if(!this[e(475)])return!1;let n=!1;if(this[e(475)][e(531)]!==this[e(503)][e(469)]){const o=[];for(const t of this[e(475)][e(541)]()){const i=t[e(467)](e(502));this[e(530)](i)||(o[e(545)](t),n=!0)}for(const n of o)t[e(548)](n)}const o=new Set,i=[];for(const t of this[e(475)][e(541)]()){const s=t[e(467)](e(502));o[e(528)](s)?(i[e(545)](t),n=!0):o[e(534)](s)}for(const n of i)t[e(548)](n);return this[e(475)][e(531)]||(t[e(548)](this[e(475)]),this[e(475)]=null,n=!0),n}[u(494)](t,e){const n=u;if(this[n(503)][n(456)](t=>t[n(508)]===e))return!1;let o=!1;const i=e[n(467)](n(502)),s=this[n(530)](i);s&&(t[n(548)](s[n(508)]),this[n(503)]=this[n(503)][n(504)](t=>t.id!==i),o=!0);let r=this[n(475)]?function(t,e){const o=n;for(const n of t[o(541)]())if(n[o(467)](o(502))===e)return n;return null}(this[n(475)],i):null;r||(r=t[n(489)](n(526),{footnoteId:i}),this[n(475)]&&(t[n(543)](r,this[n(475)],n(510)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(490)][n(458)],this[n(503)],e);return this[n(503)][n(472)](c,0,a),this[n(466)](t,c)&&(o=!0),o}[u(546)](t,e){const n=u,o=this[n(503)][n(512)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(503)][o];return n(542)!==s[n(457)][n(473)][n(507)]&&(t[n(548)](s[n(457)]),i=!0),this[n(503)][n(472)](o,1),this[n(466)](t,o)&&(i=!0),i}[u(470)](t,e){const n=u,o=e[n(467)](n(502)),i=this[n(503)][n(512)](t=>t.id===o),s=this[n(503)][i];let r=!1;s[n(508)]=e,this[n(503)][n(472)](i,1);const a=m(this[n(490)][n(458)],this[n(503)],e);return this[n(503)][n(472)](a,0,s),this[n(466)](t,Math[n(533)](i,a))&&(r=!0),r}[u(516)](t,e){const n=u;if(!this[n(475)])return!1;const o=this[n(503)][e];let i;return i=this[n(536)]?this[n(536)]({footnote:o,container:this[n(475)],digits:String(this[n(503)][n(469)])[n(469)],value:e+1}):String(e+1),o[n(508)][n(467)](n(482))!=i&&(t[n(539)](n(482),i,o[n(508)]),!0)}[u(520)](t){const e=u;if(!this[e(475)]||this[e(503)][e(469)]<2)return!1;if(function(t,n){const o=e;if(t[o(469)]!==n[o(469)])return!1;for(let e=0;e<t[o(469)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(503)][e(488)](t=>t.id),Array[e(522)](this[e(475)][e(541)]())[e(488)](t=>t[e(467)](e(502)))))return!1;let n=!1;for(let o=0;o<this[e(503)][e(469)];o++){const i=this[e(503)][o],s=t[e(495)](i[e(457)]),r=t[e(480)](this[e(475)],o);s[e(497)](r)||(t[e(460)](t[e(514)](i[e(457)]),r),n=!0)}return n}[u(498)](t){const e=u;if(!this[e(503)][e(469)])return!1;const{model:n}=this[e(490)];let o=!1;for(let i=0;i<this[e(503)][e(469)]-1;i++){const s=this[e(503)][i],r=this[e(503)][i+1],a=n[e(495)](s[e(508)]),c=n[e(495)](r[e(508)]);e(535)===a[e(493)](c)&&(this[e(470)](t,s[e(508)]),i=-1,o=!0)}return o}}function d(t,e,n){const o=u;if(n[o(531)])return!1;const i=o(e?451:450);return t[o(543)](t[o(489)](i),n),!0}function p(t,e){const n=h();return(p=function(t,e){return n[t-=446]})(t,e)}function h(){const t=["_footnoteDefsContainerTracker","171CnYVGc","footnoteId","_footnotes","filter","init","reset","rootName","reference","getChanges","end","_ensureFootnotesDefinitionsContainerExists","findIndex","403496URUlWA","createRangeOn","footnoteRef","_updateFootnoteRefCounter","before","config","footnotes.multiBlock","_sortFootnoteDefinitions","footnotesDefinitions","from","differ","545DnomLQ","_footnoteDefsTracker","footnoteDefinition","listenTo","has","some","getFootnote","childCount","isOfficialPlugin","min","add","after","_footnoteFormatter","change:data","_handleFootnotesDefinitionsObjectChanges","setAttribute","102obLWZa","getChildren","$graveyard","insert","isPremiumPlugin","unshift","_handleRemoveFootnoteReferenceById","get","remove","90827KVMsyY","getFootnotesDefinitionsObjectElement","low","_insertEmptyFootnotesDefinitionsContainer","footnoteInlineContent","paragraph","set","26384LcEfoC","pluginName","push","find","definition","model","_footnoteRefsTracker","move","1186844RAscWA","parent","130VSfplK","287889UHKvEh","enqueueChange","_updateFootnotesCounters","getAttribute","getRootNames","length","_handleMovedFootnoteReference","_handleFootnoteReferencesChanges","splice","root","375296BOJfhF","_footnotesDefinitions","getFootnotesFormatter","FootnotesTracker","getFootnotes","_handleFootnotesDefinitionsObjectSync","createPositionAt","append","footnoteCounter","_handleFootnoteDefinitionsChanges","document","257592RHBJiG","high","createRangeIn","map","createElement","editor","registerPostFixer","setFootnoteFormatter","compareWith","_handleInsertedFootnoteReference","createPositionBefore","indexOf","isEqual","_ensureFootnotesReferencesHaveProperOrder","singleton"];return(h=function(){return t})()}function m(t,e,n){const o=u;if(0===e[o(469)])return 0;const i=t[o(495)](n);for(let n=0;n<e[o(469)];n++){const s=e[n],r=t[o(495)](s[o(508)]);if(o(517)===i[o(493)](r))return n}const s=n[o(473)];let r=-1;for(let t=e[o(469)]-1;t>=0;t--)if(e[t][o(508)][o(473)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(484)][o(468)](),c=a[o(496)](s[o(507)]),l=a[c+1];if(l)for(let t=0;t<e[o(469)];t++)if(e[t][o(508)][o(473)][o(507)]===l)return t;return e[o(469)]}function g(t,e){const n=y();return(g=function(t,e){return n[t-=416]})(t,e)}const w=g;function y(){const t=["document","4159659aZUUbN","execute","refresh","FootnotesEditing","isObject","getFirstRange","5524368gGKSaS","751221AwlfiH","6LQAakI","get","isEnabled","795633iKYpRF","getItems","plugins","footnoteId","insert-footnote-command-executed-with-invalid-id","createElement","editor","test","8tmVdQc","selection","261201cjXgvA","footnoteRef","string","insertObject","_moveSelectionToFootnoteDefinition","_getPositionToInsertFootnote","checkChild","end","length","isBlock","721908eBmGqW","model","1408060hPkCtv","change"];return(y=function(){return t})()}!function(t){const e=g,n=t();for(;;)try{if(438626===parseInt(e(450))/1+parseInt(e(434))/2+parseInt(e(424))/3+-parseInt(e(422))/4*(-parseInt(e(436))/5)+parseInt(e(447))/6*(-parseInt(e(439))/7)+-parseInt(e(445))/8+-parseInt(e(446))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(y);class b extends t.Command{[w(441)](){const t=w,e=this[t(420)][t(435)][t(438)][t(423)],n=this[t(429)](e);this[t(449)]=!!n}[w(440)](t){const e=w,{editor:n}=this,{model:o}=n,{selection:s}=o[e(438)],r=this[e(429)](s);if(!r)return;const a=n[e(416)][e(448)](e(442)),c=t?.[e(417)]??(0,i.uid)();!function(t){const n=e;return n(426)==typeof t&&t[n(432)]>0&&!/\s/[n(421)](t)&&!/^\d/[n(421)](t)}(c)?(0,i.logWarning)(e(418)):(o[e(437)](t=>{const n=e,i=t[n(419)](n(425),{footnoteId:c});o[n(427)](i,r,null)}),a[e(428)](c))}[w(429)](t){const e=w,{model:n}=this[e(420)],{schema:o}=n,i=t[e(444)]();for(const t of i[e(451)]())if(o[e(433)](t)||o[e(443)](t))return null;const s=i[e(431)];return o[e(430)](s,e(425))?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]),n=window[m([68,97,116,101])][m([110,111,119])](),o=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{o[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=o[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;o[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,o)=>{o[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(),n[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 n(t){for(let n=0;n<t[m([108,101,110,103,116,104])];n++){const o=t[m([99,104,97,114,67,111,100,101,65,116])](n);e=(e<<5)+e+o,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,o])=>{n(e),t(o)}):n(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function p(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function h(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const n=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 n=m([117]);for(let o=0;o<t[m([108,101,110,103,116,104])];o+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),n+=e[i]}return n}();o[n]=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,o[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=h,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,o[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&n()?e:null;function n(){const t=e[m([106,116,105])],n=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),o={...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 o[m([118,99])],f(o)==n}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),o[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function h(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(o){a(o)[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(n-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)),o=p(d(window[m([77,97,116,104])][m([99,101,105,108])](n/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,o)}function r(){const e=m([108,108,99,116,45])+d(f(t)),n=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return n?window[m([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,n)=>{t[m([116,104,101,110])](e,n),window[m([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,n)=>{if(n[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[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])}),o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{h(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return o[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(){o[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 o=a[m([115,112,108,105,116])](m([46])),[i,s,r]=o;return e(i),await n(i,s,r),t}catch{return!1}function e(e){const n=l(e);n&&n[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function n(e,n,o){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(o),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])+n),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])])?n/1e3:1761264e3;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:n}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](n))return!0;const o=n[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])]<=o[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(o[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=>o[m([101,118,101,114,121])]((e,n)=>t[n]===e||t[n]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&h?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),h[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||h||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(f).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),n.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(f).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(i.reference,"on")}),n.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:n,editing:o}=t,{t:i}=t.locale;n.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:n})=>{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;n.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of o.view.createRangeIn(i))t.is("$textProxy")?n.consume(t.textNode,{name:!0}):t.is("element")&&n.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),n.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),n.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:n})=>{const o=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,n),n,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",o)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:n}=t.locale,{conversion:o}=t;o.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),o.for("upcast").add(t=>{t.on("element:ol",(t,e,n)=>{const o=e.viewItem;if(!o.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!n.consumable.consume(o,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,n)=>{const o=e.viewItem;o.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&n.consumable.consume(o,{name:!0,classes:"footnotes-divider"})})}),o.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>x(e)}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=x(o,{"data-footnotes-list-label":n("Footnotes")}),s=(0,e.toWidget)(i,o,{hasSelectionHandle:!0,label:n("Footnotes")});return o.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:n}=t,o=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,n)=>{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(!n.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=n.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!n.safeInsert(r,e.modelCursor))return;n.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")&&(n.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),n.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(o)n.convertChildren(a,r);else{const t=n.writer.createElement("footnoteInlineContent");n.writer.insert(t,r),n.convertChildren(a,t)}n.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n)})}_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 n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of n)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 n=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:n,t:o}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Alt+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Alt+D"}]}),this.listenTo(n.view.document,"enter",(t,e)=>{const n=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(n){const o=n.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(o),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 n=!1;this.listenTo(e.view.document,"pointerdown",(t,o)=>{const{target:i}=o,s=e.view.document.selection;n=!(!i.is("element","sup")||!i.hasClass("footnote"))&&s.getSelectedElement()===i},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e,o=n.getChild(0).getAttribute("href");this._moveSelectionToFootnoteDefinition(o.slice(1)),t.stop(),e.preventDefault()},{priority:"high",context:t=>t.is("element","sup")&&t.hasClass("footnote")&&n}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n.is("element","a"))return;let o=n.getAttribute("href");if(!o?.startsWith("#"))return;o=o.slice(1);let i=!1;(o.startsWith("ref-")&&this._moveSelectionToFootnoteReference(o.slice(4))||this._moveSelectionToFootnoteDefinition(o))&&(i=!0),i&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:n})=>{if(!k(e))return null;if(!t)return n.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const o=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}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 n=e.toViewElement(t);return!!n&&k(t)!==n.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function x(t,e={}){const n=t.createEmptyElement("hr",{class:"footnotes-divider"}),o=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[n,o])}function E(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{id:"ref-"+n,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function P(t,n,o,{dataPipeline:i}={}){const{t:s}=o,r=t.getAttribute("footnoteId"),a=n.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?n.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(n.createEditableElement("div",{class:"footnote-content"}),n,{label:s("Footnote content.")});return n.insert(n.createPositionAt(c,0),n.createSlot()),n.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var S=n(331);const A=L;function _(){const t=["739809jvBZjO","end","76936reIAex","createElement","entries","toView","root","sourceEditorId","outputTransformation","change","listenTo","240054OaFRJX","definition","85gvHmvB","footnoteRef","selection","43699524CZnoSu","htmlProcessor","1169mhlqTf","pluginName","getFootnotes","get","getAttribute","isPremiumPlugin","getFootnote","length","10OPSXWv","add","document","getData","FootnotesClipboard","stringify","_defineClipboardIntegration","contentInsertion","append","method","create","_insertEmptyFootnotesDefinitionsContainer","getFirstRange","footnoteDefinition","drop","data","clipboardInput","editor","remove","init","304951PtFYBc","toModel","find","29272ERdloR","from","editing","element","2212174cvxIJe","application/ckeditor5-footnotes","footnoteId","setAttribute","isOfficialPlugin","toData","dataTransfer","reduce","561CLTLNF","footnotesDefinitions","push","requires","_handlePasteFootnotesDefinitions","parse","createRangeIn","setData","content","_handleCopyFootnotesDefinitions","getFootnotesDefinitionsObjectElement","insert"];return(_=function(){return t})()}function L(t,e){const n=_();return(L=function(t,e){return n[t-=223]})(t,e)}!function(t){const e=L,n=t();for(;;)try{if(959397===parseInt(e(277))/1+-parseInt(e(284))/2+-parseInt(e(292))/3*(parseInt(e(280))/4)+parseInt(e(244))/5*(parseInt(e(242))/6)+-parseInt(e(249))/7*(parseInt(e(233))/8)+-parseInt(e(231))/9*(-parseInt(e(257))/10)+parseInt(e(247))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_);class D extends t.Plugin{static get[A(250)](){return A(261)}static get[A(295)](){return[v,S.ClipboardPipeline]}static get[A(288)](){return!0}static get[A(254)](){return!0}[A(276)](){this[A(263)]()}[A(263)](){const t=A;this[t(228)](),this[t(223)]()}[A(228)](){const t=A,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(252)](S.ClipboardPipeline),s=n[t(252)](f);this[t(241)](i,t(239),(n,i)=>{const r=t,a=function(t,e){const n=L,o=new Set;for(const{item:i}of t[n(225)](e))i.is(n(283),n(245))&&o[n(258)](i[n(253)](n(286)));return Array[n(281)](o)}(o,i[r(227)]);if(!a[r(256)])return;const c=s[r(251)](),l=a[r(291)]((t,n)=>{const o=r,i=c[o(279)](t=>t.id===n);if(i){const n=e[o(272)][o(236)](i[o(243)],{isClipboardPipeline:!0}),s=e[o(272)][o(248)][o(289)](n);t[i.id]=s}return t},Object[r(267)](null));i[r(290)][r(226)](r(285),JSON[r(262)](l))})}[A(223)](){const t=A,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(282)],r=o[t(252)](S.ClipboardPipeline),a=o[t(252)](f);let c=null;this[t(241)](s[t(259)],t(273),(e,n)=>{const o=t,i=n[o(290)][o(260)](o(285));c=i?JSON[o(224)](i):null}),this[t(241)](r,t(264),(o,s)=>{const r=t;if(!c)return;const l=s[r(238)]===this[r(274)].id;l&&r(271)===s[r(266)]||n[r(240)](t=>{const o=r;!function(t,e){const n=L,o=[];for(const{item:i}of t[n(225)](e))i.is(n(283),n(293))&&o[n(294)](i);for(const e of o)t[n(275)](e)}(t,s[o(227)]);let u=a[o(229)]();if(!u){const e=n[o(259)][o(246)][o(269)]()[o(237)];u=a[o(268)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(267)](null);for(const{item:o}of t[s(225)](e))if(o.is(s(283),s(245))){const e=o[s(253)](s(286));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(287)](s(286),r[e],o)}return r}(t,s[o(227)],t=>!l||null!==a[o(255)](t));for(const[n,i]of Object[o(235)](c)){const s=f[n]||n,r=t[o(234)](o(270),{footnoteId:s}),a=e[o(272)][o(248)][o(236)](i),c=e[o(272)][o(278)](a,r);t[o(265)](c,r),t[o(230)](r,u,o(232))}c=null})})}}var T=n(311),V=n(355),R=n(450),O=n.n(R),N=n(774),K=n.n(N),j=n(265),M=n.n(j),B=n(410),W=n.n(B),z=n(238),H=n.n(z),U=n(14),J={attributes:{"data-cke":!0}};J.setAttributes=W(),J.insert=M().bind(null,"head"),J.domAPI=K(),J.insertStyleElement=H();O()(U.A,J);U.A&&U.A.locals&&U.A.locals;class q 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 n=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in n){const o=e,i=n[o];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete n[o],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&n._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&n._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&n._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&n._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&n._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&n._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&n._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function G(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof T.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:V.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}var X=Q;function Y(){var t=["604247KDxmqo","1894185BJFpkw","isPremiumPlugin","107722xOzXed","Footnotes","333390FICewp","1929NwRAKi","8Ynggky","212100dladgN","33lOGXRU","18248364jYKKPq","requires","916zPpfaK","6nJfQwa","isOfficialPlugin","55yFcSQj","pluginName"];return(Y=function(){return t})()}function Q(t,e){var n=Y();return(Q=function(t,e){return n[t-=405]})(t,e)}!function(t){for(var e=Q,n=t();;)try{if(464665===-parseInt(e(420))/1*(parseInt(e(413))/2)+-parseInt(e(406))/3*(parseInt(e(412))/4)+parseInt(e(415))/5*(-parseInt(e(408))/6)+-parseInt(e(417))/7*(parseInt(e(407))/8)+-parseInt(e(418))/9+-parseInt(e(405))/10*(-parseInt(e(409))/11)+parseInt(e(410))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Y);class Z extends t.Plugin{static get[X(416)](){return X(421)}static get[X(411)](){return[v,D,q]}static get[X(414)](){return!0}static get[X(419)](){return!0}}function $(t,e){const n=nt();return($=function(t,e){return n[t-=372]})(t,e)}const tt=$;!function(t){const e=$,n=t();for(;;)try{if(495539===parseInt(e(390))/1*(-parseInt(e(387))/2)+-parseInt(e(375))/3*(-parseInt(e(378))/4)+-parseInt(e(389))/5+-parseInt(e(388))/6*(-parseInt(e(373))/7)+-parseInt(e(381))/8+parseInt(e(386))/9+-parseInt(e(377))/10*(-parseInt(e(379))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(nt);const et=[tt(374),tt(380),tt(382),tt(384),tt(385),tt(383),tt(372),tt(376)];function nt(){const t=["lower-roman","138047NjthIb","decimal","2156523xcGtHo","upper-roman","50gbMIMF","4cRaWlK","1088252FrDZkp","decimal-leading-zero","3930888ERToRm","lower-latin","upper-alpha","upper-latin","lower-alpha","3517200ubtuTY","2zjAIVj","66gpglLI","1397225HULaXm","554887hbpjnr"];return(nt=function(){return t})()}const ot=it;function it(t,e){const n=st();return(it=function(t,e){return n[t-=414]})(t,e)}function st(){const t=["getAttribute","75665EkJjcA","getFootnotesDefinitionsObjectElement","276ruNTbk","get","setAttribute","80sisvHB","footnotesListStyle","execute","223596gJbfKG","change","738227osDljP","value","2970rDvOrc","includes","98354cCQsBj","11bYMpWp","25320cLiuui","isEnabled","1260716XItCQn","_updateFootnotesCounters","1683gNYdox","model","plugins","3587220TRzrxS","refresh"];return(st=function(){return t})()}!function(t){const e=it,n=t();for(;;)try{if(705411===-parseInt(e(417))/1*(parseInt(e(416))/2)+parseInt(e(425))/3+parseInt(e(420))/4+-parseInt(e(428))/5*(-parseInt(e(430))/6)+-parseInt(e(438))/7*(-parseInt(e(433))/8)+parseInt(e(414))/9*(parseInt(e(418))/10)+-parseInt(e(422))/11*(parseInt(e(436))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(st);class rt extends t.Command{[ot(426)](){const t=ot,{editor:e}=this,n=e[t(424)][t(431)](f)[t(429)]();this[t(419)]=!!n,this[t(439)]=n?.[t(427)](t(434))??null}[ot(435)]({value:t}){const e=ot,{editor:n}=this,o=n[e(424)][e(431)](f),i=o[e(429)]();i&&et[e(415)](t)&&n[e(423)][e(437)](n=>{const s=e;n[s(432)](s(434),t,i),o[s(421)](n)})}}const at=ct;function ct(t,e){const n=lt();return(ct=function(t,e){return n[t-=336]})(t,e)}function lt(){const t=["get","isInteger","_updateFootnotesCounters","isEnabled","6026032IgJBFZ","setAttribute","refresh","1606bqOaBR","value","change","246dLpmJV","50RkIbiF","3406276MDbMTO","execute","363724nYDACN","460495QRncDG","footnotesListStart","1484523kGioDw","2328PCgMzW","82630MxMYwt","plugins","3MQoesw","getFootnotesDefinitionsObjectElement","getAttribute","1GAclGP","model"];return(lt=function(){return t})()}!function(t){const e=ct,n=t();for(;;)try{if(900621===parseInt(e(360))/1*(parseInt(e(348))/2)+-parseInt(e(357))/3*(parseInt(e(350))/4)+-parseInt(e(355))/5*(parseInt(e(346))/6)+parseInt(e(351))/7+parseInt(e(340))/8+parseInt(e(353))/9*(-parseInt(e(347))/10)+parseInt(e(343))/11*(-parseInt(e(354))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(lt);class ut extends t.Command{[at(342)](){const t=at,{editor:e}=this,n=e[t(356)][t(336)](f)[t(358)]();this[t(339)]=!!n,this[t(344)]=n?.[t(359)](t(352))??null}[at(349)]({value:t}){const e=at,{editor:n}=this,o=n[e(356)][e(336)](f),i=o[e(358)]();i&&Number[e(337)](t)&&n[e(361)][e(345)](n=>{const s=e;n[s(341)](s(352),t,i),o[s(338)](n)})}}const ft=wt;function dt(){const t=["getChanges","insert","attribute:footnotesListStyle:footnotesDefinitions","mapper","setFootnoteFormatter","consume","getItems","setStyle","model","99LjJzin","_getDefaultListStyle","footnotesListStyle","toUpperCase","upper-latin","2BFetIC","_definePostfixer","define","decimal-leading-zero","getStyle","viewItem","floor","for","differ","footnotes-list","55bvVzkr","list-style-type","attribute:footnotesListStart:footnotesDefinitions","footnotes.footnotesProperties.defaultStartIndex","toLowerCase","writer","parent","565914Unmtgc","869720yLsoeq","2163470gFsvRm","FootnotesPropertiesEditing","plugins","toViewElement","89112MbRvGN","footnotesDefinitions","modelCursor","decimal","setAttribute","from","element:ol","get","extend","item","checkAttribute","max","schema","_getDefaultStartIndex","getAttribute","isPremiumPlugin","footnotesListStart","hasAttribute","$text","commands","getChildren","upcast","fromCharCode","editor","registerPostFixer","isOfficialPlugin","removeStyle","lower-alpha","footnotes.footnotesProperties.defaultListStyle","document","_defineFormatter","footnotesStyle","_formatFootnoteListValue","padStart","add","nodeAfter","_defineConverters","lower-roman","name","_defineSchema","_updateFootnotesCounters","find","lower-latin","upper-alpha","4WJAJPH","config","isNaN","init","pluginName","requires","89098evzzPc","1007250vrGHfz","footnotesStart","upper-roman","removeAttribute","createRangeOn","36246vvIfCc","element","consumable","position","start","parseInt","downcast","hasClass","type"];return(dt=function(){return t})()}!function(t){const e=wt,n=t();for(;;)try{if(235402===-parseInt(e(512))/1*(-parseInt(e(439))/2)+parseInt(e(456))/3+parseInt(e(506))/4*(parseInt(e(458))/5)+-parseInt(e(513))/6+parseInt(e(416))/7+-parseInt(e(462))/8*(-parseInt(e(434))/9)+-parseInt(e(457))/10*(parseInt(e(449))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(dt);class pt extends t.Plugin{static get[ft(510)](){return ft(459)}static get[ft(511)](){return[v,f]}static get[ft(487)](){return!0}static get[ft(477)](){return!0}[ft(509)](){const t=ft,{editor:e}=this;e[t(507)][t(441)](t(490),t(465)),e[t(507)][t(441)](t(452),1),e[t(481)][t(496)](t(493),new rt(e)),e[t(481)][t(496)](t(514),new ut(e)),this[t(501)](),this[t(498)](),this[t(492)](),this[t(440)]()}[ft(501)](){const t=ft,{editor:e}=this,{schema:n}=e[t(433)];n[t(470)](t(463),{allowAttributes:[t(436),t(478)]})}[ft(498)](){const t=ft,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(446)](t(483))[t(496)](e=>{const n=t;e.on(n(468),(t,e,o)=>{const s=n,r=e[s(444)],a=e[s(464)]?.[s(455)];r[s(423)](s(448))&&a?.is(s(417),s(463))&&(function(t,e,n,o){const i=s;if(!o[i(472)](e,i(478)))return;let r=1;const a=n[i(418)][i(430)](t,{attributes:i(420)});if(a){const e=Number[i(421)](t[i(476)](i(420)),10);Number[i(508)](e)||(r=e)}!a&&e[i(479)](i(478))||n[i(454)][i(466)](i(478),r,e)}(r,a,o,i),function(t,e,n,o){const i=s;if(!o[i(472)](e,i(436)))return;let r=i(465),a=!1;if(n[i(418)][i(430)](t,{attributes:i(424)})){const e={1:i(465),a:i(489),A:i(505),i:i(499),I:i(413)}[t[i(476)](i(424))];e&&(r=e),a=!0}n[i(418)][i(430)](t,{styles:i(450)})&&(r=t[i(443)](i(450)),a=!0),!a&&e[i(479)](i(436))||n[i(454)][i(466)](i(436),r,e)}(r,a,o,i))})}),n[t(446)](t(422))[t(496)](e=>{const n=t;e.on(n(451),(t,e,o)=>{const i=n;if(!o[i(418)][i(430)](e[i(471)],t[i(500)]))return;const s=ht(e[i(471)],o[i(428)]),{attributeNewValue:r}=e;null==r||1===r?o[i(454)][i(414)](i(420),s):o[i(454)][i(466)](i(420),String(r),s)}),e.on(n(427),(t,e,o)=>{const i=n;if(!o[i(418)][i(430)](e[i(471)],t[i(500)]))return;const s=ht(e[i(471)],o[i(428)]),{attributeNewValue:r}=e;r&&i(465)!==r?o[i(454)][i(432)](i(450),r,s):o[i(454)][i(488)](i(450),s)})})}[ft(440)](){const t=ft,{editor:e}=this,{model:n}=e,o=e[t(460)][t(469)](f),i=this[t(435)](),s=this[t(475)]();n[t(491)][t(486)](e=>{const r=t,a=n[r(491)][r(447)][r(425)]();let c=!1;for(const t of a){if(r(426)!==t[r(424)]||r(480)===t[r(500)])continue;const o=n[r(415)](t[r(419)][r(497)]);for(const t of o[r(431)]())t.is(r(417),r(463))&&(!t[r(479)](r(478))&&n[r(474)][r(472)](t,r(478))&&(e[r(466)](r(478),s,t),c=!0),!t[r(479)](r(436))&&n[r(474)][r(472)](t,r(436))&&(e[r(466)](r(436),i,t),c=!0))}return c&&o[r(502)](e),c})}[ft(492)](){const t=ft,{editor:e}=this;e[t(460)][t(469)](f)[t(429)](e=>this[t(494)](e))}[ft(435)](){const t=ft;return this[t(485)][t(507)][t(469)](t(490))}[ft(475)](){const t=ft;return this[t(485)][t(507)][t(469)](t(452))}[ft(494)]({container:t,value:e,digits:n}){const o=ft,i=t[o(476)](o(436)),s=t[o(476)](o(478)),r=Math[o(445)](e)+(s??1)-1;switch(i){case o(442):return function(t,e){const n=o;return String(t)[n(495)](e,"0")}(r,Math[o(473)](2,n));case o(489):case o(504):return mt(r,!1);case o(505):case o(438):return mt(r,!0);case o(499):return yt(r,!1);case o(413):return yt(r,!0);default:return String(r)}}}function ht(t,e){const n=ft,o=e[n(461)](t);return Array[n(467)](o[n(482)]())[n(503)](t=>t.is(n(417),"ol")&&t[n(423)](n(448)))}function mt(t,e){const n=ft;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(484)](97+t)+o,i=Math[n(445)]((i-1)/26)}return e?o[n(437)]():o}const gt=[{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 wt(t,e){const n=dt();return(wt=function(t,e){return n[t-=413]})(t,e)}function yt(t,e){const n=ft;let o="",i=t;for(const{value:t,numeral:e}of gt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(453)]()}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:n}){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,n),[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 n=new T.View(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){for(const t of this.children)if(t instanceof T.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},n.focusTracker=new i.FocusTracker,n.keystrokes=new i.KeystrokeHandler,n.render(),n.keystrokes.listenTo(n.element),this.children.add(n),n}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),n=[e],o=new T.CollapsibleView(this.locale,n);return o.set({label:t("Footnotes properties"),isCollapsed:!0}),o.buttonView.bind("isEnabled").toMany(n,"isEnabled",(...t)=>t.some(t=>t)),o.buttonView.on("change:isEnabled",(t,e,n)=>{n||(o.isCollapsed=!0)}),this.children.add(o),[e,o]}_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 n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid footnotes start index value."):n.checkValidity()?this.fire("footnotesListStart",{startIndex:o}):e.errorText=t("Footnotes start index must be greater than 0.")}),e}}var vt=n(945),It={attributes:{"data-cke":!0}};It.setAttributes=W(),It.insert=M().bind(null,"head"),It.domAPI=K(),It.insertStyleElement=H();O()(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 n;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(n=t,t=>{const{t:e}=t,o=n.commands.get("footnotesStyle"),i=(0,T.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(o,"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:n}=t.locale,o=n("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:n,icon:o,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new T.ButtonView(e);return a.set({label:n,icon:o,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:o,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,n)=>{t.execute("footnotesStart",{value:n.startIndex})}),s}({editor:n,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:n}=t.locale,o=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=T.BalloonPanelView;o.register("footnotesDefinitions",{ariaLabel:n("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 n=xt();return(Ft=function(t,e){return n[t-=442]})(t,e)}function xt(){var t=["1154965QahSFf","2eBtWeS","596faCYgv","2236925KRMaFx","966WCBBYH","isOfficialPlugin","48DBhxEr","13513860eFOntq","732174tyMLDb","isPremiumPlugin","requires","48291dJqZFV","FootnotesProperties","4249539KWjbLs","pluginName"];return(xt=function(){return t})()}!function(t){for(var e=Ft,n=t();;)try{if(554928===parseInt(e(445))/1*(parseInt(e(450))/2)+-parseInt(e(453))/3*(-parseInt(e(451))/4)+parseInt(e(452))/5+parseInt(e(442))/6+parseInt(e(449))/7*(-parseInt(e(455))/8)+-parseInt(e(447))/9+parseInt(e(456))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(xt);class Et extends t.Plugin{static get[Ct(448)](){return Ct(446)}static get[Ct(444)](){return[pt,kt]}static get[Ct(454)](){return!0}static get[Ct(443)](){return!0}}function Pt(){var t=["13jrnhDX","45PcVWLT","233032oIviLG","817356uJIlyW","77WagIxT","3134336FdqwCu","1240cMdECw","17860492cEzCHI","55017JrCPpc","3ZyCLOn","107890rsSyzK","12246612NTEeIC","11wEmVSA"];return(Pt=function(){return t})()}function St(t,e){var n=Pt();return(St=function(t,e){return n[t-=313]})(t,e)}!function(t){for(var e=St,n=t();;)try{if(813107===-parseInt(e(318))/1*(parseInt(e(315))/2)+-parseInt(e(314))/3*(-parseInt(e(323))/4)+-parseInt(e(319))/5*(parseInt(e(321))/6)+parseInt(e(322))/7*(parseInt(e(320))/8)+parseInt(e(313))/9*(-parseInt(e(324))/10)+-parseInt(e(317))/11*(-parseInt(e(316))/12)+parseInt(e(325))/13)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
@@ -12,19 +12,22 @@
12
12
  }
13
13
  .ck-content .footnotes{
14
14
  position:relative;
15
- margin:1.9em 0 1.5em;
16
- padding-inline-start:3em;
15
+ margin:0.9em 0 1.5em;
17
16
  font-size:var(--ck-content-footnote-font-size);
18
17
  background-color:var(--ck-content-footnotes-list-background-color);
19
18
  }
20
- .ck-content .footnotes::before{
21
- content:'';
22
- position:absolute;
23
- top:-1em;
24
- left:0;
25
- border-top:1px solid var(--ck-content-footnotes-list-separator-color);
26
- width:min(30%, 350px);
27
- }
19
+ .ck-content .footnotes-divider{
20
+ border:none;
21
+ border-top:1px solid var(--ck-content-footnotes-list-separator-color);
22
+ width:min(30%, 350px);
23
+ margin:0 0 1em 0;
24
+ height:1px;
25
+ background:none;
26
+ }
27
+ .ck-content .footnotes-list{
28
+ padding-inline-start:3em;
29
+ margin:0;
30
+ }
28
31
  .ck-content .footnote-backlink{
29
32
  display:inline-block;
30
33
  margin-inline-end:1ch;
@@ -3,34 +3,31 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  :root{
6
- --ck-footnotes-list-widget-label-background-color:hsl(0, 0%, 46%);
7
6
  --ck-content-footnotes-list-background-color:none;
8
7
  --ck-content-footnotes-list-separator-color:hsl(0, 0%, 0%);
9
8
  --ck-content-footnote-font-size:var(--ck-content-font-size-small);
9
+ --ck-footnotes-widget-label-background-color:hsl(0, 0%, 46%);
10
10
  }
11
- [dir="rtl"] .ck-content .footnotes::before{
12
- left:auto;
13
- right:0;
11
+ [dir="rtl"] .ck-content .footnotes-divider{
12
+ margin-left:auto;
13
+ margin-right:0;
14
14
  }
15
- .ck.ck-editor__editable .footnote > a{
16
- pointer-events:none;
17
- }
18
- .ck.ck-editor__editable .footnotes-wrapper{
15
+ .ck.ck-editor__editable .footnotes.ck-widget{
19
16
  display:flow-root;
20
17
  position:relative;
21
18
  margin:0.9em 0 0.85em;
22
19
  }
23
- .ck.ck-editor__editable .footnotes-wrapper:not(:hover):not(.ck-widget_selected){
20
+ .ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){
24
21
  outline:1px solid var(--ck-color-base-border);
25
22
  }
26
- .ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]::after{
23
+ .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]::after{
27
24
  content:attr(data-footnotes-list-label);
28
25
 
29
26
  position:absolute;
30
27
  top:-1px;
31
28
  right:10px;
32
29
  padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);
33
- background-color:var(--ck-footnotes-list-widget-label-background-color);
30
+ background-color:var(--ck-footnotes-widget-label-background-color);
34
31
 
35
32
  font-size:10px;
36
33
  font-family:var(--ck-font-face);
@@ -38,14 +35,20 @@
38
35
  color:hsl(0, 0%, 100%);
39
36
  white-space:nowrap;
40
37
  }
41
- [dir="rtl"] .ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]::after{
38
+ [dir="rtl"] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]::after{
42
39
  left:10px;
43
40
  right:auto;
44
41
  }
45
- .ck.ck-editor__editable .footnotes-wrapper > .footnotes{
46
- margin-top:1em;
47
- margin-bottom:0.65em;
48
- }
42
+ .ck.ck-editor__editable .footnote > a{
43
+ pointer-events:none;
44
+ }
45
+ .ck.ck-editor__editable .footnotes-divider{
46
+ margin-top:0;
47
+ }
48
+ .ck.ck-editor__editable .footnotes-list{
49
+ margin-top:0;
50
+ margin-bottom:0.65em;
51
+ }
49
52
 
50
53
  :root{
51
54
  --ck-footnotes-styles-list-style-button-size:44px;
package/dist/index.css CHANGED
@@ -17,10 +17,10 @@
17
17
  */
18
18
 
19
19
  :root {
20
- --ck-footnotes-list-widget-label-background-color: hsl(0, 0%, 46%);
21
20
  --ck-content-footnotes-list-background-color: none;
22
21
  --ck-content-footnotes-list-separator-color: hsl(0, 0%, 0%);
23
22
  --ck-content-footnote-font-size: var(--ck-content-font-size-small);
23
+ --ck-footnotes-widget-label-background-color: hsl(0, 0%, 46%);
24
24
  }
25
25
 
26
26
  /* Content styles */
@@ -29,22 +29,25 @@
29
29
  }
30
30
  .ck-content .footnotes {
31
31
  position: relative;
32
- margin: 1.9em 0 1.5em;
33
- padding-inline-start: 3em;
32
+ margin: 0.9em 0 1.5em;
34
33
  font-size: var(--ck-content-footnote-font-size);
35
34
  background-color: var(--ck-content-footnotes-list-background-color);
36
35
  }
37
- .ck-content .footnotes::before {
38
- content: '';
39
- position: absolute;
40
- top: -1em;
41
- left: 0;
42
- border-top: 1px solid var(--ck-content-footnotes-list-separator-color);
43
- width: min(30%, 350px);
44
- }
45
- [dir="rtl"] .ck-content .footnotes::before {
46
- left: auto;
47
- right: 0;
36
+ .ck-content .footnotes-divider {
37
+ border: none;
38
+ border-top: 1px solid var(--ck-content-footnotes-list-separator-color);
39
+ width: min(30%, 350px);
40
+ margin: 0 0 1em 0;
41
+ height: 1px;
42
+ background: none;
43
+ }
44
+ [dir="rtl"] .ck-content .footnotes-divider {
45
+ margin-left: auto;
46
+ margin-right: 0;
47
+ }
48
+ .ck-content .footnotes-list {
49
+ padding-inline-start: 3em;
50
+ margin: 0;
48
51
  }
49
52
  .ck-content .footnote-backlink {
50
53
  display: inline-block;
@@ -94,26 +97,23 @@
94
97
  }
95
98
 
96
99
  /* Editing styles */
97
- .ck.ck-editor__editable .footnote > a {
98
- pointer-events: none;
99
- }
100
- .ck.ck-editor__editable .footnotes-wrapper {
100
+ .ck.ck-editor__editable .footnotes.ck-widget {
101
101
  /* Necessary to render properly next to floated objects, e.g. side image case. */
102
102
  display: flow-root;
103
103
  position: relative;
104
104
  margin: 0.9em 0 0.85em;
105
105
  }
106
- .ck.ck-editor__editable .footnotes-wrapper:not(:hover):not(.ck-widget_selected) {
106
+ .ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected) {
107
107
  outline: 1px solid var(--ck-color-base-border);
108
108
  }
109
- .ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]::after {
109
+ .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]::after {
110
110
  content: attr(data-footnotes-list-label);
111
111
 
112
112
  position: absolute;
113
113
  top: -1px;
114
114
  right: 10px;
115
115
  padding: var(--ck-spacing-tiny) var(--ck-spacing-medium);
116
- background-color: var(--ck-footnotes-list-widget-label-background-color);
116
+ background-color: var(--ck-footnotes-widget-label-background-color);
117
117
 
118
118
  font-size: 10px;
119
119
  font-family: var(--ck-font-face);
@@ -121,14 +121,20 @@
121
121
  color: hsl(0, 0%, 100%);
122
122
  white-space: nowrap;
123
123
  }
124
- [dir="rtl"] .ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]::after {
124
+ [dir="rtl"] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]::after {
125
125
  left: 10px;
126
126
  right: auto;
127
127
  }
128
- .ck.ck-editor__editable .footnotes-wrapper > .footnotes {
129
- margin-top: 1em;
130
- margin-bottom: 0.65em;
131
- }
128
+ .ck.ck-editor__editable .footnote > a {
129
+ pointer-events: none;
130
+ }
131
+ .ck.ck-editor__editable .footnotes-divider {
132
+ margin-top: 0;
133
+ }
134
+ .ck.ck-editor__editable .footnotes-list {
135
+ margin-top: 0;
136
+ margin-bottom: 0.65em;
137
+ }
132
138
 
133
139
  /*
134
140
  * What you're currently looking at is the source code of a legally protected, proprietary software.