2 lines
11 KiB
JavaScript
2 lines
11 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})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.PluginManager")}),g("7",["6"],function(a){return a("tinymce.util.VK")}),g("8",[],function(){var a=function(a){return"boolean"==typeof a.link_assume_external_targets&&a.link_assume_external_targets},b=function(a){return"boolean"==typeof a.link_context_toolbar&&a.link_context_toolbar},c=function(a){return a.link_list},d=function(a){return"string"==typeof a.default_link_target},e=function(a){return a.default_link_target},f=function(a){return a.target_list},g=function(a,b){a.settings.target_list=b},h=function(a){return f(a)!==!1},i=function(a){return a.rel_list},j=function(a){return void 0!==i(a)},k=function(a){return a.link_class_list},l=function(a){return void 0!==k(a)},m=function(a){return a.link_title!==!1},n=function(a){return"boolean"==typeof a.allow_unsafe_link_target&&a.allow_unsafe_link_target};return{assumeExternalTargets:a,hasContextToolbar:b,getLinkList:c,hasDefaultLinkTarget:d,getDefaultLinkTarget:e,getTargetList:f,setTargetList:g,shouldShowTargetList:h,getRelList:i,hasRelList:j,getLinkClassList:k,hasLinkClassList:l,shouldShowLinkTitle:m,allowUnsafeLinkTarget:n}}),h("c",document),h("d",window),g("e",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("f",["6"],function(a){return a("tinymce.Env")}),g("9",["c","d","e","f"],function(a,b,c,d){var e=function(b,c){a.body.appendChild(b),b.dispatchEvent(c),a.body.removeChild(b)},f=function(f){if(!d.ie||d.ie>10){var g=a.createElement("a");g.target="_blank",g.href=f,g.rel="noreferrer noopener";var h=a.createEvent("MouseEvents");h.initMouseEvent("click",!0,!0,b,0,0,0,0,0,!1,!1,!1,!1,0,null),e(g,h)}else{var i=b.open("","_blank");if(i){i.opener=null;var j=i.document;j.open(),j.write('<meta http-equiv="refresh" content="0; url='+c.DOM.encode(f)+'">'),j.close()}}};return{open:f}}),h("g",RegExp),g("h",["6"],function(a){return a("tinymce.util.Tools")}),g("a",["g","h","8"],function(a,b,c){var d=function(a,c){var d=["noopener"],e=a?a.split(/\s+/):[],f=function(a){return b.trim(a.sort().join(" "))},g=function(a){return a=h(a),a.length?a.concat(d):d},h=function(a){return a.filter(function(a){return b.inArray(d,a)===-1})};return e=c?g(e):h(e),e.length?f(e):null},e=function(a){return a.replace(/\uFEFF/g,"")},f=function(a,b){return b=b||a.selection.getNode(),k(b)?a.dom.select("a[href]",b)[0]:a.dom.getParent(b,"a[href]")},g=function(a,b){var c=b?b.innerText||b.textContent:a.getContent({format:"text"});return e(c)},h=function(a){return a&&"A"===a.nodeName&&a.href},i=function(a){return b.grep(a,h).length>0},j=function(a){return!(/</.test(a)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(a)||a.indexOf("href=")===-1))},k=function(a){return a&&"FIGURE"===a.nodeName&&/\bimage\b/i.test(a.className)},l=function(a,b){return function(e){a.undoManager.transact(function(){var g=a.selection.getNode(),h=f(a,g),i={href:e.href,target:e.target?e.target:null,rel:e.rel?e.rel:null,"class":e["class"]?e["class"]:null,title:e.title?e.title:null};c.hasRelList(a.settings)||c.allowUnsafeLinkTarget(a.settings)!==!1||(i.rel=d(i.rel,"_blank"===i.target)),e.href===b.href&&(b.attach(),b={}),h?(a.focus(),e.hasOwnProperty("text")&&("innerText"in h?h.innerText=e.text:h.textContent=e.text),a.dom.setAttribs(h,i),a.selection.select(h),a.undoManager.add()):k(g)?o(a,g,i):e.hasOwnProperty("text")?a.insertContent(a.dom.createHTML("a",i,a
|