(function(){function ak(){return"ckeditor";}function d(ao){return ao.elementMode==3;}function ai(ao){return ao.name.replace(/\[/,"_").replace(/\]/,"_");}function am(ao){return ao.container.$;}function e(ao){return ao.document.$;}function ad(ao){return ao.getSnapshot();}function y(ap,ao){ap.loadSnapshot(ao);}function v(ap){if(ap.getSelection()==null){return null;}var ao=ap.getSelection().getStartElement();if(ao&&ao.$){return ao.$;}return null;}function q(){return CKEDITOR.basePath;}function Y(){return a("jsplus_bootstrap_badge");}function a(ao){return CKEDITOR.plugins.getPath(ao);}function H(){return CKEDITOR.version.charAt(0)=="3"?3:4;}function X(aq,ap){if(H()==3){var ao=(ap.indexOf("jsplus_bootstrap_badge_")==-1)?("jsplus_bootstrap_badge_"+ap):ap;if(typeof(aq.lang[ao])!=="undefined"){return aq.lang[ao];}else{console.log("(v3) editor.lang['jsplus_bootstrap_badge'] not defined");}}else{if(typeof(aq.lang["jsplus_bootstrap_badge"])!=="undefined"){if(typeof(aq.lang["jsplus_bootstrap_badge"][ap])!=="undefined"){return aq.lang["jsplus_bootstrap_badge"][ap];}else{console.log("editor.lang['jsplus_bootstrap_badge']['"+ap+"'] not defined");}}else{console.log("editor.lang['jsplus_bootstrap_badge'] not defined");}}return"";}function w(ap,ao){return J(ap,"jsplus_bootstrap_badge_"+ao);}function J(ap,ao){var aq=ap.config[ao];return aq;}function ae(ao,ap){al("jsplus_bootstrap_badge_"+ao,ap);}function al(ao,ap){CKEDITOR.config[ao]=ap;}function C(aq,ap){var ao=CKEDITOR.dom.element.createFromHtml(ap);aq.insertElement(ao);}function N(){return"";}var O=0;var g=1;var aa=2;function m(ao,ar,ap){var aq=null;if(ap==O){aq=CKEDITOR.TRISTATE_DISABLED;}else{if(ap==g){aq=CKEDITOR.TRISTATE_OFF;}else{if(ap==aa){aq=CKEDITOR.TRISTATE_ON;}}}if(aq!=null&&ao.ui&&ao.ui.get(ar)){ao.ui.get(ar).setState(aq);}}function L(ao,ap){ao.on("selectionChange",function(aq){ap(aq.editor);});}function ab(ap,ao,aq){if(ao=="beforeGetOutputHTML"){ap.on("toDataFormat",function(ar){return aq(ap,ar.data.dataValue);},null,null,4);return;}ap.on(ao,(function(){var ar=ap;return function(){aq(ar);};})());}function T(aq,ao,au,ar,at,ap){aq.addCommand(ao,{exec:at});aq.ui.addButton(ao,{title:X(aq,ar.replace(/^jsplus_/,"")),label:X(aq,ar.replace(/^jsplus_/,"")),icon:Y()+"icons/"+au+".png",command:au});}function I(ao){return ao.mode=="wysiwyg";}function V(ap,ao,aq){CKEDITOR.plugins.add(ap,{icons:ap,lang:ao,init:function(ar){aq(ar);}});}function S(){JSDialog.Config.skin=null;JSDialog.Config.templateDialog='
";JSDialog.Config.templateButton='';JSDialog.Config.templateBg='';JSDialog.Config.classButton="cke_dialog_ui_button";JSDialog.Config.classButtonOk="cke_dialog_ui_button_ok";JSDialog.Config.contentBorders=[3,1,15,1,65];CKEDITOR.skin.loadPart("dialog");s(document,".jsdialog_plugin_jsplus_bootstrap_badge.jsdialog_bg { background-color: white; opacity: 0.5; position: fixed; left: 0; top: 0; width: 100%; height: 3000px; z-index: 11111; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_badge.jsdialog_dlg { font-family: Arial; padding: 0; position: fixed; z-index: 11112; background-color: white; border-radius: 5px; overflow:hidden; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_badge.jsdialog_show { display: block; }"+".jsdialog_plugin_jsplus_bootstrap_badge .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }"+".jsdialog_plugin_jsplus_bootstrap_badge .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }"+".jsdialog_plugin_jsplus_bootstrap_badge .jsdialog_message_icon { padding-left: 100px; min-height: 64px; background-position: 10px 10px; background-repeat: no-repeat; box-sizing: content-box; }"+".jsdialog_plugin_jsplus_bootstrap_badge .jsdialog_message_icon_info { background-image: url(img/info.png); }"+".jsdialog_plugin_jsplus_bootstrap_badge .jsdialog_message_icon_warning { background-image: url(img/warning.png); }"+".jsdialog_plugin_jsplus_bootstrap_badge .jsdialog_message_icon_error { background-image: url(img/error.png); }"+".jsdialog_plugin_jsplus_bootstrap_badge .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }"+".jsdialog_plugin_jsplus_bootstrap_badge .cke_dialog_contents { margin-top: 0; border-top: none; }"+".jsdialog_plugin_jsplus_bootstrap_badge .cke_dialog_footer div { outline: none; }"+".jsdialog_plugin_jsplus_bootstrap_badge .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }"+".jsdialog_plugin_jsplus_bootstrap_badge .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }"+".jsdialog_plugin_jsplus_bootstrap_badge .cke_dialog_title { cursor: default; }"+".jsdialog_plugin_jsplus_bootstrap_badge .cke_dialog_contents { padding: 0; }");
}var F=1;ae("default_title",42);var t=[];function n(ap,ao){if(ao){style=' style="font-size:12px"';}return'"+E(ap)+"";}function c(ao){return document.getElementById("jsplus_bootstrap_badge_title_"+ai(ao)).value;}function o(ap,ao){return n(c(ap),ao);}function aj(aq){var ao=o(aq,true);var ap=document.getElementById("jsplus_bootstrap_badge_preview_"+ai(aq));ap.innerHTML=ao;}function B(ap,aq){var ao=document.getElementById("jsplus_bootstrap_badge_title_"+ai(ap));ao.value=aq;}function R(ao){B(ao,w(ao,"default_title"));}function A(ao){var ap=document.getElementById("jsplus_bootstrap_badge_title_"+ai(ao));ap.onkeydown=(function(){var aq=ao;return function(){aj(aq);};})();ap.onkeyup=(function(){var aq=ao;return function(){aj(aq);};})();}function D(ap){var ao=''+'
'+'
'+X(ap,"option_title")+":"+"
"+'
'+''+"
"+"
"+'
'+X(ap,"preview")+":"+"
"+'
'+"
"+"
";return ao;}function k(ao){R(ao);if(t.indexOf(ai(ao))==-1){t.push(ai(ao));A(ao);}aj(ao);}function P(ap){var ao=o(ap);C(ap,ao);}function W(ao,at,aq){if(typeof at=="undefined"){at=true;}if(typeof aq=="undefined"){aq=" ";}if(typeof(ao)=="undefined"){return"";}var au=1000;if(ao=au);return ao.toFixed(1)+aq+ap[ar]+(at?"b":"");}function E(ao){return ao.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}function h(ao){return ao.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");}function ag(ao){var ap=document.createElement("div");ap.innerHTML=ao;return ap.childNodes;}function b(ao){return ao.getElementsByTagName("head")[0];}function j(ao){return ao.getElementsByTagName("body")[0];}function f(aq,at){var ao=aq.getElementsByTagName("link");var ar=false;for(var ap=ao.length-1;ap>=0;ap--){if(ao[ap].href==at){ao[ap].parentNode.removeChild(ao[ap]);}}}function l(ar,au){if(!ar){return;}var ao=ar.getElementsByTagName("link");var at=false;for(var ap=0;ap-1){ap.splice(ap.indexOf(ao),1);}var ar=ap.join(" ").trim();if(ar.length>0){aq.className=ar;}else{if(aq.hasAttribute("class")){aq.removeAttribute("class");}}}function G(ao){if(typeof(ao.className)==="undefined"||ao.className==null){return[];}return ao.className.split(/\s+/);}function U(ar,ao){var aq=G(ar);for(var ap=0;ap-1){at[au.substr(0,ao).trim()]=au.substr(ao+1);}else{at[au]="";}}return at;}function Q(aq,ap){var ar=i(aq);for(var ao in ar){var at=ar[ao];if(ao==ap){return at;}}return null;}function u(ar,aq,ao){var at=i(ar);for(var ap in at){var au=at[ap];if(ap==aq&&au==ao){return true;}}return false;}function M(aq,ap,ao){var ar=i(aq);ar[ap]=ao;p(aq,ar);}function Z(ap,ao){var aq=i(ap);delete aq[ao];p(ap,aq);}function p(ap,ar){var aq=[];for(var ao in ar){aq.push(ao+":"+ar[ao]);}if(aq.length>0){ap.setAttribute("style",aq.join(";"));}else{if(ap.hasAttribute("style")){ap.removeAttribute("style");}}}function x(at,ap){var aq;if(Object.prototype.toString.call(ap)==="[object Array]"){aq=ap;
}else{aq=[ap];}for(var ar=0;ar-1){ao.push(at.childNodes[ar]);}}return ao;}CKEDITOR.plugins.add("jsplus_bootstrap_badge",{lang:"en",icons:"jsplus_bootstrap_badge",init:function(ao){CKEDITOR.dialog.add("jsplus_bootstrap_badge"+ai(ao),function(ap){return{title:X(ap,"title"),minWidth:200,minHeight:165,resizable:false,contents:[{id:"tab1_jsplus_bootstrap_badge_"+ai(ap),label:"",title:"",expand:true,padding:0,elements:[{id:"elementId"+ai(ap),type:"html",html:D(ap)}]}],onShow:function(){k(ap);},onOk:function(){P(ap);}};});ao.addCommand("jsplus_bootstrap_badge",new CKEDITOR.dialogCommand("jsplus_bootstrap_badge"+ai(ao)));ao.ui.addButton("jsplus_bootstrap_badge",{title:X(ao,"title"),icon:this.path+"icons/jsplus_bootstrap_badge_4.png",command:"jsplus_bootstrap_badge"});}});})();