!function(){function e(e){return{"aria-label":e,class:"edi_pagebreak",contenteditable:"false","data-edi-display-name":"pagebreak","data-edi-pagebreak":1,style:"page-break-after: always",title:e}}NEW_CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",lang:"af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn",icons:"pagebreak,pagebreak-rtl",hidpi:!0,onLoad:function(){var e=("background:url("+NEW_CKEDITOR.getUrl(this.path+"images/pagebreak.gif")+") no-repeat center center;clear:both;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;padding:0;height:7px;cursor:default;").replace(/;/g," !important;");NEW_CKEDITOR.addCss("div.edi_pagebreak{"+e+"}")},init:function(e){e.blockless||(e.addCommand("pagebreak",NEW_CKEDITOR.plugins.pagebreakCmd),e.ui.addButton&&e.ui.addButton("PageBreak",{label:e.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"}),NEW_CKEDITOR.env.webkit&&e.on("contentDom",(function(){e.document.on("click",(function(a){(a=a.data.getTarget()).is("div")&&a.hasClass("edi_pagebreak")&&e.getSelection().selectElement(a)}))})))},afterInit:function(a){function t(t){NEW_CKEDITOR.tools.extend(t.attributes,e(a.lang.pagebreak.alt),!0),t.children.length=0}var n=(r=a.dataProcessor)&&r.dataFilter,r=r&&r.htmlFilter,i=/page-break-after\s*:\s*always/i,l=/display\s*:\s*none/i;r&&r.addRules({attributes:{class:function(e,a){var t=e.replace("edi_pagebreak","");if(t!=e){var n=NEW_CKEDITOR.htmlParser.fragment.fromHtml('<span style="display: none;">&nbsp;</span>').children[0];a.children.length=0,a.add(n),delete(n=a.attributes)["aria-label"],delete n.contenteditable,delete n.title}return t}}},{applyToAll:!0,priority:5}),n&&n.addRules({elements:{div:function(e){if(e.attributes["data-edi-pagebreak"])t(e);else if(i.test(e.attributes.style)){var a=e.children[0];a&&"span"==a.name&&l.test(a.attributes.style)&&t(e)}}}})}}),NEW_CKEDITOR.plugins.pagebreakCmd={exec:function(e){e.insertElement(NEW_CKEDITOR.plugins.pagebreak.createElement(e))},context:"div",allowedContent:{div:{styles:"!page-break-after"},span:{match:function(e){return(e=e.parent)&&"div"==e.name&&e.styles&&e.styles["page-break-after"]},styles:"display"}},requiredContent:"div{page-break-after}"},NEW_CKEDITOR.plugins.pagebreak={createElement:function(a){return a.document.createElement("div",{attributes:e(a.lang.pagebreak.alt)})}}}();