@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251101.0 → 0.0.0-nightly-20251103.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.
- package/build/footnotes.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +9 -9
- package/src/footnotesediting.js +1 -1
package/build/footnotes.js
CHANGED
|
@@ -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-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,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:()=>st,FootnotesTracker:()=>f,FootnotesUI:()=>q,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);function r(){const t=["getElementKey","getChanges","692643WJCgnE","$graveyard","from","getItems","7154376HJnAZV","_model","3591087YPkyTt","add","elementName","rootName","2309255JGTnhb","attributes","1388212AGsqWL","18TTTbIG","insert","$text","2CXpNqy","reset","values","clear","has","push","slice","type","_getElementKey","remove","_trackedElements","4129854DcpLll","3434120mKukkW","8RabSPP","root","delete","length","position","get","createRangeOn","set","element","nodeAfter","_elementName","flat","name"];return(r=function(){return t})()}function a(t,e){const n=r();return(a=function(t,e){return n[t-=357]})(t,e)}const c=a;!function(t){const e=a,n=t();for(;;)try{if(730622===-parseInt(e(363))/1+parseInt(e(379))/2*(parseInt(e(369))/3)+-parseInt(e(392))/4*(-parseInt(e(373))/5)+-parseInt(e(390))/6+parseInt(e(375))/7+-parseInt(e(367))/8+-parseInt(e(376))/9*(-parseInt(e(391))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(r);class l{[c(368)];[c(358)];[c(387)];[c(389)]=new Map;constructor(t,e){const n=c;this[n(368)]=t,this[n(358)]=e[n(371)],this[n(387)]=e[n(361)]}[c(380)](){const t=c;this[t(389)][t(382)]()}[c(362)](t){const e=c,n=new Set,o=new Map;for(const i of t){if(e(377)===i[e(386)]&&e(378)!==i[e(360)]&&i[e(396)][e(357)]){const t=this[e(368)][e(398)](i[e(396)][e(357)]);for(const n of t[e(366)]()){if(!n.is(e(400),this[e(358)]))continue;const t=this[e(387)](n);o[e(383)](t)||o[e(399)](t,[]),o[e(397)](t)[e(384)](n)}}if(e(388)===i[e(386)]&&i[e(360)]===this[e(358)]){const t=this[e(387)]({getAttribute:t=>i[e(374)][e(397)](t)});n[e(370)](t)}}for(const[t,o]of this[e(389)])e(364)===o[e(393)][e(372)]&&n[e(370)](t);for(const t of n)this[e(389)][e(394)](t);for(const[t,n]of o)this[e(389)][e(399)](t,n[n[e(395)]-1]);const i=new Set;for(const[t,s]of o)n[e(383)](t)&&(i[e(370)](s[0]),s[e(395)]>1?o[e(399)](t,s[e(385)](1)):o[e(394)](t),n[e(394)](t));return{removed:Array[e(365)](n),inserted:Array[e(365)](o[e(381)]())[e(359)](),moved:Array[e(365)](i)}}}const u=d;!function(t){const e=d,n=t();for(;;)try{if(194312===parseInt(e(192))/1+-parseInt(e(155))/2*(parseInt(e(182))/3)+-parseInt(e(173))/4*(parseInt(e(244))/5)+parseInt(e(236))/6*(parseInt(e(200))/7)+parseInt(e(193))/8*(parseInt(e(186))/9)+parseInt(e(156))/10*(-parseInt(e(157))/11)+-parseInt(e(163))/12*(-parseInt(e(215))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(p);class f extends t.Plugin{[u(202)]=[];[u(188)]=null;[u(203)]=null;[u(196)];[u(237)];[u(241)];static get[u(201)](){return u(213)}static get[u(161)](){return!0}static get[u(191)](){return!0}constructor(t){const e=u;super(t),this[e(196)]=new l(this[e(209)][e(190)],{elementName:e(175),getElementKey:()=>e(167)}),this[e(237)]=new l(this[e(209)][e(190)],{elementName:e(229),getElementKey:t=>t[e(214)](e(242))}),this[e(241)]=new l(this[e(209)][e(190)],{elementName:e(176),getElementKey:t=>t[e(214)](e(242))})}[u(224)](){const t=u,{editor:e}=this,{model:n,data:o}=e;n[t(185)][t(181)](e=>{const o=t,i=n[o(185)][o(243)][o(183)]();let s=!1;return this[o(147)](e,i)&&(s=!0),this[o(234)](e,i)&&(s=!0),this[o(223)](e,i)&&(s=!0),this[o(178)](e)&&(s=!0),this[o(144)](e)&&(s=!0),this[o(205)](e)&&(s=!0),s}),this[t(174)](n[t(185)],t(158),()=>{const e=t;n[e(227)]({isUndoable:!1},t=>{this[e(246)](t)})},{priority:t(159)}),this[t(174)](o,t(228),()=>{const e=t;this[e(202)]=[],this[e(196)][e(206)](),this[e(237)][e(206)](),this[e(241)][e(206)]()},{priority:t(189)})}[u(225)](){return this[u(188)]}[u(169)](t){const e=u;return this[e(202)][e(166)](e=>e.id===t)||null}[u(204)](){const t=u;return Array[t(195)](this[t(202)])}[u(247)](){return this[u(203)]}[u(146)](t){this[u(203)]=t}[u(207)](t,e=0){const n=u;let o=!1;for(let i=e;i<this[n(202)][n(154)];i++)this[n(198)](t,i)&&(o=!0);return o}[u(197)](t,e){const n=u,o=t[n(240)](n(175),{});return t[n(211)](o,e),this[n(188)]=o,o}[u(246)](t){const e=u;if(!this[e(202)][e(154)]||this[e(188)])return;const n=this[e(202)][0][e(152)][e(231)],o=this[e(197)](t,n);for(const n of this[e(202)])n[e(180)][e(150)]||t[e(216)](n[e(180)],o,e(184));this[e(207)](t)}[u(147)](t,e){const n=u;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(196)][n(183)](e);if(r[n(154)]&&(this[n(188)]=r[0]),i[n(154)])if(i[n(154)]>1||this[n(188)]&&i[n(210)](t=>t!==this[n(188)])){const e=t[n(240)](n(175),{}),s=[];this[n(188)]&&s[n(221)](this[n(188)]),s[n(221)](...i),t[n(216)](e,s[0],n(149));for(const o of s)t[n(177)](t[n(222)](o),t[n(245)](e,n(184))),t[n(217)](o);this[n(188)]=e,this[n(207)](t),o=!0}else this[n(188)]=i[0];if(s[n(154)]&&n(220)===this[n(188)]?.[n(231)][n(212)]){for(const e of this[n(202)])t[n(217)](e[n(152)]),o=!0;this[n(202)]=[],this[n(188)]=null}return o}[u(234)](t,e){const n=u;let o=!1;const i=this[n(209)][n(187)][n(153)](n(162)),{inserted:s,moved:r}=this[n(241)][n(183)](e);for(const e of[...r,...s]){const s=e[n(214)](n(242)),r=this[n(169)](s);r&&(r[n(180)]=e),h(t,i,e)&&(o=!0)}return o}[u(223)](t,e){const n=u;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(237)][n(183)](e);for(const e of i)this[n(239)](t,e)&&(o=!0);for(const e of s)this[n(168)](t,e)&&(o=!0);for(const e of r)this[n(238)](t,e)&&(o=!0);return o}[u(144)](t){const e=u;if(!this[e(188)])return!1;let n=!1;if(this[e(188)][e(148)]!==this[e(202)][e(154)]){const o=[];for(const t of this[e(188)][e(171)]()){const i=t[e(214)](e(242));this[e(169)](i)||(o[e(218)](t),n=!0)}for(const n of o)t[e(217)](n)}const o=new Set,i=[];for(const t of this[e(188)][e(171)]()){const s=t[e(214)](e(242));o[e(164)](s)?(i[e(218)](t),n=!0):o[e(219)](s)}for(const n of i)t[e(217)](n);return this[e(188)][e(148)]||(t[e(217)](this[e(188)]),this[e(188)]=null,n=!0),n}[u(168)](t,e){const n=u;if(this[n(202)][n(166)](t=>t[n(152)]===e))return!1;let o=!1;const i=e[n(214)](n(242)),s=this[n(202)][n(151)](t=>t.id===i);-1!==s&&(t[n(217)](this[n(202)][s][n(152)]),this[n(202)][n(145)](s,1),o=!0);let r=this[n(188)]?function(t,e){const o=n;for(const n of t[o(171)]())if(n[o(214)](o(242))===e)return n;return null}(this[n(188)],i):null;r||(r=t[n(240)](n(176),{footnoteId:i}),this[n(188)]&&(t[n(216)](r,this[n(188)],n(184)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(209)][n(190)],this[n(202)],e);this[n(202)][n(145)](c,0,a);let l=c;return-1!==s&&(l=Math[n(194)](c,s)),this[n(207)](t,l)&&(o=!0),o}[u(239)](t,e){const n=u,o=this[n(202)][n(151)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(202)][o];return n(220)!==s[n(180)][n(231)][n(212)]&&(t[n(217)](s[n(180)]),i=!0),this[n(202)][n(145)](o,1),this[n(207)](t,o)&&(i=!0),i}[u(238)](t,e){const n=u,o=e[n(214)](n(242)),i=this[n(202)][n(151)](t=>t.id===o),s=this[n(202)][i];let r=!1;s[n(152)]=e,this[n(202)][n(145)](i,1);const a=m(this[n(209)][n(190)],this[n(202)],e);return this[n(202)][n(145)](a,0,s),this[n(207)](t,Math[n(194)](i,a))&&(r=!0),r}[u(198)](t,e){const n=u;if(!this[n(188)])return!1;const o=this[n(202)][e];let i;return i=this[n(203)]?this[n(203)]({footnote:o,container:this[n(188)],digits:String(this[n(202)][n(154)])[n(154)],value:e+1}):String(e+1),o[n(152)][n(214)](n(232))!=i&&(t[n(170)](n(232),i,o[n(152)]),!0)}[u(205)](t){const e=u;if(!this[e(188)]||this[e(202)][e(154)]<2)return!1;if(function(t,n){const o=e;if(t[o(154)]!==n[o(154)])return!1;for(let e=0;e<t[o(154)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(202)][e(160)](t=>t.id),Array[e(195)](this[e(188)][e(171)]())[e(160)](t=>t[e(214)](e(242)))))return!1;let n=!1;for(let o=0;o<this[e(202)][e(154)];o++){const i=this[e(202)][o],s=t[e(235)](i[e(180)]),r=t[e(245)](this[e(188)],o);s[e(165)](r)||(t[e(177)](t[e(233)](i[e(180)]),r),n=!0)}return n}[u(178)](t){const e=u;if(!this[e(202)][e(154)])return!1;const{model:n}=this[e(209)];let o=!1;for(let i=0;i<this[e(202)][e(154)]-1;i++){const s=this[e(202)][i],r=this[e(202)][i+1],a=n[e(235)](s[e(152)]),c=n[e(235)](r[e(152)]);e(226)===a[e(179)](c)&&(this[e(238)](t,s[e(152)]),i=-1,o=!0)}return o}}function d(t,e){const n=p();return(d=function(t,e){return n[t-=144]})(t,e)}function p(){const t=["createPositionBefore","33240tSMOMG","_footnoteRefsTracker","_handleMovedFootnoteReference","_handleRemoveFootnoteReferenceById","createElement","_footnoteDefsTracker","footnoteId","differ","353315jHoZAg","createPositionAt","_ensureFootnotesDefinitionsContainerExists","getFootnotesFormatter","_handleFootnotesDefinitionsObjectSync","splice","setFootnoteFormatter","_handleFootnotesDefinitionsObjectChanges","childCount","before","parent","findIndex","reference","get","length","214NiugWL","10BOeymQ","1722655OliCjf","change:data","low","map","isOfficialPlugin","footnotes.multiBlock","59808thasXU","has","isEqual","find","singleton","_handleInsertedFootnoteReference","getFootnote","setAttribute","getChildren","paragraph","8rbBgCB","listenTo","footnotesDefinitions","footnoteDefinition","move","_ensureFootnotesReferencesHaveProperOrder","compareWith","definition","registerPostFixer","10239rWWfYd","getChanges","end","document","27wlWhUE","config","_footnotesDefinitions","high","model","isPremiumPlugin","198461kkPUGk","126904aJwWne","min","from","_footnoteDefsContainerTracker","_insertEmptyFootnotesDefinitionsContainer","_updateFootnoteRefCounter","footnoteInlineContent","42lYYmRF","pluginName","_footnotes","_footnoteFormatter","getFootnotes","_sortFootnoteDefinitions","reset","_updateFootnotesCounters","getRootNames","editor","some","append","rootName","FootnotesTracker","getAttribute","1508xuCHey","insert","remove","unshift","add","$graveyard","push","createRangeIn","_handleFootnoteReferencesChanges","init","getFootnotesDefinitionsObjectElement","after","enqueueChange","set","footnoteRef","indexOf","root","footnoteCounter","createRangeOn","_handleFootnoteDefinitionsChanges"];return(p=function(){return t})()}function h(t,e,n){const o=u;if(n[o(148)])return!1;const i=o(e?172:199);return t[o(216)](t[o(240)](i),n),!0}function m(t,e,n){const o=u;if(0===e[o(154)])return 0;const i=t[o(235)](n);for(let n=0;n<e[o(154)];n++){const s=e[n],r=t[o(235)](s[o(152)]);if(o(149)===i[o(179)](r))return n}const s=n[o(231)];let r=-1;for(let t=e[o(154)]-1;t>=0;t--)if(e[t][o(152)][o(231)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(185)][o(208)](),c=a[o(230)](s[o(212)]),l=a[c+1];if(l)for(let t=0;t<e[o(154)];t++)if(e[t][o(152)][o(231)][o(212)]===l)return t;return e[o(154)]}const g=y;function w(){const t=["model","length","293652Nmeenp","get","insert-footnote-command-executed-with-invalid-id","string","editor","document","7lfhyzL","_getPositionToInsertFootnote","isObject","execute","getFirstRange","getItems","selection","checkChild","end","19920wPfupR","isEnabled","_moveSelectionToFootnoteDefinition","1134ymvITt","1106700YGUslL","75376lKtZrR","plugins","test","refresh","12KhhpbN","change","59397sUDaiC","FootnotesEditing","1882952wauUit","footnoteId","footnoteRef","isBlock","insertObject","76438JgQjLA","createElement"];return(w=function(){return t})()}function y(t,e){const n=w();return(y=function(t,e){return n[t-=356]})(t,e)}!function(t){const e=y,n=t();for(;;)try{if(126821===parseInt(e(364))/1+-parseInt(e(392))/2*(parseInt(e(357))/3)+-parseInt(e(388))/4+parseInt(e(387))/5+-parseInt(e(368))/6+-parseInt(e(374))/7*(parseInt(e(359))/8)+parseInt(e(386))/9*(parseInt(e(383))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(w);class b extends t.Command{[g(391)](){const t=g,e=this[t(372)][t(366)][t(373)][t(380)],n=this[t(375)](e);this[t(384)]=!!n}[g(377)](t){const e=g,{editor:n}=this,{model:o}=n,{selection:s}=o[e(373)],r=this[e(375)](s);if(!r)return;const a=n[e(389)][e(369)](e(358)),c=t?.[e(360)]??(0,i.uid)();!function(t){const n=e;return n(371)==typeof t&&t[n(367)]>0&&!/\s/[n(390)](t)&&!/^\d/[n(390)](t)}(c)?(0,i.logWarning)(e(370)):(o[e(356)](t=>{const n=e,i=t[n(365)](n(361),{footnoteId:c});o[n(363)](i,r,null)}),a[e(385)](c))}[g(375)](t){const e=g,{model:n}=this[e(372)],{schema:o}=n,i=t[e(378)]();for(const t of i[e(379)]())if(o[e(362)](t)||o[e(376)](t))return null;const s=i[e(382)];return o[e(381)](s,e(361))?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:1761955200;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+Shift+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Shift+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","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:o}=e;if(!o.is("element","a"))return;if(o.parent?.is("element","sup")&&o.parent.hasClass("footnote")&&!n)return void e.preventDefault();let i=o.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer: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);function L(){const t=["footnoteRef","change","application/ckeditor5-footnotes","init","250YPraqM","add","pluginName","toModel","dataTransfer","definition","getFootnote","create","setAttribute","_insertEmptyFootnotesDefinitionsContainer","method","_defineClipboardIntegration","selection","reduce","push","getFootnotesDefinitionsObjectElement","177133RbLFBy","toView","insert","entries","541509IeKKyu","drop","1788708GElHLs","getData","find","content","setData","append","7QXIGJe","isOfficialPlugin","footnoteDefinition","sourceEditorId","from","createElement","isPremiumPlugin","footnoteId","18ZFpxkE","getAttribute","toData","2lzvIsp","htmlProcessor","footnotesDefinitions","outputTransformation","root","createRangeIn","length","getFootnotes","get","parse","stringify","element","clipboardInput","remove","document","_handleCopyFootnotesDefinitions","editing","data","editor","end","3180528pKhVDC","contentInsertion","getFirstRange","FootnotesClipboard","5sGLTqu","1308780MmnkBY","1135388vvRbay","requires","_handlePasteFootnotesDefinitions","listenTo","17490648GMgCou"];return(L=function(){return t})()}const _=A;function A(t,e){const n=L();return(A=function(t,e){return n[t-=352]})(t,e)}!function(t){const e=A,n=t();for(;;)try{if(707097===parseInt(e(395))/1*(parseInt(e(414))/2)+-parseInt(e(397))/3+-parseInt(e(366))/4*(-parseInt(e(364))/5)+-parseInt(e(365))/6*(-parseInt(e(403))/7)+parseInt(e(360))/8*(-parseInt(e(411))/9)+-parseInt(e(375))/10*(parseInt(e(391))/11)+parseInt(e(370))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(L);class D extends t.Plugin{static get[_(377)](){return _(363)}static get[_(367)](){return[v,S.ClipboardPipeline]}static get[_(404)](){return!0}static get[_(409)](){return!0}[_(374)](){this[_(386)]()}[_(386)](){const t=_;this[t(355)](),this[t(368)]()}[_(355)](){const t=_,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(422)](S.ClipboardPipeline),s=n[t(422)](f);this[t(369)](i,t(417),(n,i)=>{const r=t,a=function(t,e){const n=A,o=new Set;for(const{item:i}of t[n(419)](e))i.is(n(425),n(371))&&o[n(376)](i[n(412)](n(410)));return Array[n(407)](o)}(o,i[r(400)]);if(!a[r(420)])return;const c=s[r(421)](),l=a[r(388)]((t,n)=>{const o=r,i=c[o(399)](t=>t.id===n);if(i){const n=e[o(357)][o(392)](i[o(380)],{isClipboardPipeline:!0}),s=e[o(357)][o(415)][o(413)](n);t[i.id]=s}return t},Object[r(382)](null));i[r(379)][r(401)](r(373),JSON[r(424)](l))})}[_(368)](){const t=_,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(356)],r=o[t(422)](S.ClipboardPipeline),a=o[t(422)](f);let c=null;this[t(369)](s[t(354)],t(352),(e,n)=>{const o=t,i=n[o(379)][o(398)](o(373));c=i?JSON[o(423)](i):null}),this[t(369)](r,t(361),(o,s)=>{const r=t;if(!c)return;const l=s[r(406)]===this[r(358)].id;l&&r(396)===s[r(385)]||n[r(372)](t=>{const o=r;!function(t,e){const n=A,o=[];for(const{item:i}of t[n(419)](e))i.is(n(425),n(416))&&o[n(389)](i);for(const e of o)t[n(353)](e)}(t,s[o(400)]);let u=a[o(390)]();if(!u){const e=n[o(354)][o(387)][o(362)]()[o(418)];u=a[o(384)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(382)](null);for(const{item:o}of t[s(419)](e))if(o.is(s(425),s(371))){const e=o[s(412)](s(410));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(383)](s(410),r[e],o)}return r}(t,s[o(400)],t=>!l||null!==a[o(381)](t));for(const[n,i]of Object[o(394)](c)){const s=f[n]||n,r=t[o(408)](o(405),{footnoteId:s}),a=e[o(357)][o(415)][o(392)](i),c=e[o(357)][o(378)](a,r);t[o(402)](c,r),t[o(393)](r,u,o(359))}c=null})})}}var T=n(311),V=n(355),O=n(450),N=n.n(O),R=n(774),K=n.n(R),M=n(265),j=n.n(M),B=n(410),W=n.n(B),H=n(238),U=n.n(H),z=n(14),G={attributes:{"data-cke":!0}};G.setAttributes=W(),G.insert=j().bind(null,"head"),G.domAPI=K(),G.insertStyleElement=U();N()(z.A,G);z.A&&z.A.locals&&z.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",J(t,T.ButtonView)),e.add("menuBar:insertFootnote",J(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 J(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}}function X(){var t=["66100980Bzjsap","194IWhyjQ","1240670fvjPmo","15178FXocBZ","isOfficialPlugin","pluginName","isPremiumPlugin","8qrgUMO","16596738WZYvGZ","16FTgFDa","2179608ektjCy","1335900EfBXfL","4795098ypJpqB","Footnotes","requires"];return(X=function(){return t})()}var Y=Q;function Q(t,e){var n=X();return(Q=function(t,e){return n[t-=384]})(t,e)}!function(t){for(var e=Q,n=t();;)try{if(923568===parseInt(e(394))/1*(-parseInt(e(396))/2)+-parseInt(e(388))/3+parseInt(e(385))/4*(-parseInt(e(395))/5)+parseInt(e(389))/6+parseInt(e(390))/7*(-parseInt(e(387))/8)+-parseInt(e(386))/9+parseInt(e(393))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(X);class Z extends t.Plugin{static get[Y(398)](){return Y(391)}static get[Y(392)](){return[v,D,q]}static get[Y(397)](){return!0}static get[Y(384)](){return!0}}const $=tt;function tt(t,e){const n=nt();return(tt=function(t,e){return n[t-=312]})(t,e)}!function(t){const e=tt,n=t();for(;;)try{if(905200===parseInt(e(314))/1*(-parseInt(e(316))/2)+-parseInt(e(320))/3*(-parseInt(e(327))/4)+parseInt(e(313))/5+-parseInt(e(326))/6*(-parseInt(e(328))/7)+parseInt(e(323))/8+-parseInt(e(329))/9+-parseInt(e(312))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(nt);const et=[$(324),$(322),$(317),$(315),$(325),$(321),$(319),$(318)];function nt(){const t=["47812900OSYHGh","8963865JGRJoK","1BBfiMu","upper-latin","563924JfNyNl","lower-latin","upper-roman","lower-roman","123NhNyOa","upper-alpha","decimal-leading-zero","12208232ONvRnW","decimal","lower-alpha","3972AXRhae","122756fzBFJK","14777kACtLJ","54729jQRLuX"];return(nt=function(){return t})()}function ot(t,e){const n=rt();return(ot=function(t,e){return n[t-=103]})(t,e)}const it=ot;!function(t){const e=ot,n=t();for(;;)try{if(338038===-parseInt(e(112))/1*(-parseInt(e(120))/2)+parseInt(e(124))/3*(parseInt(e(116))/4)+parseInt(e(117))/5+-parseInt(e(108))/6*(parseInt(e(110))/7)+parseInt(e(107))/8*(parseInt(e(104))/9)+parseInt(e(127))/10*(parseInt(e(114))/11)+parseInt(e(113))/12*(-parseInt(e(111))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(rt);class st extends t.Command{[it(115)](){const t=it,{editor:e}=this,n=e[t(128)][t(103)](f)[t(119)]();this[t(129)]=!!n,this[t(106)]=n?.[t(121)](t(109))??null}[it(125)]({value:t}){const e=it,{editor:n}=this,o=n[e(128)][e(103)](f),i=o[e(119)]();i&&et[e(105)](t)&&n[e(126)][e(123)](n=>{const s=e;n[s(118)](s(109),t,i),o[s(122)](n)})}}function rt(){const t=["setAttribute","getFootnotesDefinitionsObjectElement","1762zrTWxb","getAttribute","_updateFootnotesCounters","change","3LrysiA","execute","model","80AIJCtp","plugins","isEnabled","get","9inFGLB","includes","value","2101352hxKkGk","48666gRhubM","footnotesListStyle","483uwWDhL","5306717mAxXLU","181zCtGpq","24ZyOvLy","547492jwxlDq","refresh","2286784sHXgvZ","1610565kCVGdu"];return(rt=function(){return t})()}const at=lt;function ct(){const t=["997232OPIQwJ","model","refresh","value","execute","isInteger","setAttribute","9123kVUDjB","8370187QDuCGI","plugins","2733564dpFPxh","change","getFootnotesDefinitionsObjectElement","2186822ezPzYG","isEnabled","_updateFootnotesCounters","30FeiMzu","6sCtjil","getAttribute","footnotesListStart","20856LOPMIP","25UgJMMC","190068imFpwz","576dskTHt","get"];return(ct=function(){return t})()}function lt(t,e){const n=ct();return(lt=function(t,e){return n[t-=100]})(t,e)}!function(t){const e=lt,n=t();for(;;)try{if(748855===parseInt(e(111))/1+parseInt(e(104))/2+parseInt(e(114))/3+parseInt(e(101))/4*(-parseInt(e(100))/5)+-parseInt(e(121))/6*(parseInt(e(112))/7)+-parseInt(e(124))/8*(-parseInt(e(102))/9)+-parseInt(e(120))/10*(-parseInt(e(117))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ct);class ut extends t.Command{[at(106)](){const t=at,{editor:e}=this,n=e[t(113)][t(103)](f)[t(116)]();this[t(118)]=!!n,this[t(107)]=n?.[t(122)](t(123))??null}[at(108)]({value:t}){const e=at,{editor:n}=this,o=n[e(113)][e(103)](f),i=o[e(116)]();i&&Number[e(109)](t)&&n[e(105)][e(115)](n=>{const s=e;n[s(110)](s(123),t,i),o[s(119)](n)})}}function ft(t,e){const n=yt();return(ft=function(t,e){return n[t-=107]})(t,e)}const dt=ft;!function(t){const e=ft,n=t();for(;;)try{if(988352===parseInt(e(130))/1*(-parseInt(e(207))/2)+parseInt(e(182))/3+-parseInt(e(189))/4+parseInt(e(194))/5*(-parseInt(e(164))/6)+parseInt(e(204))/7+parseInt(e(153))/8*(parseInt(e(198))/9)+parseInt(e(183))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(yt);class pt extends t.Plugin{static get[dt(126)](){return dt(150)}static get[dt(172)](){return[v,f]}static get[dt(166)](){return!0}static get[dt(114)](){return!0}[dt(157)](){const t=dt,{editor:e}=this;e[t(169)][t(127)](t(196),t(136)),e[t(169)][t(127)](t(132),1),e[t(167)][t(181)](t(191),new st(e)),e[t(167)][t(181)](t(162),new ut(e)),this[t(158)](),this[t(145)](),this[t(177)](),this[t(175)]()}[dt(158)](){const t=dt,{editor:e}=this,{schema:n}=e[t(174)];n[t(193)](t(188),{allowAttributes:[t(197),t(165)]})}[dt(145)](){const t=dt,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(163)](t(179))[t(181)](e=>{const n=t;e.on(n(141),(t,e,o)=>{const s=n,r=e[s(187)],a=e[s(168)]?.[s(178)];r[s(116)](s(121))&&a?.is(s(195),s(188))&&(function(t,e,n,o){const i=s;if(!o[i(115)](e,i(165)))return;let r=1;const a=n[i(122)][i(152)](t,{attributes:i(201)});if(a){const e=Number[i(111)](t[i(200)](i(201)),10);Number[i(203)](e)||(r=e)}!a&&e[i(147)](i(165))||n[i(112)][i(173)](i(165),r,e)}(r,a,o,i),function(t,e,n,o){const i=s;if(!o[i(115)](e,i(197)))return;let r=i(136),a=!1;if(n[i(122)][i(152)](t,{attributes:i(113)})){const e={1:i(136),a:i(154),A:i(160),i:i(176),I:i(148)}[t[i(200)](i(113))];e&&(r=e),a=!0}n[i(122)][i(152)](t,{styles:i(119)})&&(r=t[i(159)](i(119)),a=!0),!a&&e[i(147)](i(197))||n[i(112)][i(173)](i(197),r,e)}(r,a,o,i))})}),n[t(163)](t(144))[t(181)](e=>{const n=t;e.on(n(133),(t,e,o)=>{const i=n;if(!o[i(122)][i(152)](e[i(124)],t[i(120)]))return;const s=ht(e[i(124)],o[i(170)]),{attributeNewValue:r}=e;null==r||1===r?o[i(112)][i(131)](i(201),s):o[i(112)][i(173)](i(201),String(r),s)}),e.on(n(206),(t,e,o)=>{const i=n;if(!o[i(122)][i(152)](e[i(124)],t[i(120)]))return;const s=ht(e[i(124)],o[i(170)]),{attributeNewValue:r}=e;r&&i(136)!==r?o[i(112)][i(143)](i(119),r,s):o[i(112)][i(125)](i(119),s)})})}[dt(175)](){const t=dt,{editor:e}=this,{model:n}=e,o=e[t(134)][t(156)](f),i=this[t(140)](),s=this[t(139)]();n[t(184)][t(205)](e=>{const r=t,a=n[r(184)][r(107)][r(129)]();let c=!1;for(const t of a){if(r(151)!==t[r(113)]||r(146)===t[r(120)])continue;const o=n[r(180)](t[r(155)][r(142)]);for(const t of o[r(128)]())t.is(r(195),r(188))&&(!t[r(147)](r(165))&&n[r(138)][r(115)](t,r(165))&&(e[r(173)](r(165),s,t),c=!0),!t[r(147)](r(197))&&n[r(138)][r(115)](t,r(197))&&(e[r(173)](r(197),i,t),c=!0))}return c&&o[r(161)](e),c})}[dt(177)](){const t=dt,{editor:e}=this;e[t(134)][t(156)](f)[t(118)](e=>this[t(199)](e))}[dt(140)](){const t=dt;return this[t(108)][t(169)][t(156)](t(196))}[dt(139)](){const t=dt;return this[t(108)][t(169)][t(156)](t(132))}[dt(199)]({container:t,value:e,digits:n}){const o=dt,i=t[o(200)](o(197)),s=t[o(200)](o(165)),r=Math[o(117)](e)+(s??1)-1;switch(i){case o(110):return function(t,e){const n=o;return String(t)[n(137)](e,"0")}(r,Math[o(186)](2,n));case o(154):case o(109):return mt(r,!1);case o(160):case o(192):return mt(r,!0);case o(176):return wt(r,!1);case o(148):return wt(r,!0);default:return String(r)}}}function ht(t,e){const n=dt,o=e[n(135)](t);return Array[n(149)](o[n(190)]())[n(202)](t=>t.is(n(195),"ol")&&t[n(116)](n(121)))}function mt(t,e){const n=dt;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(185)](97+t)+o,i=Math[n(117)]((i-1)/26)}return e?o[n(171)]():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;let o="",i=t;for(const{value:t,numeral:e}of gt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(123)]()}function yt(){const t=["_updateFootnotesCounters","footnotesStart","for","2966982eGorjt","footnotesListStart","isOfficialPlugin","commands","modelCursor","config","mapper","toUpperCase","requires","setAttribute","model","_definePostfixer","lower-roman","_defineFormatter","parent","upcast","createRangeOn","add","1101243qMLkOc","9845080NXcPgd","document","fromCharCode","max","viewItem","footnotesDefinitions","249632kSJIct","getChildren","footnotesStyle","upper-latin","extend","10quEYBW","element","footnotes.footnotesProperties.defaultListStyle","footnotesListStyle","9UaYfGM","_formatFootnoteListValue","getAttribute","start","find","isNaN","7643706yAeQSo","registerPostFixer","attribute:footnotesListStyle:footnotesDefinitions","3234vmpvoH","differ","editor","lower-latin","decimal-leading-zero","parseInt","writer","type","isPremiumPlugin","checkAttribute","hasClass","floor","setFootnoteFormatter","list-style-type","name","footnotes-list","consumable","toLowerCase","item","removeStyle","pluginName","define","getItems","getChanges","917ErqQcF","removeAttribute","footnotes.footnotesProperties.defaultStartIndex","attribute:footnotesListStart:footnotesDefinitions","plugins","toViewElement","decimal","padStart","schema","_getDefaultStartIndex","_getDefaultListStyle","element:ol","nodeAfter","setStyle","downcast","_defineConverters","$text","hasAttribute","upper-roman","from","FootnotesPropertiesEditing","insert","consume","8631968GLikEL","lower-alpha","position","get","init","_defineSchema","getStyle","upper-alpha"];return(yt=function(){return t})()}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,max:Math.pow(2,30),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(o<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var vt=n(945),It={attributes:{"data-cke":!0}};It.setAttributes=W(),It.insert=j().bind(null,"head"),It.domAPI=K(),It.insertStyleElement=U();N()(vt.A,It);vt.A&&vt.A.locals&&vt.A.locals;class kt extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[T.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var 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=xt;function Ft(){var t=["11382160fQJjVk","1576280ATzsgW","85qcJZAZ","5062748efImma","3HaOTsO","9987502QqLyPD","pluginName","FootnotesProperties","isOfficialPlugin","requires","1152FFwlji","98244eokYBy","isPremiumPlugin","80176JVSBXk","23162ROramW"];return(Ft=function(){return t})()}function xt(t,e){var n=Ft();return(xt=function(t,e){return n[t-=150]})(t,e)}!function(t){for(var e=xt,n=t();;)try{if(804385===parseInt(e(163))/1+parseInt(e(150))/2+-parseInt(e(153))/3*(-parseInt(e(152))/4)+parseInt(e(151))/5*(-parseInt(e(160))/6)+parseInt(e(154))/7+-parseInt(e(162))/8*(parseInt(e(159))/9)+-parseInt(e(164))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ft);class Et extends t.Plugin{static get[Ct(155)](){return Ct(156)}static get[Ct(158)](){return[pt,kt]}static get[Ct(157)](){return!0}static get[Ct(161)](){return!0}}function Pt(){var t=["390590uJMbHN","1143498VWcrDb","817267yTspHo","6767109uTILeX","7voykNY","2976135EkSEQk","4763364TwTtlW","10678200wHHoaB","108QXYgXR"];return(Pt=function(){return t})()}function St(t,e){var n=Pt();return(St=function(t,e){return n[t-=365]})(t,e)}!function(t){for(var e=St,n=t();;)try{if(869972===parseInt(e(372))/1+-parseInt(e(371))/2+parseInt(e(366))/3+-parseInt(e(367))/4+-parseInt(e(370))/5*(-parseInt(e(369))/6)+parseInt(e(365))/7*(-parseInt(e(368))/8)+parseInt(e(373))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Pt)})(),(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 .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:()=>st,FootnotesTracker:()=>f,FootnotesUI:()=>q,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);function r(){const t=["getElementKey","getChanges","692643WJCgnE","$graveyard","from","getItems","7154376HJnAZV","_model","3591087YPkyTt","add","elementName","rootName","2309255JGTnhb","attributes","1388212AGsqWL","18TTTbIG","insert","$text","2CXpNqy","reset","values","clear","has","push","slice","type","_getElementKey","remove","_trackedElements","4129854DcpLll","3434120mKukkW","8RabSPP","root","delete","length","position","get","createRangeOn","set","element","nodeAfter","_elementName","flat","name"];return(r=function(){return t})()}function a(t,e){const n=r();return(a=function(t,e){return n[t-=357]})(t,e)}const c=a;!function(t){const e=a,n=t();for(;;)try{if(730622===-parseInt(e(363))/1+parseInt(e(379))/2*(parseInt(e(369))/3)+-parseInt(e(392))/4*(-parseInt(e(373))/5)+-parseInt(e(390))/6+parseInt(e(375))/7+-parseInt(e(367))/8+-parseInt(e(376))/9*(-parseInt(e(391))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(r);class l{[c(368)];[c(358)];[c(387)];[c(389)]=new Map;constructor(t,e){const n=c;this[n(368)]=t,this[n(358)]=e[n(371)],this[n(387)]=e[n(361)]}[c(380)](){const t=c;this[t(389)][t(382)]()}[c(362)](t){const e=c,n=new Set,o=new Map;for(const i of t){if(e(377)===i[e(386)]&&e(378)!==i[e(360)]&&i[e(396)][e(357)]){const t=this[e(368)][e(398)](i[e(396)][e(357)]);for(const n of t[e(366)]()){if(!n.is(e(400),this[e(358)]))continue;const t=this[e(387)](n);o[e(383)](t)||o[e(399)](t,[]),o[e(397)](t)[e(384)](n)}}if(e(388)===i[e(386)]&&i[e(360)]===this[e(358)]){const t=this[e(387)]({getAttribute:t=>i[e(374)][e(397)](t)});n[e(370)](t)}}for(const[t,o]of this[e(389)])e(364)===o[e(393)][e(372)]&&n[e(370)](t);for(const t of n)this[e(389)][e(394)](t);for(const[t,n]of o)this[e(389)][e(399)](t,n[n[e(395)]-1]);const i=new Set;for(const[t,s]of o)n[e(383)](t)&&(i[e(370)](s[0]),s[e(395)]>1?o[e(399)](t,s[e(385)](1)):o[e(394)](t),n[e(394)](t));return{removed:Array[e(365)](n),inserted:Array[e(365)](o[e(381)]())[e(359)](),moved:Array[e(365)](i)}}}const u=d;!function(t){const e=d,n=t();for(;;)try{if(194312===parseInt(e(192))/1+-parseInt(e(155))/2*(parseInt(e(182))/3)+-parseInt(e(173))/4*(parseInt(e(244))/5)+parseInt(e(236))/6*(parseInt(e(200))/7)+parseInt(e(193))/8*(parseInt(e(186))/9)+parseInt(e(156))/10*(-parseInt(e(157))/11)+-parseInt(e(163))/12*(-parseInt(e(215))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(p);class f extends t.Plugin{[u(202)]=[];[u(188)]=null;[u(203)]=null;[u(196)];[u(237)];[u(241)];static get[u(201)](){return u(213)}static get[u(161)](){return!0}static get[u(191)](){return!0}constructor(t){const e=u;super(t),this[e(196)]=new l(this[e(209)][e(190)],{elementName:e(175),getElementKey:()=>e(167)}),this[e(237)]=new l(this[e(209)][e(190)],{elementName:e(229),getElementKey:t=>t[e(214)](e(242))}),this[e(241)]=new l(this[e(209)][e(190)],{elementName:e(176),getElementKey:t=>t[e(214)](e(242))})}[u(224)](){const t=u,{editor:e}=this,{model:n,data:o}=e;n[t(185)][t(181)](e=>{const o=t,i=n[o(185)][o(243)][o(183)]();let s=!1;return this[o(147)](e,i)&&(s=!0),this[o(234)](e,i)&&(s=!0),this[o(223)](e,i)&&(s=!0),this[o(178)](e)&&(s=!0),this[o(144)](e)&&(s=!0),this[o(205)](e)&&(s=!0),s}),this[t(174)](n[t(185)],t(158),()=>{const e=t;n[e(227)]({isUndoable:!1},t=>{this[e(246)](t)})},{priority:t(159)}),this[t(174)](o,t(228),()=>{const e=t;this[e(202)]=[],this[e(196)][e(206)](),this[e(237)][e(206)](),this[e(241)][e(206)]()},{priority:t(189)})}[u(225)](){return this[u(188)]}[u(169)](t){const e=u;return this[e(202)][e(166)](e=>e.id===t)||null}[u(204)](){const t=u;return Array[t(195)](this[t(202)])}[u(247)](){return this[u(203)]}[u(146)](t){this[u(203)]=t}[u(207)](t,e=0){const n=u;let o=!1;for(let i=e;i<this[n(202)][n(154)];i++)this[n(198)](t,i)&&(o=!0);return o}[u(197)](t,e){const n=u,o=t[n(240)](n(175),{});return t[n(211)](o,e),this[n(188)]=o,o}[u(246)](t){const e=u;if(!this[e(202)][e(154)]||this[e(188)])return;const n=this[e(202)][0][e(152)][e(231)],o=this[e(197)](t,n);for(const n of this[e(202)])n[e(180)][e(150)]||t[e(216)](n[e(180)],o,e(184));this[e(207)](t)}[u(147)](t,e){const n=u;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(196)][n(183)](e);if(r[n(154)]&&(this[n(188)]=r[0]),i[n(154)])if(i[n(154)]>1||this[n(188)]&&i[n(210)](t=>t!==this[n(188)])){const e=t[n(240)](n(175),{}),s=[];this[n(188)]&&s[n(221)](this[n(188)]),s[n(221)](...i),t[n(216)](e,s[0],n(149));for(const o of s)t[n(177)](t[n(222)](o),t[n(245)](e,n(184))),t[n(217)](o);this[n(188)]=e,this[n(207)](t),o=!0}else this[n(188)]=i[0];if(s[n(154)]&&n(220)===this[n(188)]?.[n(231)][n(212)]){for(const e of this[n(202)])t[n(217)](e[n(152)]),o=!0;this[n(202)]=[],this[n(188)]=null}return o}[u(234)](t,e){const n=u;let o=!1;const i=this[n(209)][n(187)][n(153)](n(162)),{inserted:s,moved:r}=this[n(241)][n(183)](e);for(const e of[...r,...s]){const s=e[n(214)](n(242)),r=this[n(169)](s);r&&(r[n(180)]=e),h(t,i,e)&&(o=!0)}return o}[u(223)](t,e){const n=u;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(237)][n(183)](e);for(const e of i)this[n(239)](t,e)&&(o=!0);for(const e of s)this[n(168)](t,e)&&(o=!0);for(const e of r)this[n(238)](t,e)&&(o=!0);return o}[u(144)](t){const e=u;if(!this[e(188)])return!1;let n=!1;if(this[e(188)][e(148)]!==this[e(202)][e(154)]){const o=[];for(const t of this[e(188)][e(171)]()){const i=t[e(214)](e(242));this[e(169)](i)||(o[e(218)](t),n=!0)}for(const n of o)t[e(217)](n)}const o=new Set,i=[];for(const t of this[e(188)][e(171)]()){const s=t[e(214)](e(242));o[e(164)](s)?(i[e(218)](t),n=!0):o[e(219)](s)}for(const n of i)t[e(217)](n);return this[e(188)][e(148)]||(t[e(217)](this[e(188)]),this[e(188)]=null,n=!0),n}[u(168)](t,e){const n=u;if(this[n(202)][n(166)](t=>t[n(152)]===e))return!1;let o=!1;const i=e[n(214)](n(242)),s=this[n(202)][n(151)](t=>t.id===i);-1!==s&&(t[n(217)](this[n(202)][s][n(152)]),this[n(202)][n(145)](s,1),o=!0);let r=this[n(188)]?function(t,e){const o=n;for(const n of t[o(171)]())if(n[o(214)](o(242))===e)return n;return null}(this[n(188)],i):null;r||(r=t[n(240)](n(176),{footnoteId:i}),this[n(188)]&&(t[n(216)](r,this[n(188)],n(184)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(209)][n(190)],this[n(202)],e);this[n(202)][n(145)](c,0,a);let l=c;return-1!==s&&(l=Math[n(194)](c,s)),this[n(207)](t,l)&&(o=!0),o}[u(239)](t,e){const n=u,o=this[n(202)][n(151)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(202)][o];return n(220)!==s[n(180)][n(231)][n(212)]&&(t[n(217)](s[n(180)]),i=!0),this[n(202)][n(145)](o,1),this[n(207)](t,o)&&(i=!0),i}[u(238)](t,e){const n=u,o=e[n(214)](n(242)),i=this[n(202)][n(151)](t=>t.id===o),s=this[n(202)][i];let r=!1;s[n(152)]=e,this[n(202)][n(145)](i,1);const a=m(this[n(209)][n(190)],this[n(202)],e);return this[n(202)][n(145)](a,0,s),this[n(207)](t,Math[n(194)](i,a))&&(r=!0),r}[u(198)](t,e){const n=u;if(!this[n(188)])return!1;const o=this[n(202)][e];let i;return i=this[n(203)]?this[n(203)]({footnote:o,container:this[n(188)],digits:String(this[n(202)][n(154)])[n(154)],value:e+1}):String(e+1),o[n(152)][n(214)](n(232))!=i&&(t[n(170)](n(232),i,o[n(152)]),!0)}[u(205)](t){const e=u;if(!this[e(188)]||this[e(202)][e(154)]<2)return!1;if(function(t,n){const o=e;if(t[o(154)]!==n[o(154)])return!1;for(let e=0;e<t[o(154)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(202)][e(160)](t=>t.id),Array[e(195)](this[e(188)][e(171)]())[e(160)](t=>t[e(214)](e(242)))))return!1;let n=!1;for(let o=0;o<this[e(202)][e(154)];o++){const i=this[e(202)][o],s=t[e(235)](i[e(180)]),r=t[e(245)](this[e(188)],o);s[e(165)](r)||(t[e(177)](t[e(233)](i[e(180)]),r),n=!0)}return n}[u(178)](t){const e=u;if(!this[e(202)][e(154)])return!1;const{model:n}=this[e(209)];let o=!1;for(let i=0;i<this[e(202)][e(154)]-1;i++){const s=this[e(202)][i],r=this[e(202)][i+1],a=n[e(235)](s[e(152)]),c=n[e(235)](r[e(152)]);e(226)===a[e(179)](c)&&(this[e(238)](t,s[e(152)]),i=-1,o=!0)}return o}}function d(t,e){const n=p();return(d=function(t,e){return n[t-=144]})(t,e)}function p(){const t=["createPositionBefore","33240tSMOMG","_footnoteRefsTracker","_handleMovedFootnoteReference","_handleRemoveFootnoteReferenceById","createElement","_footnoteDefsTracker","footnoteId","differ","353315jHoZAg","createPositionAt","_ensureFootnotesDefinitionsContainerExists","getFootnotesFormatter","_handleFootnotesDefinitionsObjectSync","splice","setFootnoteFormatter","_handleFootnotesDefinitionsObjectChanges","childCount","before","parent","findIndex","reference","get","length","214NiugWL","10BOeymQ","1722655OliCjf","change:data","low","map","isOfficialPlugin","footnotes.multiBlock","59808thasXU","has","isEqual","find","singleton","_handleInsertedFootnoteReference","getFootnote","setAttribute","getChildren","paragraph","8rbBgCB","listenTo","footnotesDefinitions","footnoteDefinition","move","_ensureFootnotesReferencesHaveProperOrder","compareWith","definition","registerPostFixer","10239rWWfYd","getChanges","end","document","27wlWhUE","config","_footnotesDefinitions","high","model","isPremiumPlugin","198461kkPUGk","126904aJwWne","min","from","_footnoteDefsContainerTracker","_insertEmptyFootnotesDefinitionsContainer","_updateFootnoteRefCounter","footnoteInlineContent","42lYYmRF","pluginName","_footnotes","_footnoteFormatter","getFootnotes","_sortFootnoteDefinitions","reset","_updateFootnotesCounters","getRootNames","editor","some","append","rootName","FootnotesTracker","getAttribute","1508xuCHey","insert","remove","unshift","add","$graveyard","push","createRangeIn","_handleFootnoteReferencesChanges","init","getFootnotesDefinitionsObjectElement","after","enqueueChange","set","footnoteRef","indexOf","root","footnoteCounter","createRangeOn","_handleFootnoteDefinitionsChanges"];return(p=function(){return t})()}function h(t,e,n){const o=u;if(n[o(148)])return!1;const i=o(e?172:199);return t[o(216)](t[o(240)](i),n),!0}function m(t,e,n){const o=u;if(0===e[o(154)])return 0;const i=t[o(235)](n);for(let n=0;n<e[o(154)];n++){const s=e[n],r=t[o(235)](s[o(152)]);if(o(149)===i[o(179)](r))return n}const s=n[o(231)];let r=-1;for(let t=e[o(154)]-1;t>=0;t--)if(e[t][o(152)][o(231)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(185)][o(208)](),c=a[o(230)](s[o(212)]),l=a[c+1];if(l)for(let t=0;t<e[o(154)];t++)if(e[t][o(152)][o(231)][o(212)]===l)return t;return e[o(154)]}const g=y;function w(){const t=["model","length","293652Nmeenp","get","insert-footnote-command-executed-with-invalid-id","string","editor","document","7lfhyzL","_getPositionToInsertFootnote","isObject","execute","getFirstRange","getItems","selection","checkChild","end","19920wPfupR","isEnabled","_moveSelectionToFootnoteDefinition","1134ymvITt","1106700YGUslL","75376lKtZrR","plugins","test","refresh","12KhhpbN","change","59397sUDaiC","FootnotesEditing","1882952wauUit","footnoteId","footnoteRef","isBlock","insertObject","76438JgQjLA","createElement"];return(w=function(){return t})()}function y(t,e){const n=w();return(y=function(t,e){return n[t-=356]})(t,e)}!function(t){const e=y,n=t();for(;;)try{if(126821===parseInt(e(364))/1+-parseInt(e(392))/2*(parseInt(e(357))/3)+-parseInt(e(388))/4+parseInt(e(387))/5+-parseInt(e(368))/6+-parseInt(e(374))/7*(parseInt(e(359))/8)+parseInt(e(386))/9*(parseInt(e(383))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(w);class b extends t.Command{[g(391)](){const t=g,e=this[t(372)][t(366)][t(373)][t(380)],n=this[t(375)](e);this[t(384)]=!!n}[g(377)](t){const e=g,{editor:n}=this,{model:o}=n,{selection:s}=o[e(373)],r=this[e(375)](s);if(!r)return;const a=n[e(389)][e(369)](e(358)),c=t?.[e(360)]??(0,i.uid)();!function(t){const n=e;return n(371)==typeof t&&t[n(367)]>0&&!/\s/[n(390)](t)&&!/^\d/[n(390)](t)}(c)?(0,i.logWarning)(e(370)):(o[e(356)](t=>{const n=e,i=t[n(365)](n(361),{footnoteId:c});o[n(363)](i,r,null)}),a[e(385)](c))}[g(375)](t){const e=g,{model:n}=this[e(372)],{schema:o}=n,i=t[e(378)]();for(const t of i[e(379)]())if(o[e(362)](t)||o[e(376)](t))return null;const s=i[e(382)];return o[e(381)](s,e(361))?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:1762128e3;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+Shift+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Shift+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","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:o}=e;if(!o.is("element","a"))return;if(o.parent?.is("element","sup")&&o.parent.hasClass("footnote")&&!n)return void e.preventDefault();let i=o.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer: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);function L(){const t=["footnoteRef","change","application/ckeditor5-footnotes","init","250YPraqM","add","pluginName","toModel","dataTransfer","definition","getFootnote","create","setAttribute","_insertEmptyFootnotesDefinitionsContainer","method","_defineClipboardIntegration","selection","reduce","push","getFootnotesDefinitionsObjectElement","177133RbLFBy","toView","insert","entries","541509IeKKyu","drop","1788708GElHLs","getData","find","content","setData","append","7QXIGJe","isOfficialPlugin","footnoteDefinition","sourceEditorId","from","createElement","isPremiumPlugin","footnoteId","18ZFpxkE","getAttribute","toData","2lzvIsp","htmlProcessor","footnotesDefinitions","outputTransformation","root","createRangeIn","length","getFootnotes","get","parse","stringify","element","clipboardInput","remove","document","_handleCopyFootnotesDefinitions","editing","data","editor","end","3180528pKhVDC","contentInsertion","getFirstRange","FootnotesClipboard","5sGLTqu","1308780MmnkBY","1135388vvRbay","requires","_handlePasteFootnotesDefinitions","listenTo","17490648GMgCou"];return(L=function(){return t})()}const _=A;function A(t,e){const n=L();return(A=function(t,e){return n[t-=352]})(t,e)}!function(t){const e=A,n=t();for(;;)try{if(707097===parseInt(e(395))/1*(parseInt(e(414))/2)+-parseInt(e(397))/3+-parseInt(e(366))/4*(-parseInt(e(364))/5)+-parseInt(e(365))/6*(-parseInt(e(403))/7)+parseInt(e(360))/8*(-parseInt(e(411))/9)+-parseInt(e(375))/10*(parseInt(e(391))/11)+parseInt(e(370))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(L);class D extends t.Plugin{static get[_(377)](){return _(363)}static get[_(367)](){return[v,S.ClipboardPipeline]}static get[_(404)](){return!0}static get[_(409)](){return!0}[_(374)](){this[_(386)]()}[_(386)](){const t=_;this[t(355)](),this[t(368)]()}[_(355)](){const t=_,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(422)](S.ClipboardPipeline),s=n[t(422)](f);this[t(369)](i,t(417),(n,i)=>{const r=t,a=function(t,e){const n=A,o=new Set;for(const{item:i}of t[n(419)](e))i.is(n(425),n(371))&&o[n(376)](i[n(412)](n(410)));return Array[n(407)](o)}(o,i[r(400)]);if(!a[r(420)])return;const c=s[r(421)](),l=a[r(388)]((t,n)=>{const o=r,i=c[o(399)](t=>t.id===n);if(i){const n=e[o(357)][o(392)](i[o(380)],{isClipboardPipeline:!0}),s=e[o(357)][o(415)][o(413)](n);t[i.id]=s}return t},Object[r(382)](null));i[r(379)][r(401)](r(373),JSON[r(424)](l))})}[_(368)](){const t=_,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(356)],r=o[t(422)](S.ClipboardPipeline),a=o[t(422)](f);let c=null;this[t(369)](s[t(354)],t(352),(e,n)=>{const o=t,i=n[o(379)][o(398)](o(373));c=i?JSON[o(423)](i):null}),this[t(369)](r,t(361),(o,s)=>{const r=t;if(!c)return;const l=s[r(406)]===this[r(358)].id;l&&r(396)===s[r(385)]||n[r(372)](t=>{const o=r;!function(t,e){const n=A,o=[];for(const{item:i}of t[n(419)](e))i.is(n(425),n(416))&&o[n(389)](i);for(const e of o)t[n(353)](e)}(t,s[o(400)]);let u=a[o(390)]();if(!u){const e=n[o(354)][o(387)][o(362)]()[o(418)];u=a[o(384)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(382)](null);for(const{item:o}of t[s(419)](e))if(o.is(s(425),s(371))){const e=o[s(412)](s(410));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(383)](s(410),r[e],o)}return r}(t,s[o(400)],t=>!l||null!==a[o(381)](t));for(const[n,i]of Object[o(394)](c)){const s=f[n]||n,r=t[o(408)](o(405),{footnoteId:s}),a=e[o(357)][o(415)][o(392)](i),c=e[o(357)][o(378)](a,r);t[o(402)](c,r),t[o(393)](r,u,o(359))}c=null})})}}var T=n(311),V=n(355),O=n(450),N=n.n(O),R=n(774),K=n.n(R),M=n(265),j=n.n(M),B=n(410),W=n.n(B),H=n(238),U=n.n(H),z=n(14),G={attributes:{"data-cke":!0}};G.setAttributes=W(),G.insert=j().bind(null,"head"),G.domAPI=K(),G.insertStyleElement=U();N()(z.A,G);z.A&&z.A.locals&&z.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",J(t,T.ButtonView)),e.add("menuBar:insertFootnote",J(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 J(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}}function X(){var t=["66100980Bzjsap","194IWhyjQ","1240670fvjPmo","15178FXocBZ","isOfficialPlugin","pluginName","isPremiumPlugin","8qrgUMO","16596738WZYvGZ","16FTgFDa","2179608ektjCy","1335900EfBXfL","4795098ypJpqB","Footnotes","requires"];return(X=function(){return t})()}var Y=Q;function Q(t,e){var n=X();return(Q=function(t,e){return n[t-=384]})(t,e)}!function(t){for(var e=Q,n=t();;)try{if(923568===parseInt(e(394))/1*(-parseInt(e(396))/2)+-parseInt(e(388))/3+parseInt(e(385))/4*(-parseInt(e(395))/5)+parseInt(e(389))/6+parseInt(e(390))/7*(-parseInt(e(387))/8)+-parseInt(e(386))/9+parseInt(e(393))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(X);class Z extends t.Plugin{static get[Y(398)](){return Y(391)}static get[Y(392)](){return[v,D,q]}static get[Y(397)](){return!0}static get[Y(384)](){return!0}}const $=tt;function tt(t,e){const n=nt();return(tt=function(t,e){return n[t-=312]})(t,e)}!function(t){const e=tt,n=t();for(;;)try{if(905200===parseInt(e(314))/1*(-parseInt(e(316))/2)+-parseInt(e(320))/3*(-parseInt(e(327))/4)+parseInt(e(313))/5+-parseInt(e(326))/6*(-parseInt(e(328))/7)+parseInt(e(323))/8+-parseInt(e(329))/9+-parseInt(e(312))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(nt);const et=[$(324),$(322),$(317),$(315),$(325),$(321),$(319),$(318)];function nt(){const t=["47812900OSYHGh","8963865JGRJoK","1BBfiMu","upper-latin","563924JfNyNl","lower-latin","upper-roman","lower-roman","123NhNyOa","upper-alpha","decimal-leading-zero","12208232ONvRnW","decimal","lower-alpha","3972AXRhae","122756fzBFJK","14777kACtLJ","54729jQRLuX"];return(nt=function(){return t})()}function ot(t,e){const n=rt();return(ot=function(t,e){return n[t-=103]})(t,e)}const it=ot;!function(t){const e=ot,n=t();for(;;)try{if(338038===-parseInt(e(112))/1*(-parseInt(e(120))/2)+parseInt(e(124))/3*(parseInt(e(116))/4)+parseInt(e(117))/5+-parseInt(e(108))/6*(parseInt(e(110))/7)+parseInt(e(107))/8*(parseInt(e(104))/9)+parseInt(e(127))/10*(parseInt(e(114))/11)+parseInt(e(113))/12*(-parseInt(e(111))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(rt);class st extends t.Command{[it(115)](){const t=it,{editor:e}=this,n=e[t(128)][t(103)](f)[t(119)]();this[t(129)]=!!n,this[t(106)]=n?.[t(121)](t(109))??null}[it(125)]({value:t}){const e=it,{editor:n}=this,o=n[e(128)][e(103)](f),i=o[e(119)]();i&&et[e(105)](t)&&n[e(126)][e(123)](n=>{const s=e;n[s(118)](s(109),t,i),o[s(122)](n)})}}function rt(){const t=["setAttribute","getFootnotesDefinitionsObjectElement","1762zrTWxb","getAttribute","_updateFootnotesCounters","change","3LrysiA","execute","model","80AIJCtp","plugins","isEnabled","get","9inFGLB","includes","value","2101352hxKkGk","48666gRhubM","footnotesListStyle","483uwWDhL","5306717mAxXLU","181zCtGpq","24ZyOvLy","547492jwxlDq","refresh","2286784sHXgvZ","1610565kCVGdu"];return(rt=function(){return t})()}const at=lt;function ct(){const t=["997232OPIQwJ","model","refresh","value","execute","isInteger","setAttribute","9123kVUDjB","8370187QDuCGI","plugins","2733564dpFPxh","change","getFootnotesDefinitionsObjectElement","2186822ezPzYG","isEnabled","_updateFootnotesCounters","30FeiMzu","6sCtjil","getAttribute","footnotesListStart","20856LOPMIP","25UgJMMC","190068imFpwz","576dskTHt","get"];return(ct=function(){return t})()}function lt(t,e){const n=ct();return(lt=function(t,e){return n[t-=100]})(t,e)}!function(t){const e=lt,n=t();for(;;)try{if(748855===parseInt(e(111))/1+parseInt(e(104))/2+parseInt(e(114))/3+parseInt(e(101))/4*(-parseInt(e(100))/5)+-parseInt(e(121))/6*(parseInt(e(112))/7)+-parseInt(e(124))/8*(-parseInt(e(102))/9)+-parseInt(e(120))/10*(-parseInt(e(117))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ct);class ut extends t.Command{[at(106)](){const t=at,{editor:e}=this,n=e[t(113)][t(103)](f)[t(116)]();this[t(118)]=!!n,this[t(107)]=n?.[t(122)](t(123))??null}[at(108)]({value:t}){const e=at,{editor:n}=this,o=n[e(113)][e(103)](f),i=o[e(116)]();i&&Number[e(109)](t)&&n[e(105)][e(115)](n=>{const s=e;n[s(110)](s(123),t,i),o[s(119)](n)})}}function ft(t,e){const n=yt();return(ft=function(t,e){return n[t-=107]})(t,e)}const dt=ft;!function(t){const e=ft,n=t();for(;;)try{if(988352===parseInt(e(130))/1*(-parseInt(e(207))/2)+parseInt(e(182))/3+-parseInt(e(189))/4+parseInt(e(194))/5*(-parseInt(e(164))/6)+parseInt(e(204))/7+parseInt(e(153))/8*(parseInt(e(198))/9)+parseInt(e(183))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(yt);class pt extends t.Plugin{static get[dt(126)](){return dt(150)}static get[dt(172)](){return[v,f]}static get[dt(166)](){return!0}static get[dt(114)](){return!0}[dt(157)](){const t=dt,{editor:e}=this;e[t(169)][t(127)](t(196),t(136)),e[t(169)][t(127)](t(132),1),e[t(167)][t(181)](t(191),new st(e)),e[t(167)][t(181)](t(162),new ut(e)),this[t(158)](),this[t(145)](),this[t(177)](),this[t(175)]()}[dt(158)](){const t=dt,{editor:e}=this,{schema:n}=e[t(174)];n[t(193)](t(188),{allowAttributes:[t(197),t(165)]})}[dt(145)](){const t=dt,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(163)](t(179))[t(181)](e=>{const n=t;e.on(n(141),(t,e,o)=>{const s=n,r=e[s(187)],a=e[s(168)]?.[s(178)];r[s(116)](s(121))&&a?.is(s(195),s(188))&&(function(t,e,n,o){const i=s;if(!o[i(115)](e,i(165)))return;let r=1;const a=n[i(122)][i(152)](t,{attributes:i(201)});if(a){const e=Number[i(111)](t[i(200)](i(201)),10);Number[i(203)](e)||(r=e)}!a&&e[i(147)](i(165))||n[i(112)][i(173)](i(165),r,e)}(r,a,o,i),function(t,e,n,o){const i=s;if(!o[i(115)](e,i(197)))return;let r=i(136),a=!1;if(n[i(122)][i(152)](t,{attributes:i(113)})){const e={1:i(136),a:i(154),A:i(160),i:i(176),I:i(148)}[t[i(200)](i(113))];e&&(r=e),a=!0}n[i(122)][i(152)](t,{styles:i(119)})&&(r=t[i(159)](i(119)),a=!0),!a&&e[i(147)](i(197))||n[i(112)][i(173)](i(197),r,e)}(r,a,o,i))})}),n[t(163)](t(144))[t(181)](e=>{const n=t;e.on(n(133),(t,e,o)=>{const i=n;if(!o[i(122)][i(152)](e[i(124)],t[i(120)]))return;const s=ht(e[i(124)],o[i(170)]),{attributeNewValue:r}=e;null==r||1===r?o[i(112)][i(131)](i(201),s):o[i(112)][i(173)](i(201),String(r),s)}),e.on(n(206),(t,e,o)=>{const i=n;if(!o[i(122)][i(152)](e[i(124)],t[i(120)]))return;const s=ht(e[i(124)],o[i(170)]),{attributeNewValue:r}=e;r&&i(136)!==r?o[i(112)][i(143)](i(119),r,s):o[i(112)][i(125)](i(119),s)})})}[dt(175)](){const t=dt,{editor:e}=this,{model:n}=e,o=e[t(134)][t(156)](f),i=this[t(140)](),s=this[t(139)]();n[t(184)][t(205)](e=>{const r=t,a=n[r(184)][r(107)][r(129)]();let c=!1;for(const t of a){if(r(151)!==t[r(113)]||r(146)===t[r(120)])continue;const o=n[r(180)](t[r(155)][r(142)]);for(const t of o[r(128)]())t.is(r(195),r(188))&&(!t[r(147)](r(165))&&n[r(138)][r(115)](t,r(165))&&(e[r(173)](r(165),s,t),c=!0),!t[r(147)](r(197))&&n[r(138)][r(115)](t,r(197))&&(e[r(173)](r(197),i,t),c=!0))}return c&&o[r(161)](e),c})}[dt(177)](){const t=dt,{editor:e}=this;e[t(134)][t(156)](f)[t(118)](e=>this[t(199)](e))}[dt(140)](){const t=dt;return this[t(108)][t(169)][t(156)](t(196))}[dt(139)](){const t=dt;return this[t(108)][t(169)][t(156)](t(132))}[dt(199)]({container:t,value:e,digits:n}){const o=dt,i=t[o(200)](o(197)),s=t[o(200)](o(165)),r=Math[o(117)](e)+(s??1)-1;switch(i){case o(110):return function(t,e){const n=o;return String(t)[n(137)](e,"0")}(r,Math[o(186)](2,n));case o(154):case o(109):return mt(r,!1);case o(160):case o(192):return mt(r,!0);case o(176):return wt(r,!1);case o(148):return wt(r,!0);default:return String(r)}}}function ht(t,e){const n=dt,o=e[n(135)](t);return Array[n(149)](o[n(190)]())[n(202)](t=>t.is(n(195),"ol")&&t[n(116)](n(121)))}function mt(t,e){const n=dt;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(185)](97+t)+o,i=Math[n(117)]((i-1)/26)}return e?o[n(171)]():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;let o="",i=t;for(const{value:t,numeral:e}of gt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(123)]()}function yt(){const t=["_updateFootnotesCounters","footnotesStart","for","2966982eGorjt","footnotesListStart","isOfficialPlugin","commands","modelCursor","config","mapper","toUpperCase","requires","setAttribute","model","_definePostfixer","lower-roman","_defineFormatter","parent","upcast","createRangeOn","add","1101243qMLkOc","9845080NXcPgd","document","fromCharCode","max","viewItem","footnotesDefinitions","249632kSJIct","getChildren","footnotesStyle","upper-latin","extend","10quEYBW","element","footnotes.footnotesProperties.defaultListStyle","footnotesListStyle","9UaYfGM","_formatFootnoteListValue","getAttribute","start","find","isNaN","7643706yAeQSo","registerPostFixer","attribute:footnotesListStyle:footnotesDefinitions","3234vmpvoH","differ","editor","lower-latin","decimal-leading-zero","parseInt","writer","type","isPremiumPlugin","checkAttribute","hasClass","floor","setFootnoteFormatter","list-style-type","name","footnotes-list","consumable","toLowerCase","item","removeStyle","pluginName","define","getItems","getChanges","917ErqQcF","removeAttribute","footnotes.footnotesProperties.defaultStartIndex","attribute:footnotesListStart:footnotesDefinitions","plugins","toViewElement","decimal","padStart","schema","_getDefaultStartIndex","_getDefaultListStyle","element:ol","nodeAfter","setStyle","downcast","_defineConverters","$text","hasAttribute","upper-roman","from","FootnotesPropertiesEditing","insert","consume","8631968GLikEL","lower-alpha","position","get","init","_defineSchema","getStyle","upper-alpha"];return(yt=function(){return t})()}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,max:Math.pow(2,30),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(o<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var vt=n(945),It={attributes:{"data-cke":!0}};It.setAttributes=W(),It.insert=j().bind(null,"head"),It.domAPI=K(),It.insertStyleElement=U();N()(vt.A,It);vt.A&&vt.A.locals&&vt.A.locals;class kt extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[T.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var 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=xt;function Ft(){var t=["11382160fQJjVk","1576280ATzsgW","85qcJZAZ","5062748efImma","3HaOTsO","9987502QqLyPD","pluginName","FootnotesProperties","isOfficialPlugin","requires","1152FFwlji","98244eokYBy","isPremiumPlugin","80176JVSBXk","23162ROramW"];return(Ft=function(){return t})()}function xt(t,e){var n=Ft();return(xt=function(t,e){return n[t-=150]})(t,e)}!function(t){for(var e=xt,n=t();;)try{if(804385===parseInt(e(163))/1+parseInt(e(150))/2+-parseInt(e(153))/3*(-parseInt(e(152))/4)+parseInt(e(151))/5*(-parseInt(e(160))/6)+parseInt(e(154))/7+-parseInt(e(162))/8*(parseInt(e(159))/9)+-parseInt(e(164))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ft);class Et extends t.Plugin{static get[Ct(155)](){return Ct(156)}static get[Ct(158)](){return[pt,kt]}static get[Ct(157)](){return!0}static get[Ct(161)](){return!0}}function Pt(){var t=["390590uJMbHN","1143498VWcrDb","817267yTspHo","6767109uTILeX","7voykNY","2976135EkSEQk","4763364TwTtlW","10678200wHHoaB","108QXYgXR"];return(Pt=function(){return t})()}function St(t,e){var n=Pt();return(St=function(t,e){return n[t-=365]})(t,e)}!function(t){for(var e=St,n=t();;)try{if(869972===parseInt(e(372))/1+-parseInt(e(371))/2+parseInt(e(366))/3+-parseInt(e(367))/4+-parseInt(e(370))/5*(-parseInt(e(369))/6)+parseInt(e(365))/7*(-parseInt(e(368))/8)+parseInt(e(373))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x1f3d21,Command as _0x278339}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x2c15fa,isWidget as _0x54acc0,toWidgetEditable as _0x3a0a31,WidgetToolbarRepository as _0x148e9e}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x17bb3f,logWarning as _0x5d35ce,FocusTracker as et,KeystrokeHandler as ot,global as rt}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x5743a6,ClickObserver as _0x4d8c97}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x268d6c}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x4d1176,ButtonView as _0x238c7e,View as _0x13cfa5,ViewCollection as _0x5477af,FocusCycler as _0x5f207d,addKeyboardHandlingForGrid as _0x4bc2e2,CollapsibleView as tt,LabeledFieldView as st,createLabeledInputNumber as it,ContextualBalloon as _0x37b4f6,BalloonPanelView as _0x2e5d73,createDropdown as _0x5d7306}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x205cc2,IconListStyleDecimal as _0x2284b3,IconListStyleDecimalLeadingZero as _0x5b5fd6,IconListStyleLowerRoman as _0x2fb8f2,IconListStyleUpperRoman as _0x3bb33d,IconListStyleLowerLatin as _0x3379b4,IconListStyleUpperLatin as _0x159f95}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x51ff45,_0x4d13ee){this['_model']=_0x51ff45,this['_elementName']=_0x4d13ee['elementName'],this['_getElementKey']=_0x4d13ee['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x1a6e2e){const _0x3160ef=new Set(),_0x5892b8=new Map();for(const _0x3e843a of _0x1a6e2e){if('insert'===_0x3e843a['type']&&'$text'!==_0x3e843a['name']&&_0x3e843a['position']['nodeAfter']){const _0x4dbf10=this['_model']['createRangeOn'](_0x3e843a['position']['nodeAfter']);for(const _0x3e375d of _0x4dbf10['getItems']()){if(!_0x3e375d['is']('element',this['_elementName']))continue;const _0x5598f3=this['_getElementKey'](_0x3e375d);_0x5892b8['has'](_0x5598f3)||_0x5892b8['set'](_0x5598f3,[]),_0x5892b8['get'](_0x5598f3)['push'](_0x3e375d);}}if('remove'===_0x3e843a['type']&&_0x3e843a['name']===this['_elementName']){const _0x54ed32=this['_getElementKey']({'getAttribute':_0x25d888=>_0x3e843a['attributes']['get'](_0x25d888)});_0x3160ef['add'](_0x54ed32);}}for(const [_0x52a0ab,_0x362972]of this['_trackedElements'])'$graveyard'===_0x362972['root']['rootName']&&_0x3160ef['add'](_0x52a0ab);for(const _0x2e5b73 of _0x3160ef)this['_trackedElements']['delete'](_0x2e5b73);for(const [_0x80991b,_0x208820]of _0x5892b8)this['_trackedElements']['set'](_0x80991b,_0x208820[_0x208820['length']-0x1]);const _0x844b71=new Set();for(const [_0x485908,_0x27ba37]of _0x5892b8)_0x3160ef['has'](_0x485908)&&(_0x844b71['add'](_0x27ba37[0x0]),_0x27ba37['length']>0x1?_0x5892b8['set'](_0x485908,_0x27ba37['slice'](0x1)):_0x5892b8['delete'](_0x485908),_0x3160ef['delete'](_0x485908));return{'removed':Array['from'](_0x3160ef),'inserted':Array['from'](_0x5892b8['values']())['flat'](),'moved':Array['from'](_0x844b71)};}}class c extends _0x1f3d21{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x190a49){super(_0x190a49),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x37c7ed=>_0x37c7ed['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x1ea96a=>_0x1ea96a['getAttribute']('footnoteId')});}['init'](){const {editor:_0x29845f}=this,{model:_0x2e91fb,data:_0x2342b5}=_0x29845f;_0x2e91fb['document']['registerPostFixer'](_0x57c280=>{const _0x1b71b4=_0x2e91fb['document']['differ']['getChanges']();let _0x1f76cd=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x57c280,_0x1b71b4)&&(_0x1f76cd=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x57c280,_0x1b71b4)&&(_0x1f76cd=!0x0),this['_handleFootnoteReferencesChanges'](_0x57c280,_0x1b71b4)&&(_0x1f76cd=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x57c280)&&(_0x1f76cd=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x57c280)&&(_0x1f76cd=!0x0),this['_sortFootnoteDefinitions'](_0x57c280)&&(_0x1f76cd=!0x0),_0x1f76cd;}),this['listenTo'](_0x2e91fb['document'],'change:data',()=>{_0x2e91fb['enqueueChange']({'isUndoable':!0x1},_0xd02de6=>{this['_ensureFootnotesDefinitionsContainerExists'](_0xd02de6);});},{'priority':'low'}),this['listenTo'](_0x2342b5,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x4811c3){return this['_footnotes']['find'](_0x3b26fa=>_0x3b26fa['id']===_0x4811c3)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x2ea01e){this['_footnoteFormatter']=_0x2ea01e;}['_updateFootnotesCounters'](_0x24216d,_0x1f5cff=0x0){let _0x5b42ff=!0x1;for(let _0x3a7246=_0x1f5cff;_0x3a7246<this['_footnotes']['length'];_0x3a7246++)this['_updateFootnoteRefCounter'](_0x24216d,_0x3a7246)&&(_0x5b42ff=!0x0);return _0x5b42ff;}['_insertEmptyFootnotesDefinitionsContainer'](_0x193cce,_0x1c9b08){const _0x53294b=_0x193cce['createElement']('footnotesDefinitions',{});return _0x193cce['append'](_0x53294b,_0x1c9b08),this['_footnotesDefinitions']=_0x53294b,_0x53294b;}['_ensureFootnotesDefinitionsContainerExists'](_0x89f711){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x379baa=this['_footnotes'][0x0]['reference']['root'],_0x368b1a=this['_insertEmptyFootnotesDefinitionsContainer'](_0x89f711,_0x379baa);for(const _0xe441d of this['_footnotes'])_0xe441d['definition']['parent']||_0x89f711['insert'](_0xe441d['definition'],_0x368b1a,'end');this['_updateFootnotesCounters'](_0x89f711);}['_handleFootnotesDefinitionsObjectChanges'](_0x273069,_0x318fcd){let _0x21859d=!0x1;const {inserted:_0x4afd69,removed:_0x336952,moved:_0x15ecf2}=this['_footnoteDefsContainerTracker']['getChanges'](_0x318fcd);if(_0x15ecf2['length']&&(this['_footnotesDefinitions']=_0x15ecf2[0x0]),_0x4afd69['length']){if(_0x4afd69['length']>0x1||this['_footnotesDefinitions']&&_0x4afd69['some'](_0x411d76=>_0x411d76!==this['_footnotesDefinitions'])){const _0x12dab3=_0x273069['createElement']('footnotesDefinitions',{}),_0x1f5a72=[];this['_footnotesDefinitions']&&_0x1f5a72['push'](this['_footnotesDefinitions']),_0x1f5a72['push'](..._0x4afd69),_0x273069['insert'](_0x12dab3,_0x1f5a72[0x0],'before');for(const _0x24ddaf of _0x1f5a72)_0x273069['move'](_0x273069['createRangeIn'](_0x24ddaf),_0x273069['createPositionAt'](_0x12dab3,'end')),_0x273069['remove'](_0x24ddaf);this['_footnotesDefinitions']=_0x12dab3,this['_updateFootnotesCounters'](_0x273069),_0x21859d=!0x0;}else this['_footnotesDefinitions']=_0x4afd69[0x0];}if(_0x336952['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x75b367 of this['_footnotes'])_0x273069['remove'](_0x75b367['reference']),_0x21859d=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x21859d;}['_handleFootnoteDefinitionsChanges'](_0x4b75c5,_0x4218e3){let _0x1c34ed=!0x1;const _0xa58559=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0xc04ddb,moved:_0x306632}=this['_footnoteDefsTracker']['getChanges'](_0x4218e3);for(const _0x47dc0b of[..._0x306632,..._0xc04ddb]){const _0x41e836=_0x47dc0b['getAttribute']('footnoteId'),_0x3eb7ee=this['getFootnote'](_0x41e836);_0x3eb7ee&&(_0x3eb7ee['definition']=_0x47dc0b),_(_0x4b75c5,_0xa58559,_0x47dc0b)&&(_0x1c34ed=!0x0);}return _0x1c34ed;}['_handleFootnoteReferencesChanges'](_0xf6ea97,_0x4346de){let _0x25cae0=!0x1;const {removed:_0x46177f,inserted:_0xd65261,moved:_0x5c5ffe}=this['_footnoteRefsTracker']['getChanges'](_0x4346de);for(const _0x434911 of _0x46177f)this['_handleRemoveFootnoteReferenceById'](_0xf6ea97,_0x434911)&&(_0x25cae0=!0x0);for(const _0x283bba of _0xd65261)this['_handleInsertedFootnoteReference'](_0xf6ea97,_0x283bba)&&(_0x25cae0=!0x0);for(const _0x4255f7 of _0x5c5ffe)this['_handleMovedFootnoteReference'](_0xf6ea97,_0x4255f7)&&(_0x25cae0=!0x0);return _0x25cae0;}['_handleFootnotesDefinitionsObjectSync'](_0x340e25){if(!this['_footnotesDefinitions'])return!0x1;let _0x3b1274=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x3bd472=[];for(const _0x2887e5 of this['_footnotesDefinitions']['getChildren']()){const _0x204bb2=_0x2887e5['getAttribute']('footnoteId');this['getFootnote'](_0x204bb2)||(_0x3bd472['unshift'](_0x2887e5),_0x3b1274=!0x0);}for(const _0x4246c7 of _0x3bd472)_0x340e25['remove'](_0x4246c7);}const _0x2b5c95=new Set(),_0x355535=[];for(const _0x4b405b of this['_footnotesDefinitions']['getChildren']()){const _0x287ff8=_0x4b405b['getAttribute']('footnoteId');_0x2b5c95['has'](_0x287ff8)?(_0x355535['unshift'](_0x4b405b),_0x3b1274=!0x0):_0x2b5c95['add'](_0x287ff8);}for(const _0x45c650 of _0x355535)_0x340e25['remove'](_0x45c650);return this['_footnotesDefinitions']['childCount']||(_0x340e25['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x3b1274=!0x0),_0x3b1274;}['_handleInsertedFootnoteReference'](_0x2c76b2,_0x150b35){if(this['_footnotes']['find'](_0x3d8eab=>_0x3d8eab['reference']===_0x150b35))return!0x1;let _0x5e1791=!0x1;const _0x46dddc=_0x150b35['getAttribute']('footnoteId'),_0x4b4bb9=this['_footnotes']['findIndex'](_0x368fe9=>_0x368fe9['id']===_0x46dddc);-0x1!==_0x4b4bb9&&(_0x2c76b2['remove'](this['_footnotes'][_0x4b4bb9]['reference']),this['_footnotes']['splice'](_0x4b4bb9,0x1),_0x5e1791=!0x0);let _0x56f0a0=this['_footnotesDefinitions']?function(_0x589021,_0x2541e9){for(const _0x4d02d7 of _0x589021['getChildren']())if(_0x4d02d7['getAttribute']('footnoteId')===_0x2541e9)return _0x4d02d7;return null;}(this['_footnotesDefinitions'],_0x46dddc):null;_0x56f0a0||(_0x56f0a0=_0x2c76b2['createElement']('footnoteDefinition',{'footnoteId':_0x46dddc}),this['_footnotesDefinitions']&&(_0x2c76b2['insert'](_0x56f0a0,this['_footnotesDefinitions'],'end'),_0x5e1791=!0x0));const _0x3921c3={'id':_0x46dddc,'reference':_0x150b35,'definition':_0x56f0a0},_0x114cde=I(this['editor']['model'],this['_footnotes'],_0x150b35);this['_footnotes']['splice'](_0x114cde,0x0,_0x3921c3);let _0x4753f3=_0x114cde;return-0x1!==_0x4b4bb9&&(_0x4753f3=Math['min'](_0x114cde,_0x4b4bb9)),this['_updateFootnotesCounters'](_0x2c76b2,_0x4753f3)&&(_0x5e1791=!0x0),_0x5e1791;}['_handleRemoveFootnoteReferenceById'](_0x589eae,_0x16a0b4){const _0x4424b4=this['_footnotes']['findIndex'](_0x1d4260=>_0x1d4260['id']===_0x16a0b4);if(-0x1===_0x4424b4)return!0x1;let _0x5a7596=!0x1;const _0x5cf07f=this['_footnotes'][_0x4424b4];return'$graveyard'!==_0x5cf07f['definition']['root']['rootName']&&(_0x589eae['remove'](_0x5cf07f['definition']),_0x5a7596=!0x0),this['_footnotes']['splice'](_0x4424b4,0x1),this['_updateFootnotesCounters'](_0x589eae,_0x4424b4)&&(_0x5a7596=!0x0),_0x5a7596;}['_handleMovedFootnoteReference'](_0x4e5cae,_0x4b5aeb){const _0x179fe8=_0x4b5aeb['getAttribute']('footnoteId'),_0x4a17ed=this['_footnotes']['findIndex'](_0x367fd2=>_0x367fd2['id']===_0x179fe8),_0x24c1f3=this['_footnotes'][_0x4a17ed];let _0x1e5c7d=!0x1;_0x24c1f3['reference']=_0x4b5aeb,this['_footnotes']['splice'](_0x4a17ed,0x1);const _0x41baae=I(this['editor']['model'],this['_footnotes'],_0x4b5aeb);return this['_footnotes']['splice'](_0x41baae,0x0,_0x24c1f3),this['_updateFootnotesCounters'](_0x4e5cae,Math['min'](_0x4a17ed,_0x41baae))&&(_0x1e5c7d=!0x0),_0x1e5c7d;}['_updateFootnoteRefCounter'](_0x2dafa7,_0x25976d){if(!this['_footnotesDefinitions'])return!0x1;const _0x19aa1f=this['_footnotes'][_0x25976d];let _0x193429;return _0x193429=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x19aa1f,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x25976d+0x1}):String(_0x25976d+0x1),_0x19aa1f['reference']['getAttribute']('footnoteCounter')!=_0x193429&&(_0x2dafa7['setAttribute']('footnoteCounter',_0x193429,_0x19aa1f['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x3fbb54){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x3ac97a,_0x4b4e1b){if(_0x3ac97a['length']!==_0x4b4e1b['length'])return!0x1;for(let _0x2c1ffb=0x0;_0x2c1ffb<_0x3ac97a['length'];_0x2c1ffb++)if(_0x3ac97a[_0x2c1ffb]!==_0x4b4e1b[_0x2c1ffb])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x151244=>_0x151244['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x21e3b1=>_0x21e3b1['getAttribute']('footnoteId'))))return!0x1;let _0x3bf5c4=!0x1;for(let _0x98b774=0x0;_0x98b774<this['_footnotes']['length'];_0x98b774++){const _0x386eb8=this['_footnotes'][_0x98b774],_0x327ab3=_0x3fbb54['createPositionBefore'](_0x386eb8['definition']),_0x4e9a72=_0x3fbb54['createPositionAt'](this['_footnotesDefinitions'],_0x98b774);_0x327ab3['isEqual'](_0x4e9a72)||(_0x3fbb54['move'](_0x3fbb54['createRangeOn'](_0x386eb8['definition']),_0x4e9a72),_0x3bf5c4=!0x0);}return _0x3bf5c4;}['_ensureFootnotesReferencesHaveProperOrder'](_0x499889){if(!this['_footnotes']['length'])return!0x1;const {model:_0x2d3291}=this['editor'];let _0x158787=!0x1;for(let _0x4732dd=0x0;_0x4732dd<this['_footnotes']['length']-0x1;_0x4732dd++){const _0x4d2ab2=this['_footnotes'][_0x4732dd],_0x396ec5=this['_footnotes'][_0x4732dd+0x1],_0x5e81b5=_0x2d3291['createPositionBefore'](_0x4d2ab2['reference']),_0x256fea=_0x2d3291['createPositionBefore'](_0x396ec5['reference']);'after'===_0x5e81b5['compareWith'](_0x256fea)&&(this['_handleMovedFootnoteReference'](_0x499889,_0x4d2ab2['reference']),_0x4732dd=-0x1,_0x158787=!0x0);}return _0x158787;}}function _(_0x409219,_0x41a556,_0x1d80da){if(_0x1d80da['childCount'])return!0x1;const _0x3b2685=_0x41a556?'paragraph':'footnoteInlineContent';return _0x409219['insert'](_0x409219['createElement'](_0x3b2685),_0x1d80da),!0x0;}function I(_0x3f572c,_0x4019bc,_0x1243a8){if(0x0===_0x4019bc['length'])return 0x0;const _0x4c9d98=_0x3f572c['createPositionBefore'](_0x1243a8);for(let _0x74aff6=0x0;_0x74aff6<_0x4019bc['length'];_0x74aff6++){const _0x4cc16a=_0x4019bc[_0x74aff6],_0x2d2651=_0x3f572c['createPositionBefore'](_0x4cc16a['reference']);if('before'===_0x4c9d98['compareWith'](_0x2d2651))return _0x74aff6;}const _0x599d0c=_0x1243a8['root'];let _0xcb2166=-0x1;for(let _0x126936=_0x4019bc['length']-0x1;_0x126936>=0x0;_0x126936--)if(_0x4019bc[_0x126936]['reference']['root']===_0x599d0c){_0xcb2166=_0x126936;break;}if(-0x1!==_0xcb2166)return _0xcb2166+0x1;const _0x2a0a65=_0x3f572c['document']['getRootNames'](),_0x502efa=_0x2a0a65['indexOf'](_0x599d0c['rootName']),_0x1464cb=_0x2a0a65[_0x502efa+0x1];if(_0x1464cb){for(let _0xe7d606=0x0;_0xe7d606<_0x4019bc['length'];_0xe7d606++)if(_0x4019bc[_0xe7d606]['reference']['root']['rootName']===_0x1464cb)return _0xe7d606;}return _0x4019bc['length'];}class w extends _0x278339{['refresh'](){const _0x194dd6=this['editor']['model']['document']['selection'],_0x1574f3=this['_getPositionToInsertFootnote'](_0x194dd6);this['isEnabled']=!!_0x1574f3;}['execute'](_0x256460){const {editor:_0x2b9226}=this,{model:_0x4e827f}=_0x2b9226,{selection:_0x5bbd15}=_0x4e827f['document'],_0x42c6bc=this['_getPositionToInsertFootnote'](_0x5bbd15);if(!_0x42c6bc)return;const _0x1bf39c=_0x2b9226['plugins']['get']('FootnotesEditing'),_0x39a68a=_0x256460?.['footnoteId']??_0x17bb3f();!function(_0x532f4d){return'string'==typeof _0x532f4d&&_0x532f4d['length']>0x0&&!/\s/['test'](_0x532f4d)&&!/^\d/['test'](_0x532f4d);}(_0x39a68a)?_0x5d35ce('insert-footnote-command-executed-with-invalid-id'):(_0x4e827f['change'](_0x15be06=>{const _0x240b86=_0x15be06['createElement']('footnoteRef',{'footnoteId':_0x39a68a});_0x4e827f['insertObject'](_0x240b86,_0x42c6bc,null);}),_0x1bf39c['_moveSelectionToFootnoteDefinition'](_0x39a68a));}['_getPositionToInsertFootnote'](_0x24376c){const {model:_0xa523a2}=this['editor'],{schema:_0x5ceb32}=_0xa523a2,_0x2166c5=_0x24376c['getFirstRange']();for(const _0x2118d9 of _0x2166c5['getItems']())if(_0x5ceb32['isBlock'](_0x2118d9)||_0x5ceb32['isObject'](_0x2118d9))return null;const _0xcda1d2=_0x2166c5['end'];return _0x5ceb32['checkChild'](_0xcda1d2,'footnoteRef')?_0xcda1d2:null;}}class r extends _0x1f3d21{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1a1dc1}=this;_0x1a1dc1['config']['define']('footnotes.multiBlock',!0x0),_0x1a1dc1['commands']['add']('insertFootnote',new w(_0x1a1dc1)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x15b3eb){const _0x56a332=_0x51eb34([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x3b3a7d=0x47a28506,_0x4008a0=0x47a5f2de^_0x3b3a7d,_0x45119c=window[_0x51eb34([0x44,0x61,0x74,0x65])][_0x51eb34([0x6e,0x6f,0x77])](),_0x55effc=_0x15b3eb[_0x51eb34([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4f1fc3=new window[(_0x51eb34([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f1b38=>{_0x55effc[_0x51eb34([0x6f,0x6e,0x63,0x65])](_0x51eb34([0x72,0x65,0x61,0x64,0x79]),_0x2f1b38);}),_0x8d833d={[_0x51eb34([0x6b,0x74,0x79])]:_0x51eb34([0x45,0x43]),[_0x51eb34([0x75,0x73,0x65])]:_0x51eb34([0x73,0x69,0x67]),[_0x51eb34([0x63,0x72,0x76])]:_0x51eb34([0x50,0x2d,0x32,0x35,0x36]),[_0x51eb34([0x78])]:_0x51eb34([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x51eb34([0x79])]:_0x51eb34([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x51eb34([0x61,0x6c,0x67])]:_0x51eb34([0x45,0x53,0x32,0x35,0x36])},_0x3b751b=_0x55effc[_0x51eb34([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x51eb34([0x67,0x65,0x74])](_0x51eb34([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x266379(){let _0x38f071,_0x39c2d2=null,_0x5b8cac=null;try{if(_0x3b751b==_0x51eb34([0x47,0x50,0x4c]))return _0x51eb34([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x38f071=_0x453e17(),!_0x38f071)return _0x51eb34([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x38f071[_0x51eb34([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5b8cac=_0x21a651(_0x38f071[_0x51eb34([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x38f071[_0x51eb34([0x6a,0x74,0x69])])),await _0x54fedf()?_0xd4b54()?_0x253538()?_0x51eb34([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2a6f0b()?(_0x38f071[_0x51eb34([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x51eb34([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x39c2d2=_0x26167a(_0x51eb34([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x38f071[_0x51eb34([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x51eb34([0x74,0x72,0x69,0x61,0x6c])&&(_0x39c2d2=_0x26167a(_0x51eb34([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xb43cf9()):_0x51eb34([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x51eb34([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x51eb34([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x51eb34([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x253538(){const _0x1a55e6=[_0x51eb34([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x51eb34([0x74,0x72,0x69,0x61,0x6c])][_0x51eb34([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38f071[_0x51eb34([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x45119c/0x3e8:0xe10*_0x4008a0;return _0x38f071[_0x51eb34([0x65,0x78,0x70])]<_0x1a55e6;}function _0xd4b54(){const _0x42ab8f=_0x38f071[_0x51eb34([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x42ab8f&&(!!_0x42ab8f[_0x51eb34([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51eb34([0x2a]))||!!_0x42ab8f[_0x51eb34([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51eb34([0x46,0x4f,0x4f])));}function _0x2a6f0b(){const _0x1b10b7=_0x38f071[_0x51eb34([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1b10b7||0x0==_0x1b10b7[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x52d3df}=new URL(window[_0x51eb34([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1b10b7[_0x51eb34([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52d3df))return!0x0;const _0x5b91e1=_0x52d3df[_0x51eb34([0x73,0x70,0x6c,0x69,0x74])](_0x51eb34([0x2e]));return _0x1b10b7[_0x51eb34([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1491cc=>_0x1491cc[_0x51eb34([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51eb34([0x2a])))[_0x51eb34([0x6d,0x61,0x70])](_0xdcb4d=>_0xdcb4d[_0x51eb34([0x73,0x70,0x6c,0x69,0x74])](_0x51eb34([0x2e])))[_0x51eb34([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x801b36=>_0x801b36[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5b91e1[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x51eb34([0x6d,0x61,0x70])](_0x6c9ee2=>Array(_0x5b91e1[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x6c9ee2[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x51eb34([0x66,0x69,0x6c,0x6c])](_0x6c9ee2[0x0]===_0x51eb34([0x2a])?_0x51eb34([0x2a]):'')[_0x51eb34([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x6c9ee2))[_0x51eb34([0x73,0x6f,0x6d,0x65])](_0x19b6c4=>_0x5b91e1[_0x51eb34([0x65,0x76,0x65,0x72,0x79])]((_0x5a7b22,_0x1095b0)=>_0x19b6c4[_0x1095b0]===_0x5a7b22||_0x19b6c4[_0x1095b0]===_0x51eb34([0x2a])));}function _0xb43cf9(){return _0x39c2d2&&_0x5b8cac?new window[(_0x51eb34([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3b50ad,_0x1839cf)=>{_0x39c2d2[_0x51eb34([0x74,0x68,0x65,0x6e])](_0x3b50ad,_0x1839cf),_0x5b8cac[_0x51eb34([0x74,0x68,0x65,0x6e])](_0x33a1bd=>{_0x33a1bd!=_0x51eb34([0x56,0x61,0x6c,0x69,0x64])&&_0x3b50ad(_0x33a1bd);},_0x1839cf);}):_0x39c2d2||_0x5b8cac||_0x51eb34([0x56,0x61,0x6c,0x69,0x64]);}}function _0x21a651(_0x5a724c,_0x2d6ea8){return new window[(_0x51eb34([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x323e29=>{if(_0x4871ff())return _0x323e29(_0x51eb34([0x56,0x61,0x6c,0x69,0x64]));_0x242598(),_0x55effc[_0x51eb34([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x51eb34([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x584ed1=!0x1;const _0x30ca2e=_0x17bb3f();function _0x1b6dd2(_0xb2d4a8){return!!_0xb2d4a8&&(typeof _0xb2d4a8===_0x51eb34([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xb2d4a8===_0x51eb34([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xb2d4a8[_0x51eb34([0x74,0x68,0x65,0x6e])]===_0x51eb34([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xb2d4a8[_0x51eb34([0x63,0x61,0x74,0x63,0x68])]===_0x51eb34([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x44838a(_0x384e4a){_0x9791e8(_0x384e4a)[_0x51eb34([0x74,0x68,0x65,0x6e])](_0x52880b=>{if(!_0x52880b||_0x52880b[_0x51eb34([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x51eb34([0x6f,0x6b]))return _0x51eb34([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1ba8d5(_0x457d54(_0x30ca2e+_0x2d6ea8))!=_0x52880b[_0x51eb34([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x51eb34([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x51eb34([0x56,0x61,0x6c,0x69,0x64]);})[_0x51eb34([0x74,0x68,0x65,0x6e])](_0x45669a=>(_0x1823ce(),_0x45669a),()=>{const _0x5552f9=_0x3f0072();return null==_0x5552f9?(_0x1823ce(),_0x51eb34([0x56,0x61,0x6c,0x69,0x64])):_0x51eb34(_0x45119c-_0x5552f9>(0x63ae0106^_0x3b3a7d)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x51eb34([0x74,0x68,0x65,0x6e])](_0x323e29)[_0x51eb34([0x63,0x61,0x74,0x63,0x68])](()=>{_0x323e29(_0x51eb34([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3783e2=0x47946b86^_0x3b3a7d;function _0x1823ce(){const _0x48c661=_0x51eb34([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ba8d5(_0x457d54(_0x5a724c)),_0x348a4b=_0xeb571b(_0x1ba8d5(window[_0x51eb34([0x4d,0x61,0x74,0x68])][_0x51eb34([0x63,0x65,0x69,0x6c])](_0x45119c/_0x3783e2)));window[_0x51eb34([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x51eb34([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x48c661,_0x348a4b);}function _0x3f0072(){const _0x198b7f=_0x51eb34([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ba8d5(_0x457d54(_0x5a724c)),_0x43c674=window[_0x51eb34([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x51eb34([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x198b7f);return _0x43c674?window[_0x51eb34([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xeb571b(_0x43c674),0x10)*_0x3783e2:null;}function _0x9791e8(_0x41a997){return new window[(_0x51eb34([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x586dd8,_0x587770)=>{_0x41a997[_0x51eb34([0x74,0x68,0x65,0x6e])](_0x586dd8,_0x587770),window[_0x51eb34([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x587770,0x47a351c6^_0x3b3a7d);});}}_0x55effc[_0x51eb34([0x6f,0x6e])](_0x51eb34([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x21c70a,_0x5147e4)=>{if(_0x5147e4[0x0]!=_0x5a724c)return _0x323e29(_0x51eb34([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5147e4[0x1]={..._0x5147e4[0x1],[_0x51eb34([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x30ca2e};},{[_0x51eb34([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x51eb34([0x68,0x69,0x67,0x68])}),_0x55effc[_0x51eb34([0x6f,0x6e])](_0x51eb34([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x138f35=>{_0x1b6dd2(_0x138f35[_0x51eb34([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x584ed1=!0x0,_0x44838a(_0x138f35[_0x51eb34([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x51eb34([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x51eb34([0x6c,0x6f,0x77])}),_0x4f1fc3[_0x51eb34([0x74,0x68,0x65,0x6e])](()=>{_0x584ed1||_0x323e29(_0x51eb34([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4871ff(){return _0x55effc[_0x51eb34([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x51eb34([0x76,0x69,0x65,0x77])][_0x51eb34([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x51eb34([0x61,0x75,0x74,0x6f]);}function _0x242598(){_0x55effc[_0x51eb34([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x51eb34([0x76,0x69,0x65,0x77])][_0x51eb34([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x51eb34([0x61,0x75,0x74,0x6f]);}}function _0x26167a(_0xfbba4f){const _0x4e8e3f=[new window[(_0x51eb34([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x349f8c=>setTimeout(_0x349f8c,0x47abbbca^_0x3b3a7d)),_0x4f1fc3[_0x51eb34([0x74,0x68,0x65,0x6e])](()=>new window[(_0x51eb34([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x316190=>{let _0x2e2e8a=0x0;_0x55effc[_0x51eb34([0x6d,0x6f,0x64,0x65,0x6c])][_0x51eb34([0x6f,0x6e])](_0x51eb34([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3f22e6,_0x216a87)=>{_0x216a87[0x0][_0x51eb34([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2e2e8a++,_0x2e2e8a==(0x47a284fe^_0x3b3a7d)&&(_0x316190(),_0x3f22e6[_0x51eb34([0x6f,0x66,0x66])]());});}))];return window[_0x51eb34([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x51eb34([0x72,0x61,0x63,0x65])](_0x4e8e3f)[_0x51eb34([0x74,0x68,0x65,0x6e])](()=>_0xfbba4f);}async function _0x273f41(){await _0x4f1fc3,_0x55effc[_0x51eb34([0x6d,0x6f,0x64,0x65,0x6c])][_0x51eb34([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x9706e2,_0x55effc[_0x51eb34([0x6d,0x6f,0x64,0x65,0x6c])][_0x51eb34([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x9706e2,_0x55effc[_0x51eb34([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x51eb34([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x44eac1(_0x1184e4){const _0x24157a=_0x145e62();_0x55effc[_0x24157a]=_0x51eb34([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1184e4,_0x1184e4!=_0x51eb34([0x56,0x61,0x6c,0x69,0x64])&&_0x273f41();}function _0x145e62(){const _0x5dd9a3=window[_0x51eb34([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x51eb34([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x51eb34([0x6e,0x6f,0x77])]())[_0x51eb34([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x51eb34([0x2e]),'');let _0x28d199=_0x51eb34([0x75]);for(let _0x2207ad=0x0;_0x2207ad<_0x5dd9a3[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2207ad+=0x2){let _0x1a7958=window[_0x51eb34([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5dd9a3[_0x51eb34([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2207ad,_0x2207ad+0x2));_0x1a7958>=_0x56a332[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1a7958-=_0x56a332[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x28d199+=_0x56a332[_0x1a7958];}return _0x28d199;}function _0x453e17(){const _0x2730e7=_0x3b751b[_0x51eb34([0x73,0x70,0x6c,0x69,0x74])](_0x51eb34([0x2e]));if(0x3!=_0x2730e7[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5b3dcf(_0x2730e7[0x1]);function _0x5b3dcf(_0x16cd8d){const _0xdc1c2f=_0x1497ea(_0x16cd8d);return _0xdc1c2f&&_0x3fb5aa()?_0xdc1c2f:null;function _0x3fb5aa(){const _0x576fa4=_0xdc1c2f[_0x51eb34([0x6a,0x74,0x69])],_0x56df05=window[_0x51eb34([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x576fa4[_0x51eb34([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x576fa4[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x9c54a2={..._0xdc1c2f,[_0x51eb34([0x6a,0x74,0x69])]:_0x576fa4[_0x51eb34([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x576fa4[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x9c54a2[_0x51eb34([0x76,0x63])],_0x457d54(_0x9c54a2)==_0x56df05;}}}async function _0x54fedf(){let _0x2cee5d=!0x0;try{const _0x508ed9=_0x3b751b[_0x51eb34([0x73,0x70,0x6c,0x69,0x74])](_0x51eb34([0x2e])),[_0x215322,_0x398908,_0x4c4584]=_0x508ed9;return _0x13d4c4(_0x215322),await _0x14589e(_0x215322,_0x398908,_0x4c4584),_0x2cee5d;}catch{return!0x1;}function _0x13d4c4(_0x5b4ff4){const _0x45b67d=_0x1497ea(_0x5b4ff4);_0x45b67d&&_0x45b67d[_0x51eb34([0x61,0x6c,0x67])]==_0x51eb34([0x45,0x53,0x32,0x35,0x36])||(_0x2cee5d=!0x1);}async function _0x14589e(_0x2bfe42,_0x54bc9b,_0x39483b){const _0x6610cc=window[_0x51eb34([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x51eb34([0x66,0x72,0x6f,0x6d])](_0x1a3783(_0x39483b),_0x368234=>_0x368234[_0x51eb34([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x313f8f=new window[(_0x51eb34([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x51eb34([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2bfe42+_0x51eb34([0x2e])+_0x54bc9b),_0x51d97e=window[_0x51eb34([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x51eb34([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x51d97e)return;const _0x4535d3=await _0x51d97e[_0x51eb34([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x51eb34([0x6a,0x77,0x6b]),_0x8d833d,{[_0x51eb34([0x6e,0x61,0x6d,0x65])]:_0x51eb34([0x45,0x43,0x44,0x53,0x41]),[_0x51eb34([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x51eb34([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x51eb34([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x51d97e[_0x51eb34([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x51eb34([0x6e,0x61,0x6d,0x65])]:_0x51eb34([0x45,0x43,0x44,0x53,0x41]),[_0x51eb34([0x68,0x61,0x73,0x68])]:{[_0x51eb34([0x6e,0x61,0x6d,0x65])]:_0x51eb34([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4535d3,_0x6610cc,_0x313f8f)||(_0x2cee5d=!0x1);}}function _0x1497ea(_0x4ec858){return _0x4ec858[_0x51eb34([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x51eb34([0x65,0x79]))?JSON[_0x51eb34([0x70,0x61,0x72,0x73,0x65])](_0x1a3783(_0x4ec858)):null;}function _0x1a3783(_0x45de61){return window[_0x51eb34([0x61,0x74,0x6f,0x62])](_0x45de61[_0x51eb34([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x51eb34([0x2b]))[_0x51eb34([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x51eb34([0x2f])));}function _0x457d54(_0x44b5b2){let _0x440e18=0x1505;function _0x4106f6(_0x54b528){for(let _0x35968a=0x0;_0x35968a<_0x54b528[_0x51eb34([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x35968a++){const _0x419688=_0x54b528[_0x51eb34([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x35968a);_0x440e18=(_0x440e18<<0x5)+_0x440e18+_0x419688,_0x440e18&=_0x440e18;}}function _0x981679(_0x123c66){Array[_0x51eb34([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x123c66)?_0x123c66[_0x51eb34([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x981679):_0x123c66&&typeof _0x123c66==_0x51eb34([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x51eb34([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x123c66)[_0x51eb34([0x73,0x6f,0x72,0x74])]()[_0x51eb34([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2ced81,_0x520bfa])=>{_0x4106f6(_0x2ced81),_0x981679(_0x520bfa);}):_0x4106f6(window[_0x51eb34([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x123c66));}return _0x981679(_0x44b5b2),_0x440e18>>>0x0;}function _0x1ba8d5(_0x42dbf7){return _0x42dbf7[_0x51eb34([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x51eb34([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x51eb34([0x30]));}function _0xeb571b(_0xf2a5ab){return _0xf2a5ab[_0x51eb34([0x73,0x70,0x6c,0x69,0x74])]('')[_0x51eb34([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x51eb34([0x6a,0x6f,0x69,0x6e])]('');}function _0x9706e2(){}function _0x51eb34(_0x406b61){return _0x406b61['map'](_0x4061e4=>String['fromCharCode'](_0x4061e4))['join']('');}_0x44eac1(await _0x266379());}(this);}['_moveSelectionToFootnoteDefinition'](_0x2b949b){const {plugins:_0x507b34,editing:_0x51d5a9,model:_0x38e12e}=this['editor'],_0x32a6f9=_0x507b34['get'](c)['getFootnote'](_0x2b949b);return!!_0x32a6f9&&(_0x38e12e['change'](_0x362657=>{_0x362657['setSelection'](_0x362657['createPositionAt'](_0x32a6f9['definition'],'end'));}),_0x51d5a9['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x3df88b){const {plugins:_0x978888,editing:_0x49c0c6,model:_0x3eb157}=this['editor'],_0xb36b76=_0x978888['get'](c)['getFootnote'](_0x3df88b);return!!_0xb36b76&&(_0x3eb157['change'](_0x44a438=>{_0x44a438['setSelection'](_0xb36b76['reference'],'on');}),_0x49c0c6['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x429266}=this['editor']['model'],_0x49e129=this['editor']['config']['get']('footnotes.multiBlock');_0x429266['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x429266['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x429266['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x49e129?_0x429266['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x429266['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x429266['addChildCheck'](_0x164a1a=>{for(const _0x148d30 of _0x164a1a)if('footnoteDefinition'===_0x148d30['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x1d162a}=this,{conversion:_0x20bb67,editing:_0x245c5e}=_0x1d162a,{t:t}=_0x1d162a['locale'];_0x20bb67['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x2a3595,{writer:_0x20e91d,consumable:_0x10ea57})=>{const _0x376cc9=_0x2a3595['getChild'](0x0);if(!_0x376cc9||!_0x376cc9['is']('element','a'))return null;const _0x4b180=_0x376cc9['getAttribute']('href')||'';if(!_0x4b180['startsWith']('#'))return null;const _0x32f9bc=_0x4b180['replace'](/^#/,'');if(!_0x32f9bc)return null;_0x10ea57['consume'](_0x376cc9,{'name':!0x0,'attributes':['href']});for(const {item:_0x599ec7}of _0x245c5e['view']['createRangeIn'](_0x376cc9))_0x599ec7['is']('$textProxy')?_0x10ea57['consume'](_0x599ec7['textNode'],{'name':!0x0}):_0x599ec7['is']('element')&&_0x10ea57['consume'](_0x599ec7,{'name':!0x0});return _0x20e91d['createElement']('footnoteRef',{'footnoteId':_0x32f9bc});}}),_0x20bb67['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x545300,{writer:_0x53bba0})=>D(_0x545300,_0x53bba0)}),_0x20bb67['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0xd2890c,{writer:_0x305474})=>{const _0x166233=_0xd2890c['getAttribute']('footnoteCounter');return _0x2c15fa(D(_0xd2890c,_0x305474),_0x305474,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x166233)});}});}['_defineDefinitionsConverters'](){const {editor:_0x5195b6}=this,{t:t}=_0x5195b6['locale'],{conversion:_0x3f082b}=_0x5195b6;_0x3f082b['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x3f082b['for']('upcast')['add'](_0x495f29=>{_0x495f29['on']('element:ol',(_0x53620d,_0x592076,_0x48ab2e)=>{const _0x4c1c04=_0x592076['viewItem'];if(!_0x4c1c04['hasClass']('footnotes-list')||!_0x592076['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x48ab2e['consumable']['consume'](_0x4c1c04,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x5c6c5a,modelCursor:_0x1db45d}=_0x48ab2e['convertChildren'](_0x592076['viewItem'],_0x592076['modelCursor']);_0x592076['modelRange']=_0x5c6c5a,_0x592076['modelCursor']=_0x1db45d;}),_0x495f29['on']('element:hr',(_0x2079ea,_0x15bcac,_0x1d200e)=>{const _0x5c6b6b=_0x15bcac['viewItem'];_0x5c6b6b['hasClass']('footnotes-divider')&&_0x15bcac['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x1d200e['consumable']['consume'](_0x5c6b6b,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x3f082b['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x1be48,{writer:_0x27f190})=>g(_0x27f190)}),_0x3f082b['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x330319,{writer:_0x280dd9})=>{const _0x375e5f=g(_0x280dd9,{'data-footnotes-list-label':t('Footnotes')}),_0x208676=_0x2c15fa(_0x375e5f,_0x280dd9,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x280dd9['setCustomProperty']('footnotesDefinitions',!0x0,_0x208676),_0x208676;}});}['_defineDefinitionConverters'](){const {editor:_0x37ce85}=this,{conversion:_0x2ea3d9,locale:_0x5400b5}=_0x37ce85,_0xae38a=_0x37ce85['config']['get']('footnotes.multiBlock');_0x2ea3d9['for']('upcast')['add'](_0x4d769d=>{_0x4d769d['on']('element:li',(_0x319f2d,_0xaf3c21,_0x213b56)=>{const _0x19589a=_0xaf3c21['viewItem'];if(!_0x19589a['hasClass']('footnote-definition')||!_0x19589a['getAttribute']('id'))return;const _0x28913d=_0x19589a['parent'];if(!_0x28913d['is']('element','ol')||!_0x28913d['hasClass']('footnotes-list'))return;if(!_0x213b56['consumable']['test'](_0x19589a,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x298ceb=_0x213b56['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x19589a['getAttribute']('id')});if(!_0x213b56['safeInsert'](_0x298ceb,_0xaf3c21['modelCursor']))return;_0x213b56['consumable']['consume'](_0x19589a,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x328203=Array['from'](_0x19589a['getChildren']())['find'](_0x15258c=>_0x15258c['is']('element')&&_0x15258c['hasClass']('footnote-content'));for(const _0x5d7633 of _0x19589a['getChildren']())_0x5d7633['is']('element')&&(_0x213b56['consumable']['consume'](_0x5d7633,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x213b56['consumable']['consume'](_0x5d7633,{'name':!0x0,'classes':'footnote-content'}));if(_0x328203){if(_0xae38a)_0x213b56['convertChildren'](_0x328203,_0x298ceb);else{const _0x406fd0=_0x213b56['writer']['createElement']('footnoteInlineContent');_0x213b56['writer']['insert'](_0x406fd0,_0x298ceb),_0x213b56['convertChildren'](_0x328203,_0x406fd0);}}_0x213b56['updateConversionResult'](_0x298ceb,_0xaf3c21);});}),_0x2ea3d9['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x36a40a,{writer:_0x4e92ef})=>v(_0x36a40a,_0x4e92ef,_0x5400b5,{'dataPipeline':!0x0})}),_0x2ea3d9['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x302d0f,{writer:_0x77ea46})=>v(_0x302d0f,_0x77ea46,_0x5400b5)});}['_defineBogusParagraphConverters'](){const {editor:_0x58f39c}=this,{conversion:_0x1fd39e}=_0x58f39c;_0x58f39c['config']['get']('footnotes.multiBlock')?(_0x1fd39e['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x1fd39e['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x58f39c['model']['document'],'change:data',()=>{!function(_0x593879,_0x177df0){const _0x54eb2b=_0x593879['document']['differ'],_0xcb1bbb=new Set();for(const _0xb4f446 of _0x54eb2b['getChanges']()){const _0x3c9945='attribute'==_0xb4f446['type']?_0xb4f446['range']['start']['parent']:_0xb4f446['position']['parent'];_0x3c9945['is']('element','footnoteDefinition')&&_0xcb1bbb['add'](_0x3c9945);}for(const _0x3d2d52 of _0xcb1bbb['values']()){const _0x4b116f=Array['from'](_0x3d2d52['getChildren']())['filter'](_0x47037b=>p(_0x47037b,_0x177df0['mapper']));for(const _0x3b01e0 of _0x4b116f)_0x177df0['reconvertItem'](_0x3b01e0);}}(_0x58f39c['model'],_0x58f39c['editing']);})):(_0x1fd39e['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x1fd39e['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x5eb7fa,{writer:_0xd2c6fa})=>{const _0x3446d5=_0xd2c6fa['createContainerElement']('span');return _0xd2c6fa['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x3446d5),_0x3446d5;}}));}['_defineKeyboardHandlers'](){const {editor:_0x5ca190}=this,{editing:_0x2f3daa,t:t}=_0x5ca190,_0x516de7=_0x5ca190['model']['document']['selection'];_0x5ca190['keystrokes']['set']('CTRL+Shift+D','insertFootnote'),_0x5ca190['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Shift+D'}]}),this['listenTo'](_0x2f3daa['view']['document'],'enter',(_0xc9f51,_0x2f47a2)=>{const _0x400017=function(_0x56c469){const _0x1ac725=_0x56c469['getSelectedElement']();if(_0x1ac725?.['is']('element','footnoteRef'))return _0x1ac725;return null;}(_0x516de7);if(_0x400017){const _0x580612=_0x400017['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x580612),_0x2f47a2['preventDefault'](),_0xc9f51['stop']();}},{'context':_0x54acc0});}['_defineClickHandlers'](){const {editor:_0x8fccf7}=this,{editing:_0x56f919}=_0x8fccf7;_0x8fccf7['editing']['view']['addObserver'](_0x5743a6),_0x8fccf7['editing']['view']['addObserver'](_0x4d8c97);let _0x326546=!0x1;this['listenTo'](_0x56f919['view']['document'],'pointerdown',(_0x213d67,_0x3472b2)=>{const {target:_0x38cf82}=_0x3472b2,_0xbd6393=_0x56f919['view']['document']['selection'];_0x326546=!!(_0x38cf82['is']('element','a')&&_0x38cf82['parent']?.['is']('element','sup')&&_0x38cf82['parent']['hasClass']('footnote'))&&_0xbd6393['getSelectedElement']()===_0x38cf82['parent'];},{'priority':'high'}),this['listenTo'](_0x56f919['view']['document'],'click',(_0x16f4da,_0x5efc71)=>{const {target:_0x4fbdbd}=_0x5efc71;if(!_0x4fbdbd['is']('element','a'))return;if(_0x4fbdbd['parent']?.['is']('element','sup')&&_0x4fbdbd['parent']['hasClass']('footnote')&&!_0x326546)return void _0x5efc71['preventDefault']();let _0x22b4c3=_0x4fbdbd['getAttribute']('href');if(!_0x22b4c3?.['startsWith']('#'))return;_0x22b4c3=_0x22b4c3['slice'](0x1);let _0x3228ba=!0x1;(_0x22b4c3['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x22b4c3['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x22b4c3))&&(_0x3228ba=!0x0),_0x3228ba&&(_0x5efc71['preventDefault'](),_0x16f4da['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x362259}={}){return(_0x167c18,{writer:_0x38a5ed})=>{if(!h(_0x167c18))return null;if(!_0x362259)return _0x38a5ed['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x55bf5c=_0x38a5ed['createContainerElement']('p');return _0x38a5ed['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x55bf5c),_0x55bf5c;};}function h(_0x441eb1){const {parent:_0x1e40cc}=_0x441eb1;if(!_0x1e40cc?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x1e40cc['childCount'])return!0x1;for(const _0x1cebc6 of _0x441eb1['getAttributeKeys']())if(!_0x1cebc6['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x1cebc6)return!0x1;return!0x0;}function p(_0x1bbcc0,_0x2c9422){if(!_0x1bbcc0['is']('element','paragraph'))return!0x1;const _0x57e521=_0x2c9422['toViewElement'](_0x1bbcc0);return!!_0x57e521&&h(_0x1bbcc0)!==_0x57e521['is']('element','span');}function J(_0x2994c2){return _0x54acc0(_0x2994c2)&&_0x2994c2['is']('containerElement')&&!!_0x2994c2['getCustomProperty']('footnotesDefinitions');}function g(_0x577b9e,_0x260ded={}){const _0x5a660c=_0x577b9e['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x451ed4=_0x577b9e['createContainerElement']('ol',{'class':'footnotes-list'},_0x577b9e['createSlot']());return _0x577b9e['createContainerElement']('div',{'class':'footnotes',..._0x260ded},[_0x5a660c,_0x451ed4]);}function D(_0xcc4a83,_0x58c0a0){const _0x27716b=_0xcc4a83['getAttribute']('footnoteId'),_0x145b2e=_0xcc4a83['getAttribute']('footnoteCounter'),_0xec2938=_0x58c0a0['createUIElement']('a',{'href':'#'+_0x27716b},function(_0x2db0cf){const _0x1e996a=this['toDomElement'](_0x2db0cf);return _0x1e996a['textContent']=_0x145b2e,_0x1e996a;}),_0xf6f1e6=_0x58c0a0['createContainerElement']('sup',{'id':'ref-'+_0x27716b,'class':'footnote'},[_0xec2938]);return _0xf6f1e6['getFillerOffset']=()=>null,_0xf6f1e6;}function v(_0x270928,_0x179b4a,_0x4bd8f4,{dataPipeline:_0x103853}={}){const {t:t}=_0x4bd8f4,_0x5ea890=_0x270928['getAttribute']('footnoteId'),_0x2f4465=_0x179b4a['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x5ea890},function(_0x293a5f){const _0x327781=this['toDomElement'](_0x293a5f);return _0x327781['innerText']='^',_0x327781;}),_0x1892ca=_0x103853?_0x179b4a['createContainerElement']('div',{'class':'footnote-content'}):_0x3a0a31(_0x179b4a['createEditableElement']('div',{'class':'footnote-content'}),_0x179b4a,{'label':t('Footnote\x20content.')});return _0x179b4a['insert'](_0x179b4a['createPositionAt'](_0x1892ca,0x0),_0x179b4a['createSlot']()),_0x179b4a['createContainerElement']('li',{'class':'footnote-definition','id':_0x5ea890},[_0x2f4465,_0x1892ca]);}class e extends _0x1f3d21{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x268d6c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x5ad368}=this,{plugins:_0x76b9c7,model:_0x2d59b4}=_0x5ad368,_0x5cb5eb=_0x76b9c7['get'](_0x268d6c),_0xb4cca=_0x76b9c7['get'](c);this['listenTo'](_0x5cb5eb,'outputTransformation',(_0x31b3a5,_0x3de4da)=>{const _0xf31427=function(_0x5532b8,_0x3b1d60){const _0x4a4934=new Set();for(const {item:_0x5bc40f}of _0x5532b8['createRangeIn'](_0x3b1d60))_0x5bc40f['is']('element','footnoteRef')&&_0x4a4934['add'](_0x5bc40f['getAttribute']('footnoteId'));return Array['from'](_0x4a4934);}(_0x2d59b4,_0x3de4da['content']);if(!_0xf31427['length'])return;const _0x52ae34=_0xb4cca['getFootnotes'](),_0x81e75a=_0xf31427['reduce']((_0x38326b,_0x5e883e)=>{const _0x4930cc=_0x52ae34['find'](_0x73dd35=>_0x73dd35['id']===_0x5e883e);if(_0x4930cc){const _0xab1153=_0x5ad368['data']['toView'](_0x4930cc['definition'],{'isClipboardPipeline':!0x0}),_0x95f289=_0x5ad368['data']['htmlProcessor']['toData'](_0xab1153);_0x38326b[_0x4930cc['id']]=_0x95f289;}return _0x38326b;},Object['create'](null));_0x3de4da['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x81e75a));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x309647}=this,{model:_0x5ae7b6,plugins:_0xcea926}=_0x309647,{view:_0x5966d3}=_0x309647['editing'],_0x2abaeb=_0xcea926['get'](_0x268d6c),_0x3b5fc3=_0xcea926['get'](c);let _0x48c142=null;this['listenTo'](_0x5966d3['document'],'clipboardInput',(_0x59fb5c,_0xe7dca)=>{const _0x440207=_0xe7dca['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x48c142=_0x440207?JSON['parse'](_0x440207):null;}),this['listenTo'](_0x2abaeb,'contentInsertion',(_0x48ce16,_0x1c729c)=>{if(!_0x48c142)return;const _0x54e416=_0x1c729c['sourceEditorId']===this['editor']['id'];_0x54e416&&'drop'===_0x1c729c['method']||_0x5ae7b6['change'](_0x52f3ed=>{!function(_0x490c78,_0x29275e){const _0x38b0f5=[];for(const {item:_0x5c211e}of _0x490c78['createRangeIn'](_0x29275e))_0x5c211e['is']('element','footnotesDefinitions')&&_0x38b0f5['push'](_0x5c211e);for(const _0x248da9 of _0x38b0f5)_0x490c78['remove'](_0x248da9);}(_0x52f3ed,_0x1c729c['content']);let _0x1533c0=_0x3b5fc3['getFootnotesDefinitionsObjectElement']();if(!_0x1533c0){const _0xf826c9=_0x5ae7b6['document']['selection']['getFirstRange']()['root'];_0x1533c0=_0x3b5fc3['_insertEmptyFootnotesDefinitionsContainer'](_0x52f3ed,_0xf826c9);}const _0x1ffce2=function(_0x28ac5e,_0x236cf6,_0x339b37){const _0x25ba36=Object['create'](null);for(const {item:_0x8f040e}of _0x28ac5e['createRangeIn'](_0x236cf6))if(_0x8f040e['is']('element','footnoteRef')){const _0x4206d3=_0x8f040e['getAttribute']('footnoteId');if(!_0x339b37(_0x4206d3))continue;_0x25ba36[_0x4206d3]||(_0x25ba36[_0x4206d3]=_0x17bb3f()),_0x28ac5e['setAttribute']('footnoteId',_0x25ba36[_0x4206d3],_0x8f040e);}return _0x25ba36;}(_0x52f3ed,_0x1c729c['content'],_0x2645ee=>!_0x54e416||null!==_0x3b5fc3['getFootnote'](_0x2645ee));for(const [_0x456b7c,_0x3f403b]of Object['entries'](_0x48c142)){const _0x475200=_0x1ffce2[_0x456b7c]||_0x456b7c,_0x58d057=_0x52f3ed['createElement']('footnoteDefinition',{'footnoteId':_0x475200}),_0x97e2f3=_0x309647['data']['htmlProcessor']['toView'](_0x3f403b),_0x53a1f1=_0x309647['data']['toModel'](_0x97e2f3,_0x58d057);_0x52f3ed['append'](_0x53a1f1,_0x58d057),_0x52f3ed['insert'](_0x58d057,_0x1533c0,'end');}_0x48c142=null;});});}}class i extends _0x1f3d21{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x608bd4}=this,{componentFactory:_0x322615}=_0x608bd4['ui'];_0x322615['add']('insertFootnote',x(_0x608bd4,_0x238c7e)),_0x322615['add']('menuBar:insertFootnote',x(_0x608bd4,_0x4d1176)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xd5da9c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x26d2c3;for(const _0x110132 in _0xd5da9c){const _0x362e41=_0x110132,_0x136afe=_0xd5da9c[_0x362e41];if('footnotesLicenseKeyValid'==_0x136afe||'footnotesLicenseKeyInvalid'==_0x136afe||'footnotesLicenseKeyExpired'==_0x136afe||'footnotesLicenseKeyDomainLimit'==_0x136afe||'footnotesLicenseKeyNotAllowed'==_0x136afe||'footnotesLicenseKeyEvaluationLimit'==_0x136afe||'footnotesLicenseKeyTrialLimit'==_0x136afe||'footnotesLicenseKeyUsageLimit'==_0x136afe){delete _0xd5da9c[_0x362e41],_0x26d2c3=_0x136afe,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x26d2c3&&_0xd5da9c['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x26d2c3&&_0xd5da9c['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x26d2c3&&_0xd5da9c['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x26d2c3&&_0xd5da9c['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x26d2c3&&_0xd5da9c['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x26d2c3&&_0xd5da9c['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x26d2c3&&_0xd5da9c['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function x(_0x36f086,_0x19fd90){const _0x33dd57=_0x36f086['commands']['get']('insertFootnote');return _0x3d881b=>{const {t:t}=_0x3d881b,_0x1661d6=new _0x19fd90(_0x3d881b),_0xd6b79e=_0x1661d6 instanceof _0x4d1176;return _0x1661d6['bind']('isEnabled')['to'](_0x33dd57,'isEnabled'),_0x1661d6['set']({'label':t(_0xd6b79e?'Footnote':'Insert\x20footnote'),'icon':_0x205cc2,'tooltip':!0x0}),_0x1661d6['on']('execute',()=>{_0x33dd57['execute'](),_0x36f086['editing']['view']['focus']();}),_0x1661d6;};}class nt extends _0x1f3d21{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const Q=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x278339{['refresh'](){const {editor:_0x33132d}=this,_0x4ba462=_0x33132d['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x4ba462,this['value']=_0x4ba462?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x138af7}){const {editor:_0x1dc921}=this,_0x4b9645=_0x1dc921['plugins']['get'](c),_0x2ceb0f=_0x4b9645['getFootnotesDefinitionsObjectElement']();_0x2ceb0f&&Q['includes'](_0x138af7)&&_0x1dc921['model']['change'](_0x89b574=>{_0x89b574['setAttribute']('footnotesListStyle',_0x138af7,_0x2ceb0f),_0x4b9645['_updateFootnotesCounters'](_0x89b574);});}}class b extends _0x278339{['refresh'](){const {editor:_0x1a0e68}=this,_0x4f04eb=_0x1a0e68['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x4f04eb,this['value']=_0x4f04eb?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x1bffb5}){const {editor:_0x4db566}=this,_0x49935b=_0x4db566['plugins']['get'](c),_0x1da13d=_0x49935b['getFootnotesDefinitionsObjectElement']();_0x1da13d&&Number['isInteger'](_0x1bffb5)&&_0x4db566['model']['change'](_0x1c9509=>{_0x1c9509['setAttribute']('footnotesListStart',_0x1bffb5,_0x1da13d),_0x49935b['_updateFootnotesCounters'](_0x1c9509);});}}class P extends _0x1f3d21{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x561014}=this;_0x561014['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x561014['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x561014['commands']['add']('footnotesStyle',new S(_0x561014)),_0x561014['commands']['add']('footnotesStart',new b(_0x561014)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x37c198}=this,{schema:_0x3dd664}=_0x37c198['model'];_0x3dd664['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x2b397e}=this,{conversion:_0x45cc80,model:_0x15d635}=_0x2b397e,{schema:_0x547799}=_0x15d635;_0x45cc80['for']('upcast')['add'](_0x1d76b3=>{_0x1d76b3['on']('element:ol',(_0x560998,_0x37f3c4,_0x1e45e0)=>{const _0xffccac=_0x37f3c4['viewItem'],_0x54cd1b=_0x37f3c4['modelCursor']?.['parent'];_0xffccac['hasClass']('footnotes-list')&&_0x54cd1b?.['is']('element','footnotesDefinitions')&&(function(_0x5068a9,_0x5ea8d2,_0x232ff2,_0x458d84){if(!_0x458d84['checkAttribute'](_0x5ea8d2,'footnotesListStart'))return;let _0x44553f=0x1;const _0x4055df=_0x232ff2['consumable']['consume'](_0x5068a9,{'attributes':'start'});if(_0x4055df){const _0x56ff29=Number['parseInt'](_0x5068a9['getAttribute']('start'),0xa);Number['isNaN'](_0x56ff29)||(_0x44553f=_0x56ff29);}!_0x4055df&&_0x5ea8d2['hasAttribute']('footnotesListStart')||_0x232ff2['writer']['setAttribute']('footnotesListStart',_0x44553f,_0x5ea8d2);}(_0xffccac,_0x54cd1b,_0x1e45e0,_0x547799),function(_0x29b99a,_0xef20f6,_0x35792c,_0x1f3e60){if(!_0x1f3e60['checkAttribute'](_0xef20f6,'footnotesListStyle'))return;let _0x21eb51='decimal',_0x19ad37=!0x1;if(_0x35792c['consumable']['consume'](_0x29b99a,{'attributes':'type'})){const _0xcdfb96={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x29b99a['getAttribute']('type')];_0xcdfb96&&(_0x21eb51=_0xcdfb96),_0x19ad37=!0x0;}_0x35792c['consumable']['consume'](_0x29b99a,{'styles':'list-style-type'})&&(_0x21eb51=_0x29b99a['getStyle']('list-style-type'),_0x19ad37=!0x0),!_0x19ad37&&_0xef20f6['hasAttribute']('footnotesListStyle')||_0x35792c['writer']['setAttribute']('footnotesListStyle',_0x21eb51,_0xef20f6);}(_0xffccac,_0x54cd1b,_0x1e45e0,_0x547799));});}),_0x45cc80['for']('downcast')['add'](_0x2bd269=>{_0x2bd269['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x27b70e,_0x1a417c,_0x1f35c8)=>{if(!_0x1f35c8['consumable']['consume'](_0x1a417c['item'],_0x27b70e['name']))return;const _0x596db0=C(_0x1a417c['item'],_0x1f35c8['mapper']),{attributeNewValue:_0x48d112}=_0x1a417c;null==_0x48d112||0x1===_0x48d112?_0x1f35c8['writer']['removeAttribute']('start',_0x596db0):_0x1f35c8['writer']['setAttribute']('start',String(_0x48d112),_0x596db0);}),_0x2bd269['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x3a5b7f,_0x2f584b,_0x548bcc)=>{if(!_0x548bcc['consumable']['consume'](_0x2f584b['item'],_0x3a5b7f['name']))return;const _0x18aa65=C(_0x2f584b['item'],_0x548bcc['mapper']),{attributeNewValue:_0x50e382}=_0x2f584b;_0x50e382&&'decimal'!==_0x50e382?_0x548bcc['writer']['setStyle']('list-style-type',_0x50e382,_0x18aa65):_0x548bcc['writer']['removeStyle']('list-style-type',_0x18aa65);});});}['_definePostfixer'](){const {editor:_0x22e5c0}=this,{model:_0x29e909}=_0x22e5c0,_0x575c9f=_0x22e5c0['plugins']['get'](c),_0x39547a=this['_getDefaultListStyle'](),_0x6ac73=this['_getDefaultStartIndex']();_0x29e909['document']['registerPostFixer'](_0x5a6203=>{const _0x14fcbe=_0x29e909['document']['differ']['getChanges']();let _0xd3fc56=!0x1;for(const _0x4e794d of _0x14fcbe){if('insert'!==_0x4e794d['type']||'$text'===_0x4e794d['name'])continue;const _0x8f210a=_0x29e909['createRangeOn'](_0x4e794d['position']['nodeAfter']);for(const _0x23f66c of _0x8f210a['getItems']())_0x23f66c['is']('element','footnotesDefinitions')&&(!_0x23f66c['hasAttribute']('footnotesListStart')&&_0x29e909['schema']['checkAttribute'](_0x23f66c,'footnotesListStart')&&(_0x5a6203['setAttribute']('footnotesListStart',_0x6ac73,_0x23f66c),_0xd3fc56=!0x0),!_0x23f66c['hasAttribute']('footnotesListStyle')&&_0x29e909['schema']['checkAttribute'](_0x23f66c,'footnotesListStyle')&&(_0x5a6203['setAttribute']('footnotesListStyle',_0x39547a,_0x23f66c),_0xd3fc56=!0x0));}return _0xd3fc56&&_0x575c9f['_updateFootnotesCounters'](_0x5a6203),_0xd3fc56;});}['_defineFormatter'](){const {editor:_0x5c3b8b}=this;_0x5c3b8b['plugins']['get'](c)['setFootnoteFormatter'](_0x1da184=>this['_formatFootnoteListValue'](_0x1da184));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x2f2db8,value:_0x1e21bc,digits:_0x564e10}){const _0x4ca9c7=_0x2f2db8['getAttribute']('footnotesListStyle'),_0x341d18=_0x2f2db8['getAttribute']('footnotesListStart'),_0x461047=Math['floor'](_0x1e21bc)+(_0x341d18??0x1)-0x1;switch(_0x4ca9c7){case'decimal-leading-zero':return function(_0x173b07,_0x3fb035){return String(_0x173b07)['padStart'](_0x3fb035,'0');}(_0x461047,Math['max'](0x2,_0x564e10));case'lower-alpha':case'lower-latin':return M(_0x461047,!0x1);case'upper-alpha':case'upper-latin':return M(_0x461047,!0x0);case'lower-roman':return V(_0x461047,!0x1);case'upper-roman':return V(_0x461047,!0x0);default:return String(_0x461047);}}}function C(_0x424d54,_0xe8daa4){const _0x2a4510=_0xe8daa4['toViewElement'](_0x424d54);return Array['from'](_0x2a4510['getChildren']())['find'](_0x42d8ab=>_0x42d8ab['is']('element','ol')&&_0x42d8ab['hasClass']('footnotes-list'));}function M(_0xddbe96,_0x27a58b){let _0xc79b90='',_0x282f5c=_0xddbe96;for(;_0x282f5c>0x0;){const _0x144d12=(_0x282f5c-0x1)%0x1a;_0xc79b90=String['fromCharCode'](0x61+_0x144d12)+_0xc79b90,_0x282f5c=Math['floor']((_0x282f5c-0x1)/0x1a);}return _0x27a58b?_0xc79b90['toUpperCase']():_0xc79b90;}const N=[{'value':0x3e8,'numeral':'M'},{'value':0x384,'numeral':'CM'},{'value':0x1f4,'numeral':'D'},{'value':0x190,'numeral':'CD'},{'value':0x64,'numeral':'C'},{'value':0x5a,'numeral':'XC'},{'value':0x32,'numeral':'L'},{'value':0x28,'numeral':'XL'},{'value':0xa,'numeral':'X'},{'value':0x9,'numeral':'IX'},{'value':0x5,'numeral':'V'},{'value':0x4,'numeral':'IV'},{'value':0x1,'numeral':'I'}];function V(_0x475c04,_0x39e7ba){let _0xebec45='',_0x2a5f29=_0x475c04;for(const {value:_0x3b6daa,numeral:_0x545e2a}of N)for(;_0x2a5f29>=_0x3b6daa;)_0xebec45+=_0x545e2a,_0x2a5f29-=_0x3b6daa;return _0x39e7ba?_0xebec45:_0xebec45['toLowerCase']();}class H extends _0x13cfa5{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new et();['keystrokes']=new ot();['focusables']=new _0x5477af();['focusCycler'];constructor(_0x5b582f,{styleButtonViews:_0x3c11df,styleGridAriaLabel:_0x40d0e9}){super(_0x5b582f),(this['focusCycler']=new _0x5f207d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x3c11df,_0x40d0e9),[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 _0x2338af of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x2338af['element']);_0x4bc2e2({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>rt['window']['getComputedStyle'](this['stylesView']['element'])['getPropertyValue']('grid-template-columns')['split']('\x20')['length'],'uiLanguageDirection':this['locale']&&this['locale']['uiLanguageDirection']});}if(this['startIndexFieldView']){this['focusables']['add'](this['startIndexFieldView']),this['focusTracker']['add'](this['startIndexFieldView']['element']);const _0x912140=_0x33246b=>_0x33246b['stopPropagation']();this['keystrokes']['set']('arrowright',_0x912140),this['keystrokes']['set']('arrowleft',_0x912140),this['keystrokes']['set']('arrowup',_0x912140),this['keystrokes']['set']('arrowdown',_0x912140);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x4d66bb,_0x5a92e1){const _0x55d831=new _0x13cfa5(this['locale']);return _0x55d831['children']=_0x55d831['createCollection'](),_0x55d831['children']['addMany'](_0x4d66bb),_0x55d831['setTemplate']({'tag':'div','attributes':{'aria-label':_0x5a92e1,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x55d831['children']}),_0x55d831['children']['delegate']('execute')['to'](this),_0x55d831['focus']=function(){for(const _0x5cfd27 of this['children'])if(_0x5cfd27 instanceof _0x238c7e&&_0x5cfd27['isOn'])return void _0x5cfd27['focus']();this['children']['first']['focus']();},_0x55d831['focusTracker']=new et(),_0x55d831['keystrokes']=new ot(),_0x55d831['render'](),_0x55d831['keystrokes']['listenTo'](_0x55d831['element']),this['children']['add'](_0x55d831),_0x55d831;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x296237=this['_createStartIndexPropertyView'](),_0x188b2f=[_0x296237],_0x433375=new tt(this['locale'],_0x188b2f);return _0x433375['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x433375['buttonView']['bind']('isEnabled')['toMany'](_0x188b2f,'isEnabled',(..._0x5ad8a7)=>_0x5ad8a7['some'](_0x215e75=>_0x215e75)),_0x433375['buttonView']['on']('change:isEnabled',(_0x26cce2,_0x4a0a84,_0x470508)=>{_0x470508||(_0x433375['isCollapsed']=!0x0);}),this['children']['add'](_0x433375),[_0x296237,_0x433375];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x10184e=new st(this['locale'],it);return _0x10184e['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x10184e['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x10184e['fieldView']['on']('input',()=>{const _0x42175c=_0x10184e['fieldView']['element'],_0x12685e=_0x42175c['valueAsNumber'];Number['isNaN'](_0x12685e)?_0x10184e['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x42175c['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x12685e}):_0x10184e['errorText']=t(_0x12685e<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x10184e;}}class j extends _0x1f3d21{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x37b4f6,_0x148e9e];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1f67ff}=this,{componentFactory:_0x5b7294}=_0x1f67ff['ui'];_0x1f67ff['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x5b7294['add']('footnotesStyle',function(_0x4477dd){return _0x5dfb0e=>{const {t:t}=_0x5dfb0e,_0x56bcd0=_0x4477dd['commands']['get']('footnotesStyle'),_0x4e00f2=_0x5d7306(_0x5dfb0e),{buttonView:_0x5c1f69}=_0x4e00f2;return _0x4e00f2['class']='ck-footnotes-styles-dropdown',_0x4e00f2['bind']('isEnabled')['to'](_0x56bcd0,'isEnabled'),_0x5c1f69['set']({'label':t('Footnotes\x20style'),'icon':_0x205cc2,'tooltip':!0x0}),_0x4e00f2['once']('change:isOpen',()=>{const _0x3a4164=function({editor:_0x5985e8,dropdownView:_0xe0dcab}){const {t:t}=_0x5985e8['locale'],_0x53dd87=t('Footnotes\x20definitions\x20styles'),_0x122905=function(_0x563d8f){const t=_0x563d8f['locale']['t'],_0x39d6c5=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x2284b3},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x5b5fd6},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x2fb8f2},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x3bb33d},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x3379b4},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x159f95}];return _0x39d6c5['map'](function(_0x363434){const _0xc02cf4=_0x363434['locale'];return({label:_0x44072f,icon:_0x225b11,tooltip:_0x181a51,style:_0x4b6b9a})=>{const _0x1fa567=_0x363434['commands']['get']('footnotesStyle'),_0x13c288=new _0x238c7e(_0xc02cf4);return _0x13c288['set']({'label':_0x44072f,'icon':_0x225b11,'tooltip':_0x181a51}),_0x13c288['bind']('isOn')['to'](_0x1fa567,'value',_0x46aa04=>_0x46aa04===_0x4b6b9a),_0x13c288['bind']('isEnabled')['to'](_0x1fa567,'isEnabled'),_0x13c288['on']('execute',()=>{_0x363434['execute']('footnotesStyle',{'value':_0x4b6b9a}),_0x363434['editing']['view']['focus']();}),_0x13c288;};}(_0x563d8f));}(_0x5985e8),_0x1f45b1=new H(_0x5985e8['locale'],{'styleGridAriaLabel':_0x53dd87,'styleButtonViews':_0x122905});return _0x1f45b1['delegate']('execute')['to'](_0xe0dcab),_0x1f45b1['on']('footnotesListStart',(_0x3eae6a,_0x2e217d)=>{_0x5985e8['execute']('footnotesStart',{'value':_0x2e217d['startIndex']});}),_0x1f45b1;}({'editor':_0x4477dd,'dropdownView':_0x4e00f2});_0x4e00f2['panelView']['children']['add'](_0x3a4164);}),_0x4e00f2;};}(_0x1f67ff));}['afterInit'](){const {editor:_0x59ab5f}=this,{t:t}=_0x59ab5f['locale'],_0x291d46=_0x59ab5f['plugins']['get'](_0x148e9e),{defaultPositions:_0x54c364}=_0x2e5d73;_0x291d46['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x59ab5f['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0xc26f7d=>{let _0x408c50=_0xc26f7d['getFirstPosition']()?.['parent'];return _0x408c50?.['is']('$text')&&(_0x408c50=_0x408c50['parent']),_0x408c50?.['is']('element')?_0x408c50['findAncestor'](J):null;},'positions':[_0x54c364['southArrowNorth'],_0x54c364['southArrowNorthMiddleWest'],_0x54c364['southArrowNorthMiddleEast'],_0x54c364['southArrowNorthWest'],_0x54c364['southArrowNorthEast'],_0x54c364['northArrowSouth'],_0x54c364['northArrowSouthMiddleWest'],_0x54c364['northArrowSouthMiddleEast'],_0x54c364['northArrowSouthWest'],_0x54c364['northArrowSouthEast'],_0x54c364['viewportStickyNorth']]});}}class lt extends _0x1f3d21{static get['pluginName'](){return'FootnotesProperties';}static get['requires'](){return[P,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{nt as Footnotes,e as FootnotesClipboard,r as FootnotesEditing,lt as FootnotesProperties,P as FootnotesPropertiesEditing,j as FootnotesPropertiesUI,b as FootnotesStartCommand,S as FootnotesStyleCommand,c as FootnotesTracker,i as FootnotesUI,w as InsertFootnoteCommand};
|
|
23
|
+
import{Plugin as _0x581f59,Command as _0x1a23cd}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x10baaf,isWidget as _0x46acc9,toWidgetEditable as _0xe86660,WidgetToolbarRepository as _0x16f6bf}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x3b0ffc,logWarning as _0x1672ef,FocusTracker as et,KeystrokeHandler as ot,global as rt}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x3c43fc,ClickObserver as _0x4144eb}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x139329}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x53bd40,ButtonView as _0x11dc3b,View as _0x1cdf56,ViewCollection as _0x312a0c,FocusCycler as _0x59bf31,addKeyboardHandlingForGrid as _0xcf4ad2,CollapsibleView as tt,LabeledFieldView as st,createLabeledInputNumber as it,ContextualBalloon as _0x310f8a,BalloonPanelView as _0x2a82e4,createDropdown as _0x3d8114}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x18c523,IconListStyleDecimal as _0x237bc8,IconListStyleDecimalLeadingZero as _0x50f5af,IconListStyleLowerRoman as _0x23bace,IconListStyleUpperRoman as _0x195e78,IconListStyleLowerLatin as _0x548fdc,IconListStyleUpperLatin as _0x50454f}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x564f81,_0x3e82e7){this['_model']=_0x564f81,this['_elementName']=_0x3e82e7['elementName'],this['_getElementKey']=_0x3e82e7['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x59d587){const _0x4e29fd=new Set(),_0x27130d=new Map();for(const _0x1954c3 of _0x59d587){if('insert'===_0x1954c3['type']&&'$text'!==_0x1954c3['name']&&_0x1954c3['position']['nodeAfter']){const _0x5318d6=this['_model']['createRangeOn'](_0x1954c3['position']['nodeAfter']);for(const _0x1d0fe8 of _0x5318d6['getItems']()){if(!_0x1d0fe8['is']('element',this['_elementName']))continue;const _0x159c6e=this['_getElementKey'](_0x1d0fe8);_0x27130d['has'](_0x159c6e)||_0x27130d['set'](_0x159c6e,[]),_0x27130d['get'](_0x159c6e)['push'](_0x1d0fe8);}}if('remove'===_0x1954c3['type']&&_0x1954c3['name']===this['_elementName']){const _0x380036=this['_getElementKey']({'getAttribute':_0x2ecea7=>_0x1954c3['attributes']['get'](_0x2ecea7)});_0x4e29fd['add'](_0x380036);}}for(const [_0x46c403,_0x280cfe]of this['_trackedElements'])'$graveyard'===_0x280cfe['root']['rootName']&&_0x4e29fd['add'](_0x46c403);for(const _0x5d7df2 of _0x4e29fd)this['_trackedElements']['delete'](_0x5d7df2);for(const [_0x5d8d68,_0x53abee]of _0x27130d)this['_trackedElements']['set'](_0x5d8d68,_0x53abee[_0x53abee['length']-0x1]);const _0x31014d=new Set();for(const [_0x29ae2d,_0x5ab94e]of _0x27130d)_0x4e29fd['has'](_0x29ae2d)&&(_0x31014d['add'](_0x5ab94e[0x0]),_0x5ab94e['length']>0x1?_0x27130d['set'](_0x29ae2d,_0x5ab94e['slice'](0x1)):_0x27130d['delete'](_0x29ae2d),_0x4e29fd['delete'](_0x29ae2d));return{'removed':Array['from'](_0x4e29fd),'inserted':Array['from'](_0x27130d['values']())['flat'](),'moved':Array['from'](_0x31014d)};}}class c extends _0x581f59{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10ad0f){super(_0x10ad0f),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x46b6ae=>_0x46b6ae['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x56c58a=>_0x56c58a['getAttribute']('footnoteId')});}['init'](){const {editor:_0x1285c1}=this,{model:_0x216bc5,data:_0x4bab24}=_0x1285c1;_0x216bc5['document']['registerPostFixer'](_0x1ba614=>{const _0x56944b=_0x216bc5['document']['differ']['getChanges']();let _0x19053e=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x1ba614,_0x56944b)&&(_0x19053e=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x1ba614,_0x56944b)&&(_0x19053e=!0x0),this['_handleFootnoteReferencesChanges'](_0x1ba614,_0x56944b)&&(_0x19053e=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x1ba614)&&(_0x19053e=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x1ba614)&&(_0x19053e=!0x0),this['_sortFootnoteDefinitions'](_0x1ba614)&&(_0x19053e=!0x0),_0x19053e;}),this['listenTo'](_0x216bc5['document'],'change:data',()=>{_0x216bc5['enqueueChange']({'isUndoable':!0x1},_0x4f460b=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x4f460b);});},{'priority':'low'}),this['listenTo'](_0x4bab24,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x5a1fa3){return this['_footnotes']['find'](_0x41bddd=>_0x41bddd['id']===_0x5a1fa3)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x95085){this['_footnoteFormatter']=_0x95085;}['_updateFootnotesCounters'](_0x2617fd,_0x44cf3d=0x0){let _0x42f89f=!0x1;for(let _0x1fb402=_0x44cf3d;_0x1fb402<this['_footnotes']['length'];_0x1fb402++)this['_updateFootnoteRefCounter'](_0x2617fd,_0x1fb402)&&(_0x42f89f=!0x0);return _0x42f89f;}['_insertEmptyFootnotesDefinitionsContainer'](_0x28699a,_0x1af2e3){const _0x2c62a4=_0x28699a['createElement']('footnotesDefinitions',{});return _0x28699a['append'](_0x2c62a4,_0x1af2e3),this['_footnotesDefinitions']=_0x2c62a4,_0x2c62a4;}['_ensureFootnotesDefinitionsContainerExists'](_0xaa4e88){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x450f66=this['_footnotes'][0x0]['reference']['root'],_0x5b8fae=this['_insertEmptyFootnotesDefinitionsContainer'](_0xaa4e88,_0x450f66);for(const _0x255123 of this['_footnotes'])_0x255123['definition']['parent']||_0xaa4e88['insert'](_0x255123['definition'],_0x5b8fae,'end');this['_updateFootnotesCounters'](_0xaa4e88);}['_handleFootnotesDefinitionsObjectChanges'](_0x2f553e,_0x28070a){let _0x55455b=!0x1;const {inserted:_0x30611f,removed:_0x3695ab,moved:_0x25eb4e}=this['_footnoteDefsContainerTracker']['getChanges'](_0x28070a);if(_0x25eb4e['length']&&(this['_footnotesDefinitions']=_0x25eb4e[0x0]),_0x30611f['length']){if(_0x30611f['length']>0x1||this['_footnotesDefinitions']&&_0x30611f['some'](_0x43f2a6=>_0x43f2a6!==this['_footnotesDefinitions'])){const _0x294c06=_0x2f553e['createElement']('footnotesDefinitions',{}),_0x59d905=[];this['_footnotesDefinitions']&&_0x59d905['push'](this['_footnotesDefinitions']),_0x59d905['push'](..._0x30611f),_0x2f553e['insert'](_0x294c06,_0x59d905[0x0],'before');for(const _0x10d72c of _0x59d905)_0x2f553e['move'](_0x2f553e['createRangeIn'](_0x10d72c),_0x2f553e['createPositionAt'](_0x294c06,'end')),_0x2f553e['remove'](_0x10d72c);this['_footnotesDefinitions']=_0x294c06,this['_updateFootnotesCounters'](_0x2f553e),_0x55455b=!0x0;}else this['_footnotesDefinitions']=_0x30611f[0x0];}if(_0x3695ab['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x35a8c6 of this['_footnotes'])_0x2f553e['remove'](_0x35a8c6['reference']),_0x55455b=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x55455b;}['_handleFootnoteDefinitionsChanges'](_0x9a32fb,_0x436231){let _0xe8cdc8=!0x1;const _0x1966fd=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x1f71d4,moved:_0x541273}=this['_footnoteDefsTracker']['getChanges'](_0x436231);for(const _0x95b796 of[..._0x541273,..._0x1f71d4]){const _0x42d8b6=_0x95b796['getAttribute']('footnoteId'),_0x46418f=this['getFootnote'](_0x42d8b6);_0x46418f&&(_0x46418f['definition']=_0x95b796),_(_0x9a32fb,_0x1966fd,_0x95b796)&&(_0xe8cdc8=!0x0);}return _0xe8cdc8;}['_handleFootnoteReferencesChanges'](_0x194bdf,_0x195010){let _0x16061f=!0x1;const {removed:_0x4b3601,inserted:_0x51a7f9,moved:_0x2854df}=this['_footnoteRefsTracker']['getChanges'](_0x195010);for(const _0x1f1aba of _0x4b3601)this['_handleRemoveFootnoteReferenceById'](_0x194bdf,_0x1f1aba)&&(_0x16061f=!0x0);for(const _0x5a6443 of _0x51a7f9)this['_handleInsertedFootnoteReference'](_0x194bdf,_0x5a6443)&&(_0x16061f=!0x0);for(const _0x528621 of _0x2854df)this['_handleMovedFootnoteReference'](_0x194bdf,_0x528621)&&(_0x16061f=!0x0);return _0x16061f;}['_handleFootnotesDefinitionsObjectSync'](_0x1ae768){if(!this['_footnotesDefinitions'])return!0x1;let _0x24518a=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x57bbb8=[];for(const _0x73ca7e of this['_footnotesDefinitions']['getChildren']()){const _0x338da6=_0x73ca7e['getAttribute']('footnoteId');this['getFootnote'](_0x338da6)||(_0x57bbb8['unshift'](_0x73ca7e),_0x24518a=!0x0);}for(const _0x2af9fe of _0x57bbb8)_0x1ae768['remove'](_0x2af9fe);}const _0x276f1d=new Set(),_0x4d0a69=[];for(const _0x4929e3 of this['_footnotesDefinitions']['getChildren']()){const _0x59e7d0=_0x4929e3['getAttribute']('footnoteId');_0x276f1d['has'](_0x59e7d0)?(_0x4d0a69['unshift'](_0x4929e3),_0x24518a=!0x0):_0x276f1d['add'](_0x59e7d0);}for(const _0x434171 of _0x4d0a69)_0x1ae768['remove'](_0x434171);return this['_footnotesDefinitions']['childCount']||(_0x1ae768['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x24518a=!0x0),_0x24518a;}['_handleInsertedFootnoteReference'](_0x2d073d,_0x317b02){if(this['_footnotes']['find'](_0x150e08=>_0x150e08['reference']===_0x317b02))return!0x1;let _0x3ce981=!0x1;const _0x14acab=_0x317b02['getAttribute']('footnoteId'),_0xf200ad=this['_footnotes']['findIndex'](_0x404e30=>_0x404e30['id']===_0x14acab);-0x1!==_0xf200ad&&(_0x2d073d['remove'](this['_footnotes'][_0xf200ad]['reference']),this['_footnotes']['splice'](_0xf200ad,0x1),_0x3ce981=!0x0);let _0x46a6d5=this['_footnotesDefinitions']?function(_0x1e77a0,_0x4b0cf0){for(const _0x15b7ac of _0x1e77a0['getChildren']())if(_0x15b7ac['getAttribute']('footnoteId')===_0x4b0cf0)return _0x15b7ac;return null;}(this['_footnotesDefinitions'],_0x14acab):null;_0x46a6d5||(_0x46a6d5=_0x2d073d['createElement']('footnoteDefinition',{'footnoteId':_0x14acab}),this['_footnotesDefinitions']&&(_0x2d073d['insert'](_0x46a6d5,this['_footnotesDefinitions'],'end'),_0x3ce981=!0x0));const _0xd01024={'id':_0x14acab,'reference':_0x317b02,'definition':_0x46a6d5},_0x4690f5=I(this['editor']['model'],this['_footnotes'],_0x317b02);this['_footnotes']['splice'](_0x4690f5,0x0,_0xd01024);let _0x34ebc1=_0x4690f5;return-0x1!==_0xf200ad&&(_0x34ebc1=Math['min'](_0x4690f5,_0xf200ad)),this['_updateFootnotesCounters'](_0x2d073d,_0x34ebc1)&&(_0x3ce981=!0x0),_0x3ce981;}['_handleRemoveFootnoteReferenceById'](_0x638127,_0x39048b){const _0x1708a3=this['_footnotes']['findIndex'](_0x1d09dd=>_0x1d09dd['id']===_0x39048b);if(-0x1===_0x1708a3)return!0x1;let _0x50e9c0=!0x1;const _0x295393=this['_footnotes'][_0x1708a3];return'$graveyard'!==_0x295393['definition']['root']['rootName']&&(_0x638127['remove'](_0x295393['definition']),_0x50e9c0=!0x0),this['_footnotes']['splice'](_0x1708a3,0x1),this['_updateFootnotesCounters'](_0x638127,_0x1708a3)&&(_0x50e9c0=!0x0),_0x50e9c0;}['_handleMovedFootnoteReference'](_0x243a1a,_0x5b4086){const _0x53a602=_0x5b4086['getAttribute']('footnoteId'),_0x3bbab2=this['_footnotes']['findIndex'](_0x3bc6b7=>_0x3bc6b7['id']===_0x53a602),_0x3ad7e8=this['_footnotes'][_0x3bbab2];let _0x407ee4=!0x1;_0x3ad7e8['reference']=_0x5b4086,this['_footnotes']['splice'](_0x3bbab2,0x1);const _0x502643=I(this['editor']['model'],this['_footnotes'],_0x5b4086);return this['_footnotes']['splice'](_0x502643,0x0,_0x3ad7e8),this['_updateFootnotesCounters'](_0x243a1a,Math['min'](_0x3bbab2,_0x502643))&&(_0x407ee4=!0x0),_0x407ee4;}['_updateFootnoteRefCounter'](_0xf0fe92,_0x16509e){if(!this['_footnotesDefinitions'])return!0x1;const _0x4de081=this['_footnotes'][_0x16509e];let _0x455c59;return _0x455c59=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x4de081,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x16509e+0x1}):String(_0x16509e+0x1),_0x4de081['reference']['getAttribute']('footnoteCounter')!=_0x455c59&&(_0xf0fe92['setAttribute']('footnoteCounter',_0x455c59,_0x4de081['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x4f78ca){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0xef4b56,_0x21cf9e){if(_0xef4b56['length']!==_0x21cf9e['length'])return!0x1;for(let _0x92ddbc=0x0;_0x92ddbc<_0xef4b56['length'];_0x92ddbc++)if(_0xef4b56[_0x92ddbc]!==_0x21cf9e[_0x92ddbc])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x329bd2=>_0x329bd2['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x4e75a4=>_0x4e75a4['getAttribute']('footnoteId'))))return!0x1;let _0x171d09=!0x1;for(let _0x71c1fe=0x0;_0x71c1fe<this['_footnotes']['length'];_0x71c1fe++){const _0x5bb4c8=this['_footnotes'][_0x71c1fe],_0x1bfbef=_0x4f78ca['createPositionBefore'](_0x5bb4c8['definition']),_0x382fc2=_0x4f78ca['createPositionAt'](this['_footnotesDefinitions'],_0x71c1fe);_0x1bfbef['isEqual'](_0x382fc2)||(_0x4f78ca['move'](_0x4f78ca['createRangeOn'](_0x5bb4c8['definition']),_0x382fc2),_0x171d09=!0x0);}return _0x171d09;}['_ensureFootnotesReferencesHaveProperOrder'](_0xc6e337){if(!this['_footnotes']['length'])return!0x1;const {model:_0x4708b4}=this['editor'];let _0x438ec6=!0x1;for(let _0x461ac2=0x0;_0x461ac2<this['_footnotes']['length']-0x1;_0x461ac2++){const _0x4269bc=this['_footnotes'][_0x461ac2],_0x17df0a=this['_footnotes'][_0x461ac2+0x1],_0xe9113e=_0x4708b4['createPositionBefore'](_0x4269bc['reference']),_0x20e9be=_0x4708b4['createPositionBefore'](_0x17df0a['reference']);'after'===_0xe9113e['compareWith'](_0x20e9be)&&(this['_handleMovedFootnoteReference'](_0xc6e337,_0x4269bc['reference']),_0x461ac2=-0x1,_0x438ec6=!0x0);}return _0x438ec6;}}function _(_0x272993,_0x538f89,_0x1b52af){if(_0x1b52af['childCount'])return!0x1;const _0x43d0cb=_0x538f89?'paragraph':'footnoteInlineContent';return _0x272993['insert'](_0x272993['createElement'](_0x43d0cb),_0x1b52af),!0x0;}function I(_0x1c5e12,_0x35cd9f,_0x3d3aa1){if(0x0===_0x35cd9f['length'])return 0x0;const _0x8773ed=_0x1c5e12['createPositionBefore'](_0x3d3aa1);for(let _0x506cbe=0x0;_0x506cbe<_0x35cd9f['length'];_0x506cbe++){const _0x2e9a9c=_0x35cd9f[_0x506cbe],_0x4de97b=_0x1c5e12['createPositionBefore'](_0x2e9a9c['reference']);if('before'===_0x8773ed['compareWith'](_0x4de97b))return _0x506cbe;}const _0x29d4b8=_0x3d3aa1['root'];let _0x37d728=-0x1;for(let _0x528516=_0x35cd9f['length']-0x1;_0x528516>=0x0;_0x528516--)if(_0x35cd9f[_0x528516]['reference']['root']===_0x29d4b8){_0x37d728=_0x528516;break;}if(-0x1!==_0x37d728)return _0x37d728+0x1;const _0x540caf=_0x1c5e12['document']['getRootNames'](),_0x54518b=_0x540caf['indexOf'](_0x29d4b8['rootName']),_0x58dd66=_0x540caf[_0x54518b+0x1];if(_0x58dd66){for(let _0x40ab74=0x0;_0x40ab74<_0x35cd9f['length'];_0x40ab74++)if(_0x35cd9f[_0x40ab74]['reference']['root']['rootName']===_0x58dd66)return _0x40ab74;}return _0x35cd9f['length'];}class w extends _0x1a23cd{['refresh'](){const _0x267ea4=this['editor']['model']['document']['selection'],_0x2b2820=this['_getPositionToInsertFootnote'](_0x267ea4);this['isEnabled']=!!_0x2b2820;}['execute'](_0x40f754){const {editor:_0x27286a}=this,{model:_0x128c26}=_0x27286a,{selection:_0x667b3b}=_0x128c26['document'],_0x397ff2=this['_getPositionToInsertFootnote'](_0x667b3b);if(!_0x397ff2)return;const _0x23390c=_0x27286a['plugins']['get']('FootnotesEditing'),_0x1d381c=_0x40f754?.['footnoteId']??_0x3b0ffc();!function(_0x4ce491){return'string'==typeof _0x4ce491&&_0x4ce491['length']>0x0&&!/\s/['test'](_0x4ce491)&&!/^\d/['test'](_0x4ce491);}(_0x1d381c)?_0x1672ef('insert-footnote-command-executed-with-invalid-id'):(_0x128c26['change'](_0xf1dc6c=>{const _0x5cc81e=_0xf1dc6c['createElement']('footnoteRef',{'footnoteId':_0x1d381c});_0x128c26['insertObject'](_0x5cc81e,_0x397ff2,null);}),_0x23390c['_moveSelectionToFootnoteDefinition'](_0x1d381c));}['_getPositionToInsertFootnote'](_0x5e0dc8){const {model:_0x43a8ac}=this['editor'],{schema:_0xdf4066}=_0x43a8ac,_0x4489f0=_0x5e0dc8['getFirstRange']();for(const _0x26fb14 of _0x4489f0['getItems']())if(_0xdf4066['isBlock'](_0x26fb14)||_0xdf4066['isObject'](_0x26fb14))return null;const _0x5f4165=_0x4489f0['end'];return _0xdf4066['checkChild'](_0x5f4165,'footnoteRef')?_0x5f4165:null;}}class r extends _0x581f59{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x274453}=this;_0x274453['config']['define']('footnotes.multiBlock',!0x0),_0x274453['commands']['add']('insertFootnote',new w(_0x274453)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x791041){const _0x2ee0fd=_0x58e709([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x158923=0x47a28506,_0x44a894=0x47a5fd0e^_0x158923,_0x4d4425=window[_0x58e709([0x44,0x61,0x74,0x65])][_0x58e709([0x6e,0x6f,0x77])](),_0x5bca00=_0x791041[_0x58e709([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4203ab=new window[(_0x58e709([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x19e29c=>{_0x5bca00[_0x58e709([0x6f,0x6e,0x63,0x65])](_0x58e709([0x72,0x65,0x61,0x64,0x79]),_0x19e29c);}),_0xf4c30c={[_0x58e709([0x6b,0x74,0x79])]:_0x58e709([0x45,0x43]),[_0x58e709([0x75,0x73,0x65])]:_0x58e709([0x73,0x69,0x67]),[_0x58e709([0x63,0x72,0x76])]:_0x58e709([0x50,0x2d,0x32,0x35,0x36]),[_0x58e709([0x78])]:_0x58e709([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x58e709([0x79])]:_0x58e709([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x58e709([0x61,0x6c,0x67])]:_0x58e709([0x45,0x53,0x32,0x35,0x36])},_0x19ad20=_0x5bca00[_0x58e709([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x58e709([0x67,0x65,0x74])](_0x58e709([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x18e666(){let _0x2b65de,_0x59c347=null,_0xc8c25c=null;try{if(_0x19ad20==_0x58e709([0x47,0x50,0x4c]))return _0x58e709([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2b65de=_0x1bc04d(),!_0x2b65de)return _0x58e709([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2b65de[_0x58e709([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xc8c25c=_0x26949a(_0x2b65de[_0x58e709([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2b65de[_0x58e709([0x6a,0x74,0x69])])),await _0x1c1115()?_0x39bf32()?_0x257814()?_0x58e709([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x236d02()?(_0x2b65de[_0x58e709([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x58e709([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x59c347=_0x20905f(_0x58e709([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2b65de[_0x58e709([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x58e709([0x74,0x72,0x69,0x61,0x6c])&&(_0x59c347=_0x20905f(_0x58e709([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x553ab1()):_0x58e709([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x58e709([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x58e709([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x58e709([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x257814(){const _0x303f85=[_0x58e709([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x58e709([0x74,0x72,0x69,0x61,0x6c])][_0x58e709([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b65de[_0x58e709([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4d4425/0x3e8:0xe10*_0x44a894;return _0x2b65de[_0x58e709([0x65,0x78,0x70])]<_0x303f85;}function _0x39bf32(){const _0x181d18=_0x2b65de[_0x58e709([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x181d18&&(!!_0x181d18[_0x58e709([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58e709([0x2a]))||!!_0x181d18[_0x58e709([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58e709([0x46,0x4f,0x4f])));}function _0x236d02(){const _0x45b4e1=_0x2b65de[_0x58e709([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x45b4e1||0x0==_0x45b4e1[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2d4b32}=new URL(window[_0x58e709([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x45b4e1[_0x58e709([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d4b32))return!0x0;const _0x4a01a6=_0x2d4b32[_0x58e709([0x73,0x70,0x6c,0x69,0x74])](_0x58e709([0x2e]));return _0x45b4e1[_0x58e709([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e19d6=>_0x1e19d6[_0x58e709([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58e709([0x2a])))[_0x58e709([0x6d,0x61,0x70])](_0x4aff0b=>_0x4aff0b[_0x58e709([0x73,0x70,0x6c,0x69,0x74])](_0x58e709([0x2e])))[_0x58e709([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x131f0c=>_0x131f0c[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4a01a6[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x58e709([0x6d,0x61,0x70])](_0x4411be=>Array(_0x4a01a6[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4411be[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x58e709([0x66,0x69,0x6c,0x6c])](_0x4411be[0x0]===_0x58e709([0x2a])?_0x58e709([0x2a]):'')[_0x58e709([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4411be))[_0x58e709([0x73,0x6f,0x6d,0x65])](_0x13adbf=>_0x4a01a6[_0x58e709([0x65,0x76,0x65,0x72,0x79])]((_0x4a7d11,_0x55b9a4)=>_0x13adbf[_0x55b9a4]===_0x4a7d11||_0x13adbf[_0x55b9a4]===_0x58e709([0x2a])));}function _0x553ab1(){return _0x59c347&&_0xc8c25c?new window[(_0x58e709([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5308e8,_0x392c4d)=>{_0x59c347[_0x58e709([0x74,0x68,0x65,0x6e])](_0x5308e8,_0x392c4d),_0xc8c25c[_0x58e709([0x74,0x68,0x65,0x6e])](_0x49f129=>{_0x49f129!=_0x58e709([0x56,0x61,0x6c,0x69,0x64])&&_0x5308e8(_0x49f129);},_0x392c4d);}):_0x59c347||_0xc8c25c||_0x58e709([0x56,0x61,0x6c,0x69,0x64]);}}function _0x26949a(_0x55c3a5,_0xcdabb3){return new window[(_0x58e709([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ff512=>{if(_0x2aa258())return _0x4ff512(_0x58e709([0x56,0x61,0x6c,0x69,0x64]));_0x41e5c5(),_0x5bca00[_0x58e709([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x58e709([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x497278=!0x1;const _0x14ee79=_0x3b0ffc();function _0x1a60a1(_0x530917){return!!_0x530917&&(typeof _0x530917===_0x58e709([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x530917===_0x58e709([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x530917[_0x58e709([0x74,0x68,0x65,0x6e])]===_0x58e709([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x530917[_0x58e709([0x63,0x61,0x74,0x63,0x68])]===_0x58e709([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x45a0ce(_0x5d2da7){_0x398e94(_0x5d2da7)[_0x58e709([0x74,0x68,0x65,0x6e])](_0x2ae1f3=>{if(!_0x2ae1f3||_0x2ae1f3[_0x58e709([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x58e709([0x6f,0x6b]))return _0x58e709([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x19bd1f(_0x248353(_0x14ee79+_0xcdabb3))!=_0x2ae1f3[_0x58e709([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x58e709([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x58e709([0x56,0x61,0x6c,0x69,0x64]);})[_0x58e709([0x74,0x68,0x65,0x6e])](_0x59aa11=>(_0x244159(),_0x59aa11),()=>{const _0x2acbc3=_0x3e41b0();return null==_0x2acbc3?(_0x244159(),_0x58e709([0x56,0x61,0x6c,0x69,0x64])):_0x58e709(_0x4d4425-_0x2acbc3>(0x63ae0106^_0x158923)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x58e709([0x74,0x68,0x65,0x6e])](_0x4ff512)[_0x58e709([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4ff512(_0x58e709([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5609a9=0x47946b86^_0x158923;function _0x244159(){const _0x3d8295=_0x58e709([0x6c,0x6c,0x63,0x74,0x2d])+_0x19bd1f(_0x248353(_0x55c3a5)),_0x239cdf=_0x175bab(_0x19bd1f(window[_0x58e709([0x4d,0x61,0x74,0x68])][_0x58e709([0x63,0x65,0x69,0x6c])](_0x4d4425/_0x5609a9)));window[_0x58e709([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x58e709([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3d8295,_0x239cdf);}function _0x3e41b0(){const _0x3223e2=_0x58e709([0x6c,0x6c,0x63,0x74,0x2d])+_0x19bd1f(_0x248353(_0x55c3a5)),_0x344637=window[_0x58e709([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x58e709([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3223e2);return _0x344637?window[_0x58e709([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x175bab(_0x344637),0x10)*_0x5609a9:null;}function _0x398e94(_0x3c9fdc){return new window[(_0x58e709([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3ee49f,_0x3e2e68)=>{_0x3c9fdc[_0x58e709([0x74,0x68,0x65,0x6e])](_0x3ee49f,_0x3e2e68),window[_0x58e709([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3e2e68,0x47a351c6^_0x158923);});}}_0x5bca00[_0x58e709([0x6f,0x6e])](_0x58e709([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xb682,_0x5cc434)=>{if(_0x5cc434[0x0]!=_0x55c3a5)return _0x4ff512(_0x58e709([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5cc434[0x1]={..._0x5cc434[0x1],[_0x58e709([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x14ee79};},{[_0x58e709([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x58e709([0x68,0x69,0x67,0x68])}),_0x5bca00[_0x58e709([0x6f,0x6e])](_0x58e709([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3ac025=>{_0x1a60a1(_0x3ac025[_0x58e709([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x497278=!0x0,_0x45a0ce(_0x3ac025[_0x58e709([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x58e709([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x58e709([0x6c,0x6f,0x77])}),_0x4203ab[_0x58e709([0x74,0x68,0x65,0x6e])](()=>{_0x497278||_0x4ff512(_0x58e709([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2aa258(){return _0x5bca00[_0x58e709([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x58e709([0x76,0x69,0x65,0x77])][_0x58e709([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x58e709([0x61,0x75,0x74,0x6f]);}function _0x41e5c5(){_0x5bca00[_0x58e709([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x58e709([0x76,0x69,0x65,0x77])][_0x58e709([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x58e709([0x61,0x75,0x74,0x6f]);}}function _0x20905f(_0x56e2dd){const _0x562e67=[new window[(_0x58e709([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24715f=>setTimeout(_0x24715f,0x47abbbca^_0x158923)),_0x4203ab[_0x58e709([0x74,0x68,0x65,0x6e])](()=>new window[(_0x58e709([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc25fdd=>{let _0x2634f4=0x0;_0x5bca00[_0x58e709([0x6d,0x6f,0x64,0x65,0x6c])][_0x58e709([0x6f,0x6e])](_0x58e709([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xf07dd7,_0x36e65a)=>{_0x36e65a[0x0][_0x58e709([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2634f4++,_0x2634f4==(0x47a284fe^_0x158923)&&(_0xc25fdd(),_0xf07dd7[_0x58e709([0x6f,0x66,0x66])]());});}))];return window[_0x58e709([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x58e709([0x72,0x61,0x63,0x65])](_0x562e67)[_0x58e709([0x74,0x68,0x65,0x6e])](()=>_0x56e2dd);}async function _0x3a5e50(){await _0x4203ab,_0x5bca00[_0x58e709([0x6d,0x6f,0x64,0x65,0x6c])][_0x58e709([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2ae972,_0x5bca00[_0x58e709([0x6d,0x6f,0x64,0x65,0x6c])][_0x58e709([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2ae972,_0x5bca00[_0x58e709([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x58e709([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x402cbc(_0x5da89c){const _0x552b6b=_0x1ece04();_0x5bca00[_0x552b6b]=_0x58e709([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5da89c,_0x5da89c!=_0x58e709([0x56,0x61,0x6c,0x69,0x64])&&_0x3a5e50();}function _0x1ece04(){const _0xeae59a=window[_0x58e709([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x58e709([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x58e709([0x6e,0x6f,0x77])]())[_0x58e709([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x58e709([0x2e]),'');let _0x3e6200=_0x58e709([0x75]);for(let _0x223212=0x0;_0x223212<_0xeae59a[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x223212+=0x2){let _0x5577cb=window[_0x58e709([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xeae59a[_0x58e709([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x223212,_0x223212+0x2));_0x5577cb>=_0x2ee0fd[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5577cb-=_0x2ee0fd[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3e6200+=_0x2ee0fd[_0x5577cb];}return _0x3e6200;}function _0x1bc04d(){const _0x34e1a1=_0x19ad20[_0x58e709([0x73,0x70,0x6c,0x69,0x74])](_0x58e709([0x2e]));if(0x3!=_0x34e1a1[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5f4d0e(_0x34e1a1[0x1]);function _0x5f4d0e(_0x1a7bdd){const _0x48458a=_0x362b97(_0x1a7bdd);return _0x48458a&&_0x169c7a()?_0x48458a:null;function _0x169c7a(){const _0x237d26=_0x48458a[_0x58e709([0x6a,0x74,0x69])],_0x34bf76=window[_0x58e709([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x237d26[_0x58e709([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x237d26[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xc35060={..._0x48458a,[_0x58e709([0x6a,0x74,0x69])]:_0x237d26[_0x58e709([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x237d26[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xc35060[_0x58e709([0x76,0x63])],_0x248353(_0xc35060)==_0x34bf76;}}}async function _0x1c1115(){let _0x573958=!0x0;try{const _0x43c6c5=_0x19ad20[_0x58e709([0x73,0x70,0x6c,0x69,0x74])](_0x58e709([0x2e])),[_0x4ef351,_0x2b822c,_0x56d4dd]=_0x43c6c5;return _0x34d851(_0x4ef351),await _0x566ce0(_0x4ef351,_0x2b822c,_0x56d4dd),_0x573958;}catch{return!0x1;}function _0x34d851(_0xcc356f){const _0x6cf6ad=_0x362b97(_0xcc356f);_0x6cf6ad&&_0x6cf6ad[_0x58e709([0x61,0x6c,0x67])]==_0x58e709([0x45,0x53,0x32,0x35,0x36])||(_0x573958=!0x1);}async function _0x566ce0(_0x2cd7aa,_0x3f54e7,_0x3f0e6d){const _0x2a977c=window[_0x58e709([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x58e709([0x66,0x72,0x6f,0x6d])](_0x1fb728(_0x3f0e6d),_0x42a709=>_0x42a709[_0x58e709([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x141e9c=new window[(_0x58e709([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x58e709([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2cd7aa+_0x58e709([0x2e])+_0x3f54e7),_0x4151f2=window[_0x58e709([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x58e709([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4151f2)return;const _0x20b532=await _0x4151f2[_0x58e709([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x58e709([0x6a,0x77,0x6b]),_0xf4c30c,{[_0x58e709([0x6e,0x61,0x6d,0x65])]:_0x58e709([0x45,0x43,0x44,0x53,0x41]),[_0x58e709([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x58e709([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x58e709([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4151f2[_0x58e709([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x58e709([0x6e,0x61,0x6d,0x65])]:_0x58e709([0x45,0x43,0x44,0x53,0x41]),[_0x58e709([0x68,0x61,0x73,0x68])]:{[_0x58e709([0x6e,0x61,0x6d,0x65])]:_0x58e709([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x20b532,_0x2a977c,_0x141e9c)||(_0x573958=!0x1);}}function _0x362b97(_0x452be5){return _0x452be5[_0x58e709([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x58e709([0x65,0x79]))?JSON[_0x58e709([0x70,0x61,0x72,0x73,0x65])](_0x1fb728(_0x452be5)):null;}function _0x1fb728(_0xc9868d){return window[_0x58e709([0x61,0x74,0x6f,0x62])](_0xc9868d[_0x58e709([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x58e709([0x2b]))[_0x58e709([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x58e709([0x2f])));}function _0x248353(_0x1bf303){let _0xa1dafd=0x1505;function _0x13f665(_0x3439db){for(let _0x2fd35b=0x0;_0x2fd35b<_0x3439db[_0x58e709([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2fd35b++){const _0x4e9954=_0x3439db[_0x58e709([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2fd35b);_0xa1dafd=(_0xa1dafd<<0x5)+_0xa1dafd+_0x4e9954,_0xa1dafd&=_0xa1dafd;}}function _0x5e5cf3(_0x2c83f1){Array[_0x58e709([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2c83f1)?_0x2c83f1[_0x58e709([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5e5cf3):_0x2c83f1&&typeof _0x2c83f1==_0x58e709([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x58e709([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2c83f1)[_0x58e709([0x73,0x6f,0x72,0x74])]()[_0x58e709([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3337c1,_0x2b0ef7])=>{_0x13f665(_0x3337c1),_0x5e5cf3(_0x2b0ef7);}):_0x13f665(window[_0x58e709([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2c83f1));}return _0x5e5cf3(_0x1bf303),_0xa1dafd>>>0x0;}function _0x19bd1f(_0x4fc8d0){return _0x4fc8d0[_0x58e709([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x58e709([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x58e709([0x30]));}function _0x175bab(_0x152dbd){return _0x152dbd[_0x58e709([0x73,0x70,0x6c,0x69,0x74])]('')[_0x58e709([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x58e709([0x6a,0x6f,0x69,0x6e])]('');}function _0x2ae972(){}function _0x58e709(_0x1ac701){return _0x1ac701['map'](_0x4ad5af=>String['fromCharCode'](_0x4ad5af))['join']('');}_0x402cbc(await _0x18e666());}(this);}['_moveSelectionToFootnoteDefinition'](_0x3fd70c){const {plugins:_0xb515dc,editing:_0x46f6ea,model:_0x339803}=this['editor'],_0x1fe42f=_0xb515dc['get'](c)['getFootnote'](_0x3fd70c);return!!_0x1fe42f&&(_0x339803['change'](_0x182a00=>{_0x182a00['setSelection'](_0x182a00['createPositionAt'](_0x1fe42f['definition'],'end'));}),_0x46f6ea['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x1d4a3e){const {plugins:_0x4f4c59,editing:_0xc04bb4,model:_0x5d7c20}=this['editor'],_0x54102e=_0x4f4c59['get'](c)['getFootnote'](_0x1d4a3e);return!!_0x54102e&&(_0x5d7c20['change'](_0x2e6aef=>{_0x2e6aef['setSelection'](_0x54102e['reference'],'on');}),_0xc04bb4['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x23c341}=this['editor']['model'],_0xe5348b=this['editor']['config']['get']('footnotes.multiBlock');_0x23c341['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x23c341['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x23c341['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0xe5348b?_0x23c341['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x23c341['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x23c341['addChildCheck'](_0x39301f=>{for(const _0x269a46 of _0x39301f)if('footnoteDefinition'===_0x269a46['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x52656a}=this,{conversion:_0x408fc4,editing:_0x169415}=_0x52656a,{t:t}=_0x52656a['locale'];_0x408fc4['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x4fbf4d,{writer:_0xb4f83c,consumable:_0x37d8c1})=>{const _0x2f6d61=_0x4fbf4d['getChild'](0x0);if(!_0x2f6d61||!_0x2f6d61['is']('element','a'))return null;const _0x4ac098=_0x2f6d61['getAttribute']('href')||'';if(!_0x4ac098['startsWith']('#'))return null;const _0xe18f97=_0x4ac098['replace'](/^#/,'');if(!_0xe18f97)return null;_0x37d8c1['consume'](_0x2f6d61,{'name':!0x0,'attributes':['href']});for(const {item:_0x56c7f8}of _0x169415['view']['createRangeIn'](_0x2f6d61))_0x56c7f8['is']('$textProxy')?_0x37d8c1['consume'](_0x56c7f8['textNode'],{'name':!0x0}):_0x56c7f8['is']('element')&&_0x37d8c1['consume'](_0x56c7f8,{'name':!0x0});return _0xb4f83c['createElement']('footnoteRef',{'footnoteId':_0xe18f97});}}),_0x408fc4['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x4fda52,{writer:_0x30f5f6})=>D(_0x4fda52,_0x30f5f6)}),_0x408fc4['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x201781,{writer:_0x5cde31})=>{const _0x34535b=_0x201781['getAttribute']('footnoteCounter');return _0x10baaf(D(_0x201781,_0x5cde31),_0x5cde31,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x34535b)});}});}['_defineDefinitionsConverters'](){const {editor:_0x5be382}=this,{t:t}=_0x5be382['locale'],{conversion:_0x5a22bd}=_0x5be382;_0x5a22bd['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x5a22bd['for']('upcast')['add'](_0x49a13c=>{_0x49a13c['on']('element:ol',(_0x2338cf,_0xc5be67,_0xcdeefe)=>{const _0xcfaa4d=_0xc5be67['viewItem'];if(!_0xcfaa4d['hasClass']('footnotes-list')||!_0xc5be67['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0xcdeefe['consumable']['consume'](_0xcfaa4d,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x23080f,modelCursor:_0x4836af}=_0xcdeefe['convertChildren'](_0xc5be67['viewItem'],_0xc5be67['modelCursor']);_0xc5be67['modelRange']=_0x23080f,_0xc5be67['modelCursor']=_0x4836af;}),_0x49a13c['on']('element:hr',(_0x34efad,_0x599531,_0x18cdab)=>{const _0x4f4185=_0x599531['viewItem'];_0x4f4185['hasClass']('footnotes-divider')&&_0x599531['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x18cdab['consumable']['consume'](_0x4f4185,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x5a22bd['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x48eb1d,{writer:_0x1d37e0})=>g(_0x1d37e0)}),_0x5a22bd['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x564318,{writer:_0x3a9aae})=>{const _0x15b4e6=g(_0x3a9aae,{'data-footnotes-list-label':t('Footnotes')}),_0x507373=_0x10baaf(_0x15b4e6,_0x3a9aae,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x3a9aae['setCustomProperty']('footnotesDefinitions',!0x0,_0x507373),_0x507373;}});}['_defineDefinitionConverters'](){const {editor:_0x151c33}=this,{conversion:_0x4a1c23,locale:_0xbd485b}=_0x151c33,_0x2be8f9=_0x151c33['config']['get']('footnotes.multiBlock');_0x4a1c23['for']('upcast')['add'](_0x4d2bae=>{_0x4d2bae['on']('element:li',(_0xc30899,_0x4d1cbe,_0x1a51d8)=>{const _0x539ada=_0x4d1cbe['viewItem'];if(!_0x539ada['hasClass']('footnote-definition')||!_0x539ada['getAttribute']('id'))return;const _0x42d9c2=_0x539ada['parent'];if(!_0x42d9c2['is']('element','ol')||!_0x42d9c2['hasClass']('footnotes-list'))return;if(!_0x1a51d8['consumable']['test'](_0x539ada,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x20f9eb=_0x1a51d8['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x539ada['getAttribute']('id')});if(!_0x1a51d8['safeInsert'](_0x20f9eb,_0x4d1cbe['modelCursor']))return;_0x1a51d8['consumable']['consume'](_0x539ada,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x3839d7=Array['from'](_0x539ada['getChildren']())['find'](_0x26d167=>_0x26d167['is']('element')&&_0x26d167['hasClass']('footnote-content'));for(const _0xaa22ea of _0x539ada['getChildren']())_0xaa22ea['is']('element')&&(_0x1a51d8['consumable']['consume'](_0xaa22ea,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x1a51d8['consumable']['consume'](_0xaa22ea,{'name':!0x0,'classes':'footnote-content'}));if(_0x3839d7){if(_0x2be8f9)_0x1a51d8['convertChildren'](_0x3839d7,_0x20f9eb);else{const _0x52b21f=_0x1a51d8['writer']['createElement']('footnoteInlineContent');_0x1a51d8['writer']['insert'](_0x52b21f,_0x20f9eb),_0x1a51d8['convertChildren'](_0x3839d7,_0x52b21f);}}_0x1a51d8['updateConversionResult'](_0x20f9eb,_0x4d1cbe);});}),_0x4a1c23['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x50323f,{writer:_0x3e93f7})=>v(_0x50323f,_0x3e93f7,_0xbd485b,{'dataPipeline':!0x0})}),_0x4a1c23['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x5be47d,{writer:_0x324038})=>v(_0x5be47d,_0x324038,_0xbd485b)});}['_defineBogusParagraphConverters'](){const {editor:_0x31f3e4}=this,{conversion:_0x1aa4a}=_0x31f3e4;_0x31f3e4['config']['get']('footnotes.multiBlock')?(_0x1aa4a['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x1aa4a['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x31f3e4['model']['document'],'change:data',()=>{!function(_0x2ff6ff,_0x26c68b){const _0x4ad18a=_0x2ff6ff['document']['differ'],_0x121e6b=new Set();for(const _0x1c6fc7 of _0x4ad18a['getChanges']()){const _0x1ed2da='attribute'==_0x1c6fc7['type']?_0x1c6fc7['range']['start']['parent']:_0x1c6fc7['position']['parent'];_0x1ed2da['is']('element','footnoteDefinition')&&_0x121e6b['add'](_0x1ed2da);}for(const _0x422d0b of _0x121e6b['values']()){const _0x47886d=Array['from'](_0x422d0b['getChildren']())['filter'](_0x20ce8e=>p(_0x20ce8e,_0x26c68b['mapper']));for(const _0x238b9f of _0x47886d)_0x26c68b['reconvertItem'](_0x238b9f);}}(_0x31f3e4['model'],_0x31f3e4['editing']);})):(_0x1aa4a['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x1aa4a['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x1d7e5f,{writer:_0x573809})=>{const _0x4942ce=_0x573809['createContainerElement']('span');return _0x573809['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x4942ce),_0x4942ce;}}));}['_defineKeyboardHandlers'](){const {editor:_0xfad60}=this,{editing:_0x12f94f,t:t}=_0xfad60,_0x175376=_0xfad60['model']['document']['selection'];_0xfad60['keystrokes']['set']('CTRL+Shift+D','insertFootnote'),_0xfad60['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Shift+D'}]}),this['listenTo'](_0x12f94f['view']['document'],'enter',(_0x2d47b3,_0x2a6c9a)=>{const _0x47bd9a=function(_0x3539e4){const _0x1f8286=_0x3539e4['getSelectedElement']();if(_0x1f8286?.['is']('element','footnoteRef'))return _0x1f8286;return null;}(_0x175376);if(_0x47bd9a){const _0x2165f3=_0x47bd9a['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x2165f3),_0x2a6c9a['preventDefault'](),_0x2d47b3['stop']();}},{'context':_0x46acc9});}['_defineClickHandlers'](){const {editor:_0x1ab5d3}=this,{editing:_0x4de2c0}=_0x1ab5d3;_0x1ab5d3['editing']['view']['addObserver'](_0x3c43fc),_0x1ab5d3['editing']['view']['addObserver'](_0x4144eb);let _0x3b3cec=!0x1;this['listenTo'](_0x4de2c0['view']['document'],'pointerdown',(_0x4c8167,_0x7d2ad4)=>{const {target:_0x18ba44}=_0x7d2ad4,_0x570b5d=_0x4de2c0['view']['document']['selection'];_0x3b3cec=!!(_0x18ba44['is']('element','a')&&_0x18ba44['parent']?.['is']('element','sup')&&_0x18ba44['parent']['hasClass']('footnote'))&&_0x570b5d['getSelectedElement']()===_0x18ba44['parent'];},{'priority':'high'}),this['listenTo'](_0x4de2c0['view']['document'],'click',(_0x26b928,_0x5c7edf)=>{const {target:_0x160c8c}=_0x5c7edf;if(!_0x160c8c['is']('element','a'))return;if(_0x160c8c['parent']?.['is']('element','sup')&&_0x160c8c['parent']['hasClass']('footnote')&&!_0x3b3cec)return void _0x5c7edf['preventDefault']();let _0x48455f=_0x160c8c['getAttribute']('href');if(!_0x48455f?.['startsWith']('#'))return;_0x48455f=_0x48455f['slice'](0x1);let _0x370857=!0x1;(_0x48455f['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x48455f['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x48455f))&&(_0x370857=!0x0),_0x370857&&(_0x5c7edf['preventDefault'](),_0x26b928['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x7f7d30}={}){return(_0x9b6048,{writer:_0x30679e})=>{if(!h(_0x9b6048))return null;if(!_0x7f7d30)return _0x30679e['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x3a0e93=_0x30679e['createContainerElement']('p');return _0x30679e['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x3a0e93),_0x3a0e93;};}function h(_0x28b83a){const {parent:_0x48742b}=_0x28b83a;if(!_0x48742b?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x48742b['childCount'])return!0x1;for(const _0x459049 of _0x28b83a['getAttributeKeys']())if(!_0x459049['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x459049)return!0x1;return!0x0;}function p(_0x2ae508,_0x2da218){if(!_0x2ae508['is']('element','paragraph'))return!0x1;const _0x4bfb86=_0x2da218['toViewElement'](_0x2ae508);return!!_0x4bfb86&&h(_0x2ae508)!==_0x4bfb86['is']('element','span');}function J(_0x42aa55){return _0x46acc9(_0x42aa55)&&_0x42aa55['is']('containerElement')&&!!_0x42aa55['getCustomProperty']('footnotesDefinitions');}function g(_0x41444e,_0x252947={}){const _0x22dec9=_0x41444e['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x3d619f=_0x41444e['createContainerElement']('ol',{'class':'footnotes-list'},_0x41444e['createSlot']());return _0x41444e['createContainerElement']('div',{'class':'footnotes',..._0x252947},[_0x22dec9,_0x3d619f]);}function D(_0x1dd3b6,_0x179f4b){const _0x24ebab=_0x1dd3b6['getAttribute']('footnoteId'),_0x29b014=_0x1dd3b6['getAttribute']('footnoteCounter'),_0x3de973=_0x179f4b['createUIElement']('a',{'href':'#'+_0x24ebab},function(_0x489100){const _0x283c2a=this['toDomElement'](_0x489100);return _0x283c2a['textContent']=_0x29b014,_0x283c2a;}),_0xf579a5=_0x179f4b['createContainerElement']('sup',{'id':'ref-'+_0x24ebab,'class':'footnote'},[_0x3de973]);return _0xf579a5['getFillerOffset']=()=>null,_0xf579a5;}function v(_0x36d852,_0x587db1,_0xb23297,{dataPipeline:_0x25d629}={}){const {t:t}=_0xb23297,_0x4a98c8=_0x36d852['getAttribute']('footnoteId'),_0x2b57e8=_0x587db1['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x4a98c8},function(_0x3a7a09){const _0x57485d=this['toDomElement'](_0x3a7a09);return _0x57485d['innerText']='^',_0x57485d;}),_0x13320d=_0x25d629?_0x587db1['createContainerElement']('div',{'class':'footnote-content'}):_0xe86660(_0x587db1['createEditableElement']('div',{'class':'footnote-content'}),_0x587db1,{'label':t('Footnote\x20content.')});return _0x587db1['insert'](_0x587db1['createPositionAt'](_0x13320d,0x0),_0x587db1['createSlot']()),_0x587db1['createContainerElement']('li',{'class':'footnote-definition','id':_0x4a98c8},[_0x2b57e8,_0x13320d]);}class e extends _0x581f59{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x139329];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x2ffdec}=this,{plugins:_0x38b767,model:_0x6a56f1}=_0x2ffdec,_0x4281ac=_0x38b767['get'](_0x139329),_0x3d9f52=_0x38b767['get'](c);this['listenTo'](_0x4281ac,'outputTransformation',(_0x23191d,_0x534696)=>{const _0x7009c7=function(_0x18ae9e,_0x2392ef){const _0x5db43a=new Set();for(const {item:_0x5e63bd}of _0x18ae9e['createRangeIn'](_0x2392ef))_0x5e63bd['is']('element','footnoteRef')&&_0x5db43a['add'](_0x5e63bd['getAttribute']('footnoteId'));return Array['from'](_0x5db43a);}(_0x6a56f1,_0x534696['content']);if(!_0x7009c7['length'])return;const _0x4e6149=_0x3d9f52['getFootnotes'](),_0x1b31e6=_0x7009c7['reduce']((_0x15afd2,_0x5828a5)=>{const _0x5265d1=_0x4e6149['find'](_0x722a46=>_0x722a46['id']===_0x5828a5);if(_0x5265d1){const _0x12bbe7=_0x2ffdec['data']['toView'](_0x5265d1['definition'],{'isClipboardPipeline':!0x0}),_0x4d7c2f=_0x2ffdec['data']['htmlProcessor']['toData'](_0x12bbe7);_0x15afd2[_0x5265d1['id']]=_0x4d7c2f;}return _0x15afd2;},Object['create'](null));_0x534696['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x1b31e6));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x9de04f}=this,{model:_0x56b676,plugins:_0x5924ac}=_0x9de04f,{view:_0xe78245}=_0x9de04f['editing'],_0x4b44e8=_0x5924ac['get'](_0x139329),_0x622a69=_0x5924ac['get'](c);let _0x563e5f=null;this['listenTo'](_0xe78245['document'],'clipboardInput',(_0x2cb548,_0x216df9)=>{const _0x2cad8b=_0x216df9['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x563e5f=_0x2cad8b?JSON['parse'](_0x2cad8b):null;}),this['listenTo'](_0x4b44e8,'contentInsertion',(_0x268a82,_0x168930)=>{if(!_0x563e5f)return;const _0x4d5f0d=_0x168930['sourceEditorId']===this['editor']['id'];_0x4d5f0d&&'drop'===_0x168930['method']||_0x56b676['change'](_0x2c3ecb=>{!function(_0x5512db,_0x3f18c6){const _0x5c0ceb=[];for(const {item:_0x3cacc4}of _0x5512db['createRangeIn'](_0x3f18c6))_0x3cacc4['is']('element','footnotesDefinitions')&&_0x5c0ceb['push'](_0x3cacc4);for(const _0x1ce744 of _0x5c0ceb)_0x5512db['remove'](_0x1ce744);}(_0x2c3ecb,_0x168930['content']);let _0x19e027=_0x622a69['getFootnotesDefinitionsObjectElement']();if(!_0x19e027){const _0x374246=_0x56b676['document']['selection']['getFirstRange']()['root'];_0x19e027=_0x622a69['_insertEmptyFootnotesDefinitionsContainer'](_0x2c3ecb,_0x374246);}const _0x22a19b=function(_0x2799bb,_0x34aa78,_0x4dd2e1){const _0x1c38a6=Object['create'](null);for(const {item:_0x7505b2}of _0x2799bb['createRangeIn'](_0x34aa78))if(_0x7505b2['is']('element','footnoteRef')){const _0x58a8cd=_0x7505b2['getAttribute']('footnoteId');if(!_0x4dd2e1(_0x58a8cd))continue;_0x1c38a6[_0x58a8cd]||(_0x1c38a6[_0x58a8cd]=_0x3b0ffc()),_0x2799bb['setAttribute']('footnoteId',_0x1c38a6[_0x58a8cd],_0x7505b2);}return _0x1c38a6;}(_0x2c3ecb,_0x168930['content'],_0x2b1516=>!_0x4d5f0d||null!==_0x622a69['getFootnote'](_0x2b1516));for(const [_0x574bba,_0x5e01dc]of Object['entries'](_0x563e5f)){const _0x51eeff=_0x22a19b[_0x574bba]||_0x574bba,_0x6d8bcd=_0x2c3ecb['createElement']('footnoteDefinition',{'footnoteId':_0x51eeff}),_0x58b816=_0x9de04f['data']['htmlProcessor']['toView'](_0x5e01dc),_0x10db20=_0x9de04f['data']['toModel'](_0x58b816,_0x6d8bcd);_0x2c3ecb['append'](_0x10db20,_0x6d8bcd),_0x2c3ecb['insert'](_0x6d8bcd,_0x19e027,'end');}_0x563e5f=null;});});}}class i extends _0x581f59{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x42b6bf}=this,{componentFactory:_0x5eed92}=_0x42b6bf['ui'];_0x5eed92['add']('insertFootnote',x(_0x42b6bf,_0x11dc3b)),_0x5eed92['add']('menuBar:insertFootnote',x(_0x42b6bf,_0x53bd40)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5cac20=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x484d24;for(const _0x1a4ea3 in _0x5cac20){const _0x3f7b2d=_0x1a4ea3,_0x50b704=_0x5cac20[_0x3f7b2d];if('footnotesLicenseKeyValid'==_0x50b704||'footnotesLicenseKeyInvalid'==_0x50b704||'footnotesLicenseKeyExpired'==_0x50b704||'footnotesLicenseKeyDomainLimit'==_0x50b704||'footnotesLicenseKeyNotAllowed'==_0x50b704||'footnotesLicenseKeyEvaluationLimit'==_0x50b704||'footnotesLicenseKeyTrialLimit'==_0x50b704||'footnotesLicenseKeyUsageLimit'==_0x50b704){delete _0x5cac20[_0x3f7b2d],_0x484d24=_0x50b704,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x484d24&&_0x5cac20['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x484d24&&_0x5cac20['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x484d24&&_0x5cac20['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x484d24&&_0x5cac20['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x484d24&&_0x5cac20['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x484d24&&_0x5cac20['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x484d24&&_0x5cac20['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function x(_0x1ea2e4,_0x45b13d){const _0x5524c2=_0x1ea2e4['commands']['get']('insertFootnote');return _0x3bf0e2=>{const {t:t}=_0x3bf0e2,_0x2b5700=new _0x45b13d(_0x3bf0e2),_0x31c6fd=_0x2b5700 instanceof _0x53bd40;return _0x2b5700['bind']('isEnabled')['to'](_0x5524c2,'isEnabled'),_0x2b5700['set']({'label':t(_0x31c6fd?'Footnote':'Insert\x20footnote'),'icon':_0x18c523,'tooltip':!0x0}),_0x2b5700['on']('execute',()=>{_0x5524c2['execute'](),_0x1ea2e4['editing']['view']['focus']();}),_0x2b5700;};}class nt extends _0x581f59{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const Q=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x1a23cd{['refresh'](){const {editor:_0x36866e}=this,_0x380345=_0x36866e['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x380345,this['value']=_0x380345?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x52e5d7}){const {editor:_0x5d6016}=this,_0x365730=_0x5d6016['plugins']['get'](c),_0x3acac0=_0x365730['getFootnotesDefinitionsObjectElement']();_0x3acac0&&Q['includes'](_0x52e5d7)&&_0x5d6016['model']['change'](_0x853594=>{_0x853594['setAttribute']('footnotesListStyle',_0x52e5d7,_0x3acac0),_0x365730['_updateFootnotesCounters'](_0x853594);});}}class b extends _0x1a23cd{['refresh'](){const {editor:_0x32d58b}=this,_0x2c2bb0=_0x32d58b['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x2c2bb0,this['value']=_0x2c2bb0?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x22e052}){const {editor:_0x3c4734}=this,_0x198ab5=_0x3c4734['plugins']['get'](c),_0x306f6c=_0x198ab5['getFootnotesDefinitionsObjectElement']();_0x306f6c&&Number['isInteger'](_0x22e052)&&_0x3c4734['model']['change'](_0x2d3819=>{_0x2d3819['setAttribute']('footnotesListStart',_0x22e052,_0x306f6c),_0x198ab5['_updateFootnotesCounters'](_0x2d3819);});}}class P extends _0x581f59{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x39d876}=this;_0x39d876['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x39d876['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x39d876['commands']['add']('footnotesStyle',new S(_0x39d876)),_0x39d876['commands']['add']('footnotesStart',new b(_0x39d876)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x1c4525}=this,{schema:_0x43908e}=_0x1c4525['model'];_0x43908e['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x4c304f}=this,{conversion:_0x24991f,model:_0xdad85a}=_0x4c304f,{schema:_0x32630b}=_0xdad85a;_0x24991f['for']('upcast')['add'](_0x317d6f=>{_0x317d6f['on']('element:ol',(_0x1af7c9,_0x42d10d,_0x3747ac)=>{const _0x33b0d5=_0x42d10d['viewItem'],_0x2e4900=_0x42d10d['modelCursor']?.['parent'];_0x33b0d5['hasClass']('footnotes-list')&&_0x2e4900?.['is']('element','footnotesDefinitions')&&(function(_0x5f5d0d,_0x4cb605,_0x4e2de1,_0x2a2ab5){if(!_0x2a2ab5['checkAttribute'](_0x4cb605,'footnotesListStart'))return;let _0x55651a=0x1;const _0x53044f=_0x4e2de1['consumable']['consume'](_0x5f5d0d,{'attributes':'start'});if(_0x53044f){const _0x49c143=Number['parseInt'](_0x5f5d0d['getAttribute']('start'),0xa);Number['isNaN'](_0x49c143)||(_0x55651a=_0x49c143);}!_0x53044f&&_0x4cb605['hasAttribute']('footnotesListStart')||_0x4e2de1['writer']['setAttribute']('footnotesListStart',_0x55651a,_0x4cb605);}(_0x33b0d5,_0x2e4900,_0x3747ac,_0x32630b),function(_0x18f3f3,_0x2af9e4,_0x44ee38,_0x5a6ba7){if(!_0x5a6ba7['checkAttribute'](_0x2af9e4,'footnotesListStyle'))return;let _0x49f2e2='decimal',_0x3a9917=!0x1;if(_0x44ee38['consumable']['consume'](_0x18f3f3,{'attributes':'type'})){const _0x78c65d={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x18f3f3['getAttribute']('type')];_0x78c65d&&(_0x49f2e2=_0x78c65d),_0x3a9917=!0x0;}_0x44ee38['consumable']['consume'](_0x18f3f3,{'styles':'list-style-type'})&&(_0x49f2e2=_0x18f3f3['getStyle']('list-style-type'),_0x3a9917=!0x0),!_0x3a9917&&_0x2af9e4['hasAttribute']('footnotesListStyle')||_0x44ee38['writer']['setAttribute']('footnotesListStyle',_0x49f2e2,_0x2af9e4);}(_0x33b0d5,_0x2e4900,_0x3747ac,_0x32630b));});}),_0x24991f['for']('downcast')['add'](_0x19b61b=>{_0x19b61b['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x8d61b0,_0x2ff83f,_0x1fb387)=>{if(!_0x1fb387['consumable']['consume'](_0x2ff83f['item'],_0x8d61b0['name']))return;const _0x261b52=C(_0x2ff83f['item'],_0x1fb387['mapper']),{attributeNewValue:_0x235a16}=_0x2ff83f;null==_0x235a16||0x1===_0x235a16?_0x1fb387['writer']['removeAttribute']('start',_0x261b52):_0x1fb387['writer']['setAttribute']('start',String(_0x235a16),_0x261b52);}),_0x19b61b['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x5db3a8,_0x548bd7,_0x405b49)=>{if(!_0x405b49['consumable']['consume'](_0x548bd7['item'],_0x5db3a8['name']))return;const _0x2ca7c5=C(_0x548bd7['item'],_0x405b49['mapper']),{attributeNewValue:_0x3def8c}=_0x548bd7;_0x3def8c&&'decimal'!==_0x3def8c?_0x405b49['writer']['setStyle']('list-style-type',_0x3def8c,_0x2ca7c5):_0x405b49['writer']['removeStyle']('list-style-type',_0x2ca7c5);});});}['_definePostfixer'](){const {editor:_0x2eaea4}=this,{model:_0x314df6}=_0x2eaea4,_0x209a0e=_0x2eaea4['plugins']['get'](c),_0x1f18a3=this['_getDefaultListStyle'](),_0xf787ab=this['_getDefaultStartIndex']();_0x314df6['document']['registerPostFixer'](_0x5ec5aa=>{const _0x51b1c3=_0x314df6['document']['differ']['getChanges']();let _0x2f9ce0=!0x1;for(const _0xc16a23 of _0x51b1c3){if('insert'!==_0xc16a23['type']||'$text'===_0xc16a23['name'])continue;const _0x117dc7=_0x314df6['createRangeOn'](_0xc16a23['position']['nodeAfter']);for(const _0x2b1419 of _0x117dc7['getItems']())_0x2b1419['is']('element','footnotesDefinitions')&&(!_0x2b1419['hasAttribute']('footnotesListStart')&&_0x314df6['schema']['checkAttribute'](_0x2b1419,'footnotesListStart')&&(_0x5ec5aa['setAttribute']('footnotesListStart',_0xf787ab,_0x2b1419),_0x2f9ce0=!0x0),!_0x2b1419['hasAttribute']('footnotesListStyle')&&_0x314df6['schema']['checkAttribute'](_0x2b1419,'footnotesListStyle')&&(_0x5ec5aa['setAttribute']('footnotesListStyle',_0x1f18a3,_0x2b1419),_0x2f9ce0=!0x0));}return _0x2f9ce0&&_0x209a0e['_updateFootnotesCounters'](_0x5ec5aa),_0x2f9ce0;});}['_defineFormatter'](){const {editor:_0x2c6699}=this;_0x2c6699['plugins']['get'](c)['setFootnoteFormatter'](_0x2c9389=>this['_formatFootnoteListValue'](_0x2c9389));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x3417f2,value:_0x2b5d15,digits:_0x49eea0}){const _0x4b91e9=_0x3417f2['getAttribute']('footnotesListStyle'),_0x427ff5=_0x3417f2['getAttribute']('footnotesListStart'),_0xa74a2f=Math['floor'](_0x2b5d15)+(_0x427ff5??0x1)-0x1;switch(_0x4b91e9){case'decimal-leading-zero':return function(_0x17c8a9,_0x30c720){return String(_0x17c8a9)['padStart'](_0x30c720,'0');}(_0xa74a2f,Math['max'](0x2,_0x49eea0));case'lower-alpha':case'lower-latin':return M(_0xa74a2f,!0x1);case'upper-alpha':case'upper-latin':return M(_0xa74a2f,!0x0);case'lower-roman':return V(_0xa74a2f,!0x1);case'upper-roman':return V(_0xa74a2f,!0x0);default:return String(_0xa74a2f);}}}function C(_0x4a5147,_0x2a9f3c){const _0x3ee9ac=_0x2a9f3c['toViewElement'](_0x4a5147);return Array['from'](_0x3ee9ac['getChildren']())['find'](_0x1ac217=>_0x1ac217['is']('element','ol')&&_0x1ac217['hasClass']('footnotes-list'));}function M(_0x2a734f,_0x569393){let _0x7ef04e='',_0x2bada1=_0x2a734f;for(;_0x2bada1>0x0;){const _0x595fb0=(_0x2bada1-0x1)%0x1a;_0x7ef04e=String['fromCharCode'](0x61+_0x595fb0)+_0x7ef04e,_0x2bada1=Math['floor']((_0x2bada1-0x1)/0x1a);}return _0x569393?_0x7ef04e['toUpperCase']():_0x7ef04e;}const N=[{'value':0x3e8,'numeral':'M'},{'value':0x384,'numeral':'CM'},{'value':0x1f4,'numeral':'D'},{'value':0x190,'numeral':'CD'},{'value':0x64,'numeral':'C'},{'value':0x5a,'numeral':'XC'},{'value':0x32,'numeral':'L'},{'value':0x28,'numeral':'XL'},{'value':0xa,'numeral':'X'},{'value':0x9,'numeral':'IX'},{'value':0x5,'numeral':'V'},{'value':0x4,'numeral':'IV'},{'value':0x1,'numeral':'I'}];function V(_0x288de8,_0x49c235){let _0x3685a7='',_0x40f686=_0x288de8;for(const {value:_0x56d76c,numeral:_0x2c5287}of N)for(;_0x40f686>=_0x56d76c;)_0x3685a7+=_0x2c5287,_0x40f686-=_0x56d76c;return _0x49c235?_0x3685a7:_0x3685a7['toLowerCase']();}class H extends _0x1cdf56{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new et();['keystrokes']=new ot();['focusables']=new _0x312a0c();['focusCycler'];constructor(_0x5ecd8b,{styleButtonViews:_0x527cc4,styleGridAriaLabel:_0x4a9c3b}){super(_0x5ecd8b),(this['focusCycler']=new _0x59bf31({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x527cc4,_0x4a9c3b),[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 _0x3199c9 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x3199c9['element']);_0xcf4ad2({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>rt['window']['getComputedStyle'](this['stylesView']['element'])['getPropertyValue']('grid-template-columns')['split']('\x20')['length'],'uiLanguageDirection':this['locale']&&this['locale']['uiLanguageDirection']});}if(this['startIndexFieldView']){this['focusables']['add'](this['startIndexFieldView']),this['focusTracker']['add'](this['startIndexFieldView']['element']);const _0x27d882=_0x366ffa=>_0x366ffa['stopPropagation']();this['keystrokes']['set']('arrowright',_0x27d882),this['keystrokes']['set']('arrowleft',_0x27d882),this['keystrokes']['set']('arrowup',_0x27d882),this['keystrokes']['set']('arrowdown',_0x27d882);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x5dec99,_0x28d4d6){const _0x444083=new _0x1cdf56(this['locale']);return _0x444083['children']=_0x444083['createCollection'](),_0x444083['children']['addMany'](_0x5dec99),_0x444083['setTemplate']({'tag':'div','attributes':{'aria-label':_0x28d4d6,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x444083['children']}),_0x444083['children']['delegate']('execute')['to'](this),_0x444083['focus']=function(){for(const _0x482cfb of this['children'])if(_0x482cfb instanceof _0x11dc3b&&_0x482cfb['isOn'])return void _0x482cfb['focus']();this['children']['first']['focus']();},_0x444083['focusTracker']=new et(),_0x444083['keystrokes']=new ot(),_0x444083['render'](),_0x444083['keystrokes']['listenTo'](_0x444083['element']),this['children']['add'](_0x444083),_0x444083;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x55ccaf=this['_createStartIndexPropertyView'](),_0x1cbe6a=[_0x55ccaf],_0x233877=new tt(this['locale'],_0x1cbe6a);return _0x233877['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x233877['buttonView']['bind']('isEnabled')['toMany'](_0x1cbe6a,'isEnabled',(..._0xd2dd79)=>_0xd2dd79['some'](_0x272539=>_0x272539)),_0x233877['buttonView']['on']('change:isEnabled',(_0x5d1669,_0x254360,_0x4ac4bd)=>{_0x4ac4bd||(_0x233877['isCollapsed']=!0x0);}),this['children']['add'](_0x233877),[_0x55ccaf,_0x233877];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x4d4067=new st(this['locale'],it);return _0x4d4067['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x4d4067['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x4d4067['fieldView']['on']('input',()=>{const _0x3ffe4e=_0x4d4067['fieldView']['element'],_0x3365ab=_0x3ffe4e['valueAsNumber'];Number['isNaN'](_0x3365ab)?_0x4d4067['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x3ffe4e['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x3365ab}):_0x4d4067['errorText']=t(_0x3365ab<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x4d4067;}}class j extends _0x581f59{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x310f8a,_0x16f6bf];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x52920a}=this,{componentFactory:_0x337e14}=_0x52920a['ui'];_0x52920a['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x337e14['add']('footnotesStyle',function(_0x4d9dd0){return _0x468189=>{const {t:t}=_0x468189,_0x2500f0=_0x4d9dd0['commands']['get']('footnotesStyle'),_0x31e704=_0x3d8114(_0x468189),{buttonView:_0x5b7acd}=_0x31e704;return _0x31e704['class']='ck-footnotes-styles-dropdown',_0x31e704['bind']('isEnabled')['to'](_0x2500f0,'isEnabled'),_0x5b7acd['set']({'label':t('Footnotes\x20style'),'icon':_0x18c523,'tooltip':!0x0}),_0x31e704['once']('change:isOpen',()=>{const _0x22318b=function({editor:_0x7f4192,dropdownView:_0x1f993a}){const {t:t}=_0x7f4192['locale'],_0x23825b=t('Footnotes\x20definitions\x20styles'),_0x1ea336=function(_0x12162a){const t=_0x12162a['locale']['t'],_0x1c0189=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x237bc8},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x50f5af},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x23bace},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x195e78},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x548fdc},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x50454f}];return _0x1c0189['map'](function(_0x2d54ff){const _0xd17c20=_0x2d54ff['locale'];return({label:_0x2732a9,icon:_0xcf6c09,tooltip:_0xd25e2,style:_0x242839})=>{const _0x2fd221=_0x2d54ff['commands']['get']('footnotesStyle'),_0x5b9fa4=new _0x11dc3b(_0xd17c20);return _0x5b9fa4['set']({'label':_0x2732a9,'icon':_0xcf6c09,'tooltip':_0xd25e2}),_0x5b9fa4['bind']('isOn')['to'](_0x2fd221,'value',_0x547aa4=>_0x547aa4===_0x242839),_0x5b9fa4['bind']('isEnabled')['to'](_0x2fd221,'isEnabled'),_0x5b9fa4['on']('execute',()=>{_0x2d54ff['execute']('footnotesStyle',{'value':_0x242839}),_0x2d54ff['editing']['view']['focus']();}),_0x5b9fa4;};}(_0x12162a));}(_0x7f4192),_0x4771a9=new H(_0x7f4192['locale'],{'styleGridAriaLabel':_0x23825b,'styleButtonViews':_0x1ea336});return _0x4771a9['delegate']('execute')['to'](_0x1f993a),_0x4771a9['on']('footnotesListStart',(_0x37feae,_0x284a80)=>{_0x7f4192['execute']('footnotesStart',{'value':_0x284a80['startIndex']});}),_0x4771a9;}({'editor':_0x4d9dd0,'dropdownView':_0x31e704});_0x31e704['panelView']['children']['add'](_0x22318b);}),_0x31e704;};}(_0x52920a));}['afterInit'](){const {editor:_0xbe8fa5}=this,{t:t}=_0xbe8fa5['locale'],_0x5093c9=_0xbe8fa5['plugins']['get'](_0x16f6bf),{defaultPositions:_0x279a62}=_0x2a82e4;_0x5093c9['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0xbe8fa5['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x2e54eb=>{let _0xcfd30e=_0x2e54eb['getFirstPosition']()?.['parent'];return _0xcfd30e?.['is']('$text')&&(_0xcfd30e=_0xcfd30e['parent']),_0xcfd30e?.['is']('element')?_0xcfd30e['findAncestor'](J):null;},'positions':[_0x279a62['southArrowNorth'],_0x279a62['southArrowNorthMiddleWest'],_0x279a62['southArrowNorthMiddleEast'],_0x279a62['southArrowNorthWest'],_0x279a62['southArrowNorthEast'],_0x279a62['northArrowSouth'],_0x279a62['northArrowSouthMiddleWest'],_0x279a62['northArrowSouthMiddleEast'],_0x279a62['northArrowSouthWest'],_0x279a62['northArrowSouthEast'],_0x279a62['viewportStickyNorth']]});}}class lt extends _0x581f59{static get['pluginName'](){return'FootnotesProperties';}static get['requires'](){return[P,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{nt as Footnotes,e as FootnotesClipboard,r as FootnotesEditing,lt as FootnotesProperties,P as FootnotesPropertiesEditing,j as FootnotesPropertiesUI,b as FootnotesStartCommand,S as FootnotesStyleCommand,c as FootnotesTracker,i as FootnotesUI,w as InsertFootnoteCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-footnotes",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20251103.0",
|
|
4
4
|
"description": "The footnotes feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"type": "module",
|
|
24
24
|
"main": "src/index.js",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
27
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-widget": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20251103.0",
|
|
27
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251103.0",
|
|
28
|
+
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-20251103.0",
|
|
29
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251103.0",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "0.0.0-nightly-20251103.0",
|
|
31
|
+
"@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-20251103.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251103.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20251103.0"
|
|
34
34
|
},
|
|
35
35
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
36
36
|
"author": "CKSource (http://cksource.com/)",
|
package/src/footnotesediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x44a4de}from'ckeditor5/src/core.js';import{isWidget as _0x562ade,toWidget as _0x2c514d,toWidgetEditable as _0xfcf061}from'ckeditor5/src/widget.js';import{uid as _0x3731d1}from'ckeditor5/src/utils.js';import{PointerObserver as _0x24fee1,ClickObserver as _0x80f299}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x2e716e}from'./footnotestracker.js';import{InsertFootnoteCommand as _0xfb83ec}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x44a4de{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x2e716e];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4c121e}=this;_0x4c121e['config']['define']('footnotes.multiBlock',!0x0),_0x4c121e['commands']['add']('insertFootnote',new _0xfb83ec(_0x4c121e)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x47763a){const _0x25fadf=_0x4b62d7([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x17af37=0x47a28506,_0x4bc91d=0x47a5f2de^_0x17af37,_0x5a3d1b=window[_0x4b62d7([0x44,0x61,0x74,0x65])][_0x4b62d7([0x6e,0x6f,0x77])](),_0x2a285e=_0x47763a[_0x4b62d7([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2196d2=new window[(_0x4b62d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a27ce=>{_0x2a285e[_0x4b62d7([0x6f,0x6e,0x63,0x65])](_0x4b62d7([0x72,0x65,0x61,0x64,0x79]),_0x3a27ce);}),_0x1ffae4={[_0x4b62d7([0x6b,0x74,0x79])]:_0x4b62d7([0x45,0x43]),[_0x4b62d7([0x75,0x73,0x65])]:_0x4b62d7([0x73,0x69,0x67]),[_0x4b62d7([0x63,0x72,0x76])]:_0x4b62d7([0x50,0x2d,0x32,0x35,0x36]),[_0x4b62d7([0x78])]:_0x4b62d7([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x4b62d7([0x79])]:_0x4b62d7([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x4b62d7([0x61,0x6c,0x67])]:_0x4b62d7([0x45,0x53,0x32,0x35,0x36])},_0x56ff5f=_0x2a285e[_0x4b62d7([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4b62d7([0x67,0x65,0x74])](_0x4b62d7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3cf280(){let _0x8f20ae,_0x454b4f=null,_0xbae097=null;try{if(_0x56ff5f==_0x4b62d7([0x47,0x50,0x4c]))return _0x4b62d7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x8f20ae=_0x38d2b4(),!_0x8f20ae)return _0x4b62d7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x8f20ae[_0x4b62d7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xbae097=_0x125d08(_0x8f20ae[_0x4b62d7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x8f20ae[_0x4b62d7([0x6a,0x74,0x69])])),await _0x2d2636()?_0x5ad543()?_0x40b347()?_0x4b62d7([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5e8a56()?(_0x8f20ae[_0x4b62d7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4b62d7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x454b4f=_0x3945db(_0x4b62d7([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x8f20ae[_0x4b62d7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4b62d7([0x74,0x72,0x69,0x61,0x6c])&&(_0x454b4f=_0x3945db(_0x4b62d7([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5f217f()):_0x4b62d7([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4b62d7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4b62d7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4b62d7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x40b347(){const _0x3a69dd=[_0x4b62d7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4b62d7([0x74,0x72,0x69,0x61,0x6c])][_0x4b62d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8f20ae[_0x4b62d7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5a3d1b/0x3e8:0xe10*_0x4bc91d;return _0x8f20ae[_0x4b62d7([0x65,0x78,0x70])]<_0x3a69dd;}function _0x5ad543(){const _0x34d283=_0x8f20ae[_0x4b62d7([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x34d283&&(!!_0x34d283[_0x4b62d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b62d7([0x2a]))||!!_0x34d283[_0x4b62d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b62d7([0x46,0x4f,0x4f])));}function _0x5e8a56(){const _0x754d93=_0x8f20ae[_0x4b62d7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x754d93||0x0==_0x754d93[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x9b8a0e}=new URL(window[_0x4b62d7([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x754d93[_0x4b62d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9b8a0e))return!0x0;const _0x4a7a71=_0x9b8a0e[_0x4b62d7([0x73,0x70,0x6c,0x69,0x74])](_0x4b62d7([0x2e]));return _0x754d93[_0x4b62d7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2991ac=>_0x2991ac[_0x4b62d7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b62d7([0x2a])))[_0x4b62d7([0x6d,0x61,0x70])](_0x45fd62=>_0x45fd62[_0x4b62d7([0x73,0x70,0x6c,0x69,0x74])](_0x4b62d7([0x2e])))[_0x4b62d7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4c29d5=>_0x4c29d5[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4a7a71[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4b62d7([0x6d,0x61,0x70])](_0x37722f=>Array(_0x4a7a71[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x37722f[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4b62d7([0x66,0x69,0x6c,0x6c])](_0x37722f[0x0]===_0x4b62d7([0x2a])?_0x4b62d7([0x2a]):'')[_0x4b62d7([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x37722f))[_0x4b62d7([0x73,0x6f,0x6d,0x65])](_0x5a5f46=>_0x4a7a71[_0x4b62d7([0x65,0x76,0x65,0x72,0x79])]((_0x1e9f5a,_0x3c70cb)=>_0x5a5f46[_0x3c70cb]===_0x1e9f5a||_0x5a5f46[_0x3c70cb]===_0x4b62d7([0x2a])));}function _0x5f217f(){return _0x454b4f&&_0xbae097?new window[(_0x4b62d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x35bc80,_0xf6fb08)=>{_0x454b4f[_0x4b62d7([0x74,0x68,0x65,0x6e])](_0x35bc80,_0xf6fb08),_0xbae097[_0x4b62d7([0x74,0x68,0x65,0x6e])](_0x4a1abb=>{_0x4a1abb!=_0x4b62d7([0x56,0x61,0x6c,0x69,0x64])&&_0x35bc80(_0x4a1abb);},_0xf6fb08);}):_0x454b4f||_0xbae097||_0x4b62d7([0x56,0x61,0x6c,0x69,0x64]);}}function _0x125d08(_0x5222d5,_0x43a0b9){return new window[(_0x4b62d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x12b3ac=>{if(_0x52555c())return _0x12b3ac(_0x4b62d7([0x56,0x61,0x6c,0x69,0x64]));_0x2b3979(),_0x2a285e[_0x4b62d7([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4b62d7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4cc59b=!0x1;const _0x2d4738=_0x3731d1();function _0x405752(_0x1b9bd5){return!!_0x1b9bd5&&(typeof _0x1b9bd5===_0x4b62d7([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1b9bd5===_0x4b62d7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1b9bd5[_0x4b62d7([0x74,0x68,0x65,0x6e])]===_0x4b62d7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1b9bd5[_0x4b62d7([0x63,0x61,0x74,0x63,0x68])]===_0x4b62d7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2f6c88(_0x187116){_0x124e65(_0x187116)[_0x4b62d7([0x74,0x68,0x65,0x6e])](_0x195272=>{if(!_0x195272||_0x195272[_0x4b62d7([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4b62d7([0x6f,0x6b]))return _0x4b62d7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2146d1(_0x410497(_0x2d4738+_0x43a0b9))!=_0x195272[_0x4b62d7([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4b62d7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4b62d7([0x56,0x61,0x6c,0x69,0x64]);})[_0x4b62d7([0x74,0x68,0x65,0x6e])](_0x2f02a3=>(_0x5e4a3e(),_0x2f02a3),()=>{const _0x137aa1=_0x33ba30();return null==_0x137aa1?(_0x5e4a3e(),_0x4b62d7([0x56,0x61,0x6c,0x69,0x64])):_0x4b62d7(_0x5a3d1b-_0x137aa1>(0x63ae0106^_0x17af37)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4b62d7([0x74,0x68,0x65,0x6e])](_0x12b3ac)[_0x4b62d7([0x63,0x61,0x74,0x63,0x68])](()=>{_0x12b3ac(_0x4b62d7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3c85d0=0x47946b86^_0x17af37;function _0x5e4a3e(){const _0x56731c=_0x4b62d7([0x6c,0x6c,0x63,0x74,0x2d])+_0x2146d1(_0x410497(_0x5222d5)),_0x1d4e2d=_0x38a18f(_0x2146d1(window[_0x4b62d7([0x4d,0x61,0x74,0x68])][_0x4b62d7([0x63,0x65,0x69,0x6c])](_0x5a3d1b/_0x3c85d0)));window[_0x4b62d7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4b62d7([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x56731c,_0x1d4e2d);}function _0x33ba30(){const _0x431f1a=_0x4b62d7([0x6c,0x6c,0x63,0x74,0x2d])+_0x2146d1(_0x410497(_0x5222d5)),_0x583396=window[_0x4b62d7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4b62d7([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x431f1a);return _0x583396?window[_0x4b62d7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x38a18f(_0x583396),0x10)*_0x3c85d0:null;}function _0x124e65(_0x457da8){return new window[(_0x4b62d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x12fd4d,_0x48ba8d)=>{_0x457da8[_0x4b62d7([0x74,0x68,0x65,0x6e])](_0x12fd4d,_0x48ba8d),window[_0x4b62d7([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x48ba8d,0x47a351c6^_0x17af37);});}}_0x2a285e[_0x4b62d7([0x6f,0x6e])](_0x4b62d7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x39a7c1,_0x1ea7d8)=>{if(_0x1ea7d8[0x0]!=_0x5222d5)return _0x12b3ac(_0x4b62d7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1ea7d8[0x1]={..._0x1ea7d8[0x1],[_0x4b62d7([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2d4738};},{[_0x4b62d7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4b62d7([0x68,0x69,0x67,0x68])}),_0x2a285e[_0x4b62d7([0x6f,0x6e])](_0x4b62d7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58f5b7=>{_0x405752(_0x58f5b7[_0x4b62d7([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4cc59b=!0x0,_0x2f6c88(_0x58f5b7[_0x4b62d7([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4b62d7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4b62d7([0x6c,0x6f,0x77])}),_0x2196d2[_0x4b62d7([0x74,0x68,0x65,0x6e])](()=>{_0x4cc59b||_0x12b3ac(_0x4b62d7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52555c(){return _0x2a285e[_0x4b62d7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4b62d7([0x76,0x69,0x65,0x77])][_0x4b62d7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4b62d7([0x61,0x75,0x74,0x6f]);}function _0x2b3979(){_0x2a285e[_0x4b62d7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4b62d7([0x76,0x69,0x65,0x77])][_0x4b62d7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4b62d7([0x61,0x75,0x74,0x6f]);}}function _0x3945db(_0x16cc5c){const _0xb369b6=[new window[(_0x4b62d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1daee7=>setTimeout(_0x1daee7,0x47abbbca^_0x17af37)),_0x2196d2[_0x4b62d7([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4b62d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x11cabd=>{let _0x1dd7b8=0x0;_0x2a285e[_0x4b62d7([0x6d,0x6f,0x64,0x65,0x6c])][_0x4b62d7([0x6f,0x6e])](_0x4b62d7([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1d2f92,_0x235021)=>{_0x235021[0x0][_0x4b62d7([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1dd7b8++,_0x1dd7b8==(0x47a284fe^_0x17af37)&&(_0x11cabd(),_0x1d2f92[_0x4b62d7([0x6f,0x66,0x66])]());});}))];return window[_0x4b62d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4b62d7([0x72,0x61,0x63,0x65])](_0xb369b6)[_0x4b62d7([0x74,0x68,0x65,0x6e])](()=>_0x16cc5c);}async function _0x2fd79e(){await _0x2196d2,_0x2a285e[_0x4b62d7([0x6d,0x6f,0x64,0x65,0x6c])][_0x4b62d7([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5d5c55,_0x2a285e[_0x4b62d7([0x6d,0x6f,0x64,0x65,0x6c])][_0x4b62d7([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5d5c55,_0x2a285e[_0x4b62d7([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4b62d7([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4a8761(_0x36d9f0){const _0x1df9f6=_0x346e20();_0x2a285e[_0x1df9f6]=_0x4b62d7([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x36d9f0,_0x36d9f0!=_0x4b62d7([0x56,0x61,0x6c,0x69,0x64])&&_0x2fd79e();}function _0x346e20(){const _0x4e3528=window[_0x4b62d7([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4b62d7([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4b62d7([0x6e,0x6f,0x77])]())[_0x4b62d7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4b62d7([0x2e]),'');let _0x43e2e6=_0x4b62d7([0x75]);for(let _0x56a96b=0x0;_0x56a96b<_0x4e3528[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x56a96b+=0x2){let _0x31f621=window[_0x4b62d7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e3528[_0x4b62d7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x56a96b,_0x56a96b+0x2));_0x31f621>=_0x25fadf[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x31f621-=_0x25fadf[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x43e2e6+=_0x25fadf[_0x31f621];}return _0x43e2e6;}function _0x38d2b4(){const _0x3ac977=_0x56ff5f[_0x4b62d7([0x73,0x70,0x6c,0x69,0x74])](_0x4b62d7([0x2e]));if(0x3!=_0x3ac977[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x48cf9d(_0x3ac977[0x1]);function _0x48cf9d(_0x37bb55){const _0xdd3feb=_0xe6e829(_0x37bb55);return _0xdd3feb&&_0x4acba1()?_0xdd3feb:null;function _0x4acba1(){const _0x20c45a=_0xdd3feb[_0x4b62d7([0x6a,0x74,0x69])],_0xe31d8b=window[_0x4b62d7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x20c45a[_0x4b62d7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x20c45a[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x947cfe={..._0xdd3feb,[_0x4b62d7([0x6a,0x74,0x69])]:_0x20c45a[_0x4b62d7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x20c45a[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x947cfe[_0x4b62d7([0x76,0x63])],_0x410497(_0x947cfe)==_0xe31d8b;}}}async function _0x2d2636(){let _0x368d67=!0x0;try{const _0x2f2010=_0x56ff5f[_0x4b62d7([0x73,0x70,0x6c,0x69,0x74])](_0x4b62d7([0x2e])),[_0x4fc523,_0x6ad0b,_0x48b608]=_0x2f2010;return _0x197f3f(_0x4fc523),await _0x1f8ba4(_0x4fc523,_0x6ad0b,_0x48b608),_0x368d67;}catch{return!0x1;}function _0x197f3f(_0xf8b59b){const _0x4d800f=_0xe6e829(_0xf8b59b);_0x4d800f&&_0x4d800f[_0x4b62d7([0x61,0x6c,0x67])]==_0x4b62d7([0x45,0x53,0x32,0x35,0x36])||(_0x368d67=!0x1);}async function _0x1f8ba4(_0x599299,_0x42f9c8,_0x3e9da0){const _0x7aff0b=window[_0x4b62d7([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4b62d7([0x66,0x72,0x6f,0x6d])](_0x23e918(_0x3e9da0),_0x2bab54=>_0x2bab54[_0x4b62d7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5ea21e=new window[(_0x4b62d7([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4b62d7([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x599299+_0x4b62d7([0x2e])+_0x42f9c8),_0x4b92bb=window[_0x4b62d7([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4b62d7([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4b92bb)return;const _0x210f90=await _0x4b92bb[_0x4b62d7([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4b62d7([0x6a,0x77,0x6b]),_0x1ffae4,{[_0x4b62d7([0x6e,0x61,0x6d,0x65])]:_0x4b62d7([0x45,0x43,0x44,0x53,0x41]),[_0x4b62d7([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4b62d7([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4b62d7([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4b92bb[_0x4b62d7([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4b62d7([0x6e,0x61,0x6d,0x65])]:_0x4b62d7([0x45,0x43,0x44,0x53,0x41]),[_0x4b62d7([0x68,0x61,0x73,0x68])]:{[_0x4b62d7([0x6e,0x61,0x6d,0x65])]:_0x4b62d7([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x210f90,_0x7aff0b,_0x5ea21e)||(_0x368d67=!0x1);}}function _0xe6e829(_0x13f265){return _0x13f265[_0x4b62d7([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4b62d7([0x65,0x79]))?JSON[_0x4b62d7([0x70,0x61,0x72,0x73,0x65])](_0x23e918(_0x13f265)):null;}function _0x23e918(_0x16b218){return window[_0x4b62d7([0x61,0x74,0x6f,0x62])](_0x16b218[_0x4b62d7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4b62d7([0x2b]))[_0x4b62d7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4b62d7([0x2f])));}function _0x410497(_0x3e16a3){let _0x151be3=0x1505;function _0x1a80b2(_0x185b6e){for(let _0xd5563f=0x0;_0xd5563f<_0x185b6e[_0x4b62d7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd5563f++){const _0x10b4a9=_0x185b6e[_0x4b62d7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xd5563f);_0x151be3=(_0x151be3<<0x5)+_0x151be3+_0x10b4a9,_0x151be3&=_0x151be3;}}function _0x53f4ff(_0x481b43){Array[_0x4b62d7([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x481b43)?_0x481b43[_0x4b62d7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x53f4ff):_0x481b43&&typeof _0x481b43==_0x4b62d7([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4b62d7([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x481b43)[_0x4b62d7([0x73,0x6f,0x72,0x74])]()[_0x4b62d7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3c65ae,_0x19a223])=>{_0x1a80b2(_0x3c65ae),_0x53f4ff(_0x19a223);}):_0x1a80b2(window[_0x4b62d7([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x481b43));}return _0x53f4ff(_0x3e16a3),_0x151be3>>>0x0;}function _0x2146d1(_0x5dd578){return _0x5dd578[_0x4b62d7([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4b62d7([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4b62d7([0x30]));}function _0x38a18f(_0x23722b){return _0x23722b[_0x4b62d7([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4b62d7([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4b62d7([0x6a,0x6f,0x69,0x6e])]('');}function _0x5d5c55(){}function _0x4b62d7(_0x6144fb){return _0x6144fb['map'](_0x574d74=>String['fromCharCode'](_0x574d74))['join']('');}_0x4a8761(await _0x3cf280());}(this);}['_moveSelectionToFootnoteDefinition'](_0xbdff52){const {plugins:_0x53faeb,editing:_0x4f6b60,model:_0x3ec22c}=this['editor'],_0x2c9353=_0x53faeb['get'](_0x2e716e)['getFootnote'](_0xbdff52);return!!_0x2c9353&&(_0x3ec22c['change'](_0x9bb16f=>{_0x9bb16f['setSelection'](_0x9bb16f['createPositionAt'](_0x2c9353['definition'],'end'));}),_0x4f6b60['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x1cc8e1){const {plugins:_0x2da8c6,editing:_0x94c1c,model:_0x89161b}=this['editor'],_0x5ed815=_0x2da8c6['get'](_0x2e716e)['getFootnote'](_0x1cc8e1);return!!_0x5ed815&&(_0x89161b['change'](_0x5e1809=>{_0x5e1809['setSelection'](_0x5ed815['reference'],'on');}),_0x94c1c['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x311be7}=this['editor']['model'],_0x3a2aa2=this['editor']['config']['get']('footnotes.multiBlock');_0x311be7['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x311be7['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x311be7['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x3a2aa2?_0x311be7['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x311be7['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x311be7['addChildCheck'](_0x36ef55=>{for(const _0x2b21e4 of _0x36ef55)if('footnoteDefinition'===_0x2b21e4['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x4f4730}=this,{conversion:_0x229435,editing:_0x4e1a40}=_0x4f4730,{t:t}=_0x4f4730['locale'];_0x229435['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0xcdd1ae,{writer:_0x1e5897,consumable:_0x1bedfb})=>{const _0x282b65=_0xcdd1ae['getChild'](0x0);if(!_0x282b65||!_0x282b65['is']('element','a'))return null;const _0x3aba8e=_0x282b65['getAttribute']('href')||'';if(!_0x3aba8e['startsWith']('#'))return null;const _0x22c41f=_0x3aba8e['replace'](/^#/,'');if(!_0x22c41f)return null;_0x1bedfb['consume'](_0x282b65,{'name':!0x0,'attributes':['href']});for(const {item:_0x3e957b}of _0x4e1a40['view']['createRangeIn'](_0x282b65))_0x3e957b['is']('$textProxy')?_0x1bedfb['consume'](_0x3e957b['textNode'],{'name':!0x0}):_0x3e957b['is']('element')&&_0x1bedfb['consume'](_0x3e957b,{'name':!0x0});return _0x1e5897['createElement']('footnoteRef',{'footnoteId':_0x22c41f});}}),_0x229435['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x422249,{writer:_0x5cf13a})=>D(_0x422249,_0x5cf13a)}),_0x229435['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x5ae499,{writer:_0x4a950f})=>{const _0x186785=_0x5ae499['getAttribute']('footnoteCounter');return _0x2c514d(D(_0x5ae499,_0x4a950f),_0x4a950f,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x186785)});}});}['_defineDefinitionsConverters'](){const {editor:_0x32892b}=this,{t:t}=_0x32892b['locale'],{conversion:_0x15535b}=_0x32892b;_0x15535b['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x15535b['for']('upcast')['add'](_0x3f3fda=>{_0x3f3fda['on']('element:ol',(_0x6bc3bd,_0x374a56,_0x4950e5)=>{const _0x5aaa4f=_0x374a56['viewItem'];if(!_0x5aaa4f['hasClass']('footnotes-list')||!_0x374a56['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x4950e5['consumable']['consume'](_0x5aaa4f,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x53bbf9,modelCursor:_0x2b58a1}=_0x4950e5['convertChildren'](_0x374a56['viewItem'],_0x374a56['modelCursor']);_0x374a56['modelRange']=_0x53bbf9,_0x374a56['modelCursor']=_0x2b58a1;}),_0x3f3fda['on']('element:hr',(_0x455779,_0x59c91,_0x26c46a)=>{const _0x35dbea=_0x59c91['viewItem'];_0x35dbea['hasClass']('footnotes-divider')&&_0x59c91['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x26c46a['consumable']['consume'](_0x35dbea,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x15535b['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x1990c,{writer:_0x3516f})=>g(_0x3516f)}),_0x15535b['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x5afc26,{writer:_0x2d79a3})=>{const _0xa58b0f=g(_0x2d79a3,{'data-footnotes-list-label':t('Footnotes')}),_0x2e5af1=_0x2c514d(_0xa58b0f,_0x2d79a3,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x2d79a3['setCustomProperty']('footnotesDefinitions',!0x0,_0x2e5af1),_0x2e5af1;}});}['_defineDefinitionConverters'](){const {editor:_0x119115}=this,{conversion:_0x1c29b8,locale:_0x2701fb}=_0x119115,_0x406210=_0x119115['config']['get']('footnotes.multiBlock');_0x1c29b8['for']('upcast')['add'](_0x24f32f=>{_0x24f32f['on']('element:li',(_0x5294cd,_0x5ef295,_0x57d726)=>{const _0x378308=_0x5ef295['viewItem'];if(!_0x378308['hasClass']('footnote-definition')||!_0x378308['getAttribute']('id'))return;const _0x40df41=_0x378308['parent'];if(!_0x40df41['is']('element','ol')||!_0x40df41['hasClass']('footnotes-list'))return;if(!_0x57d726['consumable']['test'](_0x378308,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x54a32f=_0x57d726['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x378308['getAttribute']('id')});if(!_0x57d726['safeInsert'](_0x54a32f,_0x5ef295['modelCursor']))return;_0x57d726['consumable']['consume'](_0x378308,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x2dea02=Array['from'](_0x378308['getChildren']())['find'](_0x3e9568=>_0x3e9568['is']('element')&&_0x3e9568['hasClass']('footnote-content'));for(const _0x24f07b of _0x378308['getChildren']())_0x24f07b['is']('element')&&(_0x57d726['consumable']['consume'](_0x24f07b,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x57d726['consumable']['consume'](_0x24f07b,{'name':!0x0,'classes':'footnote-content'}));if(_0x2dea02){if(_0x406210)_0x57d726['convertChildren'](_0x2dea02,_0x54a32f);else{const _0x4b8bb7=_0x57d726['writer']['createElement']('footnoteInlineContent');_0x57d726['writer']['insert'](_0x4b8bb7,_0x54a32f),_0x57d726['convertChildren'](_0x2dea02,_0x4b8bb7);}}_0x57d726['updateConversionResult'](_0x54a32f,_0x5ef295);});}),_0x1c29b8['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x52b922,{writer:_0x37ed35})=>v(_0x52b922,_0x37ed35,_0x2701fb,{'dataPipeline':!0x0})}),_0x1c29b8['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x4d095e,{writer:_0x372975})=>v(_0x4d095e,_0x372975,_0x2701fb)});}['_defineBogusParagraphConverters'](){const {editor:_0x48eb48}=this,{conversion:_0x163b85}=_0x48eb48;_0x48eb48['config']['get']('footnotes.multiBlock')?(_0x163b85['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x163b85['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x48eb48['model']['document'],'change:data',()=>{!function(_0x3413ec,_0x4cbe1e){const _0x15e28b=_0x3413ec['document']['differ'],_0x26006c=new Set();for(const _0x3d98bb of _0x15e28b['getChanges']()){const _0x553699='attribute'==_0x3d98bb['type']?_0x3d98bb['range']['start']['parent']:_0x3d98bb['position']['parent'];_0x553699['is']('element','footnoteDefinition')&&_0x26006c['add'](_0x553699);}for(const _0x33654a of _0x26006c['values']()){const _0x17dd21=Array['from'](_0x33654a['getChildren']())['filter'](_0x3e166a=>p(_0x3e166a,_0x4cbe1e['mapper']));for(const _0x52d294 of _0x17dd21)_0x4cbe1e['reconvertItem'](_0x52d294);}}(_0x48eb48['model'],_0x48eb48['editing']);})):(_0x163b85['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x163b85['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x366c4c,{writer:_0x5a83c9})=>{const _0x514917=_0x5a83c9['createContainerElement']('span');return _0x5a83c9['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x514917),_0x514917;}}));}['_defineKeyboardHandlers'](){const {editor:_0x20f4fd}=this,{editing:_0x3aa2f2,t:t}=_0x20f4fd,_0x10b1cc=_0x20f4fd['model']['document']['selection'];_0x20f4fd['keystrokes']['set']('CTRL+Shift+D','insertFootnote'),_0x20f4fd['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Shift+D'}]}),this['listenTo'](_0x3aa2f2['view']['document'],'enter',(_0x195fb6,_0xa2d1c9)=>{const _0x3d669a=function(_0x3197aa){const _0x35145e=_0x3197aa['getSelectedElement']();if(_0x35145e?.['is']('element','footnoteRef'))return _0x35145e;return null;}(_0x10b1cc);if(_0x3d669a){const _0x6fccc0=_0x3d669a['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x6fccc0),_0xa2d1c9['preventDefault'](),_0x195fb6['stop']();}},{'context':_0x562ade});}['_defineClickHandlers'](){const {editor:_0x3a7a47}=this,{editing:_0x22809a}=_0x3a7a47;_0x3a7a47['editing']['view']['addObserver'](_0x24fee1),_0x3a7a47['editing']['view']['addObserver'](_0x80f299);let _0x3f0aed=!0x1;this['listenTo'](_0x22809a['view']['document'],'pointerdown',(_0x2e2988,_0x32c73a)=>{const {target:_0x4fc5c0}=_0x32c73a,_0x17f217=_0x22809a['view']['document']['selection'];_0x3f0aed=!!(_0x4fc5c0['is']('element','a')&&_0x4fc5c0['parent']?.['is']('element','sup')&&_0x4fc5c0['parent']['hasClass']('footnote'))&&_0x17f217['getSelectedElement']()===_0x4fc5c0['parent'];},{'priority':'high'}),this['listenTo'](_0x22809a['view']['document'],'click',(_0x5f0d33,_0x4cd147)=>{const {target:_0x302c4b}=_0x4cd147;if(!_0x302c4b['is']('element','a'))return;if(_0x302c4b['parent']?.['is']('element','sup')&&_0x302c4b['parent']['hasClass']('footnote')&&!_0x3f0aed)return void _0x4cd147['preventDefault']();let _0x10390d=_0x302c4b['getAttribute']('href');if(!_0x10390d?.['startsWith']('#'))return;_0x10390d=_0x10390d['slice'](0x1);let _0x3660ed=!0x1;(_0x10390d['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x10390d['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x10390d))&&(_0x3660ed=!0x0),_0x3660ed&&(_0x4cd147['preventDefault'](),_0x5f0d33['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x349594}={}){return(_0x39c4f7,{writer:_0x53fa68})=>{if(!h(_0x39c4f7))return null;if(!_0x349594)return _0x53fa68['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x2b72e7=_0x53fa68['createContainerElement']('p');return _0x53fa68['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x2b72e7),_0x2b72e7;};}function h(_0x481cbd){const {parent:_0x38525d}=_0x481cbd;if(!_0x38525d?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x38525d['childCount'])return!0x1;for(const _0x31f55 of _0x481cbd['getAttributeKeys']())if(!_0x31f55['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x31f55)return!0x1;return!0x0;}function p(_0x55d71f,_0xe3727d){if(!_0x55d71f['is']('element','paragraph'))return!0x1;const _0x56c88b=_0xe3727d['toViewElement'](_0x55d71f);return!!_0x56c88b&&h(_0x55d71f)!==_0x56c88b['is']('element','span');}export function isFootnotesDefinitionsWidget(_0x48f8e5){return _0x562ade(_0x48f8e5)&&_0x48f8e5['is']('containerElement')&&!!_0x48f8e5['getCustomProperty']('footnotesDefinitions');}function g(_0xb6da97,_0x4e6853={}){const _0x5a783a=_0xb6da97['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x35147e=_0xb6da97['createContainerElement']('ol',{'class':'footnotes-list'},_0xb6da97['createSlot']());return _0xb6da97['createContainerElement']('div',{'class':'footnotes',..._0x4e6853},[_0x5a783a,_0x35147e]);}function D(_0x4e3699,_0x128743){const _0x537f9d=_0x4e3699['getAttribute']('footnoteId'),_0x50226d=_0x4e3699['getAttribute']('footnoteCounter'),_0x3d1e86=_0x128743['createUIElement']('a',{'href':'#'+_0x537f9d},function(_0x234388){const _0xb98671=this['toDomElement'](_0x234388);return _0xb98671['textContent']=_0x50226d,_0xb98671;}),_0x16630a=_0x128743['createContainerElement']('sup',{'id':'ref-'+_0x537f9d,'class':'footnote'},[_0x3d1e86]);return _0x16630a['getFillerOffset']=()=>null,_0x16630a;}function v(_0x2b7f02,_0x7dc5c1,_0x42f4af,{dataPipeline:_0x27513}={}){const {t:t}=_0x42f4af,_0xbbe99b=_0x2b7f02['getAttribute']('footnoteId'),_0x1440ba=_0x7dc5c1['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0xbbe99b},function(_0x18568f){const _0x5422ed=this['toDomElement'](_0x18568f);return _0x5422ed['innerText']='^',_0x5422ed;}),_0x2895af=_0x27513?_0x7dc5c1['createContainerElement']('div',{'class':'footnote-content'}):_0xfcf061(_0x7dc5c1['createEditableElement']('div',{'class':'footnote-content'}),_0x7dc5c1,{'label':t('Footnote\x20content.')});return _0x7dc5c1['insert'](_0x7dc5c1['createPositionAt'](_0x2895af,0x0),_0x7dc5c1['createSlot']()),_0x7dc5c1['createContainerElement']('li',{'class':'footnote-definition','id':_0xbbe99b},[_0x1440ba,_0x2895af]);}
|
|
23
|
+
import{Plugin as _0x370733}from'ckeditor5/src/core.js';import{isWidget as _0x5c6ff7,toWidget as _0x3697f5,toWidgetEditable as _0x1a7095}from'ckeditor5/src/widget.js';import{uid as _0x22f426}from'ckeditor5/src/utils.js';import{PointerObserver as _0x5d03b0,ClickObserver as _0x57c99f}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x1ff412}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x4f9786}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x370733{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x1ff412];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x52857c}=this;_0x52857c['config']['define']('footnotes.multiBlock',!0x0),_0x52857c['commands']['add']('insertFootnote',new _0x4f9786(_0x52857c)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x3c1f3e){const _0xf94c80=_0x324158([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x214046=0x47a28506,_0x37cd01=0x47a5fd0e^_0x214046,_0x190135=window[_0x324158([0x44,0x61,0x74,0x65])][_0x324158([0x6e,0x6f,0x77])](),_0x120a4d=_0x3c1f3e[_0x324158([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x91afac=new window[(_0x324158([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d59a6=>{_0x120a4d[_0x324158([0x6f,0x6e,0x63,0x65])](_0x324158([0x72,0x65,0x61,0x64,0x79]),_0x4d59a6);}),_0x22d629={[_0x324158([0x6b,0x74,0x79])]:_0x324158([0x45,0x43]),[_0x324158([0x75,0x73,0x65])]:_0x324158([0x73,0x69,0x67]),[_0x324158([0x63,0x72,0x76])]:_0x324158([0x50,0x2d,0x32,0x35,0x36]),[_0x324158([0x78])]:_0x324158([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x324158([0x79])]:_0x324158([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x324158([0x61,0x6c,0x67])]:_0x324158([0x45,0x53,0x32,0x35,0x36])},_0x34922f=_0x120a4d[_0x324158([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x324158([0x67,0x65,0x74])](_0x324158([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x54ec6f(){let _0x1c764,_0x37856d=null,_0x4d375f=null;try{if(_0x34922f==_0x324158([0x47,0x50,0x4c]))return _0x324158([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1c764=_0x1f0f99(),!_0x1c764)return _0x324158([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1c764[_0x324158([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4d375f=_0x24cf12(_0x1c764[_0x324158([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1c764[_0x324158([0x6a,0x74,0x69])])),await _0xd91870()?_0x45bd1b()?_0x596615()?_0x324158([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3caef7()?(_0x1c764[_0x324158([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x324158([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x37856d=_0x22bd9d(_0x324158([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1c764[_0x324158([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x324158([0x74,0x72,0x69,0x61,0x6c])&&(_0x37856d=_0x22bd9d(_0x324158([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3fed44()):_0x324158([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x324158([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x324158([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x324158([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x596615(){const _0x3b1ae6=[_0x324158([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x324158([0x74,0x72,0x69,0x61,0x6c])][_0x324158([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c764[_0x324158([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x190135/0x3e8:0xe10*_0x37cd01;return _0x1c764[_0x324158([0x65,0x78,0x70])]<_0x3b1ae6;}function _0x45bd1b(){const _0x461dfa=_0x1c764[_0x324158([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x461dfa&&(!!_0x461dfa[_0x324158([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x324158([0x2a]))||!!_0x461dfa[_0x324158([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x324158([0x46,0x4f,0x4f])));}function _0x3caef7(){const _0x5e916f=_0x1c764[_0x324158([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5e916f||0x0==_0x5e916f[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x8a10e7}=new URL(window[_0x324158([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5e916f[_0x324158([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8a10e7))return!0x0;const _0x45c6a9=_0x8a10e7[_0x324158([0x73,0x70,0x6c,0x69,0x74])](_0x324158([0x2e]));return _0x5e916f[_0x324158([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x244cd1=>_0x244cd1[_0x324158([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x324158([0x2a])))[_0x324158([0x6d,0x61,0x70])](_0x5e7ee9=>_0x5e7ee9[_0x324158([0x73,0x70,0x6c,0x69,0x74])](_0x324158([0x2e])))[_0x324158([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2acdfb=>_0x2acdfb[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x45c6a9[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x324158([0x6d,0x61,0x70])](_0x1e8962=>Array(_0x45c6a9[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1e8962[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x324158([0x66,0x69,0x6c,0x6c])](_0x1e8962[0x0]===_0x324158([0x2a])?_0x324158([0x2a]):'')[_0x324158([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1e8962))[_0x324158([0x73,0x6f,0x6d,0x65])](_0x394964=>_0x45c6a9[_0x324158([0x65,0x76,0x65,0x72,0x79])]((_0x29959a,_0x2eae3b)=>_0x394964[_0x2eae3b]===_0x29959a||_0x394964[_0x2eae3b]===_0x324158([0x2a])));}function _0x3fed44(){return _0x37856d&&_0x4d375f?new window[(_0x324158([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4cff37,_0x4b675f)=>{_0x37856d[_0x324158([0x74,0x68,0x65,0x6e])](_0x4cff37,_0x4b675f),_0x4d375f[_0x324158([0x74,0x68,0x65,0x6e])](_0x327b9a=>{_0x327b9a!=_0x324158([0x56,0x61,0x6c,0x69,0x64])&&_0x4cff37(_0x327b9a);},_0x4b675f);}):_0x37856d||_0x4d375f||_0x324158([0x56,0x61,0x6c,0x69,0x64]);}}function _0x24cf12(_0x2f3656,_0x22a0e5){return new window[(_0x324158([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x255203=>{if(_0xfcb2ef())return _0x255203(_0x324158([0x56,0x61,0x6c,0x69,0x64]));_0x3418ca(),_0x120a4d[_0x324158([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x324158([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x31064f=!0x1;const _0x5ba893=_0x22f426();function _0x115f9b(_0x8bd8ac){return!!_0x8bd8ac&&(typeof _0x8bd8ac===_0x324158([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x8bd8ac===_0x324158([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x8bd8ac[_0x324158([0x74,0x68,0x65,0x6e])]===_0x324158([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x8bd8ac[_0x324158([0x63,0x61,0x74,0x63,0x68])]===_0x324158([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4f5031(_0x32bd3c){_0x5e83f5(_0x32bd3c)[_0x324158([0x74,0x68,0x65,0x6e])](_0x26fecd=>{if(!_0x26fecd||_0x26fecd[_0x324158([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x324158([0x6f,0x6b]))return _0x324158([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3c826f(_0x53beaa(_0x5ba893+_0x22a0e5))!=_0x26fecd[_0x324158([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x324158([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x324158([0x56,0x61,0x6c,0x69,0x64]);})[_0x324158([0x74,0x68,0x65,0x6e])](_0x56d1e6=>(_0x50733f(),_0x56d1e6),()=>{const _0xcca71=_0x4624a0();return null==_0xcca71?(_0x50733f(),_0x324158([0x56,0x61,0x6c,0x69,0x64])):_0x324158(_0x190135-_0xcca71>(0x63ae0106^_0x214046)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x324158([0x74,0x68,0x65,0x6e])](_0x255203)[_0x324158([0x63,0x61,0x74,0x63,0x68])](()=>{_0x255203(_0x324158([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x13e105=0x47946b86^_0x214046;function _0x50733f(){const _0x825598=_0x324158([0x6c,0x6c,0x63,0x74,0x2d])+_0x3c826f(_0x53beaa(_0x2f3656)),_0x24acb4=_0x4ffd7c(_0x3c826f(window[_0x324158([0x4d,0x61,0x74,0x68])][_0x324158([0x63,0x65,0x69,0x6c])](_0x190135/_0x13e105)));window[_0x324158([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x324158([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x825598,_0x24acb4);}function _0x4624a0(){const _0x4cd0c7=_0x324158([0x6c,0x6c,0x63,0x74,0x2d])+_0x3c826f(_0x53beaa(_0x2f3656)),_0x2fefb6=window[_0x324158([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x324158([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4cd0c7);return _0x2fefb6?window[_0x324158([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ffd7c(_0x2fefb6),0x10)*_0x13e105:null;}function _0x5e83f5(_0x861e12){return new window[(_0x324158([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x212d0d,_0x5288be)=>{_0x861e12[_0x324158([0x74,0x68,0x65,0x6e])](_0x212d0d,_0x5288be),window[_0x324158([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5288be,0x47a351c6^_0x214046);});}}_0x120a4d[_0x324158([0x6f,0x6e])](_0x324158([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1fcbef,_0x357019)=>{if(_0x357019[0x0]!=_0x2f3656)return _0x255203(_0x324158([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x357019[0x1]={..._0x357019[0x1],[_0x324158([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5ba893};},{[_0x324158([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x324158([0x68,0x69,0x67,0x68])}),_0x120a4d[_0x324158([0x6f,0x6e])](_0x324158([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x23e353=>{_0x115f9b(_0x23e353[_0x324158([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x31064f=!0x0,_0x4f5031(_0x23e353[_0x324158([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x324158([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x324158([0x6c,0x6f,0x77])}),_0x91afac[_0x324158([0x74,0x68,0x65,0x6e])](()=>{_0x31064f||_0x255203(_0x324158([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xfcb2ef(){return _0x120a4d[_0x324158([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x324158([0x76,0x69,0x65,0x77])][_0x324158([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x324158([0x61,0x75,0x74,0x6f]);}function _0x3418ca(){_0x120a4d[_0x324158([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x324158([0x76,0x69,0x65,0x77])][_0x324158([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x324158([0x61,0x75,0x74,0x6f]);}}function _0x22bd9d(_0x3bd85f){const _0x47d5e1=[new window[(_0x324158([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x893830=>setTimeout(_0x893830,0x47abbbca^_0x214046)),_0x91afac[_0x324158([0x74,0x68,0x65,0x6e])](()=>new window[(_0x324158([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53baa9=>{let _0x34b422=0x0;_0x120a4d[_0x324158([0x6d,0x6f,0x64,0x65,0x6c])][_0x324158([0x6f,0x6e])](_0x324158([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x46630a,_0xf39e81)=>{_0xf39e81[0x0][_0x324158([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x34b422++,_0x34b422==(0x47a284fe^_0x214046)&&(_0x53baa9(),_0x46630a[_0x324158([0x6f,0x66,0x66])]());});}))];return window[_0x324158([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x324158([0x72,0x61,0x63,0x65])](_0x47d5e1)[_0x324158([0x74,0x68,0x65,0x6e])](()=>_0x3bd85f);}async function _0x58ca8d(){await _0x91afac,_0x120a4d[_0x324158([0x6d,0x6f,0x64,0x65,0x6c])][_0x324158([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1fd96a,_0x120a4d[_0x324158([0x6d,0x6f,0x64,0x65,0x6c])][_0x324158([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1fd96a,_0x120a4d[_0x324158([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x324158([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x31188f(_0x1235cf){const _0x490f3b=_0x288f6c();_0x120a4d[_0x490f3b]=_0x324158([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1235cf,_0x1235cf!=_0x324158([0x56,0x61,0x6c,0x69,0x64])&&_0x58ca8d();}function _0x288f6c(){const _0x47728a=window[_0x324158([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x324158([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x324158([0x6e,0x6f,0x77])]())[_0x324158([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x324158([0x2e]),'');let _0x3d231e=_0x324158([0x75]);for(let _0x5b7108=0x0;_0x5b7108<_0x47728a[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5b7108+=0x2){let _0xda896a=window[_0x324158([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x47728a[_0x324158([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5b7108,_0x5b7108+0x2));_0xda896a>=_0xf94c80[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xda896a-=_0xf94c80[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3d231e+=_0xf94c80[_0xda896a];}return _0x3d231e;}function _0x1f0f99(){const _0x58f5fa=_0x34922f[_0x324158([0x73,0x70,0x6c,0x69,0x74])](_0x324158([0x2e]));if(0x3!=_0x58f5fa[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1d4ccc(_0x58f5fa[0x1]);function _0x1d4ccc(_0x3f2fb2){const _0x411dbf=_0x1afef1(_0x3f2fb2);return _0x411dbf&&_0x1d9fdd()?_0x411dbf:null;function _0x1d9fdd(){const _0xed0174=_0x411dbf[_0x324158([0x6a,0x74,0x69])],_0x39b342=window[_0x324158([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xed0174[_0x324158([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xed0174[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x358a24={..._0x411dbf,[_0x324158([0x6a,0x74,0x69])]:_0xed0174[_0x324158([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xed0174[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x358a24[_0x324158([0x76,0x63])],_0x53beaa(_0x358a24)==_0x39b342;}}}async function _0xd91870(){let _0x538edd=!0x0;try{const _0x1b36d7=_0x34922f[_0x324158([0x73,0x70,0x6c,0x69,0x74])](_0x324158([0x2e])),[_0x263d47,_0x5b6815,_0x483610]=_0x1b36d7;return _0x145594(_0x263d47),await _0x9b3b55(_0x263d47,_0x5b6815,_0x483610),_0x538edd;}catch{return!0x1;}function _0x145594(_0x3a2f22){const _0x2c4bb0=_0x1afef1(_0x3a2f22);_0x2c4bb0&&_0x2c4bb0[_0x324158([0x61,0x6c,0x67])]==_0x324158([0x45,0x53,0x32,0x35,0x36])||(_0x538edd=!0x1);}async function _0x9b3b55(_0x2058e6,_0x3f61d1,_0x2d2a6f){const _0x2b3c9b=window[_0x324158([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x324158([0x66,0x72,0x6f,0x6d])](_0x200935(_0x2d2a6f),_0x1a7161=>_0x1a7161[_0x324158([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x338680=new window[(_0x324158([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x324158([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2058e6+_0x324158([0x2e])+_0x3f61d1),_0x5a7848=window[_0x324158([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x324158([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5a7848)return;const _0x54185d=await _0x5a7848[_0x324158([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x324158([0x6a,0x77,0x6b]),_0x22d629,{[_0x324158([0x6e,0x61,0x6d,0x65])]:_0x324158([0x45,0x43,0x44,0x53,0x41]),[_0x324158([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x324158([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x324158([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5a7848[_0x324158([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x324158([0x6e,0x61,0x6d,0x65])]:_0x324158([0x45,0x43,0x44,0x53,0x41]),[_0x324158([0x68,0x61,0x73,0x68])]:{[_0x324158([0x6e,0x61,0x6d,0x65])]:_0x324158([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x54185d,_0x2b3c9b,_0x338680)||(_0x538edd=!0x1);}}function _0x1afef1(_0x36a001){return _0x36a001[_0x324158([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x324158([0x65,0x79]))?JSON[_0x324158([0x70,0x61,0x72,0x73,0x65])](_0x200935(_0x36a001)):null;}function _0x200935(_0x1771d2){return window[_0x324158([0x61,0x74,0x6f,0x62])](_0x1771d2[_0x324158([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x324158([0x2b]))[_0x324158([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x324158([0x2f])));}function _0x53beaa(_0x29cede){let _0x107d0b=0x1505;function _0x1aeb08(_0x1e8b7a){for(let _0x19dd85=0x0;_0x19dd85<_0x1e8b7a[_0x324158([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x19dd85++){const _0x4e9e1e=_0x1e8b7a[_0x324158([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x19dd85);_0x107d0b=(_0x107d0b<<0x5)+_0x107d0b+_0x4e9e1e,_0x107d0b&=_0x107d0b;}}function _0x31302c(_0x1b6b78){Array[_0x324158([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1b6b78)?_0x1b6b78[_0x324158([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x31302c):_0x1b6b78&&typeof _0x1b6b78==_0x324158([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x324158([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1b6b78)[_0x324158([0x73,0x6f,0x72,0x74])]()[_0x324158([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x35d077,_0x3e7c87])=>{_0x1aeb08(_0x35d077),_0x31302c(_0x3e7c87);}):_0x1aeb08(window[_0x324158([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1b6b78));}return _0x31302c(_0x29cede),_0x107d0b>>>0x0;}function _0x3c826f(_0x52bcd2){return _0x52bcd2[_0x324158([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x324158([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x324158([0x30]));}function _0x4ffd7c(_0x35767f){return _0x35767f[_0x324158([0x73,0x70,0x6c,0x69,0x74])]('')[_0x324158([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x324158([0x6a,0x6f,0x69,0x6e])]('');}function _0x1fd96a(){}function _0x324158(_0x1fbbbb){return _0x1fbbbb['map'](_0x5713cb=>String['fromCharCode'](_0x5713cb))['join']('');}_0x31188f(await _0x54ec6f());}(this);}['_moveSelectionToFootnoteDefinition'](_0x5e230a){const {plugins:_0x3eaf96,editing:_0xd601c0,model:_0x534226}=this['editor'],_0x29d150=_0x3eaf96['get'](_0x1ff412)['getFootnote'](_0x5e230a);return!!_0x29d150&&(_0x534226['change'](_0x15b3e5=>{_0x15b3e5['setSelection'](_0x15b3e5['createPositionAt'](_0x29d150['definition'],'end'));}),_0xd601c0['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x256da2){const {plugins:_0x471ad4,editing:_0x29eea2,model:_0x2cc4b5}=this['editor'],_0x265305=_0x471ad4['get'](_0x1ff412)['getFootnote'](_0x256da2);return!!_0x265305&&(_0x2cc4b5['change'](_0x2b3895=>{_0x2b3895['setSelection'](_0x265305['reference'],'on');}),_0x29eea2['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0xe3cb75}=this['editor']['model'],_0x49f29a=this['editor']['config']['get']('footnotes.multiBlock');_0xe3cb75['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0xe3cb75['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0xe3cb75['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x49f29a?_0xe3cb75['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0xe3cb75['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0xe3cb75['addChildCheck'](_0x30f137=>{for(const _0x55c22f of _0x30f137)if('footnoteDefinition'===_0x55c22f['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x56fce3}=this,{conversion:_0x53e5b0,editing:_0x556448}=_0x56fce3,{t:t}=_0x56fce3['locale'];_0x53e5b0['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x414311,{writer:_0x4160ca,consumable:_0x3dcdd4})=>{const _0x39cbe9=_0x414311['getChild'](0x0);if(!_0x39cbe9||!_0x39cbe9['is']('element','a'))return null;const _0x3a3246=_0x39cbe9['getAttribute']('href')||'';if(!_0x3a3246['startsWith']('#'))return null;const _0x27efff=_0x3a3246['replace'](/^#/,'');if(!_0x27efff)return null;_0x3dcdd4['consume'](_0x39cbe9,{'name':!0x0,'attributes':['href']});for(const {item:_0x1a39f5}of _0x556448['view']['createRangeIn'](_0x39cbe9))_0x1a39f5['is']('$textProxy')?_0x3dcdd4['consume'](_0x1a39f5['textNode'],{'name':!0x0}):_0x1a39f5['is']('element')&&_0x3dcdd4['consume'](_0x1a39f5,{'name':!0x0});return _0x4160ca['createElement']('footnoteRef',{'footnoteId':_0x27efff});}}),_0x53e5b0['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x356de5,{writer:_0x43ec04})=>D(_0x356de5,_0x43ec04)}),_0x53e5b0['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x33dd0d,{writer:_0x8b60fe})=>{const _0x42cf36=_0x33dd0d['getAttribute']('footnoteCounter');return _0x3697f5(D(_0x33dd0d,_0x8b60fe),_0x8b60fe,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x42cf36)});}});}['_defineDefinitionsConverters'](){const {editor:_0x21bf98}=this,{t:t}=_0x21bf98['locale'],{conversion:_0x41e369}=_0x21bf98;_0x41e369['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x41e369['for']('upcast')['add'](_0x77ad2d=>{_0x77ad2d['on']('element:ol',(_0x3bab9a,_0x23bd4c,_0x1e0c0b)=>{const _0x4c05df=_0x23bd4c['viewItem'];if(!_0x4c05df['hasClass']('footnotes-list')||!_0x23bd4c['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x1e0c0b['consumable']['consume'](_0x4c05df,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x29e142,modelCursor:_0x518976}=_0x1e0c0b['convertChildren'](_0x23bd4c['viewItem'],_0x23bd4c['modelCursor']);_0x23bd4c['modelRange']=_0x29e142,_0x23bd4c['modelCursor']=_0x518976;}),_0x77ad2d['on']('element:hr',(_0x1c486d,_0x28c14d,_0x3bac76)=>{const _0x4c0108=_0x28c14d['viewItem'];_0x4c0108['hasClass']('footnotes-divider')&&_0x28c14d['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x3bac76['consumable']['consume'](_0x4c0108,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x41e369['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x500c63,{writer:_0x3d2664})=>g(_0x3d2664)}),_0x41e369['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x109639,{writer:_0x2dad7d})=>{const _0x2c2827=g(_0x2dad7d,{'data-footnotes-list-label':t('Footnotes')}),_0x2bf673=_0x3697f5(_0x2c2827,_0x2dad7d,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x2dad7d['setCustomProperty']('footnotesDefinitions',!0x0,_0x2bf673),_0x2bf673;}});}['_defineDefinitionConverters'](){const {editor:_0x417427}=this,{conversion:_0x2c84b0,locale:_0x4bc9cc}=_0x417427,_0x45ebb7=_0x417427['config']['get']('footnotes.multiBlock');_0x2c84b0['for']('upcast')['add'](_0x40ef1b=>{_0x40ef1b['on']('element:li',(_0x47def6,_0x2cf723,_0x489ddf)=>{const _0x65398a=_0x2cf723['viewItem'];if(!_0x65398a['hasClass']('footnote-definition')||!_0x65398a['getAttribute']('id'))return;const _0x2e7abf=_0x65398a['parent'];if(!_0x2e7abf['is']('element','ol')||!_0x2e7abf['hasClass']('footnotes-list'))return;if(!_0x489ddf['consumable']['test'](_0x65398a,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x5b8a49=_0x489ddf['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x65398a['getAttribute']('id')});if(!_0x489ddf['safeInsert'](_0x5b8a49,_0x2cf723['modelCursor']))return;_0x489ddf['consumable']['consume'](_0x65398a,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x34974a=Array['from'](_0x65398a['getChildren']())['find'](_0x3f230f=>_0x3f230f['is']('element')&&_0x3f230f['hasClass']('footnote-content'));for(const _0x14749f of _0x65398a['getChildren']())_0x14749f['is']('element')&&(_0x489ddf['consumable']['consume'](_0x14749f,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x489ddf['consumable']['consume'](_0x14749f,{'name':!0x0,'classes':'footnote-content'}));if(_0x34974a){if(_0x45ebb7)_0x489ddf['convertChildren'](_0x34974a,_0x5b8a49);else{const _0x173fd0=_0x489ddf['writer']['createElement']('footnoteInlineContent');_0x489ddf['writer']['insert'](_0x173fd0,_0x5b8a49),_0x489ddf['convertChildren'](_0x34974a,_0x173fd0);}}_0x489ddf['updateConversionResult'](_0x5b8a49,_0x2cf723);});}),_0x2c84b0['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x57527e,{writer:_0x500a75})=>v(_0x57527e,_0x500a75,_0x4bc9cc,{'dataPipeline':!0x0})}),_0x2c84b0['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x3e8e22,{writer:_0x54a4c4})=>v(_0x3e8e22,_0x54a4c4,_0x4bc9cc)});}['_defineBogusParagraphConverters'](){const {editor:_0x2adfd8}=this,{conversion:_0x4aaf0f}=_0x2adfd8;_0x2adfd8['config']['get']('footnotes.multiBlock')?(_0x4aaf0f['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x4aaf0f['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x2adfd8['model']['document'],'change:data',()=>{!function(_0x2d7afb,_0x4565f3){const _0x3727de=_0x2d7afb['document']['differ'],_0xd4995b=new Set();for(const _0x72287d of _0x3727de['getChanges']()){const _0x58af88='attribute'==_0x72287d['type']?_0x72287d['range']['start']['parent']:_0x72287d['position']['parent'];_0x58af88['is']('element','footnoteDefinition')&&_0xd4995b['add'](_0x58af88);}for(const _0xc1cc58 of _0xd4995b['values']()){const _0x348eed=Array['from'](_0xc1cc58['getChildren']())['filter'](_0x59573a=>p(_0x59573a,_0x4565f3['mapper']));for(const _0x480b87 of _0x348eed)_0x4565f3['reconvertItem'](_0x480b87);}}(_0x2adfd8['model'],_0x2adfd8['editing']);})):(_0x4aaf0f['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x4aaf0f['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0xd44651,{writer:_0x59bb5a})=>{const _0x12ff14=_0x59bb5a['createContainerElement']('span');return _0x59bb5a['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x12ff14),_0x12ff14;}}));}['_defineKeyboardHandlers'](){const {editor:_0x419770}=this,{editing:_0x1de057,t:t}=_0x419770,_0x4c89f6=_0x419770['model']['document']['selection'];_0x419770['keystrokes']['set']('CTRL+Shift+D','insertFootnote'),_0x419770['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Shift+D'}]}),this['listenTo'](_0x1de057['view']['document'],'enter',(_0x1bb257,_0x421946)=>{const _0x18c71b=function(_0x257cc8){const _0x3e0d62=_0x257cc8['getSelectedElement']();if(_0x3e0d62?.['is']('element','footnoteRef'))return _0x3e0d62;return null;}(_0x4c89f6);if(_0x18c71b){const _0x475cc7=_0x18c71b['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x475cc7),_0x421946['preventDefault'](),_0x1bb257['stop']();}},{'context':_0x5c6ff7});}['_defineClickHandlers'](){const {editor:_0x2ffb99}=this,{editing:_0x3de9b4}=_0x2ffb99;_0x2ffb99['editing']['view']['addObserver'](_0x5d03b0),_0x2ffb99['editing']['view']['addObserver'](_0x57c99f);let _0x1812cb=!0x1;this['listenTo'](_0x3de9b4['view']['document'],'pointerdown',(_0x4ea6f6,_0x41b841)=>{const {target:_0x38722e}=_0x41b841,_0x42fde1=_0x3de9b4['view']['document']['selection'];_0x1812cb=!!(_0x38722e['is']('element','a')&&_0x38722e['parent']?.['is']('element','sup')&&_0x38722e['parent']['hasClass']('footnote'))&&_0x42fde1['getSelectedElement']()===_0x38722e['parent'];},{'priority':'high'}),this['listenTo'](_0x3de9b4['view']['document'],'click',(_0x1cb8f4,_0x124b94)=>{const {target:_0x5b3936}=_0x124b94;if(!_0x5b3936['is']('element','a'))return;if(_0x5b3936['parent']?.['is']('element','sup')&&_0x5b3936['parent']['hasClass']('footnote')&&!_0x1812cb)return void _0x124b94['preventDefault']();let _0x59b916=_0x5b3936['getAttribute']('href');if(!_0x59b916?.['startsWith']('#'))return;_0x59b916=_0x59b916['slice'](0x1);let _0x584286=!0x1;(_0x59b916['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x59b916['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x59b916))&&(_0x584286=!0x0),_0x584286&&(_0x124b94['preventDefault'](),_0x1cb8f4['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x1725b8}={}){return(_0xe02696,{writer:_0x5ba04d})=>{if(!h(_0xe02696))return null;if(!_0x1725b8)return _0x5ba04d['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x48f464=_0x5ba04d['createContainerElement']('p');return _0x5ba04d['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x48f464),_0x48f464;};}function h(_0x14698b){const {parent:_0x11d79a}=_0x14698b;if(!_0x11d79a?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x11d79a['childCount'])return!0x1;for(const _0x33a8ee of _0x14698b['getAttributeKeys']())if(!_0x33a8ee['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x33a8ee)return!0x1;return!0x0;}function p(_0x2ac117,_0x477164){if(!_0x2ac117['is']('element','paragraph'))return!0x1;const _0x6cd3f5=_0x477164['toViewElement'](_0x2ac117);return!!_0x6cd3f5&&h(_0x2ac117)!==_0x6cd3f5['is']('element','span');}export function isFootnotesDefinitionsWidget(_0x5d2043){return _0x5c6ff7(_0x5d2043)&&_0x5d2043['is']('containerElement')&&!!_0x5d2043['getCustomProperty']('footnotesDefinitions');}function g(_0x18c810,_0x17a200={}){const _0x7a547c=_0x18c810['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x55240b=_0x18c810['createContainerElement']('ol',{'class':'footnotes-list'},_0x18c810['createSlot']());return _0x18c810['createContainerElement']('div',{'class':'footnotes',..._0x17a200},[_0x7a547c,_0x55240b]);}function D(_0x3cb16f,_0x2cb27b){const _0x156ba4=_0x3cb16f['getAttribute']('footnoteId'),_0x22fdbd=_0x3cb16f['getAttribute']('footnoteCounter'),_0x5e04f8=_0x2cb27b['createUIElement']('a',{'href':'#'+_0x156ba4},function(_0xc8c7b6){const _0xd7cb58=this['toDomElement'](_0xc8c7b6);return _0xd7cb58['textContent']=_0x22fdbd,_0xd7cb58;}),_0x24243f=_0x2cb27b['createContainerElement']('sup',{'id':'ref-'+_0x156ba4,'class':'footnote'},[_0x5e04f8]);return _0x24243f['getFillerOffset']=()=>null,_0x24243f;}function v(_0x5d250e,_0xd2e345,_0xb24bbe,{dataPipeline:_0x24cbd0}={}){const {t:t}=_0xb24bbe,_0x788011=_0x5d250e['getAttribute']('footnoteId'),_0x1961f3=_0xd2e345['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x788011},function(_0x1c110a){const _0x274f18=this['toDomElement'](_0x1c110a);return _0x274f18['innerText']='^',_0x274f18;}),_0x2b7544=_0x24cbd0?_0xd2e345['createContainerElement']('div',{'class':'footnote-content'}):_0x1a7095(_0xd2e345['createEditableElement']('div',{'class':'footnote-content'}),_0xd2e345,{'label':t('Footnote\x20content.')});return _0xd2e345['insert'](_0xd2e345['createPositionAt'](_0x2b7544,0x0),_0xd2e345['createSlot']()),_0xd2e345['createContainerElement']('li',{'class':'footnote-definition','id':_0x788011},[_0x1961f3,_0x2b7544]);}
|