/* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model. */ (function(){function F(d){return d.type==CKEDITOR.NODE_TEXT&&0=b||8192<=b&&8202>=b||H.test(a)}function r(a){var b=d.getSelection().getRanges()[0],c=d.editable();b&&!a?(a=b.clone(),a.collapse(!0)):(a=d.createRange(),a.setStartAt(c,CKEDITOR.POSITION_AFTER_START));a.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);return a}function A(a){f.find(a.getValueOf("find","txtFindFind"),a.getValueOf("find","txtFindCaseChk"),a.getValueOf("find", "txtFindWordChk"),a.getValueOf("find","txtFindCyclic"))||alert(e.notFoundMsg)}function B(a){f.replace(a,a.getValueOf("replace","txtFindReplace"),a.getValueOf("replace","txtReplace"),a.getValueOf("replace","txtReplaceCaseChk"),a.getValueOf("replace","txtReplaceWordChk"),a.getValueOf("replace","txtReplaceCyclic"))||alert(e.notFoundMsg)}function I(a,b){var c=b.replace(J,function(a){a=a.split("");return CKEDITOR.tools.array.map(a,function(a,b){return 0===b%2?" ":a}).join("")});return a.document.createText(c)} var C=new CKEDITOR.style(CKEDITOR.tools.extend({attributes:{"data-cke-highlight":1},fullMatch:1,ignoreReadonly:1,childRule:function(){return 0}},d.config.find_highlight,!0));n.prototype={next:function(){return this.move()},back:function(){return this.move(!0)},move:function(a){var b=this.textNode;if(null===b)return w.call(this);this._.matchBoundary=!1;if(b&&a&&0b.length){var c=this._.walker.textNode;if(c)a.setStartAfter(c);else return null}else c=b[0],b=b[b.length-1],a.setStart(c.textNode,c.offset),a.setEnd(b.textNode,b.offset+1);return a},updateFromDomRange:function(a){var b= new n(a);this._.cursors=[];do a=b.next(),a.character&&this._.cursors.push(a);while(a.character);this._.rangeLength=this._.cursors.length},setMatched:function(){this._.isMatched=!0},clearMatched:function(){this._.isMatched=!1},isMatched:function(){return this._.isMatched},highlight:function(){if(!(1>this._.cursors.length)){this._.highlightRange&&this.removeHighlight();var a=this.toDomRange(),b=a.createBookmark();C.applyToRange(a,d);a.moveToBookmark(b);this._.highlightRange=a;b=a.startContainer;b.type!= CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b.scrollIntoView();this.updateFromDomRange(a)}},removeHighlight:function(){if(this._.highlightRange){var a=this._.highlightRange.createBookmark();C.removeFromRange(this._.highlightRange,d);this._.highlightRange.moveToBookmark(a);this.updateFromDomRange(this._.highlightRange);this._.highlightRange=null}},isReadOnly:function(){return this._.highlightRange?this._.highlightRange.startContainer.isReadOnly():0},moveBack:function(){var a=this._.walker.back(),b=this._.cursors; a.hitMatchBoundary&&(this._.cursors=b=[]);b.unshift(a);b.length>this._.rangeLength&&b.pop();return a},moveNext:function(){var a=this._.walker.next(),b=this._.cursors;a.hitMatchBoundary&&(this._.cursors=b=[]);b.push(a);b.length>this._.rangeLength&&b.shift();return a},getEndCharacter:function(){var a=this._.cursors;return 1>a.length?null:a[a.length-1].character},getNextCharacterRange:function(a){var b,c;c=this._.cursors;c=(b=c[c.length-1])&&b.textNode?new n(y(b)):this._.walker;return new u(c,a)},getCursors:function(){return this._.cursors}}; var D=function(a,b){var c=[-1];b&&(a=a.toLowerCase());for(var d=0;d