function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+n+"=([^&#]*)",r=new RegExp(i),t=r.exec(window.location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function openWindowPopup(n,t){mywindow=window.open(n,t,"status=1,resizable=1,width=800,height=650,scrollbars=yes");mywindow.moveTo(100,100)}function returnImage(n,t){$("[data-identifier-id="+t+"]").attr("src",n)}function updateLink(n){$("#Link").val(n)}function updateCMSPopupImage(n,t){$("#"+t).attr("src",n);$("#"+t).next().val(n.replace(baseUrl+"FileManager/DownloadFile/",""))}function updateCMSPopupfile(n,t,i){$("#"+i).val(n.replace(baseUrl+"FileManager/DownloadFile/",""));$("#"+i).next().val(t)}function getLinkClass(n){var t=$(".txtURL").find("input");n!="javascript:void(0);"?t.val().indexOf("http://")!=-1&&t.val().length>7?confirm("Do you want to overwrite the current URL")&&t.val(n):t.val(n):alert("You cannot link to this page.")}function resetEditor(n){if(confirm("Reset?\r\nYou will lose any changes made in the editor.  This will not update any saved content.")){var t={IdentifierId:$($(n.document)[0].$.activeElement).attr("data-identifier-id"),TemplatePositionId:$($(n.document)[0].$.activeElement).attr("data-template-position-id"),ContentArea:""};$.ajax({url:SteamCMSJSSettings.ReloadContent,type:"POST",contentType:"application/json; charset=utf-8",traditional:!0,data:JSON.stringify(t),datatype:"json",success:function(t){n.setData(t)},error:function(){alert("Error")}})}}function updateImageLinkCKEditor(n){var t,i;if(n=="javascript:void(0);")alert("You cannot link to this page.");else if(confirm("Update Link?\r\nDo you want to link to this page?")){t=getParameterByName("action");switch(t){case"popupLink":window.opener.updateLink(n);window.close();break;default:i=getParameterByName("CKEditorFuncNum");window.opener.CKEDITOR.tools.callFunction(i,n);window.close()}}}function saveDiv(n){n.container.$.blur()}function publishModal(){$("#publishModal").modal("show")}function publishContent(){var n={PublishDate:$("#PublishDate").val()+":00",PublishComments:$("#Comments").val()};$.ajax({url:SteamCMSJSSettings.PublishUrl,type:"POST",contentType:"application/json; charset=utf-8",traditional:!0,data:JSON.stringify(n),datatype:"json",success:function(){$("#publishModal").modal("hide");cancelEditPage()},error:function(n,t,i){alert("There were errors with your publish request.\r\nPlease contact support.\r\n"+n.responseText+"\r\n"+i)}})}function savePage(n){var t=[];$(".cmsContent").each(function(){var n={IdentifierId:$(this).attr("data-identifier-id"),TemplatePositionId:$(this).attr("data-template-position-id"),ContentArea:$(this)[0].innerHTML};t.push(n)});$(".cms-asset").each(function(){var n={IdentifierId:$(this).attr("data-identifier-id"),FileManagerFileId:$(this).attr("src").replace(baseUrl+"FileManager/DownloadFile/","")};t.push(n)});$.ajax({url:SteamCMSJSSettings.SaveUrl,type:"POST",contentType:"application/json; charset=utf-8",traditional:!0,data:JSON.stringify(t),datatype:"json",async:"false",success:function(){$("[id$=ActionMessage]").text("Changes Saved");$("[id$=ActionMessage]").addClass("actionMsg")},error:function(n,t,i){alert("There were errors with your save.\r\nPlease contact support.\r\n"+n.responseText+"\r\n"+i)},complete:function(){n&&publishContent()}})}function editPage(){window.location.href.indexOf("edit")<=-1&&(window.location.href=window.location.pathname.replace(vdName,"")=="/"?window.location.href+"index/edit":window.location.href+"/edit")}function cancelEditPage(){if(window.location.href.indexOf("edit")>-1){var n=window.location.href.toLowerCase();window.location.href=n.split("/edit")[0]}}function getPropertyfromFileString(n,t){var i="[\\?&]"+n+"=([^&#]*)",r=new RegExp(i);return r.exec(t)}function saveStructure(){var f=this,n=[],t=0,i=!0,u=navigator.appName,r;/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&(r=new Number(RegExp.$1));u=="Microsoft Internet Explorer"&&r<=7&&(i=!1);$("ul#sitemap .sm2_title").each(function(){var r=0,u,f,e,o,s;if(i==!0)switch("sitemap"){case this.offsetParent.parentNode.parentNode.id:r=0;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.id:r=1;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=2;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=3;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=4;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=5;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=6;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=7;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=8;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=9;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=10;break;default:r=0}else{try{u=this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id}catch(h){}try{u=this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id}catch(h){u=""}try{f=this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id}catch(h){f=""}try{e=this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id}catch(h){e=""}try{o=this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id}catch(h){o=""}try{s=this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id}catch(h){s=""}switch("sitemap"){case this.offsetParent.parentNode.parentNode.parentNode.id:r=0;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=1;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=2;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=3;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=4;break;case this.offsetParent.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id:r=5;break;case u:r=6;break;case f:r=7;break;case e:r=8;break;case o:r=9;break;case s:r=10;break;default:r=0}}n[t]=this.childNodes[1].nodeValue+"|"+this.nextSibling.innerHTML+","+r;t++});$.ajax({url:SteamCMSJSSettings.SaveStructure,type:"POST",contentType:"application/json; charset=utf-8",traditional:!0,data:JSON.stringify(n),datatype:"json",success:function(){$(".bgwhite").prepend("<div class='alert alert-success'><button type='button' class='close' data-dismiss='alert'>x<\/button>Your page update was saved!<\/div>")},error:function(){alert("There were errors with your save.\r\nPlease contact support.")}})}var loadCMS,editor,asset,identifierId;(function(n,t){function dt(n){var t=n.length,r=i.type(n);return i.isWindow(n)?!1:n.nodeType===1&&t?!0:r==="array"||r!=="function"&&(t===0||typeof t=="number"&&t>0&&t-1 in n)}function kf(n){var t=gt[n]={};return i.each(n.match(s)||[],function(n,i){t[i]=!0}),t}function ir(n,r,u,f){if(i.acceptData(n)){var s,h,c=i.expando,a=typeof r=="string",l=n.nodeType,o=l?i.cache:n,e=l?n[c]:n[c]&&c;if(e&&o[e]&&(f||o[e].data)||!a||u!==t)return e||(l?n[c]=e=b.pop()||i.guid++:e=c),o[e]||(o[e]={},l||(o[e].toJSON=i.noop)),(typeof r=="object"||typeof r=="function")&&(f?o[e]=i.extend(o[e],r):o[e].data=i.extend(o[e].data,r)),s=o[e],f||(s.data||(s.data={}),s=s.data),u!==t&&(s[i.camelCase(r)]=u),a?(h=s[r],h==null&&(h=s[i.camelCase(r)])):h=s,h}}function rr(n,t,r){if(i.acceptData(n)){var o,h,e,s=n.nodeType,u=s?i.cache:n,f=s?n[i.expando]:i.expando;if(u[f]){if(t&&(e=r?u[f]:u[f].data,e)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in e)?t=[t]:(t=i.camelCase(t),t=t in e?[t]:t.split(" ")),o=0,h=t.length;o<h;o++)delete e[t[o]];if(!(r?ni:i.isEmptyObject)(e))return}(r||(delete u[f].data,ni(u[f])))&&(s?i.cleanData([n],!0):i.support.deleteExpando||u!=u.window?delete u[f]:u[f]=null)}}}function ur(n,r,u){if(u===t&&n.nodeType===1){var f="data-"+r.replace(tr,"-$1").toLowerCase();if(u=n.getAttribute(f),typeof u=="string"){try{u=u==="true"?!0:u==="false"?!1:u==="null"?null:+u+""===u?+u:nr.test(u)?i.parseJSON(u):u}catch(e){}i.data(n,r,u)}else u=t}return u}function ni(n){for(var t in n)if((t!=="data"||!i.isEmptyObject(n[t]))&&t!=="toJSON")return!1;return!0}function ht(){return!0}function d(){return!1}function cr(n,t){do n=n[t];while(n&&n.nodeType!==1);return n}function lr(n,t,r){if(t=t||0,i.isFunction(t))return i.grep(n,function(n,i){var u=!!t.call(n,i,n);return u===r});if(t.nodeType)return i.grep(n,function(n){return n===t===r});if(typeof t=="string"){var u=i.grep(n,function(n){return n.nodeType===1});if(fe.test(t))return i.filter(t,u,!r);t=i.filter(t,u)}return i.grep(n,function(n){return i.inArray(n,t)>=0===r})}function ar(n){var i=vr.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}function ye(n,t){return n.getElementsByTagName(t)[0]||n.appendChild(n.ownerDocument.createElement(t))}function dr(n){var t=n.getAttributeNode("type");return n.type=(t&&t.specified)+"/"+n.type,n}function gr(n){var t=le.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function si(n,t){for(var u,r=0;(u=n[r])!=null;r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function nu(n,t){if(t.nodeType===1&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;f<o;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function pe(n,t){var r,f,u;if(t.nodeType===1){if(r=t.nodeName.toLowerCase(),!i.support.noCloneEvent&&t[i.expando]){u=i._data(t);for(f in u.events)i.removeEvent(t,f,u.handle);t.removeAttribute(i.expando)}r==="script"&&t.text!==n.text?(dr(t).text=n.text,gr(t)):r==="object"?(t.parentNode&&(t.outerHTML=n.outerHTML),i.support.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):r==="input"&&ei.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):r==="option"?t.defaultSelected=t.selected=n.defaultSelected:(r==="input"||r==="textarea")&&(t.defaultValue=n.defaultValue)}}function u(n,r){var s,e,h=0,f=typeof n.getElementsByTagName!==o?n.getElementsByTagName(r||"*"):typeof n.querySelectorAll!==o?n.querySelectorAll(r||"*"):t;if(!f)for(f=[],s=n.childNodes||n;(e=s[h])!=null;h++)!r||i.nodeName(e,r)?f.push(e):i.merge(f,u(e,r));return r===t||r&&i.nodeName(n,r)?i.merge([n],f):f}function we(n){ei.test(n.type)&&(n.defaultChecked=n.checked)}function fu(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=uu.length;i--;)if(t=uu[i]+r,t in n)return t;return u}function ut(n,t){return n=t||n,i.css(n,"display")==="none"||!i.contains(n.ownerDocument,n)}function eu(n,t){for(var f,r,o,e=[],u=0,s=n.length;u<s;u++)(r=n[u],r.style)&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||f!=="none"||(r.style.display=""),r.style.display===""&&ut(r)&&(e[u]=i._data(r,"olddisplay",cu(r.nodeName)))):e[u]||(o=ut(r),(f&&f!=="none"||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;u<s;u++)(r=n[u],r.style)&&(t&&r.style.display!=="none"&&r.style.display!==""||(r.style.display=t?e[u]||"":"none"));return n}function ou(n,t,i){var r=ge.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function su(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:t==="width"?1:0,o=0;e<4;e+=2)r==="margin"&&(o+=i.css(n,r+p[e],!0,f)),u?(r==="content"&&(o-=i.css(n,"padding"+p[e],!0,f)),r!=="margin"&&(o-=i.css(n,"border"+p[e]+"Width",!0,f))):(o+=i.css(n,"padding"+p[e],!0,f),r!=="padding"&&(o+=i.css(n,"border"+p[e]+"Width",!0,f)));return o}function hu(n,t,r){var e=!0,u=t==="width"?n.offsetWidth:n.offsetHeight,f=v(n),o=i.support.boxSizing&&i.css(n,"boxSizing",!1,f)==="border-box";if(u<=0||u==null){if(u=y(n,t,f),(u<0||u==null)&&(u=n.style[t]),ct.test(u))return u;e=o&&(i.support.boxSizingReliable||u===n.style[t]);u=parseFloat(u)||0}return u+su(n,t,r||(o?"border":"content"),e,f)+"px"}function cu(n){var u=r,t=iu[n];return t||(t=lu(n,u),t!=="none"&&t||(rt=(rt||i("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(u.documentElement),u=(rt[0].contentWindow||rt[0].contentDocument).document,u.write("<!doctype html><html><body>"),u.close(),t=lu(n,u),rt.detach()),iu[n]=t),t}function lu(n,t){var r=i(t.createElement(n)).appendTo(t.body),u=i.css(r[0],"display");return r.remove(),u}function ci(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||ro.test(n)?u(n,i):ci(n+"["+(typeof i=="object"?t:"")+"]",i,r,u)});else if(r||i.type(t)!=="object")u(n,t);else for(f in t)ci(n+"["+f+"]",t[f],r,u)}function ku(n){return function(t,r){typeof t!="string"&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(s)||[];if(i.isFunction(r))while(u=e[f++])u[0]==="+"?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function du(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);if(typeof s!="string"||o||f[s]){if(o)return!(h=s)}else return t.dataTypes.unshift(s),e(s),!1}),h}var f={},o=n===vi;return e(t.dataTypes[0])||!f["*"]&&e("*")}function yi(n,r){var f,u,e=i.ajaxSettings.flatOptions||{};for(u in r)r[u]!==t&&((e[u]?n:f||(f={}))[u]=r[u]);return f&&i.extend(!0,n,f),n}function co(n,i,r){var s,o,e,u,h=n.contents,f=n.dataTypes,c=n.responseFields;for(u in c)u in r&&(i[c[u]]=r[u]);while(f[0]==="*")f.shift(),o===t&&(o=n.mimeType||i.getResponseHeader("Content-Type"));if(o)for(u in h)if(h[u]&&h[u].test(o)){f.unshift(u);break}if(f[0]in r)e=f[0];else{for(u in r){if(!f[0]||n.converters[u+" "+f[0]]){e=u;break}s||(s=u)}e=e||s}if(e)return e!==f[0]&&f.unshift(e),r[e]}function lo(n,t){var o,r,i,e,u={},h=0,s=n.dataTypes.slice(),f=s[0];if(n.dataFilter&&(t=n.dataFilter(t,n.dataType)),s[1])for(i in n.converters)u[i.toLowerCase()]=n.converters[i];for(;r=s[++h];)if(r!=="*"){if(f!=="*"&&f!==r){if(i=u[f+" "+r]||u["* "+r],!i)for(o in u)if(e=o.split(" "),e[1]===r&&(i=u[f+" "+e[0]]||u["* "+e[0]],i)){i===!0?i=u[o]:u[o]!==!0&&(r=e[0],s.splice(h--,0,r));break}if(i!==!0)if(i&&n.throws)t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+f+" to "+r}}}f=r}return{state:"success",data:t}}function nf(){try{return new n.XMLHttpRequest}catch(t){}}function ao(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function tf(){return setTimeout(function(){tt=t}),tt=i.now()}function wo(n,t){i.each(t,function(t,i){for(var u=(ft[t]||[]).concat(ft["*"]),r=0,f=u.length;r<f;r++)if(u[r].call(n,t,i))return})}function rf(n,t,r){var e,o,s=0,l=yt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(o)return!1;for(var s=tt||tf(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,e=u.tweens.length;r<e;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),i<1&&e?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:tt||tf(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(o)return this;for(o=!0;i<r;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),h=u.props;for(bo(h,u.opts.specialEasing);s<l;s++)if(e=yt[s].call(u,n,h,u.opts),e)return e;return wo(u,h),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function bo(n,t){var u,f,r,e,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function ko(n,t,r){var u,o,v,a,s,y,l,f,b,h=this,e=n.style,p={},w=[],c=n.nodeType&&ut(n);r.queue||(f=i._queueHooks(n,"fx"),f.unqueued==null&&(f.unqueued=0,b=f.empty.fire,f.empty.fire=function(){f.unqueued||b()}),f.unqueued++,h.always(function(){h.always(function(){f.unqueued--;i.queue(n,"fx").length||f.empty.fire()})}));n.nodeType===1&&("height"in t||"width"in t)&&(r.overflow=[e.overflow,e.overflowX,e.overflowY],i.css(n,"display")==="inline"&&i.css(n,"float")==="none"&&(i.support.inlineBlockNeedsLayout&&cu(n.nodeName)!=="inline"?e.zoom=1:e.display="inline-block"));r.overflow&&(e.overflow="hidden",i.support.shrinkWrapBlocks||h.always(function(){e.overflow=r.overflow[0];e.overflowX=r.overflow[1];e.overflowY=r.overflow[2]}));for(o in t)if(a=t[o],vo.exec(a)){if(delete t[o],y=y||a==="toggle",a===(c?"hide":"show"))continue;w.push(o)}if(v=w.length,v)for(s=i._data(n,"fxshow")||i._data(n,"fxshow",{}),("hidden"in s)&&(c=s.hidden),y&&(s.hidden=!c),c?i(n).show():h.done(function(){i(n).hide()}),h.done(function(){var t;i._removeData(n,"fxshow");for(t in p)i.style(n,t,p[t])}),o=0;o<v;o++)u=w[o],l=h.createTween(u,c?s[u]:0),p[u]=s[u]||i.style(n,u),u in s||(s[u]=l.start,c&&(l.end=l.start,l.start=u==="width"||u==="height"?1:0))}function f(n,t,i,r,u){return new f.prototype.init(n,t,i,r,u)}function pt(n,t){var r,i={height:n},u=0;for(t=t?1:0;u<4;u+=2-t)r=p[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function uf(n){return i.isWindow(n)?n:n.nodeType===9?n.defaultView||n.parentWindow:!1}var et,wi,o=typeof t,r=n.document,ff=n.location,ef=n.jQuery,of=n.$,ot={},b=[],wt="1.9.1",bi=b.concat,bt=b.push,l=b.slice,ki=b.indexOf,sf=ot.toString,it=ot.hasOwnProperty,kt=wt.trim,i=function(n,t){return new i.fn.init(n,t,wi)},st=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,s=/\S+/g,hf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,cf=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,di=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,lf=/^[\],:{}\s]*$/,af=/(?:^|:|,)(?:\s*\[)+/g,vf=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,yf=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,pf=/^-ms-/,wf=/-([\da-z])/gi,bf=function(n,t){return t.toUpperCase()},h=function(n){(r.addEventListener||n.type==="load"||r.readyState==="complete")&&(gi(),i.ready())},gi=function(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",h,!1),n.removeEventListener("load",h,!1)):(r.detachEvent("onreadystatechange",h),n.detachEvent("onload",h))},gt,nr,tr,pi,lt,g,nt,gu,at;i.fn=i.prototype={jquery:wt,constructor:i,init:function(n,u,f){var e,o;if(!n)return this;if(typeof n=="string"){if(e=n.charAt(0)==="<"&&n.charAt(n.length-1)===">"&&n.length>=3?[null,n,null]:cf.exec(n),e&&(e[1]||!u)){if(e[1]){if(u=u instanceof i?u[0]:u,i.merge(this,i.parseHTML(e[1],u&&u.nodeType?u.ownerDocument||u:r,!0)),di.test(e[1])&&i.isPlainObject(u))for(e in u)i.isFunction(this[e])?this[e](u[e]):this.attr(e,u[e]);return this}if(o=r.getElementById(e[2]),o&&o.parentNode){if(o.id!==e[2])return f.find(n);this.length=1;this[0]=o}return this.context=r,this.selector=n,this}return!u||u.jquery?(u||f).find(n):this.constructor(u).find(n)}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?f.ready(n):(n.selector!==t&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(n){return n==null?this.toArray():n<0?this[this.length+n]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},ready:function(n){return i.ready.promise().done(n),this},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(n<0?i:0);return this.pushStack(t>=0&&t<i?[this[t]]:[])},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:bt,sort:[].sort,splice:[].splice};i.fn.init.prototype=i.fn;i.extend=i.fn.extend=function(){var u,o,r,e,s,h,n=arguments[0]||{},f=1,l=arguments.length,c=!1;for(typeof n=="boolean"&&(c=n,n=arguments[1]||{},f=2),typeof n=="object"||i.isFunction(n)||(n={}),l===f&&(n=this,--f);f<l;f++)if((s=arguments[f])!=null)for(e in s)(u=n[e],r=s[e],n!==r)&&(c&&r&&(i.isPlainObject(r)||(o=i.isArray(r)))?(o?(o=!1,h=u&&i.isArray(u)?u:[]):h=u&&i.isPlainObject(u)?u:{},n[e]=i.extend(c,h,r)):r!==t&&(n[e]=r));return n};i.extend({noConflict:function(t){return n.$===i&&(n.$=of),t&&n.jQuery===i&&(n.jQuery=ef),i},isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!r.body)return setTimeout(i.ready);(i.isReady=!0,n!==!0&&--i.readyWait>0)||(et.resolveWith(r,[i]),i.fn.trigger&&i(r).trigger("ready").off("ready"))}},isFunction:function(n){return i.type(n)==="function"},isArray:Array.isArray||function(n){return i.type(n)==="array"},isWindow:function(n){return n!=null&&n==n.window},isNumeric:function(n){return!isNaN(parseFloat(n))&&isFinite(n)},type:function(n){return n==null?String(n):typeof n=="object"||typeof n=="function"?ot[sf.call(n)]||"object":typeof n},isPlainObject:function(n){if(!n||i.type(n)!=="object"||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!it.call(n,"constructor")&&!it.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}for(var r in n);return r===t||it.call(n,r)},isEmptyObject:function(n){for(var t in n)return!1;return!0},error:function(n){throw new Error(n);},parseHTML:function(n,t,u){if(!n||typeof n!="string")return null;typeof t=="boolean"&&(u=t,t=!1);t=t||r;var f=di.exec(n),e=!u&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&i(e).remove(),i.merge([],f.childNodes))},parseJSON:function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t);if(t===null)return t;if(typeof t=="string"&&(t=i.trim(t),t&&lf.test(t.replace(vf,"@").replace(yf,"]").replace(af,""))))return new Function("return "+t)();i.error("Invalid JSON: "+t)},parseXML:function(r){var u,f;if(!r||typeof r!="string")return null;try{n.DOMParser?(f=new DOMParser,u=f.parseFromString(r,"text/xml")):(u=new ActiveXObject("Microsoft.XMLDOM"),u.async="false",u.loadXML(r))}catch(e){u=t}return u&&u.documentElement&&!u.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+r),u},noop:function(){},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(pf,"ms-").replace(wf,bf)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=dt(n);if(i){if(e){for(;r<f;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;r<f;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:kt&&!kt.call("﻿ ")?function(n){return n==null?"":kt.call(n)}:function(n){return n==null?"":(n+"").replace(hf,"")},makeArray:function(n,t){var r=t||[];return n!=null&&(dt(Object(n))?i.merge(r,typeof n=="string"?[n]:n):bt.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(ki)return ki.call(t,n,i);for(r=t.length,i=i?i<0?Math.max(0,r+i):i:0;i<r;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,i){var f=i.length,u=n.length,r=0;if(typeof f=="number")for(;r<f;r++)n[u++]=i[r];else while(i[r]!==t)n[u++]=i[r++];return n.length=u,n},grep:function(n,t,i){var u,f=[],r=0,e=n.length;for(i=!!i;r<e;r++)u=!!t(n[r],r),i!==u&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=dt(n),f=[];if(o)for(;r<e;r++)u=t(n[r],r,i),u!=null&&(f[f.length]=u);else for(r in n)u=t(n[r],r,i),u!=null&&(f[f.length]=u);return bi.apply([],f)},guid:1,proxy:function(n,r){var f,u,e;return(typeof r=="string"&&(e=n[r],r=n,n=e),!i.isFunction(n))?t:(f=l.call(arguments,2),u=function(){return n.apply(r||this,f.concat(l.call(arguments)))},u.guid=n.guid=n.guid||i.guid++,u)},access:function(n,r,u,f,e,o,s){var h=0,l=n.length,c=u==null;if(i.type(u)==="object"){e=!0;for(h in u)i.access(n,r,h,u[h],!0,o,s)}else if(f!==t&&(e=!0,i.isFunction(f)||(s=!0),c&&(s?(r.call(n,f),r=null):(c=r,r=function(n,t,r){return c.call(i(n),r)})),r))for(;h<l;h++)r(n[h],u,s?f:f.call(n[h],h,r(n[h],u)));return e?n:c?r.call(n):l?r(n[0],u):o},now:function(){return(new Date).getTime()}});i.ready.promise=function(t){if(!et)if(et=i.Deferred(),r.readyState==="complete")setTimeout(i.ready);else if(r.addEventListener)r.addEventListener("DOMContentLoaded",h,!1),n.addEventListener("load",h,!1);else{r.attachEvent("onreadystatechange",h);n.attachEvent("onload",h);var u=!1;try{u=n.frameElement==null&&r.documentElement}catch(e){}u&&u.doScroll&&function f(){if(!i.isReady){try{u.doScroll("left")}catch(n){return setTimeout(f,50)}gi();i.ready()}}()}return et.promise(t)};i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ot["[object "+t+"]"]=t.toLowerCase()});wi=i(r);gt={};i.Callbacks=function(n){n=typeof n=="string"?gt[n]||kf(n):i.extend({},n);var o,f,c,s,e,l,r=[],u=!n.once&&[],a=function(t){for(f=n.memory&&t,c=!0,e=l||0,l=0,s=r.length,o=!0;r&&e<s;e++)if(r[e].apply(t[0],t[1])===!1&&n.stopOnFalse){f=!1;break}o=!1;r&&(u?u.length&&a(u.shift()):f?r=[]:h.disable())},h={add:function(){if(r){var t=r.length;(function u(t){i.each(t,function(t,f){var e=i.type(f);e==="function"?n.unique&&h.has(f)||r.push(f):f&&f.length&&e!=="string"&&u(f)})})(arguments);o?s=r.length:f&&(l=t,a(f))}return this},remove:function(){return r&&i.each(arguments,function(n,t){for(var u;(u=i.inArray(t,r,u))>-1;)r.splice(u,1),o&&(u<=s&&s--,u<=e&&e--)}),this},has:function(n){return n?i.inArray(n,r)>-1:!!(r&&r.length)},empty:function(){return r=[],this},disable:function(){return r=u=f=t,this},disabled:function(){return!r},lock:function(){return u=t,f||h.disable(),this},locked:function(){return!u},fireWith:function(n,t){return t=t||[],t=[n,t.slice?t.slice():t],r&&(!c||u)&&(o?u.push(t):a(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!c}};return h};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var s=e[0],o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[s+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return n!=null?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[n^1][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=r!==1||n&&i.isFunction(n.promise)?r:0,f=e===1?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?l.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);t<r;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});i.support=function(){var u,s,e,f,h,c,l,a,y,v,t=r.createElement("div");if(t.setAttribute("className","t"),t.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",s=t.getElementsByTagName("*"),e=t.getElementsByTagName("a")[0],!s||!e||!s.length)return{};h=r.createElement("select");l=h.appendChild(r.createElement("option"));f=t.getElementsByTagName("input")[0];e.style.cssText="top:1px;float:left;opacity:.5";u={getSetAttribute:t.className!=="t",leadingWhitespace:t.firstChild.nodeType===3,tbody:!t.getElementsByTagName("tbody").length,htmlSerialize:!!t.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.5/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:!!f.value,optSelected:l.selected,enctype:!!r.createElement("form").enctype,html5Clone:r.createElement("nav").cloneNode(!0).outerHTML!=="<:nav><\/:nav>",boxModel:r.compatMode==="CSS1Compat",deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1};f.checked=!0;u.noCloneChecked=f.cloneNode(!0).checked;h.disabled=!0;u.optDisabled=!l.disabled;try{delete t.test}catch(p){u.deleteExpando=!1}f=r.createElement("input");f.setAttribute("value","");u.input=f.getAttribute("value")==="";f.value="t";f.setAttribute("type","radio");u.radioValue=f.value==="t";f.setAttribute("checked","t");f.setAttribute("name","t");c=r.createDocumentFragment();c.appendChild(f);u.appendChecked=f.checked;u.checkClone=c.cloneNode(!0).cloneNode(!0).lastChild.checked;t.attachEvent&&(t.attachEvent("onclick",function(){u.noCloneEvent=!1}),t.cloneNode(!0).click());for(v in{submit:!0,change:!0,focusin:!0})t.setAttribute(a="on"+v,"t"),u[v+"Bubbles"]=a in n||t.attributes[a].expando===!1;return t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",u.clearCloneStyle=t.style.backgroundClip==="content-box",i(function(){var e,f,i,h="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=r.getElementsByTagName("body")[0];s&&(e=r.createElement("div"),e.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(e).appendChild(t),t.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",i=t.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",y=i[0].offsetHeight===0,i[0].style.display="",i[1].style.display="none",u.reliableHiddenOffsets=y&&i[0].offsetHeight===0,t.innerHTML="",t.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",u.boxSizing=t.offsetWidth===4,u.doesNotIncludeMarginInBodyOffset=s.offsetTop!==1,n.getComputedStyle&&(u.pixelPosition=(n.getComputedStyle(t,null)||{}).top!=="1%",u.boxSizingReliable=(n.getComputedStyle(t,null)||{width:"4px"}).width==="4px",f=t.appendChild(r.createElement("div")),f.style.cssText=t.style.cssText=h,f.style.marginRight=f.style.width="0",t.style.width="1px",u.reliableMarginRight=!parseFloat((n.getComputedStyle(f,null)||{}).marginRight)),typeof t.style.zoom!==o&&(t.innerHTML="",t.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",u.inlineBlockNeedsLayout=t.offsetWidth===3,t.style.display="block",t.innerHTML="<div><\/div>",t.firstChild.style.width="5px",u.shrinkWrapBlocks=t.offsetWidth!==3,u.inlineBlockNeedsLayout&&(s.style.zoom=1)),s.removeChild(e),e=t=i=f=null)}),s=h=c=l=e=f=null,u}();nr=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;tr=/([A-Z])/g;i.extend({cache:{},expando:"jQuery"+(wt+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ni(n)},data:function(n,t,i){return ir(n,t,i)},removeData:function(n,t){return rr(n,t)},_data:function(n,t,i){return ir(n,t,i,!0)},_removeData:function(n,t){return rr(n,t,!0)},acceptData:function(n){if(n.nodeType&&n.nodeType!==1&&n.nodeType!==9)return!1;var t=n.nodeName&&i.noData[n.nodeName.toLowerCase()];return!t||t!==!0&&n.getAttribute("classid")===t}});i.fn.extend({data:function(n,r){var e,f,u=this[0],o=0,s=null;if(n===t){if(this.length&&(s=i.data(u),u.nodeType===1&&!i._data(u,"parsedAttrs"))){for(e=u.attributes;o<e.length;o++)f=e[o].name,f.indexOf("data-")||(f=i.camelCase(f.slice(5)),ur(u,f,s[f]));i._data(u,"parsedAttrs",!0)}return s}return typeof n=="object"?this.each(function(){i.data(this,n)}):i.access(this,function(r){if(r===t)return u?ur(u,n,i.data(u,n)):null;this.each(function(){i.data(this,n,r)})},null,r,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[]},dequeue:function(n,t){t=t||"fx";var f=i.queue(n,t),e=f.length,r=f.shift(),u=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};r==="inprogress"&&(r=f.shift(),e--);u.cur=r;r&&(t==="fx"&&f.unshift("inprogress"),delete u.stop,r.call(n,o,u));!e&&u&&u.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,r){var u=2;return(typeof n!="string"&&(r=n,n="fx",u--),arguments.length<u)?i.queue(this[0],n):r===t?this:this.each(function(){var t=i.queue(this,n,r);i._queueHooks(this,n);n==="fx"&&t[0]!=="inprogress"&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},delay:function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,r){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for(typeof n!="string"&&(r=n,n=t),n=n||"fx";s--;)u=i._data(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(r)}});var k,fr,ti=/[\t\r\n]/g,df=/\r/g,gf=/^(?:input|select|textarea|button|object)$/i,ne=/^(?:a|area)$/i,er=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,ii=/^(?:checked|selected)$/i,a=i.support.getSetAttribute,ri=i.support.input;i.fn.extend({attr:function(n,t){return i.access(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})},prop:function(n,t){return i.access(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=t;delete this[n]}catch(i){}})},addClass:function(n){var e,t,r,u,o,f=0,h=this.length,c=typeof n=="string"&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(s)||[];f<h;f++)if(t=this[f],r=t.nodeType===1&&(t.className?(" "+t.className+" ").replace(ti," "):" "),r){for(o=0;u=e[o++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");t.className=i.trim(r)}return this},removeClass:function(n){var e,r,t,u,o,f=0,h=this.length,c=arguments.length===0||typeof n=="string"&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(s)||[];f<h;f++)if(r=this[f],t=r.nodeType===1&&(r.className?(" "+r.className+" ").replace(ti," "):""),t){for(o=0;u=e[o++];)while(t.indexOf(" "+u+" ")>=0)t=t.replace(" "+u+" "," ");r.className=n?i.trim(t):""}return this},toggleClass:function(n,t){var r=typeof n,u=typeof t=="boolean";return i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}):this.each(function(){if(r==="string")for(var f,c=0,h=i(this),e=t,l=n.match(s)||[];f=l[c++];)e=u?e:!h.hasClass(f),h[e?"addClass":"removeClass"](f);else(r===o||r==="boolean")&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;t<r;t++)if(this[t].nodeType===1&&(" "+this[t].className+" ").replace(ti," ").indexOf(i)>=0)return!0;return!1},val:function(n){var u,r,e,f=this[0];return arguments.length?(e=i.isFunction(n),this.each(function(u){var f,o=i(this);this.nodeType===1&&(f=e?n.call(this,u,o.val()):n,f==null?f="":typeof f=="number"?f+="":i.isArray(f)&&(f=i.map(f,function(n){return n==null?"":n+""})),r=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,f,"value")!==t||(this.value=f))})):f?(r=i.valHooks[f.type]||i.valHooks[f.nodeName.toLowerCase()],r&&"get"in r&&(u=r.get(f,"value"))!==t)?u:(u=f.value,typeof u=="string"?u.replace(df,""):u==null?"":u):void 0}});i.extend({valHooks:{option:{get:function(n){var t=n.attributes.value;return!t||t.specified?n.value:n.text}},select:{get:function(n){for(var e,t,o=n.options,r=n.selectedIndex,u=n.type==="select-one"||r<0,s=u?null:[],h=u?r+1:o.length,f=r<0?h:u?r:0;f<h;f++)if(t=o[f],(t.selected||f===r)&&(i.support.optDisabled?!t.disabled:t.getAttribute("disabled")===null)&&(!t.parentNode.disabled||!i.nodeName(t.parentNode,"optgroup"))){if(e=i(t).val(),u)return e;s.push(e)}return s},set:function(n,t){var r=i.makeArray(t);return i(n).find("option").each(function(){this.selected=i.inArray(i(this).val(),r)>=0}),r.length||(n.selectedIndex=-1),r}}},attr:function(n,r,u){var f,s,e,h=n.nodeType;if(n&&h!==3&&h!==8&&h!==2){if(typeof n.getAttribute===o)return i.prop(n,r,u);if(s=h!==1||!i.isXMLDoc(n),s&&(r=r.toLowerCase(),f=i.attrHooks[r]||(er.test(r)?fr:k)),u!==t)if(u===null)i.removeAttr(n,r);else return f&&s&&"set"in f&&(e=f.set(n,u,r))!==t?e:(n.setAttribute(r,u+""),u);else return f&&s&&"get"in f&&(e=f.get(n,r))!==null?e:(typeof n.getAttribute!==o&&(e=n.getAttribute(r)),e==null?t:e)}},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(s);if(f&&n.nodeType===1)while(r=f[e++])u=i.propFix[r]||r,er.test(r)?!a&&ii.test(r)?n[i.camelCase("default-"+r)]=n[u]=!1:n[u]=!1:i.attr(n,r,""),n.removeAttribute(a?r:u)},attrHooks:{type:{set:function(n,t){if(!i.support.radioValue&&t==="radio"&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(n,r,u){var e,f,s,o=n.nodeType;if(n&&o!==3&&o!==8&&o!==2)return s=o!==1||!i.isXMLDoc(n),s&&(r=i.propFix[r]||r,f=i.propHooks[r]),u!==t?f&&"set"in f&&(e=f.set(n,u,r))!==t?e:n[r]=u:f&&"get"in f&&(e=f.get(n,r))!==null?e:n[r]},propHooks:{tabIndex:{get:function(n){var i=n.getAttributeNode("tabindex");return i&&i.specified?parseInt(i.value,10):gf.test(n.nodeName)||ne.test(n.nodeName)&&n.href?0:t}}}});fr={get:function(n,r){var u=i.prop(n,r),f=typeof u=="boolean"&&n.getAttribute(r),e=typeof u=="boolean"?ri&&a?f!=null:ii.test(r)?n[i.camelCase("default-"+r)]:!!f:n.getAttributeNode(r);return e&&e.value!==!1?r.toLowerCase():t},set:function(n,t,r){return t===!1?i.removeAttr(n,r):ri&&a||!ii.test(r)?n.setAttribute(!a&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};ri&&a||(i.attrHooks.value={get:function(n,r){var u=n.getAttributeNode(r);return i.nodeName(n,"input")?n.defaultValue:u&&u.specified?u.value:t},set:function(n,t,r){if(i.nodeName(n,"input"))n.defaultValue=t;else return k&&k.set(n,t,r)}});a||(k=i.valHooks.button={get:function(n,i){var r=n.getAttributeNode(i);return r&&(i==="id"||i==="name"||i==="coords"?r.value!=="":r.specified)?r.value:t},set:function(n,i,r){var u=n.getAttributeNode(r);return u||n.setAttributeNode(u=n.ownerDocument.createAttribute(r)),u.value=i+="",r==="value"||i===n.getAttribute(r)?i:t}},i.attrHooks.contenteditable={get:k.get,set:function(n,t,i){k.set(n,t===""?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]=i.extend(i.attrHooks[t],{set:function(n,i){if(i==="")return n.setAttribute(t,"auto"),i}})}));i.support.hrefNormalized||(i.each(["href","src","width","height"],function(n,r){i.attrHooks[r]=i.extend(i.attrHooks[r],{get:function(n){var i=n.getAttribute(r,2);return i==null?t:i}})}),i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}}));i.support.style||(i.attrHooks.style={get:function(n){return n.style.cssText||t},set:function(n,t){return n.style.cssText=t+""}});i.support.optSelected||(i.propHooks.selected=i.extend(i.propHooks.selected,{get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}));i.support.enctype||(i.propFix.enctype="encoding");i.support.checkOn||i.each(["radio","checkbox"],function(){i.valHooks[this]={get:function(n){return n.getAttribute("value")===null?"on":n.value}}});i.each(["radio","checkbox"],function(){i.valHooks[this]=i.extend(i.valHooks[this],{set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}})});var ui=/^(?:input|select|textarea)$/i,te=/^key/,ie=/^(?:mouse|contextmenu)|click/,or=/^(?:focusinfocus|focusoutblur)$/,sr=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,r,u,f,e){var b,p,k,w,c,l,a,v,h,d,g,y=i._data(n);if(y){for(u.handler&&(w=u,u=w.handler,e=w.selector),u.guid||(u.guid=i.guid++),(p=y.events)||(p=y.events={}),(l=y.handle)||(l=y.handle=function(n){return typeof i!==o&&(!n||i.event.triggered!==n.type)?i.event.dispatch.apply(l.elem,arguments):t},l.elem=n),r=(r||"").match(s)||[""],k=r.length;k--;)b=sr.exec(r[k])||[],h=g=b[1],d=(b[2]||"").split(".").sort(),c=i.event.special[h]||{},h=(e?c.delegateType:c.bindType)||h,c=i.event.special[h]||{},a=i.extend({type:h,origType:g,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:d.join(".")},w),(v=p[h])||(v=p[h]=[],v.delegateCount=0,c.setup&&c.setup.call(n,f,d,l)!==!1||(n.addEventListener?n.addEventListener(h,l,!1):n.attachEvent&&n.attachEvent("on"+h,l))),c.add&&(c.add.call(n,a),a.handler.guid||(a.handler.guid=u.guid)),e?v.splice(v.delegateCount++,0,a):v.push(a),i.event.global[h]=!0;n=null}},remove:function(n,t,r,u,f){var y,o,h,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(s)||[""],p=t.length;p--;){if(h=sr.exec(t[p])||[],e=k=h[1],w=(h[2]||"").split(".").sort(),!e){for(e in a)i.event.remove(n,e+t[p],r,u,!0);continue}for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],h=h[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],(f||k===o.origType)&&(!r||r.guid===o.guid)&&(!h||h.test(o.namespace))&&(!u||u===o.selector||u==="**"&&o.selector)&&(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(u,f,e,o){var a,v,h,p,l,c,w,b=[e||r],s=it.call(u,"type")?u.type:u,y=it.call(u,"namespace")?u.namespace.split("."):[];if((h=c=e=e||r,e.nodeType!==3&&e.nodeType!==8)&&!or.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(y=s.split("."),s=y.shift(),y.sort()),v=s.indexOf(":")<0&&"on"+s,u=u[i.expando]?u:new i.Event(s,typeof u=="object"&&u),u.isTrigger=!0,u.namespace=y.join("."),u.namespace_re=u.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u.result=t,u.target||(u.target=e),f=f==null?[u]:i.makeArray(f,[u]),l=i.event.special[s]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(p=l.delegateType||s,or.test(p+s)||(h=h.parentNode);h;h=h.parentNode)b.push(h),c=h;c===(e.ownerDocument||r)&&b.push(c.defaultView||c.parentWindow||n)}for(w=0;(h=b[w++])&&!u.isPropagationStopped();)u.type=w>1?p:l.bindType||s,a=(i._data(h,"events")||{})[u.type]&&i._data(h,"handle"),a&&a.apply(h,f),a=v&&h[v],a&&i.acceptData(h)&&a.apply&&a.apply(h,f)===!1&&u.preventDefault();if(u.type=s,!o&&!u.isDefaultPrevented()&&(!l._default||l._default.apply(e.ownerDocument,f)===!1)&&!(s==="click"&&i.nodeName(e,"a"))&&i.acceptData(e)&&v&&e[s]&&!i.isWindow(e)){c=e[v];c&&(e[v]=null);i.event.triggered=s;try{e[s]()}catch(k){}i.event.triggered=t;c&&(e[v]=c)}return u.result}},dispatch:function(n){n=i.event.fix(n);var o,e,r,u,s,h=[],c=l.call(arguments),a=(i._data(this,"events")||{})[n.type]||[],f=i.event.special[n.type]||{};if(c[0]=n,n.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,n)!==!1){for(h=i.event.handlers.call(this,n,a),o=0;(u=h[o++])&&!n.isPropagationStopped();)for(n.currentTarget=u.elem,s=0;(r=u.handlers[s++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(r.namespace))&&(n.handleObj=r,n.data=r.data,e=((i.event.special[r.origType]||{}).handle||r.handler).apply(u.elem,c),e!==t&&(n.result=e)===!1&&(n.preventDefault(),n.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,n),n.result}},handlers:function(n,r){var e,o,f,s,c=[],h=r.delegateCount,u=n.target;if(h&&u.nodeType&&(!n.button||n.type!=="click"))for(;u!=this;u=u.parentNode||this)if(u.nodeType===1&&(u.disabled!==!0||n.type!=="click")){for(f=[],s=0;s<h;s++)o=r[s],e=o.selector+" ",f[e]===t&&(f[e]=o.needsContext?i(e,this).index(u)>=0:i.find(e,this,null,[u]).length),f[e]&&f.push(o);f.length&&c.push({elem:u,handlers:f})}return h<r.length&&c.push({elem:this,handlers:r.slice(h)}),c},fix:function(n){if(n[i.expando])return n;var e,o,s,u=n.type,f=n,t=this.fixHooks[u];for(t||(this.fixHooks[u]=t=ie.test(u)?this.mouseHooks:te.test(u)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||r),n.target.nodeType===3&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return n.which==null&&(n.which=t.charCode!=null?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,i){var u,o,f,e=i.button,s=i.fromElement;return n.pageX==null&&i.clientX!=null&&(o=n.target.ownerDocument||r,f=o.documentElement,u=o.body,n.pageX=i.clientX+(f&&f.scrollLeft||u&&u.scrollLeft||0)-(f&&f.clientLeft||u&&u.clientLeft||0),n.pageY=i.clientY+(f&&f.scrollTop||u&&u.scrollTop||0)-(f&&f.clientTop||u&&u.clientTop||0)),!n.relatedTarget&&s&&(n.relatedTarget=s===n.target?i.toElement:s),n.which||e===t||(n.which=e&1?1:e&2?3:e&4?2:0),n}},special:{load:{noBubble:!0},click:{trigger:function(){if(i.nodeName(this,"input")&&this.type==="checkbox"&&this.click)return this.click(),!1}},focus:{trigger:function(){if(this!==r.activeElement&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===r.activeElement&&this.blur)return this.blur(),!1},delegateType:"focusout"},beforeunload:{postDispatch:function(n){n.result!==t&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=r.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===o&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){if(!(this instanceof i.Event))return new i.Event(n,t);n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.returnValue===!1||n.getPreventDefault&&n.getPreventDefault()?ht:d):this.type=n;t&&i.extend(this,t);this.timeStamp=n&&n.timeStamp||i.now();this[i.expando]=!0};i.Event.prototype={isDefaultPrevented:d,isPropagationStopped:d,isImmediatePropagationStopped:d,preventDefault:function(){var n=this.originalEvent;(this.isDefaultPrevented=ht,n)&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;(this.isPropagationStopped=ht,n)&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ht;this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return r&&(r===f||i.contains(f,r))||(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});i.support.submitBubbles||(i.event.special.submit={setup:function(){if(i.nodeName(this,"form"))return!1;i.event.add(this,"click._submit keypress._submit",function(n){var u=n.target,r=i.nodeName(u,"input")||i.nodeName(u,"button")?u.form:t;r&&!i._data(r,"submitBubbles")&&(i.event.add(r,"submit._submit",function(n){n._submit_bubble=!0}),i._data(r,"submitBubbles",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){if(i.nodeName(this,"form"))return!1;i.event.remove(this,"._submit")}});i.support.changeBubbles||(i.event.special.change={setup:function(){if(ui.test(this.nodeName))return(this.type==="checkbox"||this.type==="radio")&&(i.event.add(this,"propertychange._change",function(n){n.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1;i.event.add(this,"beforeactivate._change",function(n){var t=n.target;ui.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!ui.test(this.nodeName)}});i.support.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=0,f=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){u++==0&&r.addEventListener(n,f,!0)},teardown:function(){--u==0&&r.removeEventListener(n,f,!0)}}});i.fn.extend({on:function(n,r,u,f,e){var s,o;if(typeof n=="object"){typeof r!="string"&&(u=u||r,r=t);for(s in n)this.on(s,r,u,n[s],e);return this}if(u==null&&f==null?(f=r,u=r=t):f==null&&(typeof r=="string"?(f=u,u=t):(f=u,u=r,r=t)),f===!1)f=d;else if(!f)return this;return e===1&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),this.each(function(){i.event.add(this,n,f,u,r)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,r,u){var f,e;if(n&&n.preventDefault&&n.handleObj)return f=n.handleObj,i(n.delegateTarget).off(f.namespace?f.origType+"."+f.namespace:f.origType,f.selector,f.handler),this;if(typeof n=="object"){for(e in n)this.off(e,r,n[e]);return this}return(r===!1||typeof r=="function")&&(u=r,r=t),u===!1&&(u=d),this.each(function(){i.event.remove(this,n,u,r)})},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return arguments.length===1?this.off(n,"**"):this.off(t,n||"**",i)},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}}),function(n,t){function ti(n){return tr.test(n+"")}function ii(){var n,t=[];return n=function(i,u){return t.push(i+=" ")>r.cacheLength&&delete n[t.shift()],n[i]=u}}function l(n){return n[f]=!0,n}function b(n){var t=s.createElement("div");try{return n(t)}catch(i){return!1}finally{t=null}}function u(n,t,i,r){var y,u,e,l,p,v,w,h,d,b;if((t?t.ownerDocument||t:k)!==s&&it(t),t=t||s,i=i||[],!n||typeof n!="string")return i;if((l=t.nodeType)!==1&&l!==9)return[];if(!c&&!r){if(y=ir.exec(n))if(e=y[1]){if(l===9)if(u=t.getElementById(e),u&&u.parentNode){if(u.id===e)return i.push(u),i}else return i;else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(e))&&et(t,u)&&u.id===e)return i.push(u),i}else{if(y[2])return ut.apply(i,ft.call(t.getElementsByTagName(n),0)),i;if((e=y[3])&&o.getByClassName&&t.getElementsByClassName)return ut.apply(i,ft.call(t.getElementsByClassName(e),0)),i}if(o.qsa&&!a.test(n)){if(w=!0,h=f,d=t,b=l===9&&n,l===1&&t.nodeName.toLowerCase()!=="object"){for(v=yt(n),(w=t.getAttribute("id"))?h=w.replace(fr,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",p=v.length;p--;)v[p]=h+pt(v[p]);d=ni.test(n)&&t.parentNode||t;b=v.join(",")}if(b)try{return ut.apply(i,ft.call(d.querySelectorAll(b),0)),i}catch(g){}finally{w||t.removeAttribute("id")}}}return lr(n.replace(at,"$1"),t,i,r)}function yi(n,t){var i=t&&n,r=i&&(~t.sourceIndex||li)-(~n.sourceIndex||li);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function or(n){return function(t){var i=t.nodeName.toLowerCase();return i==="input"&&t.type===n}}function sr(n){return function(t){var i=t.nodeName.toLowerCase();return(i==="input"||i==="button")&&t.type===n}}function g(n){return l(function(t){return t=+t,l(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function yt(n,t){var e,f,s,o,i,h,c,l=hi[n+" "];if(l)return t?0:l.slice(0);for(i=n,h=[],c=r.preFilter;i;){(!e||(f=ki.exec(i)))&&(f&&(i=i.slice(f[0].length)||i),h.push(s=[]));e=!1;(f=di.exec(i))&&(e=f.shift(),s.push({value:e,type:f[0].replace(at," ")}),i=i.slice(e.length));for(o in r.filter)(f=vt[o].exec(i))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),i=i.slice(e.length));if(!e)break}return t?i.length:i?u.error(n):hi(n,h).slice(0)}function pt(n){for(var t=0,r=n.length,i="";t<r;t++)i+=n[t].value;return i}function ri(n,t,i){var r=t.dir,u=i&&r==="parentNode",e=wi++;return t.first?function(t,i,f){while(t=t[r])if(t.nodeType===1||u)return n(t,i,f)}:function(t,i,o){var h,s,c,l=v+" "+e;if(o){while(t=t[r])if((t.nodeType===1||u)&&n(t,i,o))return!0}else while(t=t[r])if(t.nodeType===1||u)if(c=t[f]||(t[f]={}),(s=c[r])&&s[0]===l){if((h=s[1])===!0||h===ot)return h===!0}else if(s=c[r]=[l],s[1]=n(t,i,o)||ot,s[1]===!0)return!0}}function ui(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function wt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=t!=null;f<s;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function fi(n,t,i,r,u,e){return r&&!r[f]&&(r=fi(r)),u&&!u[f]&&(u=fi(u,e)),l(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,b=f||cr(t||"*",o.nodeType?[o]:o,[]),v=n&&(f||!t)?wt(b,p,n,o,s):b,h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=wt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?dt.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=wt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):ut.apply(e,h)})}function ei(n){for(var s,u,i,o=n.length,h=r.relative[n[0].type],c=h||r.relative[" "],t=h?1:0,l=ri(function(n){return n===s},c,!0),a=ri(function(n){return dt.call(s,n)>-1},c,!0),e=[function(n,t,i){return!h&&(i||t!==ht)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];t<o;t++)if(u=r.relative[n[t].type])e=[ri(ui(e),u)];else{if(u=r.filter[n[t].type].apply(null,n[t].matches),u[f]){for(i=++t;i<o;i++)if(r.relative[n[i].type])break;return fi(t>1&&ui(e),t>1&&pt(n.slice(0,t-1)).replace(at,"$1"),u,t<i&&ei(n.slice(t,i)),i<o&&ei(n=n.slice(i)),i<o&&pt(n))}e.push(u)}return ui(e)}function hr(n,t){var f=0,i=t.length>0,e=n.length>0,o=function(o,h,c,l,a){var p,d,b,w=[],k=0,y="0",g=o&&[],nt=a!=null,tt=ht,rt=o||e&&r.find.TAG("*",a&&h.parentNode||h),it=v+=tt==null?1:Math.random()||.1;for(nt&&(ht=h!==s&&h,ot=f);(p=rt[y])!=null;y++){if(e&&p){for(d=0;b=n[d++];)if(b(p,h,c)){l.push(p);break}nt&&(v=it,ot=++f)}i&&((p=!b&&p)&&k--,o&&g.push(p))}if(k+=y,i&&y!==k){for(d=0;b=t[d++];)b(g,w,h,c);if(o){if(k>0)while(y--)g[y]||w[y]||(w[y]=bi.call(l));w=wt(w)}ut.apply(l,w);nt&&!o&&w.length>0&&k+t.length>1&&u.uniqueSort(l)}return nt&&(v=it,ht=tt),g};return i?l(o):o}function cr(n,t,i){for(var r=0,f=t.length;r<f;r++)u(n,t[r],i);return i}function lr(n,t,i,u){var o,f,e,h,l,s=yt(n);if(!u&&s.length===1){if(f=s[0]=s[0].slice(0),f.length>2&&(e=f[0]).type==="ID"&&t.nodeType===9&&!c&&r.relative[f[1].type]){if(t=r.find.ID(e.matches[0].replace(p,w),t)[0],!t)return i;n=n.slice(f.shift().value.length)}for(o=vt.needsContext.test(n)?0:f.length;o--;){if(e=f[o],r.relative[h=e.type])break;if((l=r.find[h])&&(u=l(e.matches[0].replace(p,w),ni.test(f[0].type)&&t.parentNode||t))){if(f.splice(o,1),n=u.length&&pt(f),!n)return ut.apply(i,ft.call(u,0)),i;break}}}return bt(n,s)(u,t,c,i,ni.test(n)),i}function pi(){}var nt,ot,r,st,oi,bt,tt,ht,it,s,h,c,a,rt,ct,et,kt,f="sizzle"+-new Date,k=n.document,o={},v=0,wi=0,si=ii(),hi=ii(),ci=ii(),y=typeof t,li=-2147483648,lt=[],bi=lt.pop,ut=lt.push,ft=lt.slice,dt=lt.indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(this[t]===n)return t;return-1},e="[\\x20\\t\\r\\n\\f]",d="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ai=d.replace("w","w#"),vi="\\["+e+"*("+d+")"+e+"*(?:([*^$|!~]?=)"+e+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ai+")|)|)"+e+"*\\]",gt=":("+d+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+vi.replace(3,8)+")*)|.*)\\)|)",at=new RegExp("^"+e+"+|((?:^|[^\\\\])(?:\\\\.)*)"+e+"+$","g"),ki=new RegExp("^"+e+"*,"+e+"*"),di=new RegExp("^"+e+"*([\\x20\\t\\r\\n\\f>+~])"+e+"*"),gi=new RegExp(gt),nr=new RegExp("^"+ai+"$"),vt={ID:new RegExp("^#("+d+")"),CLASS:new RegExp("^\\.("+d+")"),NAME:new RegExp("^\\[name=['\"]?("+d+")['\"]?\\]"),TAG:new RegExp("^("+d.replace("w","w*")+")"),ATTR:new RegExp("^"+vi),PSEUDO:new RegExp("^"+gt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+e+"*(even|odd|(([+-]|)(\\d*)n|)"+e+"*(?:([+-]|)"+e+"*(\\d+)|))"+e+"*\\)|)","i"),needsContext:new RegExp("^"+e+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+e+"*((?:-\\d)?\\d*)"+e+"*\\)|)(?=[^-]|$)","i")},ni=/[\x20\t\r\n\f]*[+~]/,tr=/^[^{]+\{\s*\[native code/,ir=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rr=/^(?:input|select|textarea|button)$/i,ur=/^h\d$/i,fr=/'|\\/g,er=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,p=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,w=function(n,t){var i="0x"+t-65536;return i!==i?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)};try{ft.call(k.documentElement.childNodes,0)[0].nodeType}catch(ar){ft=function(n){for(var t,i=[];t=this[n++];)i.push(t);return i}}oi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?t.nodeName!=="HTML":!1};it=u.setDocument=function(n){var i=n?n.ownerDocument||n:k;return i===s||i.nodeType!==9||!i.documentElement?s:(s=i,h=i.documentElement,c=oi(i),o.tagNameNoComments=b(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),o.attributes=b(function(n){n.innerHTML="<select><\/select>";var t=typeof n.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),o.getByClassName=b(function(n){return(n.innerHTML="<div class='hidden e'><\/div><div class='hidden'><\/div>",!n.getElementsByClassName||!n.getElementsByClassName("e").length)?!1:(n.lastChild.className="e",n.getElementsByClassName("e").length===2)}),o.getByName=b(function(n){n.id=f+0;n.innerHTML="<a name='"+f+"'><\/a><div name='"+f+"'><\/div>";h.insertBefore(n,h.firstChild);var t=i.getElementsByName&&i.getElementsByName(f).length===2+i.getElementsByName(f+0).length;return o.getIdNotName=!i.getElementById(f),h.removeChild(n),t}),r.attrHandle=b(function(n){return n.innerHTML="<a href='#'><\/a>",n.firstChild&&typeof n.firstChild.getAttribute!==y&&n.firstChild.getAttribute("href")==="#"})?{}:{href:function(n){return n.getAttribute("href",2)},type:function(n){return n.getAttribute("type")}},o.getIdNotName?(r.find.ID=function(n,t){if(typeof t.getElementById!==y&&!c){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},r.filter.ID=function(n){var t=n.replace(p,w);return function(n){return n.getAttribute("id")===t}}):(r.find.ID=function(n,i){if(typeof i.getElementById!==y&&!c){var r=i.getElementById(n);return r?r.id===n||typeof r.getAttributeNode!==y&&r.getAttributeNode("id").value===n?[r]:t:[]}},r.filter.ID=function(n){var t=n.replace(p,w);return function(n){var i=typeof n.getAttributeNode!==y&&n.getAttributeNode("id");return i&&i.value===t}}),r.find.TAG=o.tagNameNoComments?function(n,t){if(typeof t.getElementsByTagName!==y)return t.getElementsByTagName(n)}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if(n==="*"){while(i=u[f++])i.nodeType===1&&r.push(i);return r}return u},r.find.NAME=o.getByName&&function(n,t){if(typeof t.getElementsByName!==y)return t.getElementsByName(name)},r.find.CLASS=o.getByClassName&&function(n,t){if(typeof t.getElementsByClassName!==y&&!c)return t.getElementsByClassName(n)},rt=[],a=[":focus"],(o.qsa=ti(i.querySelectorAll))&&(b(function(n){n.innerHTML="<select><option selected=''><\/option><\/select>";n.querySelectorAll("[selected]").length||a.push("\\["+e+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)");n.querySelectorAll(":checked").length||a.push(":checked")}),b(function(n){n.innerHTML="<input type='hidden' i=''/>";n.querySelectorAll("[i^='']").length&&a.push("[*^$]="+e+"*(?:\"\"|'')");n.querySelectorAll(":enabled").length||a.push(":enabled",":disabled");n.querySelectorAll("*,:x");a.push(",.*:")})),(o.matchesSelector=ti(ct=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&b(function(n){o.disconnectedMatch=ct.call(n,"div");ct.call(n,"[s!='']:x");rt.push("!=",gt)}),a=new RegExp(a.join("|")),rt=new RegExp(rt.join("|")),et=ti(h.contains)||h.compareDocumentPosition?function(n,t){var r=n.nodeType===9?n.documentElement:n,i=t&&t.parentNode;return n===i||!!(i&&i.nodeType===1&&(r.contains?r.contains(i):n.compareDocumentPosition&&n.compareDocumentPosition(i)&16))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},kt=h.compareDocumentPosition?function(n,t){var r;return n===t?(tt=!0,0):(r=t.compareDocumentPosition&&n.compareDocumentPosition&&n.compareDocumentPosition(t))?r&1||n.parentNode&&n.parentNode.nodeType===11?n===i||et(k,n)?-1:t===i||et(k,t)?1:0:r&4?-1:1:n.compareDocumentPosition?-1:1}:function(n,t){var r,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(n===t)return tt=!0,0;if(o&&s){if(o===s)return yi(n,t)}else return n===i?-1:t===i?1:o?-1:s?1:0;for(r=n;r=r.parentNode;)f.unshift(r);for(r=t;r=r.parentNode;)e.unshift(r);while(f[u]===e[u])u++;return u?yi(f[u],e[u]):f[u]===k?-1:e[u]===k?1:0},tt=!1,[0,0].sort(kt),o.detectDuplicates=tt,s)};u.matches=function(n,t){return u(n,null,null,t)};u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==s&&it(n),t=t.replace(er,"='$1']"),o.matchesSelector&&!c&&(!rt||!rt.test(t))&&!a.test(t))try{var i=ct.call(n,t);if(i||o.disconnectedMatch||n.document&&n.document.nodeType!==11)return i}catch(r){}return u(t,s,null,[n]).length>0};u.contains=function(n,t){return(n.ownerDocument||n)!==s&&it(n),et(n,t)};u.attr=function(n,t){var i;return((n.ownerDocument||n)!==s&&it(n),c||(t=t.toLowerCase()),i=r.attrHandle[t])?i(n):c||o.attributes?n.getAttribute(t):((i=n.getAttributeNode(t))||n.getAttribute(t))&&n[t]===!0?t:i&&i.specified?i.value:null};u.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};u.uniqueSort=function(n){var r,u=[],t=1,i=0;if(tt=!o.detectDuplicates,n.sort(kt),tt){for(;r=n[t];t++)r===n[t-1]&&(i=u.push(t));while(i--)n.splice(u[i],1)}return n};st=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(t===1||t===9||t===11){if(typeof n.textContent=="string")return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(t===3||t===4)return n.nodeValue}else for(;r=n[u];u++)i+=st(r);return i};r=u.selectors={cacheLength:50,createPseudo:l,match:vt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(p,w),n[3]=(n[4]||n[5]||"").replace(p,w),n[2]==="~="&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),n[1].slice(0,3)==="nth"?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*(n[3]==="even"||n[3]==="odd")),n[5]=+(n[7]+n[8]||n[3]==="odd")):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[5]&&n[2];return vt.CHILD.test(n[0])?null:(n[4]?n[2]=n[4]:t&&gi.test(t)&&(i=yt(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){return n==="*"?function(){return!0}:(n=n.replace(p,w).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===n})},CLASS:function(n){var t=si[n+" "];return t||(t=new RegExp("(^|"+e+")"+n+"("+e+"|$)"))&&si(n,function(n){return t.test(n.className||typeof n.getAttribute!==y&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return f==null?t==="!=":t?(f+="",t==="="?f===i:t==="!="?f!==i:t==="^="?i&&f.indexOf(i)===0:t==="*="?i&&f.indexOf(i)>-1:t==="$="?i&&f.slice(-i.length)===i:t==="~="?(" "+f+" ").indexOf(i)>-1:t==="|="?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s=n.slice(0,3)!=="nth",o=n.slice(-4)!=="last",e=t==="of-type";return r===1&&u===0?function(n){return!!n.parentNode}:function(t,i,h){var a,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:c.nodeType===1)return!1;w=b=n==="only"&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),a=k[n]||[],y=a[0]===v&&a[1],l=a[0]===v&&a[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(c.nodeType===1&&++l&&c===t){k[n]=[v,y,l];break}}else if(d&&(a=(t[f]||(t[f]={}))[n])&&a[0]===v)l=a[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[v,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,t){var e,i=r.pseudos[n]||r.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return i[f]?i(t):i.length>1?(e=[n,n,"",t],r.setFilters.hasOwnProperty(n.toLowerCase())?l(function(n,r){for(var u,f=i(n,t),e=f.length;e--;)u=dt.call(n,f[e]),n[u]=!(r[u]=f[e])}):function(n){return i(n,0,e)}):i}},pseudos:{not:l(function(n){var i=[],r=[],t=bt(n.replace(at,"$1"));return t[f]?l(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:l(function(n){return function(t){return u(n,t).length>0}}),contains:l(function(n){return function(t){return(t.textContent||t.innerText||st(t)).indexOf(n)>-1}}),lang:l(function(n){return nr.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(p,w).toLowerCase(),function(t){var i;do if(i=c?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return i=i.toLowerCase(),i===n||i.indexOf(n+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===h},focus:function(n){return n===s.activeElement&&(!s.hasFocus||s.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&!!n.checked||t==="option"&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeName>"@"||n.nodeType===3||n.nodeType===4)return!1;return!0},parent:function(n){return!r.pseudos.empty(n)},header:function(n){return ur.test(n.nodeName)},input:function(n){return rr.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&n.type==="button"||t==="button"},text:function(n){var t;return n.nodeName.toLowerCase()==="input"&&n.type==="text"&&((t=n.getAttribute("type"))==null||t.toLowerCase()===n.type)},first:g(function(){return[0]}),last:g(function(n,t){return[t-1]}),eq:g(function(n,t,i){return[i<0?i+t:i]}),even:g(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:g(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:g(function(n,t,i){for(var r=i<0?i+t:i;--r>=0;)n.push(r);return n}),gt:g(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}};for(nt in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[nt]=or(nt);for(nt in{submit:!0,reset:!0})r.pseudos[nt]=sr(nt);bt=u.compile=function(n,t){var r,u=[],e=[],i=ci[n+" "];if(!i){for(t||(t=yt(n)),r=t.length;r--;)i=ei(t[r]),i[f]?u.push(i):e.push(i);i=ci(n,hr(e,u))}return i};r.pseudos.nth=r.pseudos.eq;r.filters=pi.prototype=r.pseudos;r.setFilters=new pi;it();u.attr=i.attr;i.find=u;i.expr=u.selectors;i.expr[":"]=i.expr.pseudos;i.unique=u.uniqueSort;i.text=u.getText;i.isXMLDoc=u.isXML;i.contains=u.contains}(n);var re=/Until$/,ue=/^(?:parents|prev(?:Until|All))/,fe=/^.[^:#\[\.,]*$/,hr=i.expr.match.needsContext,ee={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({find:function(n){var t,r,f,u=this.length;if(typeof n!="string")return f=this,this.pushStack(i(n).filter(function(){for(t=0;t<u;t++)if(i.contains(f[t],this))return!0}));for(r=[],t=0;t<u;t++)i.find(n,this[t],r);return r=this.pushStack(u>1?i.unique(r):r),r.selector=(this.selector?this.selector+" ":"")+n,r},has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;t<u;t++)if(i.contains(this,r[t]))return!0})},not:function(n){return this.pushStack(lr(this,n,!1))},filter:function(n){return this.pushStack(lr(this,n,!0))},is:function(n){return!!n&&(typeof n=="string"?hr.test(n)?i(n,this.context).index(this[0])>=0:i.filter(n,this).length>0:this.filter(n).length>0)},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=hr.test(n)||typeof n!="string"?i(n,t||this.context):0;f<o;f++)for(r=this[f];r&&r.ownerDocument&&r!==t&&r.nodeType!==11;){if(e?e.index(r)>-1:i.find.matchesSelector(r,n)){u.push(r);break}r=r.parentNode}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?typeof n=="string"?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){var r=typeof n=="string"?i(n,t):i.makeArray(n&&n.nodeType?[n]:n),u=i.merge(this.get(),r);return this.pushStack(i.unique(u))},addBack:function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))}});i.fn.andSelf=i.fn.addBack;i.each({parent:function(n){var t=n.parentNode;return t&&t.nodeType!==11?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return cr(n,"nextSibling")},prev:function(n){return cr(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return re.test(n)||(u=r),u&&typeof u=="string"&&(f=i.filter(u,f)),f=this.length>1&&!ee[n]?i.unique(f):f,this.length>1&&ue.test(n)&&(f=f.reverse()),this.pushStack(f)}});i.extend({filter:function(n,t,r){return r&&(n=":not("+n+")"),t.length===1?i.find.matchesSelector(t[0],n)?[t[0]]:[]:i.find.matches(n,t)},dir:function(n,r,u){for(var e=[],f=n[r];f&&f.nodeType!==9&&(u===t||f.nodeType!==1||!i(f).is(u));)f.nodeType===1&&e.push(f),f=f[r];return e},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)n.nodeType===1&&n!==t&&i.push(n);return i}});var vr="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",oe=/ jQuery\d+="(?:null|\d+)"/g,yr=new RegExp("<(?:"+vr+")[\\s/>]","i"),fi=/^\s+/,pr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,wr=/<([\w:]+)/,br=/<tbody/i,se=/<|&#?\w+;/,he=/<(?:script|style|link)/i,ei=/^(?:checkbox|radio)$/i,ce=/checked\s*(?:[^=]|=\s*.checked.)/i,kr=/^$|\/(?:java|ecma)script/i,le=/^true\/(.*)/,ae=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,e={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:i.support.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},ve=ar(r),oi=ve.appendChild(r.createElement("div"));e.optgroup=e.option;e.tbody=e.tfoot=e.colgroup=e.caption=e.thead;e.th=e.td;i.fn.extend({text:function(n){return i.access(this,function(n){return n===t?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(n))},null,n,arguments.length)},wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&n.firstChild.nodeType===1;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(n){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&this.appendChild(n)})},prepend:function(){return this.domManip(arguments,!0,function(n){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&this.insertBefore(n,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,!1,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,f=0;(r=this[f])!=null;f++)(!n||i.filter(n,[r]).length>0)&&(t||r.nodeType!==1||i.cleanData(u(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&si(u(r,"script")),r.parentNode.removeChild(r)));return this},empty:function(){for(var n,t=0;(n=this[t])!=null;t++){for(n.nodeType===1&&i.cleanData(u(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=n==null?!1:n,t=t==null?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return i.access(this,function(n){var r=this[0]||{},f=0,o=this.length;if(n===t)return r.nodeType===1?r.innerHTML.replace(oe,""):t;if(typeof n=="string"&&!he.test(n)&&(i.support.htmlSerialize||!yr.test(n))&&(i.support.leadingWhitespace||!fi.test(n))&&!e[(wr.exec(n)||["",""])[1].toLowerCase()]){n=n.replace(pr,"<$1><\/$2>");try{for(;f<o;f++)r=this[f]||{},r.nodeType===1&&(i.cleanData(u(r,!1)),r.innerHTML=n);r=0}catch(s){}}r&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(n){var t=i.isFunction(n);return t||typeof n=="string"||(n=i(n).not(this).detach()),this.domManip([n],!0,function(n){var r=this.nextSibling,t=this.parentNode;t&&(i(this).remove(),t.insertBefore(n,r))})},detach:function(n){return this.remove(n,!0)},domManip:function(n,r,f){n=bi.apply([],n);var c,e,l,s,y,h,o=0,a=this.length,w=this,b=a-1,v=n[0],p=i.isFunction(v);if(p||!(a<=1||typeof v!="string"||i.support.checkClone||!ce.test(v)))return this.each(function(i){var u=w.eq(i);p&&(n[0]=v.call(this,i,r?u.html():t));u.domManip(n,r,f)});if(a&&(h=i.buildFragment(n,this[0].ownerDocument,!1,this),c=h.firstChild,h.childNodes.length===1&&(h=c),c)){for(r=r&&i.nodeName(c,"tr"),s=i.map(u(h,"script"),dr),l=s.length;o<a;o++)e=h,o!==b&&(e=i.clone(e,!0,!0),l&&i.merge(s,u(e,"script"))),f.call(r&&i.nodeName(this[o],"table")?ye(this[o],"tbody"):this[o],e,o);if(l)for(y=s[s.length-1].ownerDocument,i.map(s,gr),o=0;o<l;o++)e=s[o],kr.test(e.type||"")&&!i._data(e,"globalEval")&&i.contains(y,e)&&(e.src?i.ajax({url:e.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):i.globalEval((e.text||e.textContent||e.innerHTML||"").replace(ae,"")));h=c=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;r<=o;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),bt.apply(f,u.get());return this.pushStack(f)}});i.extend({clone:function(n,t,r){var f,h,o,e,s,c=i.contains(n.ownerDocument,n);if(i.support.html5Clone||i.isXMLDoc(n)||!yr.test("<"+n.nodeName+">")?o=n.cloneNode(!0):(oi.innerHTML=n.outerHTML,oi.removeChild(o=oi.firstChild)),(!i.support.noCloneEvent||!i.support.noCloneChecked)&&(n.nodeType===1||n.nodeType===11)&&!i.isXMLDoc(n))for(f=u(o),s=u(n),e=0;(h=s[e])!=null;++e)f[e]&&pe(h,f[e]);if(t)if(r)for(s=s||u(n),f=f||u(o),e=0;(h=s[e])!=null;e++)nu(h,f[e]);else nu(n,o);return f=u(o,"script"),f.length>0&&si(f,!c&&u(n,"script")),f=s=h=null,o},buildFragment:function(n,t,r,f){for(var h,o,w,s,y,p,l,b=n.length,a=ar(t),c=[],v=0;v<b;v++)if(o=n[v],o||o===0)if(i.type(o)==="object")i.merge(c,o.nodeType?[o]:o);else if(se.test(o)){for(s=s||a.appendChild(t.createElement("div")),y=(wr.exec(o)||["",""])[1].toLowerCase(),l=e[y]||e._default,s.innerHTML=l[1]+o.replace(pr,"<$1><\/$2>")+l[2],h=l[0];h--;)s=s.lastChild;if(!i.support.leadingWhitespace&&fi.test(o)&&c.push(t.createTextNode(fi.exec(o)[0])),!i.support.tbody)for(o=y==="table"&&!br.test(o)?s.firstChild:l[1]==="<table>"&&!br.test(o)?s:0,h=o&&o.childNodes.length;h--;)i.nodeName(p=o.childNodes[h],"tbody")&&!p.childNodes.length&&o.removeChild(p);for(i.merge(c,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=a.lastChild}else c.push(t.createTextNode(o));for(s&&a.removeChild(s),i.support.appendChecked||i.grep(u(c,"input"),we),v=0;o=c[v++];)if((!f||i.inArray(o,f)===-1)&&(w=i.contains(o.ownerDocument,o),s=u(a.appendChild(o),"script"),w&&si(s),r))for(h=0;o=s[h++];)kr.test(o.type||"")&&r.push(o);return s=null,a},cleanData:function(n,t){for(var r,e,u,f,c=0,s=i.expando,h=i.cache,l=i.support.deleteExpando,a=i.event.special;(r=n[c])!=null;c++)if((t||i.acceptData(r))&&(u=r[s],f=u&&h[u],f)){if(f.events)for(e in f.events)a[e]?i.event.remove(r,e):i.removeEvent(r,e,f.handle);h[u]&&(delete h[u],l?delete r[s]:typeof r.removeAttribute!==o?r.removeAttribute(s):r[s]=null,b.push(u))}}});var rt,v,y,hi=/alpha\([^)]*\)/i,be=/opacity\s*=\s*([^)]*)/,ke=/^(top|right|bottom|left)$/,de=/^(none|table(?!-c[ea]).+)/,tu=/^margin/,ge=new RegExp("^("+st+")(.*)$","i"),ct=new RegExp("^("+st+")(?!px)[a-z%]+$","i"),no=new RegExp("^([+-])=("+st+")","i"),iu={BODY:"block"},to={position:"absolute",visibility:"hidden",display:"block"},ru={letterSpacing:0,fontWeight:400},p=["Top","Right","Bottom","Left"],uu=["Webkit","O","Moz","ms"];i.fn.extend({css:function(n,r){return i.access(this,function(n,r,u){var e,o,s={},f=0;if(i.isArray(r)){for(o=v(n),e=r.length;f<e;f++)s[r[f]]=i.css(n,r[f],!1,o);return s}return u!==t?i.style(n,r,u):i.css(n,r)},n,r,arguments.length>1)},show:function(){return eu(this,!0)},hide:function(){return eu(this)},toggle:function(n){var t=typeof n=="boolean";return this.each(function(){(t?n:ut(this))?i(this).show():i(this).hide()})}});i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=y(n,"opacity");return i===""?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:i.support.cssFloat?"cssFloat":"styleFloat"},style:function(n,r,u,f){if(n&&n.nodeType!==3&&n.nodeType!==8&&n.style){var o,s,e,h=i.camelCase(r),c=n.style;if(r=i.cssProps[h]||(i.cssProps[h]=fu(c,h)),e=i.cssHooks[r]||i.cssHooks[h],u!==t){if(s=typeof u,s==="string"&&(o=no.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,r)),s="number"),u==null||s==="number"&&isNaN(u))return;if(s!=="number"||i.cssNumber[h]||(u+="px"),i.support.clearCloneStyle||u!==""||r.indexOf("background")!==0||(c[r]="inherit"),!e||!("set"in e)||(u=e.set(n,u,f))!==t)try{c[r]=u}catch(l){}}else return e&&"get"in e&&(o=e.get(n,!1,f))!==t?o:c[r]}},css:function(n,r,u,f){var h,e,o,s=i.camelCase(r);return(r=i.cssProps[s]||(i.cssProps[s]=fu(n.style,s)),o=i.cssHooks[r]||i.cssHooks[s],o&&"get"in o&&(e=o.get(n,!0,u)),e===t&&(e=y(n,r,f)),e==="normal"&&r in ru&&(e=ru[r]),u===""||u)?(h=parseFloat(e),u===!0||i.isNumeric(h)?h||0:e):e},swap:function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f}});n.getComputedStyle?(v=function(t){return n.getComputedStyle(t,null)},y=function(n,r,u){var s,h,c,o=u||v(n),e=o?o.getPropertyValue(r)||o[r]:t,f=n.style;return o&&(e!==""||i.contains(n.ownerDocument,n)||(e=i.style(n,r)),ct.test(e)&&tu.test(r)&&(s=f.width,h=f.minWidth,c=f.maxWidth,f.minWidth=f.maxWidth=f.width=e,e=o.width,f.width=s,f.minWidth=h,f.maxWidth=c)),e}):r.documentElement.currentStyle&&(v=function(n){return n.currentStyle},y=function(n,i,r){var s,e,o,h=r||v(n),u=h?h[i]:t,f=n.style;return u==null&&f&&f[i]&&(u=f[i]),ct.test(u)&&!ke.test(i)&&(s=f.left,e=n.runtimeStyle,o=e&&e.left,o&&(e.left=n.currentStyle.left),f.left=i==="fontSize"?"1em":u,u=f.pixelLeft+"px",f.left=s,o&&(e.left=o)),u===""?"auto":u});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return n.offsetWidth===0&&de.test(i.css(n,"display"))?i.swap(n,to,function(){return hu(n,t,u)}):hu(n,t,u)},set:function(n,r,u){var f=u&&v(n);return ou(n,r,u?su(n,t,u,i.support.boxSizing&&i.css(n,"boxSizing",!1,f)==="border-box",f):0)}}});i.support.opacity||(i.cssHooks.opacity={get:function(n,t){return be.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+t*100+")":"",f=u&&u.filter||r.filter||"";(r.zoom=1,(t>=1||t==="")&&i.trim(f.replace(hi,""))===""&&r.removeAttribute&&(r.removeAttribute("filter"),t===""||u&&!u.filter))||(r.filter=hi.test(f)?f.replace(hi,e):f+" "+e)}});i(function(){i.support.reliableMarginRight||(i.cssHooks.marginRight={get:function(n,t){if(t)return i.swap(n,{display:"inline-block"},y,[n,"marginRight"])}});!i.support.pixelPosition&&i.fn.position&&i.each(["top","left"],function(n,t){i.cssHooks[t]={get:function(n,r){if(r)return r=y(n,t),ct.test(r)?i(n).position()[t]+"px":r}}})});i.expr&&i.expr.filters&&(i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!i.support.reliableHiddenOffsets&&(n.style&&n.style.display||i.css(n,"display"))==="none"},i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u=typeof i=="string"?i.split(" "):[i];r<4;r++)f[n+p[r]+t]=u[r]||u[r-2]||u[0];return f}};tu.test(n)||(i.cssHooks[n+t].set=ou)});var io=/%20/g,ro=/\[\]$/,au=/\r?\n/g,uo=/^(?:submit|button|image|reset|file)$/i,fo=/^(?:input|select|textarea|keygen)/i;i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&fo.test(this.nodeName)&&!uo.test(n)&&(this.checked||!ei.test(n))}).map(function(n,t){var r=i(this).val();return r==null?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(au,"\r\n")}}):{name:t.name,value:r.replace(au,"\r\n")}}).get()}});i.param=function(n,r){var u,f=[],e=function(n,t){t=i.isFunction(t)?t():t==null?"":t;f[f.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(r===t&&(r=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){e(this.name,this.value)});else for(u in n)ci(u,n[u],r,e);return f.join("&").replace(io,"+")};i.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(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.hover=function(n,t){return this.mouseenter(n).mouseleave(t||n)};var w,c,li=i.now(),ai=/\?/,eo=/#.*$/,vu=/([?&])_=[^&]*/,oo=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,so=/^(?:GET|HEAD)$/,ho=/^\/\//,yu=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,pu=i.fn.load,wu={},vi={},bu="*/".concat("*");try{c=ff.href}catch(go){c=r.createElement("a");c.href="";c=c.href}w=yu.exec(c.toLowerCase())||[];i.fn.load=function(n,r,u){if(typeof n!="string"&&pu)return pu.apply(this,arguments);var f,s,h,e=this,o=n.indexOf(" ");return o>=0&&(f=n.slice(o,n.length),n=n.slice(0,o)),i.isFunction(r)?(u=r,r=t):r&&typeof r=="object"&&(h="POST"),e.length>0&&i.ajax({url:n,type:h,dataType:"html",data:r}).done(function(n){s=arguments;e.html(f?i("<div>").append(i.parseHTML(n)).find(f):n)}).complete(u&&function(n,t){e.each(u,s||[n.responseText,t,n])}),this};i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i.each(["get","post"],function(n,r){i[r]=function(n,u,f,e){return i.isFunction(u)&&(e=e||f,f=u,u=t),i.ajax({url:n,type:r,dataType:e,data:u,success:f})}});i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:c,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(w[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":bu,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":n.String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?yi(yi(n,i.ajaxSettings),t):yi(i.ajaxSettings,n)},ajaxPrefilter:ku(wu),ajaxTransport:ku(vi),ajax:function(n,r){function k(n,r,s,c){var l,k,w,rt,p,a=r;o!==2&&(o=2,g&&clearTimeout(g),v=t,d=c||"",f.readyState=n>0?4:0,s&&(rt=co(u,f,s)),n>=200&&n<300||n===304?(u.ifModified&&(p=f.getResponseHeader("Last-Modified"),p&&(i.lastModified[e]=p),p=f.getResponseHeader("etag"),p&&(i.etag[e]=p)),n===204?(l=!0,a="nocontent"):n===304?(l=!0,a="notmodified"):(l=lo(u,rt),a=l.state,k=l.data,w=l.error,l=!w)):(w=a,(n||!a)&&(a="error",n<0&&(n=0))),f.status=n,f.statusText=(r||a)+"",l?tt.resolveWith(h,[k,a,f]):tt.rejectWith(h,[f,a,w]),f.statusCode(b),b=t,y&&nt.trigger(l?"ajaxSuccess":"ajaxError",[f,u,l?k:w]),it.fireWith(h,[f,a]),y&&(nt.trigger("ajaxComplete",[f,u]),--i.active||i.event.trigger("ajaxStop")))}typeof n=="object"&&(r=n,n=t);r=r||{};var l,a,e,d,g,y,v,p,u=i.ajaxSetup({},r),h=u.context||u,nt=u.context&&(h.nodeType||h.jquery)?i(h):i.event,tt=i.Deferred(),it=i.Callbacks("once memory"),b=u.statusCode||{},rt={},ut={},o=0,ft="canceled",f={readyState:0,getResponseHeader:function(n){var t;if(o===2){if(!p)for(p={};t=oo.exec(d);)p[t[1].toLowerCase()]=t[2];t=p[n.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return o===2?d:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return o||(n=ut[i]=ut[i]||n,rt[n]=t),this},overrideMimeType:function(n){return o||(u.mimeType=n),this},statusCode:function(n){var t;if(n)if(o<2)for(t in n)b[t]=[b[t],n[t]];else f.always(n[f.status]);return this},abort:function(n){var t=n||ft;return v&&v.abort(t),k(0,t),this}};if(tt.promise(f).complete=it.add,f.success=f.done,f.error=f.fail,u.url=((n||u.url||c)+"").replace(eo,"").replace(ho,w[1]+"//"),u.type=r.method||r.type||u.method||u.type,u.dataTypes=i.trim(u.dataType||"*").toLowerCase().match(s)||[""],u.crossDomain==null&&(l=yu.exec(u.url.toLowerCase()),u.crossDomain=!!(l&&(l[1]!==w[1]||l[2]!==w[2]||(l[3]||(l[1]==="http:"?80:443))!=(w[3]||(w[1]==="http:"?80:443))))),u.data&&u.processData&&typeof u.data!="string"&&(u.data=i.param(u.data,u.traditional)),du(wu,u,r,f),o===2)return f;y=u.global;y&&i.active++==0&&i.event.trigger("ajaxStart");u.type=u.type.toUpperCase();u.hasContent=!so.test(u.type);e=u.url;u.hasContent||(u.data&&(e=u.url+=(ai.test(e)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=vu.test(e)?e.replace(vu,"$1_="+li++):e+(ai.test(e)?"&":"?")+"_="+li++));u.ifModified&&(i.lastModified[e]&&f.setRequestHeader("If-Modified-Since",i.lastModified[e]),i.etag[e]&&f.setRequestHeader("If-None-Match",i.etag[e]));(u.data&&u.hasContent&&u.contentType!==!1||r.contentType)&&f.setRequestHeader("Content-Type",u.contentType);f.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+(u.dataTypes[0]!=="*"?", "+bu+"; q=0.01":""):u.accepts["*"]);for(a in u.headers)f.setRequestHeader(a,u.headers[a]);if(u.beforeSend&&(u.beforeSend.call(h,f,u)===!1||o===2))return f.abort();ft="abort";for(a in{success:1,error:1,complete:1})f[a](u[a]);if(v=du(vi,u,r,f),v){f.readyState=1;y&&nt.trigger("ajaxSend",[f,u]);u.async&&u.timeout>0&&(g=setTimeout(function(){f.abort("timeout")},u.timeout));try{o=1;v.send(rt,k)}catch(et){if(o<2)k(-1,et);else throw et;}}else k(-1,"No Transport");return f},getScript:function(n,r){return i.get(n,t,r,"script")},getJSON:function(n,t,r){return i.get(n,t,r,"json")}});i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}});i.ajaxPrefilter("script",function(n){n.cache===t&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)});i.ajaxTransport("script",function(n){if(n.crossDomain){var u,f=r.head||i("head")[0]||r.documentElement;return{send:function(t,i){u=r.createElement("script");u.async=!0;n.scriptCharset&&(u.charset=n.scriptCharset);u.src=n.url;u.onload=u.onreadystatechange=function(n,t){(t||!u.readyState||/loaded|complete/.test(u.readyState))&&(u.onload=u.onreadystatechange=null,u.parentNode&&u.parentNode.removeChild(u),u=null,t||i(200,"success"))};f.insertBefore(u,f.firstChild)},abort:function(){if(u)u.onload(t,!0)}}}});pi=[];lt=/(=)\?(?=&|$)|\?\?/;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=pi.pop()||i.expando+"_"+li++;return this[n]=!0,n}});i.ajaxPrefilter("json jsonp",function(r,u,f){var e,s,o,h=r.jsonp!==!1&&(lt.test(r.url)?"url":typeof r.data=="string"&&!(r.contentType||"").indexOf("application/x-www-form-urlencoded")&&lt.test(r.data)&&"data");if(h||r.dataTypes[0]==="jsonp")return e=r.jsonpCallback=i.isFunction(r.jsonpCallback)?r.jsonpCallback():r.jsonpCallback,h?r[h]=r[h].replace(lt,"$1"+e):r.jsonp!==!1&&(r.url+=(ai.test(r.url)?"&":"?")+r.jsonp+"="+e),r.converters["script json"]=function(){return o||i.error(e+" was not called"),o[0]},r.dataTypes[0]="json",s=n[e],n[e]=function(){o=arguments},f.always(function(){n[e]=s;r[e]&&(r.jsonpCallback=u.jsonpCallback,pi.push(e));o&&i.isFunction(s)&&s(o[0]);o=s=t}),"script"});gu=0;at=n.ActiveXObject&&function(){for(var n in g)g[n](t,!0)};i.ajaxSettings.xhr=n.ActiveXObject?function(){return!this.isLocal&&nf()||ao()}:nf;nt=i.ajaxSettings.xhr();i.support.cors=!!nt&&"withCredentials"in nt;nt=i.support.ajax=!!nt;nt&&i.ajaxTransport(function(r){if(!r.crossDomain||i.support.cors){var u;return{send:function(f,e){var h,s,o=r.xhr();if(r.username?o.open(r.type,r.url,r.async,r.username,r.password):o.open(r.type,r.url,r.async),r.xhrFields)for(s in r.xhrFields)o[s]=r.xhrFields[s];r.mimeType&&o.overrideMimeType&&o.overrideMimeType(r.mimeType);r.crossDomain||f["X-Requested-With"]||(f["X-Requested-With"]="XMLHttpRequest");try{for(s in f)o.setRequestHeader(s,f[s])}catch(c){}o.send(r.hasContent&&r.data||null);u=function(n,f){var s,a,l,c;try{if(u&&(f||o.readyState===4))if(u=t,h&&(o.onreadystatechange=i.noop,at&&delete g[h]),f)o.readyState!==4&&o.abort();else{c={};s=o.status;a=o.getAllResponseHeaders();typeof o.responseText=="string"&&(c.text=o.responseText);try{l=o.statusText}catch(y){l=""}s||!r.isLocal||r.crossDomain?s===1223&&(s=204):s=c.text?200:404}}catch(v){f||e(-1,v)}c&&e(s,l,c,a)};r.async?o.readyState===4?setTimeout(u):(h=++gu,at&&(g||(g={},i(n).unload(at)),g[h]=u),o.onreadystatechange=u):u()},abort:function(){u&&u(t,!0)}}}});var tt,vt,vo=/^(?:toggle|show|hide)$/,yo=new RegExp("^(?:([+-])=|)("+st+")([a-z%]*)$","i"),po=/queueHooks$/,yt=[ko],ft={"*":[function(n,t){var o,s,r=this.createTween(n,t),e=yo.exec(t),h=r.cur(),u=+h||0,f=1,c=20;if(e){if(o=+e[2],s=e[3]||(i.cssNumber[n]?"":"px"),s!=="px"&&u){u=i.css(r.elem,n,!0)||o||1;do f=f||".5",u=u/f,i.style(r.elem,n,u+s);while(f!==(f=r.cur()/h)&&f!==1&&--c)}r.unit=s;r.start=u;r.end=e[1]?u+(e[1]+1)*o:o}return r}]};i.Animation=i.extend(rf,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;u<f;u++)r=n[u],ft[r]=ft[r]||[],ft[r].unshift(t)},prefilter:function(n,t){t?yt.unshift(n):yt.push(n)}});i.Tween=f;f.prototype={constructor:f,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=f.propHooks[this.prop];return n&&n.get?n.get(this):f.propHooks._default.get(this)},run:function(n){var t,r=f.propHooks[this.prop];return this.pos=this.options.duration?t=i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):t=n,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):f.propHooks._default.set(this),this}};f.prototype.init.prototype=f.prototype;f.propHooks={_default:{get:function(n){var t;return n.elem[n.prop]!=null&&(!n.elem.style||n.elem.style[n.prop]==null)?n.elem[n.prop]:(t=i.css(n.elem,n.prop,""),!t||t==="auto"?0:t)},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(n.elem.style[i.cssProps[n.prop]]!=null||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};f.propHooks.scrollTop=f.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return n==null||typeof n=="boolean"?r.apply(this,arguments):this.animate(pt(t,!0),n,i,u)}});i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(ut).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=rf(this,i.extend({},n),e);f.finish=function(){t.stop(!0)};(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,r,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return typeof n!="string"&&(u=r,r=n,n=t),r&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=n!=null&&n+"queueHooks",e=i.timers,r=i._data(this);if(t)r[t]&&r[t].stop&&f(r[t]);else for(t in r)r[t]&&r[t].stop&&po.test(t)&&f(r[t]);for(t=e.length;t--;)e[t].elem===this&&(n==null||e[t].queue===n)&&(e[t].anim.stop(u),o=!1,e.splice(t,1));(o||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.cur&&e.cur.finish&&e.cur.finish.call(this),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each({slideDown:pt("show"),slideUp:pt("hide"),slideToggle:pt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.speed=function(n,t,r){var u=n&&typeof n=="object"?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:typeof u.duration=="number"?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(u.queue==null||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.timers=[];i.fx=f.prototype.init;i.fx.tick=function(){var u,n=i.timers,r=0;for(tt=i.now();r<n.length;r++)u=n[r],u()||n[r]!==u||n.splice(r--,1);n.length||i.fx.stop();tt=t};i.fx.timer=function(n){n()&&i.timers.push(n)&&i.fx.start()};i.fx.interval=13;i.fx.start=function(){vt||(vt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(vt);vt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fx.step={};i.expr&&i.expr.filters&&(i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length});i.fn.offset=function(n){if(arguments.length)return n===t?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,e,f={top:0,left:0},u=this[0],s=u&&u.ownerDocument;if(s)return(r=s.documentElement,!i.contains(r,u))?f:(typeof u.getBoundingClientRect!==o&&(f=u.getBoundingClientRect()),e=uf(s),{top:f.top+(e.pageYOffset||r.scrollTop)-(r.clientTop||0),left:f.left+(e.pageXOffset||r.scrollLeft)-(r.clientLeft||0)})};i.offset={setOffset:function(n,t,r){var f=i.css(n,"position");f==="static"&&(n.style.position="relative");var e=i(n),o=e.offset(),l=i.css(n,"top"),a=i.css(n,"left"),v=(f==="absolute"||f==="fixed")&&i.inArray("auto",[l,a])>-1,u={},s={},h,c;v?(s=e.position(),h=s.top,c=s.left):(h=parseFloat(l)||0,c=parseFloat(a)||0);i.isFunction(t)&&(t=t.call(n,r,o));t.top!=null&&(u.top=t.top-o.top+h);t.left!=null&&(u.left=t.left-o.left+c);"using"in t?t.using.call(n,u):e.css(u)}};i.fn.extend({position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return i.css(u,"position")==="fixed"?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||r.documentElement;n&&!i.nodeName(n,"html")&&i.css(n,"position")==="static";)n=n.offsetParent;return n||r.documentElement})}});i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var u=/Y/.test(r);i.fn[n]=function(f){return i.access(this,function(n,f,e){var o=uf(n);if(e===t)return o?r in o?o[r]:o.document.documentElement[f]:n[f];o?o.scrollTo(u?i(o).scrollLeft():e,u?e:i(o).scrollTop()):n[f]=e},n,f,arguments.length,null)}});i.each({Height:"height",Width:"width"},function(n,r){i.each({padding:"inner"+n,content:r,"":"outer"+n},function(u,f){i.fn[f]=function(f,e){var o=arguments.length&&(u||typeof f!="boolean"),s=u||(f===!0||e===!0?"margin":"border");return i.access(this,function(r,u,f){var e;return i.isWindow(r)?r.document.documentElement["client"+n]:r.nodeType===9?(e=r.documentElement,Math.max(r.body["scroll"+n],e["scroll"+n],r.body["offset"+n],e["offset"+n],e["client"+n])):f===t?i.css(r,u,s):i.style(r,u,f,s)},r,o?f:t,o,null)}})});n.jQuery=n.$=i;typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return i})})(window),function(n,t,i){"use strict";function r(i){e[i]||(e[i]=!0,n.migrateWarnings.push(i),t.console&&console.warn&&!n.migrateMute&&(console.warn("JQMIGRATE: "+i),n.migrateTrace&&console.trace&&console.trace()))}function o(t,i,u,f){if(Object.defineProperty)try{Object.defineProperty(t,i,{configurable:!0,enumerable:!0,get:function(){return r(f),u},set:function(n){r(f);u=n}});return}catch(e){}n._definePropertyBroken=!0;t[i]=u}var e={},c,l,a;n.migrateWarnings=[];!n.migrateMute&&t.console&&console.log&&console.log("JQMIGRATE: Logging is active");n.migrateTrace===i&&(n.migrateTrace=!0);n.migrateReset=function(){e={};n.migrateWarnings.length=0};document.compatMode==="BackCompat"&&r("jQuery is not compatible with Quirks Mode");var s=n.attr,d=n.attrHooks.value&&n.attrHooks.value.get||function(){return null},g=n.attrHooks.value&&n.attrHooks.value.set||function(){return i},nt=/^(?:input|button)$/i,tt=/^[238]$/,it=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,rt=/^(?:checked|selected)$/i;o(n,"attrFn",{},"jQuery.attrFn is deprecated");n.attr=function(t,u,f,e){var o=u.toLowerCase(),h=t&&t.nodeType;return e&&s.length<4&&(r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!tt.test(h)&&n.isFunction(n.fn[u]))?n(t)[u](f):(u==="type"&&f!==i&&nt.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!n.attrHooks[o]&&it.test(o)&&(n.attrHooks[o]={get:function(t,r){var u,f=n.prop(t,r);return f===!0||typeof f!="boolean"&&(u=t.getAttributeNode(r))&&u.nodeValue!==!1?r.toLowerCase():i},set:function(t,i,r){var u;return i===!1?n.removeAttr(t,r):(u=n.propFix[r]||r,u in t&&(t[u]=!0),t.setAttribute(r,r.toLowerCase())),r}},rt.test(o)&&r("jQuery.fn.attr('"+o+"') may use property instead of attribute")),s.call(n,t,u,f))};n.attrHooks.value={get:function(n,t){var i=(n.nodeName||"").toLowerCase();return i==="button"?d.apply(this,arguments):(i!=="input"&&i!=="option"&&r("jQuery.fn.attr('value') no longer gets properties"),t in n?n.value:null)},set:function(n,t){var i=(n.nodeName||"").toLowerCase();if(i==="button")return g.apply(this,arguments);i!=="input"&&i!=="option"&&r("jQuery.fn.attr('value', val) no longer sets properties");n.value=t}};var f,u,h=n.fn.init,ut=n.parseJSON,ft=/^(?:[^<]*(<[\w\W]+>)[^>]*|#([\w\-]*))$/;n.fn.init=function(t,i,u){var f;return t&&typeof t=="string"&&!n.isPlainObject(i)&&(f=ft.exec(t))&&f[1]&&(t.charAt(0)!=="<"&&r("$(html) HTML strings must start with '<' character"),i&&i.context&&(i=i.context),n.parseHTML)?h.call(this,n.parseHTML(n.trim(t),i,!0),i,u):h.apply(this,arguments)};n.fn.init.prototype=n.fn;n.parseJSON=function(n){return!n&&n!==null?(r("jQuery.parseJSON requires a valid JSON string"),null):ut.apply(this,arguments)};n.uaMatch=function(n){n=n.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[];return{browser:t[1]||"",version:t[2]||"0"}};f=n.uaMatch(navigator.userAgent);u={};f.browser&&(u[f.browser]=!0,u.version=f.version);u.chrome?u.webkit=!0:u.webkit&&(u.safari=!0);n.browser=u;o(n,"browser",u,"jQuery.browser is deprecated");n.sub=function(){function t(n,i){return new t.fn.init(n,i)}n.extend(!0,t,this);t.superclass=this;t.fn=t.prototype=this();t.fn.constructor=t;t.sub=this.sub;t.fn.init=function(r,u){return u&&u instanceof n&&!(u instanceof t)&&(u=t(u)),n.fn.init.call(this,r,u,i)};t.fn.init.prototype=t.fn;var i=t(document);return r("jQuery.sub() is deprecated"),t};c=n.fn.data;n.fn.data=function(t){var f,u,e=this[0];return e&&t==="events"&&arguments.length===1&&(f=n.data(e,t),u=n._data(e,t),(f===i||f===u)&&u!==i)?(r("Use of jQuery.fn.data('events') is deprecated"),u):c.apply(this,arguments)};l=/\/(java|ecma)script/i;a=n.fn.andSelf||n.fn.addBack;n.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),a.apply(this,arguments)};n.clean||(n.clean=function(t,i,u,f){i=i||document;i=!i.nodeType&&i[0]||i;i=i.ownerDocument||i;r("jQuery.clean() is deprecated");var o,e,h,c,s=[];if(n.merge(s,n.buildFragment(t,i).childNodes),u)for(h=function(n){if(!n.type||l.test(n.type))return f?f.push(n.parentNode?n.parentNode.removeChild(n):n):u.appendChild(n)},o=0;(e=s[o])!=null;o++)n.nodeName(e,"script")&&h(e)||(u.appendChild(e),typeof e.getElementsByTagName!="undefined"&&(c=n.grep(n.merge([],e.getElementsByTagName("script")),h),s.splice.apply(s,[o+1,0].concat(c)),o+=c.length));return s});var et=n.event.add,ot=n.event.remove,st=n.event.trigger,ht=n.fn.toggle,v=n.fn.live,y=n.fn.die,p="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",w=new RegExp("\\b(?:"+p+")\\b"),b=/(?:^|\s)hover(\.\S+|)\b/,k=function(t){return typeof t!="string"||n.event.special.hover?t:(b.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(b,"mouseenter$1 mouseleave$1"))};n.event.props&&n.event.props[0]!=="attrChange"&&n.event.props.unshift("attrChange","attrName","relatedNode","srcElement");n.event.dispatch&&o(n.event,"handle",n.event.dispatch,"jQuery.event.handle is undocumented and deprecated");n.event.add=function(n,t,i,u,f){n!==document&&w.test(t)&&r("AJAX events should be attached to document: "+t);et.call(this,n,k(t||""),i,u,f)};n.event.remove=function(n,t,i,r,u){ot.call(this,n,k(t)||"",i,r,u)};n.fn.error=function(){var n=Array.prototype.slice.call(arguments,0);return(r("jQuery.fn.error() is deprecated"),n.splice(0,0,"error"),arguments.length)?this.bind.apply(this,n):(this.triggerHandler.apply(this,n),this)};n.fn.toggle=function(t,i){if(!n.isFunction(t)||!n.isFunction(i))return ht.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var u=arguments,e=t.guid||n.guid++,f=0,o=function(i){var r=(n._data(this,"lastToggle"+t.guid)||0)%f;return n._data(this,"lastToggle"+t.guid,r+1),i.preventDefault(),u[r].apply(this,arguments)||!1};for(o.guid=e;f<u.length;)u[f++].guid=e;return this.click(o)};n.fn.live=function(t,i,u){if(r("jQuery.fn.live() is deprecated"),v)return v.apply(this,arguments);n(this.context).on(t,this.selector,i,u);return this};n.fn.die=function(t,i){return(r("jQuery.fn.die() is deprecated"),y)?y.apply(this,arguments):(n(this.context).off(t,this.selector||"**",i),this)};n.event.trigger=function(n,t,i,u){return!i&!w.test(n)&&r("Global events are undocumented and deprecated"),st.call(this,n,t,i||document,u)};n.each(p.split("|"),function(t,i){n.event.special[i]={setup:function(){var t=this;return t!==document&&(n.event.add(document,i+"."+n.guid,function(){n.event.trigger(i,null,t,!0)}),n._data(this,i,n.guid++)),!1},teardown:function(){return this!==document&&n.event.remove(document,i+"."+n._data(this,i)),!1}}})}(jQuery,window),function(n,t){function i(t,i){var u,f,e,o=t.nodeName.toLowerCase();return"area"===o?(u=t.parentNode,f=u.name,!t.href||!f||u.nodeName.toLowerCase()!=="map")?!1:(e=n("img[usemap=#"+f+"]")[0],!!e&&r(e)):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&r(t)}function r(t){return n.expr.filters.visible(t)&&!n(t).parents().addBack().filter(function(){return n.css(this,"visibility")==="hidden"}).length}var u=0,f=/^ui-id-\d+$/;(n.ui=n.ui||{},n.ui.version)||(n.extend(n.ui,{version:"1.10.1",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),n.fn.extend({_focus:n.fn.focus,focus:function(t,i){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){n(r).focus();i&&i.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return t=n.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(n.css(this,"position"))&&/(auto|scroll)/.test(n.css(this,"overflow")+n.css(this,"overflow-y")+n.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(n.css(this,"overflow")+n.css(this,"overflow-y")+n.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?n(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var r=n(this[0]),u,f;r.length&&r[0]!==document;){if(u=r.css("position"),(u==="absolute"||u==="relative"||u==="fixed")&&(f=parseInt(r.css("zIndex"),10),!isNaN(f)&&f!==0))return f;r=r.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})},removeUniqueId:function(){return this.each(function(){f.test(this.id)&&n(this).removeAttr("id")})}}),n.extend(n.expr[":"],{data:n.expr.createPseudo?n.expr.createPseudo(function(t){return function(i){return!!n.data(i,t)}}):function(t,i,r){return!!n.data(t,r[3])},focusable:function(t){return i(t,!isNaN(n.attr(t,"tabindex")))},tabbable:function(t){var r=n.attr(t,"tabindex"),u=isNaN(r);return(u||r>=0)&&i(t,!u)}}),n("<a>").outerWidth(1).jquery||n.each(["Width","Height"],function(i,r){function e(t,i,r,u){return n.each(o,function(){i-=parseFloat(n.css(t,"padding"+this))||0;r&&(i-=parseFloat(n.css(t,"border"+this+"Width"))||0);u&&(i-=parseFloat(n.css(t,"margin"+this))||0)}),i}var o=r==="Width"?["Left","Right"]:["Top","Bottom"],u=r.toLowerCase(),f={innerWidth:n.fn.innerWidth,innerHeight:n.fn.innerHeight,outerWidth:n.fn.outerWidth,outerHeight:n.fn.outerHeight};n.fn["inner"+r]=function(i){return i===t?f["inner"+r].call(this):this.each(function(){n(this).css(u,e(this,i)+"px")})};n.fn["outer"+r]=function(t,i){return typeof t!="number"?f["outer"+r].call(this,t):this.each(function(){n(this).css(u,e(this,t,!0,i)+"px")})}}),n.fn.addBack||(n.fn.addBack=function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))}),n("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(n.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,n.camelCase(i)):t.call(this)}}(n.fn.removeData)),n.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),n.support.selectstart="onselectstart"in document.createElement("div"),n.fn.extend({disableSelection:function(){return this.bind((n.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(n){n.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),n.extend(n.ui,{plugin:{add:function(t,i,r){var u,f=n.ui[t].prototype;for(u in r)f.plugins[u]=f.plugins[u]||[],f.plugins[u].push([i,r[u]])},call:function(n,t,i){var r,u=n.plugins[t];if(u&&n.element[0].parentNode&&n.element[0].parentNode.nodeType!==11)for(r=0;r<u.length;r++)n.options[u[r][0]]&&u[r][1].apply(n.element,i)}},hasScroll:function(t,i){if(n(t).css("overflow")==="hidden")return!1;var r=i&&i==="left"?"scrollLeft":"scrollTop",u=!1;return t[r]>0?!0:(t[r]=1,u=t[r]>0,t[r]=0,u)}}))}(jQuery),function(n,t){var r=0,i=Array.prototype.slice,u=n.cleanData;n.cleanData=function(t){for(var i=0,r;(r=t[i])!=null;i++)try{n(r).triggerHandler("remove")}catch(f){}u(t)};n.widget=function(t,i,r){var s,f,u,o,h={},e=t.split(".")[0];t=t.split(".")[1];s=e+"-"+t;r||(r=i,i=n.Widget);n.expr[":"][s.toLowerCase()]=function(t){return!!n.data(t,s)};n[e]=n[e]||{};f=n[e][t];u=n[e][t]=function(n,t){if(!this._createWidget)return new u(n,t);arguments.length&&this._createWidget(n,t)};n.extend(u,f,{version:r.version,_proto:n.extend({},r),_childConstructors:[]});o=new i;o.options=n.widget.extend({},o.options);n.each(r,function(t,r){if(!n.isFunction(r)){h[t]=r;return}h[t]=function(){var n=function(){return i.prototype[t].apply(this,arguments)},u=function(n){return i.prototype[t].apply(this,n)};return function(){var i=this._super,f=this._superApply,t;return this._super=n,this._superApply=u,t=r.apply(this,arguments),this._super=i,this._superApply=f,t}}()});u.prototype=n.widget.extend(o,{widgetEventPrefix:f?o.widgetEventPrefix:t},h,{constructor:u,namespace:e,widgetName:t,widgetFullName:s});f?(n.each(f._childConstructors,function(t,i){var r=i.prototype;n.widget(r.namespace+"."+r.widgetName,u,i._proto)}),delete f._childConstructors):i._childConstructors.push(u);n.widget.bridge(t,u)};n.widget.extend=function(r){for(var o=i.call(arguments,1),e=0,s=o.length,u,f;e<s;e++)for(u in o[e])f=o[e][u],o[e].hasOwnProperty(u)&&f!==t&&(r[u]=n.isPlainObject(f)?n.isPlainObject(r[u])?n.widget.extend({},r[u],f):n.widget.extend({},f):f);return r};n.widget.bridge=function(r,u){var f=u.prototype.widgetFullName||r;n.fn[r]=function(e){var h=typeof e=="string",o=i.call(arguments,1),s=this;return e=!h&&o.length?n.widget.extend.apply(null,[e].concat(o)):e,h?this.each(function(){var i,u=n.data(this,f);return u?!n.isFunction(u[e])||e.charAt(0)==="_"?n.error("no such method '"+e+"' for "+r+" widget instance"):(i=u[e].apply(u,o),i!==u&&i!==t?(s=i&&i.jquery?s.pushStack(i.get()):i,!1):void 0):n.error("cannot call methods on "+r+" prior to initialization; attempted to call method '"+e+"'")}):this.each(function(){var t=n.data(this,f);t?t.option(e||{})._init():n.data(this,f,new u(e,this))}),s}};n.Widget=function(){};n.Widget._childConstructors=[];n.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=n(i||this.defaultElement||this)[0];this.element=n(i);this.uuid=r++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=n.widget.extend({},this.options,this._getCreateOptions(),t);this.bindings=n();this.hoverable=n();this.focusable=n();i!==this&&(n.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(n){n.target===i&&this.destroy()}}),this.document=n(i.style?i.ownerDocument:i.document||i),this.window=n(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:n.noop,_getCreateEventData:n.noop,_create:n.noop,_init:n.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(n.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:n.noop,widget:function(){return this.element},option:function(i,r){var o=i,u,f,e;if(arguments.length===0)return n.widget.extend({},this.options);if(typeof i=="string")if(o={},u=i.split("."),i=u.shift(),u.length){for(f=o[i]=n.widget.extend({},this.options[i]),e=0;e<u.length-1;e++)f[u[e]]=f[u[e]]||{},f=f[u[e]];if(i=u.pop(),r===t)return f[i]===t?null:f[i];f[i]=r}else{if(r===t)return this.options[i]===t?null:this.options[i];o[i]=r}return this._setOptions(o),this},_setOptions:function(n){for(var t in n)this._setOption(t,n[t]);return this},_setOption:function(n,t){return this.options[n]=t,n==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,i,r){var f,u=this;typeof t!="boolean"&&(r=i,i=t,t=!1);r?(i=f=n(i),this.bindings=this.bindings.add(i)):(r=i,i=this.element,f=this.widget());n.each(r,function(r,e){function o(){if(t||u.options.disabled!==!0&&!n(this).hasClass("ui-state-disabled"))return(typeof e=="string"?u[e]:e).apply(u,arguments)}typeof e!="string"&&(o.guid=e.guid=e.guid||o.guid||n.guid++);var s=r.match(/^(\w+)\s*(.*)$/),h=s[1]+u.eventNamespace,c=s[2];c?f.delegate(c,h,o):i.bind(h,o)})},_off:function(n,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;n.unbind(t).undelegate(t)},_delay:function(n,t){function r(){return(typeof n=="string"?i[n]:n).apply(i,arguments)}var i=this;return setTimeout(r,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){n(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){n(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){n(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){n(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,r){var u,f,e=this.options[t];if(r=r||{},i=n.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],f=i.originalEvent,f)for(u in f)u in i||(i[u]=f[u]);return this.element.trigger(i,r),!(n.isFunction(e)&&e.apply(this.element[0],[i].concat(r))===!1||i.isDefaultPrevented())}};n.each({show:"fadeIn",hide:"fadeOut"},function(t,i){n.Widget.prototype["_"+t]=function(r,u,f){typeof u=="string"&&(u={effect:u});var o,e=u?u===!0||typeof u=="number"?i:u.effect||i:t;u=u||{};typeof u=="number"&&(u={duration:u});o=!n.isEmptyObject(u);u.complete=f;u.delay&&r.delay(u.delay);o&&n.effects&&n.effects.effect[e]?r[t](u):e!==t&&r[e]?r[e](u.duration,u.easing,f):r.queue(function(i){n(this)[t]();f&&f.call(r[0]);i()})}})}(jQuery),function(n){var t=!1;n(document).mouseup(function(){t=!1});n.widget("ui.mouse",{version:"1.10.1",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(n){return t._mouseDown(n)}).bind("click."+this.widgetName,function(i){if(!0===n.data(i.target,t.widgetName+".preventClickEvent"))return n.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i);this._mouseDownEvent=i;var r=this,u=i.which===1,f=typeof this.options.cancel=="string"&&i.target.nodeName?n(i.target).closest(this.options.cancel).length:!1;return!u||f||!this._mouseCapture(i)?!0:(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted))?(i.preventDefault(),!0):(!0===n.data(i.target,this.widgetName+".preventClickEvent")&&n.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(n){return r._mouseMove(n)},this._mouseUpDelegate=function(n){return r._mouseUp(n)},n(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)}},_mouseMove:function(t){return n.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&n.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(n){return Math.max(Math.abs(this._mouseDownEvent.pageX-n.pageX),Math.abs(this._mouseDownEvent.pageY-n.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(n){n.widget("ui.draggable",n.ui.mouse,{version:"1.10.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){this.options.helper!=="original"||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative");this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||n(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),!this.handle)?!1:(n(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){n("<div class='ui-draggable-iframeFix' style='background: #fff;'><\/div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(n(this).offset()).appendTo("body")}),!0)},_mouseStart:function(t){var i=this.options;return(this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),n.ui.ddmanager&&(n.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},n.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",t)===!1)?(this._clear(),!1):(this._cacheHelperProportions(),n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),n.ui.ddmanager&&n.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}return this.options.axis&&this.options.axis==="y"||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&this.options.axis==="x"||(this.helper[0].style.top=this.position.top+"px"),n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i,u=this,f=!1,r=!1;for(n.ui.ddmanager&&!this.options.dropBehaviour&&(r=n.ui.ddmanager.drop(this,t)),this.dropped&&(r=this.dropped,this.dropped=!1),i=this.element[0];i&&(i=i.parentNode);)i===document&&(f=!0);return!f&&this.options.helper==="original"?!1:(this.options.revert==="invalid"&&!r||this.options.revert==="valid"&&r||this.options.revert===!0||n.isFunction(this.options.revert)&&this.options.revert.call(this.element,r)?n(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){u._trigger("stop",t)!==!1&&u._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1)},_mouseUp:function(t){return n("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),n.ui.ddmanager&&n.ui.ddmanager.dragStop(this,t),n.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var i=!this.options.handle||!n(this.options.handle,this.element).length?!0:!1;return n(this.options.handle,this.element).find("*").addBack().each(function(){this===t.target&&(i=!0)}),i},_createHelper:function(t){var r=this.options,i=n.isFunction(r.helper)?n(r.helper.apply(this.element[0],[t])):r.helper==="clone"?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo(r.appendTo==="parent"?this.element[0].parentNode:r.appendTo),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" "));n.isArray(t)&&(t={left:+t[0],top:+t[1]||0});"left"in t&&(this.offset.click.left=t.left+this.margins.left);"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left);"top"in t&&(this.offset.click.top=t.top+this.margins.top);"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()==="html"&&n.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==="relative"){var n=this.element.position();return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:n.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var r,u,t,i=this.options;if(i.containment==="parent"&&(i.containment=this.helper[0].parentNode),(i.containment==="document"||i.containment==="window")&&(this.containment=[i.containment==="document"?0:n(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,i.containment==="document"?0:n(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(i.containment==="document"?0:n(window).scrollLeft())+n(i.containment==="document"?document:window).width()-this.helperProportions.width-this.margins.left,(i.containment==="document"?0:n(window).scrollTop())+(n(i.containment==="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||i.containment.constructor===Array)i.containment.constructor===Array&&(this.containment=i.containment);else{if(u=n(i.containment),t=u[0],!t)return;r=n(t).css("overflow")!=="hidden";this.containment=[(parseInt(n(t).css("borderLeftWidth"),10)||0)+(parseInt(n(t).css("paddingLeft"),10)||0),(parseInt(n(t).css("borderTopWidth"),10)||0)+(parseInt(n(t).css("paddingTop"),10)||0),(r?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(n(t).css("borderLeftWidth"),10)||0)-(parseInt(n(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(r?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(n(t).css("borderTopWidth"),10)||0)-(parseInt(n(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=u}},_convertPositionTo:function(t,i){i||(i=this.position);var r=t==="absolute"?1:-1,u=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(u[0].tagName);return{top:i.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():f?0:u.scrollTop())*r,left:i.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():f?0:u.scrollLeft())*r}},_generatePosition:function(t){var i,e,u,f,r=this.options,h=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,c=/(html|body)/i.test(h[0].tagName),o=t.pageX,s=t.pageY;return this.originalPosition&&(this.containment&&(this.relative_container?(e=this.relative_container.offset(),i=[this.containment[0]+e.left,this.containment[1]+e.top,this.containment[2]+e.left,this.containment[3]+e.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(s=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(s=i[3]+this.offset.click.top)),r.grid&&(u=r.grid[1]?this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,s=i?u-this.offset.click.top>=i[1]||u-this.offset.click.top>i[3]?u:u-this.offset.click.top>=i[1]?u-r.grid[1]:u+r.grid[1]:u,f=r.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,o=i?f-this.offset.click.left>=i[0]||f-this.offset.click.left>i[2]?f:f-this.offset.click.left>=i[0]?f-r.grid[0]:f+r.grid[0]:f)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():c?0:h.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():c?0:h.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1},_trigger:function(t,i,r){return r=r||this._uiHash(),n.ui.plugin.call(this,t,[i,r]),t==="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),n.Widget.prototype._trigger.call(this,t,i,r)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});n.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var r=n(this).data("ui-draggable"),u=r.options,f=n.extend({},i,{item:r.element});r.sortables=[];n(u.connectToSortable).each(function(){var i=n.data(this,"ui-sortable");i&&!i.options.disabled&&(r.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,f))})},stop:function(t,i){var r=n(this).data("ui-draggable"),u=n.extend({},i,{item:r.element});n.each(r.sortables,function(){this.instance.isOver?(this.instance.isOver=0,r.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,r.options.helper==="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,u))})},drag:function(t,i){var r=n(this).data("ui-draggable"),u=this;n.each(r.sortables,function(){var f=!1,e=this;this.instance.positionAbs=r.positionAbs;this.instance.helperProportions=r.helperProportions;this.instance.offset.click=r.offset.click;this.instance._intersectsWith(this.instance.containerCache)&&(f=!0,n.each(r.sortables,function(){return this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this!==e&&this.instance._intersectsWith(this.instance.containerCache)&&n.contains(e.instance.element[0],this.instance.element[0])&&(f=!1),f}));f?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=n(u).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=r.offset.click.top,this.instance.offset.click.left=r.offset.click.left,this.instance.offset.parent.left-=r.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=r.offset.parent.top-this.instance.offset.parent.top,r._trigger("toSortable",t),r.dropped=this.instance.element,r.currentItem=r.element,this.instance.fromOutside=r),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),r._trigger("fromSortable",t),r.dropped=!1)})}});n.ui.plugin.add("draggable","cursor",{start:function(){var t=n("body"),i=n(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor"));t.css("cursor",i.cursor)},stop:function(){var t=n(this).data("ui-draggable").options;t._cursor&&n("body").css("cursor",t._cursor)}});n.ui.plugin.add("draggable","opacity",{start:function(t,i){var r=n(i.helper),u=n(this).data("ui-draggable").options;r.css("opacity")&&(u._opacity=r.css("opacity"));r.css("opacity",u.opacity)},stop:function(t,i){var r=n(this).data("ui-draggable").options;r._opacity&&n(i.helper).css("opacity",r._opacity)}});n.ui.plugin.add("draggable","scroll",{start:function(){var t=n(this).data("ui-draggable");t.scrollParent[0]!==document&&t.scrollParent[0].tagName!=="HTML"&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var r=n(this).data("ui-draggable"),i=r.options,u=!1;r.scrollParent[0]!==document&&r.scrollParent[0].tagName!=="HTML"?(i.axis&&i.axis==="x"||(r.overflowOffset.top+r.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?r.scrollParent[0].scrollTop=u=r.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-r.overflowOffset.top<i.scrollSensitivity&&(r.scrollParent[0].scrollTop=u=r.scrollParent[0].scrollTop-i.scrollSpeed)),i.axis&&i.axis==="y"||(r.overflowOffset.left+r.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?r.scrollParent[0].scrollLeft=u=r.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-r.overflowOffset.left<i.scrollSensitivity&&(r.scrollParent[0].scrollLeft=u=r.scrollParent[0].scrollLeft-i.scrollSpeed))):(i.axis&&i.axis==="x"||(t.pageY-n(document).scrollTop()<i.scrollSensitivity?u=n(document).scrollTop(n(document).scrollTop()-i.scrollSpeed):n(window).height()-(t.pageY-n(document).scrollTop())<i.scrollSensitivity&&(u=n(document).scrollTop(n(document).scrollTop()+i.scrollSpeed))),i.axis&&i.axis==="y"||(t.pageX-n(document).scrollLeft()<i.scrollSensitivity?u=n(document).scrollLeft(n(document).scrollLeft()-i.scrollSpeed):n(window).width()-(t.pageX-n(document).scrollLeft())<i.scrollSensitivity&&(u=n(document).scrollLeft(n(document).scrollLeft()+i.scrollSpeed))));u!==!1&&n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(r,t)}});n.ui.plugin.add("draggable","snap",{start:function(){var t=n(this).data("ui-draggable"),i=t.options;t.snapElements=[];n(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=n(this),r=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:r.top,left:r.left})})},drag:function(t,i){for(var c,l,a,v,e,s,o,h,k,r=n(this).data("ui-draggable"),d=r.options,u=d.snapTolerance,y=i.offset.left,w=y+r.helperProportions.width,p=i.offset.top,b=p+r.helperProportions.height,f=r.snapElements.length-1;f>=0;f--){if(e=r.snapElements[f].left,s=e+r.snapElements[f].width,o=r.snapElements[f].top,h=o+r.snapElements[f].height,!(e-u<y&&y<s+u&&o-u<p&&p<h+u||e-u<y&&y<s+u&&o-u<b&&b<h+u||e-u<w&&w<s+u&&o-u<p&&p<h+u||e-u<w&&w<s+u&&o-u<b&&b<h+u)){r.snapElements[f].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[f].item}));r.snapElements[f].snapping=!1;continue}d.snapMode!=="inner"&&(c=Math.abs(o-b)<=u,l=Math.abs(h-p)<=u,a=Math.abs(e-w)<=u,v=Math.abs(s-y)<=u,c&&(i.position.top=r._convertPositionTo("relative",{top:o-r.helperProportions.height,left:0}).top-r.margins.top),l&&(i.position.top=r._convertPositionTo("relative",{top:h,left:0}).top-r.margins.top),a&&(i.position.left=r._convertPositionTo("relative",{top:0,left:e-r.helperProportions.width}).left-r.margins.left),v&&(i.position.left=r._convertPositionTo("relative",{top:0,left:s}).left-r.margins.left));k=c||l||a||v;d.snapMode!=="outer"&&(c=Math.abs(o-p)<=u,l=Math.abs(h-b)<=u,a=Math.abs(e-y)<=u,v=Math.abs(s-w)<=u,c&&(i.position.top=r._convertPositionTo("relative",{top:o,left:0}).top-r.margins.top),l&&(i.position.top=r._convertPositionTo("relative",{top:h-r.helperProportions.height,left:0}).top-r.margins.top),a&&(i.position.left=r._convertPositionTo("relative",{top:0,left:e}).left-r.margins.left),v&&(i.position.left=r._convertPositionTo("relative",{top:0,left:s-r.helperProportions.width}).left-r.margins.left));!r.snapElements[f].snapping&&(c||l||a||v||k)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[f].item}));r.snapElements[f].snapping=c||l||a||v||k}}});n.ui.plugin.add("draggable","stack",{start:function(){var i,r=this.data("ui-draggable").options,t=n.makeArray(n(r.stack)).sort(function(t,i){return(parseInt(n(t).css("zIndex"),10)||0)-(parseInt(n(i).css("zIndex"),10)||0)});t.length&&(i=parseInt(n(t[0]).css("zIndex"),10)||0,n(t).each(function(t){n(this).css("zIndex",i+t)}),this.css("zIndex",i+t.length))}});n.ui.plugin.add("draggable","zIndex",{start:function(t,i){var r=n(i.helper),u=n(this).data("ui-draggable").options;r.css("zIndex")&&(u._zIndex=r.css("zIndex"));r.css("zIndex",u.zIndex)},stop:function(t,i){var r=n(this).data("ui-draggable").options;r._zIndex&&n(i.helper).css("zIndex",r._zIndex)}})}(jQuery),function(n){function t(n,t,i){return n>t&&n<t+i}n.widget("ui.droppable",{version:"1.10.1",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1;this.isout=!0;this.accept=n.isFunction(i)?i:function(n){return n.is(i)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};n.ui.ddmanager.droppables[t.scope]=n.ui.ddmanager.droppables[t.scope]||[];n.ui.ddmanager.droppables[t.scope].push(this);t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=n.ui.ddmanager.droppables[this.options.scope];t<i.length;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){t==="accept"&&(this.accept=n.isFunction(i)?i:function(n){return n.is(i)});n.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=n.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=n.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=n.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=n.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var r=i||n.ui.ddmanager.current,u=!1;return!r||(r.currentItem||r.element)[0]===this.element[0]?!1:(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=n.data(this,"ui-droppable");if(t.options.greedy&&!t.options.disabled&&t.options.scope===r.options.scope&&t.accept.call(t.element[0],r.currentItem||r.element)&&n.ui.intersect(r,n.extend(t,{offset:t.element.offset()}),t.options.tolerance))return u=!0,!1}),u)?!1:this.accept.call(this.element[0],r.currentItem||r.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(r)),this.element):!1},ui:function(n){return{draggable:n.currentItem||n.element,helper:n.helper,position:n.position,offset:n.positionAbs}}});n.ui.intersect=function(n,i,r){if(!i.offset)return!1;var a,v,e=(n.positionAbs||n.position.absolute).left,s=e+n.helperProportions.width,o=(n.positionAbs||n.position.absolute).top,h=o+n.helperProportions.height,u=i.offset.left,c=u+i.proportions.width,f=i.offset.top,l=f+i.proportions.height;switch(r){case"fit":return u<=e&&s<=c&&f<=o&&h<=l;case"intersect":return u<e+n.helperProportions.width/2&&s-n.helperProportions.width/2<c&&f<o+n.helperProportions.height/2&&h-n.helperProportions.height/2<l;case"pointer":return a=(n.positionAbs||n.position.absolute).left+(n.clickOffset||n.offset.click).left,v=(n.positionAbs||n.position.absolute).top+(n.clickOffset||n.offset.click).top,t(v,f,i.proportions.height)&&t(a,u,i.proportions.width);case"touch":return(o>=f&&o<=l||h>=f&&h<=l||o<f&&h>l)&&(e>=u&&e<=c||s>=u&&s<=c||e<u&&s>c);default:return!1}};n.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var r,f,u=n.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,e=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();n:for(r=0;r<u.length;r++)if(!u[r].options.disabled&&(!t||u[r].accept.call(u[r].element[0],t.currentItem||t.element))){for(f=0;f<e.length;f++)if(e[f]===u[r].element[0]){u[r].proportions.height=0;continue n}(u[r].visible=u[r].element.css("display")!=="none",u[r].visible)&&(o==="mousedown"&&u[r]._activate.call(u[r],i),u[r].offset=u[r].element.offset(),u[r].proportions={width:u[r].element[0].offsetWidth,height:u[r].element[0].offsetHeight})}},drop:function(t,i){var r=!1;return n.each(n.ui.ddmanager.droppables[t.options.scope]||[],function(){this.options&&(!this.options.disabled&&this.visible&&n.ui.intersect(t,this,this.options.tolerance)&&(r=this._drop.call(this,i)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),r},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||n.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&n.ui.ddmanager.prepareOffsets(t,i);n.each(n.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r,e,f,o=n.ui.intersect(t,this,this.options.tolerance),u=!o&&this.isover?"isout":o&&!this.isover?"isover":null;u&&(this.options.greedy&&(e=this.options.scope,f=this.element.parents(":data(ui-droppable)").filter(function(){return n.data(this,"ui-droppable").options.scope===e}),f.length&&(r=n.data(f[0],"ui-droppable"),r.greedyChild=u==="isover")),r&&u==="isover"&&(r.isover=!1,r.isout=!0,r._out.call(r,i)),this[u]=!0,this[u==="isout"?"isover":"isout"]=!1,this[u==="isover"?"_over":"_out"].call(this,i),r&&u==="isout"&&(r.isout=!1,r.isover=!0,r._over.call(r,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable");t.options.refreshPositions||n.ui.ddmanager.prepareOffsets(t,i)}}}(jQuery),function(n){function i(n){return parseInt(n,10)||0}function t(n){return!isNaN(parseInt(n,10))}n.widget("ui.resizable",n.ui.mouse,{version:"1.10.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,f,r,i,o,u=this,t=this.options;if(this.element.addClass("ui-resizable"),n.extend(this,{_aspectRatio:!!t.aspectRatio,aspectRatio:t.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:t.helper||t.ghost||t.animate?t.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(n("<div class='ui-wrapper' style='overflow: hidden;'><\/div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=t.handles||(n(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for(this.handles==="all"&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},f=0;f<e.length;f++)r=n.trim(e[f]),o="ui-resizable-"+r,i=n("<div class='ui-resizable-handle "+o+"'><\/div>"),i.css({zIndex:t.zIndex}),"se"===r&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[r]=".ui-resizable-"+r,this.element.append(i);this._renderAxis=function(t){var i,r,u,f;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=n(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(r=n(this.handles[i],this.element),f=/sw|ne|nw|se|n|s/.test(i)?r.outerHeight():r.outerWidth(),u=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(u,f),this._proportionallyResize()),!n(this.handles[i]).length};this._renderAxis(this.element);this._handles=n(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){u.resizing||(this.className&&(i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),u.axis=i&&i[1]?i[1]:"se")});t.autoHide&&(this._handles.hide(),n(this.element).addClass("ui-resizable-autohide").mouseenter(function(){t.disabled||(n(this).removeClass("ui-resizable-autohide"),u._handles.show())}).mouseleave(function(){t.disabled||u.resizing||(n(this).addClass("ui-resizable-autohide"),u._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){n(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var r,i,u=!1;for(r in this.handles)i=n(this.handles[r])[0],(i===t.target||n.contains(i,t.target))&&(u=!0);return!this.options.disabled&&u},_mouseStart:function(t){var f,e,o,u=this.options,s=this.element.position(),r=this.element;return this.resizing=!0,/absolute/.test(r.css("position"))?r.css({position:"absolute",top:r.css("top"),left:r.css("left")}):r.is(".ui-draggable")&&r.css({position:"absolute",top:s.top,left:s.left}),this._renderProxy(),f=i(this.helper.css("left")),e=i(this.helper.css("top")),u.containment&&(f+=n(u.containment).scrollLeft()||0,e+=n(u.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:f,top:e},this.size=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.originalPosition={left:f,top:e},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof u.aspectRatio=="number"?u.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=n(".ui-resizable-"+this.axis).css("cursor"),n("body").css("cursor",o==="auto"?this.axis+"-resize":o),r.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,e=this.helper,r={},u=this.originalMousePosition,o=this.axis,s=this.position.top,h=this.position.left,c=this.size.width,l=this.size.height,a=t.pageX-u.left||0,v=t.pageY-u.top||0,f=this._change[o];return f?(i=f.apply(this,[t,a,v]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==s&&(r.top=this.position.top+"px"),this.position.left!==h&&(r.left=this.position.left+"px"),this.size.width!==c&&(r.width=this.size.width+"px"),this.size.height!==l&&(r.height=this.size.height+"px"),e.css(r),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),n.isEmptyObject(r)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var r,u,f,e,o,s,h,c=this.options,i=this;return this._helper&&(r=this._proportionallyResizeElements,u=r.length&&/textarea/i.test(r[0].nodeName),f=u&&n.ui.hasScroll(r[0],"left")?0:i.sizeDiff.height,e=u?0:i.sizeDiff.width,o={width:i.helper.width()-e,height:i.helper.height()-f},s=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,h=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null,c.animate||this.element.css(n.extend(o,{top:h,left:s})),i.helper.height(i.size.height),i.helper.width(i.size.width),this._helper&&!c.animate&&this._proportionallyResize()),n("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(n){var u,f,e,o,i,r=this.options;i={minWidth:t(r.minWidth)?r.minWidth:0,maxWidth:t(r.maxWidth)?r.maxWidth:Infinity,minHeight:t(r.minHeight)?r.minHeight:0,maxHeight:t(r.maxHeight)?r.maxHeight:Infinity};(this._aspectRatio||n)&&(u=i.minHeight*this.aspectRatio,e=i.minWidth/this.aspectRatio,f=i.maxHeight*this.aspectRatio,o=i.maxWidth/this.aspectRatio,u>i.minWidth&&(i.minWidth=u),e>i.minHeight&&(i.minHeight=e),f<i.maxWidth&&(i.maxWidth=f),o<i.maxHeight&&(i.maxHeight=o));this._vBoundaries=i},_updateCache:function(n){this.offset=this.helper.offset();t(n.left)&&(this.position.left=n.left);t(n.top)&&(this.position.top=n.top);t(n.height)&&(this.size.height=n.height);t(n.width)&&(this.size.width=n.width)},_updateRatio:function(n){var i=this.position,r=this.size,u=this.axis;return t(n.height)?n.width=n.height*this.aspectRatio:t(n.width)&&(n.height=n.width/this.aspectRatio),u==="sw"&&(n.left=i.left+(r.width-n.width),n.top=null),u==="nw"&&(n.top=i.top+(r.height-n.height),n.left=i.left+(r.width-n.width)),n},_respectSize:function(n){var i=this._vBoundaries,r=this.axis,u=t(n.width)&&i.maxWidth&&i.maxWidth<n.width,f=t(n.height)&&i.maxHeight&&i.maxHeight<n.height,e=t(n.width)&&i.minWidth&&i.minWidth>n.width,o=t(n.height)&&i.minHeight&&i.minHeight>n.height,s=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,c=/sw|nw|w/.test(r),l=/nw|ne|n/.test(r);return e&&(n.width=i.minWidth),o&&(n.height=i.minHeight),u&&(n.width=i.maxWidth),f&&(n.height=i.maxHeight),e&&c&&(n.left=s-i.minWidth),u&&c&&(n.left=s-i.maxWidth),o&&l&&(n.top=h-i.minHeight),f&&l&&(n.top=h-i.maxHeight),n.width||n.height||n.left||!n.top?n.width||n.height||n.top||!n.left||(n.left=null):n.top=null,n},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,r,u,n,f=this.helper||this.element,i=0;i<this._proportionallyResizeElements.length;i++){if(n=this._proportionallyResizeElements[i],!this.borderDif)for(this.borderDif=[],r=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],u=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;t<r.length;t++)this.borderDif[t]=(parseInt(r[t],10)||0)+(parseInt(u[t],10)||0);n.css({height:f.height()-this.borderDif[0]-this.borderDif[2]||0,width:f.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset();this._helper?(this.helper=this.helper||n("<div style='overflow:hidden;'><\/div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(n,t){return{width:this.originalSize.width+t}},w:function(n,t){var i=this.originalSize,r=this.originalPosition;return{left:r.left+t,width:i.width-t}},n:function(n,t,i){var r=this.originalSize,u=this.originalPosition;return{top:u.top+i,height:r.height-i}},s:function(n,t,i){return{height:this.originalSize.height+i}},se:function(t,i,r){return n.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,r]))},sw:function(t,i,r){return n.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,r]))},ne:function(t,i,r){return n.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,r]))},nw:function(t,i,r){return n.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,r]))}},_propagate:function(t,i){n.ui.plugin.call(this,t,[i,this.ui()]);t!=="resize"&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});n.ui.plugin.add("resizable","animate",{stop:function(t){var i=n(this).data("ui-resizable"),u=i.options,r=i._proportionallyResizeElements,f=r.length&&/textarea/i.test(r[0].nodeName),s=f&&n.ui.hasScroll(r[0],"left")?0:i.sizeDiff.height,h=f?0:i.sizeDiff.width,c={width:i.size.width-h,height:i.size.height-s},e=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,o=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(n.extend(c,o&&e?{top:o,left:e}:{}),{duration:u.animateDuration,easing:u.animateEasing,step:function(){var u={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};r&&r.length&&n(r[0]).css({width:u.width,height:u.height});i._updateCache(u);i._propagate("resize",t)}})}});n.ui.plugin.add("resizable","containment",{start:function(){var u,e,o,s,h,c,l,t=n(this).data("ui-resizable"),a=t.options,v=t.element,f=a.containment,r=f instanceof n?f.get(0):/parent/.test(f)?v.parent().get(0):f;r&&(t.containerElement=n(r),/document/.test(f)||f===document?(t.containerOffset={left:0,top:0},t.containerPosition={left:0,top:0},t.parentData={element:n(document),left:0,top:0,width:n(document).width(),height:n(document).height()||document.body.parentNode.scrollHeight}):(u=n(r),e=[],n(["Top","Right","Left","Bottom"]).each(function(n,t){e[n]=i(u.css("padding"+t))}),t.containerOffset=u.offset(),t.containerPosition=u.position(),t.containerSize={height:u.innerHeight()-e[3],width:u.innerWidth()-e[1]},o=t.containerOffset,s=t.containerSize.height,h=t.containerSize.width,c=n.ui.hasScroll(r,"left")?r.scrollWidth:h,l=n.ui.hasScroll(r)?r.scrollHeight:s,t.parentData={element:r,left:o.left,top:o.top,width:c,height:l}))},resize:function(t){var f,o,s,h,i=n(this).data("ui-resizable"),a=i.options,r=i.containerOffset,c=i.position,e=i._aspectRatio||t.shiftKey,u={top:0,left:0},l=i.containerElement;l[0]!==document&&/static/.test(l.css("position"))&&(u=r);c.left<(i._helper?r.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-r.left:i.position.left-u.left),e&&(i.size.height=i.size.width/i.aspectRatio),i.position.left=a.helper?r.left:0);c.top<(i._helper?r.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-r.top:i.position.top),e&&(i.size.width=i.size.height*i.aspectRatio),i.position.top=i._helper?r.top:0);i.offset.left=i.parentData.left+i.position.left;i.offset.top=i.parentData.top+i.position.top;f=Math.abs((i._helper?i.offset.left-u.left:i.offset.left-u.left)+i.sizeDiff.width);o=Math.abs((i._helper?i.offset.top-u.top:i.offset.top-r.top)+i.sizeDiff.height);s=i.containerElement.get(0)===i.element.parent().get(0);h=/relative|absolute/.test(i.containerElement.css("position"));s&&h&&(f-=i.parentData.left);f+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-f,e&&(i.size.height=i.size.width/i.aspectRatio));o+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-o,e&&(i.size.width=i.size.height*i.aspectRatio))},stop:function(){var t=n(this).data("ui-resizable"),r=t.options,u=t.containerOffset,f=t.containerPosition,e=t.containerElement,i=n(t.helper),o=i.offset(),s=i.outerWidth()-t.sizeDiff.width,h=i.outerHeight()-t.sizeDiff.height;t._helper&&!r.animate&&/relative/.test(e.css("position"))&&n(this).css({left:o.left-f.left-u.left,width:s,height:h});t._helper&&!r.animate&&/static/.test(e.css("position"))&&n(this).css({left:o.left-f.left-u.left,width:s,height:h})}});n.ui.plugin.add("resizable","alsoResize",{start:function(){var r=n(this).data("ui-resizable"),t=r.options,i=function(t){n(t).each(function(){var t=n(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};typeof t.alsoResize!="object"||t.alsoResize.parentNode?i(t.alsoResize):t.alsoResize.length?(t.alsoResize=t.alsoResize[0],i(t.alsoResize)):n.each(t.alsoResize,function(n){i(n)})},resize:function(t,i){var r=n(this).data("ui-resizable"),u=r.options,f=r.originalSize,e=r.originalPosition,s={height:r.size.height-f.height||0,width:r.size.width-f.width||0,top:r.position.top-e.top||0,left:r.position.left-e.left||0},o=function(t,r){n(t).each(function(){var t=n(this),f=n(this).data("ui-resizable-alsoresize"),u={},e=r&&r.length?r:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];n.each(e,function(n,t){var i=(f[t]||0)+(s[t]||0);i&&i>=0&&(u[t]=i||null)});t.css(u)})};typeof u.alsoResize!="object"||u.alsoResize.nodeType?o(u.alsoResize):n.each(u.alsoResize,function(n,t){o(n,t)})},stop:function(){n(this).removeData("resizable-alsoresize")}});n.ui.plugin.add("resizable","ghost",{start:function(){var t=n(this).data("ui-resizable"),i=t.options,r=t.size;t.ghost=t.originalElement.clone();t.ghost.css({opacity:.25,display:"block",position:"relative",height:r.height,width:r.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");t.ghost.appendTo(t.helper)},resize:function(){var t=n(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=n(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}});n.ui.plugin.add("resizable","grid",{resize:function(){var t=n(this).data("ui-resizable"),i=t.options,v=t.size,f=t.originalSize,e=t.originalPosition,h=t.axis,c=typeof i.grid=="number"?[i.grid,i.grid]:i.grid,o=c[0]||1,s=c[1]||1,l=Math.round((v.width-f.width)/o)*o,a=Math.round((v.height-f.height)/s)*s,r=f.width+l,u=f.height+a,y=i.maxWidth&&i.maxWidth<r,p=i.maxHeight&&i.maxHeight<u,w=i.minWidth&&i.minWidth>r,b=i.minHeight&&i.minHeight>u;i.grid=c;w&&(r=r+o);b&&(u=u+s);y&&(r=r-o);p&&(u=u-s);/^(se|s|e)$/.test(h)?(t.size.width=r,t.size.height=u):/^(ne)$/.test(h)?(t.size.width=r,t.size.height=u,t.position.top=e.top-a):/^(sw)$/.test(h)?(t.size.width=r,t.size.height=u,t.position.left=e.left-l):(t.size.width=r,t.size.height=u,t.position.top=e.top-a,t.position.left=e.left-l)}})}(jQuery),function(n){n.widget("ui.selectable",n.ui.mouse,{version:"1.10.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable");this.dragged=!1;this.refresh=function(){t=n(i.options.filter,i.element[0]);t.addClass("ui-selectee");t.each(function(){var t=n(this),i=t.offset();n.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})};this.refresh();this.selectees=t.addClass("ui-selectee");this._mouseInit();this.helper=n("<div class='ui-selectable-helper'><\/div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(t){var i=this,r=this.options;(this.opos=[t.pageX,t.pageY],this.options.disabled)||(this.selectees=n(r.filter,this.element[0]),this._trigger("start",t),n(r.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),r.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var r=n.data(this,"selectable-item");r.startselected=!0;t.metaKey||t.ctrlKey||(r.$element.removeClass("ui-selected"),r.selected=!1,r.$element.addClass("ui-unselecting"),r.unselecting=!0,i._trigger("unselecting",t,{unselecting:r.element}))}),n(t.target).parents().addBack().each(function(){var u,r=n.data(this,"selectable-item");if(r)return u=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected"),r.$element.removeClass(u?"ui-unselecting":"ui-selected").addClass(u?"ui-selecting":"ui-unselecting"),r.unselecting=!u,r.selecting=u,r.selected=u,u?i._trigger("selecting",t,{selecting:r.element}):i._trigger("unselecting",t,{unselecting:r.element}),!1}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var e,o=this,s=this.options,i=this.opos[0],r=this.opos[1],u=t.pageX,f=t.pageY;return i>u&&(e=u,u=i,i=e),r>f&&(e=f,f=r,r=e),this.helper.css({left:i,top:r,width:u-i,height:f-r}),this.selectees.each(function(){var e=n.data(this,"selectable-item"),h=!1;e&&e.element!==o.element[0]&&(s.tolerance==="touch"?h=!(e.left>u||e.right<i||e.top>f||e.bottom<r):s.tolerance==="fit"&&(h=e.left>i&&e.right<u&&e.top>r&&e.bottom<f),h?(e.selected&&(e.$element.removeClass("ui-selected"),e.selected=!1),e.unselecting&&(e.$element.removeClass("ui-unselecting"),e.unselecting=!1),e.selecting||(e.$element.addClass("ui-selecting"),e.selecting=!0,o._trigger("selecting",t,{selecting:e.element}))):(e.selecting&&((t.metaKey||t.ctrlKey)&&e.startselected?(e.$element.removeClass("ui-selecting"),e.selecting=!1,e.$element.addClass("ui-selected"),e.selected=!0):(e.$element.removeClass("ui-selecting"),e.selecting=!1,e.startselected&&(e.$element.addClass("ui-unselecting"),e.unselecting=!0),o._trigger("unselecting",t,{unselecting:e.element}))),e.selected&&(t.metaKey||t.ctrlKey||e.startselected||(e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,o._trigger("unselecting",t,{unselecting:e.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,n(".ui-unselecting",this.element[0]).each(function(){var r=n.data(this,"selectable-item");r.$element.removeClass("ui-unselecting");r.unselecting=!1;r.startselected=!1;i._trigger("unselected",t,{unselected:r.element})}),n(".ui-selecting",this.element[0]).each(function(){var r=n.data(this,"selectable-item");r.$element.removeClass("ui-selecting").addClass("ui-selected");r.selecting=!1;r.selected=!0;r.startselected=!0;i._trigger("selected",t,{selected:r.element})}),this._trigger("stop",t),this.helper.remove(),!1}})}(jQuery),function(n){function t(n,t,i){return n>t&&n<t+i}n.widget("ui.sortable",n.ui.mouse,{version:"1.10.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var n=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?n.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1;this.offset=this.element.offset();this._mouseInit();this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var n=this.items.length-1;n>=0;n--)this.items[n].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,i){t==="disabled"?(this.options[t]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):n.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,i){var r=null,f=!1,u=this;return this.reverting?!1:this.options.disabled||this.options.type==="static"?!1:(this._refreshItems(t),n(t.target).parents().each(function(){if(n.data(this,u.widgetName+"-item")===u)return r=n(this),!1}),n.data(t.target,u.widgetName+"-item")===u&&(r=n(t.target)),!r)?!1:this.options.handle&&!i&&(n(this.options.handle,r).find("*").addBack().each(function(){this===t.target&&(f=!0)}),!f)?!1:(this.currentItem=r,this._removeCurrentsFromItems(),!0)},_mouseStart:function(t,i,r){var f,u=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},n.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,u.cursorAt&&this._adjustOffsetFromHelper(u.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),u.containment&&this._setContainment(),u.cursor&&(n("body").css("cursor")&&(this._storedCursor=n("body").css("cursor")),n("body").css("cursor",u.cursor)),u.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",u.opacity)),u.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",u.zIndex)),this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!r)for(f=this.containers.length-1;f>=0;f--)this.containers[f]._trigger("activate",t,this._uiHash(this));return n.ui.ddmanager&&(n.ui.ddmanager.current=this),n.ui.ddmanager&&!u.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,u,f,o,i=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-this.overflowOffset.top<i.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-i.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-this.overflowOffset.left<i.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-i.scrollSpeed)):(t.pageY-n(document).scrollTop()<i.scrollSensitivity?r=n(document).scrollTop(n(document).scrollTop()-i.scrollSpeed):n(window).height()-(t.pageY-n(document).scrollTop())<i.scrollSensitivity&&(r=n(document).scrollTop(n(document).scrollTop()+i.scrollSpeed)),t.pageX-n(document).scrollLeft()<i.scrollSensitivity?r=n(document).scrollLeft(n(document).scrollLeft()-i.scrollSpeed):n(window).width()-(t.pageX-n(document).scrollLeft())<i.scrollSensitivity&&(r=n(document).scrollLeft(n(document).scrollLeft()+i.scrollSpeed))),r!==!1&&n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&this.options.axis==="y"||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&this.options.axis==="x"||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;e>=0;e--)if((u=this.items[e],f=u.item[0],o=this._intersectsWithPointer(u),o)&&u.instance===this.currentContainer&&f!==this.currentItem[0]&&this.placeholder[o===1?"next":"prev"]()[0]!==f&&!n.contains(this.placeholder[0],f)&&(this.options.type==="semi-dynamic"?!n.contains(this.element[0],f):!0)){if(this.direction=o===1?"down":"up",this.options.tolerance==="pointer"||this._intersectsWithSides(u))this._rearrange(t,u);else break;this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(n.ui.ddmanager&&!this.options.dropBehaviour&&n.ui.ddmanager.drop(this,t),this.options.revert){var u=this,r=this.placeholder.offset();this.reverting=!0;n(this.helper).animate({left:r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft),top:r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){u._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});this.options.helper==="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!=="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),n.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?n(this.domPosition.prev).after(this.currentItem):n(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var r=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n(r).each(function(){var r=(n(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);r&&i.push((t.key||r[1]+"[]")+"="+(t.key&&t.expression?r[1]:r[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var r=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},r.each(function(){i.push(n(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(n){var t=this.positionAbs.left,h=t+this.helperProportions.width,i=this.positionAbs.top,c=i+this.helperProportions.height,r=n.left,f=r+n.width,u=n.top,e=u+n.height,o=this.offset.click.top,s=this.offset.click.left,l=i+o>u&&i+o<e&&t+s>r&&t+s<f;return this.options.tolerance==="pointer"||this.options.forcePointerForContainers||this.options.tolerance!=="pointer"&&this.helperProportions[this.floating?"width":"height"]>n[this.floating?"width":"height"]?l:r<t+this.helperProportions.width/2&&h-this.helperProportions.width/2<f&&u<i+this.helperProportions.height/2&&c-this.helperProportions.height/2<e},_intersectsWithPointer:function(n){var u=this.options.axis==="x"||t(this.positionAbs.top+this.offset.click.top,n.top,n.height),f=this.options.axis==="y"||t(this.positionAbs.left+this.offset.click.left,n.left,n.width),e=u&&f,i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return e?this.floating?r&&r==="right"||i==="down"?2:1:i&&(i==="down"?2:1):!1},_intersectsWithSides:function(n){var u=t(this.positionAbs.top+this.offset.click.top,n.top+n.height/2,n.height),f=t(this.positionAbs.left+this.offset.click.left,n.left+n.width/2,n.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?r==="right"&&f||r==="left"&&!f:i&&(i==="down"&&u||i==="up"&&!u)},_getDragVerticalDirection:function(){var n=this.positionAbs.top-this.lastPositionAbs.top;return n!==0&&(n>0?"down":"up")},_getDragHorizontalDirection:function(){var n=this.positionAbs.left-this.lastPositionAbs.left;return n!==0&&(n>0?"right":"left")},refresh:function(n){return this._refreshItems(n),this.refreshPositions(),this},_connectWith:function(){var n=this.options;return n.connectWith.constructor===String?[n.connectWith]:n.connectWith},_getItemsAsjQuery:function(t){var r,u,e,i,s=[],f=[],o=this._connectWith();if(o&&t)for(r=o.length-1;r>=0;r--)for(e=n(o[r]),u=e.length-1;u>=0;u--)i=n.data(e[u],this.widgetFullName),i&&i!==this&&!i.options.disabled&&f.push([n.isFunction(i.options.items)?i.options.items.call(i.element):n(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i]);for(f.push([n.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):n(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),r=f.length-1;r>=0;r--)f[r][0].each(function(){s.push(this)});return n(s)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=n.grep(this.items,function(n){for(var i=0;i<t.length;i++)if(t[i]===n.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[];this.containers=[this];var r,u,e,i,o,s,h,l,a=this.items,f=[[n.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):n(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(r=c.length-1;r>=0;r--)for(e=n(c[r]),u=e.length-1;u>=0;u--)i=n.data(e[u],this.widgetFullName),i&&i!==this&&!i.options.disabled&&(f.push([n.isFunction(i.options.items)?i.options.items.call(i.element[0],t,{item:this.currentItem}):n(i.options.items,i.element),i]),this.containers.push(i));for(r=f.length-1;r>=0;r--)for(o=f[r][1],s=f[r][0],u=0,l=s.length;u<l;u++)h=n(s[u]),h.data(this.widgetName+"-item",o),a.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var r,f,u,i=this.items.length-1;i>=0;i--)(r=this.items[i],r.instance!==this.currentContainer&&this.currentContainer&&r.item[0]!==this.currentItem[0])||(f=this.options.toleranceElement?n(this.options.toleranceElement,r.item):r.item,t||(r.width=f.outerWidth(),r.height=f.outerHeight()),u=f.offset(),r.left=u.left,r.top=u.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)u=this.containers[i].element.offset(),this.containers[i].containerCache.left=u.left,this.containers[i].containerCache.top=u.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var r,i=t.options;i.placeholder&&i.placeholder.constructor!==String||(r=i.placeholder,i.placeholder={element:function(){var i=n(document.createElement(t.currentItem[0].nodeName)).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return r||(i.style.visibility="hidden"),i},update:function(n,u){(!r||i.forcePlaceholderSize)&&(u.height()||u.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),u.width()||u.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}});t.placeholder=n(i.placeholder.element.call(t.element,t.currentItem));t.currentItem.after(t.placeholder);i.placeholder.update(t,t.placeholder)},_contactContainers:function(t){for(var u,c,e,s,l,o,f,a,h=null,r=null,i=this.containers.length-1;i>=0;i--)if(!n.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(h&&n.contains(this.containers[i].element[0],h.element[0]))continue;h=this.containers[i];r=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(h)if(this.containers.length===1)this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1;else{for(c=1e4,e=null,s=this.containers[r].floating?"left":"top",l=this.containers[r].floating?"width":"height",o=this.positionAbs[s]+this.offset.click[s],u=this.items.length-1;u>=0;u--)n.contains(this.containers[r].element[0],this.items[u].item[0])&&this.items[u].item[0]!==this.currentItem[0]&&(f=this.items[u].item.offset()[s],a=!1,Math.abs(f-o)>Math.abs(f+this.items[u][l]-o)&&(a=!0,f+=this.items[u][l]),Math.abs(f-o)<c&&(c=Math.abs(f-o),e=this.items[u],this.direction=a?"up":"down"));if(!e&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[r];e?this._rearrange(t,e,null,!0):this._rearrange(t,null,this.containers[r].element,!0);this._trigger("change",t,this._uiHash());this.containers[r]._trigger("change",t,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[r]._trigger("over",t,this._uiHash(this));this.containers[r].containerCache.over=1}},_createHelper:function(t){var r=this.options,i=n.isFunction(r.helper)?n(r.helper.apply(this.element[0],[t,this.currentItem])):r.helper==="clone"?this.currentItem.clone():this.currentItem;return i.parents("body").length||n(r.appendTo!=="parent"?r.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!i[0].style.width||r.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||r.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" "));n.isArray(t)&&(t={left:+t[0],top:+t[1]||0});"left"in t&&(this.offset.click.left=t.left+this.margins.left);"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left);"top"in t&&(this.offset.click.top=t.top+this.margins.top);"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()==="html"&&n.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==="relative"){var n=this.currentItem.position();return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:n.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,r,u,i=this.options;i.containment==="parent"&&(i.containment=this.helper[0].parentNode);(i.containment==="document"||i.containment==="window")&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,n(i.containment==="document"?document:window).width()-this.helperProportions.width-this.margins.left,(n(i.containment==="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]);/^(document|window|parent)$/.test(i.containment)||(t=n(i.containment)[0],r=n(i.containment).offset(),u=n(t).css("overflow")!=="hidden",this.containment=[r.left+(parseInt(n(t).css("borderLeftWidth"),10)||0)+(parseInt(n(t).css("paddingLeft"),10)||0)-this.margins.left,r.top+(parseInt(n(t).css("borderTopWidth"),10)||0)+(parseInt(n(t).css("paddingTop"),10)||0)-this.margins.top,r.left+(u?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(n(t).css("borderLeftWidth"),10)||0)-(parseInt(n(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,r.top+(u?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(n(t).css("borderTopWidth"),10)||0)-(parseInt(n(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var r=t==="absolute"?1:-1,u=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(u[0].tagName);return{top:i.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():f?0:u.scrollTop())*r,left:i.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():f?0:u.scrollLeft())*r}},_generatePosition:function(t){var r,u,i=this.options,f=t.pageX,e=t.pageY,o=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,s=/(html|body)/i.test(o[0].tagName);return this.cssPosition!=="relative"||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(e=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(e=this.containment[3]+this.offset.click.top)),i.grid&&(r=this.originalPageY+Math.round((e-this.originalPageY)/i.grid[1])*i.grid[1],e=this.containment?r-this.offset.click.top>=this.containment[1]&&r-this.offset.click.top<=this.containment[3]?r:r-this.offset.click.top>=this.containment[1]?r-i.grid[1]:r+i.grid[1]:r,u=this.originalPageX+Math.round((f-this.originalPageX)/i.grid[0])*i.grid[0],f=this.containment?u-this.offset.click.left>=this.containment[0]&&u-this.offset.click.left<=this.containment[2]?u:u-this.offset.click.left>=this.containment[0]?u-i.grid[0]:u+i.grid[0]:u)),{top:e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():s?0:o.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():s?0:o.scrollLeft())}},_rearrange:function(n,t,i,r){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],this.direction==="down"?t.item[0]:t.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var u=this.counter;this._delay(function(){u===this.counter&&this.refreshPositions(!r)})},_clear:function(t,i){this.reverting=!1;var r,u=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(r in this._storedCSS)(this._storedCSS[r]==="auto"||this._storedCSS[r]==="static")&&(this._storedCSS[r]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!i&&u.push(function(n){this._trigger("receive",n,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!i&&u.push(function(n){this._trigger("update",n,this._uiHash())}),this!==this.currentContainer&&(i||(u.push(function(n){this._trigger("remove",n,this._uiHash())}),u.push(function(n){return function(t){n._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),u.push(function(n){return function(t){n._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),r=this.containers.length-1;r>=0;r--)i||u.push(function(n){return function(t){n._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[r])),this.containers[r].containerCache.over&&(u.push(function(n){return function(t){n._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[r])),this.containers[r].containerCache.over=0);if(this._storedCursor&&n("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!i){for(this._trigger("beforeStop",t,this._uiHash()),r=0;r<u.length;r++)u[r].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(i||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!i){for(r=0;r<u.length;r++)u[r].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){n.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||n([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})}(jQuery);jQuery.effects||function(n,t){var i="ui-effects-";n.effects={effect:{}},function(n,t){function e(n,t,i){var r=s[t.type]||{};return n==null?i||!t.def?null:t.def:(n=r.floor?~~n:parseFloat(n),isNaN(n))?t.def:r.mod?(n+r.mod)%r.mod:0>n?0:r.max<n?r.max:n}function l(t){var e=i(),o=e._rgba=[];return(t=t.toLowerCase(),r(v,function(n,i){var r,s=i.re.exec(t),h=s&&i.parse(s),f=i.space||"rgba";if(h)return r=e[f](h),e[u[f].cache]=r[u[f].cache],o=e._rgba=r._rgba,!1}),o.length)?(o.join()==="0,0,0,0"&&n.extend(o,f.transparent),e):f[t]}function o(n,t,i){return(i=(i+1)%1,i*6<1)?n+(t-n)*i*6:i*2<1?t:i*3<2?n+(t-n)*(2/3-i)*6:n}var a=/^([\-+])=\s*(\d+\.?\d*)/,v=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(n){return[n[1],n[2],n[3],n[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(n){return[n[1]*2.55,n[2]*2.55,n[3]*2.55,n[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(n){return[n[1],n[2]/100,n[3]/100,n[4]]}}],i=n.Color=function(t,i,r,u){return new n.Color.fn.parse(t,i,r,u)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},s={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=i.support={},c=n("<p>")[0],f,r=n.each;c.style.cssText="background-color:rgba(1,1,1,.5)";h.rgba=c.style.backgroundColor.indexOf("rgba")>-1;r(u,function(n,t){t.cache="_"+n;t.props.alpha={idx:3,type:"percent",def:1}});i.fn=n.extend(i.prototype,{parse:function(o,s,h,c){if(o===t)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=n(o).css(s),s=t);var a=this,v=n.type(o),y=this._rgba=[];return(s!==t&&(o=[o,s,h,c],v="array"),v==="string")?this.parse(l(o)||f._default):v==="array"?(r(u.rgba.props,function(n,t){y[t.idx]=e(o[t.idx],t)}),this):v==="object"?(o instanceof i?r(u,function(n,t){o[t.cache]&&(a[t.cache]=o[t.cache].slice())}):r(u,function(t,i){var u=i.cache;r(i.props,function(n,t){if(!a[u]&&i.to){if(n==="alpha"||o[n]==null)return;a[u]=i.to(a._rgba)}a[u][t.idx]=e(o[n],t,!0)});a[u]&&n.inArray(null,a[u].slice(0,3))<0&&(a[u][3]=1,i.from&&(a._rgba=i.from(a[u])))}),this):void 0},is:function(n){var e=i(n),t=!0,f=this;return r(u,function(n,i){var o,u=e[i.cache];return u&&(o=f[i.cache]||i.to&&i.to(f._rgba)||[],r(i.props,function(n,i){if(u[i.idx]!=null)return t=u[i.idx]===o[i.idx]})),t}),t},_space:function(){var n=[],t=this;return r(u,function(i,r){t[r.cache]&&n.push(i)}),n.pop()},transition:function(n,t){var f=i(n),c=f._space(),o=u[c],l=this.alpha()===0?i("transparent"):this,a=l[o.cache]||o.to(l._rgba),h=a.slice();return f=f[o.cache],r(o.props,function(n,i){var c=i.idx,r=a[c],u=f[c],o=s[i.type]||{};u!==null&&(r===null?h[c]=u:(o.mod&&(u-r>o.mod/2?r+=o.mod:r-u>o.mod/2&&(r-=o.mod)),h[c]=e((u-r)*t+r,i)))}),this[c](h)},blend:function(t){if(this._rgba[3]===1)return this;var r=this._rgba.slice(),u=r.pop(),f=i(t)._rgba;return i(n.map(r,function(n,t){return(1-u)*f[t]+u*n}))},toRgbaString:function(){var i="rgba(",t=n.map(this._rgba,function(n,t){return n==null?t>2?1:0:n});return t[3]===1&&(t.pop(),i="rgb("),i+t.join()+")"},toHslaString:function(){var i="hsla(",t=n.map(this.hsla(),function(n,t){return n==null&&(n=t>2?1:0),t&&t<3&&(n=Math.round(n*100)+"%"),n});return t[3]===1&&(t.pop(),i="hsl("),i+t.join()+")"},toHexString:function(t){var i=this._rgba.slice(),r=i.pop();return t&&i.push(~~(r*255)),"#"+n.map(i,function(n){return n=(n||0).toString(16),n.length===1?"0"+n:n}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});i.fn.parse.prototype=i.fn;u.hsla.to=function(n){if(n[0]==null||n[1]==null||n[2]==null)return[null,null,null,n[3]];var i=n[0]/255,r=n[1]/255,f=n[2]/255,s=n[3],u=Math.max(i,r,f),e=Math.min(i,r,f),t=u-e,o=u+e,h=o*.5,c,l;return c=e===u?0:i===u?60*(r-f)/t+360:r===u?60*(f-i)/t+120:60*(i-r)/t+240,l=t===0?0:h<=.5?t/o:t/(2-o),[Math.round(c)%360,l,h,s==null?1:s]};u.hsla.from=function(n){if(n[0]==null||n[1]==null||n[2]==null)return[null,null,null,n[3]];var r=n[0]/360,u=n[1],t=n[2],e=n[3],i=t<=.5?t*(1+u):t+u-t*u,f=2*t-i;return[Math.round(o(f,i,r+1/3)*255),Math.round(o(f,i,r)*255),Math.round(o(f,i,r-1/3)*255),e]};r(u,function(u,f){var s=f.props,o=f.cache,h=f.to,c=f.from;i.fn[u]=function(u){if(h&&!this[o]&&(this[o]=h(this._rgba)),u===t)return this[o].slice();var l,a=n.type(u),v=a==="array"||a==="object"?u:arguments,f=this[o].slice();return r(s,function(n,t){var i=v[a==="object"?n:t.idx];i==null&&(i=f[t.idx]);f[t.idx]=e(i,t)}),c?(l=i(c(f)),l[o]=f,l):i(f)};r(s,function(t,r){i.fn[t]||(i.fn[t]=function(i){var f=n.type(i),h=t==="alpha"?this._hsla?"hsla":"rgba":u,o=this[h](),s=o[r.idx],e;return f==="undefined"?s:(f==="function"&&(i=i.call(this,s),f=n.type(i)),i==null&&r.empty)?this:(f==="string"&&(e=a.exec(i),e&&(i=s+parseFloat(e[2])*(e[1]==="+"?1:-1))),o[r.idx]=i,this[h](o))})})});i.hook=function(t){var u=t.split(" ");r(u,function(t,r){n.cssHooks[r]={set:function(t,u){var o,f,e="";if(u!=="transparent"&&(n.type(u)!=="string"||(o=l(u)))){if(u=i(o||u),!h.rgba&&u._rgba[3]!==1){for(f=r==="backgroundColor"?t.parentNode:t;(e===""||e==="transparent")&&f&&f.style;)try{e=n.css(f,"backgroundColor");f=f.parentNode}catch(s){}u=u.blend(e&&e!=="transparent"?e:"_default")}u=u.toRgbaString()}try{t.style[r]=u}catch(s){}}};n.fx.step[r]=function(t){t.colorInit||(t.start=i(t.elem,r),t.end=i(t.end),t.colorInit=!0);n.cssHooks[r].set(t.elem,t.start.transition(t.end,t.pos))}})};i.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");n.cssHooks.borderColor={expand:function(n){var t={};return r(["Top","Right","Bottom","Left"],function(i,r){t["border"+r+"Color"]=n}),t}};f=n.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(t){var r,u,i=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,f={};if(i&&i.length&&i[0]&&i[i[0]])for(u=i.length;u--;)r=i[u],typeof i[r]=="string"&&(f[n.camelCase(r)]=i[r]);else for(r in i)typeof i[r]=="string"&&(f[r]=i[r]);return f}function f(t,i){var e={},r,f;for(r in i)f=i[r],t[r]!==f&&(u[r]||(n.fx.step[r]||!isNaN(parseFloat(f)))&&(e[r]=f));return e}var r=["add","remove","toggle"],u={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};n.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){n.fx.step[i]=function(n){(n.end==="none"||n.setAttr)&&(n.pos!==1||n.setAttr)||(jQuery.style(n.elem,i,n.end),n.setAttr=!0)}});n.fn.addBack||(n.fn.addBack=function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))});n.effects.animateClass=function(t,u,e,o){var s=n.speed(u,e,o);return this.queue(function(){var e=n(this),h=e.attr("class")||"",o,u=s.children?e.find("*").addBack():e;u=u.map(function(){var t=n(this);return{el:t,start:i(this)}});o=function(){n.each(r,function(n,i){t[i]&&e[i+"Class"](t[i])})};o();u=u.map(function(){return this.end=i(this.el[0]),this.diff=f(this.start,this.end),this});e.attr("class",h);u=u.map(function(){var i=this,t=n.Deferred(),r=n.extend({},s,{queue:!1,complete:function(){t.resolve(i)}});return this.el.animate(this.diff,r),t.promise()});n.when.apply(n,u.get()).done(function(){o();n.each(arguments,function(){var t=this.el;n.each(this.diff,function(n){t.css(n,"")})});s.complete.call(e[0])})})};n.fn.extend({_addClass:n.fn.addClass,addClass:function(t,i,r,u){return i?n.effects.animateClass.call(this,{add:t},i,r,u):this._addClass(t)},_removeClass:n.fn.removeClass,removeClass:function(t,i,r,u){return arguments.length>1?n.effects.animateClass.call(this,{remove:t},i,r,u):this._removeClass.apply(this,arguments)},_toggleClass:n.fn.toggleClass,toggleClass:function(i,r,u,f,e){return typeof r=="boolean"||r===t?u?n.effects.animateClass.call(this,r?{add:i}:{remove:i},u,f,e):this._toggleClass(i,r):n.effects.animateClass.call(this,{toggle:i},r,u,f)},switchClass:function(t,i,r,u,f){return n.effects.animateClass.call(this,{add:i,remove:t},r,u,f)}})}(),function(){function r(t,i,r,u){return n.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},i==null&&(i={}),n.isFunction(i)&&(u=i,r=null,i={}),(typeof i=="number"||n.fx.speeds[i])&&(u=r,r=i,i={}),n.isFunction(r)&&(u=r,r=null),i&&n.extend(t,i),r=r||i.duration,t.duration=n.fx.off?0:typeof r=="number"?r:r in n.fx.speeds?n.fx.speeds[r]:n.fx.speeds._default,t.complete=u||i.complete,t}function u(t){return!t||typeof t=="number"||n.fx.speeds[t]?!0:typeof t=="string"&&!n.effects.effect[t]}n.extend(n.effects,{version:"1.10.1",save:function(n,t){for(var r=0;r<t.length;r++)t[r]!==null&&n.data(i+t[r],n[0].style[t[r]])},restore:function(n,r){for(var f,u=0;u<r.length;u++)r[u]!==null&&(f=n.data(i+r[u]),f===t&&(f=""),n.css(r[u],f))},setMode:function(n,t){return t==="toggle"&&(t=n.is(":hidden")?"show":"hide"),t},getBaseline:function(n,t){var i,r;switch(n[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=n[0]/t.height}switch(n[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=n[1]/t.width}return{x:r,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},u=n("<div><\/div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),f={width:t.width(),height:t.height()},r=document.activeElement;try{r.id}catch(e){r=document.body}return t.wrap(u),(t[0]===r||n.contains(t[0],r))&&n(r).focus(),u=t.parent(),t.css("position")==="static"?(u.css({position:"relative"}),t.css({position:"relative"})):(n.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),n.each(["top","left","bottom","right"],function(n,r){i[r]=t.css(r);isNaN(parseInt(i[r],10))&&(i[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(f),u.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||n.contains(t[0],i))&&n(i).focus()),t},setTransition:function(t,i,r,u){return u=u||{},n.each(i,function(n,i){var f=t.cssUnit(i);f[0]>0&&(u[i]=f[0]*r+f[1])}),u}});n.fn.extend({effect:function(){function e(i){function o(){n.isFunction(u)&&u.call(r[0]);n.isFunction(i)&&i()}var r=n(this),u=t.complete,e=t.mode;(r.is(":hidden")?e==="hide":e==="show")?o():f.call(r[0],t,o)}var t=r.apply(this,arguments),i=t.mode,u=t.queue,f=n.effects.effect[t.effect];return n.fx.off||!f?i?this[i](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)}):u===!1?this.each(e):this.queue(u||"fx",e)},_show:n.fn.show,show:function(n){if(u(n))return this._show.apply(this,arguments);var t=r.apply(this,arguments);return t.mode="show",this.effect.call(this,t)},_hide:n.fn.hide,hide:function(n){if(u(n))return this._hide.apply(this,arguments);var t=r.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:n.fn.toggle,toggle:function(t){if(u(t)||typeof t=="boolean"||n.isFunction(t))return this.__toggle.apply(this,arguments);var i=r.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)},cssUnit:function(t){var i=this.css(t),r=[];return n.each(["em","px","%","pt"],function(n,t){i.indexOf(t)>0&&(r=[parseFloat(i),t])}),r}})}(),function(){var t={};n.each(["Quad","Cubic","Quart","Quint","Expo"],function(n,i){t[i]=function(t){return Math.pow(t,n+2)}});n.extend(t,{Sine:function(n){return 1-Math.cos(n*Math.PI/2)},Circ:function(n){return 1-Math.sqrt(1-n*n)},Elastic:function(n){return n===0||n===1?n:-Math.pow(2,8*(n-1))*Math.sin(((n-1)*80-7.5)*Math.PI/15)},Back:function(n){return n*n*(3*n-2)},Bounce:function(n){for(var t,i=4;n<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((t*3-2)/22-n,2)}});n.each(t,function(t,i){n.easing["easeIn"+t]=i;n.easing["easeOut"+t]=function(n){return 1-i(1-n)};n.easing["easeInOut"+t]=function(n){return n<.5?i(n*2)/2:1-i(n*-2+2)/2}})}()}(jQuery),function(n){var r=0,t={},i={};t.height=t.paddingTop=t.paddingBottom=t.borderTopWidth=t.borderBottomWidth="hide";i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="show";n.widget("ui.accordion",{version:"1.10.1",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=n();this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist");t.collapsible||t.active!==!1&&t.active!=null||(t.active=0);this._processPanels();t.active<0&&(t.active+=this.headers.length);this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():n(),content:this.active.length?this.active.next():n()}},_createIcons:function(){var t=this.options.icons;t&&(n("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var n;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});this._destroyIcons();n=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});this.options.heightStyle!=="content"&&n.css("height","")},_setOption:function(n,t){if(n==="active"){this._activate(t);return}n==="event"&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t));this._super(n,t);n!=="collapsible"||t||this.options.active!==!1||this._activate(0);n==="icons"&&(this._destroyIcons(),t&&this._createIcons());n==="disabled"&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=n.ui.keyCode,u=this.headers.length,f=this.headers.index(t.target),r=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:r=this.headers[(f+1)%u];break;case i.LEFT:case i.UP:r=this.headers[(f-1+u)%u];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:r=this.headers[0];break;case i.END:r=this.headers[u-1]}r&&(n(t.target).attr("tabIndex",-1),n(r).attr("tabIndex",0),r.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===n.ui.keyCode.UP&&t.ctrlKey&&n(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels();(t.active!==!1||t.collapsible!==!0)&&this.headers.length||(t.active=!1,this.active=n());t.active===!1?this._activate(0):this.active.length&&!n.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=n()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active);this._destroyIcons();this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all");this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var t,i=this.options,u=i.heightStyle,e=this.element.parent(),f=this.accordionId="ui-accordion-"+(this.element.attr("id")||++r);this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all");this.active.next().addClass("ui-accordion-content-active").show();this.headers.attr("role","tab").each(function(t){var i=n(this),r=i.attr("id"),e=i.next(),u=e.attr("id");r||(r=f+"-header-"+t,i.attr("id",r));u||(u=f+"-panel-"+t,e.attr("id",u));i.attr("aria-controls",u);e.attr("aria-labelledby",r)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide();this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0);this._createIcons();this._setupEvents(i.event);u==="fill"?(t=e.height(),this.element.siblings(":visible").each(function(){var i=n(this),r=i.css("position");r!=="absolute"&&r!=="fixed"&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=n(this).outerHeight(!0)}),this.headers.next().each(function(){n(this).height(Math.max(0,t-n(this).innerHeight()+n(this).height()))}).css("overflow","auto")):u==="auto"&&(t=0,this.headers.next().each(function(){t=Math.max(t,n(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:n.noop}))},_findActive:function(t){return typeof t=="number"?this.headers.eq(t):n()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&n.each(t.split(" "),function(n,t){i[t]="_eventHandler"});this._off(this.headers.add(this.headers.next()));this._on(this.headers,i);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,u=this.active,r=n(t.currentTarget),f=r[0]===u[0],e=f&&i.collapsible,s=e?n():r.next(),h=u.next(),o={oldHeader:u,oldPanel:h,newHeader:e?n():r,newPanel:s};(t.preventDefault(),(!f||i.collapsible)&&this._trigger("beforeActivate",t,o)!==!1)&&(i.active=e?!1:this.headers.index(r),this.active=f?n():r,this._toggle(o),u.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&u.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),f||(r.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&r.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),r.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var r=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0);this.prevShow=r;this.prevHide=i;this.options.animate?this._animate(r,i,t):(i.hide(),r.show(),this._toggleComplete(t));i.attr({"aria-expanded":"false","aria-hidden":"true"});i.prev().attr("aria-selected","false");r.length&&i.length?i.prev().attr("tabIndex",-1):r.length&&this.headers.filter(function(){return n(this).attr("tabIndex")===0}).attr("tabIndex",-1);r.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(n,r,u){var l,f,e,a=this,h=0,v=n.length&&(!r.length||n.index()<r.index()),s=this.options.animate||{},o=v&&s.down||s,c=function(){a._toggleComplete(u)};if(typeof o=="number"&&(e=o),typeof o=="string"&&(f=o),f=f||o.easing||s.easing,e=e||o.duration||s.duration,!r.length)return n.animate(i,e,f,c);if(!n.length)return r.animate(t,e,f,c);l=n.show().outerHeight();r.animate(t,{duration:e,easing:f,step:function(n,t){t.now=Math.round(n)}});n.hide().animate(i,{duration:e,easing:f,complete:c,step:function(n,t){t.now=Math.round(n);t.prop!=="height"?h+=t.now:a.options.heightStyle!=="content"&&(t.now=Math.round(l-r.outerHeight()-h),h=0)}})},_toggleComplete:function(n){var t=n.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all");t.length&&(t.parent()[0].className=t.parent()[0].className);this._trigger("activate",null,n)}})}(jQuery),function(n){var t=0;n.widget("ui.autocomplete",{version:"1.10.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,i,r,u=this.element[0].nodeName.toLowerCase(),f=u==="textarea",e=u==="input";this.isMultiLine=f?!0:e?!1:this.element.prop("isContentEditable");this.valueMethod=this.element[f||e?"val":"text"];this.isNewMenu=!0;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off");this._on(this.element,{keydown:function(u){if(this.element.prop("readOnly")){t=!0;r=!0;i=!0;return}t=!1;r=!1;i=!1;var f=n.ui.keyCode;switch(u.keyCode){case f.PAGE_UP:t=!0;this._move("previousPage",u);break;case f.PAGE_DOWN:t=!0;this._move("nextPage",u);break;case f.UP:t=!0;this._keyEvent("previous",u);break;case f.DOWN:t=!0;this._keyEvent("next",u);break;case f.ENTER:case f.NUMPAD_ENTER:this.menu.active&&(t=!0,u.preventDefault(),this.menu.select(u));break;case f.TAB:this.menu.active&&this.menu.select(u);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(u),u.preventDefault());break;default:i=!0;this._searchTimeout(u)}},keypress:function(r){if(t){t=!1;r.preventDefault();return}if(!i){var u=n.ui.keyCode;switch(r.keyCode){case u.PAGE_UP:this._move("previousPage",r);break;case u.PAGE_DOWN:this._move("nextPage",r);break;case u.UP:this._keyEvent("previous",r);break;case u.DOWN:this._keyEvent("next",r)}}},input:function(n){if(r){r=!1;n.preventDefault();return}this._searchTimeout(n)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(n){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching);this.close(n);this._change(n)}});this._initSource();this.menu=n("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({input:n(),role:null}).hide().data("ui-menu");this._on(this.menu.element,{mousedown:function(t){t.preventDefault();this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];n(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(r){r.target===t.element[0]||r.target===i||n.contains(i,r.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))){this.menu.blur();this.document.one("mousemove",function(){n(t.target).trigger(t.originalEvent)});return}var r=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)},menuselect:function(n,t){var i=t.item.data("ui-autocomplete-item"),r=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r;this.selectedItem=i}));!1!==this._trigger("select",n,{item:i})&&this._value(i.value);this.term=this._value();this.close(n);this.selectedItem=i}});this.liveRegion=n("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element);this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(n,t){this._super(n,t);n==="source"&&this._initSource();n==="appendTo"&&this.menu.element.appendTo(this._appendTo());n==="disabled"&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?n(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var i,r,t=this;n.isArray(this.options.source)?(i=this.options.source,this.source=function(t,r){r(n.ui.autocomplete.filter(i,t.term))}):typeof this.options.source=="string"?(r=this.options.source,this.source=function(i,u){t.xhr&&t.xhr.abort();t.xhr=n.ajax({url:r,data:i,dataType:"json",success:function(n){u(n)},error:function(){u([])}})}):this.source=this.options.source},_searchTimeout:function(n){clearTimeout(this.searching);this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,n))},this.options.delay)},search:function(n,t){return(n=n!=null?n:this._value(),this.term=this._value(),n.length<this.options.minLength)?this.close(t):this._trigger("search",t)===!1?void 0:this._search(n)},_search:function(n){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:n},this._response())},_response:function(){var n=this,i=++t;return function(r){i===t&&n.__response(r);n.pending--;n.pending||n.element.removeClass("ui-autocomplete-loading")}},__response:function(n){n&&(n=this._normalize(n));this._trigger("response",null,{content:n});!this.options.disabled&&n&&n.length&&!this.cancelSearch?(this._suggest(n),this._trigger("open")):this._close()},close:function(n){this.cancelSearch=!0;this._close(n)},_close:function(n){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",n))},_change:function(n){this.previous!==this._value()&&this._trigger("change",n,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:n.map(t,function(t){return typeof t=="string"?{label:t,value:t}:n.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t);this.menu.refresh();i.show();this._resizeMenu();i.position(n.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var n=this.menu.element;n.outerWidth(Math.max(n.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var r=this;n.each(i,function(n,i){r._renderItemData(t,i)})},_renderItemData:function(n,t){return this._renderItem(n,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return n("<li>").append(n("<a>").text(i.label)).appendTo(t)},_move:function(n,t){if(!this.menu.element.is(":visible")){this.search(null,t);return}if(this.menu.isFirstItem()&&/^previous/.test(n)||this.menu.isLastItem()&&/^next/.test(n)){this._value(this.term);this.menu.blur();return}this.menu[n](t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(n,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(n,t),t.preventDefault())}});n.extend(n.ui.autocomplete,{escapeRegex:function(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var r=new RegExp(n.ui.autocomplete.escapeRegex(i),"i");return n.grep(t,function(n){return r.test(n.label||n.value||n)})}});n.widget("ui.autocomplete",n.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(n){return n+(n>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(n){var t;(this._superApply(arguments),this.options.disabled||this.cancelSearch)||(t=n&&n.length?this.options.messages.results(n.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(jQuery),function(n){var i,r,u,t,f="ui-button ui-widget ui-state-default ui-corner-all",s="ui-state-hover ui-state-active ",e="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var t=n(this).find(":ui-button");setTimeout(function(){t.button("refresh")},1)},o=function(t){var i=t.name,r=t.form,u=n([]);return i&&(i=i.replace(/'/g,"\\'"),u=r?n(r).find("[name='"+i+"']"):n("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),u};n.widget("ui.button",{version:"1.10.1",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h);typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var s=this,e=this.options,c=this.type==="checkbox"||this.type==="radio",a=c?"":"ui-state-active",l="ui-state-focus";e.label===null&&(e.label=this.type==="input"?this.buttonElement.val():this.buttonElement.html());this._hoverable(this.buttonElement);this.buttonElement.addClass(f).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){e.disabled||this===i&&n(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){e.disabled||n(this).removeClass(a)}).bind("click"+this.eventNamespace,function(n){e.disabled&&(n.preventDefault(),n.stopImmediatePropagation())});this.element.bind("focus"+this.eventNamespace,function(){s.buttonElement.addClass(l)}).bind("blur"+this.eventNamespace,function(){s.buttonElement.removeClass(l)});c&&(this.element.bind("change"+this.eventNamespace,function(){t||s.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(n){e.disabled||(t=!1,r=n.pageX,u=n.pageY)}).bind("mouseup"+this.eventNamespace,function(n){e.disabled||(r!==n.pageX||u!==n.pageY)&&(t=!0)}));this.type==="checkbox"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(e.disabled||t)return!1}):this.type==="radio"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(e.disabled||t)return!1;n(this).addClass("ui-state-active");s.buttonElement.attr("aria-pressed","true");var i=s.element[0];o(i).not(i).map(function(){return n(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(e.disabled)return!1;n(this).addClass("ui-state-active");i=this;s.document.one("mouseup",function(){i=null})}).bind("mouseup"+this.eventNamespace,function(){if(e.disabled)return!1;n(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(e.disabled)return!1;(t.keyCode===n.ui.keyCode.SPACE||t.keyCode===n.ui.keyCode.ENTER)&&n(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){n(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===n.ui.keyCode.SPACE&&n(this).click()}));this._setOption("disabled",e.disabled);this._resetButton()},_determineButtonType:function(){var n,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button";this.type==="checkbox"||this.type==="radio"?(n=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=n.find(t),this.buttonElement.length||(n=n.length?n.siblings():this.element.siblings(),this.buttonElement=n.filter(t),this.buttonElement.length||(this.buttonElement=n.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(f+" "+s+" "+e).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(n,t){if(this._super(n,t),n==="disabled"){t?this.element.prop("disabled",!0):this.element.prop("disabled",!1);return}this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t);this.type==="radio"?o(this.element[0]).each(function(){n(this).is(":checked")?n(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):n(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label);return}var i=this.buttonElement.removeClass(e),f=n("<span><\/span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(i.empty()).text(),t=this.options.icons,u=t.primary&&t.secondary,r=[];t.primary||t.secondary?(this.options.text&&r.push("ui-button-text-icon"+(u?"s":t.primary?"-primary":"-secondary")),t.primary&&i.prepend("<span class='ui-button-icon-primary ui-icon "+t.primary+"'><\/span>"),t.secondary&&i.append("<span class='ui-button-icon-secondary ui-icon "+t.secondary+"'><\/span>"),this.options.text||r.push(u?"ui-button-icons-only":"ui-button-icon-only")):r.push("ui-button-text-only");i.addClass(r.join(" "))}});n.widget("ui.buttonset",{version:"1.10.1",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(n,t){n==="disabled"&&this.buttons.button("option",n,t);this._super(n,t)},refresh:function(){var t=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(n,t){function e(){this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._datepickerShowing=!1;this._inDialog=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"",nextText:"",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1};n.extend(this._defaults,this.regional[""]);this.dpDiv=o(n("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>"))}function o(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){n(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!==-1&&n(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!==-1&&n(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){n.datepicker._isDisabledDatepicker(f.inline?t.parent()[0]:f.input[0])||(n(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),n(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&n(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&n(this).addClass("ui-datepicker-next-hover"))})}function u(t,i){n.extend(t,i);for(var r in i)i[r]==null&&(t[r]=i[r]);return t}n.extend(n.ui,{datepicker:{version:"1.10.1"}});var i="datepicker",r=(new Date).getTime(),f;n.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(n){return u(this._defaults,n||{}),this},_attachDatepicker:function(t,i){var r,f,u;r=t.nodeName.toLowerCase();f=r==="div"||r==="span";t.id||(this.uuid+=1,t.id="dp"+this.uuid);u=this._newInst(n(t),f);u.settings=n.extend({},i||{});r==="input"?this._connectDatepicker(t,u):f&&this._inlineDatepicker(t,u)},_newInst:function(t,i){var r=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?o(n("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>")):this.dpDiv}},_connectDatepicker:function(t,r){var u=n(t);(r.append=n([]),r.trigger=n([]),u.hasClass(this.markerClassName))||(this._attachments(u,r),u.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(r),n.data(t,i,r),r.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var r,u,f,e=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove();e&&(i.append=n("<span class='"+this._appendClass+"'>"+e+"<\/span>"),t[o?"before":"after"](i.append));t.unbind("focus",this._showDatepicker);i.trigger&&i.trigger.remove();r=this._get(i,"showOn");(r==="focus"||r==="both")&&t.focus(this._showDatepicker);(r==="button"||r==="both")&&(u=this._get(i,"buttonText"),f=this._get(i,"buttonImage"),i.trigger=n(this._get(i,"buttonImageOnly")?n("<img/>").addClass(this._triggerClass).attr({src:f,alt:u}):n("<button type='button'><\/button>").addClass(this._triggerClass).html(f?n("<img/>").attr({src:f,alt:u}):u)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return n.datepicker._datepickerShowing&&n.datepicker._lastInput===t[0]?n.datepicker._hideDatepicker():n.datepicker._datepickerShowing&&n.datepicker._lastInput!==t[0]?(n.datepicker._hideDatepicker(),n.datepicker._showDatepicker(t[0])):n.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(n){if(this._get(n,"autoSize")&&!n.inline){var r,u,f,t,i=new Date(2009,11,20),e=this._get(n,"dateFormat");e.match(/[DM]/)&&(r=function(n){for(u=0,f=0,t=0;t<n.length;t++)n[t].length>u&&(u=n[t].length,f=t);return f},i.setMonth(r(this._get(n,e.match(/MM/)?"monthNames":"monthNamesShort"))),i.setDate(r(this._get(n,e.match(/DD/)?"dayNames":"dayNamesShort"))+20-i.getDay()));n.input.attr("size",this._formatDate(n,i).length)}},_inlineDatepicker:function(t,r){var u=n(t);u.hasClass(this.markerClassName)||(u.addClass(this.markerClassName).append(r.dpDiv),n.data(t,i,r),this._setDate(r,this._getDefaultDate(r),!0),this._updateDatepicker(r),this._updateAlternate(r),r.settings.disabled&&this._disableDatepicker(t),r.dpDiv.css("display","block"))},_dialogDatepicker:function(t,r,f,e,o){var h,c,l,a,v,s=this._dialogInst;return s||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=n("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),n("body").append(this._dialogInput),s=this._dialogInst=this._newInst(this._dialogInput,!1),s.settings={},n.data(this._dialogInput[0],i,s)),u(s.settings,e||{}),r=r&&r.constructor===Date?this._formatDate(s,r):r,this._dialogInput.val(r),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,l=document.documentElement.clientHeight,a=document.documentElement.scrollLeft||document.body.scrollLeft,v=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+a,l/2-150+v]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),s.settings.onSelect=f,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),n.blockUI&&n.blockUI(this.dpDiv),n.data(this._dialogInput[0],i,s),this},_destroyDatepicker:function(t){var r,u=n(t),f=n.data(t,i);u.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),n.removeData(t,i),r==="input"?(f.append.remove(),f.trigger.remove(),u.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(r==="div"||r==="span")&&u.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var r,u,f=n(t),e=n.data(t,i);f.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),r==="input"?(t.disabled=!1,e.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):(r==="div"||r==="span")&&(u=f.children("."+this._inlineClass),u.children().removeClass("ui-state-disabled"),u.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}))},_disableDatepicker:function(t){var r,u,f=n(t),e=n.data(t,i);f.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),r==="input"?(t.disabled=!0,e.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):(r==="div"||r==="span")&&(u=f.children("."+this._inlineClass),u.children().addClass("ui-state-disabled"),u.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(n){if(!n)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===n)return!0;return!1},_getInst:function(t){try{return n.data(t,i)}catch(r){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(i,r,f){var o,c,s,h,e=this._getInst(i);if(arguments.length===2&&typeof r=="string")return r==="defaults"?n.extend({},n.datepicker._defaults):e?r==="all"?n.extend({},e.settings):this._get(e,r):null;o=r||{};typeof r=="string"&&(o={},o[r]=f);e&&(this._curInst===e&&this._hideDatepicker(),c=this._getDateDatepicker(i,!0),s=this._getMinMaxDate(e,"min"),h=this._getMinMaxDate(e,"max"),u(e.settings,o),s!==null&&o.dateFormat!==t&&o.minDate===t&&(e.settings.minDate=this._formatDate(e,s)),h!==null&&o.dateFormat!==t&&o.maxDate===t&&(e.settings.maxDate=this._formatDate(e,h)),"disabled"in o&&(o.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(n(i),e),this._autoSize(e),this._setDate(e,c),this._updateAlternate(e),this._updateDatepicker(e))},_changeDatepicker:function(n,t,i){this._optionDatepicker(n,t,i)},_refreshDatepicker:function(n){var t=this._getInst(n);t&&this._updateDatepicker(t)},_setDateDatepicker:function(n,t){var i=this._getInst(n);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(n,t){var i=this._getInst(n);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var u,e,f,i=n.datepicker._getInst(t.target),r=!0,o=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,n.datepicker._datepickerShowing)switch(t.keyCode){case 9:n.datepicker._hideDatepicker();r=!1;break;case 13:return f=n("td."+n.datepicker._dayOverClass+":not(."+n.datepicker._currentClass+")",i.dpDiv),f[0]&&n.datepicker._selectDay(t.target,i.selectedMonth,i.selectedYear,f[0]),u=n.datepicker._get(i,"onSelect"),u?(e=n.datepicker._formatDate(i),u.apply(i.input?i.input[0]:null,[e,i])):n.datepicker._hideDatepicker(),!1;case 27:n.datepicker._hideDatepicker();break;case 33:n.datepicker._adjustDate(t.target,t.ctrlKey?-n.datepicker._get(i,"stepBigMonths"):-n.datepicker._get(i,"stepMonths"),"M");break;case 34:n.datepicker._adjustDate(t.target,t.ctrlKey?+n.datepicker._get(i,"stepBigMonths"):+n.datepicker._get(i,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&n.datepicker._clearDate(t.target);r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&n.datepicker._gotoToday(t.target);r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,o?1:-1,"D");r=t.ctrlKey||t.metaKey;t.originalEvent.altKey&&n.datepicker._adjustDate(t.target,t.ctrlKey?-n.datepicker._get(i,"stepBigMonths"):-n.datepicker._get(i,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,-7,"D");r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,o?-1:1,"D");r=t.ctrlKey||t.metaKey;t.originalEvent.altKey&&n.datepicker._adjustDate(t.target,t.ctrlKey?+n.datepicker._get(i,"stepBigMonths"):+n.datepicker._get(i,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,7,"D");r=t.ctrlKey||t.metaKey;break;default:r=!1}else t.keyCode===36&&t.ctrlKey?n.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,r,u=n.datepicker._getInst(t.target);if(n.datepicker._get(u,"constrainInput"))return i=n.datepicker._possibleChars(n.datepicker._get(u,"dateFormat")),r=String.fromCharCode(t.charCode==null?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||r<" "||!i||i.indexOf(r)>-1},_doKeyUp:function(t){var r,i=n.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{r=n.datepicker.parseDate(n.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,n.datepicker._getFormatConfig(i));r&&(n.datepicker._setDateFromField(i),n.datepicker._updateAlternate(i),n.datepicker._updateDatepicker(i))}catch(u){}return!0},_showDatepicker:function(t){if(t=t.target||t,t.nodeName.toLowerCase()!=="input"&&(t=n("input",t.parentNode)[0]),!n.datepicker._isDisabledDatepicker(t)&&n.datepicker._lastInput!==t){var i,o,s,r,f,e,h;(i=n.datepicker._getInst(t),n.datepicker._curInst&&n.datepicker._curInst!==i&&(n.datepicker._curInst.dpDiv.stop(!0,!0),i&&n.datepicker._datepickerShowing&&n.datepicker._hideDatepicker(n.datepicker._curInst.input[0])),o=n.datepicker._get(i,"beforeShow"),s=o?o.apply(t,[t,i]):{},s!==!1)&&(u(i.settings,s),i.lastVal=null,n.datepicker._lastInput=t,n.datepicker._setDateFromField(i),n.datepicker._inDialog&&(t.value=""),n.datepicker._pos||(n.datepicker._pos=n.datepicker._findPos(t),n.datepicker._pos[1]+=t.offsetHeight),r=!1,n(t).parents().each(function(){return r|=n(this).css("position")==="fixed",!r}),f={left:n.datepicker._pos[0],top:n.datepicker._pos[1]},n.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),n.datepicker._updateDatepicker(i),f=n.datepicker._checkOffset(i,f,r),i.dpDiv.css({position:n.datepicker._inDialog&&n.blockUI?"static":r?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"}),i.inline||(e=n.datepicker._get(i,"showAnim"),h=n.datepicker._get(i,"duration"),i.dpDiv.zIndex(n(t).zIndex()+1),n.datepicker._datepickerShowing=!0,n.effects&&n.effects.effect[e]?i.dpDiv.show(e,n.datepicker._get(i,"showOptions"),h):i.dpDiv[e||"show"](e?h:null),i.input.is(":visible")&&!i.input.is(":disabled")&&i.input.focus(),n.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4;f=t;t.dpDiv.empty().append(this._generateHTML(t));this._attachHandlers(t);t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,r=this._getNumberOfMonths(t),u=r[1];t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");u>1&&t.dpDiv.addClass("ui-datepicker-multi-"+u).css("width",17*u+"em");t.dpDiv[(r[0]!==1||r[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");t===n.datepicker._curInst&&n.datepicker._datepickerShowing&&t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&t.input[0]!==document.activeElement&&t.input.focus();t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml);i=t.yearshtml=null},0))},_getBorders:function(n){var t=function(n){return{thin:1,medium:2,thick:3}[n]||n};return[parseFloat(t(n.css("border-left-width"))),parseFloat(t(n.css("border-top-width")))]},_checkOffset:function(t,i,r){var u=t.dpDiv.outerWidth(),f=t.dpDiv.outerHeight(),h=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,e=document.documentElement.clientWidth+(r?0:n(document).scrollLeft()),s=document.documentElement.clientHeight+(r?0:n(document).scrollTop());return i.left-=this._get(t,"isRTL")?u-h:0,i.left-=r&&i.left===t.input.offset().left?n(document).scrollLeft():0,i.top-=r&&i.top===t.input.offset().top+o?n(document).scrollTop():0,i.left-=Math.min(i.left,i.left+u>e&&e>u?Math.abs(i.left+u-e):0),i.top-=Math.min(i.top,i.top+f>s&&s>f?Math.abs(f+o):0),i},_findPos:function(t){for(var i,r=this._getInst(t),u=this._get(r,"isRTL");t&&(t.type==="hidden"||t.nodeType!==1||n.expr.filters.hidden(t));)t=t[u?"previousSibling":"nextSibling"];return i=n(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var u,e,f,o,r=this._curInst;r&&(!t||r===n.data(t,i))&&this._datepickerShowing&&(u=this._get(r,"showAnim"),e=this._get(r,"duration"),f=function(){n.datepicker._tidyDialog(r)},n.effects&&(n.effects.effect[u]||n.effects[u])?r.dpDiv.hide(u,n.datepicker._get(r,"showOptions"),e,f):r.dpDiv[u==="slideDown"?"slideUp":u==="fadeIn"?"fadeOut":"hide"](u?e:null,f),u||f(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),n.blockUI&&(n.unblockUI(),n("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(n){n.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(n.datepicker._curInst){var i=n(t.target),r=n.datepicker._getInst(i[0]);(i[0].id===n.datepicker._mainDivId||i.parents("#"+n.datepicker._mainDivId).length!==0||i.hasClass(n.datepicker.markerClassName)||i.closest("."+n.datepicker._triggerClass).length||!n.datepicker._datepickerShowing||n.datepicker._inDialog&&n.blockUI)&&(!i.hasClass(n.datepicker.markerClassName)||n.datepicker._curInst===r)||n.datepicker._hideDatepicker()}},_adjustDate:function(t,i,r){var f=n(t),u=this._getInst(f[0]);this._isDisabledDatepicker(f[0])||(this._adjustInstDate(u,i+(r==="M"?this._get(u,"showCurrentAtPos"):0),r),this._updateDatepicker(u))},_gotoToday:function(t){var r,u=n(t),i=this._getInst(u[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(r=new Date,i.selectedDay=r.getDate(),i.drawMonth=i.selectedMonth=r.getMonth(),i.drawYear=i.selectedYear=r.getFullYear());this._notifyChange(i);this._adjustDate(u)},_selectMonthYear:function(t,i,r){var f=n(t),u=this._getInst(f[0]);u["selected"+(r==="M"?"Month":"Year")]=u["draw"+(r==="M"?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10);this._notifyChange(u);this._adjustDate(f)},_selectDay:function(t,i,r,u){var f,e=n(t);n(u).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0])||(f=this._getInst(e[0]),f.selectedDay=f.currentDay=n("a",u).html(),f.selectedMonth=f.currentMonth=i,f.selectedYear=f.currentYear=r,this._selectDate(t,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(t){var i=n(t);this._selectDate(i,"")},_selectDate:function(t,i){var u,f=n(t),r=this._getInst(f[0]);i=i!=null?i:this._formatDate(r);r.input&&r.input.val(i);this._updateAlternate(r);u=this._get(r,"onSelect");u?u.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger("change");r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],typeof r.input[0]!="object"&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,r,u,f=this._get(t,"altField");f&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),r=this._getDate(t),u=this.formatDate(i,r,this._getFormatConfig(t)),n(f).each(function(){n(this).val(u)}))},noWeekends:function(n){var t=n.getDay();return[t>0&&t<6,""]},iso8601Week:function(n){var i,t=new Date(n.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),i=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((i-t)/864e5)/7)+1},parseDate:function(t,i,r){if(t==null||i==null)throw"Invalid arguments";if(i=typeof i=="object"?i.toString():i+"",i==="")return null;for(var a,v,f=0,y=(r?r.shortYearCutoff:null)||this._defaults.shortYearCutoff,d=typeof y!="string"?y:(new Date).getFullYear()%100+parseInt(y,10),g=(r?r.dayNamesShort:null)||this._defaults.dayNamesShort,nt=(r?r.dayNames:null)||this._defaults.dayNames,tt=(r?r.monthNamesShort:null)||this._defaults.monthNamesShort,it=(r?r.monthNames:null)||this._defaults.monthNames,e=-1,s=-1,h=-1,p=-1,w=!1,u,l=function(n){var i=o+1<t.length&&t.charAt(o+1)===n;return i&&o++,i},c=function(n){var r=l(n),u=n==="@"?14:n==="!"?20:n==="y"&&r?4:n==="o"?3:2,e=new RegExp("^\\d{1,"+u+"}"),t=i.substring(f).match(e);if(!t)throw"Missing number at position "+f;return f+=t[0].length,parseInt(t[0],10)},k=function(t,r,u){var e=-1,o=n.map(l(t)?u:r,function(n,t){return[[t,n]]}).sort(function(n,t){return-(n[1].length-t[1].length)});if(n.each(o,function(n,t){var r=t[1];if(i.substr(f,r.length).toLowerCase()===r.toLowerCase())return e=t[0],f+=r.length,!1}),e!==-1)return e+1;throw"Unknown name at position "+f;},b=function(){if(i.charAt(f)!==t.charAt(o))throw"Unexpected literal at position "+f;f++},o=0;o<t.length;o++)if(w)t.charAt(o)!=="'"||l("'")?b():w=!1;else switch(t.charAt(o)){case"d":h=c("d");break;case"D":k("D",g,nt);break;case"o":p=c("o");break;case"m":s=c("m");break;case"M":s=k("M",tt,it);break;case"y":e=c("y");break;case"@":u=new Date(c("@"));e=u.getFullYear();s=u.getMonth()+1;h=u.getDate();break;case"!":u=new Date((c("!")-this._ticksTo1970)/1e4);e=u.getFullYear();s=u.getMonth()+1;h=u.getDate();break;case"'":l("'")?b():w=!0;break;default:b()}if(f<i.length&&(v=i.substr(f),!/^\s+/.test(v)))throw"Extra/unparsed characters found in date: "+v;if(e===-1?e=(new Date).getFullYear():e<100&&(e+=(new Date).getFullYear()-(new Date).getFullYear()%100+(e<=d?0:-100)),p>-1){s=1;h=p;do{if(a=this._getDaysInMonth(e,s-1),h<=a)break;s++;h-=a}while(1)}if(u=this._daylightSavingAdjust(new Date(e,s-1,h)),u.getFullYear()!==e||u.getMonth()+1!==s||u.getDate()!==h)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*864e9,formatDate:function(n,t,i){if(!t)return"";var u,h=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,c=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,f=function(t){var i=u+1<n.length&&n.charAt(u+1)===t;return i&&u++,i},e=function(n,t,i){var r=""+t;if(f(n))while(r.length<i)r="0"+r;return r},s=function(n,t,i,r){return f(n)?r[t]:i[t]},r="",o=!1;if(t)for(u=0;u<n.length;u++)if(o)n.charAt(u)!=="'"||f("'")?r+=n.charAt(u):o=!1;else switch(n.charAt(u)){case"d":r+=e("d",t.getDate(),2);break;case"D":r+=s("D",t.getDay(),h,c);break;case"o":r+=e("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":r+=e("m",t.getMonth()+1,2);break;case"M":r+=s("M",t.getMonth(),l,a);break;case"y":r+=f("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":r+=t.getTime();break;case"!":r+=t.getTime()*1e4+this._ticksTo1970;break;case"'":f("'")?r+="'":o=!0;break;default:r+=n.charAt(u)}return r},_possibleChars:function(n){for(var i="",r=!1,u=function(i){var r=t+1<n.length&&n.charAt(t+1)===i;return r&&t++,r},t=0;t<n.length;t++)if(r)n.charAt(t)!=="'"||u("'")?i+=n.charAt(t):r=!1;else switch(n.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":u("'")?i+="'":r=!0;break;default:i+=n.charAt(t)}return i},_get:function(n,i){return n.settings[i]!==t?n.settings[i]:this._defaults[i]},_setDateFromField:function(n,t){if(n.input.val()!==n.lastVal){var f=this._get(n,"dateFormat"),r=n.lastVal=n.input?n.input.val():null,u=this._getDefaultDate(n),i=u,e=this._getFormatConfig(n);try{i=this.parseDate(f,r,e)||u}catch(o){r=t?"":r}n.selectedDay=i.getDate();n.drawMonth=n.selectedMonth=i.getMonth();n.drawYear=n.selectedYear=i.getFullYear();n.currentDay=r?i.getDate():0;n.currentMonth=r?i.getMonth():0;n.currentYear=r?i.getFullYear():0;this._adjustInstDate(n)}},_getDefaultDate:function(n){return this._restrictMinMax(n,this._determineDate(n,this._get(n,"defaultDate"),new Date))},_determineDate:function(t,i,r){var f=function(n){var t=new Date;return t.setDate(t.getDate()+n),t},e=function(i){try{return n.datepicker.parseDate(n.datepicker._get(t,"dateFormat"),i,n.datepicker._getFormatConfig(t))}catch(h){}for(var o=(i.toLowerCase().match(/^c/)?n.datepicker._getDate(t):null)||new Date,f=o.getFullYear(),e=o.getMonth(),r=o.getDate(),s=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=s.exec(i);u;){switch(u[2]||"d"){case"d":case"D":r+=parseInt(u[1],10);break;case"w":case"W":r+=parseInt(u[1],10)*7;break;case"m":case"M":e+=parseInt(u[1],10);r=Math.min(r,n.datepicker._getDaysInMonth(f,e));break;case"y":case"Y":f+=parseInt(u[1],10);r=Math.min(r,n.datepicker._getDaysInMonth(f,e))}u=s.exec(i)}return new Date(f,e,r)},u=i==null||i===""?r:typeof i=="string"?e(i):typeof i=="number"?isNaN(i)?r:f(i):new Date(i.getTime());return u=u&&u.toString()==="Invalid Date"?r:u,u&&(u.setHours(0),u.setMinutes(0),u.setSeconds(0),u.setMilliseconds(0)),this._daylightSavingAdjust(u)},_daylightSavingAdjust:function(n){return n?(n.setHours(n.getHours()>12?n.getHours()+2:0),n):null},_setDate:function(n,t,i){var u=!t,f=n.selectedMonth,e=n.selectedYear,r=this._restrictMinMax(n,this._determineDate(n,t,new Date));n.selectedDay=n.currentDay=r.getDate();n.drawMonth=n.selectedMonth=n.currentMonth=r.getMonth();n.drawYear=n.selectedYear=n.currentYear=r.getFullYear();f===n.selectedMonth&&e===n.selectedYear||i||this._notifyChange(n);this._adjustInstDate(n);n.input&&n.input.val(u?"":this._formatDate(n))},_getDate:function(n){return!n.currentYear||n.input&&n.input.val()===""?null:this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay))},_attachHandlers:function(t){var u=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){window["DP_jQuery_"+r].datepicker._adjustDate(i,-u,"M")},next:function(){window["DP_jQuery_"+r].datepicker._adjustDate(i,+u,"M")},hide:function(){window["DP_jQuery_"+r].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+r].datepicker._gotoToday(i)},selectDay:function(){return window["DP_jQuery_"+r].datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+r].datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+r].datepicker._selectMonthYear(i,this,"Y"),!1}};n(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(n){var b,s,rt,h,ut,k,ft,et,ri,c,ot,ui,fi,ei,oi,st,g,si,ht,nt,f,y,ct,p,lt,l,u,at,vt,yt,pt,tt,wt,i,bt,kt,d,a,it,dt=new Date,gt=this._daylightSavingAdjust(new Date(dt.getFullYear(),dt.getMonth(),dt.getDate())),e=this._get(n,"isRTL"),li=this._get(n,"showButtonPanel"),hi=this._get(n,"hideIfNoPrevNext"),ni=this._get(n,"navigationAsDateFormat"),o=this._getNumberOfMonths(n),ai=this._get(n,"showCurrentAtPos"),ci=this._get(n,"stepMonths"),ti=o[0]!==1||o[1]!==1,ii=this._daylightSavingAdjust(n.currentDay?new Date(n.currentYear,n.currentMonth,n.currentDay):new Date(9999,9,9)),w=this._getMinMaxDate(n,"min"),v=this._getMinMaxDate(n,"max"),t=n.drawMonth-ai,r=n.drawYear;if(t<0&&(t+=12,r--),v)for(b=this._daylightSavingAdjust(new Date(v.getFullYear(),v.getMonth()-o[0]*o[1]+1,v.getDate())),b=w&&b<w?w:b;this._daylightSavingAdjust(new Date(r,t,1))>b;)t--,t<0&&(t=11,r--);for(n.drawMonth=t,n.drawYear=r,s=this._get(n,"prevText"),s=ni?this.formatDate(s,this._daylightSavingAdjust(new Date(r,t-ci,1)),this._getFormatConfig(n)):s,rt=this._canAdjustMonth(n,-1,r,t)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(e?"e":"w")+"'>"+s+"<\/span><\/a>":hi?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(e?"e":"w")+"'>"+s+"<\/span><\/a>",h=this._get(n,"nextText"),h=ni?this.formatDate(h,this._daylightSavingAdjust(new Date(r,t+ci,1)),this._getFormatConfig(n)):h,ut=this._canAdjustMonth(n,1,r,t)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+h+"'><span class='ui-icon ui-icon-circle-triangle-"+(e?"w":"e")+"'>"+h+"<\/span><\/a>":hi?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+h+"'><span class='ui-icon ui-icon-circle-triangle-"+(e?"w":"e")+"'>"+h+"<\/span><\/a>",k=this._get(n,"currentText"),ft=this._get(n,"gotoCurrent")&&n.currentDay?ii:gt,k=ni?this.formatDate(k,ft,this._getFormatConfig(n)):k,et=n.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(n,"closeText")+"<\/button>",ri=li?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(e?et:"")+(this._isInRange(n,ft)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+k+"<\/button>":"")+(e?"":et)+"<\/div>":"",c=parseInt(this._get(n,"firstDay"),10),c=isNaN(c)?0:c,ot=this._get(n,"showWeek"),ui=this._get(n,"dayNames"),fi=this._get(n,"dayNamesMin"),ei=this._get(n,"monthNames"),oi=this._get(n,"monthNamesShort"),st=this._get(n,"beforeShowDay"),g=this._get(n,"showOtherMonths"),si=this._get(n,"selectOtherMonths"),ht=this._getDefaultDate(n),nt="",f,y=0;y<o[0];y++){for(ct="",this.maxRows=4,p=0;p<o[1];p++){if(lt=this._daylightSavingAdjust(new Date(r,t,n.selectedDay)),l=" ui-corner-all",u="",ti){if(u+="<div class='ui-datepicker-group",o[1]>1)switch(p){case 0:u+=" ui-datepicker-group-first";l=" ui-corner-"+(e?"right":"left");break;case o[1]-1:u+=" ui-datepicker-group-last";l=" ui-corner-"+(e?"left":"right");break;default:u+=" ui-datepicker-group-middle";l=""}u+="'>"}for(u+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+l+"'>"+(/all|left/.test(l)&&y===0?e?ut:rt:"")+(/all|right/.test(l)&&y===0?e?rt:ut:"")+this._generateMonthYearHeader(n,t,r,w,v,y>0||p>0,ei,oi)+"<\/div><table class='ui-datepicker-calendar'><thead><tr>",at=ot?"<th class='ui-datepicker-week-col'>"+this._get(n,"weekHeader")+"<\/th>":"",f=0;f<7;f++)vt=(f+c)%7,at+="<th"+((f+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+ui[vt]+"'>"+fi[vt]+"<\/span><\/th>";for(u+=at+"<\/tr><\/thead><tbody>",yt=this._getDaysInMonth(r,t),r===n.selectedYear&&t===n.selectedMonth&&(n.selectedDay=Math.min(n.selectedDay,yt)),pt=(this._getFirstDayOfMonth(r,t)-c+7)%7,tt=Math.ceil((pt+yt)/7),wt=ti?this.maxRows>tt?this.maxRows:tt:tt,this.maxRows=wt,i=this._daylightSavingAdjust(new Date(r,t,1-pt)),bt=0;bt<wt;bt++){for(u+="<tr>",kt=ot?"<td class='ui-datepicker-week-col'>"+this._get(n,"calculateWeek")(i)+"<\/td>":"",f=0;f<7;f++)d=st?st.apply(n.input?n.input[0]:null,[i]):[!0,""],a=i.getMonth()!==t,it=a&&!si||!d[0]||w&&i<w||v&&i>v,kt+="<td class='"+((f+c+6)%7>=5?" ui-datepicker-week-end":"")+(a?" ui-datepicker-other-month":"")+(i.getTime()===lt.getTime()&&t===n.selectedMonth&&n._keyEvent||ht.getTime()===i.getTime()&&ht.getTime()===lt.getTime()?" "+this._dayOverClass:"")+(it?" "+this._unselectableClass+" ui-state-disabled":"")+(a&&!g?"":" "+d[1]+(i.getTime()===ii.getTime()?" "+this._currentClass:"")+(i.getTime()===gt.getTime()?" ui-datepicker-today":""))+"'"+((!a||g)&&d[2]?" title='"+d[2].replace(/'/g,"&#39;")+"'":"")+(it?"":" data-handler='selectDay' data-event='click' data-month='"+i.getMonth()+"' data-year='"+i.getFullYear()+"'")+">"+(a&&!g?"&#xa0;":it?"<span class='ui-state-default'>"+i.getDate()+"<\/span>":"<a class='ui-state-default"+(i.getTime()===gt.getTime()?" ui-state-highlight":"")+(i.getTime()===ii.getTime()?" ui-state-active":"")+(a?" ui-priority-secondary":"")+"' href='#'>"+i.getDate()+"<\/a>")+"<\/td>",i.setDate(i.getDate()+1),i=this._daylightSavingAdjust(i);u+=kt+"<\/tr>"}t++;t>11&&(t=0,r++);u+="<\/tbody><\/table>"+(ti?"<\/div>"+(o[0]>0&&p===o[1]-1?"<div class='ui-datepicker-row-break'><\/div>":""):"");ct+=u}nt+=ct}return nt+=ri,n._keyEvent=!1,nt},_generateMonthYearHeader:function(n,t,i,r,u,f,e,o){var k,d,h,v,y,p,s,a,w=this._get(n,"changeMonth"),b=this._get(n,"changeYear"),g=this._get(n,"showMonthAfterYear"),c="<div class='ui-datepicker-title'>",l="";if(f||!w)l+="<span class='ui-datepicker-month'>"+e[t]+"<\/span>";else{for(k=r&&r.getFullYear()===i,d=u&&u.getFullYear()===i,l+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;h<12;h++)(!k||h>=r.getMonth())&&(!d||h<=u.getMonth())&&(l+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"<\/option>");l+="<\/select>"}if(g||(c+=l+(f||!(w&&b)?"&#xa0;":"")),!n.yearshtml)if(n.yearshtml="",f||!b)c+="<span class='ui-datepicker-year'>"+i+"<\/span>";else{for(v=this._get(n,"yearRange").split(":"),y=(new Date).getFullYear(),p=function(n){var t=n.match(/c[+\-].*/)?i+parseInt(n.substring(1),10):n.match(/[+\-].*/)?y+parseInt(n,10):parseInt(n,10);return isNaN(t)?y:t},s=p(v[0]),a=Math.max(s,p(v[1]||"")),s=r?Math.max(s,r.getFullYear()):s,a=u?Math.min(a,u.getFullYear()):a,n.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";s<=a;s++)n.yearshtml+="<option value='"+s+"'"+(s===i?" selected='selected'":"")+">"+s+"<\/option>";n.yearshtml+="<\/select>";c+=n.yearshtml;n.yearshtml=null}return c+=this._get(n,"yearSuffix"),g&&(c+=(f||!(w&&b)?"&#xa0;":"")+l),c+"<\/div>"},_adjustInstDate:function(n,t,i){var u=n.drawYear+(i==="Y"?t:0),f=n.drawMonth+(i==="M"?t:0),e=Math.min(n.selectedDay,this._getDaysInMonth(u,f))+(i==="D"?t:0),r=this._restrictMinMax(n,this._daylightSavingAdjust(new Date(u,f,e)));n.selectedDay=r.getDate();n.drawMonth=n.selectedMonth=r.getMonth();n.drawYear=n.selectedYear=r.getFullYear();(i==="M"||i==="Y")&&this._notifyChange(n)},_restrictMinMax:function(n,t){var i=this._getMinMaxDate(n,"min"),r=this._getMinMaxDate(n,"max"),u=i&&t<i?i:t;return r&&u>r?r:u},_notifyChange:function(n){var t=this._get(n,"onChangeMonthYear");t&&t.apply(n.input?n.input[0]:null,[n.selectedYear,n.selectedMonth+1,n])},_getNumberOfMonths:function(n){var t=this._get(n,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(n,t){return this._determineDate(n,this._get(n,t+"Date"),null)},_getDaysInMonth:function(n,t){return 32-this._daylightSavingAdjust(new Date(n,t,32)).getDate()},_getFirstDayOfMonth:function(n,t){return new Date(n,t,1).getDay()},_canAdjustMonth:function(n,t,i,r){var f=this._getNumberOfMonths(n),u=this._daylightSavingAdjust(new Date(i,r+(t<0?t:f[0]*f[1]),1));return t<0&&u.setDate(this._getDaysInMonth(u.getFullYear(),u.getMonth())),this._isInRange(n,u)},_isInRange:function(n,t){var i,f,e=this._getMinMaxDate(n,"min"),o=this._getMinMaxDate(n,"max"),r=null,u=null,s=this._get(n,"yearRange");return s&&(i=s.split(":"),f=(new Date).getFullYear(),r=parseInt(i[0],10),u=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=f),i[1].match(/[+\-].*/)&&(u+=f)),(!e||t.getTime()>=e.getTime())&&(!o||t.getTime()<=o.getTime())&&(!r||t.getFullYear()>=r)&&(!u||t.getFullYear()<=u)},_getFormatConfig:function(n){var t=this._get(n,"shortYearCutoff");return t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(n,"dayNamesShort"),dayNames:this._get(n,"dayNames"),monthNamesShort:this._get(n,"monthNamesShort"),monthNames:this._get(n,"monthNames")}},_formatDate:function(n,t,i,r){t||(n.currentDay=n.selectedDay,n.currentMonth=n.selectedMonth,n.currentYear=n.selectedYear);var u=t?typeof t=="object"?t:this._daylightSavingAdjust(new Date(r,i,t)):this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay));return this.formatDate(this._get(n,"dateFormat"),u,this._getFormatConfig(n))}});n.fn.datepicker=function(t){if(!this.length)return this;n.datepicker.initialized||(n(document).mousedown(n.datepicker._checkExternalClick),n.datepicker.initialized=!0);n("#"+n.datepicker._mainDivId).length===0&&n("body").append(n.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return typeof t=="string"&&(t==="isDisabled"||t==="getDate"||t==="widget")?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i)):t==="option"&&arguments.length===2&&typeof arguments[1]=="string"?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i)):this.each(function(){typeof t=="string"?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this].concat(i)):n.datepicker._attachDatepicker(this,t)})};n.datepicker=new e;n.datepicker.initialized=!1;n.datepicker.uuid=(new Date).getTime();n.datepicker.version="1.10.1";window["DP_jQuery_"+r]=n}(jQuery),function(n){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};n.widget("ui.dialog",{version:"1.10.1",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=n(this).css(t).offset().top;i<0&&n(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane();this.options.draggable&&n.fn.draggable&&this._makeDraggable();this.options.resizable&&n.fn.resizable&&this._makeResizable();this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?n(t):this.document.find(t||"body").eq(0)},_destroy:function(){var n,t=this.originalPosition;this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach();this.uiDialog.stop(!0,!0).remove();this.originalTitle&&this.element.attr("title",this.originalTitle);n=t.parent.children().eq(t.index);n.length&&n[0]!==this.element[0]?n.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:n.noop,enable:n.noop,close:function(t){var i=this;this._isOpen&&this._trigger("beforeClose",t)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||n(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(n,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",n),i},open:function(){var t=this;if(this._isOpen){this._moveToTop()&&this._focusTabbable();return}this._isOpen=!0;this.opener=n(this.document[0].activeElement);this._size();this._position();this._createOverlay();this._moveToTop(null,!0);this._show(this.uiDialog,this.options.show,function(){t._focusTabbable();t._trigger("focus")});this._trigger("open")},_focusTabbable:function(){var n=this.element.find("[autofocus]");n.length||(n=this.element.find(":tabbable"));n.length||(n=this.uiDialogButtonPane.find(":tabbable"));n.length||(n=this.uiDialogTitlebarClose.filter(":tabbable"));n.length||(n=this.uiDialog);n.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||n.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault();i.call(this);this._delay(i)},_createWrapper:function(){this.uiDialog=n("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===n.ui.keyCode.ESCAPE){t.preventDefault();this.close(t);return}if(t.keyCode===n.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),r=i.filter(":first"),u=i.filter(":last");t.target!==u[0]&&t.target!==this.uiDialog[0]||t.shiftKey?(t.target===r[0]||t.target===this.uiDialog[0])&&t.shiftKey&&(u.focus(1),t.preventDefault()):(r.focus(1),t.preventDefault())}},mousedown:function(n){this._moveToTop(n)&&this._focusTabbable()}});this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=n("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar,{mousedown:function(t){n(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}});this.uiDialogTitlebarClose=n("<button><\/button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(n){n.preventDefault();this.close(n)}});t=n("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(t);this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(n){this.options.title||n.html("&#160;");n.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=n("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=n("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var i=this,t=this.options.buttons;if(this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),n.isEmptyObject(t)||n.isArray(t)&&!t.length){this.uiDialog.removeClass("ui-dialog-buttons");return}n.each(t,function(t,r){var u,f;r=n.isFunction(r)?{click:r,text:t}:r;r=n.extend({type:"button"},r);u=r.click;r.click=function(){u.apply(i.element[0],arguments)};f={icons:r.icons,text:r.showText};delete r.icons;delete r.showText;n("<button><\/button>",r).button(f).appendTo(i.uiButtonSet)});this.uiDialog.addClass("ui-dialog-buttons");this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){function i(n){return{position:n.position,offset:n.offset}}var t=this,r=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(r,u){n(this).addClass("ui-dialog-dragging");t._blockFrames();t._trigger("dragStart",r,i(u))},drag:function(n,r){t._trigger("drag",n,i(r))},stop:function(u,f){r.position=[f.position.left-t.document.scrollLeft(),f.position.top-t.document.scrollTop()];n(this).removeClass("ui-dialog-dragging");t._unblockFrames();t._trigger("dragStop",u,i(f))}})},_makeResizable:function(){function r(n){return{originalPosition:n.originalPosition,originalSize:n.originalSize,position:n.position,size:n.size}}var i=this,t=this.options,u=t.resizable,f=this.uiDialog.css("position"),e=typeof u=="string"?u:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:t.maxWidth,maxHeight:t.maxHeight,minWidth:t.minWidth,minHeight:this._minHeight(),handles:e,start:function(t,u){n(this).addClass("ui-dialog-resizing");i._blockFrames();i._trigger("resizeStart",t,r(u))},resize:function(n,t){i._trigger("resize",n,r(t))},stop:function(u,f){t.height=n(this).height();t.width=n(this).width();n(this).removeClass("ui-dialog-resizing");i._unblockFrames();i._trigger("resizeStop",u,r(f))}}).css("position",f)},_minHeight:function(){var n=this.options;return n.height==="auto"?n.minHeight:Math.min(n.minHeight,n.height)},_position:function(){var n=this.uiDialog.is(":visible");n||this.uiDialog.show();this.uiDialog.position(this.options.position);n||this.uiDialog.hide()},_setOptions:function(r){var e=this,u=!1,f={};n.each(r,function(n,r){e._setOption(n,r);n in t&&(u=!0);n in i&&(f[n]=r)});u&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(n,t){var u,r,i=this.uiDialog;(n==="dialogClass"&&i.removeClass(this.options.dialogClass).addClass(t),n!=="disabled")&&(this._super(n,t),n==="appendTo"&&this.uiDialog.appendTo(this._appendTo()),n==="buttons"&&this._createButtons(),n==="closeText"&&this.uiDialogTitlebarClose.button({label:""+t}),n==="draggable"&&(u=i.is(":data(ui-draggable)"),u&&!t&&i.draggable("destroy"),!u&&t&&this._makeDraggable()),n==="position"&&this._position(),n==="resizable"&&(r=i.is(":data(ui-resizable)"),r&&!t&&i.resizable("destroy"),r&&typeof t=="string"&&i.resizable("option","handles",t),r||t===!1||this._makeResizable()),n==="title"&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,i,r,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});n.minWidth>n.width&&(n.width=n.minWidth);t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight();i=Math.max(0,n.minHeight-t);r=typeof n.maxHeight=="number"?Math.max(0,n.maxHeight-t):"none";n.height==="auto"?this.element.css({minHeight:i,maxHeight:r,height:"auto"}):this.element.height(Math.max(0,n.height-t));this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=n(this);return n("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_createOverlay:function(){this.options.modal&&(n.ui.dialog.overlayInstances||this._delay(function(){n.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(t){n(t.target).closest(".ui-dialog").length||n(t.target).closest(".ui-datepicker").length||(t.preventDefault(),n(".ui-dialog:visible:last .ui-dialog-content").data("ui-dialog")._focusTabbable())})}),this.overlay=n("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),n.ui.dialog.overlayInstances++)},_destroyOverlay:function(){this.options.modal&&this.overlay&&(n.ui.dialog.overlayInstances--,n.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}});n.ui.dialog.overlayInstances=0;n.uiBackCompat!==!1&&n.widget("ui.dialog",n.ui.dialog,{_position:function(){var t=this.options.position,i=[],r=[0,0],u;t?((typeof t=="string"||typeof t=="object"&&"0"in t)&&(i=t.split?t.split(" "):[t[0],t[1]],i.length===1&&(i[1]=i[0]),n.each(["left","top"],function(n,t){+i[n]===i[n]&&(r[n]=i[n],i[n]=t)}),t={my:i[0]+(r[0]<0?r[0]:"+"+r[0])+" "+i[1]+(r[1]<0?r[1]:"+"+r[1]),at:i.join(" ")}),t=n.extend({},n.ui.dialog.prototype.options.position,t)):t=n.ui.dialog.prototype.options.position;u=this.uiDialog.is(":visible");u||this.uiDialog.show();this.uiDialog.position(t);u||this.uiDialog.hide()}})}(jQuery),function(n){var t=/up|down|vertical/,i=/up|left|vertical|horizontal/;n.effects.effect.blind=function(r,u){var f=n(this),c=["position","top","bottom","left","right","height","width"],p=n.effects.setMode(f,r.mode||"hide"),w=r.direction||"up",o=t.test(w),l=o?"height":"width",a=o?"top":"left",b=i.test(w),v={},y=p==="show",e,s,h;f.parent().is(".ui-effects-wrapper")?n.effects.save(f.parent(),c):n.effects.save(f,c);f.show();e=n.effects.createWrapper(f).css({overflow:"hidden"});s=e[l]();h=parseFloat(e.css(a))||0;v[l]=y?s:0;b||(f.css(o?"bottom":"right",0).css(o?"top":"left","auto").css({position:"absolute"}),v[a]=y?h:s+h);y&&(e.css(l,0),b||e.css(a,h+s));e.animate(v,{duration:r.duration,easing:r.easing,queue:!1,complete:function(){p==="hide"&&f.hide();n.effects.restore(f,c);n.effects.removeWrapper(f);u()}})}}(jQuery),function(n){n.effects.effect.bounce=function(t,i){var r=n(this),v=["position","top","bottom","left","right","height","width"],k=n.effects.setMode(r,t.mode||"effect"),f=k==="hide",y=k==="show",h=t.direction||"up",u=t.distance,p=t.times||5,d=p*2+(y||f?1:0),c=t.duration/d,l=t.easing,e=h==="up"||h==="down"?"top":"left",w=h==="up"||h==="left",b,o,s,a=r.queue(),g=a.length;for((y||f)&&v.push("opacity"),n.effects.save(r,v),r.show(),n.effects.createWrapper(r),u||(u=r[e==="top"?"outerHeight":"outerWidth"]()/3),y&&(s={opacity:1},s[e]=0,r.css("opacity",0).css(e,w?-u*2:u*2).animate(s,c,l)),f&&(u=u/Math.pow(2,p-1)),s={},s[e]=0,b=0;b<p;b++)o={},o[e]=(w?"-=":"+=")+u,r.animate(o,c,l).animate(s,c,l),u=f?u*2:u/2;f&&(o={opacity:0},o[e]=(w?"-=":"+=")+u,r.animate(o,c,l));r.queue(function(){f&&r.hide();n.effects.restore(r,v);n.effects.removeWrapper(r);i()});g>1&&a.splice.apply(a,[1,0].concat(a.splice(g,d+1)));r.dequeue()}}(jQuery),function(n){n.effects.effect.clip=function(t,i){var r=n(this),h=["position","top","bottom","left","right","height","width"],v=n.effects.setMode(r,t.mode||"hide"),f=v==="show",y=t.direction||"vertical",c=y==="vertical",o=c?"height":"width",l=c?"top":"left",s={},a,u,e;n.effects.save(r,h);r.show();a=n.effects.createWrapper(r).css({overflow:"hidden"});u=r[0].tagName==="IMG"?a:r;e=u[o]();f&&(u.css(o,0),u.css(l,e/2));s[o]=f?e:0;s[l]=f?0:e/2;u.animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){f||r.hide();n.effects.restore(r,h);n.effects.removeWrapper(r);i()}})}}(jQuery),function(n){n.effects.effect.drop=function(t,i){var r=n(this),h=["position","top","bottom","left","right","opacity","height","width"],c=n.effects.setMode(r,t.mode||"hide"),e=c==="show",u=t.direction||"left",o=u==="up"||u==="down"?"top":"left",s=u==="up"||u==="left"?"pos":"neg",l={opacity:e?1:0},f;n.effects.save(r,h);r.show();n.effects.createWrapper(r);f=t.distance||r[o==="top"?"outerHeight":"outerWidth"](!0)/2;e&&r.css("opacity",0).css(o,s==="pos"?-f:f);l[o]=(e?s==="pos"?"+=":"-=":s==="pos"?"-=":"+=")+f;r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){c==="hide"&&r.hide();n.effects.restore(r,h);n.effects.removeWrapper(r);i()}})}}(jQuery),function(n){n.effects.effect.explode=function(t,i){function k(){l.push(this);l.length===o*c&&d()}function d(){r.css({visibility:"visible"});n(l).remove();u||r.hide();i()}for(var o=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=o,r=n(this),b=n.effects.setMode(r,t.mode||"hide"),u=b==="show",w=r.show().css("visibility","hidden").offset(),s=Math.ceil(r.outerWidth()/c),h=Math.ceil(r.outerHeight()/o),l=[],e,a,v,y,p,f=0;f<o;f++)for(v=w.top+f*h,p=f-(o-1)/2,e=0;e<c;e++)a=w.left+e*s,y=e-(c-1)/2,r.clone().appendTo("body").wrap("<div><\/div>").css({position:"absolute",visibility:"visible",left:-e*s,top:-f*h}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:s,height:h,left:a+(u?y*s:0),top:v+(u?p*h:0),opacity:u?0:1}).animate({left:a+(u?0:y*s),top:v+(u?0:p*h),opacity:u?1:0},t.duration||500,t.easing,k)}}(jQuery),function(n){n.effects.effect.fade=function(t,i){var r=n(this),u=n.effects.setMode(r,t.mode||"toggle");r.animate({opacity:u},{queue:!1,duration:t.duration,easing:t.easing,complete:i})}}(jQuery),function(n){n.effects.effect.fold=function(t,i){var r=n(this),s=["position","top","bottom","left","right","height","width"],h=n.effects.setMode(r,t.mode||"hide"),e=h==="show",c=h==="hide",f=t.size||15,l=/([0-9]+)%/.exec(f),a=!!t.horizFirst,v=e!==a,y=v?["width","height"]:["height","width"],p=t.duration/2,u,o,w={},b={};n.effects.save(r,s);r.show();u=n.effects.createWrapper(r).css({overflow:"hidden"});o=v?[u.width(),u.height()]:[u.height(),u.width()];l&&(f=parseInt(l[1],10)/100*o[c?0:1]);e&&u.css(a?{height:0,width:f}:{height:f,width:0});w[y[0]]=e?o[0]:f;b[y[1]]=e?o[1]:0;u.animate(w,p,t.easing).animate(b,p,t.easing,function(){c&&r.hide();n.effects.restore(r,s);n.effects.removeWrapper(r);i()})}}(jQuery),function(n){n.effects.effect.highlight=function(t,i){var r=n(this),u=["backgroundImage","backgroundColor","opacity"],f=n.effects.setMode(r,t.mode||"show"),e={backgroundColor:r.css("backgroundColor")};f==="hide"&&(e.opacity=0);n.effects.save(r,u);r.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(e,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){f==="hide"&&r.hide();n.effects.restore(r,u);i()}})}}(jQuery),function(n){n.effects.effect.pulsate=function(t,i){var r=n(this),e=n.effects.setMode(r,t.mode||"show"),h=e==="show",a=e==="hide",v=h||e==="hide",o=(t.times||5)*2+(v?1:0),c=t.duration/o,u=0,f=r.queue(),l=f.length,s;for((h||!r.is(":visible"))&&(r.css("opacity",0).show(),u=1),s=1;s<o;s++)r.animate({opacity:u},c,t.easing),u=1-u;r.animate({opacity:u},c,t.easing);r.queue(function(){a&&r.hide();i()});l>1&&f.splice.apply(f,[1,0].concat(f.splice(l,o+1)));r.dequeue()}}(jQuery),function(n){n.effects.effect.puff=function(t,i){var r=n(this),e=n.effects.setMode(r,t.mode||"hide"),o=e==="hide",s=parseInt(t.percent,10)||150,f=s/100,u={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};n.extend(t,{effect:"scale",queue:!1,fade:!0,mode:e,complete:i,percent:o?s:100,from:o?u:{height:u.height*f,width:u.width*f,outerHeight:u.outerHeight*f,outerWidth:u.outerWidth*f}});r.effect(t)};n.effects.effect.scale=function(t,i){var u=n(this),r=n.extend(!0,{},t),f=n.effects.setMode(u,t.mode||"effect"),s=parseInt(t.percent,10)||(parseInt(t.percent,10)===0?0:f==="hide"?0:100),h=t.direction||"both",c=t.origin,e={height:u.height(),width:u.width(),outerHeight:u.outerHeight(),outerWidth:u.outerWidth()},o={y:h!=="horizontal"?s/100:1,x:h!=="vertical"?s/100:1};r.effect="size";r.queue=!1;r.complete=i;f!=="effect"&&(r.origin=c||["middle","center"],r.restore=!0);r.from=t.from||(f==="show"?{height:0,width:0,outerHeight:0,outerWidth:0}:e);r.to={height:e.height*o.y,width:e.width*o.x,outerHeight:e.outerHeight*o.y,outerWidth:e.outerWidth*o.x};r.fade&&(f==="show"&&(r.from.opacity=0,r.to.opacity=1),f==="hide"&&(r.from.opacity=1,r.to.opacity=0));u.effect(r)};n.effects.effect.size=function(t,i){var f,l,u,r=n(this),w=["position","top","bottom","left","right","width","height","overflow","opacity"],a=["width","height","overflow"],v=["fontSize"],e=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],o=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],h=n.effects.setMode(r,t.mode||"effect"),y=t.restore||h!=="effect",c=t.scale||"both",b=t.origin||["middle","center"],k=r.css("position"),s=y?w:["position","top","bottom","left","right","overflow","opacity"],p={height:0,width:0,outerHeight:0,outerWidth:0};h==="show"&&r.show();f={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};t.mode==="toggle"&&h==="show"?(r.from=t.to||p,r.to=t.from||f):(r.from=t.from||(h==="show"?p:f),r.to=t.to||(h==="hide"?p:f));u={from:{y:r.from.height/f.height,x:r.from.width/f.width},to:{y:r.to.height/f.height,x:r.to.width/f.width}};(c==="box"||c==="both")&&(u.from.y!==u.to.y&&(s=s.concat(e),r.from=n.effects.setTransition(r,e,u.from.y,r.from),r.to=n.effects.setTransition(r,e,u.to.y,r.to)),u.from.x!==u.to.x&&(s=s.concat(o),r.from=n.effects.setTransition(r,o,u.from.x,r.from),r.to=n.effects.setTransition(r,o,u.to.x,r.to)));(c==="content"||c==="both")&&u.from.y!==u.to.y&&(s=s.concat(v).concat(a),r.from=n.effects.setTransition(r,v,u.from.y,r.from),r.to=n.effects.setTransition(r,v,u.to.y,r.to));n.effects.save(r,s);r.show();n.effects.createWrapper(r);r.css("overflow","hidden").css(r.from);b&&(l=n.effects.getBaseline(b,f),r.from.top=(f.outerHeight-r.outerHeight())*l.y,r.from.left=(f.outerWidth-r.outerWidth())*l.x,r.to.top=(f.outerHeight-r.to.outerHeight)*l.y,r.to.left=(f.outerWidth-r.to.outerWidth)*l.x);r.css(r.from);(c==="content"||c==="both")&&(e=e.concat(["marginTop","marginBottom"]).concat(v),o=o.concat(["marginLeft","marginRight"]),a=w.concat(e).concat(o),r.find("*[width]").each(function(){var i=n(this),r={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};y&&n.effects.save(i,a);i.from={height:r.height*u.from.y,width:r.width*u.from.x,outerHeight:r.outerHeight*u.from.y,outerWidth:r.outerWidth*u.from.x};i.to={height:r.height*u.to.y,width:r.width*u.to.x,outerHeight:r.height*u.to.y,outerWidth:r.width*u.to.x};u.from.y!==u.to.y&&(i.from=n.effects.setTransition(i,e,u.from.y,i.from),i.to=n.effects.setTransition(i,e,u.to.y,i.to));u.from.x!==u.to.x&&(i.from=n.effects.setTransition(i,o,u.from.x,i.from),i.to=n.effects.setTransition(i,o,u.to.x,i.to));i.css(i.from);i.animate(i.to,t.duration,t.easing,function(){y&&n.effects.restore(i,a)})}));r.animate(r.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){r.to.opacity===0&&r.css("opacity",r.from.opacity);h==="hide"&&r.hide();n.effects.restore(r,s);y||(k==="static"?r.css({position:"relative",top:r.to.top,left:r.to.left}):n.each(["top","left"],function(n,t){r.css(t,function(t,i){var f=parseInt(i,10),u=n?r.to.left:r.to.top;return i==="auto"?u+"px":f+u+"px"})}));n.effects.removeWrapper(r);i()}})}}(jQuery),function(n){n.effects.effect.shake=function(t,i){var r=n(this),v=["position","top","bottom","left","right","height","width"],k=n.effects.setMode(r,t.mode||"effect"),f=t.direction||"left",o=t.distance||20,y=t.times||3,p=y*2+1,u=Math.round(t.duration/p),s=f==="up"||f==="down"?"top":"left",h=f==="up"||f==="left",c={},l={},w={},a,e=r.queue(),b=e.length;for(n.effects.save(r,v),r.show(),n.effects.createWrapper(r),c[s]=(h?"-=":"+=")+o,l[s]=(h?"+=":"-=")+o*2,w[s]=(h?"-=":"+=")+o*2,r.animate(c,u,t.easing),a=1;a<y;a++)r.animate(l,u,t.easing).animate(w,u,t.easing);r.animate(l,u,t.easing).animate(c,u/2,t.easing).queue(function(){k==="hide"&&r.hide();n.effects.restore(r,v);n.effects.removeWrapper(r);i()});b>1&&e.splice.apply(e,[1,0].concat(e.splice(b,p+1)));r.dequeue()}}(jQuery),function(n){n.effects.effect.slide=function(t,i){var r=n(this),s=["position","top","bottom","left","right","width","height"],h=n.effects.setMode(r,t.mode||"show"),c=h==="show",f=t.direction||"left",e=f==="up"||f==="down"?"top":"left",o=f==="up"||f==="left",u,l={};n.effects.save(r,s);r.show();u=t.distance||r[e==="top"?"outerHeight":"outerWidth"](!0);n.effects.createWrapper(r).css({overflow:"hidden"});c&&r.css(e,o?isNaN(u)?"-"+u:-u:u);l[e]=(c?o?"+=":"-=":o?"-=":"+=")+u;r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){h==="hide"&&r.hide();n.effects.restore(r,s);n.effects.removeWrapper(r);i()}})}}(jQuery),function(n){n.effects.effect.transfer=function(t,i){var u=n(this),r=n(t.to),f=r.css("position")==="fixed",e=n("body"),o=f?e.scrollTop():0,s=f?e.scrollLeft():0,h=r.offset(),l={top:h.top-o,left:h.left-s,height:r.innerHeight(),width:r.innerWidth()},c=u.offset(),a=n("<div class='ui-effects-transfer'><\/div>").appendTo(document.body).addClass(t.className).css({top:c.top-o,left:c.left-s,height:u.innerHeight(),width:u.innerWidth(),position:f?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){a.remove();i()})}}(jQuery),function(n){n.widget("ui.menu",{version:"1.10.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=!1;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,n.proxy(function(n){this.options.disabled&&n.preventDefault()},this));this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item > a":function(n){n.preventDefault()},"click .ui-state-disabled > a":function(n){n.preventDefault()},"click .ui-menu-item:has(a)":function(t){var i=n(t.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(t),i.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=n(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(n,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(n,i)},blur:function(t){this._delay(function(){n.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(t){n(t.target).closest(".ui-menu").length||this.collapseAll(t);this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=n(this);t.data("ui-menu-submenu-carat")&&t.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function s(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var i,f,r,e,u,o=!0;switch(t.keyCode){case n.ui.keyCode.PAGE_UP:this.previousPage(t);break;case n.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case n.ui.keyCode.HOME:this._move("first","first",t);break;case n.ui.keyCode.END:this._move("last","last",t);break;case n.ui.keyCode.UP:this.previous(t);break;case n.ui.keyCode.DOWN:this.next(t);break;case n.ui.keyCode.LEFT:this.collapse(t);break;case n.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case n.ui.keyCode.ENTER:case n.ui.keyCode.SPACE:this._activate(t);break;case n.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1;f=this.previousFilter||"";r=String.fromCharCode(t.keyCode);e=!1;clearTimeout(this.filterTimer);r===f?e=!0:r=f+r;u=new RegExp("^"+s(r),"i");i=this.activeMenu.children(".ui-menu-item").filter(function(){return u.test(n(this).children("a").text())});i=e&&i.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):i;i.length||(r=String.fromCharCode(t.keyCode),u=new RegExp("^"+s(r),"i"),i=this.activeMenu.children(".ui-menu-item").filter(function(){return u.test(n(this).children("a").text())}));i.length?(this.focus(t,i),i.length>1?(this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}o&&t.preventDefault()},_activate:function(n){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(n):this.select(n))},refresh:function(){var t,r=this.options.icons.submenu,i=this.element.find(this.options.menus);i.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=n(this),i=t.prev("a"),u=n("<span>").addClass("ui-menu-icon ui-icon "+r).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(u);t.attr("aria-labelledby",i.attr("id"))});t=i.add(this.element);t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});t.children(":not(.ui-menu-item)").each(function(){var t=n(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")});t.children(".ui-state-disabled").attr("aria-disabled","true");this.active&&!n.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(n,t){n==="icons"&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu);this._super(n,t)},focus:function(n,t){var i,r;this.blur(n,n&&n.type==="focus");this._scrollIntoView(t);this.active=t.first();r=this.active.children("a").addClass("ui-state-focus");this.options.role&&this.element.attr("aria-activedescendant",r.attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");n&&n.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay);i=t.children(".ui-menu");i.length&&/^mouse/.test(n.type)&&this._startOpening(i);this.activeMenu=t.parent();this._trigger("focus",n,{item:t})},_scrollIntoView:function(t){var e,o,i,r,u,f;this._hasScroll()&&(e=parseFloat(n.css(this.activeMenu[0],"borderTopWidth"))||0,o=parseFloat(n.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-e-o,r=this.activeMenu.scrollTop(),u=this.activeMenu.height(),f=t.height(),i<0?this.activeMenu.scrollTop(r+i):i+f>u&&this.activeMenu.scrollTop(r+i-u+f))},blur:function(n,t){(t||clearTimeout(this.timer),this.active)&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",n,{item:this.active}))},_startOpening:function(n){(clearTimeout(this.timer),n.attr("aria-hidden")==="true")&&(this.timer=this._delay(function(){this._close();this._open(n)},this.delay))},_open:function(t){var i=n.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true");t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer);this.timer=this._delay(function(){var r=i?this.element:n(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element);this._close(r);this.blur(t);this.activeMenu=r},this.delay)},_close:function(n){n||(n=this.active?this.active.parent():this.element);n.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(n){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(n,t))},expand:function(n){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(n,t)}))},next:function(n){this._move("next","first",n)},previous:function(n){this._move("prev","last",n)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(n,t,i){var r;this.active&&(r=n==="first"||n==="last"?this.active[n==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[n+"All"](".ui-menu-item").eq(0));r&&r.length&&this.active||(r=this.activeMenu.children(".ui-menu-item")[t]());this.focus(i,r)},nextPage:function(t){var i,r,u;if(!this.active){this.next(t);return}this.isLastItem()||(this._hasScroll()?(r=this.active.offset().top,u=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=n(this),i.offset().top-r-u<0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))},previousPage:function(t){var i,r,u;if(!this.active){this.next(t);return}this.isFirstItem()||(this._hasScroll()?(r=this.active.offset().top,u=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=n(this),i.offset().top-r+u>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first()))},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||n(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0);this._trigger("select",t,i)}})}(jQuery),function(n,t){function a(n,t,i){return[parseFloat(n[0])*(l.test(n[0])?t/100:1),parseFloat(n[1])*(l.test(n[1])?i/100:1)]}function u(t,i){return parseInt(n.css(t,i),10)||0}function y(t){var i=t[0];return i.nodeType===9?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:n.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}n.ui=n.ui||{};var f,r=Math.max,i=Math.abs,e=Math.round,o=/left|center|right/,s=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,l=/%$/,v=n.fn.position;n.position={scrollbarWidth:function(){if(f!==t)return f;var u,r,i=n("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'><\/div><\/div>"),e=i.children()[0];return n("body").append(i),u=e.offsetWidth,i.css("overflow","scroll"),r=e.offsetWidth,u===r&&(r=i[0].clientWidth),i.remove(),f=u-r},getScrollInfo:function(t){var i=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),u=i==="scroll"||i==="auto"&&t.width<t.element[0].scrollWidth,f=r==="scroll"||r==="auto"&&t.height<t.element[0].scrollHeight;return{width:u?n.position.scrollbarWidth():0,height:f?n.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=n(t||window),r=n.isWindow(i[0]);return{element:i,isWindow:r,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:r?i.width():i.outerWidth(),height:r?i.height():i.outerHeight()}}};n.fn.position=function(t){if(!t||!t.of)return v.apply(this,arguments);t=n.extend({},t);var b,f,l,w,p,d,g=n(t.of),tt=n.position.getWithinInfo(t.within),it=n.position.getScrollInfo(tt),k=(t.collision||"flip").split(" "),nt={};return d=y(g),g[0].preventDefault&&(t.at="left top"),f=d.width,l=d.height,w=d.offset,p=n.extend({},w),n.each(["my","at"],function(){var n=(t[this]||"").split(" "),i,r;n.length===1&&(n=o.test(n[0])?n.concat(["center"]):s.test(n[0])?["center"].concat(n):["center","center"]);n[0]=o.test(n[0])?n[0]:"center";n[1]=s.test(n[1])?n[1]:"center";i=h.exec(n[0]);r=h.exec(n[1]);nt[this]=[i?i[0]:0,r?r[0]:0];t[this]=[c.exec(n[0])[0],c.exec(n[1])[0]]}),k.length===1&&(k[1]=k[0]),t.at[0]==="right"?p.left+=f:t.at[0]==="center"&&(p.left+=f/2),t.at[1]==="bottom"?p.top+=l:t.at[1]==="center"&&(p.top+=l/2),b=a(nt.at,f,l),p.left+=b[0],p.top+=b[1],this.each(function(){var y,d,s=n(this),h=s.outerWidth(),c=s.outerHeight(),rt=u(this,"marginLeft"),ut=u(this,"marginTop"),ft=h+rt+u(this,"marginRight")+it.width,et=c+ut+u(this,"marginBottom")+it.height,o=n.extend({},p),v=a(nt.my,s.outerWidth(),s.outerHeight());t.my[0]==="right"?o.left-=h:t.my[0]==="center"&&(o.left-=h/2);t.my[1]==="bottom"?o.top-=c:t.my[1]==="center"&&(o.top-=c/2);o.left+=v[0];o.top+=v[1];n.support.offsetFractions||(o.left=e(o.left),o.top=e(o.top));y={marginLeft:rt,marginTop:ut};n.each(["left","top"],function(i,r){n.ui.position[k[i]]&&n.ui.position[k[i]][r](o,{targetWidth:f,targetHeight:l,elemWidth:h,elemHeight:c,collisionPosition:y,collisionWidth:ft,collisionHeight:et,offset:[b[0]+v[0],b[1]+v[1]],my:t.my,at:t.at,within:tt,elem:s})});t.using&&(d=function(n){var u=w.left-o.left,v=u+f-h,e=w.top-o.top,y=e+l-c,a={target:{element:g,left:w.left,top:w.top,width:f,height:l},element:{element:s,left:o.left,top:o.top,width:h,height:c},horizontal:v<0?"left":u>0?"right":"center",vertical:y<0?"top":e>0?"bottom":"middle"};f<h&&i(u+v)<f&&(a.horizontal="center");l<c&&i(e+y)<l&&(a.vertical="middle");a.important=r(i(u),i(v))>r(i(e),i(y))?"horizontal":"vertical";t.using.call(this,n,a)});s.offset(n.extend(o,{using:d}))})};n.ui.position={fit:{left:function(n,t){var e=t.within,u=e.isWindow?e.scrollLeft:e.offset.left,o=e.width,s=n.left-t.collisionPosition.marginLeft,i=u-s,f=s+t.collisionWidth-o-u,h;t.collisionWidth>o?i>0&&f<=0?(h=n.left+i+t.collisionWidth-o-u,n.left+=i-h):n.left=f>0&&i<=0?u:i>f?u+o-t.collisionWidth:u:i>0?n.left+=i:f>0?n.left-=f:n.left=r(n.left-s,n.left)},top:function(n,t){var o=t.within,u=o.isWindow?o.scrollTop:o.offset.top,e=t.within.height,s=n.top-t.collisionPosition.marginTop,i=u-s,f=s+t.collisionHeight-e-u,h;t.collisionHeight>e?i>0&&f<=0?(h=n.top+i+t.collisionHeight-e-u,n.top+=i-h):n.top=f>0&&i<=0?u:i>f?u+e-t.collisionHeight:u:i>0?n.top+=i:f>0?n.top-=f:n.top=r(n.top-s,n.top)}},flip:{left:function(n,t){var r=t.within,y=r.offset.left+r.scrollLeft,c=r.width,o=r.isWindow?r.scrollLeft:r.offset.left,l=n.left-t.collisionPosition.marginLeft,a=l-o,v=l+t.collisionWidth-c-o,u=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,f=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,e=-2*t.offset[0],s,h;a<0?(s=n.left+u+f+e+t.collisionWidth-c-y,(s<0||s<i(a))&&(n.left+=u+f+e)):v>0&&(h=n.left-t.collisionPosition.marginLeft+u+f+e-o,(h>0||i(h)<v)&&(n.left+=u+f+e))},top:function(n,t){var r=t.within,y=r.offset.top+r.scrollTop,a=r.height,o=r.isWindow?r.scrollTop:r.offset.top,v=n.top-t.collisionPosition.marginTop,s=v-o,h=v+t.collisionHeight-a-o,p=t.my[1]==="top",u=p?-t.elemHeight:t.my[1]==="bottom"?t.elemHeight:0,f=t.at[1]==="top"?t.targetHeight:t.at[1]==="bottom"?-t.targetHeight:0,e=-2*t.offset[1],c,l;s<0?(l=n.top+u+f+e+t.collisionHeight-a-y,n.top+u+f+e>s&&(l<0||l<i(s))&&(n.top+=u+f+e)):h>0&&(c=n.top-t.collisionPosition.marginTop+u+f+e-o,n.top+u+f+e>h&&(c>0||i(c)<h)&&(n.top+=u+f+e))}},flipfit:{left:function(){n.ui.position.flip.left.apply(this,arguments);n.ui.position.fit.left.apply(this,arguments)},top:function(){n.ui.position.flip.top.apply(this,arguments);n.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,r,u,f,e=document.getElementsByTagName("body")[0],o=document.createElement("div");t=document.createElement(e?"div":"body");r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};e&&n.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in r)t.style[f]=r[f];t.appendChild(o);i=e||document.documentElement;i.insertBefore(t,i.firstChild);o.style.cssText="position: absolute; left: 10.7432222px;";u=n(o).offset().left;n.support.offsetFractions=u>10&&u<11;t.innerHTML="";i.removeChild(t)}()}(jQuery),function(n,t){n.widget("ui.progressbar",{version:"1.10.1",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=n("<div class='ui-progressbar-value ui-widget-header ui-corner-left'><\/div>").appendTo(this.element);this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove()},value:function(n){if(n===t)return this.options.value;this.options.value=this._constrainedValue(n);this._refreshValue()},_constrainedValue:function(n){return n===t&&(n=this.options.value),this.indeterminate=n===!1,typeof n!="number"&&(n=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,n))},_setOptions:function(n){var t=n.value;delete n.value;this._super(n);this.options.value=this._constrainedValue(t);this._refreshValue()},_setOption:function(n,t){n==="max"&&(t=Math.max(this.min,t));this._super(n,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=n("<div class='ui-progressbar-overlay'><\/div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null));this.oldValue!==t&&(this.oldValue=t,this._trigger("change"));t===this.options.max&&this._trigger("complete")}})}(jQuery),function(n){var t=5;n.widget("ui.slider",n.ui.mouse,{version:"1.10.1",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1;this._mouseSliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this._refresh();this._setOption("disabled",this.options.disabled);this._animateOff=!1},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var r,i,u=this.options,t=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f=[];for(i=u.values&&u.values.length||1,t.length>i&&(t.slice(i).remove(),t=t.slice(0,i)),r=t.length;r<i;r++)f.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'><\/a>");this.handles=t.add(n(f.join("")).appendTo(this.element));this.handle=this.handles.eq(0);this.handles.each(function(t){n(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&t.values.length!==2?t.values=[t.values[0],t.values[0]]:n.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=n("<div><\/div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+(t.range==="min"||t.range==="max"?" ui-slider-range-"+t.range:""))):this.range=n([])},_setupEvents:function(){var n=this.handles.add(this.range).filter("a");this._off(n);this._on(n,this._handleEvents);this._hoverable(n);this._focusable(n)},_destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all");this._mouseDestroy()},_mouseCapture:function(t){var s,f,r,i,u,h,e,c,o=this,l=this.options;return l.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),s={x:t.pageX,y:t.pageY},f=this._normValueFromMouse(s),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(f-o.values(t));(r>e||r===e&&(t===o._lastChangedValue||o.values(t)===l.min))&&(r=e,i=n(this),u=t)}),h=this._start(t,u),h===!1)?!1:(this._mouseSliding=!0,this._handleIndex=u,i.addClass("ui-state-active").focus(),e=i.offset(),c=!n(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=c?{left:0,top:0}:{left:t.pageX-e.left-i.width()/2,top:t.pageY-e.top-i.height()/2-(parseInt(i.css("borderTopWidth"),10)||0)-(parseInt(i.css("borderBottomWidth"),10)||0)+(parseInt(i.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,u,f),this._animateOff=!0,!0)},_mouseStart:function(){return!0},_mouseDrag:function(n){var t={x:n.pageX,y:n.pageY},i=this._normValueFromMouse(t);return this._slide(n,this._handleIndex,i),!1},_mouseStop:function(n){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(n,this._handleIndex),this._change(n,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(n){var i,r,t,u,f;return this.orientation==="horizontal"?(i=this.elementSize.width,r=n.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(i=this.elementSize.height,r=n.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),t=r/i,t>1&&(t=1),t<0&&(t=0),this.orientation==="vertical"&&(t=1-t),u=this._valueMax()-this._valueMin(),f=this._valueMin()+t*u,this._trimAlignValue(f)},_start:function(n,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",n,i)},_slide:function(n,t,i){var r,f,u;this.options.values&&this.options.values.length?(r=this.values(t?0:1),this.options.values.length===2&&this.options.range===!0&&(t===0&&i>r||t===1&&i<r)&&(i=r),i!==this.values(t)&&(f=this.values(),f[t]=i,u=this._trigger("slide",n,{handle:this.handles[t],value:i,values:f}),r=this.values(t?0:1),u!==!1&&this.values(t,i,!0))):i!==this.value()&&(u=this._trigger("slide",n,{handle:this.handles[t],value:i}),u!==!1&&this.value(i))},_stop:function(n,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values());this._trigger("stop",n,i)},_change:function(n,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values());this._lastChangedValue=t;this._trigger("change",n,i)}},value:function(n){if(arguments.length){this.options.value=this._trimAlignValue(n);this._refreshValue();this._change(null,0);return}return this._value()},values:function(t,i){var u,f,r;if(arguments.length>1){this.options.values[t]=this._trimAlignValue(i);this._refreshValue();this._change(null,t);return}if(arguments.length)if(n.isArray(arguments[0])){for(u=this.options.values,f=arguments[0],r=0;r<u.length;r+=1)u[r]=this._trimAlignValue(f[r]),this._change(null,r);this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(t):this.value();else return this._values()},_setOption:function(t,i){var r,u=0;t==="range"&&this.options.range===!0&&(i==="min"?(this.options.value=this._values(0),this.options.values=null):i==="max"&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null));n.isArray(this.options.values)&&(u=this.options.values.length);n.Widget.prototype._setOption.apply(this,arguments);switch(t){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),r=0;r<u;r+=1)this._change(null,r);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0;this._refreshValue();this._animateOff=!1;break;case"range":this._animateOff=!0;this._refresh();this._animateOff=!1}},_value:function(){var n=this.options.value;return this._trimAlignValue(n)},_values:function(n){var r,t,i;if(arguments.length)return r=this.options.values[n],this._trimAlignValue(r);if(this.options.values&&this.options.values.length){for(t=this.options.values.slice(),i=0;i<t.length;i+=1)t[i]=this._trimAlignValue(t[i]);return t}return[]},_trimAlignValue:function(n){if(n<=this._valueMin())return this._valueMin();if(n>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(n-this._valueMin())%t,r=n-i;return Math.abs(i)*2>=t&&(r+=i>0?t:-t),parseFloat(r.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var s,t,c,f,h,e=this.options.range,i=this.options,r=this,u=this._animateOff?!1:i.animate,o={};this.options.values&&this.options.values.length?this.handles.each(function(f){t=(r.values(f)-r._valueMin())/(r._valueMax()-r._valueMin())*100;o[r.orientation==="horizontal"?"left":"bottom"]=t+"%";n(this).stop(1,1)[u?"animate":"css"](o,i.animate);r.options.range===!0&&(r.orientation==="horizontal"?(f===0&&r.range.stop(1,1)[u?"animate":"css"]({left:t+"%"},i.animate),f===1&&r.range[u?"animate":"css"]({width:t-s+"%"},{queue:!1,duration:i.animate})):(f===0&&r.range.stop(1,1)[u?"animate":"css"]({bottom:t+"%"},i.animate),f===1&&r.range[u?"animate":"css"]({height:t-s+"%"},{queue:!1,duration:i.animate})));s=t}):(c=this.value(),f=this._valueMin(),h=this._valueMax(),t=h!==f?(c-f)/(h-f)*100:0,o[this.orientation==="horizontal"?"left":"bottom"]=t+"%",this.handle.stop(1,1)[u?"animate":"css"](o,i.animate),e==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[u?"animate":"css"]({width:t+"%"},i.animate),e==="max"&&this.orientation==="horizontal"&&this.range[u?"animate":"css"]({width:100-t+"%"},{queue:!1,duration:i.animate}),e==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[u?"animate":"css"]({height:t+"%"},i.animate),e==="max"&&this.orientation==="vertical"&&this.range[u?"animate":"css"]({height:100-t+"%"},{queue:!1,duration:i.animate}))},_handleEvents:{keydown:function(i){var o,u,r,f,e=n(i.target).data("ui-slider-handle-index");switch(i.keyCode){case n.ui.keyCode.HOME:case n.ui.keyCode.END:case n.ui.keyCode.PAGE_UP:case n.ui.keyCode.PAGE_DOWN:case n.ui.keyCode.UP:case n.ui.keyCode.RIGHT:case n.ui.keyCode.DOWN:case n.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,n(i.target).addClass("ui-state-active"),o=this._start(i,e),o===!1))return}f=this.options.step;u=this.options.values&&this.options.values.length?r=this.values(e):r=this.value();switch(i.keyCode){case n.ui.keyCode.HOME:r=this._valueMin();break;case n.ui.keyCode.END:r=this._valueMax();break;case n.ui.keyCode.PAGE_UP:r=this._trimAlignValue(u+(this._valueMax()-this._valueMin())/t);break;case n.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(u-(this._valueMax()-this._valueMin())/t);break;case n.ui.keyCode.UP:case n.ui.keyCode.RIGHT:if(u===this._valueMax())return;r=this._trimAlignValue(u+f);break;case n.ui.keyCode.DOWN:case n.ui.keyCode.LEFT:if(u===this._valueMin())return;r=this._trimAlignValue(u-f)}this._slide(i,e,r)},click:function(n){n.preventDefault()},keyup:function(t){var i=n(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),n(t.target).removeClass("ui-state-active"))}}})}(jQuery),function(n){function t(n){return function(){var t=this.element.val();n.apply(this,arguments);this._refresh();t!==this.element.val()&&this._trigger("change")}}n.widget("ui.spinner",{version:"1.10.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);this._setOption("min",this.options.min);this._setOption("step",this.options.step);this._value(this.element.val(),!0);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return n.each(["min","max","step"],function(n,r){var u=i.attr(r);u!==undefined&&u.length&&(t[r]=u)}),t},_events:{keydown:function(n){this._start(n)&&this._keydown(n)&&n.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(n){if(this.cancelBlur){delete this.cancelBlur;return}this._refresh();this.previous!==this.element.val()&&this._trigger("change",n)},mousewheel:function(n,t){if(t){if(!this.spinning&&!this._start(n))return!1;this._spin((t>0?1:-1)*this.options.step,n);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(n)},100);n.preventDefault()}},"mousedown .ui-spinner-button":function(t){function r(){var n=this.element[0]===this.document[0].activeElement;n||(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i}))}var i;(i=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),r.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur;r.call(this)}),this._start(t)!==!1)&&this._repeat(null,n(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(n(t.currentTarget).hasClass("ui-state-active")){if(this._start(t)===!1)return!1;this._repeat(null,n(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)}},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var n=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton");this.buttons=n.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");this.buttons.height()>Math.ceil(n.height()*.5)&&n.height()>0&&n.height(n.height());this.options.disabled&&this.disable()},_keydown:function(t){var r=this.options,i=n.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,r.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-r.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'><\/span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;<\/span><\/a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;<\/span><\/a>"},_start:function(n){return!this.spinning&&this._trigger("start",n)===!1?!1:(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(n,t,i){n=n||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,t,i)},n);this._spin(t*this.options.step,i)},_spin:function(n,t){var i=this.value()||0;this.counter||(this.counter=1);i=this._adjustValue(i+n*this._increment(this.counter));this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?n.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var n=this._precisionOf(this.options.step);return this.options.min!==null&&(n=Math.max(n,this._precisionOf(this.options.min))),n},_precisionOf:function(n){var t=n.toString(),i=t.indexOf(".");return i===-1?0:t.length-i-1},_adjustValue:function(n){var r,i,t=this.options;return(r=t.min!==null?t.min:0,i=n-r,i=Math.round(i/t.step)*t.step,n=r+i,n=parseFloat(n.toFixed(this._precision())),t.max!==null&&n>t.max)?t.max:t.min!==null&&n<t.min?t.min:n},_stop:function(n){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",n))},_setOption:function(n,t){if(n==="culture"||n==="numberFormat"){var i=this._parse(this.element.val());this.options[n]=t;this.element.val(this._format(i));return}(n==="max"||n==="min"||n==="step")&&typeof t=="string"&&(t=this._parse(t));n==="icons"&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down));this._super(n,t);n==="disabled"&&(t?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:t(function(n){this._super(n);this._value(this.element.val())}),_parse:function(n){return typeof n=="string"&&n!==""&&(n=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(n,10,this.options.culture):+n),n===""||isNaN(n)?null:n},_format:function(n){return n===""?"":window.Globalize&&this.options.numberFormat?Globalize.format(n,this.options.numberFormat,this.options.culture):n},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(n,t){var i;n!==""&&(i=this._parse(n),i!==null&&(t||(i=this._adjustValue(i)),n=this._format(i)));this.element.val(n);this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.uiSpinner.replaceWith(this.element)},stepUp:t(function(n){this._stepUp(n)}),_stepUp:function(n){this._start()&&(this._spin((n||1)*this.options.step),this._stop())},stepDown:t(function(n){this._stepDown(n)}),_stepDown:function(n){this._start()&&(this._spin((n||1)*-this.options.step),this._stop())},pageUp:t(function(n){this._stepUp((n||1)*this.options.page)}),pageDown:t(function(n){this._stepDown((n||1)*this.options.page)}),value:function(n){if(!arguments.length)return this._parse(this.element.val());t(this._value).call(this,n)},widget:function(){return this.uiSpinner}})}(jQuery),function(n,t){function f(){return++u}function r(n){return n.hash.length>1&&decodeURIComponent(n.href.replace(i,""))===decodeURIComponent(location.href.replace(i,""))}var u=0,i=/#.*$/;n.widget("ui.tabs",{version:"1.10.1",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var i=this,t=this.options;this.running=!1;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",t.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){n(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){n(this).closest("li").is(".ui-state-disabled")&&this.blur()});this._processTabs();t.active=this._initialActive();n.isArray(t.disabled)&&(t.disabled=n.unique(t.disabled.concat(n.map(this.tabs.filter(".ui-state-disabled"),function(n){return i.tabs.index(n)}))).sort());this.active=this.options.active!==!1&&this.anchors.length?this._findActive(t.active):n();this._refresh();this.active.length&&this.load(t.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,r=location.hash.substring(1);return t===null&&(r&&this.tabs.each(function(i,u){if(n(u).attr("aria-controls")===r)return t=i,!1}),t===null&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(t===null||t===-1)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),t===-1&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):n()}},_tabKeydown:function(t){var r=n(this.document[0].activeElement).closest("li"),i=this.tabs.index(r),u=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case n.ui.keyCode.RIGHT:case n.ui.keyCode.DOWN:i++;break;case n.ui.keyCode.UP:case n.ui.keyCode.LEFT:u=!1;i--;break;case n.ui.keyCode.END:i=this.anchors.length-1;break;case n.ui.keyCode.HOME:i=0;break;case n.ui.keyCode.SPACE:t.preventDefault();clearTimeout(this.activating);this._activate(i);return;case n.ui.keyCode.ENTER:t.preventDefault();clearTimeout(this.activating);this._activate(i===this.options.active?!1:i);return;default:return}t.preventDefault();clearTimeout(this.activating);i=this._focusNextTab(i,u);t.ctrlKey||(r.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===n.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===n.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===n.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function u(){return t>r&&(t=0),t<0&&(t=r),t}for(var r=this.tabs.length-1;n.inArray(u(),this.options.disabled)!==-1;)t=i?t+1:t-1;return t},_focusNextTab:function(n,t){return n=this._findNextTab(n,t),this.tabs.eq(n).focus(),n},_setOption:function(n,t){if(n==="active"){this._activate(t);return}if(n==="disabled"){this._setupDisabled(t);return}this._super(n,t);n==="collapsible"&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0));n==="event"&&this._setupEvents(t);n==="heightStyle"&&this._setupHeightStyle(t)},_tabId:function(n){return n.attr("aria-controls")||"ui-tabs-"+f()},_sanitizeSelector:function(n){return n?n.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=n.map(i.filter(".ui-state-disabled"),function(n){return i.index(n)});this._processTabs();t.active!==!1&&this.anchors.length?this.active.length&&!n.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=n()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=n());this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"});this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist");this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return n("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=n();this.anchors.each(function(i,u){var e,f,s,h=n(u).uniqueId().attr("id"),o=n(u).closest("li"),c=o.attr("aria-controls");r(u)?(e=u.hash,f=t.element.find(t._sanitizeSelector(e))):(s=t._tabId(o),e="#"+s,f=t.element.find(e),f.length||(f=t._createPanel(s),f.insertAfter(t.panels[i-1]||t.tablist)),f.attr("aria-live","polite"));f.length&&(t.panels=t.panels.add(f));c&&o.data("ui-tabs-aria-controls",c);o.attr({"aria-controls":e.substring(1),"aria-labelledby":h});f.attr("aria-labelledby",h)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return n("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){n.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i=0,r;r=this.tabs[i];i++)t===!0||n.inArray(i,t)!==-1?n(r).addClass("ui-state-disabled").attr("aria-disabled","true"):n(r).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={click:function(n){n.preventDefault()}};t&&n.each(t.split(" "),function(n,t){i[t]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(this.anchors,i);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,r=this.element.parent();t==="fill"?(i=r.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=n(this),r=t.css("position");r!=="absolute"&&r!=="fixed"&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=n(this).outerHeight(!0)}),this.panels.each(function(){n(this).height(Math.max(0,i-n(this).innerHeight()+n(this).height()))}).css("overflow","auto")):t==="auto"&&(i=0,this.panels.each(function(){i=Math.max(i,n(this).height("").height())}).height(i))},_eventHandler:function(t){var u=this.options,r=this.active,c=n(t.currentTarget),i=c.closest("li"),f=i[0]===r[0],e=f&&u.collapsible,o=e?n():this._getPanelForTab(i),s=r.length?this._getPanelForTab(r):n(),h={oldTab:r,oldPanel:s,newTab:e?n():i,newPanel:o};(t.preventDefault(),i.hasClass("ui-state-disabled")||i.hasClass("ui-tabs-loading")||this.running||f&&!u.collapsible||this._trigger("beforeActivate",t,h)===!1)||(u.active=e?!1:this.tabs.index(i),this.active=f?n():i,this.xhr&&this.xhr.abort(),s.length||o.length||n.error("jQuery UI Tabs: Mismatching fragment identifier."),o.length&&this.load(this.tabs.index(i),t),this._toggle(t,h))},_toggle:function(t,i){function e(){u.running=!1;u._trigger("activate",t,i)}function o(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active");r.length&&u.options.show?u._show(r,u.options.show,e):(r.show(),e())}var u=this,r=i.newPanel,f=i.oldPanel;this.running=!0;f.length&&this.options.hide?this._hide(f,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");o()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),f.hide(),o());f.attr({"aria-expanded":"false","aria-hidden":"true"});i.oldTab.attr("aria-selected","false");r.length&&f.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return n(this).attr("tabIndex")===0}).attr("tabIndex",-1);r.attr({"aria-expanded":"true","aria-hidden":"false"});i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var r,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),r=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:r,currentTarget:r,preventDefault:n.noop}))},_findActive:function(t){return t===!1?n():this.tabs.eq(t)},_getIndex:function(n){return typeof n=="string"&&(n=this.anchors.index(this.anchors.filter("[href$='"+n+"']"))),n},_destroy:function(){this.xhr&&this.xhr.abort();this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId();this.tabs.add(this.panels).each(function(){n.data(this,"ui-tabs-destroy")?n(this).remove():n(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")});this.tabs.each(function(){var t=n(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")});this.panels.show();this.options.heightStyle!=="content"&&this.panels.css("height","")},enable:function(i){var r=this.options.disabled;r!==!1&&(i===t?r=!1:(i=this._getIndex(i),r=n.isArray(r)?n.map(r,function(n){return n!==i?n:null}):n.map(this.tabs,function(n,t){return t!==i?t:null})),this._setupDisabled(r))},disable:function(i){var r=this.options.disabled;if(r!==!0){if(i===t)r=!0;else{if(i=this._getIndex(i),n.inArray(i,r)!==-1)return;r=n.isArray(r)?n.merge([i],r).sort():[i]}this._setupDisabled(r)}},load:function(t,i){t=this._getIndex(t);var f=this,u=this.tabs.eq(t),o=u.find(".ui-tabs-anchor"),e=this._getPanelForTab(u),s={tab:u,panel:e};r(o[0])||(this.xhr=n.ajax(this._ajaxSettings(o,i,s)),this.xhr&&this.xhr.statusText!=="canceled"&&(u.addClass("ui-tabs-loading"),e.attr("aria-busy","true"),this.xhr.success(function(n){setTimeout(function(){e.html(n);f._trigger("load",i,s)},1)}).complete(function(n,t){setTimeout(function(){t==="abort"&&f.panels.stop(!1,!0);u.removeClass("ui-tabs-loading");e.removeAttr("aria-busy");n===f.xhr&&delete f.xhr},1)})))},_ajaxSettings:function(t,i,r){var u=this;return{url:t.attr("href"),beforeSend:function(t,f){return u._trigger("beforeLoad",i,n.extend({jqXHR:t,ajaxSettings:f},r))}}},_getPanelForTab:function(t){var i=n(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(n){function i(t,i){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(i);t.data("ui-tooltip-id",i).attr("aria-describedby",n.trim(r.join(" ")))}function r(t){var u=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),r=n.inArray(u,i);r!==-1&&i.splice(r,1);t.removeData("ui-tooltip-id");i=n.trim(i.join(" "));i?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")}var t=0;n.widget("ui.tooltip",{version:"1.10.1",options:{content:function(){var t=n(this).attr("title")||"";return n("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable()},_setOption:function(t,i){var r=this;if(t==="disabled"){this[i?"_disable":"_enable"]();this.options[t]=i;return}this._super(t,i);t==="content"&&n.each(this.tooltips,function(n,t){r._updateContent(t)})},_disable:function(){var t=this;n.each(this.tooltips,function(i,r){var u=n.Event("blur");u.target=u.currentTarget=r[0];t.close(u,!0)});this.element.find(this.options.items).addBack().each(function(){var t=n(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=n(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var r=this,i=n(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&t.type==="mouseover"&&i.parents().each(function(){var t=n(this),i;t.data("ui-tooltip-open")&&(i=n.Event("blur"),i.target=i.currentTarget=this,r.close(i,!0));t.attr("title")&&(t.uniqueId(),r.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._updateContent(i,t))},_updateContent:function(n,t){var i,r=this.options.content,u=this,f=t?t.type:null;if(typeof r=="string")return this._open(t,n,r);i=r.call(n[0],function(i){n.data("ui-tooltip-open")&&u._delay(function(){t&&(t.type=f);this._open(t,n,i)})});i&&this._open(t,n,i)},_open:function(t,r,u){function s(n){(o.of=n,f.is(":hidden"))||f.position(o)}var f,e,h,o=n.extend({},this.options.position);if(u){if(f=this._find(r),f.length){f.find(".ui-tooltip-content").html(u);return}r.is("[title]")&&(t&&t.type==="mouseover"?r.attr("title",""):r.removeAttr("title"));f=this._tooltip(r);i(r,f.attr("id"));f.find(".ui-tooltip-content").html(u);this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:s}),s(t)):f.position(n.extend({of:r},this.options.position));f.hide();this._show(f,this.options.show);this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){f.is(":visible")&&(s(o.of),clearInterval(h))},n.fx.interval));this._trigger("open",t,{tooltip:f});e={keyup:function(t){if(t.keyCode===n.ui.keyCode.ESCAPE){var i=n.Event(t);i.currentTarget=r[0];this.close(i,!0)}},remove:function(){this._removeTooltip(f)}};t&&t.type!=="mouseover"||(e.mouseleave="close");t&&t.type!=="focusin"||(e.focusout="close");this._on(!0,r,e)}},close:function(t){var f=this,i=n(t?t.currentTarget:this.element),u=this._find(i);this.closing||(clearInterval(this.delayedShow),i.data("ui-tooltip-title")&&i.attr("title",i.data("ui-tooltip-title")),r(i),u.stop(!0),this._hide(u,this.options.hide,function(){f._removeTooltip(n(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&t.type==="mouseleave"&&n.each(this.parents,function(t,i){n(i.element).attr("title",i.title);delete f.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:u}),this.closing=!1)},_tooltip:function(i){var u="ui-tooltip-"+t++,r=n("<div>").attr({id:u,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return n("<div>").addClass("ui-tooltip-content").appendTo(r),r.appendTo(this.document[0].body),this.tooltips[u]=i,r},_find:function(t){var i=t.data("ui-tooltip-id");return i?n("#"+i):n()},_removeTooltip:function(n){n.remove();delete this.tooltips[n.attr("id")]},_destroy:function(){var t=this;n.each(this.tooltips,function(i,r){var u=n.Event("blur");u.target=u.currentTarget=r[0];t.close(u,!0);n("#"+i).remove();r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})}(jQuery),function(n){var t;if(n.ui.timepicker=n.ui.timepicker||{},!n.ui.timepicker.version){n.extend(n.ui,{timepicker:{version:"1.2"}});t=function(){this.regional=[];this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",timezoneText:"Time Zone",isRTL:!1};this._defaults={showButtonPanel:!0,timeOnly:!1,showHour:!0,showMinute:!0,showSecond:!1,showMillisec:!1,showTimezone:!1,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,hour:0,minute:0,second:0,millisec:0,timezone:null,useLocalTimezone:!1,defaultTimezone:"+0000",hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneIso8601:!1,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",defaultValue:null,parse:"strict"};n.extend(this._defaults,this.regional[""])};n.extend(t.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,timezone:null,defaultTimezone:"+0000",hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec"],control:null,setDefaults:function(n){return r(this._defaults,n||{}),this},_newInst:function($input,o){var tp_inst=new t,inlineSettings={},fns={},overrides,i,attrName,attrValue,timezoneList;for(attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)&&(attrValue=$input.attr("time:"+attrName),attrValue))try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}overrides={beforeShow:function(t,i){if(n.isFunction(tp_inst._defaults.evnts.beforeShow))return tp_inst._defaults.evnts.beforeShow.call($input[0],t,i,tp_inst)},onChangeMonthYear:function(t,i,r){tp_inst._updateDateTime(r);n.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],t,i,r,tp_inst)},onClose:function(t,i){tp_inst.timeDefined===!0&&$input.val()!==""&&tp_inst._updateDateTime(i);n.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],t,i,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=o[i]||null);return tp_inst._defaults=n.extend({},this._defaults,inlineSettings,o,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=n.map(tp_inst._defaults.amNames,function(n){return n.toUpperCase()}),tp_inst.pmNames=n.map(tp_inst._defaults.pmNames,function(n){return n.toUpperCase()}),typeof tp_inst._defaults.controlType=="string"?(n.fn[tp_inst._defaults.controlType]===undefined&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType,tp_inst._defaults.timezoneList===null&&(timezoneList=["-1200","-1100","-1000","-0930","-0900","-0800","-0700","-0600","-0500","-0430","-0400","-0330","-0300","-0200","-0100","+0000","+0100","+0200","+0300","+0330","+0400","+0430","+0500","+0530","+0545","+0600","+0630","+0700","+0800","+0845","+0900","+0930","+1000","+1030","+1100","+1130","+1200","+1245","+1300","+1400"],tp_inst._defaults.timezoneIso8601&&(timezoneList=n.map(timezoneList,function(n){return n=="+0000"?"Z":n.substring(0,3)+":"+n.substring(3)})),tp_inst._defaults.timezoneList=timezoneList),tp_inst.timezone=tp_inst._defaults.timezone,tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.ampm="",tp_inst.$input=$input,o.altField&&(tp_inst.$altInput=n(o.altField).css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(tp_inst._defaults.minDate===0||tp_inst._defaults.minDateTime===0)&&(tp_inst._defaults.minDate=new Date),(tp_inst._defaults.maxDate===0||tp_inst._defaults.maxDateTime===0)&&(tp_inst._defaults.maxDate=new Date),tp_inst._defaults.minDate!==undefined&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),tp_inst._defaults.minDateTime!==undefined&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),tp_inst._defaults.maxDate!==undefined&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),tp_inst._defaults.maxDateTime!==undefined&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(n){var t=this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(t);this._limitMinMaxDateTime(n,!1);this._injectTimePicker()},_parseTime:function(t,i){var r,u,f;if(this.inst||(this.inst=n.datepicker._getInst(this.$input[0])),i||!this._defaults.timeOnly){r=n.datepicker._get(this.inst,"dateFormat");try{if(u=e(r,this._defaults.timeFormat,t,n.datepicker._getFormatConfig(this.inst),this._defaults),!u.timeObj)return!1;n.extend(this,u.timeObj)}catch(o){return n.timepicker.log("Error parsing the date/time string: "+o+"\ndate/time string = "+t+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+r),!1}return!0}return(f=n.datepicker.parseTime(this._defaults.timeFormat,t,this._defaults),!f)?!1:(n.extend(this,f),!0)},_injectTimePicker:function(){var y=this.inst.dpDiv,r=this.inst.settings,f=this,t="",s="",a={},c={},p=null,l,o,b,nt,v,e,h,w,tt,it,d,rt,g,k;if(y.find("div.ui-timepicker-div").length===0&&r.showTimepicker){for(l=' style="display:none;"',o='<div class="ui-timepicker-div'+(r.isRTL?" ui-timepicker-rtl":"")+'"><dl><dt class="ui_tpicker_time_label"'+(r.showTime?"":l)+">"+r.timeText+'<\/dt><dd class="ui_tpicker_time"'+(r.showTime?"":l)+"><\/dd>",h=0,w=this.units.length;h<w;h++){if(t=this.units[h],s=t.substr(0,1).toUpperCase()+t.substr(1),a[t]=parseInt(r[t+"Max"]-(r[t+"Max"]-r[t+"Min"])%r["step"+s],10),c[t]=0,o+='<dt class="ui_tpicker_'+t+'_label"'+(r["show"+s]?"":l)+">"+r[t+"Text"]+'<\/dt><dd class="ui_tpicker_'+t+'"><div class="ui_tpicker_'+t+'_slider"'+(r["show"+s]?"":l)+"><\/div>",r["show"+s]&&r[t+"Grid"]>0){if(o+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',t=="hour")for(b=r[t+"Min"];b<=a[t];b+=parseInt(r[t+"Grid"],10))c[t]++,nt=n.datepicker.formatTime(i(r.pickerTimeFormat||r.timeFormat)?"hht":"HH",{hour:b},r),o+='<td data-for="'+t+'">'+nt+"<\/td>";else for(v=r[t+"Min"];v<=a[t];v+=parseInt(r[t+"Grid"],10))c[t]++,o+='<td data-for="'+t+'">'+(v<10?"0":"")+v+"<\/td>";o+="<\/tr><\/table><\/div>"}o+="<\/dd>"}for(o+='<dt class="ui_tpicker_timezone_label"'+(r.showTimezone?"":l)+">"+r.timezoneText+"<\/dt>",o+='<dd class="ui_tpicker_timezone" '+(r.showTimezone?"":l)+"><\/dd>",o+="<\/dl><\/div>",e=n(o),r.timeOnly===!0&&(e.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+r.timeOnlyTitle+"<\/div><\/div>"),y.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),h=0,w=f.units.length;h<w;h++)t=f.units[h],s=t.substr(0,1).toUpperCase()+t.substr(1),f[t+"_slider"]=f.control.create(f,e.find(".ui_tpicker_"+t+"_slider"),t,f[t],r[t+"Min"],a[t],r["step"+s]),r["show"+s]&&r[t+"Grid"]>0&&(p=100*c[t]*r[t+"Grid"]/(a[t]-r[t+"Min"]),e.find(".ui_tpicker_"+t+" table").css({width:p+"%",marginLeft:r.isRTL?"0":p/(-2*c[t])+"%",marginRight:r.isRTL?p/(-2*c[t])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var r=n(this),u=r.html(),i=parseInt(u.replace(/[^0-9]/g),10),e=u.replace(/[^apm]/ig),o=r.data("for");o=="hour"&&(e.indexOf("p")!==-1&&i<12?i+=12:e.indexOf("a")!==-1&&i===12&&(i=0));f.control.value(f,f[o+"_slider"],t,i);f._onTimeChange();f._onSelectHandler()}).css({cursor:"pointer",width:100/c[t]+"%",textAlign:"center",overflow:"hidden"}));this.timezone_select=e.find(".ui_tpicker_timezone").append("<select><\/select>").find("select");n.fn.append.apply(this.timezone_select,n.map(r.timezoneList,function(t){return n("<option />").val(typeof t=="object"?t.value:t).text(typeof t=="object"?t.label:t)}));typeof this.timezone!="undefined"&&this.timezone!==null&&this.timezone!==""?(tt=new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12),it=n.timepicker.timeZoneOffsetString(tt),it==this.timezone?u(f):this.timezone_select.val(this.timezone)):typeof this.hour!="undefined"&&this.hour!==null&&this.hour!==""?this.timezone_select.val(r.defaultTimezone):u(f);this.timezone_select.change(function(){f._defaults.useLocalTimezone=!1;f._onTimeChange();f._onSelectHandler()});d=y.find(".ui-datepicker-buttonpane");d.length?d.before(e):y.append(e);this.$timeObj=e.find(".ui_tpicker_time");this.inst!==null&&(rt=this.timeDefined,this._onTimeChange(),this.timeDefined=rt);this._defaults.addSliderAccess&&(g=this._defaults.sliderAccessArgs,k=this._defaults.isRTL,g.isRTL=k,setTimeout(function(){if(e.find(".ui-slider-access").length===0){e.find(".ui-slider:visible").sliderAccess(g);var t=e.find(".ui-slider-access:eq(0)").outerWidth(!0);t&&e.find("table:visible").each(function(){var i=n(this),r=i.outerWidth(),e=i.css(k?"marginRight":"marginLeft").toString().replace("%",""),u=r-t,o=e*u/r+"%",f={width:u,marginRight:0,marginLeft:0};f[k?"marginRight":"marginLeft"]=o;i.css(f)})}},10))}},_limitMinMaxDateTime:function(t,i){var r=this._defaults,e=new Date(t.selectedYear,t.selectedMonth,t.selectedDay),u,o,f,s;if(this._defaults.showTimepicker&&(n.datepicker._get(t,"minDateTime")!==null&&n.datepicker._get(t,"minDateTime")!==undefined&&e&&(u=n.datepicker._get(t,"minDateTime"),o=new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0,0),(this.hourMinOriginal===null||this.minuteMinOriginal===null||this.secondMinOriginal===null||this.millisecMinOriginal===null)&&(this.hourMinOriginal=r.hourMin,this.minuteMinOriginal=r.minuteMin,this.secondMinOriginal=r.secondMin,this.millisecMinOriginal=r.millisecMin),t.settings.timeOnly||o.getTime()==e.getTime()?(this._defaults.hourMin=u.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=u.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=u.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=u.getMilliseconds()):(this.millisec<this._defaults.millisecMin&&(this.millisec=this._defaults.millisecMin),this._defaults.millisecMin=this.millisecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal)),n.datepicker._get(t,"maxDateTime")!==null&&n.datepicker._get(t,"maxDateTime")!==undefined&&e&&(f=n.datepicker._get(t,"maxDateTime"),s=new Date(f.getFullYear(),f.getMonth(),f.getDate(),0,0,0,0),(this.hourMaxOriginal===null||this.minuteMaxOriginal===null||this.secondMaxOriginal===null)&&(this.hourMaxOriginal=r.hourMax,this.minuteMaxOriginal=r.minuteMax,this.secondMaxOriginal=r.secondMax,this.millisecMaxOriginal=r.millisecMax),t.settings.timeOnly||s.getTime()==e.getTime()?(this._defaults.hourMax=f.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=f.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=f.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=f.getMilliseconds()):(this.millisec>this._defaults.millisecMax&&(this.millisec=this._defaults.millisecMax),this._defaults.millisecMax=this.millisecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal)),i!==undefined&&i===!0)){var h=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),c=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),l=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),a=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:h}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour));this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:c}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute));this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:l}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond));this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:a}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec))}},_onTimeChange:function(){var t=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,u=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,f=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,e=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,o=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,h=r.pickerTimeFormat||r.timeFormat,c=r.pickerTimeSuffix||r.timeSuffix,l,s;typeof t=="object"&&(t=!1);typeof u=="object"&&(u=!1);typeof f=="object"&&(f=!1);typeof e=="object"&&(e=!1);typeof o=="object"&&(o=!1);t!==!1&&(t=parseInt(t,10));u!==!1&&(u=parseInt(u,10));f!==!1&&(f=parseInt(f,10));e!==!1&&(e=parseInt(e,10));l=r[t<12?"amNames":"pmNames"][0];s=t!=this.hour||u!=this.minute||f!=this.second||e!=this.millisec||this.ampm.length>0&&t<12!=(n.inArray(this.ampm.toUpperCase(),this.amNames)!==-1)||this.timezone===null&&o!=this.defaultTimezone||this.timezone!==null&&o!=this.timezone;s&&(t!==!1&&(this.hour=t),u!==!1&&(this.minute=u),f!==!1&&(this.second=f),e!==!1&&(this.millisec=e),o!==!1&&(this.timezone=o),this.inst||(this.inst=n.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0));i(r.timeFormat)&&(this.ampm=l);this.formattedTime=n.datepicker.formatTime(r.timeFormat,this,r);this.$timeObj&&(h===r.timeFormat?this.$timeObj.text(this.formattedTime+c):this.$timeObj.text(n.datepicker.formatTime(h,this,r)+c));this.timeDefined=!0;s&&this._updateDateTime()},_onSelectHandler:function(){var n=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;n&&t&&n.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(t){var i;t=this.inst||t;var r=n.datepicker._daylightSavingAdjust(new Date(t.selectedYear,t.selectedMonth,t.selectedDay)),o=n.datepicker._get(t,"dateFormat"),f=n.datepicker._getFormatConfig(t),s=r!==null&&this.timeDefined;if(this.formattedDate=n.datepicker.formatDate(o,r===null?new Date:r,f),i=this.formattedDate,t.lastVal==""&&(t.currentYear=t.selectedYear,t.currentMonth=t.selectedMonth,t.currentDay=t.selectedDay),this._defaults.timeOnly===!0?i=this.formattedTime:this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||s)&&(i+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=i,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(i);var u="",h=this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,e=this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;u=this._defaults.altFormat?n.datepicker.formatDate(this._defaults.altFormat,r===null?new Date:r,f):this.formattedDate;u&&(u+=h);u+=this._defaults.altTimeFormat?n.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+e:this.formattedTime+e;this.$altInput.val(u)}else this.$input.val(i);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var t=n.datepicker._getInst(this.$input.get(0)),i=n.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!=t.lastVal)try{n.datepicker._updateDatepicker(t)}catch(r){n.timepicker.log(r)}}},_controls:{slider:{create:function(t,i,r,u,f,e,o){var s=t._defaults.isRTL;return i.prop("slide",null).slider({orientation:"horizontal",value:s?u*-1:u,min:s?e*-1:f,max:s?f*-1:e,step:o,slide:function(i,u){t.control.value(t,n(this),r,s?u.value*-1:u.value);t._onTimeChange()},stop:function(){t._onSelectHandler()}})},options:function(n,t,i,r,u){if(n._defaults.isRTL){if(typeof r=="string")return r=="min"||r=="max"?u!==undefined?t.slider(r,u*-1):Math.abs(t.slider(r)):t.slider(r);var f=r.min,e=r.max;return r.min=r.max=null,f!==undefined&&(r.max=f*-1),e!==undefined&&(r.min=e*-1),t.slider(r)}return typeof r=="string"&&u!==undefined?t.slider(r,u):t.slider(r)},value:function(n,t,i,r){return n._defaults.isRTL?r!==undefined?t.slider("value",r*-1):Math.abs(t.slider("value")):r!==undefined?t.slider("value",r):t.slider("value")}},select:{create:function(t,r,u,f,e,o,s){for(var c='<select class="ui-timepicker-select" data-unit="'+u+'" data-min="'+e+'" data-max="'+o+'" data-step="'+s+'">',l=t._defaults.timeFormat.indexOf("t")!==-1?"toLowerCase":"toUpperCase",h=e;h<=o;h+=s)c+='<option value="'+h+'"'+(h==f?" selected":"")+">",c+=u=="hour"&&i(t._defaults.pickerTimeFormat||t._defaults.timeFormat)?n.datepicker.formatTime("hh TT",{hour:h},t._defaults):u=="millisec"||h>=10?h:"0"+h.toString(),c+="<\/option>";return c+="<\/select>",r.children("select").remove(),n(c).appendTo(r).change(function(){t._onTimeChange();t._onSelectHandler()}),r},options:function(n,t,i,r,u){var e={},f=t.children("select");if(typeof r=="string"){if(u===undefined)return f.data(r);e[r]=u}else e=r;return n.control.create(n,t,f.data("unit"),f.val(),e.min||f.data("min"),e.max||f.data("max"),e.step||f.data("step"))},value:function(n,t,i,r){var u=t.children("select");return r!==undefined?u.val(r):u.val()}}}});n.fn.extend({timepicker:function(t){t=t||{};var i=Array.prototype.slice.call(arguments);return typeof t=="object"&&(i[0]=n.extend(t,{timeOnly:!0})),n(this).each(function(){n.fn.datetimepicker.apply(n(this),i)})},datetimepicker:function(t){t=t||{};var i=arguments;return typeof t=="string"?t=="getDate"?n.fn.datepicker.apply(n(this[0]),i):this.each(function(){var t=n(this);t.datepicker.apply(t,i)}):this.each(function(){var i=n(this);i.datepicker(n.timepicker._newInst(i,t)._defaults)})}});n.datepicker.parseDateTime=function(n,t,i,r,u){var o=e(n,t,i,r,u),f;return o.timeObj&&(f=o.timeObj,o.date.setHours(f.hour,f.minute,f.second,f.millisec)),o.date};n.datepicker.parseTime=function(t,i,u){var f=r(r({},n.timepicker._defaults),u||{}),e=function(t,i,r){var h=function(t,i){var r=[];return t&&n.merge(r,t),i&&n.merge(r,i),r=n.map(r,function(n){return n.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+r.join("|")+")?"},c=function(n){var i=n.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|t{1,2}|z|'.*?')/g),r={h:-1,m:-1,s:-1,l:-1,t:-1,z:-1},t;if(i)for(t=0;t<i.length;t++)r[i[t].toString().charAt(0)]==-1&&(r[i[t].toString().charAt(0)]=t+1);return r},l="^"+t.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[lz]|'.*?')/g,function(n){var t=n.length;switch(n.charAt(0).toLowerCase()){case"h":return t===1?"(\\d?\\d)":"(\\d{"+t+"})";case"m":return t===1?"(\\d?\\d)":"(\\d{"+t+"})";case"s":return t===1?"(\\d?\\d)":"(\\d{"+t+"})";case"l":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return h(r.amNames,r.pmNames);default:return"("+n.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(n){return"\\"+n})+")?"}}).replace(/\s/g,"\\s?")+r.timeSuffix+"$",u=c(t),s="",f,o,e;if(f=i.match(new RegExp(l,"i")),o={hour:0,minute:0,second:0,millisec:0},f){if(u.t!==-1&&(f[u.t]===undefined||f[u.t].length===0?(s="",o.ampm=""):(s=n.inArray(f[u.t].toUpperCase(),r.amNames)!==-1?"AM":"PM",o.ampm=r[s=="AM"?"amNames":"pmNames"][0])),u.h!==-1&&(o.hour=s=="AM"&&f[u.h]=="12"?0:s=="PM"&&f[u.h]!="12"?parseInt(f[u.h],10)+12:Number(f[u.h])),u.m!==-1&&(o.minute=Number(f[u.m])),u.s!==-1&&(o.second=Number(f[u.s])),u.l!==-1&&(o.millisec=Number(f[u.l])),u.z!==-1&&f[u.z]!==undefined){e=f[u.z].toUpperCase();switch(e.length){case 1:e=r.timezoneIso8601?"Z":"+0000";break;case 5:r.timezoneIso8601&&(e=e.substring(1)=="0000"?"Z":e.substring(0,3)+":"+e.substring(3));break;case 6:r.timezoneIso8601?e.substring(1)=="00:00"&&(e="Z"):e=e=="Z"||e.substring(1)=="00:00"?"+0000":e.replace(/:/,"")}o.timezone=e}return o}return!1},o=function(t,i,r){try{var u=new Date("2012-01-01 "+i);if(isNaN(u.getTime())&&(u=new Date("2012-01-01T"+i),isNaN(u.getTime())&&(u=new Date("01/01/2012 "+i),isNaN(u.getTime()))))throw"Unable to parse time with native Date: "+i;return{hour:u.getHours(),minute:u.getMinutes(),second:u.getSeconds(),millisec:u.getMilliseconds(),timezone:n.timepicker.timeZoneOffsetString(u)}}catch(f){try{return e(t,i,r)}catch(o){n.timepicker.log("Unable to parse \ntimeString: "+i+"\ntimeFormat: "+t)}}return!1};return typeof f.parse=="function"?f.parse(t,i,f):f.parse==="loose"?o(t,i,f):e(t,i,f)};n.datepicker.formatTime=function(t,i,r){r=r||{};r=n.extend({},n.timepicker._defaults,r);i=n.extend({hour:0,minute:0,second:0,millisec:0,timezone:"+0000"},i);var o=t,u=r.amNames[0],e=parseInt(i.hour,10);return e>11&&(u=r.pmNames[0]),o=o.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[lz]|('.*?'|".*?"))/g,function(n){switch(n){case"HH":return("0"+e).slice(-2);case"H":return e;case"hh":return("0"+f(e)).slice(-2);case"h":return f(e);case"mm":return("0"+i.minute).slice(-2);case"m":return i.minute;case"ss":return("0"+i.second).slice(-2);case"s":return i.second;case"l":return("00"+i.millisec).slice(-3);case"z":return i.timezone===null?r.defaultTimezone:i.timezone;case"T":return u.charAt(0).toUpperCase();case"TT":return u.toUpperCase();case"t":return u.charAt(0).toLowerCase();case"tt":return u.toLowerCase();default:return n.replace(/\'/g,"")||"'"}}),n.trim(o)};n.datepicker._base_selectDate=n.datepicker._selectDate;n.datepicker._selectDate=function(t,i){var r=this._getInst(n(t)[0]),u=this._get(r,"timepicker");u?(u._limitMinMaxDateTime(r,!0),r.inline=r.stay_open=!0,this._base_selectDate(t,i),r.inline=r.stay_open=!1,this._notifyChange(r),this._updateDatepicker(r)):this._base_selectDate(t,i)};n.datepicker._base_updateDatepicker=n.datepicker._updateDatepicker;n.datepicker._updateDatepicker=function(t){var r=t.input[0],i;n.datepicker._curInst&&n.datepicker._curInst!=t&&n.datepicker._datepickerShowing&&n.datepicker._lastInput!=r||(typeof t.stay_open!="boolean"||t.stay_open===!1)&&(this._base_updateDatepicker(t),i=this._get(t,"timepicker"),i&&i._addTimePicker(t))};n.datepicker._base_doKeyPress=n.datepicker._doKeyPress;n.datepicker._doKeyPress=function(t){var f=n.datepicker._getInst(t.target),r=n.datepicker._get(f,"timepicker");if(r&&n.datepicker._get(f,"constrainInput")){var u=i(r._defaults.timeFormat),e=n.datepicker._possibleChars(n.datepicker._get(f,"dateFormat")),s=r._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,u?"APM":"").replace(/Tt/g,u?"AaPpMm":"").replace(/tT/g,u?"AaPpMm":"").replace(/T/g,u?"AP":"").replace(/tt/g,u?"apm":"").replace(/t/g,u?"ap":"")+" "+r._defaults.separator+r._defaults.timeSuffix+(r._defaults.showTimezone?r._defaults.timezoneList.join(""):"")+r._defaults.amNames.join("")+r._defaults.pmNames.join("")+e,o=String.fromCharCode(t.charCode===undefined?t.keyCode:t.charCode);return t.ctrlKey||o<" "||!e||s.indexOf(o)>-1}return n.datepicker._base_doKeyPress(t)};n.datepicker._base_updateAlternate=n.datepicker._updateAlternate;n.datepicker._updateAlternate=function(t){var i=this._get(t,"timepicker"),u;if(i){if(u=i._defaults.altField,u){var c=i._defaults.altFormat||i._defaults.dateFormat,f=this._getDate(t),o=n.datepicker._getFormatConfig(t),r="",e=i._defaults.altSeparator?i._defaults.altSeparator:i._defaults.separator,s=i._defaults.altTimeSuffix?i._defaults.altTimeSuffix:i._defaults.timeSuffix,h=i._defaults.altTimeFormat!==null?i._defaults.altTimeFormat:i._defaults.timeFormat;r+=n.datepicker.formatTime(h,i,i._defaults)+s;i._defaults.timeOnly||i._defaults.altFieldTimeOnly||f===null||(r=i._defaults.altFormat?n.datepicker.formatDate(i._defaults.altFormat,f,o)+e+r:i.formattedDate+e+r);n(u).val(r)}}else n.datepicker._base_updateAlternate(t)};n.datepicker._base_doKeyUp=n.datepicker._doKeyUp;n.datepicker._doKeyUp=function(t){var i=n.datepicker._getInst(t.target),r=n.datepicker._get(i,"timepicker");if(r&&r._defaults.timeOnly&&i.input.val()!=i.lastVal)try{n.datepicker._updateDatepicker(i)}catch(u){n.timepicker.log(u)}return n.datepicker._base_doKeyUp(t)};n.datepicker._base_gotoToday=n.datepicker._gotoToday;n.datepicker._gotoToday=function(t){var i=this._getInst(n(t)[0]),e=i.dpDiv,r,f;this._base_gotoToday(t);r=this._get(i,"timepicker");u(r);f=new Date;this._setTime(i,f);n(".ui-datepicker-today",e).click()};n.datepicker._disableTimepickerDatepicker=function(t){var r=this._getInst(t),i;r&&(i=this._get(r,"timepicker"),n(t).datepicker("getDate"),i&&(i._defaults.showTimepicker=!1,i._updateDateTime(r)))};n.datepicker._enableTimepickerDatepicker=function(t){var r=this._getInst(t),i;r&&(i=this._get(r,"timepicker"),n(t).datepicker("getDate"),i&&(i._defaults.showTimepicker=!0,i._addTimePicker(r),i._updateDateTime(r)))};n.datepicker._setTime=function(n,t){var i=this._get(n,"timepicker"),r;i&&(r=i._defaults,i.hour=t?t.getHours():r.hour,i.minute=t?t.getMinutes():r.minute,i.second=t?t.getSeconds():r.second,i.millisec=t?t.getMilliseconds():r.millisec,i._limitMinMaxDateTime(n,!0),i._onTimeChange(),i._updateDateTime(n))};n.datepicker._setTimeDatepicker=function(n,t,i){var f=this._getInst(n),r,u;f&&(r=this._get(f,"timepicker"),r&&(this._setDateFromField(f),t&&(typeof t=="string"?(r._parseTime(t,i),u=new Date,u.setHours(r.hour,r.minute,r.second,r.millisec)):u=new Date(t.getTime()),u.toString()=="Invalid Date"&&(u=undefined),this._setTime(f,u))))};n.datepicker._base_setDateDatepicker=n.datepicker._setDateDatepicker;n.datepicker._setDateDatepicker=function(n,t){var i=this._getInst(n),r;i&&(r=t instanceof Date?new Date(t.getTime()):t,this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(n,r,!0))};n.datepicker._base_getDateDatepicker=n.datepicker._getDateDatepicker;n.datepicker._getDateDatepicker=function(t,i){var u=this._getInst(t),r,f;if(u)return(r=this._get(u,"timepicker"),r)?(u.lastVal===undefined&&this._setDateFromField(u,i),f=this._getDate(u),f&&r._parseTime(n(t).val(),r.timeOnly)&&f.setHours(r.hour,r.minute,r.second,r.millisec),f):this._base_getDateDatepicker(t,i)};n.datepicker._base_parseDate=n.datepicker.parseDate;n.datepicker.parseDate=function(t,i,r){var u;try{u=this._base_parseDate(t,i,r)}catch(f){u=this._base_parseDate(t,i.substring(0,i.length-(f.length-f.indexOf(":")-2)),r);n.timepicker.log("Error parsing the date string: "+f+"\ndate string = "+i+"\ndate format = "+t)}return u};n.datepicker._base_formatDate=n.datepicker._formatDate;n.datepicker._formatDate=function(n){var t=this._get(n,"timepicker");return t?(t._updateDateTime(n),t.$input.val()):this._base_formatDate(n)};n.datepicker._base_optionDatepicker=n.datepicker._optionDatepicker;n.datepicker._optionDatepicker=function(t,i,r){var v=this._getInst(t),h,s;if(!v)return null;if(s=this._get(v,"timepicker"),s){var f=null,e=null,a=null,c=s._defaults.evnts,l={},u;if(typeof i=="string"){if(i==="minDate"||i==="minDateTime")f=r;else if(i==="maxDate"||i==="maxDateTime")e=r;else if(i==="onSelect")a=r;else if(c.hasOwnProperty(i)){if(typeof r=="undefined")return c[i];l[i]=r;h={}}}else if(typeof i=="object"){i.minDate?f=i.minDate:i.minDateTime?f=i.minDateTime:i.maxDate?e=i.maxDate:i.maxDateTime&&(e=i.maxDateTime);for(u in c)c.hasOwnProperty(u)&&i[u]&&(l[u]=i[u])}for(u in l)l.hasOwnProperty(u)&&(c[u]=l[u],h||(h=n.extend({},i)),delete h[u]);if(h&&o(h))return;f?(f=f===0?new Date:new Date(f),s._defaults.minDate=f,s._defaults.minDateTime=f):e?(e=e===0?new Date:new Date(e),s._defaults.maxDate=e,s._defaults.maxDateTime=e):a&&(s._defaults.onSelect=a)}return r===undefined?this._base_optionDatepicker.call(n.datepicker,t,i):this._base_optionDatepicker.call(n.datepicker,t,h||i,r)};var o=function(n){for(var t in n)if(n.hasOwnProperty(n))return!1;return!0},r=function(t,i){n.extend(t,i);for(var r in i)(i[r]===null||i[r]===undefined)&&(t[r]=i[r]);return t},i=function(n){return n.indexOf("t")!==-1&&n.indexOf("h")!==-1},f=function(n){return n>12&&(n=n-12),n==0&&(n=12),String(n)},s=function(t,i,r,u){var o,v;try{var e=u&&u.separator?u.separator:n.timepicker._defaults.separator,l=u&&u.timeFormat?u.timeFormat:n.timepicker._defaults.timeFormat,a=l.split(e),h=a.length,s=i.split(e),c=s.length;if(c>1)return[s.splice(0,c-h).join(e),s.splice(0,h).join(e)]}catch(f){if(n.timepicker.log("Could not split the date from the time. Please check the following datetimepicker options\nthrown error: "+f+"\ndateTimeString"+i+"\ndateFormat = "+t+"\nseparator = "+u.separator+"\ntimeFormat = "+u.timeFormat),f.indexOf(":")>=0)return o=i.length-(f.length-f.indexOf(":")-2),v=i.substring(o),[n.trim(i.substring(0,o)),n.trim(i.substring(o))];throw f;}return[i,""]},e=function(t,i,r,u,f){var e,o=s(t,r,u,f),c,h;if(e=n.datepicker._base_parseDate(t,o[0],u),o[1]!==""){if(c=o[1],h=n.datepicker.parseTime(i,c,f),h===null)throw"Wrong time format";return{date:e,timeObj:h}}return{date:e}},u=function(t,i){if(t&&t.timezone_select){t._defaults.useLocalTimezone=!0;var u=typeof i!="undefined"?i:new Date,r=n.timepicker.timeZoneOffsetString(u);t._defaults.timezoneIso8601&&(r=r.substring(0,3)+":"+r.substring(3));t.timezone_select.val(r)}};n.timepicker=new t;n.timepicker.timeZoneOffsetString=function(n){var t=n.getTimezoneOffset()*-1,i=t%60,r=(t-i)/60;return(t>=0?"+":"-")+("0"+(r*101).toString()).slice(-2)+("0"+(i*101).toString()).slice(-2)};n.timepicker.timeRange=function(t,i,r){return n.timepicker.handleRange("timepicker",t,i,r)};n.timepicker.dateTimeRange=function(t,i,r){n.timepicker.dateRange(t,i,r,"datetimepicker")};n.timepicker.dateRange=function(t,i,r,u){u=u||"datepicker";n.timepicker.handleRange(u,t,i,r)};n.timepicker.handleRange=function(t,i,r,u){function e(n,t,u){t.val()&&new Date(i.val())>new Date(r.val())&&t.val(u)}function f(i,r,u){if(n(i).val()){var f=n(i)[t].call(n(i),"getDate");f.getTime&&n(r)[t].call(n(r),"option",u,f)}}return n.fn[t].call(i,n.extend({onClose:function(n){e(this,r,n)},onSelect:function(){f(this,r,"minDate")}},u,u.start)),n.fn[t].call(r,n.extend({onClose:function(n){e(this,i,n)},onSelect:function(){f(this,i,"maxDate")}},u,u.end)),t!="timepicker"&&u.reformat&&n([i,r]).each(function(){var r=n(this)[t].call(n(this),"option","dateFormat"),i=new Date(n(this).val());n(this).val()&&i&&n(this).val(n.datepicker.formatDate(r,i))}),e(i,r,i.val()),f(i,r,"minDate"),f(r,i,"maxDate"),n([i.get(0),r.get(0)])};n.timepicker.log=function(n){window.console&&console.log(n)};n.timepicker.version="1.2"}}(jQuery),function(n){n.extend(n.fn,{validate:function(t){if(!this.length){t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.");return}var i=n.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new n.validator(t,this[0]),n.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){i.settings.submitHandler&&(i.submitButton=t.target);n(t.target).hasClass("cancel")&&(i.cancelSubmit=!0)}),this.submit(function(t){function r(){var r;return i.settings.submitHandler?(i.submitButton&&(r=n("<input type='hidden'/>").attr("name",i.submitButton.name).val(i.submitButton.value).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,t),i.submitButton&&r.remove(),!1):!0}return(i.settings.debug&&t.preventDefault(),i.cancelSubmit)?(i.cancelSubmit=!1,r()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):r():(i.focusInvalid(),!1)})),i)},valid:function(){if(n(this[0]).is("form"))return this.validate().form();var t=!0,i=n(this[0].form).validate();return this.each(function(){t&=i.element(this)}),t},removeAttrs:function(t){var i={},r=this;return n.each(t.split(/\s/),function(n,t){i[t]=r.attr(t);r.removeAttr(t)}),i},rules:function(t,i){var r=this[0],o,u,h;if(t){var e=n.data(r.form,"validator").settings,s=e.rules,f=n.validator.staticRules(r);switch(t){case"add":n.extend(f,n.validator.normalizeRule(i));s[r.name]=f;i.messages&&(e.messages[r.name]=n.extend(e.messages[r.name],i.messages));break;case"remove":return i?(o={},n.each(i.split(/\s/),function(n,t){o[t]=f[t];delete f[t]}),o):(delete s[r.name],f)}}return u=n.validator.normalizeRules(n.extend({},n.validator.classRules(r),n.validator.attributeRules(r),n.validator.dataRules(r),n.validator.staticRules(r)),r),u.required&&(h=u.required,delete u.required,u=n.extend({required:h},u)),u}});n.extend(n.expr[":"],{blank:function(t){return!n.trim(""+t.value)},filled:function(t){return!!n.trim(""+t.value)},unchecked:function(n){return!n.checked}});n.validator=function(t,i){this.settings=n.extend(!0,{},n.validator.defaults,t);this.currentForm=i;this.init()};n.validator.format=function(t,i){return arguments.length===1?function(){var i=n.makeArray(arguments);return i.unshift(t),n.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=n.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),n.each(i,function(n,i){t=t.replace(new RegExp("\\{"+n+"\\}","g"),function(){return i})}),t)};n.extend(n.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:n([]),errorLabelContainer:n([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(n){this.lastActive=n;this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,n,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(n)).hide())},onfocusout:function(n){!this.checkable(n)&&(n.name in this.submitted||!this.optional(n))&&this.element(n)},onkeyup:function(n,t){(t.which!==9||this.elementValue(n)!=="")&&(n.name in this.submitted||n===this.lastElement)&&this.element(n)},onclick:function(n){n.name in this.submitted?this.element(n):n.parentNode.name in this.submitted&&this.element(n.parentNode)},highlight:function(t,i,r){t.type==="radio"?this.findByName(t.name).addClass(i).removeClass(r):n(t).addClass(i).removeClass(r)},unhighlight:function(t,i,r){t.type==="radio"?this.findByName(t.name).removeClass(i).addClass(r):n(t).removeClass(i).addClass(r)}},setDefaults:function(t){n.extend(n.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:n.validator.format("Please enter no more than {0} characters."),minlength:n.validator.format("Please enter at least {0} characters."),rangelength:n.validator.format("Please enter a value between {0} and {1} characters long."),range:n.validator.format("Please enter a value between {0} and {1}."),max:n.validator.format("Please enter a value less than or equal to {0}."),min:n.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function r(t){var i=n.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,"");i.settings[r]&&i.settings[r].call(i,this[0],t)}var i,t;this.labelContainer=n(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||n(this.currentForm);this.containers=n(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();i=this.groups={};n.each(this.settings.groups,function(t,r){typeof r=="string"&&(r=r.split(/\s/));n.each(r,function(n,r){i[r]=t})});t=this.settings.rules;n.each(t,function(i,r){t[i]=n.validator.normalizeRule(r)});n(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",r).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",r);this.settings.invalidHandler&&n(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),n.extend(this.submitted,this.errorMap),this.invalid=n.extend({},this.errorMap),this.valid()||n(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var n=0,t=this.currentElements=this.elements();t[n];n++)this.check(t[n]);return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t));this.lastElement=t;this.prepareElement(t);this.currentElements=n(t);var i=this.check(t)!==!1;return i?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(t){if(t){n.extend(this.errorMap,t);this.errorList=[];for(var i in t)this.errorList.push({message:t[i],element:this.findByName(i)[0]});this.successList=n.grep(this.successList,function(n){return!(n.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){n.fn.resetForm&&n(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(n){var t=0;for(var i in n)t++;return t},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{n(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&n.grep(this.errorList,function(n){return n.element.name===t.name}).length===1&&t},elements:function(){var t=this,i={};return n(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return(!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!t.objectLength(n(this).rules()))?!1:(i[this.name]=!0,!0)})},clean:function(t){return n(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return n(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=n([]);this.toHide=n([]);this.currentElements=n([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(n){this.reset();this.toHide=this.errorsFor(n)},elementValue:function(t){var r=n(t).attr("type"),i=n(t).val();return r==="radio"||r==="checkbox"?n("input[name='"+n(t).attr("name")+"']:checked").val():typeof i=="string"?i.replace(/\r/g,""):i},check:function(t){var r,u;t=this.validationTargetFor(this.clean(t));var f=n(t).rules(),e=!1,s=this.elementValue(t),i;for(r in f){u={method:r,parameters:f[r]};try{if(i=n.validator.methods[r].call(this,s,t,u.parameters),i==="dependency-mismatch"){e=!0;continue}if(e=!1,i==="pending"){this.toHide=this.toHide.not(this.errorsFor(t));return}if(!i)return this.formatAndAdd(t,u),!1}catch(o){this.settings.debug&&window.console&&console.log("Exception occured when checking element "+t.id+", check the '"+u.method+"' method.",o);throw o;}}if(!e)return this.objectLength(f)&&this.successList.push(t),!0},customDataMessage:function(t,i){return n(t).data("msg-"+i.toLowerCase())||t.attributes&&n(t).attr("data-msg-"+i.toLowerCase())},customMessage:function(n,t){var i=this.settings.messages[n];return i&&(i.constructor===String?i:i[t])},findDefined:function(){for(var n=0;n<arguments.length;n++)if(arguments[n]!==undefined)return arguments[n];return undefined},defaultMessage:function(t,i){return this.findDefined(this.customMessage(t.name,i),this.customDataMessage(t,i),!this.settings.ignoreTitle&&t.title||undefined,n.validator.messages[i],"<strong>Warning: No message defined for "+t.name+"<\/strong>")},formatAndAdd:function(t,i){var r=this.defaultMessage(t,i.method),u=/\$?\{(\d+)\}/g;typeof r=="function"?r=r.call(this,i.parameters,t):u.test(r)&&(r=n.validator.format(r.replace(u,"{$1}"),i.parameters));this.errorList.push({message:r,element:t});this.errorMap[t.name]=r;this.submitted[t.name]=r},addWrapper:function(n){return this.settings.wrapper&&(n=n.add(n.parent(this.settings.wrapper))),n},defaultShowErrors:function(){for(var i,t,n=0;this.errorList[n];n++)t=this.errorList[n],this.settings.highlight&&this.settings.highlight.call(this,t.element,this.settings.errorClass,this.settings.validClass),this.showLabel(t.element,t.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(n=0;this.successList[n];n++)this.showLabel(this.successList[n]);if(this.settings.unhighlight)for(n=0,i=this.validElements();i[n];n++)this.settings.unhighlight.call(this,i[n],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return n(this.errorList).map(function(){return this.element})},showLabel:function(t,i){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(i)):(r=n("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,n(t)):r.insertAfter(t)));!i&&this.settings.success&&(r.text(""),typeof this.settings.success=="string"?r.addClass(this.settings.success):this.settings.success(r,t));this.toShow=this.toShow.add(r)},errorsFor:function(t){var i=this.idOrName(t);return this.errors().filter(function(){return n(this).attr("for")===i})},idOrName:function(n){return this.groups[n.name]||(this.checkable(n)?n.name:n.id||n.name)},validationTargetFor:function(n){return this.checkable(n)&&(n=this.findByName(n.name).not(this.settings.ignore)[0]),n},checkable:function(n){return/radio|checkbox/i.test(n.type)},findByName:function(t){return n(this.currentForm).find("[name='"+t+"']")},getLength:function(t,i){switch(i.nodeName.toLowerCase()){case"select":return n("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return t.length},depend:function(n,t){return this.dependTypes[typeof n]?this.dependTypes[typeof n](n,t):!0},dependTypes:{boolean:function(n){return n},string:function(t,i){return!!n(t,i.form).length},"function":function(n,t){return n(t)}},optional:function(t){var i=this.elementValue(t);return!n.validator.methods.required.call(this,i,t)&&"dependency-mismatch"},startRequest:function(n){this.pending[n.name]||(this.pendingRequest++,this.pending[n.name]=!0)},stopRequest:function(t,i){this.pendingRequest--;this.pendingRequest<0&&(this.pendingRequest=0);delete this.pending[t.name];i&&this.pendingRequest===0&&this.formSubmitted&&this.form()?(n(this.currentForm).submit(),this.formSubmitted=!1):!i&&this.pendingRequest===0&&this.formSubmitted&&(n(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return n.data(t,"previousValue")||n.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,i){t.constructor===String?this.classRuleSettings[t]=i:n.extend(this.classRuleSettings,t)},classRules:function(t){var i={},r=n(t).attr("class");return r&&n.each(r.split(" "),function(){this in n.validator.classRuleSettings&&n.extend(i,n.validator.classRuleSettings[this])}),i},attributeRules:function(t){var u={},f=n(t),r,i;for(r in n.validator.methods)r==="required"?(i=f.get(0).getAttribute(r),i===""&&(i=!0),i=!!i):i=f.attr(r),i?u[r]=i:f[0].getAttribute("type")===r&&(u[r]=!0);return u.maxlength&&/-1|2147483647|524288/.test(u.maxlength)&&delete u.maxlength,u},dataRules:function(t){var i,r,u={},f=n(t);for(i in n.validator.methods)r=f.data("rule-"+i.toLowerCase()),r!==undefined&&(u[i]=r);return u},staticRules:function(t){var i={},r=n.data(t.form,"validator");return r.settings.rules&&(i=n.validator.normalizeRule(r.settings.rules[t.name])||{}),i},normalizeRules:function(t,i){return n.each(t,function(r,u){if(u===!1){delete t[r];return}if(u.param||u.depends){var f=!0;switch(typeof u.depends){case"string":f=!!n(u.depends,i.form).length;break;case"function":f=u.depends.call(i,i)}f?t[r]=u.param!==undefined?u.param:!0:delete t[r]}}),n.each(t,function(r,u){t[r]=n.isFunction(u)?u(i):u}),n.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),n.each(["rangelength"],function(){var i;t[this]&&(n.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:typeof t[this]=="string"&&(i=t[this].split(/[\s,]+/),t[this]=[Number(i[0]),Number(i[1])]))}),n.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if(typeof t=="string"){var i={};n.each(t.split(/\s/),function(){i[this]=!0});t=i}return t},addMethod:function(t,i,r){n.validator.methods[t]=i;n.validator.messages[t]=r!==undefined?r:n.validator.messages[t];i.length<3&&n.validator.addClassRules(t,n.validator.normalizeRule(t))},methods:{required:function(t,i,r){if(!this.depend(r,i))return"dependency-mismatch";if(i.nodeName.toLowerCase()==="select"){var u=n(i).val();return u&&u.length>0}return this.checkable(i)?this.getLength(t,i)>0:n.trim(t).length>0},remote:function(t,i,r){var f,u,e;return this.optional(i)?"dependency-mismatch":(f=this.previousValue(i),this.settings.messages[i.name]||(this.settings.messages[i.name]={}),f.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=f.message,r=typeof r=="string"&&{url:r}||r,f.old===t)?f.valid:(f.old=t,u=this,this.startRequest(i),e={},e[i.name]=t,n.ajax(n.extend(!0,{url:r,mode:"abort",port:"validate"+i.name,dataType:"json",data:e,success:function(r){var e,h,s,o;u.settings.messages[i.name].remote=f.originalMessage;e=r===!0||r==="true";e?(h=u.formSubmitted,u.prepareElement(i),u.formSubmitted=h,u.successList.push(i),delete u.invalid[i.name],u.showErrors()):(s={},o=r||u.defaultMessage(i,"remote"),s[i.name]=f.message=n.isFunction(o)?o(t):o,u.invalid[i.name]=!0,u.showErrors(s));f.valid=e;u.stopRequest(i,e)}},r)),"pending")},minlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r},maxlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u<=r},rangelength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r[0]&&u<=r[1]},min:function(n,t,i){return this.optional(t)||n>=i},max:function(n,t,i){return this.optional(t)||n<=i},range:function(n,t,i){return this.optional(t)||n>=i[0]&&n<=i[1]},email:function(n,t){return this.optional(t)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(n)},url:function(n,t){return this.optional(t)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(n)},date:function(n,t){return this.optional(t)||!/Invalid|NaN/.test(new Date(n).toString())},dateISO:function(n,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(n)},number:function(n,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(n)},digits:function(n,t){return this.optional(t)||/^\d+$/.test(n)},creditcard:function(n,t){var r,e;if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \-]+/.test(n))return!1;var f=0,i=0,u=!1;for(n=n.replace(/\D/g,""),r=n.length-1;r>=0;r--)e=n.charAt(r),i=parseInt(e,10),u&&(i*=2)>9&&(i-=9),f+=i,u=!u;return f%10==0},equalTo:function(t,i,r){var u=n(r);return this.settings.onfocusout&&u.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){n(i).valid()}),t===u.val()}}});n.format=n.validator.format}(jQuery),function(n){var t={},i;n.ajaxPrefilter?n.ajaxPrefilter(function(n,i,r){var u=n.port;n.mode==="abort"&&(t[u]&&t[u].abort(),t[u]=r)}):(i=n.ajax,n.ajax=function(r){var f=("mode"in r?r:n.ajaxSettings).mode,u=("port"in r?r:n.ajaxSettings).port;return f==="abort"?(t[u]&&t[u].abort(),t[u]=i.apply(this,arguments)):i.apply(this,arguments)})}(jQuery),function(n){n.extend(n.fn,{validateDelegate:function(t,i,r){return this.bind(i,function(i){var u=n(i.target);if(u.is(t))return r.apply(u,arguments)})}})}(jQuery),function(n){function i(n,t,i){n.rules[t]=i;n.message&&(n.messages[t]=n.message)}function h(n){return n.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(n){return n.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function e(n){return n.substr(0,n.lastIndexOf(".")+1)}function o(n,t){return n.indexOf("*.")===0&&(n=n.replace("*.",t)),n}function c(t,i){var r=n(this).find("[data-valmsg-for='"+f(i[0].name)+"']"),u=r.attr("data-valmsg-replace"),e=u?n.parseJSON(u)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error");t.data("unobtrusiveContainer",r);e?(r.empty(),t.removeClass("input-validation-error").appendTo(r)):t.hide()}function l(t,i){var u=n(this).find("[data-valmsg-summary=true]"),r=u.find("ul");r&&r.length&&i.errorList.length&&(r.empty(),u.addClass("validation-summary-errors").removeClass("validation-summary-valid"),n.each(i.errorList,function(){n("<li />").html(this.message).appendTo(r)}))}function a(t){var i=t.data("unobtrusiveContainer"),r=i.attr("data-valmsg-replace"),u=r?n.parseJSON(r):null;i&&(i.addClass("field-validation-valid").removeClass("field-validation-error"),t.removeData("unobtrusiveContainer"),u&&i.empty())}function v(){var t=n(this);t.data("validator").resetForm();t.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");t.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function s(t){var i=n(t),r=i.data(u),f=n.proxy(v,t);return r||(r={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:n.proxy(c,t),invalidHandler:n.proxy(l,t),messages:{},rules:{},success:n.proxy(a,t)},attachValidation:function(){i.unbind("reset."+u,f).bind("reset."+u,f).validate(this.options)},validate:function(){return i.validate(),i.valid()}},i.data(u,r)),r}var r=n.validator,t,u="unobtrusiveValidation";r.unobtrusive={adapters:[],parseElement:function(t,i){var u=n(t),f=u.parents("form")[0],r,e,o;f&&(r=s(f),r.options.rules[t.name]=e={},r.options.messages[t.name]=o={},n.each(this.adapters,function(){var i="data-val-"+this.name,r=u.attr(i),s={};r!==undefined&&(i+="-",n.each(this.params,function(){s[this]=u.attr(i+this)}),this.adapt({element:t,form:f,message:r,params:s,rules:e,messages:o}))}),n.extend(e,{__dummy__:!0}),i||r.attachValidation())},parse:function(t){var i=n(t).parents("form").andSelf().add(n(t).find("form")).filter("form");n(t).find(":input[data-val=true]").each(function(){r.unobtrusive.parseElement(this,!0)});i.each(function(){var n=s(this);n&&n.attachValidation()})}};t=r.unobtrusive.adapters;t.add=function(n,t,i){return i||(i=t,t=[]),this.push({name:n,params:t,adapt:i}),this};t.addBool=function(n,t){return this.add(n,function(r){i(r,t||n,!0)})};t.addMinMax=function(n,t,r,u,f,e){return this.add(n,[f||"min",e||"max"],function(n){var f=n.params.min,e=n.params.max;f&&e?i(n,u,[f,e]):f?i(n,t,f):e&&i(n,r,e)})};t.addSingleVal=function(n,t,r){return this.add(n,[t||"val"],function(u){i(u,r||n,u.params[t])})};r.addMethod("__dummy__",function(){return!0});r.addMethod("regex",function(n,t,i){var r;return this.optional(t)?!0:(r=new RegExp(i).exec(n),r&&r.index===0&&r[0].length===n.length)});r.addMethod("nonalphamin",function(n,t,i){var r;return i&&(r=n.match(/\W/g),r=r&&r.length>=i),r});t.addSingleVal("accept","exts").addSingleVal("regex","pattern");t.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");t.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");t.add("equalto",["other"],function(t){var r=e(t.element.name),u=t.params.other,s=o(u,r),h=n(t.form).find(":input[name='"+f(s)+"']")[0];i(t,"equalTo",h)});t.add("required",function(n){(n.element.tagName.toUpperCase()!=="INPUT"||n.element.type.toUpperCase()!=="CHECKBOX")&&i(n,"required",!0)});t.add("remote",["url","type","additionalfields"],function(t){var r={url:t.params.url,type:t.params.type||"GET",data:{}},u=e(t.element.name);n.each(h(t.params.additionalfields||t.element.name),function(i,e){var s=o(e,u);r.data[s]=function(){return n(t.form).find(":input[name='"+f(s)+"']").val()}});i(t,"remote",r)});t.add("password",["min","nonalphamin","regex"],function(n){n.params.min&&i(n,"minlength",n.params.min);n.params.nonalphamin&&i(n,"nonalphamin",n.params.nonalphamin);n.params.regex&&i(n,"regex",n.params.regex)});n(function(){r.unobtrusive.parse(document)})}(jQuery),function(n){function i(n,t,i){n.rules[t]=i;n.message&&(n.messages[t]=n.message)}function h(n){return n.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(n){return n.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function e(n){return n.substr(0,n.lastIndexOf(".")+1)}function o(n,t){return n.indexOf("*.")===0&&(n=n.replace("*.",t)),n}function c(t,i){var r=n(this).find("[data-valmsg-for='"+f(i[0].name)+"']"),u=n.parseJSON(r.attr("data-valmsg-replace")||"null")!==!1;r.removeClass("field-validation-valid").addClass("field-validation-error");r.closest(".control-group").addClass("error");t.data("unobtrusiveContainer",r);u?(r.empty(),t.removeClass("input-validation-error").appendTo(r)):t.hide()}function l(t,i){var u=n(this).find("[data-valmsg-summary=true]"),r=u.find("ul");r&&r.length&&i.errorList.length&&(r.empty(),u.addClass("validation-summary-errors").removeClass("validation-summary-valid"),n.each(i.errorList,function(){n("<li />").html(this.message).appendTo(r)}))}function a(t){var i=t.data("unobtrusiveContainer"),r=n.parseJSON(i.attr("data-valmsg-replace")||"null");i&&(i.addClass("field-validation-valid").removeClass("field-validation-error"),i.closest(".control-group").removeClass("error"),t.removeData("unobtrusiveContainer"),r&&i.empty())}function v(){var t=n(this);t.data("validator").resetForm();t.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");t.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer");t.find(".control-group").removeClass("error")}function s(t){var i=n(t),r=i.data(u),f=n.proxy(v,t);return r||(r={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:n.proxy(c,t),invalidHandler:n.proxy(l,t),messages:{},rules:{},success:n.proxy(a,t)},attachValidation:function(){i.unbind("reset."+u,f).bind("reset."+u,f).validate(this.options)},validate:function(){return i.validate(),i.valid()}},i.data(u,r)),r}var r=n.validator,t,u="unobtrusiveValidation";r.unobtrusive={adapters:[],parseElement:function(t,i){var u=n(t),f=u.parents("form")[0],r,e,o;f&&(r=s(f),r.options.rules[t.name]=e={},r.options.messages[t.name]=o={},n.each(this.adapters,function(){var i="data-val-"+this.name,r=u.attr(i),s={};r!==undefined&&(i+="-",n.each(this.params,function(){s[this]=u.attr(i+this)}),this.adapt({element:t,form:f,message:r,params:s,rules:e,messages:o}))}),n.extend(e,{__dummy__:!0}),i||r.attachValidation())},parse:function(t){var i=n(t).parents("form").andSelf().add(n(t).find("form")).filter("form");n(t).find(":input[data-val=true]").each(function(){r.unobtrusive.parseElement(this,!0)});i.each(function(){var n=s(this);n&&n.attachValidation()})}};t=r.unobtrusive.adapters;t.add=function(n,t,i){return i||(i=t,t=[]),this.push({name:n,params:t,adapt:i}),this};t.addBool=function(n,t){return this.add(n,function(r){i(r,t||n,!0)})};t.addMinMax=function(n,t,r,u,f,e){return this.add(n,[f||"min",e||"max"],function(n){var f=n.params.min,e=n.params.max;f&&e?i(n,u,[f,e]):f?i(n,t,f):e&&i(n,r,e)})};t.addSingleVal=function(n,t,r){return this.add(n,[t||"val"],function(u){i(u,r||n,u.params[t])})};r.addMethod("__dummy__",function(){return!0});r.addMethod("regex",function(n,t,i){var r;return this.optional(t)?!0:(r=new RegExp(i).exec(n),r&&r.index===0&&r[0].length===n.length)});t.addSingleVal("accept","exts").addSingleVal("regex","pattern");t.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");t.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");t.add("equalto",["other"],function(t){var r=e(t.element.name),u=t.params.other,s=o(u,r),h=n(t.form).find(":input[name='"+f(s)+"']")[0];i(t,"equalTo",h)});t.add("required",function(n){(n.element.tagName.toUpperCase()!=="INPUT"||n.element.type.toUpperCase()!=="CHECKBOX")&&i(n,"required",!0)});t.add("remote",["url","type","additionalfields"],function(t){var r={url:t.params.url,type:t.params.type||"GET",data:{}},u=e(t.element.name);n.each(h(t.params.additionalfields||t.element.name),function(i,e){var s=o(e,u);r.data[s]=function(){return n(t.form).find(":input[name='"+f(s)+"']").val()}});i(t,"remote",r)});n(function(){r.unobtrusive.parse(document)})}(jQuery);!function(n){"use strict";n(function(){n.support.transition=function(){var n=function(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(i.style[t]!==undefined)return n[t]}();return n&&{end:n}}()})}(window.jQuery);!function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.prototype.close=function(t){function f(){i.trigger("closed").remove()}var u=n(this),r=u.attr("data-target"),i;(r||(r=u.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=n(r),t&&t.preventDefault(),i.length||(i=u.hasClass("alert")?u:u.parent()),i.trigger(t=n.Event("close")),t.isDefaultPrevented())||(i.removeClass("in"),n.support.transition&&i.hasClass("fade")?i.on(n.support.transition.end,f):f())};r=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("alert");u||r.data("alert",u=new t(this));typeof i=="string"&&u[i].call(r)})};n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.alert.data-api",i,t.prototype.close)}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.button.defaults,i)},i;t.prototype.setState=function(n){var i="disabled",t=this.$element,r=t.data(),u=t.is("input")?"val":"html";n=n+"Text";r.resetText||t.data("resetText",t[u]());t[u](r[n]||this.options[n]);setTimeout(function(){n=="loadingText"?t.addClass(i).attr(i,i):t.removeClass(i).removeAttr(i)},0)};t.prototype.toggle=function(){var n=this.$element.closest('[data-toggle="buttons-radio"]');n&&n.find(".active").removeClass("active");this.$element.toggleClass("active")};i=n.fn.button;n.fn.button=function(i){return this.each(function(){var u=n(this),r=u.data("button"),f=typeof i=="object"&&i;r||u.data("button",r=new t(this,f));i=="toggle"?r.toggle():i&&r.setState(i)})};n.fn.button.defaults={loadingText:"loading..."};n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=i,this};n(document).on("click.button.data-api","[data-toggle^=button]",function(t){var i=n(t.target);i.hasClass("btn")||(i=i.closest(".btn"));i.button("toggle")})}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.options.pause=="hover"&&this.$element.on("mouseenter",n.proxy(this.pause,this)).on("mouseleave",n.proxy(this.cycle,this))},i;t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var i=this.getActiveIndex(),r=this;if(!(t>this.$items.length-1)&&!(t<0))return this.sliding?this.$element.one("slid",function(){r.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",n(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition.end&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(!this.sliding)return this.slide("next")},prev:function(){if(!this.sliding)return this.slide("prev")},slide:function(t,i){var e=this.$element.find(".item.active"),r=i||e[t](),s=this.interval,u=t=="next"?"left":"right",h=t=="next"?"first":"last",o=this,f;if(this.sliding=!0,s&&this.pause(),r=r.length?r:this.$element.find(".item")[h](),f=n.Event("slide",{relatedTarget:r[0],direction:u}),!r.hasClass("active")){if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");this.$element.one("slid",function(){var t=n(o.$indicators.children()[o.getActiveIndex()]);t&&t.addClass("active")})}if(n.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(f),f.isDefaultPrevented())return;r.addClass(t);r[0].offsetWidth;e.addClass(u);r.addClass(u);this.$element.one(n.support.transition.end,function(){r.removeClass([t,u].join(" ")).addClass("active");e.removeClass(["active",u].join(" "));o.sliding=!1;setTimeout(function(){o.$element.trigger("slid")},0)})}else{if(this.$element.trigger(f),f.isDefaultPrevented())return;e.removeClass("active");r.addClass("active");this.sliding=!1;this.$element.trigger("slid")}return s&&this.cycle(),this}}};i=n.fn.carousel;n.fn.carousel=function(i){return this.each(function(){var f=n(this),r=f.data("carousel"),u=n.extend({},n.fn.carousel.defaults,typeof i=="object"&&i),e=typeof i=="string"?i:u.slide;r||f.data("carousel",r=new t(this,u));typeof i=="number"?r.to(i):e?r[e]():u.interval&&r.pause().cycle()})};n.fn.carousel.defaults={interval:5e3,pause:"hover"};n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=i,this};n(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var i=n(this),u,r=n(i.attr("data-target")||(u=i.attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,"")),e=n.extend({},r.data(),i.data()),f;r.carousel(e);(f=i.attr("data-slide-to"))&&r.data("carousel").pause().to(f).cycle();t.preventDefault()})}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.collapse.defaults,i);this.options.parent&&(this.$parent=n(this.options.parent));this.options.toggle&&this.toggle()},i;t.prototype={constructor:t,dimension:function(){var n=this.$element.hasClass("width");return n?"width":"height"},show:function(){var i,u,t,r;if(!this.transitioning&&!this.$element.hasClass("in")){if(i=this.dimension(),u=n.camelCase(["scroll",i].join("-")),t=this.$parent&&this.$parent.find("> .accordion-group > .in"),t&&t.length){if(r=t.data("collapse"),r&&r.transitioning)return;t.collapse("hide");r||t.data("collapse",null)}this.$element[i](0);this.transition("addClass",n.Event("show"),"shown");n.support.transition&&this.$element[i](this.$element[0][u])}},hide:function(){var t;!this.transitioning&&this.$element.hasClass("in")&&(t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",n.Event("hide"),"hidden"),this.$element[t](0))},reset:function(n){var t=this.dimension();return this.$element.removeClass("collapse")[t](n||"auto")[0].offsetWidth,this.$element[n!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,i,r){var u=this,f=function(){i.type=="show"&&u.reset();u.transitioning=0;u.$element.trigger(r)};(this.$element.trigger(i),i.isDefaultPrevented())||(this.transitioning=1,this.$element[t]("in"),n.support.transition&&this.$element.hasClass("collapse")?this.$element.one(n.support.transition.end,f):f())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};i=n.fn.collapse;n.fn.collapse=function(i){return this.each(function(){var r=n(this),u=r.data("collapse"),f=n.extend({},n.fn.collapse.defaults,r.data(),typeof i=="object"&&i);u||r.data("collapse",u=new t(this,f));typeof i=="string"&&u[i]()})};n.fn.collapse.defaults={toggle:!0};n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=i,this};n(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var i=n(this),u,r=i.attr("data-target")||t.preventDefault()||(u=i.attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,""),f=n(r).data("collapse")?"toggle":i.data();i[n(r).hasClass("in")?"addClass":"removeClass"]("collapsed");n(r).collapse(f)})}(window.jQuery);!function(n){"use strict";function u(){n(i).each(function(){r(n(this)).removeClass("open")})}function r(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length||(r=t.parent()),r}var i="[data-toggle=dropdown]",t=function(t){var i=n(t).on("click.dropdown.data-api",this.toggle);n("html").on("click.dropdown.data-api",function(){i.parent().removeClass("open")})},f;t.prototype={constructor:t,toggle:function(){var t=n(this),i,f;if(!t.is(".disabled, :disabled"))return i=r(t),f=i.hasClass("open"),u(),f||i.toggleClass("open"),t.focus(),!1},keydown:function(t){var e,f,o,s,u;if(/(38|40|27)/.test(t.keyCode)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s||s&&t.keyCode==27)return t.which==27&&o.find(i).focus(),e.click();(f=n("[role=menu] li:not(.divider):visible a",o),f.length)&&(u=f.index(f.filter(":focus")),t.keyCode==38&&u>0&&u--,t.keyCode==40&&u<f.length-1&&u++,~u||(u=0),f.eq(u).focus())}}};f=n.fn.dropdown;n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("dropdown");u||r.data("dropdown",u=new t(this));typeof i=="string"&&u[i].call(r)})};n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.dropdown.data-api",u).on("click.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.dropdown-menu",function(n){n.stopPropagation()}).on("click.dropdown.data-api",i,t.prototype.toggle).on("keydown.dropdown.data-api",i+", [role=menu]",t.prototype.keydown)}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.options=i;this.$element=n(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",n.proxy(this.hide,this));this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)},i;t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,i=n.Event("show");(this.$element.trigger(i),this.isShown||i.isDefaultPrevented())||(this.isShown=!0,this.escape(),this.backdrop(function(){var i=n.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body);t.$element.show();i&&t.$element[0].offsetWidth;t.$element.addClass("in").attr("aria-hidden",!1);t.enforceFocus();i?t.$element.one(n.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")}))},hide:function(t){t&&t.preventDefault();var i=this;(t=n.Event("hide"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented())&&(this.isShown=!1,this.escape(),n(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),n.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var t=this;n(document).on("focusin.modal",function(n){t.$element[0]===n.target||t.$element.has(n.target).length||t.$element.focus()})},escape:function(){var n=this;if(this.isShown&&this.options.keyboard)this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&n.hide()});else this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,i=setTimeout(function(){t.$element.off(n.support.transition.end);t.hideModal()},500);this.$element.one(n.support.transition.end,function(){clearTimeout(i);t.hideModal()})},hideModal:function(){var n=this;this.$element.hide();this.backdrop(function(){n.removeBackdrop();n.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null},backdrop:function(t){var u=this,r=this.$element.hasClass("fade")?"fade":"",i;if(this.isShown&&this.options.backdrop){if(i=n.support.transition&&r,this.$backdrop=n('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?n.proxy(this.$element[0].focus,this.$element[0]):n.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(n.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(n.support.transition.end,t):t()):t&&t()}};i=n.fn.modal;n.fn.modal=function(i){return this.each(function(){var u=n(this),r=u.data("modal"),f=n.extend({},n.fn.modal.defaults,u.data(),typeof i=="object"&&i);r||u.data("modal",r=new t(this,f));typeof i=="string"?r[i]():f.show&&r.show()})};n.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0};n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=i,this};n(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var i=n(this),r=i.attr("href"),u=n(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),f=u.data("modal")?"toggle":n.extend({remote:!/#/.test(r)&&r},u.data(),i.data());t.preventDefault();u.modal(f).one("hide",function(){i.focus()})})}(window.jQuery);!function(n){"use strict";var t=function(n,t){this.init("tooltip",n,t)},i;t.prototype={constructor:t,init:function(t,i,r){var o,s,f,u,e;for(this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.enabled=!0,f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],u=="click")this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else if(u!="manual"){o=u=="hover"?"mouseenter":"focus";s=u=="hover"?"mouseleave":"blur";this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this));this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this))}this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=n.extend({},n.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var u=n.fn[this.type].defaults,r={},i;if(this._options&&n.each(this._options,function(n,t){u[n]!=t&&(r[n]=t)},this),i=n(t.currentTarget)[this.type](r).data(this.type),!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout);i.hoverState="in";this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var i=n(t.currentTarget)[this.type](this._options).data(this.type);if(this.timeout&&clearTimeout(this.timeout),!i.options.delay||!i.options.delay.hide)return i.hide();i.hoverState="out";this.timeout=setTimeout(function(){i.hoverState=="out"&&i.hide()},i.options.delay.hide)},show:function(){var i,t,u,f,e,r,o=n.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(o),o.isDefaultPrevented())return;i=this.tip();this.setContent();this.options.animation&&i.addClass("fade");e=typeof this.options.placement=="function"?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement;i.detach().css({top:0,left:0,display:"block"});this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);t=this.getPosition();u=i[0].offsetWidth;f=i[0].offsetHeight;switch(e){case"bottom":r={top:t.top+t.height,left:t.left+t.width/2-u/2};break;case"top":r={top:t.top-f,left:t.left+t.width/2-u/2};break;case"left":r={top:t.top+t.height/2-f/2,left:t.left-u};break;case"right":r={top:t.top+t.height/2-f/2,left:t.left+t.width}}this.applyPlacement(r,e);this.$element.trigger("shown")}},applyPlacement:function(n,t){var i=this.tip(),s=i[0].offsetWidth,f=i[0].offsetHeight,u,r,e,o;i.offset(n).addClass(t).addClass("in");u=i[0].offsetWidth;r=i[0].offsetHeight;t=="top"&&r!=f&&(n.top=n.top+f-r,o=!0);t=="bottom"||t=="top"?(e=0,n.left<0&&(e=n.left*-2,n.left=0,i.offset(n),u=i[0].offsetWidth,r=i[0].offsetHeight),this.replaceArrow(e-s+u,u,"left")):this.replaceArrow(r-f,r,"top");o&&i.offset(n)},replaceArrow:function(n,t,i){this.arrow().css(i,n?50*(1-n/t)+"%":"")},setContent:function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")},hide:function(){function r(){var i=setTimeout(function(){t.off(n.support.transition.end).detach()},500);t.one(n.support.transition.end,function(){clearTimeout(i);t.detach()})}var u=this,t=this.tip(),i=n.Event("hide");if(this.$element.trigger(i),!i.isDefaultPrevented())return t.removeClass("in"),n.support.transition&&this.$tip.hasClass("fade")?r():t.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var n=this.$element;(n.attr("title")||typeof n.attr("data-original-title")!="string")&&n.attr("data-original-title",n.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return n.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title)},tip:function(){return this.$tip=this.$tip||n(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var i=t?n(t.currentTarget)[this.type](this._options).data(this.type):this;i.tip().hasClass("in")?i.hide():i.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};i=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("tooltip"),f=typeof i=="object"&&i;r||u.data("tooltip",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.tooltip.Constructor=t;n.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1};n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(window.jQuery);!function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var n=this.tip(),t=this.getTitle(),i=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](t);n.find(".popover-content")[this.options.html?"html":"text"](i);n.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var t=this.$element,n=this.options;return(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content")},tip:function(){return this.$tip||(this.$tip=n(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});i=n.fn.popover;n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("popover"),f=typeof i=="object"&&i;r||u.data("popover",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.popover.Constructor=t;n.fn.popover.defaults=n.extend({},n.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(window.jQuery);!function(n){"use strict";function t(t,i){var u=n.proxy(this.process,this),f=n(t).is("body")?n(window):n(t),r;this.options=n.extend({},n.fn.scrollspy.defaults,i);this.$scrollElement=f.on("scroll.scroll-spy.data-api",u);this.selector=(this.options.target||(r=n(t).attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.$body=n("body");this.refresh();this.process()}t.prototype={constructor:t,refresh:function(){var t=this,i;this.offsets=n([]);this.targets=n([]);i=this.$body.find(this.selector).map(function(){var u=n(this),i=u.data("target")||u.attr("href"),r=/^#\w/.test(i)&&n(i);return r&&r.length&&[[r.position().top+(!n.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),i]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})},process:function(){var i=this.$scrollElement.scrollTop()+this.options.offset,f=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,e=f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget,n;if(i>=e)return u!=(n=r.last()[0])&&this.activate(n);for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(!t[n+1]||i<=t[n+1])&&this.activate(r[n])},activate:function(t){var i,r;this.activeTarget=t;n(this.selector).parent(".active").removeClass("active");r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]';i=n(r).parent("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate")}};var i=n.fn.scrollspy;n.fn.scrollspy=function(i){return this.each(function(){var u=n(this),r=u.data("scrollspy"),f=typeof i=="object"&&i;r||u.data("scrollspy",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.scrollspy.Constructor=t;n.fn.scrollspy.defaults={offset:10};n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=i,this};n(window).on("load",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);t.scrollspy(t.data())})})}(window.jQuery);!function(n){"use strict";var t=function(t){this.element=n(t)},i;t.prototype={constructor:t,show:function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.attr("data-target"),r,u,f;(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),t.parent("li").hasClass("active"))||(r=e.find(".active:last a")[0],f=n.Event("show",{relatedTarget:r}),t.trigger(f),f.isDefaultPrevented())||(u=n(i),this.activate(t.parent("li"),e),this.activate(u,u.parent(),function(){t.trigger({type:"shown",relatedTarget:r})}))},activate:function(t,i,r){function e(){u.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");t.addClass("active");f?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade");t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active");r&&r()}var u=i.find("> .active"),f=r&&n.support.transition&&u.hasClass("fade");f?u.one(n.support.transition.end,e):e();u.removeClass("in")}};i=n.fn.tab;n.fn.tab=function(i){return this.each(function(){var u=n(this),r=u.data("tab");r||u.data("tab",r=new t(this));typeof i=="string"&&r[i]()})};n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=i,this};n(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault();n(this).tab("show")})}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.typeahead.defaults,i);this.matcher=this.options.matcher||this.matcher;this.sorter=this.options.sorter||this.sorter;this.highlighter=this.options.highlighter||this.highlighter;this.updater=this.options.updater||this.updater;this.source=this.options.source;this.$menu=n(this.options.menu);this.shown=!1;this.listen()},i;t.prototype={constructor:t,select:function(){var n=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(n)).change(),this.hide()},updater:function(n){return n},show:function(){var t=n.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var t;return(this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength)?this.shown?this.hide():this:(t=n.isFunction(this.source)?this.source(this.query,n.proxy(this.process,this)):this.source,t?this.process(t):this)},process:function(t){var i=this;return(t=n.grep(t,function(n){return i.matcher(n)}),t=this.sorter(t),!t.length)?this.shown?this.hide():this:this.render(t.slice(0,this.options.items)).show()},matcher:function(n){return~n.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(n){for(var i=[],r=[],u=[],t;t=n.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?r.push(t):u.push(t):i.push(t);return i.concat(r,u)},highlighter:function(n){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return n.replace(new RegExp("("+t+")","ig"),function(n,t){return"<strong>"+t+"<\/strong>"})},render:function(t){var i=this;return t=n(t).map(function(t,r){return t=n(i.options.item).attr("data-value",r),t.find("a").html(i.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(){var i=this.$menu.find(".active").removeClass("active"),t=i.next();t.length||(t=n(this.$menu.find("li")[0]));t.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last());n.addClass("active")},listen:function(){this.$element.on("focus",n.proxy(this.focus,this)).on("blur",n.proxy(this.blur,this)).on("keypress",n.proxy(this.keypress,this)).on("keyup",n.proxy(this.keyup,this));if(this.eventSupported("keydown"))this.$element.on("keydown",n.proxy(this.keydown,this));this.$menu.on("click",n.proxy(this.click,this)).on("mouseenter","li",n.proxy(this.mouseenter,this)).on("mouseleave","li",n.proxy(this.mouseleave,this))},eventSupported:function(n){var t=n in this.$element;return t||(this.$element.setAttribute(n,"return;"),t=typeof this.$element[n]=="function"),t},move:function(n){if(this.shown){switch(n.keyCode){case 9:case 13:case 27:n.preventDefault();break;case 38:n.preventDefault();this.prev();break;case 40:n.preventDefault();this.next()}n.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~n.inArray(t.keyCode,[40,38,9,13,27]);this.move(t)},keypress:function(n){this.suppressKeyPressRepeat||this.move(n)},keyup:function(n){switch(n.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}n.stopPropagation();n.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1;!this.mousedover&&this.shown&&this.hide()},click:function(n){n.stopPropagation();n.preventDefault();this.select();this.$element.focus()},mouseenter:function(t){this.mousedover=!0;this.$menu.find(".active").removeClass("active");n(t.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1;!this.focused&&this.shown&&this.hide()}};i=n.fn.typeahead;n.fn.typeahead=function(i){return this.each(function(){var u=n(this),r=u.data("typeahead"),f=typeof i=="object"&&i;r||u.data("typeahead",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"><\/ul>',item:'<li><a href="#"><\/a><\/li>',minLength:1};n.fn.typeahead.Constructor=t;n.fn.typeahead.noConflict=function(){return n.fn.typeahead=i,this};n(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var t=n(this);t.data("typeahead")||t.typeahead(t.data())})}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.options=n.extend({},n.fn.affix.defaults,i);this.$window=n(window).on("scroll.affix.data-api",n.proxy(this.checkPosition,this)).on("click.affix.data-api",n.proxy(function(){setTimeout(n.proxy(this.checkPosition,this),1)},this));this.$element=n(t);this.checkPosition()},i;t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var o=n(document).height(),f=this.$window.scrollTop(),e=this.$element.offset(),t=this.options.offset,r=t.bottom,u=t.top,i;(typeof t!="object"&&(r=u=t),typeof u=="function"&&(u=t.top()),typeof r=="function"&&(r=t.bottom()),i=this.unpin!=null&&f+this.unpin<=e.top?!1:r!=null&&e.top+this.$element.height()>=o-r?"bottom":u!=null&&f<=u?"top":!1,this.affixed!==i)&&(this.affixed=i,this.unpin=i=="bottom"?e.top-f:null,this.$element.removeClass("affix affix-top affix-bottom").addClass("affix"+(i?"-"+i:"")))}};i=n.fn.affix;n.fn.affix=function(i){return this.each(function(){var u=n(this),r=u.data("affix"),f=typeof i=="object"&&i;r||u.data("affix",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.affix.Constructor=t;n.fn.affix.defaults={offset:0};n.fn.affix.noConflict=function(){return n.fn.affix=i,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var i=n(this),t=i.data();t.offset=t.offset||{};t.offsetBottom&&(t.offset.bottom=t.offsetBottom);t.offsetTop&&(t.offset.top=t.offsetTop);i.affix(t)})})}(window.jQuery),function(n,t){function i(n){if(n&&typeof n=="object"&&n.__wrapped__)return n;if(!(this instanceof i))return new i(n);this.__wrapped__=n}function ai(n,t,i){var o,s,r,u,e;if(t||(t=0),o=n.length,s=o-t>=(i||ou),s)for(r={},u=t-1;++u<o;)e=n[u]+"",(f.call(r,e)?r[e]:r[e]=[]).push(n[u]);return function(i){if(s){var u=i+"";return f.call(r,u)&&d(r[u],i)>-1}return d(n,i,t)>-1}}function cr(n){return n.charCodeAt(0)}function uf(n,t){var i=n.index,r=t.index;if(n=n.criteria,t=t.criteria,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return i<r?-1:1}function gt(n,t,i,r){function o(){var h=arguments,c=e?this:t,l;return(f||(n=t[s]),i.length&&(h=h.length?(h=u(h),r?h.concat(i):i.concat(h)):i),this instanceof o)?(vi.prototype=n.prototype,c=new vi,vi.prototype=null,l=n.apply(c,h),rt(l)?l:c):n.apply(c,h)}var f=a(n),e=!i,s=t;return e&&(i=t),f||(t=n),o}function r(n,t,i){var u,r;return n==null?tr:(u=typeof n,u!="function")?u!="object"?function(t){return t[n]}:(r=w(n),function(t){for(var i=r.length,u=!1;i--;)if(!(u=vt(t[r[i]],n[r[i]],ut)))break;return u}):typeof t!="undefined"?i===1?function(i){return n.call(t,i)}:i===2?function(i,r){return n.call(t,i,r)}:i===4?function(i,r,u,f){return n.call(t,i,r,u,f)}:function(i,r,u){return n.call(t,i,r,u)}:n}function at(){for(var i,u,s,n={isKeysFast:tf,arrays:"isArray(iterable)",bottom:"",loop:"",top:"",useHas:!0},t,o=0;t=arguments[o];o++)for(i in t)n[i]=t[i];return u=n.args,n.firstArg=/^[^,]+/.exec(u)[0],s=Function("createCallback, hasOwnProperty, isArguments, isArray, isString, objectTypes, nativeKeys","return function("+u+") {\n"+rf(n)+"\n}"),s(r,f,ni,e,yt,ci,nt)}function ff(n){return"\\"+sr[n]}function ef(n){return lr[n]}function vi(){}function u(n,t,i){t||(t=0);typeof i=="undefined"&&(i=n?n.length:0);for(var r=-1,u=i-t||0,f=Array(u<0?0:u);++r<u;)f[r]=n[t+r];return f}function of(n){return cf[n]}function ni(n){return s.call(n)==et}function sf(n){var t=!1,i;return!(n&&typeof n=="object")||ni(n)?t:(i=n.constructor,!a(i)||i instanceof i)?(b(n,function(n,i){t=i}),t===!1||f.call(n,t)):t}function hf(n){var t=[];return k(n,function(n,i){t.push(i)}),t}function pi(n,i,o,c,a,y){var p=n,w,g,nt,b,d,tt;if(typeof i=="function"&&(c=o,o=i,i=!1),typeof o=="function"&&(o=typeof c=="undefined"?o:r(o,c,1),p=o(p),w=typeof p!="undefined",w||(p=n)),g=rt(p),g){if(nt=s.call(p),!l[nt])return p;b=e(p)}if(!g||!i)return g&&!w?b?u(p):yi({},p):p;d=v[nt];switch(nt){case st:case ht:return w?p:new d(+p);case ct:case it:return w?p:new d(p);case lt:return w?p:d(p.source,vu.exec(p))}for(a||(a=[]),y||(y=[]),tt=a.length;tt--;)if(a[tt]==n)return y[tt];return w||(p=b?d(p.length):{},b&&(f.call(n,"index")&&(p.index=n.index),f.call(n,"input")&&(p.input=n.input))),a.push(n),y.push(p),(b?h:k)(w?p:n,function(n,r){p[r]=pi(n,i,o,t,a,y)}),p}function lf(n,t,i){return pi(n,!0,t,i)}function ii(n){var t=[];return b(n,function(n,i){a(n)&&t.push(i)}),t.sort()}function af(n,t){return n?f.call(n,t):!1}function ar(n){for(var i=-1,r=w(n),f=r.length,u={},t;++i<f;)t=r[i],u[n[t]]=t;return u}function vf(n){return n===!0||n===!1||s.call(n)==st}function yf(n){return n instanceof Date||s.call(n)==ht}function pf(n){return n?n.nodeType===1:!1}function wf(n){var i=!0,t,r;return n?(t=s.call(n),r=n.length,t==ot||t==it||t==et||t==tt&&typeof r=="number"&&a(n.splice))?!r:(k(n,function(){return i=!1}),i):i}function vt(n,t,i,u,e,o){var k=i===ut,h,d,g,l,p,nt,v,y,w,c;if(i&&!k&&(i=typeof u=="undefined"?i:r(i,u,2),h=i(n,t),typeof h!="undefined"))return!!h;if(n===t)return n!==0||1/n==1/t;if(d=typeof n,g=typeof t,n===n&&(!n||d!="function"&&d!="object")&&(!t||g!="function"&&g!="object"))return!1;if(n==null||t==null)return n===t;if(l=s.call(n),p=s.call(t),l==et&&(l=tt),p==et&&(p=tt),l!=p)return!1;switch(l){case st:case ht:return+n==+t;case ct:return n!=+n?t!=+t:n==0?1/n==1/t:n==+t;case lt:case it:return n==t+""}if(nt=l==ot,!nt){if(n.__wrapped__||t.__wrapped__)return vt(n.__wrapped__||n,t.__wrapped__||t,i,u,e,o);if(l!=tt||(v=n.constructor,y=t.constructor,v!=y&&!(a(v)&&v instanceof v&&a(y)&&y instanceof y)))return!1}for(e||(e=[]),o||(o=[]),w=e.length;w--;)if(e[w]==n)return o[w]==t;if(c=0,h=!0,e.push(n),o.push(t),nt){if(c=t.length,h=k||c==n.length,h)while(c--)if(!(h=vt(n[c],t[c],i,u,e,o)))break;return h}return b(t,function(t,r,s){if(f.call(s,r))return c++,h=f.call(n,r)&&vt(n[r],t,i,u,e,o)}),h&&!k&&b(n,function(n,t,i){if(f.call(i,t))return h=--c>-1}),h}function bf(n){return du(n)&&!gu(parseFloat(n))}function a(n){return typeof n=="function"}function rt(n){return n?ci[typeof n]:!1}function kf(n){return vr(n)&&n!=+n}function df(n){return n===null}function vr(n){return typeof n=="number"||s.call(n)==ct}function gf(n){return n instanceof RegExp||s.call(n)==lt}function yt(n){return typeof n=="string"||s.call(n)==it}function ne(n){return typeof n=="undefined"}function yr(n,t,i){var u=arguments,l=0,f=2;if(!rt(n))return n;if(i===ut)var o=u[3],s=u[4],c=u[5];else s=[],c=[],typeof i!="number"&&(f=u.length),f>2&&(typeof u[f-2]=="function"?o=r(u[--f-1],u[f--],2):typeof u[f-1]=="function"&&(o=u[--f]));while(++l<f)(e(u[l])?h:k)(u[l],function(t,i){var h,l,u=t,r=n[i],f;if(t&&((l=e(t))||ri(t))){for(f=s.length;f--;)if(h=s[f]==t){r=c[f];break}h||(r=l?e(r)?r:[]:ri(r)?r:{},o&&(u=o(r,t),typeof u!="undefined"&&(r=u)),s.push(t),c.push(r),o||(r=yr(r,t,ut,o,s,c)))}else o&&(u=o(r,t),typeof u=="undefined"&&(u=t)),typeof u!="undefined"&&(r=u);n[i]=r});return n}function te(n,t,i){var u=typeof t=="function",f={},e;return u?t=r(t,i):e=g.apply(c,arguments),b(n,function(n,i,r){(u?!t(n,i,r):d(e,i,1)<0)&&(f[i]=n)}),f}function ie(n){for(var t=-1,r=w(n),u=r.length,f=Array(u),i;++t<u;)i=r[t],f[t]=[i,n[i]];return f}function re(n,t,i){var f={},u;if(typeof t!="function")for(var e=0,o=g.apply(c,arguments),s=rt(n)?o.length:0;++e<s;)u=o[e],u in n&&(f[u]=n[u]);else t=r(t,i),b(n,function(n,i,r){t(n,i,r)&&(f[i]=n)});return f}function wi(n){for(var t=-1,i=w(n),r=i.length,u=Array(r);++t<r;)u[t]=n[i[t]];return u}function ue(n){for(var t=-1,i=g.apply(c,u(arguments,1)),r=i.length,f=Array(r);++t<r;)f[t]=n[i[t]];return f}function pr(n,t,i){var f=-1,u=n?n.length:0,r=!1;return i=(i<0?p(0,u+i):i)||0,typeof u=="number"?r=(yt(n)?n.indexOf(t,i):d(n,t,i))>-1:o(n,function(n){if(++f>=i)return!(r=n===t)}),r}function fe(n,t,i){var u={};return t=r(t,i),h(n,function(n,i,r){i=t(n,i,r)+"";f.call(u,i)?u[i]++:u[i]=1}),u}function wr(n,t,i){var f=!0,u,s;if(t=r(t,i),e(n)){for(u=-1,s=n.length;++u<s;)if(!(f=!!t(n[u],u,n)))break}else o(n,function(n,i,r){return f=!!t(n,i,r)});return f}function ui(n,t,i){var f=[],u,h,s;if(t=r(t,i),e(n))for(u=-1,h=n.length;++u<h;)s=n[u],t(s,u,n)&&f.push(s);else o(n,function(n,i,r){t(n,i,r)&&f.push(n)});return f}function br(n,t,i){var u;return t=r(t,i),h(n,function(n,i,r){if(t(n,i,r))return u=n,!1}),u}function h(n,t,i){if(t&&typeof i=="undefined"&&e(n)){for(var r=-1,u=n.length;++r<u;)if(t(n[r],r,n)===!1)break}else o(n,t,i);return n}function ee(n,t,i){var u={};return t=r(t,i),h(n,function(n,i,r){i=t(n,i,r)+"";(f.call(u,i)?u[i]:u[i]=[]).push(n)}),u}function oe(n,t){var f=u(arguments,2),e=-1,o=typeof t=="function",i=n?n.length:0,r=Array(typeof i=="number"?i:0);return h(n,function(n){r[++e]=(o?t:n[t]).apply(n,f)}),r}function bi(n,t,i){var u=-1,f=n?n.length:0,s=Array(typeof f=="number"?f:0);if(t=r(t,i),e(n))while(++u<f)s[u]=t(n[u],u,n);else o(n,function(n,i,r){s[++u]=t(n,i,r)});return s}function kr(n,t,i){var f=-Infinity,u=f,s,c,h;if(!t&&e(n))for(s=-1,c=n.length;++s<c;)h=n[s],h>u&&(u=h);else t=!t&&yt(n)?cr:r(t,i),o(n,function(n,i,r){var e=t(n,i,r);e>f&&(f=e,u=n)});return u}function se(n,t,i){var f=Infinity,u=f,s,c,h;if(!t&&e(n))for(s=-1,c=n.length;++s<c;)h=n[s],h<u&&(u=h);else t=!t&&yt(n)?cr:r(t,i),o(n,function(n,i,r){var e=t(n,i,r);e<f&&(f=e,u=n)});return u}function ki(n,t,i,u){var s=arguments.length<3,f,h;if(t=r(t,u,4),e(n))for(f=-1,h=n.length,s&&(i=n[++f]);++f<h;)i=t(i,n[f],f,n);else o(n,function(n,r,u){i=s?(s=!1,n):t(i,n,r,u)});return i}function dr(n,t,i,u){var o=n,f=n?n.length:0,s=arguments.length<3,e;return typeof f!="number"&&(e=w(n),f=e.length),t=r(t,u,4),h(n,function(n,r,u){r=e?e[--f]:--f;i=s?(s=!1,o[r]):t(i,o[r],r,u)}),i}function he(n,t,i){return t=r(t,i),ui(n,function(n,i,r){return!t(n,i,r)})}function ce(n){var i=-1,r=n?n.length:0,t=Array(typeof r=="number"?r:0);return h(n,function(n){var r=rr(ur()*(++i+1));t[i]=t[r];t[r]=n}),t}function le(n){var t=n?n.length:0;return typeof t=="number"?t:w(n).length}function gr(n,t,i){var f,u,s;if(t=r(t,i),e(n)){for(u=-1,s=n.length;++u<s;)if(f=t(n[u],u,n))break}else o(n,function(n,i,r){return!(f=t(n,i,r))});return!!f}function ae(n,t,i){var e=-1,u=n?n.length:0,f=Array(typeof u=="number"?u:0);for(t=r(t,i),h(n,function(n,i,r){f[++e]={criteria:t(n,i,r),index:e,value:n}}),u=f.length,f.sort(uf);u--;)f[u]=f[u].value;return f}function ve(n){return n&&typeof n.length=="number"?u(n):wi(n)}function ye(n){for(var i=-1,u=n?n.length:0,r=[],t;++i<u;)t=n[i],t&&r.push(t);return r}function pe(n){for(var i=-1,r=n?n.length:0,f=g.apply(c,arguments),e=ai(f,r),u=[],t;++i<r;)t=n[i],e(t)||u.push(t);return u}function di(n,t,i){var f,o,e;if(n){if(f=0,o=n.length,typeof t!="number"&&t!=null)for(e=-1,t=r(t,i);++e<o&&t(n[e],e,n);)f++;else if(f=t,f==null||i)return n[0];return u(n,0,hi(p(0,f),o))}}function tu(n,t){for(var u=-1,f=n?n.length:0,r=[],i;++u<f;)i=n[u],e(i)?kt.apply(r,t?i:tu(i)):r.push(i);return r}function d(n,t,i){var r=-1,u=n?n.length:0;if(typeof i=="number")r=(i<0?p(0,u+i):i||0)-1;else if(i)return r=iu(n,t),n[r]===t?r:-1;while(++r<u)if(n[r]===t)return r;return-1}function we(n,t,i){var f,e,o;if(!n)return[];if(f=0,e=n.length,typeof t!="number"&&t!=null)for(o=e,t=r(t,i);o--&&t(n[o],o,n);)f++;else f=t==null||i?1:t||f;return u(n,0,hi(p(0,e-f),e))}function be(n){var s=arguments,v=s.length,i={"0":{}},h=-1,c=n?n.length:0,l=c>=100,o=[],u=o,t,e,a,r;n:while(++h<c)if(t=n[h],l&&(e=t+"",a=f.call(i[0],e)?!(u=i[0][e]):u=i[0][e]=[]),a||d(u,t)<0){for(l&&u.push(t),r=v;--r;)if(!(i[r]||(i[r]=ai(s[r],0,100)))(t))continue n;o.push(t)}return o}function ke(n,t,i){var f,e,o;if(n){if(f=0,e=n.length,typeof t!="number"&&t!=null)for(o=e,t=r(t,i);o--&&t(n[o],o,n);)f++;else if(f=t,f==null||i)return n[e-1];return u(n,p(0,e-f))}}function de(n,t,i){var r=n?n.length:0;for(typeof i=="number"&&(r=(i<0?p(0,r+i):hi(i,r-1))+1);r--;)if(n[r]===t)return r;return-1}function ge(n,t){for(var r=-1,f=n?n.length:0,u={},i;++r<f;)i=n[r],t?u[i]=t[r]:u[i[0]]=i[1];return u}function no(n,t,i){n=+n||0;i=+i||1;t==null&&(t=n,n=0);for(var r=-1,u=p(0,ku((t-n)/i)),f=Array(u);++r<u;)f[r]=n,n+=i;return f}function gi(n,t,i){if(typeof t!="number"&&t!=null){var f=0,e=-1,o=n?n.length:0;for(t=r(t,i);++e<o&&t(n[e],e,n);)f++}else f=t==null||i?1:p(0,t);return u(n,f)}function iu(n,t,i,u){var f=0,o=n?n.length:f,e;for(i=i?r(i,u,1):tr,t=i(t);f<o;)e=f+o>>>1,i(n[e])<t?f=e+1:o=e;return f}function to(){return nr(g.apply(c,arguments))}function nr(n,t,i,u){var s=-1,y=n?n.length:0,v=[],e=v,h,c,l,o,a,p;for(typeof t=="function"&&(u=i,i=t,t=!1),h=!t&&y>=75,h&&(c={}),i&&(e=[],i=r(i,u));++s<y;)l=n[s],o=i?i(l,s,n):l,h&&(a=o+"",p=f.call(c,a)?!(e=c[a]):e=c[a]=[]),(t?!s||e[e.length-1]!==o:p||d(e,o)<0)&&((i||h)&&e.push(o),v.push(l));return v}function io(n){for(var i=-1,u=n?n.length:0,f=ai(arguments,1),r=[],t;++i<u;)t=n[i],f(t)||r.push(t);return r}function ro(n){for(var t=-1,i=n?kr(fi(arguments,"length")):0,r=Array(i);++t<i;)r[t]=fi(arguments,t);return r}function uo(n,t){return n<1?t():function(){if(--n<1)return t.apply(this,arguments)}}function ru(n,t){return nf||y&&arguments.length>2?y.call.apply(y,arguments):gt(n,t,u(arguments,2))}function fo(n){for(var t=g.apply(c,arguments),r=t.length>1?0:(t=ii(n),-1),u=t.length,i;++r<u;)i=t[r],n[i]=ru(n[i],n);return n}function eo(n,t){return gt(n,t,u(arguments,2))}function oo(){var n=arguments;return function(){for(var t=arguments,i=n.length;i--;)t=[n[i].apply(this,t)];return t[0]}}function so(n,t,i){function o(){r=null;i||(f=n.apply(e,u))}var u,f,e,r;return function(){var s=i&&!r;return u=arguments,e=this,clearTimeout(r),r=setTimeout(o,t),s&&(f=n.apply(e,u)),f}}function ho(n,i){var r=u(arguments,2);return setTimeout(function(){n.apply(t,r)},i)}function co(n){var i=u(arguments,1);return setTimeout(function(){n.apply(t,i)},1)}function lo(n,t){var i={};return function(){var r=(t?t.apply(this,arguments):arguments[0])+"";return f.call(i,r)?i[r]:i[r]=n.apply(this,arguments)}}function ao(n){var i,t;return function(){return i?t:(i=!0,t=n.apply(this,arguments),n=null,t)}}function vo(n){return gt(n,u(arguments,1))}function yo(n){return gt(n,u(arguments,1),null,ut)}function po(n,t){function o(){e=new Date;i=null;u=n.apply(f,r)}var r,u,f,i,e=0;return function(){var s=new Date,h=t-(s-e);return r=arguments,f=this,h<=0?(clearTimeout(i),i=null,e=s,u=n.apply(f,r)):i||(i=setTimeout(o,h)),u}}function wo(n,t){return function(){var i=[n];return kt.apply(i,arguments),t.apply(this,i)}}function bo(n){return n==null?"":(n+"").replace(pu,ef)}function tr(n){return n}function uu(n){h(ii(n),function(t){var r=i[t]=n[t];i.prototype[t]=function(){var n=[this.__wrapped__];return kt.apply(n,arguments),new i(r.apply(i,n))}})}function ko(){return n._=su,this}function go(n,t){return n==null&&t==null&&(t=1),n=+n||0,t==null&&(t=n,n=0),n+rr(ur()*((+t||0)-n+1))}function ns(n,i){var r=n?n[i]:t;return a(r)?n[i]():r}function ts(n,r,u){var c=i.templateSettings,e,o,y,s;n||(n="");u=ti({},u,c);var l=ti({},u.imports,c.imports),b=w(l),k=wi(l),h,a=0,v=u.interpolate||bt,f="__p += '",d=RegExp((u.escape||bt).source+"|"+v.source+"|"+(v===ir?yu:bt).source+"|"+(u.evaluate||bt).source+"|$","g");n.replace(d,function(t,i,r,u,e,o){return r||(r=u),f+=n.slice(a,o).replace(wu,ff),i&&(f+="' +\n__e("+i+") +\n'"),e&&(h=!0,f+="';\n"+e+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),a=o+t.length,t});f+="';\n";e=u.variable;o=e;o||(e="obj",f="with ("+e+") {\n"+f+"\n}\n");f=(h?f.replace(cu,""):f).replace(lu,"$1").replace(au,"$1;");f="function("+e+") {\n"+(o?"":e+" || ("+e+" = {});\n")+"var __t, __p = '', __e = _.escape"+(h?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":(o?"":", __d = "+e+"."+e+" || "+e)+";\n")+f+"return __p\n}";y="\n/*\n//@ sourceURL="+(u.sourceURL||"/lodash/template/source["+bu+++"]")+"\n*/";try{s=Function(b,"return "+f+y).apply(t,k)}catch(p){p.source=f;throw p;}return r?s(r):(s.source=f,s)}function is(n,t,i){n=+n||0;for(var r=-1,u=Array(n);++r<n;)u[r]=t.call(i,r);return u}function rs(n){return n==null?"":(n+"").replace(hu,of)}function us(n){var t=++eu;return(n==null?"":n+"")+t}function fs(n,t){return t(n),n}function es(){return this.__wrapped__+""}function fu(){return this.__wrapped__}var ei=typeof exports=="object"&&exports,oi=typeof global=="object"&&global,v,ci,sr,o,ti,ri,fi,nu;oi.global===oi&&(n=oi);var c=[],pt={},eu=0,ut=pt,ou=30,su=n._,hu=/&(?:amp|lt|gt|quot|#39);/g,cu=/\b__p \+= '';/g,lu=/\b(__p \+=) '' \+/g,au=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vu=/\w*$/,wt=RegExp("^"+(pt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),yu=/\$\{((?:(?=\\?)\\?[\s\S])*?)\}/g,ir=/<%=([\s\S]+?)%>/g,bt=/($^)/,pu=/[&<>"']/g,wu=/['\n\r\t\u2028\u2029\\]/g,bu=0,ku=Math.ceil,g=c.concat,rr=Math.floor,ft=wt.test(ft=Object.getPrototypeOf)&&ft,f=pt.hasOwnProperty,kt=c.push,s=pt.toString,y=wt.test(y=u.bind)&&y,si=wt.test(si=Array.isArray)&&si,du=n.isFinite,gu=n.isNaN,nt=wt.test(nt=Object.keys)&&nt,p=Math.max,hi=Math.min,ur=Math.random,et="[object Arguments]",ot="[object Array]",st="[object Boolean]",ht="[object Date]",fr="[object Function]",ct="[object Number]",tt="[object Object]",lt="[object RegExp]",it="[object String]",er=!!n.attachEvent,or=y&&!/\n|true/.test(y+er),nf=y&&!or,tf=nt&&(er||or),l={};l[fr]=!1;l[et]=l[ot]=l[st]=l[ht]=l[ct]=l[tt]=l[lt]=l[it]=!0;v={};v[ot]=Array;v[st]=Boolean;v[ht]=Date;v[tt]=Object;v[ct]=Number;v[lt]=RegExp;v[it]=String;ci={boolean:!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};sr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"};i.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:ir,variable:"",imports:{_:i}};var rf=function(n){var t="var index, iterable = "+n.firstArg+", result = iterable;\nif (!iterable) return result;\n"+n.top+";\n";return n.arrays&&(t+="var length = iterable.length; index = -1;\nif ("+n.arrays+") {\n  while (++index < length) {\n    "+n.loop+"\n  }\n}\nelse {  "),n.isKeysFast&&n.useHas?t+="\n  var ownIndex = -1,\n      ownProps = objectTypes[typeof iterable] ? nativeKeys(iterable) : [],\n      length = ownProps.length;\n\n  while (++ownIndex < length) {\n    index = ownProps[ownIndex];\n    "+n.loop+"\n  }  ":(t+="\n  for (index in iterable) {",n.useHas&&(t+="\n    if (",n.useHas&&(t+="hasOwnProperty.call(iterable, index)"),t+=") {    "),t+=n.loop+";    ",n.useHas&&(t+="\n    }"),t+="\n  }  "),n.arrays&&(t+="\n}"),t+(n.bottom+";\nreturn result")},li={args:"object, source, guard",top:"var args = arguments,\n    argsIndex = 0,\n    argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n  iterable = args[argsIndex];\n  if (iterable && objectTypes[typeof iterable]) {",loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:"  }\n}"},dt={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg)",arrays:"typeof length == 'number'",loop:"if (callback(iterable[index], index, collection) === false) return result"},hr={top:"if (!objectTypes[typeof iterable]) return result;\n"+dt.top,arrays:!1};o=at(dt);var b=at(dt,hr,{useHas:!1}),k=at(dt,hr),e=si||function(n){return n instanceof Array||s.call(n)==ot},w=nt?function(n){return rt(n)?nt(n):[]}:hf;var lr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},cf=ar(lr),yi=at(li,{top:li.top.replace(";",";\nif (argsLength > 2) {\n  if (typeof args[argsLength - 2] == 'function') {\n    var callback = createCallback(args[--argsLength - 1], args[argsLength--], 2);\n  } else if (typeof args[argsLength - 1] == 'function') {\n    callback = args[--argsLength];\n  }\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"});ti=at(li);a(/x/)&&(a=function(n){return n instanceof Function||s.call(n)==fr});ri=function(n){if(!(n&&typeof n=="object"))return!1;var i=n.valueOf,t=typeof i=="function"&&(t=ft(i))&&ft(t);return t?n==t||ft(n)==t&&!ni(n):sf(n)};fi=bi;nu=ui;i.after=uo;i.assign=yi;i.at=ue;i.bind=ru;i.bindAll=fo;i.bindKey=eo;i.compact=ye;i.compose=oo;i.countBy=fe;i.debounce=so;i.defaults=ti;i.defer=co;i.delay=ho;i.difference=pe;i.filter=ui;i.flatten=tu;i.forEach=h;i.forIn=b;i.forOwn=k;i.functions=ii;i.groupBy=ee;i.initial=we;i.intersection=be;i.invert=ar;i.invoke=oe;i.keys=w;i.map=bi;i.max=kr;i.memoize=lo;i.merge=yr;i.min=se;i.object=ge;i.omit=te;i.once=ao;i.pairs=ie;i.partial=vo;i.partialRight=yo;i.pick=re;i.pluck=fi;i.range=no;i.reject=he;i.rest=gi;i.shuffle=ce;i.sortBy=ae;i.tap=fs;i.throttle=po;i.times=is;i.toArray=ve;i.union=to;i.uniq=nr;i.values=wi;i.where=nu;i.without=io;i.wrap=wo;i.zip=ro;i.collect=bi;i.drop=gi;i.each=h;i.extend=yi;i.methods=ii;i.select=ui;i.tail=gi;i.unique=nr;uu(i);i.clone=pi;i.cloneDeep=lf;i.contains=pr;i.escape=bo;i.every=wr;i.find=br;i.has=af;i.identity=tr;i.indexOf=d;i.isArguments=ni;i.isArray=e;i.isBoolean=vf;i.isDate=yf;i.isElement=pf;i.isEmpty=wf;i.isEqual=vt;i.isFinite=bf;i.isFunction=a;i.isNaN=kf;i.isNull=df;i.isNumber=vr;i.isObject=rt;i.isPlainObject=ri;i.isRegExp=gf;i.isString=yt;i.isUndefined=ne;i.lastIndexOf=de;i.mixin=uu;i.noConflict=ko;i.random=go;i.reduce=ki;i.reduceRight=dr;i.result=ns;i.size=le;i.some=gr;i.sortedIndex=iu;i.template=ts;i.unescape=rs;i.uniqueId=us;i.all=wr;i.any=gr;i.detect=br;i.foldl=ki;i.foldr=dr;i.include=pr;i.inject=ki;k(i,function(n,t){i.prototype[t]||(i.prototype[t]=function(){var t=[this.__wrapped__];return kt.apply(t,arguments),n.apply(i,t)})});i.first=di;i.last=ke;i.take=di;i.head=di;k(i,function(n,t){i.prototype[t]||(i.prototype[t]=function(t,r){var u=n(this.__wrapped__,t,r);return t==null||r&&typeof t!="function"?u:new i(u)})});i.VERSION="1.0.0";i.prototype.toString=es;i.prototype.value=fu;i.prototype.valueOf=fu;o(["join","pop","shift"],function(n){var t=c[n];i.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}});o(["push","reverse","sort","unshift"],function(n){var t=c[n];i.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}});o(["concat","slice","splice"],function(n){var t=c[n];i.prototype[n]=function(){return new i(t.apply(this.__wrapped__,arguments))}});typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=i,define(function(){return i})):ei?typeof module=="object"&&module&&module.exports==ei?(module.exports=i)._=i:ei._=i:n._=i}(this),function(n){n.extend(n.fn,{swapClass:function(n,t){var i=this.filter("."+n);return this.filter("."+t).removeClass(t).addClass(n),i.removeClass(n).addClass(t),this},replaceClass:function(n,t){return this.filter("."+n).removeClass(n).addClass(t).end()},hoverClass:function(t){return t=t||"hover",this.hover(function(){n(this).addClass(t)},function(){n(this).removeClass(t)})},heightToggle:function(n,t){n?this.animate({height:"toggle"},n,t):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();t&&t.apply(this,arguments)})},heightHide:function(n,t){n?this.animate({height:"hide"},n,t):(this.hide(),t&&this.each(t))},prepareBranches:function(n){return n.prerendered||(this.filter(":last-child:not(ul)").addClass(t.last),this.filter((n.collapsed?"":"."+t.closed)+":not(."+t.open+")").find(">ul").hide()),this.filter(":has(>ul)")},applyClasses:function(i,r){if(this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview",function(t){(this==t.target||n(this).parent().find(".toggler")[0].className.indexOf("toggler")!=-1)&&this&&r.apply(n(this).next())}).add(n("a",this)).hoverClass(),!i.prerendered){this.filter(":has(>ul:hidden)").addClass(t.expandable).replaceClass(t.last,t.lastExpandable);this.not(":has(>ul:hidden)").addClass(t.collapsable).replaceClass(t.last,t.lastCollapsable);var u=this.find("div."+t.hitarea);u.length||(u=this.prepend('<div class="'+t.hitarea+'"/>').find("div."+t.hitarea));u.removeClass().addClass(t.hitarea).each(function(){var t="";n.each(n(this).parent().attr("class").split(" "),function(){t+=this+"-hitarea "});n(this).addClass(t)})}this.find("div."+t.hitarea).click(r)},treeview:function(i){function h(i,r){function u(r){return function(){return e.apply(n("div."+t.hitarea,i).filter(function(){return r?n(this).parent("."+r).length:!0})),!1}}n("a:eq(0)",r).click(u(t.collapsable));n("a:eq(1)",r).click(u(t.expandable));n("a:eq(2)",r).click(u())}function e(){n(this).parent().find(">.hitarea").swapClass(t.collapsableHitarea,t.expandableHitarea).swapClass(t.lastCollapsableHitarea,t.lastExpandableHitarea).end().swapClass(t.collapsable,t.expandable).swapClass(t.lastCollapsable,t.lastExpandable).find(">ul").heightToggle(i.animated,i.toggle);i.unique&&n(this).parent().siblings().find(">.hitarea").replaceClass(t.collapsableHitarea,t.expandableHitarea).replaceClass(t.lastCollapsableHitarea,t.lastExpandableHitarea).end().replaceClass(t.collapsable,t.expandable).replaceClass(t.lastCollapsable,t.lastExpandable).find(">ul").heightHide(i.animated,i.toggle)}function c(){var t=[];u.each(function(i,r){t[i]=n(r).is(":has(>ul:visible)")?1:0});n.cookie(i.cookieId,t.join(""),i.cookieOptions)}function l(){var t=n.cookie(i.cookieId),r;t&&(r=t.split(""),u.each(function(t,i){n(i).find(">ul")[parseInt(r[t])?"show":"hide"]()}))}var s,u,o,f,r;i=n.extend({cookieId:"treeview"},i);i.toggle&&(s=i.toggle,i.toggle=function(){return s.apply(n(this).parent()[0],arguments)});this.data("toggler",e);this.addClass("treeview");u=this.find("li").prepareBranches(i);switch(i.persist){case"cookie":o=i.toggle;i.toggle=function(){c();o&&o.apply(this,arguments)};l();break;case"location":f=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase()});f.length&&(r=f.addClass("selected").parents("ul, li").add(f.next()).show(),i.prerendered&&r.filter("li").swapClass(t.collapsable,t.expandable).swapClass(t.lastCollapsable,t.lastExpandable).find(">.hitarea").swapClass(t.collapsableHitarea,t.expandableHitarea).swapClass(t.lastCollapsableHitarea,t.lastExpandableHitarea));case"checkbox":r=n("input:checkbox:checked").addClass("selected").parents("ul, li").add(n("input:checkbox:checked").next()).show();i.prerendered&&r.filter("li").swapClass(t.collapsable,t.expandable).swapClass(t.lastCollapsable,t.lastExpandable).find(">.hitarea").swapClass(t.collapsableHitarea,t.expandableHitarea).swapClass(t.lastCollapsableHitarea,t.lastExpandableHitarea);break;case"radio":r=n("input:radio:checked").addClass("selected").parents("ul, li").add(n("input:radio:checked").next()).show();i.prerendered&&r.filter("li").swapClass(t.collapsable,t.expandable).swapClass(t.lastCollapsable,t.lastExpandable).find(">.hitarea").swapClass(t.collapsableHitarea,t.expandableHitarea).swapClass(t.lastCollapsableHitarea,t.lastExpandableHitarea)}return u.applyClasses(i,e),i.control&&(h(this,i.control),n(i.control).show()),this}});n.treeview={};var t=n.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"}}(jQuery),function(){if(!window.CKEDITOR||!window.CKEDITOR.dom){window.CKEDITOR||(window.CKEDITOR=function(){var n={timestamp:"D08E",version:"4.0.1",revision:"d02739be4b",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var n=window.CKEDITOR_BASEPATH||"",i,t,r;if(!n)for(i=document.getElementsByTagName("script"),t=0;t<i.length;t++)if(r=i[t].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i),r){n=r[1];break}if(-1==n.indexOf(":/")&&(n=0===n.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+n:location.href.match(/^[^\?]*\/(?:)/)[0]+n),!n)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return n}(),getUrl:function(n){return-1==n.indexOf(":/")&&0!==n.indexOf("/")&&(n=this.basePath+n),this.timestamp&&"/"!=n.charAt(n.length-1)&&!/[&?]t=/.test(n)&&(n+=(0<=n.indexOf("?")?"&":"?")+"t="+this.timestamp),n},domReady:function(){function n(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",n,!1),i()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",n),i())}catch(t){}}function i(){for(var n;n=t.shift();)n()}var t=[];return function(i){if(t.push(i),"complete"===document.readyState&&setTimeout(n,1),1==t.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",n);window.attachEvent("onload",n);i=!1;try{i=!window.frameElement}catch(u){}if(document.documentElement.doScroll&&i){var r=function(){try{document.documentElement.doScroll("left")}catch(t){setTimeout(r,1);return}n()};r()}}}}()},t=window.CKEDITOR_GETURL,i;return t&&(i=n.url,n.url=function(r){return t.call(n,r)||i.call(n,r)}),n}());CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(n){var i=CKEDITOR.event.prototype;for(var t in i)n[t]==void 0&&(n[t]=i[t])},CKEDITOR.event.prototype=function(){function t(t){var r=n(this);return r[t]||(r[t]=new i(t))}var n=function(n){return n=n.getPrivate&&n.getPrivate()||n._||(n._={}),n.events||(n.events={})},i=function(n){this.name=n;this.listeners=[]};return i.prototype={getListenerIndex:function(n){for(var t=0,i=this.listeners;t<i.length;t++)if(i[t].fn==n)return t;return-1}},{define:function(n,i){var r=t.call(this,n);CKEDITOR.tools.extend(r,i,!0)},on:function(n,i,r,u,f){function s(t,f,e,o){return t={name:n,sender:this,editor:t,data:f,listenerData:u,stop:e,cancel:o,removeListener:h},i.call(r,t)===!1?!1:t.data}function h(){c.removeListener(n,i)}var e=t.call(this,n),c,o;if(e.getListenerIndex(i)<0){for(e=e.listeners,r||(r=this),isNaN(f)&&(f=10),c=this,s.fn=i,s.priority=f,o=e.length-1;o>=0;o--)if(e[o].priority<=f)return e.splice(o+1,0,s),{removeListener:h};e.unshift(s)}return{removeListener:h}},once:function(){var n=arguments[1];return arguments[1]=function(t){return t.removeListener(),n.apply(this,arguments)},this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var n=this.on.apply(this,arguments);return CKEDITOR.event.useCapture=0,n},fire:function(){var i=0,r=function(){i=1},t=0,u=function(){t=1};return function(f,e,o){var l=n(this)[f],f=i,a=t,s,h,c;if(i=t=0,l&&(s=l.listeners,s.length))for(s=s.slice(0),c=0;c<s.length;c++){if(l.errorProof)try{h=s[c].call(this,o,e,r,u)}catch(v){}else h=s[c].call(this,o,e,r,u);if(h===!1?t=1:typeof h!="undefined"&&(e=h),i||t)break}return e=t?!1:typeof e=="undefined"?!0:e,i=f,t=a,e}}(),fireOnce:function(t,i,r){return i=this.fire(t,i,r),delete n(this)[t],i},removeListener:function(t,i){var r=n(this)[t],u;r&&(u=r.getListenerIndex(i),u>=0&&r.listeners.splice(u,1))},removeAllListeners:function(){var t=n(this);for(var i in t)delete t[i]},hasListeners:function(t){return(t=n(this)[t])&&t.listeners.length>0}}}());CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(n,t){return n in{instanceReady:1,loaded:1}&&(this[n]=!0),CKEDITOR.event.prototype.fire.call(this,n,t,this)},CKEDITOR.editor.prototype.fireOnce=function(n,t){return n in{instanceReady:1,loaded:1}&&(this[n]=!0),CKEDITOR.event.prototype.fireOnce.call(this,n,t,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,a={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:b.indexOf(" applewebkit/")>-1,air:b.indexOf(" adobeair/")>-1,mac:b.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:b.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return!1;var n=document.domain,t=window.location.hostname;return n!=t&&n!="["+t+"]"},secure:location.protocol=="https:"},f,e;return a.gecko=navigator.product=="Gecko"&&!a.webkit&&!a.opera,a.webkit&&(b.indexOf("chrome")>-1?a.chrome=!0:a.safari=!0),f=0,a.ie&&(f=a.quirks||!document.documentMode?parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode,a.ie9Compat=f==9,a.ie8Compat=f==8,a.ie7Compat=f==7,a.ie6Compat=f<7||a.quirks),a.gecko&&(e=b.match(/rv:([\d\.]+)/),e&&(e=e[1].split("."),f=e[0]*1e4+(e[1]||0)*100+(e[2]||0)*1)),a.opera&&(f=parseFloat(c.version())),a.air&&(f=parseFloat(b.match(/ adobeair\/(\d+)/)[1])),a.webkit&&(f=parseFloat(b.match(/ applewebkit\/(\d+)/)[1])),a.version=f,a.isCompatible=a.iOS&&f>=534||!a.mobile&&(a.ie&&f>6||a.gecko&&f>=10801||a.opera&&f>=9.5||a.air&&f>=1||a.webkit&&f>=522||!1),a.cssClass="cke_browser_"+(a.ie?"ie":a.gecko?"gecko":a.opera?"opera":a.webkit?"webkit":"unknown"),a.quirks&&(a.cssClass=a.cssClass+" cke_browser_quirks"),a.ie&&(a.cssClass=a.cssClass+(" cke_browser_ie"+(a.quirks||a.version<7?"6":a.version)),a.quirks&&(a.cssClass=a.cssClass+" cke_browser_iequirks")),a.gecko&&(f<10900?a.cssClass=a.cssClass+" cke_browser_gecko18":f<=11e3&&(a.cssClass=a.cssClass+" cke_browser_gecko19")),a.air&&(a.cssClass=a.cssClass+" cke_browser_air"),a}());"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var n=document.createElement("script");n.type="text/javascript";n.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(n)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(n){(this._.pending||(this._.pending=[])).push(n)},function(){CKEDITOR.domReady(function(){var n=CKEDITOR.loadFullCore,t=CKEDITOR.loadFullCoreTimeout;n&&(CKEDITOR.status="basic_ready",n&&n._load?n():t&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},t*1e3))})}();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={},function(){var n=[],t=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){n=[]});CKEDITOR.tools={arrayCompare:function(n,t){if(!n&&!t)return!0;if(!n||!t||n.length!=t.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!=t[i])return!1;return!0},clone:function(n){var i,t;if(n&&n instanceof Array){for(i=[],t=0;t<n.length;t++)i[t]=this.clone(n[t]);return i}if(n===null||typeof n!="object"||n instanceof String||n instanceof Number||n instanceof Boolean||n instanceof Date||n instanceof RegExp)return n;i=new n.constructor;for(t in n)i[t]=this.clone(n[t]);return i},capitalize:function(n){return n.charAt(0).toUpperCase()+n.substring(1).toLowerCase()},extend:function(n){var t=arguments.length,u,f,r,e,i;for(typeof(u=arguments[t-1])=="boolean"?t--:typeof(u=arguments[t-2])=="boolean"&&(f=arguments[t-1],t=t-2),r=1;r<t;r++){e=arguments[r];for(i in e)(u===!0||n[i]==void 0)&&(!f||i in f)&&(n[i]=e[i])}return n},prototypedCopy:function(n){var t=function(){};return t.prototype=n,new t},isArray:function(n){return!!n&&n instanceof Array},isEmpty:function(n){for(var t in n)if(n.hasOwnProperty(t))return!1;return!0},cssVendorPrefix:function(n,i,r){return r?t+n+":"+i+";"+n+":"+i:(r={},r[n]=i,r[t+n]=i,r)},cssStyleToDomStyle:function(){var n=document.createElement("div").style,t=typeof n.cssFloat!="undefined"?"cssFloat":typeof n.styleFloat!="undefined"?"styleFloat":"float";return function(n){return n=="float"?t:n.replace(/-./g,function(n){return n.substr(1).toUpperCase()})}}(),buildStyleHtml:function(n){for(var n=[].concat(n),t,i=[],r=0;r<n.length;r++)(t=n[r])&&(/@import|[{}]/.test(t)?i.push("<style>"+t+"<\/style>"):i.push('<link type="text/css" rel=stylesheet href="'+t+'">'));return i.join("")},htmlEncode:function(n){return(""+n).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")},htmlEncodeAttr:function(n){return n.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},getNextNumber:function(){var n=0;return function(){return++n}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(n,t){var i=t(n);return i.prototype=n.prototype,i},setTimeout:function(n,t,i,r,u){return u||(u=window),i||(i=u),u.setTimeout(function(){r?n.apply(i,[].concat(r)):n.apply(i)},t||0)},trim:function(){var n=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(t){return t.replace(n,"")}}(),ltrim:function(){var n=/^[ \t\n\r]+/g;return function(t){return t.replace(n,"")}}(),rtrim:function(){var n=/[ \t\n\r]+$/g;return function(t){return t.replace(n,"")}}(),indexOf:function(n,t){if(typeof t=="function"){for(var i=0,r=n.length;i<r;i++)if(t(n[i]))return i}else{if(n.indexOf)return n.indexOf(t);for(i=0,r=n.length;i<r;i++)if(n[i]===t)return i}return-1},search:function(n,t){var i=CKEDITOR.tools.indexOf(n,t);return i>=0?n[i]:null},bind:function(n,t){return function(){return n.apply(t,arguments)}},createClass:function(n){var t=n.$,i=n.base,r=n.privates||n._,u=n.proto,n=n.statics,f;return t||(t=function(){i&&this.base.apply(this,arguments)}),r&&(f=t,t=function(){var i=this._||(this._={}),t,n;for(t in r)n=r[t],i[t]=typeof n=="function"?CKEDITOR.tools.bind(n,this):n;f.apply(this,arguments)}),i&&(t.prototype=this.prototypedCopy(i.prototype),t.prototype.constructor=t,t.base=i,t.baseProto=i.prototype,t.prototype.base=function(){this.base=i.prototype.base;i.apply(this,arguments);this.base=arguments.callee}),u&&this.extend(t.prototype,u,!0),n&&this.extend(t,n,!0),t},addFunction:function(t,i){return n.push(function(){return t.apply(i||this,arguments)})-1},removeFunction:function(t){n[t]=null},callFunction:function(t){var i=n[t];return i&&i.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var t=/^-?\d+\.?\d*px$/,n;return function(i){return n=CKEDITOR.tools.trim(i+"")+"px",t.test(n)?n:i||""}}(),convertToPx:function(){var n;return function(t){return(n||(n=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"><\/div>',CKEDITOR.document),CKEDITOR.document.getBody().append(n)),!/%$/.test(t))?(n.setStyle("width",t),n.$.clientWidth):t}}(),repeat:function(n,t){return Array(t+1).join(n)},tryThese:function(){for(var t,r,n=0,i=arguments.length;n<i;n++){r=arguments[n];try{t=r();break}catch(u){}}return t},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(n){return function(){var t=arguments,i=this;window.setTimeout(function(){n.apply(i,t)},0)}},normalizeCssText:function(n,t){var i=[],r,u=CKEDITOR.tools.parseCssText(n,!0,t);for(r in u)i.push(r+":"+u[r]);return i.sort(),i.length?i.join(";")+";":""},convertRgbToHex:function(n){return n.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(n,t,i,r){for(n=[t,i,r],t=0;t<3;t++)n[t]=("0"+parseInt(n[t],10).toString(16)).slice(-2);return"#"+n.join("")})},parseCssText:function(n,t,i){var r={};return(i&&(i=new CKEDITOR.dom.element("span"),i.setAttribute("style",n),n=CKEDITOR.tools.convertRgbToHex(i.getAttribute("style")||"")),!n||n==";")?r:(n.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(n,i,u){t&&(i=i.toLowerCase(),i=="font-family"&&(u=u.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,",")),u=CKEDITOR.tools.trim(u));r[i]=u}),r)}}}();CKEDITOR.dtd=function(){var i=CKEDITOR.tools.extend,u=function(n,t){for(var t,u,r=CKEDITOR.tools.clone(n),i=1;i<arguments.length;i++){t=arguments[i];for(u in t)delete r[u]}return r},n={},t={},e={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},o={command:1,link:1,meta:1,noscript:1,script:1,style:1},r={},f={"#":1},s={center:1,dir:1,noframes:1};return i(n,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},f,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1}),i(t,e,n,s),u={a:u(n,{a:1,button:1}),abbr:n,address:t,area:r,article:i({style:1},t),aside:i({style:1},t),audio:i({source:1,track:1},t),b:n,base:r,bdi:n,bdo:n,blockquote:t,body:t,br:r,button:u(n,{a:1,button:1}),canvas:n,caption:t,cite:n,code:n,col:r,colgroup:{col:1},command:r,datalist:i({option:1},n),dd:t,del:n,details:i({summary:1},t),dfn:n,div:i({style:1},t),dl:{dt:1,dd:1},dt:t,em:n,embed:r,fieldset:i({legend:1},t),figcaption:t,figure:i({figcaption:1},t),footer:t,form:t,h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,head:i({title:1,base:1},o),header:t,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:r,html:i({head:1,body:1},t,o),i:n,iframe:f,img:r,input:r,ins:n,kbd:n,keygen:r,label:n,legend:n,li:t,link:r,map:t,mark:n,menu:i({li:1},t),meta:r,meter:u(n,{meter:1}),nav:t,noscript:i({link:1,meta:1,style:1},n),object:i({param:1},n),ol:{li:1},optgroup:{option:1},option:f,output:n,p:n,param:r,pre:n,progress:u(n,{progress:1}),q:n,rp:n,rt:n,ruby:i({rp:1,rt:1},n),s:n,samp:n,script:f,section:i({style:1},t),select:{optgroup:1,option:1},small:n,source:r,span:n,strong:n,style:f,sub:n,summary:n,sup:n,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:t,textarea:f,tfoot:{tr:1},th:t,thead:{tr:1},time:u(n,{time:1}),title:f,tr:{th:1,td:1},track:r,u:n,ul:{li:1},"var":n,video:i({source:1,track:1},t),wbr:r,acronym:n,applet:i({param:1},t),basefont:r,big:n,center:t,dialog:r,dir:{li:1},font:n,isindex:r,noframes:t,strike:n,tt:n},i(u,{$block:i({audio:1,dd:1,dt:1,li:1,video:1},e,s),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,header:1,hgroup:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:n,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:i({body:1,head:1,html:1},u.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}}),u}();CKEDITOR.dom.event=function(n){this.$=n};CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var n=this.getKey();return(this.$.ctrlKey||this.$.metaKey)&&(n=n+CKEDITOR.CTRL),this.$.shiftKey&&(n=n+CKEDITOR.SHIFT),this.$.altKey&&(n=n+CKEDITOR.ALT),n},preventDefault:function(n){var t=this.$;t.preventDefault?t.preventDefault():t.returnValue=!1;n&&this.stopPropagation()},stopPropagation:function(){var n=this.$;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0},getTarget:function(){var n=this.$.target||this.$.srcElement;return n?new CKEDITOR.dom.node(n):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var n=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(n.documentElement.scrollLeft||n.body.scrollLeft),y:this.$.pageY||this.$.clientY+(n.documentElement.scrollTop||n.body.scrollTop)}}};CKEDITOR.CTRL=1114112;CKEDITOR.SHIFT=2228224;CKEDITOR.ALT=4456448;CKEDITOR.EVENT_PHASE_CAPTURING=1;CKEDITOR.EVENT_PHASE_AT_TARGET=2;CKEDITOR.EVENT_PHASE_BUBBLING=3;CKEDITOR.dom.domObject=function(n){n&&(this.$=n)};CKEDITOR.dom.domObject.prototype=function(){var n=function(n,t){return function(i){typeof CKEDITOR!="undefined"&&n.fire(t,new CKEDITOR.dom.event(i))}};return{getPrivate:function(){var n;return(n=this.getCustomData("_"))||this.setCustomData("_",n={}),n},on:function(t){var i=this.getCustomData("_cke_nativeListeners");return i||(i={},this.setCustomData("_cke_nativeListeners",i)),i[t]||(i=i[t]=n(this,t),this.$.addEventListener?this.$.addEventListener(t,i,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+t,i)),CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(n){if(CKEDITOR.event.prototype.removeListener.apply(this,arguments),!this.hasListeners(n)){var t=this.getCustomData("_cke_nativeListeners"),i=t&&t[n];i&&(this.$.removeEventListener?this.$.removeEventListener(n,i,!1):this.$.detachEvent&&this.$.detachEvent("on"+n,i),delete t[n])}},removeAllListeners:function(){var t=this.getCustomData("_cke_nativeListeners"),n,i;for(n in t)i=t[n],this.$.detachEvent?this.$.detachEvent("on"+n,i):this.$.removeEventListener&&this.$.removeEventListener(n,i,!1),delete t[n]}}}(),function(n){var t={};CKEDITOR.on("reset",function(){t={}});n.equals=function(n){try{return n&&n.$===this.$}catch(t){return!1}};n.setCustomData=function(n,i){var r=this.getUniqueId();return(t[r]||(t[r]={}))[n]=i,this};n.getCustomData=function(n){var i=this.$["data-cke-expando"];return(i=i&&t[i])&&n in i?i[n]:null};n.removeCustomData=function(n){var i=this.$["data-cke-expando"],i=i&&t[i],r,u;return i&&(r=i[n],u=n in i,delete i[n]),u?r:null};n.clearCustomData=function(){this.removeAllListeners();var n=this.$["data-cke-expando"];n&&delete t[n]};n.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(n)}(CKEDITOR.dom.domObject.prototype);CKEDITOR.dom.node=function(n){return n?new CKEDITOR.dom[n.nodeType==CKEDITOR.NODE_DOCUMENT?"document":n.nodeType==CKEDITOR.NODE_ELEMENT?"element":n.nodeType==CKEDITOR.NODE_TEXT?"text":n.nodeType==CKEDITOR.NODE_COMMENT?"comment":n.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](n):this};CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject;CKEDITOR.NODE_ELEMENT=1;CKEDITOR.NODE_DOCUMENT=9;CKEDITOR.NODE_TEXT=3;CKEDITOR.NODE_COMMENT=8;CKEDITOR.NODE_DOCUMENT_FRAGMENT=11;CKEDITOR.POSITION_IDENTICAL=0;CKEDITOR.POSITION_DISCONNECTED=1;CKEDITOR.POSITION_FOLLOWING=2;CKEDITOR.POSITION_PRECEDING=4;CKEDITOR.POSITION_IS_CONTAINED=8;CKEDITOR.POSITION_CONTAINS=16;CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(n,t){return n.append(this,t),n},clone:function(n,t){var i=this.$.cloneNode(n),r=function(i){if(i["data-cke-expando"]&&(i["data-cke-expando"]=!1),i.nodeType==CKEDITOR.NODE_ELEMENT&&(t||i.removeAttribute("id",!1),n))for(var i=i.childNodes,u=0;u<i.length;u++)r(i[u])};return r(i),new CKEDITOR.dom.node(i)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(n){return n.$.parentNode.insertBefore(this.$,n.$.nextSibling),n},insertBefore:function(n){return n.$.parentNode.insertBefore(this.$,n.$),n},insertBeforeMe:function(n){return this.$.parentNode.insertBefore(n.$,this.$),n},getAddress:function(n){for(var i,r=[],u=this.getDocument().$.documentElement,t=this.$;t&&t!=u;)i=t.parentNode,i&&r.unshift(this.getIndex.call({$:t},n)),t=i;return r},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(n){var t=this.$,i=-1,r;if(!this.$.parentNode)return i;do n&&t!=this.$&&t.nodeType==CKEDITOR.NODE_TEXT&&(r||!t.nodeValue)||(i++,r=t.nodeType==CKEDITOR.NODE_TEXT);while(t=t.previousSibling);return i},getNextSourceNode:function(n,t,i){var u,i,n,r;if(i&&!i.call&&(u=i,i=function(n){return!n.equals(u)}),n=!n&&this.getFirst&&this.getFirst(),!n){if(this.type==CKEDITOR.NODE_ELEMENT&&i&&i(this,!0)===!1)return null;n=this.getNext()}for(;!n&&(r=(r||this).getParent());){if(i&&i(r,!0)===!1)return null;n=r.getNext()}return!n||i&&i(n)===!1?null:t&&t!=n.type?n.getNextSourceNode(!1,t,i):n},getPreviousSourceNode:function(n,t,i){var u,i,n,r;if(i&&!i.call&&(u=i,i=function(n){return!n.equals(u)}),n=!n&&this.getLast&&this.getLast(),!n){if(this.type==CKEDITOR.NODE_ELEMENT&&i&&i(this,!0)===!1)return null;n=this.getPrevious()}for(;!n&&(r=(r||this).getParent());){if(i&&i(r,!0)===!1)return null;n=r.getPrevious()}return!n||i&&i(n)===!1?null:t&&n.type!=t?n.getPreviousSourceNode(!1,t,i):n},getPrevious:function(n){var t=this.$,i;do i=(t=t.previousSibling)&&t.nodeType!=10&&new CKEDITOR.dom.node(t);while(i&&n&&!n(i));return i},getNext:function(n){var i=this.$,t;do t=(i=i.nextSibling)&&new CKEDITOR.dom.node(i);while(t&&n&&!n(t));return t},getParent:function(n){var t=this.$.parentNode;return t&&(t.nodeType==CKEDITOR.NODE_ELEMENT||n&&t.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(t):null},getParents:function(n){var t=this,i=[];do i[n?"push":"unshift"](t);while(t=t.getParent());return i},getCommonAncestor:function(n){if(n.equals(this))return this;if(n.contains&&n.contains(this))return n;var t=this.contains?this:this.getParent();do if(t.contains(n))return t;while(t=t.getParent());return null},getPosition:function(n){var t=this.$,i=n.$;if(t.compareDocumentPosition)return t.compareDocumentPosition(i);if(t==i)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&n.type==CKEDITOR.NODE_ELEMENT){if(t.contains){if(t.contains(i))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(i.contains(t))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in t)return t.sourceIndex<0||i.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:t.sourceIndex<i.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var t=this.getAddress(),n=n.getAddress(),i=Math.min(t.length,n.length),r=0;r<=i-1;r++)if(t[r]!=n[r]){if(r<i)return t[r]<n[r]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return t.length<n.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(n,t){var i=this.$,r;for(t||(i=i.parentNode);i;){if(i.nodeName&&(r=i.nodeName.toLowerCase(),typeof n=="string"?r==n:r in n))return new CKEDITOR.dom.node(i);i=i.parentNode}return null},hasAscendant:function(n,t){var i=this.$;for(t||(i=i.parentNode);i;){if(i.nodeName&&i.nodeName.toLowerCase()==n)return!0;i=i.parentNode}return!1},move:function(n,t){n.append(this.remove(),t)},remove:function(n){var t=this.$,i=t.parentNode;if(i){if(n)for(;n=t.firstChild;)i.insertBefore(t.removeChild(n),t);i.removeChild(t)}return this},replace:function(n){this.insertBefore(n);n.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var n,t,i;this.getFirst&&(n=this.getFirst());){if(n.type==CKEDITOR.NODE_TEXT)if(t=CKEDITOR.tools.ltrim(n.getText()),i=n.getLength(),t)t.length<i&&(n.split(i-t.length),this.$.removeChild(this.$.firstChild));else{n.remove();continue}break}},rtrim:function(){for(var n,t,i;this.getLast&&(n=this.getLast());){if(n.type==CKEDITOR.NODE_TEXT)if(t=CKEDITOR.tools.rtrim(n.getText()),i=n.getLength(),t)t.length<i&&(n.split(t.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{n.remove();continue}break}CKEDITOR.env.ie||CKEDITOR.env.opera||(n=this.$.lastChild)&&n.type==1&&n.nodeName.toLowerCase()=="br"&&n.parentNode.removeChild(n)},isReadOnly:function(){var n=this;if(this.type!=CKEDITOR.NODE_ELEMENT&&(n=this.getParent()),n&&typeof n.$.isContentEditable!="undefined")return!(n.$.isContentEditable||n.data("cke-editable"));for(;n;){if(n.data("cke-editable"))break;if(n.getAttribute("contentEditable")=="false")return!0;if(n.getAttribute("contentEditable")=="true")break;n=n.getParent()}return!n}});CKEDITOR.dom.window=function(n){CKEDITOR.dom.domObject.call(this,n)};CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject;CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var n=this.$.document,t=n.compatMode=="CSS1Compat";return{width:(t?n.documentElement.clientWidth:n.body.clientWidth)||0,height:(t?n.documentElement.clientHeight:n.body.clientHeight)||0}},getScrollPosition:function(){var n=this.$;return"pageXOffset"in n?{x:n.pageXOffset||0,y:n.pageYOffset||0}:(n=n.document,{x:n.documentElement.scrollLeft||n.body.scrollLeft||0,y:n.documentElement.scrollTop||n.body.scrollTop||0})},getFrame:function(){var n=this.$.frameElement;return n?new CKEDITOR.dom.element.get(n):null}});CKEDITOR.dom.document=function(n){CKEDITOR.dom.domObject.call(this,n)};CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject;CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(n){if(this.$.createStyleSheet)this.$.createStyleSheet(n);else{var t=new CKEDITOR.dom.element("link");t.setAttributes({rel:"stylesheet",type:"text/css",href:n});this.getHead().append(t)}},appendStyleText:function(n){var i,t;return this.$.createStyleSheet?(i=this.$.createStyleSheet(""),i.cssText=n):(t=new CKEDITOR.dom.element("style",this),t.append(new CKEDITOR.dom.text(n,this)),this.getHead().append(t)),i||t.$.sheet},createElement:function(n,t){var i=new CKEDITOR.dom.element(n,this);return t&&(t.attributes&&i.setAttributes(t.attributes),t.styles&&i.setStyles(t.styles)),i},createText:function(n){return new CKEDITOR.dom.text(n,this)},focus:function(){this.getWindow().focus()},getActive:function(){return new CKEDITOR.dom.element(this.$.activeElement)},getById:function(n){return(n=this.$.getElementById(n))?new CKEDITOR.dom.element(n):null},getByAddress:function(n,t){for(var e,o,f,r,i=this.$.documentElement,u=0;i&&u<n.length;u++)if(e=n[u],t){for(o=-1,f=0;f<i.childNodes.length;f++)if(r=i.childNodes[f],!(t===!0&&r.nodeType==3&&r.previousSibling&&r.previousSibling.nodeType==3)&&(o++,o==e)){i=r;break}}else i=i.childNodes[e];return i?new CKEDITOR.dom.node(i):null},getElementsByTag:function(n,t){return(!CKEDITOR.env.ie||document.documentMode>8)&&t&&(n=t+":"+n),new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(n))},getHead:function(){var n=this.$.getElementsByTagName("head")[0];return n?new CKEDITOR.dom.element(n):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){var n=new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return n})()},write:function(n){this.$.open("text/html","replace");CKEDITOR.env.isCustomDomain()&&(this.$.domain=document.domain);this.$.write(n);this.$.close()}});CKEDITOR.dom.nodeList=function(n){this.$=n};CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(n){return n<0||n>=this.$.length?null:(n=this.$[n])?new CKEDITOR.dom.node(n):null}};CKEDITOR.dom.element=function(n,t){typeof n=="string"&&(n=(t?t.$:document).createElement(n));CKEDITOR.dom.domObject.call(this,n)};CKEDITOR.dom.element.get=function(n){return(n=typeof n=="string"?document.getElementById(n)||document.getElementsByName(n)[0]:n)&&(n.$?n:new CKEDITOR.dom.element(n))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(n,t){var i=new CKEDITOR.dom.element("div",t);return i.setHtml(n),i.getFirst().remove()};CKEDITOR.dom.element.setMarker=function(n,t,i,r){var u=t.getCustomData("list_marker_id")||t.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),f=t.getCustomData("list_marker_names")||t.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");return n[u]=t,f[i]=1,t.setCustomData(i,r)};CKEDITOR.dom.element.clearAllMarkers=function(n){for(var t in n)CKEDITOR.dom.element.clearMarkers(n,n[t],1)};CKEDITOR.dom.element.clearMarkers=function(n,t,i){var r=t.getCustomData("list_marker_names"),u=t.getCustomData("list_marker_id");for(var f in r)t.removeCustomData(f);t.removeCustomData("list_marker_names");i&&(t.removeCustomData("list_marker_id"),delete n[u])},function(){function n(n){for(var i=0,r=0,u=t[n].length;r<u;r++)i=i+(parseInt(this.getComputedStyle(t[n][r])||0,10)||0);return i}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(n){var t=this.$.className;t&&(RegExp("(?:^|\\s)"+n+"(?:\\s|$)","").test(t)||(t=t+(" "+n)));this.$.className=t||n},removeClass:function(n){var t=this.getAttribute("class");return t&&(n=RegExp("(?:^|\\s+)"+n+"(?=\\s|$)","i"),n.test(t)&&((t=t.replace(n,"").replace(/^\s+/,""))?this.setAttribute("class",t):this.removeAttribute("class"))),this},hasClass:function(n){return RegExp("(?:^|\\s+)"+n+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(n,t){return typeof n=="string"&&(n=this.getDocument().createElement(n)),t?this.$.insertBefore(n.$,this.$.firstChild):this.$.appendChild(n.$),n},appendHtml:function(n){if(this.$.childNodes.length){var t=new CKEDITOR.dom.element("div",this.getDocument());t.setHtml(n);t.moveChildren(this)}else this.setHtml(n)},appendText:function(n){this.$.text!=void 0?this.$.text=this.$.text+n:this.append(new CKEDITOR.dom.text(n))},appendBogus:function(){for(var n=this.getLast();n&&n.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(n.getText());)n=n.getPrevious();n&&n.is&&n.is("br")||(n=CKEDITOR.env.opera?this.getDocument().createText(""):this.getDocument().createElement("br"),CKEDITOR.env.gecko&&n.setAttribute("type","_moz"),this.append(n))},breakParent:function(n){var t=new CKEDITOR.dom.range(this.getDocument());t.setStartAfter(this);t.setEndAfter(n);n=t.extractContents();t.insertNode(this.remove());n.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(n){var t=this.$;return n.type!=CKEDITOR.NODE_ELEMENT?t.contains(n.getParent().$):t!=n.$&&t.contains(n.$)}:function(n){return!!(this.$.compareDocumentPosition(n.$)&16)},focus:function(){function n(){try{this.$.focus()}catch(n){}}return function(t){t?CKEDITOR.tools.setTimeout(n,100,this):n.call(this)}}(),getHtml:function(){var n=this.$.innerHTML;return CKEDITOR.env.ie?n.replace(/<\?[^>]*>/g,""):n},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var n=this.$.ownerDocument.createElement("div");return n.appendChild(this.$.cloneNode(!0)),n.innerHTML},getClientRect:function(){var n=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());return n.width||(n.width=n.right-n.left),n.height||(n.height=n.bottom-n.top),n},setHtml:function(){var n=function(n){return this.$.innerHTML=n};return CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(n){try{return this.$.innerHTML=n}catch(i){this.$.innerHTML="";var t=new CKEDITOR.dom.element("body",this.getDocument());for(t.$.innerHTML=n,t=t.getChildren();t.count();)this.append(t.getItem(0));return n}}:n}(),setText:function(n){return CKEDITOR.dom.element.prototype.setText=this.$.innerText!=void 0?function(n){return this.$.innerText=n}:function(n){return this.$.textContent=n},this.setText(n)},getAttribute:function(){var n=function(n){return this.$.getAttribute(n,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(n){switch(n){case"class":n="className";break;case"http-equiv":n="httpEquiv";break;case"name":return this.$.name;case"tabindex":return n=this.$.getAttribute(n,2),n!==0&&this.$.tabIndex===0&&(n=null),n;case"checked":return n=this.$.attributes.getNamedItem(n),(n.specified?n.nodeValue:this.$.checked)?"checked":null;case"hspace":case"value":return this.$[n];case"style":return this.$.style.cssText;case"contenteditable":case"contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(n,2)}:n}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(n){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(n)]}:function(n){var t=this.getWindow().$.getComputedStyle(this.$,null);return t?t.getPropertyValue(n):""},getDtd:function(){var n=CKEDITOR.dtd[this.getName()];return this.getDtd=function(){return n},n},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var n=this.$.tabIndex;return n!==0||CKEDITOR.dtd.$tabIndex[this.getName()]||parseInt(this.getAttribute("tabindex"),10)===0||(n=-1),n}:CKEDITOR.env.webkit?function(){var n=this.$.tabIndex;return n==void 0&&(n=parseInt(this.getAttribute("tabindex"),10),isNaN(n)&&(n=-1)),n}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var n=this.$.nodeName.toLowerCase(),t;return!CKEDITOR.env.ie||document.documentMode>8||(t=this.$.scopeName,t!="HTML"&&(n=t.toLowerCase()+":"+n)),(this.getName=function(){return n})()},getValue:function(){return this.$.value},getFirst:function(n){var t=this.$.firstChild;return(t=t&&new CKEDITOR.dom.node(t))&&n&&!n(t)&&(t=t.getNext(n)),t},getLast:function(n){var t=this.$.lastChild;return(t=t&&new CKEDITOR.dom.node(t))&&n&&!n(t)&&(t=t.getPrevious(n)),t},getStyle:function(n){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(n)]},is:function(){var t=this.getName(),n;if(typeof arguments[0]=="object")return!!arguments[0][t];for(n=0;n<arguments.length;n++)if(arguments[n]==t)return!0;return!1},isEditable:function(n){var t=this.getName();return this.isReadOnly()||this.getComputedStyle("display")=="none"||this.getComputedStyle("visibility")=="hidden"||CKEDITOR.dtd.$nonEditable[t]||CKEDITOR.dtd.$empty[t]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:n!==!1?(n=CKEDITOR.dtd[t]||CKEDITOR.dtd.span,!(!n||!n["#"])):!0},isIdentical:function(n){var t=this.clone(0,1),n=n.clone(0,1),i;return(t.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),n.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),t.$.isEqualNode)?(t.$.style.cssText=CKEDITOR.tools.normalizeCssText(t.$.style.cssText),n.$.style.cssText=CKEDITOR.tools.normalizeCssText(n.$.style.cssText),t.$.isEqualNode(n.$)):(t=t.getOuterHtml(),n=n.getOuterHtml(),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")&&(i=this.getParent(),i.type==CKEDITOR.NODE_ELEMENT&&(i=i.clone(),i.setHtml(t),t=i.getHtml(),i.setHtml(n),n=i.getHtml())),t==n)},isVisible:function(){var n=(this.$.offsetHeight||this.$.offsetWidth)&&this.getComputedStyle("visibility")!="hidden",t,i;return n&&(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&(t=this.getWindow(),!t.equals(CKEDITOR.document.getWindow())&&(i=t.$.frameElement)&&(n=new CKEDITOR.dom.element(i).isVisible())),!!n},isEmptyInlineRemoveable:function(){var n;if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var i=this.getChildren(),t=0,r=i.count();t<r;t++)if(n=i.getItem(t),!(n.type==CKEDITOR.NODE_ELEMENT&&n.data("cke-bookmark"))&&(n.type==CKEDITOR.NODE_ELEMENT&&!n.isEmptyInlineRemoveable()||n.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(n.getText())))return!1;return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(){for(var i,t=this.$.attributes,n=0;n<t.length;n++){i=t[n];switch(i.nodeName){case"class":if(this.getAttribute("class"))return!0;case"data-cke-expando":continue;default:if(i.specified)return!0}}return!1}:function(){var n=this.$.attributes,t=n.length,i={"data-cke-expando":1,_moz_dirty:1};return t>0&&(t>2||!i[n[0].nodeName]||t==2&&!i[n[1].nodeName])},hasAttribute:function(){function n(n){return n=this.$.attributes.getNamedItem(n),!(!n||!n.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(t){return t=="name"?!!this.$.name:n.call(this,t)}:n}(),hide:function(){this.setStyle("display","none")},moveChildren:function(n,t){var i=this.$,n=n.$,r;if(i!=n)if(t)for(;r=i.lastChild;)n.insertBefore(i.removeChild(r),n.firstChild);else for(;r=i.firstChild;)n.appendChild(i.removeChild(r))},mergeSiblings:function(){function n(n,t,i){var r,u;if(t&&t.type==CKEDITOR.NODE_ELEMENT){for(r=[];t.data("cke-bookmark")||t.isEmptyInlineRemoveable();)if(r.push(t),t=i?t.getNext():t.getPrevious(),!t||t.type!=CKEDITOR.NODE_ELEMENT)return;if(n.isIdentical(t)){for(u=i?n.getLast():n.getFirst();r.length;)r.shift().move(n,!i);t.moveChildren(n,!i);t.remove();u&&u.type==CKEDITOR.NODE_ELEMENT&&u.mergeSiblings()}}}return function(t){(t===!1||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))&&(n(this,this.getNext(),!0),n(this,this.getPrevious()))}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var n=function(n,t){return this.$.setAttribute(n,t),this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(t,i){return t=="class"?this.$.className=i:t=="style"?this.$.style.cssText=i:t=="tabindex"?this.$.tabIndex=i:t=="checked"?this.$.checked=i:t=="contenteditable"?n.call(this,"contentEditable",i):n.apply(this,arguments),this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(t,i){if(t=="src"&&i.match(/^http:\/\//))try{n.apply(this,arguments)}catch(r){}else n.apply(this,arguments);return this}:n}(),setAttributes:function(n){for(var t in n)this.setAttribute(t,n[t]);return this},setValue:function(n){return this.$.value=n,this},removeAttribute:function(){var n=function(n){this.$.removeAttribute(n)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(n){n=="class"?n="className":n=="tabindex"?n="tabIndex":n=="contenteditable"&&(n="contentEditable");this.$.removeAttribute(n)}:n}(),removeAttributes:function(n){if(CKEDITOR.tools.isArray(n))for(var t=0;t<n.length;t++)this.removeAttribute(n[t]);else for(t in n)n.hasOwnProperty(t)&&this.removeAttribute(t)},removeStyle:function(n){var t=this.$.style,r,u,i,f;if(t.removeProperty||n!="border"&&n!="margin"&&n!="padding")t.removeProperty?t.removeProperty(n):t.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(n)),this.$.style.cssText||this.removeAttribute("style");else{for(r=["top","left","right","bottom"],n=="border"&&(u=["color","style","width"]),t=[],i=0;i<r.length;i++)if(u)for(f=0;f<u.length;f++)t.push([n,r[i],u[f]].join("-"));else t.push([n,r[i]].join("-"));for(n=0;n<t.length;n++)this.removeStyle(t[n])}},setStyle:function(n,t){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(n)]=t,this},setStyles:function(n){for(var t in n)this.setStyle(t,n[t]);return this},setOpacity:function(n){CKEDITOR.env.ie&&CKEDITOR.env.version<9?(n=Math.round(n*100),this.setStyle("filter",n>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+n+")")):this.setStyle("opacity",n)},unselectable:function(){if(this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none")),CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var t,i=this.getElementsByTag("*"),n=0,r=i.count();n<r;n++)t=i.getItem(n),t.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var n=this;n.getName()!="html";){if(n.getComputedStyle("position")!="static")return n;n=n.getParent()}return null},getDocumentPosition:function(n){var r=0,u=0,i=this.getDocument(),t=i.getBody(),f=i.$.compatMode=="BackCompat";if(document.documentElement.getBoundingClientRect){var e=this.$.getBoundingClientRect(),o=i.$.documentElement,h=o.clientTop||t.$.clientTop||0,c=o.clientLeft||t.$.clientLeft||0,s=!0;CKEDITOR.env.ie&&(s=i.getDocumentElement().contains(this),i=i.getBody().contains(this),s=f&&i||!f&&s);s&&(r=e.left+(!f&&o.scrollLeft||t.$.scrollLeft),r=r-c,u=e.top+(!f&&o.scrollTop||t.$.scrollTop),u=u-h)}else for(t=this,i=null;t&&!(t.getName()=="body"||t.getName()=="html");){for(r=r+(t.$.offsetLeft-t.$.scrollLeft),u=u+(t.$.offsetTop-t.$.scrollTop),t.equals(this)||(r=r+(t.$.clientLeft||0),u=u+(t.$.clientTop||0));i&&!i.equals(t);)r=r-i.$.scrollLeft,u=u-i.$.scrollTop,i=i.getParent();i=t;t=(e=t.$.offsetParent)?new CKEDITOR.dom.element(e):null}return n&&(t=this.getWindow(),i=n.getWindow(),!t.equals(i)&&t.$.frameElement&&(n=new CKEDITOR.dom.element(t.$.frameElement).getDocumentPosition(n),r=r+n.x,u=u+n.y)),document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||f||(r=r+(this.$.clientLeft?1:0),u=u+(this.$.clientTop?1:0)),{x:r,y:u}},scrollIntoView:function(n){var t=this.getParent(),r,i;if(t)do if((t.$.clientWidth&&t.$.clientWidth<t.$.scrollWidth||t.$.clientHeight&&t.$.clientHeight<t.$.scrollHeight)&&!t.is("body")&&this.scrollIntoParent(t,n,1),t.is("html")){r=t.getWindow();try{i=r.$.frameElement;i&&(t=new CKEDITOR.dom.element(i))}catch(u){}}while(t=t.getParent())},scrollIntoParent:function(n,t,i){function l(t,i){/body|html/.test(n.getName())?n.getWindow().$.scrollBy(t,i):(n.$.scrollLeft=n.$.scrollLeft+t,n.$.scrollTop=n.$.scrollTop+i)}function h(n,t){var r={x:0,y:0},i;return n.is(c?"body":"html")||(i=n.$.getBoundingClientRect(),r.x=i.left,r.y=i.top),i=n.getWindow(),i.equals(t)||(i=h(CKEDITOR.dom.element.get(i.$.frameElement),t),r.x=r.x+i.x,r.y=r.y+i.y),r}function s(n,t){return parseInt(n.getComputedStyle("margin-"+t)||0,10)||0}var f,u,r,e,c,o,a,v,y;n||(n=this.getWindow());r=n.getDocument();c=r.$.compatMode=="BackCompat";n instanceof CKEDITOR.dom.window&&(n=c?r.getBody():r.getDocumentElement());r=n.getWindow();u=h(this,r);o=h(n,r);a=this.$.offsetHeight;f=this.$.offsetWidth;v=n.$.clientHeight;y=n.$.clientWidth;r=u.x-s(this,"left")-o.x||0;e=u.y-s(this,"top")-o.y||0;f=u.x+f+s(this,"right")-(o.x+y)||0;u=u.y+a+s(this,"bottom")-(o.y+v)||0;(e<0||u>0)&&l(0,t===!0?e:t===!1?u:e<0?e:u);i&&(r<0||f>0)&&l(r<0?r:f,0)},setState:function(n,t,i){t=t||"cke";switch(n){case CKEDITOR.TRISTATE_ON:this.addClass(t+"_on");this.removeClass(t+"_off");this.removeClass(t+"_disabled");i&&this.setAttribute("aria-pressed",!0);i&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(t+"_disabled");this.removeClass(t+"_off");this.removeClass(t+"_on");i&&this.setAttribute("aria-disabled",!0);i&&this.removeAttribute("aria-pressed");break;default:this.addClass(t+"_off");this.removeClass(t+"_on");this.removeClass(t+"_disabled");i&&this.removeAttribute("aria-pressed");i&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var n=this.$;try{n.contentWindow.document}catch(t){n.src=n.src}return n&&new CKEDITOR.dom.document(n.contentWindow.document)},copyAttributes:function(n,t){for(var u,i,r,e=this.$.attributes,t=t||{},f=0;f<e.length;f++)u=e[f],i=u.nodeName.toLowerCase(),i in t||(i=="checked"&&(r=this.getAttribute(i))?n.setAttribute(i,r):(u.specified||CKEDITOR.env.ie&&u.nodeValue&&i=="value")&&(r=this.getAttribute(i),r===null&&(r=u.nodeValue),n.setAttribute(i,r)));this.$.style.cssText!==""&&(n.$.style.cssText=this.$.style.cssText)},renameNode:function(n){if(this.getName()!=n){var t=this.getDocument(),n=new CKEDITOR.dom.element(n,t);this.copyAttributes(n);this.moveChildren(n);this.getParent()&&this.$.parentNode.replaceChild(n.$,this.$);n.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=n.$}},getChild:function(){function n(n,t){var i=n.childNodes;if(t>=0&&t<i.length)return i[t]}return function(t){var i=this.$;if(t.slice)for(;t.length>0&&i;)i=n(i,t.shift());else i=n(i,t);return i?new CKEDITOR.dom.node(i):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(n){n.data.getTarget().hasClass("cke_enable_context_menu")||n.data.preventDefault()})},getDirection:function(n){return n?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(n,t){return(n="data-"+n,t===void 0)?this.getAttribute(n):(t===!1?this.removeAttribute(n):this.setAttribute(n,t),null)},getEditor:function(){var t=CKEDITOR.instances,i,n;for(i in t)if(n=t[i],n.element.equals(this)&&n.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return n;return null}});var t={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(t,i,r){typeof i=="number"&&(!r||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(i=i-n.call(this,t)),this.setStyle(t,i+"px"))};CKEDITOR.dom.element.prototype.getSize=function(t,i){var r=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(t)],this.$["client"+CKEDITOR.tools.capitalize(t)])||0;return i&&(r=r-n.call(this,t)),r}}();CKEDITOR.dom.documentFragment=function(n){n=n||CKEDITOR.document;this.$=n.type==CKEDITOR.NODE_DOCUMENT?n.$.createDocumentFragment():n};CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(n){n=n.$;n.parentNode.insertBefore(this.$,n.nextSibling)}},!0,{append:1,appendBogus:1,getFirst:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),function(){function n(n,t){var u=this.range,i,r,y,h,p,c,l;if(this._.end)return null;if(!this._.start){if(this._.start=1,u.collapsed)return this.end(),null;u.optimize()}r=u.startContainer;i=u.endContainer;var o=u.startOffset,s=u.endOffset,f,a=this.guard,e=this.type,v=n?"getPreviousSourceNode":"getNextSourceNode";for(n||this._.guardLTR||(y=i.type==CKEDITOR.NODE_ELEMENT?i:i.getParent(),h=i.type==CKEDITOR.NODE_ELEMENT?i.getChild(s):i.getNext(),this._.guardLTR=function(n,t){return(!t||!y.equals(n))&&(!h||!n.equals(h))&&(n.type!=CKEDITOR.NODE_ELEMENT||!t||!n.equals(u.root))}),n&&!this._.guardRTL&&(p=r.type==CKEDITOR.NODE_ELEMENT?r:r.getParent(),c=r.type==CKEDITOR.NODE_ELEMENT?o?r.getChild(o-1):null:r.getPrevious(),this._.guardRTL=function(n,t){return(!t||!p.equals(n))&&(!c||!n.equals(c))&&(n.type!=CKEDITOR.NODE_ELEMENT||!t||!n.equals(u.root))}),l=n?this._.guardRTL:this._.guardLTR,f=a?function(n,t){return l(n,t)===!1?!1:a(n,t)}:l,this.current?i=this.current[v](!1,e,f):(n?i.type==CKEDITOR.NODE_ELEMENT&&(i=s>0?i.getChild(s-1):f(i,!0)===!1?null:i.getPreviousSourceNode(!0,e,f)):(i=r,i.type!=CKEDITOR.NODE_ELEMENT||(i=i.getChild(o))||(i=f(r,!0)===!1?null:r.getNextSourceNode(!0,e,f))),i&&f(i)===!1&&(i=null));i&&!this._.end;){if(this.current=i,this.evaluator&&this.evaluator(i)===!1){if(t&&this.evaluator)return!1}else if(!t)return i;i=i[v](!1,e,f)}return this.end(),this.current=null}function t(t){for(var i,r=null;i=n.call(this,t);)r=i;return r}var i;CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(n){this.range=n;this._={}},proto:{end:function(){this._.end=1},next:function(){return n.call(this)},previous:function(){return n.call(this,1)},checkForward:function(){return n.call(this,0,1)!==!1},checkBackward:function(){return n.call(this,1,1)!==!1},lastForward:function(){return t.call(this)},lastBackward:function(){return t.call(this,1)},reset:function(){delete this.current;this._={}}}});i={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(n){return n=n?CKEDITOR.tools.extend({},CKEDITOR.dtd.$block,n||{}):CKEDITOR.dtd.$block,this.getComputedStyle("float")=="none"&&i[this.getComputedStyle("display")]||n[this.getName()]};CKEDITOR.dom.walker.blockBoundary=function(n){return function(t){return!(t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary(n))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(n,t){function i(n){return n&&n.getName&&n.getName()=="span"&&n.data("cke-bookmark")}return function(r){var u,f;return u=r&&r.type!=CKEDITOR.NODE_ELEMENT&&(f=r.getParent())&&i(f),u=n?u:u||i(r),!!(t^u)}};CKEDITOR.dom.walker.whitespaces=function(n){return function(t){var i;return t&&t.type==CKEDITOR.NODE_TEXT&&(i=!CKEDITOR.tools.trim(t.getText())||CKEDITOR.env.webkit&&t.getText()=="​"),!!(n^i)}};CKEDITOR.dom.walker.invisible=function(n){var t=CKEDITOR.dom.walker.whitespaces();return function(i){return t(i)?i=1:(i.type==CKEDITOR.NODE_TEXT&&(i=i.getParent()),i=!i.$.offsetHeight),!!(n^i)}};CKEDITOR.dom.walker.nodeType=function(n,t){return function(i){return!!(t^i.type==n)}};CKEDITOR.dom.walker.bogus=function(n){function t(n){return!u(n)&&!f(n)}return function(i){var u=CKEDITOR.env.ie?i.getText&&r.test(i.getText()):i.is&&i.is("br");return u&&(u=i.getParent(),i=i.getNext(t),u=u.isBlockBoundary()&&(!i||i.type==CKEDITOR.NODE_ELEMENT&&i.isBlockBoundary())),!!(n^u)}};var r=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,u=CKEDITOR.dom.walker.whitespaces(),f=CKEDITOR.dom.walker.bookmark();CKEDITOR.dom.element.prototype.getBogus=function(){var n=this;do n=n.getPreviousSourceNode();while(f(n)||u(n)||n.type==CKEDITOR.NODE_ELEMENT&&n.getName()in CKEDITOR.dtd.$inline&&!(n.getName()in CKEDITOR.dtd.$empty));return n&&(CKEDITOR.env.ie?n.getText&&r.test(n.getText()):n.is&&n.is("br"))?n:!1}}();CKEDITOR.dom.range=function(n){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var t=n instanceof CKEDITOR.dom.document;this.document=t?n:n.getDocument();this.root=t?n.getBody():n},function(){function r(){var n=!1,t=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark(!0),r=CKEDITOR.dom.walker.bogus();return function(u){return i(u)||t(u)?!0:r(u)&&!n?n=!0:u.type==CKEDITOR.NODE_TEXT&&(u.hasAscendant("pre")||CKEDITOR.tools.trim(u.getText()).length)||u.type==CKEDITOR.NODE_ELEMENT&&!u.is(e)?!1:!0}}function f(n){var t=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark(1);return function(r){return i(r)||t(r)?!0:!n&&o(r)||r.type==CKEDITOR.NODE_ELEMENT&&r.is(CKEDITOR.dtd.$removeEmpty)}}function u(n){return!s(n)&&!h(n)}var n=function(n){n.collapsed=n.startContainer&&n.endContainer&&n.startContainer.equals(n.endContainer)&&n.startOffset==n.endOffset},t=function(n,t,i,r){var h,c,l,s,a,o,u,p,w,v;n.optimizeBookmark();var f=n.startContainer,e=n.endContainer,h=n.startOffset,c=n.endOffset,y,b;for(e.type==CKEDITOR.NODE_TEXT?e=e.split(c):e.getChildCount()>0&&(c>=e.getChildCount()?(e=e.append(n.document.createText("")),b=!0):e=e.getChild(c)),f.type==CKEDITOR.NODE_TEXT?(f.split(h),f.equals(e)&&(e=f.getNext())):h?h>=f.getChildCount()?(f=f.append(n.document.createText("")),y=!0):f=f.getChild(h).getPrevious():(f=f.append(n.document.createText(""),1),y=!0),h=f.getParents(),c=e.getParents(),l=0;l<h.length;l++)if(s=h[l],a=c[l],!s.equals(a))break;for(o=i,v=l;v<h.length;v++){for(u=h[v],o&&!u.equals(f)&&(p=o.append(u.clone())),u=u.getNext();u;){if(u.equals(c[v])||u.equals(e))break;w=u.getNext();t==2?o.append(u.clone(!0)):(u.remove(),t==1&&o.append(u));u=w}o&&(o=p)}for(o=i,i=l;i<c.length;i++){if(u=c[i],t>0&&!u.equals(e)&&(p=o.append(u.clone())),!h[i]||u.$.parentNode!=h[i].$.parentNode)for(u=u.getPrevious();u;){if(u.equals(h[i])||u.equals(f))break;w=u.getPrevious();t==2?o.$.insertBefore(u.$.cloneNode(!0),o.$.firstChild):(u.remove(),t==1&&o.$.insertBefore(u.$,o.$.firstChild));u=w}o&&(o=p)}t==2?(s=n.startContainer,s.type==CKEDITOR.NODE_TEXT&&(s.$.data=s.$.data+s.$.nextSibling.data,s.$.parentNode.removeChild(s.$.nextSibling)),n=n.endContainer,n.type==CKEDITOR.NODE_TEXT&&n.$.nextSibling&&(n.$.data=n.$.data+n.$.nextSibling.data,n.$.parentNode.removeChild(n.$.nextSibling))):(s&&a&&(f.$.parentNode!=s.$.parentNode||e.$.parentNode!=a.$.parentNode)&&(t=a.getIndex(),y&&a.$.parentNode==f.$.parentNode&&t--,r&&s.type==CKEDITOR.NODE_ELEMENT?(r=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none">&nbsp;<\/span>',n.document),r.insertAfter(s),s.mergeSiblings(!1),n.moveToBookmark({startNode:r})):n.setStart(a.getParent(),t)),n.collapse(!0));y&&f.remove();b&&e.$.parentNode&&e.remove()},e={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},o=CKEDITOR.dom.walker.bogus(),s=new CKEDITOR.dom.walker.whitespaces,h=new CKEDITOR.dom.walker.bookmark,i=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/;CKEDITOR.dom.range.prototype={clone:function(){var n=new CKEDITOR.dom.range(this.root);return n.startContainer=this.startContainer,n.startOffset=this.startOffset,n.endContainer=this.endContainer,n.endOffset=this.endOffset,n.collapsed=this.collapsed,n},collapse:function(n){n?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(){var n=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||t(this,2,n),n},deleteContents:function(n){this.collapsed||t(this,0,null,n)},extractContents:function(n){var i=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||t(this,1,i,n),i},createBookmark:function(n){var t,i,u,r,f=this.collapsed;return t=this.document.createElement("span"),t.data("cke-bookmark",1),t.setStyle("display","none"),t.setHtml("&nbsp;"),n&&(u="cke_bm_"+CKEDITOR.tools.getNextNumber(),t.setAttribute("id",u+(f?"C":"S"))),f||(i=t.clone(),i.setHtml("&nbsp;"),n&&i.setAttribute("id",u+"E"),r=this.clone(),r.collapse(),r.insertNode(i)),r=this.clone(),r.collapse(!0),r.insertNode(t),i?(this.setStartAfter(t),this.setEndBefore(i)):this.moveToPosition(t,CKEDITOR.POSITION_AFTER_END),{startNode:n?u+(f?"C":"S"):t,endNode:n?u+"E":i,serializable:n,collapsed:f}},createBookmark2:function(n){var i=this.startContainer,r=this.endContainer,f=this.startOffset,e=this.endOffset,o=this.collapsed,t,u;if(!i||!r)return{start:0,end:0};if(n){for(i.type==CKEDITOR.NODE_ELEMENT&&((t=i.getChild(f))&&t.type==CKEDITOR.NODE_TEXT&&f>0&&t.getPrevious().type==CKEDITOR.NODE_TEXT&&(i=t,f=0),t&&t.type==CKEDITOR.NODE_ELEMENT&&(f=t.getIndex(1)));i.type==CKEDITOR.NODE_TEXT&&(u=i.getPrevious())&&u.type==CKEDITOR.NODE_TEXT;)i=u,f=f+u.getLength();if(!o)for(r.type==CKEDITOR.NODE_ELEMENT&&((t=r.getChild(e))&&t.type==CKEDITOR.NODE_TEXT&&e>0&&t.getPrevious().type==CKEDITOR.NODE_TEXT&&(r=t,e=0),t&&t.type==CKEDITOR.NODE_ELEMENT&&(e=t.getIndex(1)));r.type==CKEDITOR.NODE_TEXT&&(u=r.getPrevious())&&u.type==CKEDITOR.NODE_TEXT;)r=u,e=e+u.getLength()}return{start:i.getAddress(n),end:o?null:r.getAddress(n),startOffset:f,endOffset:e,normalized:n,collapsed:o,is2:!0}},moveToBookmark:function(n){if(n.is2){var t=this.document.getByAddress(n.start,n.normalized),i=n.startOffset,r=n.end&&this.document.getByAddress(n.end,n.normalized),n=n.endOffset;this.setStart(t,i);r?this.setEnd(r,n):this.collapse(!0)}else t=(i=n.serializable)?this.document.getById(n.startNode):n.startNode,n=i?this.document.getById(n.endNode):n.endNode,this.setStartBefore(t),t.remove(),n?(this.setEndBefore(n),n.remove()):this.collapse(!0)},getBoundaryNodes:function(){var n=this.startContainer,t=this.endContainer,r=this.startOffset,u=this.endOffset,i;if(n.type==CKEDITOR.NODE_ELEMENT)if(i=n.getChildCount(),i>r)n=n.getChild(r);else if(i<1)n=n.getPreviousSourceNode();else{for(n=n.$;n.lastChild;)n=n.lastChild;n=new CKEDITOR.dom.node(n);n=n.getNextSourceNode()||n}if(t.type==CKEDITOR.NODE_ELEMENT)if(i=t.getChildCount(),i>u)t=t.getChild(u).getPreviousSourceNode(!0);else if(i<1)t=t.getPreviousSourceNode();else{for(t=t.$;t.lastChild;)t=t.lastChild;t=new CKEDITOR.dom.node(t)}return n.getPosition(t)&CKEDITOR.POSITION_FOLLOWING&&(n=t),{startNode:n,endNode:t}},getCommonAncestor:function(n,t){var i=this.startContainer,r=this.endContainer,i=i.equals(r)?n&&i.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?i.getChild(this.startOffset):i:i.getCommonAncestor(r);return t&&!i.is?i.getParent():i},optimize:function(){var n=this.startContainer,t=this.startOffset;n.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=n.getLength()&&this.setStartAfter(n):this.setStartBefore(n));n=this.endContainer;t=this.endOffset;n.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=n.getLength()&&this.setEndAfter(n):this.setEndBefore(n))},optimizeBookmark:function(){var t=this.startContainer,n=this.endContainer;t.is&&t.is("span")&&t.data("cke-bookmark")&&this.setStartAt(t,CKEDITOR.POSITION_BEFORE_START);n&&n.is&&n.is("span")&&n.data("cke-bookmark")&&this.setEndAt(n,CKEDITOR.POSITION_AFTER_END)},trim:function(n,t){var i=this.startContainer,r=this.startOffset,u=this.collapsed;if((!n||u)&&i&&i.type==CKEDITOR.NODE_TEXT){if(r)if(r>=i.getLength())r=i.getIndex()+1,i=i.getParent();else{var f=i.split(r),r=i.getIndex()+1,i=i.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(f,this.endOffset-this.startOffset):i.equals(this.endContainer)&&(this.endOffset=this.endOffset+1)}else r=i.getIndex(),i=i.getParent();if(this.setStart(i,r),u){this.collapse(!0);return}}i=this.endContainer;r=this.endOffset;t||u||!i||i.type!=CKEDITOR.NODE_TEXT||(r?(r>=i.getLength()||i.split(r),r=i.getIndex()+1):r=i.getIndex(),i=i.getParent(),this.setEnd(i,r))},enlarge:function(n,t){var v,y,p,w,d,g;switch(n){case CKEDITOR.ENLARGE_INLINE:v=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var c=this.getCommonAncestor(),h=this.root,l,a,i,r,s,e=!1,u,f;for(u=this.startContainer,f=this.startOffset,u.type==CKEDITOR.NODE_TEXT?(f&&(u=!CKEDITOR.tools.trim(u.substring(0,f)).length&&u,e=!!u),!u||(r=u.getPrevious())||(i=u.getParent())):(f&&(r=u.getChild(f-1)||u.getLast()),r||(i=u));i||r;){if(i&&!r){if(!s&&i.equals(c)&&(s=!0),v?i.isBlockBoundary():!h.contains(i))break;e&&i.getComputedStyle("display")=="inline"||(e=!1,s?l=i:this.setStartBefore(i));r=i.getPrevious()}for(;r;)if(u=!1,r.type==CKEDITOR.NODE_COMMENT)r=r.getPrevious();else{if(r.type==CKEDITOR.NODE_TEXT)f=r.getText(),/[^\s\ufeff]/.test(f)&&(r=null),u=/[\s\ufeff]$/.test(f);else if((r.$.offsetWidth>0||t&&r.is("br"))&&!r.data("cke-bookmark"))if(e&&CKEDITOR.dtd.$removeEmpty[r.getName()]){if(f=r.getText(),/[^\s\ufeff]/.test(f))r=null;else for(y=r.$.getElementsByTagName("*"),p=0;w=y[p++];)if(!CKEDITOR.dtd.$removeEmpty[w.nodeName.toLowerCase()]){r=null;break}r&&(u=!!f.length)}else r=null;if(u&&(e?s?l=i:i&&this.setStartBefore(i):e=!0),r){if(u=r.getPrevious(),!i&&!u){i=r;r=null;break}r=u}else i=null}i&&(i=i.getParent())}for(u=this.endContainer,f=this.endOffset,i=r=null,s=e=!1,u.type==CKEDITOR.NODE_TEXT?(u=!CKEDITOR.tools.trim(u.substring(f)).length&&u,e=!(u&&u.getLength()),!u||(r=u.getNext())||(i=u.getParent())):(r=u.getChild(f))||(i=u);i||r;){if(i&&!r){if(!s&&i.equals(c)&&(s=!0),v?i.isBlockBoundary():!h.contains(i))break;e&&i.getComputedStyle("display")=="inline"||(e=!1,s?a=i:i&&this.setEndAfter(i));r=i.getNext()}for(;r;){if(u=!1,r.type==CKEDITOR.NODE_TEXT)f=r.getText(),/[^\s\ufeff]/.test(f)&&(r=null),u=/^[\s\ufeff]/.test(f);else if(r.type==CKEDITOR.NODE_ELEMENT){if((r.$.offsetWidth>0||t&&r.is("br"))&&!r.data("cke-bookmark"))if(e&&CKEDITOR.dtd.$removeEmpty[r.getName()]){if(f=r.getText(),/[^\s\ufeff]/.test(f))r=null;else for(y=r.$.getElementsByTagName("*"),p=0;w=y[p++];)if(!CKEDITOR.dtd.$removeEmpty[w.nodeName.toLowerCase()]){r=null;break}r&&(u=!!f.length)}else r=null}else u=1;if(u&&e&&(s?a=i:this.setEndAfter(i)),r){if(u=r.getNext(),!i&&!u){i=r;r=null;break}r=u}else i=null}i&&(i=i.getParent())}l&&a&&(c=l.contains(a)?a:l,this.setStartBefore(c),this.setEndAfter(c));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:i=new CKEDITOR.dom.range(this.root);h=this.root;i.setStartAt(h,CKEDITOR.POSITION_AFTER_START);i.setEnd(this.startContainer,this.startOffset);i=new CKEDITOR.dom.walker(i);var o,b,nt=CKEDITOR.dom.walker.blockBoundary(n==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),k=function(n){var t=nt(n);return t||(o=n),t},v=function(n){var t=k(n);return!t&&n.is&&n.is("br")&&(b=n),t};if(i.guard=k,i=i.lastBackward(),o=o||h,this.setStartAt(o,!o.is("br")&&(!i&&this.checkStartOfBlock()||i&&o.contains(i))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END),n==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS&&(i=this.clone(),i=new CKEDITOR.dom.walker(i),d=CKEDITOR.dom.walker.whitespaces(),g=CKEDITOR.dom.walker.bookmark(),i.evaluator=function(n){return!d(n)&&!g(n)},(i=i.previous())&&i.type==CKEDITOR.NODE_ELEMENT&&i.is("br")))break;i=this.clone();i.collapse();i.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);i=new CKEDITOR.dom.walker(i);i.guard=n==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?v:k;o=null;i=i.lastForward();o=o||h;this.setEndAt(o,!i&&this.checkEndOfBlock()||i&&o.contains(i)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);b&&this.setEndAfter(b)}},shrink:function(n,t,i){var r,c,l;if(!this.collapsed){var n=n||CKEDITOR.SHRINK_TEXT,r=this.clone(),u=this.startContainer,f=this.endContainer,s=this.startOffset,h=this.endOffset,e=1,o=1;return u&&u.type==CKEDITOR.NODE_TEXT&&(s?s>=u.getLength()?r.setStartAfter(u):(r.setStartBefore(u),e=0):r.setStartBefore(u)),f&&f.type==CKEDITOR.NODE_TEXT&&(h?h>=f.getLength()?r.setEndAfter(f):(r.setEndAfter(f),o=0):r.setEndBefore(f)),r=new CKEDITOR.dom.walker(r),c=CKEDITOR.dom.walker.bookmark(),r.evaluator=function(t){return t.type==(n==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)},r.guard=function(t,r){return c(t)?!0:n==CKEDITOR.SHRINK_ELEMENT&&t.type==CKEDITOR.NODE_TEXT||r&&t.equals(l)||i===!1&&t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()?!1:(r||t.type!=CKEDITOR.NODE_ELEMENT||(l=t),!0)},e&&(u=r[n==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(u,t?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START),o&&(r.reset(),(r=r[n==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(r,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)),!(!e&&!o)}},insertNode:function(n){this.optimizeBookmark();this.trim(!1,!0);var t=this.startContainer,i=t.getChild(this.startOffset);i?n.insertBefore(i):t.append(n);n.getParent()&&n.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(n)},moveToPosition:function(n,t){this.setStartAt(n,t);this.collapse(!0)},moveToRange:function(n){this.setStart(n.startContainer,n.startOffset);this.setEnd(n.endContainer,n.endOffset)},selectNodeContents:function(n){this.setStart(n,0);this.setEnd(n,n.type==CKEDITOR.NODE_TEXT?n.getLength():n.getChildCount())},setStart:function(t,i){t.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[t.getName()]&&(i=t.getIndex(),t=t.getParent());this.startContainer=t;this.startOffset=i;this.endContainer||(this.endContainer=t,this.endOffset=i);n(this)},setEnd:function(t,i){t.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[t.getName()]&&(i=t.getIndex()+1,t=t.getParent());this.endContainer=t;this.endOffset=i;this.startContainer||(this.startContainer=t,this.startOffset=i);n(this)},setStartAfter:function(n){this.setStart(n.getParent(),n.getIndex()+1)},setStartBefore:function(n){this.setStart(n.getParent(),n.getIndex())},setEndAfter:function(n){this.setEnd(n.getParent(),n.getIndex()+1)},setEndBefore:function(n){this.setEnd(n.getParent(),n.getIndex())},setStartAt:function(t,i){switch(i){case CKEDITOR.POSITION_AFTER_START:this.setStart(t,0);break;case CKEDITOR.POSITION_BEFORE_END:t.type==CKEDITOR.NODE_TEXT?this.setStart(t,t.getLength()):this.setStart(t,t.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(t);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(t)}n(this)},setEndAt:function(t,i){switch(i){case CKEDITOR.POSITION_AFTER_START:this.setEnd(t,0);break;case CKEDITOR.POSITION_BEFORE_END:t.type==CKEDITOR.NODE_TEXT?this.setEnd(t,t.getLength()):this.setEnd(t,t.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(t);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(t)}n(this)},fixBlock:function(n,t){var r=this.createBookmark(),i=this.document.createElement(t);return this.collapse(n),this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),this.extractContents().appendTo(i),i.trim(),CKEDITOR.env.ie||i.appendBogus(),this.insertNode(i),this.moveToBookmark(r),i},splitBlock:function(n){var r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),f=new CKEDITOR.dom.elementPath(this.endContainer,this.root),t=r.block,i=f.block,u=null;return r.blockLimit.equals(f.blockLimit)?(n!="br"&&(t||(t=this.fixBlock(!0,n),i=new CKEDITOR.dom.elementPath(this.endContainer,this.root).block),i||(i=this.fixBlock(!1,n))),n=t&&this.checkStartOfBlock(),r=i&&this.checkEndOfBlock(),this.deleteContents(),t&&t.equals(i)&&(r?(u=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(i,CKEDITOR.POSITION_AFTER_END),i=null):n?(u=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START),t=null):(i=this.splitElement(t),CKEDITOR.env.ie||t.is("ul","ol")||t.appendBogus())),{previousBlock:t,nextBlock:i,wasStartOfBlock:n,wasEndOfBlock:r,elementPath:u}):null},splitElement:function(n){if(!this.collapsed)return null;this.setEndAt(n,CKEDITOR.POSITION_BEFORE_END);var i=this.extractContents(),t=n.clone(!1);return i.appendTo(t),t.insertAfter(n),this.moveToPosition(n,CKEDITOR.POSITION_AFTER_END),t},removeEmptyBlocksAtEnd:function(){function n(n){return function(r){return t(r)||i(r)||r.type==CKEDITOR.NODE_ELEMENT&&r.isEmptyInlineRemoveable()||n.is("table")&&r.is("caption")?!1:!0}}var t=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark(!1);return function(t){for(var f=this.createBookmark(),r=this[t?"endPath":"startPath"](),i=r.block||r.blockLimit,u;i&&!i.equals(r.root)&&!i.getFirst(n(i));)u=i.getParent(),this[t?"setEndAt":"setStartAt"](i,CKEDITOR.POSITION_AFTER_END),i.remove(1),i=u;this.moveToBookmark(f)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(n,t){var r=t==CKEDITOR.START,i=this.clone();return i.collapse(r),i[r?"setStartAt":"setEndAt"](n,r?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),i=new CKEDITOR.dom.walker(i),i.evaluator=f(r),i[r?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var n=this.startContainer,t=this.startOffset;return CKEDITOR.env.ie&&t&&n.type==CKEDITOR.NODE_TEXT&&(n=CKEDITOR.tools.ltrim(n.substring(0,t)),i.test(n)&&this.trim(0,1)),this.trim(),n=new CKEDITOR.dom.elementPath(this.startContainer,this.root),t=this.clone(),t.collapse(!0),t.setStartAt(n.block||n.blockLimit,CKEDITOR.POSITION_AFTER_START),n=new CKEDITOR.dom.walker(t),n.evaluator=r(),n.checkBackward()},checkEndOfBlock:function(){var n=this.endContainer,t=this.endOffset;return CKEDITOR.env.ie&&n.type==CKEDITOR.NODE_TEXT&&(n=CKEDITOR.tools.rtrim(n.substring(t)),i.test(n)&&this.trim(1,0)),this.trim(),n=new CKEDITOR.dom.elementPath(this.endContainer,this.root),t=this.clone(),t.collapse(!1),t.setEndAt(n.block||n.blockLimit,CKEDITOR.POSITION_BEFORE_END),n=new CKEDITOR.dom.walker(t),n.evaluator=r(),n.checkForward()},getPreviousNode:function(n,t,i){var r=this.clone();return r.collapse(1),r.setStartAt(i||this.root,CKEDITOR.POSITION_AFTER_START),i=new CKEDITOR.dom.walker(r),i.evaluator=n,i.guard=t,i.previous()},getNextNode:function(n,t,i){var r=this.clone();return r.collapse(),r.setEndAt(i||this.root,CKEDITOR.POSITION_BEFORE_END),i=new CKEDITOR.dom.walker(r),i.evaluator=n,i.guard=t,i.next()},checkReadOnly:function(){function n(n,t){for(;n;){if(n.type==CKEDITOR.NODE_ELEMENT){if(n.getAttribute("contentEditable")=="false"&&!n.data("cke-editable"))return 0;if(n.is("html")||n.getAttribute("contentEditable")=="true"&&(n.contains(t)||n.equals(t)))break}n=n.getParent()}return 1}return function(){var t=this.startContainer,i=this.endContainer;return!(n(t,i)&&n(i,t))}}(),moveToElementEditablePosition:function(n,t){var r;if(n.type==CKEDITOR.NODE_ELEMENT&&!n.isEditable(!1))return this.moveToPosition(n,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(r=0;n;){if(n.type==CKEDITOR.NODE_TEXT){t&&this.checkEndOfBlock()&&i.test(n.getText())?this.moveToPosition(n,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(n,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);r=1;break}n.type==CKEDITOR.NODE_ELEMENT&&(n.isEditable()?(this.moveToPosition(n,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),r=1):t&&n.is("br")&&this.checkEndOfBlock()&&this.moveToPosition(n,CKEDITOR.POSITION_BEFORE_START));var f=n,o=r,e=void 0;f.type==CKEDITOR.NODE_ELEMENT&&f.isEditable(!1)&&(e=f[t?"getLast":"getFirst"](u));o||e||(e=f[t?"getPrevious":"getNext"](u));n=e}return!!r},moveToElementEditStart:function(n){return this.moveToElementEditablePosition(n)},moveToElementEditEnd:function(n){return this.moveToElementEditablePosition(n,!0)},getEnclosedNode:function(){var n=this.clone(),t;if(n.optimize(),n.startContainer.type!=CKEDITOR.NODE_ELEMENT||n.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var n=new CKEDITOR.dom.walker(n),i=CKEDITOR.dom.walker.bookmark(!1,!0),r=CKEDITOR.dom.walker.whitespaces(!0);return n.evaluator=function(n){return r(n)&&i(n)},t=n.next(),n.reset(),t&&t.equals(n.previous())?t:null},getTouchedStartNode:function(){var n=this.startContainer;return this.collapsed||n.type!=CKEDITOR.NODE_ELEMENT?n:n.getChild(this.startOffset)||n},getTouchedEndNode:function(){var n=this.endContainer;return this.collapsed||n.type!=CKEDITOR.NODE_ELEMENT?n:n.getChild(this.endOffset-1)||n},scrollIntoView:function(){var t=new CKEDITOR.dom.element.createFromHtml("<span>&nbsp;<\/span>",this.document),i,r,u,n=this.clone();n.optimize();(u=n.startContainer.type==CKEDITOR.NODE_TEXT)?(r=n.startContainer.getText(),i=n.startContainer.split(n.startOffset),t.insertAfter(n.startContainer)):n.insertNode(t);t.scrollIntoView();u&&(n.startContainer.setText(r),i.remove());t.remove()}}}();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2;CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT=1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2,function(){function i(n){arguments.length<1||(this.range=n,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function t(t,i,r){for(t=t.getNextSourceNode(i,null,r);!n(t);)t=t.getNextSourceNode(i,null,r);return t}var r=/^[\r\n\t ]+$/,n=CKEDITOR.dom.walker.bookmark(!1,!0),u=CKEDITOR.dom.walker.whitespaces(!0),f=function(t){return n(t)&&u(t)};i.prototype={getNextParagraph:function(i){var o,u,l,s,y,v,e,c;if(i=i||"p",!CKEDITOR.dtd[this.range.root.getName()][i])return null;for(this._.started||(u=this.range.clone(),u.shrink(CKEDITOR.NODE_ELEMENT,!0),s=u.endContainer.hasAscendant("pre",!0)||u.startContainer.hasAscendant("pre",!0),u.enlarge(this.forceBrBreak&&!s||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS),u.collapsed||(s=new CKEDITOR.dom.walker(u.clone()),e=CKEDITOR.dom.walker.bookmark(!0,!0),s.evaluator=e,this._.nextNode=s.next(),s=new CKEDITOR.dom.walker(u.clone()),s.evaluator=e,s=s.previous(),this._.lastNode=s.getNextSourceNode(!0),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(e=this.range.clone(),e.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),e.checkEndOfBlock()&&(e=new CKEDITOR.dom.elementPath(e.endContainer,e.root),this._.lastNode=(e.block||e.blockLimit).getNextSourceNode(!0))),this._.lastNode||(this._.lastNode=this._.docEndMarker=u.document.createText(""),this._.lastNode.insertAfter(s)),u=null),this._.started=1),e=this._.nextNode,s=this._.lastNode,this._.nextNode=null;e;){var a=0,p=e.hasAscendant("pre"),h=e.type!=CKEDITOR.NODE_ELEMENT,w=0;if(h)e.type==CKEDITOR.NODE_TEXT&&r.test(e.getText())&&(h=0);else if(c=e.getName(),e.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if(c=="br")h=1;else if(!u&&!e.getChildCount()&&c!="hr"){o=e;l=e.equals(s);break}u&&(u.setEndAt(e,CKEDITOR.POSITION_BEFORE_START),c!="br"&&(this._.nextNode=e));a=1}else{if(e.getFirst()){u||(u=this.range.clone(),u.setStartAt(e,CKEDITOR.POSITION_BEFORE_START));e=e.getFirst();continue}h=1}if(h&&!u&&(u=this.range.clone(),u.setStartAt(e,CKEDITOR.POSITION_BEFORE_START)),l=(!a||h)&&e.equals(s),u&&!a)for(;!e.getNext(f)&&!l;){if(c=e.getParent(),c.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){a=1;h=0;l||c.equals(s);u.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);break}e=c;h=1;l=e.equals(s);w=1}if(h&&u.setEndAt(e,CKEDITOR.POSITION_AFTER_END),e=t(e,w,s),(l=!e)||a&&u)break}if(!o){if(!u)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;o=new CKEDITOR.dom.elementPath(u.startContainer,u.root);e=o.blockLimit;a={div:1,th:1,td:1};o=o.block;!o&&e&&!this.enforceRealBlocks&&a[e.getName()]&&u.checkStartOfBlock()&&u.checkEndOfBlock()&&!e.equals(u.root)?o=e:!o||this.enforceRealBlocks&&o.getName()=="li"?(o=this.range.document.createElement(i),u.extractContents().appendTo(o),o.trim(),u.insertNode(o),y=v=!0):o.getName()!="li"?u.checkStartOfBlock()&&u.checkEndOfBlock()||(o=o.clone(!1),u.extractContents().appendTo(o),o.trim(),v=u.splitBlock(),y=!v.wasStartOfBlock,v=!v.wasEndOfBlock,u.insertNode(o)):l||(this._.nextNode=o.equals(s)?null:t(u.getBoundaryNodes().endNode,1,s))}return y&&(u=o.getPrevious())&&u.type==CKEDITOR.NODE_ELEMENT&&(u.getName()=="br"?u.remove():u.getLast()&&u.getLast().$.nodeName.toLowerCase()=="br"&&u.getLast().remove()),v&&(u=o.getLast())&&u.type==CKEDITOR.NODE_ELEMENT&&u.getName()=="br"&&(CKEDITOR.env.ie||u.getPrevious(n)||u.getNext(n))&&u.remove(),this._.nextNode||(this._.nextNode=l||o.equals(s)||!s?null:t(o,1,s)),o}};CKEDITOR.dom.range.prototype.createIterator=function(){return new i(this)}}();CKEDITOR.command=function(n,t){this.uiItems=[];this.exec=function(i){return this.state==CKEDITOR.TRISTATE_DISABLED?!1:(this.editorFocus&&n.focus(),this.fire("exec")===!1?!0:t.exec.call(this,n,i)!==!1)};this.refresh=function(n,i){return!this.readOnly&&n.readOnly?!0:this.context&&!i.isContextFor(this.context)?(this.disable(),!0):(this.enable(),this.fire("refresh",{editor:n,path:i})===!1?!0:t.refresh&&t.refresh.apply(this,arguments)!==!1)};CKEDITOR.tools.extend(this,t,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!t.context,state:CKEDITOR.TRISTATE_OFF});CKEDITOR.event.call(this)};CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(!this.preserveState||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(n){return this.state==n?!1:(this.previousState=this.state,this.state=n,this.fire("state"),!0)},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3;CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"<!DOCTYPE html>",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1e4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){CKEDITOR.focusManager=function(n){return n.focusManager?n.focusManager:(this.hasFocus=!1,this.currentActive=null,this._={editor:n},this)};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(){if(this._.timer&&clearTimeout(this._.timer),!this.hasFocus&&!this._.locked){var n=CKEDITOR.currentInstance;n&&n.focusManager.blur(1);this.hasFocus=!0;(n=this._.editor.container)&&n.addClass("cke_focus");this._.editor.fire("focus")}},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(n){function t(){if(this.hasFocus){this.hasFocus=!1;var n=this._.editor.container;n&&n.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var i=CKEDITOR.focusManager._.blurDelay;n||!i?t.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;t.call(this)},i,this)}},add:function(n,t){var i=n.getCustomData("focusmanager"),u,r;if(!i||i!=this){i&&i.remove(n);i="focus";u="blur";t&&(CKEDITOR.env.ie?(i="focusin",u="focusout"):CKEDITOR.event.useCapture=1);r={blur:function(){n.equals(this.currentActive)&&this.blur()},focus:function(){this.currentActive=n;this.focus()}};n.on(i,r.focus,this);n.on(u,r.blur,this);t&&(CKEDITOR.event.useCapture=0);n.setCustomData("focusmanager",this);n.setCustomData("focusmanager_handlers",r)}},remove:function(n){n.removeCustomData("focusmanager");var t=n.removeCustomData("focusmanager_handlers");n.removeListener("blur",t.blur);n.removeListener("focus",t.focus)}}}();CKEDITOR.keystrokeHandler=function(n){return n.keystrokeHandler?n.keystrokeHandler:(this.keystrokes={},this.blockedKeystrokes={},this._={editor:n},this)},function(){var n,t=function(t){var t=t.data,i=t.getKeystroke(),r=this.keystrokes[i],u=this._.editor;return n=u.fire("key",{keyCode:i})===!1,n||(r&&(n=u.execCommand(r,{from:"keystrokeHandler"})!==!1),n||(n=!!this.blockedKeystrokes[i])),n&&t.preventDefault(!0),!n},i=function(t){n&&(n=!1,t.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(n){n.on("keydown",t,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)n.on("keypress",i,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,sk:1,sl:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,"zh-cn":1,zh:1},load:function(n,t,i){n&&CKEDITOR.lang.languages[n]||(n=this.detect(t,n));this[n]?i(n,this[n]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+n+".js"),function(){i(n,this[n])},this)},detect:function(n,t){var u=this.languages,t=t||navigator.userLanguage||navigator.language||n,r=t.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),i=r[1],r=r[2];return u[i+"-"+r]?i=i+"-"+r:u[i]||(i=null),CKEDITOR.lang.detect=i?function(){return i}:function(n){return n},i||n}}}();CKEDITOR.scriptLoader=function(){var t={},n={};return{load:function(i,r,u,f){var h=typeof i=="string",e;h&&(i=[i]);u||(u=CKEDITOR);var o=i.length,c=[],l=[],a=function(n){r&&(h?r.call(u,n):r.call(u,c,l))};if(o===0)a(!0);else{var v=function(n,t){(t?c:l).push(n);--o<=0&&(f&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),a(t))},s=function(i,r){var f,u;for(t[i]=1,f=n[i],delete n[i],u=0;u<f.length;u++)f[u](i,r)},y=function(i){var f,u;t[i]?v(i,!0):(f=n[i]||(n[i]=[]),f.push(v),f.length>1||(u=new CKEDITOR.dom.element("script"),u.setAttributes({type:"text/javascript",src:i}),r&&(CKEDITOR.env.ie?u.$.onreadystatechange=function(){(u.$.readyState=="loaded"||u.$.readyState=="complete")&&(u.$.onreadystatechange=null,s(i,!0))}:(u.$.onload=function(){setTimeout(function(){s(i,!0)},0)},u.$.onerror=function(){s(i,!1)})),u.appendTo(CKEDITOR.document.getHead())))};for(f&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait"),e=0;e<o;e++)y(i[e])}}}}();CKEDITOR.resourceManager=function(n,t){this.basePath=n;this.fileName=t;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}};CKEDITOR.resourceManager.prototype={add:function(n,t){if(this.registered[n])throw'[CKEDITOR.resourceManager.add] The resource name "'+n+'" is already registered.';var i=this.registered[n]=t||{};return i.name=n,i.path=this.getPath(n),CKEDITOR.fire(n+CKEDITOR.tools.capitalize(this.fileName)+"Ready",i),this.get(n)},get:function(n){return this.registered[n]||null},getPath:function(n){var t=this.externals[n];return CKEDITOR.getUrl(t&&t.dir||this.basePath+n+"/")},getFilePath:function(n){var t=this.externals[n];return CKEDITOR.getUrl(this.getPath(n)+(t&&typeof t.file=="string"?t.file:this.fileName+".js"))},addExternal:function(n,t,i){for(var n=n.split(","),r=0;r<n.length;r++)this.externals[n[r]]={dir:t,file:i}},load:function(n,t,i){var r,f;CKEDITOR.tools.isArray(n)||(n=n?[n]:[]);for(var s=this.loaded,c=this.registered,h=[],u={},e={},o=0;o<n.length;o++)r=n[o],r&&(s[r]||c[r]?e[r]=this.get(r):(f=this.getFilePath(r),h.push(f),f in u||(u[f]=[]),u[f].push(r)));CKEDITOR.scriptLoader.load(h,function(n,r){var f,c,o,h;if(r.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+u[r[0]].join(",")+'" was not found at "'+r[0]+'".';for(f=0;f<n.length;f++)for(c=u[n[f]],o=0;o<c.length;o++)h=c[o],e[h]=this.get(h),s[h]=1;t.call(i,e)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin");CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(n){var t={};return function(i,r,u){var f={},e=function(i){n.call(this,i,function(n){var c,s,i,o,l,h;CKEDITOR.tools.extend(f,n);c=[];for(s in n){if(i=n[s],o=i&&i.requires,!t[s]){if(i.icons)for(l=i.icons.split(","),h=0;h<l.length;h++)CKEDITOR.skin.addIcon(l[h],i.path+"icons/"+l[h]+".png");t[s]=1}if(o)for(o.split&&(o=o.split(",")),i=0;i<o.length;i++)f[o[i]]||c.push(o[i])}if(c.length)e.call(this,c);else{for(s in f)i=f[s],i.onLoad&&!i.onLoad._called&&(i.onLoad()===!1&&delete f[s],i.onLoad._called=1);r&&r.call(u||window,f)}},this)};e.call(this,i)}});CKEDITOR.plugins.setLang=function(n,t,i){var r=this.get(n),n=r.langEntries||(r.langEntries={}),r=r.lang||(r.lang=[]);r.split&&(r=r.split(","));CKEDITOR.tools.indexOf(r,t)==-1&&r.push(t);n[t]=i};CKEDITOR.ui=function(n){return n.ui?n.ui:(this.items={},this.instances={},this.editor=n,this._={handlers:{}},this)};CKEDITOR.ui.prototype={add:function(n,t,i){i.name=n.toLowerCase();var r=this.items[n]={type:t,command:i.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(r,i)},get:function(n){return this.instances[n]},create:function(n){var i=this.items[n],t=i&&this._.handlers[i.type],r=i&&i.command&&this.editor.getCommand(i.command),t=t&&t.create.apply(this,i.args);return this.instances[n]=t,r&&r.uiItems.push(t),t&&!t.type&&(t.type=i.type),t},addHandler:function(n,t){this._.handlers[n]=t},space:function(n){return CKEDITOR.document.getById(this.spaceId(n))},spaceId:function(n){return this.editor.id+"_"+n}};CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function t(n,t,r){if(CKEDITOR.event.call(this),n=n&&CKEDITOR.tools.clone(n),t!==void 0){if(t instanceof CKEDITOR.dom.element){if(!r)throw Error("One of the element mode must be specified.");}else throw Error("Expect element of type CKEDITOR.dom.element.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&r==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(r==CKEDITOR.ELEMENT_MODE_INLINE&&!t.is(CKEDITOR.dtd.$editable)||r==CKEDITOR.ELEMENT_MODE_REPLACE&&t.is(CKEDITOR.dtd.$nonBodyContent))throw Error('The specified element mode is not supported on element: "'+t.getName()+'".');this.element=t;this.elementMode=r;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(t.getId()||t.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||f();this.id=CKEDITOR.tools.getNextId();this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("mode",i);this.on("readOnly",i);this.on("selectionChange",e);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){o(this,n)},0,this)}function f(){do var n="editor"+ ++l;while(CKEDITOR.instances[n]);return n}function i(){var n,t=this.commands,i=this.mode,r;if(i)for(r in t)n=t[r],n[n.startDisabled?"disable":this.readOnly&&!n.readOnly?"disable":n.modes[i]?"enable":"disable"]()}function e(n){var t=this.commands,i=n.editor,r=n.data.path;for(var u in t)n=t[u],n.contextSensitive&&n.refresh(i,r)}function n(t){var i=t.config.customConfig,r;return i?(i=CKEDITOR.getUrl(i),r=u[i]||(u[i]={}),r.fn?(r.fn.call(t,t.config),CKEDITOR.getUrl(t.config.customConfig)!=i&&n(t)||t.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.load(i,function(){r.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};n(t)}),!0):!1}function o(t,i){t.on("customConfigLoaded",function(){if(i){if(i.on)for(var n in i.on)t.on(n,i.on[n]);CKEDITOR.tools.extend(t.config,i,!0);delete t.config.on}t.readOnly=!(!t.config.readOnly&&!(t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?t.element.isReadOnly():t.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&t.element.getAttribute("disabled")));t.blockless=t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!CKEDITOR.dtd[t.element.getName()].p;t.tabIndex=t.config.tabIndex||t.element&&t.element.getAttribute("tabindex")||0;t.config.skin&&(CKEDITOR.skinName=t.config.skin);t.fireOnce("configLoaded");t.dataProcessor=new CKEDITOR.htmlDataProcessor(t);s(t)});i&&i.customConfig!=void 0&&(t.config.customConfig=i.customConfig);n(t)||t.fireOnce("customConfigLoaded")}function s(n){CKEDITOR.skin.loadPart("editor",function(){h(n)})}function h(n){CKEDITOR.lang.load(n.config.language,n.config.defaultLanguage,function(t,i){n.langCode=t;n.lang=CKEDITOR.tools.prototypedCopy(i);CKEDITOR.env.gecko&&CKEDITOR.env.version<10900&&n.lang.dir=="rtl"&&(n.lang.dir="ltr");n.config.contentsLangDirection||(n.config.contentsLangDirection=n.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?n.element.getDirection(1):n.lang.dir);n.fire("langLoaded");c(n)})}function c(n){var i=n.config,t=i.plugins,r=i.extraPlugins,f=i.removePlugins,u;if(r)var e=RegExp("(?:^|,)(?:"+r.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),t=t.replace(e,""),t=t+(","+r);f&&(u=RegExp("(?:^|,)(?:"+f.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),t=t.replace(u,""));CKEDITOR.env.air&&(t=t+",adobeair");CKEDITOR.plugins.load(t.split(","),function(t){var h=[],c=[],l=[],s;n.plugins=t;for(s in t){var e=t[s],f=e.lang,r=null,o=e.requires,a;if(CKEDITOR.tools.isArray(o)&&(o=o.join(",")),o&&(a=o.match(u)))for(;o=a.pop();)CKEDITOR.tools.setTimeout(function(n,t){throw Error('Plugin "'+n.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+t+'" plugin.');},0,null,[o,s]);f&&!n.lang[s]&&(f.split&&(f=f.split(",")),CKEDITOR.tools.indexOf(f,n.langCode)>=0?r=n.langCode:(r=n.langCode.replace(/-.*/,""),r=r!=n.langCode&&CKEDITOR.tools.indexOf(f,r)>=0?r:CKEDITOR.tools.indexOf(f,"en")>=0?"en":f[0]),e.langEntries&&e.langEntries[r]?(n.lang[s]=e.langEntries[r],r=null):l.push(CKEDITOR.getUrl(e.path+"lang/"+r+".js")));c.push(r);h.push(e)}CKEDITOR.scriptLoader.load(l,function(){for(var t,r,f=["beforeInit","init","afterInit"],u=0;u<f.length;u++)for(t=0;t<h.length;t++)r=h[t],u===0&&c[t]&&r.lang&&r.langEntries&&(n.lang[r.name]=r.langEntries[c[t]]),r[f[u]]&&r[f[u]](n);for(n.fireOnce("pluginsLoaded"),i.keystrokes&&n.setKeystroke(n.config.keystrokes),t=0;t<n.config.blockedKeystrokes.length;t++)n.keystrokeHandler.blockedKeystrokes[n.config.blockedKeystrokes[t]]=1;n.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,n)})})}function r(){var t=this.element,n;return t&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO?(n=this.getData(),this.config.htmlEncodeOutput&&(n=CKEDITOR.tools.htmlEncode(n)),t.is("textarea")?t.setValue(n):t.setHtml(n),!0):!1}t.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=t;var l=0,u={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(n,t){return this.commands[n]=new CKEDITOR.command(this,t)},destroy:function(n){this.fire("beforeDestroy");n||r.call(this);this.editable(null);this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(n){return(n=n||this.getSelection().getStartElement())?new CKEDITOR.dom.elementPath(n,this.editable()):null},createRange:function(){var n=this.editable();return n?new CKEDITOR.dom.range(n):null},execCommand:function(n,t){var i=this.getCommand(n),r={name:n,commandData:t,command:i};return i&&i.state!=CKEDITOR.TRISTATE_DISABLED&&this.fire("beforeCommandExec",r)!==!0&&(r.returnValue=i.exec(r.commandData),!i.async&&this.fire("afterCommandExec",r)!==!0)?r.returnValue:!1},getCommand:function(n){return this.commands[n]},getData:function(n){n||this.fire("beforeGetData");var t=this._.data;return typeof t!="string"&&(t=(t=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?t.is("textarea")?t.getValue():t.getHtml():""),t={dataValue:t},n||this.fire("getData",t),t.dataValue},getSnapshot:function(){var t=this.fire("getSnapshot"),n;return typeof t!="string"&&(n=this.element,n&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(t=n.is("textarea")?n.getValue():n.getHtml())),t},loadSnapshot:function(n){this.fire("loadSnapshot",n)},setData:function(n,t,i){if(t)this.on("dataReady",function(n){n.removeListener();t.call(n.editor)});n={dataValue:n};i||this.fire("setData",n);this._.data=n.dataValue;i||this.fire("afterSetData",n)},setReadOnly:function(n){n=n==void 0||n;this.readOnly!=n&&(this.readOnly=n,this.editable().setReadOnly(n),this.fire("readOnly"))},insertHtml:function(n,t){this.fire("insertHtml",{dataValue:n,mode:t})},insertText:function(n){this.fire("insertText",n)},insertElement:function(n){this.fire("insertElement",n)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return r.call(this)},setKeystroke:function(){for(var i=this.keystrokeHandler.keystrokes,r=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],n,t,u=r.length;u--;)n=r[u],t=0,CKEDITOR.tools.isArray(n)&&(t=n[1],n=n[0]),t?i[n]=t:delete i[n]}})}();CKEDITOR.ELEMENT_MODE_NONE=0;CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE=3;CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}},function(){var n=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,t={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(i){for(var u,r,f,h,o,c,s,e=0;u=this._.htmlPartsRegex.exec(i);){if(r=u.index,r>e)if(e=i.substring(e,r),f)f.push(e);else this.onText(e);if(e=this._.htmlPartsRegex.lastIndex,r=u[1]){if(r=r.toLowerCase(),f&&CKEDITOR.dtd.$cdata[r]){this.onCDATA(f.join(""));f=null}if(!f){this.onTagClose(r);continue}}if(f)f.push(u[0]);else if(r=u[3]){if(r=r.toLowerCase(),!/="/.test(r)){if(h={},u=u[4],c=!!(u&&u.charAt(u.length-1)=="/"),u)for(;o=n.exec(u);)s=o[1].toLowerCase(),o=o[2]||o[3]||o[4]||"",h[s]=!o&&t[s]?s:o;this.onTagOpen(r,h,c);!f&&CKEDITOR.dtd.$cdata[r]&&(f=[])}}else if(r=u[2])this.onComment(r)}if(i.length>e)this.onText(i.substring(e,i.length))}}}();CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(n){this._.output.push("<",n)},openTagClose:function(n,t){t?this._.output.push(" />"):this._.output.push(">")},attribute:function(n,t){typeof t=="string"&&(t=CKEDITOR.tools.htmlEncodeAttr(t));this._.output.push(" ",n,'="',t,'"')},closeTag:function(n){this._.output.push("<\/",n,">")},text:function(n){this._.output.push(n)},comment:function(n){this._.output.push("<!--",n,"-->")},write:function(n){this._.output.push(n)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(n){var t=this._.output.join("");return n&&this.reset(),t}}});CKEDITOR.htmlParser.comment=function(n){this.value=n;this._={isBlockLike:!1}};CKEDITOR.htmlParser.comment.prototype={type:CKEDITOR.NODE_COMMENT,writeHtml:function(n,t){var i=this.value;if(t){if(!(i=t.onComment(i,this)))return;if(typeof i!="string"){i.parent=this.parent;i.writeHtml(n,t);return}}n.comment(i)}},function(){CKEDITOR.htmlParser.text=function(n){this.value=n;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype={type:CKEDITOR.NODE_TEXT,writeHtml:function(n,t){var i=this.value;(!t||(i=t.onText(i,this)))&&n.text(i)}}}(),function(){CKEDITOR.htmlParser.cdata=function(n){this.value=n};CKEDITOR.htmlParser.cdata.prototype={type:CKEDITOR.NODE_TEXT,writeHtml:function(n){n.write(this.value)}}}();CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function t(n){return n.name=="a"&&n.attributes.href||CKEDITOR.dtd.$removeEmpty[n.name]}var i=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),n={ol:1,ul:1},r=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(u,f,e){function w(n){var u,t;if(h.length>0)for(t=0;t<h.length;t++){var i=h[t],r=i.name,f=CKEDITOR.dtd[r],e=o.name&&CKEDITOR.dtd[o.name];e&&!e[r]||n&&f&&!f[n]&&CKEDITOR.dtd[n]?r==o.name&&(l(o,o.parent,1),t--):(u||(a(),u=1),i=i.clone(),i.parent=o,o=i,h.splice(t,1),t--)}}function a(){for(;p.length;)l(p.shift(),o)}function b(n){if(n._.isBlockLike&&n.name!="pre"&&n.name!="textarea"){var i=n.children.length,t=n.children[i-1],r;t&&t.type==CKEDITOR.NODE_TEXT&&((r=CKEDITOR.tools.rtrim(t.value))?t.value=r:n.children.length=i-1)}}function l(n,i,r){var i=i||o||c,u=o;if(n.previous===void 0){if(k(i,n)){o=i;s.onTagOpen(e,{});n.returnPoint=i=o}b(n);(!t(n)||n.children.length)&&i.add(n);n.name=="pre"&&(y=!1);n.name=="textarea"&&(v=!1)}n.returnPoint?(o=n.returnPoint,delete n.returnPoint):o=r?i:u}function k(n,t){if((n==c||n.name=="body")&&e&&(!n.name||CKEDITOR.dtd[n.name][e])){var i,r;return(i=t.attributes&&(r=t.attributes["data-cke-real-element-type"])?r:t.name)&&i in CKEDITOR.dtd.$inline&&!(i in CKEDITOR.dtd.head)&&!t.isOrphan||t.type==CKEDITOR.NODE_TEXT}}function d(n,t){return n in CKEDITOR.dtd.$listItem||n in CKEDITOR.dtd.$tableContent?n==t||n=="dt"&&t=="dd"||n=="dd"&&t=="dt":!1}var s=new CKEDITOR.htmlParser,c=f instanceof CKEDITOR.htmlParser.element?f:typeof f=="string"?new CKEDITOR.htmlParser.element(f):new CKEDITOR.htmlParser.fragment,h=[],p=[],o=c,v=c.name=="textarea",y=c.name=="pre";for(s.onTagOpen=function(u,f,e,c){if(f=new CKEDITOR.htmlParser.element(u,f),f.isUnknown&&e&&(f.isEmpty=!0),f.isOptionalClose=c,t(f))h.push(f);else{if(u=="pre")y=!0;else{if(u=="br"&&y){o.add(new CKEDITOR.htmlParser.text("\n"));return}u=="textarea"&&(v=!0)}if(u=="br")p.push(f);else{for(;;)if(c=(e=o.name)?CKEDITOR.dtd[e]||(o._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):r,f.isUnknown||o.isUnknown||c[u])break;else if(o.isOptionalClose)s.onTagClose(e);else if(u in n&&e in n)e=o.children,(e=e[e.length-1])&&e.name=="li"||l(e=new CKEDITOR.htmlParser.element("li"),o),f.returnPoint||(f.returnPoint=o),o=e;else if(u in CKEDITOR.dtd.$listItem&&!d(u,e))s.onTagOpen(u=="li"?"ul":"dl",{},0,1);else if(e in i&&!d(u,e))f.returnPoint||(f.returnPoint=o),o=o.parent;else if(e in CKEDITOR.dtd.$inline&&h.unshift(o),o.parent)l(o,o.parent,1);else{f.isOrphan=1;break}w(u);a();f.parent=o;f.isEmpty?l(f):o=f}}},s.onTagClose=function(n){for(var u,i=h.length-1;i>=0;i--)if(n==h[i].name){h.splice(i,1);return}for(var r=[],f=[],t=o;t!=c&&t.name!=n;)t._.isBlockLike||f.unshift(t),r.push(t),t=t.returnPoint||t.parent;if(t!=c){for(i=0;i<r.length;i++)u=r[i],l(u,u.parent);o=t;t._.isBlockLike&&a();l(t,t.parent);t==o&&(o=o.parent);h=h.concat(f)}n=="body"&&(e=!1)},s.onText=function(t){if(o._.hasInlineStarted&&!p.length||y||v||(t=CKEDITOR.tools.ltrim(t),t.length!==0)){var u=o.name,f=u?CKEDITOR.dtd[u]||(o._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):r;if(!v&&!f["#"]&&u in i){s.onTagOpen(u in n?"li":u=="dl"?"dd":u=="table"?"tr":u=="tr"?"td":"");s.onText(t)}else{if(a(),w(),y||v||(t=t.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," ")),t=new CKEDITOR.htmlParser.text(t),k(o,t))this.onTagOpen(e,{},0,1);o.add(t)}}},s.onCDATA=function(n){o.add(new CKEDITOR.htmlParser.cdata(n))},s.onComment=function(n){a();w();o.add(new CKEDITOR.htmlParser.comment(n))},s.parse(u),a(!CKEDITOR.env.ie&&1);o!=c;)l(o,o.parent,1);return b(c),c};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(n,t){isNaN(t)&&(t=this.children.length);var i=t>0?this.children[t-1]:null;if(i){if(n._.isBlockLike&&i.type==CKEDITOR.NODE_TEXT&&(i.value=CKEDITOR.tools.rtrim(i.value),i.value.length===0)){this.children.pop();this.add(n);return}i.next=n}n.previous=i;n.parent=this;this.children.splice(t,0,n);this._.hasInlineStarted||(this._.hasInlineStarted=n.type==CKEDITOR.NODE_TEXT||n.type==CKEDITOR.NODE_ELEMENT&&!n._.isBlockLike)},writeHtml:function(n,t){var i;this.filterChildren=function(){var n=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml.call(this,n,t);n=n.getHtml();this.children=new CKEDITOR.htmlParser.fragment.fromHtml(n).children;i=1};t&&t.onRoot(this);this.writeChildrenHtml(n,i?null:t)},writeChildrenHtml:function(n,t,i){if(i&&!this.parent&&t)t.onRoot(this);for(i=0;i<this.children.length;i++)this.children[i].writeHtml(n,t)}}}(),function(){function i(n,t){for(var r,n,i=0;n&&i<t.length;i++)r=t[i],n=n.replace(r[0],r[1]);return n}function t(n,t,i){var f,r,u;if(typeof t=="function"&&(t=[t]),r=n.length,u=t&&t.length,u){for(f=0;f<r&&n[f].pri<i;f++);for(r=u-1;r>=0;r--)(u=t[r])&&(u.pri=i,n.splice(f,0,u))}}function r(t,i,r){var u,f;if(i)for(u in i)f=t[u],t[u]=n(f,i[u],r),f||t.$length++}function n(n,i,r){if(i)return(i.pri=r,n)?(n.splice?t(n,i,r):(n=n.pri>r?[i,n]:[n,i],n.filter=u),n):i.filter=i}function u(n){for(var u,f,t,r=n.type||n instanceof CKEDITOR.htmlParser.fragment,i=0;i<this.length;i++){if(r&&(u=n.type,f=n.name),t=this[i].apply(window,arguments),t===!1)return t;if(r){if(t&&(t.name!=f||t.type!=u))return t}else if(typeof t!="string")return t;t!=void 0&&(n=t)}return n}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(n){this._={elementNames:[],attributeNames:[],elements:{$length:0},attributes:{$length:0}};n&&this.addRules(n,10)},proto:{addRules:function(i,u){typeof u!="number"&&(u=10);t(this._.elementNames,i.elementNames,u);t(this._.attributeNames,i.attributeNames,u);r(this._.elements,i.elements,u);r(this._.attributes,i.attributes,u);this._.text=n(this._.text,i.text,u)||this._.text;this._.comment=n(this._.comment,i.comment,u)||this._.comment;this._.root=n(this._.root,i.root,u)||this._.root},onElementName:function(n){return i(n,this._.elementNames)},onAttributeName:function(n){return i(n,this._.attributeNames)},onText:function(n){var t=this._.text;return t?t.filter(n):n},onComment:function(n,t){var i=this._.comment;return i?i.filter(n,t):n},onRoot:function(n){var t=this._.root;return t?t.filter(n):n},onElement:function(n){for(var r=[this._.elements["^"],this._.elements[n.name],this._.elements.$],t,i=0;i<3;i++)if(t=r[i]){if(t=t.filter(n,this),t===!1)return null;if(t&&t!=n)return this.onNode(t);if(n.parent&&!n.name)break}return n},onNode:function(n){var t=n.type;return t==CKEDITOR.NODE_ELEMENT?this.onElement(n):t==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(n.value)):t==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(n.value)):null},onAttribute:function(n,t,i){if(t=this._.attributes[t]){if(n=t.filter(i,n,this),n===!1)return!1;if(typeof n!="undefined")return n}return i}}})}(),function(){function e(u,f){function o(n){return n||CKEDITOR.env.ie?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function y(i,r){return function(u){var f,h,l,p;if(u.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(f=[],h=s(u),h)for(w(h,1)&&f.push(h);h;){if(n(h)&&(l=t(h))&&w(l))if((p=t(l))&&!n(p))f.push(l);else{var a=l,v=o(e),y=a.parent.children,b=CKEDITOR.tools.indexOf(y,a);y.splice(b+1,0,v);y=a.next;a.next=v;v.previous=a;v.parent=a.parent;v.next=y;c(l)}h=h.previous}for(h=0;h<f.length;h++)c(f[h]);(f=CKEDITOR.env.opera&&!i||(typeof r=="function"?r(u)!==!1:r))&&(!e&&CKEDITOR.env.ie&&u.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT?f=!1:!e&&CKEDITOR.env.ie&&(document.documentMode>7||u.name in CKEDITOR.dtd.tr||u.name in CKEDITOR.dtd.$listItem)?f=!1:(f=s(u),f=!f||u.name=="form"&&f.name=="input"));f&&u.add(o(i))}}}function w(t,i){if((!e||!CKEDITOR.env.ie)&&t.type==CKEDITOR.NODE_ELEMENT&&t.name=="br"&&!t.attributes["data-cke-eol"])return!0;var r;return t.type==CKEDITOR.NODE_TEXT&&(r=t.value.match(ut))&&((r.index&&(h(t,new CKEDITOR.htmlParser.text(t.value.substring(0,r.index))),t.value=r[0]),CKEDITOR.env.ie&&e&&(!i||t.parent.name in a))||!e&&((r=t.previous)&&r.name=="br"||!r||n(r)))?!0:!1}var l={elements:{}},e=f=="html",a=CKEDITOR.tools.extend({},p);for(var v in a)"#"in r[v]||delete a[v];for(v in a)l.elements[v]=y(e,u.config.fillEmptyBlocks!==!1);return l.root=y(e),l.elements.br=function(r){return function(u){var f,e;if(u.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(f=u.attributes,"data-cke-bogus"in f||"data-cke-eol"in f)delete f["data-cke-bogus"];else{for(f=u.next;f&&i(f);)f=f.next;e=t(u);!f&&n(u.parent)?(u=u.parent,f=o(r),e=u.children[u.children.length-1],u.children.push(f),f.parent=u,e&&(e.next=f,f.previous=e)):n(f)&&e&&!n(e)&&h(f,o(r))}}}(e),l}function o(n){return n.enterMode!=CKEDITOR.ENTER_BR&&n.autoParagraph!==!1?n.enterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function s(n){for(n=n.children[n.children.length-1];n&&i(n);)n=n.previous;return n}function t(n){for(n=n.previous;n&&i(n);)n=n.previous;return n}function i(n){return n.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(n.value)||n.type==CKEDITOR.NODE_ELEMENT&&n.attributes["data-cke-bookmark"]}function n(n){return n&&(n.type==CKEDITOR.NODE_ELEMENT&&n.name in p||n.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function h(n,t){var i=n.parent.children,r=CKEDITOR.tools.indexOf(i,n);i.splice(r,0,t);i=n.previous;n.previous=t;t.next=n;t.parent=n.parent;i&&(t.previous=i,i.next=t)}function c(n){var i=n.parent.children,r=CKEDITOR.tools.indexOf(i,n),t=n.previous,n=n.next;t&&(t.next=n);n&&(n.previous=t);i.splice(r,1)}function l(n){var t=n.parent;return t?CKEDITOR.tools.indexOf(t.children,n):-1}function b(n){n=n.attributes;n.contenteditable!="false"&&(n["data-cke-editable"]=n.contenteditable?"true":1);n.contenteditable="false"}function k(n){n=n.attributes;switch(n["data-cke-editable"]){case"true":n.contenteditable="true";break;case"1":delete n.contenteditable}}function d(n){return n.replace(ft,function(n,t,i){return"<"+t+i.replace(et,function(n,t){return!/^on/.test(t)&&i.indexOf("data-cke-saved-"+t)==-1?" data-cke-saved-"+n+" data-cke-"+CKEDITOR.rnd+"-"+n:n})+">"})}function g(n){return n.replace(ot,function(n){return"<cke:encoded>"+encodeURIComponent(n)+"<\/cke:encoded>"})}function nt(n){return n.replace(st,function(n,t){return decodeURIComponent(t)})}function tt(n){return n.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(n){return"<!--"+v+"{C}"+encodeURIComponent(n).replace(/--/g,"%2D%2D")+"-->"})}function a(n){return n.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(n,t){return decodeURIComponent(t)})}function it(n,t){var i=t._.dataStore;return n.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(n,t){return decodeURIComponent(t)}).replace(/\{cke_protected_(\d+)\}/g,function(n,t){return i&&i[t]||""})}function rt(n,t){for(var i=[],r=t.config.protectedSource,u=t._.dataStore||(t._.dataStore={id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,r=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(r),n=n.replace(/<\!--[\s\S]*?--\>/g,function(n){return"<!--{cke_tempcomment}"+(i.push(n)-1)+"-->"}),f=0;f<r.length;f++)n=n.replace(r[f],function(n){return n=n.replace(e,function(n,t,r){return i[r]}),/cke_temp(comment)?/.test(n)?n:"<!--{cke_temp}"+(i.push(n)-1)+"-->"});return n=n.replace(e,function(n,t,r){return"<!--"+v+(t?"{C}":"")+encodeURIComponent(i[r]).replace(/--/g,"%2D%2D")+"-->"}),n.replace(/(['"]).*?\1/g,function(n){return n.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(n,t){return u[u.id]=decodeURIComponent(t),"{cke_protected_"+u.id+++"}"})})}var f;CKEDITOR.htmlDataProcessor=function(n){var t,i;this.editor=n;this.dataFilter=t=new CKEDITOR.htmlParser.filter;this.htmlFilter=i=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;t.addRules(w);t.addRules(e(n,"data"));i.addRules(u);i.addRules(e(n,"html"))};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(n,t,i){var n=rt(n,this.editor),n=d(n),n=g(n),n=n.replace(ht,"$1cke:$2"),n=n.replace(lt,"<cke:$1$2><\/cke:$1>"),n=CKEDITOR.env.opera?n:n.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),r=this.editor.editable(),u;return t||t===null||(t=r.getName()),r=t||r.getName(),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&r=="pre"&&(r="div",n="<pre>"+n+"<\/pre>",u=1),r=this.editor.document.createElement(r),r.setHtml("a"+n),n=r.getHtml().substr(1),n=n.replace(RegExp(" data-cke-"+CKEDITOR.rnd+"-","ig")," "),u&&(n=n.replace(/^<pre>|<\/pre>$/gi,"")),n=n.replace(ct,"$1$2"),n=nt(n),n=a(n),n=CKEDITOR.htmlParser.fragment.fromHtml(n,t,i===!1?!1:o(this.editor.config)),t=new CKEDITOR.htmlParser.basicWriter,n.writeChildrenHtml(t,this.dataFilter,1),n=t.getHtml(!0),tt(n)},toDataFormat:function(n){var i=this.editor.editable(),t=this.writer,n=CKEDITOR.htmlParser.fragment.fromHtml(n,i.getName(),o(this.editor.config));return t.reset(),n.writeChildrenHtml(t,this.htmlFilter,1),t=t.getHtml(!0),t=a(t),it(t,this.editor)}};var ut=/(?:&nbsp;|\xa0)$/,v="{cke_protected}",r=CKEDITOR.dtd,y=["caption","colgroup","col","thead","tfoot","tbody"],p=CKEDITOR.tools.extend({},r.$blockLimit,r.$block),w={elements:{},attributeNames:[[/^on/,"data-cke-pa-on"]]},u={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(n){var i=n.attributes,r,u,t;if(i){if(i["data-cke-temp"])return!1;for(r=["name","href","src"],t=0;t<r.length;t++)u="data-cke-saved-"+r[t],u in i&&delete i[r[t]]}return n},table:function(n){n.children.slice(0).sort(function(n,t){var i,r;return n.type==CKEDITOR.NODE_ELEMENT&&t.type==n.type&&(i=CKEDITOR.tools.indexOf(y,n.name),r=CKEDITOR.tools.indexOf(y,t.name)),i>-1&&r>-1&&i!=r||(i=l(n),r=l(t)),i>r?1:-1})},embed:function(n){var t=n.parent,i;t&&t.name=="object"&&(i=t.attributes.width,t=t.attributes.height,i&&(n.attributes.width=i),t&&(n.attributes.height=t))},param:function(n){return n.children=[],n.isEmpty=!0,n},a:function(n){if(!n.children.length&&!n.attributes.name&&!n.attributes["data-cke-saved-name"])return!1},span:function(n){n.attributes["class"]=="Apple-style-span"&&delete n.name},html:function(n){delete n.attributes.contenteditable;delete n.attributes["class"]},body:function(n){delete n.attributes.spellcheck;delete n.attributes.contenteditable},style:function(n){var t=n.children[0];t&&t.value&&(t.value=CKEDITOR.tools.trim(t.value));n.attributes.type||(n.attributes.type="text/css")},title:function(n){var t=n.children[0];t&&(t.value=n.attributes["data-cke-title"]||"")}},attributes:{"class":function(n){return CKEDITOR.tools.ltrim(n.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(u.attributes.style=function(n){return n.replace(/(^|;)([^\:]+)/g,function(n){return n.toLowerCase()})});for(f in{input:1,textarea:1})w.elements[f]=b,u.elements[f]=k;var ft=/<(a|area|img|input|source)\b([^>]*)>/gi,et=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,ot=/(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,st=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,ht=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,ct=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,lt=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}();CKEDITOR.htmlParser.element=function(n,t){this.name=n;this.attributes=t||{};this.children=[];var i=n||"",r=i.match(/^cke:(.*)/);r&&(i=r[1]);i=!(!CKEDITOR.dtd.$nonBodyContent[i]&&!CKEDITOR.dtd.$block[i]&&!CKEDITOR.dtd.$listItem[i]&&!CKEDITOR.dtd.$tableContent[i]&&!(CKEDITOR.dtd.$nonEditable[i]||i=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[n];this.isUnknown=!CKEDITOR.dtd[n];this._={isBlockLike:i,hasInlineStarted:this.isEmpty||!i}};CKEDITOR.htmlParser.cssStyle=function(n){var t={};return((n instanceof CKEDITOR.htmlParser.element?n.attributes.style:n)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(n,i,r){i=="font-family"&&(r=r.replace(/["']/g,""));t[i.toLowerCase()]=r}),{rules:t,populate:function(n){var t=this.toString();t&&(n instanceof CKEDITOR.dom.element?n.setAttribute("style",t):n instanceof CKEDITOR.htmlParser.element?n.attributes.style=t:n.style=t)},toString:function(){var i=[];for(var n in t)t[n]&&i.push(n,":",t[n],";");return i.join("")}}},function(){var n=function(n,t){return n=n[0],t=t[0],n<t?-1:n>t?1:0};CKEDITOR.htmlParser.element.prototype={type:CKEDITOR.NODE_ELEMENT,add:CKEDITOR.htmlParser.fragment.prototype.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},writeHtml:function(t,i){var e=this.attributes,r=this,u=r.name,f,o,c,l,h,s;if(r.filterChildren=function(){if(!l){var n=new CKEDITOR.htmlParser.basicWriter;CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call(r,n,i);r.children=new CKEDITOR.htmlParser.fragment.fromHtml(n.getHtml(),r.clone(),0).children;l=1}},i){if(!this.parent)i.onRoot(this);for(;;){if(!(u=i.onElementName(u)))return;if(r.name=u,!(r=i.onElement(r)))return;if(r.parent=this.parent,r.name==u)break;if(r.type!=CKEDITOR.NODE_ELEMENT){r.writeHtml(t,i);return}if(u=r.name,!u){for(u=0,h=this.children.length;u<h;u++)this.children[u].parent=r.parent;this.writeChildrenHtml.call(r,t,l?null:i);return}}e=r.attributes}for(t.openTag(u,e),h=[],s=0;s<2;s++)for(f in e)if(o=f,c=e[f],s==1)h.push([f,c]);else if(i){for(;;)if(o=i.onAttributeName(f))if(o!=f)delete e[f],f=o;else break;else{delete e[f];break}o&&((c=i.onAttribute(r,o,c))===!1?delete e[o]:e[o]=c)}for(t.sortAttributes&&h.sort(n),e=h.length,s=0;s<e;s++)f=h[s],t.attribute(f[0],f[1]);t.openTagClose(u,r.isEmpty);r.isEmpty||(this.writeChildrenHtml.call(r,t,l?null:i),t.closeTag(u))},writeChildrenHtml:function(){CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.apply(this,arguments)}}}(),function(){var n={};CKEDITOR.template=function(t){if(n[t])this.output=n[t];else{var i=t.replace(/'/g,"\\'").replace(/{([^}]+)}/g,function(n,t){return"',data['"+t+"']==undefined?'{"+t+"}':data['"+t+"'],'"});this.output=n[t]=Function("data","buffer","return buffer?buffer.push('"+i+"'):['"+i+"'].join('');")}}}();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document);CKEDITOR.add=function(n){CKEDITOR.instances[n.name]=n;n.on("focus",function(){CKEDITOR.currentInstance!=n&&(CKEDITOR.currentInstance=n,CKEDITOR.fire("currentInstance"))});n.on("blur",function(){CKEDITOR.currentInstance==n&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))});CKEDITOR.fire("instance",null,n)};CKEDITOR.remove=function(n){delete CKEDITOR.instances[n.name]},function(){var n={};CKEDITOR.addTemplate=function(t,i){var r=n[t];return r?r:(r={name:t,source:i},CKEDITOR.fire("template",r),n[t]=new CKEDITOR.template(r.source))};CKEDITOR.getTemplate=function(t){return n[t]}}(),function(){var n=[];CKEDITOR.addCss=function(t){n.push(t)};CKEDITOR.getCss=function(){return n.join("\n")}}();CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")});CKEDITOR.TRISTATE_ON=1;CKEDITOR.TRISTATE_OFF=2;CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(n,t){if(!CKEDITOR.env.isCompatible)return null;if(n=CKEDITOR.dom.element.get(n),n.getEditor())throw'The editor instance "'+n.getEditor().name+'" is already attached to the provided element.';var i=new CKEDITOR.editor(t,n,CKEDITOR.ELEMENT_MODE_INLINE);i.setData(n.getHtml(),null,!0);i.on("loaded",function(){i.fire("uiReady");i.editable(n);i.container=n;i.setData(i.getData(1));i.fire("contentDom");i.mode="wysiwyg";i.fire("mode");i.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,i);i.resetDirty()},null,null,1e4);i.on("destroy",function(){i.element.clearCustomData();delete i.element});return i};CKEDITOR.inlineAll=function(){var n,t;for(var u in CKEDITOR.dtd.$editable)for(var r=CKEDITOR.document.getElementsByTag(u),i=0,f=r.count();i<f;i++)n=r.getItem(i),n.getAttribute("contenteditable")=="true"&&(t={element:n,config:{}},CKEDITOR.fire("inline",t)!==!1&&CKEDITOR.inline(n,t.config))};CKEDITOR.domReady(function(){CKEDITOR.disableAutoInline||CKEDITOR.inlineAll()})}();CKEDITOR.replaceClass="ckeditor",function(){function t(n,t,f,e){if(!CKEDITOR.env.isCompatible)return null;if(n=CKEDITOR.dom.element.get(n),n.getEditor())throw'The editor instance "'+n.getEditor().name+'" is already attached to the provided element.';var o=new CKEDITOR.editor(t,n,e);e==CKEDITOR.ELEMENT_MODE_REPLACE&&n.setStyle("visibility","hidden");f&&o.setData(f,null,!0);o.on("loaded",function(){r(o);e==CKEDITOR.ELEMENT_MODE_REPLACE&&o.config.autoUpdateElement&&u(o);o.setMode(o.config.startupMode,function(){o.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,o);o.resetDirty()})});o.on("destroy",i);return o}function i(){var n=this.container,t=this.element;n&&(n.clearCustomData(),n.remove());t&&(t.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&t.show(),delete this.element)}function r(t){var i=t.name,r=t.element,u=t.elementMode,f=t.fire("uiSpace",{space:"top",html:""}).html,e=t.fireOnce("uiSpace",{space:"bottom",html:""}).html;n||(n=CKEDITOR.addTemplate("maincontainer",'<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'"  dir="{langDir}" lang="{langCode}" role="application" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}<\/span><{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"><\/{outerEl}>{bottomHtml}<\/{outerEl}><\/{outerEl}>'));i=CKEDITOR.dom.element.createFromHtml(n.output({id:t.id,name:i,langDir:t.lang.dir,langCode:t.langCode,voiceLabel:t.lang.editor,topHtml:f?'<span id="'+t.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+f+"<\/span>":"",contentId:t.ui.spaceId("contents"),bottomHtml:e?'<span id="'+t.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+e+"<\/span>":"",outerEl:CKEDITOR.env.ie?"span":"div"}));u==CKEDITOR.ELEMENT_MODE_REPLACE?(r.hide(),i.insertAfter(r)):r.append(i);t.container=i;f&&t.ui.space("top").unselectable();e&&t.ui.space("bottom").unselectable();r=t.config.width;u=t.config.height;r&&i.setStyle("width",CKEDITOR.tools.cssLength(r));u&&t.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(u));i.disableContextMenu();CKEDITOR.env.webkit&&i.on("focus",function(){t.focus()});t.fireOnce("uiReady")}function u(n){var i=n.element,t,r;if(n.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&i.is("textarea")&&(t=i.$.form&&new CKEDITOR.dom.element(i.$.form),t)){r=function(){n.updateElement()};t.on("submit",r);t.$.submit.nodeName||t.$.submit.length||(t.$.submit=CKEDITOR.tools.override(t.$.submit,function(t){return function(){n.updateElement();t.apply?t.apply(this,arguments):t()}}));n.on("destroy",function(){t.removeListener("submit",r)})}}CKEDITOR.replace=function(n,i){return t(n,i,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(n,i,r){return t(n,i,r,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var i,n,r=document.getElementsByTagName("textarea"),t=0;t<r.length;t++)if(i=null,n=r[t],n.name||n.id){if(typeof arguments[0]=="string"){if(!RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(n.className))continue}else if(typeof arguments[0]=="function"&&(i={},arguments[0](n,i)===!1))continue;this.replace(n,i)}};CKEDITOR.editor.prototype.addMode=function(n,t){(this._.modes||(this._.modes={}))[n]=t};CKEDITOR.editor.prototype.setMode=function(n,t){var i=this,u=this._.modes,r;n==i.mode||!u||!u[n]||(i.fire("beforeSetMode",n),i.mode&&(r=i.checkDirty(),i._.previousMode=i.mode,i.fire("beforeModeUnload"),i.editable(0),i.ui.space("contents").setHtml(""),i.mode=""),this._.modes[n](function(){i.mode=n;r!==void 0&&(i.mayBeDirty=!0,r||i.resetDirty());setTimeout(function(){i.fire("mode");t&&t.call(i)},0)}))};CKEDITOR.editor.prototype.resize=function(n,t,i,r){var f=this.container,e=this.ui.space("contents"),u=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement,r=r?f.getChild(1):f;r.setSize("width",n,!0);u&&(u.style.width="1%");e.setStyle("height",Math.max(t-(i?0:(r.$.offsetHeight||0)-(e.$.clientHeight||0)),0)+"px");u&&(u.style.width="100%");this.fire("resize")};CKEDITOR.editor.prototype.getResizable=function(n){return n?this.ui.space("contents"):this.container};var n;CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}();CKEDITOR.config.startupMode="wysiwyg",function(){function e(t){var i=t.editor,f=i.editable(),r=t.data.path,s=r.blockLimit,e=t.data.selection.getRanges()[0],h=i.config.enterMode,u,o;CKEDITOR.env.gecko&&(u=r.block||r.blockLimit||r.root,o=u&&u.getLast(n),!u||!u.isBlockBoundary()||o&&o.type==CKEDITOR.NODE_ELEMENT&&o.isBlockBoundary()||u.is("pre")||u.getBogus()||u.appendBogus());i.config.autoParagraph!==!1&&h!=CKEDITOR.ENTER_BR&&e.collapsed&&f.equals(s)&&!r.block&&(f=e.clone(),f.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),r=new CKEDITOR.dom.walker(f),r.guard=function(t){return!n(t)||t.type==CKEDITOR.NODE_COMMENT||t.isReadOnly()},(!r.checkForward()||f.checkStartOfBlock()&&f.checkEndOfBlock())&&(i=e.fixBlock(!0,i.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.ie&&(i=i.getFirst(n))&&i.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(i.getText()).match(/^(?:&nbsp;|\xa0)$/)&&i.remove(),e.select(),t.cancel()))}function o(n){var t=n.data.getTarget();t.is("input")&&(t=t.getAttribute("type"),(t=="submit"||t=="reset")&&n.data.preventDefault())}function n(n){return i(n)&&c(n)}function s(n,t){return function(i){var r=CKEDITOR.dom.element.get(i.data.$.toElement||i.data.$.fromElement||i.data.$.relatedTarget);r&&(t.equals(r)||t.contains(r))||n.call(this,i)}}function h(t){var r,f=t.getRanges()[0],t=t.root,u=f.startPath(),e={table:1,ul:1,ol:1,dl:1},o=CKEDITOR.dom.walker.bogus(),i;return u.contains(e)&&(i=f.clone(),i.collapse(1),i.setStartAt(t,CKEDITOR.POSITION_AFTER_START),i=new CKEDITOR.dom.walker(i),u=function(t,i){return function(t,u){return u&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(e)&&(r=t),n(t)&&!u&&(!i||!o(t))?!1:void 0}},i.guard=u(i),i.checkBackward(),r)?(i=f.clone(),i.collapse(),i.setEndAt(t,CKEDITOR.POSITION_BEFORE_END),i=new CKEDITOR.dom.walker(i),i.guard=u(i,1),r=0,i.checkForward(),r):null}function t(n){n.editor.focus();n.editor.fire("saveSnapshot")}function u(n,t){var i=n.editor;t||i.getSelection().scrollIntoView();setTimeout(function(){i.fire("saveSnapshot")},0)}var r;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(n,t){this.base(t.$||t);this.editor=n;this.hasFocus=!1;this.setup()},proto:{focus:function(){this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"]();CKEDITOR.env.safari&&!this.isInline()&&(CKEDITOR.document.getActive().equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(n,t){var i=Array.prototype.slice.call(arguments,0);return CKEDITOR.env.ie&&/^focus|blur$/.exec(n)&&(n=n=="focus"?"focusin":"focusout",t=s(t,this),i[0]=n,i[1]=t),CKEDITOR.dom.element.prototype.on.apply(this,i)},attachListener:function(n){this._.listeners||(this._.listeners=[]);var t=Array.prototype.slice.call(arguments,1);this._.listeners.push(n.on.apply(n,t))},clearListeners:function(){var n=this._.listeners;try{for(;n.length;)n.pop().removeListener()}catch(t){}},restoreAttrs:function(){var t=this._.attrChanges,i;for(var n in t)t.hasOwnProperty(n)&&(i=t[n],i!==null?this.setAttribute(n,i):this.removeAttribute(n))},attachClass:function(n){var t=this.getCustomData("classes");this.hasClass(n)||(t||(t=[]),t.push(n),this.setCustomData("classes",t),this.addClass(n))},changeAttr:function(n,t){var i=this.getAttribute(n);t!==i&&(this._.attrChanges||(this._.attrChanges={}),n in this._.attrChanges||(this._.attrChanges[n]=i),this.setAttribute(n,t))},insertHtml:function(n,i){t(this);r(this,i=="text"?"text":"html",n)},insertText:function(n){var f;t(this);var u=this.editor,i=u.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:u.config.enterMode,u=i==CKEDITOR.ENTER_BR,e=CKEDITOR.tools,n=e.htmlEncode(n.replace(/\r\n/g,"\n")),n=n.replace(/\t/g,"&nbsp;&nbsp; &nbsp;"),i=i==CKEDITOR.ENTER_P?"p":"div";if(!u&&(f=/\n{2}/g,f.test(n)))var o="<"+i+">",s="<\/"+i+">",n=o+n.replace(f,function(){return s+o})+s;n=n.replace(/\n/g,"<br>");u||(n=n.replace(RegExp("<br>(?=<\/"+i+">)"),function(n){return e.repeat(n,2)}));n=n.replace(/^ | $/g,"&nbsp;");n=n.replace(/(>|\s) /g,function(n,t){return t+"&nbsp;"}).replace(/ (?=<)/g,"&nbsp;");r(this,"text",n)},insertElement:function(i){var e,l;t(this);for(var s=this.editor,h=s.config.enterMode,a=s.getSelection(),v=a.getRanges(),y=i.getName(),p=CKEDITOR.dtd.$block[y],r,c,f,o=v.length-1;o>=0;o--)if(r=v[o],!r.checkReadOnly()){if(r.deleteContents(1),c=!o&&i||i.clone(1),p)for(;(e=r.getCommonAncestor(0,1))&&(l=CKEDITOR.dtd[e.getName()])&&(!l||!l[y]);)e.getName()in CKEDITOR.dtd.span?r.splitElement(e):r.checkStartOfBlock()&&r.checkEndOfBlock()?(r.setStartBefore(e),r.collapse(!0),e.remove()):r.splitBlock(h==CKEDITOR.ENTER_DIV?"div":"p",s.editable());r.insertNode(c);f||(f=c)}f&&(r.moveToPosition(f,CKEDITOR.POSITION_AFTER_END),p&&((i=f.getNext(n))&&i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.$block)?i.getDtd()["#"]?r.moveToElementEditStart(i):r.moveToElementEditEnd(f):i||h==CKEDITOR.ENTER_BR||(i=r.fixBlock(!0,h==CKEDITOR.ENTER_DIV?"div":"p"),r.moveToElementEditStart(i))));a.selectRanges([r]);u(this,CKEDITOR.env.opera)},setData:function(n,t){!t&&this.editor.dataProcessor&&(n=this.editor.dataProcessor.toHtml(n));this.setHtml(n);this.editor.fire("dataReady")},getData:function(n){var t=this.getHtml();return!n&&this.editor.dataProcessor&&(t=this.editor.dataProcessor.toDataFormat(t)),t},setReadOnly:function(n){this.setAttribute("contenteditable",!n)},detach:function(){this.removeClass("cke_editable");var n=this.editor;this._.detach();delete n.document;delete n.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var n=this.editor,u,r,t;this.attachListener(n,"beforeGetData",function(){var t=this.getData();this.is("textarea")||n.config.ignoreEmptyParagraph!==!1&&(t=t.replace(f,function(n,t){return t}));n.setData(t,null,1)},this);this.attachListener(n,"getSnapshot",function(n){n.data=this.getData(1)},this);this.attachListener(n,"afterSetData",function(){this.setData(n.getData(1))},this);this.attachListener(n,"loadSnapshot",function(n){this.setData(n.data,1)},this);this.attachListener(n,"beforeFocus",function(){var t=n.getSelection();(t=t&&t.getNative())&&t.type=="Control"||this.focus()},this);this.attachListener(n,"insertHtml",function(n){this.insertHtml(n.data.dataValue,n.data.mode)},this);this.attachListener(n,"insertElement",function(n){this.insertElement(n.data)},this);this.attachListener(n,"insertText",function(n){this.insertText(n.data)},this);this.setReadOnly(n.readOnly);this.attachClass("cke_editable");this.attachClass(n.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":n.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||n.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+n.config.contentsLangDirection);n.keystrokeHandler.blockedKeystrokes[8]=n.readOnly;n.keystrokeHandler.attach(this);this.on("blur",function(n){CKEDITOR.env.opera&&CKEDITOR.document.getActive().equals(this.isInline()?this:this.getWindow().getFrame())?n.cancel():this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(n.focusManager.add(this),this.equals(CKEDITOR.document.getActive())){this.hasFocus=!0;n.once("contentDom",function(){n.focusManager.focus()})}this.isInline()&&this.changeAttr("tabindex",n.tabIndex);this.is("textarea")||(n.document=this.getDocument(),n.window=this.getWindow(),u=n.document,this.changeAttr("spellcheck",!n.config.disableNativeSpellChecker),r=n.config.contentsLangDirection,this.getDirection(1)!=r&&this.changeAttr("dir",r),t=CKEDITOR.getCss(),t&&(r=u.getHead(),r.getCustomData("stylesheet")||(t=u.appendStyleText(t),t=new CKEDITOR.dom.element(t.ownerNode||t.owningElement),r.setCustomData("stylesheet",t),t.data("cke-temp",1))),r=u.getCustomData("stylesheet_ref")||0,u.setCustomData("stylesheet_ref",r+1),this.setCustomData("cke_includeReadonly",!n.config.disableReadonlyStyling),this.attachListener(this,"click",function(n){var n=n.data,t=n.getTarget();t.is("a")&&n.$.button!=2&&t.isReadOnly()&&n.preventDefault()}),this.attachListener(n,"key",function(t){var r,e;if(n.readOnly)return!0;if(r=t.data.keyCode,r in{8:1,46:1}){var o=n.getSelection(),t=o.getRanges()[0],s=t.startPath(),c,f,u,r=r==8;(o=h(o))?(n.fire("saveSnapshot"),t.moveToPosition(o,CKEDITOR.POSITION_BEFORE_START),o.remove(),t.select(),n.fire("saveSnapshot"),e=1):t.collapsed&&((c=s.block)&&t[r?"checkStartOfBlock":"checkEndOfBlock"]()&&(u=c[r?"getPrevious":"getNext"](i))&&u.is("table")?(n.fire("saveSnapshot"),t[r?"checkEndOfBlock":"checkStartOfBlock"]()&&c.remove(),t["moveToElementEdit"+(r?"End":"Start")](u),t.select(),n.fire("saveSnapshot"),e=1):s.blockLimit&&s.blockLimit.is("td")&&(f=s.blockLimit.getAscendant("table"))&&t.checkBoundaryOfElement(f,r?CKEDITOR.START:CKEDITOR.END)&&(u=f[r?"getPrevious":"getNext"](i))?(n.fire("saveSnapshot"),t["moveToElementEdit"+(r?"End":"Start")](u),t.checkStartOfBlock()&&t.checkEndOfBlock()?u.remove():t.select(),n.fire("saveSnapshot"),e=1):(f=s.contains(["td","th","caption"]))&&t.checkBoundaryOfElement(f,r?CKEDITOR.START:CKEDITOR.END)&&(u=f[r?"getPreviousSourceNode":"getNextSourceNode"](1,CKEDITOR.NODE_ELEMENT))&&!u.isReadOnly()&&t.root.contains(u)&&(t[r?"moveToElementEditEnd":"moveToElementEditStart"](u),t.select(),e=1))}return!e}),CKEDITOR.env.ie&&this.attachListener(this,"click",o),CKEDITOR.env.ie||CKEDITOR.env.opera||this.attachListener(this,"mousedown",function(t){var i=t.data.getTarget();i.is("img","hr","input","textarea","select")&&(n.getSelection().selectElement(i),i.is("input","textarea","select")&&t.data.preventDefault())}),CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(t){if(t.data.$.button==2&&(t=t.data.getTarget(),!t.getOuterHtml().replace(f,""))){var i=n.createRange();i.moveToElementEditStart(t);i.select(!0)}}),CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(n){n.data.getTarget().is("input","select")&&n.data.preventDefault()}),this.attachListener(this,"mouseup",function(n){n.data.getTarget().is("input","textarea")&&n.data.preventDefault()})))}},_:{detach:function(){var n,t,i;if(this.editor.setData(this.editor.getData(),0,1),this.clearListeners(),this.restoreAttrs(),n=this.removeCustomData("classes"))for(;n.length;)this.removeClass(n.pop());n=this.getDocument();t=n.getHead();t.getCustomData("stylesheet")&&(i=n.getCustomData("stylesheet_ref"),--i?n.setCustomData("stylesheet_ref",i):(n.removeCustomData("stylesheet_ref"),t.removeCustomData("stylesheet").remove()));delete this.editor}}});CKEDITOR.editor.prototype.editable=function(n){var t=this._.editable;return t&&n?0:(arguments.length&&(t=this._.editable=n?n instanceof CKEDITOR.editable?n:new CKEDITOR.editable(this,n):(t&&t.detach(),null)),t)};var f=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,i=CKEDITOR.dom.walker.whitespaces(!0),c=CKEDITOR.dom.walker.bookmark(!1,!0);CKEDITOR.on("instanceLoaded",function(n){var t=n.editor;t.on("insertElement",function(n){n=n.data;n.type==CKEDITOR.NODE_ELEMENT&&(n.is("input")||n.is("textarea"))&&(n.getAttribute("contentEditable")!="false"&&n.data("cke-editable",n.hasAttribute("contenteditable")?"true":"1"),n.setAttribute("contentEditable",!1))});t.on("selectionChange",function(n){if(!t.readOnly){var i=t.getSelection();i&&!i.isLocked&&(i=t.checkDirty(),t.fire("lockSnapshot"),e(n),t.fire("unlockSnapshot"),i||t.resetDirty())}})});CKEDITOR.on("instanceCreated",function(n){var t=n.editor;t.on("mode",function(){var n=t.editable(),i,r,u;n&&n.isInline()&&(i=this.lang.editor+", "+this.name,n.changeAttr("role","textbox"),n.changeAttr("aria-label",i),n.changeAttr("title",i),(i=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))&&(r=CKEDITOR.tools.getNextId(),u=CKEDITOR.dom.element.createFromHtml('<span id="'+r+'" class="cke_voice_label">'+this.lang.common.editorHelp+"<\/span>"),i.append(u),n.changeAttr("aria-describedby",r)))})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");r=function(){function t(n){return n.type==CKEDITOR.NODE_ELEMENT}function f(n,r){var u,o,h,c,s=[],p=r.range.startContainer;u=r.range.startPath();for(var p=i[p.getName()],e=0,a=n.getChildren(),w=a.count(),l=-1,v=-1,y=0,b=u.contains(i.$list);e<w;++e)u=a.getItem(e),t(u)?(h=u.getName(),b&&h in CKEDITOR.dtd.$list?s=s.concat(f(u,r)):(c=!!p[h],h=="br"&&u.data("cke-eol")&&(!e||e==w-1)&&(y=(o=e?s[e-1].node:a.getItem(e+1))&&(!t(o)||!o.is("br")),o=o&&t(o)&&i.$block[o.getName()]),l!=-1||c||(l=e),c||(v=e),s.push({isElement:1,isLineBreak:y,isBlock:u.isBlockBoundary(),hasBlockSibling:o,node:u,name:h,allowed:c}),o=y=0)):s.push({isElement:0,node:u,allowed:1});return l>-1&&(s[l].firstNotAllowed=1),v>-1&&(s[v].lastNotAllowed=1),s}function e(n,r){var u=[],s=n.getChildren(),c=s.count(),f,o=0,l=i[r],h=!n.is(i.$inline)||n.is("br");for(h&&u.push(" ");o<c;o++)f=s.getItem(o),t(f)&&!f.is(l)?u=u.concat(e(f,r)):u.push(f);return h&&u.push(" "),u}function r(n){return n&&t(n)&&(n.is(i.$removeEmpty)||n.is("a")&&!n.isBlockBoundary())}function o(n,i,r,u){var s=n.clone(),f,e;s.setEndAt(i,CKEDITOR.POSITION_BEFORE_END);(f=new CKEDITOR.dom.walker(s).next())&&t(f)&&c[f.getName()]&&(e=f.getPrevious())&&t(e)&&!e.getParent().equals(n.startContainer)&&r.contains(e)&&u.contains(f)&&f.isIdentical(e)&&(f.moveChildren(e),f.remove(),o(n,i,r,u))}function h(n,i){function r(n,i){if(i.isBlock&&i.isElement&&!i.node.is("br")&&t(n)&&n.is("br"))return n.remove(),1}var u=i.endContainer.getChild(i.endOffset),f=i.endContainer.getChild(i.endOffset-1);u&&r(u,n[n.length-1]);f&&r(f,n[0])&&(i.setEnd(i.endContainer,i.endOffset-1),i.collapse())}var i=CKEDITOR.dtd,c={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},l={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},s=CKEDITOR.tools.extend({},i.$inline);return delete s.br,function(c,a,v){var y=c.editor,ct,lt,d,ut,w,v,tt,g,et,ot,it,st,ht,ft,at,vt;if(c.getDocument(),ct=y.getSelection().getRanges()[0],!ct.checkReadOnly()){var ot=new CKEDITOR.dom.elementPath(ct.startContainer,ct.root).blockLimit||ct.root,a={type:a,editable:c,editor:y,range:ct,blockLimit:ot,mergeCandidates:[],zombies:[]},y=a.range,ot=a.mergeCandidates,b,p,rt,nt,k;for(a.type=="text"&&y.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(p=CKEDITOR.dom.element.createFromHtml("<span>&nbsp;<\/span>",y.document),y.insertNode(p),y.setStartAfter(p)),rt=new CKEDITOR.dom.elementPath(y.startContainer),a.endPath=nt=new CKEDITOR.dom.elementPath(y.endContainer),y.collapsed||(b=nt.block||nt.blockLimit,lt=y.getCommonAncestor(),b&&!b.equals(lt)&&!b.contains(lt)&&y.checkEndOfBlock()&&a.zombies.push(b),y.deleteContents());(k=t(y.startContainer)&&y.startContainer.getChild(y.startOffset-1))&&t(k)&&k.isBlockBoundary()&&rt.contains(k);)y.moveToPosition(k,CKEDITOR.POSITION_BEFORE_END);for(o(y,a.blockLimit,rt,nt),p&&(y.setEndBefore(p),y.collapse(),p.remove()),p=y.startPath(),(b=p.contains(r,!1,1))&&(y.splitElement(b),a.inlineStylesRoot=b,a.inlineStylesPeak=p.lastElement),p=y.createBookmark(),(b=p.startNode.getPrevious(n))&&t(b)&&r(b)&&ot.push(b),(b=p.startNode.getNext(n))&&t(b)&&r(b)&&ot.push(b),b=p.startNode;(b=b.getParent())&&r(b);)ot.push(b);if(y.moveToBookmark(p),v){if(k=v,v=a.range,a.type=="text"&&a.inlineStylesRoot){for(p=k,k=a.inlineStylesPeak,y=k.getDocument().createText("{cke-peak}"),ot=a.inlineStylesRoot.getParent();!k.equals(ot);)y=y.appendTo(k.clone()),k=k.getParent();k=y.getOuterHtml().replace("{cke-peak}",p)}if(p=a.blockLimit.getName(),/^\s+|\s+$/.test(k)&&"span"in CKEDITOR.dtd[p]&&(ut='<span data-cke-marker="1">&nbsp;<\/span>',k=ut+k+ut),k=a.editor.dataProcessor.toHtml(k,null,!1),p=v.document.createElement("body"),p.setHtml(k),ut&&(p.getFirst().remove(),p.getLast().remove()),(ut=v.startPath().block)&&!(ut.getChildCount()==1&&ut.getBogus()))n:{if(p.getChildCount()==1&&t(d=p.getFirst())&&d.is(l)){for(ut=d.getElementsByTag("*"),v=0,y=ut.count();v<y;v++)if(k=ut.getItem(v),!k.is(s))break n;d.moveChildren(d.getParent(1));d.remove()}}for(a.dataWrapper=p,d=a.range,ut=d.document,v=a.blockLimit,p=0,k=[],ot=y=0,rt=d.startContainer,b=a.endPath.elements[0],nt=b.getPosition(rt),lt=!!b.getCommonAncestor(rt)&&nt!=CKEDITOR.POSITION_IDENTICAL&&!(nt&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),rt=f(a.dataWrapper,a),h(rt,d);p<rt.length;p++)if(nt=rt[p],(w=nt.isLineBreak)&&(w=d,it=v,ft=void 0,at=void 0,nt.hasBlockSibling?w=1:(ft=w.startContainer.getAscendant(i.$block,1),ft&&ft.is({div:1,p:1})?(at=ft.getPosition(it),at==CKEDITOR.POSITION_IDENTICAL||at==CKEDITOR.POSITION_CONTAINS?w=0:(it=w.splitElement(ft),w.moveToPosition(it,CKEDITOR.POSITION_AFTER_START),w=1)):w=0)),w)ot=p>0;else{if(w=d.startPath(),!nt.isBlock&&(et=a.editor.config.enterMode!=CKEDITOR.ENTER_BR&&a.editor.config.autoParagraph!==!1?a.editor.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":!1)&&!w.block&&w.blockLimit&&w.blockLimit.equals(d.root)&&(et=ut.createElement(et),CKEDITOR.env.ie||et.appendBogus(),d.insertNode(et),!CKEDITOR.env.ie&&(tt=et.getBogus())&&tt.remove(),d.moveToPosition(et,CKEDITOR.POSITION_BEFORE_END)),(w=d.startPath().block)&&!w.equals(g)&&((tt=w.getBogus())&&(tt.remove(),k.push(w)),g=w),nt.firstNotAllowed&&(y=1),y&&nt.isElement){for(w=d.startContainer,it=null;w&&!i[w.getName()][nt.name];){if(w.equals(v)){w=null;break}it=w;w=w.getParent()}if(w)it&&(st=d.splitElement(it),a.zombies.push(st),a.zombies.push(it));else{it=v.getName();ht=!p;w=p==rt.length-1;it=e(nt.node,it);for(var ft=[],at=it.length,yt=0,pt=void 0,wt=0,bt=-1;yt<at;yt++)pt=it[yt],pt==" "?(wt||ht&&!yt||(ft.push(new CKEDITOR.dom.text(" ")),bt=ft.length),wt=1):(ft.push(pt),wt=0);w&&bt==ft.length&&ft.pop();ht=ft}}if(ht){for(;w=ht.pop();)d.insertNode(w);ht=0}else d.insertNode(nt.node);nt.lastNotAllowed&&p<rt.length-1&&((st=lt?b:st)&&d.setEndAt(st,CKEDITOR.POSITION_AFTER_START),y=0);d.collapse()}a.dontMoveCaret=ot;a.bogusNeededBlocks=k}for(tt=a.range,st=a.bogusNeededBlocks,ht=tt.createBookmark();g=a.zombies.pop();)g.getParent()&&(et=tt.clone(),et.moveToElementEditStart(g),et.removeEmptyBlocksAtEnd());if(st)for(;g=st.pop();)g.append(CKEDITOR.env.ie?tt.document.createText(" "):tt.document.createElement("br"));for(;g=a.mergeCandidates.pop();)g.mergeSiblings();if(tt.moveToBookmark(ht),!a.dontMoveCaret){for(g=t(tt.startContainer)&&tt.startContainer.getChild(tt.startOffset-1);g&&t(g)&&!g.is(i.$empty);){if(g.isBlockBoundary())tt.moveToPosition(g,CKEDITOR.POSITION_BEFORE_END);else{if(r(g)&&g.getHtml().match(/(\s|&nbsp;)$/g)){vt=null;break}vt=tt.clone();vt.moveToPosition(g,CKEDITOR.POSITION_BEFORE_END)}g=g.getLast(n)}vt&&tt.moveToRange(vt)}ct.select();u(c)}}}()}(),function(){function u(){var t=this.getSelection(1),n;t.getType()!=CKEDITOR.SELECTION_NONE&&(this.fire("selectionCheck",t),n=this.elementPath(),n.compare(this._.selectionPreviousPath)||(this._.selectionPreviousPath=n,this.fire("selectionChange",{selection:t,path:n})))}function i(){o=!0;e||(s.call(this),e=CKEDITOR.tools.setTimeout(s,200,this))}function s(){e=null;o&&(CKEDITOR.tools.setTimeout(u,0,this),o=!1)}function c(n){function i(t,i){return!t||t.type==CKEDITOR.NODE_TEXT?!1:n.clone()["moveToElementEdit"+(i?"End":"Start")](t)}if(!(n.root instanceof CKEDITOR.editable))return!1;var t=n.startContainer,r=n.getPreviousNode(h,null,t),u=n.getNextNode(h,null,t);return i(r)||i(u,1)||!r&&!u&&!(t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()&&t.getBogus())?!0:!1}function f(n){return n.getCustomData("cke-fillingChar")}function t(n,t){var r=n&&n.removeCustomData("cke-fillingChar"),f,i,u,e;r&&(t!==!1&&(i=n.getDocument().getSelection().getNative(),u=i&&i.type!="None"&&i.getRangeAt(0),r.getLength()>1&&u&&u.intersectsNode(r.$)&&(f=[i.anchorOffset,i.focusOffset],u=i.focusNode==r.$&&i.focusOffset>0,i.anchorNode==r.$&&i.anchorOffset>0&&f[0]--,u&&f[1]--,u=i,u.isCollapsed||(e=u.getRangeAt(0),e.setStart(u.anchorNode,u.anchorOffset),e.setEnd(u.focusNode,u.focusOffset),e=e.collapsed),e&&f.unshift(f.pop()))),r.setText(r.getText().replace(/\u200B/g,"")),f&&(r=i.getRangeAt(0),r.setStart(r.startContainer,f[0]),r.setEnd(r.startContainer,f[1]),i.removeAllRanges(),i.addRange(r)))}var e,o,h=CKEDITOR.dom.walker.invisible(1),n,r;CKEDITOR.on("instanceCreated",function(r){function e(){var n=f.getSelection();n&&n.removeAllRanges()}var f=r.editor;f.define("selectionChange",{errorProof:1});f.on("contentDom",function(){var o=f.document,c=CKEDITOR.document,r=f.editable(),p=o.getBody(),e=o.getDocumentElement(),w=r.isInline(),l,a,v,s,h,y;if((CKEDITOR.env.ie||CKEDITOR.env.opera||w)&&(r.attachListener(r,"focus",function(){f.unlockSelection(l);l=0},null,null,-1),v=function(){a=f.getSelection(1);a.lock()},n?r.attachListener(r,"beforedeactivate",v,null,null,-1):r.attachListener(f,"selectionCheck",v,null,null,-1),r.attachListener(r,"blur",function(){f.lockSelection(a);l=1},null,null,-1),r.attachListener(r,"mousedown",function(){l=0})),CKEDITOR.env.ie&&!w&&(r.attachListener(r,"mousedown",function(n){n.data.$.button==2&&f.document.$.selection.type=="None"&&(s=f.window.getScrollPosition())}),r.attachListener(r,"mouseup",function(n){n.data.$.button==2&&s&&(f.document.$.documentElement.scrollLeft=s.x,f.document.$.documentElement.scrollTop=s.y);s=null}),o.$.compatMode!="BackCompat")){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)e.on("mousedown",function(n){function r(n){if(n=n.data.$,t){var i=p.$.createTextRange();try{i.moveToPoint(n.x,n.y)}catch(r){}t.setEndPoint(u.compareEndPoints("StartToStart",i)<0?"EndToEnd":"StartToStart",i);t.select()}}function i(){e.removeListener("mousemove",r);c.removeListener("mouseup",i);e.removeListener("mouseup",i);t.select()}var t,u;if(n=n.data,n.getTarget().is("html")&&n.$.y<e.$.clientHeight&&n.$.x<e.$.clientWidth){t=p.$.createTextRange();try{t.moveToPoint(n.$.x,n.$.y)}catch(f){}u=t.duplicate();e.on("mousemove",r);c.on("mouseup",i);e.on("mouseup",i)}});if(CKEDITOR.env.version>7){e.on("mousedown",function(n){if(n.data.getTarget().is("html")){c.on("mouseup",h);e.on("mouseup",h)}});h=function(){c.removeListener("mouseup",h);e.removeListener("mouseup",h);var n=CKEDITOR.document.$.selection,t=n.createRange();n.type!="None"&&t.parentElement().ownerDocument==o.$&&t.select()}}}if(r.attachListener(r,"selectionchange",u,f),r.attachListener(r,"keyup",i,f),r.attachListener(r,"focus",function(){f.forceNextSelectionCheck();f.selectionChange(1)}),(r.isInline()?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera)?(r.attachListener(r,"mousedown",function(){y=1}),r.attachListener(o.getDocumentElement(),"mouseup",function(){y&&i.call(f);y=0})):r.attachListener(r,"mouseup",i,f),CKEDITOR.env.webkit)o.on("keydown",function(n){switch(n.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:t(f.editable())}},null,null,-1)});f.on("contentDomUnload",f.forceNextSelectionCheck,f);f.on("dataReady",function(){f.selectionChange(1)});CKEDITOR.env.ie9Compat&&f.on("beforeDestroy",e,null,null,9);CKEDITOR.env.webkit&&f.on("setData",e);f.on("contentDomUnload",function(){f.unlockSelection()})});CKEDITOR.on("instanceReady",function(n){var i=n.editor,r=i.editable(),u,e,n,o;if(CKEDITOR.env.webkit){i.on("selectionChange",function(){var n=f(r);n&&(n.getCustomData("ready")?t(r):n.setCustomData("ready",1))},null,null,-1);i.on("beforeSetMode",function(){t(r)},null,null,-1);n=function(){var n=i.document,t=f(r);t&&(n=n.$.defaultView.getSelection(),n.type=="Caret"&&n.anchorNode==t.$&&(e=1),u=t.getText(),t.setText(u.replace(/\u200B/g,"")))};o=function(){var t=i.document,n=f(r);n&&(n.setText(u),e&&(t.$.defaultView.getSelection().setPosition(n.$,n.getLength()),e=0))};i.on("beforeUndoImage",n);i.on("afterUndoImage",o);i.on("beforeGetData",n,null,null,0);i.on("getData",o)}});CKEDITOR.editor.prototype.selectionChange=function(n){(n?u:i).call(this)};CKEDITOR.editor.prototype.getSelection=function(n){return this._.savedSelection&&!n?this._.savedSelection:(n=this.editable())?new CKEDITOR.dom.selection(n):null};CKEDITOR.editor.prototype.lockSelection=function(n){return(n=n||this.getSelection(1),n.getType()!=CKEDITOR.SELECTION_NONE)?(n.isLocked||n.lock(),this._.savedSelection=n,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(n){var t=this._.savedSelection;return t?(t.unlock(n),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var n=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);return n.selectRanges([this]),n};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;n=typeof getSelection!="function";CKEDITOR.dom.selection=function(n){var i=n instanceof CKEDITOR.dom.element,t,n,r;if(this.document=n instanceof CKEDITOR.dom.document?n:n.getDocument(),this.root=i?n:this.document.getBody(),this.isLocked=0,this._={cache:{}},CKEDITOR.env.webkit&&(n=this.document.getWindow().$.getSelection(),(n.type=="None"&&this.document.getActive().equals(this.root)||n.type=="Caret"&&n.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&(t=new CKEDITOR.dom.range(this.root),t.moveToPosition(this.root,CKEDITOR.POSITION_AFTER_START),i=this.document.$.createRange(),i.setStart(t.startContainer.$,t.startOffset),i.collapse(1),n.addRange(i))),n=this.getNative(),n)if(n.getRangeAt)r=(t=n.rangeCount&&n.getRangeAt(0))&&new CKEDITOR.dom.node(t.commonAncestorContainer);else{try{t=n.createRange()}catch(u){}r=t&&CKEDITOR.dom.element.get(t.item&&t.item(0)||t.parentElement())}return r&&(this.root.equals(r)||this.root.contains(r))||(this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList),this};r={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.dom.selection.prototype={getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel=n?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:n?function(){var t=this._.cache,n,i,r;if(t.type)return t.type;n=CKEDITOR.SELECTION_NONE;try{i=this.getNative();r=i.type;r=="Text"&&(n=CKEDITOR.SELECTION_TEXT);r=="Control"&&(n=CKEDITOR.SELECTION_ELEMENT);i.createRange().parentElement()&&(n=CKEDITOR.SELECTION_TEXT)}catch(u){}return t.type=n}:function(){var u=this._.cache,t,n,i;return u.type?u.type:(t=CKEDITOR.SELECTION_TEXT,n=this.getNative(),n&&n.rangeCount?n.rangeCount==1&&(n=n.getRangeAt(0),i=n.startContainer,i==n.endContainer&&i.nodeType==1&&n.endOffset-n.startOffset==1&&r[i.childNodes[n.startOffset].nodeName.toLowerCase()]&&(t=CKEDITOR.SELECTION_ELEMENT)):t=CKEDITOR.SELECTION_NONE,u.type=t)},getRanges:function(){var t=n?function(){function n(n){return new CKEDITOR.dom.node(n).getIndex()}var t=function(t,i){var u,r;if(t=t.duplicate(),t.collapse(i),u=t.parentElement(),r=u.ownerDocument,!u.hasChildNodes())return{container:u,offset:0};for(var f=u.children,e,o,h=t.duplicate(),a=0,v=f.length-1,c=-1,s,l;a<=v;)if(c=Math.floor((a+v)/2),e=f[c],h.moveToElementText(e),s=h.compareEndPoints("StartToStart",t),s>0)v=c-1;else if(s<0)a=c+1;else return CKEDITOR.env.ie9Compat&&e.tagName=="BR"?(f=r.defaultView.getSelection(),{container:f[i?"anchorNode":"focusNode"],offset:f[i?"anchorOffset":"focusOffset"]}):{container:u,offset:n(e)};if(c==-1||c==f.length-1&&s<0){if(h.moveToElementText(u),h.setEndPoint("StartToStart",t),r=h.text.replace(/(\r\n|\r)/g,"\n").length,f=u.childNodes,!r)return e=f[f.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:u,offset:f.length}:{container:e,offset:e.nodeValue.length};for(u=f.length;r>0&&u>0;)o=f[--u],o.nodeType==CKEDITOR.NODE_TEXT&&(l=o,r=r-o.nodeValue.length);return{container:l,offset:-r}}if(h.collapse(s>0?!0:!1),h.setEndPoint(s>0?"StartToStart":"EndToStart",t),r=h.text.replace(/(\r\n|\r)/g,"\n").length,!r)return{container:u,offset:n(e)+(s>0?0:1)};for(;r>0;)try{o=e[s>0?"previousSibling":"nextSibling"];o.nodeType==CKEDITOR.NODE_TEXT&&(r=r-o.nodeValue.length,l=o);e=o}catch(y){return{container:u,offset:n(e)}}return{container:l,offset:s>0?-r:l.nodeValue.length+r}};return function(){var n=this.getNative(),u=n&&n.createRange(),i=this.getType(),f;if(!n)return[];if(i==CKEDITOR.SELECTION_TEXT)return n=new CKEDITOR.dom.range(this.root),i=t(u,!0),n.setStart(new CKEDITOR.dom.node(i.container),i.offset),i=t(u),n.setEnd(new CKEDITOR.dom.node(i.container),i.offset),n.endContainer.getPosition(n.startContainer)&CKEDITOR.POSITION_PRECEDING&&n.endOffset<=n.startContainer.getIndex()&&n.collapse(),[n];if(i==CKEDITOR.SELECTION_ELEMENT){for(i=[],f=0;f<u.length;f++){for(var o=u.item(f),e=o.parentNode,r=0,n=new CKEDITOR.dom.range(this.root);r<e.childNodes.length&&e.childNodes[r]!=o;r++);n.setStart(new CKEDITOR.dom.node(e),r);n.setEnd(new CKEDITOR.dom.node(e),r+1);i.push(n)}return i}return[]}}():function(){var r=[],t,u=this.getNative(),i,n;if(!u)return r;for(i=0;i<u.rangeCount;i++)n=u.getRangeAt(i),t=new CKEDITOR.dom.range(this.root),t.setStart(new CKEDITOR.dom.node(n.startContainer),n.startOffset),t.setEnd(new CKEDITOR.dom.node(n.endContainer),n.endOffset),r.push(t);return r};return function(n){var f=this._.cache,e,r,i,n,u;if(f.ranges&&!n)return f.ranges;if(f.ranges||(f.ranges=new CKEDITOR.dom.rangeList(t.call(this))),n)for(e=f.ranges,r=0;r<e.length;r++)if(i=e[r],i.getCommonAncestor().isReadOnly()&&e.splice(r,1),!i.collapsed){if(i.startContainer.isReadOnly())for(n=i.startContainer;n;){if((u=n.type==CKEDITOR.NODE_ELEMENT)&&n.is("body")||!n.isReadOnly())break;u&&n.getAttribute("contentEditable")=="false"&&i.setStartAfter(n);n=n.getParent()}n=i.startContainer;u=i.endContainer;var s=i.startOffset,h=i.endOffset,o=i.clone();n&&n.type==CKEDITOR.NODE_TEXT&&(s>=n.getLength()?o.setStartAfter(n):o.setStartBefore(n));u&&u.type==CKEDITOR.NODE_TEXT&&(h?o.setEndAfter(u):o.setEndBefore(u));n=new CKEDITOR.dom.walker(o);n.evaluator=function(n){if(n.type==CKEDITOR.NODE_ELEMENT&&n.isReadOnly()){var t=i.clone();return i.setEndBefore(n),i.collapsed&&e.splice(r--,1),n.getPosition(o.endContainer)&CKEDITOR.POSITION_CONTAINS||(t.setStartAfter(n),t.collapsed||e.splice(r+1,0,t)),!0}return!1};n.next()}return f.ranges}}(),getStartElement:function(){var i=this._.cache,n,t;if(i.startElement!==void 0)return i.startElement;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:if(t=this.getRanges()[0],t){if(t.collapsed)n=t.startContainer,n.type!=CKEDITOR.NODE_ELEMENT&&(n=n.getParent());else{for(t.optimize();;)if(n=t.startContainer,t.startOffset!=(n.getChildCount?n.getChildCount():n.getLength())||n.isBlockBoundary())break;else t.setStartAfter(n);if(n=t.startContainer,n.type!=CKEDITOR.NODE_ELEMENT)return n.getParent();if(n=n.getChild(t.startOffset),n&&n.type==CKEDITOR.NODE_ELEMENT)for(t=n.getFirst();t&&t.type==CKEDITOR.NODE_ELEMENT;)n=t,t=t.getFirst();else n=t.startContainer}n=n.$}}return i.startElement=n?new CKEDITOR.dom.element(n):null},getSelectedElement:function(){var n=this._.cache,t,i;return n.selectedElement!==void 0?n.selectedElement:(t=this,i=CKEDITOR.tools.tryThese(function(){return t.getNative().createRange().item(0)},function(){for(var i=t.getRanges()[0],n,u,f=2;f&&(!(n=i.getEnclosedNode())||!(n.type==CKEDITOR.NODE_ELEMENT&&r[n.getName()]&&(u=n)));f--)i.shrink(CKEDITOR.SHRINK_ELEMENT);return u.$}),n.selectedElement=i?new CKEDITOR.dom.element(i):null)},getSelectedText:function(){var i=this._.cache,t;return i.selectedText!==void 0?i.selectedText:(t=this.getNative(),t=n?t.type=="Control"?"":t.createRange().text:t.toString(),i.selectedText=t)},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(n){if(this.isLocked){if(n)var t=this.getSelectedElement(),i=!t&&this.getRanges();this.isLocked=0;this.reset();n&&(n=t||i[0].getCommonAncestor())&&n.getAscendant("body",1)&&(t?this.selectElement(t):this.selectRanges(i))}},reset:function(){this._.cache={}},selectElement:function(n){var t=new CKEDITOR.dom.range(this.root);t.setStartBefore(n);t.setEndAfter(n);this.selectRanges([t])},selectRanges:function(i){var u,s,l;if(i.length)if(this.isLocked)u=CKEDITOR.document.getActive(),this.unlock(),this.selectRanges(i),this.lock(),u.equals(this.root)||u.focus();else{if(n){var v=CKEDITOR.dom.walker.whitespaces(!0),h=/\ufeff|\u00a0/,s={table:1,tbody:1,tr:1};i.length>1&&(u=i[i.length-1],i[0].setEnd(u.endContainer,u.endOffset));var u=i[0],i=u.collapsed,o,f,e,a=u.getEnclosedNode();if(a&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in r&&(!a.is("a")||!a.getText()))try{e=a.$.createControlRange();e.addElement(a.$);e.select();return}catch(p){}(u.startContainer.type==CKEDITOR.NODE_ELEMENT&&u.startContainer.getName()in s||u.endContainer.type==CKEDITOR.NODE_ELEMENT&&u.endContainer.getName()in s)&&u.shrink(CKEDITOR.NODE_ELEMENT,!0);e=u.createBookmark();s=e.startNode;i||(l=e.endNode);e=u.document.$.body.createTextRange();e.moveToElementText(s.$);e.moveStart("character",1);l?(h=u.document.$.body.createTextRange(),h.moveToElementText(l.$),e.setEndPoint("EndToEnd",h),e.moveEnd("character",-1)):(o=s.getNext(v),f=s.hasAscendant("pre"),o=!(o&&o.getText&&o.getText().match(h))&&(f||!s.hasPrevious()||s.getPrevious().is&&s.getPrevious().is("br")),f=u.document.createElement("span"),f.setHtml("&#65279;"),f.insertBefore(s),o&&u.document.createText("﻿").insertBefore(s));u.setStartBefore(s);s.remove();i?(o?(e.moveStart("character",-1),e.select(),u.document.$.selection.clear()):e.select(),u.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f.remove()):(u.setEndBefore(l),l.remove(),e.select())}else{if(l=this.getNative(),!l)return;for(CKEDITOR.env.opera&&(u=this.document.$.createRange(),u.selectNodeContents(this.root.$),l.addRange(u)),this.removeAllRanges(),h=0;h<i.length;h++){if(h<i.length-1&&(u=i[h],e=i[h+1],f=u.clone(),f.setStart(u.endContainer,u.endOffset),f.setEnd(e.startContainer,e.startOffset),!f.collapsed&&(f.shrink(CKEDITOR.NODE_ELEMENT,!0),o=f.getCommonAncestor(),f=f.getEnclosedNode(),o.isReadOnly()||f&&f.isReadOnly()))){e.setStart(u.startContainer,u.startOffset);i.splice(h--,1);continue}u=i[h];e=this.document.$.createRange();o=u.startContainer;CKEDITOR.env.opera&&u.collapsed&&o.type==CKEDITOR.NODE_ELEMENT&&(f=o.getChild(u.startOffset-1),v=o.getChild(u.startOffset),(!f&&!v&&o.is(CKEDITOR.dtd.$removeEmpty)||f&&f.type==CKEDITOR.NODE_ELEMENT||v&&v.type==CKEDITOR.NODE_ELEMENT)&&(u.insertNode(this.document.createText("")),u.collapse(1)));u.collapsed&&CKEDITOR.env.webkit&&c(u)&&(o=this.root,t(o,!1),f=o.getDocument().createText("​"),o.setCustomData("cke-fillingChar",f),u.insertNode(f),(o=f.getNext())&&!f.getPrevious()&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()=="br"?(t(this.root),u.moveToPosition(o,CKEDITOR.POSITION_BEFORE_START)):u.moveToPosition(f,CKEDITOR.POSITION_AFTER_END));e.setStart(u.startContainer.$,u.startOffset);try{e.setEnd(u.endContainer.$,u.endOffset)}catch(y){if(y.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0)u.collapse(1),e.setEnd(u.endContainer.$,u.endOffset);else throw y;}l.addRange(e)}}this.reset();this.root.fire("selectionchange")}},createBookmarks:function(n){return this.getRanges().createBookmarks(n)},createBookmarks2:function(n){return this.getRanges().createBookmarks2(n)},selectBookmarks:function(n){for(var r,i=[],t=0;t<n.length;t++)r=new CKEDITOR.dom.range(this.root),r.moveToBookmark(n[t]),i.push(r);return this.selectRanges(i),this},getCommonAncestor:function(){var n=this.getRanges();return n[0].startContainer.getCommonAncestor(n[n.length-1].endContainer)},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){var t=this.getNative();try{t&&t[n?"empty":"removeAllRanges"]()}catch(i){}this.reset()}}}();CKEDITOR.editor.prototype.attachStyleStateChange=function(n,t){var i=this._.styleStateChangeCallbacks;if(!i){i=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(n){for(var r,u,t=0;t<i.length;t++)r=i[t],u=r.style.checkActive(n.data.path)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF,r.fn.call(this,u)})}i.push({style:n,fn:t})};CKEDITOR.STYLE_BLOCK=1;CKEDITOR.STYLE_INLINE=2;CKEDITOR.STYLE_OBJECT=3,function(){function h(n,t){for(var i,u,r;n=n.getParent();){if(n.equals(t))break;n.getAttribute("data-nostyle")?i=n:u||(r=n.getAttribute("contentEditable"),r=="false"?i=n:r=="true"&&(u=1))}return i}function w(n){var w=n.document,nt,p,f,b;if(n.collapsed)w=e(this,w),n.insertNode(w),n.moveToPosition(w,CKEDITOR.POSITION_BEFORE_END);else{var g=this.element,u=this._.definition,rt,t=u.ignoreReadonly,k=t||u.includeReadonly;k==void 0&&(k=n.root.getCustomData("cke_includeReadonly"));nt=CKEDITOR.dtd[g]||(rt=!0,CKEDITOR.dtd.span);n.enlarge(CKEDITOR.ENLARGE_INLINE,1);n.trim();var tt=n.createBookmark(),it=tt.startNode,y=tt.endNode,i=it,r;if(!t){var c=n.getCommonAncestor(),t=h(it,c),c=h(y,c);t&&(i=t.getNextSourceNode(!0));c&&(y=c)}for(i.getPosition(y)==CKEDITOR.POSITION_FOLLOWING&&(i=0);i;){if(t=!1,i.equals(y))i=null,t=!0;else{var f=i.type,o=f==CKEDITOR.NODE_ELEMENT?i.getName():null,c=o&&i.getAttribute("contentEditable")=="false",a=o&&i.getAttribute("data-nostyle");if(o&&i.data("cke-bookmark")){i=i.getNextSourceNode(!0);continue}if(o&&(!nt[o]||a||c&&!k||(i.getPosition(y)|CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)!=CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED||u.childRule&&!u.childRule(i)))t=!0;else if(p=i.getParent(),p&&((p.getDtd()||CKEDITOR.dtd.span)[g]||rt)&&(!u.parentRule||u.parentRule(p))){if(r||o&&CKEDITOR.dtd.$removeEmpty[o]&&(i.getPosition(y)|CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)!=CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED||(r=n.clone(),r.setStartBefore(i)),f==CKEDITOR.NODE_TEXT||c||f==CKEDITOR.NODE_ELEMENT&&!i.getChildCount()){for(f=i;(t=!f.getNext(ft))&&(b=f.getParent(),nt[b.getName()])&&(b.getPosition(it)|CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)==CKEDITOR.POSITION_FOLLOWING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED&&(!u.childRule||u.childRule(b));)f=b;r.setEndAfter(f)}}else t=!0;i=i.getNextSourceNode(a||c&&!k)}if(t&&r&&!r.collapsed){for(var t=e(this,w),c=t.hasAttributes(),a=r.getCommonAncestor(),f={},o={},p={},ut={},v,s,d;t&&a;){if(a.getName()==g){for(v in u.attributes)!ut[v]&&(d=a.getAttribute(s))&&(t.getAttribute(v)==d?o[v]=1:ut[v]=1);for(s in u.styles)!p[s]&&(d=a.getStyle(s))&&(t.getStyle(s)==d?f[s]=1:p[s]=1)}a=a.getParent()}for(v in o)t.removeAttribute(v);for(s in f)t.removeStyle(s);c&&!t.hasAttributes()&&(t=null);t?(r.extractContents().appendTo(t),l.call(this,t),r.insertNode(t),t.mergeSiblings(),CKEDITOR.env.ie||t.$.normalize()):(t=new CKEDITOR.dom.element("span"),r.extractContents().appendTo(t),r.insertNode(t),l.call(this,t),t.remove(!0));r=null}}n.moveToBookmark(tt);n.shrink(CKEDITOR.SHRINK_TEXT)}}function b(n){var c,s,h,u,e,f,o;if(n.enlarge(CKEDITOR.ENLARGE_INLINE,1),c=n.createBookmark(),s=c.startNode,n.collapsed){for(h=new CKEDITOR.dom.elementPath(s.getParent(),n.root),e=0;e<h.elements.length&&(f=h.elements[e]);e++){if(f==h.block||f==h.blockLimit)break;this.checkElementRemovable(f)&&(n.collapsed&&(n.checkBoundaryOfElement(f,CKEDITOR.END)||(o=n.checkBoundaryOfElement(f,CKEDITOR.START)))?(u=f,u.match=o?"start":"end"):(f.mergeSiblings(),f.getName()==this.element?i.call(this,f):r(f,t(this)[f.getName()])))}if(u){for(f=s,e=0;;e++){if(o=h.elements[e],o.equals(u))break;else if(o.match)continue;else o=o.clone();o.append(f);f=o}f[u.match=="start"?"insertBefore":"insertAfter"](u)}}else{var l=c.endNode,a=this,h=function(){for(var n,i=new CKEDITOR.dom.elementPath(s.getParent()),r=new CKEDITOR.dom.elementPath(l.getParent()),u=null,f=null,t=0;t<i.elements.length;t++){if(n=i.elements[t],n==i.block||n==i.blockLimit)break;a.checkElementRemovable(n)&&(u=n)}for(t=0;t<r.elements.length;t++){if(n=r.elements[t],n==r.block||n==r.blockLimit)break;a.checkElementRemovable(n)&&(f=n)}f&&l.breakParent(f);u&&s.breakParent(u)};for(h(),u=s;!u.equals(l);)e=u.getNextSourceNode(),u.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(u)&&(u.getName()==this.element?i.call(this,u):r(u,t(this)[u.getName()]),e.type==CKEDITOR.NODE_ELEMENT&&e.contains(s)&&(h(),e=s.getNext())),u=e}n.moveToBookmark(c)}function k(n){var t=n.getEnclosedNode()||n.getCommonAncestor(!1,!0);(n=new CKEDITOR.dom.elementPath(t,n.root).contains(this.element,1))&&!n.isReadOnly()&&o(n,this)}function d(n){var t=n.getCommonAncestor(!0,!0),i,r,u;if(n=new CKEDITOR.dom.elementPath(t,n.root).contains(this.element,1)){if(t=this._.definition,i=t.attributes,i)for(r in i)n.removeAttribute(r,i[r]);if(t.styles)for(u in t.styles)t.styles.hasOwnProperty(u)&&n.removeStyle(u)}}function g(n){var f=n.createBookmark(!0),i=n.createIterator(),t,r,u;for(i.enforceRealBlocks=!0,this._.enterMode&&(i.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR),r=n.document;t=i.getNextParagraph();)t.isReadOnly()||(u=e(this,r,t),c(t,u));n.moveToBookmark(f)}function nt(n){var f=n.createBookmark(1),u=n.createIterator(),t,r;for(u.enforceRealBlocks=!0,u.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;t=u.getNextParagraph();)this.checkElementRemovable(t)&&(t.is("pre")?(r=this._.enterMode==CKEDITOR.ENTER_BR?null:n.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"),r&&t.copyAttributes(r),c(t,r)):i.call(this,t));n.moveToBookmark(f)}function c(t,i){var e=!i,c,h;e&&(i=t.getDocument().createElement("div"),t.copyAttributes(i));var o=i&&i.is("pre"),f=t.is("pre"),r=!o&&f;o&&!f?(f=i,(r=t.getBogus())&&r.remove(),r=t.getHtml(),r=n(r,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,""),r=r.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1"),r=r.replace(/([ \t\n\r]+|&nbsp;)/g," "),r=r.replace(/<br\b[^>]*>/gi,"\n"),CKEDITOR.env.ie?(c=t.getDocument().createElement("div"),c.append(f),f.$.outerHTML="<pre>"+r+"<\/pre>",f.copyAttributes(c.getFirst()),f=c.getFirst().remove()):f.setHtml(r),i=f):r?i=it(e?[t.getHtml()]:tt(t),i):t.moveChildren(i);i.replace(t);o?(e=i,(h=e.getPrevious(s))&&h.is&&h.is("pre")&&(o=n(h.getHtml(),/\n$/,"")+"\n\n"+n(e.getHtml(),/^\n/,""),CKEDITOR.env.ie?e.$.outerHTML="<pre>"+o+"<\/pre>":e.setHtml(o),h.remove())):e&&u(i)}function tt(t){t.getName();var i=[];return n(t.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(n,t,i){return t+"<\/pre>"+i+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(n,t){i.push(t)}),i}function n(n,t,i){var r="",u="",n=n.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(n,t,i){return t&&(r=t),i&&(u=i),""});return r+n.replace(t,i)+u}function it(t,i){var u,f,e;for(t.length>1&&(u=new CKEDITOR.dom.documentFragment(i.getDocument())),f=0;f<t.length;f++){var r=t[f],r=r.replace(/(\r\n|\r)/g,"\n"),r=n(r,/^[ \t]*\n/,""),r=n(r,/\n$/,""),r=n(r,/^[ \t]+|[ \t]+$/g,function(n,t){return n.length==1?"&nbsp;":t?" "+CKEDITOR.tools.repeat("&nbsp;",n.length-1):CKEDITOR.tools.repeat("&nbsp;",n.length-1)+" "}),r=r.replace(/\n/g,"<br>"),r=r.replace(/[ \t]{2,}/g,function(n){return CKEDITOR.tools.repeat("&nbsp;",n.length-1)+" "});u?(e=i.clone(),e.setHtml(r),u.append(e)):i.setHtml(r)}return u||i}function i(n){var e=this._.definition,s=e.attributes,e=e.styles,h=t(this)[n.getName()],o=CKEDITOR.tools.isEmpty(s)&&CKEDITOR.tools.isEmpty(e),i,f;for(i in s)(i=="class"||this._.definition.fullMatch)&&n.getAttribute(i)!=v(i,s[i])||(o=n.hasAttribute(i),n.removeAttribute(i));for(f in e)this._.definition.fullMatch&&n.getStyle(f)!=v(f,e[f],!0)||(o=o||!!n.getStyle(f),n.removeStyle(f));r(n,h,y[n.getName()]);o&&(this._.definition.alwaysRemoveElement?u(n,1):!CKEDITOR.dtd.$block[n.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!n.hasAttributes()?u(n):n.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function l(n){for(var e,s,o=t(this),f=n.getElementsByTag(this.element),u=f.count();--u>=0;)i.call(this,f.getItem(u));for(e in o)if(e!=this.element)for(f=n.getElementsByTag(e),u=f.count()-1;u>=0;u--)s=f.getItem(u),r(s,o[e])}function r(n,t,i){var f,e,o,r;if(t=t&&t.attributes)for(f=0;f<t.length;f++)e=t[f][0],(o=n.getAttribute(e))&&(r=t[f][1],(r===null||r.test&&r.test(o)||typeof r=="string"&&o==r)&&n.removeAttribute(e));i||u(n)}function u(n,t){if(!n.hasAttributes()||t)if(CKEDITOR.dtd.$block[n.getName()]){var i=n.getPrevious(s),r=n.getNext(s);i&&(i.type==CKEDITOR.NODE_TEXT||!i.isBlockBoundary({br:1}))&&n.append("br",1);r&&(r.type==CKEDITOR.NODE_TEXT||!r.isBlockBoundary({br:1}))&&n.append("br");n.remove(!0)}else i=n.getFirst(),r=n.getLast(),n.remove(!0),i&&(i.type==CKEDITOR.NODE_ELEMENT&&i.mergeSiblings(),r&&!i.equals(r)&&r.type==CKEDITOR.NODE_ELEMENT&&r.mergeSiblings())}function e(n,t,i){var r;return r=n.element,r=="*"&&(r="span"),r=new CKEDITOR.dom.element(r,t),i&&i.copyAttributes(r),r=o(r,n),t.getCustomData("doc_processing_style")&&r.hasAttribute("id")?r.removeAttribute("id"):t.setCustomData("doc_processing_style",1),r}function o(n,t){var i=t._.definition,r=i.attributes,i=CKEDITOR.style.getStyleText(i),u;if(r)for(u in r)n.setAttribute(u,r[u]);return i&&n.setAttribute("style",i),n}function a(n,t){for(var i in n)n[i]=n[i].replace(ut,function(n,i){return t[i]})}function t(n){var r,i,u,f,e,t,o;if(n._.overrides)return n._.overrides;if(r=n._.overrides={},i=n._.definition.overrides,i)for(CKEDITOR.tools.isArray(i)||(i=[i]),u=0;u<i.length;u++)if(t=i[u],typeof t=="string"?f=t.toLowerCase():(f=t.element?t.element.toLowerCase():n.element,e=t.attributes),t=r[f]||(r[f]={}),e){t=t.attributes=t.attributes||[];for(o in e)t.push([o.toLowerCase(),e[o]])}return r}function v(n,t,i){var r=new CKEDITOR.dom.element("span");return r[i?"setStyle":"setAttribute"](n,t),r[i?"getStyle":"getAttribute"](n)}function f(n,t){for(var u=n.document,i=n.getRanges(),f=t?this.removeFromRange:this.applyToRange,r,e=i.createIterator();r=e.getNextRange();)f.call(this,r);n.selectRanges(i);u.removeCustomData("doc_processing_style")}var y={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},rt={a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},p=/\s*(?:;\s*|$)/,ut=/#\((.+?)\)/g,ft=CKEDITOR.dom.walker.bookmark(0,1),s=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(n,t){var i=n.attributes;i&&i.style&&(n.styles=CKEDITOR.tools.extend({},n.styles,CKEDITOR.tools.parseCssText(i.style)),delete i.style);t&&(n=CKEDITOR.tools.clone(n),a(n.attributes,t),a(n.styles,t));i=this.element=n.element?typeof n.element=="string"?n.element.toLowerCase():n.element:"*";this.type=n.type||(y[i]?CKEDITOR.STYLE_BLOCK:rt[i]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);typeof this.element=="object"&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:n}};CKEDITOR.editor.prototype.applyStyle=function(n){f.call(n,this.getSelection())};CKEDITOR.editor.prototype.removeStyle=function(n){f.call(n,this.getSelection(),1)};CKEDITOR.style.prototype={apply:function(n){f.call(this,n.getSelection())},remove:function(n){f.call(this,n.getSelection(),1)},applyToRange:function(n){return(this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?w:this.type==CKEDITOR.STYLE_BLOCK?g:this.type==CKEDITOR.STYLE_OBJECT?k:null).call(this,n)},removeFromRange:function(n){return(this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?nt:this.type==CKEDITOR.STYLE_OBJECT?d:null).call(this,n)},applyToObject:function(n){o(n,this)},checkActive:function(n){var r,i,t,u;switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(n.block||n.blockLimit,!0);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(r=n.elements,i=0;i<r.length;i++)if(t=r[i],!(this.type==CKEDITOR.STYLE_INLINE&&(t==n.block||t==n.blockLimit))){if(this.type==CKEDITOR.STYLE_OBJECT&&(u=t.getName(),!(typeof this.element=="string"?u==this.element:u in this.element)))continue;if(this.checkElementRemovable(t,!0))return!0}}return!1},checkApplicable:function(n){switch(this.type){case CKEDITOR.STYLE_OBJECT:return n.contains(this.element)}return!0},checkElementMatch:function(n,t){var u=this._.definition,i,r,e;if(!n||!u.ignoreReadonly&&n.isReadOnly())return!1;if(i=n.getName(),typeof this.element=="string"?i==this.element:i in this.element){if(!t&&!n.hasAttributes())return!0;if(i=u._AC)u=i;else{var i={},f=0,o=u.attributes;if(o)for(r in o)f++,i[r]=o[r];(r=CKEDITOR.style.getStyleText(u))&&(i.style||f++,i.style=r);i._length=f;u=u._AC=i}if(u._length){for(e in u)if(e!="_length"){if(f=n.getAttribute(e)||"",e=="style")n:{i=u[e];typeof i=="string"&&(i=CKEDITOR.tools.parseCssText(i));typeof f=="string"&&(f=CKEDITOR.tools.parseCssText(f,!0));r=void 0;for(r in i)if(!(r in f&&(f[r]==i[r]||i[r]=="inherit"||f[r]=="inherit"))){i=!1;break n}i=!0}else i=u[e]==f;if(i){if(!t)return!0}else if(t)return!1}if(t)return!0}else return!0}return!1},checkElementRemovable:function(n,i){var r,u,f,e;if(this.checkElementMatch(n,i))return!0;if(r=t(this)[n.getName()],r){if(!(r=r.attributes))return!0;for(f=0;f<r.length;f++)if(u=r[f][0],(u=n.getAttribute(u))&&(e=r[f][1],e===null||typeof e=="string"&&u==e||e.test(u)))return!0}return!1},buildPreview:function(n){var r=this._.definition,i=[],u=r.element,t,f;if(u=="bdo"&&(u="span"),i=["<",u],t=r.attributes,t)for(f in t)i.push(" ",f,'="',t[f],'"');return(t=CKEDITOR.style.getStyleText(r))&&i.push(' style="',t,'"'),i.push(">",n||r.name,"<\/",u,">"),i.join("")}};CKEDITOR.style.getStyleText=function(n){var i=n._ST,u,f,e;if(i)return i;var i=n.styles,t=n.attributes&&n.attributes.style||"",r="";t.length&&(t=t.replace(p,";"));for(u in i)f=i[u],e=(u+":"+f).replace(p,";"),f=="inherit"?r=r+e:t=t+e;return t.length&&(t=CKEDITOR.tools.normalizeCssText(t,!0)),n._ST=t+r}}();CKEDITOR.styleCommand=function(n){this.style=n};CKEDITOR.styleCommand.prototype.exec=function(n){n.focus();this.state==CKEDITOR.TRISTATE_OFF?n.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&n.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(n,t,i){CKEDITOR.stylesSet.addExternal(n,t,"");CKEDITOR.stylesSet.load(n,i)};CKEDITOR.editor.prototype.getStylesSet=function(n){var i,t,r;this._.stylesDefinitions?n(this._.stylesDefinitions):(i=this,t=i.config.stylesCombo_stylesSet||i.config.stylesSet||"default",t instanceof Array?(i._.stylesDefinitions=t,n(t)):(t=t.split(":"),r=t[0],CKEDITOR.stylesSet.addExternal(r,t[1]?t.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),""),CKEDITOR.stylesSet.load(r,function(t){i._.stylesDefinitions=t[r];n(i._.stylesDefinitions)})))};CKEDITOR.dom.comment=function(n,t){typeof n=="string"&&(n=(t?t.$:document).createComment(n));CKEDITOR.dom.domObject.call(this,n)};CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node;CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<!--"+this.$.nodeValue+"-->"}}),function(){var i={},n,t;for(n in CKEDITOR.dtd.$blockLimit)n in CKEDITOR.dtd.$list||(i[n]=1);t={};for(n in CKEDITOR.dtd.$block)n in CKEDITOR.dtd.$blockLimit||n in CKEDITOR.dtd.$empty||(t[n]=1);CKEDITOR.dom.elementPath=function(n,r){var o=null,s=null,c=[],r=r||n.getDocument().getBody(),u=n,f,e,l,h;do if(u.type==CKEDITOR.NODE_ELEMENT){if(c.push(u),!this.lastElement&&(this.lastElement=u,u.is(CKEDITOR.dtd.$object)))continue;if(f=u.getName(),!s&&(!o&&t[f]&&(o=u),i[f])){if(e=!o){if(f=f=="div"){n:{for(f=u.getChildren(),e=0,l=f.count();e<l;e++)if(h=f.getItem(e),h.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[h.getName()]){f=!0;break n}f=!1}f=!f&&!u.equals(r)}e=f}e?o=u:s=u}if(u.equals(r))break}while(u=u.getParent());this.block=o;this.blockLimit=s;this.root=r;this.elements=c}}();CKEDITOR.dom.elementPath.prototype={compare:function(n){var i=this.elements,n=n&&n.elements,t;if(!n||i.length!=n.length)return!1;for(t=0;t<i.length;t++)if(!i[t].equals(n[t]))return!1;return!0},contains:function(n,t,i){var u,r,f;for(typeof n=="string"&&(u=function(t){return t.getName()==n}),n instanceof CKEDITOR.dom.element?u=function(t){return t.equals(n)}:CKEDITOR.tools.isArray(n)?u=function(t){return CKEDITOR.tools.indexOf(n,t.getName())>-1}:typeof n=="function"?u=n:typeof n=="object"&&(u=function(t){return t.getName()in n}),r=this.elements,f=r.length,t&&f--,i&&(r=Array.prototype.slice.call(r,0),r.reverse()),t=0;t<f;t++)if(u(r[t]))return r[t];return null},isContextFor:function(n){var t;return n in CKEDITOR.dtd.$block?(t=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!t.getDtd()[n]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}};CKEDITOR.dom.text=function(n,t){typeof n=="string"&&(n=(t?t.$:document).createTextNode(n));this.$=n};CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node;CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(n){this.$.nodeValue=n},split:function(n){var r=this.$.parentNode,u=r.childNodes.length,f=this.getLength(),i=this.getDocument(),t=new CKEDITOR.dom.text(this.$.splitText(n),i);return r.childNodes.length==u&&(n>=f?(t=i.createText(""),t.insertAfter(this)):(n=i.createText(""),n.insertAfter(t),n.remove())),t},substring:function(n,t){return typeof t!="number"?this.$.nodeValue.substr(n):this.$.nodeValue.substring(n,t)}}),function(){function n(n,t,i){var u=n.serializable,r=t[i?"endContainer":"startContainer"],f=i?"endOffset":"startOffset",e=u?t.document.getById(n.startNode):n.startNode,n=u?t.document.getById(n.endNode):n.endNode;return r.equals(e.getPrevious())?(t.startOffset=t.startOffset-r.getLength()-n.getPrevious().getLength(),r=n.getNext()):r.equals(n.getPrevious())&&(t.startOffset=t.startOffset-r.getLength(),r=n.getNext()),r.equals(e.getParent())&&t[f]++,r.equals(n.getParent())&&t[f]++,t[i?"endContainer":"startContainer"]=r,t}CKEDITOR.dom.rangeList=function(n){return n instanceof CKEDITOR.dom.rangeList?n:(n?n instanceof CKEDITOR.dom.range&&(n=[n]):n=[],CKEDITOR.tools.extend(n,t))};var t={createIterator:function(){var t=this,r=CKEDITOR.dom.walker.bookmark(),i=[],n;return{getNextRange:function(u){var e,f,o;if(n=n==void 0?0:n+1,e=t[n],e&&t.length>1){if(!n)for(f=t.length-1;f>=0;f--)i.unshift(t[f].createBookmark(!0));if(u)for(o=0;t[n+o+1];){for(var s=e.document,u=0,f=s.getById(i[o].endNode),s=s.getById(i[o+1].startNode);;){if(f=f.getNextSourceNode(!1),s.equals(f))u=1;else if(r(f)||f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary())continue;break}if(!u)break;o++}for(e.moveToBookmark(i.shift());o--;)f=t[++n],f.moveToBookmark(i.shift()),e.setEnd(f.endContainer,f.endOffset)}return e}}},createBookmarks:function(t){for(var f,i,u=[],r=0;r<this.length;r++)for(u.push(f=this[r].createBookmark(t,!0)),i=r+1;i<this.length;i++)this[i]=n(f,this[i]),this[i]=n(f,this[i],!0);return u},createBookmarks2:function(n){for(var i=[],t=0;t<this.length;t++)i.push(this[t].createBookmark2(n));return i},moveToBookmarks:function(n){for(var t=0;t<this.length;t++)this[t].moveToBookmark(n[t])}}}(),function(){function n(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function i(t){var i=CKEDITOR.skin["ua_"+t],f=CKEDITOR.env,r,u;if(i)for(i=i.split(",").sort(function(n,t){return n>t?-1:1}),r=0;r<i.length;r++)if(u=i[r],f.ie&&(u.replace(/^ie/,"")==f.version||f.quirks&&u=="iequirks")&&(u="ie"),f[u]){t=t+("_"+i[r]);break}return CKEDITOR.getUrl(n()+t+".css")}function r(n,t){f[n]||(CKEDITOR.document.appendStyleSheet(i(n)),f[n]=1);t&&t()}function u(n){var t=n.getById(e);return t||(t=n.getHead().append("style"),t.setAttribute("id",e),t.setAttribute("type","text/css")),t}function t(n,t,i){var r,u,f,e;if(CKEDITOR.env.webkit)for(t=t.split("}").slice(0,-1),u=0;u<t.length;u++)t[u]=t[u].split("{");for(e=0;e<n.length;e++)if(CKEDITOR.env.webkit)for(u=0;u<t.length;u++){for(f=t[u][1],r=0;r<i.length;r++)f=f.replace(i[r][0],i[r][1]);n[e].$.sheet.addRule(t[u][0],f)}else{for(f=t,r=0;r<i.length;r++)f=f.replace(i[r][0],i[r][1]);CKEDITOR.env.ie?n[e].$.styleSheet.cssText=n[e].$.styleSheet.cssText+f:n[e].$.innerHTML=n[e].$.innerHTML+f}}var f={};CKEDITOR.skin={path:n,loadPart:function(t,i){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(n()+"skin.js"),function(){r(t,i)}):r(t,i)},getPath:function(n){return CKEDITOR.getUrl(i(n))},icons:{},addIcon:function(n,t,i){n=n.toLowerCase();this.icons[n]||(this.icons[n]={path:t,offset:i||0})},getIconStyle:function(n,t,i,r){var u;return n&&(n=n.toLowerCase(),t&&(u=this.icons[n+"-rtl"]),u||(u=this.icons[n])),n=i||u&&u.path||"",r=r||u&&u.offset,n&&"background-image:url("+CKEDITOR.getUrl(n)+");background-position:0 "+r+"px;"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(n){var i=u(CKEDITOR.document);return(this.setUiColor=function(n){var r=CKEDITOR.skin.chameleon,u=[[s,n]];this.uiColor=n;t([i],r(this,"editor"),u);t(o,r(this,"panel"),u)}).call(this,n)}});var e="cke_ui_color",o=[],s=/\$color/g;CKEDITOR.on("instanceLoaded",function(n){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var i=n.editor,n=function(n){if(n=(n.data[0]||n.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument(),!n.getById("cke_ui_color")){n=u(n);o.push(n);var r=i.getUiColor();r&&t([n],CKEDITOR.skin.chameleon(i,"panel"),[[s,r]])}};i.on("panelShow",n);i.on("menuShow",n);i.config.uiColor&&i.setUiColor(i.config.uiColor)}})}(),function(){var n,t;if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{n=CKEDITOR.dom.element.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;border: 1px solid;border-color: red blue;"><\/div>',CKEDITOR.document);n.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=n.getComputedStyle("border-top-color")==n.getComputedStyle("border-right-color")}catch(i){CKEDITOR.env.hc=!1}n.remove()}if(CKEDITOR.env.hc&&(CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc"),CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"),CKEDITOR.status="loaded",CKEDITOR.fireOnce("loaded"),n=CKEDITOR._.pending)for(delete CKEDITOR._.pending,t=0;t<n.length;t++)CKEDITOR.editor.prototype.constructor.apply(n[t][0],n[t][1]),CKEDITOR.add(n[t][0])}();CKEDITOR.skin.name="moono";CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko";CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8,opera";CKEDITOR.skin.chameleon=function(){var n=function(){return function(n,t){for(var f,e,i,u=n.match(/[^#]./g),r=0;3>r;r++)f=u,e=r,i=parseInt(u[r],16),i=("0"+(0>t?0|i*(1+t):0|i+(255-i)*t).toString(16)).slice(-2),f[e]=i;return"#"+u.join("")}}(),t=function(){var n=new CKEDITOR.template("background:#{to};background-image:-webkit-gradient(linear,lefttop,leftbottom,from({from}),to({to}));background-image:-moz-linear-gradient(top,{from},{to});background-image:-webkit-linear-gradient(top,{from},{to});background-image:-o-linear-gradient(top,{from},{to});background-image:-ms-linear-gradient(top,{from},{to});background-image:linear-gradient(top,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='{from}',endColorstr='{to}');");return function(t,i){return n.output({from:t,to:i})}}(),i={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};return function(r,u){var f=r.uiColor,f={id:"."+r.id,defaultBorder:n(f,-.1),defaultGradient:t(n(f,.9),f),lightGradient:t(n(f,1),n(f,.7)),mediumGradient:t(n(f,.8),n(f,.5)),ckeButtonOn:t(n(f,.6),n(f,.7)),ckeResizer:n(f,-.4),ckeToolbarSeparator:n(f,.5),ckeColorauto:n(f,.8),dialogBody:n(f,.7),dialogTabSelected:t("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:n(f,-.6),elementsPathBg:f,menubuttonIcon:n(f,.5),menubuttonIconHover:n(f,.3)};return i[u].output(f).replace(/\[/g,"{").replace(/\]/g,"}")}}();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var n=function(n){this._||(this._={});this._["default"]=this._.initValue=n["default"]||"";this._.required=n.required||!1;for(var t=[this._],i=1;i<arguments.length;i++)t.push(arguments[i]);return t.push(!0),CKEDITOR.tools.extend.apply(CKEDITOR.tools,t),this._},f={build:function(n,t,i){return new CKEDITOR.ui.dialog.textInput(n,t,i)}},t={build:function(n,t,i){return new CKEDITOR.ui.dialog[t.type](n,t,i)}},i={isChanged:function(){return this.getValue()!=this.getInitValue()},reset:function(n){this.setValue(this.getInitValue(),n)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},u=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(n,t){this._.domOnChangeRegistered||(n.on("load",function(){this.getInputElement().on("change",function(){n.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",t)}},!0),e=/^on([A-Z]\w+)/,r=function(n){for(var t in n)(e.test(t)||"title"==t||"type"==t)&&delete n[t];return n};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(t,i,r,u){if(!(4>arguments.length)){var f=n.call(this,i);f.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];CKEDITOR.ui.dialog.uiElement.call(this,t,i,r,"div",null,{role:"presentation"},function(){var r=[],n=i.required?" cke_required":"";return"horizontal"!=i.labelLayout?r.push('<label class="cke_dialog_ui_labeled_label'+n+'" ',' id="'+f.labelId+'"',f.inputId?' for="'+f.inputId+'"':"",(i.labelStyle?' style="'+i.labelStyle+'"':"")+">",i.label,"<\/label>",'<div class="cke_dialog_ui_labeled_content"'+(i.controlStyle?' style="'+i.controlStyle+'"':"")+' role="presentation">',u.call(this,t,i),"<\/div>"):(n={type:"hbox",widths:i.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+n+'" id="'+f.labelId+'" for="'+f.inputId+'"'+(i.labelStyle?' style="'+i.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(i.label)+"<\/span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(i.controlStyle?' style="'+i.controlStyle+'"':"")+">"+u.call(this,t,i)+"<\/span>"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(t,n,r)),r.join("")})}},textInput:function(t,i,r){var o,u,e,f;if(!(3>arguments.length)){n.call(this,i);o=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput";u={"class":"cke_dialog_ui_input_"+i.type,id:o,type:i.type};i.validate&&(this.validate=i.validate);i.maxLength&&(u.maxlength=i.maxLength);i.size&&(u.size=i.size);i.inputStyle&&(u.style=i.inputStyle);e=this;f=!1;t.on("load",function(){e.getInputElement().on("keydown",function(n){n.data.getKeystroke()==13&&(f=!0)});e.getInputElement().on("keyup",function(n){n.data.getKeystroke()==13&&f&&(t.getButton("ok")&&setTimeout(function(){t.getButton("ok").click()},0),f=!1)},null,null,1e3)});CKEDITOR.ui.dialog.labeledElement.call(this,t,i,r,function(){var n=['<div class="cke_dialog_ui_input_',i.type,'" role="presentation"'],t;i.width&&n.push('style="width:'+i.width+'" ');n.push("><input ");u["aria-labelledby"]=this._.labelId;this._.required&&(u["aria-required"]=this._.required);for(t in u)n.push(t+'="'+u[t]+'" ');return n.push(" /><\/div>"),n.join("")})}},textarea:function(t,i,r){if(!(3>arguments.length)){n.call(this,i);var f=this,e=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",u={};i.validate&&(this.validate=i.validate);u.rows=i.rows||5;u.cols=i.cols||20;"undefined"!=typeof i.inputStyle&&(u.style=i.inputStyle);CKEDITOR.ui.dialog.labeledElement.call(this,t,i,r,function(){u["aria-labelledby"]=this._.labelId;this._.required&&(u["aria-required"]=this._.required);var n=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea class="cke_dialog_ui_input_textarea" id="',e,'" '];for(var t in u)n.push(t+'="'+CKEDITOR.tools.htmlEncode(u[t])+'" ');return n.push(">",CKEDITOR.tools.htmlEncode(f._["default"]),"<\/textarea><\/div>"),n.join("")})}},checkbox:function(t,i,u){if(!(3>arguments.length)){var f=n.call(this,i,{"default":!!i["default"]});i.validate&&(this.validate=i.validate);CKEDITOR.ui.dialog.uiElement.call(this,t,i,u,"span",null,null,function(){var n=CKEDITOR.tools.extend({},i,{id:i.id?i.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),u=[],o=CKEDITOR.tools.getNextId()+"_label",e={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":o};return r(n),i["default"]&&(e.checked="checked"),typeof n.inputStyle!="undefined"&&(n.style=n.inputStyle),f.checkbox=new CKEDITOR.ui.dialog.uiElement(t,n,u,"input",null,e),u.push(' <label id="',o,'" for="',e.id,'"'+(i.labelStyle?' style="'+i.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(i.label),"<\/label>"),u.join("")})}},radio:function(t,i,u){if(!(3>arguments.length)){n.call(this,i);this._["default"]||(this._["default"]=this._.initValue=i.items[0][1]);i.validate&&(this.validate=i.valdiate);var f=[],e=this;CKEDITOR.ui.dialog.labeledElement.call(this,t,i,u,function(){for(var l=[],a=[],p=i.id?i.id+"_radio":CKEDITOR.tools.getNextId()+"_radio",s=0;s<i.items.length;s++){var u=i.items[s],h=u[2]!==void 0?u[2]:u[0],v=u[1]!==void 0?u[1]:u[0],n=CKEDITOR.tools.getNextId()+"_radio_input",y=n+"_label",n=CKEDITOR.tools.extend({},i,{id:n,title:null,type:null},!0),h=CKEDITOR.tools.extend({},n,{title:h},!0),c={type:"radio","class":"cke_dialog_ui_radio_input",name:p,value:v,"aria-labelledby":y},o=[];e._["default"]==v&&(c.checked="checked");r(n);r(h);typeof n.inputStyle!="undefined"&&(n.style=n.inputStyle);f.push(new CKEDITOR.ui.dialog.uiElement(t,n,o,"input",null,c));o.push(" ");new CKEDITOR.ui.dialog.uiElement(t,h,o,"label",null,{id:y,"for":c.id},u[0]);l.push(o.join(""))}return new CKEDITOR.ui.dialog.hbox(t,f,l,a),a.join("")});this._.children=f}},button:function(t,i,r){var u,f,e;if(arguments.length){"function"==typeof i&&(i=i(t.getParentEditor()));n.call(this,i,{disabled:i.disabled||!1});CKEDITOR.event.implementOn(this);u=this;t.on("load",function(){var n=this.getElement();(function(){n.on("click",u.click,u);n.on("keydown",function(n){n.data.getKeystroke()in{32:1}&&(u.click(),n.data.preventDefault())})})();n.unselectable()},this);f=CKEDITOR.tools.extend({},i);delete f.style;e=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,t,f,r,"a",null,{style:i.style,href:"javascript:void(0)",title:i.label,hidefocus:"true","class":i["class"],role:"button","aria-labelledby":e},'<span id="'+e+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(i.label)+"<\/span>")}},select:function(t,i,u){if(!(3>arguments.length)){var f=n.call(this,i);i.validate&&(this.validate=i.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,t,i,u,function(){var u=CKEDITOR.tools.extend({},i,{id:i.id?i.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),n=[],h=[],s={id:f.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId},o,e;for(n.push('<div class="cke_dialog_ui_input_',i.type,'" role="presentation"'),i.width&&n.push('style="width:'+i.width+'" '),n.push(">"),i.size!=void 0&&(s.size=i.size),i.multiple!=void 0&&(s.multiple=i.multiple),r(u),o=0;o<i.items.length&&(e=i.items[o]);o++)h.push('<option value="',CKEDITOR.tools.htmlEncode(e[1]!==void 0?e[1]:e[0]).replace(/"/g,"&quot;"),'" /> ',CKEDITOR.tools.htmlEncode(e[0]));return typeof u.inputStyle!="undefined"&&(u.style=u.inputStyle),f.select=new CKEDITOR.ui.dialog.uiElement(t,u,n,"select",null,s,h.join("")),n.push("<\/div>"),n.join("")})}},file:function(t,i,r){if(!(3>arguments.length)){void 0===i["default"]&&(i["default"]="");var u=CKEDITOR.tools.extend(n.call(this,i),{definition:i,buttons:[]});i.validate&&(this.validate=i.validate);t.on("load",function(){CKEDITOR.document.getById(u.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,t,i,r,function(){u.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var t=CKEDITOR.env.isCustomDomain(),n=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="',u.frameId,'" title="',i.label,'" src="javascript:void('];return n.push(t?"(function(){document.open();document.domain='"+document.domain+"';document.close();})()":"0"),n.push(')"><\/iframe>'),n.join("")})}},fileButton:function(t,i,r){var e,u,f;if(!(3>arguments.length)){n.call(this,i);e=this;i.validate&&(this.validate=i.validate);u=CKEDITOR.tools.extend({},i);f=u.onClick;u.className=(u.className?u.className+" ":"")+"cke_dialog_ui_button";u.onClick=function(n){var r=i["for"];f&&f.call(this,n)===!1||(t.getContentElement(r[0],r[1]).submit(),this.disable())};t.on("load",function(){t.getContentElement(i["for"][0],i["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,t,u,r)}},html:function(){var n=/^\s*<[\w:]+\s+([^>]*)?>/,t=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,i=/\/$/;return function(r,u,f){var o,e,s;3>arguments.length||(o=[],e=u.html,"<"!=e.charAt(0)&&(e="<span>"+e+"<\/span>"),s=u.focus,s&&(this.focus=function(){this.selectParentTab();"function"==typeof s&&s.call(this);this.fire("focus")},u.isFocusable&&(this.isFocusable=this.isFocusable),this.keyboardFocusable=!0),CKEDITOR.ui.dialog.uiElement.call(this,r,u,o,"span",null,null,""),o=o.join("").match(n),e=e.match(t)||["","",""],i.test(e[1])&&(e[1]=e[1].slice(0,-1),e[2]="/"+e[2]),f.push([e[1]," ",o[1]||"",e[2]].join("")))}}(),fieldset:function(n,t,i,r,u){var f=u.label;this._={children:t};CKEDITOR.ui.dialog.uiElement.call(this,n,u,r,"fieldset",null,null,function(){var t=[],n;for(f&&t.push("<legend"+(u.labelStyle?' style="'+u.labelStyle+'"':"")+">"+f+"<\/legend>"),n=0;n<i.length;n++)t.push(i[n]);return t.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(n){var t=CKEDITOR.document.getById(this._.labelId);return 1>t.getChildCount()?new CKEDITOR.dom.text(n,CKEDITOR.document).appendTo(t):t.getChild(0).$.nodeValue=n,this},getLabel:function(){var n=CKEDITOR.document.getById(this._.labelId);return!n||1>n.getChildCount()?"":n.getChild(0).getText()},eventProcessors:u},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var n=this.getElement();n&&n.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(n,t){this.on("click",function(){t.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var n=this.selectParentTab();setTimeout(function(){var t=n.getInputElement();t&&t.$.focus()},0)},select:function(){var n=this.selectParentTab();setTimeout(function(){var t=n.getInputElement();t&&(t.$.focus(),t.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(n){return n||(n=""),CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:!0},i,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(n,t,i){var r=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),u=this.getInputElement().$;return r.$.text=n,r.$.value=void 0===t||null===t?n:t,void 0===i||null===i?CKEDITOR.env.ie?u.add(r.$):u.add(r.$,null):u.add(r.$,i),this},remove:function(n){return this.getInputElement().$.remove(n),this},clear:function(){for(var n=this.getInputElement().$;0<n.length;)n.remove(0);return this},keyboardFocusable:!0},i,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(n,t){this.getInputElement().$.checked=n;t||this.fire("change",{value:n})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(n,t){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return u.onChange.apply(this,arguments);n.on("load",function(){var n=this._.checkbox.getElement();n.on("propertychange",function(t){t=t.data.$;"checked"==t.propertyName&&this.fire("change",{value:n.$.checked})},this)},this);this.on("change",t);return null}},keyboardFocusable:!0},i,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(n,t){for(var u=this._.children,i,r=0;r<u.length&&(i=u[r]);r++)i.getElement().$.checked=i.getValue()==n;t||this.fire("change",{value:n})},getValue:function(){for(var t=this._.children,n=0;n<t.length;n++)if(t[n].getElement().$.checked)return t[n].getValue();return null},accessKeyUp:function(){for(var t=this._.children,n=0;n<t.length;n++)if(t[n].getElement().$.checked){t[n].getElement().focus();return}t[0].getElement().focus()},eventProcessors:{onChange:function(n,t){if(CKEDITOR.env.ie)n.on("load",function(){for(var t=this._.children,i=this,n=0;n<t.length;n++)t[n].getElement().on("propertychange",function(n){n=n.data.$;"checked"==n.propertyName&&this.$.checked&&i.fire("change",{value:this.getAttribute("value")})})},this),this.on("change",t);else return u.onChange.apply(this,arguments);return null}},keyboardFocusable:!0},i,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,i,{getInputElement:function(){var n=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<n.$.forms.length?new CKEDITOR.dom.element(n.$.forms[0].elements[0]):this.getElement()},submit:function(){return this.getInputElement().getParent().$.submit(),this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(n){var i,r=function(n,t,i,r){n.on("formLoaded",function(){n.getInputElement().on(i,r,n)})};for(var t in n)(i=t.match(/^on([A-Z]\w+)/))&&(this.eventProcessors[t]?this.eventProcessors[t].call(this,this._.dialog,n[t]):r(this,this._.dialog,i[1].toLowerCase(),n[t]));return this},reset:function(){function f(){var f,h;for(i.$.open(),CKEDITOR.env.isCustomDomain()&&(i.$.domain=document.domain),f="",t.size&&(f=t.size-(CKEDITOR.env.ie?7:0)),h=n.frameId+"_input",i.$.write(['<html dir="'+o+'" lang="'+s+'"><head><title><\/title><\/head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+o+'" lang="'+s+'" action="',CKEDITOR.tools.htmlEncode(t.action),'"><label id="',n.labelId,'" for="',h,'" style="display:none">',CKEDITOR.tools.htmlEncode(t.label),'<\/label><input id="',h,'" aria-labelledby="',n.labelId,'" type="file" name="',CKEDITOR.tools.htmlEncode(t.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(0<f?f:""),'" /><\/form><\/body><\/html>',"<script>window.parent.CKEDITOR.tools.callFunction("+r+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+u+")}<\/script>"].join("")),i.$.close(),f=0;f<e.length;f++)e[f].enable()}var n=this._,i=CKEDITOR.document.getById(n.frameId).getFrameDocument(),t=n.definition,e=n.buttons,r=this.formLoadedNumber,u=this.formUnloadNumber,o=n.dialog._.editor.lang.dir,s=n.dialog._.editor.langCode;r||(r=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),u=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(r);CKEDITOR.tools.removeFunction(u)}));CKEDITOR.env.gecko?setTimeout(f,500):f()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(n,t){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",t)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",f);CKEDITOR.dialog.addUIElement("password",f);CKEDITOR.dialog.addUIElement("textarea",t);CKEDITOR.dialog.addUIElement("checkbox",t);CKEDITOR.dialog.addUIElement("radio",t);CKEDITOR.dialog.addUIElement("button",t);CKEDITOR.dialog.addUIElement("select",t);CKEDITOR.dialog.addUIElement("file",t);CKEDITOR.dialog.addUIElement("fileButton",t);CKEDITOR.dialog.addUIElement("html",t);CKEDITOR.dialog.addUIElement("fieldset",{build:function(n,t,i){for(var f,e=t.children,r,o=[],s=[],u=0;u<e.length&&(r=e[u]);u++)f=[],o.push(f),s.push(CKEDITOR.dialog._.uiElementBuilders[r.type].build(n,r,f));return new CKEDITOR.ui.dialog[t.type](n,s,o,i,t)}})}});CKEDITOR.DIALOG_RESIZE_NONE=0;CKEDITOR.DIALOG_RESIZE_WIDTH=1;CKEDITOR.DIALOG_RESIZE_HEIGHT=2;CKEDITOR.DIALOG_RESIZE_BOTH=3,function(){function o(){for(var n=this._.tabIdList.length,i=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+n,t=i-1;t>i-n;t--)if(this._.tabs[this._.tabIdList[t%n]][0].$.offsetHeight)return this._.tabIdList[t%n];return null}function c(){for(var t=this._.tabIdList.length,i=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),n=i+1;n<i+t;n++)if(this._.tabs[this._.tabIdList[n%t]][0].$.offsetHeight)return this._.tabIdList[n%t];return null}function l(n,t){for(var i,u=n.$.getElementsByTagName("input"),r=0,f=u.length;r<f;r++)i=new CKEDITOR.dom.element(u[r]),"text"==i.getAttribute("type").toLowerCase()&&(t?(i.setAttribute("value",i.getCustomData("fake_value")||""),i.removeCustomData("fake_value")):(i.setCustomData("fake_value",i.getAttribute("value")),i.setAttribute("value","")))}function g(n,t){var i=this.getInputElement();i&&(n?i.removeAttribute("aria-invalid"):i.setAttribute("aria-invalid",!0));n||(this.select?this.select():this.focus());t&&alert(t);this.fire("validated",{valid:n,msg:t})}function nt(){var n=this.getInputElement();n&&n.removeAttribute("aria-invalid")}function tt(n){var n=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",ft).output({id:CKEDITOR.tools.getNextNumber(),editorId:n.id,langDir:n.lang.dir,langCode:n.langCode,editorDialogClass:"cke_editor_"+n.name.replace(/\./g,"\\.")+"_dialog",closeTitle:n.lang.common.close})),t=n.getChild([0,0,0,0,0]),r=t.getChild(0),u=t.getChild(1),i;return CKEDITOR.env.ie&&!CKEDITOR.env.ie6Compat&&(i=CKEDITOR.env.isCustomDomain(),i="javascript:void(function(){"+encodeURIComponent("document.open();"+(i?'document.domain="'+document.domain+'";':"")+"document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+i+'" tabIndex="-1"><\/iframe>').appendTo(t.getParent())),r.unselectable(),u.unselectable(),{element:n,parts:{dialog:n.getChild(0),title:r,close:u,tabs:t.getChild(2),contents:t.getChild([3,0,0,0]),footer:t.getChild([3,0,1,0])}}}function a(n,t,i){this.element=t;this.focusIndex=i;this.tabIndex=0;this.isFocusable=function(){return!t.getAttribute("disabled")&&t.isVisible()};this.focus=function(){n._.currentFocusIndex=this.focusIndex;this.element.focus()};t.on("keydown",function(n){n.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 it(n){function t(){n.layout()}var i=CKEDITOR.document.getWindow();i.on("resize",t);n.on("hide",function(){i.removeListener("resize",t)})}function v(n,t){this._={dialog:n};CKEDITOR.tools.extend(this,t)}function rt(t){function f(n){var f=t.getSize(),e=CKEDITOR.document.getWindow().getViewPaneSize(),h=n.data.$.screenX,c=n.data.$.screenY,l=h-o.x,a=c-o.y;o={x:h,y:c};i.x+=l;i.y+=a;t.move(i.x+r[3]<u?-r[3]:i.x-r[1]>e.width-f.width-u?e.width-f.width+("rtl"==s.lang.dir?0:r[1]):i.x,i.y+r[0]<u?-r[0]:i.y-r[2]>e.height-f.height-u?e.height-f.height+r[2]:i.y,1);n.data.preventDefault()}function e(){if(CKEDITOR.document.removeListener("mousemove",f),CKEDITOR.document.removeListener("mouseup",e),CKEDITOR.env.ie6Compat){var t=n.getChild(0).getFrameDocument();t.removeListener("mousemove",f);t.removeListener("mouseup",e)}}var o=null,i=null;t.getElement().getFirst();var s=t.getParentEditor(),u=s.config.dialog_magnetDistance,r=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof u&&(u=20);t.parts.title.on("mousedown",function(r){o={x:r.data.$.screenX,y:r.data.$.screenY};CKEDITOR.document.on("mousemove",f);CKEDITOR.document.on("mouseup",e);if(i=t.getPosition(),CKEDITOR.env.ie6Compat){var u=n.getChild(0).getFrameDocument();u.on("mousemove",f);u.on("mouseup",e)}r.data.preventDefault()},t)}function ut(t){function o(n){var e="rtl"==r.lang.dir,s=f.width,c=f.height,p=s+(n.data.$.screenX-l)*(e?-1:1)*(t._.moved?1:2),w=c+(n.data.$.screenY-a)*(t._.moved?1:2),b=t._.element.getFirst(),b=e&&b.getComputedStyle("right"),o=t.getPosition();o.y+w>u.height&&(w=u.height-o.y);(e?b:o.x)+p>u.width&&(p=u.width-(e?b:o.x));(i==CKEDITOR.DIALOG_RESIZE_WIDTH||i==CKEDITOR.DIALOG_RESIZE_BOTH)&&(s=Math.max(h.minWidth||0,p-v));(i==CKEDITOR.DIALOG_RESIZE_HEIGHT||i==CKEDITOR.DIALOG_RESIZE_BOTH)&&(c=Math.max(h.minHeight||0,w-y));t.resize(s,c);t._.moved||t.layout();n.data.preventDefault()}function s(){if(CKEDITOR.document.removeListener("mouseup",s),CKEDITOR.document.removeListener("mousemove",o),e&&(e.remove(),e=null),CKEDITOR.env.ie6Compat){var t=n.getChild(0).getFrameDocument();t.removeListener("mouseup",s);t.removeListener("mousemove",o)}}var l,a,h=t.definition,i=h.resizable,r,v,y,u,f,e,c;if(i!=CKEDITOR.DIALOG_RESIZE_NONE){r=t.getParentEditor();c=CKEDITOR.tools.addFunction(function(i){f=t.getSize();var r=t.parts.contents;r.$.getElementsByTagName("iframe").length&&(e=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"><\/div>'),r.append(e));y=f.height-t.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks));v=f.width-t.parts.contents.getSize("width",1);l=i.screenX;a=i.screenY;u=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",o);CKEDITOR.document.on("mouseup",s);CKEDITOR.env.ie6Compat&&(r=n.getChild(0).getFrameDocument(),r.on("mousemove",o),r.on("mouseup",s));i.preventDefault&&i.preventDefault()});t.on("load",function(){var n="";i==CKEDITOR.DIALOG_RESIZE_WIDTH?n=" cke_resizer_horizontal":i==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(n=" cke_resizer_vertical");n=CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer'+n+" cke_resizer_"+r.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(r.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+c+', event )">'+("ltr"==r.lang.dir?"◢":"◣")+"<\/div>");t.parts.footer.append(n,1)});r.on("destroy",function(){CKEDITOR.tools.removeFunction(c)})}}function s(n){n.data.preventDefault(1)}function y(t){var o=CKEDITOR.document.getWindow(),f=t.config,e=f.dialog_backgroundCoverColor||"white",c=f.dialog_backgroundCoverOpacity,u=f.baseFloatZIndex,f=CKEDITOR.tools.genKey(e,c,u),i=r[f],v,t,l,a;if(i)i.show();else{u=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",u,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+e,'" class="cke_dialog_background_cover">'];CKEDITOR.env.ie6Compat&&(v=CKEDITOR.env.isCustomDomain(),e="<html><body style=\\'background-color:"+e+";\\'><\/body><\/html>",u.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:'),u.push("void((function(){document.open();"+(v?"document.domain='"+document.domain+"';":"")+"document.write( '"+e+"' );document.close();})())"),u.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)"><\/iframe>'));u.push("<\/div>");i=CKEDITOR.dom.element.createFromHtml(u.join(""));i.setOpacity(void 0!=c?c:.5);i.on("keydown",s);i.on("keypress",s);i.on("keyup",s);i.appendTo(CKEDITOR.document.getBody());r[f]=i}t.focusManager.add(i);n=i;t=function(){var n=o.getViewPaneSize();i.setStyles({width:n.width+"px",height:n.height+"px"})};l=function(){var n=o.getScrollPosition(),t=CKEDITOR.dialog._.currentTop;if(i.setStyles({left:n.x+"px",top:n.y+"px"}),t)do n=t.getPosition(),t.move(n.x,n.y);while(t=t._.parentDialog)};h=t;o.on("resize",t);t();CKEDITOR.env.mac&&CKEDITOR.env.webkit||i.focus();CKEDITOR.env.ie6Compat&&(a=function(){l();arguments.callee.prevScrollHandler.apply(this,arguments)},o.$.setTimeout(function(){a.prevScrollHandler=window.onscroll||function(){};window.onscroll=a},0),l())}function p(t){n&&(t.focusManager.remove(n),t=CKEDITOR.document.getWindow(),n.hide(),t.removeListener("resize",h),CKEDITOR.env.ie6Compat&&t.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),h=null)}var t=CKEDITOR.tools.cssLength,ft='<div class="cke cke_reset_all {editorId} {editorDialogClass}" dir="{langDir}" lang="{langCode}" role="application"><table class="cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" aria-labelledby="cke_dialog_title_{id}" style="position:absolute" role="dialog"><tr><td role="presentation"><div class="cke_dialog_body" role="presentation"><div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"><\/div><a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X<\/span><\/a><div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"><\/div><table class="cke_dialog_contents" role="presentation"><tr><td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"><\/td><\/tr><tr><td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"><\/td><\/tr><\/table><\/div><\/td><\/tr><\/table><\/div>';CKEDITOR.dialog=function(n,t){function d(){var t=i._.focusList,r,n;for(t.sort(function(n,t){return n.tabIndex!=t.tabIndex?t.tabIndex-n.tabIndex:n.focusIndex-t.focusIndex}),r=t.length,n=0;n<r;n++)t[n].focusIndex=n}function a(n){var t=i._.focusList,n=n||0,u,r;if(!(1>t.length)){u=i._.currentFocusIndex;try{t[u].getInputElement().$.blur()}catch(f){}for(r=u=(u+n+t.length)%t.length;n&&!t[r].isFocusable()&&!(r=(r+n+t.length)%t.length,r==u););t[r].focus();"text"==t[r].type&&t[r].select()}}function b(t){if(i==CKEDITOR.dialog._.currentTop){var r=t.data.getKeystroke(),u="rtl"==n.lang.dir;if(h=v=0,9==r||r==CKEDITOR.SHIFT+9)r=r==CKEDITOR.SHIFT+9,i._.tabBarMode?(r=r?o.call(i):c.call(i),i.selectPage(r),i._.tabs[r][0].focus()):a(r?-1:1),h=1;else if(r==CKEDITOR.ALT+121&&!i._.tabBarMode&&1<i.getPageCount())i._.tabBarMode=!0,i._.tabs[i._.currentTabId][0].focus(),h=1;else if((37==r||39==r)&&i._.tabBarMode)r=r==(u?39:37)?o.call(i):c.call(i),i.selectPage(r),i._.tabs[r][0].focus(),h=1;else if((13==r||32==r)&&i._.tabBarMode)this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=-1,a(1),h=1;else if(13==r)r=t.data.getTarget(),r.is("a","button","select","textarea")||r.is("input")&&"button"==r.$.type||((r=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(r.click,0,r),h=1),v=1;else if(27==r)(r=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(r.click,0,r):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),v=1;else return;k(t)}}function k(n){h?n.data.preventDefault(1):v&&n.data.stopPropagation()}var r=CKEDITOR.dialog._.dialogDefinitions[t],e=CKEDITOR.tools.clone(et),s=n.config.dialog_buttonsOrder||"OS",u=n.lang.dir,f={},h,v,y,i,p,l;if(("OS"==s&&CKEDITOR.env.mac||"rtl"==s&&"ltr"==u||"ltr"==s&&"rtl"==u)&&e.buttons.reverse(),r=CKEDITOR.tools.extend(r(n),e),r=CKEDITOR.tools.clone(r),r=new w(this,r),e=tt(n),this._={editor:n,element:e.element,name:t,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1},this.parts=e.parts,CKEDITOR.tools.setTimeout(function(){n.fire("ariaWidget",this.parts.contents)},0,this),e={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"},e["rtl"==u?"right":"left"]=0,this.parts.dialog.setStyles(e),CKEDITOR.event.call(this),this.definition=r=CKEDITOR.fire("dialogDefinition",{name:t,definition:r},n).definition,!("removeDialogTabs"in n._)&&n.config.removeDialogTabs){for(e=n.config.removeDialogTabs.split(";"),u=0;u<e.length;u++)(s=e[u].split(":"),2==s.length)&&(y=s[0],f[y]||(f[y]=[]),f[y].push(s[1]));n._.removeDialogTabs=f}if(n._.removeDialogTabs&&(f=n._.removeDialogTabs[t]))for(u=0;u<f.length;u++)r.removeContents(f[u]);if(r.onLoad)this.on("load",r.onLoad);if(r.onShow)this.on("show",r.onShow);if(r.onHide)this.on("hide",r.onHide);if(r.onOk)this.on("ok",function(t){n.fire("saveSnapshot");setTimeout(function(){n.fire("saveSnapshot")},0);!1===r.onOk.call(this,t)&&(t.data.hide=!1)});if(r.onCancel)this.on("cancel",function(n){!1===r.onCancel.call(this,n)&&(n.data.hide=!1)});i=this;p=function(n){var t=i._.contents,f=!1,r,u;for(r in t)for(u in t[r])if(f=n.call(this,t[r][u]))return};this.on("ok",function(n){p(function(t){if(t.validate){var i=t.validate(this),r="string"==typeof i||!1===i;return r&&(n.data.hide=!1,n.stop()),g.call(t,!r,"string"==typeof i?i:void 0),r}})},this,null,0);this.on("cancel",function(t){p(function(i){if(i.isChanged())return confirm(n.lang.common.confirmCancel)||(t.data.hide=!1),!0})},this,null,0);this.parts.close.on("click",function(n){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide();n.data.preventDefault()},this);this.changeFocus=a;l=this._.element;n.focusManager.add(l,1);this.on("show",function(){l.on("keydown",b,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko)l.on("keypress",k,this)});this.on("hide",function(){l.removeListener("keydown",b);(CKEDITOR.env.opera||CKEDITOR.env.gecko)&&l.removeListener("keypress",k);p(function(n){nt.apply(n)})});this.on("iframeAdded",function(n){new CKEDITOR.dom.document(n.data.iframe.$.contentWindow.document).on("keydown",b,this,null,0)});this.on("show",function(){if(d(),n.config.dialog_startupFocusTab&&1<i._.pageCount)i._.tabBarMode=!0,i._.tabs[i._.currentTabId][0].focus();else if(!this._.hasFocus)if(this._.currentFocusIndex=-1,r.onFocus){var t=r.onFocus.call(this);t&&t.focus()}else a(1)},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var n=this.getElement(),t=n.getFirst();t.remove();t.appendTo(n)},this);for(rt(this),ut(this),new CKEDITOR.dom.text(r.title,CKEDITOR.document).appendTo(this.parts.title),u=0;u<r.contents.length;u++)(f=r.contents[u])&&this.addPage(f);this.parts.tabs.on("click",function(n){var t=n.data.getTarget();t.hasClass("cke_dialog_tab")&&(t=t.$.id,this.selectPage(t.substring(4,t.lastIndexOf("_"))),this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,a(1)),n.data.preventDefault())},this);for(u=[],f=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:r.buttons},u).getChild(),this.parts.footer.setHtml(u.join("")),u=0;u<f.length;u++)this._.buttons[f[u].id]=f[u]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(n,t){this._.contentSize&&this._.contentSize.width==n&&this._.contentSize.height==t||(CKEDITOR.dialog.fire("resize",{dialog:this,width:n,height:t},this._.editor),this.fire("resize",{width:n,height:t},this._.editor),this.parts.contents.setStyles({width:n+"px",height:t+"px"}),"rtl"==this._.editor.lang.dir&&this._.position&&(this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)),this._.contentSize={width:n,height:t})}}(),getSize:function(){var n=this._.element.getFirst();return{width:n.$.offsetWidth||0,height:n.$.offsetHeight||0}},move:function(n,t,i){var u=this._.element.getFirst(),f="rtl"==this._.editor.lang.dir,r="fixed"==u.getComputedStyle("position");CKEDITOR.env.ie&&u.setStyle("zoom","100%");r&&this._.position&&this._.position.x==n&&this._.position.y==t||(this._.position={x:n,y:t},r||(r=CKEDITOR.document.getWindow().getScrollPosition(),n+=r.x,t+=r.y),f&&(r=this.getSize(),n=CKEDITOR.document.getWindow().getViewPaneSize().width-r.width-n),t={top:(0<t?t:0)+"px"},t[f?"right":"left"]=(0<n?n:0)+"px",u.setStyles(t),i&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var n=this._.element,t=this.definition,i;!n.getParent()||!n.getParent().equals(CKEDITOR.document.getBody())?n.appendTo(CKEDITOR.document.getBody()):n.setStyle("display","block");CKEDITOR.env.gecko&&10900>CKEDITOR.env.version&&(i=this.parts.dialog,i.setStyle("position","absolute"),setTimeout(function(){i.setStyle("position","fixed")},0));this.resize(this._.contentSize&&this._.contentSize.width||t.width||t.minWidth,this._.contentSize&&this._.contentSize.height||t.height||t.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex);this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,y(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this);n.on("keydown",b);n.on(CKEDITOR.env.opera?"keypress":"keyup",k);this._.hasFocus=!1;CKEDITOR.tools.setTimeout(function(){this.layout();it(this);this.parts.dialog.setStyle("visibility","");this.fireOnce("load",{});CKEDITOR.ui.fire("ready",this);this.fire("show",{});this._.editor.fire("dialogShow",this);this._.parentDialog||this._.editor.focusManager.lock();this.foreach(function(n){n.setInitValue&&n.setInitValue()})},100,this)},layout:function(){var u=this.parts.dialog,n=this.getSize(),t=CKEDITOR.document.getWindow().getViewPaneSize(),i=(t.width-n.width)/2,r=(t.height-n.height)/2;CKEDITOR.env.ie6Compat||(n.height+(0<r?r:0)>t.height||n.width+(0<i?i:0)>t.width?u.setStyle("position","absolute"):u.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:i,this._.moved?this._.position.y:r)},foreach:function(n){var t,i;for(t in this._.contents)for(i in this._.contents[t])n.call(this,this._.contents[t][i]);return this},reset:function(){var n=function(n){n.reset&&n.reset(1)};return function(){return this.foreach(n),this}}(),setupContent:function(){var n=arguments;this.foreach(function(t){t.setup&&t.setup.apply(t,n)})},commitContent:function(){var n=arguments;this.foreach(function(t){CKEDITOR.env.ie&&this._.currentFocusIndex==t.focusIndex&&t.getInputElement().$.blur();t.commit&&t.commit.apply(t,n)})},hide:function(){var n,t,i;if(this.parts.dialog.isVisible()){for(this.fire("hide",{}),this._.editor.fire("dialogHide",this),this.selectPage(this._.tabIdList[0]),n=this._.element,n.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),ot(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();this._.parentDialog?(t=this._.parentDialog.getElement().getFirst(),t.setStyle("z-index",parseInt(t.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))):p(this._.editor);(CKEDITOR.dialog._.currentTop=this._.parentDialog)?CKEDITOR.dialog._.currentZIndex-=10:(CKEDITOR.dialog._.currentZIndex=null,n.removeListener("keydown",b),n.removeListener(CKEDITOR.env.opera?"keypress":"keyup",k),i=this._.editor,i.focus(),setTimeout(function(){i.focusManager.unlock()},0));delete this._.parentDialog;this.foreach(function(n){n.resetInitValue&&n.resetInitValue()})}},addPage:function(n){var t=[],u=n.label?' title="'+CKEDITOR.tools.htmlEncode(n.label)+'"':"",r=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:n.elements,expand:!!n.expand,padding:n.padding,style:n.style||"width: 100%;"},t),t=CKEDITOR.dom.element.createFromHtml(t.join(""));t.setAttribute("role","tabpanel");var i=CKEDITOR.env,f="cke_"+n.id+"_"+CKEDITOR.tools.getNextNumber(),u=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",u,n.hidden?' style="display:none"':"",' id="',f,'"',i.gecko&&10900<=i.version&&!i.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',n.label,"<\/a>"].join(""));for(t.setAttribute("aria-labelledby",f),this._.tabs[n.id]=[u,t],this._.tabIdList.push(n.id),n.hidden||this._.pageCount++,this._.lastTab=u,this.updateStyle(),f=this._.contents[n.id]={},i=r.getChild();r=i.shift();)f[r.id]=r,"function"==typeof r.getChild&&i.push.apply(i,r.getChild());t.setAttribute("name",n.id);t.appendTo(this.parts.contents);u.unselectable();this.parts.tabs.append(u);n.accessKey&&(d(this,this,"CTRL+"+n.accessKey,ht,st),this._.accessKeyMap["CTRL+"+n.accessKey]=n.id)},selectPage:function(n){var i,u,r,t;if(this._.currentTabId!=n&&!0!==this.fire("selectPage",{page:n,currentPage:this._.currentTabId})){for(i in this._.tabs)u=this._.tabs[i][0],r=this._.tabs[i][1],i!=n&&(u.removeClass("cke_dialog_tab_selected"),r.hide()),r.setAttribute("aria-hidden",i!=n);t=this._.tabs[n];t[0].addClass("cke_dialog_tab_selected");CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(l(t[1]),t[1].show(),setTimeout(function(){l(t[1],1)},0)):t[1].show();this._.currentTabId=n;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,n)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(n){var t=this._.tabs[n]&&this._.tabs[n][0];t&&1!=this._.pageCount&&t.isVisible()&&(n==this._.currentTabId&&this.selectPage(o.call(this)),t.hide(),this._.pageCount--,this.updateStyle())},showPage:function(n){(n=this._.tabs[n]&&this._.tabs[n][0])&&(n.show(),this._.pageCount++,this.updateStyle())},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(n,t){var i=this._.contents[n];return i&&i[t]},getValueOf:function(n,t){return this.getContentElement(n,t).getValue()},setValueOf:function(n,t,i){return this.getContentElement(n,t).setValue(i)},getButton:function(n){return this._.buttons[n]},click:function(n){return this._.buttons[n].click()},disableButton:function(n){return this._.buttons[n].disable()},enableButton:function(n){return this._.buttons[n].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(n,t){if("undefined"==typeof t)t=this._.focusList.length,this._.focusList.push(new a(this,n,t));else{this._.focusList.splice(t,0,new a(this,n,t));for(var i=t+1;i<this._.focusList.length;i++)this._.focusList[i].focusIndex++}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(n,t){this._.dialogDefinitions[n]&&"function"!=typeof t||(this._.dialogDefinitions[n]=t)},exists:function(n){return!!this._.dialogDefinitions[n]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},okButton:function(){var n=function(n,t){return t=t||{},CKEDITOR.tools.extend({id:"ok",type:"button",label:n.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(n){n=n.data.dialog;!1!==n.fire("ok",{hide:!0}).hide&&n.hide()}},t,!0)};return n.type="button",n.override=function(t){return CKEDITOR.tools.extend(function(i){return n(i,t)},{type:"button"},!0)},n}(),cancelButton:function(){var n=function(n,t){return t=t||{},CKEDITOR.tools.extend({id:"cancel",type:"button",label:n.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(n){n=n.data.dialog;!1!==n.fire("cancel",{hide:!0}).hide&&n.hide()}},t,!0)};return n.type="button",n.override=function(t){return CKEDITOR.tools.extend(function(i){return n(i,t)},{type:"button"},!0)},n}(),addUIElement:function(n,t){this._.uiElementBuilders[n]=t}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var et={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},u=function(n,t,i){for(var f=0,r;r=n[f];f++)if(r.id==t||i&&r[i]&&(r=u(r[i],t,i)))return r;return null},f=function(n,t,i,r,u){if(i){for(var o=0,e;e=n[o];o++){if(e.id==i)return n.splice(o,0,t),t;if(r&&e[r]&&(e=f(e[r],t,i,r,!0)))return e}if(u)return null}return n.push(t),t},e=function(n,t,i){for(var u=0,r;r=n[u];u++){if(r.id==t)return n.splice(u,1);if(i&&r[i]&&(r=e(r[i],t,i)))return r}return null},w=function(n,t){this.dialog=n;for(var u=t.contents,i=0,r;r=u[i];i++)u[i]=r&&new v(n,r);CKEDITOR.tools.extend(this,t)};w.prototype={getContents:function(n){return u(this.contents,n)},getButton:function(n){return u(this.buttons,n)},addContents:function(n,t){return f(this.contents,n,t)},addButton:function(n,t){return f(this.buttons,n,t)},removeContents:function(n){e(this.contents,n)},removeButton:function(n){e(this.buttons,n)}};v.prototype={get:function(n){return u(this.elements,n,"children")},add:function(n,t){return f(this.elements,n,t,"children")},remove:function(n){e(this.elements,n,"children")}};var h,r={},n,i={},b=function(n){var t=n.data.$.ctrlKey||n.data.$.metaKey,r=n.data.$.altKey,u=n.data.$.shiftKey,f=String.fromCharCode(n.data.$.keyCode);(t=i[(t?"CTRL+":"")+(r?"ALT+":"")+(u?"SHIFT+":"")+f])&&t.length&&(t=t[t.length-1],t.keydown&&t.keydown.call(t.uiElement,t.dialog,t.key),n.data.preventDefault())},k=function(n){var t=n.data.$.ctrlKey||n.data.$.metaKey,r=n.data.$.altKey,u=n.data.$.shiftKey,f=String.fromCharCode(n.data.$.keyCode);(t=i[(t?"CTRL+":"")+(r?"ALT+":"")+(u?"SHIFT+":"")+f])&&t.length&&(t=t[t.length-1],t.keyup&&(t.keyup.call(t.uiElement,t.dialog,t.key),n.data.preventDefault()))},d=function(n,t,r,u,f){(i[r]||(i[r]=[])).push({uiElement:n,dialog:t,key:r,keyup:f||n.accessKeyUp,keydown:u||n.accessKeyDown})},ot=function(n){var u,t,r;for(u in i){for(t=i[u],r=t.length-1;0<=r;r--)(t[r].dialog==n||t[r].uiElement==n)&&t.splice(r,1);0===t.length&&delete i[u]}},st=function(n,t){n._.accessKeyMap[t]&&n.selectPage(n._.accessKeyMap[t])},ht=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(n,t,i,r,u,f,e){var s,c,o,l;if(!(4>arguments.length)){var y=(r.call?r(t):r)||"div",v=["<",y," "],a=(u&&u.call?u(t):u)||{},h=(f&&f.call?f(t):f)||{},p=(e&&e.call?e.call(this,n,t):e)||"",o=this.domId=h.id||CKEDITOR.tools.getNextId()+"_uiElement";for(this.id=t.id,h.id=o,s={},t.type&&(s["cke_dialog_ui_"+t.type]=1),t.className&&(s[t.className]=1),t.disabled&&(s.cke_disabled=1),c=h["class"]&&h["class"].split?h["class"].split(" "):[],o=0;o<c.length;o++)c[o]&&(s[c[o]]=1);c=[];for(o in s)c.push(o);h["class"]=c.join(" ");t.title&&(h.title=t.title);s=(t.style||"").split(";");t.align&&(c=t.align,a["margin-left"]="left"==c?0:"auto",a["margin-right"]="right"==c?0:"auto");for(o in a)s.push(o+":"+a[o]);for(t.hidden&&s.push("display:none"),o=s.length-1;0<=o;o--)""===s[o]&&s.splice(o,1);0<s.length&&(h.style=(h.style?h.style+"; ":"")+s.join("; "));for(o in h)v.push(o+'="'+CKEDITOR.tools.htmlEncode(h[o])+'" ');v.push(">",p,"<\/",y,">");i.push(v.join(""));(this._||(this._={})).dialog=n;"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(n){return function(i){n.call(this,t.setValue.call(this,i))}}));"function"==typeof t.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(n){return function(){return t.getValue.call(this,n.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(t);this.accessKeyUp&&this.accessKeyDown&&t.accessKey&&d(this,n,"CTRL+"+t.accessKey);l=this;n.on("load",function(){var i=l.getInputElement(),t;if(i){t=l.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";i.on("focus",function(){n._.tabBarMode=!1;n._.hasFocus=!0;l.fire("focus");t&&this.addClass(t)});i.on("blur",function(){l.fire("blur");t&&this.removeClass(t)})}});this.keyboardFocusable&&(this.tabIndex=t.tabIndex||0,this.focusIndex=n._.focusList.push(this)-1,this.on("focus",function(){n._.currentFocusIndex=l.focusIndex}));CKEDITOR.tools.extend(this,t)}},hbox:function(n,i,r,u,f){if(!(4>arguments.length)){this._||(this._={});var s=this._.children=i,o=f&&f.widths||null,h=f&&f.height||null,e,c={role:"presentation"};f&&f.align&&(c.align=f.align);CKEDITOR.ui.dialog.uiElement.call(this,n,f||{type:"hbox"},u,"table",{},c,function(){var i=['<tbody><tr class="cke_dialog_ui_hbox">'],u,n;for(e=0;e<r.length;e++)u="cke_dialog_ui_hbox_child",n=[],0===e&&(u="cke_dialog_ui_hbox_first"),e==r.length-1&&(u="cke_dialog_ui_hbox_last"),i.push('<td class="',u,'" role="presentation" '),o?o[e]&&n.push("width:"+t(o[e])):n.push("width:"+Math.floor(100/r.length)+"%"),h&&n.push("height:"+t(h)),f&&void 0!=f.padding&&n.push("padding:"+t(f.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&s[e].align&&n.push("text-align:"+s[e].align),0<n.length&&i.push('style="'+n.join("; ")+'" '),i.push(">",r[e],"<\/td>");return i.push("<\/tr><\/tbody>"),i.join("")})}},vbox:function(n,i,r,u,f){if(!(3>arguments.length)){this._||(this._={});var o=this._.children=i,e=f&&f.width||null,s=f&&f.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,n,f||{type:"vbox"},u,"div",null,{role:"presentation"},function(){var i=['<table role="presentation" cellspacing="0" border="0" '],h,u;for(i.push('style="'),f&&f.expand&&i.push("height:100%;"),i.push("width:"+t(e||"100%"),";"),i.push('"'),i.push('align="',CKEDITOR.tools.htmlEncode(f&&f.align||("ltr"==n.getParentEditor().lang.dir?"left":"right")),'" '),i.push("><tbody>"),h=0;h<r.length;h++)u=[],i.push('<tr><td role="presentation" '),e&&u.push("width:"+t(e||"100%")),s?u.push("height:"+t(s[h])):f&&f.expand&&u.push("height:"+Math.floor(100/r.length)+"%"),f&&void 0!=f.padding&&u.push("padding:"+t(f.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&o[h].align&&u.push("text-align:"+o[h].align),0<u.length&&i.push('style="',u.join("; "),'" '),i.push(' class="cke_dialog_ui_vbox_child">',r[h],"<\/td><\/tr>");return i.push("<\/tbody><\/table>"),i.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(n,t){return this.getInputElement().setValue(n),t||this.fire("change",{value:n}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var n=this.getInputElement();(n=n.getParent())&&-1==n.$.className.search("cke_dialog_page_contents"););return n?(n=n.getAttribute("name"),this._.dialog._.currentTabId!=n&&this._.dialog.selectPage(n),this):this},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(n){var i,r=function(n,t,i,r){t.on("load",function(){n.getInputElement().on(i,r,n)})};for(var t in n)(i=t.match(/^on([A-Z]\w+)/))&&(this.eventProcessors[t]?this.eventProcessors[t].call(this,this._.dialog,n[t]):r(this,this._.dialog,i[1].toLowerCase(),n[t]));return this},eventProcessors:{onLoad:function(n,t){n.on("load",t,this)},onShow:function(n,t){n.on("show",t,this)},onHide:function(n,t){n.on("hide",t,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var n=this.getElement();this.getInputElement().setAttribute("disabled","true");n.addClass("cke_disabled")},enable:function(){var n=this.getElement();this.getInputElement().removeAttribute("disabled");n.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!this.isEnabled()||!this.isVisible()?!1:!0}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(n){return 1>arguments.length?this._.children.concat():(n.splice||(n=[n]),2>n.length?this._.children[n[0]]:this._.children[n[0]]&&this._.children[n[0]].getChild?this._.children[n[0]].getChild(n.slice(1,n.length)):null)}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox,function(){var n={build:function(n,t,i){for(var f,e=t.children,r,o=[],s=[],u=0;u<e.length&&(r=e[u]);u++)f=[],o.push(f),s.push(CKEDITOR.dialog._.uiElementBuilders[r.type].build(n,r,f));return new CKEDITOR.ui.dialog[t.type](n,s,o,i,t)}};CKEDITOR.dialog.addUIElement("hbox",n);CKEDITOR.dialog.addUIElement("vbox",n)}();CKEDITOR.dialogCommand=function(n,t){this.dialogName=n;CKEDITOR.tools.extend(this,t,!0)};CKEDITOR.dialogCommand.prototype={exec:function(n){CKEDITOR.env.opera?CKEDITOR.tools.setTimeout(function(){n.openDialog(this.dialogName)},0,this):n.openDialog(this.dialogName)},canUndo:!1,editorFocus:CKEDITOR.env.ie||CKEDITOR.env.webkit},function(){var n=/^([a]|[^a])+$/,t=/^\d*$/,i=/^\d*(?:\.\d+)?$/,u=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,f=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,e=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var n=arguments;return function(){for(var f=this&&this.getValue?this.getValue():n[0],e=void 0,u=CKEDITOR.VALIDATE_AND,r=[],i,t=0;t<n.length;t++)if("function"==typeof n[t])r.push(n[t]);else break;for(t<n.length&&"string"==typeof n[t]&&(e=n[t],t++),t<n.length&&"number"==typeof n[t]&&(u=n[t]),i=u==CKEDITOR.VALIDATE_AND?!0:!1,t=0;t<r.length;t++)i=u==CKEDITOR.VALIDATE_AND?i&&r[t](f):i||r[t](f);return i?!0:e}},regex:function(n,t){return function(i){return i=this&&this.getValue?this.getValue():i,n.test(i)?!0:t}},notEmpty:function(t){return this.regex(n,t)},integer:function(n){return this.regex(t,n)},number:function(n){return this.regex(i,n)},cssLength:function(n){return this.functions(function(n){return f.test(CKEDITOR.tools.trim(n))},n)},htmlLength:function(n){return this.functions(function(n){return u.test(CKEDITOR.tools.trim(n))},n)},inlineStyle:function(n){return this.functions(function(n){return e.test(CKEDITOR.tools.trim(n))},n)},equals:function(n,t){return this.functions(function(t){return t==n},t)},notEqual:function(n,t){return this.functions(function(t){return t!=n},t)}};CKEDITOR.on("instanceDestroyed",function(n){var t,i,n,u;if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(;t=CKEDITOR.dialog._.currentTop;)t.hide();for(i in r)r[i].remove();r={}}n=n.editor._.storedDialogs;for(u in n)n[u].destroy()})}();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(n,t){var i=null,r=CKEDITOR.dialog._.dialogDefinitions[n];if(null===CKEDITOR.dialog._.currentTop&&y(this),"function"==typeof r)i=this._.storedDialogs||(this._.storedDialogs={}),i=i[n]||(i[n]=new CKEDITOR.dialog(this,n)),t&&t.call(i,i),i.show();else{if("failed"==r)throw p(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+n+'" failed when loading definition.');"string"==typeof r&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(r),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[n]&&(CKEDITOR.dialog._.dialogDefinitions[n]="failed");this.openDialog(n,t)},this,0,1)}return CKEDITOR.skin.loadPart("dialog"),i}})}();CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(n){n.on("contentDom",function(){var t=n.editable();t.attachListener(t,"dblclick",function(t){return n.readOnly?!1:(t={element:t.data.getTarget()},n.fire("doubleclick",t),t.dialog&&n.openDialog(t.dialog),1)})})}});CKEDITOR.plugins.add("about",{requires:"dialog",init:function(n){var t=n.addCommand("about",new CKEDITOR.dialogCommand("about"));t.modes={wysiwyg:1,source:1};t.canUndo=!1;t.readOnly=1;n.ui.addButton&&n.ui.addButton("About",{label:n.lang.about.title,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{en:1,ar:1,bg:1,ca:1,et:1,cs:1,cy:1,da:1,de:1,el:1,eo:1,es:1,fa:1,fi:1,fr:1,gu:1,he:1,hi:1,hr:1,hu:1,it:1,ja:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,sk:1,sl:1,sv:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1},init:function(n){var t=this;n.addCommand("a11yHelp",{exec:function(){var i=n.langCode,i=t.availableLangs[i]?i:t.availableLangs[i.replace(/-.*/,"")]?i.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+i+".js"),function(){n.lang.a11yhelp=t.langEntries[i];n.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});n.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js")}})}();CKEDITOR.plugins.add("basicstyles",{init:function(n){var u=0,t=function(t,i,r,f){f&&(f=new CKEDITOR.style(f),n.attachStyleStateChange(f,function(t){n.readOnly||n.getCommand(r).setState(t)}),n.addCommand(r,new CKEDITOR.styleCommand(f)),n.ui.addButton&&n.ui.addButton(t,{label:i,command:r,toolbar:"basicstyles,"+(u+=10)}))},i=n.config,r=n.lang.basicstyles;t("Bold",r.bold,"bold",i.coreStyles_bold);t("Italic",r.italic,"italic",i.coreStyles_italic);t("Underline",r.underline,"underline",i.coreStyles_underline);t("Strike",r.strike,"strike",i.coreStyles_strike);t("Subscript",r.subscript,"subscript",i.coreStyles_subscript);t("Superscript",r.superscript,"superscript",i.coreStyles_superscript);n.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"};CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){var n={exec:function(n){var t=n.getCommand("blockquote").state,s=n.getSelection(),r=s&&s.getRanges(!0)[0],o,f,i,u,e;if(r){if(o=s.createBookmarks(),CKEDITOR.env.ie){if(f=o[0].startNode,i=o[0].endNode,f&&"blockquote"==f.getParent().getName())for(u=f;u=u.getNext();)if(u.type==CKEDITOR.NODE_ELEMENT&&u.isBlockBoundary()){f.move(u,!0);break}if(i&&"blockquote"==i.getParent().getName())for(u=i;u=u.getPrevious();)if(u.type==CKEDITOR.NODE_ELEMENT&&u.isBlockBoundary()){i.move(u);break}}if(e=r.createIterator(),e.enlargeBr=n.config.enterMode!=CKEDITOR.ENTER_BR,t==CKEDITOR.TRISTATE_OFF){for(f=[];t=e.getNextParagraph();)f.push(t);for(1>f.length&&(t=n.document.createElement(n.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),i=o.shift(),r.insertNode(t),t.append(new CKEDITOR.dom.text("﻿",n.document)),r.moveToBookmark(i),r.selectNodeContents(t),r.collapse(!0),i=r.createBookmark(),f.push(t),o.unshift(i)),u=f[0].getParent(),r=[],i=0;i<f.length;i++)t=f[i],u=u.getCommonAncestor(t.getParent());for(t={table:1,tbody:1,tr:1,ol:1,ul:1};t[u.getName()];)u=u.getParent();for(i=null;0<f.length;){for(t=f.shift();!t.getParent().equals(u);)t=t.getParent();t.equals(i)||r.push(t);i=t}for(;0<r.length;)if(t=r.shift(),"blockquote"==t.getName()){for(i=new CKEDITOR.dom.documentFragment(n.document);t.getFirst();)i.append(t.getFirst().remove()),f.push(i.getLast());i.replace(t)}else f.push(t);for(r=n.document.createElement("blockquote"),r.insertBefore(f[0]);0<f.length;)t=f.shift(),r.append(t)}else if(t==CKEDITOR.TRISTATE_ON){for(i=[],u={};t=e.getNextParagraph();){for(f=r=null;t.getParent();){if("blockquote"==t.getParent().getName()){r=t.getParent();f=t;break}t=t.getParent()}r&&f&&!f.getCustomData("blockquote_moveout")&&(i.push(f),CKEDITOR.dom.element.setMarker(u,f,"blockquote_moveout",!0))}for(CKEDITOR.dom.element.clearAllMarkers(u),t=[],f=[],u={};0<i.length;)e=i.shift(),r=e.getParent(),e.getPrevious()?e.getNext()?(e.breakParent(e.getParent()),f.push(e.getNext())):e.remove().insertAfter(r):e.remove().insertBefore(r),r.getCustomData("blockquote_processed")||(f.push(r),CKEDITOR.dom.element.setMarker(u,r,"blockquote_processed",!0)),t.push(e);for(CKEDITOR.dom.element.clearAllMarkers(u),i=f.length-1;0<=i;i--){r=f[i];n:{u=r;for(var e=0,c=u.getChildCount(),h=void 0;e<c&&(h=u.getChild(e));e++)if(h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){u=!1;break n}u=!0}u&&r.remove()}if(n.config.enterMode==CKEDITOR.ENTER_BR)for(r=!0;t.length;)if(e=t.shift(),"div"==e.getName()){for(i=new CKEDITOR.dom.documentFragment(n.document),!r||!e.getPrevious()||e.getPrevious().type==CKEDITOR.NODE_ELEMENT&&e.getPrevious().isBlockBoundary()||i.append(n.document.createElement("br")),r=e.getNext()&&!(e.getNext().type==CKEDITOR.NODE_ELEMENT&&e.getNext().isBlockBoundary());e.getFirst();)e.getFirst().remove().appendTo(i);r&&i.append(n.document.createElement("br"));i.replace(e);r=!1}}s.selectBookmarks(o);n.focus()}},refresh:function(n,t){this.setState(n.elementPath(t.block||t.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(t){t.blockless||(t.addCommand("blockquote",n),t.ui.addButton&&t.ui.addButton("Blockquote",{label:t.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),function(){function t(n){function y(){var t=n.editable();t.on(s,function(n){CKEDITOR.env.ie&&i||v(n)});CKEDITOR.env.ie&&t.on("paste",function(t){e||(r(),t.data.preventDefault(),v(t),u("paste")||n.openDialog("paste"))});CKEDITOR.env.ie&&(t.on("contextmenu",c,null,null,0),t.on("beforepaste",function(n){n.data&&!n.data.$.ctrlKey&&c()},null,null,0));t.on("beforecut",function(){i||a(n)});t.on("mouseup",function(){setTimeout(function(){f()},0)});t.on("keyup",f)}function h(t){return{type:t,canUndo:"cut"==t,startDisabled:!0,exec:function(){"cut"==this.type&&a();var t,i=this.type;if(CKEDITOR.env.ie)t=u(i);else try{t=n.document.$.execCommand(i,!1,null)}catch(r){t=!1}return t||alert(n.lang.clipboard[this.type+"Error"]),t}}}function p(){return{canUndo:!1,async:!0,exec:function(n,t){var i=function(t,i){t&&l(t.type,t.dataValue,!!i);n.fire("afterCommandExec",{name:"paste",command:r,returnValue:!!t})},r=this;"string"==typeof t?i({type:"auto",dataValue:t},1):n.getClipboardData(i)}}}function r(){e=1;setTimeout(function(){e=0},100)}function c(){i=1;setTimeout(function(){i=0},10)}function u(t){var i=n.document,r=i.getBody(),u=!1,f=function(){u=!0};r.on(t,f);return(7<CKEDITOR.env.version?i.$:i.$.selection.createRange()).execCommand(t),r.removeListener(t,f),u}function l(t,i,r){return(t={type:t},r&&!n.fire("beforePaste",t)||!i)?!1:(t.dataValue=i,n.fire("paste",t))}function a(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var t=n.getSelection(),i,r,u;t.getType()==CKEDITOR.SELECTION_ELEMENT&&(i=t.getSelectedElement())&&(r=t.getRanges()[0],u=n.document.createText(""),u.insertBefore(i),r.setStartBefore(u),r.setEndAfter(i),t.selectRanges([r]),setTimeout(function(){i.getParent()&&(u.remove(),t.selectElement(i))},0))}}function w(t,i){var f=n.document,u=n.editable(),h=function(n){n.cancel()},e=CKEDITOR.env.gecko&&10902>=CKEDITOR.env.version,o,a,s,v;if(!f.getById("cke_pastebin")){var c=n.getSelection(),l=c.createBookmarks(),r=new CKEDITOR.dom.element(u.is("body")&&!CKEDITOR.env.ie&&!CKEDITOR.env.opera?"body":"div",f);r.setAttribute("id","cke_pastebin");CKEDITOR.env.opera&&r.appendBogus();o=0;f=f.getWindow();e?(r.insertAfter(l[0].startNode),r.setStyle("display","inline")):(CKEDITOR.env.webkit?(u.append(r),r.addClass("cke_editable"),o=(u.is("body")?u:CKEDITOR.dom.element.get(r.$.offsetParent)).getDocumentPosition().y):u.getAscendant(CKEDITOR.env.ie||CKEDITOR.env.opera?"body":"html",1).append(r),r.setStyles({position:"absolute",top:f.getScrollPosition().y-o+10+"px",width:"1px",height:Math.max(1,f.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0}));(e=r.getParent().isReadOnly())?(r.setOpacity(0),r.setAttribute("contenteditable",!0)):r.setStyle("ltr"==n.config.contentsLangDirection?"left":"right","-1000px");n.on("selectionChange",h,null,null,0);e&&r.focus();e=new CKEDITOR.dom.range(r);e.selectNodeContents(r);a=e.select();CKEDITOR.env.ie&&(s=u.once("blur",function(){n.lockSelection(a)}));v=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&(CKEDITOR.document[CKEDITOR.env.webkit?"getBody":"getDocumentElement"]().$.scrollTop=v);s&&s.removeListener();CKEDITOR.env.ie&&u.focus();c.selectBookmarks(l);r.remove();var t;CKEDITOR.env.webkit&&(t=r.getFirst())&&t.is&&t.hasClass("Apple-style-span")&&(r=t);n.removeListener("selectionChange",h);i(r.getHtml())},0)}}function b(){if(CKEDITOR.env.ie){n.focus();r();var t=n.focusManager;if(t.lock(),n.editable().fire(s)&&!u("paste"))return t.unlock(),!1;t.unlock()}else try{if(n.editable().fire(s)&&!n.document.$.execCommand("Paste",!1,null))throw 0;}catch(i){return!1}return!0}function k(t){if("wysiwyg"==n.mode)switch(t.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:t=n.editable();r();CKEDITOR.env.ie||t.fire("beforepaste");(CKEDITOR.env.opera||CKEDITOR.env.gecko&&10900>CKEDITOR.env.version)&&t.fire("paste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:n.fire("saveSnapshot");setTimeout(function(){n.fire("saveSnapshot")},0)}}function v(t){var i={type:"auto"},r=n.fire("beforePaste",i);w(t,function(n){n=n.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");r&&l(i.type,n,0,1)})}function f(){if("wysiwyg"==n.mode){var i=t("Paste");n.getCommand("cut").setState(t("Cut"));n.getCommand("copy").setState(t("Copy"));n.getCommand("paste").setState(i);n.fire("pasteState",i)}}function t(t){var r;if(o&&t in{Paste:1,Cut:1})return CKEDITOR.TRISTATE_DISABLED;if("Paste"==t){CKEDITOR.env.ie&&(i=1);try{r=n.document.$.queryCommandEnabled(t)||CKEDITOR.env.webkit}catch(u){}i=0}else t=n.getSelection(),r=t.getRanges(),r=t.type!=CKEDITOR.SELECTION_NONE&&!(1==r.length&&r[0].collapsed);return r?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}var i=0,e=0,o=0,s=CKEDITOR.env.ie?"beforepaste":"paste";(function(){n.on("key",k);n.on("contentDom",y);n.on("selectionChange",function(n){o=n.data.selection.getRanges()[0].checkReadOnly();f()});n.contextMenu&&n.contextMenu.addListener(function(n,i){return o=i.getRanges()[0].checkReadOnly(),{cut:t("Cut"),copy:t("Copy"),paste:t("Paste")}})})(),function(){function t(t,i,r,u,f){var e=n.lang.clipboard[i];n.addCommand(i,r);n.ui.addButton&&n.ui.addButton(t,{label:e,command:i,toolbar:"clipboard,"+u});n.addMenuItems&&n.addMenuItem(i,{label:e,command:i,group:"clipboard",order:f})}t("Cut","cut",h("cut"),10,1);t("Copy","copy",h("copy"),20,4);t("Paste","paste",p(),30,8)}();n.getClipboardData=function(t,i){function r(n){n.removeListener();n.cancel();i(n.data)}function u(n){n.removeListener();n.cancel();o=!0;i({type:e,dataValue:n.data})}function s(){this.customTitle=t&&t.title}var f=!1,e="auto",o=!1;i||(i=t,t=null);n.on("paste",r,null,null,0);n.on("beforePaste",function(n){n.removeListener();f=!0;e=n.data.type},null,null,1e3);!1===b()&&(n.removeListener("paste",r),f&&n.fire("pasteDialog",s)?(n.on("pasteDialogCommit",u),n.on("dialogHide",function(n){n.removeListener();n.data.removeListener("pasteDialogCommit",u);setTimeout(function(){o||i(null)},10)})):i(null))}}function i(n){if(CKEDITOR.env.webkit){if(!n.match(/^[^<]*$/g)&&!n.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!n.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!n.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko||CKEDITOR.env.opera){if(!n.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function r(t,i){function r(n){return CKEDITOR.tools.repeat("<\/p><p>",~~(n/2))+(1==n%2?"<br>":"")}return(i=i.replace(/\s+/g," ").replace(/> +</g,"><").replace(/<br ?\/>/gi,"<br>"),i=i.replace(/<\/?[A-Z]+>/g,function(n){return n.toLowerCase()}),i.match(/^[^<]$/))?i:(CKEDITOR.env.webkit&&-1<i.indexOf("<div>")&&(i=i.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"<div><\/div>"),i.match(/<div>(<br>|)<\/div>/)&&(i="<p>"+i.replace(/(<div>(<br>|)<\/div>)+/g,function(n){return r(n.split("<\/div><div>").length+1)})+"<\/p>"),i=i.replace(/<\/div><div>/g,"<br>"),i=i.replace(/<\/?div>/g,"")),(CKEDITOR.env.gecko||CKEDITOR.env.opera)&&t.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(i=i.replace(/^<br><br>$/,"<br>")),-1<i.indexOf("<br><br>")&&(i="<p>"+i.replace(/(<br>){2,}/g,function(n){return r(n.length/4)})+"<\/p>")),n(t,i))}function u(){var t=new CKEDITOR.htmlParser.filter,r={blockquote:1,dl:1,fieldset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ol:1,p:1,table:1,ul:1},u=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),f={p:1,br:1,"cke:br":1},e=CKEDITOR.dtd,o=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),i=function(n){delete n.name;n.add(new CKEDITOR.htmlParser.text(" "))},n=function(n){for(var t=n,i;(t=t.next)&&t.name&&t.name.match(/^h\d$/);)for(i=new CKEDITOR.htmlParser.element("cke:br"),i.isEmpty=!0,n.add(i);i=t.children.shift();)n.add(i)};return t.addRules({elements:{h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,img:function(n){var n=CKEDITOR.tools.trim(n.attributes.alt||""),t=" ";return n&&!n.match(/(^http|\.(jpe?g|gif|png))/i)&&(t=" ["+n+"] "),new CKEDITOR.htmlParser.text(t)},td:i,th:i,$:function(n){var i=n.name,t;if(o[i])return!1;if(delete n.attributes,"br"==i)return n;if(r[i])n.name="p";else if(u[i])delete n.name;else if(e[i]){if(t=new CKEDITOR.htmlParser.element("cke:br"),t.isEmpty=!0,CKEDITOR.dtd.$empty[i])return t;n.add(t,0);t=t.clone();t.isEmpty=!0;n.add(t);delete n.name}return f[n.name]||delete n.name,n}}}),t}function f(t,i,r){var i=new CKEDITOR.htmlParser.fragment.fromHtml(i),u=new CKEDITOR.htmlParser.basicWriter;i.writeHtml(u,r);var i=u.getHtml(),i=i.replace(/\s*(<\/?[a-z:]+ ?\/?>)\s*/g,"$1").replace(/(<cke:br \/>){2,}/g,"<cke:br />").replace(/(<cke:br \/>)(<\/?p>|<br \/>)/g,"$2").replace(/(<\/?p>|<br \/>)(<cke:br \/>)/g,"$1").replace(/<(cke:)?br( \/)?>/g,"<br>").replace(/<p><\/p>/g,""),f=0,i=i.replace(/<\/?p>/g,function(n){if("<p>"==n){if(1<++f)return"<\/p><p>"}else if(0<--f)return"<\/p><p>";return n}).replace(/<p><\/p>/g,"");return n(t,i)}function n(n,t){return n.enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(<\/p><p>)+/g,function(n){return CKEDITOR.tools.repeat("<br>",2*(n.length/7))}).replace(/<\/?p>/g,""):n.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(\/)?p>/g,"<$1div>")),t}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(n){var e;t(n);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));n.on("paste",function(n){var t=n.data.dataValue,f=CKEDITOR.dtd.$block,i,u,r;if(-1<t.indexOf("Apple-")&&(t=t.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=n.data.type&&(t=t.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(n,t){return t.replace(/\t/g,"&nbsp;&nbsp; &nbsp;")})),-1<t.indexOf('<br class="Apple-interchange-newline">')&&(n.data.startsWithEOL=1,n.data.preSniffing="html",t=t.replace(/<br class="Apple-interchange-newline">/,"")),t=t.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")),t.match(/^<[^<]+cke_(editable|contents)/i)){for(r=new CKEDITOR.dom.element("div"),r.setHtml(t);1==r.getChildCount()&&(i=r.getFirst())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.hasClass("cke_editable")||i.hasClass("cke_contents"));)r=u=i;u&&(t=u.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?t=t.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(t,i){return i.toLowerCase()in f?(n.data.preSniffing="html","<"+i):t}):CKEDITOR.env.webkit?t=t.replace(/<\/(\w+)><div><br><\/div>$/,function(t,i){return i in f?(n.data.endsWithEOL=1,"<\/"+i+">"):t}):CKEDITOR.env.gecko&&(t=t.replace(/(\s)<br>$/,"$1"));n.data.dataValue=t},null,null,3);n.on("paste",function(t){var t=t.data,s=t.type,o=t.dataValue,h,c=n.config.clipboard_defaultContentType||"html";h="html"==s||"html"==t.preSniffing?"html":i(o);"htmlifiedtext"==h?o=r(n.config,o):"text"==s&&"html"==h&&(o=f(n.config,o,e||(e=u(n))));t.startsWithEOL&&(o='<br data-cke-eol="1">'+o);t.endsWithEOL&&(o+='<br data-cke-eol="1">');"auto"==s&&(s="html"==h||"html"==c?"html":"text");t.type=s;t.dataValue=o;delete t.preSniffing;delete t.startsWithEOL;delete t.endsWithEOL},null,null,6);n.on("paste",function(t){t=t.data;n.insertHtml(t.dataValue,t.type);setTimeout(function(){n.fire("afterPaste")},0)},null,null,1e3);n.on("pasteDialog",function(t){setTimeout(function(){n.openDialog("paste",t.data)},0)})}})}(),function(){CKEDITOR.plugins.add("panel",{beforeInit:function(n){n.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(n,t){t&&CKEDITOR.tools.extend(this,t);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=n;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(n){return new CKEDITOR.ui.panel(n)}};var n=CKEDITOR.addTemplate("panel",'<div lang="{langCode}" id="{id}" dir={dir} class="cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style="z-index:{z-index}" role="presentation">{frame}<\/div>'),t=CKEDITOR.addTemplate("panel-frame",'<iframe id="{id}" class="cke_panel_frame" role="application" frameborder="0" src="{src}"><\/iframe>'),i=CKEDITOR.addTemplate("panel-frame-inner",'<!DOCTYPE html><html class="cke_panel_container {env}" dir="{dir}" lang="{langCode}"><head>{css}<\/head><body class="cke_{dir}" style="margin:0;padding:0" onload="{onload}"><\/body><\/html>');CKEDITOR.ui.panel.prototype={render:function(r,u){var f,e;return this.getHolderElement=function(){var n=this._.holder;if(!n){if(this.isFramed){var n=this.document.getById(this.id+"_frame"),t=n.getParent(),n=n.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));n.write(i.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+t+");"},f)));n.getWindow().$.CKEDITOR=CKEDITOR;n.on("key"+(CKEDITOR.env.opera?"press":"down"),function(n){var t=n.data.getKeystroke(),i=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(t)?n.data.preventDefault():(27==t||t==("rtl"==i?39:37))&&this.onEscape&&!1===this.onEscape(t)&&n.data.preventDefault()},this);n=n.getBody();n.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(t)}else n=this.document.getById(this.id);this._.holder=n}return n},f={editorId:r.id,id:this.id,langCode:r.langCode,dir:r.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":r.config.baseFloatZIndex+1},this.isFramed&&(f.frame=t.output({id:this.id+"_frame",src:"javascript:void(document.open(),"+(CKEDITOR.env.isCustomDomain()?"document.domain='"+document.domain+"',":"")+'document.close())">'})),e=n.output(f),u&&u.push(e),e},addBlock:function(n,t){return t=this._.blocks[n]=t instanceof CKEDITOR.ui.panel.block?t:new CKEDITOR.ui.panel.block(this.getHolderElement(),t),this._.currentBlock||this.showBlock(n),t},getBlock:function(n){return this._.blocks[n]},showBlock:function(n){var n=this._.blocks[n],t=this._.currentBlock,i=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");return t&&(i.removeAttributes(t.attributes),t.hide()),this._.currentBlock=n,i.setAttributes(n.attributes),CKEDITOR.fire("ariaWidget",i),n._.focusIndex=-1,this._.onKeyDown=n.onKeyDown&&CKEDITOR.tools.bind(n.onKeyDown,n),n.show(),n},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(n,t){this.element=n.append(n.getDocument().createElement("div",{attributes:{tabIndex:-1,"class":"cke_panel_block",role:"presentation"},styles:{display:"none"}}));t&&CKEDITOR.tools.extend(this,t);this.attributes.title||(this.attributes.title=this.attributes["aria-label"]);this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(n){-1!=n&&(n=this.element.getElementsByTag("a").getItem(this._.focusIndex=n),(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&n.getDocument().getWindow().focus(),n.focus(),this.onMark&&this.onMark(n))}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(n){var i=this.keys[n],n,t;switch(i){case"next":for(n=this._.focusIndex,i=this.element.getElementsByTag("a");t=i.getItem(++n);)if(t.getAttribute("_cke_focus")&&t.$.offsetWidth){this._.focusIndex=n;t.focus();break}return!1;case"prev":for(n=this._.focusIndex,i=this.element.getElementsByTag("a");0<n&&(t=i.getItem(--n));)if(t.getAttribute("_cke_focus")&&t.$.offsetWidth){this._.focusIndex=n;t.focus();break}return!1;case"click":case"mouseup":return n=this._.focusIndex,(t=0<=n&&this.element.getElementsByTag("a").getItem(n))&&(t.$[i]?t.$[i]():t.$["on"+i]()),!1}return!0}}})}();CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function t(t,i,r,u,f){var f=CKEDITOR.tools.genKey(i.getUniqueId(),r.getUniqueId(),t.lang.dir,t.uiColor||"",u.css||"",f||""),e=n[f];return e||(e=n[f]=new CKEDITOR.ui.panel(i,u),e.element=r.append(CKEDITOR.dom.element.createFromHtml(e.render(t),i)),e.element.setStyles({display:"none",position:"absolute"})),e}var n={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(n,i,r,u){function e(){h.hide()}r.forceIFrame=1;r.toolbarRelated&&n.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(i=CKEDITOR.document.getById("cke_"+n.name));var o=i.getDocument(),u=t(n,o,i,r,u||0),f=u.element,s=f.getFirst(),h=this;f.disableContextMenu();f.setAttribute("role","application");this.element=f;this._={editor:n,panel:u,parentElement:i,definition:r,document:o,iframe:s,children:[],dir:n.lang.dir};n.on("mode",e);n.on("resize",e);o.getWindow().on("resize",e)},proto:{addBlock:function(n,t){return this._.panel.addBlock(n,t)},addListBlock:function(n,t){return this._.panel.addListBlock(n,t)},getBlock:function(n){return this._.panel.getBlock(n)},showBlock:function(n,t,i,r,u){var s=this._.panel,c=s.showBlock(n);this.allowBlur(!1);n=this._.editor.editable();this._.returnFocus=n.hasFocus?n:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);var f=this.element,n=this._.iframe,n=CKEDITOR.env.ie?n:new CKEDITOR.dom.window(n.$.contentWindow),l=f.getDocument(),a=this._.parentElement.getPositionedAncestor(),v=t.getDocumentPosition(l),l=a?a.getDocumentPosition(l):{x:0,y:0},h="rtl"==this._.dir,e=v.x+(r||0)-l.x,o=v.y+(u||0)-l.y;h&&(1==i||4==i)?e+=t.$.offsetWidth:h||2!=i&&3!=i||(e+=t.$.offsetWidth-1);(3==i||4==i)&&(o+=t.$.offsetHeight-1);this._.panel._.offsetParentId=t.getId();f.setStyles({top:o+"px",left:0,display:""});f.setOpacity(0);f.getFirst().removeStyle("width");this._.editor.focusManager.add(n);this._.blurSet||(CKEDITOR.event.useCapture=!0,n.on("blur",function(n){this.allowBlur()&&n.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(delete this._.returnFocus,this.hide())},this),n.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.event.useCapture=!1,this._.blurSet=1);s.onEscape=CKEDITOR.tools.bind(function(n){if(this.onEscape&&this.onEscape(n)===!1)return!1},this);CKEDITOR.tools.setTimeout(function(){var n=CKEDITOR.tools.bind(function(){var n,u;f.removeStyle("width");c.autoSize?(n=c.element.getDocument(),n=(CKEDITOR.env.webkit?c.element:n.getBody()).$.scrollWidth,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&n>0&&(n=n+((f.$.offsetWidth||0)-(f.$.clientWidth||0)+3)),f.setStyle("width",n+10+"px"),n=c.element.$.scrollHeight,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&n>0&&(n=n+((f.$.offsetHeight||0)-(f.$.clientHeight||0)+3)),f.setStyle("height",n+"px"),s._.currentBlock.element.setStyle("display","none").removeStyle("display")):f.removeStyle("height");h&&(e=e-f.$.offsetWidth);f.setStyle("left",e+"px");var t=s.element.getWindow(),n=f.$.getBoundingClientRect(),t=t.getViewPaneSize(),i=n.width||n.right-n.left,r=n.height||n.bottom-n.top,l=h?n.right:t.width-n.left,a=h?t.width-n.right:n.left;h?l<i&&(e=a>i?e+i:t.width>i?e-n.left:e-n.right+t.width):l<i&&(e=a>i?e-i:t.width>i?e-n.right+t.width:e-n.left);i=n.top;t.height-n.top<r&&(o=i>r?o-r:t.height>r?o-n.bottom+t.height:o-n.top);CKEDITOR.env.ie&&(t=n=new CKEDITOR.dom.element(f.$.offsetParent),t.getName()=="html"&&(t=t.getDocument().getBody()),t.getComputedStyle("direction")=="rtl"&&(e=CKEDITOR.env.ie8Compat?e-f.getDocument().getDocumentElement().$.scrollLeft*2:e-(n.$.scrollWidth-n.$.clientWidth)));n=f.getFirst();(u=n.getCustomData("activePanel"))&&u.onHide&&u.onHide.call(this,1);n.setCustomData("activePanel",this);f.setStyles({top:o+"px",left:e+"px"});f.setOpacity(1)},this);s.isLoaded?n():s.onLoad=n;CKEDITOR.tools.setTimeout(function(){this.focus();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)},focus:function(){if(CKEDITOR.env.webkit){var n=CKEDITOR.document.getActive();n.equals(this._.iframe)||n.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var n=this._.iframe.getFrameDocument().getActive();n.is("a")&&(this._.lastFocused=n)},hide:function(n){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"),(n=n&&this._.returnFocus)&&(CKEDITOR.env.webkit&&n.type&&n.getWindow().$.focus(),n.focus()),delete this._.lastFocused,this._.editor.fire("panelHide",this))},allowBlur:function(n){var t=this._.panel;return void 0!=n&&(t.allowBlur=n),t.allowBlur},showAsChild:function(n,t,i,r,u,f){this._.activeChild==n&&n._.panel._.offsetParentId==i.getId()||(this.hideChild(),n.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=n,this._.focused=!1,n.showBlock(t,i,r,u,f),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){n.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(n){var t=this._.activeChild;t&&(delete t.onHide,delete this._.activeChild,t.hide(),n&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var i=CKEDITOR.tools.isEmpty(CKEDITOR.instances),r,t;for(r in n)t=n[r],i?t.destroy():t.element.hide();i&&(n={})})}();CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(n){for(var u=n.config.menu_groups.split(","),i=n._.menuGroups={},r=n._.menuItems={},t=0;t<u.length;t++)i[u[t]]=t+1;n.addMenuGroup=function(n,t){i[n]=t||100};n.addMenuItem=function(n,t){i[t.group]&&(r[n]=new CKEDITOR.menuItem(this,n,t))};n.addMenuItems=function(n){for(var t in n)this.addMenuItem(t,n[t])};n.getMenuItem=function(n){return r[n]};n.removeMenuItem=function(n){delete r[n]}}}),function(){function t(n){n.sort(function(n,t){return n.group<t.group?-1:n.group>t.group?1:n.order<t.order?-1:n.order>t.order?1:0})}var n='<span class="cke_menuitem"><a id="{id}" class="cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href="{href}" title="{title}" tabindex="-1"_cke_focus=1 hidefocus="true" role="menuitem" aria-haspopup="{hasPopup}" aria-disabled="{disabled}" aria-pressed="{pressed}"';(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(n+=' onkeypress="return false;"');CKEDITOR.env.gecko&&(n+=' onblur="this.style.cssText = this.style.cssText;"');var n=n+(' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout="CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},{index}); return false;">'),i=CKEDITOR.addTemplate("menuItem",n+'<span class="cke_menubutton_inner"><span class="cke_menubutton_icon"><span class="cke_button_icon cke_button__{iconName}_icon" style="{iconStyle}"><\/span><\/span><span class="cke_menubutton_label">{label}<\/span>{arrowHtml}<\/span><\/a><\/span>'),r=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}<\/span><\/span>');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(n,t){t=this._.definition=t||{};this.id=CKEDITOR.tools.getNextId();this.editor=n;this.items=[];this._.listeners=[];this._.level=t.level||1;var i=CKEDITOR.tools.extend({},t.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),r=i.block.attributes=i.attributes||{};r.role||(r.role="menu");this._.panelDefinition=i},_:{onShow:function(){var r=this.editor.getSelection(),e=r&&r.getStartElement(),o=this.editor.elementPath(),f=this._.listeners,t,i,u,n;for(this.removeAll(),t=0;t<f.length;t++)if(i=f[t](e,r,o),i)for(u in i)n=this.editor.getMenuItem(u),n&&(!n.command||this.editor.getCommand(n.command).state)&&(n.state=i[u],this.add(n))},onClick:function(n){this.hide();n.onClick?n.onClick():n.command&&this.editor.execCommand(n.command)},onEscape:function(n){var t=this.parent;return t?t._.panel.hideChild(1):27==n&&this.hide(1),!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(n){var t=this._.subMenu,i=this.items[n],u,r,f;if(i=i.getItems&&i.getItems()){t?t.removeAll():(t=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),t.parent=this,t._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(u in i)r=this.editor.getMenuItem(u),r&&(r.state=i[u],t.add(r));f=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+(""+n));setTimeout(function(){t.show(f,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(n){n.order||(n.order=this.items.length);this.items.push(n)},removeAll:function(){this.items=[]},show:function(n,i,r,u){var f,l;if(this.parent||(this._.onShow(),this.items.length)){var i=i||("rtl"==this.editor.lang.dir?2:1),h=this.items,s=this.editor,e=this._.panel,o=this._.element;e||(e=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level),e.onEscape=CKEDITOR.tools.bind(function(n){if(!1===this._.onEscape(n))return!1},this),e.onShow=function(){e._.panel.getHolderElement().getParent().addClass("cke cke_reset_all")},e.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this),o=e.addBlock(this.id,this._.panelDefinition.block),o.autoSize=!0,f=o.keys,f[40]="next",f[9]="next",f[38]="prev",f[CKEDITOR.SHIFT+9]="prev",f["rtl"==s.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click",f[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(f[13]="mouseup"),o=this._.element=o.element,f=o.getDocument(),f.getBody().setStyle("overflow","hidden"),f.getElementsByTag("html").getItem(0).setStyle("overflow","hidden"),this._.itemOverFn=CKEDITOR.tools.addFunction(function(n){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,s.config.menu_subMenuDelay||400,this,[n])},this),this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this),this._.itemClickFn=CKEDITOR.tools.addFunction(function(n){var t=this.items[n];if(t.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(t.getItems)this._.showSubMenu(n);else this._.onClick(t)},this));t(h);for(var f=s.elementPath(),f=['<div class="cke_menu'+(f&&f.direction()!=s.lang.dir?" cke_mixed_dir_content":"")+'" role="presentation">'],a=h.length,v=a&&h[0].group,c=0;c<a;c++)l=h[c],v!=l.group&&(f.push('<div class="cke_menuseparator" role="separator"><\/div>'),v=l.group),l.render(this,c,f);f.push("<\/div>");o.setHtml(f.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(e,this.id,n,i,r,u):e.showBlock(this.id,n,i,r,u);s.fire("menuShow",[e])}},addListener:function(n){this._.listeners.push(n)},hide:function(n){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(n)}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(n,t,i){CKEDITOR.tools.extend(this,i,{order:0,className:"cke_menubutton__"+t});this.group=n._.menuGroups[this.group];this.editor=n;this.name=t},proto:{render:function(n,t,u){var s=n.id+(""+t),f="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,h=f==CKEDITOR.TRISTATE_ON?"on":f==CKEDITOR.TRISTATE_DISABLED?"disabled":"off",o=this.getItems,c="&#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",e=this.name;this.icon&&!/\./.test(this.icon)&&(e=this.icon);n={id:s,name:this.name,iconName:e,label:this.label,cls:this.className||"",state:h,hasPopup:o?"true":"false",disabled:f==CKEDITOR.TRISTATE_DISABLED,pressed:f==CKEDITOR.TRISTATE_ON,title:this.label,href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:n._.itemOverFn,moveOutFn:n._.itemOutFn,clickFn:n._.itemClickFn,index:t,iconStyle:CKEDITOR.skin.getIconStyle(e,"rtl"==this.editor.lang.dir,e==this.icon?null:this.icon,this.iconOffset),arrowHtml:o?r.output({label:c}):""};i.output(n,u)}}})}();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(n){this.base.call(this,n,{panel:{className:"cke_menu_panel",attributes:{"aria-label":n.lang.contextmenu.options}}})},proto:{addTarget:function(n,t){var i,r,u;if(CKEDITOR.env.opera&&!("oncontextmenu"in document.body)){n.on("mousedown",function(r){if(r=r.data,2!=r.$.button)r.getKeystroke()==CKEDITOR.CTRL+1&&n.fire("contextmenu",r);else if(!t||!(CKEDITOR.env.mac?r.$.metaKey:r.$.ctrlKey)){var u=r.getTarget();i||(u=u.getDocument(),i=u.createElement("input"),i.$.type="button",u.getBody().append(i));i.setAttribute("style","position:absolute;top:"+(r.$.clientY-2)+"px;left:"+(r.$.clientX-2)+"px;width:5px;height:5px;opacity:0.01")}});n.on("mouseup",function(t){i&&(i.remove(),i=void 0,n.fire("contextmenu",t.data))})}n.on("contextmenu",function(n){if(n=n.data,!t||!(CKEDITOR.env.webkit?r:CKEDITOR.env.mac?n.$.metaKey:n.$.ctrlKey)){n.preventDefault();var i=n.getTarget().getDocument(),f=n.getTarget().getDocument().getDocumentElement(),u=!i.equals(CKEDITOR.document),i=i.getWindow().getScrollPosition(),e=u?n.$.clientX:n.$.pageX||i.x+n.$.clientX,o=u?n.$.clientY:n.$.pageY||i.y+n.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(f,null,e,o)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.opera)n.on("keypress",function(n){n=n.data;0===n.$.keyCode&&n.preventDefault()});if(CKEDITOR.env.webkit){u=function(){r=0};n.on("keydown",function(n){r=CKEDITOR.env.mac?n.data.$.metaKey:n.data.$.ctrlKey});n.on("keyup",u);n.on("contextmenu",u)}},open:function(n,t,i,r){this.editor.focus();n=n||CKEDITOR.document.getDocumentElement();this.editor.selectionChange(1);this.show(n,t,i,r)}}})},beforeInit:function(n){var t=n.contextMenu=new CKEDITOR.plugins.contextMenu(n);n.on("contentDom",function(){t.addTarget(n.editable(),!1!==n.config.browserContextMenuOnCtrl)});n.addCommand("contextMenu",{exec:function(){n.contextMenu.open(n.document.getBody())}});n.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");n.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}});CKEDITOR.plugins.add("resize",{init:function(n){var i,r,c,l,t=n.config,v=n.ui.spaceId("resizer"),u=n.element?n.element.getDirection(1):"ltr";if(t.resize_dir||(t.resize_dir="vertical"),void 0==t.resize_maxWidth&&(t.resize_maxWidth=3e3),void 0==t.resize_maxHeight&&(t.resize_maxHeight=3e3),void 0==t.resize_minWidth&&(t.resize_minWidth=750),void 0==t.resize_minHeight&&(t.resize_minHeight=250),!1!==t.resize_enabled){var f=null,e=("both"==t.resize_dir||"horizontal"==t.resize_dir)&&t.resize_minWidth!=t.resize_maxWidth,h=("both"==t.resize_dir||"vertical"==t.resize_dir)&&t.resize_minHeight!=t.resize_maxHeight,o=function(f){var o=i,s=r,a=o+(f.data.$.screenX-c)*("rtl"==u?-1:1),f=s+(f.data.$.screenY-l);e&&(o=Math.max(t.resize_minWidth,Math.min(a,t.resize_maxWidth)));h&&(s=Math.max(t.resize_minHeight,Math.min(f,t.resize_maxHeight)));n.resize(e?o:null,s)},s=function(){CKEDITOR.document.removeListener("mousemove",o);CKEDITOR.document.removeListener("mouseup",s);n.document&&(n.document.removeListener("mousemove",o),n.document.removeListener("mouseup",s))},a=CKEDITOR.tools.addFunction(function(u){f||(f=n.getResizable());i=f.$.offsetWidth||0;r=f.$.offsetHeight||0;c=u.screenX;l=u.screenY;t.resize_minWidth>i&&(t.resize_minWidth=i);t.resize_minHeight>r&&(t.resize_minHeight=r);CKEDITOR.document.on("mousemove",o);CKEDITOR.document.on("mouseup",s);n.document&&(n.document.on("mousemove",o),n.document.on("mouseup",s));u.preventDefault&&u.preventDefault()});n.on("destroy",function(){CKEDITOR.tools.removeFunction(a)});n.on("uiSpace",function(t){var i,r;"bottom"==t.data.space&&(i="",e&&!h&&(i=" cke_resizer_horizontal"),!e&&h&&(i=" cke_resizer_vertical"),r='<span id="'+v+'" class="cke_resizer'+i+" cke_resizer_"+u+'" title="'+CKEDITOR.tools.htmlEncode(n.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+a+', event)">'+("ltr"==u?"◢":"◣")+"<\/span>","ltr"==u&&"ltr"==i?t.data.html+=r:t.data.html=r+t.data.html)},n,null,100);n.on("maximize",function(t){n.ui.space("resizer")[t.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var n='<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&10900<=CKEDITOR.env.version&&!CKEDITOR.env.hc?"":'" href="javascript:void(\'{titleJs}\')"')+' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="{hasArrow}"';(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(n+=' onkeypress="return false;"');CKEDITOR.env.gecko&&(n+=' onblur="this.style.cssText = this.style.cssText;"');var n=n+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);"  onmousedown="return CKEDITOR.tools.callFunction({mousedownFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span class="cke_button_icon cke_button__{iconName}_icon" style="{style}"'),n=n+'>&nbsp;<\/span><span id="{id}_label" class="cke_button_label cke_button__{name}_label">{label}<\/span>{arrowHtml}<\/a>',t=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"&#9660;":"")+"<\/span>"),i=CKEDITOR.addTemplate("button",n);CKEDITOR.plugins.add("button",{beforeInit:function(n){n.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(n){CKEDITOR.tools.extend(this,n,{title:n.label,click:n.click||function(t){t.execCommand(n.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(n){return new CKEDITOR.ui.button(n)}};CKEDITOR.ui.button.prototype={render:function(n,r){var e=CKEDITOR.env,c=this._.id=CKEDITOR.tools.getNextId(),l="",f=this.command,v,h,o,s;this._.editor=n;var u={id:c,button:this,editor:n,focus:function(){CKEDITOR.document.getById(c).focus()},execute:function(){this.button.click(n)},attach:function(n){this.button.attach(n)}},y=CKEDITOR.tools.addFunction(function(n){if(u.onkey)return n=new CKEDITOR.dom.event(n),!1!==u.onkey(u,n.getKeystroke())}),p=CKEDITOR.tools.addFunction(function(n){var t;return u.onfocus&&(t=!1!==u.onfocus(u,new CKEDITOR.dom.event(n))),CKEDITOR.env.gecko&&10900>CKEDITOR.env.version&&n.preventBubble(),t}),a=0,w=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var t=n.editable();t.isInline()&&t.hasFocus&&(n.lockSelection(),a=1)}});if(u.clickFn=v=CKEDITOR.tools.addFunction(function(){a&&(n.unlockSelection(1),a=0);u.execute()}),this.modes){h={};o=function(){var t=n.mode;t&&(t=this.modes[t]?void 0!=h[t]?h[t]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,this.setState(n.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t))};n.on("beforeModeUnload",function(){n.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(h[n.mode]=this._.state)},this);n.on("mode",o,this);this.readOnly||n.on("readOnly",o,this)}else f&&(f=n.getCommand(f))&&(f.on("state",function(){this.setState(f.state)},this),l+=f.state==CKEDITOR.TRISTATE_ON?"on":f.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");if(this.directional)n.on("contentDirChanged",function(t){var i=CKEDITOR.document.getById(this._.id),r=i.getFirst(),t=t.data;t!=n.lang.dir?i.addClass("cke_"+t):i.removeClass("cke_ltr").removeClass("cke_rtl");r.setAttribute("style",CKEDITOR.skin.getIconStyle(s,"rtl"==t,this.icon,this.iconOffset))},this);return f||(l+="off"),s=o=this.name||this.command,this.icon&&!/\./.test(this.icon)&&(s=this.icon,this.icon=null),e={id:c,name:o,iconName:s,label:this.label,cls:this.className||"",state:l,title:this.title,titleJs:e.gecko&&10900<=e.version&&!e.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:y,mousedownFn:w,focusFn:p,clickFn:v,style:CKEDITOR.skin.getIconStyle(s,"rtl"==n.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow?t.output():""},i.output(e,r),this.onRender&&this.onRender(),u},setState:function(n){if(this._.state==n)return!1;this._.state=n;var t=CKEDITOR.document.getById(this._.id);return t?(t.setState(n,"cke_button"),n==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),n==CKEDITOR.TRISTATE_ON?t.setAttribute("aria-pressed",!0):t.removeAttribute("aria-pressed"),!0):!1}};CKEDITOR.ui.prototype.addButton=function(n,t){this.add(n,CKEDITOR.UI_BUTTON,t)}}(),function(){function r(t){function u(){for(var i,u,s,h,c=f(),e=CKEDITOR.tools.clone(t.config.toolbarGroups)||n(t),o=0;o<e.length;o++)if(i=e[o],"/"!=i){if("string"==typeof i&&(i=e[o]={name:i}),s=i.groups,s)for(h=0;h<s.length;h++)u=s[h],(u=c[u])&&r(i,u);(u=c[i.name])&&r(i,u)}return e}function f(){var i={},u,n,r;for(u in t.ui.items)n=t.ui.items[u],r=n.toolbar||"others",r=r.split(","),n=r[0],r=parseInt(r[1]||-1,10),i[n]||(i[n]=[]),i[n].push({name:u,order:r});for(n in i)i[n]=i[n].sort(function(n,t){return n.order==t.order?0:0>t.order?-1:0>n.order?1:n.order<t.order?-1:1});return i}function r(n,t){if(t.length){n.items?n.items.push("-"):n.items=[];for(var i;i=t.shift();)n.items.push(i.name)}}var i=t.config.toolbar;return"string"==typeof i&&(i=t.config["toolbar_"+i]),t.toolbar=i||u()}function n(n){return n._.toolbarGroups||(n._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var t=function(){this.toolbars=[];this.focusCommandExecuted=!1},i;t.prototype.focus=function(){for(var i,r,n,t=0;i=this.toolbars[t++];)for(r=0;n=i.items[r++];)if(n.focus){n.focus();return}};i={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(n){n.toolbox&&(n.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){n.toolbox.focus()},100):n.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(n){var u,f=function(t,i){var r,o="rtl"==n.lang.dir,e=n.config.toolbarGroupCycling,e=void 0===e||e;switch(i){case 9:case CKEDITOR.SHIFT+9:for(;!r||!r.items.length;)if(r=9==i?(r?r.next:t.toolbar.next)||n.toolbox.toolbars[0]:(r?r.previous:t.toolbar.previous)||n.toolbox.toolbars[n.toolbox.toolbars.length-1],r.items.length)for(t=r.items[u?r.items.length-1:0];t&&!t.focus;)(t=u?t.previous:t.next)||(r=0);return t&&t.focus(),!1;case o?37:39:case 40:r=t;do r=r.next,!r&&e&&(r=t.toolbar.items[0]);while(r&&!r.focus);return r?r.focus():f(t,9),!1;case o?39:37:case 38:r=t;do r=r.previous,!r&&e&&(r=t.toolbar.items[t.toolbar.items.length-1]);while(r&&!r.focus);return r?r.focus():(u=1,f(t,CKEDITOR.SHIFT+9),u=0),!1;case 27:return n.focus(),!1;case 13:case 32:return t.execute(),!1}return!0};n.on("uiSpace",function(i){var s,e,p,h,k,w,c,tt,a,d;if(i.data.space==n.config.toolbarLocation){n.toolbox=new t;var v=CKEDITOR.tools.getNextId(),y=n.config.removeButtons,y=y&&y.split(","),u=['<span id="',v,'" class="cke_voice_label">',n.lang.toolbar.toolbars,"<\/span>",'<span id="'+n.ui.spaceId("toolbox")+'" class="cke_toolbox" role="group" aria-labelledby="',v,'" onmousedown="return false;">'],v=!1!==n.config.toolbarStartupExpanded,o,l;n.config.toolbarCanCollapse&&n.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&u.push('<span class="cke_toolbox_main"'+(v?">":' style="display:none">'));for(var g=n.toolbox.toolbars,nt=r(n),b=0;b<nt.length;b++)if(e=0,h=nt[b],h)if(o&&(u.push("<\/span>"),l=o=0),"/"===h)u.push('<span class="cke_toolbar_break"><\/span>');else{for(k=h.items||h,w=0;w<k.length;w++)c=k[w],y&&0<=CKEDITOR.tools.indexOf(y,c)||!(c=n.ui.create(c))||(c.type==CKEDITOR.UI_SEPARATOR?l=o&&c:(tt=!1!==c.canGroup,e||(s=CKEDITOR.tools.getNextId(),e={id:s,items:[]},p=h.name&&(n.lang.toolbar.toolbarGroups[h.name]||h.name),u.push('<span id="',s,'" class="cke_toolbar"',p?' aria-labelledby="'+s+'_label"':"",' role="toolbar">'),p&&u.push('<span id="',s,'_label" class="cke_voice_label">',p,"<\/span>"),u.push('<span class="cke_toolbar_start"><\/span>'),a=g.push(e)-1,0<a&&(e.previous=g[a-1],e.previous.next=e)),tt?o||(u.push('<span class="cke_toolgroup" role="presentation">'),o=1):o&&(u.push("<\/span>"),o=0),s=function(t){t=t.render(n,u);a=e.items.push(t)-1;a>0&&(t.previous=e.items[a-1],t.previous.next=t);t.toolbar=e;t.onkey=f;t.onfocus=function(){n.toolbox.focusCommandExecuted||n.focus()}},l&&(s(l),l=0),s(c)));o&&(u.push("<\/span>"),l=o=0);e&&u.push('<span class="cke_toolbar_end"><\/span><\/span>')}if(n.config.toolbarCanCollapse&&u.push("<\/span>"),n.config.toolbarCanCollapse&&n.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){d=CKEDITOR.tools.addFunction(function(){n.execCommand("toolbarCollapse")});n.on("destroy",function(){CKEDITOR.tools.removeFunction(d)});n.addCommand("toolbarCollapse",{readOnly:1,exec:function(n){var t=n.ui.space("toolbar_collapser"),i=t.getPrevious(),r=n.ui.space("contents"),u=i.getParent(),e=parseInt(r.$.style.height,10),o=u.$.offsetHeight,f=t.hasClass("cke_toolbox_collapser_min");f?(i.show(),t.removeClass("cke_toolbox_collapser_min"),t.setAttribute("title",n.lang.toolbar.toolbarCollapse)):(i.hide(),t.addClass("cke_toolbox_collapser_min"),t.setAttribute("title",n.lang.toolbar.toolbarExpand));t.getFirst().setText(f?"▲":"◀");r.setStyle("height",e-(u.$.offsetHeight-o)+"px");n.fire("resize")},modes:{wysiwyg:1,source:1}});n.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");u.push('<a title="'+(v?n.lang.toolbar.toolbarCollapse:n.lang.toolbar.toolbarExpand)+'" id="'+n.ui.spaceId("toolbar_collapser")+'" tabIndex="-1" class="cke_toolbox_collapser');v||u.push(" cke_toolbox_collapser_min");u.push('" onclick="CKEDITOR.tools.callFunction('+d+')">','<span class="cke_arrow">&#9650;<\/span>',"<\/a>")}u.push("<\/span>");i.data.html+=u.join("")}});n.on("destroy",function(){if(this.toolbox)for(var r=0,t,u,n,i=this.toolbox.toolbars;r<i.length;r++)for(u=i[r].items,t=0;t<u.length;t++)n=u[t],n.clickFn&&CKEDITOR.tools.removeFunction(n.clickFn),n.keyDownFn&&CKEDITOR.tools.removeFunction(n.keyDownFn)});n.on("uiReady",function(){var t=n.ui.space("toolbox");t&&n.focusManager.add(t,1)});n.addCommand("toolbarFocus",i);n.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");n.ui.add("-",CKEDITOR.UI_SEPARATOR,{});n.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(n,t){return t.push('<span class="cke_toolbar_separator" role="separator"><\/span>'),{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(t,i,r){var u=n(this.editor),f=0===i,e={name:t};if(r){if(r=CKEDITOR.tools.search(u,function(n){return n.name==r})){if(r.groups||(r.groups=[]),i&&(i=CKEDITOR.tools.indexOf(r.groups,i),0<=i)){r.groups.splice(i+1,0,t);return}f?r.groups.splice(0,0,t):r.groups.push(t);return}i=null}i&&(i=CKEDITOR.tools.indexOf(u,function(n){return n.name==i}));f?u.splice(0,0,t):"number"==typeof i?u.splice(i+1,0,e):u.push(t)}}();CKEDITOR.UI_SEPARATOR="separator";CKEDITOR.config.toolbarLocation="top",function(){var r={editorFocus:!1,readOnly:1,exec:function(n){(n=CKEDITOR.document.getById(n._.elementsPath.idBase+"0"))&&n.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}},n='<span class="cke_path_empty">&nbsp;<\/span>',t="",i;(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(t+=' onkeypress="return false;"');CKEDITOR.env.gecko&&(t+=' onblur="this.style.cssText = this.style.cssText;"');i=CKEDITOR.addTemplate("pathItem",'<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"'+(CKEDITOR.env.gecko&&10900>CKEDITOR.env.version?' onfocus="event.preventBubble();"':"")+t+' hidefocus="true"  onkeydown="return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick="CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role="button" aria-label="{label}">{text}<\/a>');CKEDITOR.plugins.add("elementspath",{init:function(t){function o(n){if(t.focus(),n=t._.elementsPath.list[n],n.equals(t.editable())){var i=t.createRange();i.selectNodeContents(n);i.select()}else t.getSelection().selectElement(n)}function s(){f&&f.setHtml(n);delete t._.elementsPath.list}var u,f,e,h,c;if(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){u=t.ui.spaceId("path");e="cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_";t._.elementsPath={idBase:e,filters:[]};t.on("uiSpace",function(i){"bottom"==i.data.space&&(i.data.html+='<span id="'+u+'_label" class="cke_voice_label">'+t.lang.elementspath.eleLabel+'<\/span><span id="'+u+'" class="cke_path" role="group" aria-labelledby="'+u+'_label">'+n+"<\/span>")});t.on("uiReady",function(){var n=t.ui.space("path");n&&t.focusManager.add(n,1)});h=CKEDITOR.tools.addFunction(o);c=CKEDITOR.tools.addFunction(function(n,i){var u=t._.elementsPath.idBase,r,i=new CKEDITOR.dom.event(i);r="rtl"==t.lang.dir;switch(i.getKeystroke()){case r?39:37:case 9:return(r=CKEDITOR.document.getById(u+(n+1)))||(r=CKEDITOR.document.getById(u+"0")),r.focus(),!1;case r?37:39:case CKEDITOR.SHIFT+9:return(r=CKEDITOR.document.getById(u+(n-1)))||(r=CKEDITOR.document.getById(u+(t._.elementsPath.list.length-1))),r.focus(),!1;case 27:return t.focus(),!1;case 13:case 32:return o(n),!1}return!0});t.on("selectionChange",function(r){for(var l,s,a,y,v=t.editable(),o=r.data.selection.getStartElement(),r=[],w=t._.elementsPath.list=[],p=t._.elementsPath.filters;o;){for(l=0,s=o.data("cke-display-name")?o.data("cke-display-name"):o.data("cke-real-element-type")?o.data("cke-real-element-type"):o.getName(),a=0;a<p.length;a++){if(y=p[a](o,s),!1===y){l=1;break}s=y||s}if(l||(l=w.push(o)-1,a=t.lang.elementspath.eleTitle.replace(/%1/,s),s=i.output({id:e+l,label:a,text:s,jsTitle:"javascript:void('"+s+"')",index:l,keyDownFn:c,clickFn:h}),r.unshift(s)),o.equals(v))break;o=o.getParent()}f||(f=CKEDITOR.document.getById(u));v=f;v.setHtml(r.join("")+n);t.fire("elementsPathUpdate",{space:v})});t.on("readOnly",s);t.on("contentDomUnload",s);t.addCommand("elementsPathFocus",r);t.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}}})}(),function(){function l(n,t,i){function c(i){!(o=s[i?"getFirst":"getLast"]())||o.is&&o.isBlockBoundary()||!(h=t.root[i?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||h.is&&h.isBlockBoundary({br:1})||n.document.createElement("br")[i?"insertBefore":"insertAfter"](o)}for(var u,s,o,h,f=CKEDITOR.plugins.list.listToArray(t.root,i),e=[],r=0;r<t.contents.length;r++)u=t.contents[r],(u=u.getAscendant("li",!0))&&!u.getCustomData("list_item_processed")&&(e.push(u),CKEDITOR.dom.element.setMarker(i,u,"list_item_processed",!0));for(u=null,r=0;r<e.length;r++)u=e[r].getCustomData("listarray_index"),f[u].indent=-1;for(r=u+1;r<f.length;r++)if(f[r].indent>f[r-1].indent+1){for(e=f[r-1].indent+1-f[r].indent,u=f[r].indent;f[r]&&f[r].indent>=u;)f[r].indent+=e,r++;r--}s=CKEDITOR.plugins.list.arrayToList(f,i,null,n.config.enterMode,t.root.getAttribute("dir")).listNode;c(!0);c();s.replace(t.root)}function u(n,t){this.name=n;this.context=this.type=t}function e(n,t,i,r){for(var u,f;u=n[r?"getLast":"getFirst"](c);)(f=u.getDirection(1))!==t.getDirection(1)&&u.setAttribute("dir",f),u.remove(),i?u[r?"insertBefore":"insertAfter"](i):t.append(u,r)}function o(t){var i;(i=function(i){var r=t[i?"getPrevious":"getNext"](n);r&&r.type==CKEDITOR.NODE_ELEMENT&&r.is(t.getName())&&(e(t,r,null,!i),t.remove(),t=r)})();i(1)}function s(n){return n.type==CKEDITOR.NODE_ELEMENT&&(n.getName()in CKEDITOR.dtd.$block||n.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[n.getName()]["#"]}function f(t,u,f){var s;t.fire("saveSnapshot");f.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);s=f.extractContents();u.trim(!1,!0);var v=u.createBookmark(),c=new CKEDITOR.dom.elementPath(u.startContainer),h=c.block,c=c.lastElement.getAscendant("li",1)||h,l=new CKEDITOR.dom.elementPath(f.startContainer),a=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);for(h?(h=h.getBogus())&&h.remove():l&&(h=l.getPrevious(n))&&r(h)&&h.remove(),(h=s.getLast())&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("br")&&h.remove(),(h=u.startContainer.getChild(u.startOffset))?s.insertBefore(h):u.startContainer.append(s),a&&(s=i(a))&&(c.contains(a)?(e(s,a.getParent(),a),s.remove()):c.append(s));f.checkStartOfBlock()&&f.checkEndOfBlock();)l=f.startPath(),s=l.block,s.is("li")&&(c=s.getParent(),s.equals(c.getLast(n))&&s.equals(c.getFirst(n))&&(s=c)),f.moveToPosition(s,CKEDITOR.POSITION_BEFORE_START),s.remove();f=f.clone();s=t.editable();f.setEndAt(s,CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.evaluator=function(t){return n(t)&&!r(t)};(f=f.next())&&f.type==CKEDITOR.NODE_ELEMENT&&f.getName()in CKEDITOR.dtd.$list&&o(f);u.moveToBookmark(v);u.select();t.fire("saveSnapshot")}function i(i){return(i=i.getLast(n))&&i.type==CKEDITOR.NODE_ELEMENT&&i.getName()in t?i:null}var t={ol:1,ul:1},a=CKEDITOR.dom.walker.whitespaces(),v=CKEDITOR.dom.walker.bookmark(),n=function(n){return!(a(n)||v(n))},r=CKEDITOR.dom.walker.bogus(),h,c;CKEDITOR.plugins.list={listToArray:function(n,i,r,u,f){var h,l,o,e,c,a,s;if(!t[n.getName()])return[];for(u||(u=0),r||(r=[]),h=0,l=n.getChildCount();h<l;h++)if(o=n.getChild(h),o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(o,i,r,u+1),"li"==o.$.nodeName.toLowerCase())for(e={parent:n,indent:u,element:o,contents:[]},f?e.grandparent=f:(e.grandparent=n.getParent(),e.grandparent&&"li"==e.grandparent.$.nodeName.toLowerCase()&&(e.grandparent=e.grandparent.getParent())),i&&CKEDITOR.dom.element.setMarker(i,o,"listarray_index",r.length),r.push(e),c=0,a=o.getChildCount();c<a;c++)s=o.getChild(c),s.type==CKEDITOR.NODE_ELEMENT&&t[s.getName()]?CKEDITOR.plugins.list.listToArray(s,i,r,u+1,e.grandparent):e.contents.push(s);return r},arrayToList:function(i,r,u,f,e){var l,nt,tt;if(u||(u=0),!i||i.length<u+1)return null;for(var c,y=i[u].parent.getDocument(),b=new CKEDITOR.dom.documentFragment(y),a=null,h=u,k=Math.max(i[u].indent,0),s=null,o,v,it=f==CKEDITOR.ENTER_P?"p":"div";;){if(l=i[h],c=l.grandparent,o=l.element.getDirection(1),l.indent==k){for(a&&i[h].parent.getName()==a.getName()||(a=i[h].parent.clone(!1,1),e&&a.setAttribute("dir",e),b.append(a)),s=a.append(l.element.clone(0,1)),o!=a.getDirection(1)&&s.setAttribute("dir",o),c=0;c<l.contents.length;c++)s.append(l.contents[c].clone(1,1));h++}else if(l.indent==Math.max(k,0)+1)v=i[h-1].element.getDirection(1),h=CKEDITOR.plugins.list.arrayToList(i,null,h,f,v!=o?o:null),!s.getChildCount()&&CKEDITOR.env.ie&&!(7<y.$.documentMode)&&s.append(y.createText(" ")),s.append(h.listNode),h=h.nextIndex;else if(-1==l.indent&&!u&&c){t[c.getName()]?(s=l.element.clone(!1,!0),o!=c.getDirection(1)&&s.setAttribute("dir",o)):s=new CKEDITOR.dom.documentFragment(y);var a=c.getDirection(1)!=o,d=l.element,w=d.getAttribute("class"),g=d.getAttribute("style"),rt=s.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(f!=CKEDITOR.ENTER_BR||a||g||w),p,ut=l.contents.length;for(c=0;c<ut;c++)p=l.contents[c],p.type==CKEDITOR.NODE_ELEMENT&&p.isBlockBoundary()?(a&&!p.getDirection()&&p.setAttribute("dir",o),nt=p,tt=d.getAttribute("style"),tt&&nt.setAttribute("style",tt.replace(/([^;])$/,"$1;")+(nt.getAttribute("style")||"")),w&&p.addClass(w)):rt&&(v||(v=y.createElement(it),a&&v.setAttribute("dir",o)),g&&v.setAttribute("style",g),w&&v.setAttribute("class",w),v.append(p.clone(1,1))),s.append(v||p.clone(1,1));s.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&h!=i.length-1&&((o=s.getLast())&&o.type==CKEDITOR.NODE_ELEMENT&&"_moz"==o.getAttribute("type")&&o.remove(),(!s.getLast(n)||!(o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in CKEDITOR.dtd.$block))&&s.append(y.createElement("br")));o=s.$.nodeName.toLowerCase();CKEDITOR.env.ie||"div"!=o&&"p"!=o||s.appendBogus();b.append(s);a=null;h++}else return null;if(v=null,i.length<=h||Math.max(i[h].indent,0)<k)break}if(r)for(i=b.getFirst();i;){if(i.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(r,i),i.getName()in CKEDITOR.dtd.$listItem&&(u=i,y=e=f=void 0,f=u.getDirection()))){for(e=u.getParent();e&&!(y=e.getDirection());)e=e.getParent();f==y&&u.removeAttribute("dir")}i=i.getNextSourceNode()}return{listNode:b,nextIndex:h}}};h=/^h[1-6]$/;c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);u.prototype={exec:function(i){var b,u,g,v;this.refresh(i,i.elementPath());var k=i.config,nt=i.getSelection(),a=nt&&nt.getRanges(!0);this.state==CKEDITOR.TRISTATE_OFF&&(b=i.editable(),b.getFirst(n)?(u=1==a.length&&a[0],(k=u&&u.getEnclosedNode())&&k.is&&this.type==k.getName()&&this.setState(CKEDITOR.TRISTATE_ON)):(k.enterMode==CKEDITOR.ENTER_BR?b.appendBogus():a[0].fixBlock(1,k.enterMode==CKEDITOR.ENTER_P?"p":"div"),nt.selectRanges(a)));for(var k=nt.createBookmarks(!0),b=[],d={},a=a.createIterator(),y=0;(u=a.getNextRange())&&++y;){var f=u.getBoundaryNodes(),r=f.startNode,c=f.endNode;for(r.type==CKEDITOR.NODE_ELEMENT&&"td"==r.getName()&&u.setStartAt(f.startNode,CKEDITOR.POSITION_AFTER_START),c.type==CKEDITOR.NODE_ELEMENT&&"td"==c.getName()&&u.setEndAt(f.endNode,CKEDITOR.POSITION_BEFORE_END),u=u.createIterator(),u.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;f=u.getNextParagraph();)if(!f.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(d,f,"list_block",1);for(var s=i.elementPath(f),r=s.elements,c=0,s=s.blockLimit,w,e=r.length-1;0<=e&&(w=r[e]);e--)if(t[w.getName()]&&s.contains(w)){s.removeCustomData("list_group_object_"+y);(r=w.getCustomData("list_group_object"))?r.contents.push(f):(r={root:w,contents:[f]},b.push(r),CKEDITOR.dom.element.setMarker(d,w,"list_group_object",r));c=1;break}c||(c=s,c.getCustomData("list_group_object_"+y)?c.getCustomData("list_group_object_"+y).contents.push(f):(r={root:c,contents:[f]},CKEDITOR.dom.element.setMarker(d,c,"list_group_object_"+y,r),b.push(r)))}}for(w=[];0<b.length;)if(r=b.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(t[r.root.getName()]){for(f=i,a=r,r=d,y=w,c=CKEDITOR.plugins.list.listToArray(a.root,r),s=[],u=0;u<a.contents.length;u++)(e=a.contents[u],(e=e.getAscendant("li",!0))&&!e.getCustomData("list_item_processed"))&&(s.push(e),CKEDITOR.dom.element.setMarker(r,e,"list_item_processed",!0));for(var e=a.root.getDocument(),v=void 0,p=void 0,u=0;u<s.length;u++)g=s[u].getCustomData("listarray_index"),v=c[g].parent,v.is(this.type)||(p=e.createElement(this.type),v.copyAttributes(p,{start:1,type:1}),p.removeStyle("list-style-type"),c[g].parent=p);for(f=CKEDITOR.plugins.list.arrayToList(c,r,null,f.config.enterMode),r=void 0,c=f.listNode.getChildCount(),u=0;u<c&&(r=f.listNode.getChild(u));u++)r.getName()==this.type&&y.push(r);f.listNode.replace(a.root)}else{for(c=i,f=r,u=w,s=f.contents,a=f.root.getDocument(),y=[],1==s.length&&s[0].equals(f.root)&&(r=a.createElement("div"),s[0].moveChildren&&s[0].moveChildren(r),s[0].append(r),s[0]=r),f=f.contents[0].getParent(),e=0;e<s.length;e++)f=f.getCommonAncestor(s[e].getParent());for(v=c.config.useComputedState,c=r=void 0,v=void 0===v||v,e=0;e<s.length;e++)for(p=s[e];g=p.getParent();){if(g.equals(f)){y.push(p);!c&&p.getDirection()&&(c=1);p=p.getDirection(v);null!==r&&(r=r&&r!=p?null:p);break}p=g}if(!(1>y.length)){for(s=y[y.length-1].getNext(),e=a.createElement(this.type),u.push(e),v=u=void 0;y.length;)u=y.shift(),v=a.createElement("li"),u.is("pre")||h.test(u.getName())?u.appendTo(v):(u.copyAttributes(v),r&&u.getDirection()&&(v.removeStyle("direction"),v.removeAttribute("dir")),u.moveChildren(v),u.remove()),v.appendTo(e);r&&c&&e.setAttribute("dir",r);s?e.insertBefore(s):e.appendTo(f)}}else this.state==CKEDITOR.TRISTATE_ON&&t[r.root.getName()]&&l.call(this,i,r,d);for(e=0;e<w.length;e++)o(w[e]);CKEDITOR.dom.element.clearAllMarkers(d);nt.selectBookmarks(k);i.focus()},refresh:function(n,i){var r=i.contains(t,1),u=i.blockLimit||i.root;r&&u.contains(r)?this.setState(r.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{init:function(e){e.blockless||(e.addCommand("numberedlist",new u("numberedlist","ol")),e.addCommand("bulletedlist",new u("bulletedlist","ul")),e.ui.addButton&&(e.ui.addButton("NumberedList",{label:e.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),e.ui.addButton("BulletedList",{label:e.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),e.on("key",function(u){var a=u.data.keyCode,h,v,o,c;if(e.mode=="wysiwyg"&&a in{8:1,46:1}&&(h=e.getSelection().getRanges()[0],v=h.startPath(),h.collapsed)){var v=new CKEDITOR.dom.elementPath(h.startContainer),p=a==8,y=e.editable(),l=new CKEDITOR.dom.walker(h.clone());l.evaluator=function(t){return n(t)&&!r(t)};l.guard=function(n,t){return!(t&&n.type==CKEDITOR.NODE_ELEMENT&&n.is("table"))};a=h.clone();p?((o=v.contains(t))&&h.checkBoundaryOfElement(o,CKEDITOR.START)&&(o=o.getParent())&&o.is("li")&&(o=i(o))?(c=o,o=o.getPrevious(n),a.moveToPosition(o&&r(o)?o:c,CKEDITOR.POSITION_BEFORE_START)):(l.range.setStartAt(y,CKEDITOR.POSITION_AFTER_START),l.range.setEnd(h.startContainer,h.startOffset),(o=l.previous())&&o.type==CKEDITOR.NODE_ELEMENT&&(o.getName()in t||o.is("li"))&&(o.is("li")||(l.range.selectNodeContents(o),l.reset(),l.evaluator=s,o=l.previous()),c=o,a.moveToElementEditEnd(c))),c?(f(e,a,h),u.cancel()):(a=v.contains(t))&&h.checkBoundaryOfElement(a,CKEDITOR.START)&&(c=a.getFirst(n),h.checkBoundaryOfElement(c,CKEDITOR.START)&&(o=a.getPrevious(n),i(c)?o&&(h.moveToElementEditEnd(o),h.select()):e.execCommand("outdent"),u.cancel()))):(c=v.contains("li"))?(l.range.setEndAt(y,CKEDITOR.POSITION_BEFORE_END),y=(v=c.getLast(n))&&s(v)?v:c,c=0,(o=l.next())&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in t&&o.equals(v)?(c=1,o=l.next()):h.checkBoundaryOfElement(y,CKEDITOR.END)&&(c=1),c&&o&&(h=h.clone(),h.moveToElementEditStart(o),f(e,a,h),u.cancel())):(l.range.setEndAt(y,CKEDITOR.POSITION_BEFORE_END),(o=l.next())&&o.type==CKEDITOR.NODE_ELEMENT&&o.is(t)&&(o=o.getFirst(n),v.block&&h.checkStartOfBlock()&&h.checkEndOfBlock()?(v.block.remove(),h.moveToElementEditStart(o),h.select()):i(o)?(h.moveToElementEditStart(o),h.select()):(h=h.clone(),h.moveToElementEditStart(o),f(e,a,h)),u.cancel()));setTimeout(function(){e.selectionChange(1)})}}))}})}(),function(){function i(n,t){if(this.name=t,this.useIndentClasses=n.config.indentClasses&&0<n.config.indentClasses.length){this.classNameRegex=RegExp("(?:^|\\s+)("+n.config.indentClasses.join("|")+")(?=$|\\s)");this.indentClassMap={};for(var i=0;i<n.config.indentClasses.length;i++)this.indentClassMap[n.config.indentClasses[i]]=i+1}this.startDisabled="outdent"==t}function r(n,t){return"ltr"==(t||n.getComputedStyle("direction"))?"margin-left":"margin-right"}function t(n){return n.type==CKEDITOR.NODE_ELEMENT&&n.is("li")}var n={ol:1,ul:1},u=CKEDITOR.dom.walker.whitespaces(!0),f=CKEDITOR.dom.walker.bookmark(!1,!0);i.prototype={context:"p",refresh:function(t,i){var u=i&&i.contains(n),f=i.block||i.blockLimit;u?this.setState(CKEDITOR.TRISTATE_OFF):!this.useIndentClasses&&"indent"==this.name?this.setState(CKEDITOR.TRISTATE_OFF):f?this.useIndentClasses?(u=f.$.className.match(this.classNameRegex),f=0,u&&(u=u[1],f=this.indentClassMap[u]),"outdent"==this.name&&!f||"indent"==this.name&&f==t.config.indentClasses.length?this.setState(CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_OFF)):(u=parseInt(f.getStyle(r(f)),10),isNaN(u)&&(u=0),0>=u?this.setState(CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_OFF)):this.setState(CKEDITOR.TRISTATE_DISABLED)},exec:function(i){function y(t){for(var y,p,o=e.startContainer,r=e.endContainer;o&&!o.getParent().equals(t);)o=o.getParent();for(;r&&!r.getParent().equals(t);)r=r.getParent();if(o&&r){for(var s=o,o=[],l=!1;!l;)s.equals(r)&&(l=!0),o.push(s),s=s.getNext();if(!(1>o.length)){for(s=t.getParents(!0),r=0;r<s.length;r++)if(s[r].getName&&n[s[r].getName()]){t=s[r];break}for(var s="indent"==h.name?1:-1,r=o[0],o=o[o.length-1],l=CKEDITOR.plugins.list.listToArray(t,c),w=l[o.getCustomData("listarray_index")].indent,r=r.getCustomData("listarray_index");r<=o.getCustomData("listarray_index");r++)(l[r].indent+=s,0<s)&&(y=l[r].parent,l[r].parent=new CKEDITOR.dom.element(y.getName(),y.getDocument()));for(r=o.getCustomData("listarray_index")+1;r<l.length&&l[r].indent>w;r++)l[r].indent+=s;if(o=CKEDITOR.plugins.list.arrayToList(l,c,null,i.config.enterMode,t.getDirection()),"outdent"==h.name&&(p=t.getParent())&&p.is("li"))for(var s=o.listNode.getChildren(),v=[],a,r=s.count()-1;0<=r;r--)(a=s.getItem(r))&&a.is&&a.is("li")&&v.push(a);if(o&&o.listNode.replace(t),v&&v.length)for(r=0;r<v.length;r++){for(a=t=v[r];(a=a.getNext())&&a.is&&a.getName()in n;)CKEDITOR.env.ie&&!t.getFirst(function(n){return u(n)&&f(n)})&&t.append(e.document.createText(" ")),t.append(a);t.insertAfter(p)}}}}function p(){var n=e.createIterator(),t=i.config.enterMode,r;for(n.enforceRealBlocks=!0,n.enlargeBr=t!=CKEDITOR.ENTER_BR;r=n.getNextParagraph(t==CKEDITOR.ENTER_P?"p":"div");)a(r)}function a(n,t){var f,e,u;if(n.getCustomData("indent_processed"))return!1;if(h.useIndentClasses){if(f=n.$.className.match(h.classNameRegex),u=0,f&&(f=f[1],u=h.indentClassMap[f]),"outdent"==h.name?u--:u++,0>u)return!1;u=Math.min(u,i.config.indentClasses.length);u=Math.max(u,0);n.$.className=CKEDITOR.tools.ltrim(n.$.className.replace(h.classNameRegex,""));0<u&&n.addClass(i.config.indentClasses[u-1])}else{if(f=r(n,t),u=parseInt(n.getStyle(f),10),isNaN(u)&&(u=0),e=i.config.indentOffset||40,u=u+("indent"==h.name?1:-1)*e,0>u)return!1;u=Math.max(u,0);u=Math.ceil(u/e)*e;n.setStyle(f,u?u+(i.config.indentUnit||"px"):"");""===n.getAttribute("style")&&n.removeAttribute("style")}return CKEDITOR.dom.element.setMarker(c,n,"indent_processed",1),!0}for(var s,o,h=this,c={},l=i.getSelection(),w=l.createBookmarks(1),e,b=(l&&l.getRanges(1)).createIterator();e=b.getNextRange();){for(s=e.getCommonAncestor();s&&!(s.type==CKEDITOR.NODE_ELEMENT&&n[s.getName()]);)s=s.getParent();if(s||(o=e.getEnclosedNode(),o&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in n&&(e.setStartAt(o,CKEDITOR.POSITION_AFTER_START),e.setEndAt(o,CKEDITOR.POSITION_BEFORE_END),s=o)),s&&e.startContainer.type==CKEDITOR.NODE_ELEMENT&&e.startContainer.getName()in n&&(o=new CKEDITOR.dom.walker(e),o.evaluator=t,e.startContainer=o.next()),s&&e.endContainer.type==CKEDITOR.NODE_ELEMENT&&e.endContainer.getName()in n&&(o=new CKEDITOR.dom.walker(e),o.evaluator=t,e.endContainer=o.previous()),s){var o=s.getFirst(t),k=!!o.getNext(t),v=e.startContainer;(o.equals(v)||o.contains(v))&&("indent"==h.name||h.useIndentClasses||parseInt(s.getStyle(r(s)),10))&&a(s,!k&&o.getDirection())||y(s)}else p()}CKEDITOR.dom.element.clearAllMarkers(c);i.forceNextSelectionCheck();l.selectBookmarks(w)}};CKEDITOR.plugins.add("indent",{requires:"list",onLoad:function(){(CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat)&&CKEDITOR.addCss(".cke_editable ul,.cke_editable ol{\tmargin-left: 0px;\tpadding-left: 40px;}")},init:function(n){n.blockless||(n.addCommand("indent",new i(n,"indent")),n.addCommand("outdent",new i(n,"outdent")),n.ui.addButton&&(n.ui.addButton("Indent",{label:n.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),n.ui.addButton("Outdent",{label:n.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"})),n.on("dirChanged",function(t){var e=n.createRange(),o,i,r,u,f;for(e.setStartBefore(t.data.node),e.setEndAfter(t.data.node),o=new CKEDITOR.dom.walker(e);i=o.next();)if(i.type==CKEDITOR.NODE_ELEMENT)if(!i.equals(t.data.node)&&i.getDirection())e.setStartAfter(i),o=new CKEDITOR.dom.walker(e);else{if(r=n.config.indentClasses,r)for(u=t.data.dir=="ltr"?["_rtl",""]:["","_rtl"],f=0;f<r.length;f++)i.hasClass(r[f]+u[0])&&(i.removeClass(r[f]+u[0]),i.addClass(r[f]+u[1]));r=i.getStyle("margin-right");u=i.getStyle("margin-left");r?i.setStyle("margin-left",r):i.removeStyle("margin-left");u?i.setStyle("margin-right",u):i.removeStyle("margin-right")}}))}})}(),function(){function n(n,t,i){return(i=n.config.forceEnterMode||i,"wysiwyg"!=n.mode)?!1:(t||(t=n.config.enterMode),n.elementPath().isContextFor("p")||(t=CKEDITOR.ENTER_BR,i=1),n.fire("saveSnapshot"),t==CKEDITOR.ENTER_BR?f(n,t,null,i):e(n,t,null,i),n.fire("saveSnapshot"),!0)}function t(n){for(var n=n.getSelection().getRanges(!0),t=n.length-1;0<t;t--)n[t].deleteContents();return n[0]}var i,r;CKEDITOR.plugins.add("enterkey",{requires:"indent",init:function(t){t.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){n(t)}});t.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){"wysiwyg"==t.mode&&n(t,t.config.shiftEnterMode,1)}});t.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});i=CKEDITOR.dom.walker.whitespaces();r=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(n,u,e,s){var c,y,h,a;if(e=e||t(n)){var v=e.document,w=e.checkStartOfBlock(),p=e.checkEndOfBlock(),c=n.elementPath(e.startContainer).block;if(w&&p){if(c&&(c.is("li")||c.getParent().is("li"))){n.execCommand("outdent");return}if(c&&c.getParent().is("blockquote")){c.breakParent(c.getParent());c.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||c.getPrevious().remove();c.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||c.getNext().remove();e.moveToElementEditStart(c);e.select();return}}else if(c&&c.is("pre")&&!p){f(n,u,e,s);return}if(c=u==CKEDITOR.ENTER_DIV?"div":"p",y=e.splitBlock(c),y){var u=y.previousBlock,n=y.nextBlock,w=y.wasStartOfBlock,p=y.wasEndOfBlock,l;if(n?(l=n.getParent(),l.is("li")&&(n.breakParent(l),n.move(n.getNext(),1))):u&&(l=u.getParent())&&l.is("li")&&(u.breakParent(l),l=u.getNext(),e.moveToElementEditStart(l),u.move(u.getPrevious())),w||p){if(u?!u.is("li")&&(o.test(u.getName())||u.is("pre"))||(h=u.clone()):n&&(h=n.clone()),h?s&&!h.is("li")&&h.renameNode(c):l&&l.is("li")?h=l:(h=v.createElement(c),u&&(a=u.getDirection())&&h.setAttribute("dir",a)),v=y.elementPath)for(s=0,l=v.elements.length;s<l;s++){if(a=v.elements[s],a.equals(v.block)||a.equals(v.blockLimit))break;CKEDITOR.dtd.$removeEmpty[a.getName()]&&(a=a.clone(),h.moveChildren(a),h.append(a))}CKEDITOR.env.ie||h.appendBogus();h.getParent()||e.insertNode(h);h.is("li")&&h.removeAttribute("value");CKEDITOR.env.ie&&w&&(!p||!u.getChildCount())&&(e.moveToElementEditStart(p?u:h),e.select());e.moveToElementEditStart(w&&!p?n:h)}else n.is("li")&&(h=e.clone(),h.selectNodeContents(n),h=new CKEDITOR.dom.walker(h),h.evaluator=function(n){return!(r(n)||i(n)||n.type==CKEDITOR.NODE_ELEMENT&&n.getName()in CKEDITOR.dtd.$inline&&!(n.getName()in CKEDITOR.dtd.$empty))},(l=h.next())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("ul","ol")&&(CKEDITOR.env.ie?v.createText(" "):v.createElement("br")).insertBefore(l)),n&&e.moveToElementEditStart(n);e.select();e.scrollIntoView()}}},enterBr:function(n,i,r,u){if(r=r||t(n)){var s=r.document,c=r.checkEndOfBlock(),h=new CKEDITOR.dom.elementPath(n.getSelection().getStartElement()),f=h.block,h=f&&h.block.getName();!u&&"li"==h?e(n,i,r,u):(!u&&c&&o.test(h)?(c=f.getDirection())?(s=s.createElement("div"),s.setAttribute("dir",c),s.insertAfter(f),r.setStart(s,0)):(s.createElement("br").insertAfter(f),CKEDITOR.env.gecko&&s.createText("").insertAfter(f),r.setStartAt(f.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(f="pre"==h&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?s.createText("\r"):s.createElement("br"),r.deleteContents(),r.insertNode(f),CKEDITOR.env.ie?r.setStartAt(f,CKEDITOR.POSITION_AFTER_END):(s.createText("﻿").insertAfter(f),c&&f.getParent().appendBogus(),f.getNext().$.nodeValue="",r.setStartAt(f.getNext(),CKEDITOR.POSITION_AFTER_START))),r.collapse(!0),r.select(),r.scrollIntoView())}}};var u=CKEDITOR.plugins.enterkey,f=u.enterBr,e=u.enterBlock,o=/^h[1-6]$/}(),function(){function n(n,t){var r={},u=[],o={nbsp:" ",shy:"­",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},n=n.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(n,i){var f=t?"&"+i+";":o[i];return r[f]=t?o[i]:"&"+i+";",u.push(f),""}),i,f,e;if(!t&&n)for(n=n.split(","),i=document.createElement("div"),i.innerHTML="&"+n.join(";&")+";",f=i.innerHTML,i=null,i=0;i<f.length;i++)e=f.charAt(i),r[e]="&"+n[i]+";",u.push(e);return r.regex=u.join(t?"|":""),r}CKEDITOR.plugins.add("entities",{afterInit:function(t){var i=t.config,r,u,f;if(t=(t=t.dataProcessor)&&t.htmlFilter){r=[];!1!==i.basicEntities&&r.push("nbsp,gt,lt,amp");i.entities&&(r.length&&r.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),i.entities_latin&&r.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"),i.entities_greek&&r.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"),i.entities_additional&&r.push(i.entities_additional));u=n(r.join(","));f=u.regex?"["+u.regex+"]":"a^";delete u.regex;i.entities&&i.entities_processNumerical&&(f="[^ -~]|"+f);var f=RegExp(f,"g"),o=function(n){return i.entities_processNumerical=="force"||!u[n]?"&#"+n.charCodeAt(0)+";":u[n]},e=n("nbsp,gt,lt,amp,shy",!0),s=RegExp(e.regex,"g"),h=function(n){return e[n]};t.addRules({text:function(n){return n.replace(s,h).replace(f,o)}})}}})}();CKEDITOR.config.basicEntities=!0;CKEDITOR.config.entities=!0;CKEDITOR.config.entities_latin=!0;CKEDITOR.config.entities_greek=!0;CKEDITOR.config.entities_additional="#39";CKEDITOR.plugins.add("popup");CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(n,t,i,r){t=t||"80%";i=i||"70%";"string"==typeof t&&1<t.length&&"%"==t.substr(t.length-1,1)&&(t=parseInt(window.screen.width*parseInt(t,10)/100,10));"string"==typeof i&&1<i.length&&"%"==i.substr(i.length-1,1)&&(i=parseInt(window.screen.height*parseInt(i,10)/100,10));640>t&&(t=640);420>i&&(i=420);var f=parseInt((window.screen.height-i)/2,10),e=parseInt((window.screen.width-t)/2,10),r=(r||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+t+",height="+i+",top="+f+",left="+e,u=window.open("",null,r,!0);if(!u)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(u.moveTo(e,f),u.resizeTo(t,i));u.focus();u.location.href=n}catch(o){window.open(n,null,r,!0)}return!0}}),function(){function t(n,t){var r=[],i;if(t)for(i in t)r.push(i+"="+encodeURIComponent(t[i]));else return n;return n+(-1!=n.indexOf("?")?"&":"?")+r.join("&")}function n(n){return n+="",n.charAt(0).toUpperCase()+n.substr(1)}function u(){var u=this.getDialog(),i=u.getParentEditor();i._.filebrowserSe=this;var f=i.config["filebrowser"+n(u.getName())+"WindowWidth"]||i.config.filebrowserWindowWidth||"80%",u=i.config["filebrowser"+n(u.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=t(this.filebrowser.url,r);i.popup(r,f,u,i.config.filebrowserWindowFeatures||i.config.fileBrowserWindowFeatures)}function f(){var n=this.getDialog();return n.getParentEditor()._.filebrowserSe=this,!n.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value||!n.getContentElement(this["for"][0],this["for"][1]).getAction()?!1:!0}function e(n,i,r){var u=r.params||{};u.CKEditor=n.name;u.CKEditorFuncNum=n._.filebrowserFn;u.langCode||(u.langCode=n.langCode);i.action=t(r.url,u);i.filebrowser=r}function i(t,r,o,s){var h,a,c,l;for(a in s)(h=s[a],("hbox"==h.type||"vbox"==h.type||"fieldset"==h.type)&&i(t,r,o,h.children),h.filebrowser)&&(("string"==typeof h.filebrowser&&(h.filebrowser={action:"fileButton"==h.type?"QuickUpload":"Browse",target:h.filebrowser}),"Browse"==h.filebrowser.action)?(c=h.filebrowser.url,void 0===c&&(c=t.config["filebrowser"+n(r)+"BrowseUrl"],void 0===c&&(c=t.config.filebrowserBrowseUrl)),c&&(h.onClick=u,h.filebrowser.url=c,h.hidden=!1)):"QuickUpload"==h.filebrowser.action&&h["for"]&&(c=h.filebrowser.url,void 0===c&&(c=t.config["filebrowser"+n(r)+"UploadUrl"],void 0===c&&(c=t.config.filebrowserUploadUrl)),c)&&(l=h.onClick,h.onClick=function(n){var t=n.sender;return l&&l.call(t,n)===!1?!1:f.call(t,n)},h.filebrowser.url=c,h.hidden=!1,e(t,o.getContents(h["for"][0]).get(h["for"][1]),h.filebrowser)))}function r(n,t,i){if(-1!==i.indexOf(";")){for(var i=i.split(";"),u=0;u<i.length;u++)if(r(n,t,i[u]))return!0;return!1}return(n=n.getContents(t).get(i).filebrowser)&&n.url}function o(n,t){var r=this._.filebrowserSe.getDialog(),i=this._.filebrowserSe["for"],u=this._.filebrowserSe.filebrowser.onSelect;i&&r.getContentElement(i[0],i[1]).reset();"function"==typeof t&&!1===t.call(this._.filebrowserSe)||u&&!1===u.call(this._.filebrowserSe,n,t)||!("string"==typeof t&&t&&alert(t),n&&(i=this._.filebrowserSe,r=i.getDialog(),i=i.filebrowser.target||null))||(i=i.split(":"),u=r.getContentElement(i[0],i[1]))&&(u.setValue(n),r.selectPage(i[0]))}CKEDITOR.plugins.add("filebrowser",{requires:"popup",init:function(n){n._.filebrowserFn=CKEDITOR.tools.addFunction(o,n);n.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",function(n){var u=n.data.definition,t;for(var f in u.contents)(t=u.contents[f])&&(i(n.editor,n.data.name,u,t.elements),t.hidden&&t.filebrowser&&(t.hidden=!r(u,t.id,t.filebrowser)))})}(),function(){function i(t){var i="left"==t?"pageXOffset":"pageYOffset";return i in n.$?n.$[i]:CKEDITOR.document.$.documentElement["left"==t?"scrollLeft":"scrollTop"]}function r(r){var e,s=r.config,a=s.floatSpaceDockedOffsetX||0,h=s.floatSpaceDockedOffsetY||0,v=s.floatSpacePinnedOffsetX||0,c=s.floatSpacePinnedOffsetY||0,o=function(u){function k(n,i,r){f.setStyle(i,t(r));f.setStyle("position",n)}function y(n){var t=d.getDocumentPosition();switch(n){case"top":k("absolute","top",t.y-w-h);break;case"pin":k("fixed","top",c);break;case"bottom":k("absolute","top",t.y+(s.height||s.bottom-s.top)+h)}e=n}"focus"==u.name&&f.show();f.removeStyle("left");f.removeStyle("right");var d=r.editable(),p=f.getClientRect(),s=d.getClientRect(),w=p.height,g=i("left");if(e){"top"==e&&p.top<c?y("pin"):"pin"==e?s.top>h+w?y("top"):s.bottom-p.bottom<w&&y("bottom"):"bottom"==e&&(s.top>h+w?y("top"):s.bottom>2*w+c&&y("pin"));var u=n.getViewPaneSize(),l=u.width/2,l=0<s.left&&s.right<u.width&&s.width>p.width?"rtl"==r.config.contentsLangDirection?"right":"left":l-s.left>s.right-l?"left":"right",b;p.width>u.width?(l="left",b=0):(b="left"==l?0<s.left?s.left:0:s.right<u.width?u.width-s.right:0,b+p.width>u.width&&(l="left"==l?"right":"left",b=0));f.setStyle(l,t(("pin"==e?v:a)+b+("pin"==e?0:g)))}else e="pin",y("pin"),o(u)},s=CKEDITOR.document.getBody(),y={id:r.id,name:r.name,langDir:r.lang.dir,langCode:r.langCode},l=r.fire("uiSpace",{space:"top",html:""}).html,f;if(l){f=s.append(CKEDITOR.dom.element.createFromHtml(u.output(CKEDITOR.tools.extend({topId:r.ui.spaceId("top"),content:l,style:"display:none;z-index:"+(r.config.baseFloatZIndex-1)},y))));f.unselectable();f.on("mousedown",function(n){n=n.data;n.getTarget().hasAscendant("a",1)||n.preventDefault()});r.on("focus",function(t){o(t);n.on("scroll",o);n.on("resize",o)});r.on("blur",function(){f.hide();n.removeListener("scroll",o);n.removeListener("resize",o)});r.on("destroy",function(){n.removeListener("scroll",o);n.removeListener("resize",o);f.clearCustomData();f.remove()});r.focusManager.hasFocus&&f.show();r.focusManager.add(f,1)}}var u=CKEDITOR.addTemplate("floatcontainer",'<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="application" style="{style}"><div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}<\/div><\/div><\/div>'),n,t;CKEDITOR.plugins.add("floatingspace",{init:function(n){n.on("contentDom",function(){r(n)})}});n=CKEDITOR.document.getWindow();t=CKEDITOR.tools.cssLength}();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var n=CKEDITOR.addTemplate("panel-list",'<ul role="presentation" class="cke_panel_list">{items}<\/ul>'),t=CKEDITOR.addTemplate("panel-list-item",'<li id="{id}" class="cke_panel_listItem" role=presentation><a id="{id}_option" _cke_focus=1 hidefocus=true title="{title}" href="javascript:void(\'{val}\')"  {onclick}="CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role="option">{text}<\/a><\/li>'),i=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" class="cke_panel_grouptitle" role="presentation" >{label}<\/h1>');CKEDITOR.ui.panel.prototype.addListBlock=function(n,t){return this.addBlock(n,new CKEDITOR.ui.listBlock(this.getHolderElement(),t))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(n,t){var t=t||{},i=t.attributes||(t.attributes={});(this.multiSelect=!!t.multiSelect)&&(i["aria-multiselectable"]=!0);i.role||(i.role="listbox");this.base.apply(this,arguments);i=this.keys;i[40]="next";i[9]="next";i[38]="prev";i[CKEDITOR.SHIFT+9]="prev";i[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(i[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var t=n.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(n){var t=this.toggle(n);if(this.onClick)this.onClick(n,t)},this)),this._.click}},proto:{add:function(n,i,r){var u=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[n]=u;n={id:u,val:n,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:r||n,text:i||n};this._.pendingList.push(t.output(n))},startGroup:function(n){this._.close();var t=CKEDITOR.tools.getNextId();this._.groups[n]=t;this._.pendingHtml.push(i.output({id:t,label:n}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(n){var t=this.isMarked(n);return t?this.unmark(n):this.mark(n),!t},hideGroup:function(n){var t=(n=this.element.getDocument().getById(this._.groups[n]))&&n.getNext();n&&(n.setStyle("display","none"),t&&"ul"==t.getName()&&t.setStyle("display","none"))},hideItem:function(n){this.element.getDocument().getById(this._.items[n]).setStyle("display","none")},showAll:function(){var t=this._.items,i=this._.groups,r=this.element.getDocument(),n,u;for(n in t)r.getById(t[n]).setStyle("display","");for(u in i)t=r.getById(i[u]),n=t.getNext(),t.setStyle("display",""),n&&"ul"==n.getName()&&n.setStyle("display","")},mark:function(n){this.multiSelect||this.unmarkAll();var n=this._.items[n],t=this.element.getDocument().getById(n);t.addClass("cke_selected");this.element.getDocument().getById(n+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(t)},unmark:function(n){var t=this.element.getDocument(),n=this._.items[n],i=t.getById(n);i.removeClass("cke_selected");t.getById(n+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(i)},unmarkAll:function(){var t=this._.items,i=this.element.getDocument(),r,n;for(r in t)n=t[r],i.getById(n).removeClass("cke_selected"),i.getById(n+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark()},isMarked:function(n){return this.element.getDocument().getById(this._.items[n]).hasClass("cke_selected")},focus:function(n){if(this._.focusIndex=-1,n){for(var t=this.element.getDocument().getById(this._.items[n]).getFirst(),n=this.element.getElementsByTag("a"),i,r=-1;i=n.getItem(++r);)if(i.equals(t)){this._.focusIndex=r;break}setTimeout(function(){t.focus()},0)}}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(n){n.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var n='<span id="{id}" class="cke_combo cke_combo__{name} {cls}" role="presentation"><span id="{id}_label" class="cke_combo_label">{label}<\/span><a class="cke_combo_button" hidefocus=true title="{title}" tabindex="-1"'+(CKEDITOR.env.gecko&&10900<=CKEDITOR.env.version&&!CKEDITOR.env.hc?"":'" href="javascript:void(\'{titleJs}\')"')+' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="true"',t;(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(n+=' onkeypress="return false;"');CKEDITOR.env.gecko&&(n+=' onblur="this.style.cssText = this.style.cssText;"');n=n+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onmousedown="return CKEDITOR.tools.callFunction({mousedownFn},event);"  onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span id="{id}_text" class="cke_combo_text cke_combo_inlinelabel">{label}<\/span><span class="cke_combo_open"><span class="cke_combo_arrow">'+(CKEDITOR.env.hc?"&#9660;":CKEDITOR.env.air?"&nbsp;":"")+"<\/span><\/span><\/a><\/span>");t=CKEDITOR.addTemplate("combo",n);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(n){CKEDITOR.tools.extend(this,n,{canGroup:!1,title:n.label,modes:{wysiwyg:1},editorFocus:1});n=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=n.parent&&n.parent.getDocument()||CKEDITOR.document;n.className="cke_combopanel";n.block={multiSelect:n.multiSelect,attributes:n.attributes};n.toolbarRelated=!0;this._={panelDefinition:n,items:{}}},proto:{renderHtml:function(n){var t=[];return this.render(n,t),t.join("")},render:function(n,i){function h(){var t=this.modes[n.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;this.setState(n.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t);this.setValue("")}var u=CKEDITOR.env,e="cke_"+this.id,o=CKEDITOR.tools.addFunction(function(t){s&&(n.unlockSelection(1),s=0);r.execute(t)},this),f=this,r={id:e,combo:this,focus:function(){CKEDITOR.document.getById(e).getChild(1).focus()},execute:function(t){var i=f._,r;i.state!=CKEDITOR.TRISTATE_DISABLED&&((f.createPanel(n),i.on)?i.panel.hide():(f.commit(),r=f.getValue(),r?i.list.mark(r):i.list.unmarkAll(),i.panel.showBlock(f.id,new CKEDITOR.dom.element(t),4)))},clickFn:o};n.on("mode",h,this);this.readOnly||n.on("readOnly",h,this);var c=CKEDITOR.tools.addFunction(function(n,t){var n=new CKEDITOR.dom.event(n),i=n.getKeystroke();switch(i){case 13:case 32:case 40:CKEDITOR.tools.callFunction(o,t);break;default:r.onkey(r,i)}n.preventDefault()}),l=CKEDITOR.tools.addFunction(function(){r.onfocus&&r.onfocus()}),s=0,a=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var t=n.editable();t.isInline()&&t.hasFocus&&(n.lockSelection(),s=1)}});return r.keyDownFn=c,u={id:e,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:u.gecko&&10900<=u.version&&!u.hc?"":(this.title||"").replace("'",""),keydownFn:c,mousedownFn:a,focusFn:l,clickFn:o},t.output(u,i),this.onRender&&this.onRender(),r},createPanel:function(n){if(!this._.panel){var u=this._.panelDefinition,e=this._.panelDefinition.block,o=u.parent||CKEDITOR.document.getBody(),f="cke_combopanel__"+this.name,i=new CKEDITOR.ui.floatPanel(n,o,u),r=i.addListBlock(this.id,e),t=this;i.onShow=function(){this.element.addClass(f);t.setState(CKEDITOR.TRISTATE_ON);r.focus(!r.multiSelect&&t.getValue());t._.on=1;t.editorFocus&&n.focus();t.onOpen&&t.onOpen()};i.onHide=function(i){this.element.removeClass(f);t.setState(t.modes&&t.modes[n.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);t._.on=0;!i&&t.onClose&&t.onClose()};i.onEscape=function(){i.hide(1)};r.onClick=function(n,r){t.onClick&&t.onClick.call(t,n,r);i.hide()};this._.panel=i;this._.list=r;i.getBlock(this.id).onHide=function(){t._.on=0;t.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(n,t){this._.value=n;var i=this.document.getById("cke_"+this.id+"_text");i&&(!n&&!t?(t=this.label,i.addClass("cke_combo_inlinelabel")):i.removeClass("cke_combo_inlinelabel"),i.setText("undefined"!=typeof t?t:n))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(n){this._.list.mark(n)},hideItem:function(n){this._.list.hideItem(n)},hideGroup:function(n){this._.list.hideGroup(n)},showAll:function(){this._.list.showAll()},add:function(n,t,i){this._.items[n]=i||n;this._.list.add(n,t,i)},startGroup:function(n){this._.list.startGroup(n)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(n){if(this._.state!=n){var t=this.document.getById("cke_"+this.id);t.setState(n,"cke_combo");n==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled");this._.state=n}},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(n){return new CKEDITOR.ui.richCombo(n)}}}});CKEDITOR.ui.prototype.addRichCombo=function(n,t){this.add(n,CKEDITOR.UI_RICHCOMBO,t)}}();CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(n){var r;if(!n.blockless){for(var u=n.config,i=n.lang.format,e=u.format_tags.split(";"),t={},f=0;f<e.length;f++)r=e[f],t[r]=new CKEDITOR.style(u["format_"+r]),t[r]._.enterMode=n.config.enterMode;n.ui.addRichCombo("Format",{label:i.label,title:i.panelTitle,toolbar:"styles,20",panel:{css:[CKEDITOR.skin.getPath("editor")].concat(u.contentsCss),multiSelect:!1,attributes:{"aria-label":i.panelTitle}},init:function(){var n,r;this.startGroup(i.panelTitle);for(n in t)r=i["tag_"+n],this.add(n,t[n].buildPreview(r),r)},onClick:function(i){n.focus();n.fire("saveSnapshot");var i=t[i],r=n.elementPath();n[i.checkActive(r)?"removeStyle":"applyStyle"](i);setTimeout(function(){n.fire("saveSnapshot")},0)},onRender:function(){n.on("selectionChange",function(i){var f=this.getValue(),i=i.data.path,u=!n.readOnly&&i.isContextFor("p"),r;if(this[u?"enable":"disable"](),u){for(r in t)if(t[r].checkActive(i)){r!=f&&this.setValue(r,n.lang.format["tag_"+r]);return}this.setValue("")}},this)}})}}});CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div";CKEDITOR.config.format_p={element:"p"};CKEDITOR.config.format_div={element:"div"};CKEDITOR.config.format_pre={element:"pre"};CKEDITOR.config.format_address={element:"address"};CKEDITOR.config.format_h1={element:"h1"};CKEDITOR.config.format_h2={element:"h2"};CKEDITOR.config.format_h3={element:"h3"};CKEDITOR.config.format_h4={element:"h4"};CKEDITOR.config.format_h5={element:"h5"};CKEDITOR.config.format_h6={element:"h6"};CKEDITOR.plugins.add("htmlwriter",{init:function(n){var t=new CKEDITOR.htmlWriter;t.forceSimpleAmpersand=n.config.forceSimpleAmpersand;t.indentationChars=n.config.dataIndentationChars||"\t";n.dataProcessor.writer=t}});CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" />";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var n=CKEDITOR.dtd;for(var t in CKEDITOR.tools.extend({},n.$nonBodyContent,n.$block,n.$listItem,n.$tableContent))this.setRules(t,{indent:!n[t]["#"],breakBeforeOpen:1,breakBeforeClose:!n[t]["#"],breakAfterClose:1,needsSpace:t in n.$block&&!(t 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(n){var t=this._.rules[n];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("<",n);this._.afterCloser=0},openTagClose:function(n,t){var i=this._.rules[n];t?(this._.output.push(this.selfClosingEnd),i&&i.breakAfterClose&&(this._.needsSpace=i.needsSpace)):(this._.output.push(">"),i&&i.indent&&(this._.indentation+=this.indentationChars));i&&i.breakAfterOpen&&this.lineBreak();"pre"==n&&(this._.inPre=1)},attribute:function(n,t){"string"==typeof t&&(this.forceSimpleAmpersand&&(t=t.replace(/&amp;/g,"&")),t=CKEDITOR.tools.htmlEncodeAttr(t));this._.output.push(" ",n,'="',t,'"')},closeTag:function(n){var t=this._.rules[n];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("<\/",n,">");"pre"==n&&(this._.inPre=0);t&&t.breakAfterClose&&(this.lineBreak(),this._.needsSpace=t.needsSpace);this._.afterCloser=1},text:function(n){this._.indent&&(this.indentation(),!this._.inPre&&(n=CKEDITOR.tools.ltrim(n)));this._.output.push(n)},comment:function(n){this._.indent&&this.indentation();this._.output.push("<!--",n,"-->")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);this._.indent=0},reset:function(){this._.output=[];this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0},setRules:function(n,t){var i=this._.rules[n];i?CKEDITOR.tools.extend(i,t,!0):this._.rules[n]=t}}}),function(){var n={canUndo:!1,exec:function(n){var t=n.document.createElement("hr");n.insertElement(t)}};CKEDITOR.plugins.add("horizontalrule",{init:function(t){t.blockless||(t.addCommand("horizontalrule",n),t.ui.addButton&&t.ui.addButton("HorizontalRule",{label:t.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),function(){function i(n){var t=this.editor,i=n.document,r=i.body;(n=i.getElementById("cke_actscrpt"))&&n.parentNode.removeChild(n);(n=i.getElementById("cke_shimscrpt"))&&n.parentNode.removeChild(n);CKEDITOR.env.gecko&&(r.contentEditable=!1,2e4>CKEDITOR.env.version&&(r.innerHTML=r.innerHTML.replace(/^.*<\!-- cke-content-start --\>/,""),setTimeout(function(){var n=new CKEDITOR.dom.range(new CKEDITOR.dom.document(i));n.setStart(new CKEDITOR.dom.node(r),0);t.getSelection().selectRanges([n])},0)));r.contentEditable=!0;CKEDITOR.env.ie&&(r.hideFocus=!0,r.disabled=!0,r.removeAttribute("disabled"));delete this._.isLoadingData;this.$=r;i=new CKEDITOR.dom.document(i);this.setup();CKEDITOR.env.ie&&(i.getDocumentElement().addClass(i.$.compatMode),t.config.enterMode!=CKEDITOR.ENTER_P&&i.on("selectionchange",function(){var r=i.getBody(),u=t.getSelection(),n=u&&u.getRanges()[0];n&&r.getHtml().match(/^<p>&nbsp;<\/p>$/i)&&n.startContainer.equals(r)&&setTimeout(function(){n=t.getSelection().getRanges()[0];n.startContainer.equals("body")||(r.getFirst().remove(1),n.moveToElementEditEnd(r),n.select())},0)}));CKEDITOR.env.gecko&&CKEDITOR.tools.setTimeout(u,0,this,t);try{t.document.$.execCommand("2D-position",!1,!0)}catch(f){}try{t.document.$.execCommand("enableInlineTableEditing",!1,!t.config.disableNativeTableHandles)}catch(e){}if(t.config.disableObjectResizing)try{this.getDocument().$.execCommand("enableObjectResizing",!1,!1)}catch(o){this.attachListener(this,CKEDITOR.env.ie?"resizestart":"resize",function(n){n.data.preventDefault()})}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==t.document.$.compatMode)&&this.attachListener(this,"keydown",function(n){var i=n.data.getKeystroke(),r;(i==33||i==34)&&(CKEDITOR.env.ie?setTimeout(function(){t.getSelection().scrollIntoView()},0):t.window.$.innerHeight>this.$.offsetHeight&&(r=t.createRange(),r[i==33?"moveToElementEditStart":"moveToElementEditEnd"](this),r.select(),n.data.preventDefault()))});CKEDITOR.env.ie&&this.attachListener(i,"blur",function(){try{i.$.selection.empty()}catch(n){}});t.document.getElementsByTag("title").getItem(0).data("cke-title",t.document.$.title);CKEDITOR.env.ie&&(t.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){t.fire("contentDom");this._.isPendingFocus&&(t.focus(),this._.isPendingFocus=!1);setTimeout(function(){t.fire("dataReady")},0);CKEDITOR.env.ie&&setTimeout(function(){if(t.document){var n=t.document.$.body;n.runtimeStyle.marginBottom="0px";n.runtimeStyle.marginBottom=""}},1e3)},0,this)}function r(n){n.checkDirty()||setTimeout(function(){n.resetDirty()},0)}function u(n){if(!n.readOnly){var c=n.window,t=n.document,i=t.getBody(),u=i.getFirst(),e=i.getChildren().count();if(!e||1==e&&u.type==CKEDITOR.NODE_ELEMENT&&u.hasAttribute("_moz_editor_bogus_node")){r(n);var u=CKEDITOR.document,f=u.getDocumentElement(),o=f.$.scrollTop,s=f.$.scrollLeft,h=t.$.createEvent("KeyEvents");h.initKeyEvent("keypress",!0,!0,c.$,!1,!1,!1,!1,0,32);t.$.dispatchEvent(h);(o!=f.$.scrollTop||s!=f.$.scrollLeft)&&u.getWindow().$.scrollTo(s,o);e&&i.getFirst().remove();t.getBody().appendBogus();n=n.createRange();n.setStartAt(i,CKEDITOR.POSITION_AFTER_START);n.select()}}}function f(){var n=[],t,i;if(8<=CKEDITOR.document.$.documentMode){n.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");t=[];for(i in CKEDITOR.dtd.$removeEmpty)t.push("html.CSS1Compat "+i+"[contenteditable=false]");n.push(t.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(n.push("html{height:100% !important}"),n.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));return n.push("html{cursor:text;*cursor:auto}"),n.push("img,input,textarea{cursor:default}"),n.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(i){i.addMode("wysiwyg",function(r){function l(t){t&&t.removeListener();i.editable(new n(i,u.$.contentWindow.document.body));i.setData(i.getData(1),r)}var u=CKEDITOR.document.createElement("iframe"),f,o,s,h,c;u.setStyles({width:"100%",height:"100%"});u.addClass("cke_wysiwyg_frame cke_reset");f=i.ui.space("contents");f.append(u);var e="document.open();"+(t?'document.domain="'+document.domain+'";':"")+"document.close();",e=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(e)+"}())":"",a=CKEDITOR.env.ie||CKEDITOR.env.gecko;if(a)u.on("load",l);o=[i.lang.editor,i.name].join();s=i.lang.common.editorHelp;CKEDITOR.env.ie&&(o+=", "+s);h=CKEDITOR.tools.getNextId();c=CKEDITOR.dom.element.createFromHtml('<span id="'+h+'" class="cke_voice_label">'+s+"<\/span>");f.append(c,1);i.on("beforeModeUnload",function(n){n.removeListener();c.remove()});u.setAttributes({frameBorder:0,"aria-describedby":h,title:o,src:e,tabIndex:i.tabIndex,allowTransparency:"true"});a||l();CKEDITOR.env.webkit&&(e=function(){f.setStyle("width","100%");u.hide();u.setSize("width",f.getSize("width"));f.removeStyle("width");u.show()},u.setCustomData("onResize",e),CKEDITOR.document.getWindow().on("resize",e));i.fire("ariaWidget",u)})}});var t=CKEDITOR.env.isCustomDomain(),n=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(n){CKEDITOR.tools.setTimeout(i,0,this,n)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(n,i){var u=this.editor,e,h;if(i)this.setHtml(n);else{this._.isLoadingData=!0;u._.dataStore={id:1};var r=u.config,o=r.fullPage,c=r.docType,s=CKEDITOR.tools.buildStyleHtml(f()).replace(/<style>/,'<style data-cke-temp="1">');o||(s+=CKEDITOR.tools.buildStyleHtml(u.config.contentsCss));e=r.baseHref?'<base href="'+r.baseHref+'" data-cke-temp="1" />':"";o&&(n=n.replace(/<!DOCTYPE[^>]*>/i,function(n){return u.docType=c=n,""}).replace(/<\?xml\s[^\?]*\?>/i,function(n){return u.xmlDeclaration=n,""}));u.dataProcessor&&(n=u.dataProcessor.toHtml(n));o?(/<body[\s|>]/.test(n)||(n="<body>"+n),/<html[\s|>]/.test(n)||(n="<html>"+n+"<\/html>"),/<head[\s|>]/.test(n)?/<title[\s|>]/.test(n)||(n=n.replace(/<head[^>]*>/,"$&<title><\/title>")):n=n.replace(/<html[^>]*>/,"$&<head><title><\/title><\/head>"),e&&(n=n.replace(/<head>/,"$&"+e)),n=n.replace(/<\/head\s*>/,s+"$&"),n=c+n):n=r.docType+'<html dir="'+r.contentsLangDirection+'" lang="'+(r.contentsLanguage||u.langCode)+'"><head><title>'+this._.docTitle+"<\/title>"+e+s+"<\/head><body"+(r.bodyId?' id="'+r.bodyId+'"':"")+(r.bodyClass?' class="'+r.bodyClass+'"':"")+">"+n+"<\/body><\/html>";CKEDITOR.env.gecko&&(n=n.replace(/<body/,'<body contenteditable="true" '),2e4>CKEDITOR.env.version&&(n=n.replace(/<body[^>]*>/,"$&<!-- cke-content-start -->")));r='<script id="cke_actscrpt" type="text/javascript"'+(CKEDITOR.env.ie?' defer="defer" ':"")+">"+(t?'document.domain="'+document.domain+'";':"")+"var wasLoaded=0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+",window);wasLoaded=1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"<\/script>";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(r+='<script id="cke_shimscrpt">(function(){var e="abbr,article,aside,audio,bdi,canvas,data,datalist,details,figcaption,figure,footer,header,hgroup,mark,meter,nav,output,progress,section,summary,time,video".split(","),i=e.length;while(i--){document.createElement(e[i])}})()<\/script>');n=n.replace(/(?=\s*<\/(:?head)>)/,r);this.clearCustomData();this.clearListeners();u.fire("contentDomUnload");h=this.getDocument();try{h.write(n)}catch(l){setTimeout(function(){h.write(n)},0)}}},getData:function(n){if(n)return this.getHtml();var n=this.editor,t=n.config.fullPage,i=t&&n.docType,r=t&&n.xmlDeclaration,u=this.getDocument(),t=t?u.getDocumentElement().getOuterHtml():u.getBody().getHtml();return CKEDITOR.env.gecko&&(t=t.replace(/<br>(?=\s*(:?$|<\/body>))/,"")),n.dataProcessor&&(t=n.dataProcessor.toDataFormat(t)),r&&(t=r+"\n"+t),i&&(t=i+"\n"+t),t},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:n.baseProto.focus.call(this)},detach:function(){var t=this.editor,i=t.document,r=t.window.getFrame();n.baseProto.detach.call(this);this.clearCustomData();i.getDocumentElement().clearCustomData();r.clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);(i=r.removeCustomData("onResize"))&&i.removeListener();t.fire("contentDomUnload");r.remove()}}});CKEDITOR.env.gecko&&function(){var n=document.body,t;n?(t=n.getAttribute("onpageshow"),n.setAttribute("onpageshow",(t?t+";":"")+'event.persisted&&(function(){var x=CKEDITOR.instances,d,i;for(i in x){d=x[i].document;if(d){d.$.designMode="off";d.$.designMode="on";}}})();')):window.addEventListener("load",arguments.callee,!1)}()}();CKEDITOR.config.disableObjectResizing=!1;CKEDITOR.config.disableNativeTableHandles=!0;CKEDITOR.config.disableNativeSpellChecker=!0;CKEDITOR.config.contentsCss=CKEDITOR.basePath+"contents.css",function(){function n(n,t){return t||(t=n.getSelection().getSelectedElement()),t&&t.is("img")&&!t.data("cke-realelement")&&!t.isReadOnly()?t:void 0}function t(n){var t=n.getStyle("float");return("inherit"==t||"none"==t)&&(t=0),t||(t=n.getAttribute("align")),t}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(t){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");t.addCommand("image",new CKEDITOR.dialogCommand("image"));t.ui.addButton&&t.ui.addButton("Image",{label:t.lang.common.image,command:"image",toolbar:"insert,10"});t.on("doubleclick",function(n){var t=n.data.element;!t.is("img")||t.data("cke-realelement")||t.isReadOnly()||(n.data.dialog="image")});t.addMenuItems&&t.addMenuItems({image:{label:t.lang.image.menu,command:"image",group:"image"}});t.contextMenu&&t.contextMenu.addListener(function(i){if(n(t,i))return{image:CKEDITOR.TRISTATE_OFF}})},afterInit:function(i){function r(r){var u=i.getCommand("justify"+r);if(u){if("left"==r||"right"==r)u.on("exec",function(u){var f=n(i),e;f&&(e=t(f),e==r?(f.removeStyle("float"),r==t(f)&&f.removeAttribute("align")):f.setStyle("float",r),u.cancel())});u.on("refresh",function(u){var f=n(i);f&&(f=t(f),this.setState(f==r?CKEDITOR.TRISTATE_ON:"right"==r||"left"==r?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),u.cancel())})}}r("left");r("right");r("center");r("block")}})}();CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function n(n,t){var u=r.exec(n),i=r.exec(t);if(u){if(!u[2]&&"px"==i[2])return i[1];if("px"==u[2]&&!i[2])return i[1]+"px"}return t}var i=CKEDITOR.htmlParser.cssStyle,t=CKEDITOR.tools.cssLength,r=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,f={elements:{$:function(t){var r=t.attributes;if((r=(r=(r=r&&r["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(r)))&&r.children[0])&&t.attributes["data-cke-resizable"]){var u=new i(t).rules,t=r.attributes,f=u.width,u=u.height;f&&(t.width=n(t.width,f));u&&(t.height=n(t.height,u))}return r}}},u=CKEDITOR.plugins.add("fakeobjects",{afterInit:function(n){(n=(n=n.dataProcessor)&&n.htmlFilter)&&n.addRules(f)}});CKEDITOR.editor.prototype.createFakeElement=function(n,r,f,e){var o=this.lang.fakeobjects,o=o[f]||o.unknown,r={"class":r,"data-cke-realelement":encodeURIComponent(n.getOuterHtml()),"data-cke-real-node-type":n.type,alt:o,title:o,align:n.getAttribute("align")||""};return CKEDITOR.env.hc||(r.src=CKEDITOR.getUrl(u.path+"images/spacer.gif")),f&&(r["data-cke-real-element-type"]=f),e&&(r["data-cke-resizable"]=e,f=new i,e=n.getAttribute("width"),n=n.getAttribute("height"),e&&(f.rules.width=t(e)),n&&(f.rules.height=t(n)),f.populate(r)),this.document.createElement("img",{attributes:r})};CKEDITOR.editor.prototype.createFakeParserElement=function(n,r,f,e){var s=this.lang.fakeobjects,s=s[f]||s.unknown,o;return o=new CKEDITOR.htmlParser.basicWriter,n.writeHtml(o),o=o.getHtml(),r={"class":r,"data-cke-realelement":encodeURIComponent(o),"data-cke-real-node-type":n.type,alt:s,title:s,align:n.attributes.align||""},CKEDITOR.env.hc||(r.src=CKEDITOR.getUrl(u.path+"images/spacer.gif")),f&&(r["data-cke-real-element-type"]=f),e&&(r["data-cke-resizable"]=e,e=n.attributes,n=new i,f=e.width,e=e.height,void 0!=f&&(n.rules.width=t(f)),void 0!=e&&(n.rules.height=t(e)),n.populate(r)),new CKEDITOR.htmlParser.element("img",r)};CKEDITOR.editor.prototype.restoreRealElement=function(t){var i,r,t;return t.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT?null:(i=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(t.data("cke-realelement")),this.document),t.data("cke-resizable")&&(r=t.getStyle("width"),t=t.getStyle("height"),r&&i.setAttribute("width",n(i.getAttribute("width"),r)),t&&i.setAttribute("height",n(i.getAttribute("height"),t))),i)}}();CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function n(n){return i.replace(/%1/g,"rtl"==n?"right":"left").replace(/%2/g,"cke_contents_"+n)}var t="background:url("+CKEDITOR.getUrl(this.path+"images/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;",i=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+t+"padding-%1:18px;cursor:auto;}"+(CKEDITOR.env.ie?"a.cke_anchor_empty{display:inline-block;}":"")+".%2 img.cke_anchor{"+t+"width:16px;min-height:15px;height:1.15em;vertical-align:"+(CKEDITOR.env.opera?"middle":"text-bottom")+";}";CKEDITOR.addCss(n("ltr")+n("rtl"))},init:function(n){n.addCommand("link",new CKEDITOR.dialogCommand("link"));n.addCommand("anchor",new CKEDITOR.dialogCommand("anchor"));n.addCommand("unlink",new CKEDITOR.unlinkCommand);n.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);n.setKeystroke(CKEDITOR.CTRL+76,"link");n.ui.addButton&&(n.ui.addButton("Link",{label:n.lang.link.toolbar,command:"link",toolbar:"links,10"}),n.ui.addButton("Unlink",{label:n.lang.link.unlink,command:"unlink",toolbar:"links,20"}),n.ui.addButton("Anchor",{label:n.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"}));CKEDITOR.dialog.add("link",this.path+"dialogs/link.js");CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js");n.on("doubleclick",function(t){var i=CKEDITOR.plugins.link.getSelectedLink(n)||t.data.element;i.isReadOnly()||(i.is("a")?(t.data.dialog=i.getAttribute("name")&&(!i.getAttribute("href")||!i.getChildCount())?"anchor":"link",n.getSelection().selectElement(i)):CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,i)&&(t.data.dialog="anchor"))});n.addMenuItems&&n.addMenuItems({anchor:{label:n.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:n.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:n.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:n.lang.link.unlink,command:"unlink",group:"link",order:5}});n.contextMenu&&n.contextMenu.addListener(function(t){if(!t||t.isReadOnly()||(t=CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,t),!t&&!(t=CKEDITOR.plugins.link.getSelectedLink(n))))return null;var i={};return t.getAttribute("href")&&t.getChildCount()&&(i={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF}),t&&t.hasAttribute("name")&&(i.anchor=i.removeAnchor=CKEDITOR.TRISTATE_OFF),i})},afterInit:function(n){var t=n.dataProcessor,i=t&&t.dataFilter,t=t&&t.htmlFilter,r=n._.elementsPath&&n._.elementsPath.filters;i&&i.addRules({elements:{a:function(t){var i=t.attributes,r,t,u;if(!i.name)return null;if(r=!t.children.length,CKEDITOR.plugins.link.synAnchorSelector)t=r?"cke_anchor_empty":"cke_anchor",u=i["class"],i.name&&(!u||0>u.indexOf(t))&&(i["class"]=(u||"")+" "+t),r&&CKEDITOR.plugins.link.emptyAnchorFix&&(i.contenteditable="false",i["data-cke-editable"]=1);else if(CKEDITOR.plugins.link.fakeAnchor&&r)return n.createFakeParserElement(t,"cke_anchor","anchor");return null}}});CKEDITOR.plugins.link.emptyAnchorFix&&t&&t.addRules({elements:{a:function(n){delete n.attributes.contenteditable}}});r&&r.push(function(t,i){if("a"==i&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,t)||t.getAttribute("name")&&(!t.getAttribute("href")||!t.getChildCount())))return"anchor"})}});CKEDITOR.plugins.link={getSelectedLink:function(n){var t=n.getSelection(),i=t.getSelectedElement();return i&&i.is("a")?i:(t=t.getRanges(!0)[0])?(t.shrink(CKEDITOR.SHRINK_TEXT),n.elementPath(t.getCommonAncestor()).contains("a",1)):null},fakeAnchor:CKEDITOR.env.opera||CKEDITOR.env.webkit,synAnchorSelector:CKEDITOR.env.ie,emptyAnchorFix:CKEDITOR.env.ie&&8>CKEDITOR.env.version,tryRestoreFakeAnchor:function(n,t){if(t&&t.data("cke-real-element-type")&&"anchor"==t.data("cke-real-element-type")){var i=n.restoreRealElement(t);if(i.data("cke-saved-name"))return i}}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(n){var t=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});n.removeStyle(t)},refresh:function(n,t){var i=t.lastElement&&t.lastElement.getAscendant("a",!0);i&&"a"==i.getName()&&i.getAttribute("href")&&i.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1};CKEDITOR.removeAnchorCommand=function(){};CKEDITOR.removeAnchorCommand.prototype={exec:function(n){var i=n.getSelection(),r=i.createBookmarks(),t;i&&(t=i.getSelectedElement())&&(CKEDITOR.plugins.link.fakeAnchor&&!t.getChildCount()?CKEDITOR.plugins.link.tryRestoreFakeAnchor(n,t):t.is("a"))?t.remove(1):(t=CKEDITOR.plugins.link.getSelectedLink(n))&&(t.hasAttribute("href")?(t.removeAttributes({name:1,"data-cke-saved-name":1}),t.removeClass("cke_anchor")):t.remove(1));i.selectBookmarks(r)}};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0}),function(){function ot(t,i,u){return n(i)&&n(u)&&u.equals(i.getNext(function(n){return!(g(n)||nt(n)||r(n))}))}function s(n){this.upper=n[0];this.lower=n[1];this.set.apply(this,n.slice(2))}function tt(t){var r=t.element,i;return r&&n(r)?(i=r.getAscendant(t.triggers,!0))&&!i.contains(t.editable)&&!i.equals(t.editable)?i:null:null}function ni(n,i,r){return t(n,i),t(n,r),n=i.size.bottom,r=r.size.top,n&&r?0|(n+r)/2:n||r}function f(t,i,u){return i[u?"getPrevious":"getNext"](function(i){return i&&i.type==CKEDITOR.NODE_TEXT&&!g(i)||n(i)&&!r(i)&&!h(t,i)})}function ti(n){var f=n.doc,r=w('<span contenteditable="false" style="'+et+"position:absolute;border-top:1px dashed "+n.boxColor+'"><\/span>',f);for(u(r,{attach:function(){return this.wrap.getParent()||this.wrap.appendTo(n.editable,!0),this},lineChildren:[u(w('<span title="'+n.editor.lang.magicline.title+'" contenteditable="false">&#8629;<\/span>',f),{base:et+"height:17px;width:17px;"+(n.rtl?"left":"right")+":17px;background:url("+this.path+"images/icon.png) center no-repeat "+n.boxColor+";cursor:pointer;"+(i.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":""),looks:["top:-8px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px",1),"top:-17px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px 2px 0px 0px",1),"top:-1px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","0px 0px 2px 2px",1)]}),u(w(kt,f),{base:bt+"left:0px;border-left-color:"+n.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"]}),u(w(kt,f),{base:bt+"right:0px;border-right-color:"+n.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(){t(n,this);var r=n.holdDistance,i=this.size;return i&&n.mouse.y>i.top-r&&n.mouse.y<i.bottom+r&&n.mouse.x>i.left-r&&n.mouse.x<i.right+r?!0:!1},place:function(){var r=n.view,v=n.editable,s=n.trigger,u=s.upper,f=s.lower,o=u||f,c=o.getParent(),i={},h;this.trigger=s;u&&t(n,u,!0);f&&t(n,f,!0);t(n,c,!0);n.inInlineMode&&y(n,!0);c.equals(v)?(i.left=r.scroll.x,i.right=-r.scroll.x,i.width=""):(i.left=o.size.left-o.size.margin.left+r.scroll.x-(n.inInlineMode?r.editable.left+r.editable.border.left:0),i.width=o.size.outerWidth+o.size.margin.left+o.size.margin.right+r.scroll.x,i.right="");u&&f?i.top=u.size.margin.bottom===f.size.margin.top?0|u.size.bottom+u.size.margin.bottom/2:u.size.margin.bottom<f.size.margin.top?u.size.bottom+u.size.margin.bottom:u.size.bottom+u.size.margin.bottom-f.size.margin.top:u?f||(i.top=u.size.bottom+u.size.margin.bottom):i.top=f.size.top-f.size.margin.top;s.is(l)||i.top>r.scroll.y-15&&i.top<r.scroll.y+5?(i.top=n.inInlineMode?0:r.scroll.y,this.look(l)):s.is(a)||i.top>r.pane.bottom-5&&i.top<r.pane.bottom+15?(i.top=n.inInlineMode?r.editable.height+r.editable.padding.top+r.editable.padding.bottom:r.pane.bottom-1,this.look(a)):(n.inInlineMode&&(i.top-=r.editable.top+r.editable.border.top),this.look(e));n.inInlineMode&&(i.top--,i.top+=r.editable.scroll.top,i.left+=r.editable.scroll.left);for(h in i)i[h]=CKEDITOR.tools.cssLength(i[h]);this.setStyles(i)},look:function(n){if(this.oldLook!=n){for(var i=this.lineChildren.length,t;i--;)(t=this.lineChildren[i]).setAttribute("style",t.base+t.looks[0|n/2]);this.oldLook=n}},wrap:new ut("span",n.doc)}),f=r.lineChildren.length;f--;)r.lineChildren[f].appendTo(r);r.look(e);r.appendTo(r.wrap);r.unselectable();r.lineChildren[0].on("mouseup",function(t){r.detach();it(n,function(t){var i=n.line.trigger;t[i.is(b)?"insertBefore":"insertAfter"](i.is(b)?i.lower:i.upper)},!0);n.editor.focus();i.ie||n.enterMode==CKEDITOR.ENTER_BR||n.hotNode.scrollIntoView();t.data.preventDefault(!0)});r.on("mousedown",function(n){n.data.preventDefault(!0)});n.line=r}function it(n,t,r){var e=new CKEDITOR.dom.range(n.doc),f=n.editor,u;i.ie&&n.enterMode==CKEDITOR.ENTER_BR?u=n.doc.createText(d):(u=new ut(n.enterBehavior,n.doc),n.enterMode!=CKEDITOR.ENTER_BR&&n.doc.createText(d).appendTo(u));r&&f.fire("saveSnapshot");t(u);e.moveToPosition(u,CKEDITOR.POSITION_AFTER_START);f.getSelection().selectRanges([e]);n.hotNode=u;r&&f.fire("saveSnapshot")}function st(t,r){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function u(n){var u=i.ie&&9>i.version?" ":d,f=t.hotNode&&t.hotNode.getText()==u&&t.element.equals(t.hotNode)&&t.lastCmdDirection===!!r;it(t,function(i){f&&t.hotNode&&t.hotNode.remove();i[r?"insertAfter":"insertBefore"](n);i.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!r});t.lastCmdDirection=!!r});i.ie||t.enterMode==CKEDITOR.ENTER_BR||t.hotNode.scrollIntoView();t.line.detach()}return function(i){if(i=i.getSelection().getStartElement(),(i=i.getAscendant(pt,1))&&!i.equals(t.editable)&&!i.contains(t.editable)){t.element=i;var o=f(t,i,!r),e;n(o)&&o.is(t.triggers)&&o.is(fi)&&(!f(t,o,!r)||(e=f(t,o,!r))&&n(e)&&e.is(t.triggers))?u(o):(e=tt(t,i),n(e)&&(f(t,e,!r)?(i=f(t,e,!r))&&n(i)&&i.is(t.triggers)&&u(e):u(e)))}}}()}}function h(n,t){if(!t||!(t.type==CKEDITOR.NODE_ELEMENT&&t.$))return!1;var i=n.line;return i.wrap.equals(t)||i.wrap.contains(t)}function n(n){return n&&n.type==CKEDITOR.NODE_ELEMENT&&n.$}function r(t){if(!n(t))return!1;var i;return(i=ht(t))||(n(t)?(i={left:1,right:1,center:1},i=!(!i[t.getComputedStyle("float")]&&!i[t.getAttribute("align")])):i=!1),i}function ht(n){return!!{absolute:1,fixed:1,relative:1}[n.getComputedStyle("position")]}function v(t,i){return n(i)?i.is(t.triggers):null}function ii(n,i,r){return(i=i[r?"getLast":"getFirst"](function(t){return n.isRelevant(t)&&!t.is(ui)}),!i)?!1:(t(n,i),r?i.size.top>n.mouse.y:i.size.bottom<n.mouse.y)}function ct(i){var u=i.editable,o=i.mouse,f=i.view,p=i.triggerOffset,c;return(y(i),c=o.y>(i.inInlineMode?f.editable.top+f.editable.height/2:Math.min(f.editable.height,f.pane.height)/2),u=u[c?"getLast":"getFirst"](function(n){return!(g(n)||nt(n))}),!u)?null:(h(i,u)&&(u=i.line.wrap[c?"getPrevious":"getNext"](function(n){return!(g(n)||nt(n))})),!n(u)||r(u)||!v(i,u))?null:(t(i,u),!c&&0<=u.size.top&&0<o.y&&o.y<u.size.top+p?(i=i.inInlineMode||0===f.scroll.y?l:e,new s([null,u,b,k,i])):c&&u.size.bottom<=f.pane.height&&o.y>u.size.bottom-p&&o.y<f.pane.height?(i=i.inInlineMode||u.size.bottom>f.pane.height-p&&u.size.bottom<f.pane.height?a:e,new s([u,null,at,k,i])):null)}function lt(i){var c=i.mouse,g=i.view,p=i.triggerOffset,u=tt(i),w,d,o,h;if(!u)return null;if(t(i,u),p=Math.min(p,0|u.size.outerHeight/2),w=[],c.y>u.size.top-1&&c.y<u.size.top+p)o=!1;else if(c.y>u.size.bottom-p&&c.y<u.size.bottom+1)o=!0;else return null;if(r(u)||ii(i,u,o)||u.getParent().is(yt))return null;if(h=f(i,u,!o),h){if(h&&h.type==CKEDITOR.NODE_TEXT)return null;if(n(h)){if(r(h)||!v(i,h)||h.getParent().is(yt))return null;w=[h,u][o?"reverse":"concat"]().concat([ft,k])}}else u.equals(i.editable[o?"getLast":"getFirst"](i.isRelevant))?(y(i),o&&c.y>u.size.bottom-p&&c.y<g.pane.height&&u.size.bottom>g.pane.height-p&&u.size.bottom<g.pane.height?d=a:0<c.y&&c.y<u.size.top+p&&(d=l)):d=e,w=[null,u][o?"reverse":"concat"]().concat([o?at:b,k,d,u.equals(i.editable[o?"getLast":"getFirst"](i.isRelevant))?o?a:l:e]);return 0 in w?new s(w):null}function rt(n,t,r,f){for(var l=function(){var r=i.ie?t.$.currentStyle:n.win.$.getComputedStyle(t.$,"");return i.ie?function(n){return r[CKEDITOR.tools.cssStyleToDomStyle(n)]}:function(n){return r.getPropertyValue(n)}}(),a=t.getDocumentPosition(),h={},v={},c={},e={},s=o.length;s--;)h[o[s]]=parseInt(l("border-"+o[s]+"-width"),10)||0,c[o[s]]=parseInt(l("padding-"+o[s]),10)||0,v[o[s]]=parseInt(l("margin-"+o[s]),10)||0;return(!r||f)&&p(n,f),e.top=a.y-(r?0:n.view.scroll.y),e.left=a.x-(r?0:n.view.scroll.x),e.outerWidth=t.$.offsetWidth,e.outerHeight=t.$.offsetHeight,e.height=e.outerHeight-(c.top+c.bottom+h.top+h.bottom),e.width=e.outerWidth-(c.left+c.right+h.left+h.right),e.bottom=e.top+e.outerHeight,e.right=e.left+e.outerWidth,n.inInlineMode&&(e.scroll={top:t.$.scrollTop,left:t.$.scrollLeft}),u({border:h,padding:c,margin:v,ignoreScroll:r},e,!0)}function t(t,i,r){if(!n(i))return i.size=null;if(i.size){if(i.size.ignoreScroll==r&&i.size.date>new Date-wt)return null}else i.size={};return u(i.size,rt(t,i,r),{date:+new Date},!0)}function y(n,t){n.view.editable=rt(n,n.editable,t,!0)}function p(n,t){var r;if(n.view||(n.view={}),r=n.view,t||!(r&&r.date>new Date-wt)){var i=n.win,r=i.getScrollPosition(),i=i.getViewPaneSize();u(n.view,{scroll:{x:r.x,y:r.y,width:n.doc.$.documentElement.scrollWidth-i.width,height:n.doc.$.documentElement.scrollHeight-i.height},pane:{width:i.width,height:i.height,bottom:i.height+r.y},date:+new Date},!0)}}function ri(n,t,i,r){for(var h=r,c=r,f=0,e=!1,o=!1,l=n.view.pane.height,u=n.mouse;u.y+f<l&&0<u.y-f;){if(e||(e=t(h,r)),o||(o=t(c,r)),!e&&0<u.y-f&&(h=i(n,{x:u.x,y:u.y-f})),!o&&u.y+f<l&&(c=i(n,{x:u.x,y:u.y+f})),e&&o)break;f+=2}return new s([h,c,null,null])}CKEDITOR.plugins.add("magicline",{init:function(t){var a={};a[CKEDITOR.ENTER_BR]="br";a[CKEDITOR.ENTER_P]="p";a[CKEDITOR.ENTER_DIV]="div";var o=t.config,w=o.magicline_triggerOffset||30,b=o.enterMode,e={editor:t,enterBehavior:a[b],enterMode:b,triggerOffset:w,holdDistance:0|w*(o.magicline_holdDistance||.5),boxColor:o.magicline_color||"#ff0000",rtl:"rtl"==o.contentsLangDirection,triggers:o.magicline_everywhere?pt:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},k,v,l;e.isRelevant=function(t){return n(t)&&!h(e,t)&&!r(t)};t.on("contentDom",function(){var n=t.editable(),r=t.document,a=t.window;u(e,{editable:n,inInlineMode:n.isInline(),doc:r,win:a},!0);e.boundary=e.inInlineMode?e.editable:e.doc.getDocumentElement();n.is(c.$inline)||(e.inInlineMode&&!ht(n)&&n.setStyles({position:"relative",top:null,left:null}),ti.call(this,e),p(e),n.attachListener(t,"beforeUndoImage",function(){e.line.detach()}),n.attachListener(t,"beforeGetData",function(){e.line.wrap.getParent()&&(e.line.detach(),t.once("getData",function(){e.line.attach()},null,null,1e3))},null,null,0),n.attachListener(e.inInlineMode?r:r.getWindow().getFrame(),"mouseout",function(n){var u,n,i,r;"wysiwyg"==t.mode&&(e.inInlineMode?(u=n.data.$.clientX,n=n.data.$.clientY,p(e),y(e,!0),i=e.view.editable,r=e.view.scroll,u>i.left-r.x&&u<i.right-r.x&&n>i.top-r.y&&n<i.bottom-r.y||(clearTimeout(l),l=null,e.line.detach())):(clearTimeout(l),l=null,e.line.detach()))}),n.attachListener(n,"keyup",function(){e.hiddenMode=0}),n.attachListener(n,"keydown",function(n){if("wysiwyg"==t.mode)switch(n=n.data.getKeystroke(),t.getSelection().getStartElement(),n){case 2228240:case 16:e.hiddenMode=1;e.line.detach()}}),n.attachListener(e.inInlineMode?n:r,"mousemove",function(n){if(v=!0,!("wysiwyg"!=t.mode||l)){var i={x:n.data.$.clientX,y:n.data.$.clientY};l=setTimeout(function(){e.mouse=i;l=e.trigger=null;p(e);v&&!e.hiddenMode&&t.focusManager.hasFocus&&!e.line.mouseNear()&&(e.element=dt(e,!0))&&((e.trigger=ct(e)||lt(e)||gt(e))?e.line.attach().place():(e.trigger=null,e.line.detach()),v=!1)},30)}}),n.attachListener(a,"scroll",function(){"wysiwyg"==t.mode&&(e.line.detach(),i.webkit&&(e.hiddenMode=1,clearTimeout(k),k=setTimeout(function(){e.hiddenMode=0},50)))}),n.attachListener(a,"mousedown",function(){"wysiwyg"==t.mode&&(e.line.detach(),e.hiddenMode=1)}),n.attachListener(a,"mouseup",function(){e.hiddenMode=0}),t.addCommand("accessPreviousSpace",st(e)),t.addCommand("accessNextSpace",st(e,!0)),t.setKeystroke([[o.magicline_keystrokePrevious,"accessPreviousSpace"],[o.magicline_keystrokeNext,"accessNextSpace"]]),t.on("loadSnapshot",function(){for(var t=r.getElementsByTag(e.enterBehavior),n,i=t.count();i--;)if((n=t.getItem(i)).hasAttribute("data-cke-magicline-hot")){e.hotNode=n;e.lastCmdDirection="true"===n.getAttribute("data-cke-magicline-dir")?!0:!1;break}}),this.backdoor={accessFocusSpace:it,boxTrigger:s,isLine:h,getAscendantTrigger:tt,getNonEmptyNeighbour:f,getSize:rt,that:e,triggerEdge:lt,triggerEditable:ct,triggerExpand:gt})},this)}});var u=CKEDITOR.tools.extend,ut=CKEDITOR.dom.element,w=ut.createFromHtml,i=CKEDITOR.env,c=CKEDITOR.dtd,b=128,at=64,ft=32,k=16,vt=8,l=4,a=2,e=1,d=" ",yt=c.$listItem,ui=c.$tableContent,fi=u({},c.$nonEditable,c.$empty),pt=c.$block,wt=100,et="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",bt=et+"border-color:transparent;display:block;border-style:solid;",kt="<span>"+d+"<\/span>";s.prototype={set:function(n,t,i){return this.properties=n+t+(i||e),this},is:function(n){return(this.properties&n)==n}};var dt=function(){return function(n,t,r){if(!n.mouse)return null;var f=n.doc,e=n.line.wrap,r=r||n.mouse,u=new CKEDITOR.dom.element(f.$.elementFromPoint(r.x,r.y));return t&&h(n,u)&&(e.hide(),u=new CKEDITOR.dom.element(f.$.elementFromPoint(r.x,r.y)),e.show()),!u||!(u.type==CKEDITOR.NODE_ELEMENT&&u.$)||i.ie&&9>i.version&&!n.boundary.equals(u)&&!n.boundary.contains(u)?null:u}}(),g=CKEDITOR.dom.walker.whitespaces(),nt=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),gt=function(){function u(r){var e=r.element,u,f,o,l,s,h,c;if(!n(e)||e.contains(r.editable))return null;if(o=ri(r,function(n,t){return!t.equals(n)},function(n,t){return dt(n,!0,t)},e),u=o.upper,f=o.lower,ot(r,u,f))return o.set(ft,vt);if(u&&e.contains(u))for(;!u.getParent().equals(e);)u=u.getParent();else u=e.getFirst(function(n){return i(r,n)});if(f&&e.contains(f))for(;!f.getParent().equals(e);)f=f.getParent();else f=e.getLast(function(n){return i(r,n)});if(!u||!f||(t(r,u),t(r,f),!(r.mouse.y>u.size.top&&r.mouse.y<f.size.bottom)))return null;for(e=Number.MAX_VALUE;f&&!f.equals(u)&&(s=u.getNext(r.isRelevant));)l=Math.abs(ni(r,u,s)-r.mouse.y),l<e&&(e=l,h=u,c=s),u=s,t(r,u);return!h||!c||!(r.mouse.y>h.size.top&&r.mouse.y<c.size.bottom)?null:(o.upper=h,o.lower=c,o.set(ft,vt))}function i(n,t){return!(t&&t.type==CKEDITOR.NODE_TEXT||nt(t)||r(t)||h(n,t)||t.type==CKEDITOR.NODE_ELEMENT&&t.$&&t.is("br"))}return function(n){var f=u(n),t,i;return(t=f)&&(t=f.upper,i=f.lower,t=!t||!i||r(i)||r(t)||i.equals(t)||t.equals(i)||i.contains(t)||t.contains(i)?!1:v(n,t)&&v(n,i)&&ot(n,t,i)?!0:!1),t?f:null}}(),o=["top","left","right","bottom"]}();CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.ALT+219;CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.ALT+221,function(){function t(n){var t;if(!n||n.type!=CKEDITOR.NODE_ELEMENT||"form"!=n.getName())return[];for(var r=[],u=["style","className"],i=0;i<u.length;i++)t=n.$.elements.namedItem(u[i]),t&&(t=new CKEDITOR.dom.element(t),r.push([t,t.nextSibling]),t.remove());return r}function i(n,t){var i,r,u;if(n&&!(n.type!=CKEDITOR.NODE_ELEMENT||"form"!=n.getName())&&0<t.length)for(i=t.length-1;0<=i;i--)r=t[i][0],u=t[i][1],u?r.insertBefore(u):r.appendTo(n)}function n(n,r){var e=t(n),f={},u=n.$;return r||(f["class"]=u.className||"",u.className=""),f.inline=u.style.cssText||"",r||(u.style.cssText="position: static; overflow: visible"),i(e),f}function r(n,r){var f=t(n),u=n.$;"class"in r&&(u.className=r["class"]);"inline"in r&&(u.style.cssText=r.inline);i(f)}function u(n){var i=CKEDITOR.instances,r,t;for(r in i)t=i[r],"wysiwyg"!=t.mode||t.readOnly||(t=t.document.getBody(),t.setAttribute("contentEditable",!1),t.setAttribute("contentEditable",!0));n.editable().hasFocus&&(n.toolbox.focus(),n.focus())}CKEDITOR.plugins.add("maximize",{init:function(t){function h(){var n=i.getViewPaneSize();t.resize(n.width,n.height,null,!0)}if(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var c=t.lang,s=CKEDITOR.document,i=s.getWindow(),f,e,o,l=CKEDITOR.TRISTATE_OFF;t.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var y=t.container.getChild(1),v=t.ui.space("contents"),a,p;if("wysiwyg"==t.mode?(a=t.getSelection(),f=a&&a.getRanges(),e=i.getScrollPosition()):(p=t.editable().$,f=!CKEDITOR.env.ie&&[p.selectionStart,p.selectionEnd],e=[p.scrollLeft,p.scrollTop]),this.state==CKEDITOR.TRISTATE_OFF){i.on("resize",h);for(o=i.getScrollPosition(),a=t.container;a=a.getParent();)a.setCustomData("maximize_saved_styles",n(a)),a.setStyle("z-index",t.config.baseFloatZIndex-5);v.setCustomData("maximize_saved_styles",n(v,!0));y.setCustomData("maximize_saved_styles",n(y,!0));v={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};s.getDocumentElement().setStyles(v);CKEDITOR.env.gecko||s.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||s.getBody().setStyles(v);CKEDITOR.env.ie?setTimeout(function(){i.$.scrollTo(0,0)},0):i.$.scrollTo(0,0);y.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");y.$.offsetLeft;y.setStyles({"z-index":t.config.baseFloatZIndex-5,left:"0px",top:"0px"});y.addClass("cke_maximized");h();v=y.getDocumentPosition();y.setStyles({left:-1*v.x+"px",top:-1*v.y+"px"});CKEDITOR.env.gecko&&u(t)}else if(this.state==CKEDITOR.TRISTATE_ON){for(i.removeListener("resize",h),v=[v,y],a=0;a<v.length;a++)r(v[a],v[a].getCustomData("maximize_saved_styles")),v[a].removeCustomData("maximize_saved_styles");for(a=t.container;a=a.getParent();)r(a,a.getCustomData("maximize_saved_styles")),a.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){i.$.scrollTo(o.x,o.y)},0):i.$.scrollTo(o.x,o.y);y.removeClass("cke_maximized");CKEDITOR.env.webkit&&(y.setStyle("display","inline"),setTimeout(function(){y.setStyle("display","block")},0));t.fire("resize")}this.toggleState();(a=this.uiItems[0])&&(v=this.state==CKEDITOR.TRISTATE_OFF?c.maximize.maximize:c.maximize.minimize,a=CKEDITOR.document.getById(a._.id),a.getChild(1).setHtml(v),a.setAttribute("title",v),a.setAttribute("href",'javascript:void("'+v+'");'));"wysiwyg"==t.mode?f?(CKEDITOR.env.gecko&&u(t),t.getSelection().selectRanges(f),(p=t.getSelection().getStartElement())&&p.scrollIntoView(!0)):i.$.scrollTo(e.x,e.y):(f&&(p.selectionStart=f[0],p.selectionEnd=f[1]),p.scrollLeft=e[0],p.scrollTop=e[1]);f=e=null;l=this.state;t.fire("maximize",this.state)},canUndo:!1});t.ui.addButton&&t.ui.addButton("Maximize",{label:c.maximize.maximize,command:"maximize",toolbar:"tools,10"});t.on("mode",function(){var n=t.getCommand("maximize");n.setState(n.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:l)},null,null,100)}}})}(),function(){var n={canUndo:!1,async:!0,exec:function(t){t.getClipboardData({title:t.lang.pastetext.title},function(i){i&&t.fire("paste",{type:"text",dataValue:i.dataValue});t.fire("afterCommandExec",{name:"pastetext",command:n,returnValue:!!i})})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(t){if(t.addCommand("pastetext",n),t.ui.addButton&&t.ui.addButton("PasteText",{label:t.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"}),t.config.forcePasteAsPlainText)t.on("beforePaste",function(n){"html"!=n.data.type&&(n.data.type="text")});t.on("pasteState",function(n){t.getCommand("pastetext").setState(n.data)})}})}(),function(){function n(n,t,i){var r=CKEDITOR.cleanWord;return r?i():(n=CKEDITOR.getUrl(n.config.pasteFromWordCleanupFile||t+"filter/default.js"),CKEDITOR.scriptLoader.load(n,i,null,!0)),!r}function t(n){n.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(i){var r=0,u=this.path;i.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(n){var i=this;r=1;n.once("beforePaste",t);n.getClipboardData({title:n.lang.pastefromword.title},function(t){t&&n.fire("paste",{type:"html",dataValue:t.dataValue});n.fire("afterCommandExec",{name:"pastefromword",command:i,returnValue:!!t})})}});i.ui.addButton&&i.ui.addButton("PasteFromWord",{label:i.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});i.on("pasteState",function(n){i.getCommand("pastefromword").setState(n.data)});i.on("paste",function(t){var f=t.data,e=f.dataValue,o;e&&(r||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(e))&&(o=n(i,u,function(){o?i.fire("paste",f):(!i.config.pasteFromWordPromptCleanup||r||confirm(i.lang.pastefromword.confirmCleanup))&&(f.dataValue=CKEDITOR.cleanWord(e,i))}),o&&t.cancel())},null,null,3)}})}();CKEDITOR.plugins.add("removeformat",{init:function(n){n.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);n.ui.addButton&&n.ui.addButton("RemoveFormat",{label:n.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}});CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(n){for(var e=n._.removeFormatRegex||(n._.removeFormatRegex=RegExp("^(?:"+n.config.removeFormatTags.replace(/,/g,"|")+")$","i")),h=n._.removeAttributes||(n._.removeAttributes=n.config.removeFormatAttributes.split(",")),o=CKEDITOR.plugins.removeformat.filter,s=n.getSelection().getRanges(1),c=s.createIterator(),i;i=c.getNextRange();){i.collapsed||i.enlarge(CKEDITOR.ENLARGE_ELEMENT);var u=i.createBookmark(),t=u.startNode,f=u.endNode,r=function(t){for(var r=n.elementPath(t),f=r.elements,u=1,i;(i=f[u])&&!i.equals(r.block)&&!i.equals(r.blockLimit);u++)e.test(i.getName())&&o(n,i)&&t.breakParent(i)};if(r(t),f)for(r(f),t=t.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);t&&!t.equals(f);)r=t.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),!("img"==t.getName()&&t.data("cke-realelement"))&&o(n,t)&&(e.test(t.getName())?t.remove(1):(t.removeAttributes(h),n.fire("removeFormatCleanup",t))),t=r;i.moveToBookmark(u)}n.forceNextSelectionCheck();n.getSelection().selectRanges(s)}}},filter:function(n,t){for(var r=n._.removeFormatFilters||[],i=0;i<r.length;i++)if(!1===r[i](t))return!1;return!0}};CKEDITOR.editor.prototype.addRemoveFormatFilter=function(n){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(n)};CKEDITOR.config.removeFormatTags="b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var";CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",function(){CKEDITOR.plugins.add("sourcearea",{init:function(t){function i(){this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show()}if(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var r=CKEDITOR.plugins.sourcearea;t.addMode("source",function(r){var u=t.ui.space("contents").getDocument().createElement("textarea");u.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)));u.addClass("cke_source cke_reset cke_enable_context_menu");t.ui.space("contents").append(u);u=t.editable(new n(t,u));u.setData(t.getData(1));CKEDITOR.env.ie&&(u.attachListener(t,"resize",i,u),u.attachListener(CKEDITOR.document.getWindow(),"resize",i,u),CKEDITOR.tools.setTimeout(i,0,u));t.fire("ariaWidget",this);r()});t.addCommand("source",r.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 n=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(n){this.setValue(n);this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(n){this[(n?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){n.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}();CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(n){"wysiwyg"==n.mode&&n.fire("saveSnapshot");n.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);n.setMode("source"==n.mode?"wysiwyg":"source")},canUndo:!1}}};CKEDITOR.plugins.add("specialchar",{availableLangs:{ca:1,cs:1,cy:1,de:1,en:1,eo:1,et:1,fa:1,fi:1,fr:1,he:1,hr:1,it:1,ku:1,lv:1,nb:1,nl:1,no:1,"pt-br":1,sk:1,sv:1,tr:1,ug:1,"zh-cn":1},requires:"dialog",init:function(n){var t=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");n.addCommand("specialchar",{exec:function(){var i=n.langCode,i=t.availableLangs[i]?i:t.availableLangs[i.replace(/-.*/,"")]?i.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+i+".js"),function(){CKEDITOR.tools.extend(n.lang.specialchar,t.langEntries[i]);n.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});n.ui.addButton&&n.ui.addButton("SpecialChar",{label:n.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}});CKEDITOR.config.specialChars="! &quot; # $ % &amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ? @ 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 { | } ~ &euro; &lsquo; &rsquo; &ldquo; &rdquo; &ndash; &mdash; &iexcl; &cent; &pound; &curren; &yen; &brvbar; &sect; &uml; &copy; &ordf; &laquo; &not; &reg; &macr; &deg; &sup2; &sup3; &acute; &micro; &para; &middot; &cedil; &sup1; &ordm; &raquo; &frac14; &frac12; &frac34; &iquest; &Agrave; &Aacute; &Acirc; &Atilde; &Auml; &Aring; &AElig; &Ccedil; &Egrave; &Eacute; &Ecirc; &Euml; &Igrave; &Iacute; &Icirc; &Iuml; &ETH; &Ntilde; &Ograve; &Oacute; &Ocirc; &Otilde; &Ouml; &times; &Oslash; &Ugrave; &Uacute; &Ucirc; &Uuml; &Yacute; &THORN; &szlig; &agrave; &aacute; &acirc; &atilde; &auml; &aring; &aelig; &ccedil; &egrave; &eacute; &ecirc; &euml; &igrave; &iacute; &icirc; &iuml; &eth; &ntilde; &ograve; &oacute; &ocirc; &otilde; &ouml; &divide; &oslash; &ugrave; &uacute; &ucirc; &uuml; &yacute; &thorn; &yuml; &OElig; &oelig; &#372; &#374 &#373 &#375; &sbquo; &#8219; &bdquo; &hellip; &trade; &#9658; &bull; &rarr; &rArr; &hArr; &diams; &asymp;".split(" ");CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var n=function(n){var t=this._,i;t.state!==CKEDITOR.TRISTATE_DISABLED&&(t.previousState=t.state,i=t.menu,i||(i=t.menu=new CKEDITOR.menu(n,{panel:{className:"cke_menu_panel",attributes:{"aria-label":n.lang.common.options}}}),i.onHide=CKEDITOR.tools.bind(function(){this.setState(this.modes&&this.modes[n.mode]?t.previousState:CKEDITOR.TRISTATE_DISABLED)},this),this.onMenu&&i.addListener(this.onMenu)),t.on?i.hide():(this.setState(CKEDITOR.TRISTATE_ON),setTimeout(function(){i.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=n},statics:{handler:{create:function(n){return new CKEDITOR.ui.menuButton(n)}}}})},beforeInit:function(n){n.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}});CKEDITOR.UI_MENUBUTTON="menubutton",function(){function t(n,t){var i=0;for(var r in t)if(t[r]==n){i=1;break}return i}var r="",u=function(){function e(){t.once("focus",f);t.once("blur",u)}function u(t){var t=t.editor,i=n.getScayt(t),r=t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE;i&&(n.setPaused(t,!i.disabled),n.setControlId(t,i.id),i.destroy(!0),delete n.instances[t.name],r&&e())}var t=this,f=function(){var r,i,f,u;if(!("undefined"!=typeof n.instances[t.name]||null!=n.instances[t.name])){if(r=t.config,i={},i.srcNodeRef="BODY"==t.editable().$.nodeName?t.document.getWindow().$.frameElement:t.editable().$,i.assocApp="CKEDITOR."+CKEDITOR.version+"@"+CKEDITOR.revision,i.customerid=r.scayt_customerid||"1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2",i.customDictionaryIds=r.scayt_customDictionaryIds||"",i.userDictionaryName=r.scayt_userDictionaryName||"",i.sLang=r.scayt_sLang||"en_US",i.onLoad=function(){CKEDITOR.env.ie&&8>CKEDITOR.env.version||this.addStyle(this.selectorCss(),"padding-bottom: 2px !important;");t.editable().hasFocus&&!n.isControlRestored(t)&&this.focus()},i.onBeforeChange=function(){n.getScayt(t)&&!t.checkDirty()&&setTimeout(function(){t.resetDirty()},0)},r=window.scayt_custom_params,"object"==typeof r)for(f in r)i[f]=r[f];n.getControlId(t)&&(i.id=n.getControlId(t));u=new window.scayt(i);u.afterMarkupRemove.push(function(n){new CKEDITOR.dom.element(n,u.document).mergeSiblings()});(i=n.instances[t.name])&&(u.sLang=i.sLang,u.option(i.option()),u.paused=i.paused);n.instances[t.name]=u;try{u.setDisabled(!1===n.isPaused(t))}catch(e){}t.fire("showScaytState")}},i;t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e():t.on("contentDom",f);t.on("contentDomUnload",function(){for(var i=CKEDITOR.document.getElementsByTag("script"),n=0;n<i.count();n++){var t=i.getItem(n),r=t.getId(),u=t.getAttribute("src");r&&u&&r.match(/^dojoIoScript(\d+)$/i)&&u.match(/^https?:\/\/svc\.webspellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i)&&t.remove()}});t.on("beforeCommandExec",function(i){"source"==i.data.name&&"source"==t.mode&&n.markControlRestore(t)});t.on("afterCommandExec",function(i){n.isScaytEnabled(t)&&"wysiwyg"==t.mode&&("undo"==i.data.name||"redo"==i.data.name)&&window.setTimeout(function(){n.getScayt(t).refresh()},10)});t.on("destroy",u);t.on("setData",u);t.on("insertElement",function(){var i=n.getScayt(t);n.isScaytEnabled(t)&&(CKEDITOR.env.ie&&t.getSelection().unlock(!0),window.setTimeout(function(){i.focus();i.refresh()},10))},this,null,50);t.on("insertHtml",function(){var i=n.getScayt(t);n.isScaytEnabled(t)&&(CKEDITOR.env.ie&&t.getSelection().unlock(!0),window.setTimeout(function(){i.focus();i.refresh()},10))},this,null,50);t.on("scaytDialog",function(i){i.data.djConfig=window.djConfig;i.data.scayt_control=n.getScayt(t);i.data.tab=r;i.data.scayt=window.scayt});i=t.dataProcessor;(i=i&&i.htmlFilter)&&i.addRules({elements:{span:function(n){if(n.attributes["data-scayt_word"]&&n.attributes["data-scaytid"])return delete n.name,n}}});i=CKEDITOR.plugins.undo.Image.prototype;i.equals=CKEDITOR.tools.override(i.equals,function(t){return function(i){var u=this.contents,f=i.contents,r=n.getScayt(this.editor);return r&&n.isScaytReady(this.editor)&&(this.contents=r.reset(u)||"",i.contents=r.reset(f)||""),r=t.apply(this,arguments),this.contents=u,i.contents=f,r}});t.document&&(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE||t.focusManager.hasFocus)&&f()};CKEDITOR.plugins.scayt={engineLoaded:!1,instances:{},controlInfo:{},setControlInfo:function(n,t){n&&n.name&&"object"!=typeof this.controlInfo[n.name]&&(this.controlInfo[n.name]={});for(var i in t)this.controlInfo[n.name][i]=t[i]},isControlRestored:function(n){return n&&n.name&&this.controlInfo[n.name]?this.controlInfo[n.name].restored:!1},markControlRestore:function(n){this.setControlInfo(n,{restored:!0})},setControlId:function(n,t){this.setControlInfo(n,{id:t})},getControlId:function(n){return n&&n.name&&this.controlInfo[n.name]&&this.controlInfo[n.name].id?this.controlInfo[n.name].id:null},setPaused:function(n,t){this.setControlInfo(n,{paused:t})},isPaused:function(n){if(n&&n.name&&this.controlInfo[n.name])return this.controlInfo[n.name].paused},getScayt:function(n){return this.instances[n.name]},isScaytReady:function(n){return!0===this.engineLoaded&&"undefined"!=typeof scayt&&this.getScayt(n)},isScaytEnabled:function(n){return(n=this.getScayt(n))?!1===n.disabled:!1},getUiTabs:function(n){var i=[],r=n.config.scayt_uiTabs||"1,1,1",r=r.split(","),t;for(r[3]="1",t=0;4>t;t++)i[t]="undefined"!=typeof scayt&&"undefined"!=typeof window.scayt.uiTags?parseInt(r[t],10)&&window.scayt.uiTags[t]:parseInt(r[t],10);return"object"==typeof n.plugins.wsc?i.push(1):i.push(0),i},loadEngine:function(t){if(CKEDITOR.env.gecko&&10900>CKEDITOR.env.version||CKEDITOR.env.opera||CKEDITOR.env.air)return t.fire("showScaytState");if(!0===this.engineLoaded)return u.apply(t);if(-1==this.engineLoaded)return CKEDITOR.on("scaytReady",function(){u.apply(t)});CKEDITOR.on("scaytReady",u,t);CKEDITOR.on("scaytReady",function(){this.engineLoaded=!0},this,null,0);this.engineLoaded=-1;var i=document.location.protocol,i=-1!=i.search(/https?:/)?i:"http:",i=t.config.scayt_srcUrl||i+"//svc.webspellchecker.net/scayt26/loader__base.js",r=n.parseUrl(i).path+"/";return void 0==window.scayt?(CKEDITOR._djScaytConfig={baseUrl:r,addOnLoad:[function(){CKEDITOR.fireOnce("scaytReady")}],isDebug:!1},CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",async:"true",src:i}}))):CKEDITOR.fireOnce("scaytReady"),null},parseUrl:function(n){var t;return n.match&&(t=n.match(/(.*)[\/\\](.*?\.\w+)$/))?{path:t[1],file:t[2]}:n}};var n=CKEDITOR.plugins.scayt,i=function(n,t,i,r,u,f,e){n.addCommand(r,u);n.addMenuItem(r,{label:i,command:r,group:f,order:e})},f={preserveState:!0,editorFocus:!1,canUndo:!1,exec:function(t){if(n.isScaytReady(t)){var i=n.isScaytEnabled(t);this.setState(i?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_ON);t=n.getScayt(t);t.focus();t.setDisabled(i)}else!t.config.scayt_autoStartup&&0<=n.engineLoaded&&(t.focus(),this.setState(CKEDITOR.TRISTATE_DISABLED),n.loadEngine(t))}};CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",beforeInit:function(n){var t=n.config.scayt_contextMenuItemsOrder||"suggest|moresuggest|control",r="",i;if((t=t.split("|"))&&t.length)for(i=0;i<t.length;i++)r+="scayt_"+t[i]+(t.length!=parseInt(i,10)+1?",":"");n.config.menu_groups=r+","+n.config.menu_groups},init:function(u){var o=u.dataProcessor&&u.dataProcessor.dataFilter,s={elements:{span:function(n){var t=n.attributes;t&&t["data-scaytid"]&&delete n.name}}},e;o&&o.addRules(s);var c={},h={},l=u.addCommand("scaytcheck",f);CKEDITOR.dialog.add("scaytcheck",CKEDITOR.getUrl(this.path+"dialogs/options.js"));o=n.getUiTabs(u);u.addMenuGroup("scaytButton");u.addMenuGroup("scayt_suggest",-10);u.addMenuGroup("scayt_moresuggest",-9);u.addMenuGroup("scayt_control",-8);s={};e=u.lang.scayt;s.scaytToggle={label:e.enable,command:"scaytcheck",group:"scaytButton"};1==o[0]&&(s.scaytOptions={label:e.options,group:"scaytButton",onClick:function(){r="options";u.openDialog("scaytcheck")}});1==o[1]&&(s.scaytLangs={label:e.langs,group:"scaytButton",onClick:function(){r="langs";u.openDialog("scaytcheck")}});1==o[2]&&(s.scaytDict={label:e.dictionariesTab,group:"scaytButton",onClick:function(){r="dictionaries";u.openDialog("scaytcheck")}});s.scaytAbout={label:u.lang.scayt.about,group:"scaytButton",onClick:function(){r="about";u.openDialog("scaytcheck")}};1==o[4]&&(s.scaytWSC={label:u.lang.wsc.toolbar,group:"scaytButton",command:"checkspell"});u.addMenuItems(s);u.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:e.title,title:CKEDITOR.env.opera?e.opera_title:e.title,modes:{wysiwyg:1},toolbar:"spellchecker,20",onRender:function(){l.on("state",function(){this.setState(l.state)},this)},onMenu:function(){var i=n.isScaytEnabled(u),t;return u.getMenuItem("scaytToggle").label=e[i?"disable":"enable"],t=n.getUiTabs(u),{scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:i&&t[0]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:i&&t[1]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:i&&t[2]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:i&&t[3]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytWSC:t[4]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}});u.contextMenu&&u.addMenuItems&&u.contextMenu.addListener(function(r,f){var l,a,o,b,w,s,d,p,k;if(!n.isScaytEnabled(u)||f.getRanges()[0].checkReadOnly()||(l=n.getScayt(u),a=l.getScaytNode(),!a)||(o=l.getWord(a),!o))return null;var b=l.getLang(),v=u.config.scayt_contextCommands||"all",o=window.scayt.getSuggestion(o,b),v=v.split("|");for(var y in c)delete u._.menuItems[y],delete u.commands[y];for(y in h)delete u._.menuItems[y],delete u.commands[y];if(o&&o.length){for(c={},h={},y=u.config.scayt_moreSuggestions||"on",b=!1,w=u.config.scayt_maxSuggestions,typeof w!="number"&&(w=5),w||(w=o.length),s=0,d=o.length;s<d;s=s+1)p="scayt_suggestion_"+o[s].replace(" ","_"),k=function(n,t){return{exec:function(){l.replace(n,t)}}}(a,o[s]),s<w?(i(u,"button_"+p,o[s],p,k,"scayt_suggest",s+1),h[p]=CKEDITOR.TRISTATE_OFF):y=="on"&&(i(u,"button_"+p,o[s],p,k,"scayt_moresuggest",s+1),c[p]=CKEDITOR.TRISTATE_OFF,b=!0);b&&(u.addMenuItem("scayt_moresuggest",{label:e.moreSuggestions,group:"scayt_moresuggest",order:10,getItems:function(){return c}}),h.scayt_moresuggest=CKEDITOR.TRISTATE_OFF)}else i(u,"no_sugg",e.noSuggestions,"scayt_no_sugg",{exec:function(){}},"scayt_control",1,!0),h.scayt_no_sugg=CKEDITOR.TRISTATE_OFF;return(t("all",v)||t("ignore",v))&&(i(u,"ignore",e.ignore,"scayt_ignore",{exec:function(){l.ignore(a)}},"scayt_control",2),h.scayt_ignore=CKEDITOR.TRISTATE_OFF),(t("all",v)||t("ignoreall",v))&&(i(u,"ignore_all",e.ignoreAll,"scayt_ignore_all",{exec:function(){l.ignoreAll(a)}},"scayt_control",3),h.scayt_ignore_all=CKEDITOR.TRISTATE_OFF),(t("all",v)||t("add",v))&&(i(u,"add_word",e.addWord,"scayt_add_word",{exec:function(){window.scayt.addWordToUserDictionary(a)}},"scayt_control",4),h.scayt_add_word=CKEDITOR.TRISTATE_OFF),l.fireOnContextMenu&&l.fireOnContextMenu(u),h});o=function(t){t.removeListener();CKEDITOR.env.opera||CKEDITOR.env.air?l.setState(CKEDITOR.TRISTATE_DISABLED):l.setState(n.isScaytEnabled(u)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)};u.on("showScaytState",o);u.on("instanceReady",o);if(u.config.scayt_autoStartup)u.on("instanceReady",function(){n.loadEngine(u)})},afterInit:function(n){var t,i=function(n){if(n.hasAttribute("data-scaytid"))return!1};n._.elementsPath&&(t=n._.elementsPath.filters)&&t.push(i);n.addRemoveFormatFilter&&n.addRemoveFormatFilter(i)}})}(),function(){function n(n,t){var r=n.type,i=t.type;return r==i?0:r==CKEDITOR.STYLE_OBJECT?-1:i==CKEDITOR.STYLE_OBJECT?1:i==CKEDITOR.STYLE_BLOCK?1:-1}CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(t){function e(i){t.getStylesSet(function(r){if(!f.length){for(var e,s,h=0,c=r.length;h<c;h++)e=r[h],t.blockless&&e.element in CKEDITOR.dtd.$block||(s=e.name,e=u[s]=new CKEDITOR.style(e),e._name=s,e._.enterMode=o.enterMode,f.push(e));f.sort(n)}i&&i()})}var o=t.config,r=t.lang.stylescombo,u={},f=[],i;t.ui.addRichCombo("Styles",{label:r.label,title:r.panelTitle,toolbar:"styles,10",panel:{css:[CKEDITOR.skin.getPath("editor")].concat(o.contentsCss),multiSelect:!0,attributes:{"aria-label":r.panelTitle}},init:function(){i=this;e(function(){for(var n,t,o,u,e=0,s=f.length;e<s;e++)n=f[e],t=n._name,u=n.type,u!=o&&(i.startGroup(r["panelTitle"+u]),o=u),i.add(t,n.type==CKEDITOR.STYLE_OBJECT?t:n.buildPreview(),t);i.commit()})},onClick:function(n){t.focus();t.fire("saveSnapshot");var n=u[n],i=t.elementPath();t[n.checkActive(i)?"removeStyle":"applyStyle"](n);t.fire("saveSnapshot")},onRender:function(){t.on("selectionChange",function(n){for(var t,f=this.getValue(),n=n.data.path.elements,i=0,e=n.length,r;i<e;i++){r=n[i];for(t in u)if(u[t].checkElementRemovable(r,!0)){t!=f&&this.setValue(t);return}}this.setValue("")},this)},onOpen:function(){var o=t.getSelection().getSelectedElement(),o=t.elementPath(o),n=[0,0,0,0],i,f,e;this.showAll();this.unmarkAll();for(i in u)f=u[i],e=f.type,e==CKEDITOR.STYLE_BLOCK&&!o.isContextFor(f.element)?this.hideItem(i):(f.checkActive(o)?this.mark(i):e==CKEDITOR.STYLE_OBJECT&&!f.checkApplicable(o)&&(this.hideItem(i),n[e]--),n[e]++);n[CKEDITOR.STYLE_BLOCK]||this.hideGroup(r["panelTitle"+CKEDITOR.STYLE_BLOCK]);n[CKEDITOR.STYLE_INLINE]||this.hideGroup(r["panelTitle"+CKEDITOR.STYLE_INLINE]);n[CKEDITOR.STYLE_OBJECT]||this.hideGroup(r["panelTitle"+CKEDITOR.STYLE_OBJECT])},reset:function(){i&&(delete i._.panel,delete i._.list,i._.committed=0,i._.items={},i._.state=CKEDITOR.TRISTATE_OFF);u={};f=[];e()}});t.on("instanceReady",function(){e()})}})}(),function(){function n(n){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(t){var u,i,r,o;if(t.editable().hasFocus&&(i=t.getSelection(),u=new CKEDITOR.dom.elementPath(i.getCommonAncestor(),i.root).contains({td:1,th:1},1))){if(i=t.createRange(),r=CKEDITOR.tools.tryThese(function(){var t=u.getParent().$.cells[u.$.cellIndex+(n?-1:1)];return t.parentNode.parentNode,t},function(){var t=u.getParent(),t=t.getAscendant("table").$.rows[t.$.rowIndex+(n?-1:1)];return t.cells[n?t.cells.length-1:0]}),r||n)if(r)r=new CKEDITOR.dom.element(r),i.moveToElementEditStart(r),(!i.checkStartOfBlock()||!i.checkEndOfBlock())&&i.selectNodeContents(r);else return!0;else{for(var f=u.getAscendant("table").$,r=u.getParent().$.cells,f=new CKEDITOR.dom.element(f.insertRow(-1),t.document),e=0,s=r.length;e<s;e++)o=f.append(new CKEDITOR.dom.element(r[e],t.document).clone(!1,!1)),CKEDITOR.env.ie||o.appendBogus();i.moveToElementEditStart(f)}return i.select(!0),!0}return!1}}}var t={editorFocus:!1,modes:{wysiwyg:1,source:1}},i={exec:function(n){n.container.focusNext(!0,n.tabIndex)}},r={exec:function(n){n.container.focusPrevious(!0,n.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(u){for(var e=!1!==u.config.enableTabKeyTools,o=u.config.tabSpaces||0,f="";o--;)f+=" ";if(f)u.on("key",function(n){9==n.data.keyCode&&(u.insertHtml(f),n.cancel())});if(e)u.on("key",function(n){(9==n.data.keyCode&&u.execCommand("selectNextCell")||n.data.keyCode==CKEDITOR.SHIFT+9&&u.execCommand("selectPreviousCell"))&&n.cancel()});u.addCommand("blur",CKEDITOR.tools.extend(i,t));u.addCommand("blurBack",CKEDITOR.tools.extend(r,t));u.addCommand("selectNextCell",n());u.addCommand("selectPreviousCell",n(!0))}})}();CKEDITOR.dom.element.prototype.focusNext=function(n,t){var o=void 0===t?this.getTabIndex():t,f,s,r,e,i,u;if(0>=o)for(i=this.getNextSourceNode(n,CKEDITOR.NODE_ELEMENT);i;){if(i.isVisible()&&0===i.getTabIndex()){r=i;break}i=i.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(i=this.getDocument().getBody().getFirst();i=i.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!s&&i.equals(this)){if(s=!0,n){if(!(i=i.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else s&&!this.contains(i)&&(f=1);if(i.isVisible()&&!(0>(u=i.getTabIndex()))){if(f&&u==o){r=i;break}u>o&&(!r||!e||u<e)?(r=i,e=u):!r&&0===u&&(r=i,e=u)}}r&&r.focus()};CKEDITOR.dom.element.prototype.focusPrevious=function(n,t){for(var o=void 0===t?this.getTabIndex():t,f,s,u,e=0,r,i=this.getDocument().getBody().getLast();i=i.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!s&&i.equals(this)){if(s=!0,n){if(!(i=i.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else s&&!this.contains(i)&&(f=1);if(i.isVisible()&&!(0>(r=i.getTabIndex())))if(0>=o){if(f&&0===r){u=i;break}r>e&&(u=i,e=r)}else{if(f&&r==o){u=i;break}r<o&&(!u||r>e)&&(u=i,e=r)}}u&&u.focus()};CKEDITOR.plugins.add("table",{requires:"dialog",init:function(n){function i(n){return CKEDITOR.tools.extend(n||{},{contextSensitive:1,refresh:function(n,t){this.setState(t.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!n.blockless){var t=n.lang.table;n.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table"}));n.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",i()));n.addCommand("tableDelete",i({exec:function(n){var t=n.elementPath().contains("table",1),i;t&&(i=t.getParent(),1!=i.getChildCount()||i.is("body","td","th")||(t=i),n=n.createRange(),n.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START),t.remove(),n.select())}}));n.ui.addButton&&n.ui.addButton("Table",{label:t.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");n.addMenuItems&&n.addMenuItems({table:{label:t.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:t.deleteTable,command:"tableDelete",group:"table",order:1}});n.on("doubleclick",function(n){n.data.element.is("table")&&(n.data.dialog="tableProperties")});n.contextMenu&&n.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function n(n){function e(n){0<r.length||n.type!=CKEDITOR.NODE_ELEMENT||!a.test(n.getName())||n.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(u,n,"selected_cell",!0),r.push(n))}for(var t,i,n=n.getRanges(),r=[],u={},f=0;f<n.length;f++)if(t=n[f],t.collapsed)t=t.getCommonAncestor(),(t=t.getAscendant("td",!0)||t.getAscendant("th",!0))&&r.push(t);else for(t=new CKEDITOR.dom.walker(t),t.guard=e;i=t.next();)i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.table)||(i=i.getAscendant("td",!0)||i.getAscendant("th",!0))&&!i.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(u,i,"selected_cell",!0),r.push(i));return CKEDITOR.dom.element.clearAllMarkers(u),r}function u(t,i){for(var f,r=n(t),o=r[0],e=o.getAscendant("table"),o=o.getDocument(),h=r[0].getParent(),s=h.$.rowIndex,r=r[r.length-1],u=r.getParent().$.rowIndex+r.$.rowSpan-1,r=new CKEDITOR.dom.element(e.$.rows[u]),s=i?s:u,h=i?h:r,r=CKEDITOR.tools.buildTableMap(e),e=r[s],s=i?r[s-1]:r[s+1],r=r[0].length,o=o.createElement("tr"),u=0;e[u]&&u<r;u++)1<e[u].rowSpan&&s&&e[u]==s[u]?(f=e[u],f.rowSpan+=1):(f=new CKEDITOR.dom.element(e[u]).clone(),f.removeAttribute("rowSpan"),!CKEDITOR.env.ie&&f.appendBogus(),o.append(f),f=f.$),u+=f.colSpan-1;i?o.insertBefore(h):o.insertAfter(h)}function f(t){var e,h;if(t instanceof CKEDITOR.dom.selection){for(var u=n(t),r=u[0].getAscendant("table"),s=CKEDITOR.tools.buildTableMap(r),t=u[0].getParent().$.rowIndex,u=u[u.length-1],c=u.getParent().$.rowIndex+u.$.rowSpan-1,u=[],i=t;i<=c;i++){for(var l=s[i],a=new CKEDITOR.dom.element(r.$.rows[i]),o=0;o<l.length;o++)e=new CKEDITOR.dom.element(l[o]),h=e.getParent().$.rowIndex,1==e.$.rowSpan?e.remove():(e.$.rowSpan-=1,h==i&&(h=s[i+1],h[o-1]?e.insertAfter(new CKEDITOR.dom.element(h[o-1])):new CKEDITOR.dom.element(r.$.rows[i+1]).append(e,1))),o+=e.$.colSpan-1;u.push(a)}for(s=r.$.rows,r=new CKEDITOR.dom.element(s[c+1]||(0<t?s[t-1]:null)||r.$.parentNode),i=u.length;0<=i;i--)f(u[i]);return r}return t instanceof CKEDITOR.dom.element&&(r=t.getAscendant("table"),1==r.$.rows.length?r.remove():t.remove()),null}function e(n,t){for(var i,o,f,r=t?Infinity:0,u=0;u<n.length;u++){i=n[u];for(var h=t,s=i.getParent().$.cells,f=0,e=0;e<s.length;e++)if(o=s[e],f=f+(h?1:o.colSpan),o==i.$)break;i=f-1;(t?i<r:i>r)&&(r=i)}return r}function o(t,i){for(var o=n(t),f=o[0].getAscendant("table"),u=e(o,1),o=e(o),u=i?u:o,s=CKEDITOR.tools.buildTableMap(f),f=[],o=[],h=s.length,r=0;r<h;r++)f.push(s[r][u]),o.push(i?s[r][u-1]:s[r][u+1]);for(r=0;r<h;r++)f[r]&&(1<f[r].colSpan&&o[r]==f[r]?(u=f[r],u.colSpan+=1):(u=new CKEDITOR.dom.element(f[r]).clone(),u.removeAttribute("colSpan"),!CKEDITOR.env.ie&&u.appendBogus(),u[i?"insertBefore":"insertAfter"].call(u,new CKEDITOR.dom.element(f[r])),u=u.$),r+=u.rowSpan-1)}function s(n,t){var i=n.getStartElement(),r;(i=i.getAscendant("td",1)||i.getAscendant("th",1))&&(r=i.clone(),CKEDITOR.env.ie||r.appendBogus(),t?r.insertBefore(i):r.insertAfter(i))}function h(i){var i,f,u,o,s,e,r;if(i instanceof CKEDITOR.dom.selection){i=n(i);f=i[0]&&i[0].getAscendant("table");n:{for(o=0,u=i.length-1,s={};e=i[o++];)CKEDITOR.dom.element.setMarker(s,e,"delete_cell",!0);for(o=0;e=i[o++];)if((r=e.getPrevious())&&!r.getCustomData("delete_cell")||(r=e.getNext())&&!r.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(s);u=r;break n}CKEDITOR.dom.element.clearAllMarkers(s);r=i[0].getParent();(r=r.getPrevious())?u=r.getLast():(r=i[u].getParent(),u=(r=r.getNext())?r.getChild(0):null)}for(r=i.length-1;0<=r;r--)h(i[r]);u?t(u,!0):f&&f.remove()}else i instanceof CKEDITOR.dom.element&&(f=i.getParent(),1==f.getChildCount()?f.remove():i.remove())}function t(n,t){var i=new CKEDITOR.dom.range(n.getDocument());i["moveToElementEdit"+(t?"End":"Start")](n)||(i.selectNodeContents(n),i.collapse(t?!1:!0));i.select(!0)}function i(n,t,i){if(n=n[t],"undefined"==typeof i)return n;for(t=0;n&&t<n.length;t++){if(i.is&&n[t]==i.$)return t;if(t==i)return new CKEDITOR.dom.element(n[t])}return i.is?-1:null}function r(t,r,u){var o=n(t),s,f,t,e,h;if((r?1!=o.length:2>o.length)||(s=t.getCommonAncestor())&&s.type==CKEDITOR.NODE_ELEMENT&&s.is("table"))return!1;t=o[0];s=t.getAscendant("table");var l=CKEDITOR.tools.buildTableMap(s),g=l.length,nt=l[0].length,c=t.getParent().$.rowIndex,p=i(l,c,t);if(r){try{h=parseInt(t.getAttribute("rowspan"),10)||1;f=parseInt(t.getAttribute("colspan"),10)||1;e=l["up"==r?c-h:"down"==r?c+h:c]["left"==r?p-f:"right"==r?p+f:p]}catch(it){return!1}if(!e||t.$==e)return!1;o["up"==r||"left"==r?"unshift":"push"](new CKEDITOR.dom.element(e))}for(var r=t.getDocument(),a=c,h=e=0,w=!u&&new CKEDITOR.dom.documentFragment(r),d=0,r=0;r<o.length;r++){f=o[r];var v=f.getParent(),k=f.getFirst(),y=f.$.colSpan,b=f.$.rowSpan,v=v.$.rowIndex,tt=i(l,v,f),d=d+y*b,h=Math.max(h,tt-p+y);e=Math.max(e,v-c+b);u||(y=f,(b=y.getBogus())&&b.remove(),y.trim(),f.getChildren().count()&&(v==a||!k||k.isBlockBoundary&&k.isBlockBoundary({br:1})||!(a=w.getLast(CKEDITOR.dom.walker.whitespaces(!0)))||a.is&&a.is("br")||w.append("br"),f.moveChildren(w)),r?f.remove():f.setHtml(""));a=v}if(u)return e*h==d;for(w.moveChildren(t),CKEDITOR.env.ie||t.appendBogus(),h>=nt?t.removeAttribute("rowSpan"):t.$.rowSpan=e,e>=g?t.removeAttribute("colSpan"):t.$.colSpan=h,u=new CKEDITOR.dom.nodeList(s.$.rows),o=u.count(),r=o-1;0<=r;r--)s=u.getItem(r),s.$.cells.length||(s.remove(),o++);return t}function c(t,r){var f=n(t);if(1<f.length)return!1;if(r)return!0;var f=f[0],u=f.getParent(),o=u.getAscendant("table"),c=CKEDITOR.tools.buildTableMap(o),s=u.$.rowIndex,l=i(c,s,f),h=f.$.rowSpan,a;if(1<h){a=Math.ceil(h/2);for(var h=Math.floor(h/2),u=s+a,o=new CKEDITOR.dom.element(o.$.rows[u]),c=i(c,u),e,u=f.clone(),s=0;s<c.length;s++)if(e=c[s],e.parentNode==o.$&&s>l){u.insertBefore(new CKEDITOR.dom.element(e));break}else e=null;e||o.append(u,!0)}else for(h=a=1,o=u.clone(),o.insertAfter(u),o.append(u=f.clone()),e=i(c,s),l=0;l<e.length;l++)e[l].rowSpan++;return CKEDITOR.env.ie||u.appendBogus(),f.$.rowSpan=a,u.$.rowSpan=h,1==a&&f.removeAttribute("rowSpan"),1==h&&u.removeAttribute("rowSpan"),u}function l(t,r){var f=n(t),h;if(1<f.length)return!1;if(r)return!0;var f=f[0],e=f.getParent(),u=e.getAscendant("table"),u=CKEDITOR.tools.buildTableMap(u),c=i(u,e.$.rowIndex,f),o=f.$.colSpan;if(1<o)e=Math.ceil(o/2),o=Math.floor(o/2);else{for(var o=e=1,l=[],s=0;s<u.length;s++)h=u[s],l.push(h[c]),1<h[c].rowSpan&&(s+=h[c].rowSpan-1);for(u=0;u<l.length;u++)l[u].colSpan++}return u=f.clone(),u.insertAfter(f),CKEDITOR.env.ie||u.appendBogus(),f.$.colSpan=e,u.$.colSpan=o,1==e&&f.removeAttribute("colSpan"),1==o&&u.removeAttribute("colSpan"),u}var a=/^(?:td|th)$/;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(i){function a(n){return CKEDITOR.tools.extend(n||{},{contextSensitive:1,refresh:function(n,t){this.setState(t.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}var e=i.lang.table;i.addCommand("cellProperties",new CKEDITOR.dialogCommand("cellProperties",a()));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");i.addCommand("rowDelete",a({exec:function(n){n=n.getSelection();t(f(n))}}));i.addCommand("rowInsertBefore",a({exec:function(n){n=n.getSelection();u(n,!0)}}));i.addCommand("rowInsertAfter",a({exec:function(n){n=n.getSelection();u(n)}}));i.addCommand("columnDelete",a({exec:function(i){for(var r,a,i=i.getSelection(),i=n(i),s=i[0],u=i[i.length-1],i=s.getAscendant("table"),o=CKEDITOR.tools.buildTableMap(i),e,h,c=[],f=0,l=o.length;f<l;f++)for(r=0,a=o[f].length;r<a;r++)o[f][r]==s.$&&(e=r),o[f][r]==u.$&&(h=r);for(f=e;f<=h;f++)for(r=0;r<o.length;r++)u=o[r],s=new CKEDITOR.dom.element(i.$.rows[r]),u=new CKEDITOR.dom.element(u[f]),u.$&&(1==u.$.colSpan?u.remove():u.$.colSpan-=1,r+=u.$.rowSpan-1,s.$.cells.length||c.push(s));h=i.$.rows[0]&&i.$.rows[0].cells;e=new CKEDITOR.dom.element(h[e]||(e?h[e-1]:i.$.parentNode));c.length==l&&i.remove();e&&t(e,!0)}}));i.addCommand("columnInsertBefore",a({exec:function(n){n=n.getSelection();o(n,!0)}}));i.addCommand("columnInsertAfter",a({exec:function(n){n=n.getSelection();o(n)}}));i.addCommand("cellDelete",a({exec:function(n){n=n.getSelection();h(n)}}));i.addCommand("cellMerge",a({exec:function(n){t(r(n.getSelection()),!0)}}));i.addCommand("cellMergeRight",a({exec:function(n){t(r(n.getSelection(),"right"),!0)}}));i.addCommand("cellMergeDown",a({exec:function(n){t(r(n.getSelection(),"down"),!0)}}));i.addCommand("cellVerticalSplit",a({exec:function(n){t(c(n.getSelection()))}}));i.addCommand("cellHorizontalSplit",a({exec:function(n){t(l(n.getSelection()))}}));i.addCommand("cellInsertBefore",a({exec:function(n){n=n.getSelection();s(n,!0)}}));i.addCommand("cellInsertAfter",a({exec:function(n){n=n.getSelection();s(n)}}));i.addMenuItems&&i.addMenuItems({tablecell:{label:e.cell.menu,group:"tablecell",order:1,getItems:function(){var t=i.getSelection(),u=n(t);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:r(t,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:r(t,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:r(t,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:c(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:l(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:0<u.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:e.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:e.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:e.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:e.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:e.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:e.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:e.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:e.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:e.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:e.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:e.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:e.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:e.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:e.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:e.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:e.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:e.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}});i.contextMenu&&i.contextMenu.addListener(function(n,t,i){return(n=i.contains({td:1,th:1},1))&&!n.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getSelectedCells:n};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}();CKEDITOR.tools.buildTableMap=function(n){for(var r,e,u,s,n=n.$.rows,t=-1,i=[],f=0;f<n.length;f++)for(t++,i[t]||(i[t]=[]),r=-1,e=0;e<n[f].cells.length;e++){for(u=n[f].cells[e],r++;i[t][r];)r++;for(var h=isNaN(u.colSpan)?1:u.colSpan,u=isNaN(u.rowSpan)?1:u.rowSpan,o=0;o<u;o++)for(i[t+o]||(i[t+o]=[]),s=0;s<h;s++)i[t+o][r+s]=n[f].cells[e];r+=h-1}return i},function(){function i(n){this.editor=n;this.reset()}var n,t;CKEDITOR.plugins.add("undo",{init:function(n){function r(n){t.enabled&&!1!==n.data.command.canUndo&&t.save()}var t=new i(n),u=n.addCommand("undo",{exec:function(){t.undo()&&(n.selectionChange(),this.fire("afterUndo"))},state:CKEDITOR.TRISTATE_DISABLED,canUndo:!1}),f=n.addCommand("redo",{exec:function(){t.redo()&&(n.selectionChange(),this.fire("afterRedo"))},state:CKEDITOR.TRISTATE_DISABLED,canUndo:!1});n.setKeystroke([[CKEDITOR.CTRL+90,"undo"],[CKEDITOR.CTRL+89,"redo"],[CKEDITOR.CTRL+CKEDITOR.SHIFT+90,"redo"]]);t.onChange=function(){u.setState(t.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);f.setState(t.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};n.on("beforeCommandExec",r);n.on("afterCommandExec",r);n.on("saveSnapshot",function(n){t.save(n.data&&n.data.contentOnly)});n.on("contentDom",function(){n.editable().on("keydown",function(n){n.data.$.ctrlKey||n.data.$.metaKey||t.type(n)})});n.on("beforeModeUnload",function(){"wysiwyg"==n.mode&&t.save(!0)});n.on("mode",function(){t.enabled=n.readOnly?!1:"wysiwyg"==n.mode;t.onChange()});n.ui.addButton&&(n.ui.addButton("Undo",{label:n.lang.undo.undo,command:"undo",toolbar:"undo,10"}),n.ui.addButton("Redo",{label:n.lang.undo.redo,command:"redo",toolbar:"undo,20"}));n.resetUndo=function(){t.reset();n.fire("saveSnapshot")};n.on("updateSnapshot",function(){t.currentImage&&t.update()});n.on("lockSnapshot",t.lock,t);n.on("unlockSnapshot",t.unlock,t)}});CKEDITOR.plugins.undo={};n=CKEDITOR.plugins.undo.Image=function(n){this.editor=n;n.fire("beforeUndoImage");var t=n.getSnapshot(),i=t&&n.getSelection();CKEDITOR.env.ie&&t&&(t=t.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=t;this.bookmarks=i&&i.createBookmarks2(!0);n.fire("afterUndoImage")};t=/\b(?:href|src|name)="[^"]*?"/gi;n.prototype={equals:function(n,i){var r=this.contents,u=n.contents,f,e,o;if(CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&(r=r.replace(t,""),u=u.replace(t,"")),r!=u)return!1;if(i)return!0;if(r=this.bookmarks,u=n.bookmarks,r||u){if(!r||!u||r.length!=u.length)return!1;for(f=0;f<r.length;f++)if(e=r[f],o=u[f],e.startOffset!=o.startOffset||e.endOffset!=o.endOffset||!CKEDITOR.tools.arrayCompare(e.start,o.start)||!CKEDITOR.tools.arrayCompare(e.end,o.end))return!1}return!0}};var r={8:1,46:1},f={16:1,17:1,18:1},u={37:1,38:1,39:1,40:1};i.prototype={type:function(t){var t=t&&t.data.getKey(),i=t in r,h=this.lastKeystroke in r,c=i&&t==this.lastKeystroke,o=t in u,l=this.lastKeystroke in u,e,s;(t in f||this.typing)&&(i||o||!(h||l))&&(!i||c)||(e=new n(this.editor),s=this.snapshots.length,CKEDITOR.tools.setTimeout(function(){var n=this.editor.getSnapshot();CKEDITOR.env.ie&&(n=n.replace(/\s+data-cke-expando=".*?"/g,""));e.contents!=n&&s==this.snapshots.length&&(this.typing=!0,this.save(!1,e,!1)||this.snapshots.splice(this.index+1,this.snapshots.length-this.index-1),this.hasUndo=!0,this.hasRedo=!1,this.modifiersCount=this.typesCount=1,this.onChange())},0,this));this.lastKeystroke=t;i?(this.typesCount=0,this.modifiersCount++,25<this.modifiersCount&&(this.save(!1,null,!1),this.modifiersCount=1)):o||(this.modifiersCount=0,this.typesCount++,25<this.typesCount&&(this.save(!1,null,!1),this.typesCount=1))},reset:function(){this.lastKeystroke=0;this.snapshots=[];this.index=-1;this.limit=this.editor.config.undoStackSize||20;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.typing=!1;delete this.lastKeystroke;this.modifiersCount=this.typesCount=0},fireChange:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(t,i,r){if(this.locked)return!1;var u=this.snapshots;return(i||(i=new n(this.editor)),!1===i.contents||this.currentImage&&i.equals(this.currentImage,t))?!1:(u.splice(this.index+1,u.length-this.index-1),u.length==this.limit&&u.shift(),this.index=u.push(i)-1,this.currentImage=i,!1!==r&&this.fireChange(),!0)},restoreImage:function(n){var t=this.editor,i;n.bookmarks&&(t.focus(),i=t.getSelection());this.locked=1;this.editor.loadSnapshot(n.contents);n.bookmarks?i.selectBookmarks(n.bookmarks):CKEDITOR.env.ie&&(t=this.editor.document.getBody().$.createTextRange(),t.collapse(!0),t.select());this.locked=0;this.index=n.index;this.update();this.fireChange()},getNextImage:function(n){var i=this.snapshots,r=this.currentImage,t;if(r)if(n){for(t=this.index-1;0<=t;t--)if(n=i[t],!r.equals(n,!0))return n.index=t,n}else for(t=this.index+1;t<i.length;t++)if(n=i[t],!r.equals(n,!0))return n.index=t,n;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(!0);var n=this.getNextImage(!0);if(n)return this.restoreImage(n),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var n=this.getNextImage(!1);if(n)return this.restoreImage(n),!0}return!1},update:function(){this.locked||this.snapshots.splice(this.index,1,this.currentImage=new n(this.editor))},lock:function(){if(!this.locked){var n=this.editor.getSnapshot();this.locked={update:this.currentImage&&n==this.currentImage.contents?n:null}}},unlock:function(){if(this.locked){var n=this.locked.update,t=this.editor.getSnapshot();this.locked=null;"string"==typeof n&&t!=n&&this.update()}}}}();CKEDITOR.plugins.add("wsc",{requires:"dialog",init:function(n){n.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&!CKEDITOR.env.air&&document.domain==window.location.hostname};"undefined"==typeof n.plugins.scayt&&n.ui.addButton&&n.ui.addButton("SpellChecker",{label:n.lang.wsc.toolbar,command:"checkspell",toolbar:"spellchecker,10"});CKEDITOR.dialog.add("checkspell",this.path+"dialogs/wsc.js")}});CKEDITOR.config.wsc_customerId=CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk";CKEDITOR.config.wsc_customLoaderScript=CKEDITOR.config.wsc_customLoaderScript||null;CKEDITOR.config.plugins="dialogui,dialog,about,a11yhelp,basicstyles,blockquote,clipboard,panel,floatpanel,menu,contextmenu,resize,button,toolbar,elementspath,list,indent,enterkey,entities,popup,filebrowser,floatingspace,listblock,richcombo,format,htmlwriter,horizontalrule,wysiwygarea,image,fakeobjects,link,magicline,maximize,pastetext,pastefromword,removeformat,sourcearea,specialchar,menubutton,scayt,stylescombo,tab,table,tabletools,undo,wsc";CKEDITOR.config.skin="moono",function(){for(var n="about,0,bold,32,italic,64,strike,96,subscript,128,superscript,160,underline,192,blockquote,224,copy-rtl,256,copy,288,cut-rtl,320,cut,352,paste-rtl,384,paste,416,bulletedlist-rtl,448,bulletedlist,480,numberedlist-rtl,512,numberedlist,544,indent-rtl,576,indent,608,outdent-rtl,640,outdent,672,horizontalrule,704,image,736,anchor-rtl,768,anchor,800,link,832,unlink,864,maximize,896,pastetext-rtl,928,pastetext,960,pastefromword-rtl,992,pastefromword,1024,removeformat,1056,source-rtl,1088,source,1120,specialchar,1152,scayt,1184,table,1216,redo-rtl,1248,redo,1280,undo-rtl,1312,undo,1344,spellchecker,1376",i=CKEDITOR.getUrl("plugins/icons.png"),n=n.split(","),t=0;t<n.length;t++)CKEDITOR.skin.icons[n[t]]={path:i,offset:-n[++t]}}();CKEDITOR.lang.languages={af:1,ar:1,eu:1,bn:1,bs:1,bg:1,ca:1,"zh-cn":1,zh:1,hr:1,cs:1,da:1,nl:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,et:1,fo:1,fi:1,fr:1,"fr-ca":1,gl:1,ka:1,de:1,el:1,gu:1,he:1,hi:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,ku:1,lv:1,lt:1,mk:1,ms:1,mn:1,no:1,nb:1,fa:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,sr:1,"sr-latn":1,sk:1,sl:1,es:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,cy:1}}}();loadCMS=new function(){this.page="";this.register=function(){$("#SaveStructure").click(function(){saveStructure()})}};window.onload=function(){$("#pubinfo").popover();$("#pubpending").popover();$("#editinfo").popover();$(".pulsate").effect("pulsate",{times:5},3e3);$("#site-treeradio, #site-tree").treeview({collapsed:!0,animated:"fast"});$("#site-treecheckbox").treeview({collapsed:!0,animated:"fast",prerendered:!1,persist:"checkbox"});$.validator.addMethod("date",function(n,t){var i=n.match(/([0-9]+)/gi),r;return i?(r=i[1]+"/"+i[0]+"/"+i[2],this.optional(t)||!/Invalid|NaN/.test(new Date(r))):this.optional(t)||!1},"Please enter a date in the format dd/mm/yyyy");$("#PublishDate").datetimepicker({dateFormat:"dd/mm/yy"});$("#PublishedDate").datetimepicker({dateFormat:"dd/mm/yy"});$("#CreatedDate").datepicker();$(".cms-asset").click(function(){mywindow=window.open(baseUrl+"filemanager/CKIndex?CkAction=filemanager&filetype=images&fileId="+$(this).attr("data-identifier-id"),"mywindow","status=1,resizable=1,width=820,height=650,scrollbars=yes");mywindow.moveTo(100,100)});$(".cms-boxsliders").click(function(){mywindow=window.open(baseUrl+"steamcms/steamcms/boxsliders?Id="+$(this).attr("data-identifier-id"),"boxsliders","status=1,resizable=1,width=820,height=650,scrollbars=yes");mywindow.moveTo(100,100)});$(".cms-image-in-plugin").click(function(){mywindow=window.open(this.getAttribute("data-url"),"CmsImageInPlugin","status=1,resizable=1,width=800,height=650,scrollbars=yes");mywindow.moveTo(100,100)})};identifierId=0;CKEDITOR.on("instanceCreated",function(n){var t=n.editor,i=t.element;if(i.is("textarea"))t.on("configLoaded",function(){t.config.removePlugins="Commit,Reset,History"})});(function(){function n(n){function s(f,s){var nt,tt,l=f==window,h=s&&s.message!==undefined?s.message:undefined,k,w,rt,ut,ft,lt;if(s=n.extend({},n.blockUI.defaults,s||{}),!s.ignoreIfBlocked||!n(f).data("blockUI.isBlocked")){s.overlayCSS=n.extend({},n.blockUI.defaults.overlayCSS,s.overlayCSS||{});nt=n.extend({},n.blockUI.defaults.css,s.css||{});tt=n.extend({},n.blockUI.defaults.themedCSS,s.themedCSS||{});h=h===undefined?s.message:h;l&&t&&e(window,{fadeOut:0});h&&typeof h!="string"&&(h.parentNode||h.jquery)&&(k=h.jquery?h[0]:h,w={},n(f).data("blockUI.history",w),w.el=k,w.parent=k.parentNode,w.display=k.style.display,w.position=k.style.position,w.parent&&w.parent.removeChild(k));n(f).data("blockUI.onUnblock",s.onUnblock);var b=s.baseZ,g=n.browser.msie||s.forceIframe?n('<iframe class="blockUI" style="z-index:'+b+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+s.iframeSrc+'"><\/iframe>'):n('<div class="blockUI" style="display:none"><\/div>'),d=s.theme?n('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+b+++';display:none"><\/div>'):n('<div class="blockUI blockOverlay" style="z-index:'+b+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"><\/div>'),p,it;if(it=s.theme&&l?'<div class="blockUI '+s.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(b+10)+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(s.title||"&nbsp;")+'<\/div><div class="ui-widget-content ui-dialog-content"><\/div><\/div>':s.theme?'<div class="blockUI '+s.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(b+10)+';display:none;position:absolute"><div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(s.title||"&nbsp;")+'<\/div><div class="ui-widget-content ui-dialog-content"><\/div><\/div>':l?'<div class="blockUI '+s.blockMsgClass+' blockPage" style="z-index:'+(b+10)+';display:none;position:fixed"><\/div>':'<div class="blockUI '+s.blockMsgClass+' blockElement" style="z-index:'+(b+10)+';display:none;position:absolute"><\/div>',p=n(it),h&&(s.theme?(p.css(tt),p.addClass("ui-widget-content")):p.css(nt)),s.theme||s.applyPlatformOpacityRules&&n.browser.mozilla&&/Linux/.test(navigator.platform)||d.css(s.overlayCSS),d.css("position",l?"fixed":"absolute"),(n.browser.msie||s.forceIframe)&&g.css("opacity",0),rt=[g,d,p],ut=l?n("body"):n(f),n.each(rt,function(){this.appendTo(ut)}),s.theme&&s.draggable&&n.fn.draggable&&p.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),ft=v&&(!n.boxModel||n("object,embed",l?null:f).length>0),o||ft){if(l&&s.allowBodyStretch&&n.boxModel&&n("html,body").css("height","100%"),(o||!n.boxModel)&&!l)var et=r(f,"borderTopWidth"),ot=r(f,"borderLeftWidth"),st=et?"(0 - "+et+")":0,ht=ot?"(0 - "+ot+")":0;n.each([g,d,p],function(n,t){var i=t[0].style,r,u;i.position="absolute";n<2?(l?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+s.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"'),l?i.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"'),ht&&i.setExpression("left",ht),st&&i.setExpression("top",st)):s.centerY?(l&&i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),i.marginTop=0):!s.centerY&&l&&(r=s.css&&s.css.top?parseInt(s.css.top):0,u="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"',i.setExpression("top",u))})}if(h&&(s.theme?p.find(".ui-widget-content").append(h):p.append(h),(h.jquery||h.nodeType)&&n(h).show()),(n.browser.msie||s.forceIframe)&&s.showOverlay&&g.show(),s.fadeIn){var ct=s.onBlock?s.onBlock:u,at=s.showOverlay&&!h?ct:u,vt=h?ct:u;s.showOverlay&&d._fadeIn(s.fadeIn,at);h&&p._fadeIn(s.fadeIn,vt)}else s.showOverlay&&d.show(),h&&p.show(),s.onBlock&&s.onBlock();c(1,f,s);l?(t=p[0],i=n(":input:enabled:visible",t),s.focusInput&&setTimeout(a,20)):y(p[0],s.centerX,s.centerY);s.timeout&&(lt=setTimeout(function(){l?n.unblockUI(s):n(f).unblock(s)},s.timeout),n(f).data("blockUI.timeout",lt))}}function e(r,u){var o=r==window,f=n(r),s=f.data("blockUI.history"),l=f.data("blockUI.timeout"),e;l&&(clearTimeout(l),f.removeData("blockUI.timeout"));u=n.extend({},n.blockUI.defaults,u||{});c(0,r,u);u.onUnblock===null&&(u.onUnblock=f.data("blockUI.onUnblock"),f.removeData("blockUI.onUnblock"));e=o?n("body").children().filter(".blockUI").add("body > .blockUI"):n(".blockUI",r);o&&(t=i=null);u.fadeOut?(e.fadeOut(u.fadeOut),setTimeout(function(){h(e,s,u,r)},u.fadeOut)):h(e,s,u,r)}function h(t,i,r,u){if(t.each(function(){this.parentNode&&this.parentNode.removeChild(this)}),i&&i.el&&(i.el.style.display=i.display,i.el.style.position=i.position,i.parent&&i.parent.appendChild(i.el),n(u).removeData("blockUI.history")),typeof r.onUnblock=="function")r.onUnblock(u,r)}function c(i,r,u){var e=r==window,o=n(r),f;(i||(!e||t)&&(e||o.data("blockUI.isBlocked")))&&(o.data("blockUI.isBlocked",i),u.bindEvents&&(!i||u.showOverlay))&&(f="mousedown mouseup keydown keypress",i?n(document).bind(f,u,l):n(document).unbind(f,l))}function l(r){var e;if(r.keyCode&&r.keyCode==9&&t&&r.data.constrainTabKey){var u=i,o=!r.shiftKey&&r.target===u[u.length-1],f=r.shiftKey&&r.target===u[0];if(o||f)return setTimeout(function(){a(f)},10),!1}return(e=r.data,n(r.target).parents("div."+e.blockMsgClass).length>0)?!0:n(r.target).parents().children().filter("div.blockUI").length==0}function a(n){if(i){var t=i[n===!0?i.length-1:0];t&&t.focus()}}function y(n,t,i){var u=n.parentNode,f=n.style,e=(u.offsetWidth-n.offsetWidth)/2-r(u,"borderLeftWidth"),o=(u.offsetHeight-n.offsetHeight)/2-r(u,"borderTopWidth");t&&(f.left=e>0?e+"px":"0");i&&(f.top=o>0?o+"px":"0")}function r(t,i){return parseInt(n.css(t,i))||0}var t,i;if(/1\.(0|1|2)\.(0|1|2)/.test(n.fn.jquery)||/^1.1/.test(n.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+n.fn.jquery);return}n.fn._fadeIn=n.fn.fadeIn;var u=function(){},f=document.documentMode||0,v=n.browser.msie&&(n.browser.version<8&&!f||f<8),o=n.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!f;n.blockUI=function(n){s(window,n)};n.unblockUI=function(n){e(window,n)};n.growlUI=function(t,i,r,u){var f=n('<div class="growlUI"><\/div>');t&&f.append("<h1>"+t+"<\/h1>");i&&f.append("<h2>"+i+"<\/h2>");r==undefined&&(r=3e3);n.blockUI({message:f,fadeIn:700,fadeOut:1e3,centerY:!1,timeout:r,showOverlay:!1,onUnblock:u,css:n.blockUI.defaults.growlCSS})};n.fn.block=function(t){var i=n.extend({},n.blockUI.defaults,t||{});return this.each(function(){var t=n(this);i.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){n.css(this,"position")=="static"&&(this.style.position="relative");n.browser.msie&&(this.style.zoom=1);s(this,t)})};n.fn.unblock=function(n){return this.each(function(){e(this,n)})};n.blockUI.version=2.42;n.blockUI.defaults={message:"<h1>Please wait...<\/h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,applyPlatformOpacityRules:!0,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};t=null;i=[]}typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],n):n(jQuery)})()