var app=function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";window.$=window.jQuery=n(1),window.Vue=n(2),n(4),$.ajaxSetup({headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")}}),Vue.config.devtools=!1,Vue.config.silent=!0,n(5),n(6),n(7),n(16);var i=(n(17),function(){return{RE:{email:/^.+@.+\..+$/},textToSpinner:function(e){var t='';e.css("width",e.outerWidth()).html(t).attr("disabled",!0)},spinnerToText:function(e,t){e.css("width","auto").html(t).attr("disabled",!1)},ConstructForm:function(e,t,n,i){"undefined"==typeof n&&(n={});var o=this,r=$(e).find('[type="submit"]'),a=r.text();return new Promise(function(s,l){return $(e).ajaxForm({beforeSerialize:function(e){o.hasErrors()||(app.textToSpinner(r),"undefined"!=typeof i&&i())},data:n,success:function(e){app.spinnerToText(r,a),"error"==e.status?swal({html:!0,title:"",text:e.result,type:e.status}):"success"==e.status&&s(e)},error:function(e){console.error(e)}}),$(e).on("focus",":input",function(){o.hideError(this)}),o.hasErrors=function(){var n=!1;return t&&t.length&&t.rules?($(e).find(":input").each(function(){if("undefined"!=typeof t.rules[this.name]&&"required"==t.rules[this.name]&&!$(this).val().length){n=!0;var e=t.messages[this.name]?t.messages[this.name].required:"Заполните это поле";return void o.printError(this,e)}}),n):n},o.printError=function(e,t){var n='
'+t+"
";$(e).closest(".has-feedback").append(n)},o.hideError=function(e){$(e).closest(".has-feedback").find(".form-error").remove()},o.hideErrors=function(){input.each(function(){o.hideError(this)})},o})},setEditor:function(e){window.CKEDITOR_BASEPATH="/js/ckeditor/",n(26),CKEDITOR.plugins.addExternal("justify","/js/ckeditor/plugins/justify/","plugin.js"),CKEDITOR.replace(e,{height:"200px",extraPlugins:"justify",allowedContent:!0,toolbar:[{name:"my",items:["Source","Bold","Italic","-","Copy","Paste","PasteText","-","Link","Unlink","-","Table","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","NumberedList","BulletedList","Format"]}]})},getUserType:function(){return $.ajax({type:"GET",url:window.location.origin+"/cabinet/get_user_type"}).done(function(e){return e}).fail(function(e){console.error(e)})}}}());e.exports=i},function(e,t,n){var i,o;/*! * jQuery JavaScript Library v2.2.2 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-03-17T17:51Z */ !function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,r){function a(e){var t=!!e&&"length"in e&&e.length,n=ce.type(e);return"function"!==n&&!ce.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function s(e,t,n){if(ce.isFunction(t))return ce.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return ce.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Te.test(t))return ce.filter(t,e,n);t=ce.filter(t,e)}return ce.grep(e,function(e){return ie.call(t,e)>-1!==n})}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function c(e){var t={};return ce.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function u(){J.removeEventListener("DOMContentLoaded",u),n.removeEventListener("load",u),ce.ready()}function d(){this.expando=ce.expando+d.uid++}function f(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Se,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:we.test(n)?ce.parseJSON(n):n)}catch(o){}xe.set(e,t,n)}else n=void 0;return n}function h(e,t,n,i){var o,r=1,a=20,s=i?function(){return i.cur()}:function(){return ce.css(e,t,"")},l=s(),c=n&&n[3]||(ce.cssNumber[t]?"":"px"),u=(ce.cssNumber[t]||"px"!==c&&+l)&&Ae.exec(ce.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do r=r||".5",u/=r,ce.style(e,t,u+c);while(r!==(r=s()/l)&&1!==r&&--a)}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}function p(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ce.nodeName(e,t)?ce.merge([e],n):n}function m(e,t){for(var n=0,i=e.length;n-1)o&&o.push(r);else if(c=ce.contains(r.ownerDocument,r),a=p(d.appendChild(r),"script"),c&&m(a),n)for(u=0;r=a[u++];)Me.test(r.type||"")&&n.push(r);return d}function v(){return!0}function E(){return!1}function T(){try{return J.activeElement}catch(e){}}function C(e,t,n,i,o,r){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)C(e,s,n,i,t[s],r);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),o===!1)o=E;else if(!o)return e;return 1===r&&(a=o,o=function(e){return ce().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,o,i,n)})}function y(e,t){return ce.nodeName(e,"table")&&ce.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function O(e){var t=Ge.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function I(e,t){var n,i,o,r,a,s,l,c;if(1===t.nodeType){if(Ke.hasData(e)&&(r=Ke.access(e),a=Ke.set(t,r),c=r.events)){delete a.handle,a.events={};for(o in c)for(n=0,i=c[o].length;n1&&"string"==typeof h&&!se.checkClone&&We.test(h))return e.each(function(o){var r=e.eq(o);m&&(t[0]=h.call(this,o,r.html())),R(r,t,n,i)});if(d&&(o=g(t,e[0].ownerDocument,!1,e,i),r=o.firstChild,1===o.childNodes.length&&(o=r),r||i)){for(a=ce.map(p(o,"script"),b),s=a.length;u")).appendTo(t.documentElement),t=Ye[0].contentDocument,t.write(),t.close(),n=_(e,t),Ye.detach()),Ze[e]=n),n}function x(e,t,n){var i,o,r,a,s=e.style;return n=n||et(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||ce.contains(e.ownerDocument,e)||(a=ce.style(e,t)),n&&!se.pixelMarginRight()&&Je.test(a)&&Qe.test(t)&&(i=s.width,o=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=o,s.maxWidth=r),void 0!==a?a+"":a}function w(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function S(e){if(e in st)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=at.length;n--;)if(e=at[n]+t,e in st)return e}function N(e,t,n){var i=Ae.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function A(e,t,n,i,o){for(var r=n===(i?"border":"content")?4:"width"===t?1:0,a=0;r<4;r+=2)"margin"===n&&(a+=ce.css(e,n+Pe[r],!0,o)),i?("content"===n&&(a-=ce.css(e,"padding"+Pe[r],!0,o)),"margin"!==n&&(a-=ce.css(e,"border"+Pe[r]+"Width",!0,o))):(a+=ce.css(e,"padding"+Pe[r],!0,o),"padding"!==n&&(a+=ce.css(e,"border"+Pe[r]+"Width",!0,o)));return a}function P(e,t,i){var o=!0,r="width"===t?e.offsetWidth:e.offsetHeight,a=et(e),s="border-box"===ce.css(e,"boxSizing",!1,a);if(J.msFullscreenElement&&n.top!==n&&e.getClientRects().length&&(r=Math.round(100*e.getBoundingClientRect()[t])),r<=0||null==r){if(r=x(e,t,a),(r<0||null==r)&&(r=e.style[t]),Je.test(r))return r;o=s&&(se.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+A(e,t,i||(s?"border":"content"),o,a)+"px"}function L(e,t){for(var n,i,o,r=[],a=0,s=e.length;a=0&&n=0},isPlainObject:function(e){var t;if("object"!==ce.type(e)||e.nodeType||ce.isWindow(e))return!1;if(e.constructor&&!ae.call(e,"constructor")&&!ae.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||ae.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?oe[re.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=ce.trim(e),e&&(1===e.indexOf("use strict")?(t=J.createElement("script"),t.text=e,J.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(de,"ms-").replace(fe,he)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,i=0;if(a(e))for(n=e.length;ib.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[M]=!0,e}function o(e){var t=S.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var n=e.split("|"),i=n.length;i--;)b.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||W)-(~e.sourceIndex||W);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,i){for(var o,r=e([],n.length,t),a=r.length;a--;)n[o=r[a]]&&(n[o]=!(i[o]=n[o]))})})}function u(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function f(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function m(e,n,i){for(var o=0,r=n.length;o-1&&(i[c]=!(a[c]=d))}}else T=g(T===a?T.splice(p,T.length):T),r?r(null,a,T,l):Q.apply(a,T)})}function E(e){for(var t,n,i,o=e.length,r=b.relative[e[0].type],a=r||b.relative[" "],s=r?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return ee(t,e)>-1},a,!0),u=[function(e,n,i){var o=!r&&(i||n!==_)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,o}];s1&&p(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,r=e.length>0,a=function(i,a,s,l,c){var u,d,f,h=0,p="0",m=i&&[],v=[],E=_,T=i||r&&b.find.TAG("*",c),C=j+=null==E?1:Math.random()||.1,y=T.length;for(c&&(_=a===S||a||c);p!==y&&null!=(u=T[p]);p++){if(r&&u){for(d=0,a||u.ownerDocument===S||(w(u),s=!A);f=e[d++];)if(f(u,a||S,s)){l.push(u);break}c&&(j=C)}o&&((u=!f&&u)&&h--,i&&m.push(u))}if(h+=p,o&&p!==h){for(d=0;f=n[d++];)f(m,v,a,s);if(i){if(h>0)for(;p--;)m[p]||v[p]||(v[p]=Y.call(l));v=g(v)}Q.apply(l,v),c&&!i&&v.length>0&&h+n.length>1&&t.uniqueSort(l)}return c&&(j=C,_=E),m};return o?i(a):a}var C,y,b,O,I,D,R,k,_,K,x,w,S,N,A,P,L,F,B,M="sizzle"+1*new Date,$=e.document,j=0,H=0,q=n(),V=n(),z=n(),U=function(e,t){return e===t&&(x=!0),0},W=1<<31,G={}.hasOwnProperty,X=[],Y=X.pop,Z=X.push,Q=X.push,J=X.slice,ee=function(e,t){for(var n=0,i=e.length;n+~]|"+ne+")"+ne+"*"),ue=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(re),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Ee=/[+~]/,Te=/'|\\/g,Ce=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),ye=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},be=function(){w()};try{Q.apply(X=J.call($.childNodes),$.childNodes),X[$.childNodes.length].nodeType}catch(Oe){Q={apply:X.length?function(e,t){Z.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}y=t.support={},I=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},w=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:$;return i!==S&&9===i.nodeType&&i.documentElement?(S=i,N=S.documentElement,A=!I(S),(n=S.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",be,!1):n.attachEvent&&n.attachEvent("onunload",be)),y.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),y.getElementsByTagName=o(function(e){return e.appendChild(S.createComment("")),!e.getElementsByTagName("*").length}),y.getElementsByClassName=ge.test(S.getElementsByClassName),y.getById=o(function(e){return N.appendChild(e).id=M,!S.getElementsByName||!S.getElementsByName(M).length}),y.getById?(b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&A){var n=t.getElementById(e);return n?[n]:[]}},b.filter.ID=function(e){var t=e.replace(Ce,ye);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(Ce,ye);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),b.find.TAG=y.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):y.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},b.find.CLASS=y.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&A)return t.getElementsByClassName(e)},L=[],P=[],(y.qsa=ge.test(S.querySelectorAll))&&(o(function(e){N.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+M+"-]").length||P.push("~="),e.querySelectorAll(":checked").length||P.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||P.push(".#.+[+~]")}),o(function(e){var t=S.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(y.matchesSelector=ge.test(F=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&o(function(e){y.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),L.push("!=",re)}),P=P.length&&new RegExp(P.join("|")),L=L.length&&new RegExp(L.join("|")),t=ge.test(N.compareDocumentPosition),B=t||ge.test(N.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return x=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!y.sortDetached&&t.compareDocumentPosition(e)===n?e===S||e.ownerDocument===$&&B($,e)?-1:t===S||t.ownerDocument===$&&B($,t)?1:K?ee(K,e)-ee(K,t):0:4&n?-1:1)}:function(e,t){if(e===t)return x=!0,0;var n,i=0,o=e.parentNode,r=t.parentNode,s=[e],l=[t];if(!o||!r)return e===S?-1:t===S?1:o?-1:r?1:K?ee(K,e)-ee(K,t):0;if(o===r)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===$?-1:l[i]===$?1:0},S):S},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==S&&w(e),n=n.replace(ue,"='$1']"),y.matchesSelector&&A&&!z[n+" "]&&(!L||!L.test(n))&&(!P||!P.test(n)))try{var i=F.call(e,n);if(i||y.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(o){}return t(n,S,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==S&&w(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==S&&w(e);var n=b.attrHandle[t.toLowerCase()],i=n&&G.call(b.attrHandle,t.toLowerCase())?n(e,t,!A):void 0;return void 0!==i?i:y.attributes||!A?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,o=0;if(x=!y.detectDuplicates,K=!y.sortStable&&e.slice(0),e.sort(U),x){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return K=null,e},O=t.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=O(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=O(t);return n},b=t.selectors={cacheLength:50,createPseudo:i,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ce,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(Ce,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=D(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ce,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(o){var r=t.attr(o,e);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(ae," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,h,p,m=r!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),E=!l&&!s,T=!1;if(g){if(r){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&E){for(f=g,d=f[M]||(f[M]={}),u=d[f.uniqueID]||(d[f.uniqueID]={}),c=u[e]||[],h=c[0]===j&&c[1],T=h&&c[2],f=h&&g.childNodes[h];f=++h&&f&&f[m]||(T=h=0)||p.pop();)if(1===f.nodeType&&++T&&f===t){u[e]=[j,h,T];break}}else if(E&&(f=t,d=f[M]||(f[M]={}),u=d[f.uniqueID]||(d[f.uniqueID]={}),c=u[e]||[],h=c[0]===j&&c[1],T=h),T===!1)for(;(f=++h&&f&&f[m]||(T=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++T||(E&&(d=f[M]||(f[M]={}),u=d[f.uniqueID]||(d[f.uniqueID]={}),u[e]=[j,T]),f!==t)););return T-=o,T===i||T%i===0&&T/i>=0}}},PSEUDO:function(e,n){var o,r=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[M]?r(n):r.length>1?(o=[e,e,"",n],b.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,o=r(e,n),a=o.length;a--;)i=ee(e,o[a]),e[i]=!(t[i]=o[a])}):function(e){return r(e,0,o)}):r}},pseudos:{not:i(function(e){var t=[],n=[],o=R(e.replace(se,"$1"));return o[M]?i(function(e,t,n,i){for(var r,a=o(e,null,i,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))}):function(e,i,r){return t[0]=e,o(t,null,r,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(Ce,ye),function(t){return(t.textContent||t.innerText||O(t)).indexOf(e)>-1}}),lang:i(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(Ce,ye).toLowerCase(),function(t){var n;do if(n=A?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===N},focus:function(e){return e===S.activeElement&&(!S.hasFocus||S.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:c(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(a=r[0]).type&&y.getById&&9===t.nodeType&&A&&b.relative[r[1].type]){if(t=(b.find.ID(a.matches[0].replace(Ce,ye),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=he.needsContext.test(e)?0:r.length;o--&&(a=r[o],!b.relative[s=a.type]);)if((l=b.find[s])&&(i=l(a.matches[0].replace(Ce,ye),Ee.test(r[0].type)&&u(t.parentNode)||t))){if(r.splice(o,1),e=i.length&&f(r),!e)return Q.apply(n,i),n;break}}return(c||R(e,d))(i,t,!A,n,!t||Ee.test(e)&&u(t.parentNode)||t),n},y.sortStable=M.split("").sort(U).join("")===M,y.detectDuplicates=!!x,w(),y.sortDetached=o(function(e){return 1&e.compareDocumentPosition(S.createElement("div"))}),o(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),y.attributes&&o(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(te,function(e,t,n){var i;if(!n)return e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(n);ce.find=pe,ce.expr=pe.selectors,ce.expr[":"]=ce.expr.pseudos,ce.uniqueSort=ce.unique=pe.uniqueSort,ce.text=pe.getText,ce.isXMLDoc=pe.isXML,ce.contains=pe.contains;var me=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&ce(e).is(n))break;i.push(e)}return i},ge=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},ve=ce.expr.match.needsContext,Ee=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Te=/^.[^:#\[\.,]*$/;ce.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?ce.find.matchesSelector(i,e)?[i]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n=this.length,i=[],o=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t1?ce.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(s(this,e||[],!1))},not:function(e){return this.pushStack(s(this,e||[],!0))},is:function(e){return!!s(this,"string"==typeof e&&ve.test(e)?ce(e):e||[],!1).length}});var Ce,ye=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,be=ce.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||Ce,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ye.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:J,!0)),Ee.test(i[1])&&ce.isPlainObject(t))for(i in t)ce.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return o=J.getElementById(i[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=J,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ce.isFunction(e)?void 0!==n.ready?n.ready(e):e(ce):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ce.makeArray(e,this))};be.prototype=ce.fn,Ce=ce(J);var Oe=/^(?:parents|prev(?:Until|All))/,Ie={children:!0,contents:!0,next:!0,prev:!0};ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&ce.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?ce.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?ie.call(ce(e),this[0]):ie.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return me(e,"parentNode")},parentsUntil:function(e,t,n){return me(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return me(e,"nextSibling")},prevAll:function(e){return me(e,"previousSibling")},nextUntil:function(e,t,n){return me(e,"nextSibling",n)},prevUntil:function(e,t,n){return me(e,"previousSibling",n)},siblings:function(e){return ge((e.parentNode||{}).firstChild,e)},children:function(e){return ge(e.firstChild)},contents:function(e){return e.contentDocument||ce.merge([],e.childNodes)}},function(e,t){ce.fn[e]=function(n,i){var o=ce.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=ce.filter(i,o)),this.length>1&&(Ie[e]||ce.uniqueSort(o),Oe.test(e)&&o.reverse()),this.pushStack(o)}});var De=/\S+/g;ce.Callbacks=function(e){e="string"==typeof e?c(e):ce.extend({},e);var t,n,i,o,r=[],a=[],s=-1,l=function(){for(o=e.once,i=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)r.splice(n,1),n<=s&&s--}),this},has:function(e){return e?ce.inArray(e,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=a=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=a=[],n||(r=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},ce.extend({Deferred:function(e){var t=[["resolve","done",ce.Callbacks("once memory"),"resolved"],["reject","fail",ce.Callbacks("once memory"),"rejected"],["notify","progress",ce.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ce.Deferred(function(n){ce.each(t,function(t,r){var a=ce.isFunction(e[t])&&e[t];o[r[1]](function(){var e=a&&a.apply(this,arguments);e&&ce.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ce.extend(e,i):i}},o={};return i.pipe=i.then,ce.each(t,function(e,r){var a=r[2],s=r[3];i[r[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?i:this,arguments),this},o[r[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,i,o=0,r=ee.call(arguments),a=r.length,s=1!==a||e&&ce.isFunction(e.promise)?a:0,l=1===s?e:ce.Deferred(),c=function(e,n,i){return function(o){n[e]=this,i[e]=arguments.length>1?ee.call(arguments):o,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);o0||(Re.resolveWith(J,[ce]),ce.fn.triggerHandler&&(ce(J).triggerHandler("ready"),ce(J).off("ready"))))}}),ce.ready.promise=function(e){return Re||(Re=ce.Deferred(),"complete"===J.readyState||"loading"!==J.readyState&&!J.documentElement.doScroll?n.setTimeout(ce.ready):(J.addEventListener("DOMContentLoaded",u),n.addEventListener("load",u))),Re.promise(e)},ce.ready.promise();var ke=function(e,t,n,i,o,r,a){var s=0,l=e.length,c=null==n;if("object"===ce.type(n)){o=!0;for(s in n)ke(e,t,s,n[s],!0,r,a)}else if(void 0!==i&&(o=!0,ce.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(ce(e),n)})),t))for(;s-1&&void 0!==n&&xe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){xe.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=Ke.get(e,t),n&&(!i||ce.isArray(n)?i=Ke.access(e,t,ce.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),i=n.length,o=n.shift(),r=ce._queueHooks(e,t),a=function(){ce.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,a,r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ke.get(e,n)||Ke.access(e,n,{empty:ce.Callbacks("once memory").add(function(){Ke.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};$e.optgroup=$e.option,$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td;var je=/<|&#?\w+;/;!function(){var e=J.createDocumentFragment(),t=e.appendChild(J.createElement("div")),n=J.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),se.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",se.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var He=/^key/,qe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ve=/^([^.]*)(?:\.(.+)|)/;ce.event={global:{},add:function(e,t,n,i,o){var r,a,s,l,c,u,d,f,h,p,m,g=Ke.get(e);if(g)for(n.handler&&(r=n,n=r.handler,o=r.selector),n.guid||(n.guid=ce.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return"undefined"!=typeof ce&&ce.event.triggered!==t.type?ce.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(De)||[""],c=t.length;c--;)s=Ve.exec(t[c])||[],h=m=s[1],p=(s[2]||"").split(".").sort(),h&&(d=ce.event.special[h]||{},h=(o?d.delegateType:d.bindType)||h,d=ce.event.special[h]||{},u=ce.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&ce.expr.match.needsContext.test(o),namespace:p.join(".")},r),(f=l[h])||(f=l[h]=[],f.delegateCount=0,d.setup&&d.setup.call(e,i,p,a)!==!1||e.addEventListener&&e.addEventListener(h,a)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,u):f.push(u),ce.event.global[h]=!0)},remove:function(e,t,n,i,o){var r,a,s,l,c,u,d,f,h,p,m,g=Ke.hasData(e)&&Ke.get(e);if(g&&(l=g.events)){for(t=(t||"").match(De)||[""],c=t.length;c--;)if(s=Ve.exec(t[c])||[],h=m=s[1],p=(s[2]||"").split(".").sort(),h){for(d=ce.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,f=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=f.length;r--;)u=f[r],!o&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(f.splice(r,1), u.selector&&f.delegateCount--,d.remove&&d.remove.call(e,u));a&&!f.length&&(d.teardown&&d.teardown.call(e,p,g.handle)!==!1||ce.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)ce.event.remove(e,h+t[c],n,i,!0);ce.isEmptyObject(l)&&Ke.remove(e,"handle events")}},dispatch:function(e){e=ce.event.fix(e);var t,n,i,o,r,a=[],s=ee.call(arguments),l=(Ke.get(this,"events")||{})[e.type]||[],c=ce.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(a=ce.event.handlers.call(this,e,l),t=0;(o=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(r.namespace)||(e.handleObj=r,e.data=r.data,i=((ce.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,s),void 0!==i&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,o,r,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(i=[],n=0;n-1:ce.find(o,this,null,[l]).length),i[o]&&i.push(r);i.length&&a.push({elem:l,handlers:i})}return s]*)\/>/gi,Ue=/\s*$/g;ce.extend({htmlPrefilter:function(e){return e.replace(ze,"<$1>")},clone:function(e,t,n){var i,o,r,a,s=e.cloneNode(!0),l=ce.contains(e.ownerDocument,e);if(!(se.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=p(s),r=p(e),i=0,o=r.length;i0&&m(a,!l&&p(e,"script")),s},cleanData:function(e){for(var t,n,i,o=ce.event.special,r=0;void 0!==(n=e[r]);r++)if(_e(n)){if(t=n[Ke.expando]){if(t.events)for(i in t.events)o[i]?ce.event.remove(n,i):ce.removeEvent(n,i,t.handle);n[Ke.expando]=void 0}n[xe.expando]&&(n[xe.expando]=void 0)}}}),ce.fn.extend({domManip:R,detach:function(e){return k(this,e,!0)},remove:function(e){return k(this,e)},text:function(e){return ke(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return R(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return R(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return R(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return R(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(p(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return ke(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ue.test(e)&&!$e[(Be.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n1)},show:function(){return L(this,!0)},hide:function(){return L(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Le(this)?ce(this).show():ce(this).hide()})}}),ce.Tween=F,F.prototype={constructor:F,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(ce.cssNumber[n]?"":"px")},cur:function(){var e=F.propHooks[this.prop];return e&&e.get?e.get(this):F.propHooks._default.get(this)},run:function(e){var t,n=F.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ce.cssProps[e.prop]]&&!ce.cssHooks[e.prop]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=F.prototype.init,ce.fx.step={};var lt,ct,ut=/^(?:toggle|show|hide)$/,dt=/queueHooks$/;ce.Animation=ce.extend(q,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return h(n.elem,e,Ae.exec(t),n),n}]},tweener:function(e,t){ce.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,i=0,o=e.length;i1)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===r&&ce.isXMLDoc(e)||(t=t.toLowerCase(),o=ce.attrHooks[t]||(ce.expr.match.bool.test(t)?ft:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:(i=ce.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!se.radioValue&&"radio"===t&&ce.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i,o=0,r=t&&t.match(De);if(r&&1===e.nodeType)for(;n=r[o++];)i=ce.propFix[n]||n,ce.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)}}),ft={set:function(e,t,n){return t===!1?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||ce.find.attr;ht[t]=function(e,t,i){var o,r;return i||(r=ht[t],ht[t]=o,o=null!=n(e,t,i)?t.toLowerCase():null,ht[t]=r),o}});var pt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;ce.fn.extend({prop:function(e,t){return ke(this,ce.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,o=ce.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),se.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this});var gt=/[\t\r\n\f]/g;ce.fn.extend({addClass:function(e){var t,n,i,o,r,a,s,l=0;if(ce.isFunction(e))return this.each(function(t){ce(this).addClass(e.call(this,t,V(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[l++];)if(o=V(n),i=1===n.nodeType&&(" "+o+" ").replace(gt," ")){for(a=0;r=t[a++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");s=ce.trim(i),o!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,o,r,a,s,l=0;if(ce.isFunction(e))return this.each(function(t){ce(this).removeClass(e.call(this,t,V(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[l++];)if(o=V(n),i=1===n.nodeType&&(" "+o+" ").replace(gt," ")){for(a=0;r=t[a++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");s=ce.trim(i),o!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ce.isFunction(e)?this.each(function(n){ce(this).toggleClass(e.call(this,n,V(this),t),t)}):this.each(function(){var t,i,o,r;if("string"===n)for(i=0,o=ce(this),r=e.match(De)||[];t=r[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||(t=V(this),t&&Ke.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Ke.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+V(n)+" ").replace(gt," ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g,Et=/[\x20\t\r\n\f]+/g;ce.fn.extend({val:function(e){var t,n,i,o=this[0];{if(arguments.length)return i=ce.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,ce(this).val()):e,null==o?o="":"number"==typeof o?o+="":ce.isArray(o)&&(o=ce.map(o,function(e){return null==e?"":e+""})),t=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=ce.valHooks[o.type]||ce.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(vt,""):null==n?"":n)}}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:ce.trim(ce.text(e)).replace(Et," ")}},select:{get:function(e){for(var t,n,i=e.options,o=e.selectedIndex,r="select-one"===e.type||o<0,a=r?null:[],s=r?o+1:i.length,l=o<0?s:r?o:0;l-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(ce.isArray(t))return e.checked=ce.inArray(ce(e).val(),t)>-1}},se.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Tt=/^(?:focusinfocus|focusoutblur)$/;ce.extend(ce.event,{trigger:function(e,t,i,o){var r,a,s,l,c,u,d,f=[i||J],h=ae.call(e,"type")?e.type:e,p=ae.call(e,"namespace")?e.namespace.split("."):[];if(a=s=i=i||J,3!==i.nodeType&&8!==i.nodeType&&!Tt.test(h+ce.event.triggered)&&(h.indexOf(".")>-1&&(p=h.split("."),h=p.shift(),p.sort()),c=h.indexOf(":")<0&&"on"+h,e=e[ce.expando]?e:new ce.Event(h,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:ce.makeArray(t,[e]),d=ce.event.special[h]||{},o||!d.trigger||d.trigger.apply(i,t)!==!1)){if(!o&&!d.noBubble&&!ce.isWindow(i)){for(l=d.delegateType||h,Tt.test(l+h)||(a=a.parentNode);a;a=a.parentNode)f.push(a),s=a;s===(i.ownerDocument||J)&&f.push(s.defaultView||s.parentWindow||n)}for(r=0;(a=f[r++])&&!e.isPropagationStopped();)e.type=r>1?l:d.bindType||h,u=(Ke.get(a,"events")||{})[e.type]&&Ke.get(a,"handle"),u&&u.apply(a,t),u=c&&a[c],u&&u.apply&&_e(a)&&(e.result=u.apply(a,t),e.result===!1&&e.preventDefault());return e.type=h,o||e.isDefaultPrevented()||d._default&&d._default.apply(f.pop(),t)!==!1||!_e(i)||c&&ce.isFunction(i[h])&&!ce.isWindow(i)&&(s=i[c],s&&(i[c]=null),ce.event.triggered=h,i[h](),ce.event.triggered=void 0,s&&(i[c]=s)),e.result}},simulate:function(e,t,n){var i=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(i,null,t),i.isDefaultPrevented()&&n.preventDefault()}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}}),ce.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ce.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ce.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),se.focusin="onfocusin"in n,se.focusin||ce.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ce.event.simulate(t,e.target,ce.event.fix(e))};ce.event.special[t]={setup:function(){var i=this.ownerDocument||this,o=Ke.access(i,t);o||i.addEventListener(e,n,!0),Ke.access(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=Ke.access(i,t)-1;o?Ke.access(i,t,o):(i.removeEventListener(e,n,!0),Ke.remove(i,t))}}});var Ct=n.location,yt=ce.now(),bt=/\?/;ce.parseJSON=function(e){return JSON.parse(e+"")},ce.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(i){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||ce.error("Invalid XML: "+e),t};var Ot=/#.*$/,It=/([?&])_=[^&]*/,Dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kt=/^(?:GET|HEAD)$/,_t=/^\/\//,Kt={},xt={},wt="*/".concat("*"),St=J.createElement("a");St.href=Ct.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Rt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ce.parseJSON,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?W(W(e,ce.ajaxSettings),t):W(ce.ajaxSettings,e)},ajaxPrefilter:z(Kt),ajaxTransport:z(xt),ajax:function(e,t){function i(e,t,i,s){var c,d,E,T,y,O=t;2!==C&&(C=2,l&&n.clearTimeout(l),o=void 0,a=s||"",b.readyState=e>0?4:0,c=e>=200&&e<300||304===e,i&&(T=G(f,b,i)),T=X(f,T,b,c),c?(f.ifModified&&(y=b.getResponseHeader("Last-Modified"),y&&(ce.lastModified[r]=y),y=b.getResponseHeader("etag"),y&&(ce.etag[r]=y)),204===e||"HEAD"===f.type?O="nocontent":304===e?O="notmodified":(O=T.state,d=T.data,E=T.error,c=!E)):(E=O,!e&&O||(O="error",e<0&&(e=0))),b.status=e,b.statusText=(t||O)+"",c?m.resolveWith(h,[d,O,b]):m.rejectWith(h,[b,O,E]),b.statusCode(v),v=void 0,u&&p.trigger(c?"ajaxSuccess":"ajaxError",[b,f,c?d:E]),g.fireWith(h,[b,O]),u&&(p.trigger("ajaxComplete",[b,f]),--ce.active||ce.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var o,r,a,s,l,c,u,d,f=ce.ajaxSetup({},t),h=f.context||f,p=f.context&&(h.nodeType||h.jquery)?ce(h):ce.event,m=ce.Deferred(),g=ce.Callbacks("once memory"),v=f.statusCode||{},E={},T={},C=0,y="canceled",b={readyState:0,getResponseHeader:function(e){var t;if(2===C){if(!s)for(s={};t=Dt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===C?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return C||(e=T[n]=T[n]||e,E[e]=t),this},overrideMimeType:function(e){return C||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(C<2)for(t in e)v[t]=[v[t],e[t]];else b.always(e[b.status]);return this},abort:function(e){var t=e||y;return o&&o.abort(t),i(0,t),this}};if(m.promise(b).complete=g.add,b.success=b.done,b.error=b.fail,f.url=((e||f.url||Ct.href)+"").replace(Ot,"").replace(_t,Ct.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=ce.trim(f.dataType||"*").toLowerCase().match(De)||[""],null==f.crossDomain){c=J.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=St.protocol+"//"+St.host!=c.protocol+"//"+c.host}catch(O){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=ce.param(f.data,f.traditional)),U(Kt,f,t,b),2===C)return b;u=ce.event&&f.global,u&&0===ce.active++&&ce.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!kt.test(f.type),r=f.url,f.hasContent||(f.data&&(r=f.url+=(bt.test(r)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=It.test(r)?r.replace(It,"$1_="+yt++):r+(bt.test(r)?"&":"?")+"_="+yt++)),f.ifModified&&(ce.lastModified[r]&&b.setRequestHeader("If-Modified-Since",ce.lastModified[r]),ce.etag[r]&&b.setRequestHeader("If-None-Match",ce.etag[r])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&b.setRequestHeader("Content-Type",f.contentType),b.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+wt+"; q=0.01":""):f.accepts["*"]);for(d in f.headers)b.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(f.beforeSend.call(h,b,f)===!1||2===C))return b.abort();y="abort";for(d in{success:1,error:1,complete:1})b[d](f[d]);if(o=U(xt,f,t,b)){if(b.readyState=1,u&&p.trigger("ajaxSend",[b,f]),2===C)return b;f.async&&f.timeout>0&&(l=n.setTimeout(function(){b.abort("timeout")},f.timeout));try{C=1,o.send(E,i)}catch(O){if(!(C<2))throw O;i(-1,O)}}else i(-1,"No Transport");return b},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,t){ce[t]=function(e,n,i,o){return ce.isFunction(n)&&(o=o||i,i=n,n=void 0),ce.ajax(ce.extend({url:e,type:t,dataType:o,data:n,success:i},ce.isPlainObject(e)&&e))}}),ce._evalUrl=function(e){return ce.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ce.fn.extend({wrapAll:function(e){var t;return ce.isFunction(e)?this.each(function(t){ce(this).wrapAll(e.call(this,t))}):(this[0]&&(t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return ce.isFunction(e)?this.each(function(t){ce(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ce(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ce.isFunction(e);return this.each(function(n){ce(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ce.nodeName(this,"body")||ce(this).replaceWith(this.childNodes)}).end()}}),ce.expr.filters.hidden=function(e){return!ce.expr.filters.visible(e)},ce.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var Nt=/%20/g,At=/\[\]$/,Pt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Ft=/^(?:input|select|textarea|keygen)/i;ce.param=function(e,t){var n,i=[],o=function(e,t){t=ce.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=ce.ajaxSettings&&ce.ajaxSettings.traditional),ce.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){o(this.name,this.value)});else for(n in e)Y(n,e[n],t,o);return i.join("&").replace(Nt,"+")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ft.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Fe.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:ce.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Pt,"\r\n")}}):{name:t.name,value:n.replace(Pt,"\r\n")}}).get()}}),ce.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},Mt=ce.ajaxSettings.xhr();se.cors=!!Mt&&"withCredentials"in Mt,se.ajax=Mt=!!Mt,ce.ajaxTransport(function(e){var t,i;if(se.cors||Mt&&!e.crossDomain)return{send:function(o,r){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"); for(a in o)s.setRequestHeader(a,o[a]);t=function(e){return function(){t&&(t=i=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(Bt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),i=s.onerror=t("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&i()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(l){if(t)throw l}},abort:function(){t&&t()}}}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=ce(""].join("")),n.$.close(),e=0;et-e;n--)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}function t(){for(var e=this._.tabIdList.length,t=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),n=t+1;n').appendTo(n.getParent())),i.unselectable(),o.unselectable(),{element:t,parts:{dialog:t.getChild(0),title:i,close:o,tabs:n.getChild(2),contents:n.getChild([3,0,0,0]),footer:n.getChild([3,0,1,0])}}}function a(e,t,n){this.element=t,this.focusIndex=n,this.tabIndex=0,this.isFocusable=function(){return!t.getAttribute("disabled")&&t.isVisible()},this.focus=function(){e._.currentFocusIndex=this.focusIndex,this.element.focus()},t.on("keydown",function(e){e.data.getKeystroke()in{32:1,13:1}&&this.fire("click")}),t.on("focus",function(){this.fire("mouseover")}),t.on("blur",function(){this.fire("mouseout")})}function s(e){function t(){e.layout()}var n=CKEDITOR.document.getWindow();n.on("resize",t),e.on("hide",function(){n.removeListener("resize",t)})}function l(e,t){this._={dialog:e},CKEDITOR.tools.extend(this,t)}function c(e){function t(t){var n=e.getSize(),l=CKEDITOR.document.getWindow().getViewPaneSize(),c=t.data.$.screenX,u=t.data.$.screenY,d=c-i.x,f=u-i.y;i={x:c,y:u},o.x+=d,o.y+=f,e.move(o.x+s[3]l.width-n.width-a?l.width-n.width+("rtl"==r.lang.dir?0:s[1]):o.x,o.y+s[0]l.height-n.height-a?l.height-n.height+s[2]:o.y,1),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mousemove",t),CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.env.ie6Compat){var e=b.getChild(0).getFrameDocument();e.removeListener("mousemove",t),e.removeListener("mouseup",n)}}var i=null,o=null,r=e.getParentEditor(),a=r.config.dialog_magnetDistance,s=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof a&&(a=20),e.parts.title.on("mousedown",function(r){if(i={x:r.data.$.screenX,y:r.data.$.screenY},CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),o=e.getPosition(),CKEDITOR.env.ie6Compat){var a=b.getChild(0).getFrameDocument();a.on("mousemove",t),a.on("mouseup",n)}r.data.preventDefault()},e)}function u(e){function t(t){var n="rtl"==d.lang.dir,u=c.width,f=c.height,h=u+(t.data.$.screenX-l.x)*(n?-1:1)*(e._.moved?1:2),p=f+(t.data.$.screenY-l.y)*(e._.moved?1:2),m=e._.element.getFirst(),m=n&&m.getComputedStyle("right"),g=e.getPosition();g.y+p>s.height&&(p=s.height-g.y),(n?m:g.x)+h>s.width&&(h=s.width-(n?m:g.x)),o!=CKEDITOR.DIALOG_RESIZE_WIDTH&&o!=CKEDITOR.DIALOG_RESIZE_BOTH||(u=Math.max(i.minWidth||0,h-r)),o!=CKEDITOR.DIALOG_RESIZE_HEIGHT&&o!=CKEDITOR.DIALOG_RESIZE_BOTH||(f=Math.max(i.minHeight||0,p-a)),e.resize(u,f),e._.moved||e.layout(),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.document.removeListener("mousemove",t),u&&(u.remove(),u=null),CKEDITOR.env.ie6Compat){var e=b.getChild(0).getFrameDocument();e.removeListener("mouseup",n),e.removeListener("mousemove",t)}}var i=e.definition,o=i.resizable;if(o!=CKEDITOR.DIALOG_RESIZE_NONE){var r,a,s,l,c,u,d=e.getParentEditor(),f=CKEDITOR.tools.addFunction(function(i){c=e.getSize();var o=e.parts.contents;o.$.getElementsByTagName("iframe").length&&(u=CKEDITOR.dom.element.createFromHtml('
'),o.append(u)),a=c.height-e.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),r=c.width-e.parts.contents.getSize("width",1),l={x:i.screenX,y:i.screenY},s=CKEDITOR.document.getWindow().getViewPaneSize(),CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),CKEDITOR.env.ie6Compat&&(o=b.getChild(0).getFrameDocument(),o.on("mousemove",t),o.on("mouseup",n)),i.preventDefault&&i.preventDefault()});e.on("load",function(){var t="";o==CKEDITOR.DIALOG_RESIZE_WIDTH?t=" cke_resizer_horizontal":o==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(t=" cke_resizer_vertical"),t=CKEDITOR.dom.element.createFromHtml('
'+("ltr"==d.lang.dir?"◢":"◣")+"
"),e.parts.footer.append(t,1)}),d.on("destroy",function(){CKEDITOR.tools.removeFunction(f)})}}function d(e){e.data.preventDefault(1)}function f(e){var t=CKEDITOR.document.getWindow(),n=e.config,i=n.dialog_backgroundCoverColor||"white",o=n.dialog_backgroundCoverOpacity,r=n.baseFloatZIndex,n=CKEDITOR.tools.genKey(i,o,r),a=O[n];a?a.show():(r=['
'],CKEDITOR.env.ie6Compat&&(i="",r.push('')),r.push("
"),a=CKEDITOR.dom.element.createFromHtml(r.join("")),a.setOpacity(void 0!==o?o:.5),a.on("keydown",d),a.on("keypress",d),a.on("keyup",d),a.appendTo(CKEDITOR.document.getBody()),O[n]=a),e.focusManager.add(a),b=a,e=function(){var e=t.getViewPaneSize();a.setStyles({width:e.width+"px",height:e.height+"px"})};var s=function(){var e=t.getScrollPosition(),n=CKEDITOR.dialog._.currentTop;if(a.setStyles({left:e.x+"px",top:e.y+"px"}),n)do e=n.getPosition(),n.move(e.x,e.y);while(n=n._.parentDialog)};if(y=e,t.on("resize",e),e(),CKEDITOR.env.mac&&CKEDITOR.env.webkit||a.focus(),CKEDITOR.env.ie6Compat){var l=function(){s(),arguments.callee.prevScrollHandler.apply(this,arguments)};t.$.setTimeout(function(){l.prevScrollHandler=window.onscroll||function(){},window.onscroll=l},0),s()}}function h(e){b&&(e.focusManager.remove(b),e=CKEDITOR.document.getWindow(),b.hide(),e.removeListener("resize",y),CKEDITOR.env.ie6Compat&&e.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),y=null)}var p=CKEDITOR.tools.cssLength,m='';CKEDITOR.dialog=function(n,a){function s(){var e=O._.focusList;e.sort(function(e,t){return e.tabIndex!=t.tabIndex?t.tabIndex-e.tabIndex:e.focusIndex-t.focusIndex});for(var t=e.length,n=0;nt.length)){var n=O._.currentFocusIndex;O._.tabBarMode&&0>e&&(n=0);try{t[n].getInputElement().$.blur()}catch(i){}var o=n,r=1n.height||t.width+(0n.width?e.setStyle("position","absolute"):e.setStyle("position","fixed")),this.move(this._.moved?this._.position.x:i,this._.moved?this._.position.y:o)},foreach:function(e){for(var t in this._.contents)for(var n in this._.contents[t])e.call(this,this._.contents[t][n]);return this},reset:function(){var e=function(e){e.reset&&e.reset(1)};return function(){return this.foreach(e),this}}(),setupContent:function(){var e=arguments;this.foreach(function(t){t.setup&&t.setup.apply(t,e)})},commitContent:function(){var e=arguments;this.foreach(function(t){CKEDITOR.env.ie&&this._.currentFocusIndex==t.focusIndex&&t.getInputElement().$.blur(),t.commit&&t.commit.apply(t,e)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{}),this._.editor.fire("dialogHide",this),this.selectPage(this._.tabIdList[0]);var e=this._.element;for(e.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),_(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var t=this._.parentDialog.getElement().getFirst();t.setStyle("z-index",parseInt(t.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else h(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null,e.removeListener("keydown",D),e.removeListener("keyup",R);var n=this._.editor;n.focus(),setTimeout(function(){n.focusManager.unlock(),CKEDITOR.env.iOS&&n.window.focus()},0)}delete this._.parentDialog,this.foreach(function(e){e.resetInitValue&&e.resetInitValue()}),this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(e){if(!e.requiredContent||this._.editor.filter.check(e.requiredContent)){for(var t=[],n=e.label?' title="'+CKEDITOR.tools.htmlEncode(e.label)+'"':"",i=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:e.elements,expand:!!e.expand,padding:e.padding,style:e.style||"width: 100%;"},t),o=this._.contents[e.id]={},r=i.getChild(),a=0;i=r.shift();)i.notAllowed||"hbox"==i.type||"vbox"==i.type||a++,o[i.id]=i,"function"==typeof i.getChild&&r.push.apply(r,i.getChild());a||(e.hidden=!0),t=CKEDITOR.dom.element.createFromHtml(t.join("")),t.setAttribute("role","tabpanel"),i=CKEDITOR.env,o="cke_"+e.id+"_"+CKEDITOR.tools.getNextNumber(),n=CKEDITOR.dom.element.createFromHtml(['"].join("")),t.setAttribute("aria-labelledby",o),this._.tabs[e.id]=[n,t],this._.tabIdList.push(e.id),!e.hidden&&this._.pageCount++,this._.lastTab=n,this.updateStyle(),t.setAttribute("name",e.id),t.appendTo(this.parts.contents),n.unselectable(),this.parts.tabs.append(n),e.accessKey&&(k(this,this,"CTRL+"+e.accessKey,x,K),this._.accessKeyMap["CTRL+"+e.accessKey]=e.id)}},selectPage:function(e){if(this._.currentTabId!=e&&!this._.tabs[e][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:e,currentPage:this._.currentTabId})){for(var t in this._.tabs){var i=this._.tabs[t][0],o=this._.tabs[t][1];t!=e&&(i.removeClass("cke_dialog_tab_selected"),o.hide()),o.setAttribute("aria-hidden",t!=e)}var r=this._.tabs[e];r[0].addClass("cke_dialog_tab_selected"),CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(n(r[1]),r[1].show(),setTimeout(function(){n(r[1],1)},0)):r[1].show(),this._.currentTabId=e,this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,e)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(t){var n=this._.tabs[t]&&this._.tabs[t][0];n&&1!=this._.pageCount&&n.isVisible()&&(t==this._.currentTabId&&this.selectPage(e.call(this)),n.hide(),this._.pageCount--,this.updateStyle())},showPage:function(e){(e=this._.tabs[e]&&this._.tabs[e][0])&&(e.show(),this._.pageCount++,this.updateStyle())},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(e,t){var n=this._.contents[e];return n&&n[t]},getValueOf:function(e,t){return this.getContentElement(e,t).getValue()},setValueOf:function(e,t,n){return this.getContentElement(e,t).setValue(n)},getButton:function(e){return this._.buttons[e]},click:function(e){return this._.buttons[e].click()},disableButton:function(e){return this._.buttons[e].disable()},enableButton:function(e){return this._.buttons[e].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(e,t){if("undefined"==typeof t)t=this._.focusList.length,this._.focusList.push(new a(this,e,t));else{this._.focusList.splice(t,0,new a(this,e,t));for(var n=t+1;narguments.length)){var s=(i.call?i(t):i)||"div",l=["<",s," "],c=(o&&o.call?o(t):o)||{},u=(r&&r.call?r(t):r)||{},d=(a&&a.call?a.call(this,e,t):a)||"",f=this.domId=u.id||CKEDITOR.tools.getNextId()+"_uiElement";t.requiredContent&&!e.getParentEditor().filter.check(t.requiredContent)&&(c.display="none",this.notAllowed=!0),u.id=f;var h={};t.type&&(h["cke_dialog_ui_"+t.type]=1),t.className&&(h[t.className]=1),t.disabled&&(h.cke_disabled=1);for(var p=u["class"]&&u["class"].split?u["class"].split(" "):[],f=0;f",d,""),n.push(l.join("")),(this._||(this._={})).dialog=e,"boolean"==typeof t.isChanged&&(this.isChanged=function(){return t.isChanged}),"function"==typeof t.isChanged&&(this.isChanged=t.isChanged),"function"==typeof t.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(e){return function(n){e.call(this,t.setValue.call(this,n))}})),"function"==typeof t.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(e){return function(){return t.getValue.call(this,e.call(this))}})),CKEDITOR.event.implementOn(this),this.registerEvents(t),this.accessKeyUp&&this.accessKeyDown&&t.accessKey&&k(this,e,"CTRL+"+t.accessKey);var m=this;e.on("load",function(){var t=m.getInputElement();if(t){var n=m.type in{ checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";t.on("focus",function(){e._.tabBarMode=!1,e._.hasFocus=!0,m.fire("focus"),n&&this.addClass(n)}),t.on("blur",function(){m.fire("blur"),n&&this.removeClass(n)})}}),CKEDITOR.tools.extend(this,t),this.keyboardFocusable&&(this.tabIndex=t.tabIndex||0,this.focusIndex=e._.focusList.push(this)-1,this.on("focus",function(){e._.currentFocusIndex=m.focusIndex}))}},hbox:function(e,t,n,i,o){if(!(4>arguments.length)){this._||(this._={});var r,a=this._.children=t,s=o&&o.widths||null,l=o&&o.height||null,c={role:"presentation"};o&&o.align&&(c.align=o.align),CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"hbox"},i,"table",{},c,function(){var e=[''];for(r=0;r",n[r],"")}return e.push(""),e.join("")})}},vbox:function(e,t,n,i,o){if(!(3>arguments.length)){this._||(this._={});var r=this._.children=t,a=o&&o.width||null,s=o&&o.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"vbox"},i,"div",null,{role:"presentation"},function(){var t=['");for(var i=0;i")}return t.push("
"),t.join("")})}}}}(),CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(e,t){return this.getInputElement().setValue(e),!t&&this.fire("change",{value:e}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var e=this.getInputElement();(e=e.getParent())&&-1==e.$.className.search("cke_dialog_page_contents"););return e?(e=e.getAttribute("name"),this._.dialog._.currentTabId!=e&&this._.dialog.selectPage(e),this):this},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(e){var t,n,i=/^on([A-Z]\w+)/,o=function(e,t,n,i){t.on("load",function(){e.getInputElement().on(n,i,e)})};for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):o(this,this._.dialog,t[1].toLowerCase(),e[n]));return this},eventProcessors:{onLoad:function(e,t){e.on("load",t,this)},onShow:function(e,t){e.on("show",t,this)},onHide:function(e,t){e.on("hide",t,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var e=this.getElement();this.getInputElement().setAttribute("disabled","true"),e.addClass("cke_disabled")},enable:function(){var e=this.getElement();this.getInputElement().removeAttribute("disabled"),e.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!(!this.isEnabled()||!this.isVisible())}},CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(e){return 1>arguments.length?this._.children.concat():(e.splice||(e=[e]),2>e.length?this._.children[e[0]]:this._.children[e[0]]&&this._.children[e[0]].getChild?this._.children[e[0]].getChild(e.slice(1,e.length)):null)}},!0),CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox,function(){var e={build:function(e,t,n){for(var i,o=t.children,r=[],a=[],s=0;sa.length&&(t=e.document.createElement(e.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),s=o.shift(),i.insertNode(t),t.append(new CKEDITOR.dom.text("\ufeff",e.document)),i.moveToBookmark(s),i.selectNodeContents(t),i.collapse(!0),s=i.createBookmark(),a.push(t),o.unshift(s)),r=a[0].getParent(),i=[],s=0;s]+data-cke-bookmark[^<]*?<\/span>/gi,""),o&&e(t,i)})}function h(){if("wysiwyg"==t.mode){var e=p("paste");t.getCommand("cut").setState(p("cut")),t.getCommand("copy").setState(p("copy")),t.getCommand("paste").setState(e),t.fire("pasteState",e)}}function p(e){if(E&&e in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==e)return CKEDITOR.TRISTATE_OFF;e=t.getSelection();var n=e.getRanges();return e.getType()==CKEDITOR.SELECTION_NONE||1==n.length&&n[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var m=CKEDITOR.plugins.clipboard,g=0,v=0,E=0;!function(){t.on("key",d),t.on("contentDom",n),t.on("selectionChange",function(e){E=e.data.selection.getRanges()[0].checkReadOnly(),h()}),t.contextMenu&&t.contextMenu.addListener(function(e,t){return E=t.getRanges()[0].checkReadOnly(),{cut:p("cut"),copy:p("copy"),paste:p("paste")}})}(),function(){function e(e,n,i,o,r){var a=t.lang.clipboard[n];t.addCommand(n,i),t.ui.addButton&&t.ui.addButton(e,{label:a,command:n,toolbar:"clipboard,"+o}),t.addMenuItems&&t.addMenuItem(n,{label:a,command:n,group:"clipboard",order:r})}e("Cut","cut",i("cut"),10,1),e("Copy","copy",i("copy"),20,4),e("Paste","paste",o(),30,8)}(),t.getClipboardData=function(e,n){function i(e){e.removeListener(),e.cancel(),n(e.data)}function o(e){e.removeListener(),e.cancel(),l=!0,n({type:s,dataValue:e.data.dataValue,dataTransfer:e.data.dataTransfer,method:"paste"})}function r(){this.customTitle=e&&e.title}var a=!1,s="auto",l=!1;n||(n=e,e=null),t.on("paste",i,null,null,0),t.on("beforePaste",function(e){e.removeListener(),a=!0,s=e.data.type},null,null,1e3),!1===u()&&(t.removeListener("paste",i),a&&t.fire("pasteDialog",r)?(t.on("pasteDialogCommit",o),t.on("dialogHide",function(e){e.removeListener(),e.data.removeListener("pasteDialogCommit",o),setTimeout(function(){l||n(null)},10)})):n(null))}}function n(e){if(CKEDITOR.env.webkit){if(!e.match(/^[^<]*$/g)&&!e.match(/^(
<\/div>|
[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!e.match(/^([^<]|)*$/gi)&&!e.match(/^(

([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else{if(!CKEDITOR.env.gecko)return"html";if(!e.match(/^([^<]|)*$/gi))return"html"}return"htmlifiedtext"}function i(e,t){function n(e){return CKEDITOR.tools.repeat("

",~~(e/2))+(1==e%2?"
":"")}return t=t.replace(/\s+/g," ").replace(/> +<").replace(/
/gi,"
"),t=t.replace(/<\/?[A-Z]+>/g,function(e){return e.toLowerCase()}),t.match(/^[^<]$/)?t:(CKEDITOR.env.webkit&&-1")&&(t=t.replace(/^(

(
|)<\/div>)(?!$|(
(
|)<\/div>))/g,"
").replace(/^(
(
|)<\/div>){2}(?!$)/g,"
"),t.match(/
(
|)<\/div>/)&&(t="

"+t.replace(/(

(
|)<\/div>)+/g,function(e){return n(e.split("
").length+1)})+"

"),t=t.replace(/<\/div>
/g,"
"),t=t.replace(/<\/?div>/g,"")),CKEDITOR.env.gecko&&e.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(t=t.replace(/^

$/,"
")),-1
")&&(t="

"+t.replace(/(
){2,}/g,function(e){return n(e.length/4)})+"

")),a(e,t))}function o(){function e(){var e,t={};for(e in CKEDITOR.dtd)"$"!=e.charAt(0)&&"div"!=e&&"span"!=e&&(t[e]=1);return t}var t={};return{get:function(n){return"plain-text"==n?t.plainText||(t.plainText=new CKEDITOR.filter("br")):"semantic-content"==n?((n=t.semanticContent)||(n=new CKEDITOR.filter,n.allow({$1:{elements:e(),attributes:!0,styles:!1,classes:!1}}),n=t.semanticContent=n),n):n?new CKEDITOR.filter(n):null}}}function r(e,t,n){t=CKEDITOR.htmlParser.fragment.fromHtml(t);var i=new CKEDITOR.htmlParser.basicWriter;return n.applyTo(t,!0,!1,e.activeEnterMode),t.writeHtml(i),i.getHtml()}function a(e,t){return e.enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(<\/p>

)+/g,function(e){return CKEDITOR.tools.repeat("
",e.length/7*2)}).replace(/<\/?p>/g,""):e.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(\/)?p>/g,"<$1div>")),t}function s(e){e.data.preventDefault(),e.data.$.dataTransfer.dropEffect="none"}function l(t){var n=CKEDITOR.plugins.clipboard;t.on("contentDom",function(){function i(n,i,o){i.select(),e(t,{dataTransfer:o,method:"drop"},1),o.sourceEditor.fire("saveSnapshot"),o.sourceEditor.editable().extractHtmlFromRange(n),o.sourceEditor.getSelection().selectRanges([n]),o.sourceEditor.fire("saveSnapshot")}function o(i,o){i.select(),e(t,{dataTransfer:o,method:"drop"},1),n.resetDragDataTransfer()}function r(e,n,i){var o={$:e.data.$,target:e.data.getTarget()};n&&(o.dragRange=n),i&&(o.dropRange=i),!1===t.fire(e.name,o)&&e.data.preventDefault()}function a(e){return e.type!=CKEDITOR.NODE_ELEMENT&&(e=e.getParent()),e.getChildCount()}var s=t.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(t),c=t.ui.space("top"),u=t.ui.space("bottom");n.preventDefaultDropOnElement(c),n.preventDefaultDropOnElement(u),s.attachListener(l,"dragstart",r),s.attachListener(t,"dragstart",n.resetDragDataTransfer,n,null,1),s.attachListener(t,"dragstart",function(e){n.initDragDataTransfer(e,t)},null,null,2),s.attachListener(t,"dragstart",function(){var e=n.dragRange=t.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(n.dragStartContainerChildCount=e?a(e.startContainer):null,n.dragEndContainerChildCount=e?a(e.endContainer):null)},null,null,100),s.attachListener(l,"dragend",r),s.attachListener(t,"dragend",n.initDragDataTransfer,n,null,1),s.attachListener(t,"dragend",n.resetDragDataTransfer,n,null,100),s.attachListener(l,"dragover",function(e){var t=e.data.getTarget();t&&t.is&&t.is("html")?e.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&e.data.$.dataTransfer.types.contains("Files")&&e.data.preventDefault()}),s.attachListener(l,"drop",function(e){if(!e.data.$.defaultPrevented){e.data.preventDefault();var i=e.data.getTarget();if(!i.isReadOnly()||i.type==CKEDITOR.NODE_ELEMENT&&i.is("html")){var i=n.getRangeAtDropPosition(e,t),o=n.dragRange;i&&r(e,o,i)}}},null,null,9999),s.attachListener(t,"drop",n.initDragDataTransfer,n,null,1),s.attachListener(t,"drop",function(e){if(e=e.data){var r=e.dropRange,a=e.dragRange,s=e.dataTransfer;s.getTransferType(t)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){n.internalDrop(a,r,s,t)},0):s.getTransferType(t)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?i(a,r,s):o(r,s)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(e){var a,s=o();e.config.forcePasteAsPlainText?a="plain-text":e.config.pasteFilter?a=e.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in e.config||(a="semantic-content"),e.pasteFilter=s.get(a),t(e),l(e),CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")),e.on("paste",function(t){if(t.data.dataTransfer||(t.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer),!t.data.dataValue){var n=t.data.dataTransfer,i=n.getData("text/html");i?(t.data.dataValue=i,t.data.type="html"):(i=n.getData("text/plain"))&&(t.data.dataValue=e.editable().transformPlainTextToHtml(i),t.data.type="text")}},null,null,1),e.on("paste",function(e){var t=e.data.dataValue,n=CKEDITOR.dtd.$block;if(-1 <\/span>/gi," "),"html"!=e.data.type&&(t=t.replace(/]*>([^<]*)<\/span>/gi,function(e,t){return t.replace(/\t/g,"    ")})),-1')&&(e.data.startsWithEOL=1,e.data.preSniffing="html",t=t.replace(/
/,"")),t=t.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")),t.match(/^<[^<]+cke_(editable|contents)/i)){var i,o,r=new CKEDITOR.dom.element("div");for(r.setHtml(t);1==r.getChildCount()&&(i=r.getFirst())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.hasClass("cke_editable")||i.hasClass("cke_contents"));)r=o=i;o&&(t=o.getHtml().replace(/
$/i,""))}CKEDITOR.env.ie?t=t.replace(/^ (?: |\r\n)?<(\w+)/g,function(t,i){return i.toLowerCase()in n?(e.data.preSniffing="html","<"+i):t}):CKEDITOR.env.webkit?t=t.replace(/<\/(\w+)>


<\/div>$/,function(t,i){return i in n?(e.data.endsWithEOL=1,""):t}):CKEDITOR.env.gecko&&(t=t.replace(/(\s)
$/,"$1")),e.data.dataValue=t},null,null,3),e.on("paste",function(t){t=t.data;var o,a=t.type,l=t.dataValue,c=e.config.clipboard_defaultContentType||"html",u=t.dataTransfer.getTransferType(e);o="html"==a||"html"==t.preSniffing?"html":n(l),"htmlifiedtext"==o&&(l=i(e.config,l)),"text"==a&&"html"==o?l=r(e,l,s.get("plain-text")):u==CKEDITOR.DATA_TRANSFER_EXTERNAL&&e.pasteFilter&&!t.dontFilter&&(l=r(e,l,e.pasteFilter)),t.startsWithEOL&&(l='
'+l),t.endsWithEOL&&(l+='
'),"auto"==a&&(a="html"==o||"html"==c?"html":"text"),t.type=a,t.dataValue=l,delete t.preSniffing,delete t.startsWithEOL,delete t.endsWithEOL},null,null,6),e.on("paste",function(t){t=t.data,t.dataValue&&(e.insertHtml(t.dataValue,t.type,t.range),setTimeout(function(){e.fire("afterPaste")},0))},null,null,1e3),e.on("pasteDialog",function(t){setTimeout(function(){e.openDialog("paste",t.data)},0)})}}),CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||t.isInline()?t:e.document},fixSplitNodesAfterDrop:function(e,t,n,i){function o(e,n,i){var o=e;if(o.type==CKEDITOR.NODE_TEXT&&(o=e.getParent()),o.equals(n)&&i!=n.getChildCount())return e=t.startContainer.getChild(t.startOffset-1),n=t.startContainer.getChild(t.startOffset),e&&e.type==CKEDITOR.NODE_TEXT&&n&&n.type==CKEDITOR.NODE_TEXT&&(i=e.getLength(),e.setText(e.getText()+n.getText()),n.remove(),t.setStart(e,i),t.collapse(!0)),!0}var r=t.startContainer;"number"==typeof i&&"number"==typeof n&&r.type==CKEDITOR.NODE_ELEMENT&&(o(e.startContainer,r,n)||o(e.endContainer,r,i))},isDropRangeAffectedByDragRange:function(e,t){var n=t.startContainer,i=t.endOffset;return!!(e.endContainer.equals(n)&&e.endOffset<=i||e.startContainer.getParent().equals(n)&&e.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(t,n,s.dragStartContainerChildCount,s.dragEndContainerChildCount),(a=this.isDropRangeAffectedByDragRange(t,n))||(r=t.createBookmark(!1)),s=n.clone().createBookmark(!1),a&&(r=t.createBookmark(!1)),t=r.startNode,n=r.endNode,a=s.startNode,n&&t.getPosition(a)&CKEDITOR.POSITION_PRECEDING&&n.getPosition(a)&CKEDITOR.POSITION_FOLLOWING&&a.insertBefore(t),t=o.createRange(),t.moveToBookmark(r),l.extractHtmlFromRange(t,1),n=o.createRange(),n.moveToBookmark(s),e(o,{dataTransfer:i,method:"drop",range:n},1),o.fire("unlockSnapshot")},getRangeAtDropPosition:function(e,t){var n=e.data.$,i=n.clientX,o=n.clientY,r=t.getSelection(!0).getRanges()[0],a=t.createRange();if(e.data.testRange)return e.data.testRange;if(document.caretRangeFromPoint)n=t.document.$.caretRangeFromPoint(i,o),a.setStart(CKEDITOR.dom.node(n.startContainer),n.startOffset),a.collapse(!0);else if(n.rangeParent)a.setStart(CKEDITOR.dom.node(n.rangeParent),n.rangeOffset),a.collapse(!0);else{if(CKEDITOR.env.ie&&8l&&!s;l++){if(!s)try{n.moveToPoint(i,o-l),s=!0}catch(c){}if(!s)try{n.moveToPoint(i,o+l),s=!0}catch(u){}}if(s){var d="cke-temp-"+(new Date).getTime();n.pasteHTML('');var f=t.document.getById(d);a.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f.remove()}else{var h,p=t.document.$.elementFromPoint(i,o),m=new CKEDITOR.dom.element(p);if(m.equals(t.editable())||"html"==m.getName())return r&&r.startContainer&&!r.startContainer.equals(t.editable())?r:null;h=m.getClientRect(),i/i,bodyRegExp:/([\s\S]*)<\/body>/i, fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(e){return e=e.toLowerCase(),"text"==e||"text/plain"==e?"Text":"url"==e?"URL":e}},this.id=this.getData(c),this.id||(this.id="Text"==c?"":"cke-"+CKEDITOR.tools.getUniqueId()),"Text"!=c)try{this.$.setData(c,this.id)}catch(n){}t&&(this.sourceEditor=t,this.setData("text/html",t.getSelectedHtml(1)),"Text"==c||this.getData("text/plain")||this.setData("text/plain",t.getSelection().getSelectedText()))},CKEDITOR.DATA_TRANSFER_INTERNAL=1,CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2,CKEDITOR.DATA_TRANSFER_EXTERNAL=3,CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(e){e=this._.normalizeType(e);var t=this._.data[e];if(void 0===t||null===t||""===t)try{t=this.$.getData(e)}catch(n){}return void 0!==t&&null!==t&&""!==t||(t=""),"text/html"==e?(t=t.replace(this._.metaRegExp,""),(e=this._.bodyRegExp.exec(t))&&e.length&&(t=e[1],t=t.replace(this._.fragmentRegExp,""))):"Text"==e&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==t.substring(0,7)&&(t=""),t},setData:function(e,t){if(e=this._.normalizeType(e),this._.data[e]=t,CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==e||"Text"==e){"Text"==c&&"Text"==e&&(this.id=t);try{this.$.setData(e,t)}catch(n){}}},getTransferType:function(e){return this.sourceEditor?this.sourceEditor==e?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function e(e){e=i._.normalizeType(e);var t=i.getData(e);t&&(i._.data[e]=t)}if(this.$){var t,n,i=this;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(t=0;t{frame}
'),t=CKEDITOR.addTemplate("panel-frame",''),n=CKEDITOR.addTemplate("panel-frame-inner",'{css}');CKEDITOR.ui.panel.prototype={render:function(i,o){this.getHolderElement=function(){var e=this._.holder;if(!e){if(this.isFramed){var e=this.document.getById(this.id+"_frame"),t=e.getParent(),e=e.getFrameDocument();CKEDITOR.env.iOS&&t.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"}),t=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0,this.onLoad&&this.onLoad()},this)),e.write(n.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+t+");"},r))),e.getWindow().$.CKEDITOR=CKEDITOR,e.on("keydown",function(e){var t=e.data.getKeystroke(),n=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(t)?e.data.preventDefault():(27==t||t==("rtl"==n?39:37))&&this.onEscape&&!1===this.onEscape(t)&&e.data.preventDefault()},this),e=e.getBody(),e.unselectable(),CKEDITOR.env.air&&CKEDITOR.tools.callFunction(t)}else e=this.document.getById(this.id);this._.holder=e}return e};var r={editorId:i.id,id:this.id,langCode:i.langCode,dir:i.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":i.config.baseFloatZIndex+1};if(this.isFramed){var a=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";r.frame=t.output({id:this.id+"_frame",src:a})}return a=e.output(r),o&&o.push(a),a},addBlock:function(e,t){return t=this._.blocks[e]=t instanceof CKEDITOR.ui.panel.block?t:new CKEDITOR.ui.panel.block(this.getHolderElement(),t),this._.currentBlock||this.showBlock(e),t},getBlock:function(e){return this._.blocks[e]},showBlock:function(e){e=this._.blocks[e];var t=this._.currentBlock,n=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");return t&&t.hide(),this._.currentBlock=e,CKEDITOR.fire("ariaWidget",n),e._.focusIndex=-1,this._.onKeyDown=e.onKeyDown&&CKEDITOR.tools.bind(e.onKeyDown,e),e.show(),e},destroy:function(){this.element&&this.element.remove()}},CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(e,t){this.element=e.append(e.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}})),t&&CKEDITOR.tools.extend(this,t),this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]}),this.keys={},this._.focusIndex=-1,this.element.disableContextMenu()},_:{markItem:function(e){-1!=e&&(e=this.element.getElementsByTag("a").getItem(this._.focusIndex=e),CKEDITOR.env.webkit&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(e,t){var n=this.keys[e];switch(n){case"next":for(var i,o=this._.focusIndex,n=this.element.getElementsByTag("a");i=n.getItem(++o);)if(i.getAttribute("_cke_focus")&&i.$.offsetWidth){this._.focusIndex=o,i.focus();break}return!i&&!t&&(this._.focusIndex=-1,this.onKeyDown(e,1));case"prev":for(o=this._.focusIndex,n=this.element.getElementsByTag("a");0n?p+n:t.width>n?p-e.left:p-e.right+t.width):on?p-n:t.width>n?p-e.right+t.width:p-e.left),n=e.top,t.height-e.topi?m-i:t.height>i?m-e.bottom+t.height:m-e.top),CKEDITOR.env.ie&&(t=e=new CKEDITOR.dom.element(c.$.offsetParent),"html"==t.getName()&&(t=t.getDocument().getBody()),"rtl"==t.getComputedStyle("direction")&&(p=CKEDITOR.env.ie8Compat?p-2*c.getDocument().getDocumentElement().$.scrollLeft:p-(e.$.scrollWidth-e.$.clientWidth)));var u,e=c.getFirst();(u=e.getCustomData("activePanel"))&&u.onHide&&u.onHide.call(this,1),e.setCustomData("activePanel",this),c.setStyles({top:m+"px",left:p+"px"}),c.setOpacity(1),r&&r()},this);a.isLoaded?e():a.onLoad=e,CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus(),s.element.focus(),CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=e),this.allowBlur(!0),this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this),this.visible=1,this.onShow&&this.onShow.call(this)},reposition:function(){var e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,e))},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();e&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused=e)},hide:function(e){!this.visible||this.onHide&&!0===this.onHide.call(this)||(this.hideChild(),CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(),this.element.setStyle("display","none"),this.visible=0,this.element.getFirst().removeCustomData("activePanel"),(e=e&&this._.returnFocus)&&(CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus()),delete this._.lastFocused,this._.showBlockParams=null,this._.editor.fire("panelHide",this))},allowBlur:function(e){var t=this._.panel;return void 0!==e&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,t,n,i,o,r){this._.activeChild==e&&e._.panel._.offsetParentId==n.getId()||(this.hideChild(),e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(t,n,i,o,r),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(e){var t=this._.activeChild;t&&(delete t.onHide,delete this._.activeChild,t.hide(),e&&this.focus())}}}),CKEDITOR.on("instanceDestroyed",function(){var e,n=CKEDITOR.tools.isEmpty(CKEDITOR.instances);for(e in t){var i=t[e];n?i.destroy():i.element.hide()}n&&(t={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(e){for(var t=e.config.menu_groups.split(","),n=e._.menuGroups={},i=e._.menuItems={},o=0;ot.group?1:e.ordert.order?1:0})}var t=''),n=CKEDITOR.addTemplate("menuItem",t+'{label}{arrowHtml}'),i=CKEDITOR.addTemplate("menuArrow",'{label}');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(e,t){t=this._.definition=t||{},this.id=CKEDITOR.tools.getNextId(),this.editor=e,this.items=[],this._.listeners=[],this._.level=t.level||1;var n=CKEDITOR.tools.extend({},t.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),i=n.block.attributes=n.attributes||{};!i.role&&(i.role="menu"),this._.panelDefinition=n},_:{onShow:function(){var e=this.editor.getSelection(),t=e&&e.getStartElement(),n=this.editor.elementPath(),i=this._.listeners;this.removeAll();for(var o=0;o'],u=r.length,d=u&&r[0].group,f=0;f
'),d=h.group),h.render(this,f,c)}c.push("
"),l.setHtml(c.join("")),CKEDITOR.ui.fire("ready",this),this.parent?this.parent._.panel.showAsChild(s,this.id,t,n,i,o):s.showBlock(this.id,t,n,i,o),a.fire("menuShow",[s])}},addListener:function(e){this._.listeners.push(e)},hide:function(e){this._.onHide&&this._.onHide(),this._.panel&&this._.panel.hide(e)}}}),CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(e,t,n){CKEDITOR.tools.extend(this,n,{order:0,className:"cke_menubutton__"+t}),this.group=e._.menuGroups[this.group],this.editor=e,this.name=t},proto:{render:function(e,t,o){var r=e.id+String(t),a="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,s="",l=a==CKEDITOR.TRISTATE_ON?"on":a==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(s=' aria-checked="'+(a==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var c=this.getItems,u="&#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",d=this.name;this.icon&&!/\./.test(this.icon)&&(d=this.icon),e={id:r,name:this.name,iconName:d,label:this.label,cls:this.className||"",state:l,hasPopup:c?"true":"false",disabled:a==CKEDITOR.TRISTATE_DISABLED,title:this.label,href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:e._.itemOverFn,moveOutFn:e._.itemOutFn,clickFn:e._.itemClickFn,index:t,iconStyle:CKEDITOR.skin.getIconStyle(d,"rtl"==this.editor.lang.dir,d==this.icon?null:this.icon,this.iconOffset),arrowHtml:c?i.output({label:u}):"",role:this.role?this.role:"menuitem",ariaChecked:s},n.output(e,o)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(e){this.base.call(this,e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.contextmenu.options}}})},proto:{addTarget:function(e,t){if(e.on("contextmenu",function(e){e=e.data;var i=CKEDITOR.env.webkit?n:CKEDITOR.env.mac?e.$.metaKey:e.$.ctrlKey;if(!t||!i){if(e.preventDefault(),CKEDITOR.env.mac&&CKEDITOR.env.webkit){var i=this.editor,o=new CKEDITOR.dom.elementPath(e.getTarget(),i.editable()).contains(function(e){return e.hasAttribute("contenteditable")},!0);o&&"false"==o.getAttribute("contenteditable")&&i.getSelection().fake(o)}var o=e.getTarget().getDocument(),r=e.getTarget().getDocument().getDocumentElement(),i=!o.equals(CKEDITOR.document),o=o.getWindow().getScrollPosition(),a=i?e.$.clientX:e.$.pageX||o.x+e.$.clientX,s=i?e.$.clientY:e.$.pageY||o.y+e.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(r,null,a,s)},CKEDITOR.env.ie?200:0,this)}},this),CKEDITOR.env.webkit){var n,i=function(){n=0};e.on("keydown",function(e){n=CKEDITOR.env.mac?e.data.$.metaKey:e.data.$.ctrlKey}),e.on("keyup",i),e.on("contextmenu",i)}},open:function(e,t,n,i){this.editor.focus(),e=e||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(e,t,n,i)}}})},beforeInit:function(e){var t=e.contextMenu=new CKEDITOR.plugins.contextMenu(e);e.on("contentDom",function(){t.addTarget(e.editable(),!1!==e.config.browserContextMenuOnCtrl)}),e.addCommand("contextMenu",{exec:function(){e.contextMenu.open(e.document.getBody())}}),e.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu"),e.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function e(e,n){function o(t){t=l.list[t];var n;t.equals(e.editable())||"true"==t.getAttribute("contenteditable")?(n=e.createRange(),n.selectNodeContents(t),n=n.select()):(n=e.getSelection(),n.selectElement(t)),CKEDITOR.env.ie&&e.fire("selectionChange",{selection:n,path:new CKEDITOR.dom.elementPath(t)}),e.focus()}function r(){a&&a.setHtml(' '),delete l.list}var a,s=e.ui.spaceId("path"),l=e._.elementsPath,c=l.idBase;n.html+=''+e.lang.elementspath.eleLabel+' ',e.on("uiReady",function(){var t=e.ui.space("path");t&&e.focusManager.add(t,1)}),l.onClick=o;var u=CKEDITOR.tools.addFunction(o),d=CKEDITOR.tools.addFunction(function(t,n){var i,r=l.idBase;switch(n=new CKEDITOR.dom.event(n),i="rtl"==e.lang.dir,n.getKeystroke()){case i?39:37:case 9:return(i=CKEDITOR.document.getById(r+(t+1)))||(i=CKEDITOR.document.getById(r+"0")),i.focus(),!1;case i?37:39:case CKEDITOR.SHIFT+9:return(i=CKEDITOR.document.getById(r+(t-1)))||(i=CKEDITOR.document.getById(r+(l.list.length-1))),i.focus(),!1;case 27:return e.focus(),!1;case 13:case 32:return o(t),!1}return!0});e.on("selectionChange",function(){for(var t,n=[],o=l.list=[],r=[],f=l.filters,h=!0,p=e.elementPath().elements,m=p.length;m--;){var g=p[m],v=0;t=g.data("cke-display-name")?g.data("cke-display-name"):g.data("cke-real-element-type")?g.data("cke-real-element-type"):g.getName(),(h=g.hasAttribute("contenteditable")?"true"==g.getAttribute("contenteditable"):h)||g.hasAttribute("contenteditable")||(v=1);for(var E=0;E '),e.fire("elementsPathUpdate",{space:r})}),e.on("readOnly",r),e.on("contentDomUnload",r),e.addCommand("elementsPathFocus",t.toolbarFocus),e.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var t={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(e){(e=CKEDITOR.document.getById(e._.elementsPath.idBase+"0"))&&e.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},n="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(n+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(n+=' onblur="this.style.cssText = this.style.cssText;"');var i=CKEDITOR.addTemplate("pathItem",'{text}');CKEDITOR.plugins.add("elementspath",{init:function(t){t._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]},t.on("uiSpace",function(n){"bottom"==n.data.space&&e(t,n.data)})}})}(),function(){function e(e,i){var o,r;i.on("refresh",function(e){var i,o=[t];for(i in e.data.states)o.push(e.data.states[i]);this.setState(CKEDITOR.tools.search(o,n)?n:t)},i,null,100),i.on("exec",function(t){o=e.getSelection(),r=o.createBookmarks(1),t.data||(t.data={}),t.data.done=!1},i,null,0),i.on("exec",function(){e.forceNextSelectionCheck(),o.selectBookmarks(r)},i,null,100)}var t=CKEDITOR.TRISTATE_DISABLED,n=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(t){var n=CKEDITOR.plugins.indent.genericDefinition;e(t,t.addCommand("indent",new n((!0)))),e(t,t.addCommand("outdent",new n)),t.ui.addButton&&(t.ui.addButton("Indent",{label:t.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),t.ui.addButton("Outdent",{label:t.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"})),t.on("dirChanged",function(e){var n=t.createRange(),i=e.data.node;n.setStartBefore(i),n.setEndAfter(i);for(var o,r=new CKEDITOR.dom.walker(n);o=r.next();)if(o.type==CKEDITOR.NODE_ELEMENT)if(!o.equals(i)&&o.getDirection())n.setStartAfter(o),r=new CKEDITOR.dom.walker(n);else{var a=t.config.indentClasses;if(a)for(var s="ltr"==e.data.dir?["_rtl",""]:["","_rtl"],l=0;li.length)return!1;for(c=t.getParents(!0),l=0;ld;l++)u[l].indent+=c;if(i=CKEDITOR.plugins.list.arrayToList(u,a,null,e.config.enterMode,t.getDirection()),!r.isIndent){var h;if((h=t.getParent())&&h.is("li"))for(var p,c=i.listNode.getChildren(),m=[],l=c.count()-1;0<=l;l--)(p=c.getItem(l))&&p.is&&p.is("li")&&m.push(p)}if(i&&i.listNode.replace(t),m&&m.length)for(l=0;lo[a-1].indent+1){for(r=o[a-1].indent+1-o[a].indent,s=o[a].indent;o[a]&&o[a].indent>=s;)o[a].indent+=r,a++;a--}var l,c,u=CKEDITOR.plugins.list.arrayToList(o,n,null,e.config.enterMode,t.root.getAttribute("dir")).listNode;i(!0),i(),u.replace(t.root),e.fire("contentDomInvalidated")}function t(e,t){this.name=e,this.context=this.type=t,this.allowedContent=t+" li",this.requiredContent=t}function n(e,t,n,i){for(var o,r;o=e[i?"getLast":"getFirst"](h);)(r=o.getDirection(1))!==t.getDirection(1)&&o.setAttribute("dir",r),o.remove(),n?o[i?"insertBefore":"insertAfter"](n):t.append(o,i)}function i(e){function t(t){var i=e[t?"getPrevious":"getNext"](u);i&&i.type==CKEDITOR.NODE_ELEMENT&&i.is(e.getName())&&(n(e,i,null,!t),e.remove(),e=i)}t(),t(1)}function o(e){return e.type==CKEDITOR.NODE_ELEMENT&&(e.getName()in CKEDITOR.dtd.$block||e.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[e.getName()]["#"]}function r(e,t,o){e.fire("saveSnapshot"),o.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var r=o.extractContents();t.trim(!1,!0);var s=t.createBookmark(),l=new CKEDITOR.dom.elementPath(t.startContainer),c=l.block,l=l.lastElement.getAscendant("li",1)||c,f=new CKEDITOR.dom.elementPath(o.startContainer),h=f.contains(CKEDITOR.dtd.$listItem),f=f.contains(CKEDITOR.dtd.$list);for(c?(c=c.getBogus())&&c.remove():f&&(c=f.getPrevious(u))&&d(c)&&c.remove(),(c=r.getLast())&&c.type==CKEDITOR.NODE_ELEMENT&&c.is("br")&&c.remove(),(c=t.startContainer.getChild(t.startOffset))?r.insertBefore(c):t.startContainer.append(r),h&&(r=a(h))&&(l.contains(h)?(n(r,h.getParent(),h),r.remove()):l.append(r));o.checkStartOfBlock()&&o.checkEndOfBlock()&&(f=o.startPath(),r=f.block,r);)r.is("li")&&(l=r.getParent(),r.equals(l.getLast(u))&&r.equals(l.getFirst(u))&&(r=l)),o.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START),r.remove();o=o.clone(),r=e.editable(),o.setEndAt(r,CKEDITOR.POSITION_BEFORE_END),o=new CKEDITOR.dom.walker(o),o.evaluator=function(e){return u(e)&&!d(e)},(o=o.next())&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in CKEDITOR.dtd.$list&&i(o),t.moveToBookmark(s),t.select(),e.fire("saveSnapshot")}function a(e){return(e=e.getLast(u))&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in s?e:null}var s={ol:1,ul:1},l=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(),u=function(e){return!(l(e)||c(e))},d=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(e,t,n,i,o){if(!s[e.getName()])return[];i||(i=0),n||(n=[]);for(var r=0,a=e.getChildCount();r=d.$.documentMode&&g.append(d.createText(" ")),g.append(p.listNode),p=p.nextIndex;else{if(-1!=E.indent||n||!r)return null;s[r.getName()]?(g=E.element.clone(!1,!0),a!=r.getDirection(1)&&g.setAttribute("dir",a)):g=new CKEDITOR.dom.documentFragment(d);var T,C,h=r.getDirection(1)!=a,y=E.element,b=y.getAttribute("class"),O=y.getAttribute("style"),I=g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(i!=CKEDITOR.ENTER_BR||h||O||b),D=E.contents.length;for(r=0;rd.length)){for(v=d[d.length-1].getNext(),E=r.createElement(this.type),h.push(E),T=h=void 0;d.length;)h=d.shift(),T=r.createElement("li"),C=h,C.is("pre")||f.test(C.getName())||"false"==C.getAttribute("contenteditable")?h.appendTo(T):(h.copyAttributes(T),p&&h.getDirection()&&(T.removeStyle("direction"),T.removeAttribute("dir")),h.moveChildren(T),h.remove()),T.appendTo(E);p&&m&&E.setAttribute("dir",p),v?E.insertBefore(v):E.appendTo(l)}}else this.state==CKEDITOR.TRISTATE_ON&&s[p.root.getName()]&&e.call(this,t,p,c);for(E=0;ECKEDITOR.env.version?r.createText("\r"):r.createElement("br"),i.deleteContents(),i.insertNode(e),CKEDITOR.env.needsBrFiller?(r.createText("\ufeff").insertAfter(e),a&&(u||c.blockLimit).appendBogus(),e.getNext().$.nodeValue="",i.setStartAt(e.getNext(),CKEDITOR.POSITION_AFTER_START)):i.setStartAt(e,CKEDITOR.POSITION_AFTER_END)),i.collapse(!0),i.select(),i.scrollIntoView()):s(e,n,i,o)}}};var r=CKEDITOR.plugins.enterkey,a=r.enterBr,s=r.enterBlock,l=/^h[1-6]$/}(),function(){function e(e,t){var n={},i=[],o={nbsp:" ",shy:"­",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'};if(e=e.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(e,r){var a=t?"&"+r+";":o[r];return n[a]=t?o[r]:"&"+r+";",i.push(a),""}),!t&&e){e=e.split(",");var r,a=document.createElement("div");for(a.innerHTML="&"+e.join(";&")+";",r=a.innerHTML,a=null,a=0;at&&(t=640),420>n&&(n=420);var o=parseInt((window.screen.height-n)/2,10),r=parseInt((window.screen.width-t)/2,10);i=(i||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+t+",height="+n+",top="+o+",left="+r;var a=window.open("",null,i,!0);if(!a)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(a.moveTo(r,o),a.resizeTo(t,n)),a.focus(),a.location.href=e}catch(s){window.open(e,null,i,!0)}return!0}}),function(){function e(e,t){var n=[];if(!t)return e;for(var i in t)n.push(i+"="+encodeURIComponent(t[i]));return e+(-1!=e.indexOf("?")?"&":"?")+n.join("&")}function t(e){return e+="",e.charAt(0).toUpperCase()+e.substr(1)}function n(){var n=this.getDialog(),i=n.getParentEditor();i._.filebrowserSe=this;var o=i.config["filebrowser"+t(n.getName())+"WindowWidth"]||i.config.filebrowserWindowWidth||"80%",n=i.config["filebrowser"+t(n.getName())+"WindowHeight"]||i.config.filebrowserWindowHeight||"70%",r=this.filebrowser.params||{};r.CKEditor=i.name,r.CKEditorFuncNum=i._.filebrowserFn,r.langCode||(r.langCode=i.langCode),r=e(this.filebrowser.url,r),i.popup(r,o,n,i.config.filebrowserWindowFeatures||i.config.fileBrowserWindowFeatures)}function i(){var e=this.getDialog();return e.getParentEditor()._.filebrowserSe=this,!(!e.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value||!e.getContentElement(this["for"][0],this["for"][1]).getAction())}function o(t,n,i){var o=i.params||{};o.CKEditor=t.name,o.CKEditorFuncNum=t._.filebrowserFn,o.langCode||(o.langCode=t.langCode),n.action=e(i.url,o),n.filebrowser=i}function r(e,a,s,l){if(l&&l.length)for(var c,u=l.length;u--;)if(c=l[u],"hbox"!=c.type&&"vbox"!=c.type&&"fieldset"!=c.type||r(e,a,s,c.children),c.filebrowser)if("string"==typeof c.filebrowser&&(c.filebrowser={action:"fileButton"==c.type?"QuickUpload":"Browse",target:c.filebrowser}),"Browse"==c.filebrowser.action){var d=c.filebrowser.url;void 0===d&&(d=e.config["filebrowser"+t(a)+"BrowseUrl"],void 0===d&&(d=e.config.filebrowserBrowseUrl)),d&&(c.onClick=n,c.filebrowser.url=d,c.hidden=!1)}else if("QuickUpload"==c.filebrowser.action&&c["for"]&&(d=c.filebrowser.url,void 0===d&&(d=e.config["filebrowser"+t(a)+"UploadUrl"],void 0===d&&(d=e.config.filebrowserUploadUrl)),d)){var f=c.onClick;c.onClick=function(e){var t=e.sender;return(!f||!1!==f.call(t,e))&&(!!i.call(t,e)&&(e=t.getDialog().getContentElement(this["for"][0],this["for"][1]).getInputElement(),(t=new CKEDITOR.dom.element(e.$.form))&&((e=t.$.elements.ckCsrfToken)?e=new CKEDITOR.dom.element(e):(e=new CKEDITOR.dom.element("input"),e.setAttributes({name:"ckCsrfToken",type:"hidden"}),t.append(e)),e.setAttribute("value",CKEDITOR.tools.getCsrfToken())),!0))},c.filebrowser.url=d,c.hidden=!1,o(e,s.getContents(c["for"][0]).get(c["for"][1]),c.filebrowser)}}function a(e,t,n){if(-1!==n.indexOf(";")){n=n.split(";");for(var i=0;if.height-d.bottom?"pin":"bottom"),o=f.width/2,o=i.floatSpacePreferRight?"right":0u.width?"rtl"==i.contentsLangDirection?"right":"left":o-d.left>d.right-o?"left":"right",u.width>f.width?(o="left",E=0):(E="left"==o?0f.width&&(o="left"==o?"right":"left",E=0)),s.setStyle(o,n(("pin"==l?v:m)+E+("pin"==l?0:"left"==o?p:-p)))):(l="pin",a("pin"),r(o))}}}();if(o){var a=new CKEDITOR.template('
"+(e.title?'{voiceLabel}':" ")+'
'),s=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(a.output({content:o,id:e.id,langDir:e.lang.dir,langCode:e.langCode,name:e.name,style:"display:none;z-index:"+(i.baseFloatZIndex-1),topId:e.ui.spaceId("top"),voiceLabel:e.title}))),l=CKEDITOR.tools.eventsBuffer(500,r),c=CKEDITOR.tools.eventsBuffer(100,r);s.unselectable(),s.on("mousedown",function(e){e=e.data,e.getTarget().hasAscendant("a",1)||e.preventDefault()}),e.on("focus",function(n){r(n),e.on("change",l.input),t.on("scroll",c.input),t.on("resize",c.input)}),e.on("blur",function(){s.hide(),e.removeListener("change",l.input),t.removeListener("scroll",c.input),t.removeListener("resize",c.input)}),e.on("destroy",function(){t.removeListener("scroll",c.input),t.removeListener("resize",c.input),s.clearCustomData(),s.remove()}),e.focusManager.hasFocus&&s.show(),e.focusManager.add(s,1)}}var t=CKEDITOR.document.getWindow(),n=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(t){t.on("loaded",function(){e(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=CKEDITOR.addTemplate("panel-list",''),t=CKEDITOR.addTemplate("panel-list-item",''),n=CKEDITOR.addTemplate("panel-list-group",'

{label}

'),i=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(e,t){return this.addBlock(e,new CKEDITOR.ui.listBlock(this.getHolderElement(),t))},CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(e,t){t=t||{};var n=t.attributes||(t.attributes={});(this.multiSelect=!!t.multiSelect)&&(n["aria-multiselectable"]=!0),!n.role&&(n.role="listbox"),this.base.apply(this,arguments),this.element.setAttribute("role",n.role),n=this.keys,n[40]="next",n[9]="next",n[38]="prev",n[CKEDITOR.SHIFT+9]="prev",n[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(n[13]="mouseup"),this._.pendingHtml=[],this._.pendingList=[],this._.items={},this._.groups={}},_:{close:function(){if(this._.started){var t=e.output({items:this._.pendingList.join("")});this._.pendingList=[],this._.pendingHtml.push(t),delete this._.started}},getClick:function(){return this._.click||(this._.click=CKEDITOR.tools.addFunction(function(e){var t=this.toggle(e);this.onClick&&this.onClick(e,t)},this)),this._.click}},proto:{add:function(e,n,o){var r=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0),this._.items[e]=r;var a;a=CKEDITOR.tools.htmlEncodeAttr(e).replace(i,"\\'"),e={id:r,val:a,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(o||e),text:n||e},this._.pendingList.push(t.output(e))},startGroup:function(e){this._.close();var t=CKEDITOR.tools.getNextId();this._.groups[e]=t,this._.pendingHtml.push(n.output({id:t,label:e}))},commit:function(){this._.close(),this.element.appendHtml(this._.pendingHtml.join("")),delete this._.size,this._.pendingHtml=[]},toggle:function(e){var t=this.isMarked(e);return t?this.unmark(e):this.mark(e),!t},hideGroup:function(e){var t=(e=this.element.getDocument().getById(this._.groups[e]))&&e.getNext();e&&(e.setStyle("display","none"),t&&"ul"==t.getName()&&t.setStyle("display","none"))},hideItem:function(e){this.element.getDocument().getById(this._.items[e]).setStyle("display","none")},showAll:function(){var e,t=this._.items,n=this._.groups,i=this.element.getDocument();for(e in t)i.getById(t[e]).setStyle("display","");for(var o in n)t=i.getById(n[o]),e=t.getNext(),t.setStyle("display",""),e&&"ul"==e.getName()&&e.setStyle("display","")},mark:function(e){this.multiSelect||this.unmarkAll(),e=this._.items[e];var t=this.element.getDocument().getById(e);t.addClass("cke_selected"),this.element.getDocument().getById(e+"_option").setAttribute("aria-selected",!0),this.onMark&&this.onMark(t)},unmark:function(e){var t=this.element.getDocument();e=this._.items[e];var n=t.getById(e);n.removeClass("cke_selected"),t.getById(e+"_option").removeAttribute("aria-selected"),this.onUnmark&&this.onUnmark(n)},unmarkAll:function(){var e,t=this._.items,n=this.element.getDocument();for(e in t){var i=t[e];n.getById(i).removeClass("cke_selected"),n.getById(i+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(e){return this.element.getDocument().getById(this._.items[e]).hasClass("cke_selected")},focus:function(e){this._.focusIndex=-1;var t,n=this.element.getElementsByTag("a"),i=-1;if(e){for(t=this.element.getDocument().getById(this._.items[e]).getFirst();e=n.getItem(++i);)if(e.equals(t)){this._.focusIndex=i;break}}else this.element.focus();t&&setTimeout(function(){t.focus()},0)}}})}}),function(){var e=' {label}{arrowHtml}',t=CKEDITOR.addTemplate("buttonArrow",''+(CKEDITOR.env.hc?"▼":"")+""),n=CKEDITOR.addTemplate("button",e); CKEDITOR.plugins.add("button",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}}),CKEDITOR.UI_BUTTON="button",CKEDITOR.ui.button=function(e){CKEDITOR.tools.extend(this,e,{title:e.label,click:e.click||function(t){t.execCommand(e.command)}}),this._={}},CKEDITOR.ui.button.handler={create:function(e){return new CKEDITOR.ui.button(e)}},CKEDITOR.ui.button.prototype={render:function(e,i){function o(){var t=e.mode;t&&(t=this.modes[t]?void 0!==p[t]?p[t]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,t=e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t,this.setState(t),this.refresh&&this.refresh())}var r,a=CKEDITOR.env,s=this._.id=CKEDITOR.tools.getNextId(),l="",c=this.command;this._.editor=e;var u={id:s,button:this,editor:e,focus:function(){CKEDITOR.document.getById(s).focus()},execute:function(){this.button.click(e)},attach:function(e){this.button.attach(e)}},d=CKEDITOR.tools.addFunction(function(e){if(u.onkey)return e=new CKEDITOR.dom.event(e),!1!==u.onkey(u,e.getKeystroke())}),f=CKEDITOR.tools.addFunction(function(e){var t;return u.onfocus&&(t=!1!==u.onfocus(u,new CKEDITOR.dom.event(e))),t}),h=0;if(u.clickFn=r=CKEDITOR.tools.addFunction(function(){h&&(e.unlockSelection(1),h=0),u.execute(),a.iOS&&e.focus()}),this.modes){var p={};e.on("beforeModeUnload",function(){e.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(p[e.mode]=this._.state)},this),e.on("activeFilterChange",o,this),e.on("mode",o,this),!this.readOnly&&e.on("readOnly",o,this)}else c&&(c=e.getCommand(c))&&(c.on("state",function(){this.setState(c.state)},this),l+=c.state==CKEDITOR.TRISTATE_ON?"on":c.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");this.directional&&e.on("contentDirChanged",function(t){var n=CKEDITOR.document.getById(this._.id),i=n.getFirst();t=t.data,t!=e.lang.dir?n.addClass("cke_"+t):n.removeClass("cke_ltr").removeClass("cke_rtl"),i.setAttribute("style",CKEDITOR.skin.getIconStyle(g,"rtl"==t,this.icon,this.iconOffset))},this),c||(l+="off");var m=this.name||this.command,g=m;return this.icon&&!/\./.test(this.icon)&&(g=this.icon,this.icon=null),l={id:s,name:m,iconName:g,label:this.label,cls:this.className||"",state:l,ariaDisabled:"disabled"==l?"true":"false",title:this.title,titleJs:a.gecko&&!a.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:d,focusFn:f,clickFn:r,style:CKEDITOR.skin.getIconStyle(g,"rtl"==e.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow?t.output():""},n.output(l,i),this.onRender&&this.onRender(),u},setState:function(e){if(this._.state==e)return!1;this._.state=e;var t=CKEDITOR.document.getById(this._.id);return!!t&&(t.setState(e,"cke_button"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),this.hasArrow?(e=e==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(e)):e==CKEDITOR.TRISTATE_ON?t.setAttribute("aria-pressed",!0):t.removeAttribute("aria-pressed"),!0)},getState:function(){return this._.state},toFeature:function(e){if(this._.feature)return this._.feature;var t=this;return this.allowedContent||this.requiredContent||!this.command||(t=e.getCommand(this.command)||t),this._.feature=t}},CKEDITOR.ui.prototype.addButton=function(e,t){this.add(e,CKEDITOR.UI_BUTTON,t)}}(),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var e='{label}{label}'+(CKEDITOR.env.hc?"▼":CKEDITOR.env.air?" ":"")+""),t=CKEDITOR.addTemplate("combo",e);CKEDITOR.UI_RICHCOMBO="richcombo",CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(e){CKEDITOR.tools.extend(this,e,{canGroup:!1,title:e.label,modes:{wysiwyg:1},editorFocus:1}),e=this.panel||{},delete this.panel,this.id=CKEDITOR.tools.getNextNumber(),this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document,e.className="cke_combopanel",e.block={multiSelect:e.multiSelect,attributes:e.attributes},e.toolbarRelated=!0,this._={panelDefinition:e,items:{}}},proto:{renderHtml:function(e){var t=[];return this.render(e,t),t.join("")},render:function(e,n){function i(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var t=this.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;e.readOnly&&!this.readOnly&&(t=CKEDITOR.TRISTATE_DISABLED),this.setState(t),this.setValue(""),t!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var o=CKEDITOR.env,r="cke_"+this.id,a=CKEDITOR.tools.addFunction(function(t){d&&(e.unlockSelection(1),d=0),l.execute(t)},this),s=this,l={id:r,combo:this,focus:function(){CKEDITOR.document.getById(r).getChild(1).focus()},execute:function(t){var n=s._;if(n.state!=CKEDITOR.TRISTATE_DISABLED)if(s.createPanel(e),n.on)n.panel.hide();else{s.commit();var i=s.getValue();i?n.list.mark(i):n.list.unmarkAll(),n.panel.showBlock(s.id,new CKEDITOR.dom.element(t),4)}},clickFn:a};e.on("activeFilterChange",i,this),e.on("mode",i,this),e.on("selectionChange",i,this),!this.readOnly&&e.on("readOnly",i,this);var c=CKEDITOR.tools.addFunction(function(t,n){t=new CKEDITOR.dom.event(t);var i=t.getKeystroke();switch(40==i&&e.once("panelShow",function(e){e.data._.panel._.currentBlock.onKeyDown(40)}),i){case 13:case 32:case 40:CKEDITOR.tools.callFunction(a,n);break;default:l.onkey(l,i)}t.preventDefault()}),u=CKEDITOR.tools.addFunction(function(){l.onfocus&&l.onfocus()}),d=0;return l.keyDownFn=c,o={id:r,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:o.gecko&&!o.hc?"":(this.title||"").replace("'",""),keydownFn:c,focusFn:u,clickFn:a},t.output(o,n),this.onRender&&this.onRender(),l},createPanel:function(e){if(!this._.panel){var t=this._.panelDefinition,n=this._.panelDefinition.block,i=t.parent||CKEDITOR.document.getBody(),o="cke_combopanel__"+this.name,r=new CKEDITOR.ui.floatPanel(e,i,t),a=r.addListBlock(this.id,n),s=this;r.onShow=function(){this.element.addClass(o),s.setState(CKEDITOR.TRISTATE_ON),s._.on=1,s.editorFocus&&!e.focusManager.hasFocus&&e.focus(),s.onOpen&&s.onOpen(),e.once("panelShow",function(){a.focus(!a.multiSelect&&s.getValue())})},r.onHide=function(t){this.element.removeClass(o),s.setState(s.modes&&s.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),s._.on=0,!t&&s.onClose&&s.onClose()},r.onEscape=function(){r.hide(1)},a.onClick=function(e,t){s.onClick&&s.onClick.call(s,e,t),r.hide()},this._.panel=r,this._.list=a,r.getBlock(this.id).onHide=function(){s._.on=0,s.setState(CKEDITOR.TRISTATE_OFF)},this.init&&this.init()}},setValue:function(e,t){this._.value=e;var n=this.document.getById("cke_"+this.id+"_text");n&&(e||t?n.removeClass("cke_combo_inlinelabel"):(t=this.label,n.addClass("cke_combo_inlinelabel")),n.setText("undefined"!=typeof t?t:e))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,t,n){this._.items[e]=n||e,this._.list.add(e,t,n)},startGroup:function(e){this._.list.startGroup(e)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this)),this._.committed=1},setState:function(e){if(this._.state!=e){var t=this.document.getById("cke_"+this.id);t.setState(e,"cke_combo"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),this._.state=e}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(e){return new CKEDITOR.ui.richCombo(e)}}}}),CKEDITOR.ui.prototype.addRichCombo=function(e,t){this.add(e,CKEDITOR.UI_RICHCOMBO,t)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(e){if(!e.blockless){for(var t=e.config,n=e.lang.format,i=t.format_tags.split(";"),o={},r=0,a=[],s=0;s",this.lineBreakChars="\n",this.sortAttributes=1,this._.indent=0,this._.indentation="",this._.inPre=0,this._.rules={};var e,t=CKEDITOR.dtd;for(e in CKEDITOR.tools.extend({},t.$nonBodyContent,t.$block,t.$listItem,t.$tableContent))this.setRules(e,{indent:!t[e]["#"],breakBeforeOpen:1,breakBeforeClose:!t[e]["#"],breakAfterClose:1,needsSpace:e in t.$block&&!(e in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1}),this.setRules("title",{indent:0,breakAfterOpen:0}),this.setRules("style",{indent:0,breakBeforeClose:1}),this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(e){var t=this._.rules[e];this._.afterCloser&&t&&t.needsSpace&&this._.needsSpace&&this._.output.push("\n"),this._.indent?this.indentation():t&&t.breakBeforeOpen&&(this.lineBreak(),this.indentation()),this._.output.push("<",e),this._.afterCloser=0},openTagClose:function(e,t){var n=this._.rules[e];t?(this._.output.push(this.selfClosingEnd),n&&n.breakAfterClose&&(this._.needsSpace=n.needsSpace)):(this._.output.push(">"),n&&n.indent&&(this._.indentation+=this.indentationChars)),n&&n.breakAfterOpen&&this.lineBreak(),"pre"==e&&(this._.inPre=1)},attribute:function(e,t){"string"==typeof t&&(this.forceSimpleAmpersand&&(t=t.replace(/&/g,"&")),t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){var t=this._.rules[e];t&&t.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length)),this._.indent?this.indentation():t&&t.breakBeforeClose&&(this.lineBreak(),this.indentation()),this._.output.push(""),"pre"==e&&(this._.inPre=0),t&&t.breakAfterClose&&(this.lineBreak(),this._.needsSpace=t.needsSpace),this._.afterCloser=1},text:function(e){this._.indent&&(this.indentation(),!this._.inPre&&(e=CKEDITOR.tools.ltrim(e))),this._.output.push(e)},comment:function(e){this._.indent&&this.indentation(),this._.output.push("")},lineBreak:function(){!this._.inPre&&0t&&e',t),i=CKEDITOR.getUrl(this.path+"images/"+(k.hidpi?"hidpi/":"")+"icon"+(e.rtl?"-rtl":"")+".png");for(I(n,{attach:function(){return this.wrap.getParent()||this.wrap.appendTo(e.editable,!0),this},lineChildren:[I(R('',t),{base:V+"height:17px;width:17px;"+(e.rtl?"left":"right")+":17px;background:url("+i+") center no-repeat "+e.boxColor+";cursor:pointer;"+(k.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(k.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px; border-radius: 2px;","top:-17px; border-radius: 2px 2px 0px 0px;","top:-1px; border-radius: 0px 0px 2px 2px;"]}),I(R(U,t),{base:z+"left:0px;border-left-color:"+e.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px","border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),I(R(U,t),{base:z+"right:0px;border-right-color:"+e.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){return this.wrap.getParent()&&this.wrap.remove(),this},mouseNear:function(){C(e,this);var t=e.holdDistance,n=this.size;return!!(n&&r(e.mouse.y,n.top-t,n.bottom+t)&&r(e.mouse.x,n.left-t,n.right+t))},place:function(){var t=e.view,n=e.editable,i=e.trigger,o=i.upper,a=i.lower,s=o||a,l=s.getParent(),c={};this.trigger=i,o&&C(e,o,!0),a&&C(e,a,!0),C(e,l,!0),e.inInlineMode&&y(e,!0),l.equals(n)?(c.left=t.scroll.x,c.right=-t.scroll.x,c.width=""):(c.left=s.size.left-s.size.margin.left+t.scroll.x-(e.inInlineMode?t.editable.left+t.editable.border.left:0),c.width=s.size.outerWidth+s.size.margin.left+s.size.margin.right+t.scroll.x,c.right=""),o&&a?c.top=o.size.margin.bottom===a.size.margin.top?0|o.size.bottom+o.size.margin.bottom/2:o.size.margin.bottomk.version?" ":B,o=e.hotNode&&e.hotNode.getText()==i&&e.element.equals(e.hotNode)&&e.lastCmdDirection===!!t;l(e,function(i){o&&e.hotNode&&e.hotNode.remove(),i[t?"insertAfter":"insertBefore"](n),i.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!t}),e.lastCmdDirection=!!t}),k.ie||e.enterMode==CKEDITOR.ENTER_BR||e.hotNode.scrollIntoView(),e.line.detach()}return function(r){r=r.getSelection().getStartElement();var s;if(r=r.getAscendant(H,1),!m(e,r)&&r&&!r.equals(e.editable)&&!r.contains(e.editable)){(s=a(r))&&"false"==s.getAttribute("contenteditable")&&(r=s),e.element=r,s=o(e,r,!t);var l;d(s)&&s.is(e.triggers)&&s.is(j)&&(!o(e,s,!t)||(l=o(e,s,!t))&&d(l)&&l.is(e.triggers))?i(s):(l=n(e,r),d(l)&&(o(e,l,!t)?(r=o(e,l,!t))&&d(r)&&r.is(e.triggers)&&i(l):i(l)))}}}()}}function u(e,t){if(!t||t.type!=CKEDITOR.NODE_ELEMENT||!t.$)return!1;var n=e.line;return n.wrap.equals(t)||n.wrap.contains(t)}function d(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.$}function f(e){if(!d(e))return!1;var t;return(t=h(e))||(d(e)?(t={left:1,right:1,center:1},t=!(!t[e.getComputedStyle("float")]&&!t[e.getAttribute("align")])):t=!1),t}function h(e){return!!{absolute:1,fixed:1}[e.getComputedStyle("position")]}function p(e,t){return d(t)?t.is(e.triggers):null}function m(e,t){if(!t)return!1;for(var n=t.getParents(1),i=n.length;i--;)for(var o=e.tabuList.length;o--;)if(n[i].hasAttribute(e.tabuList[o]))return!0;return!1}function g(e,t,n){return!!(t=t[n?"getLast":"getFirst"](function(t){return e.isRelevant(t)&&!t.is($)}))&&(C(e,t),n?t.size.top>e.mouse.y:t.size.bottom(e.inInlineMode?o.editable.top+o.editable.height/2:Math.min(o.editable.height,o.pane.height)/2),n=n[s?"getLast":"getFirst"](function(e){return!(G(e)||X(e))});return n?(u(e,n)&&(n=e.line.wrap[s?"getPrevious":"getNext"](function(e){return!(G(e)||X(e))})),d(n)&&!f(n)&&p(e,n)?(C(e,n),!s&&0<=n.size.top&&r(i.y,0,n.size.top+a)?(e=e.inInlineMode||0===o.scroll.y?P:F,new t([null,n,w,A,e])):s&&n.size.bottom<=o.pane.height&&r(i.y,n.size.bottom-a,o.pane.height)?(e=e.inInlineMode||r(n.size.bottom,o.pane.height-a,o.pane.height)?L:F,new t([n,null,S,A,e])):null):null):null}function E(e){var i=e.mouse,a=e.view,s=e.triggerOffset,l=n(e);if(!l)return null;C(e,l);var c,u,s=Math.min(s,0|l.size.outerHeight/2),h=[];if(r(i.y,l.size.top-1,l.size.top+s))u=!1;else{if(!r(i.y,l.size.bottom-s,l.size.bottom+1))return null;u=!0}if(f(l)||g(e,l,u)||l.getParent().is(M))return null;var m=o(e,l,!u);if(m){if(m&&m.type==CKEDITOR.NODE_TEXT)return null;if(d(m)){if(f(m)||!p(e,m)||m.getParent().is(M))return null;h=[m,l][u?"reverse":"concat"]().concat([N,A])}}else l.equals(e.editable[u?"getLast":"getFirst"](e.isRelevant))?(y(e),u&&r(i.y,l.size.bottom-s,a.pane.height)&&r(l.size.bottom,a.pane.height-s,a.pane.height)?c=L:r(i.y,0,l.size.top+s)&&(c=P)):c=F,h=[null,l][u?"reverse":"concat"]().concat([u?S:w,A,c,l.equals(e.editable[u?"getLast":"getFirst"](e.isRelevant))?u?L:P:F]);return 0 in h?new t(h):null}function T(e,t,n,i){for(var o=t.getDocumentPosition(),r={},a={},s={},l={},c=Z.length;c--;)r[Z[c]]=parseInt(t.getComputedStyle.call(t,"border-"+Z[c]+"-width"),10)||0,s[Z[c]]=parseInt(t.getComputedStyle.call(t,"padding-"+Z[c]),10)||0,a[Z[c]]=parseInt(t.getComputedStyle.call(t,"margin-"+Z[c]),10)||0;return n&&!i||b(e,i),l.top=o.y-(n?0:e.view.scroll.y),l.left=o.x-(n?0:e.view.scroll.x),l.outerWidth=t.$.offsetWidth,l.outerHeight=t.$.offsetHeight,l.height=l.outerHeight-(s.top+s.bottom+r.top+r.bottom),l.width=l.outerWidth-(s.left+s.right+r.left+r.right),l.bottom=l.top+l.outerHeight,l.right=l.left+l.outerWidth,e.inInlineMode&&(l.scroll={top:t.$.scrollTop,left:t.$.scrollLeft}),I({border:r,padding:s,margin:a,ignoreScroll:n},l,!0)}function C(e,t,n){if(!d(t))return t.size=null;if(t.size){if(t.size.ignoreScroll==n&&t.size.date>new Date-q)return null}else t.size={};return I(t.size,T(e,t,n),{date:+new Date},!0)}function y(e,t){e.view.editable=T(e,e.editable,t,!0)}function b(e,t){e.view||(e.view={});var n=e.view;if(!(!t&&n&&n.date>new Date-q)){var i=e.win,n=i.getScrollPosition(),i=i.getViewPaneSize();I(e.view,{scroll:{x:n.x,y:n.y,width:e.doc.$.documentElement.scrollWidth-i.width,height:e.doc.$.documentElement.scrollHeight-i.height},pane:{width:i.width,height:i.height,bottom:i.height+n.y},date:+new Date},!0)}}function O(e,n,i,o){for(var r=o,a=o,s=0,l=!1,c=!1,u=e.view.pane.height,d=e.mouse;d.y+si.left-o.x&&ni.top-o.y&&tCKEDITOR.env.version,K=CKEDITOR.dtd,x={},w=128,S=64,N=32,A=16,P=4,L=2,F=1,B=" ",M=K.$listItem,$=K.$tableContent,j=I({},K.$nonEditable,K.$empty),H=K.$block,q=100,V="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",z=V+"border-color:transparent;display:block;border-style:solid;",U=""+B+"";x[CKEDITOR.ENTER_BR]="br",x[CKEDITOR.ENTER_P]="p",x[CKEDITOR.ENTER_DIV]="div",t.prototype={set:function(e,t,n){return this.properties=e+t+(n||F),this},is:function(e){return(this.properties&e)==e}};var W=function(){function e(e,t){var n=e.$.elementFromPoint(t.x,t.y);return n&&n.nodeType?new CKEDITOR.dom.element(n):null}return function(t,n,i){if(!t.mouse)return null;var o=t.doc,r=t.line.wrap;i=i||t.mouse;var a=e(o,i);return n&&u(t,a)&&(r.hide(),a=e(o,i),r.show()),!a||a.type!=CKEDITOR.NODE_ELEMENT||!a.$||k.ie&&9>k.version&&!t.boundary.equals(a)&&!t.boundary.contains(a)?null:a}}(),G=CKEDITOR.dom.walker.whitespaces(),X=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),Y=function(){function t(t){var o,a,s,l=t.element;if(!d(l)||l.contains(t.editable)||l.isReadOnly())return null;if(s=O(t,function(e,t){return!t.equals(e)},function(e,t){return W(e,!0,t)},l),o=s.upper,a=s.lower,e(t,o,a))return s.set(N,8);if(o&&l.contains(o))for(;!o.getParent().equals(l);)o=o.getParent();else o=l.getFirst(function(e){return n(t,e)});if(a&&l.contains(a))for(;!a.getParent().equals(l);)a=a.getParent();else a=l.getLast(function(e){return n(t,e)});if(!o||!a)return null;if(C(t,o),C(t,a),!r(t.mouse.y,o.size.top,a.size.bottom))return null;for(var c,u,f,h,l=Number.MAX_VALUE;a&&!a.equals(o)&&(u=o.getNext(t.isRelevant));)c=Math.abs(i(t,o,u)-t.mouse.y),cs.width&&(i.resize_minWidth=s.width),i.resize_minHeight>s.height&&(i.resize_minHeight=s.height),CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),e.document&&(e.document.on("mousemove",t),e.document.on("mouseup",n)),o.preventDefault&&o.preventDefault()});e.on("destroy",function(){CKEDITOR.tools.removeFunction(d)}),e.on("uiSpace",function(t){if("bottom"==t.data.space){var n="";c&&!u&&(n=" cke_resizer_horizontal"),!c&&u&&(n=" cke_resizer_vertical");var i=''+("ltr"==r?"◢":"◣")+"";"ltr"==r&&"ltr"==n?t.data.html+=i:t.data.html=i+t.data.html}},e,null,100),e.on("maximize",function(t){e.ui.space("resizer")[t.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var e=function(e){var t=this._,n=t.menu;t.state!==CKEDITOR.TRISTATE_DISABLED&&(t.on&&n?n.hide():(t.previousState=t.state,n||(n=t.menu=new CKEDITOR.menu(e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.common.options}}}),n.onHide=CKEDITOR.tools.bind(function(){var n=this.command?e.getCommand(this.command).modes:this.modes;this.setState(!n||n[e.mode]?t.previousState:CKEDITOR.TRISTATE_DISABLED),t.on=0},this),this.onMenu&&n.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),t.on=1,setTimeout(function(){n.show(CKEDITOR.document.getById(t.id),4)},0)))};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(t){delete t.panel,this.base(t),this.hasArrow=!0,this.click=e},statics:{handler:{create:function(e){return new CKEDITOR.ui.menuButton(e)}}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton",CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",tabToOpen:null,dialogName:"scaytDialog",init:function(e){var t=this,n=CKEDITOR.plugins.scayt;this.bindEvents(e),this.parseConfig(e),this.addRule(e),CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+"dialogs/options.js")),this.addMenuItems(e);var i=e.lang.scayt,o=CKEDITOR.env;e.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:i.text_title,title:e.plugins.wsc?e.lang.wsc.title:i.text_title,modes:{wysiwyg:!(o.ie&&(8>o.version||o.quirks))},toolbar:"spellchecker,20",refresh:function(){var t=e.ui.instances.Scayt.getState();e.scayt&&(t=n.state.scayt[e.name]?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),e.fire("scaytButtonState",t)},onRender:function(){var t=this;e.on("scaytButtonState",function(e){void 0!==typeof e.data&&t.setState(e.data)})},onMenu:function(){var t=e.scayt;return e.getMenuItem("scaytToggle").label=e.lang.scayt[t&&n.state.scayt[e.name]?"btn_disable":"btn_enable"],t={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:e.plugins.wsc?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED},e.config.scayt_uiTabs[0]||delete t.scaytOptions,e.config.scayt_uiTabs[1]||delete t.scaytLangs,e.config.scayt_uiTabs[2]||delete t.scaytDict,t}}),e.contextMenu&&e.addMenuItems&&(e.contextMenu.addListener(function(n,i){var o,r,a=e.scayt;return a&&(r=a.getSelectionNode())&&(o=t.menuGenerator(e,r),a.showBanner("."+e.contextMenu._.definition.panel.className.split(" ").join(" ."))),o}),e.contextMenu._.onHide=CKEDITOR.tools.override(e.contextMenu._.onHide,function(t){return function(){var n=e.scayt;return n&&n.hideBanner(),t.apply(this)}}))},addMenuItems:function(e){var t=this,n=CKEDITOR.plugins.scayt;e.addMenuGroup("scaytButton");for(var i=e.config.scayt_contextMenuItemsOrder.split("|"),o=0;oe.config.scayt_maxSuggestions)&&(e.config.scayt_maxSuggestions=5),(void 0===e.config.scayt_minWordLength||"number"!=typeof e.config.scayt_minWordLength||1>e.config.scayt_minWordLength)&&(e.config.scayt_minWordLength=4),void 0!==e.config.scayt_customDictionaryIds&&"string"==typeof e.config.scayt_customDictionaryIds||(e.config.scayt_customDictionaryIds=""),void 0!==e.config.scayt_userDictionaryName&&"string"==typeof e.config.scayt_userDictionaryName||(e.config.scayt_userDictionaryName=null),"string"==typeof e.config.scayt_uiTabs&&3===e.config.scayt_uiTabs.split(",").length){var n=[],i=[];e.config.scayt_uiTabs=e.config.scayt_uiTabs.split(","),CKEDITOR.tools.search(e.config.scayt_uiTabs,function(e){1===Number(e)||0===Number(e)?(i.push(!0),n.push(Number(e))):i.push(!1)}),null===CKEDITOR.tools.search(i,!1)?e.config.scayt_uiTabs=n:e.config.scayt_uiTabs=[1,1,1]}else e.config.scayt_uiTabs=[1,1,1];if("string"!=typeof e.config.scayt_serviceProtocol&&(e.config.scayt_serviceProtocol=null),"string"!=typeof e.config.scayt_serviceHost&&(e.config.scayt_serviceHost=null),"string"!=typeof e.config.scayt_servicePort&&(e.config.scayt_servicePort=null),"string"!=typeof e.config.scayt_servicePath&&(e.config.scayt_servicePath=null),e.config.scayt_moreSuggestions||(e.config.scayt_moreSuggestions="on"),"string"!=typeof e.config.scayt_customerId&&(e.config.scayt_customerId="1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2"),"string"!=typeof e.config.scayt_srcUrl&&(t=document.location.protocol,t=-1!=t.search(/https?:/)?t:"http:",e.config.scayt_srcUrl=t+"//svc.webspellchecker.net/spellcheck31/lf/scayt3/ckscayt/ckscayt.js"),"boolean"!=typeof CKEDITOR.config.scayt_handleCheckDirty&&(CKEDITOR.config.scayt_handleCheckDirty=!0),"boolean"!=typeof CKEDITOR.config.scayt_handleUndoRedo&&(CKEDITOR.config.scayt_handleUndoRedo=!0),CKEDITOR.config.scayt_handleUndoRedo=!!CKEDITOR.plugins.undo&&CKEDITOR.config.scayt_handleUndoRedo,"boolean"!=typeof e.config.scayt_multiLanguageMode&&(e.config.scayt_multiLanguageMode=!1),"object"!=typeof e.config.scayt_multiLanguageStyles&&(e.config.scayt_multiLanguageStyles={}),e.config.scayt_ignoreAllCapsWords&&"boolean"!=typeof e.config.scayt_ignoreAllCapsWords&&(e.config.scayt_ignoreAllCapsWords=!1),e.config.scayt_ignoreDomainNames&&"boolean"!=typeof e.config.scayt_ignoreDomainNames&&(e.config.scayt_ignoreDomainNames=!1), e.config.scayt_ignoreWordsWithMixedCases&&"boolean"!=typeof e.config.scayt_ignoreWordsWithMixedCases&&(e.config.scayt_ignoreWordsWithMixedCases=!1),e.config.scayt_ignoreWordsWithNumbers&&"boolean"!=typeof e.config.scayt_ignoreWordsWithNumbers&&(e.config.scayt_ignoreWordsWithNumbers=!1),e.config.scayt_disableOptionsStorage){var t=CKEDITOR.tools.isArray(e.config.scayt_disableOptionsStorage)?e.config.scayt_disableOptionsStorage:"string"==typeof e.config.scayt_disableOptionsStorage?[e.config.scayt_disableOptionsStorage]:void 0,o="all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers".split(" "),r=["lang","ignore-all-caps-words","ignore-domain-names","ignore-words-with-mixed-cases","ignore-words-with-numbers"],a=CKEDITOR.tools.search,s=CKEDITOR.tools.indexOf;e.config.scayt_disableOptionsStorage=function(e){for(var t=[],n=0;n tr > td, .%1 table.%2 > tr > th,;.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,;.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,;.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g,"cke_show_border").replace(/%1/g,"cke_show_borders "),CKEDITOR.addCss(e)},init:function(t){var n=t.addCommand("showborders",e);n.canUndo=!1,!1!==t.config.startupShowBorders&&n.setState(CKEDITOR.TRISTATE_ON),t.on("mode",function(){n.state!=CKEDITOR.TRISTATE_DISABLED&&n.refresh(t)},null,null,100),t.on("contentDom",function(){n.state!=CKEDITOR.TRISTATE_DISABLED&&n.refresh(t)}),t.on("removeFormatCleanup",function(e){e=e.data,t.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&e.is("table")&&(!e.hasAttribute("border")||0>=parseInt(e.getAttribute("border"),10))&&e.addClass("cke_show_border")})},afterInit:function(e){var t=e.dataProcessor;e=t&&t.dataFilter,t=t&&t.htmlFilter,e&&e.addRules({elements:{table:function(e){e=e.attributes;var t=e["class"],n=parseInt(e.border,10);n&&!(0>=n)||t&&-1!=t.indexOf("cke_show_border")||(e["class"]=(t||"")+" cke_show_border")}}}),t&&t.addRules({elements:{table:function(e){e=e.attributes;var t=e["class"];t&&(e["class"]=t.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}}),CKEDITOR.on("dialogDefinition",function(e){var t=e.data.name;"table"!=t&&"tableProperties"!=t||(e=e.data.definition,t=e.getContents("info").get("txtBorder"),t.commit=CKEDITOR.tools.override(t.commit,function(e){return function(t,n){e.apply(this,arguments);var i=parseInt(this.getValue(),10);n[!i||0>=i?"addClass":"removeClass"]("cke_show_border")}}),(e=(e=e.getContents("advanced"))&&e.get("advCSSClasses"))&&(e.setup=CKEDITOR.tools.override(e.setup,function(e){return function(){e.apply(this,arguments),this.setValue(this.getValue().replace(/cke_show_border/,""))}}),e.commit=CKEDITOR.tools.override(e.commit,function(e){return function(t,n){e.apply(this,arguments),parseInt(n.getAttribute("border"),10)||n.addClass("cke_show_border")}})))})}(),function(){CKEDITOR.plugins.add("sourcearea",{init:function(t){function n(){var e=o&&this.equals(CKEDITOR.document.getActive());this.hide(),this.setStyle("height",this.getParent().$.clientHeight+"px"),this.setStyle("width",this.getParent().$.clientWidth+"px"),this.show(),e&&this.focus()}if(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var i=CKEDITOR.plugins.sourcearea;t.addMode("source",function(i){var o=t.ui.space("contents").getDocument().createElement("textarea");o.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",t.config.sourceAreaTabSize||4))),o.setAttribute("dir","ltr"),o.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu"),t.ui.space("contents").append(o),o=t.editable(new e(t,o)),o.setData(t.getData(1)),CKEDITOR.env.ie&&(o.attachListener(t,"resize",n,o),o.attachListener(CKEDITOR.document.getWindow(),"resize",n,o),CKEDITOR.tools.setTimeout(n,0,o)),t.fire("ariaWidget",this),i()}),t.addCommand("source",i.commands.source),t.ui.addButton&&t.ui.addButton("Source",{label:t.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"}),t.on("mode",function(){t.getCommand("source").setState("source"==t.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var o=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var e=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(e){this.setValue(e),this.status="ready",this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(e){this[(e?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){e.baseProto.detach.call(this),this.clearCustomData(),this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(e){"wysiwyg"==e.mode&&e.fire("saveSnapshot"),e.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED),e.setMode("source"==e.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(e){var t=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js"),e.addCommand("specialchar",{exec:function(){var n=e.langCode,n=t.availableLangs[n]?n:t.availableLangs[n.replace(/-.*/,"")]?n.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+n+".js"),function(){CKEDITOR.tools.extend(e.lang.specialchar,t.langEntries[n]),e.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1}),e.ui.addButton&&e.ui.addButton("SpecialChar",{label:e.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! " # $ % & ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ € ‘ ’ “ ” – — ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ Œ œ Ŵ Ŷ ŵ ŷ ‚ ‛ „ … ™ ► • → ⇒ ⇔ ♦ ≈".split(" "),function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(e){var t=e.config,n=e.lang.stylescombo,i={},o=[],r=[];e.on("stylesSet",function(n){if(n=n.data.styles){for(var a,s,l,c=0,u=n.length;c=l)for(a=this.getNextSourceNode(e,CKEDITOR.NODE_ELEMENT);a;){if(a.isVisible()&&0===a.getTabIndex()){o=a;break}a=a.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(a=this.getDocument().getBody().getFirst();a=a.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!n)if(!i&&a.equals(this)){if(i=!0,e){if(!(a=a.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;n=1}}else i&&!this.contains(a)&&(n=1);if(a.isVisible()&&!(0>(s=a.getTabIndex()))){if(n&&s==l){o=a;break}s>l&&(!o||!r||s(r=l.getTabIndex())))if(0>=a){if(n&&0===r){o=l;break}r>s&&(o=l,s=r)}else{if(n&&r==a){o=l;break}rs)&&(o=l,s=r)}}o&&o.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(e){function t(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!e.blockless){var n=e.lang.table;e.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+(e.plugins.dialogadvtab?"table"+e.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"]]})),e.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",t())),e.addCommand("tableDelete",t({exec:function(e){var t=e.elementPath().contains("table",1);if(t){var n=t.getParent(),i=e.editable();1!=n.getChildCount()||n.is("td","th")||n.equals(i)||(t=n),e=e.createRange(),e.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START),t.remove(),e.select()}}})),e.ui.addButton&&e.ui.addButton("Table",{label:n.toolbar,command:"table",toolbar:"insert,30"}),CKEDITOR.dialog.add("table",this.path+"dialogs/table.js"),CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js"),e.addMenuItems&&e.addMenuItems({table:{label:n.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:n.deleteTable,command:"tableDelete",group:"table",order:1}}),e.on("doubleclick",function(e){e.data.element.is("table")&&(e.data.dialog="tableProperties")}),e.contextMenu&&e.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function e(e){function t(e){0n)&&(n=o)}return n}function o(t,n){for(var o=e(t),r=o[0].getAscendant("table"),a=i(o,1),o=i(o),a=n?a:o,s=CKEDITOR.tools.buildTableMap(r),r=[],o=[],l=s.length,c=0;cr.length)||(o=t.getCommonAncestor())&&o.type==CKEDITOR.NODE_ELEMENT&&o.is("table"))return!1;var a;t=r[0],o=t.getAscendant("table");var s=CKEDITOR.tools.buildTableMap(o),c=s.length,u=s[0].length,d=t.getParent().$.rowIndex,f=l(s,d,t);if(n){var h;try{var p=parseInt(t.getAttribute("rowspan"),10)||1;a=parseInt(t.getAttribute("colspan"),10)||1,h=s["up"==n?d-p:"down"==n?d+p:d]["left"==n?f-a:"right"==n?f+a:f]}catch(m){return!1}if(!h||t.$==h)return!1;r["up"==n||"left"==n?"unshift":"push"](new CKEDITOR.dom.element(h))}n=t.getDocument();var g=d,p=h=0,v=!i&&new CKEDITOR.dom.documentFragment(n),E=0;for(n=0;n=u?t.removeAttribute("rowSpan"):t.$.rowSpan=h,h>=c?t.removeAttribute("colSpan"):t.$.colSpan=p,i=new CKEDITOR.dom.nodeList(o.$.rows),r=i.count(),n=r-1;0<=n;n--)o=i.getItem(n),o.$.cells.length||(o.remove(),r++);return t}function u(t,n){var i=e(t);if(1u){r.insertBefore(new CKEDITOR.dom.element(f));break}f=null}f||a.append(r)}else for(d=o=1,a=r.clone(),a.insertAfter(r),a.append(r=i.clone()),f=l(s,c),u=0;ut.order?-1:0>e.order?1:e.order',t.lang.toolbar.toolbars,"",''],s=!1!==t.config.toolbarStartupExpanded;t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&l.push('":' style="display:none">'));for(var c=t.toolbox.toolbars,u=e(t),d=0;d"),a=o=0),"/"===g)l.push('');else{p=g.items||g;for(var v=0;v'),h&&l.push('',h,""),l.push('');var y=c.push(m)-1;0'),o=1):o&&(l.push(""),o=0),a&&(C(a),a=0),C(T)}}}o&&(l.push(""),a=o=0),m&&l.push('')}}if(t.config.toolbarCanCollapse&&l.push(""),t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var b=CKEDITOR.tools.addFunction(function(){t.execCommand("toolbarCollapse")});t.on("destroy",function(){CKEDITOR.tools.removeFunction(b)}),t.addCommand("toolbarCollapse",{readOnly:1,exec:function(e){var t=e.ui.space("toolbar_collapser"),n=t.getPrevious(),i=e.ui.space("contents"),o=n.getParent(),r=parseInt(i.$.style.height,10),a=o.$.offsetHeight,s=t.hasClass("cke_toolbox_collapser_min");s?(n.show(),t.removeClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarCollapse)):(n.hide(),t.addClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarExpand)),t.getFirst().setText(s?"▲":"◀"),i.setStyle("height",r-(o.$.offsetHeight-a)+"px"),e.fire("resize",{outerHeight:e.container.$.offsetHeight,contentsHeight:i.$.offsetHeight,outerWidth:e.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}}),t.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse"),l.push('','',"")}l.push(""),i.data.html+=l.join("")}}),t.on("destroy",function(){if(this.toolbox){var e,t,n,i,o=0;for(e=this.toolbox.toolbars;o'),{}}}}})}}),CKEDITOR.ui.prototype.addToolbarGroup=function(e,n,i){var o=t(this.editor),r=0===n,a={name:e};if(i){if(i=CKEDITOR.tools.search(o,function(e){return e.name==i}))return!i.groups&&(i.groups=[]),n&&(n=CKEDITOR.tools.indexOf(i.groups,n),0<=n)?void i.groups.splice(n+1,0,e):void(r?i.groups.splice(0,0,e):i.groups.push(e));n=null}n&&(n=CKEDITOR.tools.indexOf(o,function(e){return e.name==n})),r?o.splice(0,0,e):"number"==typeof n?o.splice(n+1,0,a):o.push(e)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){var e=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],t={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(t){function i(e){a.enabled&&!1!==e.data.command.canUndo&&a.save()}function o(){a.enabled=!t.readOnly&&"wysiwyg"==t.mode,a.onChange()}var a=t.undoManager=new n(t),s=a.editingHandler=new r(a),l=t.addCommand("undo",{exec:function(){a.undo()&&(t.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),c=t.addCommand("redo",{exec:function(){a.redo()&&(t.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});t.setKeystroke([[e[0],"undo"],[e[1],"redo"],[e[2],"redo"]]),a.onChange=function(){l.setState(a.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),c.setState(a.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)},t.on("beforeCommandExec",i),t.on("afterCommandExec",i),t.on("saveSnapshot",function(e){a.save(e.data&&e.data.contentOnly)}),t.on("contentDom",s.attachListeners,s),t.on("instanceReady",function(){t.fire("saveSnapshot")}),t.on("beforeModeUnload",function(){"wysiwyg"==t.mode&&a.save(!0)}),t.on("mode",o),t.on("readOnly",o),t.ui.addButton&&(t.ui.addButton("Undo",{label:t.lang.undo.undo,command:"undo",toolbar:"undo,10"}),t.ui.addButton("Redo",{label:t.lang.undo.redo,command:"redo",toolbar:"undo,20"})),t.resetUndo=function(){a.reset(),t.fire("saveSnapshot")},t.on("updateSnapshot",function(){a.currentImage&&a.update()}),t.on("lockSnapshot",function(e){e=e.data,a.lock(e&&e.dontUpdate,e&&e.forceUpdate)}),t.on("unlockSnapshot",a.unlock,a)}}),CKEDITOR.plugins.undo={};var n=CKEDITOR.plugins.undo.UndoManager=function(e){this.strokesRecorded=[0,0],this.locked=null,this.previousKeyGroup=-1,this.limit=e.config.undoStackSize||20,this.strokesLimit=25,this.editor=e,this.reset()};n.prototype={type:function(e,t){var i=n.getKeyGroup(e),o=this.strokesRecorded[i]+1;t=t||o>=this.strokesLimit,this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange()),t?(o=0,this.editor.fire("saveSnapshot")):this.editor.fire("change"),this.strokesRecorded[i]=o,this.previousKeyGroup=i},keyGroupChanged:function(e){return n.getKeyGroup(e)!=this.previousKeyGroup},reset:function(){this.snapshots=[],this.index=-1,this.currentImage=null,this.hasRedo=this.hasUndo=!1,this.locked=null,this.resetType()},resetType:function(){this.strokesRecorded=[0,0],this.typing=!1,this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0),this.hasRedo=!!this.getNextImage(!1),this.resetType(),this.onChange()},save:function(e,t,n){var o=this.editor;if(this.locked||"ready"!=o.status||"wysiwyg"!=o.mode)return!1;var r=o.editable();if(!r||"ready"!=r.status)return!1;if(r=this.snapshots,t||(t=new i(o)),!1===t.contents)return!1;if(this.currentImage)if(t.equalsContent(this.currentImage)){if(e||t.equalsSelection(this.currentImage))return!1}else!1!==n&&o.fire("change");return r.splice(this.index+1,r.length-this.index-1),r.length==this.limit&&r.shift(),this.index=r.push(t)-1,this.currentImage=t,!1!==n&&this.refreshState(),!0},restoreImage:function(e){var t,n=this.editor;e.bookmarks&&(n.focus(),t=n.getSelection()),this.locked={level:999},this.editor.loadSnapshot(e.contents),e.bookmarks?t.selectBookmarks(e.bookmarks):CKEDITOR.env.ie&&(t=this.editor.document.getBody().$.createTextRange(),t.collapse(!0),t.select()),this.locked=null,this.index=e.index,this.currentImage=this.snapshots[this.index],this.update(),this.refreshState(),n.fire("change")},getNextImage:function(e){var t,n=this.snapshots,i=this.currentImage;if(i)if(e){for(t=this.index-1;0<=t;t--)if(e=n[t],!i.equalsContent(e))return e.index=t,e}else for(t=this.index+1;t=this.undoManager.strokesLimit&&(this.undoManager.type(e.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(e){var t=this.undoManager;e=e.data.getKey();var o=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(e),n.ieFunctionalKeysBug(e)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new i(t.editor,(!0)))||(0t.version||t.quirks))},"undefined"==typeof e.plugins.scayt&&e.ui.addButton&&e.ui.addButton("SpellChecker",{label:e.lang.wsc.toolbar,click:function(e){var t=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.container.getText():e.document.getBody().getText();(t=t.replace(/\s/g,""))?e.execCommand("checkspell"):alert("Nothing to check!")},toolbar:"spellchecker,10"}),CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&7>=CKEDITOR.env.version?"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":"dialogs/wsc_ie.js"))}}),function(){function e(e){function n(e){var t=!1;s.attachListener(s,"keydown",function(){var n=o.getBody().getElementsByTag(e);if(!t){for(var i=0;ithis.$.offsetHeight){var n=i.createRange();n[33==t?"moveToElementEditStart":"moveToElementEditEnd"](this),n.select(),e.data.preventDefault()}}),CKEDITOR.env.ie&&this.attachListener(o,"blur",function(){try{o.$.selection.empty()}catch(e){}}),CKEDITOR.env.iOS&&this.attachListener(o,"touchend",function(){e.focus()}),r=i.document.getElementsByTag("title").getItem(0),r.data("cke-title",r.getText()),CKEDITOR.env.ie&&(i.document.$.title=this._.docTitle),CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready"),i.fire("contentDom"),this._.isPendingFocus&&(i.focus(),this._.isPendingFocus=!1),setTimeout(function(){i.fire("dataReady")},0)},0,this)}function t(e){function t(){var t;e.editable().attachListener(e,"selectionChange",function(){var i=e.getSelection().getSelectedElement();i&&(t&&(t.detachEvent("onresizestart",n),t=null),i.$.attachEvent("onresizestart",n),t=i.$)})}function n(e){e.returnValue=!1}if(CKEDITOR.env.gecko)try{var i=e.document.$;i.execCommand("enableObjectResizing",!1,!e.config.disableObjectResizing),i.execCommand("enableInlineTableEditing",!1,!e.config.disableNativeTableHandles)}catch(o){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&e.config.disableObjectResizing&&t(e)}function n(){var e=[];if(8<=CKEDITOR.document.$.documentMode){e.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var t,n=[];for(t in CKEDITOR.dtd.$removeEmpty)n.push("html.CSS1Compat "+t+"[contenteditable=false]");e.push(n.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(e.push("html{height:100% !important}"),e.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));return e.push("html{cursor:text;*cursor:auto}"),e.push("img,input,textarea{cursor:default}"),e.join("\n")}var i;CKEDITOR.plugins.add("wysiwygarea",{init:function(e){e.config.fullPage&&e.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"}),e.addMode("wysiwyg",function(t){function n(n){n&&n.removeListener(),e.editable(new i(e,r.$.contentWindow.document.body)),e.setData(e.getData(1),t)}var o="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",o=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(o)+"}())":"",r=CKEDITOR.dom.element.createFromHtml('');r.setStyles({width:"100%",height:"100%"}),r.addClass("cke_wysiwyg_frame").addClass("cke_reset"),o=e.ui.space("contents"),o.append(r);var a=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;a&&r.on("load",n);var s=e.title,l=e.fire("ariaEditorHelpLabel",{}).label;if(s&&(CKEDITOR.env.ie&&l&&(s+=", "+l),r.setAttribute("title",s)),l){var s=CKEDITOR.tools.getNextId(),c=CKEDITOR.dom.element.createFromHtml(''+l+"");o.append(c,1),r.setAttribute("aria-describedby",s)}e.on("beforeModeUnload",function(e){e.removeListener(),c&&c.remove()}),r.setAttributes({tabIndex:e.tabIndex,allowTransparency:"true"}),!a&&n(),e.fire("ariaWidget",r)})}}),CKEDITOR.editor.prototype.addContentsCss=function(e){var t=this.config,n=t.contentsCss;CKEDITOR.tools.isArray(n)||(t.contentsCss=n?[n]:[]),t.contentsCss.push(e)},i=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments),this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(t){CKEDITOR.tools.setTimeout(e,0,this,t)},this),this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(e,t){var i=this.editor;if(t)this.setHtml(e),this.fixInitialSelection(),i.fire("dataReady");else{this._.isLoadingData=!0,i._.dataStore={id:1};var o=i.config,r=o.fullPage,a=o.docType,s=CKEDITOR.tools.buildStyleHtml(n()).replace(/