text: "use stick";(function(){function s(n){if(!n)return null;for(let t=0;t<n.length;t++){const i=n[t];if(i.href&&i.href===f)return i}return result}let f;const o={elements:{hr:function(n){const i=n.parent,t=i.attributes["class"];t&&(t.indexOf(CKEDITOR.plugins.StructureName.FootnoteClass)!==-1||t.indexOf(CKEDITOR.plugins.StructureName.EndNoteClass)!==-1)&&(n.attributes.contenteditable="false")},a:function(n){const t=n.attributes["class"];t&&t.indexOf("footnotesCommon")!==-1&&(n.attributes.contenteditable="false")},div:function(n){const t=n.attributes["class"];if(t){t.indexOf(CKEDITOR.plugins.StructureName.ContentClass)!==-1&&(n.attributes.contenteditable="true");t.indexOf(CKEDITOR.plugins.StructureName.FooterClass)!==-1&&(n.attributes.contenteditable="false");t.indexOf(CKEDITOR.plugins.StructureName.HeaderClass)!==-1&&(n.attributes.contenteditable="false");const i=t.indexOf(CKEDITOR.plugins.StructureName.FootnoteClass)!==-1||t.indexOf(CKEDITOR.plugins.StructureName.FooterClass)!==-1||t.indexOf(CKEDITOR.plugins.StructureName.HeaderClass)!==-1;if(i===!0){const t=new CKEDITOR.htmlParser.basicWriter;if(n.writeChildrenHtml(t),n.children.length===1){const t=n.children[0];t.name==="br"&&(n.children=[])}}}return n}}};CKEDITOR.plugins.add("gdeditor",{beforeInit:function(n){const t=this.path;f=t+"styles/contents.css";n.addContentsCss(f);n.addCommand("initPaginall",new CKEDITOR.PaginallView);n.addCommand("sectionUnion",new CKEDITOR.SectionUnion);n.addCommand("transferProcess",new CKEDITOR.TransferProcess);n.addCommand("transferProcessFromPrev",new CKEDITOR.TransferProcessFromPrev)},afterInit:function(){CKEDITOR.MutationRepo.addToRepo(CKEDITOR.MutationRepoType.childListAll,{tagName:"*",command:"transferProcess",priority:1});CKEDITOR.MutationRepo.addToRepo(CKEDITOR.MutationRepoType.characterData,{tagName:"*",command:"transferProcess",priority:1});CKEDITOR.MutationRepo.addToRepo(CKEDITOR.MutationRepoType.attributes,{tagName:"*",command:"transferProcessFromPrev",priority:1})},init:function(n){n.setKeystroke(CKEDITOR.ALT+CKEDITOR.plugins.key.Q,"maximize");const t=n.dataProcessor.htmlFilter,i=n.dataProcessor.dataFilter;t.addRules(o,100);i.addRules(o,100);n.on("beforeGetData",function(n){n.editor.execCommand("sectionUnion")},null,null,10);n.on("getData",function(n){n.editor.execCommand("footnotesInit");n.editor.execCommand("initPaginall")},null,null,10);n.on("instanceReady",function(n){n.editor.execCommand("footnotesInit");const i=n.editor.document.$.styleSheets,t=s(i);try{t.cssRules&&n.editor.execCommand("initPaginall")}catch(r){t.ownerNode.addEventListener("load",function(){n.editor.window.$.setTimeout(function(){n.editor.execCommand("initPaginall")},250)})}},null,null,10)}});const h={A3_Portrait:"A3_Portrait",A4_Portrait:"A4_Portrait",A5_Portrait:"A5_Portrait",A6_Portrait:"A6_Portrait",A7_Portrait:"A7_Portrait",A3_Landscape:"A3_Landscape",A4_Landscape:"A4_Landscape",A5_Landscape:"A5_Landscape",A6_Landscape:"A6_Landscape",A7_Landscape:"A7_Landscape",B4_Portrait:"B4_Portrait",B5_Portrait:"B5_Portrait",B4_Landscape:"B4_Landscape",B5_Landscape:"B5_Landscape",Executive_Portrait:"Executive_Portrait",Folio_Portrait:"Folio_Portrait",Ledger_Portrait:"Ledger_Portrait",Legal_Portrait:"Legal_Portrait",Letter_Portrait:"Letter_Portrait",EnvelopeDL_Portrait:"EnvelopeDL_Portrait",Quarto_Portrait:"Quarto_Portrait",Statement_Portrait:"Statement_Portrait",Tabloid_Portrait:"Tabloid_Portrait",Paper10x14_Portrait:"Paper10x14_Portrait",Paper11x17_Portrait:"Paper11x17_Portrait",Executive_Landscape:"Executive_Landscape",Folio_Landscape:"Folio_Landscape",Ledger_Landscape:"Ledger_Landscape",Legal_Landscape:"Legal_Landscape",Letter_Landscape:"Letter_Landscape",EnvelopeDL_Landscape:"EnvelopeDL_Landscape",Quarto_Landscape:"Quarto_Landscape",Statement_Landscape:"Statement_Landscape",Tabloid_Landscape:"Tabloid_Landscape",Paper10x14_Landscape:"Paper10x14_Landscape",Paper11x17_Landscape:"Paper11x17_Landscape"};CKEDITOR.plugins.StructureName={DocumentMainContent:"documentMainContent",SectionClass:"section",HeaderClass:"header",ContentClass:"content",FooterClass:"footer",FootnoteClass:"footnote",SectionSeparator:"sectionSeparator",SplitedList:"splitedList",SplitedFirst:"splitedFirst",SplitedMiddle:"splitedMiddle",SplitedEnd:"splitedEnd",SplitedListBefore:"splitedListBefore",EndNoteClass:"endNotes",PageNumber:"pageNumber",PageNumberAll:"pageNumberAll"};CKEDITOR.plugins.DataSetName={PageType:"page-type"};const r={DefaultPageHeader:`<div class="${CKEDITOR.plugins.StructureName.HeaderClass}" style="padding-top: 35.2pt;padding-left: 70.85pt; padding-right: 42.5pt;max-height: 336.8pt;"></div>`,DefaultPageContent:`<div class= "${CKEDITOR.plugins.StructureName.ContentClass}" style="padding-top: 7.3pt;padding-bottom: 7.3pt;padding-left: 70.85pt;padding-right: 42.5pt;" ></div>`,DefaultPageFootnote:`<div class="${CKEDITOR.plugins.StructureName.FootnoteClass}" style="padding-left: 70.85pt;padding-right: 42.5pt;margin-top: auto;"></div>`,DefaultPageFooter:`<div class="${CKEDITOR.plugins.StructureName.FooterClass}" style="padding-bottom: 35.2pt;padding-left: 70.85pt;padding-right: 42.5pt;max-height: 336.8pt;"></div>`,SplitterHelpStyle:`.${CKEDITOR.plugins.StructureName.SplitedList}{ list-style-type: none; } 
  `+`.${CKEDITOR.plugins.StructureName.SplitedListBefore}::before { display: none;} 
  `+`.${CKEDITOR.plugins.StructureName.SectionSeparator}{ display: none; } 
  `+`.${CKEDITOR.plugins.StructureName.SplitedFirst} { margin-bottom: 0 !important; border-bottom: medium none currentColor !important; padding-bottom: 0 !important; } 
  `+`.${CKEDITOR.plugins.StructureName.SplitedMiddle} { text-indent: 0 !important; margin-bottom: 0 !important; border-top: medium none currentColor !important; padding-bottom: 0 !important; margin-top: 0 !important; border-bottom: medium none currentColor !important; padding-top: 0 !important;} 
  `+`.${CKEDITOR.plugins.StructureName.SplitedEnd}{ text-indent:0 !important; border-top: medium none currentColor !important; margin-top: 0 !important; padding-top: 0 !important;}`};class u{static insertToNextPage(t,i,r){if(t&&i){if(r===!0)while(i.firstChild){const r=i.firstChild;n.hasClass(r,CKEDITOR.plugins.StructureName.SplitedFirst)===!0&&(n.removeClass(r,CKEDITOR.plugins.StructureName.SplitedFirst),n.addClass(r,CKEDITOR.plugins.StructureName.SplitedEnd));t.appendChild(r)}const f=i.childNodes.length-1;for(let e=i.childNodes,r=e.length-1;r>=0;r--){const i=e[r],o=t.firstElementChild,s=(n.hasClass(i,CKEDITOR.plugins.StructureName.SplitedEnd)===!0||n.hasClass(i,CKEDITOR.plugins.StructureName.SplitedFirst)===!0)&&n.hasClass(o,CKEDITOR.plugins.StructureName.SplitedEnd)===!0;if(r===f&&s===!0){if(n.isListItem(i.tagName)===!0)u.insertList(i,o);else while(i.lastChild)o.childElementCount===0?o.appendChild(i.lastChild):o.insertBefore(i.lastChild,o.firstChild);n.hasClass(i,CKEDITOR.plugins.StructureName.SplitedEnd)===!0&&n.removeClass(o,CKEDITOR.plugins.StructureName.SplitedEnd);i.remove()}else n.hasClass(i,CKEDITOR.plugins.StructureName.SplitedFirst)===!0&&(n.removeClass(i,CKEDITOR.plugins.StructureName.SplitedFirst),n.addClass(i,CKEDITOR.plugins.StructureName.SplitedEnd)),o&&o.childElementCount!==0?t.insertBefore(i,t.firstChild):t.appendChild(i)}}}static insertList(t,i){if(t&&i&&n.isListItem(t.tagName)!==!1&&n.isListItem(i.tagName)!==!1){let e=i.getAttribute("start");e=parseInt(e);i.removeAttribute("start");let r=t.lastElementChild,f=i.firstElementChild;while(r){if(n.hasClass(f,CKEDITOR.plugins.StructureName.SplitedList)===!1){e&&e--;i.insertBefore(r,f);r=r.previousElementSibling;continue}const t=r.firstElementChild;if(t&&t.tagName!=="SPAN"){let t=f.lastElementChild;while(t&&n.isListItem(t.tagName)===!1)t=t.nextElementSibling;if(t&&n.isListItem(t.tagName)===!0){let i=r.lastElementChild;while(i&&n.isListItem(i.tagName)===!1)i=i.nextElementSibling;i&&n.isListItem(i.tagName)===!0&&u.insertList(i,t)}else i.insertBefore(r,f)}else{if(n.hasClass(f,CKEDITOR.plugins.StructureName.SplitedList)===!0)while(r.firstElementChild)if(n.isListItem(r.firstElementChild.tagName)===!0){let t=f.lastElementChild;while(t&&n.isListItem(t.tagName)===!1)t=t.nextElementSibling;u.insertList(r.firstElementChild,t);break}else f.insertBefore(r.firstElementChild,f.firstElementChild);else e&&e--,i.insertBefore(r,f);n.removeClass(f,CKEDITOR.plugins.StructureName.SplitedList);f=i.firstElementChild}r=r.previousElementSibling}e&&e>0&&i.setAttribute("start",e)}}unionSection(){let n=this.nextPage;const i=this.content,r=this.footnote;while(n){let u=n.content.getFirst();while(u)u.hasClass(CKEDITOR.plugins.StructureName.SplitedEnd)?t.unionSplittedReverse(i.$.lastChild,u.$):i.$.appendChild(u.$),u=n.content.getFirst();for(u=n.footnote.getFirst();u;){if(u.getName()==="hr"){u=u.getNext();continue}u.hasClass(CKEDITOR.plugins.StructureName.SplitedEnd)?t.unionSplittedReverse(r.$.lastChild,u.$):r.$.appendChild(u.$);u=n.footnote.getFirst()}n.remove();n=this.nextPage}}}class t{static unionSplittedReverse(i,r){if(n.hasClass(r,CKEDITOR.plugins.StructureName.SplitedEnd)!==!1){const u=r.getElementsByTagName("BR");for(let n=0;n<u.length;n++)u[n].remove();if(n.isListItem(i.tagName.toLocaleLowerCase())===!0&&n.isListItem(r.tagName.toLocaleLowerCase())===!0){t.unionSplittedListRevers(i,r);return}while(r.firstChild)i.appendChild(r.firstChild);n.hasClass(r,CKEDITOR.plugins.StructureName.SplitedEnd)===!0&&n.removeClass(i,CKEDITOR.plugins.StructureName.SplitedFirst);r.remove()}}static unionSplittedListRevers(i,r){if(n.isListItem(i.tagName)!==!1&&n.isListItem(r.tagName)!==!1){const f=i.lastChild;let u=r.firstChild;while(u){if(n.hasClass(u,CKEDITOR.plugins.StructureName.SplitedList)){let i=u.firstElementChild;while(i&&n.isListItem(i.tagName)===!1)i=i.nextElementSibling;if(i&&n.isListItem(i.tagName)===!0){let r=f.lastElementChild;while(r&&n.isListItem(r.tagName)===!1)r=r.nextElementSibling;if(r&&n.isListItem(r.tagName)===!0)t.unionSplittedListRevers(r,i),u.remove();else{while(u.firstChild)f.appendChild(u.firstChild);u.remove()}}}else i.appendChild(u);u=r.firstChild}r.remove()}}}class e{static normalizeList(t,i){if(n.isListItem(t.getName())!==!1&&n.isListItem(i.getName())!==!1){let u=0;for(let n=0;n<t.getChildCount();n++)t.getChild(n).getName()==="li"&&u++;const f=i.getFirst(),o=f.getFirst();o&&o.getName()!=="span"?f.addClass(CKEDITOR.plugins.StructureName.SplitedList):u++;i.setAttribute("start",u);let r=f.getFirst();while(r&&n.isListItem(r.getName())===!1)r=r.getNext();if(r&&n.isListItem(r.getName())===!0){let i=t.getLast().getFirst();while(i&&n.isListItem(i.getName())===!1)i=i.getNext();i&&n.isListItem(i.getName())===!0&&e.normalizeList(i,r)}}}}class n{static styleValueToFloat(n){n=n.replace(/[a-z]/g,"");const t=parseFloat(n);return t?Math.round(t):0}static addClass(t,i){return t instanceof CKEDITOR.dom.element?t.addClass(i):n.isHtmlNode(t)?t&&t.classList&&t.classList.add(i):!1}static removeClass(t,i){return t instanceof CKEDITOR.dom.element?t.removeClass(i):n.isHtmlNode(t)?t&&t.classList&&t.classList.remove(i):!1}static hasClass(t,i){return t instanceof CKEDITOR.dom.element?t.hasClass(i):n.isHtmlNode(t)?t&&t.classList&&t.classList.contains(i):!1}static isListItem(n){return n=n.toLowerCase(),n==="ol"||n==="ul"}static getWindow(n){return(n.type===3&&(n=n.getParent()),n.nodeType===3&&(n=new CKEDITOR.dom.element(n.parentElement)),n instanceof CKEDITOR.dom.element)?n.getDocument().getWindow():null}static isHtmlNode(n){return typeof Node=="object"?n instanceof Node:n&&typeof n=="object"&&typeof n.nodeType=="number"&&typeof n.nodeName=="string"}static toCKeditorDomElement(t){return t instanceof CKEDITOR.dom.element?t:n.isHtmlNode(t)?new CKEDITOR.dom.element(t):null}static toHtmlNode(t){return t instanceof CKEDITOR.dom.element?t.$:n.isHtmlNode(t)?t:null}}class i{static header(){return new CKEDITOR.dom.element.createFromHtml(r.DefaultPageHeader)}static content(){return new CKEDITOR.dom.element.createFromHtml(r.DefaultPageContent)}static footer(){return new CKEDITOR.dom.element.createFromHtml(r.DefaultPageFooter)}static footnote(){return new CKEDITOR.dom.element.createFromHtml(r.DefaultPageFootnote)}static pageStructure(n){n.append(i.header());const t=i.content();return n.append(t),n.append(i.footnote()),n.append(i.footer()),t}static documentMainContent(){const n=new CKEDITOR.dom.element("div");return n.addClass(CKEDITOR.plugins.StructureName.DocumentMainContent),n}static section(){const n=new CKEDITOR.dom.element("div");return n.addClass(CKEDITOR.plugins.StructureName.SectionClass),n.data(CKEDITOR.plugins.DataSetName.PageType)||n.data(CKEDITOR.plugins.DataSetName.PageType,h.A4_Portrait),n.setAttributes({contenteditable:"false"}),n}static sectionSeparator(){const n=new CKEDITOR.dom.element("div");return n.addClass(CKEDITOR.plugins.StructureName.SectionSeparator),n}}CKEDITOR.dom.element.prototype.getElementsByClassName=function(n){const t=this.$;return t?t.getElementsByClassName(n):null};CKEDITOR.dom.element.prototype.getFirstByClassName=function(n){const i=this.$;if(!i)return null;const t=i.getElementsByClassName(n)[0];return!t||t.length===0?null:new CKEDITOR.dom.element(t)};CKEDITOR.dom.element.prototype.getTextNodeOne=function(){let n=null;for(let i=this.getChildren(),t=0;t<i.count();t++){const u=i.getItem(t),r=u.type;if(r===3)return u;if((r===1||r===9||r===11)&&(n=u.getTextNodeOne(),n))return n}return n};CKEDITOR.dom.element.prototype.getTextNodeLast=function(){let n=null;for(let i=this.getChildren(),t=i.count()-1;t>=0;t--){const u=i.getItem(t),r=u.type;if(r===3)return u;if((r===1||r===9||r===11)&&(n=u.getTextNodeLast(),n))return n}return n};CKEDITOR.dom.element.prototype.getFirstTextNodes=function(){let n=null;for(let i=this.getChildren().$,t=0;t<i.length;t++){const u=i[t],r=u.nodeType;if(r===3)return u;if((r===1||r===9||r===11)&&(n=new CKEDITOR.dom.element(u).getFirstTextNodes(),n))return n}return n};CKEDITOR.dom.element.prototype.getAllTextNodes=function(){let n=[];for(let i=this.getChildren().$,t=0;t<i.length;t++){const u=i[t],r=u.nodeType;r===3?n.push(u):(r===1||r===9||r===11)&&(n=n.concat(new CKEDITOR.dom.element(u).getAllTextNodes()))}return n};CKEDITOR.dom.element.prototype.containsNode=function(n){return this.$.contains(n)};CKEDITOR.TransferProcessFromPrev=function(){};CKEDITOR.TransferProcessFromPrev.prototype={exec:function(n,t){if(t&&!(t instanceof CKEDITOR.editor)){const i=t.getAscendantByClass(CKEDITOR.plugins.StructureName.SectionClass,t.type!==3);i&&this.exec(n,this.getPrevPage(i))}},getPrevPage:function(n){if(!n)return null;const t=n.getPrevious();return!t||t.hasClass(CKEDITOR.plugins.StructureName.SectionSeparator)?n:t}};CKEDITOR.TransferProcess=function(){};CKEDITOR.TransferProcess.prototype={exec:function(n,t){if(!(t instanceof CKEDITOR.editor)&&t){const r=t.getAscendantByClass(CKEDITOR.plugins.StructureName.SectionClass,t.type!==3);let i;if(r){if(this.hasEmptySpace(r)){if(this.isLastPage(r))return;if(i=new CKEDITOR.Page(n,r),i.reverse(),i=r.getNext(),!i||i.hasClass(CKEDITOR.plugins.StructureName.SectionSeparator))return;this.exec(n,i)}else{if(i=new CKEDITOR.Page(n,r),i.direct(),i=r.getNext(),!i||i.hasClass(CKEDITOR.plugins.StructureName.SectionSeparator))return;this.exec(n,i)}n.execCommand("pageNumber");CKEDITOR.MutationObserver.init(CKEDITOR.MutationObserver.targetHtml)}}},hasEmptySpace:function(n){const t=n.findOne(`.${CKEDITOR.plugins.StructureName.FootnoteClass}`),i=n.findOne(`.${CKEDITOR.plugins.StructureName.ContentClass}`);if(!t||!i)throw"page must contain the footnote area!";const r=i.getClientRect(!0),u=t.getClientRect(!0);return r&&u?u.top-r.bottom>3:!1},isLastPage:function(n){if(!n)return!1;const t=n.getNext();return!t||t.hasClass(CKEDITOR.plugins.StructureName.SectionSeparator)?!0:!1}};CKEDITOR.PaginallView=function(){};CKEDITOR.PaginallView.prototype={exec:function(n){let i=n.document.findOne(`.${CKEDITOR.plugins.StructureName.DocumentMainContent}`);i||(i=this.createDocStructure(n));let t=i.getFirst();while(t){if(t.hasClass(CKEDITOR.plugins.StructureName.SectionSeparator)){t=t.getNext();continue}const i=new CKEDITOR.Page(n,t).start();t=i.getNext()}CKEDITOR.MutationObserver.init(CKEDITOR.MutationObserver.targetHtml);n.execCommand("pageNumber")},createDocStructure:function(n){const t=n.document.getBody(),r=n.createRange();r.setStartAt(t,CKEDITOR.POSITION_AFTER_START);r.setEndAt(t,CKEDITOR.POSITION_BEFORE_END);const e=r.extractContents(),f=t.append(i.documentMainContent());let u=f.append(i.section());return u=i.pageStructure(u),e.appendTo(u),f}};CKEDITOR.SectionUnion=function(){};CKEDITOR.SectionUnion.prototype={exec:function(n){let i=n.document.findOne(`.${CKEDITOR.plugins.StructureName.DocumentMainContent}`);i||(i=this.createDocStructure(n));let t=i.getFirst();while(t){if(t.hasClass(CKEDITOR.plugins.StructureName.SectionSeparator)){t=t.getNext();continue}new CKEDITOR.Page(n,t).unionSection();t=t.getNext()}}};CKEDITOR.Page=function(i,r){const o=i,f=r;this.isSectionEnd=f.getNext()?f.getNext().hasClass(CKEDITOR.plugins.StructureName.SectionSeparator):!0;this.content=f.findOne(`.${CKEDITOR.plugins.StructureName.ContentClass}`);const s=function(n){const t=n.findOne(`.${CKEDITOR.plugins.StructureName.ContentClass}`),i=t.getClientRect(!0);return i.top},h=function(n){const t=n.findOne(`.${CKEDITOR.plugins.StructureName.ContentClass}`);return t.getChildCount()};this.clonePage=function(){const t=f.clone();t.insertAfter(f);let n=f.getFirst();while(n){const r=n.hasClass(CKEDITOR.plugins.StructureName.HeaderClass)||n.hasClass(CKEDITOR.plugins.StructureName.FooterClass),i=n.clone(r);n.hasClass(CKEDITOR.plugins.StructureName.FootnoteClass)&&i.append(n.getFirst().clone(!1));t.append(i);n=n.getNext()}return o.execCommand("pageNumber"),t};this.reverse=function(){const i=this.emptySpace(),n=f.getNext(),e=s(n),o=e+i,u=this.content;if(i<5)return console.log(i+" emptySpace"),null;const r=this.reverseIteration(n.findOne(`.${CKEDITOR.plugins.StructureName.ContentClass}`),o);if(r&&r.length>0){r.forEach(function(n){n.hasClass(CKEDITOR.plugins.StructureName.SplitedEnd)?t.unionSplittedReverse(u.$.lastChild,n.$):u.append(n)});h(n)===0&&n.remove();const i=this.direct();if(!i)return f.getNext()}return null};this.emptySpace=function(){const n=f.findOne(`.${CKEDITOR.plugins.StructureName.FootnoteClass}`),t=f.findOne(`.${CKEDITOR.plugins.StructureName.ContentClass}`);if(!n||!t)throw"page must contain the footnote area!";const i=t.getClientRect(!0),r=n.getClientRect(!0);return i&&r?r.top-i.bottom:0};this.direct=function(){const r=this.directIterator(),s=r?r.fragment:null,t=r?r.caret:null;if(s&&s.getChildCount()!==0){let h=f.getNext();(!h||h.hasClass(CKEDITOR.plugins.StructureName.SectionSeparator))&&(h=this.clonePage());const c=h.findOne(`.${CKEDITOR.plugins.StructureName.ContentClass}`);for(var a=s.$.childNodes,l=0;l<a.length;l++){const t=a[l];n.hasClass(t,CKEDITOR.plugins.StructureName.SplitedFirst)===!0&&n.isListItem(t.tagName)===!0&&e.normalizeList(this.content.getLast(),n.toCKeditorDomElement(t))}u.insertToNextPage(c.$,s.$,this.isSectionEnd);c.find("a.footnotesCommon").toArray().forEach(function(n){n.getAscendantByClass(CKEDITOR.plugins.StructureName.EndNoteClass)||new CKEDITOR.FootnoteElement(n).addDescription()});this.content.find("a.footnotesCommon").toArray().forEach(function(n){n.getAscendantByClass(CKEDITOR.plugins.StructureName.EndNoteClass)||new CKEDITOR.FootnoteElement(n).addDescription()});let i=null;if(t)if(t.splited&&t.offset)i=o.createRange(),i.setStart(c.getTextNodeOne(),t.offset),i.collapse(!0);else if(t.offset||t.offset===0)if(c.contains(t.element))i=o.createRange(),i.setStart(t.element,t.offset),i.collapse(!0);else{const n=f.findOne(`.${CKEDITOR.plugins.StructureName.FootnoteClass}`);n.contains(t.element)&&(i=o.createRange(),i.setStart(t.element,t.offset),i.collapse(!0))}if(i){const n=o.getSelection();n.selectRanges([i])}return}};this.start=function(){const t=this.paragraphIterator();if(!t||t.getChildCount()===0)return f;const u=this.isSectionEnd?this.clonePage():f.getNext(),o=u.findOne(`.${CKEDITOR.plugins.StructureName.ContentClass}`);for(var r=t.$.childNodes,i=0;i<r.length;i++){const t=r[i];n.hasClass(t,CKEDITOR.plugins.StructureName.SplitedFirst)===!0&&(n.addClass(t,CKEDITOR.plugins.StructureName.SplitedEnd),n.removeClass(t,CKEDITOR.plugins.StructureName.SplitedFirst),n.isListItem(t.tagName)===!0&&e.normalizeList(this.content.getLast(),n.toCKeditorDomElement(t)))}return t.appendTo(o),f};this.unionSection=function(){let n=f.getNext();if(n&&!n.hasClass(CKEDITOR.plugins.StructureName.SectionSeparator)){const i=this.content,r=f.findOne(`.${CKEDITOR.plugins.StructureName.FootnoteClass}`);while(n){const f=n.findOne(`.${CKEDITOR.plugins.StructureName.ContentClass}`),e=n.findOne(`.${CKEDITOR.plugins.StructureName.FootnoteClass}`);let u=f.getFirst();while(u)u.hasClass(CKEDITOR.plugins.StructureName.SplitedEnd)?t.unionSplittedReverse(i.$.lastChild,u.$):i.$.appendChild(u.$),u=f.getFirst();for(u=e.getFirst();u;){if(u.getName()==="hr"){u=u.getNext();continue}u.hasClass(CKEDITOR.plugins.StructureName.SplitedEnd)?t.unionSplittedReverse(r.$.lastChild,u.$):r.$.appendChild(u.$);u=e.getFirst()}const o=n;n=n.getNext();o.remove();(!n||n.hasClass(CKEDITOR.plugins.StructureName.SectionSeparator))&&(n=null)}}};this.directIterator=function(){const f=o.getSelection(),u=f.getNative(),r=u?{element:new CKEDITOR.dom.node(u.anchorNode),offset:u.anchorOffset,splited:!1}:null;let t=this.content.getFirst(),i=null;while(t){if(t.type===3){t=t.getNext();continue}const r=this.getContentEnd(),u=t.getClientRect(!0);if(u&&u.bottom>=r){for(i=o.createRange(),t.getName()==="table"?(i.setStartAt(t,CKEDITOR.POSITION_BEFORE_START),i.setEndAt(this.content,CKEDITOR.POSITION_BEFORE_END)):t.hasClass(CKEDITOR.plugins.StructureName.EndNoteClass)?(i.setStartAt(t,CKEDITOR.POSITION_BEFORE_START),i.setEndAt(this.content,CKEDITOR.POSITION_BEFORE_END)):t.getLast()?(i.setStartAt(t,CKEDITOR.POSITION_AFTER_START),i.setEndAt(t,CKEDITOR.POSITION_AFTER_END),i.moveToLine(r),i.optimizePage(),i.setEndAt(this.content,CKEDITOR.POSITION_BEFORE_END)):(i.setStartAt(t,CKEDITOR.POSITION_BEFORE_START),i.setEndAt(this.content,CKEDITOR.POSITION_BEFORE_END)),t=t.getNext();t;)n.hasClass(t,CKEDITOR.plugins.StructureName.SplitedFirst)===!0&&(n.addClass(t,CKEDITOR.plugins.StructureName.SplitedEnd),n.removeClass(t,CKEDITOR.plugins.StructureName.SplitedFirst)),t=t.getNext();continue}t=t.getNext()}return i&&u?i.startContainer.equals(r.element)&&(r.offset=r.offset-i.startOffset,r.splited=!0,r.offset<0&&(r.offset=null)):r&&r.offset&&(r.offset=null),i?{fragment:i.extractContents(),caret:r}:null};this.reverseIteration=function(n,t){if(!n)return null;let i=n.getFirst();const r=[];while(i){const n=i.getClientRect(!0);if(!n)break;if(i.getName()==="table"&&n.bottom>t)break;else if(n.top<=t)r.push(i);else return r;i=i.getNext()}return r};this.paragraphIterator=function(){if(!this.content)return null;let n=this.content.getFirst();while(n){n.find("a.footnotesCommon").toArray().forEach(function(n){n.getAscendantByClass(CKEDITOR.plugins.StructureName.EndNoteClass)||new CKEDITOR.FootnoteElement(n).addDescription()});const t=this.getContentEnd(),i=n.getClientRect(!0);if(i&&i.bottom>=t){const i=o.createRange();if(n.getName()==="table")return i.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),i.setEndAt(this.content,CKEDITOR.POSITION_BEFORE_END),i.extractContents();n.hasClass(CKEDITOR.plugins.StructureName.EndNoteClass)&&(i.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),i.setEndAt(this.content,CKEDITOR.POSITION_BEFORE_END));const r=n.getLast();return r?(i.setStartAt(n,CKEDITOR.POSITION_AFTER_START),i.setEndAt(n,CKEDITOR.POSITION_AFTER_END),i.moveToLine(t),i.optimizePage(),i.setEndAt(this.content,CKEDITOR.POSITION_BEFORE_END),i.extractContents()):(i.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),i.setEndAt(this.content,CKEDITOR.POSITION_BEFORE_END),i.extractContents())}n=n.getNext()}return null};const c=function(n){n=n.replace(/[a-z]/g,"");const t=parseFloat(n);return t?Math.round(t):0};this.getContentEnd=function(){const n=this.content.getClientRect(!0),t=c(this.content.getComputedStyle("padding-bottom"));return n?n.bottom-t:null}};CKEDITOR.tools.extend(CKEDITOR.dom.range.prototype,{hasMoreTwoLine:function(){const n=this.getClientRects();if(!n||n.length===0)return!1;let t=0,i=0;for(let r=0;r<n.length;r++){const u=n[r];if(t>2)return!0;u.top>i&&(i=u.top,t++)}return t>2},moveToLine:function(n){this.overLine(n)||this.iterate(this.startContainer,n,!0)},overLine:function(n){const t=this.getClientRects(!0),i=t[t.length-1];return i.bottom>n&&!this.hasMoreTwoLine()?!0:t[0].top>n?!0:!1},splitByLine:function(n){const t=this.startContainer.getClientRect(!0);return t.top>=n?!0:t.bottom>n?!0:!1},iterate:function(n,t,i){const r=n;if(n=n.getFirst(),n)while(n){if(n.type!==3){if(this.setStartAt(n,CKEDITOR.POSITION_AFTER_START),this.overLine(t)){i&&r.addClass(CKEDITOR.plugins.StructureName.SplitedFirst);return}if(this.splitByLine(t))i&&r.addClass(CKEDITOR.plugins.StructureName.SplitedFirst),this.iterate(n,t,!1);else{n=n.getNext();continue}}if(n.type===3)for(let i=0,r=n.getText(),u=r.length;i<u;i++)if(this.setStart(n,i),this.overLine(t))return;if(this.overLine(t))return;n=n.getNext()}},optimizePage:function(){for(var t=this.startContainer,i=this.startOffset;i===0;)i?i>=t.getLength()&&this.setStartAfter(t):(this.setStartBefore(t),n.hasClass(t,CKEDITOR.plugins.StructureName.SplitedFirst)===!0&&(n.addClass(t,CKEDITOR.plugins.StructureName.SplitedEnd),n.removeClass(t,CKEDITOR.plugins.StructureName.SplitedFirst))),t=this.startContainer,i=this.startOffset;for(t=this.endContainer,i=this.endOffset;i===0;)i?i>=t.getLength()&&this.setEndAfter(t):this.setEndBefore(t),t=this.endContainer,i=this.endOffset}})})();