@richscripts/richtexteditor 2.15.0 → 2.16.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/README.md +9 -0
- package/angular/build-manifest.json +4 -4
- package/angular/index.mjs +1 -1
- package/index.d.ts +42 -33
- package/integrations/shared.js +10 -0
- package/package.json +1 -1
- package/richtexteditor/all_plugins.js +2062 -1542
- package/richtexteditor/all_plugins.min.js +76 -61
- package/richtexteditor/lang/rte-lang-de.js +33 -0
- package/richtexteditor/lang/rte-lang-es.js +33 -0
- package/richtexteditor/lang/rte-lang-fr.js +33 -0
- package/richtexteditor/lang/rte-lang-it.js +33 -0
- package/richtexteditor/lang/rte-lang-ja.js +33 -0
- package/richtexteditor/lang/rte-lang-ko.js +33 -0
- package/richtexteditor/lang/rte-lang-nl.js +33 -0
- package/richtexteditor/lang/rte-lang-pt-pt.js +33 -0
- package/richtexteditor/lang/rte-lang-pt.js +33 -0
- package/richtexteditor/lang/rte-lang-ru.js +33 -0
- package/richtexteditor/lang/rte-lang-zh-Hans.js +33 -0
- package/richtexteditor/lang/rte-lang-zh-Hant.js +33 -0
- package/richtexteditor/plugins/a11yenhance.js +3 -1
- package/richtexteditor/plugins/a11yenhance.min.js +1 -1
- package/richtexteditor/plugins/accessibilitychecker.js +7 -7
- package/richtexteditor/plugins/accessibilitychecker.min.js +1 -1
- package/richtexteditor/plugins/aitoolkit.js +91 -83
- package/richtexteditor/plugins/aitoolkit.min.js +4 -4
- package/richtexteditor/plugins/all_plugins.js +2062 -1542
- package/richtexteditor/plugins/all_plugins.min.js +76 -61
- package/richtexteditor/plugins/autoembed.js +1 -1
- package/richtexteditor/plugins/autoembed.min.js +1 -1
- package/richtexteditor/plugins/charlimit.js +2 -2
- package/richtexteditor/plugins/charlimit.min.js +2 -2
- package/richtexteditor/plugins/comments.js +2 -2
- package/richtexteditor/plugins/comments.min.js +2 -2
- package/richtexteditor/plugins/contentminimap.js +3 -3
- package/richtexteditor/plugins/contentminimap.min.js +1 -1
- package/richtexteditor/plugins/crdt-engine.js +27 -1
- package/richtexteditor/plugins/documentimport.js +30 -8
- package/richtexteditor/plugins/documentimport.min.js +4 -4
- package/richtexteditor/plugins/docxexport.js +30 -1
- package/richtexteditor/plugins/docxexport.min.js +2 -2
- package/richtexteditor/plugins/emojiautocomplete.js +1 -1
- package/richtexteditor/plugins/emojiautocomplete.min.js +1 -1
- package/richtexteditor/plugins/html2pdf.js +7 -7
- package/richtexteditor/plugins/html2pdf.min.js +1 -1
- package/richtexteditor/plugins/imageeditor.js +19 -6
- package/richtexteditor/plugins/imageeditor.min.js +1 -1
- package/richtexteditor/plugins/insertcode.js +8 -8
- package/richtexteditor/plugins/insertcode.min.js +4 -4
- package/richtexteditor/plugins/insertemoji.js +4 -4
- package/richtexteditor/plugins/insertemoji.min.js +1 -1
- package/richtexteditor/plugins/insertgallery.js +4 -4
- package/richtexteditor/plugins/insertgallery.min.js +1 -1
- package/richtexteditor/plugins/inserttemplate.js +10 -2
- package/richtexteditor/plugins/inserttemplate.min.js +1 -1
- package/richtexteditor/plugins/markdownexport.js +1 -1
- package/richtexteditor/plugins/markdownexport.min.js +2 -2
- package/richtexteditor/plugins/mentionplugin.js +2 -2
- package/richtexteditor/plugins/mentionplugin.min.js +1 -1
- package/richtexteditor/plugins/mermaiddiagram.js +5 -5
- package/richtexteditor/plugins/mermaiddiagram.min.js +2 -2
- package/richtexteditor/plugins/nodetypes.js +1 -1
- package/richtexteditor/plugins/nodetypes.min.js +1 -1
- package/richtexteditor/plugins/pagination.js +2 -2
- package/richtexteditor/plugins/pagination.min.js +1 -1
- package/richtexteditor/plugins/pdfexport.js +1751 -1366
- package/richtexteditor/plugins/pdfexport.min.js +28 -13
- package/richtexteditor/plugins/readaloud.js +1 -1
- package/richtexteditor/plugins/readaloud.min.js +1 -1
- package/richtexteditor/plugins/revisionhistory.js +4 -4
- package/richtexteditor/plugins/revisionhistory.min.js +2 -2
- package/richtexteditor/plugins/rubyannotation.js +2 -2
- package/richtexteditor/plugins/rubyannotation.min.js +1 -1
- package/richtexteditor/plugins/sanitizer.js +57 -4
- package/richtexteditor/plugins/sanitizer.min.js +1 -1
- package/richtexteditor/plugins/slashcommand.js +2 -2
- package/richtexteditor/plugins/slashcommand.min.js +2 -2
- package/richtexteditor/plugins/smartchips.js +3 -3
- package/richtexteditor/plugins/smartchips.min.js +1 -1
- package/richtexteditor/plugins/spellcheck.js +3 -3
- package/richtexteditor/plugins/spellcheck.min.js +1 -1
- package/richtexteditor/plugins/stateinspector.js +2 -2
- package/richtexteditor/plugins/stateinspector.min.js +2 -2
- package/richtexteditor/plugins/structured-content-bridge.js +34 -8
- package/richtexteditor/plugins/structured-content-bridge.min.js +5 -5
- package/richtexteditor/plugins/textdirection.js +1 -1
- package/richtexteditor/plugins/textdirection.min.js +1 -1
- package/richtexteditor/plugins/trackedchanges.js +1 -1
- package/richtexteditor/plugins/trackedchanges.min.js +1 -1
- package/richtexteditor/plugins/yjscollab.js +2 -2
- package/richtexteditor/plugins/yjscollab.min.js +1 -1
- package/richtexteditor/rte-config.js +14 -36
- package/richtexteditor/rte-watchdog.js +3 -1
- package/richtexteditor/rte-webcomponent.js +3 -1
- package/richtexteditor/rte.js +16 -38
- package/richtexteditor/runtime/colorpicker_more_ns.htm +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_nodetypes=RTE_Plugin_NodeTypes;function RTE_Plugin_NodeTypes(){var E=this,c,a,v=[],g={},D=0,N=null;E.PluginName="NodeTypes",E.InitConfig=function(t){if(c=t,c.nodeTypesEnabled!==!1&&Array.isArray(c.nodeTypes))for(var r=0;r<c.nodeTypes.length;r++)R(c.nodeTypes[r])},E.InitEditor=function(t){a=t,c.nodeTypesEnabled!==!1&&(a.nodeTypes={find:function(r){return H(r)},get:function(r){return g[r]||null},insert:function(r,n){return
|
|
1
|
+
window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_nodetypes=RTE_Plugin_NodeTypes;function RTE_Plugin_NodeTypes(){var E=this,c,a,v=[],g={},D=0,N=null;E.PluginName="NodeTypes",E.InitConfig=function(t){if(c=t,c.nodeTypesEnabled!==!1&&Array.isArray(c.nodeTypes))for(var r=0;r<c.nodeTypes.length;r++)R(c.nodeTypes[r])},E.InitEditor=function(t){a=t,c.nodeTypesEnabled!==!1&&(a.nodeTypes={find:function(r){return H(r)},get:function(r){return g[r]||null},insert:function(r,n){return _(r,n)},list:function(){return v.map(L)},register:function(r){return R(r)},serialize:function(){return B()},typeOf:function(r){var n=C(r);return n?n.name:null},unregister:function(r){return J(r)}},a.attachEvent("change",function(){x()}),I(),K(),setTimeout(F,0),O())};function R(t){if(!t||!t.name||typeof t.match!="string"&&typeof t.match!="function")return!1;g[t.name]&&J(t.name);var r={name:t.name,match:t.match,atomic:t.atomic!==!1,inline:!!t.inline,toJSON:typeof t.toJSON=="function"?t.toJSON:null,fromJSON:typeof t.fromJSON=="function"?t.fromJSON:null,toMarkdown:typeof t.toMarkdown=="function"?t.toMarkdown:null,toExportHTML:typeof t.toExportHTML=="function"?t.toExportHTML:null,toDocx:typeof t.toDocx=="function"?t.toDocx:null,toPdf:typeof t.toPdf=="function"?t.toPdf:null,toWord:typeof t.toWord=="function"?t.toWord:null,allowTags:t.allowTags||[],allowAttributes:t.allowAttributes||[]};return v.push(r),g[r.name]=r,W(r),a&&O(),!0}function J(t){return g[t]?(v=v.filter(function(r){return r.name!==t}),delete g[t],!0):!1}function L(t){return{name:t.name,atomic:t.atomic,inline:t.inline,hasToJSON:!!t.toJSON,hasFromJSON:!!t.fromJSON,hasToMarkdown:!!t.toMarkdown,hasExportHTML:!!(t.toExportHTML||t.toDocx||t.toPdf),instances:H(t.name).length}}function W(t){c&&(P("sanitizerAllowTags",t.allowTags),P("sanitizerAllowAttributes",t.allowAttributes))}function P(t,r){if(!(!r||!r.length)){var n=c[t];Array.isArray(n)||(n=n?[n]:[]);for(var e=0;e<r.length;e++)n.indexOf(r[e])===-1&&n.push(r[e]);c[t]=n}}function k(t,r){if(!r||r.nodeType!==1)return!1;if(typeof t.match=="string")try{return r.matches(t.match)}catch{return!1}try{return!!t.match(r)}catch{return!1}}function C(t){for(var r=0;r<v.length;r++)if(k(v[r],t))return v[r];return null}function b(){return a&&a.getEditable?a.getEditable():null}function H(t){var r=b(),n=g[t],e=[];if(!r||!n)return e;for(var o=r.querySelectorAll("*"),l=0;l<o.length;l++)k(n,o[l])&&e.push(o[l]);return e}function w(){var t=b(),r=[];if(!t)return r;for(var n=t.querySelectorAll("*"),e=0;e<n.length;e++){var o=C(n[e]);o&&r.push({type:o,el:n[e]})}return r}function _(t,r){var n=g[t];if(!n||!n.fromJSON||!a)return null;var e=n.fromJSON(r||{}),o=typeof e=="string"?e:e&&e.outerHTML;return o?(a.insertHTML(o),x(),o):null}function B(){for(var t=[],r=w(),n=0;n<r.length;n++){var e=r[n].type,o=r[n].el;t.push({name:e.name,data:e.toJSON?M(e.toJSON,o,{}):z(o)})}return t}function z(t){for(var r={},n=t.attributes,e=0;n&&e<n.length;e++)n[e].name.indexOf("data-")===0&&(r[n[e].name]=n[e].value);return r}function M(t,r,n){try{return t(r)}catch{return n}}function I(){var t=b();if(!(!t||typeof MutationObserver>"u")){var r=new MutationObserver(function(){x()});r.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["contenteditable"]})}}function x(){clearTimeout(D),D=setTimeout(O,60)}function O(){for(var t=w(),r=0;r<t.length;r++)t[r].type.atomic&&t[r].el.getAttribute("contenteditable")!=="false"&&t[r].el.setAttribute("contenteditable","false")}function F(){p("getDocxBlob","toDocx"),p("exportToDocx","toDocx"),p("getPdfBytes","toPdf"),p("exportToPdf","toPdf"),p("downloadPdf","toPdf"),p("getWordDocument","toWord"),p("exportToWord","toWord"),p("downloadWord","toWord")}function p(t,r){if(!(!a||typeof a[t]!="function")){var n=a[t];a[t]=function(){var e=arguments,o=w().filter(function(i){return i.type[r]||i.type.toExportHTML});if(!o.length)return n.apply(a,e);var l=q(o,r),u;try{u=n.apply(a,e)}catch(i){throw l(),i}return u&&typeof u.then=="function"?u.then(function(i){return l(),i},function(i){throw l(),i}):(l(),u)}}}function q(t,r){var n=a.getDocument(),e=[],o=null;try{var l=n.getSelection();l&&l.rangeCount&&(o=l.getRangeAt(0).cloneRange())}catch{o=null}for(var u=0;u<t.length;u++){var i=t[u].el,y=t[u].type[r]||t[u].type.toExportHTML,m=y?M(y,i,null):null;if(m!=null){var h=n.createElement(t[u].type.inline?"span":"div");h.innerHTML=__RTE_TT(String(m)),i.parentNode.insertBefore(h,i),i.parentNode.removeChild(i),e.push({holder:h,original:i})}}var T=!1;return function(){if(!T){T=!0;for(var s=e.length-1;s>=0;s--){var f=e[s];f.holder.parentNode&&(f.holder.parentNode.insertBefore(f.original,f.holder),f.holder.parentNode.removeChild(f.holder))}if(o)try{var d=n.getSelection();d.removeAllRanges(),d.addRange(o)}catch{}}}}function K(){!a||typeof a.toMarkdown!="function"||(N=a.toMarkdown,a.toMarkdown=function(){var t=w().filter(function(A){return A.type.toMarkdown});if(!t.length)return N.call(a);var r=a.getDocument(),n=[],e=[],o=null;try{var l=r.getSelection();l&&l.rangeCount&&(o=l.getRangeAt(0).cloneRange())}catch{o=null}try{for(var u=0;u<t.length;u++){var i=t[u].el,y=M(t[u].type.toMarkdown,i,null);if(y!=null){var m="RTENODETYPETOKEN"+u+"ENDRTENODETYPETOKEN",h=r.createElement(t[u].type.inline?"span":"p");h.textContent=m,i.parentNode.insertBefore(h,i),i.parentNode.removeChild(i),n.push({holder:h,original:i}),e.push({token:m,markdown:String(y)})}}for(var T=N.call(a),s=0;s<e.length;s++)T=T.split(e[s].token).join(e[s].markdown);return T}finally{for(var f=n.length-1;f>=0;f--){var d=n[f];d.holder.parentNode&&(d.holder.parentNode.insertBefore(d.original,d.holder),d.holder.parentNode.removeChild(d.holder))}if(o)try{var S=r.getSelection();S.removeAllRanges(),S.addRange(o)}catch{}}})}}
|
|
@@ -419,14 +419,14 @@ function RTE_Plugin_Pagination() {
|
|
|
419
419
|
var h = doc.createElement("div");
|
|
420
420
|
h.className = "rte-page-hf rte-page-header";
|
|
421
421
|
h.style.top = (contentTop - Math.round(g.marginTop / 2)) + "px";
|
|
422
|
-
h.innerHTML = expand(g.headerHtml, pageNo, total);
|
|
422
|
+
h.innerHTML = __RTE_TT(expand(g.headerHtml, pageNo, total));
|
|
423
423
|
ov.appendChild(h);
|
|
424
424
|
}
|
|
425
425
|
if (g.footerHtml) {
|
|
426
426
|
var f = doc.createElement("div");
|
|
427
427
|
f.className = "rte-page-hf rte-page-footer";
|
|
428
428
|
f.style.top = (contentBottom + Math.round(g.marginBottom / 3)) + "px";
|
|
429
|
-
f.innerHTML = expand(g.footerHtml, pageNo, total);
|
|
429
|
+
f.innerHTML = __RTE_TT(expand(g.footerHtml, pageNo, total));
|
|
430
430
|
ov.appendChild(f);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_pagination=RTE_Plugin_Pagination,typeof RTE_DefaultConfig.paginationEnabled>"u"&&(RTE_DefaultConfig.paginationEnabled=!1),typeof RTE_DefaultConfig.pageFormat>"u"&&(RTE_DefaultConfig.pageFormat="A4"),typeof RTE_DefaultConfig.pageOrientation>"u"&&(RTE_DefaultConfig.pageOrientation="portrait"),typeof RTE_DefaultConfig.pageMargins>"u"&&(RTE_DefaultConfig.pageMargins={top:1,right:1,bottom:1,left:1}),typeof RTE_DefaultConfig.paginationShowPageNumbers>"u"&&(RTE_DefaultConfig.paginationShowPageNumbers=!0),typeof RTE_DefaultConfig.paginationShowPageCount>"u"&&(RTE_DefaultConfig.paginationShowPageCount=!0);function RTE_Plugin_Pagination(){var
|
|
1
|
+
window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_pagination=RTE_Plugin_Pagination,typeof RTE_DefaultConfig.paginationEnabled>"u"&&(RTE_DefaultConfig.paginationEnabled=!1),typeof RTE_DefaultConfig.pageFormat>"u"&&(RTE_DefaultConfig.pageFormat="A4"),typeof RTE_DefaultConfig.pageOrientation>"u"&&(RTE_DefaultConfig.pageOrientation="portrait"),typeof RTE_DefaultConfig.pageMargins>"u"&&(RTE_DefaultConfig.pageMargins={top:1,right:1,bottom:1,left:1}),typeof RTE_DefaultConfig.paginationShowPageNumbers>"u"&&(RTE_DefaultConfig.paginationShowPageNumbers=!0),typeof RTE_DefaultConfig.paginationShowPageCount>"u"&&(RTE_DefaultConfig.paginationShowPageCount=!0);function RTE_Plugin_Pagination(){var R=this,l,o,s=!1,u=null,A=null,F=!1,M=0,N=1,w="";R.PluginName="Pagination";var m=96,c=25.4,B={a4:{w:210/c,h:297/c},letter:{w:8.5,h:11},legal:{w:8.5,h:14},a3:{w:297/c,h:420/c},a5:{w:148/c,h:210/c},tabloid:{w:11,h:17}};R.InitConfig=function(e){l=e,s=!!l.paginationEnabled},R.InitEditor=function(e){o=e,D();try{o.attachEvent("ready",D)}catch{}try{o.attachEvent("aftersethtml",v)}catch{}o.setPageView=function(t){return s=!!t,E(),s},o.togglePageView=function(){return s=!s,E(),s},o.isPageView=function(){return s},o.getPageCount=function(){return s&&I(),N},o.setPageSetup=function(t){return t&&typeof t=="object"&&(t.format&&(l.pageFormat=t.format),t.orientation&&(l.pageOrientation=t.orientation),t.margins&&(l.pageMargins=t.margins),typeof t.headerHtml=="string"&&(l.pageHeaderHtml=t.headerHtml),typeof t.footerHtml=="string"&&(l.pageFooterHtml=t.footerHtml)),w="",E(),T()},o.getPageGeometry=function(){return T()},o.getPageOfElement=function(t){return U(t)},setTimeout(D,0),setTimeout(v,250)};function D(){var e=L();if(e&&(K(e),e!==A)){e.addEventListener("input",v,!0),e.addEventListener("keyup",v,!0),A=e;var t=e.defaultView||e.parentWindow;if(t)try{t.addEventListener("resize",v,!0)}catch{}}X(),E()}function L(){try{return o.getDocument()}catch{return null}}function b(){try{return o.getEditable()}catch{return null}}function z(){var e=null;try{typeof o.getDocumentPageSetup=="function"&&(e=o.getDocumentPageSetup())}catch{e=null}return(!e||typeof e!="object")&&(e={}),{format:e.format||l.pageFormat||"A4",orientation:e.orientation||l.pageOrientation||"portrait",margins:e.margins||l.pageMargins||{top:1,right:1,bottom:1,left:1},headerHtml:typeof e.headerHtml=="string"?e.headerHtml:l.pageHeaderHtml||"",footerHtml:typeof e.footerHtml=="string"?e.footerHtml:l.pageFooterHtml||""}}function H(e,t){if(typeof e=="number"&&isFinite(e))return e*m;if(typeof e=="string"){var r=/^\s*(-?[\d.]+)\s*(mm|cm|in|px|pt)?\s*$/.exec(e);if(r){var n=parseFloat(r[1]);switch(r[2]){case"mm":return n/c*m;case"cm":return n*10/c*m;case"pt":return n/72*m;case"px":return n;default:return n*m}}}return(t||0)*m}function T(){var e=z(),t=B[String(e.format).toLowerCase()]||B.a4,r=t.w,n=t.h;if(String(e.orientation).toLowerCase()==="landscape"){var a=r;r=n,n=a}var f=e.margins||{},i={pageWidth:Math.round(r*m),pageHeight:Math.round(n*m),marginTop:Math.round(H(f.top,1)),marginRight:Math.round(H(f.right,1)),marginBottom:Math.round(H(f.bottom,1)),marginLeft:Math.round(H(f.left,1)),format:e.format,orientation:e.orientation,headerHtml:e.headerHtml,footerHtml:e.footerHtml};return i.contentHeight=Math.max(120,i.pageHeight-i.marginTop-i.marginBottom),i.contentWidth=Math.max(120,i.pageWidth-i.marginLeft-i.marginRight),i}function E(){var e=b();if(e){if(!s){V(e);return}var t=T();e.classList.add("rte-page-view"),e.style.width=t.contentWidth+"px",e.style.paddingLeft=t.marginLeft+"px",e.style.paddingRight=t.marginRight+"px",e.style.paddingTop=t.marginTop+"px",e.style.paddingBottom=t.marginBottom+"px",e.style.margin="24px auto",e.style.boxSizing="content-box",e.style.background="#fff",e.style.minHeight=t.contentHeight+"px",v()}}function V(e){if(e=e||b(),e){e.classList.remove("rte-page-view");for(var t=["width","paddingLeft","paddingRight","paddingTop","paddingBottom","margin","boxSizing","background","minHeight"],r=0;r<t.length;r++)e.style[t[r]]=""}J(),N=1,w=""}function v(){if(s&&!M){var e=L(),t=e&&(e.defaultView||e.parentWindow)||window,r=t&&typeof t.requestAnimationFrame=="function"?function(n){return t.requestAnimationFrame(n)}:function(n){return setTimeout(n,16)};M=r(function(){M=0,I()})}}function j(e){for(var t=e.children,r=0;r<t.length;r++){var n=t[r];if(n&&n.nodeType===1&&!(n.getAttribute&&n.getAttribute("data-rte-page-overlay")==="true"))return n.offsetTop}return e.offsetTop}function U(e){if(!s||!e)return null;var t=b();if(!t)return null;for(var r=e;r&&r.parentNode&&r.parentNode!==t;)r=r.parentNode;if(!r||r.parentNode!==t)return null;for(var n=O(t,T()),a=r.offsetTop,f=1,i=0;i<n.length;i++)n[i]<=a&&f++;return f}function O(e,t){var r=[],n=e.children;if(!n||!n.length)return r;for(var a=[],f=0;f<n.length;f++){var i=n[f];!i||i.nodeType!==1||i.getAttribute&&i.getAttribute("data-rte-page-overlay")==="true"||a.push(i)}if(!a.length)return r;var g=a[0].offsetTop,d,h,p,y;for(d=0;d<a.length;d++){h=a[d],p=h.offsetTop,y=d+1<a.length?a[d+1].offsetTop:p+h.offsetHeight;var x=h.hasAttribute&&(h.hasAttribute("data-rte-page-break")||h.querySelector&&!!h.querySelector("[data-rte-page-break]"));if(x&&p>g){r.push(p),g=p;continue}if(y-g>t.contentHeight)for(p>g&&(r.push(p),g=p);y-g>t.contentHeight;)g+=t.contentHeight,r.push(g)}return r}function I(){if(s){var e=b(),t=L();if(!(!e||!t)){var r=T(),n=O(e,r);N=n.length+1;var a=r.pageWidth+"x"+r.pageHeight+"|"+r.contentHeight+"|"+n.join(",")+"|"+e.offsetHeight;a!==w&&(w=a,$(t,e,r,n))}}}function G(e,t){return u&&u.parentNode||(u=e.createElement("div"),u.setAttribute("data-rte-page-overlay","true"),u.setAttribute("contenteditable","false"),u.setAttribute("aria-hidden","true"),u.className="rte-page-overlay",(t.parentNode||e.body||e.documentElement).appendChild(u)),u}function J(){u&&u.parentNode&&u.parentNode.removeChild(u),u=null}function W(e,t,r){return String(e).replace(/\{\s*page\s*\}/gi,String(t)).replace(/\{\s*total\s*\}/gi,String(r))}function $(e,t,r,n){for(var a=G(e,t);a.firstChild;)a.removeChild(a.firstChild);var f=t.offsetTop,i=j(t),g=[i].concat(n),d=g.length,h=g[d-1]+r.contentHeight+r.marginBottom;a.style.position="absolute",a.style.left=t.offsetLeft+"px",a.style.top=f+"px",a.style.width=t.offsetWidth+"px",a.style.height=Math.max(t.offsetHeight,h-f)+"px",a.style.pointerEvents="none",a.style.zIndex="1";var p,y;for(p=0;p<n.length;p++){y=n[p]-f-Math.round(r.marginTop/2);var x=e.createElement("div");x.className="rte-page-sep",x.style.top=y+"px",a.appendChild(x)}for(p=0;p<g.length;p++){var C=p+1,k=g[p]-f,q=k+r.contentHeight;if(l.paginationShowPageNumbers){var S=e.createElement("div");S.className="rte-page-num",S.style.top=q+6+"px",S.appendChild(e.createTextNode(l.paginationShowPageCount?"Page "+C+" of "+d:"Page "+C)),a.appendChild(S)}if(r.headerHtml){var _=e.createElement("div");_.className="rte-page-hf rte-page-header",_.style.top=k-Math.round(r.marginTop/2)+"px",_.innerHTML=__RTE_TT(W(r.headerHtml,C,d)),a.appendChild(_)}if(r.footerHtml){var P=e.createElement("div");P.className="rte-page-hf rte-page-footer",P.style.top=q+Math.round(r.marginBottom/3)+"px",P.innerHTML=__RTE_TT(W(r.footerHtml,C,d)),a.appendChild(P)}}}function K(e){if(!(!e||e.getElementById("rte-pagination-styles"))){var t=".rte-page-view{box-shadow:0 1px 4px rgba(15,23,42,.16),0 8px 28px rgba(15,23,42,.10);}body.rte-page-desk{background:#f1f5f9;}.rte-page-overlay{position:absolute;pointer-events:none;}.rte-page-sep{position:absolute;left:-24px;right:-24px;height:0;border-top:1px dashed #94a3b8;}.rte-page-num{position:absolute;right:8px;font:600 10px/1.4 'Segoe UI',system-ui,sans-serif;letter-spacing:.04em;color:#94a3b8;text-transform:uppercase;}.rte-page-hf{position:absolute;left:0;right:0;font:400 11px/1.4 'Segoe UI',system-ui,sans-serif;color:#64748b;}.rte-page-header{text-align:left;}.rte-page-footer{text-align:center;}@media print{.rte-page-overlay{display:none !important;}.rte-page-view{box-shadow:none !important;margin:0 !important;width:auto !important;}}",r=e.createElement("style");r.id="rte-pagination-styles",r.appendChild(e.createTextNode(t)),(e.head||e.getElementsByTagName("head")[0]||e.documentElement).appendChild(r),o&&typeof o.ensureStyleSheetLive=="function"&&o.ensureStyleSheetLive(e,r,"rte-pagination-styles",r.textContent)}}function Q(){var e=b();if(!e)return function(){};for(var t=e.querySelectorAll?e.querySelectorAll("[data-rte-page-overlay]"):[],r=[],n=0;n<t.length;n++){var a=t[n];r.push({node:a,parent:a.parentNode,next:a.nextSibling}),a.parentNode&&a.parentNode.removeChild(a)}return function(){for(var i=0;i<r.length;i++){var g=r[i];g.parent&&g.parent.insertBefore(g.node,g.next||null)}}}function X(){if(!F){for(var e=["getHTMLCode","getJSON","getHTMLContent","getText"],t=!1,r=0;r<e.length;r++)(function(n){var a=o[n];if(!(typeof a!="function"||a.__rtePgWrapped)){var f=function(){var i=Q();try{return a.apply(o,arguments)}finally{i()}};f.__rtePgWrapped=!0,o[n]=f,t=!0}})(e[r]);t&&(F=!0)}}}
|