2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};g("1",[],function(){var a=function(b){var c=b,d=function(){return c},e=function(a){c=a},f=function(){return a(d())};return{get:d,set:e,clone:f}};return a}),h("9",tinymce.util.Tools.resolve),g("2",["9"],function(a){return a("tinymce.PluginManager")}),h("a",window),g("3",["a","2"],function(a,b){var c=function(c){return!(!/(^|[ ,])tinymcespellchecker([, ]|$)/.test(c.settings.plugins)||!b.get("tinymcespellchecker"))&&("undefined"!=typeof a.console&&a.console.log&&a.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),!0)};return{hasProPlugin:c}}),g("6",[],function(){var a=function(a){var b="English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv";return a.getParam("spellchecker_languages",b)},b=function(a){var b=a.getParam("language","en");return a.getParam("spellchecker_language",b)},c=function(a){return a.getParam("spellchecker_rpc_url")},d=function(a){return a.getParam("spellchecker_callback")},e=function(a){var b=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return a.getParam("spellchecker_wordchar_pattern",b)};return{getLanguages:a,getLanguage:b,getRpcUrl:c,getSpellcheckerCallback:d,getSpellcheckerWordcharPattern:e}}),g("c",["9"],function(a){return a("tinymce.util.Tools")}),g("g",["9"],function(a){return a("tinymce.util.URI")}),g("h",["9"],function(a){return a("tinymce.util.XHR")}),g("i",[],function(){var a=function(a){return a.fire("SpellcheckStart")},b=function(a){return a.fire("SpellcheckEnd")};return{fireSpellcheckStart:a,fireSpellcheckEnd:b}}),g("j",[],function(){function a(a){return a&&1===a.nodeType&&"false"===a.contentEditable}return function(b,c){function d(a,b){if(!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";return{start:a.index,end:a.index+a[0].length,text:a[0],data:b}}function e(b){var c;if(3===b.nodeType)return b.data;if(z[b.nodeName]&&!y[b.nodeName])return"";if(a(b))return"\n";if(c="",(y[b.nodeName]||A[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=e(b);while(b=b.nextSibling);return c}function f(b,c,d){var e,f,g,h,i,j=[],k=0,l=b,m=0;c=c.slice(0),c.sort(function(a,b){return a.start-b.start}),i=c.shift();a:for(;;){if((y[l.nodeName]||A[l.nodeName]||a(l))&&k++,3===l.nodeType&&(!f&&l.length+k>=i.end?(f=l,h=i.end-k):e&&j.push(l),!e&&l.length+k>i.start&&(e=l,g=i.start-k),k+=l.length),e&&f){if(l=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:j,match:i.text,matchIndex:m}),k-=f.length-h,e=null,f=null,j=[],i=c.shift(),m++,!i)break}else if(z[l.nodeName]&&!y[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!a(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===b)break a;l=l.parentNode}}}function g(a){function b(b,c){var d=B[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(C.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=C.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNode
|