function initialiseLocationSelector(){$("#loc_all_states").on("click",function(){verifyALL(1,8)?changeState(1,8,!1):changeState(1,8,!0)});$("#loc_all_cap").on("click",function(){verifyALL(11,18)?changeState(11,18,!1):changeState(11,18,!0)});verifyALL=function(n,t){for(var i=0,i=n;i<=t;i++)if($("#form-loc-"+i).is(":checked"))return!0;return!1};changeState=function(n,t,i){for(var r=0,r=n;r<=t;r++)$("#form-loc-"+r).prop("checked",i)}}function requestWatch(n){$.ajax({type:"POST",cache:!0,dataType:"json",url:n.href,data:{ppId:n.id}}).done(function(t){t.Status==="ok"&&toggleWatch(n)})}function toggleWatch(n){var i=$(n).attr("id"),n=$("#"+i),t;n.hasClass("icon-bookmarked")?(t=n.attr("href").replace("unwatch","watch"),n.attr("href",t),$(n.find("span.action")[0]).html("Bookmark"),n.attr("title","Start watching this Planned Procurement"),n.removeClass("icon-bookmarked")):(t=n.attr("href").replace("watch","unwatch"),n.attr("href",t),$(n.find("span.action")[0]).html("Unbookmark"),n.attr("title","Stop watching this Planned Procurement"),n.addClass("icon-bookmarked"))}function registerPPDataLayerEvent(n,t,i){window.dataLayer=window.dataLayer||[];dataLayer.push({event:n,procurementAgency:unescape(t),procurementTitle:unescape(i)})}function parseDateTime(n){var t=n.split(" "),o="2068",f="1",e="1",s="12",h="00",c="00",i=new Date,r,u;if(t.length!==2)throw"Invalid Date Format";if(typeof t[0]!="undefined"&&t[0]!==""){if(r=t[0].split("-"),r.length!==3)throw"Invalid Date Format";o=r[0]||o;f=new String(r[1]||f);e=new String(r[2]||e)}if(typeof t[1]!="undefined"&&t[1]!==""){if(u=t[1].split(":"),u.length!==3)throw"Invalid Date Format";s=new String(u[0]||s);h=new String(u[1]||h);c=new String(u[2]||c)}return i.setFullYear(o,f-1,e),i.setMonth(f-1,e),i.setHours(s),i.setMinutes(h),i.setSeconds(c),i}function set_countdown(n,t){return Math.floor((t-n)/1e3)}function display_countdown(n,t){if(t<1)setOutput(t,t);else{var u=t%60,r=(t-u)/60,f=r%60;r=(r-f)/60;var e=r%24,o=(r-e)/24,i=new String(n);i=i.replace(/%days%/,o);i=i.replace(/%hours%/,e);i=i.replace(/%mins%/,f);i=i.replace(/%secs%/,u);o===1&&(i=i.replace(/days/,"day"));setOutput(i,t)}}function prep_countdown(n){var i=new Date,r=i.getTime(),t=Math.floor((n-r)/1e3);display_countdown("%days% days, %hours% hours, %mins% minutes and %secs% seconds",t);t>0&&(countDownClock=setTimeout("prep_countdown("+n+");",1e3))}function getServerTime(){$.ajax({type:"POST",timeout:6e5,url:window.GLOBAL.sitePrefix+"/api/Atm/GetServerTime"+getCacheBuster(),success:function(n){$.jStorage.deleteKey("responseErrCount");$("#form-ResponseErrCount").val(0);initCounter(n.Data)},error:function(){responseErrFunc()}})}function enableLodgeButtons(){$("#form-btnLodgeResponse").removeClass("btn-disabled");$("#form-btnLodgeResponse").attr("disabled",!1);$("#form-reset").removeClass("disabled");$("#form-reset").attr("disabled",!1)}function disableLodgeButtons(){$("#form-btnLodgeResponse").addClass("btn-disabled");$("#form-btnLodgeResponse").attr("disabled",!0);$("#form-reset").addClass("disabled");$("#form-reset").attr("disabled",!0)}function setOutput(n,t){if(t>0){if(isNaN($("#form-RemainingTime").val())&&$("#form-EmptyFileError").val()===""&&($("#form-btnLodgeResponse").removeClass("btn-disabled"),$("#form-btnLodgeResponse").attr("disabled",!1),$("#form-reset").removeClass("disabled"),$("#form-reset").attr("disabled",!1)),$("#form-RemainingTime").val(t),$("#timerSpan").html(n),t<300&&$("#five-minute").length===0){var i=document.createElement("P");i.id="five-minute";$("#form-RfxUuid").length!==0?i.appendChild(document.createTextNode("This RFx will close within the next 5 minutes. You will not be able to lodge a response once the RFx has closed.")):i.appendChild(document.createTextNode("This ATM will close within the next 5 minutes. You will not be able to lodge a response once the ATM has closed."));$("#warningText").html(i);$("#warningText").attr("style","display:block;")}}else($("#form-Late").val()==="false"||$("#form-RfxUuid").length!==0)&&$("#responseFormDiv").fadeOut("normal",function(){$("#form-btnLodgeResponse").remove();$("#form-reset").remove()}),$("#form-RemainingTime").val(0),$("#timer").hide(),$("#form-RfxUuid").length!==0?$("#warningText").html("<p>This RFx has closed. You cannot lodge a response after the specified close time and date.<\/p>"):$("#warningText").html("<p>This ATM has closed. You cannot lodge a response after the specified close time and date.<\/p>"),$("#warningText").attr("style","display:block;")}function logResponse(){var blnSafe=!0,aryFilenames=[],isInvalidFileType=!1,n,f,fn,fnNew;for(strError="invalid",aryErrorDetail=[],aryFileTypeErrorDetail=[],n=1;n<=5;n++)f=eval("$('#form_responseFile"+n+"').val()"),f!==""&&(f.substr(0,1)===""?ary=f.split("/"):(str=f.replace("/","\\"),ary=str.split("\\")),fn=ary[ary.length-1],fn.indexOf(" ")===0&&(blnSafe=!1,aryErrorDetail.push("Filename "+n+" begins with a space")),fn.indexOf(".")===-1&&(blnSafe=!1,aryErrorDetail.push("Filename "+n+" has no extension")),fn.length>100&&(blnSafe=!1,aryErrorDetail.push("Filename "+n+" is more than 100 characters")),fnNew=fn.replace(reNonAscii,""),fnNew=fnNew.replace(reWindows,""),fn.length!==fnNew.length&&(blnSafe=!1,aryErrorDetail.push("Filename "+n+" contains invalid characters")),$.inArray(fn,aryFilenames)!==-1&&(blnSafe=!1,strError="duplicate"),isValidFileType(fn)||(isInvalidFileType=!0,aryFileTypeErrorDetail.push("Filename "+n)),aryFilenames.push(fn));blnSafe&&isInvalidFileType&&(blnSafe=!1,strError="invalidFileType");blnSafe?($("#response-message").attr("style","display:none"),$("#form-btnLodgeResponse").addClass("btn-disabled"),$("#form-btnLodgeResponse").attr("disabled",!0),$("#form-reset").addClass("disabled"),$("#form-reset").attr("disabled",!0),$.ajax({type:"POST",timeout:6e5,cache:!0,dataType:"json",url:window.GLOBAL.sitePrefix+"/api/Atm/LogResponseAttempt"+getCacheBuster(),data:{Late:$("#form-Late").val(),AtmUuid:$("#form-AtmUuid").val(),RemainingTime:$("#form-RemainingTime").val(),ResponseErrCount:$.jStorage.get("responseErrCount")},success:function(n){$.jStorage.deleteKey("responseErrCount");$("#form-ResponseErrCount").val(0);processResponse(n)},error:function(){responseErrFunc()}})):($("#form-btnLodgeResponse").addClass("btn-disabled"),$("#form-btnLodgeResponse").attr("disabled",!0),$("#form-reset").addClass("disabled"),$("#form-reset").attr("disabled",!0),$.ajax({type:"POST",timeout:6e5,cache:!0,dataType:"html",url:window.GLOBAL.sitePrefix+"/api/Atm/LogResponseAttempt"+getCacheBuster(),data:{Late:$("#form-Late").val(),AtmUuid:$("#form-AtmUuid").val(),RemainingTime:$("#form-RemainingTime").val(),FilenameError:strError,ResponseFile1:escape(eval("$('#form_responseFile1').val()")),ResponseFile2:escape(eval("$('#form_responseFile2').val()")),ResponseFile3:escape(eval("$('#form_responseFile3').val()")),ResponseFile4:escape(eval("$('#form_responseFile4').val()")),ResponseFile5:escape(eval("$('#form_responseFile5').val()")),ResponseErrCount:$.jStorage.get("responseErrCount")},success:function(){$.jStorage.deleteKey("responseErrCount");$("#form-ResponseErrCount").val(0);displayFilenameError()},error:function(){responseErrFunc()}}))}function submitResponseForm(){var t,i,n,r;if(filesTotal=0,filesUploaded=0,allowReset=!1,t=$("#form-ResponseId").val(),i=navigator.appVersion.indexOf("MSIE")!==-1?parseInt(navigator.appVersion.split("MSIE")[1]):!1,i&&i<=9)logFileAction(t,"Submit Form (IE <+ 9)",!0),$("#responseForm").submit(),DisableFileUploadControls();else{for(DisableFileUploadControls(),n=1;n<=5;n++)r=$("#form_responseFile"+n),r.prop("files").length>0&&(uploadFile(r,$("#form-ResponseFile"+n+"Path"),$("#form_responseFile"+n+"_progressbar"),$("#form_responseFile"+n+"_spinner"),t),filesTotal++);logFileAction(t,"Uploading "+filesTotal+" files",!0);allowReset&&DisableFileUploadControls();filesTotal===0&&(logFileAction(t,"Submit Form (No files attached)",!0),$("#responseForm").submit())}}function uploadFile(elmFile,elmFilePath,elmProgress,elmSpinner,responseId){var file,f,fn,inner,timer;elmFile.prop("files").length>0&&(file=elmFile.prop("files")[0],f=eval("elmFile.val()"),f.substr(0,1)===""?ary=f.split("/"):(str=f.replace("/","\\"),ary=str.split("\\")),fn=ary[ary.length-1],file.size===0?(logResponseEmptyError(elmFile),allowReset=!0,inner="An error occurred. Check the file size and try again.",allowReset&&(inner=inner+' <a href="javascript:ReinitialiseFileUploadFormControl()">Click here to reset file uploads.<\/a>'),elmFile.parent().append('<p class="error">'+inner+"<\/p>")):(elmSpinner.attr("style","display=block;"),timer=null,$.ajax({dataType:"json",url:window.GLOBAL.sitePrefix+"/api/file/GetUploadUrl?filename="+responseId+"/"+encodeURIComponent(fn)+"&contentType="+file.type,success:function(n){var i=n.toString(),t=new XMLHttpRequest;t.onreadystatechange=function(){t.readyState==XMLHttpRequest.DONE&&(t.status=="200"?(elmProgress.addClass("bg-success").removeClass("bg-info"),elmSpinner.attr("style","display:none;"),filesUploaded++,elmFilePath.val(fn),elmFile.val(""),logFileAction(responseId,"Upload FINISH "+fn+" ("+filesUploaded+"/"+filesTotal+" files)",!0),filesUploaded===filesTotal&&(logFileAction(responseId,"Submit Form (All files uploaded)",!0),$("#responseForm").submit(),filesUploaded=-1)):(logFileAction(responseId,"Upload ERROR "+t.status+" for "+fn+": "+t.responseText,!0),elmProgress.addClass("bg-danger").removeClass("bg-info"),timer!=null&&clearTimeout(timer),logFileAction(responseId,"Retrying "+fn,!0),timer=setTimeout(function(){uploadFile(elmFile,elmFilePath,elmProgress,elmSpinner,responseId)},500)))};t.upload.addEventListener("load",function(){});t.upload.addEventListener("progress",function(n){var t=n.loaded*100/n.total;logFileAction(responseId,fn+": "+Math.round(t)+"%",!1);elmProgress!=undefined&&n.lengthComputable&&(elmProgress.css("width",t+"%"),elmProgress.attr("aria-valuenow",t))});t.upload.addEventListener("error",function(n){logFileAction(responseId,"Upload FAIL "+fn+": "+n.type,!0);elmProgress.addClass("bg-danger").removeClass("bg-info");timer!=null&&clearTimeout(timer);logFileAction(responseId,"Retrying "+fn+": "+n.type,!0);setTimeout(function(){uploadFile(elmFile,elmFilePath,elmProgress,elmSpinner,responseId)},500)});logFileAction(responseId,"Starting "+fn,!0);t.open("PUT",i,!0);t.setRequestHeader("Content-Type",file.type);t.send(file);uploadRequest.push(t)},error:function(){logFileAction(responseId,"Get URL ERROR "+fn,!0);elmProgress.addClass("bg-danger").removeClass("bg-info");logFileAction(responseId,"Retrying "+fn,!0);timer!=null&&clearTimeout(timer);setTimeout(function(){uploadFile(elmFile,elmFilePath,elmProgress,elmSpinner,responseId)},500)}})))}function DisableFileUploadControls(){$("div[id^='form_responseFile'].file-upload").addClass("file-upload-disabled");$("input[id^='form_responseFile'].inputfile").attr("disabled",!0)}function ReinitialiseFileUploadFormControl(){var t,n;for($(".error").each(function(){$(this).remove()}),$("#form-EmptyFileError").val(""),$("div[id^='form_responseFile'].file-upload").removeClass("file-upload-disabled"),$("input[id^='form_responseFile'].inputfile").attr("disabled",!1),t=navigator.appVersion.indexOf("MSIE")!==-1?parseInt(navigator.appVersion.split("MSIE")[1]):!1,t&&t===10&&$("input[id^='form_responseFile'].inputfile").each(function(n,t){t.type="";t.type="file"}),$("input[id^='form_responseFile'].inputfile").val(""),$("label[for^='form_responseFile'] span").html("No file chosen"),$("input[id^='form-ResponseFile']").val(""),n=0;n<uploadRequest.length;n++)uploadRequest[n].abort(),console.log("Canceled");$("#form-btnLodgeResponse").removeClass("btn-disabled");$("#form-btnLodgeResponse").attr("disabled",!1);$("#form-reset").removeClass("disabled");$("#form-reset").attr("disabled",!1)}function logResponseEmptyError(input){var n=input[0].name.substr(-1),uri,postData;aryErrorDetail.push("Response File "+n+" is corrupt or is zero bytes");$("#form-btnLodgeResponse").addClass("btn-disabled");$("#form-btnLodgeResponse").attr("disabled",!0);$("#form-reset").addClass("disabled");$("#form-reset").attr("disabled",!0);uri="/api/Atm/LogResponseEmptyError";postData={LogOfResponseAttemptUuid:$("#form-LogOfResponseAttemptUuid").val(),AtmUuid:$("#form-AtmUuid").val(),ResponseFile1:escape(eval("$('#form_responseFile1').val()")),ResponseFile2:escape(eval("$('#form_responseFile2').val()")),ResponseFile3:escape(eval("$('#form_responseFile3').val()")),ResponseFile4:escape(eval("$('#form_responseFile4').val()")),ResponseFile5:escape(eval("$('#form_responseFile5').val()"))};$("#form-LogOfRfxResponseAttemptUuid").length&&(uri=window.GLOBAL.sitePrefix+"/api/Rfx/LogResponseEmptyError",postData={LogOfRfxResponseAttemptUuid:$("#form-LogOfRfxResponseAttemptUuid").val(),RfxUuid:$("#form-RfxUuid").val(),RfxSupplierUuid:$("#form-RfxSupplierUuid").val(),ResponseFile1:escape(eval("$('#form_responseFile1').val()")),ResponseFile2:escape(eval("$('#form_responseFile2').val()")),ResponseFile3:escape(eval("$('#form_responseFile3').val()")),ResponseFile4:escape(eval("$('#form_responseFile4').val()")),ResponseFile5:escape(eval("$('#form_responseFile5').val()"))});$.ajax({type:"POST",timeout:6e5,cache:!0,dataType:"html",url:uri+getCacheBuster(),data:postData,success:function(){$.jStorage.deleteKey("responseErrCount");$("#form-ResponseErrCount").val(0);displayEmptyFileError()},error:function(){responseErrFunc()}})}function logFileAction(n,t,i){i&&$.ajax({dataType:"json",url:window.GLOBAL.sitePrefix+"/api/file/Log?requestId="+n+"&message="+encodeURIComponent(t)});console!=undefined&&console.log("("+n+") "+t)}function displayEmptyFileError(){if(aryErrorDetail.length>0){var n="<p>";n=aryErrorDetail.length===1?n+"A file you are attempting to lodge is zero bytes in size. Please check your file size and try again.<\/p><p>The error encountered was: ":n+aryErrorDetail.length+" files you are attempting to lodge are zero bytes in size. Please check your file size and try again.<\/p><p>The errors encountered were: ";n=n+aryErrorDetail.join(", ")+".<\/p>";$("#response-message").html(n);$("#response-message").attr("style","display:block;");$("#response-message").focus();$("html, body").animate({scrollTop:$("#response-message").offset().top},800)}}function displayFilenameError(){$("#form-btnLodgeResponse").removeClass("btn-disabled");$("#form-btnLodgeResponse").attr("disabled",!1);$("#form-reset").removeClass("disabled");$("#form-reset").attr("disabled",!1);$("#error-message").remove();strError==="duplicate"?($("#response-message").html("<p>You are attempting to upload multiple files with the same filename. Please re-name the file(s) and try again.<\/p>"),$("#response-message").attr("style","display:block;")):strError==="invalid"?($("#response-message").html('<p>A file you are attempting to lodge contains either unacceptable characters or an unacceptable file extension. Filenames must not contain the following characters  / : * ? " < > |. Please re-name the file and try again.<\/p><p>The error encountered was: '+aryErrorDetail.join(", ")+".<\/p>"),$("#response-message").attr("style","display:block")):strError==="invalidFileType"&&($("#response-message").html("<p>The file type you are attempting to upload is not permitted in AusTender. Please try another file type.<\/p><p>The following file(s) have invalid file type: "+aryFileTypeErrorDetail.join(", ")+".<\/p>"),$("#response-message").attr("style","display:block"));$("#response-message").focus();$("html, body").animate({scrollTop:$("#response-message").offset().top},800)}function ClearAllUploads(){for(var n,i=navigator.appVersion.indexOf("MSIE")!==-1?parseInt(navigator.appVersion.split("MSIE")[1]):!1,t=1;t<=5;t++)n=$("#form_responseFile"+t),i&&i===10&&(n[0].type="",n[0].type="file"),n.val(""),n.next().find("span").html("No file chosen")}function lodgeRFxResponse(){var isInvalidFileType=!1,n,f,fn,fnNew,uri;for(blnSafe=!0,strError="invalid",aryErrorDetail=[],aryFilenames=[],aryFileTypeErrorDetail=[],n=1;n<=5;n++)f=eval("$('#form_responseFile"+n+"').val()"),f!==""&&(f.substr(0,1)===""?ary=f.split("/"):(str=f.replace("/","\\"),ary=str.split("\\")),fn=ary[ary.length-1],fn.indexOf(" ")===0&&(blnSafe=!1,aryErrorDetail.push("Filename "+n+" begins with a space")),fn.indexOf(".")===-1&&(blnSafe=!1,aryErrorDetail.push("Filename "+n+" has no extension")),fn.length>100&&(blnSafe=!1,aryErrorDetail.push("Filename "+n+" is more than 100 characters")),fnNew=fn.replace(reNonAscii,""),fnNew=fnNew.replace(reWindows,""),fn.length!==fnNew.length&&(blnSafe=!1,aryErrorDetail.push("Filename "+n+" contains invalid characters")),$.inArray(fn,aryFilenames)!==-1&&(blnSafe=!1,strError="duplicate"),isValidFileType(fn)||(isInvalidFileType=!0,aryFileTypeErrorDetail.push("Filename "+n)),aryFilenames.push(fn));blnSafe&&isInvalidFileType&&(blnSafe=!1,strError="invalidFileType");uri="/api/Rfx/LogResponseAttempt";blnSafe?($("#response-message").attr("style","display:none"),$("#form-btnLodgeResponse").addClass("btn-disabled"),$("#form-btnLodgeResponse").attr("disabled",!0),$("#form-reset").addClass("disabled"),$("#form-reset").attr("disabled",!0),DisableFileUploadControls(),$.ajax({type:"POST",timeout:6e5,cache:!0,dataType:"json",url:uri+getCacheBuster(),data:{RfxSupplierUuid:$("#form-RfxSupplierUuid").val(),RfxUuid:$("#form-RfxUuid").val(),RemainingTime:$("#form-RemainingTime").val()},success:function(n){processRFxResponse(n)},error:function(){responseErrFunc()}})):($("#form-btnLodgeResponse").addClass("btn-disabled"),$("#form-btnLodgeResponse").attr("disabled",!0),$("#form-reset").addClass("disabled"),$("#form-reset").attr("disabled",!0),$.ajax({type:"POST",timeout:6e5,cache:!0,dataType:"html",url:"/api/Rfx/LogResponseAttempt"+getCacheBuster(),data:{RfxSupplierUuid:$("#form-RfxSupplierUuid").val(),RfxUuid:$("#form-RfxUuid").val(),RemainingTime:$("#form-RemainingTime").val(),FilenameError:strError,ResponseFile1:escape(eval("$('#form_responseFile1').val()")),ResponseFile2:escape(eval("$('#form_responseFile2').val()")),ResponseFile3:escape(eval("$('#form_responseFile3').val()")),ResponseFile4:escape(eval("$('#form_responseFile4').val()")),ResponseFile5:escape(eval("$('#form_responseFile5').val()"))},success:function(){displayFilenameError()},error:function(){responseErrFunc()}}))}function decodeHtml(n){var t=document.createElement("textarea");return t.innerHTML=n,t.value}function toggleAgencyReportType(n){var t=!1;toggleDisabled(n,'input[id^="form-AgencyReportType-Lead"]',"form-AgencyReportType-Lead");toggleDisabled(n,'input[id^="form-AgencyReportType-Participant"]',"form-AgencyReportType-Participant");n&&(t=$('input[id^="form-AgencyReportType-Participant"]').is(":checked"));toggleDisabled(t,"#form-ParticipantStatus","form-ParticipantStatus")}function toggleDisabled(n,t,i){n?($(t).attr("disabled",!1),$('[for="'+i+'"]').removeClass("labelDisabled")):($(t).attr("disabled",!0),$('[for="'+i+'"]').addClass("labelDisabled"));i==="form-ParticipantStatus"&&$(t).selectpicker("refresh")}var JSON,countDownClock,initCounter,responseErrFunc,processRFxResponse;if(!function(n,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){function ri(n){var t=n.length,r=i.type(n);return"function"===r||i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in n}function ui(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if("string"==typeof t){if(re.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return i.inArray(n,t)>=0!==r})}function hr(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}function ee(n){var t=fi[n]={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}function cr(){u.addEventListener?(u.removeEventListener("DOMContentLoaded",a,!1),n.removeEventListener("load",a,!1)):(u.detachEvent("onreadystatechange",a),n.detachEvent("onload",a))}function a(){(u.addEventListener||"load"===event.type||"complete"===u.readyState)&&(cr(),i.ready())}function yr(n,t,r){if(void 0===r&&1===n.nodeType){var u="data-"+t.replace(vr,"-$1").toLowerCase();if(r=n.getAttribute(u),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ar.test(r)?i.parseJSON(r):r}catch(f){}i.data(n,t,r)}else r=void 0}return r}function ei(n){for(var t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function pr(n,t,r,u){if(i.acceptData(n)){var s,e,h=i.expando,l=n.nodeType,o=l?i.cache:n,f=l?n[h]:n[h]&&h;if(f&&o[f]&&(u||o[f].data)||void 0!==r||"string"!=typeof t)return f||(f=l?n[h]=c.pop()||i.guid++:h),o[f]||(o[f]=l?{}:{toJSON:i.noop}),("object"==typeof t||"function"==typeof t)&&(u?o[f]=i.extend(o[f],t):o[f].data=i.extend(o[f].data,t)),e=o[f],u||(e.data||(e.data={}),e=e.data),void 0!==r&&(e[i.camelCase(t)]=r),"string"==typeof t?(s=e[t],null==s&&(s=e[i.camelCase(t)])):s=e,s}}function wr(n,t,u){if(i.acceptData(n)){var o,s,h=n.nodeType,f=h?i.cache:n,e=h?n[i.expando]:i.expando;if(f[e]){if(t&&(o=u?f[e]:f[e].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in o)?t=[t]:(t=i.camelCase(t),t=(t in o)?[t]:t.split(" ")),s=t.length;s--;)delete o[t[s]];if(u?!ei(o):!i.isEmptyObject(o))return}(u||(delete f[e].data,ei(f[e])))&&(h?i.cleanData([n],!0):r.deleteExpando||f!=f.window?delete f[e]:f[e]=null)}}}function vt(){return!0}function it(){return!1}function dr(){try{return u.activeElement}catch(n){}}function gr(n){var i=nu.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}function f(n,t){var e,u,s=0,r=typeof n.getElementsByTagName!==o?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!==o?n.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],e=n.childNodes||n;null!=(u=e[s]);s++)!t||i.nodeName(u,t)?r.push(u):i.merge(r,f(u,t));return void 0===t||t&&i.nodeName(n,t)?i.merge([n],r):r}function we(n){oi.test(n.type)&&(n.defaultChecked=n.checked)}function eu(n,t){return i.nodeName(n,"table")&&i.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function ou(n){return n.type=(null!==i.find.attr(n,"type"))+"/"+n.type,n}function su(n){var t=ve.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function li(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function hu(n,t){if(1===t.nodeType&&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;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function be(n,t){var u,e,f;if(1===t.nodeType){if(u=t.nodeName.toLowerCase(),!r.noCloneEvent&&t[i.expando]){f=i._data(t);for(e in f.events)i.removeEvent(t,e,f.handle);t.removeAttribute(i.expando)}"script"===u&&t.text!==n.text?(ou(t).text=n.text,su(t)):"object"===u?(t.parentNode&&(t.outerHTML=n.outerHTML),r.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===u&&oi.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===u?t.defaultSelected=t.selected=n.defaultSelected:("input"===u||"textarea"===u)&&(t.defaultValue=n.defaultValue)}}function cu(t,r){var f,u=i(r.createElement(t)).appendTo(r.body),e=n.getDefaultComputedStyle&&(f=n.getDefaultComputedStyle(u[0]))?f.display:i.css(u[0],"display");return u.detach(),e}function yt(n){var r=u,t=ai[n];return t||(t=cu(n,r),"none"!==t&&t||(ot=(ot||i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement),r=(ot[0].contentWindow||ot[0].contentDocument).document,r.write(),r.close(),t=cu(n,r),ot.detach()),ai[n]=t),t}function au(n,t){return{get:function(){var i=n();if(null!=i)return i?void delete this.get:(this.get=t).apply(this,arguments)}}}function pu(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=yu.length;i--;)if(t=yu[i]+r,t in n)return t;return u}function wu(n,t){for(var f,r,o,e=[],u=0,s=n.length;s>u;u++)r=n[u],r.style&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||"none"!==f||(r.style.display=""),""===r.style.display&&et(r)&&(e[u]=i._data(r,"olddisplay",yt(r.nodeName)))):(o=et(r),(f&&"none"!==f||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;s>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?e[u]||"":"none"));return n}function bu(n,t,i){var r=no.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function ku(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+w[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+w[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+w[e]+"Width",!0,f))):(o+=i.css(n,"padding"+w[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+w[e]+"Width",!0,f)));return o}function du(n,t,u){var o=!0,f="width"===t?n.offsetWidth:n.offsetHeight,e=k(n),s=r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e);if(0>=f||null==f){if(f=d(n,t,e),(0>f||null==f)&&(f=n.style[t]),pt.test(f))return f;o=s&&(r.boxSizingReliable()||f===n.style[t]);f=parseFloat(f)||0}return f+ku(n,t,u||(s?"border":"content"),o,e)+"px"}function e(n,t,i,r,u){return new e.prototype.init(n,t,i,r,u)}function nf(){return setTimeout(function(){rt=void 0}),rt=i.now()}function kt(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=w[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function tf(n,t,i){for(var u,f=(st[t]||[]).concat(st["*"]),r=0,e=f.length;e>r;r++)if(u=f[r].call(i,t,n))return u}function fo(n,t,u){var f,a,p,v,s,w,h,b,l=this,y={},o=n.style,c=n.nodeType&&et(n),e=i._data(n,"fxshow");u.queue||(s=i._queueHooks(n,"fx"),null==s.unqueued&&(s.unqueued=0,w=s.empty.fire,s.empty.fire=function(){s.unqueued||w()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--;i.queue(n,"fx").length||s.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(u.overflow=[o.overflow,o.overflowX,o.overflowY],h=i.css(n,"display"),b="none"===h?i._data(n,"olddisplay")||yt(n.nodeName):h,"inline"===b&&"none"===i.css(n,"float")&&(r.inlineBlockNeedsLayout&&"inline"!==yt(n.nodeName)?o.zoom=1:o.display="inline-block"));u.overflow&&(o.overflow="hidden",r.shrinkWrapBlocks()||l.always(function(){o.overflow=u.overflow[0];o.overflowX=u.overflow[1];o.overflowY=u.overflow[2]}));for(f in t)if(a=t[f],ro.exec(a)){if(delete t[f],p=p||"toggle"===a,a===(c?"hide":"show")){if("show"!==a||!e||void 0===e[f])continue;c=!0}y[f]=e&&e[f]||i.style(n,f)}else h=void 0;if(i.isEmptyObject(y))"inline"===("none"===h?yt(n.nodeName):h)&&(o.display=h);else{e?"hidden"in e&&(c=e.hidden):e=i._data(n,"fxshow",{});p&&(e.hidden=!c);c?i(n).show():l.done(function(){i(n).hide()});l.done(function(){var t;i._removeData(n,"fxshow");for(t in y)i.style(n,t,y[t])});for(f in y)v=tf(c?e[f]:0,f,l),f in e||(e[f]=v.start,c&&(v.end=v.start,v.start="width"===f||"height"===f?1:0))}}function eo(n,t){var r,f,e,u,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 rf(n,t,r){var h,e,o=0,l=bt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=rt||nf(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?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:rt||nf(),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(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(eo(s,u.opts.specialEasing);l>o;o++)if(h=bt[o].call(u,n,s,u.opts))return h;return i.map(s,tf,u),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 af(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])"+"===u.charAt(0)?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function vf(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);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}var f={},o=n===bi;return e(t.dataTypes[0])||!f["*"]&&e("*")}function ki(n,t){var u,r,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function ao(n,t,i){for(var o,e,u,f,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(f in s)if(s[f]&&s[f].test(e)){r.unshift(f);break}if(r[0]in i)u=r[0];else{for(f in i){if(!r[0]||n.converters[f+" "+r[0]]){u=f;break}o||(o=f)}u=u||o}if(u)return(u!==r[0]&&r.unshift(u),i[u])}function vo(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}function di(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||po.test(n)?u(n,i):di(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)di(n+"["+f+"]",t[f],r,u)}function pf(){try{return new n.XMLHttpRequest}catch(t){}}function go(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function wf(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}var c=[],l=c.slice,ir=c.concat,ii=c.push,rr=c.indexOf,ct={},df=ct.toString,tt=ct.hasOwnProperty,r={},ur="1.11.2",i=function(n,t){return new i.fn.init(n,t)},gf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ne=/^-ms-/,te=/-([\da-z])/gi,ie=function(n,t){return t.toUpperCase()},p,or,sr,h,fi,lt,o,lr,ar,vr,ot,ai,uf,ef,of,gt,gi,ti,nr,tr,bf,kf;i.fn=i.prototype={jquery:ur,constructor:i,selector:"",length:0,toArray:function(){return l.call(this)},get:function(n){return null!=n?0>n?this[n+this.length]:this[n]:l.call(this)},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)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},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+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:ii,sort:c.sort,splice:c.splice};i.extend=i.fn.extend=function(){var r,e,t,f,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"==typeof n||i.isFunction(n)||(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(o=arguments[u]))for(f in o)r=n[f],t=o[f],n!==t&&(h&&t&&(i.isPlainObject(t)||(e=i.isArray(t)))?(e?(e=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(ur+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!i.isArray(n)&&n-parseFloat(n)+1>=0},isEmptyObject:function(n){for(var t in n)return!1;return!0},isPlainObject:function(n){var t;if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!tt.call(n,"constructor")&&!tt.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}if(r.ownLast)for(t in n)return tt.call(n,t);for(t in n);return void 0===t||tt.call(n,t)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ct[df.call(n)]||"object":typeof n},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(ne,"ms-").replace(te,ie)},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=ri(n);if(i){if(e){for(;f>r;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(;f>r;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:function(n){return null==n?"":(n+"").replace(gf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(ri(Object(n))?i.merge(r,"string"==typeof n?[n]:n):ii.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(rr)return rr.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,t){for(var r=+t.length,i=0,u=n.length;r>i;)n[u++]=t[i++];if(r!==r)while(void 0!==t[i])n[u++]=t[i++];return n.length=u,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;e>r;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=ri(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&f.push(u);else for(r in n)u=t(n[r],r,i),null!=u&&f.push(u);return ir.apply([],f)},guid:1,proxy:function(n,t){var u,r,f;return"string"==typeof t&&(f=n[t],t=n,n=f),i.isFunction(n)?(u=l.call(arguments,2),r=function(){return n.apply(t||this,u.concat(l.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r):void 0},now:function(){return+new Date},support:r});i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ct["[object "+t+"]"]=t.toLowerCase()});p=function(n){function r(n,t,i,r){var p,s,a,c,w,y,d,v,nt,g;if((t?t.ownerDocument||t:h)!==o&&k(t),t=t||o,i=i||[],c=t.nodeType,"string"!=typeof n||!n||1!==c&&9!==c&&11!==c)return i;if(!r&&l){if(11!==c&&(p=hr.exec(n)))if(a=p[1]){if(9===c){if(s=t.getElementById(a),!s||!s.parentNode)return i;if(s.id===a)return i.push(s),i}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&et(t,s)&&s.id===a)return i.push(s),i}else{if(p[2])return b.apply(i,t.getElementsByTagName(n)),i;if((a=p[3])&&u.getElementsByClassName)return b.apply(i,t.getElementsByClassName(a)),i}if(u.qsa&&(!e||!e.test(n))){if(v=d=f,nt=t,g=1!==c&&n,1===c&&"object"!==t.nodeName.toLowerCase()){for(y=ft(n),(d=t.getAttribute("id"))?v=d.replace(cr,"\\$&"):t.setAttribute("id",v),v="[id='"+v+"'] ",w=y.length;w--;)y[w]=v+vt(y[w]);nt=dt.test(n)&&ti(t.parentNode)||t;g=y.join(",")}if(g)try{return b.apply(i,nt.querySelectorAll(g)),i}catch(tt){}finally{d||t.removeAttribute("id")}}}return oi(n.replace(lt,"$1"),t,i,r)}function gt(){function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}var i=[];return n}function c(n){return n[f]=!0,n}function v(n){var t=o.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ni(n,i){for(var u=n.split("|"),r=n.length;r--;)t.attrHandle[u[r]]=i}function wi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~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 lr(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function ar(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function tt(n){return c(function(t){return t=+t,c(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 ti(n){return n&&"undefined"!=typeof n.getElementsByTagName&&n}function bi(){}function vt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function ii(n,t,i){var r=t.dir,u=i&&"parentNode"===r,e=ki++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var s,h,c=[a,e];if(o){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,o))return!0}else while(t=t[r])if(1===t.nodeType||u){if(h=t[f]||(t[f]={}),(s=h[r])&&s[0]===a&&s[1]===e)return c[2]=s[2];if(h[r]=c,c[2]=n(t,i,o))return!0}}}function ri(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 vr(n,t,i){for(var u=0,f=t.length;f>u;u++)r(n,t[u],i);return i}function yt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function ui(n,t,i,r,u,e){return r&&!r[f]&&(r=ui(r)),u&&!u[f]&&(u=ui(u,e)),c(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||vr(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?k:yt(k,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=yt(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?nt(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=yt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function fi(n){for(var o,u,r,s=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ii(function(n){return n===o},c,!0),a=ii(function(n){return nt(o,n)>-1},c,!0),e=[function(n,t,i){var r=!h&&(i||t!==ht)||((o=t).nodeType?l(n,t,i):a(n,t,i));return o=null,r}];s>i;i++)if(u=t.relative[n[i].type])e=[ii(ri(e),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[f]){for(r=++i;s>r;r++)if(t.relative[n[r].type])break;return ui(i>1&&ri(e),i>1&&vt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(lt,"$1"),u,r>i&&fi(n.slice(i,r)),s>r&&fi(n=n.slice(r)),s>r&&vt(n))}e.push(u)}return ri(e)}function yr(n,i){var u=i.length>0,f=n.length>0,e=function(e,s,h,c,l){var y,d,w,k=0,v="0",g=e&&[],p=[],nt=ht,tt=e||f&&t.find.TAG("*",l),it=a+=null==nt?1:Math.random()||.1,rt=tt.length;for(l&&(ht=s!==o&&s);v!==rt&&null!=(y=tt[v]);v++){if(f&&y){for(d=0;w=n[d++];)if(w(y,s,h)){c.push(y);break}l&&(a=it)}u&&((y=!w&&y)&&k--,e&&g.push(y))}if(k+=v,u&&v!==k){for(d=0;w=i[d++];)w(g,p,s,h);if(e){if(k>0)while(v--)g[v]||p[v]||(p[v]=gi.call(c));p=yt(p)}b.apply(c,p);l&&!e&&p.length>0&&k+i.length>1&&r.uniqueSort(c)}return l&&(a=it,ht=nt),g};return u?c(e):e}var it,u,t,st,ei,ft,pt,oi,ht,w,rt,k,o,s,l,e,d,ct,et,f="sizzle"+1*new Date,h=n.document,a=0,ki=0,si=gt(),hi=gt(),ci=gt(),wt=function(n,t){return n===t&&(rt=!0),0},li=-2147483648,di={}.hasOwnProperty,g=[],gi=g.pop,nr=g.push,b=g.push,ai=g.slice,nt=function(n,t){for(var i=0,r=n.length;r>i;i++)if(n[i]===t)return i;return-1},bt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",i="[\\x20\\t\\r\\n\\f]",ut="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",vi=ut.replace("w","w#"),yi="\\["+i+"*("+ut+")(?:"+i+"*([*^$|!~]?=)"+i+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+vi+"))|)"+i+"*\\]",kt=":("+ut+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+yi+")*)|.*)\\)|)",tr=new RegExp(i+"+","g"),lt=new RegExp("^"+i+"+|((?:^|[^\\\\])(?:\\\\.)*)"+i+"+$","g"),ir=new RegExp("^"+i+"*,"+i+"*"),rr=new RegExp("^"+i+"*([>+~]|"+i+")"+i+"*"),ur=new RegExp("="+i+"*([^\\]'\"]*?)"+i+"*\\]","g"),fr=new RegExp(kt),er=new RegExp("^"+vi+"$"),at={ID:new RegExp("^#("+ut+")"),CLASS:new RegExp("^\\.("+ut+")"),TAG:new RegExp("^("+ut.replace("w","w*")+")"),ATTR:new RegExp("^"+yi),PSEUDO:new RegExp("^"+kt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+i+"*(even|odd|(([+-]|)(\\d*)n|)"+i+"*(?:([+-]|)"+i+"*(\\d+)|))"+i+"*\\)|)","i"),bool:new RegExp("^(?:"+bt+")$","i"),needsContext:new RegExp("^"+i+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+i+"*((?:-\\d)?\\d*)"+i+"*\\)|)(?=[^-]|$)","i")},or=/^(?:input|select|textarea|button)$/i,sr=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,hr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,dt=/[+~]/,cr=/'|\\/g,y=new RegExp("\\\\([\\da-f]{1,6}"+i+"?|("+i+")|.)","ig"),p=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},pi=function(){k()};try{b.apply(g=ai.call(h.childNodes),h.childNodes);g[h.childNodes.length].nodeType}catch(pr){b={apply:g.length?function(n,t){nr.apply(n,ai.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}u=r.support={};ei=r.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};k=r.setDocument=function(n){var a,c,r=n?n.ownerDocument||n:h;return r!==o&&9===r.nodeType&&r.documentElement?(o=r,s=r.documentElement,c=r.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",pi,!1):c.attachEvent&&c.attachEvent("onunload",pi)),l=!ei(r),u.attributes=v(function(n){return n.className="i",!n.getAttribute("className")}),u.getElementsByTagName=v(function(n){return n.appendChild(r.createComment("")),!n.getElementsByTagName("*").length}),u.getElementsByClassName=ot.test(r.getElementsByClassName),u.getById=v(function(n){return s.appendChild(n).id=f,!r.getElementsByName||!r.getElementsByName(f).length}),u.getById?(t.find.ID=function(n,t){if("undefined"!=typeof t.getElementById&&l){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},t.filter.ID=function(n){var t=n.replace(y,p);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(y,p);return function(n){var i="undefined"!=typeof n.getAttributeNode&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=u.getElementsByTagName?function(n,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(n):u.qsa?t.querySelectorAll(n):void 0}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=u.getElementsByClassName&&function(n,t){if(l)return t.getElementsByClassName(n)},d=[],e=[],(u.qsa=ot.test(r.querySelectorAll))&&(v(function(n){s.appendChild(n).innerHTML="<a id='"+f+"'><\/a><select id='"+f+"-\f]' msallowcapture=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowcapture^='']").length&&e.push("[*^$]="+i+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||e.push("\\["+i+"*(?:value|"+bt+")");n.querySelectorAll("[id~="+f+"-]").length||e.push("~=");n.querySelectorAll(":checked").length||e.push(":checked");n.querySelectorAll("a#"+f+"+*").length||e.push(".#.+[+~]")}),v(function(n){var t=r.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&e.push("name"+i+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||e.push(":enabled",":disabled");n.querySelectorAll("*,:x");e.push(",.*:")})),(u.matchesSelector=ot.test(ct=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&v(function(n){u.disconnectedMatch=ct.call(n,"div");ct.call(n,"[s!='']:x");d.push("!=",kt)}),e=e.length&&new RegExp(e.join("|")),d=d.length&&new RegExp(d.join("|")),a=ot.test(s.compareDocumentPosition),et=a||ot.test(s.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},wt=a?function(n,t){if(n===t)return rt=!0,0;var i=!n.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,1&i||!u.sortDetached&&t.compareDocumentPosition(n)===i?n===r||n.ownerDocument===h&&et(h,n)?-1:t===r||t.ownerDocument===h&&et(h,t)?1:w?nt(w,n)-nt(w,t):0:4&i?-1:1)}:function(n,t){if(n===t)return rt=!0,0;var i,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(!o||!s)return n===r?-1:t===r?1:o?-1:s?1:w?nt(w,n)-nt(w,t):0;if(o===s)return wi(n,t);for(i=n;i=i.parentNode;)f.unshift(i);for(i=t;i=i.parentNode;)e.unshift(i);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===h?-1:e[u]===h?1:0},r):o};r.matches=function(n,t){return r(n,null,null,t)};r.matchesSelector=function(n,t){if((n.ownerDocument||n)!==o&&k(n),t=t.replace(ur,"='$1']"),!(!u.matchesSelector||!l||d&&d.test(t)||e&&e.test(t)))try{var i=ct.call(n,t);if(i||u.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(f){}return r(t,o,null,[n]).length>0};r.contains=function(n,t){return(n.ownerDocument||n)!==o&&k(n),et(n,t)};r.attr=function(n,i){(n.ownerDocument||n)!==o&&k(n);var f=t.attrHandle[i.toLowerCase()],r=f&&di.call(t.attrHandle,i.toLowerCase())?f(n,i,!l):void 0;return void 0!==r?r:u.attributes||!l?n.getAttribute(i):(r=n.getAttributeNode(i))&&r.specified?r.value:null};r.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};r.uniqueSort=function(n){var r,f=[],t=0,i=0;if(rt=!u.detectDuplicates,w=!u.sortStable&&n.slice(0),n.sort(wt),rt){while(r=n[i++])r===n[i]&&(t=f.push(i));while(t--)n.splice(f[t],1)}return w=null,n};st=r.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=st(r);return i};t=r.selectors={cacheLength:50,createPseudo:c,match:at,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(y,p),n[3]=(n[3]||n[4]||n[5]||"").replace(y,p),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||r.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&r.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return at.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&fr.test(t)&&(i=ft(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){var t=n.replace(y,p).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=si[n+" "];return t||(t=new RegExp("(^|"+i+")"+n+"("+i+"|$)"))&&si(n,function(n){return t.test("string"==typeof n.className&&n.className||"undefined"!=typeof n.getAttribute&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(u){var f=r.attr(u,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f.replace(tr," ")+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var v,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:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),v=k[n]||[],y=v[0]===a&&v[1],l=v[0]===a&&v[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[a,y,l];break}}else if(d&&(v=(t[f]||(t[f]={}))[n])&&v[0]===a)l=v[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[a,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,u=t.pseudos[n]||t.setFilters[n.toLowerCase()]||r.error("unsupported pseudo: "+n);return u[f]?u(i):u.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?c(function(n,t){for(var r,f=u(n,i),e=f.length;e--;)r=nt(n,f[e]),n[r]=!(t[r]=f[e])}):function(n){return u(n,0,e)}):u}},pseudos:{not:c(function(n){var t=[],r=[],i=pt(n.replace(lt,"$1"));return i[f]?c(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:c(function(n){return function(t){return r(n,t).length>0}}),contains:c(function(n){return n=n.replace(y,p),function(t){return(t.textContent||t.innerText||st(t)).indexOf(n)>-1}}),lang:c(function(n){return er.test(n||"")||r.error("unsupported lang: "+n),n=n.replace(y,p).toLowerCase(),function(t){var i;do if(i=l?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===s},focus:function(n){return n===o.activeElement&&(!o.hasFocus||o.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"input"===t&&!!n.checked||"option"===t&&!!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.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return sr.test(n.nodeName)},input:function(n){return or.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:tt(function(){return[0]}),last:tt(function(n,t){return[t-1]}),eq:tt(function(n,t,i){return[0>i?i+t:i]}),even:tt(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:tt(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:tt(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:tt(function(n,t,i){for(var r=0>i?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(it in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[it]=lr(it);for(it in{submit:!0,reset:!0})t.pseudos[it]=ar(it);return bi.prototype=t.filters=t.pseudos,t.setFilters=new bi,ft=r.tokenize=function(n,i){var e,f,s,o,u,h,c,l=hi[n+" "];if(l)return i?0:l.slice(0);for(u=n,h=[],c=t.preFilter;u;){(!e||(f=ir.exec(u)))&&(f&&(u=u.slice(f[0].length)||u),h.push(s=[]));e=!1;(f=rr.exec(u))&&(e=f.shift(),s.push({value:e,type:f[0].replace(lt," ")}),u=u.slice(e.length));for(o in t.filter)(f=at[o].exec(u))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),u=u.slice(e.length));if(!e)break}return i?u.length:u?r.error(n):hi(n,h).slice(0)},pt=r.compile=function(n,t){var r,u=[],e=[],i=ci[n+" "];if(!i){for(t||(t=ft(n)),r=t.length;r--;)i=fi(t[r]),i[f]?u.push(i):e.push(i);i=ci(n,yr(e,u));i.selector=n}return i},oi=r.select=function(n,i,r,f){var s,e,o,a,v,c="function"==typeof n&&n,h=!f&&ft(n=c.selector||n);if(r=r||[],1===h.length){if(e=h[0]=h[0].slice(0),e.length>2&&"ID"===(o=e[0]).type&&u.getById&&9===i.nodeType&&l&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(y,p),i)||[])[0],!i)return r;c&&(i=i.parentNode);n=n.slice(e.shift().value.length)}for(s=at.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[a=o.type])break;if((v=t.find[a])&&(f=v(o.matches[0].replace(y,p),dt.test(e[0].type)&&ti(i.parentNode)||i))){if(e.splice(s,1),n=f.length&&vt(e),!n)return b.apply(r,f),r;break}}}return(c||pt(n,h))(f,i,!l,r,dt.test(n)&&ti(i.parentNode)||i),r},u.sortStable=f.split("").sort(wt).join("")===f,u.detectDuplicates=!!rt,k(),u.sortDetached=v(function(n){return 1&n.compareDocumentPosition(o.createElement("div"))}),v(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ni("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),u.attributes&&v(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ni("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),v(function(n){return null==n.getAttribute("disabled")})||ni(bt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),r}(n);i.find=p;i.expr=p.selectors;i.expr[":"]=i.expr.pseudos;i.unique=p.uniqueSort;i.text=p.getText;i.isXMLDoc=p.isXML;i.contains=p.contains;var fr=i.expr.match.needsContext,er=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,re=/^.[^:#\[\.,]*$/;i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r=[],u=this,f=u.length;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;f>t;t++)if(i.contains(u[t],this))return!0}));for(t=0;f>t;t++)i.find(n,u[t],r);return r=this.pushStack(f>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ui(this,n||[],!1))},not:function(n){return this.pushStack(ui(this,n||[],!0))},is:function(n){return!!ui(this,"string"==typeof n&&fr.test(n)?i(n):n||[],!1).length}});var ft,u=n.document,ue=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,fe=i.fn.init=function(n,t){var r,f;if(!n)return this;if("string"==typeof n){if(r="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:ue.exec(n),!r||!r[1]&&t)return!t||t.jquery?(t||ft).find(n):this.constructor(t).find(n);if(r[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),er.test(r[1])&&i.isPlainObject(t))for(r in t)i.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(f=u.getElementById(r[2]),f&&f.parentNode){if(f.id!==r[2])return ft.find(n);this.length=1;this[0]=f}return this.context=u,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?"undefined"!=typeof ft.ready?ft.ready(n):n(i):(void 0!==n.selector&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};fe.prototype=i.fn;ft=i(u);or=/^(?:parents|prev(?:Until|All))/;sr={children:!0,contents:!0,next:!0,prev:!0};i.extend({dir:function(n,t,r){for(var f=[],u=n[t];u&&9!==u.nodeType&&(void 0===r||1!==u.nodeType||!i(u).is(r));)1===u.nodeType&&f.push(u),u=u[t];return f},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});i.fn.extend({has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=fr.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?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){return this.pushStack(i.unique(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?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 hr(n,"nextSibling")},prev:function(n){return hr(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"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(sr[n]||(f=i.unique(f)),or.test(n)&&(f=f.reverse())),this.pushStack(f)}});h=/\S+/g;fi={};i.Callbacks=function(n){n="string"==typeof n?fi[n]||ee(n):i.extend({},n);var o,u,h,f,e,c,t=[],r=!n.once&&[],l=function(i){for(u=n.memory&&i,h=!0,e=c||0,c=0,f=t.length,o=!0;t&&f>e;e++)if(t[e].apply(i[0],i[1])===!1&&n.stopOnFalse){u=!1;break}o=!1;t&&(r?r.length&&l(r.shift()):u?t=[]:s.disable())},s={add:function(){if(t){var r=t.length;!function e(r){i.each(r,function(r,u){var f=i.type(u);"function"===f?n.unique&&s.has(u)||t.push(u):u&&u.length&&"string"!==f&&e(u)})}(arguments);o?f=t.length:u&&(c=r,l(u))}return this},remove:function(){return t&&i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),o&&(f>=u&&f--,e>=u&&e--)}),this},has:function(n){return n?i.inArray(n,t)>-1:!(!t||!t.length)},empty:function(){return t=[],f=0,this},disable:function(){return t=r=u=void 0,this},disabled:function(){return!t},lock:function(){return r=void 0,u||s.disable(),this},locked:function(){return!r},fireWith:function(n,i){return!t||h&&!r||(i=i||[],i=[n,i.slice?i.slice():i],o?r.push(i):l(i)),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};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 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[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?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[1^n][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=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?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);r>t;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.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!u.body)return setTimeout(i.ready);i.isReady=!0;n!==!0&&--i.readyWait>0||(lt.resolveWith(u,[i]),i.fn.triggerHandler&&(i(u).triggerHandler("ready"),i(u).off("ready")))}}});i.ready.promise=function(t){if(!lt)if(lt=i.Deferred(),"complete"===u.readyState)setTimeout(i.ready);else if(u.addEventListener)u.addEventListener("DOMContentLoaded",a,!1),n.addEventListener("load",a,!1);else{u.attachEvent("onreadystatechange",a);n.attachEvent("onload",a);var r=!1;try{r=null==n.frameElement&&u.documentElement}catch(e){}r&&r.doScroll&&!function f(){if(!i.isReady){try{r.doScroll("left")}catch(n){return setTimeout(f,50)}cr();i.ready()}}()}return lt.promise(t)};o="undefined";for(lr in i(r))break;r.ownLast="0"!==lr;r.inlineBlockNeedsLayout=!1;i(function(){var f,t,n,i;n=u.getElementsByTagName("body")[0];n&&n.style&&(t=u.createElement("div"),i=u.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==o&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",r.inlineBlockNeedsLayout=f=3===t.offsetWidth,f&&(n.style.zoom=1)),n.removeChild(i))}),function(){var n=u.createElement("div");if(null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(t){r.deleteExpando=!1}}n=null}();i.acceptData=function(n){var t=i.noData[(n.nodeName+" ").toLowerCase()],r=+n.nodeType||1;return 1!==r&&9!==r?!1:!t||t!==!0&&n.getAttribute("classid")===t};ar=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;vr=/([A-Z])/g;i.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ei(n)},data:function(n,t,i){return pr(n,t,i)},removeData:function(n,t){return wr(n,t)},_data:function(n,t,i){return pr(n,t,i,!0)},_removeData:function(n,t){return wr(n,t,!0)}});i.fn.extend({data:function(n,t){var f,u,e,r=this[0],o=r&&r.attributes;if(void 0===n){if(this.length&&(e=i.data(r),1===r.nodeType&&!i._data(r,"parsedAttrs"))){for(f=o.length;f--;)o[f]&&(u=o[f].name,0===u.indexOf("data-")&&(u=i.camelCase(u.slice(5)),yr(r,u,e[u])));i._data(r,"parsedAttrs",!0)}return e}return"object"==typeof n?this.each(function(){i.data(this,n)}):arguments.length>1?this.each(function(){i.data(this,n,t)}):r?yr(r,n,i.data(r,n)):void 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 r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.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,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var r,f=1,e=i.Deferred(),u=this,o=this.length,s=function(){--f||e.resolveWith(u,[u])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";o--;)r=i._data(u[o],n+"queueHooks"),r&&r.empty&&(f++,r.empty.add(s));return s(),e.promise(t)}});var at=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=["Top","Right","Bottom","Left"],et=function(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)},b=i.access=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=null==r;if("object"===i.type(r)){f=!0;for(s in r)i.access(n,t,s,r[s],!0,e,o)}else if(void 0!==u&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;c>s;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e},oi=/^(?:checkbox|radio)$/i;!function(){var t=u.createElement("input"),n=u.createElement("div"),i=u.createDocumentFragment();if(n.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",r.leadingWhitespace=3===n.firstChild.nodeType,r.tbody=!n.getElementsByTagName("tbody").length,r.htmlSerialize=!!n.getElementsByTagName("link").length,r.html5Clone="<:nav><\/:nav>"!==u.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,i.appendChild(t),r.appendChecked=t.checked,n.innerHTML="<textarea>x<\/textarea>",r.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue,i.appendChild(n),n.innerHTML="<input type='radio' checked='checked' name='t'/>",r.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,r.noCloneEvent=!0,n.attachEvent&&(n.attachEvent("onclick",function(){r.noCloneEvent=!1}),n.cloneNode(!0).click()),null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(f){r.deleteExpando=!1}}}(),function(){var t,i,f=u.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})i="on"+t,(r[t+"Bubbles"]=i in n)||(f.setAttribute(i,"t"),r[t+"Bubbles"]=f.attributes[i].expando===!1);f=null}();var si=/^(?:input|select|textarea)$/i,oe=/^key/,se=/^(?:mouse|pointer|contextmenu)|click/,br=/^(?:focusinfocus|focusoutblur)$/,kr=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,t,r,u,f){var w,y,b,p,s,c,l,a,e,k,d,v=i._data(n);if(v){for(r.handler&&(p=r,r=p.handler,f=p.selector),r.guid||(r.guid=i.guid++),(y=v.events)||(y=v.events={}),(c=v.handle)||(c=v.handle=function(n){if(typeof i!==o&&(!n||i.event.triggered!==n.type))return i.event.dispatch.apply(c.elem,arguments)},c.elem=n),t=(t||"").match(h)||[""],b=t.length;b--;)w=kr.exec(t[b])||[],e=d=w[1],k=(w[2]||"").split(".").sort(),e&&(s=i.event.special[e]||{},e=(f?s.delegateType:s.bindType)||e,s=i.event.special[e]||{},l=i.extend({type:e,origType:d,data:u,handler:r,guid:r.guid,selector:f,needsContext:f&&i.expr.match.needsContext.test(f),namespace:k.join(".")},p),(a=y[e])||(a=y[e]=[],a.delegateCount=0,s.setup&&s.setup.call(n,u,k,c)!==!1||(n.addEventListener?n.addEventListener(e,c,!1):n.attachEvent&&n.attachEvent("on"+e,c))),s.add&&(s.add.call(n,l),l.handler.guid||(l.handler.guid=r.guid)),f?a.splice(a.delegateCount++,0,l):a.push(l),i.event.global[e]=!0);n=null}},remove:function(n,t,r,u,f){var y,o,s,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;)if(s=kr.exec(t[p])||[],e=k=s[1],w=(s[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],s=s[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],!f&&k!==o.origType||r&&r.guid!==o.guid||s&&!s.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])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(t,r,f,e){var l,a,o,p,c,h,w,y=[f||u],s=tt.call(t,"type")?t.type:t,v=tt.call(t,"namespace")?t.namespace.split("."):[];if(o=h=f=f||u,3!==f.nodeType&&8!==f.nodeType&&!br.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(v=s.split("."),s=v.shift(),v.sort()),a=s.indexOf(":")<0&&"on"+s,t=t[i.expando]?t:new i.Event(s,"object"==typeof t&&t),t.isTrigger=e?2:3,t.namespace=v.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=f),r=null==r?[t]:i.makeArray(r,[t]),c=i.event.special[s]||{},e||!c.trigger||c.trigger.apply(f,r)!==!1)){if(!e&&!c.noBubble&&!i.isWindow(f)){for(p=c.delegateType||s,br.test(p+s)||(o=o.parentNode);o;o=o.parentNode)y.push(o),h=o;h===(f.ownerDocument||u)&&y.push(h.defaultView||h.parentWindow||n)}for(w=0;(o=y[w++])&&!t.isPropagationStopped();)t.type=w>1?p:c.bindType||s,l=(i._data(o,"events")||{})[t.type]&&i._data(o,"handle"),l&&l.apply(o,r),l=a&&o[a],l&&l.apply&&i.acceptData(o)&&(t.result=l.apply(o,r),t.result===!1&&t.preventDefault());if(t.type=s,!e&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(y.pop(),r)===!1)&&i.acceptData(f)&&a&&f[s]&&!i.isWindow(f)){h=f[a];h&&(f[a]=null);i.event.triggered=s;try{f[s]()}catch(b){}i.event.triggered=void 0;h&&(f[a]=h)}return t.result}},dispatch:function(n){n=i.event.fix(n);var e,f,t,r,o,s=[],h=l.call(arguments),c=(i._data(this,"events")||{})[n.type]||[],u=i.event.special[n.type]||{};if(h[0]=n,n.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,n)!==!1){for(s=i.event.handlers.call(this,n,c),e=0;(r=s[e++])&&!n.isPropagationStopped();)for(n.currentTarget=r.elem,o=0;(t=r.handlers[o++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(t.namespace))&&(n.handleObj=t,n.data=t.data,f=((i.event.special[t.origType]||{}).handle||t.handler).apply(r.elem,h),void 0!==f&&(n.result=f)===!1&&(n.preventDefault(),n.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,n),n.result}},handlers:function(n,t){var f,e,u,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(!n.button||"click"!==n.type))for(;r!=this;r=r.parentNode||this)if(1===r.nodeType&&(r.disabled!==!0||"click"!==n.type)){for(u=[],o=0;s>o;o++)e=t[o],f=e.selector+" ",void 0===u[f]&&(u[f]=e.needsContext?i(f,this).index(r)>=0:i.find(f,this,null,[r]).length),u[f]&&u.push(e);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},fix:function(n){if(n[i.expando])return n;var e,o,s,r=n.type,f=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=se.test(r)?this.mouseHooks:oe.test(r)?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||u),3===n.target.nodeType&&(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 null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var i,e,r,f=t.button,o=t.fromElement;return null==n.pageX&&null!=t.clientX&&(e=n.target.ownerDocument||u,r=e.documentElement,i=e.body,n.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),n.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!n.relatedTarget&&o&&(n.relatedTarget=o===n.target?t.toElement:o),n.which||void 0===f||(n.which=1&f?1:2&f?3:4&f?2:0),n}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==dr()&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===dr()&&this.blur)return(this.blur(),!1)},delegateType:"focusout"},click:{trigger:function(){if(i.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return(this.click(),!1)},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(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=u.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){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&n.returnValue===!1?vt:it):this.type=n,t&&i.extend(this,t),this.timeStamp=n&&n.timeStamp||i.now(),void(this[i.expando]=!0)):new i.Event(n,t)};i.Event.prototype={isDefaultPrevented:it,isPropagationStopped:it,isImmediatePropagationStopped:it,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=vt;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=vt;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=vt;n&&n.stopImmediatePropagation&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},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}}});r.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:void i.event.add(this,"click._submit keypress._submit",function(n){var r=n.target,t=i.nodeName(r,"input")||i.nodeName(r,"button")?r.form:void 0;t&&!i._data(t,"submitBubbles")&&(i.event.add(t,"submit._submit",function(n){n._submit_bubble=!0}),i._data(t,"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(){return i.nodeName(this,"form")?!1:void i.event.remove(this,"._submit")}});r.changeBubbles||(i.event.special.change={setup:function(){return si.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(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):void i.event.add(this,"beforeactivate._change",function(n){var t=n.target;si.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||"radio"!==t.type&&"checkbox"!==t.type)return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!si.test(this.nodeName)}});r.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var r=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){var u=this.ownerDocument||this,f=i._data(u,t);f||u.addEventListener(n,r,!0);i._data(u,t,(f||0)+1)},teardown:function(){var u=this.ownerDocument||this,f=i._data(u,t)-1;f?i._data(u,t,f):(u.removeEventListener(n,r,!0),i._removeData(u,t))}}});i.fn.extend({on:function(n,t,r,u,f){var o,e;if("object"==typeof n){"string"!=typeof t&&(r=r||t,t=void 0);for(o in n)this.on(o,t,r,n[o],f);return this}if(null==r&&null==u?(u=t,r=t=void 0):null==u&&("string"==typeof t?(u=r,r=void 0):(u=r,r=t,t=void 0)),u===!1)u=it;else if(!u)return this;return 1===f&&(e=u,u=function(n){return i().off(n),e.apply(this,arguments)},u.guid=e.guid||(e.guid=i.guid++)),this.each(function(){i.event.add(this,n,u,r,t)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=it),this.each(function(){i.event.remove(this,n,r,t)})},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)}});var nu="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",he=/ jQuery\d+="(?:null|\d+)"/g,tu=new RegExp("<(?:"+nu+")[\\s/>]","i"),hi=/^\s+/,iu=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ru=/<([\w:]+)/,uu=/<tbody/i,ce=/<|&#?\w+;/,le=/<(?:script|style|link)/i,ae=/checked\s*(?:[^=]|=\s*.checked.)/i,fu=/^$|\/(?:java|ecma)script/i,ve=/^true\/(.*)/,ye=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,s={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:r.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},pe=gr(u),ci=pe.appendChild(u.createElement("div"));s.optgroup=s.option;s.tbody=s.tfoot=s.colgroup=s.caption=s.thead;s.th=s.td;i.extend({clone:function(n,t,u){var e,c,s,o,h,l=i.contains(n.ownerDocument,n);if(r.html5Clone||i.isXMLDoc(n)||!tu.test("<"+n.nodeName+">")?s=n.cloneNode(!0):(ci.innerHTML=n.outerHTML,ci.removeChild(s=ci.firstChild)),!(r.noCloneEvent&&r.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(e=f(s),h=f(n),o=0;null!=(c=h[o]);++o)e[o]&&be(c,e[o]);if(t)if(u)for(h=h||f(n),e=e||f(s),o=0;null!=(c=h[o]);o++)hu(c,e[o]);else hu(n,s);return e=f(s,"script"),e.length>0&&li(e,!l&&f(n,"script")),e=h=c=null,s},buildFragment:function(n,t,u,e){for(var c,o,b,h,p,w,a,k=n.length,v=gr(t),l=[],y=0;k>y;y++)if(o=n[y],o||0===o)if("object"===i.type(o))i.merge(l,o.nodeType?[o]:o);else if(ce.test(o)){for(h=h||v.appendChild(t.createElement("div")),p=(ru.exec(o)||["",""])[1].toLowerCase(),a=s[p]||s._default,h.innerHTML=a[1]+o.replace(iu,"<$1><\/$2>")+a[2],c=a[0];c--;)h=h.lastChild;if(!r.leadingWhitespace&&hi.test(o)&&l.push(t.createTextNode(hi.exec(o)[0])),!r.tbody)for(o="table"!==p||uu.test(o)?"<table>"!==a[1]||uu.test(o)?0:h:h.firstChild,c=o&&o.childNodes.length;c--;)i.nodeName(w=o.childNodes[c],"tbody")&&!w.childNodes.length&&o.removeChild(w);for(i.merge(l,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=v.lastChild}else l.push(t.createTextNode(o));for(h&&v.removeChild(h),r.appendChecked||i.grep(f(l,"input"),we),y=0;o=l[y++];)if((!e||-1===i.inArray(o,e))&&(b=i.contains(o.ownerDocument,o),h=f(v.appendChild(o),"script"),b&&li(h),u))for(c=0;o=h[c++];)fu.test(o.type||"")&&u.push(o);return h=null,v},cleanData:function(n,t){for(var u,e,f,s,a=0,h=i.expando,l=i.cache,v=r.deleteExpando,y=i.event.special;null!=(u=n[a]);a++)if((t||i.acceptData(u))&&(f=u[h],s=f&&l[f])){if(s.events)for(e in s.events)y[e]?i.event.remove(u,e):i.removeEvent(u,e,s.handle);l[f]&&(delete l[f],v?delete u[h]:typeof u.removeAttribute!==o?u.removeAttribute(h):u[h]=null,c.push(f))}}});i.fn.extend({text:function(n){return b(this,function(n){return void 0===n?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(n))},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=eu(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=eu(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,e=n?i.filter(n,this):this,u=0;null!=(r=e[u]);u++)t||1!==r.nodeType||i.cleanData(f(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&li(f(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(f(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=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return b(this,function(n){var t=this[0]||{},u=0,e=this.length;if(void 0===n)return 1===t.nodeType?t.innerHTML.replace(he,""):void 0;if(!("string"!=typeof n||le.test(n)||!r.htmlSerialize&&tu.test(n)||!r.leadingWhitespace&&hi.test(n)||s[(ru.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(iu,"<$1><\/$2>");try{for(;e>u;u++)t=this[u]||{},1===t.nodeType&&(i.cleanData(f(t,!1)),t.innerHTML=n);t=0}catch(o){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=arguments[0];return this.domManip(arguments,function(t){n=this.parentNode;i.cleanData(f(this));n&&n.replaceChild(t,this)}),n&&(n.length||n.nodeType)?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t){n=ir.apply([],n);var h,u,c,o,v,s,e=0,l=this.length,p=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||l>1&&"string"==typeof a&&!r.checkClone&&ae.test(a))return this.each(function(i){var r=p.eq(i);y&&(n[0]=a.call(this,i,r.html()));r.domManip(n,t)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),h=s.firstChild,1===s.childNodes.length&&(s=h),h)){for(o=i.map(f(s,"script"),ou),c=o.length;l>e;e++)u=s,e!==w&&(u=i.clone(u,!0,!0),c&&i.merge(o,f(u,"script"))),t.call(this[e],u,e);if(c)for(v=o[o.length-1].ownerDocument,i.map(o,su),e=0;c>e;e++)u=o[e],fu.test(u.type||"")&&!i._data(u,"globalEval")&&i.contains(v,u)&&(u.src?i._evalUrl&&i._evalUrl(u.src):i.globalEval((u.text||u.textContent||u.innerHTML||"").replace(ye,"")));s=h=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;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ii.apply(f,u.get());return this.pushStack(f)}});ai={};!function(){var n;r.shrinkWrapBlocks=function(){if(null!=n)return n;n=!1;var t,i,r;return i=u.getElementsByTagName("body")[0],i&&i.style?(t=u.createElement("div"),r=u.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(r).appendChild(t),typeof t.style.zoom!==o&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(u.createElement("div")).style.width="5px",n=3!==t.offsetWidth),i.removeChild(r),n):void 0}}();var lu=/^margin/,pt=new RegExp("^("+at+")(?!px)[a-z%]+$","i"),k,d,ke=/^(top|right|bottom|left)$/;n.getComputedStyle?(k=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):n.getComputedStyle(t,null)},d=function(n,t,r){var e,o,s,u,f=n.style;return r=r||k(n),u=r?r.getPropertyValue(t)||r[t]:void 0,r&&(""!==u||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),pt.test(u)&&lu.test(t)&&(e=f.width,o=f.minWidth,s=f.maxWidth,f.minWidth=f.maxWidth=f.width=u,u=r.width,f.width=e,f.minWidth=o,f.maxWidth=s)),void 0===u?u:u+""}):u.documentElement.currentStyle&&(k=function(n){return n.currentStyle},d=function(n,t,i){var o,f,e,r,u=n.style;return i=i||k(n),r=i?i[t]:void 0,null==r&&u&&u[t]&&(r=u[t]),pt.test(r)&&!ke.test(t)&&(o=u.left,f=n.runtimeStyle,e=f&&f.left,e&&(f.left=n.currentStyle.left),u.left="fontSize"===t?"1em":r,r=u.pixelLeft+"px",u.left=o,e&&(f.left=e)),void 0===r?r:r+""||"auto"});!function(){var f,t,l,o,s,e,h;if(f=u.createElement("div"),f.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",l=f.getElementsByTagName("a")[0],t=l&&l.style){t.cssText="float:left;opacity:.5";r.opacity="0.5"===t.opacity;r.cssFloat=!!t.cssFloat;f.style.backgroundClip="content-box";f.cloneNode(!0).style.backgroundClip="";r.clearCloneStyle="content-box"===f.style.backgroundClip;r.boxSizing=""===t.boxSizing||""===t.MozBoxSizing||""===t.WebkitBoxSizing;i.extend(r,{reliableHiddenOffsets:function(){return null==e&&c(),e},boxSizingReliable:function(){return null==s&&c(),s},pixelPosition:function(){return null==o&&c(),o},reliableMarginRight:function(){return null==h&&c(),h}});function c(){var i,r,f,t;r=u.getElementsByTagName("body")[0];r&&r.style&&(i=u.createElement("div"),f=u.createElement("div"),f.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",r.appendChild(f).appendChild(i),i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=s=!1,h=!0,n.getComputedStyle&&(o="1%"!==(n.getComputedStyle(i,null)||{}).top,s="4px"===(n.getComputedStyle(i,null)||{width:"4px"}).width,t=i.appendChild(u.createElement("div")),t.style.cssText=i.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",i.style.width="1px",h=!parseFloat((n.getComputedStyle(t,null)||{}).marginRight),i.removeChild(t)),i.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",t=i.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",e=0===t[0].offsetHeight,e&&(t[0].style.display="",t[1].style.display="none",e=0===t[0].offsetHeight),r.removeChild(f))}}}();i.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};var vi=/alpha\([^)]*\)/i,de=/opacity\s*=\s*([^)]*)/,ge=/^(none|table(?!-c[ea]).+)/,no=new RegExp("^("+at+")(.*)$","i"),to=new RegExp("^([+-])=("+at+")","i"),io={position:"absolute",visibility:"hidden",display:"block"},vu={letterSpacing:"0",fontWeight:"400"},yu=["Webkit","O","Moz","ms"];i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=d(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:r.cssFloat?"cssFloat":"styleFloat"},style:function(n,t,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,h,e,s=i.camelCase(t),c=n.style;if(t=i.cssProps[s]||(i.cssProps[s]=pu(c,s)),e=i.cssHooks[t]||i.cssHooks[s],void 0===u)return e&&"get"in e&&void 0!==(o=e.get(n,!1,f))?o:c[t];if(h=typeof u,"string"===h&&(o=to.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,t)),h="number"),null!=u&&u===u&&("number"!==h||i.cssNumber[s]||(u+="px"),r.clearCloneStyle||""!==u||0!==t.indexOf("background")||(c[t]="inherit"),!(e&&"set"in e&&void 0===(u=e.set(n,u,f)))))try{c[t]=u}catch(l){}}},css:function(n,t,r,u){var s,f,e,o=i.camelCase(t);return t=i.cssProps[o]||(i.cssProps[o]=pu(n.style,o)),e=i.cssHooks[t]||i.cssHooks[o],e&&"get"in e&&(f=e.get(n,!0,r)),void 0===f&&(f=d(n,t,u)),"normal"===f&&t in vu&&(f=vu[t]),""===r||r?(s=parseFloat(f),r===!0||i.isNumeric(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return ge.test(i.css(n,"display"))&&0===n.offsetWidth?i.swap(n,io,function(){return du(n,t,u)}):du(n,t,u)},set:function(n,u,f){var e=f&&k(n);return bu(n,u,f?ku(n,t,f,r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e),e):0)}}});r.opacity||(i.cssHooks.opacity={get:function(n,t){return de.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="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1;(t>=1||""===t)&&""===i.trim(f.replace(vi,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=vi.test(f)?f.replace(vi,e):f+" "+e)}});i.cssHooks.marginRight=au(r.reliableMarginRight,function(n,t){if(t)return i.swap(n,{display:"inline-block"},d,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+w[r]+t]=u[r]||u[r-2]||u[0];return f}};lu.test(n)||(i.cssHooks[n+t].set=bu)});i.fn.extend({css:function(n,t){return b(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=k(n),e=t.length;e>u;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return wu(this,!0)},hide:function(){return wu(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){et(this)?i(this).show():i(this).hide()})}});i.Tween=e;e.prototype={constructor:e,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=e.propHooks[this.prop];return n&&n.get?n.get(this):e.propHooks._default.get(this)},run:function(n){var r,t=e.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):e.propHooks._default.set(this),this}};e.prototype.init.prototype=e.prototype;e.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};e.propHooks.scrollTop=e.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.fx=e.prototype.init;i.fx.step={};var rt,wt,ro=/^(?:toggle|show|hide)$/,gu=new RegExp("^(?:([+-])=|)("+at+")([a-z%]*)$","i"),uo=/queueHooks$/,bt=[fo],st={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),r=gu.exec(t),e=r&&r[3]||(i.cssNumber[n]?"":"px"),u=(i.cssNumber[n]||"px"!==e&&+s)&&gu.exec(i.css(f.elem,n)),o=1,h=20;if(u&&u[3]!==e){e=e||u[3];r=r||[];u=+s||1;do o=o||".5",u/=o,i.style(f.elem,n,u+e);while(o!==(o=f.cur()/s)&&1!==o&&--h)}return r&&(u=f.start=+u||+s||0,f.unit=e,f.end=r[1]?u+(r[1]+1)*r[2]:+r[2]),f}]};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;f>u;u++)r=n[u],st[r]=st[r]||[],st[r].unshift(t)},prefilter:function(n,t){t?bt.unshift(n):bt.push(n)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?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:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||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.fn.extend({fadeTo:function(n,t,i,r){return this.filter(et).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);(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,t,r){var u=function(n){var t=n.stop;delete n.stop;t(r)};return"string"!=typeof n&&(r=t,t=n,n=void 0),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,f=i._data(this);if(t)f[t]&&f[t].stop&&u(f[t]);else for(t in f)f[t]&&f[t].stop&&uo.test(t)&&u(f[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(r),o=!1,e.splice(t,1));(o||!r)&&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.stop&&e.stop.call(this,!0),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(kt(t,!0),n,i,u)}});i.each({slideDown:kt("show"),slideUp:kt("hide"),slideToggle:kt("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.timers=[];i.fx.tick=function(){var r,n=i.timers,t=0;for(rt=i.now();t<n.length;t++)r=n[t],r()||n[t]!==r||n.splice(t--,1);n.length||i.fx.stop();rt=void 0};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){wt||(wt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(wt);wt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.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)}})},function(){var n,t,f,i,e;t=u.createElement("div");t.setAttribute("className","t");t.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";i=t.getElementsByTagName("a")[0];f=u.createElement("select");e=f.appendChild(u.createElement("option"));n=t.getElementsByTagName("input")[0];i.style.cssText="top:1px";r.getSetAttribute="t"!==t.className;r.style=/top/.test(i.getAttribute("style"));r.hrefNormalized="/a"===i.getAttribute("href");r.checkOn=!!n.value;r.optSelected=e.selected;r.enctype=!!u.createElement("form").enctype;f.disabled=!0;r.optDisabled=!e.disabled;n=u.createElement("input");n.setAttribute("value","");r.input=""===n.getAttribute("value");n.value="t";n.setAttribute("type","radio");r.radioValue="t"===n.value}();uf=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;1===this.nodeType&&(u=f?n.call(this,r,i(this).val()):n,null==u?u="":"number"==typeof u?u+="":i.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(u,"value"))?r:(r=u.value,"string"==typeof r?r.replace(uf,""):null==r?"":r)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:i.trim(i.text(n))}},select:{get:function(n){for(var o,t,s=n.options,u=n.selectedIndex,f="select-one"===n.type||0>u,h=f?null:[],c=f?u+1:s.length,e=0>u?c:f?u:0;c>e;e++)if(t=s[e],!(!t.selected&&e!==u||(r.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),f)return o;h.push(o)}return h},set:function(n,t){for(var f,r,u=n.options,o=i.makeArray(t),e=u.length;e--;)if(r=u[e],i.inArray(i.valHooks.option.get(r),o)>=0)try{r.selected=f=!0}catch(s){r.scrollHeight}else r.selected=!1;return f||(n.selectedIndex=-1),u}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}};r.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});var ut,ff,v=i.expr.attrHandle,yi=/^(?:checked|selected)$/i,g=r.getSetAttribute,dt=r.input;i.fn.extend({attr:function(n,t){return b(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return typeof n.getAttribute===o?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(t=t.toLowerCase(),u=i.attrHooks[t]||(i.expr.match.bool.test(t)?ff:ut)),void 0===r?u&&"get"in u&&null!==(f=u.get(n,t))?f:(f=i.find.attr(n,t),null==f?void 0:f):null!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):void i.removeAttr(n,t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(h);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)?dt&&g||!yi.test(r)?n[u]=!1:n[i.camelCase("default-"+r)]=n[u]=!1:i.attr(n,r,""),n.removeAttribute(g?r:u)},attrHooks:{type:{set:function(n,t){if(!r.radioValue&&"radio"===t&&i.nodeName(n,"input")){var u=n.value;return n.setAttribute("type",t),u&&(n.value=u),t}}}}});ff={set:function(n,t,r){return t===!1?i.removeAttr(n,r):dt&&g||!yi.test(r)?n.setAttribute(!g&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=v[t]||i.find.attr;v[t]=dt&&g||!yi.test(t)?function(n,t,i){var u,f;return i||(f=v[t],v[t]=u,u=null!=r(n,t,i)?t.toLowerCase():null,v[t]=f),u}:function(n,t,r){if(!r)return n[i.camelCase("default-"+t)]?t.toLowerCase():null}});dt&&g||(i.attrHooks.value={set:function(n,t,r){return i.nodeName(n,"input")?void(n.defaultValue=t):ut&&ut.set(n,t,r)}});g||(ut={set:function(n,t,i){var r=n.getAttributeNode(i);return r||n.setAttributeNode(r=n.ownerDocument.createAttribute(i)),r.value=t+="","value"===i||t===n.getAttribute(i)?t:void 0}},v.id=v.name=v.coords=function(n,t,i){var r;if(!i)return(r=n.getAttributeNode(t))&&""!==r.value?r.value:null},i.valHooks.button={get:function(n,t){var i=n.getAttributeNode(t);if(i&&i.specified)return i.value},set:ut.set},i.attrHooks.contenteditable={set:function(n,t,i){ut.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]={set:function(n,i){if(""===i)return(n.setAttribute(t,"auto"),i)}}}));r.style||(i.attrHooks.style={get:function(n){return n.style.cssText||void 0},set:function(n,t){return n.style.cssText=t+""}});ef=/^(?:input|select|textarea|button|object)$/i;of=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return b(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=void 0;delete this[n]}catch(t){}})}});i.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(n,t,r){var f,u,o,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return o=1!==e||!i.isXMLDoc(n),o&&(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):ef.test(n.nodeName)||of.test(n.nodeName)&&n.href?0:-1}}}});r.hrefNormalized||i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}});r.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});r.enctype||(i.propFix.enctype="encoding");gt=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(gt," "):" ")){for(s=0;u=o[s++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");f=i.trim(r);t.className!==f&&(t.className=f)}return this},removeClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(gt," "):"")){for(s=0;u=o[s++];)while(r.indexOf(" "+u+" ")>=0)r=r.replace(" "+u+" "," ");f=n?i.trim(r):"";t.className!==f&&(t.className=f)}return this},toggleClass:function(n,t){var r=typeof n;return"boolean"==typeof t&&"string"===r?t?this.addClass(n):this.removeClass(n):this.each(i.isFunction(n)?function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}:function(){if("string"===r)for(var t,f=0,u=i(this),e=n.match(h)||[];t=e[f++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else(r===o||"boolean"===r)&&(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;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(gt," ").indexOf(i)>=0)return!0;return!1}});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.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},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 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}});var pi=i.now(),wi=/\?/,oo=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;i.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var f,r=null,u=i.trim(t+"");return u&&!i.trim(u.replace(oo,function(n,t,i,u){return f&&t&&(r=0),0===r?n:(f=i||t,r+=!u-!i,"")}))?Function("return "+u)():i.error("Invalid JSON: "+t)};i.parseXML=function(t){var r,u;if(!t||"string"!=typeof t)return null;try{n.DOMParser?(u=new DOMParser,r=u.parseFromString(t,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t))}catch(f){r=void 0}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var nt,y,so=/#.*$/,sf=/([?&])_=[^&]*/,ho=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,co=/^(?:GET|HEAD)$/,lo=/^\/\//,hf=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,cf={},bi={},lf="*/".concat("*");try{y=location.href}catch(ns){y=u.createElement("a");y.href="";y=y.href}nt=hf.exec(y.toLowerCase())||[];i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:y,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(nt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":lf,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",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?ki(ki(n,i.ajaxSettings),t):ki(i.ajaxSettings,n)},ajaxPrefilter:af(cf),ajaxTransport:af(bi),ajax:function(n,t){function w(n,t,s,h){var v,it,nt,y,w,c=t;2!==e&&(e=2,k&&clearTimeout(k),a=void 0,b=h||"",u.readyState=n>0?4:0,v=n>=200&&300>n||304===n,s&&(y=ao(r,u,s)),y=vo(r,y,u,v),v?(r.ifModified&&(w=u.getResponseHeader("Last-Modified"),w&&(i.lastModified[f]=w),w=u.getResponseHeader("etag"),w&&(i.etag[f]=w)),204===n||"HEAD"===r.type?c="nocontent":304===n?c="notmodified":(c=y.state,it=y.data,nt=y.error,v=!nt)):(nt=c,(n||!c)&&(c="error",0>n&&(n=0))),u.status=n,u.statusText=(t||c)+"",v?g.resolveWith(o,[it,c,u]):g.rejectWith(o,[u,c,nt]),u.statusCode(p),p=void 0,l&&d.trigger(v?"ajaxSuccess":"ajaxError",[u,r,v?it:nt]),tt.fireWith(o,[u,c]),l&&(d.trigger("ajaxComplete",[u,r]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof n&&(t=n,n=void 0);t=t||{};var s,c,f,b,k,l,a,v,r=i.ajaxSetup({},t),o=r.context||r,d=r.context&&(o.nodeType||o.jquery)?i(o):i.event,g=i.Deferred(),tt=i.Callbacks("once memory"),p=r.statusCode||{},it={},rt={},e=0,ut="canceled",u={readyState:0,getResponseHeader:function(n){var t;if(2===e){if(!v)for(v={};t=ho.exec(b);)v[t[1].toLowerCase()]=t[2];t=v[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===e?b:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return e||(n=rt[i]=rt[i]||n,it[n]=t),this},overrideMimeType:function(n){return e||(r.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>e)for(t in n)p[t]=[p[t],n[t]];else u.always(n[u.status]);return this},abort:function(n){var t=n||ut;return a&&a.abort(t),w(0,t),this}};if(g.promise(u).complete=tt.add,u.success=u.done,u.error=u.fail,r.url=((n||r.url||y)+"").replace(so,"").replace(lo,nt[1]+"//"),r.type=t.method||t.type||r.method||r.type,r.dataTypes=i.trim(r.dataType||"*").toLowerCase().match(h)||[""],null==r.crossDomain&&(s=hf.exec(r.url.toLowerCase()),r.crossDomain=!(!s||s[1]===nt[1]&&s[2]===nt[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(nt[3]||("http:"===nt[1]?"80":"443")))),r.data&&r.processData&&"string"!=typeof r.data&&(r.data=i.param(r.data,r.traditional)),vf(cf,r,t,u),2===e)return u;l=i.event&&r.global;l&&0==i.active++&&i.event.trigger("ajaxStart");r.type=r.type.toUpperCase();r.hasContent=!co.test(r.type);f=r.url;r.hasContent||(r.data&&(f=r.url+=(wi.test(f)?"&":"?")+r.data,delete r.data),r.cache===!1&&(r.url=sf.test(f)?f.replace(sf,"$1_="+pi++):f+(wi.test(f)?"&":"?")+"_="+pi++));r.ifModified&&(i.lastModified[f]&&u.setRequestHeader("If-Modified-Since",i.lastModified[f]),i.etag[f]&&u.setRequestHeader("If-None-Match",i.etag[f]));(r.data&&r.hasContent&&r.contentType!==!1||t.contentType)&&u.setRequestHeader("Content-Type",r.contentType);u.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+lf+"; q=0.01":""):r.accepts["*"]);for(c in r.headers)u.setRequestHeader(c,r.headers[c]);if(r.beforeSend&&(r.beforeSend.call(o,u,r)===!1||2===e))return u.abort();ut="abort";for(c in{success:1,error:1,complete:1})u[c](r[c]);if(a=vf(bi,r,t,u)){u.readyState=1;l&&d.trigger("ajaxSend",[u,r]);r.async&&r.timeout>0&&(k=setTimeout(function(){u.abort("timeout")},r.timeout));try{e=1;a.send(it,w)}catch(ft){if(!(2>e))throw ft;w(-1,ft)}}else w(-1,"No Transport");return u},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=void 0),i.ajax({url:n,type:t,dataType:f,data:r,success:u})}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};i.fn.extend({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&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return this.each(i.isFunction(n)?function(t){i(this).wrapInner(n.call(this,t))}: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()}});i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!r.reliableHiddenOffsets()&&"none"===(n.style&&n.style.display||i.css(n,"display"))};i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)};var yo=/%20/g,po=/\[\]$/,yf=/\r?\n/g,wo=/^(?:submit|button|image|reset|file)$/i,bo=/^(?:input|select|textarea|keygen)/i;i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():null==t?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(void 0===t&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)di(r,n[r],t,f);return u.join("&").replace(yo,"+")};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")&&bo.test(this.nodeName)&&!wo.test(n)&&(this.checked||!oi.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(yf,"\r\n")}}):{name:t.name,value:r.replace(yf,"\r\n")}}).get()}});i.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&pf()||go()}:pf;var ko=0,ni={},ht=i.ajaxSettings.xhr();return n.attachEvent&&n.attachEvent("onunload",function(){for(var n in ni)ni[n](void 0,!0)}),r.cors=!!ht&&"withCredentials"in ht,ht=r.ajax=!!ht,ht&&i.ajaxTransport(function(n){if(!n.crossDomain||r.cors){var t;return{send:function(r,u){var e,f=n.xhr(),o=++ko;if(f.open(n.type,n.url,n.async,n.username,n.password),n.xhrFields)for(e in n.xhrFields)f[e]=n.xhrFields[e];n.mimeType&&f.overrideMimeType&&f.overrideMimeType(n.mimeType);n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(e in r)void 0!==r[e]&&f.setRequestHeader(e,r[e]+"");f.send(n.hasContent&&n.data||null);t=function(r,e){var s,c,h;if(t&&(e||4===f.readyState))if(delete ni[o],t=void 0,f.onreadystatechange=i.noop,e)4!==f.readyState&&f.abort();else{h={};s=f.status;"string"==typeof f.responseText&&(h.text=f.responseText);try{c=f.statusText}catch(l){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=h.text?200:404}h&&u(s,c,h,f.getAllResponseHeaders())};n.async?4===f.readyState?setTimeout(t):f.onreadystatechange=ni[o]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),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){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)}),i.ajaxTransport("script",function(n){if(n.crossDomain){var t,r=u.head||i("head")[0]||u.documentElement;return{send:function(i,f){t=u.createElement("script");t.async=!0;n.scriptCharset&&(t.charset=n.scriptCharset);t.src=n.url;t.onload=t.onreadystatechange=function(n,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||f(200,"success"))};r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}}),gi=[],ti=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=gi.pop()||i.expando+"_"+pi++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,u){var f,o,e,s=t.jsonp!==!1&&(ti.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&ti.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return(f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ti,"$1"+f):t.jsonp!==!1&&(t.url+=(wi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return e||i.error(f+" was not called"),e[0]},t.dataTypes[0]="json",o=n[f],n[f]=function(){e=arguments},u.always(function(){n[f]=o;t[f]&&(t.jsonpCallback=r.jsonpCallback,gi.push(f));e&&i.isFunction(o)&&o(e[0]);e=o=void 0}),"script")}),i.parseHTML=function(n,t,r){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(r=t,t=!1);t=t||u;var f=er.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))},nr=i.fn.load,i.fn.load=function(n,t,r){if("string"!=typeof n&&nr)return nr.apply(this,arguments);var u,o,s,f=this,e=n.indexOf(" ");return e>=0&&(u=i.trim(n.slice(e,n.length)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),f.length>0&&i.ajax({url:n,type:s,dataType:"html",data:t}).done(function(n){o=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).complete(r&&function(n,t){f.each(r,o||[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.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},tr=n.document.documentElement,i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=("absolute"===l||"fixed"===l)&&i.inArray("auto",[s,c])>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,u));null!=t.top&&(f.top=t.top-u.top+h);null!=t.left&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}},i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var t,f,u={top:0,left:0},r=this[0],e=r&&r.ownerDocument;if(e)return t=e.documentElement,i.contains(t,r)?(typeof r.getBoundingClientRect!==o&&(u=r.getBoundingClientRect()),f=wf(e),{top:u.top+(f.pageYOffset||t.scrollTop)-(t.clientTop||0),left:u.left+(f.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):u},position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?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||tr;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||tr})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r=/Y/.test(t);i.fn[n]=function(u){return b(this,function(n,u,f){var e=wf(n);return void 0===f?e?t in e?e[t]:e.document.documentElement[u]:n[u]:void(e?e.scrollTo(r?i(e).scrollLeft():f,r?f:i(e).scrollTop()):n[u]=f)},n,u,arguments.length,null)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=au(r.pixelPosition,function(n,r){if(r)return(r=d(n,t),pt.test(r)?i(n).position()[t]+"px":r)})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||"boolean"!=typeof u),o=r||(u===!0||f===!0?"margin":"border");return b(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:9===t.nodeType?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):void 0===u?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:void 0,e,null)}})}),i.fn.size=function(){return this.length},i.fn.andSelf=i.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return i}),bf=n.jQuery,kf=n.$,i.noConflict=function(t){return n.$===i&&(n.$=kf),t&&n.jQuery===i&&(n.jQuery=bf),i},typeof t===o&&(n.jQuery=n.$=i),i}),function(n){"function"==typeof define&&define.amd?define(["jquery"],n):n(jQuery)}(function(n){function h(t,i){var r,u,f,e=t.nodeName.toLowerCase();return"area"===e?(r=t.parentNode,u=r.name,t.href&&u&&"map"===r.nodeName.toLowerCase()?(f=n("img[usemap='#"+u+"']")[0],!!f&&c(f)):!1):(/input|select|textarea|button|object/.test(e)?!t.disabled:"a"===e?t.href||i:i)&&c(t)}function c(t){return n.expr.filters.visible(t)&&!n(t).parents().addBack().filter(function(){return"hidden"===n.css(this,"visibility")}).length}function k(n){for(var t,i;n.length&&n[0]!==document;){if(t=n.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(n.css("zIndex"),10),!isNaN(i)&&0!==i))return i;n=n.parent()}return 0}function l(){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:"Prev",nextText:"Next",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.regional.en=n.extend(!0,{},this.regional[""]);this.regional["en-US"]=n.extend(!0,{},this.regional.en);this.dpDiv=a(n("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>"))}function a(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");-1!==this.className.indexOf("ui-datepicker-prev")&&n(this).removeClass("ui-datepicker-prev-hover");-1!==this.className.indexOf("ui-datepicker-next")&&n(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",v)}function v(){n.datepicker._isDisabledDatepicker(u.inline?u.dpDiv.parent()[0]:u.input[0])||(n(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),n(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&n(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&n(this).addClass("ui-datepicker-next-hover"))}function r(t,i){n.extend(t,i);for(var r in i)null==i[r]&&(t[r]=i[r]);return t}function t(n){return function(){var t=this.element.val();n.apply(this,arguments);this._refresh();t!==this.element.val()&&this._trigger("change")}}var y,f,i,u,o,s;n.ui=n.ui||{};n.extend(n.ui,{version:"1.11.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});n.fn.extend({scrollParent:function(t){var i=this.css("position"),u="absolute"===i,f=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=n(this);return u&&"static"===t.css("position")?!1:f.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&r.length?r:n(this[0].ownerDocument||document)},uniqueId:function(){var n=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.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 h(t,!isNaN(n.attr(t,"tabindex")))},tabbable:function(t){var i=n.attr(t,"tabindex"),r=isNaN(i);return(r||i>=0)&&h(t,!r)}});n("<a>").outerWidth(1).jquery||n.each(["Width","Height"],function(t,i){function r(t,i,r,u){return n.each(e,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 e="Width"===i?["Left","Right"]:["Top","Bottom"],u=i.toLowerCase(),f={innerWidth:n.fn.innerWidth,innerHeight:n.fn.innerHeight,outerWidth:n.fn.outerWidth,outerHeight:n.fn.outerHeight};n.fn["inner"+i]=function(t){return void 0===t?f["inner"+i].call(this):this.each(function(){n(this).css(u,r(this,t)+"px")})};n.fn["outer"+i]=function(t,e){return"number"!=typeof t?f["outer"+i].call(this,t):this.each(function(){n(this).css(u,r(this,t,!0,e)+"px")})}});n.fn.addBack||(n.fn.addBack=function(n){return this.add(null==n?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.fn.extend({focus:function(t){return function(i,r){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){n(t).focus();r&&r.call(t)},i)}):t.apply(this,arguments)}}(n.fn.focus),disableSelection:function(){var n="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(n+".ui-disableSelection",function(n){n.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var r,u,i=n(this[0]);i.length&&i[0]!==document;){if(r=i.css("position"),("absolute"===r||"relative"===r||"fixed"===r)&&(u=parseInt(i.css("zIndex"),10),!isNaN(u)&&0!==u))return u;i=i.parent()}return 0}});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,r){var u,f=n.plugins[t];if(f&&(r||n.element[0].parentNode&&11!==n.element[0].parentNode.nodeType))for(u=0;f.length>u;u++)n.options[f[u][0]]&&f[u][1].apply(n.element,i)}};y=0;f=Array.prototype.slice;n.cleanData=function(t){return function(i){for(var r,u,f=0;null!=(u=i[f]);f++)try{r=n._data(u,"events");r&&r.remove&&n(u).triggerHandler("remove")}catch(e){}t(i)}}(n.cleanData);n.widget=function(t,i,r){var s,f,u,o,h={},e=t.split(".")[0];return 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){return this._createWidget?(arguments.length&&this._createWidget(n,t),void 0):new u(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){return n.isFunction(r)?(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 t,i=this._super,f=this._superApply;return this._super=n,this._superApply=u,t=r.apply(this,arguments),this._super=i,this._superApply=f,t}}(),void 0):(h[t]=r,void 0)}),u.prototype=n.widget.extend(o,{widgetEventPrefix:f?o.widgetEventPrefix||t: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),u};n.widget.extend=function(t){for(var i,r,e=f.call(arguments,1),u=0,o=e.length;o>u;u++)for(i in e[u])r=e[u][i],e[u].hasOwnProperty(i)&&void 0!==r&&(t[i]=n.isPlainObject(r)?n.isPlainObject(t[i])?n.widget.extend({},t[i],r):n.widget.extend({},r):r);return t};n.widget.bridge=function(t,i){var r=i.prototype.widgetFullName||t;n.fn[t]=function(u){var s="string"==typeof u,o=f.call(arguments,1),e=this;return u=!s&&o.length?n.widget.extend.apply(null,[u].concat(o)):u,s?this.each(function(){var i,f=n.data(this,r);return"instance"===u?(e=f,!1):f?n.isFunction(f[u])&&"_"!==u.charAt(0)?(i=f[u].apply(f,o),i!==f&&void 0!==i?(e=i&&i.jquery?e.pushStack(i.get()):i,!1):void 0):n.error("no such method '"+u+"' for "+t+" widget instance"):n.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+u+"'")}):this.each(function(){var t=n.data(this,r);t?(t.option(u||{}),t._init&&t._init()):n.data(this,r,new i(u,this))}),e}};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=y++;this.eventNamespace="."+this.widgetName+this.uuid;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.options=n.widget.extend({},this.options,this._getCreateOptions(),t);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.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(t,i){var r,u,f,e=t;if(0===arguments.length)return n.widget.extend({},this.options);if("string"==typeof t)if(e={},r=t.split("."),t=r.shift(),r.length){for(u=e[t]=n.widget.extend({},this.options[t]),f=0;r.length-1>f;f++)u[r[f]]=u[r[f]]||{},u=u[r[f]];if(t=r.pop(),1===arguments.length)return void 0===u[t]?null:u[t];u[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];e[t]=i}return this._setOptions(e),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,"disabled"===n&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,r){var f,u=this;"boolean"!=typeof t&&(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("string"==typeof e?u[e]:e).apply(u,arguments)}"string"!=typeof e&&(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(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;t.unbind(i).undelegate(i);this.bindings=n(this.bindings.not(t).get());this.focusable=n(this.focusable.not(t).get());this.hoverable=n(this.hoverable.not(t).get())},_delay:function(n,t){function r(){return("string"==typeof n?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)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){"string"==typeof u&&(u={effect:u});var o,e=u?u===!0||"number"==typeof u?i:u.effect||i:t;u=u||{};"number"==typeof u&&(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()})}});n.widget;i=!1;n(document).mouseup(function(){i=!1});n.widget("ui.mouse",{version:"1.11.2",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&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!i){this._mouseMoved=!1;this._mouseStarted&&this._mouseUp(t);this._mouseDownEvent=t;var r=this,u=1===t.which,f="string"==typeof this.options.cancel&&t.target.nodeName?n(t.target).closest(this.options.cancel).length:!1;return u&&!f&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===n.data(t.target,this.widgetName+".preventClickEvent")&&n.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(n){return r._mouseMove(n)},this._mouseUpDelegate=function(n){return r._mouseUp(n)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),i=!0,!0)):!0}},_mouseMove:function(t){return this._mouseMoved&&(n.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button||!t.which)?this._mouseUp(t):((t.which||t.button)&&(this._mouseMoved=!0),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 this.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)),i=!1,!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}}),function(){function f(n,t,i){return[parseFloat(n[0])*(a.test(n[0])?t/100:1),parseFloat(n[1])*(a.test(n[1])?i/100:1)]}function i(t,i){return parseInt(n.css(t,i),10)||0}function v(t){var i=t[0];return 9===i.nodeType?{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 u,e,r=Math.max,t=Math.abs,o=Math.round,s=/left|center|right/,h=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,y=n.fn.position;n.position={scrollbarWidth:function(){if(void 0!==u)return u;var r,i,t=n("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'><\/div><\/div>"),f=t.children()[0];return n("body").append(t),r=f.offsetWidth,t.css("overflow","scroll"),i=f.offsetWidth,r===i&&(i=t[0].clientWidth),t.remove(),u=r-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),r=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),u="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,f="scroll"===r||"auto"===r&&t.height<t.element[0].scrollHeight;return{width:f?n.position.scrollbarWidth():0,height:u?n.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=n(t||window),r=n.isWindow(i[0]),u=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:r,isDocument:u,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:r||u?i.width():i.outerWidth(),height:r||u?i.height():i.outerHeight()}}};n.fn.position=function(u){if(!u||!u.of)return y.apply(this,arguments);u=n.extend({},u);var k,a,p,b,w,g,nt=n(u.of),it=n.position.getWithinInfo(u.within),rt=n.position.getScrollInfo(it),d=(u.collision||"flip").split(" "),tt={};return g=v(nt),nt[0].preventDefault&&(u.at="left top"),a=g.width,p=g.height,b=g.offset,w=n.extend({},b),n.each(["my","at"],function(){var t,i,n=(u[this]||"").split(" ");1===n.length&&(n=s.test(n[0])?n.concat(["center"]):h.test(n[0])?["center"].concat(n):["center","center"]);n[0]=s.test(n[0])?n[0]:"center";n[1]=h.test(n[1])?n[1]:"center";t=c.exec(n[0]);i=c.exec(n[1]);tt[this]=[t?t[0]:0,i?i[0]:0];u[this]=[l.exec(n[0])[0],l.exec(n[1])[0]]}),1===d.length&&(d[1]=d[0]),"right"===u.at[0]?w.left+=a:"center"===u.at[0]&&(w.left+=a/2),"bottom"===u.at[1]?w.top+=p:"center"===u.at[1]&&(w.top+=p/2),k=f(tt.at,a,p),w.left+=k[0],w.top+=k[1],this.each(function(){var y,g,h=n(this),c=h.outerWidth(),l=h.outerHeight(),ut=i(this,"marginLeft"),ft=i(this,"marginTop"),et=c+ut+i(this,"marginRight")+rt.width,ot=l+ft+i(this,"marginBottom")+rt.height,s=n.extend({},w),v=f(tt.my,h.outerWidth(),h.outerHeight());"right"===u.my[0]?s.left-=c:"center"===u.my[0]&&(s.left-=c/2);"bottom"===u.my[1]?s.top-=l:"center"===u.my[1]&&(s.top-=l/2);s.left+=v[0];s.top+=v[1];e||(s.left=o(s.left),s.top=o(s.top));y={marginLeft:ut,marginTop:ft};n.each(["left","top"],function(t,i){n.ui.position[d[t]]&&n.ui.position[d[t]][i](s,{targetWidth:a,targetHeight:p,elemWidth:c,elemHeight:l,collisionPosition:y,collisionWidth:et,collisionHeight:ot,offset:[k[0]+v[0],k[1]+v[1]],my:u.my,at:u.at,within:it,elem:h})});u.using&&(g=function(n){var i=b.left-s.left,o=i+a-c,f=b.top-s.top,v=f+p-l,e={target:{element:nt,left:b.left,top:b.top,width:a,height:p},element:{element:h,left:s.left,top:s.top,width:c,height:l},horizontal:0>o?"left":i>0?"right":"center",vertical:0>v?"top":f>0?"bottom":"middle"};c>a&&a>t(i+o)&&(e.horizontal="center");l>p&&p>t(f+v)&&(e.vertical="middle");e.important=r(t(i),t(o))>r(t(f),t(v))?"horizontal":"vertical";u.using.call(this,n,e)});h.offset(n.extend(s,{using:g}))})};n.ui.position={fit:{left:function(n,t){var h,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;t.collisionWidth>o?i>0&&0>=f?(h=n.left+i+t.collisionWidth-o-u,n.left+=i-h):n.left=f>0&&0>=i?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 h,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;t.collisionHeight>e?i>0&&0>=f?(h=n.top+i+t.collisionHeight-e-u,n.top+=i-h):n.top=f>0&&0>=i?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,i){var o,s,r=i.within,y=r.offset.left+r.scrollLeft,c=r.width,h=r.isWindow?r.scrollLeft:r.offset.left,l=n.left-i.collisionPosition.marginLeft,a=l-h,v=l+i.collisionWidth-c-h,u="left"===i.my[0]?-i.elemWidth:"right"===i.my[0]?i.elemWidth:0,f="left"===i.at[0]?i.targetWidth:"right"===i.at[0]?-i.targetWidth:0,e=-2*i.offset[0];0>a?(o=n.left+u+f+e+i.collisionWidth-c-y,(0>o||t(a)>o)&&(n.left+=u+f+e)):v>0&&(s=n.left-i.collisionPosition.marginLeft+u+f+e-h,(s>0||v>t(s))&&(n.left+=u+f+e))},top:function(n,i){var o,s,r=i.within,y=r.offset.top+r.scrollTop,a=r.height,h=r.isWindow?r.scrollTop:r.offset.top,v=n.top-i.collisionPosition.marginTop,c=v-h,l=v+i.collisionHeight-a-h,p="top"===i.my[1],u=p?-i.elemHeight:"bottom"===i.my[1]?i.elemHeight:0,f="top"===i.at[1]?i.targetHeight:"bottom"===i.at[1]?-i.targetHeight:0,e=-2*i.offset[1];0>c?(s=n.top+u+f+e+i.collisionHeight-a-y,n.top+u+f+e>c&&(0>s||t(c)>s)&&(n.top+=u+f+e)):l>0&&(o=n.top-i.collisionPosition.marginTop+u+f+e-h,n.top+u+f+e>l&&(o>0||l>t(o))&&(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,o=document.getElementsByTagName("body")[0],s=document.createElement("div");t=document.createElement(o?"div":"body");r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};o&&n.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in r)t.style[f]=r[f];t.appendChild(s);i=o||document.documentElement;i.insertBefore(t,i.firstChild);s.style.cssText="position: absolute; left: 10.7432222px;";u=n(s).offset().left;e=u>10&&11>u;t.innerHTML="";i.removeChild(t)}()}();n.ui.position;n.widget("ui.draggable",n.ui.mouse,{version:"1.11.2",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(){"original"===this.options.helper&&this._setPositionRelative();this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._setHandleClassName();this._mouseInit()},_setOption:function(n,t){this._super(n,t);"handle"===n&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),this.helper||i.disabled||n(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=n(this);return n("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&n(i.activeElement).blur()}catch(r){}},_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(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===n(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),n.ui.ddmanager&&n.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(n){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:n.pageX-this.offset.left,top:n.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),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.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var r=this,i=!1;return n.ui.ddmanager&&!this.options.dropBehaviour&&(i=n.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||this.options.revert===!0||n.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?n(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){r._trigger("stop",t)!==!1&&r._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),n.ui.ddmanager&&n.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),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){return this.options.handle?!!n(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element;this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var r=this.options,u=n.isFunction(r.helper),i=u?n(r.helper.apply(this.element[0],[t])):"clone"===r.helper?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo("parent"===r.appendTo?this.element[0].parentNode:r.appendTo),u&&i[0]===this.element[0]&&this._setPositionRelative(),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(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)},_isRootNode:function(n){return/(html|body)/i.test(n.tagName)||n===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&n.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(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("relative"!==this.cssPosition)return{top:0,left:0};var n=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:n.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_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 f,t,i,r=this.options,u=this.document[0];return this.relativeContainer=null,r.containment?"window"===r.containment?(this.containment=[n(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,n(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,n(window).scrollLeft()+n(window).width()-this.helperProportions.width-this.margins.left,n(window).scrollTop()+(n(window).height()||u.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===r.containment?(this.containment=[0,0,n(u).width()-this.helperProportions.width-this.margins.left,(n(u).height()||u.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):r.containment.constructor===Array?(this.containment=r.containment,void 0):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),t=n(r.containment),i=t[0],i&&(f=/(scroll|auto)/.test(t.css("overflow")),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(f?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t),void 0):(this.containment=null,void 0)},_convertPositionTo:function(n,t){t||(t=this.position);var i="absolute"===n?1:-1,r=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)*i}},_generatePosition:function(n,t){var i,s,u,f,r=this.options,h=this._isRootNode(this.scrollParent[0]),e=n.pageX,o=n.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,n.pageX-this.offset.click.left<i[0]&&(e=i[0]+this.offset.click.left),n.pageY-this.offset.click.top<i[1]&&(o=i[1]+this.offset.click.top),n.pageX-this.offset.click.left>i[2]&&(e=i[2]+this.offset.click.left),n.pageY-this.offset.click.top>i[3]&&(o=i[3]+this.offset.click.top)),r.grid&&(u=r.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,o=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((e-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,e=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),"y"===r.axis&&(e=this.originalPageX),"x"===r.axis&&(o=this.originalPageY)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_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;this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto"));"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,r){return r=r||this._uiHash(),n.ui.plugin.call(this,t,[i,r,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),r.offset=this.positionAbs),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,r){var u=n.extend({},i,{item:r.element});r.sortables=[];n(r.options.connectToSortable).each(function(){var i=n(this).sortable("instance");i&&!i.options.disabled&&(r.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,u))})},stop:function(t,i,r){var u=n.extend({},i,{item:r.element});r.cancelHelperRemoval=!1;n.each(r.sortables,function(){var n=this;n.isOver?(n.isOver=0,r.cancelHelperRemoval=!0,n.cancelHelperRemoval=!1,n._storedCSS={position:n.placeholder.css("position"),top:n.placeholder.css("top"),left:n.placeholder.css("left")},n._mouseStop(t),n.options.helper=n.options._helper):(n.cancelHelperRemoval=!0,n._trigger("deactivate",t,u))})},drag:function(t,i,r){n.each(r.sortables,function(){var f=!1,u=this;u.positionAbs=r.positionAbs;u.helperProportions=r.helperProportions;u.offset.click=r.offset.click;u._intersectsWith(u.containerCache)&&(f=!0,n.each(r.sortables,function(){return this.positionAbs=r.positionAbs,this.helperProportions=r.helperProportions,this.offset.click=r.offset.click,this!==u&&this._intersectsWith(this.containerCache)&&n.contains(u.element[0],this.element[0])&&(f=!1),f}));f?(u.isOver||(u.isOver=1,u.currentItem=i.helper.appendTo(u.element).data("ui-sortable-item",!0),u.options._helper=u.options.helper,u.options.helper=function(){return i.helper[0]},t.target=u.currentItem[0],u._mouseCapture(t,!0),u._mouseStart(t,!0,!0),u.offset.click.top=r.offset.click.top,u.offset.click.left=r.offset.click.left,u.offset.parent.left-=r.offset.parent.left-u.offset.parent.left,u.offset.parent.top-=r.offset.parent.top-u.offset.parent.top,r._trigger("toSortable",t),r.dropped=u.element,n.each(r.sortables,function(){this.refreshPositions()}),r.currentItem=r.element,u.fromOutside=r),u.currentItem&&(u._mouseDrag(t),i.position=u.position)):u.isOver&&(u.isOver=0,u.cancelHelperRemoval=!0,u.options._revert=u.options.revert,u.options.revert=!1,u._trigger("out",t,u._uiHash(u)),u._mouseStop(t,!0),u.options.revert=u.options._revert,u.options.helper=u.options._helper,u.placeholder&&u.placeholder.remove(),r._refreshOffsets(t),i.position=r._generatePosition(t,!0),r._trigger("fromSortable",t),r.dropped=!1,n.each(r.sortables,function(){this.refreshPositions()}))})}});n.ui.plugin.add("draggable","cursor",{start:function(t,i,r){var u=n("body"),f=r.options;u.css("cursor")&&(f._cursor=u.css("cursor"));u.css("cursor",f.cursor)},stop:function(t,i,r){var u=r.options;u._cursor&&n("body").css("cursor",u._cursor)}});n.ui.plugin.add("draggable","opacity",{start:function(t,i,r){var u=n(i.helper),f=r.options;u.css("opacity")&&(f._opacity=u.css("opacity"));u.css("opacity",f.opacity)},stop:function(t,i,r){var u=r.options;u._opacity&&n(i.helper).css("opacity",u._opacity)}});n.ui.plugin.add("draggable","scroll",{start:function(n,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1));i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,r){var u=r.options,o=!1,e=r.scrollParentNotHidden[0],f=r.document[0];e!==f&&"HTML"!==e.tagName?(u.axis&&"x"===u.axis||(r.overflowOffset.top+e.offsetHeight-t.pageY<u.scrollSensitivity?e.scrollTop=o=e.scrollTop+u.scrollSpeed:t.pageY-r.overflowOffset.top<u.scrollSensitivity&&(e.scrollTop=o=e.scrollTop-u.scrollSpeed)),u.axis&&"y"===u.axis||(r.overflowOffset.left+e.offsetWidth-t.pageX<u.scrollSensitivity?e.scrollLeft=o=e.scrollLeft+u.scrollSpeed:t.pageX-r.overflowOffset.left<u.scrollSensitivity&&(e.scrollLeft=o=e.scrollLeft-u.scrollSpeed))):(u.axis&&"x"===u.axis||(t.pageY-n(f).scrollTop()<u.scrollSensitivity?o=n(f).scrollTop(n(f).scrollTop()-u.scrollSpeed):n(window).height()-(t.pageY-n(f).scrollTop())<u.scrollSensitivity&&(o=n(f).scrollTop(n(f).scrollTop()+u.scrollSpeed))),u.axis&&"y"===u.axis||(t.pageX-n(f).scrollLeft()<u.scrollSensitivity?o=n(f).scrollLeft(n(f).scrollLeft()-u.scrollSpeed):n(window).width()-(t.pageX-n(f).scrollLeft())<u.scrollSensitivity&&(o=n(f).scrollLeft(n(f).scrollLeft()+u.scrollSpeed))));o!==!1&&n.ui.ddmanager&&!u.dropBehaviour&&n.ui.ddmanager.prepareOffsets(r,t)}});n.ui.plugin.add("draggable","snap",{start:function(t,i,r){var u=r.options;r.snapElements=[];n(u.snap.constructor!==String?u.snap.items||":data(ui-draggable)":u.snap).each(function(){var t=n(this),i=t.offset();this!==r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,r){for(var e,o,s,h,c,a,l,v,w,b=r.options,f=b.snapTolerance,y=i.offset.left,k=y+r.helperProportions.width,p=i.offset.top,d=p+r.helperProportions.height,u=r.snapElements.length-1;u>=0;u--)c=r.snapElements[u].left-r.margins.left,a=c+r.snapElements[u].width,l=r.snapElements[u].top-r.margins.top,v=l+r.snapElements[u].height,c-f>k||y>a+f||l-f>d||p>v+f||!n.contains(r.snapElements[u].item.ownerDocument,r.snapElements[u].item)?(r.snapElements[u].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item})),r.snapElements[u].snapping=!1):("inner"!==b.snapMode&&(e=f>=Math.abs(l-d),o=f>=Math.abs(v-p),s=f>=Math.abs(c-k),h=f>=Math.abs(a-y),e&&(i.position.top=r._convertPositionTo("relative",{top:l-r.helperProportions.height,left:0}).top),o&&(i.position.top=r._convertPositionTo("relative",{top:v,left:0}).top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a}).left)),w=e||o||s||h,"outer"!==b.snapMode&&(e=f>=Math.abs(l-p),o=f>=Math.abs(v-d),s=f>=Math.abs(c-y),h=f>=Math.abs(a-k),e&&(i.position.top=r._convertPositionTo("relative",{top:l,left:0}).top),o&&(i.position.top=r._convertPositionTo("relative",{top:v-r.helperProportions.height,left:0}).top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c}).left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a-r.helperProportions.width}).left)),!r.snapElements[u].snapping&&(e||o||s||h||w)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item})),r.snapElements[u].snapping=e||o||s||h||w)}});n.ui.plugin.add("draggable","stack",{start:function(t,i,r){var f,e=r.options,u=n.makeArray(n(e.stack)).sort(function(t,i){return(parseInt(n(t).css("zIndex"),10)||0)-(parseInt(n(i).css("zIndex"),10)||0)});u.length&&(f=parseInt(n(u[0]).css("zIndex"),10)||0,n(u).each(function(t){n(this).css("zIndex",f+t)}),this.css("zIndex",f+u.length))}});n.ui.plugin.add("draggable","zIndex",{start:function(t,i,r){var u=n(i.helper),f=r.options;u.css("zIndex")&&(f._zIndex=u.css("zIndex"));u.css("zIndex",f.zIndex)},stop:function(t,i,r){var u=r.options;u._zIndex&&n(i.helper).css("zIndex",u._zIndex)}});n.ui.draggable;n.widget("ui.droppable",{version:"1.11.2",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,i=this.options,r=i.accept;this.isover=!1;this.isout=!0;this.accept=n.isFunction(r)?r:function(n){return n.is(r)};this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}};this._addToManager(i.scope);i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){n.ui.ddmanager.droppables[t]=n.ui.ddmanager.droppables[t]||[];n.ui.ddmanager.droppables[t].push(this)},_splice:function(n){for(var t=0;n.length>t;t++)n[t]===this&&n.splice(t,1)},_destroy:function(){var t=n.ui.ddmanager.droppables[this.options.scope];this._splice(t);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=n.isFunction(i)?i:function(n){return n.is(i)};else if("scope"===t){var r=n.ui.ddmanager.droppables[this.options.scope];this._splice(r);this._addToManager(i)}this._super(t,i)},_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]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=n(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===r.options.scope&&i.accept.call(i.element[0],r.currentItem||r.element)&&n.ui.intersect(r,n.extend(i,{offset:i.element.offset()}),i.options.tolerance,t))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):!1},ui:function(n){return{draggable:n.currentItem||n.element,helper:n.helper,position:n.position,offset:n.positionAbs}}});n.ui.intersect=function(){function n(n,t,i){return n>=t&&t+i>n}return function(t,i,r,u){if(!i.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,s=(t.positionAbs||t.position.absolute).top+t.margins.top,h=o+t.helperProportions.width,c=s+t.helperProportions.height,f=i.offset.left,e=i.offset.top,l=f+i.proportions().width,a=e+i.proportions().height;switch(r){case"fit":return o>=f&&l>=h&&s>=e&&a>=c;case"intersect":return o+t.helperProportions.width/2>f&&l>h-t.helperProportions.width/2&&s+t.helperProportions.height/2>e&&a>c-t.helperProportions.height/2;case"pointer":return n(u.pageY,e,i.proportions().height)&&n(u.pageX,f,i.proportions().width);case"touch":return(s>=e&&a>=s||c>=e&&a>=c||e>s&&c>a)&&(o>=f&&l>=o||h>=f&&l>=h||f>o&&h>l);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;u.length>r;r++)if(!(u[r].options.disabled||t&&!u[r].accept.call(u[r].element[0],t.currentItem||t.element))){for(f=0;e.length>f;f++)if(e[f]===u[r].element[0]){u[r].proportions().height=0;continue n}u[r].visible="none"!==u[r].element.css("display");u[r].visible&&("mousedown"===o&&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]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&n.ui.intersect(t,this,this.options.tolerance,i)&&(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,i),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(this).droppable("instance").options.scope===e}),f.length&&(r=n(f[0]).droppable("instance"),r.greedyChild="isover"===u)),r&&"isover"===u&&(r.isover=!1,r.isout=!0,r._out.call(r,i)),this[u]=!0,this["isout"===u?"isover":"isout"]=!1,this["isover"===u?"_over":"_out"].call(this,i),r&&"isout"===u&&(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)}};n.ui.droppable;n.widget("ui.resizable",n.ui.mouse,{version:"1.11.2",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},_num:function(n){return parseInt(n,10)||0},_isNumber:function(n){return!isNaN(parseInt(n,10))},_hasScroll:function(t,i){if("hidden"===n(t).css("overflow"))return!1;var r=i&&"left"===i?"scrollLeft":"scrollTop",u=!1;return t[r]>0?!0:(t[r]=1,u=t[r]>0,t[r]=0,u)},_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.resizable("instance")),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("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},f=0;e.length>f;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]=this.element.children(this.handles[i]).first().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 u,f,e,r=this.options,i=this.element;return this.resizing=!0,this._renderProxy(),u=this._num(this.helper.css("left")),f=this._num(this.helper.css("top")),r.containment&&(u+=n(r.containment).scrollLeft()||0,f+=n(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:u,top:f},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:i.width(),height:i.height()},this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()},this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()},this.originalPosition={left:u,top:f},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,e=n(".ui-resizable-"+this.axis).css("cursor"),n("body").css("cursor","auto"===e?this.axis+"-resize":e),i.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,r,u=this.originalMousePosition,e=this.axis,o=t.pageX-u.left||0,s=t.pageY-u.top||0,f=this._change[e];return this._updatePrevProperties(),f?(i=f.apply(this,[t,o,s]),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),r=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),n.isEmptyObject(r)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!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&&this._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},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var n={};return this.position.top!==this.prevPosition.top&&(n.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(n.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(n.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(n.height=this.size.height+"px"),this.helper.css(n),n},_updateVirtualBoundaries:function(n){var r,u,f,e,t,i=this.options;t={minWidth:this._isNumber(i.minWidth)?i.minWidth:0,maxWidth:this._isNumber(i.maxWidth)?i.maxWidth:1/0,minHeight:this._isNumber(i.minHeight)?i.minHeight:0,maxHeight:this._isNumber(i.maxHeight)?i.maxHeight:1/0};(this._aspectRatio||n)&&(r=t.minHeight*this.aspectRatio,f=t.minWidth/this.aspectRatio,u=t.maxHeight*this.aspectRatio,e=t.maxWidth/this.aspectRatio,r>t.minWidth&&(t.minWidth=r),f>t.minHeight&&(t.minHeight=f),t.maxWidth>u&&(t.maxWidth=u),t.maxHeight>e&&(t.maxHeight=e));this._vBoundaries=t},_updateCache:function(n){this.offset=this.helper.offset();this._isNumber(n.left)&&(this.position.left=n.left);this._isNumber(n.top)&&(this.position.top=n.top);this._isNumber(n.height)&&(this.size.height=n.height);this._isNumber(n.width)&&(this.size.width=n.width)},_updateRatio:function(n){var t=this.position,i=this.size,r=this.axis;return this._isNumber(n.height)?n.width=n.height*this.aspectRatio:this._isNumber(n.width)&&(n.height=n.width/this.aspectRatio),"sw"===r&&(n.left=t.left+(i.width-n.width),n.top=null),"nw"===r&&(n.top=t.top+(i.height-n.height),n.left=t.left+(i.width-n.width)),n},_respectSize:function(n){var t=this._vBoundaries,i=this.axis,r=this._isNumber(n.width)&&t.maxWidth&&t.maxWidth<n.width,u=this._isNumber(n.height)&&t.maxHeight&&t.maxHeight<n.height,f=this._isNumber(n.width)&&t.minWidth&&t.minWidth>n.width,e=this._isNumber(n.height)&&t.minHeight&&t.minHeight>n.height,o=this.originalPosition.left+this.originalSize.width,s=this.position.top+this.size.height,h=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return f&&(n.width=t.minWidth),e&&(n.height=t.minHeight),r&&(n.width=t.maxWidth),u&&(n.height=t.maxHeight),f&&h&&(n.left=o-t.minWidth),r&&h&&(n.left=o-t.maxWidth),e&&c&&(n.top=s-t.minHeight),u&&c&&(n.top=s-t.maxHeight),n.width||n.height||n.left||!n.top?n.width||n.height||n.top||!n.left||(n.left=null):n.top=null,n},_getPaddingPlusBorderDimensions:function(n){for(var t=0,i=[],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")];4>t;t++)i[t]=parseInt(r[t],10)||0,i[t]+=parseInt(u[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var n,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)n=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(n)),n.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||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()]);"resize"!==t&&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).resizable("instance"),u=i.options,r=i._proportionallyResizeElements,f=r.length&&/textarea/i.test(r[0].nodeName),s=f&&i._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 r,f,e,o,s,h,c,t=n(this).resizable("instance"),l=t.options,a=t.element,u=l.containment,i=u instanceof n?u.get(0):/parent/.test(u)?a.parent().get(0):u;i&&(t.containerElement=n(i),/document/.test(u)||u===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}):(r=n(i),f=[],n(["Top","Right","Left","Bottom"]).each(function(n,i){f[n]=t._num(r.css("padding"+i))}),t.containerOffset=r.offset(),t.containerPosition=r.position(),t.containerSize={height:r.innerHeight()-f[3],width:r.innerWidth()-f[1]},e=t.containerOffset,o=t.containerSize.height,s=t.containerSize.width,h=t._hasScroll(i,"left")?i.scrollWidth:s,c=t._hasScroll(i)?i.scrollHeight:o,t.parentData={element:i,left:e.left,top:e.top,width:h,height:c}))},resize:function(t){var o,s,h,c,i=n(this).resizable("instance"),v=i.options,r=i.containerOffset,l=i.position,f=i._aspectRatio||t.shiftKey,e={top:0,left:0},a=i.containerElement,u=!0;a[0]!==document&&/static/.test(a.css("position"))&&(e=r);l.left<(i._helper?r.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-r.left:i.position.left-e.left),f&&(i.size.height=i.size.width/i.aspectRatio,u=!1),i.position.left=v.helper?r.left:0);l.top<(i._helper?r.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-r.top:i.position.top),f&&(i.size.width=i.size.height*i.aspectRatio,u=!1),i.position.top=i._helper?r.top:0);h=i.containerElement.get(0)===i.element.parent().get(0);c=/relative|absolute/.test(i.containerElement.css("position"));h&&c?(i.offset.left=i.parentData.left+i.position.left,i.offset.top=i.parentData.top+i.position.top):(i.offset.left=i.element.offset().left,i.offset.top=i.element.offset().top);o=Math.abs(i.sizeDiff.width+(i._helper?i.offset.left-e.left:i.offset.left-r.left));s=Math.abs(i.sizeDiff.height+(i._helper?i.offset.top-e.top:i.offset.top-r.top));o+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-o,f&&(i.size.height=i.size.width/i.aspectRatio,u=!1));s+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-s,f&&(i.size.width=i.size.height*i.aspectRatio,u=!1));u||(i.position.left=i.prevPosition.left,i.position.top=i.prevPosition.top,i.size.width=i.prevSize.width,i.size.height=i.prevSize.height)},stop:function(){var t=n(this).resizable("instance"),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).resizable("instance"),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)})})};"object"!=typeof t.alsoResize||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).resizable("instance"),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)})};"object"!=typeof u.alsoResize||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).resizable("instance"),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("string"==typeof i.ghost?i.ghost:"");t.ghost.appendTo(t.helper)},resize:function(){var t=n(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=n(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}});n.ui.plugin.add("resizable","grid",{resize:function(){var h,t=n(this).resizable("instance"),i=t.options,y=t.size,e=t.originalSize,o=t.originalPosition,c=t.axis,l="number"==typeof i.grid?[i.grid,i.grid]:i.grid,s=l[0]||1,f=l[1]||1,a=Math.round((y.width-e.width)/s)*s,v=Math.round((y.height-e.height)/f)*f,r=e.width+a,u=e.height+v,p=i.maxWidth&&r>i.maxWidth,w=i.maxHeight&&u>i.maxHeight,b=i.minWidth&&i.minWidth>r,k=i.minHeight&&i.minHeight>u;i.grid=l;b&&(r+=s);k&&(u+=f);p&&(r-=s);w&&(u-=f);/^(se|s|e)$/.test(c)?(t.size.width=r,t.size.height=u):/^(ne)$/.test(c)?(t.size.width=r,t.size.height=u,t.position.top=o.top-v):/^(sw)$/.test(c)?(t.size.width=r,t.size.height=u,t.position.left=o.left-a):((0>=u-f||0>=r-s)&&(h=t._getPaddingPlusBorderDimensions(this)),u-f>0?(t.size.height=u,t.position.top=o.top-v):(u=f-h.height,t.size.height=u,t.position.top=o.top+e.height-u),r-s>0?(t.size.width=r,t.position.left=o.left-a):(r=f-h.height,t.size.width=r,t.position.left=o.left+e.width-r))}});n.ui.resizable;n.widget("ui.selectable",n.ui.mouse,{version:"1.11.2",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]&&("touch"===s.tolerance?h=!(e.left>u||i>e.right||e.top>f||r>e.bottom):"fit"===s.tolerance&&(h=e.left>i&&u>e.right&&e.top>r&&f>e.bottom),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}});n.widget("ui.sortable",n.ui.mouse,{version:"1.11.2",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},_isOverAxis:function(n,t,i){return n>=t&&t+i>n},_isFloating:function(n){return/left|right/.test(n.css("float"))||/inline|table-cell/.test(n.css("display"))},_create:function(){var n=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?"x"===n.axis||this._isFloating(this.items[0].item):!1;this.offset=this.element.offset();this._mouseInit();this._setHandleClassName();this.ready=!0},_setOption:function(n,t){this._super(n,t);"handle"===n&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle");n.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle");this._mouseDestroy();for(var n=this.items.length-1;n>=0;n--)this.items[n].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var r=null,f=!1,u=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!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?!this.options.handle||i||(n(this.options.handle,r).find("*").addBack().each(function(){this===t.target&&(f=!0)}),f)?(this.currentItem=r,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,r){var f,e,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&&"auto"!==u.cursor&&(e=this.document.find("body"),this.storedCursor=e.css("cursor"),e.css("cursor",u.cursor),this.storedStylesheet=n("<style>*{ cursor: "+u.cursor+" !important; }<\/style>").appendTo(e)),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&&"HTML"!==this.scrollParent[0].tagName&&(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&&"HTML"!==this.scrollParent[0].tagName?(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&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(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[1===o?"next":"prev"]()[0]!==f&&!n.contains(this.placeholder[0],f)&&("semi-dynamic"===this.options.type?!n.contains(this.element[0],f):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(u))break;this._rearrange(t,u);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 e=this,f=this.placeholder.offset(),r=this.options.axis,u={};r&&"x"!==r||(u.left=f.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft));r&&"y"!==r||(u.top=f.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop));this.reverting=!0;n(this.helper).animate(u,parseInt(this.options.revert,10)||500,function(){e._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});"original"===this.options.helper?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]),"original"!==this.options.helper&&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="x"===this.options.axis||i+o>u&&e>i+o,a="y"===this.options.axis||t+s>r&&f>t+s,v=l&&a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>n[this.floating?"width":"height"]?v:t+this.helperProportions.width/2>r&&f>h-this.helperProportions.width/2&&i+this.helperProportions.height/2>u&&e>c-this.helperProportions.height/2},_intersectsWithPointer:function(n){var r="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,n.top,n.height),u="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,n.left,n.width),f=r&&u,t=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();return f?this.floating?i&&"right"===i||"down"===t?2:1:t&&("down"===t?2:1):!1},_intersectsWithSides:function(n){var r=this._isOverAxis(this.positionAbs.top+this.offset.click.top,n.top+n.height/2,n.height),u=this._isOverAxis(this.positionAbs.left+this.offset.click.left,n.left+n.width/2,n.width),t=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();return this.floating&&i?"right"===i&&u||"left"===i&&!u:t&&("down"===t&&r||"up"===t&&!r)},_getDragVerticalDirection:function(){var n=this.positionAbs.top-this.lastPositionAbs.top;return 0!==n&&(n>0?"down":"up")},_getDragHorizontalDirection:function(){var n=this.positionAbs.left-this.lastPositionAbs.left;return 0!==n&&(n>0?"right":"left")},refresh:function(n){return this._refreshItems(n),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var n=this.options;return n.connectWith.constructor===String?[n.connectWith]:n.connectWith},_getItemsAsjQuery:function(t){function h(){s.push(this)}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(h);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;t.length>i;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;l>u;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 u=t.currentItem[0].nodeName.toLowerCase(),i=n("<"+u+">",t.document[0]).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===u?t.currentItem.children().each(function(){n("<td>&#160;<\/td>",t.document[0]).attr("colspan",n(this).attr("colspan")||1).appendTo(i)}):"img"===u&&i.attr("src",t.currentItem.attr("src")),r||i.css("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,f,a,v,o,l,s,h,e=null,i=null,r=this.containers.length-1;r>=0;r--)if(!n.contains(this.currentItem[0],this.containers[r].element[0]))if(this._intersectsWith(this.containers[r].containerCache)){if(e&&n.contains(this.containers[r].element[0],e.element[0]))continue;e=this.containers[r];i=r}else this.containers[r].containerCache.over&&(this.containers[r]._trigger("out",t,this._uiHash(this)),this.containers[r].containerCache.over=0);if(e)if(1===this.containers.length)this.containers[i].containerCache.over||(this.containers[i]._trigger("over",t,this._uiHash(this)),this.containers[i].containerCache.over=1);else{for(c=1e4,f=null,s=e.floating||this._isFloating(this.currentItem),a=s?"left":"top",v=s?"width":"height",h=s?"clientX":"clientY",u=this.items.length-1;u>=0;u--)n.contains(this.containers[i].element[0],this.items[u].item[0])&&this.items[u].item[0]!==this.currentItem[0]&&(o=this.items[u].item.offset()[a],l=!1,t[h]-o>this.items[u][v]/2&&(l=!0),c>Math.abs(t[h]-o)&&(c=Math.abs(t[h]-o),f=this.items[u],this.direction=l?"up":"down"));if(!f&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[i])return this.currentContainer.containerCache.over||(this.containers[i]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;f?this._rearrange(t,f,null,!0):this._rearrange(t,null,this.containers[i].element,!0);this._trigger("change",t,this._uiHash());this.containers[i]._trigger("change",t,this._uiHash(this));this.currentContainer=this.containers[i];this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[i]._trigger("over",t,this._uiHash(this));this.containers[i].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])):"clone"===r.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||n("parent"!==r.appendTo?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){"string"==typeof t&&(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"absolute"===this.cssPosition&&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&&"html"===this.offsetParent[0].tagName.toLowerCase()&&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("relative"===this.cssPosition){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;"parent"===i.containment&&(i.containment=this.helper[0].parentNode);("document"===i.containment||"window"===i.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,n("document"===i.containment?document:window).width()-this.helperProportions.width-this.margins.left,(n("document"===i.containment?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="hidden"!==n(t).css("overflow"),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="absolute"===t?1:-1,u="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(u[0].tagName);return{top:i.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():f?0:u.scrollTop())*r,left:i.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():f?0:u.scrollLeft())*r}},_generatePosition:function(t){var r,u,i=this.options,f=t.pageX,e=t.pageY,o="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(o[0].tagName);return"relative"!==this.cssPosition||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+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:o.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-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],"down"===this.direction?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(n,t){function u(n,t,i){return function(r){i._trigger(n,r,t._uiHash(t))}}this.reverting=!1;var i,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&r.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]||t||r.push(function(n){this._trigger("update",n,this._uiHash())}),this!==this.currentContainer&&(t||(r.push(function(n){this._trigger("remove",n,this._uiHash())}),r.push(function(n){return function(t){n._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(n){return function(t){n._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||r.push(u("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(u("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",n,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;r.length>i;i++)r[i].call(this,n);this._trigger("stop",n,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_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}}});n.widget("ui.accordion",{version:"1.11.2",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},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_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&&null!=t.active||(t.active=0);this._processPanels();0>t.active&&(t.active+=this.headers.length);this._refresh()},_getCreateEventData:function(){return{header:this.active,panel: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-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId();this._destroyIcons();n=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId();"content"!==this.options.heightStyle&&n.css("height","")},_setOption:function(n,t){return"active"===n?(this._activate(t),void 0):("event"===n&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(n,t),"collapsible"!==n||t||this.options.active!==!1||this._activate(0),"icons"===n&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===n&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_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(){var t=this.headers,n=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all");this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide();n&&(this._off(t.not(this.headers)),this._off(n.not(this.panels)))},_refresh:function(){var t,i=this.options,r=i.heightStyle,u=this.element.parent();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(){var t=n(this),r=t.uniqueId().attr("id"),i=t.next(),u=i.uniqueId().attr("id");t.attr("aria-controls",u);i.attr("aria-labelledby",r)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide();this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0);this._createIcons();this._setupEvents(i.event);"fill"===r?(t=u.height(),this.element.siblings(":visible").each(function(){var i=n(this),r=i.css("position");"absolute"!==r&&"fixed"!==r&&(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")):"auto"===r&&(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"number"==typeof t?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-hidden":"true"});i.prev().attr("aria-selected","false");r.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):r.length&&this.headers.filter(function(){return 0===n(this).attr("tabIndex")}).attr("tabIndex",-1);r.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(n,t,i){var h,r,u,c=this,o=0,l=n.length&&(!t.length||n.index()<t.index()),e=this.options.animate||{},f=l&&e.down||e,s=function(){c._toggleComplete(i)};return"number"==typeof f&&(u=f),"string"==typeof f&&(r=f),r=r||f.easing||e.easing,u=u||f.duration||e.duration,t.length?n.length?(h=n.show().outerHeight(),t.animate(this.hideProps,{duration:u,easing:r,step:function(n,t){t.now=Math.round(n)}}),n.hide().animate(this.showProps,{duration:u,easing:r,complete:s,step:function(n,i){i.now=Math.round(n);"height"!==i.prop?o+=i.now:"content"!==c.options.heightStyle&&(i.now=Math.round(h-t.outerHeight()-o),o=0)}}),void 0):t.animate(this.hideProps,u,r,s):n.animate(this.showProps,u,r,s)},_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)}});n.widget("ui.menu",{version:"1.11.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 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").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0});this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item":function(n){n.preventDefault()},"click .ui-menu-item":function(t){var i=n(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&n(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=n(t.currentTarget);i.siblings(".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.find(this.options.items).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(n){this._closeOnDocumentClick(n)&&this.collapseAll(n);this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").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").removeUniqueId().removeClass("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){var i,u,r,f,e=!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:e=!1;u=this.previousFilter||"";r=String.fromCharCode(t.keyCode);f=!1;clearTimeout(this.filterTimer);r===u?f=!0:r=u+r;i=this._filterMenuItems(r);i=f&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i;i.length||(r=String.fromCharCode(t.keyCode),i=this._filterMenuItems(r));i.length?(this.focus(t,i),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}e&&t.preventDefault()},_activate:function(n){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(n):this.select(n))},refresh:function(){var i,t,u=this,f=this.options.icons.submenu,r=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length);r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=n(this),i=t.parent(),r=n("<span>").addClass("ui-menu-icon ui-icon "+f).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(r);t.attr("aria-labelledby",i.attr("id"))});i=r.add(this.element);t=i.find(this.options.items);t.not(".ui-menu-item").each(function(){var t=n(this);u._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")});t.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()});t.filter(".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){"icons"===n&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu);"disabled"===n&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t);this._super(n,t)},focus:function(n,t){var i,r;this.blur(n,n&&"focus"===n.type);this._scrollIntoView(t);this.active=t.first();r=this.active.addClass("ui-state-focus").removeClass("ui-state-active");this.options.role&&this.element.attr("aria-activedescendant",r.attr("id"));this.active.parent().closest(".ui-menu-item").addClass("ui-state-active");n&&"keydown"===n.type?this._close():this.timer=this._delay(function(){this._close()},this.delay);i=t.children(".ui-menu");i.length&&n&&/^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.outerHeight(),0>i?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.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",n,{item:this.active}))},_startOpening:function(n){clearTimeout(this.timer);"true"===n.attr("aria-hidden")&&(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(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!n(t.target).closest(".ui-menu").length},_isDivider:function(n){return!/[^\-\u2014\u2013\s]/.test(n.text())},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 ").find(this.options.items).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="first"===n||"last"===n?this.active["first"===n?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[n+"All"](".ui-menu-item").eq(0));r&&r.length&&this.active||(r=this.activeMenu.find(this.options.items)[t]());this.focus(i,r)},nextPage:function(t){var i,r,u;return this.active?(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),0>i.offset().top-r-u}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,r,u;return this.active?(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.find(this.options.items).first())),void 0):(this.next(t),void 0)},_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)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),r=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return r.test(n.trim(n(this).text()))})}});n.widget("ui.autocomplete",{version:"1.11.2",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},requestIndex:0,pending:0,_create:function(){var t,i,r,u=this.element[0].nodeName.toLowerCase(),f="textarea"===u,e="input"===u;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"))return t=!0,r=!0,i=!0,void 0;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: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.isMultiLine||this._value(this.term),this.close(u),u.preventDefault());break;default:i=!0;this._searchTimeout(u)}},keypress:function(r){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&r.preventDefault(),void 0;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){return r?(r=!1,n.preventDefault(),void 0):(this._searchTimeout(n),void 0)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(n){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(n),this._change(n),void 0)}});this._initSource();this.menu=n("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance");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){var r,u;return 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)}),void 0):(u=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:u})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(u.value),r=i.item.attr("aria-label")||u.value,r&&n.trim(r).length&&(this.liveRegion.children().hide(),n("<div>").text(r).appendTo(this.liveRegion)),void 0)},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":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body);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);"source"===n&&this._initSource();"appendTo"===n&&this.menu.element.appendTo(this._appendTo());"disabled"===n&&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[0]||(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))}):"string"==typeof this.options.source?(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(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),r=n.altKey||n.ctrlKey||n.metaKey||n.shiftKey;t&&(!t||i||r)||(this.selectedItem=null,this.search(null,n))},this.options.delay)},search:function(n,t){return n=null!=n?n:this._value(),this.term=this._value(),n.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(n):void 0},_search:function(n){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:n},this._response())},_response:function(){var t=++this.requestIndex;return n.proxy(function(n){t===this.requestIndex&&this.__response(n);this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__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"string"==typeof t?{label:t,value:t}:n.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t);this.isNewMenu=!0;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>").text(i.label).appendTo(t)},_move:function(n,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(n)||this.menu.isLastItem()&&/^next/.test(n)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[n](t),void 0):(this.search(null,t),void 0)},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=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(t){var i;this._superApply(arguments);this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),n("<div>").text(i).appendTo(this.liveRegion))}});n.ui.autocomplete;var e,p="ui-button ui-widget ui-state-default ui-corner-all",w="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",d=function(){var t=n(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},b=function(t){var i=t.name,r=t.form,u=n([]);return i&&(i=i.replace(/'/g,"\\'"),u=r?n(r).find("[name='"+i+"'][type=radio]"):n("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),u};n.widget("ui.button",{version:"1.11.2",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,d);"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var i=this,t=this.options,r="checkbox"===this.type||"radio"===this.type,u=r?"":"ui-state-active";null===t.label&&(t.label="input"===this.type?this.buttonElement.val():this.buttonElement.html());this._hoverable(this.buttonElement);this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){t.disabled||this===e&&n(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){t.disabled||n(this).removeClass(u)}).bind("click"+this.eventNamespace,function(n){t.disabled&&(n.preventDefault(),n.stopImmediatePropagation())});this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}});r&&this.element.bind("change"+this.eventNamespace,function(){i.refresh()});"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(t.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(t.disabled)return!1;n(this).addClass("ui-state-active");i.buttonElement.attr("aria-pressed","true");var r=i.element[0];b(r).not(r).map(function(){return n(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return t.disabled?!1:(n(this).addClass("ui-state-active"),e=this,i.document.one("mouseup",function(){e=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return t.disabled?!1:(n(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(i){return t.disabled?!1:((i.keyCode===n.ui.keyCode.SPACE||i.keyCode===n.ui.keyCode.ENTER)&&n(this).addClass("ui-state-active"),void 0)}).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",t.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";"checkbox"===this.type||"radio"===this.type?(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(p+" ui-state-active "+w).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(n,t){return this._super(n,t),"disabled"===n?(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),t&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")),void 0):(this._resetButton(),void 0)},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);"radio"===this.type?b(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")}):"checkbox"===this.type&&(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("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var i=this.buttonElement.removeClass(w),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"),this.hasTitle||i.attr("title",n.trim(f)))):r.push("ui-button-text-only");i.addClass(r.join(" "))}});n.widget("ui.buttonset",{version:"1.11.2",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){"disabled"===n&&this.buttons.button("option",n,t);this._super(n,t)},refresh:function(){var i="rtl"===this.element.css("direction"),t=this.element.find(this.options.items),r=t.filter(":ui-button");t.not(":ui-button").button();r.button("refresh");this.buttons=t.map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(i?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(i?"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")}});n.ui.button;n.extend(n.ui,{datepicker:{version:"1.11.2"}});n.extend(l.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(n){return r(this._defaults,n||{}),this},_attachDatepicker:function(t,i){var r,f,u;r=t.nodeName.toLowerCase();f="div"===r||"span"===r;t.id||(this.uuid+=1,t.id="dp"+this.uuid);u=this._newInst(n(t),f);u.settings=n.extend({},i||{});"input"===r?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?a(n("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>")):this.dpDiv}},_connectDatepicker:function(t,i){var r=n(t);i.append=n([]);i.trigger=n([]);r.hasClass(this.markerClassName)||(this._attachments(r,i),r.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),n.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var u,r,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();u=this._get(i,"showOn");("focus"===u||"both"===u)&&t.focus(this._showDatepicker);("button"===u||"both"===u)&&(r=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:r,title:r}):n("<button type='button'><\/button>").addClass(this._triggerClass).html(f?n("<img/>").attr({src:f,alt:r,title:r}):r)),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;n.length>t;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,i){var r=n(t);r.hasClass(this.markerClassName)||(r.addClass(this.markerClassName).append(i.dpDiv),n.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,u,f,e){var s,h,c,l,a,o=this._dialogInst;return o||(this.uuid+=1,s="dp"+this.uuid,this._dialogInput=n("<input type='text' id='"+s+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),n("body").append(this._dialogInput),o=this._dialogInst=this._newInst(this._dialogInput,!1),o.settings={},n.data(this._dialogInput[0],"datepicker",o)),r(o.settings,f||{}),i=i&&i.constructor===Date?this._formatDate(o,i):i,this._dialogInput.val(i),this._pos=e?e.length?e:[e.pageX,e.pageY]:null,this._pos||(h=document.documentElement.clientWidth,c=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,a=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+l,c/2-150+a]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),o.settings.onSelect=u,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),n.blockUI&&n.blockUI(this.dpDiv),n.data(this._dialogInput[0],"datepicker",o),this},_destroyDatepicker:function(t){var i,r=n(t),u=n.data(t,"datepicker");r.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),n.removeData(t,"datepicker"),"input"===i?(u.append.remove(),u.trigger.remove(),r.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&r.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,r,u=n(t),f=n.data(t,"datepicker");u.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,f.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(r=u.children("."+this._inlineClass),r.children().removeClass("ui-state-disabled"),r.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 i,r,u=n(t),f=n.data(t,"datepicker");u.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,f.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(r=u.children("."+this._inlineClass),r.children().addClass("ui-state-disabled"),r.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;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===n)return!0;return!1},_getInst:function(t){try{return n.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(t,i,u){var e,h,o,s,f=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?n.extend({},n.datepicker._defaults):f?"all"===i?n.extend({},f.settings):this._get(f,i):null:(e=i||{},"string"==typeof i&&(e={},e[i]=u),f&&(this._curInst===f&&this._hideDatepicker(),h=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(f,"min"),s=this._getMinMaxDate(f,"max"),r(f.settings,e),null!==o&&void 0!==e.dateFormat&&void 0===e.minDate&&(f.settings.minDate=this._formatDate(f,o)),null!==s&&void 0!==e.dateFormat&&void 0===e.maxDate&&(f.settings.maxDate=this._formatDate(f,s)),"disabled"in e&&(e.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(n(t),f),this._autoSize(f),this._setDate(f,h),this._updateAlternate(f),this._updateDatepicker(f)),void 0)},_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 36===t.keyCode&&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(null==t.charCode?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,"input"!==t.nodeName.toLowerCase()&&(t=n("input",t.parentNode)[0]),!n.datepicker._isDisabledDatepicker(t)&&n.datepicker._lastInput!==t){var i,o,s,u,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&&(r(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),u=!1,n(t).parents().each(function(){return u|="fixed"===n(this).css("position"),!u}),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,u),i.dpDiv.css({position:n.datepicker._inDialog&&n.blockUI?"static":u?"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.css("z-index",k(n(t))+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),n.datepicker._shouldFocusInput(i)&&i.input.focus(),n.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4;u=t;t.dpDiv.empty().append(this._generateHTML(t));this._attachHandlers(t);var i,r=this._getNumberOfMonths(t),f=r[1],e=t.dpDiv.find("."+this._dayOverClass+" a");e.length>0&&v.apply(e.get(0));t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");f>1&&t.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",17*f+"em");t.dpDiv[(1!==r[0]||1!==r[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&&n.datepicker._shouldFocusInput(t)&&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))},_shouldFocusInput:function(n){return n.input&&n.input.is(":visible")&&!n.input.is(":disabled")&&!n.input.is(":focus")},_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&&("hidden"===t.type||1!==t.nodeType||n.expr.filters.hidden(t));)t=t[u?"previousSibling":"nextSibling"];return i=n(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var r,f,u,e,i=this._curInst;!i||t&&i!==n.data(t,"datepicker")||this._datepickerShowing&&(r=this._get(i,"showAnim"),f=this._get(i,"duration"),u=function(){n.datepicker._tidyDialog(i)},n.effects&&(n.effects.effect[r]||n.effects[r])?i.dpDiv.hide(r,n.datepicker._get(i,"showOptions"),f,u):i.dpDiv["slideDown"===r?"slideUp":"fadeIn"===r?"fadeOut":"hide"](r?f:null,u),r||u(),this._datepickerShowing=!1,e=this._get(i,"onClose"),e&&e.apply(i.input?i.input[0]:null,[i.input?i.input.val():"",i]),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||0!==i.parents("#"+n.datepicker._mainDivId).length||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+("M"===r?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"+("M"===r?"Month":"Year")]=u["draw"+("M"===r?"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=null!=i?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],"object"!=typeof r.input[0]&&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&&6>t,""]},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(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;for(var a,v,u,f=0,y=(r?r.shortYearCutoff:null)||this._defaults.shortYearCutoff,d="string"!=typeof y?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,l=function(n){var i=t.length>o+1&&t.charAt(o+1)===n;return i&&o++,i},c=function(n){var u=l(n),r="@"===n?14:"!"===n?20:"y"===n&&u?4:"o"===n?3:2,e="y"===n?r:1,o=RegExp("^\\d{"+e+","+r+"}"),t=i.substring(f).match(o);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)}),-1!==e)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;t.length>o;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(i.length>f&&(v=i.substr(f),!/^\s+/.test(v)))throw"Extra/unparsed characters found in date: "+v;if(-1===e?e=(new Date).getFullYear():100>e&&(e+=(new Date).getFullYear()-(new Date).getFullYear()%100+(d>=e?0:-100)),p>-1)for(s=1,h=p;;){if(a=this._getDaysInMonth(e,s-1),a>=h)break;s++;h-=a}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:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),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=n.length>u+1&&n.charAt(u+1)===t;return i&&u++,i},e=function(n,t,i){var r=""+t;if(f(n))for(;i>r.length;)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;n.length>u;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():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":r+=t.getTime();break;case"!":r+=1e4*t.getTime()+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=n.length>t+1&&n.charAt(t+1)===i;return r&&t++,r},t=0;n.length>t;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,t){return void 0!==n.settings[t]?n.settings[t]:this._defaults[t]},_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+=7*parseInt(u[1],10);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=null==i||""===i?r:"string"==typeof i?e(i):"number"==typeof i?isNaN(i)?r:f(i):new Date(i.getTime());return u=u&&"Invalid Date"==""+u?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 r=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){n.datepicker._adjustDate(i,-r,"M")},next:function(){n.datepicker._adjustDate(i,+r,"M")},hide:function(){n.datepicker._hideDatepicker()},today:function(){n.datepicker._gotoToday(i)},selectDay:function(){return n.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return n.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return n.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,o,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())),f=this._get(n,"isRTL"),li=this._get(n,"showButtonPanel"),hi=this._get(n,"hideIfNoPrevNext"),ni=this._get(n,"navigationAsDateFormat"),e=this._getNumberOfMonths(n),ai=this._get(n,"showCurrentAtPos"),ci=this._get(n,"stepMonths"),ti=1!==e[0]||1!==e[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(0>t&&(t+=12,r--),v)for(b=this._daylightSavingAdjust(new Date(v.getFullYear(),v.getMonth()-e[0]*e[1]+1,v.getDate())),b=w&&w>b?w:b;this._daylightSavingAdjust(new Date(r,t,1))>b;)t--,0>t&&(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-"+(f?"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-"+(f?"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-"+(f?"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-"+(f?"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'>"+(f?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>":"")+(f?"":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="",y=0;e[0]>y;y++){for(ct="",this.maxRows=4,p=0;e[1]>p;p++){if(lt=this._daylightSavingAdjust(new Date(r,t,n.selectedDay)),l=" ui-corner-all",u="",ti){if(u+="<div class='ui-datepicker-group",e[1]>1)switch(p){case 0:u+=" ui-datepicker-group-first";l=" ui-corner-"+(f?"right":"left");break;case e[1]-1:u+=" ui-datepicker-group-last";l=" ui-corner-"+(f?"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)&&0===y?f?ut:rt:"")+(/all|right/.test(l)&&0===y?f?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>":"",o=0;7>o;o++)vt=(o+c)%7,at+="<th scope='col'"+((o+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;wt>bt;bt++){for(u+="<tr>",kt=ot?"<td class='ui-datepicker-week-col'>"+this._get(n,"calculateWeek")(i)+"<\/td>":"",o=0;7>o;o++)d=st?st.apply(n.input?n.input[0]:null,[i]):[!0,""],a=i.getMonth()!==t,it=a&&!si||!d[0]||w&&w>i||v&&i>v,kt+="<td class='"+((o+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>"+(e[0]>0&&p===e[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;12>h;h++)(!k||h>=r.getMonth())&&(!d||u.getMonth()>=h)&&(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'>";a>=s;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+("Y"===i?t:0),f=n.drawMonth+("M"===i?t:0),e=Math.min(n.selectedDay,this._getDaysInMonth(u,f))+("D"===i?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();("M"===i||"Y"===i)&&this._notifyChange(n)},_restrictMinMax:function(n,t){var i=this._getMinMaxDate(n,"min"),r=this._getMinMaxDate(n,"max"),u=i&&i>t?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 null==t?[1,1]:"number"==typeof t?[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+(0>t?t:f[0]*f[1]),1));return 0>t&&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||u>=t.getFullYear())},_getFormatConfig:function(n){var t=this._get(n,"shortYearCutoff");return t="string"!=typeof t?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?"object"==typeof t?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);0===n("#"+n.datepicker._mainDivId).length&&n("body").append(n.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this].concat(i)):n.datepicker._attachDatepicker(this,t)}):n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i))};n.datepicker=new l;n.datepicker.initialized=!1;n.datepicker.uuid=(new Date).getTime();n.datepicker.version="1.11.2";n.datepicker;n.widget("ui.dialog",{version:"1.11.2",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;0>i&&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},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_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;this._trackFocus()},_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,r=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement;i&&"body"!==i.nodeName.toLowerCase()&&n(i).blur()}catch(u){}this._hide(this.uiDialog,this.options.hide,function(){r._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var r=!1,f=this.uiDialog.siblings(".ui-front:visible").map(function(){return+n(this).css("z-index")}).get(),u=Math.max.apply(null,f);return u>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",u+1),r=!0),r&&!i&&this._trigger("focus",t),r},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=n(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable();t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var n=this._focusedElement;n||(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)return t.preventDefault(),this.close(t),void 0;if(t.keyCode===n.ui.keyCode.TAB&&!t.isDefaultPrevented()){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||(this._delay(function(){u.focus()}),t.preventDefault()):(this._delay(function(){r.focus()}),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 type='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;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),n.isEmptyObject(t)||n.isArray(t)&&!t.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(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),void 0)},_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){var e=f.offset.left-t.document.scrollLeft(),o=f.offset.top-t.document.scrollTop();r.position={my:"left top",at:"left"+(e>=0?"+":"")+e+" top"+(o>=0?"+":"")+o,of:t.window};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 t=this,i=this.options,u=i.resizable,f=this.uiDialog.css("position"),e="string"==typeof u?u:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:e,start:function(i,u){n(this).addClass("ui-dialog-resizing");t._blockFrames();t._trigger("resizeStart",i,r(u))},resize:function(n,i){t._trigger("resize",n,r(i))},stop:function(u,f){var e=t.uiDialog.offset(),o=e.left-t.document.scrollLeft(),s=e.top-t.document.scrollTop();i.height=t.uiDialog.height();i.width=t.uiDialog.width();i.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" top"+(s>=0?"+":"")+s,of:t.window};n(this).removeClass("ui-dialog-resizing");t._unblockFrames();t._trigger("resizeStop",u,r(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget();this._focusedElement=n(t.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=n.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var n=this.document.data("ui-dialog-instances");return n||(n=[],this.document.data("ui-dialog-instances",n)),n},_minHeight:function(){var n=this.options;return"auto"===n.height?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(t){var i=this,r=!1,u={};n.each(t,function(n,t){i._setOption(n,t);n in i.sizeRelatedOptions&&(r=!0);n in i.resizableRelatedOptions&&(u[n]=t)});r&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",u)},_setOption:function(n,t){var u,r,i=this.uiDialog;"dialogClass"===n&&i.removeClass(this.options.dialogClass).addClass(t);"disabled"!==n&&(this._super(n,t),"appendTo"===n&&this.uiDialog.appendTo(this._appendTo()),"buttons"===n&&this._createButtons(),"closeText"===n&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===n&&(u=i.is(":data(ui-draggable)"),u&&!t&&i.draggable("destroy"),!u&&t&&this._makeDraggable()),"position"===n&&this._position(),"resizable"===n&&(r=i.is(":data(ui-resizable)"),r&&!t&&i.resizable("destroy"),r&&"string"==typeof t&&i.resizable("option","handles",t),r||t===!1||this._makeResizable()),"title"===n&&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="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none";"auto"===n.height?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)},_allowInteraction:function(t){return n(t.target).closest(".ui-dialog").length?!0:!!n(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1});this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(n){t||this._allowInteraction(n)||(n.preventDefault(),this._trackingInstances()[0]._focusTabbable())}});this.overlay=n("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo());this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var n=this.document.data("ui-dialog-overlays")-1;n?this.document.data("ui-dialog-overlays",n):this.document.unbind("focusin").removeData("ui-dialog-overlays");this.overlay.remove();this.overlay=null}}});n.widget("ui.progressbar",{version:"1.11.2",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){return void 0===n?this.options.value:(this.options.value=this._constrainedValue(n),this._refreshValue(),void 0)},_constrainedValue:function(n){return void 0===n&&(n=this.options.value),this.indeterminate=n===!1,"number"!=typeof n&&(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){"max"===n&&(t=Math.max(this.min,t));"disabled"===n&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",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")}});n.widget("ui.selectmenu",{version:"1.11.2",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var n=this.element.uniqueId().attr("id");this.ids={element:n,button:n+"-button",menu:n+"-menu"};this._drawButton();this._drawMenu();this.options.disabled&&this.disable()},_drawButton:function(){var t=this,i=this.element.attr("tabindex");this.label=n("label[for='"+this.ids.element+"']").attr("for",this.ids.button);this._on(this.label,{click:function(n){this.button.focus();n.preventDefault()}});this.element.hide();this.button=n("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:i||this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element);n("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button);this.buttonText=n("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button);this._setText(this.buttonText,this.element.find("option:selected").text());this._resizeButton();this._on(this.button,this._buttonEvents);this.button.one("focusin",function(){t.menuItems||t._refreshMenu()});this._hoverable(this.button);this._focusable(this.button)},_drawMenu:function(){var t=this;this.menu=n("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu});this.menuWrap=n("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo());this.menuInstance=this.menu.menu({role:"listbox",select:function(n,i){n.preventDefault();t._setSelection();t._select(i.item.data("ui-selectmenu-item"),n)},focus:function(n,i){var r=i.item.data("ui-selectmenu-item");null!=t.focusIndex&&r.index!==t.focusIndex&&(t._trigger("focus",n,{item:r}),t.isOpen||t._select(r,n));t.focusIndex=r.index;t.button.attr("aria-activedescendant",t.menuItems.eq(r.index).attr("id"))}}).menu("instance");this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all");this.menuInstance._off(this.menu,"mouseleave");this.menuInstance._closeOnDocumentClick=function(){return!1};this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu();this._setText(this.buttonText,this._getSelectedItem().text());this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var n,t=this.element.find("option");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),n=this._getSelectedItem(),this.menuInstance.focus(null,n),this._setAria(n.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(n){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",n))},_position:function(){this.menuWrap.position(n.extend({of:this.button},this.options.position))},close:function(n){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",n))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(t,i){var u=this,r="";n.each(i,function(i,f){f.optgroup!==r&&(n("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(f.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:f.optgroup}).appendTo(t),r=f.optgroup);u._renderItemData(t,f)})},_renderItemData:function(n,t){return this._renderItem(n,t).data("ui-selectmenu-item",t)},_renderItem:function(t,i){var r=n("<li>");return i.disabled&&r.addClass("ui-state-disabled"),this._setText(r,i.label),r.appendTo(t)},_setText:function(n,t){t?n.text(t):n.html("&#160;")},_move:function(n,t){var i,r,u=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),u+=":not(.ui-state-disabled)");r="first"===n||"last"===n?i["first"===n?"prevAll":"nextAll"](u).eq(-1):i[n+"All"](u).eq(0);r.length&&this.menuInstance.focus(t,r)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(n){this[this.isOpen?"close":"open"](n)},_setSelection:function(){var n;this.range&&(window.getSelection?(n=window.getSelection(),n.removeAllRanges(),n.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(n(t.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(t))}},_buttonEvents:{mousedown:function(){var n;window.getSelection?(n=window.getSelection(),n.rangeCount&&(this.range=n.getRangeAt(0))):this.range=document.selection.createRange()},click:function(n){this._setSelection();this._toggle(n)},keydown:function(t){var i=!0;switch(t.keyCode){case n.ui.keyCode.TAB:case n.ui.keyCode.ESCAPE:this.close(t);i=!1;break;case n.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case n.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case n.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case n.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case n.ui.keyCode.LEFT:this._move("prev",t);break;case n.ui.keyCode.RIGHT:this._move("next",t);break;case n.ui.keyCode.HOME:case n.ui.keyCode.PAGE_UP:this._move("first",t);break;case n.ui.keyCode.END:case n.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t);i=!1}i&&t.preventDefault()}},_selectFocusedItem:function(n){var t=this.menuItems.eq(this.focusIndex);t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),n)},_select:function(n,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=n.index;this._setText(this.buttonText,n.label);this._setAria(n);this._trigger("select",t,{item:n});n.index!==i&&this._trigger("change",t,{item:n});this.close(t)},_setAria:function(n){var t=this.menuItems.eq(n.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t});this.menu.attr("aria-activedescendant",t)},_setOption:function(n,t){"icons"===n&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button);this._super(n,t);"appendTo"===n&&this.menuWrap.appendTo(this._appendTo());"disabled"===n&&(this.menuInstance.option("disabled",t),this.button.toggleClass("ui-state-disabled",t).attr("aria-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0));"width"===n&&this._resizeButton()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?n(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen);this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen);this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var n=this.options.width;n||(n=this.element.show().outerWidth(),this.element.hide());this.button.outerWidth(n)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(t){var i=[];t.each(function(t,r){var u=n(r),f=u.parent("optgroup");i.push({element:u,index:t,value:u.attr("value"),label:u.text(),optgroup:f.attr("label")||"",disabled:f.prop("disabled")||u.prop("disabled")})});this.items=i},_destroy:function(){this.menuWrap.remove();this.button.remove();this.element.show();this.element.removeUniqueId();this.label.attr("for",this.ids.element)}});n.widget("ui.slider",n.ui.mouse,{version:"1.11.2",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},numPages:5,_create:function(){this._keySliding=!1;this._mouseSliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this._calculateNewMax();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;i>r;r++)f.push("<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'><\/span>");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&&2!==t.values.length?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+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles);this._on(this.handles,this._handleEvents);this._hoverable(this.handles);this._focusable(this.handles)},_destroy:function(){this.handles.remove();this.range&&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="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(n){var i,r,t,u,f;return"horizontal"===this.orientation?(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),0>t&&(t=0),"vertical"===this.orientation&&(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),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>r||1===t&&r>i)&&(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))):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){return arguments.length?(this.options.value=this._trimAlignValue(n),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(t,i){var u,f,r;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!n.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(u=this.options.values,f=arguments[0],r=0;u.length>r;r+=1)u[r]=this._trimAlignValue(f[r]),this._change(null,r);this._refreshValue()},_setOption:function(t,i){var r,u=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),n.isArray(this.options.values)&&(u=this.options.values.length),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!i),this._super(t,i),t){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();this.handles.css("horizontal"===i?"bottom":"left","");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;u>r;r+=1)this._change(null,r);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0;this._calculateNewMax();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],r=this._trimAlignValue(r);if(this.options.values&&this.options.values.length){for(t=this.options.values.slice(),i=0;t.length>i;i+=1)t[i]=this._trimAlignValue(t[i]);return t}return[]},_trimAlignValue:function(n){if(this._valueMin()>=n)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 2*Math.abs(i)>=t&&(r+=i>0?t:-t),parseFloat(r.toFixed(5))},_calculateNewMax:function(){var n=(this.options.max-this._valueMin())%this.options.step;this.max=this.options.max-n},_valueMin:function(){return this.options.min},_valueMax:function(){return this.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=100*((r.values(f)-r._valueMin())/(r._valueMax()-r._valueMin()));o["horizontal"===r.orientation?"left":"bottom"]=t+"%";n(this).stop(1,1)[u?"animate":"css"](o,i.animate);r.options.range===!0&&("horizontal"===r.orientation?(0===f&&r.range.stop(1,1)[u?"animate":"css"]({left:t+"%"},i.animate),1===f&&r.range[u?"animate":"css"]({width:t-s+"%"},{queue:!1,duration:i.animate})):(0===f&&r.range.stop(1,1)[u?"animate":"css"]({bottom:t+"%"},i.animate),1===f&&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?100*((c-f)/(h-f)):0,o["horizontal"===this.orientation?"left":"bottom"]=t+"%",this.handle.stop(1,1)[u?"animate":"css"](o,i.animate),"min"===e&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:t+"%"},i.animate),"max"===e&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-t+"%"},{queue:!1,duration:i.animate}),"min"===e&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:t+"%"},i.animate),"max"===e&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-t+"%"},{queue:!1,duration:i.animate}))},_handleEvents:{keydown:function(t){var e,r,i,u,f=n(t.target).data("ui-slider-handle-index");switch(t.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(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,n(t.target).addClass("ui-state-active"),e=this._start(t,f),e===!1))return}switch(u=this.options.step,r=i=this.options.values&&this.options.values.length?this.values(f):this.value(),t.keyCode){case n.ui.keyCode.HOME:i=this._valueMin();break;case n.ui.keyCode.END:i=this._valueMax();break;case n.ui.keyCode.PAGE_UP:i=this._trimAlignValue(r+(this._valueMax()-this._valueMin())/this.numPages);break;case n.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(r-(this._valueMax()-this._valueMin())/this.numPages);break;case n.ui.keyCode.UP:case n.ui.keyCode.RIGHT:if(r===this._valueMax())return;i=this._trimAlignValue(r+u);break;case n.ui.keyCode.DOWN:case n.ui.keyCode.LEFT:if(r===this._valueMin())return;i=this._trimAlignValue(r-u)}this._slide(t,f,i)},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"))}}});n.widget("ui.spinner",{version:"1.11.2",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._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);void 0!==u&&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){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",n),void 0)},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"))return this._start(t)===!1?!1:(this._repeat(null,n(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0)},"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(.5*n.height())&&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?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_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 null!==this.options.min&&(n=Math.max(n,this._precisionOf(this.options.min))),n},_precisionOf:function(n){var t=""+n,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(n){var r,i,t=this.options;return r=null!==t.min?t.min:0,i=n-r,i=Math.round(i/t.step)*t.step,n=r+i,n=parseFloat(n.toFixed(this._precision())),null!==t.max&&n>t.max?t.max:null!==t.min&&t.min>n?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("culture"===n||"numberFormat"===n){var i=this._parse(this.element.val());return this.options[n]=t,this.element.val(this._format(i)),void 0}("max"===n||"min"===n||"step"===n)&&"string"==typeof t&&(t=this._parse(t));"icons"===n&&(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);"disabled"===n&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:t(function(n){this._super(n)}),_parse:function(n){return"string"==typeof n&&""!==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())})},isValid:function(){var n=this.value();return null===n?!1:n===this._adjustValue(n)},_value:function(n,t){var i;""!==n&&(i=this._parse(n),null!==i&&(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){return arguments.length?(t(this._value).call(this,n),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}});n.widget("ui.tabs",{version:"1.11.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var n=/#.*$/;return function(t){var i,r;t=t.cloneNode(!1);i=t.href.replace(n,"");r=location.href.replace(n,"");try{i=decodeURIComponent(i)}catch(u){}try{r=decodeURIComponent(r)}catch(u){}return t.hash.length>1&&i===r}}(),_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);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 null===t&&(r&&this.tabs.each(function(i,u){if(n(u).attr("aria-controls")===r)return(t=i,!1)}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(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:return t.preventDefault(),clearTimeout(this.activating),this._activate(i),void 0;case n.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(i===this.options.active?!1:i),void 0;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),0>t&&(t=r),t}for(var r=this.tabs.length-1;-1!==n.inArray(u(),this.options.disabled);)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){return"active"===n?(this._activate(t),void 0):"disabled"===n?(this._setupDisabled(t),void 0):(this._super(n,t),"collapsible"===n&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===n&&this._setupEvents(t),"heightStyle"===n&&this._setupHeightStyle(t),void 0)},_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","aria-expanded":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"});this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,r=this.anchors,u=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> 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.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,r){var f,u,e,s=n(r).uniqueId().attr("id"),o=n(r).closest("li"),h=o.attr("aria-controls");t._isLocal(r)?(f=r.hash,e=f.substring(1),u=t.element.find(t._sanitizeSelector(f))):(e=o.attr("aria-controls")||n({}).uniqueId()[0].id,f="#"+e,u=t.element.find(f),u.length||(u=t._createPanel(e),u.insertAfter(t.panels[i-1]||t.tablist)),u.attr("aria-live","polite"));u.length&&(t.panels=t.panels.add(u));h&&o.data("ui-tabs-aria-controls",h);o.attr({"aria-controls":e,"aria-labelledby":s});u.attr("aria-labelledby",s)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel");i&&(this._off(i.not(this.tabs)),this._off(r.not(this.anchors)),this._off(u.not(this.panels)))},_getList:function(){return this.tablist||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,r=0;i=this.tabs[r];r++)t===!0||-1!==n.inArray(r,t)?n(i).addClass("ui-state-disabled").attr("aria-disabled","true"):n(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&n.each(t.split(" "),function(n,t){i[t]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(!0,this.anchors,{click:function(n){n.preventDefault()}});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();"fill"===t?(i=r.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=n(this),r=t.css("position");"absolute"!==r&&"fixed"!==r&&(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")):"auto"===t&&(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-hidden","true");i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"});r.length&&f.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===n(this).attr("tabIndex")}).attr("tabIndex",-1);r.attr("aria-hidden","false");i.newTab.attr({"aria-selected":"true","aria-expanded":"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"string"==typeof n&&(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.tablist.unbind(this.eventNamespace);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();"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=n.isArray(i)?n.map(i,function(n){return n!==t?n:null}):n.map(this.tabs,function(n,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==n.inArray(t,i))return;i=n.isArray(i)?n.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var u=this,r=this.tabs.eq(t),e=r.find(".ui-tabs-anchor"),f=this._getPanelForTab(r),o={tab:r,panel:f};this._isLocal(e[0])||(this.xhr=n.ajax(this._ajaxSettings(e,i,o)),this.xhr&&"canceled"!==this.xhr.statusText&&(r.addClass("ui-tabs-loading"),f.attr("aria-busy","true"),this.xhr.success(function(n){setTimeout(function(){f.html(n);u._trigger("load",i,o)},1)}).complete(function(n,t){setTimeout(function(){"abort"===t&&u.panels.stop(!1,!0);r.removeClass("ui-tabs-loading");f.removeAttr("aria-busy");n===u.xhr&&delete u.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))}});n.widget("ui.tooltip",{version:"1.11.2",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},_addDescribedBy:function(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(" ")))},_removeDescribedBy:function(t){var u=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),r=n.inArray(u,i);-1!==r&&i.splice(r,1);t.removeData("ui-tooltip-id");i=n.trim(i.join(" "));i?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable();this.liveRegion=n("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var r=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&n.each(this.tooltips,function(n,t){r._updateContent(t.element)}),void 0)},_disable:function(){var t=this;n.each(this.tooltips,function(i,r){var u=n.Event("blur");u.target=u.currentTarget=r.element[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")).removeAttr("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&&"mouseover"===t.type&&i.parents().each(function(){var i,t=n(this);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;return"string"==typeof r?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),void 0)},_open:function(t,i,r){function s(n){h.of=n;u.is(":hidden")||u.position(h)}var e,u,f,c,o,h=n.extend({},this.options.position);if(r){if(e=this._find(i))return e.tooltip.find(".ui-tooltip-content").html(r),void 0;i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title"));e=this._tooltip(i);u=e.tooltip;this._addDescribedBy(i,u.attr("id"));u.find(".ui-tooltip-content").html(r);this.liveRegion.children().hide();r.clone?(o=r.clone(),o.removeAttr("id").find("[id]").removeAttr("id")):o=r;n("<div>").html(o).appendTo(this.liveRegion);this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:s}),s(t)):u.position(n.extend({of:i},this.options.position));u.hide();this._show(u,this.options.show);this.options.show&&this.options.show.delay&&(c=this.delayedShow=setInterval(function(){u.is(":visible")&&(s(h.of),clearInterval(c))},n.fx.interval));this._trigger("open",t,{tooltip:u});f={keyup:function(t){if(t.keyCode===n.ui.keyCode.ESCAPE){var r=n.Event(t);r.currentTarget=i[0];this.close(r,!0)}}};i[0]!==this.element[0]&&(f.remove=function(){this._removeTooltip(u)});t&&"mouseover"!==t.type||(f.mouseleave="close");t&&"focusin"!==t.type||(f.focusout="close");this._on(!0,i,f)}},close:function(t){var u,f=this,i=n(t?t.currentTarget:this.element),r=this._find(i);r&&(u=r.tooltip,r.closing||(clearInterval(this.delayedShow),i.data("ui-tooltip-title")&&!i.attr("title")&&i.attr("title",i.data("ui-tooltip-title")),this._removeDescribedBy(i),r.hiding=!0,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&&"mouseleave"===t.type&&n.each(this.parents,function(t,i){n(i.element).attr("title",i.title);delete f.parents[t]}),r.closing=!0,this._trigger("close",t,{tooltip:u}),r.hiding||(r.closing=!1)))},_tooltip:function(t){var i=n("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),r=i.uniqueId().attr("id");return n("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[r]={element:t,tooltip:i}},_find:function(n){var t=n.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(n){n.remove();delete this.tooltips[n.attr("id")]},_destroy:function(){var t=this;n.each(this.tooltips,function(i,r){var f=n.Event("blur"),u=r.element;f.target=f.currentTarget=u[0];t.close(f,!0);n("#"+i).remove();u.data("ui-tooltip-title")&&(u.attr("title")||u.attr("title",u.data("ui-tooltip-title")),u.removeData("ui-tooltip-title"))});this.liveRegion.remove()}});o="ui-effects-";s=n;n.effects={effect:{}},function(n,t){function f(n,t,i){var r=h[t.type]||{};return null==n?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:n>r.max?r.max:n)}function s(f){var o=i(),s=o._rgba=[];return f=f.toLowerCase(),r(v,function(n,i){var r,h=i.re.exec(f),c=h&&i.parse(h),e=i.space||"rgba";return c?(r=o[e](c),o[u[e].cache]=r[u[e].cache],s=o._rgba=r._rgba,!1):t}),s.length?("0,0,0,0"===s.join()&&n.extend(s,e.transparent),o):e[f]}function o(n,t,i){return i=(i+1)%1,1>6*i?n+6*(t-n)*i:1>2*i?t:2>3*i?n+6*(t-n)*(2/3-i):n}var e,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[2.55*n[1],2.55*n[2],2.55*n[3],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"}}}},h={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=i.support={},l=n("<p>")[0],r=n.each;l.style.cssText="background-color:rgba(1,1,1,.5)";c.rgba=l.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,h,c,l){if(o===t)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=n(o).css(h),h=t);var a=this,v=n.type(o),y=this._rgba=[];return h!==t&&(o=[o,h,c,l],v="array"),"string"===v?this.parse(s(o)||e._default):"array"===v?(r(u.rgba.props,function(n,t){y[t.idx]=f(o[t.idx],t)}),this):"object"===v?(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("alpha"===n||null==o[n])return;a[u]=i.to(a._rgba)}a[u][t.idx]=f(o[n],t,!0)});a[u]&&0>n.inArray(null,a[u].slice(0,3))&&(a[u][3]=1,i.from&&(a._rgba=i.from(a[u])))}),this):t},is:function(n){var o=i(n),f=!0,e=this;return r(u,function(n,i){var s,u=o[i.cache];return u&&(s=e[i.cache]||i.to&&i.to(e._rgba)||[],r(i.props,function(n,i){return null!=u[i.idx]?f=u[i.idx]===s[i.idx]:t})),f}),f},_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 e=i(n),c=e._space(),o=u[c],l=0===this.alpha()?i("transparent"):this,a=l[o.cache]||o.to(l._rgba),s=a.slice();return e=e[o.cache],r(o.props,function(n,i){var c=i.idx,r=a[c],u=e[c],o=h[i.type]||{};null!==u&&(null===r?s[c]=u:(o.mod&&(u-r>o.mod/2?r+=o.mod:r-u>o.mod/2&&(r-=o.mod)),s[c]=f((u-r)*t+r,i)))}),this[c](s)},blend:function(t){if(1===this._rgba[3])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 null==n?t>2?1:0:n});return 1===t[3]&&(t.pop(),i="rgb("),i+t.join()+")"},toHslaString:function(){var i="hsla(",t=n.map(this.hsla(),function(n,t){return null==n&&(n=t>2?1:0),t&&3>t&&(n=Math.round(100*n)+"%"),n});return 1===t[3]&&(t.pop(),i="hsl("),i+t.join()+")"},toHexString:function(t){var i=this._rgba.slice(),r=i.pop();return t&&i.push(~~(255*r)),"#"+n.map(i,function(n){return n=(n||0).toString(16),1===n.length?"0"+n:n}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}});i.fn.parse.prototype=i.fn;u.hsla.to=function(n){if(null==n[0]||null==n[1]||null==n[2])return[null,null,null,n[3]];var s,h,i=n[0]/255,r=n[1]/255,f=n[2]/255,c=n[3],u=Math.max(i,r,f),e=Math.min(i,r,f),t=u-e,o=u+e,l=.5*o;return s=e===u?0:i===u?60*(r-f)/t+360:r===u?60*(f-i)/t+120:60*(i-r)/t+240,h=0===t?0:.5>=l?t/o:t/(2-o),[Math.round(s)%360,h,l,null==c?1:c]};u.hsla.from=function(n){if(null==n[0]||null==n[1]||null==n[2])return[null,null,null,n[3]];var r=n[0]/360,u=n[1],t=n[2],e=n[3],i=.5>=t?t*(1+u):t+u-t*u,f=2*t-i;return[Math.round(255*o(f,i,r+1/3)),Math.round(255*o(f,i,r)),Math.round(255*o(f,i,r-1/3)),e]};r(u,function(u,e){var s=e.props,o=e.cache,h=e.to,c=e.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="array"===a||"object"===a?u:arguments,e=this[o].slice();return r(s,function(n,t){var i=v["object"===a?n:t.idx];null==i&&(i=e[t.idx]);e[t.idx]=f(i,t)}),c?(l=i(c(e)),l[o]=e,l):i(e)};r(s,function(t,r){i.fn[t]||(i.fn[t]=function(i){var f,e=n.type(i),h="alpha"===t?this._hsla?"hsla":"rgba":u,o=this[h](),s=o[r.idx];return"undefined"===e?s:("function"===e&&(i=i.call(this,s),e=n.type(i)),null==i&&r.empty?this:("string"===e&&(f=a.exec(i),f&&(i=s+parseFloat(f[2])*("+"===f[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("transparent"!==u&&("string"!==n.type(u)||(o=s(u)))){if(u=i(o||u),!c.rgba&&1!==u._rgba[3]){for(f="backgroundColor"===r?t.parentNode:t;(""===e||"transparent"===e)&&f&&f.style;)try{e=n.css(f,"backgroundColor");f=f.parentNode}catch(h){}u=u.blend(e&&"transparent"!==e?e:"_default")}u=u.toRgbaString()}try{t.style[r]=u}catch(h){}}};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}};e=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"}}(s),function(){function t(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],"string"==typeof i[r]&&(f[n.camelCase(r)]=i[r]);else for(r in i)"string"==typeof i[r]&&(f[r]=i[r]);return f}function i(t,i){var r,f,e={};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){("none"===n.end||n.setAttr)&&(1!==n.pos||n.setAttr)||(s.style(n.elem,i,n.end),n.setAttr=!0)}});n.fn.addBack||(n.fn.addBack=function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))});n.effects.animateClass=function(u,f,e,o){var s=n.speed(f,e,o);return this.queue(function(){var o,e=n(this),h=e.attr("class")||"",f=s.children?e.find("*").addBack():e;f=f.map(function(){var i=n(this);return{el:i,start:t(this)}});o=function(){n.each(r,function(n,t){u[t]&&e[t+"Class"](u[t])})};o();f=f.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this});e.attr("class",h);f=f.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,f.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:function(t){return function(i,r,u,f){return r?n.effects.animateClass.call(this,{add:i},r,u,f):t.apply(this,arguments)}}(n.fn.addClass),removeClass:function(t){return function(i,r,u,f){return arguments.length>1?n.effects.animateClass.call(this,{remove:i},r,u,f):t.apply(this,arguments)}}(n.fn.removeClass),toggleClass:function(t){return function(i,r,u,f,e){return"boolean"==typeof r||void 0===r?u?n.effects.animateClass.call(this,r?{add:i}:{remove:i},u,f,e):t.apply(this,arguments):n.effects.animateClass.call(this,{toggle:i},r,u,f)}}(n.fn.toggleClass),switchClass:function(t,i,r,u,f){return n.effects.animateClass.call(this,{add:i,remove:t},r,u,f)}})}(),function(){function t(t,i,r,u){return n.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),n.isFunction(i)&&(u=i,r=null,i={}),("number"==typeof i||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:"number"==typeof r?r:r in n.fx.speeds?n.fx.speeds[r]:n.fx.speeds._default,t.complete=u||i.complete,t}function i(t){return!t||"number"==typeof t||n.fx.speeds[t]?!0:"string"!=typeof t||n.effects.effect[t]?n.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}n.extend(n.effects,{version:"1.11.2",save:function(n,t){for(var i=0;t.length>i;i++)null!==t[i]&&n.data(o+t[i],n[0].style[t[i]])},restore:function(n,t){for(var r,i=0;t.length>i;i++)null!==t[i]&&(r=n.data(o+t[i]),void 0===r&&(r=""),n.css(t[i],r))},setMode:function(n,t){return"toggle"===t&&(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(),"static"===t.css("position")?(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 r(t){function f(){n.isFunction(o)&&o.call(r[0]);n.isFunction(t)&&t()}var r=n(this),o=i.complete,u=i.mode;(r.is(":hidden")?"hide"===u:"show"===u)?(r[u](),f()):e.call(r[0],i,f)}var i=t.apply(this,arguments),u=i.mode,f=i.queue,e=n.effects.effect[i.effect];return n.fx.off||!e?u?this[u](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):f===!1?this.each(r):this.queue(f||"fx",r)},show:function(n){return function(r){if(i(r))return n.apply(this,arguments);var u=t.apply(this,arguments);return u.mode="show",this.effect.call(this,u)}}(n.fn.show),hide:function(n){return function(r){if(i(r))return n.apply(this,arguments);var u=t.apply(this,arguments);return u.mode="hide",this.effect.call(this,u)}}(n.fn.hide),toggle:function(n){return function(r){if(i(r)||"boolean"==typeof r)return n.apply(this,arguments);var u=t.apply(this,arguments);return u.mode="toggle",this.effect.call(this,u)}}(n.fn.toggle),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 0===n||1===n?n:-Math.pow(2,8*(n-1))*Math.sin((80*(n-1)-7.5)*Math.PI/15)},Back:function(n){return n*n*(3*n-2)},Bounce:function(n){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>n;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-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.5>n?i(2*n)/2:1-i(-2*n+2)/2}})}();n.effects;n.effects.effect.blind=function(t,i){var u,f,e,r=n(this),s=["position","top","bottom","left","right","height","width"],v=n.effects.setMode(r,t.mode||"hide"),y=t.direction||"up",o=/up|down|vertical/.test(y),h=o?"height":"width",c=o?"top":"left",p=/up|left|vertical|horizontal/.test(y),l={},a="show"===v;r.parent().is(".ui-effects-wrapper")?n.effects.save(r.parent(),s):n.effects.save(r,s);r.show();u=n.effects.createWrapper(r).css({overflow:"hidden"});f=u[h]();e=parseFloat(u.css(c))||0;l[h]=a?f:0;p||(r.css(o?"bottom":"right",0).css(o?"top":"left","auto").css({position:"absolute"}),l[c]=a?e:f+e);a&&(u.css(h,0),p||u.css(c,e+f));u.animate(l,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===v&&r.hide();n.effects.restore(r,s);n.effects.removeWrapper(r);i()}})};n.effects.effect.bounce=function(t,i){var v,f,e,r=n(this),y=["position","top","bottom","left","right","height","width"],k=n.effects.setMode(r,t.mode||"effect"),o="hide"===k,p="show"===k,h=t.direction||"up",u=t.distance,w=t.times||5,d=2*w+(p||o?1:0),c=t.duration/d,l=t.easing,s="up"===h||"down"===h?"top":"left",b="up"===h||"left"===h,a=r.queue(),g=a.length;for((p||o)&&y.push("opacity"),n.effects.save(r,y),r.show(),n.effects.createWrapper(r),u||(u=r["top"===s?"outerHeight":"outerWidth"]()/3),p&&(e={opacity:1},e[s]=0,r.css("opacity",0).css(s,b?2*-u:2*u).animate(e,c,l)),o&&(u/=Math.pow(2,w-1)),e={},e[s]=0,v=0;w>v;v++)f={},f[s]=(b?"-=":"+=")+u,r.animate(f,c,l).animate(e,c,l),u=o?2*u:u/2;o&&(f={opacity:0},f[s]=(b?"-=":"+=")+u,r.animate(f,c,l));r.queue(function(){o&&r.hide();n.effects.restore(r,y);n.effects.removeWrapper(r);i()});g>1&&a.splice.apply(a,[1,0].concat(a.splice(g,d+1)));r.dequeue()};n.effects.effect.clip=function(t,i){var h,u,f,r=n(this),c=["position","top","bottom","left","right","height","width"],v=n.effects.setMode(r,t.mode||"hide"),e="show"===v,y=t.direction||"vertical",l="vertical"===y,o=l?"height":"width",a=l?"top":"left",s={};n.effects.save(r,c);r.show();h=n.effects.createWrapper(r).css({overflow:"hidden"});u="IMG"===r[0].tagName?h:r;f=u[o]();e&&(u.css(o,0),u.css(a,f/2));s[o]=e?f:0;s[a]=e?0:f/2;u.animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){e||r.hide();n.effects.restore(r,c);n.effects.removeWrapper(r);i()}})};n.effects.effect.drop=function(t,i){var u,r=n(this),h=["position","top","bottom","left","right","opacity","height","width"],c=n.effects.setMode(r,t.mode||"hide"),e="show"===c,f=t.direction||"left",o="up"===f||"down"===f?"top":"left",s="up"===f||"left"===f?"pos":"neg",l={opacity:e?1:0};n.effects.save(r,h);r.show();n.effects.createWrapper(r);u=t.distance||r["top"===o?"outerHeight":"outerWidth"](!0)/2;e&&r.css("opacity",0).css(o,"pos"===s?-u:u);l[o]=(e?"pos"===s?"+=":"-=":"pos"===s?"-=":"+=")+u;r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===c&&r.hide();n.effects.restore(r,h);n.effects.removeWrapper(r);i()}})};n.effects.effect.explode=function(t,i){function b(){p.push(this);p.length===o*c&&k()}function k(){r.css({visibility:"visible"});n(p).remove();u||r.hide();i()}for(var e,l,a,v,y,o=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=o,r=n(this),d=n.effects.setMode(r,t.mode||"hide"),u="show"===d,w=r.show().css("visibility","hidden").offset(),s=Math.ceil(r.outerWidth()/c),h=Math.ceil(r.outerHeight()/o),p=[],f=0;o>f;f++)for(a=w.top+f*h,y=f-(o-1)/2,e=0;c>e;e++)l=w.left+e*s,v=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:l+(u?v*s:0),top:a+(u?y*h:0),opacity:u?0:1}).animate({left:l+(u?0:v*s),top:a+(u?0:y*h),opacity:u?1:0},t.duration||500,t.easing,b)};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})};n.effects.effect.fold=function(t,i){var r,e,u=n(this),s=["position","top","bottom","left","right","height","width"],h=n.effects.setMode(u,t.mode||"hide"),o="show"===h,c="hide"===h,f=t.size||15,l=/([0-9]+)%/.exec(f),a=!!t.horizFirst,v=o!==a,y=v?["width","height"]:["height","width"],p=t.duration/2,w={},b={};n.effects.save(u,s);u.show();r=n.effects.createWrapper(u).css({overflow:"hidden"});e=v?[r.width(),r.height()]:[r.height(),r.width()];l&&(f=parseInt(l[1],10)/100*e[c?0:1]);o&&r.css(a?{height:0,width:f}:{height:f,width:0});w[y[0]]=o?e[0]:f;b[y[1]]=o?e[1]:0;r.animate(w,p,t.easing).animate(b,p,t.easing,function(){c&&u.hide();n.effects.restore(u,s);n.effects.removeWrapper(u);i()})};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")};"hide"===f&&(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(){"hide"===f&&r.hide();n.effects.restore(r,u);i()}})};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||"effect"!==h,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};"show"===h&&r.show();f={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};"toggle"===t.mode&&"show"===h?(r.from=t.to||p,r.to=t.from||f):(r.from=t.from||("show"===h?p:f),r.to=t.to||("hide"===h?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}};("box"===c||"both"===c)&&(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)));("content"===c||"both"===c)&&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);("content"===c||"both"===c)&&(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(){0===r.to.opacity&&r.css("opacity",r.from.opacity);"hide"===h&&r.hide();n.effects.restore(r,s);y||("static"===k?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"auto"===i?u+"px":f+u+"px"})}));n.effects.removeWrapper(r);i()}})};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)||(0===parseInt(t.percent,10)?0:"hide"===f?0:100),h=t.direction||"both",c=t.origin,e={height:u.height(),width:u.width(),outerHeight:u.outerHeight(),outerWidth:u.outerWidth()},o={y:"horizontal"!==h?s/100:1,x:"vertical"!==h?s/100:1};r.effect="size";r.queue=!1;r.complete=i;"effect"!==f&&(r.origin=c||["middle","center"],r.restore=!0);r.from=t.from||("show"===f?{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&&("show"===f&&(r.from.opacity=0,r.to.opacity=1),"hide"===f&&(r.from.opacity=1,r.to.opacity=0));u.effect(r)};n.effects.effect.puff=function(t,i){var r=n(this),e=n.effects.setMode(r,t.mode||"hide"),o="hide"===e,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.pulsate=function(t,i){var e,r=n(this),o=n.effects.setMode(r,t.mode||"show"),h="show"===o,a="hide"===o,v=h||"hide"===o,s=2*(t.times||5)+(v?1:0),c=t.duration/s,u=0,f=r.queue(),l=f.length;for((h||!r.is(":visible"))&&(r.css("opacity",0).show(),u=1),e=1;s>e;e++)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,s+1)));r.dequeue()};n.effects.effect.shake=function(t,i){var o,r=n(this),v=["position","top","bottom","left","right","height","width"],k=n.effects.setMode(r,t.mode||"effect"),f=t.direction||"left",s=t.distance||20,y=t.times||3,p=2*y+1,u=Math.round(t.duration/p),h="up"===f||"down"===f?"top":"left",c="up"===f||"left"===f,l={},a={},w={},e=r.queue(),b=e.length;for(n.effects.save(r,v),r.show(),n.effects.createWrapper(r),l[h]=(c?"-=":"+=")+s,a[h]=(c?"+=":"-=")+2*s,w[h]=(c?"-=":"+=")+2*s,r.animate(l,u,t.easing),o=1;y>o;o++)r.animate(a,u,t.easing).animate(w,u,t.easing);r.animate(a,u,t.easing).animate(l,u/2,t.easing).queue(function(){"hide"===k&&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()};n.effects.effect.slide=function(t,i){var u,r=n(this),s=["position","top","bottom","left","right","width","height"],h=n.effects.setMode(r,t.mode||"show"),c="show"===h,f=t.direction||"left",e="up"===f||"down"===f?"top":"left",o="up"===f||"left"===f,l={};n.effects.save(r,s);r.show();u=t.distance||r["top"===e?"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(){"hide"===h&&r.hide();n.effects.restore(r,s);n.effects.removeWrapper(r);i()}})};n.effects.effect.transfer=function(t,i){var u=n(this),r=n(t.to),f="fixed"===r.css("position"),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()})}}),function(n,t,i,r){"use strict";function nt(t){t=t||"";n.error("Not implemented: "+t)}function u(t,i){t||(i=i?": "+i:"",n.error("Assertion failed"+i))}function f(n,i){var r,f,u=t.console?t.console[n]:null;if(u)if(u.apply)u.apply(t.console,i);else{for(f="",r=0;r<i.length;r++)f+=i[r];u(f)}}function tt(t){for(var r,u,e=n.map(n.trim(t).split("."),function(n){return parseInt(n,10)}),f=n.map(Array.prototype.slice.call(arguments,1),function(n){return parseInt(n,10)}),i=0;i<f.length;i++)if(r=e[i]||0,u=f[i]||0,r!==u)return r>u;return!0}function w(n,t,i,r,u){return function(){var i=t[n],f=r[n],e=t.ext[u],o=function(){return i.apply(t,arguments)};return function(){var n=t._local,i=t._super;try{return t._local=e,t._super=o,f.apply(t,arguments)}finally{t._local=n;t._super=i}}}()}function it(t,i,r,u){for(var f in r)typeof r[f]=="function"?typeof t[f]=="function"?t[f]=w(f,t,i,r,u):f.charAt(0)==="_"?t.ext[u][f]=w(f,t,i,r,u):n.error("Could not override tree."+f+". Use prefix '_' to create tree."+u+"._"+f):f!=="options"&&(t.ext[u][f]=r[f])}function h(t,i){return t===r?n.Deferred(function(){this.resolve()}).promise():n.Deferred(function(){this.resolveWith(t,i)}).promise()}function y(t,i){return t===r?n.Deferred(function(){this.reject()}).promise():n.Deferred(function(){this.rejectWith(t,i)}).promise()}function b(n,t){return function(){n.resolveWith(t)}}function p(t){var i=n.extend({},t.data()),r=i.json;return delete i.fancytree,r&&(delete i.json,i=n.extend(i,r)),i}function k(n){return n=n.toLowerCase(),function(t){return t.title.toLowerCase().indexOf(n)>=0}}function c(t,i){var f,h,r,e;for(this.parent=t,this.tree=t.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},f=0,h=s.length;f<h;f++)r=s[f],this[r]=i[r];i.data&&n.extend(this.data,i.data);for(r in i)a[r]||n.isFunction(i[r])||g[r]||(this.data[r]=i[r]);this.key==null&&(this.tree.options.defaultKey?(this.key=this.tree.options.defaultKey(this),u(this.key,"defaultKey() must return a unique key")):this.key="_"+o._nextNodeKey++);i.active&&(u(this.tree.activeNode===null,"only one active node allowed"),this.tree.activeNode=this);i.selected&&(this.tree.lastSelectedNode=this);this.children=null;e=i.children;e&&e.length&&this._setChildren(e);this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function v(t){this.widget=t;this.$div=t.element;this.options=t.options;this.options&&n.isFunction(this.options.lazyload)&&(n.isFunction(this.options.lazyLoad)||(this.options.lazyLoad=function(){o.warn("The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead.");t.options.lazyload.apply(this,arguments)}));this.ext={};this.data=p(this.$div);this._id=n.ui.fancytree._nextId++;this._ns=".fancytree-"+this._id;this.activeNode=null;this.focusNode=null;this._hasFocus=null;this.lastSelectedNode=null;this.systemFocusElement=null;this.statusClassPropName="span";this.ariaPropName="li";this.nodeContainerAttrName="li";this.$div.find(">ul.fancytree-container").remove();var r={tree:this},i;this.rootNode=new c(r,{title:"root",key:"root_"+this._id,children:null,expanded:!0});this.rootNode.parent=null;i=n("<ul>",{"class":"ui-fancytree fancytree-container",role:"listbox"}).appendTo(this.$div);this.$container=i;this.rootNode.ul=i[0];this.options.debugLevel==null&&(this.options.debugLevel=o.debugLevel);this.$container.attr("tabindex",this.options.tabbable?"0":"-1");this.options.aria&&this.$container.attr("role","group").attr("aria-label","checkbox group").attr("aria-multiselectable",!0)}if(n.ui.fancytree&&n.ui.fancytree.version){n.ui.fancytree.warn("Fancytree: ignored duplicate include");return}for(var o=null,rt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},l="active expanded focus folder hideCheckbox lazy selected unselectable".split(" "),d={},s="expanded extraClasses folder hideCheckbox key lazy refKey selected title tooltip unselectable".split(" "),a={},g={active:!0,children:!0,data:!0,focus:!0},e=0;e<l.length;e++)d[l[e]]=!0;for(e=0;e<s.length;e++)a[s[e]]=!0;c.prototype={_findDirectChild:function(n){var t,r,i=this.children;if(i)if(typeof n=="string"){for(t=0,r=i.length;t<r;t++)if(i[t].key===n)return i[t]}else{if(typeof n=="number")return this.children[n];if(n.parent===this)return n}return null},_setChildren:function(n){u(n&&(!this.children||this.children.length===0),"only init supported");this.children=[];for(var t=0,i=n.length;t<i;t++)this.children.push(new c(this,n[t]))},addChildren:function(t,i){var r,o,e,s=null,f=[];for(n.isPlainObject(t)&&(t=[t]),this.children||(this.children=[]),r=0,o=t.length;r<o;r++)f.push(new c(this,t[r]));return s=f[0],i==null?this.children=this.children.concat(f):(i=this._findDirectChild(i),e=n.inArray(i,this.children),u(e>=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[e,0].concat(f))),(!this.parent||this.parent.ul||this.tr)&&this.render(),this.tree.options.selectMode===3&&this.fixSelection3FromEndNodes(),s},addNode:function(n,t){(t===r||t==="over")&&(t="child");switch(t){case"after":return this.getParent().addChildren(n,this.getNextSibling());case"before":return this.getParent().addChildren(n,this);case"child":case"over":return this.addChildren(n)}u(!1,"Invalid mode: "+t)},appendSibling:function(n){return this.addNode(n,"after")},applyPatch:function(t){if(t===null)return this.remove(),h(this);var i,r,u={children:!0,expanded:!0,parent:!0};for(i in t)r=t[i],u[i]||n.isFunction(r)||(a[i]?this[i]=r:this.data[i]=r);return t.hasOwnProperty("children")&&(this.removeChildren(),t.children&&this._setChildren(t.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),t.hasOwnProperty("expanded")?this.setExpanded(t.expanded):h(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(n,t,i){return n.addNode(this.toDict(!0,i),t)},countChildren:function(n){var r=this.children,t,u,i;if(!r)return 0;if(i=r.length,n!==!1)for(t=0,u=i;t<u;t++)i+=r[t].countChildren();return i},debug:function(){this.tree.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),f("debug",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},findAll:function(t){t=n.isFunction(t)?t:k(t);var i=[];return this.visit(function(n){t(n)&&i.push(n)}),i},findFirst:function(t){t=n.isFunction(t)?t:k(t);var i=null;return this.visit(function(n){if(t(n))return i=n,!1}),i},_changeSelectStatusAttrs:function(n){var t=!1;switch(n){case!1:t=this.selected||this.partsel;this.selected=!1;this.partsel=!1;break;case!0:t=!this.selected||!this.partsel;this.selected=!0;this.partsel=!0;break;case r:t=this.selected||!this.partsel;this.selected=!1;this.partsel=!0;break;default:u(!1,"invalid state: "+n)}return t&&this.renderStatus(),t},fixSelection3AfterClick:function(){var n=this.isSelected();this.visit(function(t){t._changeSelectStatusAttrs(n)});this.fixSelection3FromEndNodes()},fixSelection3FromEndNodes:function(){function n(t){var i,h,c,f,u,e,o,s=t.children;if(s){for(e=!0,o=!1,i=0,h=s.length;i<h;i++)c=s[i],f=n(c),f!==!1&&(o=!0),f!==!0&&(e=!1);u=e?!0:o?r:!1}else u=!!t.selected;return t._changeSelectStatusAttrs(u),u}u(this.tree.options.selectMode===3,"expected selectMode 3");n(this);this.visitParents(function(n){for(var t,f,e=n.children,o=!0,s=!1,i=0,u=e.length;i<u;i++)t=e[i],(t.selected||t.partsel)&&(s=!0),t.unselectable||t.selected||(o=!1);f=o?!0:s?r:!1;n._changeSelectStatusAttrs(f)})},fromDict:function(t){for(var i in t)a[i]?this[i]=t[i]:i==="data"?n.extend(this.data,t.data):n.isFunction(t[i])||g[i]||(this.data[i]=t[i]);t.children?(this.removeChildren(),this.addChildren(t.children)):this.renderTitle()},getChildren:function(){return this.hasChildren()===r?r:this.children},getFirstChild:function(){return this.children?this.children[0]:null},getIndex:function(){return n.inArray(this,this.parent.children)},getIndexHier:function(t){t=t||".";var i=[];return n.each(this.getParentList(!1,!0),function(n,t){i.push(t.getIndex()+1)}),i.join(t)},getKeyPath:function(n){var t=[],i=this.tree.options.keyPathSeparator;return this.visitParents(function(n){n.parent&&t.unshift(n.key)},!n),i+t.join(i)},getLastChild:function(){return this.children?this.children[this.children.length-1]:null},getLevel:function(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t},getNextSibling:function(){if(this.parent)for(var t=this.parent.children,n=0,i=t.length-1;n<i;n++)if(t[n]===this)return t[n+1];return null},getParent:function(){return this.parent},getParentList:function(n,t){for(var r=[],i=t?this:this.parent;i;)(n||i.parent)&&r.unshift(i),i=i.parent;return r},getPrevSibling:function(){if(this.parent)for(var t=this.parent.children,n=1,i=t.length;n<i;n++)if(t[n]===this)return t[n-1];return null},hasChildren:function(){return this.lazy?this.children==null?r:this.children.length===0?!1:this.children.length===1&&this.children[0].isStatusNode()?r:!0:!!this.children},hasFocus:function(){return this.tree.hasFocus()&&this.tree.focusNode===this},isActive:function(){return this.tree.activeNode===this},isChildOf:function(n){return this.parent&&this.parent===n},isDescendantOf:function(n){if(!n||n.tree!==this.tree)return!1;for(var t=this.parent;t;){if(t===n)return!0;t=t.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var n=this.parent;return!n||n.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var n=this.parent;return!n||n.children[n.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||this.hasChildren()!==r},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isUndefined:function(){return this.hasChildren()===r},isVisible:function(){for(var i=this.getParentList(!1,!1),n=0,t=i.length;n<t;n++)if(!i[n].expanded)return!1;return!0},lazyLoad:function(n){return this.warn("FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead."),this.load(n)},load:function(n){var i,t,r=this;return(u(this.isLazy(),"load() requires a lazy node"),u(n||this.isUndefined(),"Pass forceReload=true to re-load a lazy node"),this.isLoaded()&&this.resetLazy(),t=this.tree._triggerNodeEvent("lazyLoad",this),t===!1)?h(this):(u(typeof t!="boolean","lazyLoad event must return source in data.result"),i=this.tree._callHook("nodeLoadChildren",this,t),this.expanded&&i.always(function(){r.render()}),i)},makeVisible:function(t){for(var e=this,u=[],r=new n.Deferred,f=this.getParentList(!1,!1),o=f.length,s=!(t&&t.noAnimation===!0),h=!(t&&t.scrollIntoView===!1),i=o-1;i>=0;i--)u.push(f[i].setExpanded(!0,t));return n.when.apply(n,u).done(function(){h?e.scrollIntoView(s).done(function(){r.resolve()}):r.resolve()}),r.promise()},moveTo:function(t,i,f){(i===r||i==="over")&&(i="child");var o,s=this.parent,e=i==="child"?t:t.parent;if(this!==t){if(this.parent){if(e.isDescendantOf(this))throw"Cannot move a node to its own descendant";}else throw"Cannot move system root";if(this.parent.children.length===1?(this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1):(o=n.inArray(this,this.parent.children),u(o>=0),this.parent.children.splice(o,1)),this.parent=e,e.hasChildren())switch(i){case"child":e.children.push(this);break;case"before":o=n.inArray(t,e.children);u(o>=0);e.children.splice(o,0,this);break;case"after":o=n.inArray(t,e.children);u(o>=0);e.children.splice(o+1,0,this);break;default:throw"Invalid mode "+i;}else e.children=[this];f&&t.visit(f,!0);this.tree!==t.tree&&(this.warn("Cross-tree moveTo is experimantal!"),this.visit(function(n){n.tree=t.tree},!0));s.isDescendantOf(e)||s.render();e.isDescendantOf(s)||e===s||e.render()}},navigate:function(t,i){function u(r){if(r){if(r.makeVisible(),!n(r.span).is(":visible")){r.debug("Navigate: skipping hidden node");r.navigate(t,i);return}return i===!1?r.setFocus():r.setActive()}}var e,o,s=!0,f=n.ui.keyCode,r=null;switch(t){case f.BACKSPACE:this.parent&&this.parent.parent&&u(this.parent);break;case f.LEFT:this.expanded?(this.setExpanded(!1),u(this)):this.parent&&this.parent.parent&&u(this.parent);break;case f.RIGHT:!this.expanded&&(this.children||this.lazy)?(this.setExpanded(),u(this)):this.children&&this.children.length&&u(this.children[0]);break;case f.UP:for(r=this.getPrevSibling();r&&r.expanded&&r.children&&r.children.length;)r=r.children[r.children.length-1];!r&&this.parent&&this.parent.parent&&(r=this.parent);u(r);break;case f.DOWN:if(this.expanded&&this.children&&this.children.length)r=this.children[0];else for(o=this.getParentList(!1,!0),e=o.length-1;e>=0;e--)if(r=o[e].getNextSibling(),r)break;u(r);break;default:s=!1}},remove:function(){return this.parent.removeChild(this)},removeChild:function(n){return this.tree._callHook("nodeRemoveChild",this,n)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},render:function(n,t){return this.tree._callHook("nodeRender",this,n,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},resetLazy:function(){this.removeChildren();this.expanded=!1;this.lazy=!0;this.children=r;this.renderStatus()},scheduleAction:function(n,t){this.tree.timer&&clearTimeout(this.tree.timer);this.tree.timer=null;var i=this;switch(n){case"cancel":break;case"expand":this.tree.timer=setTimeout(function(){i.tree.debug("setTimeout: trigger expand");i.setExpanded(!0)},t);break;case"activate":this.tree.timer=setTimeout(function(){i.tree.debug("setTimeout: trigger activate");i.setActive(!0)},t);break;default:throw"Invalid mode "+n;}},scrollIntoView:function(t,i){t=t===!0?{duration:200,queue:!1}:t;var o,e=new n.Deferred,l=this,f=n(this.span).position().top,c=n(this.span).height(),r=this.tree.$container,s=r[0].scrollTop,a=Math.max(0,r.innerHeight()-r[0].clientHeight),h=r.height()-a,u=null;return f<0?u=s+f:f+c>h&&(u=s+f-h+c,i&&(o=i?n(i.span).position().top:0,f-o>h&&(u=s+o))),u!==null?t?(t.complete=function(){e.resolveWith(l)},r.animate({scrollTop:u},t)):(r[0].scrollTop=u,e.resolveWith(this)):e.resolveWith(this),e.promise()},setActive:function(n,t){return this.tree._callHook("nodeSetActive",this,n,t)},setExpanded:function(n,t){return this.tree._callHook("nodeSetExpanded",this,n,t)},setFocus:function(n){return this.tree._callHook("nodeSetFocus",this,n)},setSelected:function(n){return this.tree._callHook("nodeSetSelected",this,n)},setTitle:function(n){this.title=n;this.renderTitle()},sortChildren:function(n,t){var i,u,r=this.children;if(r){if(n=n||function(n,t){var i=n.title.toLowerCase(),r=t.title.toLowerCase();return i===r?0:i>r?1:-1},r.sort(n),t)for(i=0,u=r.length;i<u;i++)r[i].children&&r[i].sortChildren(n,"$norender$");t!=="$norender$"&&this.render()}},toDict:function(t,i){var u,o,f,r={},e=this;if(n.each(s,function(n,t){(e[t]||e[t]===!1)&&(r[t]=e[t])}),n.isEmptyObject(this.data)||(r.data=n.extend({},this.data),n.isEmptyObject(r.data)&&delete r.data),i&&i(r),t&&this.hasChildren())for(r.children=[],u=0,o=this.children.length;u<o;u++)f=this.children[u],f.isStatusNode()||r.children.push(f.toDict(!0,i));return r},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"<FancytreeNode(#"+this.key+", '"+this.title+"')>"},visit:function(n,t){var r,f,i=!0,u=this.children;if(t===!0&&(i=n(this),i===!1||i==="skip"))return i;if(u)for(r=0,f=u.length;r<f;r++)if(i=u[r].visit(n,!0),i===!1)break;return i},visitParents:function(n,t){if(t&&n(this)===!1)return!1;for(var i=this.parent;i;){if(n(i)===!1)return!1;i=i.parent}return!0},warn:function(){Array.prototype.unshift.call(arguments,this.toString());f("warn",arguments)}};v.prototype={_makeHookContext:function(t,i,u){var f,e;return t.node!==r?(i&&t.originalEvent!==i&&n.error("invalid args"),f=t):t.tree?(e=t.tree,f={node:t,tree:e,widget:e.widget,options:e.widget.options,originalEvent:i}):t.widget?f={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:i}:n.error("invalid args"),u&&n.extend(f,u),f},_callHook:function(t,i){var f=this._makeHookContext(i),r=this[t],u=Array.prototype.slice.call(arguments,2);return n.isFunction(r)||n.error("_callHook('"+t+"') is not a function"),u.unshift(f),r.apply(this,u)},_requireExtension:function(t,i,r,f){r=!!r;var e=this._local.name,s=this.options.extensions,c=n.inArray(t,s)<n.inArray(e,s),o=i&&this.ext[t]==null,h=!o&&r!=null&&r!==c;return(u(e&&e!==t),o||h)?(f||(o||i?(f="'"+e+"' extension requires '"+t+"'",h&&(f+=" to be registered "+(r?"before":"after")+" itself")):f="If used together, `"+t+"` must be registered "+(r?"before":"after")+" `"+e+"`"),n.error(f),!1):!0},activateKey:function(n){var t=this.getNodeByKey(n);return t?t.setActive():this.activeNode&&this.activeNode.setActive(!1),t},applyPatch:function(t){for(var o,r,f,s,e,c=t.length,h=[],i=0;i<c;i++)r=t[i],u(r.length===2,"patchList must be an array of length-2-arrays"),f=r[0],s=r[1],e=f===null?this.rootNode:this.getNodeByKey(f),e?(o=new n.Deferred,h.push(o),e.applyPatch(s).always(b(o,e))):this.warn("could not find node with key '"+f+"'");return n.when.apply(n,h).promise()},count:function(){return this.rootNode.countChildren()},debug:function(){this.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),f("debug",arguments))},generateFormElements:function(t,i){var u,f=t!==!1?"ft_"+this._id:t,e=i!==!1?"ft_"+this._id+"_active":i,o="fancytree_result_"+this._id,r=this.$container.find("div#"+o);r.length?r.empty():r=n("<div>",{id:o}).hide().appendTo(this.$container);f&&(u=this.getSelectedNodes(this.options.selectMode===3),n.each(u,function(t,i){r.append(n("<input>",{type:"checkbox",name:f,value:i.key,checked:!0}))}));e&&this.activeNode&&r.append(n("<input>",{type:"radio",name:e,value:this.activeNode.key,checked:!0}))},getActiveNode:function(){return this.activeNode},getFirstChild:function(){return this.rootNode.getFirstChild()},getFocusNode:function(){return this.focusNode},getNodeByKey:function(n,t){var r,u;return!t&&(r=i.getElementById(this.options.idPrefix+n),r)?r.ftnode?r.ftnode:null:(t=t||this.rootNode,u=null,t.visit(function(t){if(t.key===n)return u=t,!1},!0),u)},getSelectedNodes:function(n){var t=[];return this.rootNode.visit(function(i){if(i.selected&&(t.push(i),n===!0))return"skip"}),t},hasFocus:function(){return!!this._hasFocus},info:function(){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),f("info",arguments))},loadKeyPath:function(t,i,u){function w(n,t,r){i.call(h,t,"loading");t.load().done(function(){h.loadKeyPath.call(h,o[n],i,t).always(b(r,h))}).fail(function(){h.warn("loadKeyPath: error loading: "+n+" (parent: "+l+")");i.call(h,t,"error");r.reject()})}var y,p,a,c,f,o,e,s,l=u||this.rootNode,v=this.options.keyPathSeparator,h=this;for(n.isArray(t)||(t=[t]),o={},a=0;a<t.length;a++)for(c=t[a],c.charAt(0)===v&&(c=c.substr(1)),s=c.split(v);s.length;)if(f=s.shift(),e=l._findDirectChild(f),e)if(s.length===0){i.call(this,e,"ok");break}else if(e.lazy&&e.hasChildren()===r){i.call(this,e,"loaded");o[f]?o[f].push(s.join(v)):o[f]=[s.join(v)];break}else i.call(this,e,"loaded"),l=e;else{this.warn("loadKeyPath: key not found: "+f+" (parent: "+l+")");i.call(this,f,"error");break}y=[];for(f in o)e=l._findDirectChild(f),p=new n.Deferred,y.push(p),w(f,e,p);return n.when.apply(n,y).promise()},reactivate:function(n){var t=this.activeNode;t&&(this.activeNode=null,t.setActive(),n&&t.setFocus())},reload:function(n){return this._callHook("treeClear",this),this._callHook("treeLoad",this,n)},render:function(n,t){return this.rootNode.render(n,t)},setFocus:function(n){return this._callHook("treeSetFocus",this,n)},toDict:function(n,t){var i=this.rootNode.toDict(!0,t);return n?i:i.children},toString:function(){return"<Fancytree(#"+this._id+")>"},_triggerNodeEvent:function(n,t,i,u){var f=this._makeHookContext(t,i,u),e=this.widget._trigger(n,i,f);return e!==!1&&f.result!==r?f.result:e},_triggerTreeEvent:function(n,t){var i=this._makeHookContext(this,t),u=this.widget._trigger(n,t,i);return u!==!1&&i.result!==r?i.result:u},visit:function(n){return this.rootNode.visit(n,!1)},warn:function(){Array.prototype.unshift.call(arguments,this.toString());f("warn",arguments)}};n.extend(v.prototype,{nodeClick:function(n){var t,i,r=n.originalEvent,u=n.targetType,f=n.node;if(u==="expander")this._callHook("nodeToggleExpanded",n);else if(u==="checkbox")this._callHook("nodeToggleSelected",n),this._callHook("nodeSetFocus",n,!0);else{if(i=!1,t=!0,f.folder)switch(n.options.clickFolderMode){case 2:i=!0;t=!1;break;case 3:t=!0;i=!0}t&&(this.nodeSetFocus(n),this._callHook("nodeSetActive",n,!0));i&&(!t,this._callHook("nodeToggleExpanded",n))}r.target.localName==="a"&&r.target.className==="fancytree-title"&&r.preventDefault()},nodeCollapseSiblings:function(n,t){var r,i,f,u=n.node;if(u.parent)for(r=u.parent.children,i=0,f=r.length;i<f;i++)r[i]!==u&&r[i].expanded&&this._callHook("nodeSetExpanded",r[i],!1,t)},nodeDblclick:function(n){n.targetType==="title"&&n.options.clickFolderMode===4&&this._callHook("nodeToggleExpanded",n);n.targetType==="title"&&n.originalEvent.preventDefault()},nodeKeydown:function(t){var s,u=t.originalEvent,f=t.node,r=t.tree,e=t.options,o=!0,h=!(u.ctrlKey||!e.autoActivate),i=n.ui.keyCode;f||(this.rootNode.getFirstChild().setFocus(),f=t.node=this.focusNode,f.debug("Keydown force focus on first node"));switch(u.which){case i.NUMPAD_ADD:case 187:r.nodeSetExpanded(t,!0);break;case i.NUMPAD_SUBTRACT:case 189:r.nodeSetExpanded(t,!1);break;case i.SPACE:e.checkbox?r.nodeToggleSelected(t):r.nodeSetActive(t,!0);break;case i.ENTER:r.nodeSetActive(t,!0);break;case i.BACKSPACE:case i.LEFT:case i.RIGHT:case i.UP:case i.DOWN:s=f.navigate(u.which,h);break;default:o=!1}o&&u.preventDefault()},nodeLoadChildren:function(t,i){var o,f,r=t.tree,e=t.node;return n.isFunction(i)&&(i=i()),i.url&&(o=n.extend({},t.options.ajax,i),o.debugDelay?(f=o.debugDelay,n.isArray(f)&&(f=f[0]+Math.random()*(f[1]-f[0])),e.debug("nodeLoadChildren waiting debug delay "+Math.round(f)+"ms"),o.debugDelay=!1,i=n.Deferred(function(t){setTimeout(function(){n.ajax(o).done(function(){t.resolveWith(this,arguments)}).fail(function(){t.rejectWith(this,arguments)})},f)})):i=n.ajax(o),i=i.pipe(function(i){var u;return typeof i=="string"&&n.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),t.options.postProcess?(u=r._triggerNodeEvent("postProcess",t,t.originalEvent,{response:i,dataType:this.dataType}),i=n.isArray(u)?u:i):i&&i.hasOwnProperty("d")&&t.options.enableAspx&&(i=typeof i.d=="string"?n.parseJSON(i.d):i.d),i},function(n,t,i){return r._makeHookContext(e,null,{error:n,args:Array.prototype.slice.call(arguments),message:i,details:n.status+": "+i})})),n.isFunction(i.promise)&&(u(!e.isLoading()),r.nodeSetStatus(t,"loading"),i.done(function(){r.nodeSetStatus(t,"ok")}).fail(function(n){var i;i=n.node&&n.error&&n.message?n:r._makeHookContext(e,null,{error:n,args:Array.prototype.slice.call(arguments),message:n?n.message||n.toString():""});r._triggerNodeEvent("loaderror",i,null);r.nodeSetStatus(t,"error",i.message,i.details)})),n.when(i).done(function(t){var i;n.isPlainObject(t)&&(u(n.isArray(t.children),"source must contain (or be) an array of children"),u(e.isRoot(),"source may only be an object for root nodes"),i=t,t=t.children,delete i.children,n.extend(r.data,i));u(n.isArray(t),"expected array of children");e._setChildren(t);r._triggerNodeEvent("loadChildren",e)})},nodeLoadKeyPath:function(){},nodeRemoveChild:function(t,i){var f,s=t.node,o=t.options,e=n.extend({},t,{node:i}),r=s.children;if(r.length===1)return u(i===r[0]),this.nodeRemoveChildren(t);this.activeNode&&(i===this.activeNode||this.activeNode.isDescendantOf(i))&&this.activeNode.setActive(!1);this.focusNode&&(i===this.focusNode||this.focusNode.isDescendantOf(i))&&(this.focusNode=null);this.nodeRemoveMarkup(e);this.nodeRemoveChildren(e);f=n.inArray(i,r);u(f>=0);i.visit(function(n){n.parent=null},!0);this._callHook("treeRegisterNode",this,!1,i);o.removeNode&&o.removeNode.call(t.tree,{type:"removeNode"},e);r.splice(f,1)},nodeRemoveChildMarkup:function(t){var i=t.node;i.ul&&(i.isRoot()?n(i.ul).empty():(n(i.ul).remove(),i.ul=null),i.visit(function(n){n.li=n.ul=null}))},nodeRemoveChildren:function(t){var r,u=t.tree,i=t.node,e=i.children,f=t.options;e&&(this.activeNode&&this.activeNode.isDescendantOf(i)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(i)&&(this.focusNode=null),this.nodeRemoveChildMarkup(t),r=n.extend({},t),i.visit(function(n){n.parent=null;u._callHook("treeRegisterNode",u,!1,n);f.removeNode&&(r.node=n,f.removeNode.call(t.tree,{type:"removeNode"},r))}),i.children=i.lazy?[]:null,this.nodeRenderStatus(t))},nodeRemoveMarkup:function(t){var i=t.node;i.li&&(n(i.li).remove(),i.li=null);this.nodeRemoveChildMarkup(t)},nodeRender:function(t,r,f,e,o){var h,b,l,c,p,d,g,s=t.node,nt=t.tree,a=t.options,k=a.aria,tt=!1,w=s.parent,v=!w,y=s.children;if(v||w.ul){if(u(v||w.ul,"parent UL must exist"),v||(s.li&&(r||s.li.parentNode!==s.parent.ul)&&(s.li.parentNode!==s.parent.ul&&this.warn("unlink "+s+" (must be child of "+s.parent+")"),this.nodeRemoveMarkup(t)),s.li?this.nodeRenderStatus(t):(tt=!0,s.li=i.createElement("li"),s.li.ftnode=s,k&&(s.li.setAttribute("role","checkbox"),s.li.setAttribute("tabindex","0")),s.key&&a.generateIds&&(s.li.id=a.idPrefix+s.key),s.span=i.createElement("span"),s.span.className="fancytree-node",s.span.setAttribute("tabindex","-1"),k&&n(s.li).attr("aria-labelledby","ftal_"+s.key),s.li.appendChild(s.span),this.nodeRenderTitle(t),a.createNode&&a.createNode.call(nt,{type:"createNode"},t)),a.renderNode&&a.renderNode.call(nt,{type:"renderNode"},t)),y){if(v||s.expanded||f===!0){for(s.ul||(s.ul=i.createElement("ul"),(e!==!0||o)&&s.expanded||(s.ul.style.display="none"),k&&n(s.ul).attr("role","group"),s.li?s.li.appendChild(s.ul):s.tree.$div.append(s.ul)),c=0,p=y.length;c<p;c++)g=n.extend({},t,{node:y[c]}),this.nodeRender(g,r,f,!1,!0);for(h=s.ul.firstChild;h;)l=h.ftnode,l&&l.parent!==s?(s.debug("_fixParent: remove missing "+l,h),d=h.nextSibling,h.parentNode.removeChild(h),h=d):h=h.nextSibling;for(h=s.ul.firstChild,c=0,p=y.length-1;c<p;c++)b=y[c],l=h.ftnode,b!==l?s.ul.insertBefore(b.li,l.li):h=h.nextSibling}}else s.ul&&(this.warn("remove child markup for "+s),this.nodeRemoveChildMarkup(t));v||tt&&w.ul.appendChild(s.li)}},nodeRenderTitle:function(n,t){var l,a,h,c,v,y,i=n.node,w=n.tree,f=n.options,s=f.aria,p=i.getLevel(),u=[],e=i.data.icon;(t!==r&&(i.title=t),i.span)&&(p<f.minExpandLevel?p>1&&(s?u.push("<span role='button' class='fancytree-expander'><\/span>"):u.push("<span class='fancytree-expander'><\/span>")):s?u.push("<span role='button' class='fancytree-expander'><\/span>"):u.push("<span class='fancytree-expander'><\/span>"),f.checkbox&&i.hideCheckbox!==!0&&!i.isStatusNode()&&(s?u.push("<span role='checkbox' class='fancytree-checkbox'><\/span>"):u.push("<span class='fancytree-checkbox'><\/span>")),c=s?" role='img'":"",e&&typeof e=="string"?(a=e.charAt(0)==="/"?e:f.imagePath+e,u.push("<img src='"+a+"' alt='' />")):i.data.iconclass?u.push("<span "+c+" class='fancytree-custom-icon "+i.data.iconclass+"'><\/span>"):(e===!0||e!==!1&&f.icons!==!1)&&u.push("<span "+c+" class='fancytree-icon'><\/span>"),h="",f.renderTitle&&(h=f.renderTitle.call(w,{type:"renderTitle"},n)||""),h||(y=i.tooltip?" title='"+o.escapeHtml(i.tooltip)+"'":"",l=s?" id='ftal_"+i.key+"'":"",c=s?" role='treeitem'":"",v=f.titlesTabbable?" tabindex='0'":"",h="<span "+c+" class='fancytree-title'"+l+y+v+">"+i.title+"<\/span>"),u.push(h),i.span.innerHTML=u.join(""),this.nodeRenderStatus(n))},nodeRenderStatus:function(t){var i=t.node,s=t.tree,h=t.options,c=i.hasChildren(),o=i.isLastSibling(),f=h.aria,e=n(i.span).find(".fancytree-title"),u=h._classNames,r=[],l=i[s.statusClassPropName];l&&(r.push(u.node),s.activeNode===i&&r.push(u.active),s.focusNode===i?(r.push(u.focused),f&&e.closest("li").attr("aria-activedescendant",!0)):f&&e.closest("li").removeAttr("aria-activedescendant"),i.expanded?(r.push(u.expanded),f&&e.attr("aria-expanded",!0)):f&&e.removeAttr("aria-expanded"),i.folder&&r.push(u.folder),c!==!1&&r.push(u.hasChildren),o&&r.push(u.lastsib),i.lazy&&i.children==null&&r.push(u.lazy),i.partsel&&r.push(u.partsel),i._isLoading&&r.push(u.loading),i._error&&r.push(u.error),i.selected?(r.push(u.selected),f&&e.closest("li").attr("aria-checked",!0)):f&&e.closest("li").attr("aria-checked",!1),i.extraClasses&&r.push(i.extraClasses),c===!1?r.push(u.combinedExpanderPrefix+"n"+(o?"l":"")):r.push(u.combinedExpanderPrefix+(i.expanded?"e":"c")+(i.lazy&&i.children==null?"d":"")+(o?"l":"")),r.push(u.combinedIconPrefix+(i.expanded?"e":"c")+(i.folder?"f":"")),l.className=r.join(" "),i.li&&(i.li.className=o?u.lastsib:""))},nodeSetActive:function(t,i,r){r=r||{};var s,e=t.node,f=t.tree,c=t.options,o=r.noEvents===!0,l=e===f.activeNode;if(i=i!==!1,l===i)return h(e);if(i&&!o&&this._triggerNodeEvent("beforeActivate",e,t.originalEvent)===!1)return y(e,["rejected"]);i?(f.activeNode&&(u(f.activeNode!==e,"node was active (inconsistency)"),s=n.extend({},t,{node:f.activeNode}),f.nodeSetActive(s,!1),u(f.activeNode===null,"deactivate was out of sync?")),c.activeVisible&&e.makeVisible(),f.activeNode=e,f.nodeRenderStatus(t),f.nodeSetFocus(t),o||f._triggerNodeEvent("activate",e,t.originalEvent)):(u(f.activeNode===e,"node was not active (inconsistency)"),f.activeNode=null,this.nodeRenderStatus(t),o||t.tree._triggerNodeEvent("deactivate",e,t.originalEvent))},nodeSetExpanded:function(t,i,u){u=u||{};var s,o,c,p,a,w,f=t.node,b=t.tree,e=t.options,l=u.noAnimation===!0,v=u.noEvents===!0;if(i=i!==!1,f.expanded&&i||!f.expanded&&!i)return h(f);if(!i||f.lazy||f.hasChildren()){if(!i&&f.getLevel()<e.minExpandLevel)return y(f,["locked"]);if(!v&&this._triggerNodeEvent("beforeExpand",f,t.originalEvent)===!1)return y(f,["rejected"])}else return h(f);if(l||f.isVisible()||(l=u.noAnimation=!0),o=new n.Deferred,i&&!f.expanded&&e.autoCollapse){a=f.getParentList(!1,!0);w=e.autoCollapse;try{for(e.autoCollapse=!1,c=0,p=a.length;c<p;c++)this._callHook("nodeCollapseSiblings",a[c],u)}finally{e.autoCollapse=w}}return o.done(function(){e.autoScroll&&!l?f.getLastChild().scrollIntoView(!0,f).always(function(){v||t.tree._triggerNodeEvent(i?"expand":"collapse",t)}):v||t.tree._triggerNodeEvent(i?"expand":"collapse",t)}),s=function(r){var u,o,s,h;if(f.expanded=i,b._callHook("nodeRender",t,!1,!1,!0),f.ul)if(s=f.ul.style.display!=="none",h=!!f.expanded,s===h)f.warn("nodeSetExpanded: UL.style.display already set");else if(!e.fx||l)f.ul.style.display=f.expanded||!parent?"":"none";else{u=e.fx.duration||200;o=e.fx.easing;n(f.ul).animate(e.fx,u,o,function(){r()});return}r()},i&&f.lazy&&f.hasChildren()===r?f.load().done(function(){o.notifyWith&&o.notifyWith(f,["loaded"]);s(function(){o.resolveWith(f)})}).fail(function(n){s(function(){o.rejectWith(f,["load failed ("+n+")"])})}):s(function(){o.resolveWith(f)}),o.promise()},nodeSetFocus:function(t,i){var f,r=t.tree,u=t.node;if(i=i!==!1,r.focusNode){if(r.focusNode===u&&i)return;f=n.extend({},t,{node:r.focusNode});r.focusNode=null;this._triggerNodeEvent("blur",f);this._callHook("nodeRenderStatus",f)}i&&(this.hasFocus()||(u.debug("nodeSetFocus: forcing container focus"),this._callHook("treeSetFocus",t,!0,!0)),u.makeVisible(),r.focusNode=u,this._triggerNodeEvent("focus",t),t.options.autoScroll&&u.scrollIntoView(),this._callHook("nodeRenderStatus",t))},nodeSetSelected:function(n,t){var i=n.node,r=n.tree,u=n.options;if(t=t!==!1,i.debug("nodeSetSelected("+t+")",n),!i.unselectable){if(i.selected&&t||!i.selected&&!t||this._triggerNodeEvent("beforeSelect",i,n.originalEvent)===!1)return!!i.selected;t&&u.selectMode===1?r.lastSelectedNode&&r.lastSelectedNode.setSelected(!1):u.selectMode===3&&(i.selected=t,i.fixSelection3AfterClick());i.selected=t;this.nodeRenderStatus(n);r.lastSelectedNode=t?i:null;r._triggerNodeEvent("select",n)}},nodeSetStatus:function(t,i,r,u){function s(){var n=f.children?f.children[0]:null;if(n&&n.isStatusNode()){try{f.ul&&(f.ul.removeChild(n.li),n.li=null)}catch(t){}f.children.length===1?f.children=[]:f.children.shift()}}function o(t,i){var r=f.children?f.children[0]:null;return r&&r.isStatusNode()?(n.extend(r,t),e._callHook("nodeRender",r)):(t.key="_statusNode",f._setChildren([t]),f.children[0].statusNodeType=i,e.render()),f.children[0]}var f=t.node,e=t.tree;switch(i){case"ok":s();f._isLoading=!1;f._error=null;f.renderStatus();break;case"loading":f.parent||o({title:e.options.strings.loading+(r?" ("+r+") ":""),tooltip:u,extraClasses:"fancytree-statusnode-wait"},i);f._isLoading=!0;f._error=null;f.renderStatus();break;case"error":o({title:e.options.strings.loadError+(r?" ("+r+") ":""),tooltip:u,extraClasses:"fancytree-statusnode-error"},i);f._isLoading=!1;f._error={message:r,details:u};f.renderStatus();break;default:n.error("invalid node status "+i)}},nodeToggleExpanded:function(n){return this.nodeSetExpanded(n,!n.node.expanded)},nodeToggleSelected:function(n){return this.nodeSetSelected(n,!n.node.selected)},treeClear:function(n){var t=n.tree;t.activeNode=null;t.focusNode=null;t.$div.find(">ul.fancytree-container").empty();t.rootNode.children=null},treeCreate:function(){},treeDestroy:function(){},treeInit:function(n){this.treeLoad(n)},treeLoad:function(t,i){var f,u,r=t.tree,e=t.widget.element,o=n.extend({},t,{node:this.rootNode});if(r.rootNode.children&&this.treeClear(t),i=i||this.options.source,i)typeof i=="string"&&nt();else{f=e.data("type")||"html";switch(f){case"html":u=e.find(">ul:first");u.addClass("ui-fancytree-source ui-helper-hidden");i=n.ui.fancytree.parseHtml(u);this.data=n.extend(this.data,p(u));break;case"json":i=n.parseJSON(e.text());i.children&&(i.title&&(r.title=i.title),i=i.children);break;default:n.error("Invalid data-type: "+f)}}return this.nodeLoadChildren(o,i).done(function(){r.render();t.options.selectMode===3&&r.rootNode.fixSelection3FromEndNodes();r._triggerTreeEvent("init",!0)}).fail(function(){r.render();r._triggerTreeEvent("init",!1)})},treeRegisterNode:function(){},treeSetFocus:function(n,t){t=t!==!1;t!==this.hasFocus()&&(this._hasFocus=t,this.$container.toggleClass("fancytree-treefocus",t),this._triggerTreeEvent(t?"focusTree":"blurTree"))}});n.widget("ui.fancytree",{options:{activeVisible:!0,ajax:{type:"GET",dataType:"json"},aria:!0,autoActivate:!0,autoCollapse:!1,autoScroll:!1,checkbox:!1,clickFolderMode:4,debugLevel:null,disabled:!1,enableAspx:!0,extensions:[],fx:{height:"toggle",duration:200},generateIds:!1,icons:!0,idPrefix:"ft_",keyboard:!0,keyPathSeparator:"/",minExpandLevel:1,selectMode:2,strings:{loading:"Loading&#8230;",loadError:"Load error!"},tabbable:!0,titlesTabbable:!1,_classNames:{node:"fancytree-node",folder:"fancytree-folder",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",hasChildren:"fancytree-has-children",active:"fancytree-active",selected:"fancytree-selected",expanded:"fancytree-expanded",lazy:"fancytree-lazy",focused:"fancytree-focused",partsel:"fancytree-partsel",lastsib:"fancytree-lastsib",loading:"fancytree-loading",error:"fancytree-error"},lazyLoad:null,postProcess:null},_create:function(){this.tree=new v(this);this.$source=this.source||this.element.data("type")==="json"?this.element:this.element.find(">ul:first");for(var i,t,e=this.options.extensions,o=this.tree,f=0;f<e.length;f++)t=e[f],i=n.ui.fancytree._extensions[t],i||n.error("Could not apply extension '"+t+"' (it is not registered, did you forget to include it?)"),this.tree.options[t]=n.extend(!0,{},i.options,this.tree.options[t]),u(this.tree.ext[t]===r,"Extension name must not exist as Fancytree.ext attribute: '"+t+"'"),this.tree.ext[t]={},it(this.tree,o,i,t),o=i;this.tree._callHook("treeCreate",this.tree)},_init:function(){this.tree._callHook("treeInit",this.tree);this._bind()},_setOption:function(t,i){var r=!0,u=!1;switch(t){case"aria":case"checkbox":case"icons":case"minExpandLevel":case"tabbable":this.tree._callHook("treeCreate",this.tree);u=!0;break;case"source":r=!1;this.tree._callHook("treeLoad",this.tree,i)}this.tree.debug("set option "+t+"="+i+" <"+typeof i+">");r&&n.Widget.prototype._setOption.apply(this,arguments);u&&this.tree.render(!0,!1)},destroy:function(){this._unbind();this.tree._callHook("treeDestroy",this.tree);this.tree.$div.find(">ul.fancytree-container").remove();this.$source&&this.$source.removeClass("ui-helper-hidden");n.Widget.prototype.destroy.call(this)},_unbind:function(){var t=this.tree._ns;this.element.unbind(t);this.tree.$container.unbind(t);n(i).unbind(t)},_bind:function(){var r=this,i=this.options,n=this.tree,t=n._ns;this._unbind();n.$container.on("focusin"+t+" focusout"+t,function(t){var i=o.getNode(t),r=t.type==="focusin";i?n._callHook("nodeSetFocus",i,r):n._callHook("treeSetFocus",n,r)}).on("selectstart"+t,"span.fancytree-title",function(n){n.preventDefault()}).on("keydown"+t,function(t){if(i.disabled||i.keyboard===!1)return!0;var r,u=n.focusNode,f=n._makeHookContext(u||n,t),e=n.phase;try{return n.phase="userEvent",r=u?n._triggerNodeEvent("keydown",u,t):n._triggerTreeEvent("keydown",t),r==="preventNav"?r=!0:r!==!1&&(r=n._callHook("nodeKeydown",f)),r}finally{n.phase=e}}).on("click"+t+" dblclick"+t,function(n){if(i.disabled)return!0;var u,f=o.getEventTarget(n),e=f.node,t=r.tree,s=t.phase;if(!e)return!0;u=t._makeHookContext(e,n);try{t.phase="userEvent";switch(n.type){case"click":return u.targetType=f.type,t._triggerNodeEvent("click",u,n)===!1?!1:t._callHook("nodeClick",u);case"dblclick":return u.targetType=f.type,t._triggerNodeEvent("dblclick",u,n)===!1?!1:t._callHook("nodeDblclick",u)}}finally{t.phase=s}})},getActiveNode:function(){return this.tree.activeNode},getNodeByKey:function(n){return this.tree.getNodeByKey(n)},getRootNode:function(){return this.tree.rootNode},getTree:function(){return this.tree}});o=n.ui.fancytree;n.extend(n.ui.fancytree,{version:"2.0.0",buildType:"production",debugLevel:1,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:v,_FancytreeNodeClass:c,jquerySupports:{positionMyOfs:tt(n.ui.version,1,9)},assert:function(n,t){return u(n,t)},debug:function(){n.ui.fancytree.debugLevel>=2&&f("log",arguments)},error:function(){f("error",arguments)},escapeHtml:function(n){return(""+n).replace(/[&<>"'\/]/g,function(n){return rt[n]})},unescapeHtml:function(n){var t=i.createElement("div");return t.innerHTML=n,t.childNodes.length===0?"":t.childNodes[0].nodeValue},getEventTargetType:function(n){return this.getEventTarget(n).type},getEventTarget:function(n){var i=n&&n.target?n.target.className:"",t={node:this.getNode(n.target),type:r};return/\bfancytree-title\b/.test(i)?t.type="title":/\bfancytree-expander\b/.test(i)?t.type=t.node.hasChildren()===!1?"prefix":"expander":/\bfancytree-checkbox\b/.test(i)||/\bfancytree-radio\b/.test(i)?t.type="checkbox":/\bfancytree-icon\b/.test(i)?t.type="icon":/\bfancytree-node\b/.test(i)&&(t.type="title"),t},getNode:function(n){if(n instanceof c)return n;for(n.selector!==r?n=n[0]:n.originalEvent!==r&&(n=n.target);n;){if(n.ftnode)return n.ftnode;n=n.parentNode}return null},info:function(){n.ui.fancytree.debugLevel>=1&&f("info",arguments)},parseHtml:function(t){var o,i,f,h,u,c,a,e,y=t.find(">li"),v=[];return y.each(function(){var b,w=n(this),g=w.find(">span:first",this),k=g.length?null:w.find(">a:first"),y={tooltip:null,data:{}};for(g.length?y.title=g.html():k&&k.length?(y.title=k.html(),y.data.href=k.attr("href"),y.data.target=k.attr("target"),y.tooltip=k.attr("title")):(y.title=w.html(),h=y.title.search(/<ul/i),h>=0&&(y.title=y.title.substring(0,h))),y.title=n.trim(y.title),i=0,f=l.length;i<f;i++)y[l[i]]=r;for(a=this.className.split(" "),o=[],i=0,f=a.length;i<f;i++)e=a[i],d[e]?y[e]=!0:o.push(e);if(y.extraClasses=o.join(" "),u=w.attr("title"),u&&(y.tooltip=u),u=w.attr("id"),u&&(y.key=u),b=p(w),b&&!n.isEmptyObject(b)){for(i=0,f=s.length;i<f;i++)u=s[i],c=b[u],c!=null&&(delete b[u],y[u]=c);n.extend(y.data,b)}t=w.find(">ul:first");y.children=t.length?n.ui.fancytree.parseHtml(t):y.lazy?r:null;v.push(y)}),v},registerExtension:function(t){u(t.name!=null,"extensions must have a `name` property.");u(t.version!=null,"extensions must have a `version` property.");n.ui.fancytree._extensions[t.name]=t},warn:function(){f("warn",arguments)}})}(jQuery,window,document),function(n){"use strict";n.ui.fancytree._FancytreeClass.prototype.countSelected=function(n){var t=this,i=t.options;return t.getSelectedNodes(n).length};n.ui.fancytree._FancytreeNodeClass.prototype.toUpper=function(){var n=this;return n.setTitle(n.title.toUpperCase())};n.ui.fancytree.prototype.widgetMethod1=function(n){var t=this.tree;return n};n.ui.fancytree.registerExtension({name:"childcounter",version:"1.0.0",options:{deep:!0,hideZeros:!0,hideExpanded:!1},foo:42,_appendCounter:function(){var n=this},treeInit:function(n){var t=this,i=n.options,r=n.options.childcounter;this._super(n);this.$container.addClass("fancytree-ext-childcounter")},treeDestroy:function(n){this._super(n)},nodeRenderTitle:function(t,i){var r=t.node,u=t.options.childcounter,f=r.data.childCounter==null?r.countChildren(u.deep):+r.data.childCounter;this._super(t,i);!f&&u.hideZeros||r.isExpanded()&&u.hideExpanded||n("span.fancytree-icon",r.span).append(n("<span class='fancytree-childcounter'/>").text(f))},nodeSetExpanded:function(n,t,i){var r=n.tree,u=n.node;return this._super(n,t,i).always(function(){r.nodeRenderTitle(n)})}})}(jQuery),function(n,t,i,r){"use strict";function e(n){return n===0?"":n>0?"+"+n:""+n}function o(t){var i=t.options.dnd||null;i&&s();i&&i.dragStart&&t.widget.element.draggable(n.extend({addClasses:!1,appendTo:"body",containment:!1,delay:0,distance:4,revert:!1,scroll:!0,scrollSpeed:7,scrollSensitivity:10,connectToFancytree:!0,helper:function(t){var i=n.ui.fancytree.getNode(t.target);return i?i.tree.ext.dnd._onDragEvent("helper",i,null,t,null,null):"<div>ERROR?: helper requested but sourceNode not found<\/div>"},start:function(n,t){var i=t.helper.data("ftSourceNode");return!!i}},t.options.dnd.draggable));i&&i.dragDrop&&t.widget.element.droppable(n.extend({addClasses:!1,tolerance:"intersect",greedy:!1},t.options.dnd.droppable))}function s(){f||(n.ui.plugin.add("draggable","connectToFancytree",{start:function(t,i){var r=n(this).data("ui-draggable")||n(this).data("draggable"),u=i.helper.data("ftSourceNode")||null;if(u)return r.offset.click.top=-2,r.offset.click.left=16,u.tree.ext.dnd._onDragEvent("start",u,null,t,i,r)},drag:function(t,i){var s,e=n(this).data("ui-draggable")||n(this).data("draggable"),o=i.helper.data("ftSourceNode")||null,f=i.helper.data("ftTargetNode")||null,r=n.ui.fancytree.getNode(t.target);if(t.target&&!r&&(s=n(t.target).closest("div.fancytree-drag-helper,#fancytree-drop-marker").length>0,s)){u("Drag event over helper: ignored.");return}i.helper.data("ftTargetNode",r);f&&f!==r&&f.tree.ext.dnd._onDragEvent("leave",f,o,t,i,e);r&&r.tree.options.dnd.dragDrop&&(r===f?r.tree.ext.dnd._onDragEvent("over",r,o,t,i,e):r.tree.ext.dnd._onDragEvent("enter",r,o,t,i,e))},stop:function(t,i){var e=n(this).data("ui-draggable")||n(this).data("draggable"),r=i.helper.data("ftSourceNode")||null,f=i.helper.data("ftTargetNode")||null,s=t.type,o=s==="mouseup"&&t.which===1;o||u("Drag was cancelled");f&&(o&&f.tree.ext.dnd._onDragEvent("drop",f,r,t,i,e),f.tree.ext.dnd._onDragEvent("leave",f,r,t,i,e));r&&r.tree.ext.dnd._onDragEvent("stop",r,null,t,i,e)}}),f=!0)}var u=n.ui.fancytree.debug,f=!1;n.ui.fancytree.registerExtension({name:"dnd",version:"0.1.0",options:{dragStart:null,dragStop:null,autoExpandMS:1e3,preventVoidMoves:!0,preventRecursiveMoves:!0,dragEnter:null,dragOver:null,dragDrop:null,dragLeave:null,draggable:null,droppable:null},treeInit:function(n){var t=n.tree;this._super(n);o(t)},nodeKeydown:function(t){var i=t.originalEvent;return i.which===n.ui.keyCode.ESCAPE&&this._local._cancelDrag(),this._super(t)},_setDndStatus:function(t,i,r,u,f){var a,l=0,c="center",s=this._local,h=t?n(t.span):null,o=n(i.span);if(s.$dropMarker||(s.$dropMarker=n("<div id='fancytree-drop-marker'><\/div>").hide().css({"z-index":1e3}).prependTo(n(this.$div).parent())),u==="after"||u==="before"||u==="over"){switch(u){case"before":s.$dropMarker.removeClass("fancytree-drop-after fancytree-drop-over");s.$dropMarker.addClass("fancytree-drop-before");c="top";break;case"after":s.$dropMarker.removeClass("fancytree-drop-before fancytree-drop-over");s.$dropMarker.addClass("fancytree-drop-after");c="bottom";break;default:s.$dropMarker.removeClass("fancytree-drop-after fancytree-drop-before");s.$dropMarker.addClass("fancytree-drop-over");o.addClass("fancytree-drop-target");l=8}a=n.ui.fancytree.jquerySupports.positionMyOfs?{my:"left"+e(l)+" center",at:"left "+c,of:o}:{my:"left center",at:"left "+c,of:o,offset:""+l+" 0"};s.$dropMarker.show().position(a)}else o.removeClass("fancytree-drop-target"),s.$dropMarker.hide();u==="after"?o.addClass("fancytree-drop-after"):o.removeClass("fancytree-drop-after");u==="before"?o.addClass("fancytree-drop-before"):o.removeClass("fancytree-drop-before");f===!0?(h&&h.addClass("fancytree-drop-accept"),o.addClass("fancytree-drop-accept"),r.addClass("fancytree-drop-accept")):(h&&h.removeClass("fancytree-drop-accept"),o.removeClass("fancytree-drop-accept"),r.removeClass("fancytree-drop-accept"));f===!1?(h&&h.addClass("fancytree-drop-reject"),o.addClass("fancytree-drop-reject"),r.addClass("fancytree-drop-reject")):(h&&h.removeClass("fancytree-drop-reject"),o.removeClass("fancytree-drop-reject"),r.removeClass("fancytree-drop-reject"))},_onDragEvent:function(t,i,f,e,o,s){t!=="over"&&u("tree.ext.dnd._onDragEvent(%s, %o, %o) - %o",t,i,f,this);var b,k,d,w,a,h,l,g=this.options,c=g.dnd,y=this._makeHookContext(i,e,{otherNode:f,ui:o,draggable:s}),v=null,p=n(i.span);switch(t){case"helper":b=n("<div class='fancytree-drag-helper'><span class='fancytree-drag-helper-img' /><\/div>").append(p.find("span.fancytree-title").clone());n("ul.fancytree-container",i.tree.$div).append(b);b.data("ftSourceNode",i);v=b;break;case"start":i.isStatusNode()?v=!1:c.dragStart&&(v=c.dragStart(i,y));v===!1?(this.debug("tree.dragStart() cancelled"),o.helper.trigger("mouseup"),o.helper.hide()):p.addClass("fancytree-drag-source");break;case"enter":l=c.preventRecursiveMoves&&i.isDescendantOf(f)?!1:c.dragEnter?c.dragEnter(i,y):null;v=l?n.isArray(l)?{over:n.inArray("over",l)>=0,before:n.inArray("before",l)>=0,after:n.inArray("after",l)>=0}:{over:l===!0||l==="over",before:l===!0||l==="before",after:l===!0||l==="after"}:!1;o.helper.data("enterResponse",v);u("helper.enterResponse: %o",v);break;case"over":a=o.helper.data("enterResponse");h=null;a===!1||(typeof a=="string"?h=a:(k=p.offset(),d={x:e.pageX-k.left,y:e.pageY-k.top},w={x:d.x/p.width(),y:d.y/p.height()},a.after&&w.y>.75?h="after":!a.over&&a.after&&w.y>.5?h="after":a.before&&w.y<=.25?h="before":!a.over&&a.before&&w.y<=.5?h="before":a.over&&(h="over"),c.preventVoidMoves&&(i===f?(u("    drop over source node prevented"),h=null):h==="before"&&f&&i===f.getNextSibling()?(u("    drop after source node prevented"),h=null):h==="after"&&f&&i===f.getPrevSibling()?(u("    drop before source node prevented"),h=null):h==="over"&&f&&f.parent===i&&f.isLastSibling()&&(u("    drop last child over own parent prevented"),h=null)),o.helper.data("hitMode",h)));h==="over"&&c.autoExpandMS&&i.hasChildren()!==!1&&!i.expanded&&i.scheduleAction("expand",c.autoExpandMS);h&&c.dragOver&&(y.hitMode=h,v=c.dragOver(i,y));this._local._setDndStatus(f,i,o.helper,h,v!==!1&&h!==null);break;case"drop":h=o.helper.data("hitMode");h&&c.dragDrop&&(y.hitMode=h,c.dragDrop(i,y));break;case"leave":i.scheduleAction("cancel");o.helper.data("enterResponse",null);o.helper.data("hitMode",null);this._local._setDndStatus(f,i,o.helper,"out",r);c.dragLeave&&c.dragLeave(i,y);break;case"stop":p.removeClass("fancytree-drag-source");c.dragStop&&c.dragStop(i,y);break;default:n.error("Unsupported drag event: "+t)}return v},_cancelDrag:function(){var t=n.ui.ddmanager.current;t&&t.cancel()}})}(jQuery,window,document),function(n,t,i){"use strict";var r=/Mac/.test(navigator.platform),u=n.ui.fancytree.escapeHtml,f=n.ui.fancytree.unescapeHtml;n.ui.fancytree._FancytreeNodeClass.prototype.editStart=function(){var r,t=this,e=this.tree,s=e.ext.edit,h=t.title,u=e.options.edit,c=n(".fancytree-title",t.span),o={node:t,tree:e,options:e.options};if(u.beforeEdit.call(t,{type:"beforeEdit"},o)===!1)return!1;h=t.title;t.debug("editStart");e.widget._unbind();n(i).on("mousedown.fancytree-edit",function(i){n(i.target).hasClass("fancytree-edit-input")||t.editEnd(!0,i)});r=n("<input />",{"class":"fancytree-edit-input",value:f(h)});u.adjustWidthOfs!=null&&r.width(c.width()+u.adjustWidthOfs);u.inputCss!=null&&r.css(u.inputCss);o.input=r;c.html(r);n.ui.fancytree.assert(!s.currentNode,"recursive edit");s.currentNode=this;r.focus().change(function(){r.addClass("fancytree-edit-dirty")}).keydown(function(i){switch(i.which){case n.ui.keyCode.ESCAPE:t.editEnd(!1,i);break;case n.ui.keyCode.ENTER:return t.editEnd(!0,i),!1}}).blur(function(n){return t.editEnd(!0,n)});u.edit.call(t,{type:"edit"},o)};n.ui.fancytree._FancytreeNodeClass.prototype.editEnd=function(t,r){var f=this,e=this.tree,v=e.ext.edit,h=e.options.edit,y=n(".fancytree-title",f.span),o=y.find("input.fancytree-edit-input"),c=o.val(),a=o.hasClass("fancytree-edit-dirty"),l=(t||a&&t!==!1)&&c!==f.title,s={node:f,tree:e,options:e.options,originalEvent:r,dirty:a,save:l,input:o,value:c};return h.beforeClose.call(f,{type:"beforeClose"},s)===!1?!1:l&&h.save.call(f,{type:"save"},s)===!1?!1:(o.removeClass("fancytree-edit-dirty").unbind(),n(i).off(".fancytree-edit"),l?f.setTitle(u(c)):f.renderTitle(),e.widget._bind(),v.currentNode=null,f.setFocus(),n(e.$container).focus(),s.input=null,h.close.call(f,{type:"close"},s),!0)};n.ui.fancytree._FancytreeNodeClass.prototype.startEdit=function(){return this.warn("FancytreeNode.startEdit() is deprecated since 2014-01-04. Use .editStart() instead."),this.editStart.apply(this,arguments)};n.ui.fancytree._FancytreeNodeClass.prototype.endEdit=function(){return this.warn("FancytreeNode.endEdit() is deprecated since 2014-01-04. Use .editEnd() instead."),this.editEnd.apply(this,arguments)};n.ui.fancytree._FancytreeClass.prototype.isEditing=function(){return this.ext.edit.currentNode};n.ui.fancytree._FancytreeNodeClass.prototype.isEditing=function(){return this.tree.ext.edit.currentNode===this};n.ui.fancytree.registerExtension({name:"edit",version:"0.1.0",options:{adjustWidthOfs:4,inputCss:{minWidth:"3em"},triggerCancel:["esc","tab","click"],triggerStart:["f2","shift+click","mac+enter"],beforeClose:n.noop,beforeEdit:n.noop,close:n.noop,edit:n.noop,save:n.noop},currentNode:null,treeInit:function(n){this._super(n);this.$container.addClass("fancytree-ext-edit")},nodeClick:function(t){return n.inArray("shift+click",t.options.edit.triggerStart)>=0&&t.originalEvent.shiftKey?(t.node.editStart(),!1):this._super(t)},nodeDblclick:function(t){return n.inArray("dblclick",t.options.edit.triggerStart)>=0?(t.node.editStart(),!1):this._super(t)},nodeKeydown:function(t){switch(t.originalEvent.which){case 113:if(n.inArray("f2",t.options.edit.triggerStart)>=0)return t.node.editStart(),!1;break;case n.ui.keyCode.ENTER:if(n.inArray("mac+enter",t.options.edit.triggerStart)>=0&&r)return t.node.editStart(),!1}return this._super(t)}})}(jQuery,window,document),function(n){"use strict";function t(n){return(n+"").replace(/([.?*+\^\$\[\]\\(){}|-])/g,"\\$1")}n.ui.fancytree._FancytreeClass.prototype.applyFilter=function(n){var i,r,u=0,f=this.options.filter.mode==="hide",e=this.options.filter.leavesOnly;return typeof n=="string"&&(i=t(n),r=new RegExp(".*"+i+".*","i"),n=function(n){return!!r.exec(n.title)}),this.enableFilter=!0,this.$div.addClass("fancytree-ext-filter"),f?this.$div.addClass("fancytree-ext-filter-hide"):this.$div.addClass("fancytree-ext-filter-dimm"),this.visit(function(n){delete n.match;delete n.subMatch}),this.visit(function(t){(!e||t.children==null)&&n(t)&&(u++,t.match=!0,t.visitParents(function(n){n.subMatch=!0}))}),this.render(),u};n.ui.fancytree._FancytreeClass.prototype.clearFilter=function(){this.visit(function(n){delete n.match;delete n.subMatch});this.enableFilter=!1;this.$div.removeClass("fancytree-ext-filter fancytree-ext-filter-dimm fancytree-ext-filter-hide");this.render()};n.ui.fancytree.registerExtension({name:"filter",version:"0.1.0",options:{mode:"dimm",leavesOnly:!1},treeInit:function(n){this._super(n)},nodeRenderStatus:function(t){var r,i=t.node,u=t.tree,f=n(i[u.statusClassPropName]);return(r=this._super(t),!f.length||!u.enableFilter)?r:(f.toggleClass("fancytree-match",!!i.match).toggleClass("fancytree-submatch",!!i.subMatch).toggleClass("fancytree-hide",!(i.match||i.subMatch)),r)}})}(jQuery,window,document),function(n){"use strict";function t(n,t){return n.map[t]}n.ui.fancytree.registerExtension({name:"glyph",version:"0.1.0",options:{prefix:"icon-",extra:null,map:{doc:"icon-file-alt",docOpen:"icon-file-alt",checkbox:"icon-check-empty",checkboxSelected:"icon-check",checkboxUnknown:"icon-check icon-muted",error:"icon-exclamation-sign",expanderClosed:"icon-caret-right",expanderLazy:"icon-angle-right",expanderOpen:"icon-caret-down",folder:"icon-folder-close-alt",folderOpen:"icon-folder-open-alt",loading:"icon-refresh icon-spin",noExpander:""},icon:null},treeInit:function(n){var t=n.tree;this._super(n);t.$container.addClass("fancytree-ext-glyph")},nodeRenderStatus:function(i){var f,u,r=i.node,e=i.options.glyph,o=e.map;(this._super(i),r.isRoot())||(u=n("span.fancytree-expander",r.span).get(0),u&&(f=r.isLoading()?"loading":r.expanded?"expanderOpen":r.isUndefined()?"expanderLazy":r.hasChildren()?"expanderClosed":"noExpander",u.className="fancytree-expander "+o[f]),u=n("span.fancytree-checkbox",r.tr||r.span).get(0),u&&(f=r.selected?"checkboxSelected":r.partsel?"checkboxUnknown":"checkbox",u.className="fancytree-checkbox "+o[f]),u=n("span.fancytree-icon",r.span).get(0),u&&(f=r.folder?r.expanded?t(e,"folderOpen"):t(e,"folder"):r.expanded?t(e,"docOpen"):t(e,"doc"),u.className="fancytree-icon "+f))},nodeSetStatus:function(i,r,u,f){var e,s=i.options.glyph,o=i.node;this._super(i,r,u,f);e=o.parent?n("span.fancytree-expander",o.span).get(0):n(".fancytree-statusnode-wait, .fancytree-statusnode-error",o[this.nodeContainerAttrName]).find("span.fancytree-expander").get(0);r==="loading"?e.className="fancytree-expander "+t(s,"loading"):r==="error"&&(e.className="fancytree-expander "+t(s,"error"))}})}(jQuery,window,document),function(n){"use strict";function r(t,i){var r,f=i.get(0),u=0;return t.children().each(function(){if(this===f)return!1;r=n(this).prop("colspan");u+=r?r:1}),u}function u(t,i){var r,u=null,f=0;return t.children().each(function(){if(f>=i)return u=n(this),!1;r=n(this).prop("colspan");f+=r?r:1}),u}function f(n,i){var f,s,o=n.closest("td"),e=null;switch(i){case t.LEFT:e=o.prev();break;case t.RIGHT:e=o.next();break;case t.UP:case t.DOWN:for(f=o.parent(),s=r(f,o);;){if(f=i===t.UP?f.prev():f.next(),!f.length)break;if(!f.is(":hidden")&&(e=u(f,s),e&&e.find(":input").length))break}}return e}var t=n.ui.keyCode,i={text:[t.UP,t.DOWN],checkbox:[t.UP,t.DOWN,t.LEFT,t.RIGHT],radiobutton:[t.UP,t.DOWN,t.LEFT,t.RIGHT],"select-one":[t.LEFT,t.RIGHT],"select-multiple":[t.LEFT,t.RIGHT]};n.ui.fancytree.registerExtension({name:"gridnav",version:"0.0.1",options:{autofocusInput:!1,handleCursorKeys:!0},treeInit:function(t){this._requireExtension("table",!0,!0);this._super(t);this.$container.addClass("fancytree-ext-gridnav");this.$container.on("focusin",function(i){var u,r=n.ui.fancytree.getNode(i.target);r&&!r.isActive()&&(u=t.tree._makeHookContext(r,i),t.tree._callHook("nodeSetActive",u,!0))})},nodeSetActive:function(t,i){var u,e=t.options.gridnav,r=t.node,o=t.originalEvent||{},f=n(o.target).is(":input");i=i!==!1;this._super(t,i);i&&(t.options.titlesTabbable?(f||(n(r.span).find("span.fancytree-title").focus(),r.setFocus()),t.tree.$container.attr("tabindex","-1")):e.autofocusInput&&!f&&(u=n(r.tr||r.span),u.find(":input:enabled:first").focus()))},nodeKeydown:function(t){var r,o,u,h=t.options.gridnav,e=t.originalEvent,s=n(e.target);return(r=s.is(":input:enabled")?s.prop("type"):null,r&&h.handleCursorKeys)?(o=i[r],o&&n.inArray(e.which,o)>=0&&(u=f(s,e.which),u&&u.length))?(u.find(":input:enabled").focus(),!1):!0:(t.tree.debug("ext-gridnav NOT HANDLED",e,r),this._super(t))}})}(jQuery,window,document),function(n,t,i,r){"use strict";function h(t,i){i=i||"";t||n.error("Assertion failed "+i)}function s(t,i,r,f,e){var o,l,a,h,y=!1,v=[],c=[];for(r=r||[],e=e||n.Deferred(),o=0,a=r.length;o<a;o++)l=r[o],h=t.getNodeByKey(l),h?f&&h.isUndefined()?(y=!0,t.debug("_loadLazyNodes: "+h+" is lazy: loading..."),f==="expand"?v.push(h.setExpanded()):v.push(h.load())):(t.debug("_loadLazyNodes: "+h+" already loaded."),h.setExpanded()):(c.push(l),t.debug("_loadLazyNodes: "+h+" was not yet found."));return n.when.apply(n,v).always(function(){if(y&&c.length>0)s(t,i,c,f,e);else{if(c.length)for(t.warn("_loadLazyNodes: could not load those keys: ",c),o=0,a=c.length;o<a;o++)l=r[o],i._setKey(u,r[o],!1);e.resolve()}}),e}var e="active",u="expanded",o="focus",f="selected";n.ui.fancytree._FancytreeClass.prototype.clearCookies=function(t){var r=this.ext.persist,i=r.cookiePrefix;t=t||"active expanded focus selected";t.indexOf(e)>=0&&n.removeCookie(i+e);t.indexOf(u)>=0&&n.removeCookie(i+u);t.indexOf(o)>=0&&n.removeCookie(i+o);t.indexOf(f)>=0&&n.removeCookie(i+f)};n.ui.fancytree._FancytreeClass.prototype.getPersistData=function(){var i=this.ext.persist,s=this.options.persist,r=s.cookieDelimiter,t={};return t[e]=n.cookie(i.cookiePrefix+e),t[u]=(n.cookie(i.cookiePrefix+u)||"").split(r),t[f]=(n.cookie(i.cookiePrefix+f)||"").split(r),t[o]=n.cookie(i.cookiePrefix+o),t};n.ui.fancytree.registerExtension({name:"persist",version:"0.2.0",options:{cookieDelimiter:"~",cookiePrefix:r,cookie:{raw:!1,expires:"",path:"",domain:"",secure:!1},expandLazy:!1,overrideSource:!1,types:"active expanded focus selected"},_setKey:function(t,i,r){i=""+i;var h=this._local,f=this.options.persist,e=h.cookiePrefix+t,o=n.cookie(e),u=o?o.split(f.cookieDelimiter):[],s=n.inArray(i,u);s>=0&&u.splice(s,1);r&&u.push(i);n.cookie(e,u.join(f.cookieDelimiter),f.cookie)},treeInit:function(t){var a=t.tree,v=t.options,c=this._local,l=this.options.persist;return h(n.cookie,"Missing required plugin for 'persist' extension: jquery.cookie.js"),c.cookiePrefix=l.cookiePrefix||"fancytree-"+a._id+"-",c.storeActive=l.types.indexOf(e)>=0,c.storeExpanded=l.types.indexOf(u)>=0,c.storeSelected=l.types.indexOf(f)>=0,c.storeFocus=l.types.indexOf(o)>=0,a.$div.bind("fancytreeinit",function(){var h,w,p,y,t,b=n.cookie(c.cookiePrefix+o);a.debug("COOKIE "+i.cookie);h=n.cookie(c.cookiePrefix+u);y=h&&h.split(l.cookieDelimiter);w=c.storeExpanded?s(a,c,y,l.expandLazy?"expand":!1,null):(new n.Deferred).resolve();w.done(function(){if(c.storeSelected&&(h=n.cookie(c.cookiePrefix+f),h))for(y=h.split(l.cookieDelimiter),p=0;p<y.length;p++)t=a.getNodeByKey(y[p]),t?(t.selected===r||l.overrideSource&&t.selected===!1)&&(t.selected=!0,t.renderStatus()):c._setKey(f,y[p],!1);c.storeActive&&(h=n.cookie(c.cookiePrefix+e),h&&(v.persist.overrideSource||!a.activeNode)&&(t=a.getNodeByKey(h),t&&t.setActive()));c.storeFocus&&b&&(t=a.getNodeByKey(b),t&&t.setFocus())})}),this._super(t)},nodeSetActive:function(t,i,r){var u,f=this._local,o=this.options.persist;return i=i!==!1,u=this._super(t,i,r),f.storeActive&&n.cookie(f.cookiePrefix+e,this.activeNode?this.activeNode.key:null,o.cookie),u},nodeSetExpanded:function(n,t,i){var r,e=n.node,f=this._local;return t=t!==!1,r=this._super(n,t,i),f.storeExpanded&&f._setKey(u,e.key,t),r},nodeSetFocus:function(t,i){var r,u=this._local,f=this.options.persist;return i=i!==!1,r=this._super(t,i),i&&u.storeFocus&&n.cookie(u.cookiePrefix+o,this.focusNode?this.focusNode.key:null,f.cookie),r},nodeSetSelected:function(n,t){var i,u=n.node,r=this._local;return t=t!==!1,i=this._super(n,t),r.storeSelected&&r._setKey(f,u.key,t),i}})}(jQuery,window,document),function(n,t,i){"use strict";function r(t,i){i=i||"";t||n.error("Assertion failed "+i)}function f(n,t){n.parentNode.insertBefore(t,n.nextSibling)}function u(n,t){n.visit(function(n){var i=n.tr;return i&&(i.style.display=n.hide||!t?"none":""),n.expanded?void 0:"skip"})}function e(t){var o,f,i,e=t.parent,u=e?e.children:null;if(u&&u.length>1&&u[0]!==t)for(o=n.inArray(t,u),i=u[o-1],r(i.tr);i.children;){if(f=i.children[i.children.length-1],!f.tr)break;i=f}else i=e;return i}n.ui.fancytree.registerExtension({name:"table",version:"0.2.0",options:{checkboxColumnIdx:null,customStatus:!1,indentation:16,nodeColumnIdx:0},treeInit:function(t){var f,u,e,r=t.tree,o=r.widget.element;for(o.addClass("fancytree-container fancytree-ext-table"),r.tbody=o.find("> tbody")[0],r.columnCount=n("thead >tr >th",o).length,n(r.tbody).empty(),r.rowFragment=i.createDocumentFragment(),u=n("<tr />"),e="",t.options.aria&&(u.attr("role","row"),e=" role='gridcell'"),f=0;f<r.columnCount;f++)t.options.table.nodeColumnIdx===f?u.append("<td"+e+"><span class='fancytree-node' /><\/td>"):u.append("<td"+e+" />");r.rowFragment.appendChild(u.get(0));r.statusClassPropName="tr";r.ariaPropName="tr";this.nodeContainerAttrName="tr";this._super(t);n(r.rootNode.ul).remove();r.rootNode.ul=null;r.$container=o;this.$container.attr("tabindex",this.options.tabbable?"0":"-1");this.options.aria&&r.$container.attr("role","treegrid").attr("aria-readonly",!0)},nodeRemoveChildMarkup:function(t){var i=t.node;i.visit(function(t){t.tr&&(n(t.tr).remove(),t.tr=null)})},nodeRemoveMarkup:function(t){var i=t.node;i.tr&&(n(i.tr).remove(),i.tr=null);this.nodeRemoveChildMarkup(t)},nodeRender:function(t,i,o,s,h){var y,d,b,g,a,p,w,k,v=t.tree,c=t.node,l=t.options,nt=!c.parent;if(h||(t.hasCollapsedParents=c.parent&&!c.parent.expanded),!nt)if(c.tr)i?this.nodeRenderTitle(t):this.nodeRenderStatus(t);else{if(t.hasCollapsedParents){c.debug("nodeRender ignored due to unrendered parent");return}a=v.rowFragment.firstChild.cloneNode(!0);p=e(c);r(p);s===!0&&h?a.style.display="none":o&&t.hasCollapsedParents&&(a.style.display="none");p.tr?f(p.tr,a):(r(!p.parent,"prev. row must have a tr, or is system root"),v.tbody.appendChild(a));c.tr=a;c.key&&l.generateIds&&(c.tr.id=l.idPrefix+c.key);c.tr.ftnode=c;l.aria&&n(c.tr).attr("aria-labelledby","ftal_"+c.key);c.span=n("span.fancytree-node",c.tr).get(0);this.nodeRenderTitle(t);l.createNode&&l.createNode.call(v,{type:"createNode"},t)}if(l.renderNode&&l.renderNode.call(v,{type:"renderNode"},t),y=c.children,y&&(nt||o||c.expanded))for(b=0,g=y.length;b<g;b++)k=n.extend({},t,{node:y[b]}),k.hasCollapsedParents=k.hasCollapsedParents||!c.expanded,this.nodeRender(k,i,o,s,!0);y&&!h&&(w=c.tr||null,d=v.tbody.firstChild,c.visit(function(n){if(n.tr){if(n.parent.expanded||n.tr.style.display==="none"||(n.tr.style.display="none",u(n,!1)),n.tr.previousSibling!==w){c.debug("_fixOrder: mismatch at node: "+n);var t=w?w.nextSibling:d;v.tbody.insertBefore(n.tr,t)}w=n.tr}}))},nodeRenderTitle:function(t){var u,r=t.node,i=t.options;this._super(t);i.checkbox&&i.table.checkboxColumnIdx!=null&&(u=n("span.fancytree-checkbox",r.span).detach(),n(r.tr).find("td:first").html(u));r.isRoot()||this.nodeRenderStatus(t);!i.table.customStatus&&r.isStatusNode()||i.renderColumns&&i.renderColumns.call(t.tree,{type:"renderColumns"},t)},nodeRenderStatus:function(t){var r,i=t.node,u=t.options;this._super(t);n(i.tr).removeClass("fancytree-node");r=(i.getLevel()-1)*u.table.indentation;n(i.span).css({marginLeft:r+"px"})},nodeSetExpanded:function(t,i,r){function e(n){i=i!==!1;u(t.node,i);o.noEvents||t.tree._triggerNodeEvent(i?"expand":"collapse",t);n?f.resolveWith(t.node):f.rejectWith(t.node)}var f=new n.Deferred,o=r||{};return r=n.extend({},r,{noEvents:!0,noAnimation:!0}),this._super(t,i,r).done(function(){e(!0)}).fail(function(){e(!1)}),f.promise()},nodeSetStatus:function(t,i,r,u){if(i==="ok"){var e=t.node,f=e.children?e.children[0]:null;f&&f.isStatusNode()&&n(f.tr).remove()}this._super(t,i,r,u)},treeClear:function(n){return this.nodeRemoveChildMarkup(this._makeHookContext(this.rootNode)),this._super(n)}})}(jQuery,window,document),function(n){"use strict";n.ui.fancytree.registerExtension({name:"themeroller",version:"0.0.1",options:{activeClass:"ui-state-active",foccusClass:"ui-state-focus",hoverClass:"ui-state-hover",selectedClass:"ui-state-highlight"},treeInit:function(t){this._super(t);var i=t.widget.element;i[0].nodeName==="TABLE"?(i.addClass("ui-widget ui-corner-all"),i.find(">thead tr").addClass("ui-widget-header"),i.find(">tbody").addClass("ui-widget-conent")):i.addClass("ui-widget ui-widget-content ui-corner-all");i.delegate(".fancytree-node","mouseenter mouseleave",function(t){var i=n.ui.fancytree.getNode(t.target),r=t.type==="mouseenter";i.debug("hover: "+r);n(i.span).toggleClass("ui-state-hover ui-corner-all",r)})},treeDestroy:function(n){this._super(n);n.widget.element.removeClass("ui-widget ui-widget-content ui-corner-all")},nodeRenderStatus:function(t){var i=t.node,r=n(i.span);this._super(t);r.toggleClass("ui-state-active",i.isActive());r.toggleClass("ui-state-focus",i.hasFocus());r.toggleClass("ui-state-highlight",i.isSelected())}})}(jQuery,window,document),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher");}(jQuery);+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(void 0!==i.style[t])return{end:n[t]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t();n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery);+function(n){"use strict";function u(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})}var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.3.5";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){r.detach().trigger("closed.bs.alert").remove()}var f=n(this),u=f.attr("data-target"),r;u||(u=f.attr("href"),u=u&&u.replace(/.*(?=#[^\s]*$)/,""));r=n(u);i&&i.preventDefault();r.length||(r=f.closest(".alert"));r.trigger(i=n.Event("close.bs.alert"));i.isDefaultPrevented()||(r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=u;n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.3.5";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var r="disabled",i=this.$element,f=i.is("input")?"val":"html",u=i.data();t+="Text";null==u.resetText&&i.data("resetText",i[f]());setTimeout(n.proxy(function(){i[f](null==u[t]?this.options[t]:u[t]);"loadingText"==t?(this.isLoading=!0,i.addClass(r).attr(r,r)):this.isLoading&&(this.isLoading=!1,i.removeClass(r).removeAttr(r))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length?(n=this.$element.find("input"),"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),i.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target);r.hasClass("btn")||(r=r.closest(".btn"));i.call(r,"toggle");n(t.target).is('input[type="radio"]')||n(t.target).is('input[type="checkbox"]')||t.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){n(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.3.5";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};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};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),f="prev"==n&&0===i||"next"==n&&i==this.$items.length-1,r,u;return f&&!this.options.wrap?t:(r="prev"==n?-1:1,u=(i+r)%this.$items.length,this.$items.eq(u))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1)&&!(0>n))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(n>t?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f="next"==i?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),(this.$element.trigger(s),!s.isDefaultPrevented())?((this.sliding=!0,l&&this.pause(),this.$indicators.length)&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this):void 0)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var o,r=n(this),u=n(r.attr("data-target")||(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,"")),e,f;u.hasClass("carousel")&&(e=n.extend({},u.data(),r.data()),f=r.attr("data-slide-to"),f&&(e.interval=!1),i.call(u,e),f&&u.data("bs.carousel").to(f),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.3.5";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!(r&&r.length&&(f=r.data("bs.collapse"),f&&f.transitioning))&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented()))){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented()))return i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},n.support.transition?void this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION):u.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this);u.attr("data-target")||t.preventDefault();var f=r(u),e=f.data("bs.collapse"),o=e?"toggle":u.data();i.call(f,o)})}(jQuery);+function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}function u(t){t&&3===t.which||(n(o).remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&"click"==t.type&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented()||(u.attr("aria-expanded","false"),i.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function e(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.3.5";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger("shown.bs.dropdown",e)}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(i).trigger("focus"),e.trigger("click");h=" li:not(.disabled):visible a";f=o.find(".dropdown-menu"+h);f.length&&(u=f.index(t.target),38==t.which&&u>0&&u--,40==t.which&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=e;n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery);+function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.3.5";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(u);this.isShown||u.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)}))};t.prototype.hide=function(i){i&&i.preventDefault();i=n.Event("hide.bs.modal");this.$element.trigger(i);this.isShown&&!i.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){this.isShown?n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this)):n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){if(r=n.support.transition&&f,this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var n=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";this.bodyIsOverflowing&&this.$body.css("padding-right",n+this.scrollbarWidth)};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),u=n(r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,"")),e=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){n.isDefaultPrevented()||u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,e,this)})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},i;t.VERSION="3.3.5";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",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()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusin"==t.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusout"==t.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i="bottom"==i&&f.bottom+s>e.bottom?"top":"top"==i&&f.top-s<e.top?"bottom":"right"==i&&f.right+o>e.width?"left":"left"==i&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;"out"==n&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?2*u.left-l+h:2*u.top-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.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")};t.prototype.hide=function(i){function f(){"in"!=u.hoverState&&r.detach();u.$element.removeAttr("aria-describedby").trigger("hidden.bs."+u.type);i&&i()}var u=this,r=n(this.$tip),e=n.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",f).emulateTransitionEnd(t.TRANSITION_DURATION):f(),this.hoverState=null,this)};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var u=t[0],r="BODY"==u.tagName,i=u.getBoundingClientRect();null==i.width&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=r?{top:0,left:0}:t.offset(),e={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},o=r?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,e,o,f)};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(1e6*Math.random());while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null})};i=n.fn.tooltip;n.fn.tooltip=r;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.5";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof t?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){this.$body=n(document.body);this.$scrollElement=n(n(i).is(document.body)?window:i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this));this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})}t.VERSION="3.3.5";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(this.scrollHeight!=f&&this.refresh(),i>=e)return u!=(n=r[r.length-1])&&this.activate(n);if(u&&i<t[0])return this.activeTarget=null,this.clear();for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(void 0===t[n+1]||i<t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;this.clear();var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};t.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.3.5";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);o?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),o=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&o?f.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$target=n(this.options.target).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.3.5";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getState=function(n,t,i,r){var u=this.$target.scrollTop(),f=this.$element.offset(),e=this.$target.height();if(null!=i&&"top"==this.affixed)return i>u?"top":!1;if("bottom"==this.affixed)return null!=i?u+this.unpin<=f.top?!1:"bottom":n-r>=u+e?!1:"bottom";var o=null==this.affixed,s=o?u:f.top,h=o?e:t;return null!=i&&i>=u?"top":null!=r&&s+h>=n-r?"bottom":!1};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,o;if(this.$element.is(":visible")){var s=this.$element.height(),r=this.options.offset,f=r.top,u=r.bottom,h=Math.max(n(document).height(),n(document.body).height());if("object"!=typeof r&&(u=f=r),"function"==typeof f&&(f=r.top(this.$element)),"function"==typeof u&&(u=r.bottom(this.$element)),i=this.getState(h,s,f,u),this.affixed!=i){if(null!=this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),o=n.Event(e+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented())return;this.affixed=i;this.unpin="bottom"==i?this.getPinnedOffset():null;this.$element.removeClass(t.RESET).addClass(e).trigger(e.replace("affix","affixed")+".bs.affix")}"bottom"==i&&this.$element.offset({top:h-s-u})}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};null!=t.offsetBottom&&(t.offset.bottom=t.offsetBottom);null!=t.offsetTop&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery),function(){function k(){var n="{}";if("userDataBehavior"==r){t.load("jStorage");try{n=t.getAttribute("jStorage")}catch(u){}try{s=t.getAttribute("jStorage_update")}catch(f){}i.jStorage=n}d();v();g()}function c(){var u;clearTimeout(nt);nt=setTimeout(function(){var h,c,e,l,a;if("localStorage"==r||"globalStorage"==r)u=i.jStorage_update;else if("userDataBehavior"==r){t.load("jStorage");try{u=t.getAttribute("jStorage_update")}catch(v){}}if(u&&u!=s){s=u;h=f.parse(f.stringify(n.__jstorage_meta.CRC32));k();c=f.parse(f.stringify(n.__jstorage_meta.CRC32));l=[];a=[];for(e in h)h.hasOwnProperty(e)&&(c[e]?h[e]!=c[e]&&"2."==String(h[e]).substr(0,2)&&l.push(e):a.push(e));for(e in c)c.hasOwnProperty(e)&&(h[e]||l.push(e));o(l,"updated");o(a,"deleted")}},25)}function o(n,t){n=[].concat(n||[]);var i,r,e,f;if("flushed"==t){n=[];for(i in u)u.hasOwnProperty(i)&&n.push(i);t="deleted"}for(i=0,e=n.length;i<e;i++){if(u[n[i]])for(r=0,f=u[n[i]].length;r<f;r++)u[n[i]][r](n[i],t);if(u["*"])for(r=0,f=u["*"].length;r<f;r++)u["*"][r](n[i],t)}}function l(){var n=(+new Date).toString();if("localStorage"==r||"globalStorage"==r)try{i.jStorage_update=n}catch(u){r=!1}else"userDataBehavior"==r&&(t.setAttribute("jStorage_update",n),t.save("jStorage"));c()}function d(){if(i.jStorage)try{n=f.parse(String(i.jStorage))}catch(t){i.jStorage="{}"}else i.jStorage="{}";p=i.jStorage?String(i.jStorage).length:0;n.__jstorage_meta||(n.__jstorage_meta={});n.__jstorage_meta.CRC32||(n.__jstorage_meta.CRC32={})}function a(){if(n.__jstorage_meta.PubSub){for(var u=+new Date-2e3,r=0,e=n.__jstorage_meta.PubSub.length;r<e;r++)if(n.__jstorage_meta.PubSub[r][0]<=u){n.__jstorage_meta.PubSub.splice(r,n.__jstorage_meta.PubSub.length-r);break}n.__jstorage_meta.PubSub.length||delete n.__jstorage_meta.PubSub}try{i.jStorage=f.stringify(n);t&&(t.setAttribute("jStorage",i.jStorage),t.save("jStorage"));p=i.jStorage?String(i.jStorage).length:0}catch(o){}}function e(n){if("string"!=typeof n&&"number"!=typeof n)throw new TypeError("Key name must be string or numeric");if("__jstorage_meta"==n)throw new TypeError("Reserved key name");return!0}function v(){var u,t,i,f,r=Infinity,e=!1,s=[];if(clearTimeout(tt),n.__jstorage_meta&&"object"==typeof n.__jstorage_meta.TTL){u=+new Date;i=n.__jstorage_meta.TTL;f=n.__jstorage_meta.CRC32;for(t in i)i.hasOwnProperty(t)&&(i[t]<=u?(delete i[t],delete f[t],delete n[t],e=!0,s.push(t)):i[t]<r&&(r=i[t]));Infinity!=r&&(tt=setTimeout(v,Math.min(r-u,2147483647)));e&&(a(),l(),o(s,"deleted"))}}function g(){var t,i,e,r,o,u,s;if(n.__jstorage_meta.PubSub){for(e=w,r=[],t=n.__jstorage_meta.PubSub.length-1;0<=t;t--)i=n.__jstorage_meta.PubSub[t],i[0]>w&&(e=i[0],r.unshift(i));for(t=r.length-1;0<=t;t--)if(i=r[t][1],o=r[t][2],h[i])for(u=0,s=h[i].length;u<s;u++)try{h[i][u](i,f.parse(f.stringify(o)))}catch(c){}w=e}}var y=window.jQuery||window.$||(window.$={}),f={parse:window.JSON&&(window.JSON.parse||window.JSON.decode)||String.prototype.evalJSON&&function(n){return String(n).evalJSON()}||y.parseJSON||y.evalJSON,stringify:Object.toJSON||window.JSON&&(window.JSON.stringify||window.JSON.encode)||y.toJSON};if("function"!=typeof f.parse||"function"!=typeof f.stringify)throw Error("No JSON support found, include //cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js to page");var n={__jstorage_meta:{CRC32:{}}},i={jStorage:"{}"},t=null,p=0,r=!1,u={},nt=!1,s=0,h={},w=+new Date,tt,b={isXML:function(n){return(n=(n?n.ownerDocument||n:0).documentElement)?"HTML"!==n.nodeName:!1},encode:function(n){if(!this.isXML(n))return!1;try{return(new XMLSerializer).serializeToString(n)}catch(t){try{return n.xml}catch(i){}}return!1},decode:function(n){var t="DOMParser"in window&&(new DOMParser).parseFromString||window.ActiveXObject&&function(n){var t=new ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(n),t};return t?(n=t.call("DOMParser"in window&&new DOMParser||window,n,"text/xml"),this.isXML(n)?n:!1):!1}};y.jStorage={version:"0.4.12",set:function(t,i,r){if(e(t),r=r||{},"undefined"==typeof i)return this.deleteKey(t),i;if(b.isXML(i))i={_is_xml:!0,xml:b.encode(i)};else{if("function"==typeof i)return;i&&"object"==typeof i&&(i=f.parse(f.stringify(i)))}n[t]=i;for(var a=n.__jstorage_meta.CRC32,h=f.stringify(i),l=h.length,u=2538058380^l,c=0,s;4<=l;)s=h.charCodeAt(c)&255|(h.charCodeAt(++c)&255)<<8|(h.charCodeAt(++c)&255)<<16|(h.charCodeAt(++c)&255)<<24,s=1540483477*(s&65535)+((1540483477*(s>>>16)&65535)<<16),s^=s>>>24,s=1540483477*(s&65535)+((1540483477*(s>>>16)&65535)<<16),u=1540483477*(u&65535)+((1540483477*(u>>>16)&65535)<<16)^s,l-=4,++c;switch(l){case 3:u^=(h.charCodeAt(c+2)&255)<<16;case 2:u^=(h.charCodeAt(c+1)&255)<<8;case 1:u^=h.charCodeAt(c)&255;u=1540483477*(u&65535)+((1540483477*(u>>>16)&65535)<<16)}return u^=u>>>13,u=1540483477*(u&65535)+((1540483477*(u>>>16)&65535)<<16),a[t]="2."+((u^u>>>15)>>>0),this.setTTL(t,r.TTL||0),o(t,"updated"),i},get:function(t,i){return e(t),t in n?n[t]&&"object"==typeof n[t]&&n[t]._is_xml?b.decode(n[t].xml):n[t]:"undefined"==typeof i?null:i},deleteKey:function(t){return e(t),t in n?(delete n[t],"object"==typeof n.__jstorage_meta.TTL&&t in n.__jstorage_meta.TTL&&delete n.__jstorage_meta.TTL[t],delete n.__jstorage_meta.CRC32[t],a(),l(),o(t,"deleted"),!0):!1},setTTL:function(t,i){var r=+new Date;return e(t),i=Number(i)||0,t in n?(n.__jstorage_meta.TTL||(n.__jstorage_meta.TTL={}),0<i?n.__jstorage_meta.TTL[t]=r+i:delete n.__jstorage_meta.TTL[t],a(),v(),l(),!0):!1},getTTL:function(t){var i=+new Date;return e(t),t in n&&n.__jstorage_meta.TTL&&n.__jstorage_meta.TTL[t]?(t=n.__jstorage_meta.TTL[t]-i)||0:0},flush:function(){return n={__jstorage_meta:{CRC32:{}}},a(),l(),o(null,"flushed"),!0},storageObj:function(){function t(){}return t.prototype=n,new t},index:function(){var i=[];for(var t in n)n.hasOwnProperty(t)&&"__jstorage_meta"!=t&&i.push(t);return i},storageSize:function(){return p},currentBackend:function(){return r},storageAvailable:function(){return!!r},listenKeyChange:function(n,t){e(n);u[n]||(u[n]=[]);u[n].push(t)},stopListening:function(n,t){if(e(n),u[n])if(t)for(var i=u[n].length-1;0<=i;i--)u[n][i]==t&&u[n].splice(i,1);else delete u[n]},subscribe:function(n,t){if(n=(n||"").toString(),!n)throw new TypeError("Channel not defined");h[n]||(h[n]=[]);h[n].push(t)},publish:function(t,i){if(t=(t||"").toString(),!t)throw new TypeError("Channel not defined");n.__jstorage_meta||(n.__jstorage_meta={});n.__jstorage_meta.PubSub||(n.__jstorage_meta.PubSub=[]);n.__jstorage_meta.PubSub.unshift([+new Date,t,i]);a();l()},reInit:function(){k()},noConflict:function(n){return delete window.$.jStorage,n&&(window.jStorage=this),this}},function(){var n=!1;if("localStorage"in window)try{window.localStorage.setItem("_tmptest","tmpval");n=!0;window.localStorage.removeItem("_tmptest")}catch(u){}if(n)try{window.localStorage&&(i=window.localStorage,r="localStorage",s=i.jStorage_update)}catch(f){}else if("globalStorage"in window)try{window.globalStorage&&(i="localhost"==window.location.hostname?window.globalStorage["localhost.localdomain"]:window.globalStorage[window.location.hostname],r="globalStorage",s=i.jStorage_update)}catch(e){}else if(t=document.createElement("link"),t.addBehavior){t.style.behavior="url(#default#userData)";document.getElementsByTagName("head")[0].appendChild(t);try{t.load("jStorage")}catch(o){t.setAttribute("jStorage","{}");t.save("jStorage");t.load("jStorage")}n="{}";try{n=t.getAttribute("jStorage")}catch(h){}try{s=t.getAttribute("jStorage_update")}catch(l){}i.jStorage=n;r="userDataBehavior"}else{t=null;return}d();v();"localStorage"==r||"globalStorage"==r?"addEventListener"in window?window.addEventListener("storage",c,!1):document.attachEvent("onstorage",c):"userDataBehavior"==r&&setInterval(c,1e3);g();"addEventListener"in window&&window.addEventListener("pageshow",function(n){n.persisted&&c()},!1)}()}(),function(n){Class={create:function(){var u=arguments.length>0&&arguments[arguments.length-1].constructor==Boolean?arguments[arguments.length-1]:!1,r=u?{}:function(){this.init.apply(this,arguments)},f={ns:[],supers:{},init:function(){},namespace:function(t){var r,u,f,i;if(!t)return null;if(r=this,t.constructor==Array){n.each(t,function(){r.namespace.apply(r,[this])});return}if(t.constructor==Object){for(u in t)[Object,Function].indexOf(t[u].constructor)>-1&&(this.ns||(this.ns=[]),this.ns[u]=t[u],this.namespace.apply(this,[u]));return}return f=t.split("."),i=this.prototype?this.prototype:this,n.each(f,function(){i[this]=r.ns[this]||i[this]||window[this]||Class.create(!0);delete r.ns[this];i=i[this]}),i},create:function(){var n=Array.prototype.slice.call(arguments),i=n.shift(),r=Class.create.apply(Class,n),t={};t[i]=r;this.namespace(t)},sup:function(){try{var n=this.sup.caller.name;this.supers[n].apply(this,arguments)}catch(t){return!1}}},t;return u?delete f.init:null,n.extend(r,f),u||n.extend(r.prototype,f),t=u?r:r.prototype,n.each(arguments,function(){if(this.constructor==Object||typeof this.init!=undefined)for(i in this)t[i]&&t[i].constructor==Function&&["namespace","create","sup"].indexOf(i)==-1&&(this[i].name=t[i].name=i,t.supers[i]=t[i]),t[i]=this[i]}),r}}}(jQuery);JSON||(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function o(n){return e.lastIndex=0,e.test(n)?'"'+n.replace(e,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function u(i,f){var s,l,h,a,v=n,c,e=f[i];e&&typeof e=="object"&&typeof e.toJSON=="function"&&(e=e.toJSON(i));typeof t=="function"&&(e=t.call(f,i,e));switch(typeof e){case"string":return o(e);case"number":return isFinite(e)?String(e):"null";case"boolean":case"null":return String(e);case"object":if(!e)return"null";if(n+=r,c=[],Object.prototype.toString.apply(e)==="[object Array]"){for(a=e.length,s=0;s<a;s+=1)c[s]=u(s,e)||"null";return h=c.length===0?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,s=0;s<a;s+=1)typeof t[s]=="string"&&(l=t[s],h=u(l,e),h&&c.push(o(l)+(n?": ":":")+h));else for(l in e)Object.prototype.hasOwnProperty.call(e,l)&&(h=u(l,e),h&&c.push(o(l)+(n?": ":":")+h));return h=c.length===0?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var f=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,r,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(n="",r="",typeof e=="number")for(o=0;o<e;o+=1)r+=" ";else typeof e=="string"&&(r=e);if(t=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return u("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(n,t){var r,u,i=n[t];if(i&&typeof i=="object")for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(u=walk(i,r),u!==undefined?i[r]=u:delete i[r]);return reviver.call(n,t,i)}var j;if(text=String(text),f.lastIndex=0,f.test(text)&&(text=text.replace(f,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse");})}();$(document).ready(function(){for(var i,t,n=0;n<document.forms.length;n++){for(i=document.forms[n].getElementsByTagName("INPUT"),document.forms[n].aryActionInputs=[],t=0;t<i.length;t++)i[t].type=="submit"&&document.forms[n].aryActionInputs.push(i[t]);document.forms[n].aryActionInputs.length&&$(document.forms[n]).bind("submit",function(n){if(this.submitted!=undefined){var t=window.event||n;if(!this.submitted)return;t.preventDefault?t.preventDefault():t.returnValue=!1}else this.submitted=!0})}});initCounter=function(n){var t;clearTimeout(countDownClock);t="";try{t=parseDateTime(n)}catch(f){return responseErrFunc(),!1}var u=parseDateTime($("#form-CloseDateTime").val()),i=new Date,r=new Date(i.getTime()+(u-t));prep_countdown(r.getTime());r>i&&setTimeout("getServerTime();",1e4)};responseErrFunc=function(){var n=$.jStorage.get("responseErrCount");n==undefined?n=0:resposneErrCount=parseInt(n);n+=1;$.jStorage.set("responseErrCount",n);$.jStorage.setTTL("responseErrCount",36e4);$("#form-ResponseErrCount").val(n);alert("An error occurred. Please check your internet connection and try again.");$("#warningText").html()!==""?($("#timer").attr("style","display:none;"),$("#timer").html("")):($("#green-box").attr("style","display:none;"),$("#green-box").html(""));$("#response-message").attr("style","display:block;");$("#response-message").html("<p>An error occurred. Please check your internet connection and try again.<\/p>");enableLodgeButtons()};reNonAscii=new RegExp("[^ -ÿ]","g");reWindows=new RegExp('[*|?|/|\\\\|<|>|:|"||]',"g");var strError="",aryFileTypeErrorDetail=[],aryErrorDetail=[],uploadRequest=[];var processResponse=function(n){$("#error-message").attr("style","display:none;");$("#response-message").attr("style","display:block;");var t=n.Data.split("|");t.length===3?($("#response-message").html(t[0]),$("#form-LogOfResponseAttemptUuid").val(t[1]),$("#form-ResponseId").val(t[2]),setTimeout("submitResponseForm();",2e3)):(DisableFileUploadControls(),$("#response-message").html("<p>The system was unable to create a log of this Lodgement. This may be due to temporary loss of your internet connection or a timeout. Please return to the Current Tender Detail View page and lodge your response again.<br/>If you continue to receive this message please contact the eTendering helpdesk.<\/p>"));$("#response-message").focus();$("html, body").animate({scrollTop:$("#response-message").offset().top},800)},filesTotal=0,filesUploaded=0,allowReset=!1;processRFxResponse=function(n){$("#error-message").attr("style","display:none;");$("#response-message").attr("style","display:block;");var t=n.Data.split("|");t.length===3?($("#response-message").html(t[0]),$("#form-LogOfRfxResponseAttemptUuid").val(t[1]),$("#form-ResponseId").val(t[2]),setTimeout("submitResponseForm();",12e3)):$("#response-message").html('<p class="error">The system was unable to create a log of this Lodgement. This may be due to temporary loss of your internet connection or a timeout. Please return to the Current Tender Detail View page and lodge your response again.<br/>If you continue to receive this message please contact the eTendering helpdesk.<\/p>');$("#response-message").focus();$("html, body").animate({scrollTop:$("#response-message").offset().top},800)},function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(jQuery)}(function(n){n.fn.conformity=function(t){var f={mode:"min-height"},s=n(this),u=0,o=0,r=[],i,e=0;return t&&n.extend(f,t),s.each(function(){if(i=n(this),f.mode==="min-height"?i.height("auto").css("min-height",0):f.mode==="height"&&i.height("auto"),e=i.offset().top,o!=e){for(currentDiv=0;currentDiv<r.length;currentDiv++)r[currentDiv].css(f.mode,u);r.length=0;o=e;u=i.outerHeight();r.push(i)}else r.push(i),u=u<i.outerHeight()?i.outerHeight():u;for(currentDiv=0;currentDiv<r.length;currentDiv++)r[currentDiv].css(f.mode,u)})}});$(document).ready(function(n){n(".boxEQH").length&&(".rBox"&&n(".rBox").conformity(),".boxEQH .box"&&n(".boxEQH .box").conformity());var t=n(window).width();n(window).resize(function(){n(window).width()!=t&&(t=n(window).width(),n(".boxEQH").length&&(".boxEQH .rBox"&&n(".boxEQH .rBox").conformity(),".boxEQH .box"&&n(".boxEQH .box").conformity()))})});window.getCacheBuster=function(){return"?now="+(new Date).getTime()};window.checkLogin=function(n){var t=n.getResponseHeader("LoginPage");t&&t!==""&&location.reload(t)};window.isValidFileType=function(n){var t;return blockedFileTypesArray="ACTION,APK,APP,BAT,BIN,CMD,COM,COMMAND,CPL,CSH,EXE,GADGET,INF1,INS,INX,IPA,ISU,JAR,JOB,JS,JSE,KSH,LNK,MSC,MSI,MSP,MST,OSX,OUT,PAF,PIF,PRG,PS1,REG,RGS,RUN,SCT,SHB,SHS,U3P,VB,VBE,VBS,VBSCRIPT,WORKFLOW,WS,WSF,HTA".split(","),t=n.substr(n.lastIndexOf(".")+1),!(t.length>0&&jQuery.inArray(t.toUpperCase(),blockedFileTypesArray)!==-1)};$(document).ready(function(){var n,t;if($("#bread-crumbs")){n=[{title:"Home",href:"/"}];function i(t){if($.jStorage.storageAvailable()){if(t.kb&&$.jStorage.get("arrBreadcrumbs")!==null&&(n=$.jStorage.get("arrBreadcrumbs")),t.nu){var i=n[n.length-1],r=t.t,u=t.u;u!==i.href&&r!==i.title&&n.push({title:r,href:u});n.length>4&&n.shift()}$.jStorage.set("arrBreadcrumbs",n)}n[n.length-1].href==t.qs&&n.pop()}function r(t){var f=0,i=n,r,u;for(i.length>3&&(f=i.length-3),r=f;r<i.length;r++)$("#bread-crumbs").append('<li ><a href="'+i[r].href+'" title="'+$.trim(i[r].title)+'">'+$.trim(i[r].title)+"<\/a><\/li>\r\n");$("#bread-crumbs").append("<li>"+$.trim(t)+"<\/li>");u="/home";$.jStorage.storageAvailable()&&$.jStorage.get("arrBreadcrumbs")!==null&&(u=decodeHtml($.jStorage.get("arrBreadcrumbs")[$.jStorage.get("arrBreadcrumbs").length-1].href));$("#login-form").length&&($("#form-ReturnUrl1").val(u),$("#form-ReturnUrl2").val(u))}t={t:$("#breadcrumb_title").val(),u:$("#breadcrumb_queryString").val(),kb:$("#breadcrumb_keepBreadcrumb").val()==="true",nu:$("#breadcrumb_needUpdate").val()==="true",qs:$("#breadcrumb_queryString").val()};i(t);r($("#breadcrumb_title").val())}});$(document).ready(function(){toggleDisabled($('input[id^="form-AgencyReportType-Participant"]').is(":checked"),"#form-ParticipantStatus","form-ParticipantStatus");var n=setInterval(function(){$("#agencyOptions-allActive").length&&(clearInterval(n),toggleAgencyReportType($("#agencyOptions-sel").is(":checked")),$('input[name="agencyStatus"]').each(function(){$(this).click(function(){toggleAgencyReportType($(this).attr("id")==="agencyOptions-sel")})}))},100);$('input[name="AgencyReportType"]').each(function(){$(this).click(function(){toggleDisabled($(this).val()==="Participant Agency"&&$(this).is(":disabled")===!1,"#form-ParticipantStatus","form-ParticipantStatus")})})});$(document).ready(function(){function t(t){$(t).find(":input").each(function(){var t=!1;if(this.name!=="NotifyType")if($(this).hasClass("notify-ATMs notify-APPs")){t=n.APPs||n.ATMs;switch(this.type){case"select-multiple":case"select-one":case"text":t||$(this).val("");this.disabled=!t;break;case"checkbox":case"radio":t||(this.checked=t);this.disabled=!t}}else if($(this).hasClass("notify-ATMs")){t=n.ATMs;switch(this.type){case"select-multiple":case"select-one":case"text":t||$(this).val("");this.disabled=!t;break;case"checkbox":case"radio":t||(this.checked=t);this.disabled=!t}}});$("#Category").selectpicker("refresh");$("#TenderType").selectpicker("refresh")}var n={};$("input[name='NotifyType']").each(function(){n[$(this).val()]=this.checked});t("#notificationForm");$("input[name='NotifyType']").click(function(){n[$(this).val()]=this.checked;t("#notificationForm")})});$(function(){var f,t;if($("#divCategoryTree").length>0){var n,i="/api/panel/GetCategoryJsonData"+getCacheBuster(),r=function(){$("#form-AgencyUuid").val().length>0?($("#agencyNotSelected").hide(),$("#divCategoryTree").show(),$("#blnWithFilter").val()==="true"&&($("#category-filter").show(),$("#search-hint").show(),$("#tipSelectPanel").show())):($("#agencyNotSelected").show(),$("#divCategoryTree").hide(),$("#blnWithFilter").val()==="true"&&($("#category-filter").hide(),$("#search-hint").hide(),$("#tipSelectPanel").hide()))},u=function(t){$.ajax({type:"POST",cache:!0,dataType:"json",url:i,data:{AgencyUuid:$("#form-Level1AgencyUuid").val(),SearchType:$("#form-SearchType").val(),Keyword:$("#form-Keyword").val(),KeywordTypeSearch:$("#form-KeywordTypeSearch").val(),PanelId:$("#form-PanelId").val(),SonId:$("#form-SonId").val(),SupplierName:$("#form-SupplierName").val(),SupplierAbn:$("#form-SupplierAbn").val()}}).done(function(i){var r,u,f;i=jQuery.parseJSON(i.Data);r="0 panels";typeof i.totalPanelCount!="undefined"&&i.totalPanelCount===1?r="1 panel":typeof i.totalPanelCount!="undefined"&&i.totalPanelCount>1&&(r=i.totalPanelCount+" panels");$("#categoryTree h2.tree-header").html("Categories ("+r+") *");$("#numSelectedCount").val()==0?$("#tipSelectPanel").html(""):$("#tipSelectPanel").html("<strong>Number of Matching Panels: "+$("#numSelectedCount").val()+" out of "+i.totalPanelCount+"<\/strong>");$("#categoryTree .tree").fancytree({extensions:["filter"],quicksearch:!0,source:i.aryCategoryData,checkbox:1,selectMode:3,select:function(t,r){var u,f;if($("#blnWithFilter").val()!=="true")n&&n.readyState!=4&&n.abort(),u=r.tree.getSelectedNodes(),f=[],$.map(u,function(n){f.push(n.data.code)}),$("#form-UnspscCode").val(f.toString()),$("#search-result").load("/panel/RefinePanelSearchResult",{AgencyUuid:$("#form-Level1AgencyUuid").val(),UnspscCode:$("#form-UnspscCode").val(),SearchType:$("#form-SearchType").val(),Keyword:$("#form-Keyword").val(),KeywordTypeSearch:$("#form-KeywordTypeSearch").val(),PanelId:$("#form-PanelId").val(),SonId:$("#form-SonId").val(),SupplierName:$("#form-SupplierName").val(),SupplierAbn:$("#form-SupplierAbn").val(),OrderBy:$("#form-OrderBy-1").val(),BtnSubmit:"Search"},function(){$("#form-OrderBy-1").selectpicker("render")});else{u=r.tree.getSelectedNodes();var s=i.stcCategoryPanel,o="",e=[];$("#tipSelectPanel").show();$.map(u,function(n){o=n.data.code;$.map(s,function(n,t){t==o&&$.map(n,function(n){$.inArray(n,e)===-1&&e.push(n)})})});$("#tipSelectPanel").html("<strong>Number of Matching Panels: "+e.length+" out of "+i.totalPanelCount+"<\/strong>")}},filter:{mode:"hide",autoApply:!0}});$(".tree-wrapper").each(function(){var n=$(this).find(".tree").fancytree("getRootNode").visit(function(n){n.setTitle(n.title+" ("+n.data.panelCount+")");$.inArray(n.data.code.toString(),t)>=0&&(n.selected=!0)})});u=$("#categoryTree .tree").fancytree("getTree");u.render();f="";$(document).on("paste keyup mouseleave","#filter",function(){setTimeout(function(n){var t=$("#filter").val();if(t!==f){if(f=t,n&&n.which===$.ui.keyCode.ESCAPE||$.trim(t)===""){$("#btnResetSearch").click();return}u.applyFilter(function(n){return new RegExp(t,"i").test(n.data.titleWithCode)});$("#btnResetSearch").attr("disabled",!1)}},100)});$("#btnResetSearch").click(function(n){n.preventDefault&&n.preventDefault();$("#filter").val("");u.clearFilter()}).attr("disabled",!0)});r()};$("#form-AgencyUuid").on("change",function(){if($("#form-AgencyUuid").length>0&&$("#form-Level1AgencyUuid").val($("#form-AgencyUuid").val()),$("#tipSelectPanel").hide(),$("#form-SearchType").val()==="List by Category"){var n=$("#categoryTree .tree").fancytree("getTree");$.ajax({type:"POST",cache:!0,dataType:"json",url:i,data:{AgencyUuid:$("#form-Level1AgencyUuid").val(),SearchType:$("#form-SearchType").val(),Keyword:$("#form-Keyword").val(),KeywordTypeSearch:$("#form-KeywordTypeSearch").val(),PanelId:$("#form-PanelId").val(),SonId:$("#form-SonId").val(),SupplierName:$("#form-SupplierName").val(),SupplierAbn:$("#form-SupplierAbn").val()}}).done(function(t){t=jQuery.parseJSON(t.Data);$("#categoryTree h2.tree-header").html("Categories ("+t.totalPanelCount+" panels) *");n.reload(t.aryCategoryData);n.widget.options.select=function(n,i){var f=i.tree.getSelectedNodes(),e=t.stcCategoryPanel,u="",r=[];$("#tipSelectPanel").show();$.map(f,function(n){u=n.data.code;$.map(e,function(n,t){t===u&&$.map(n,function(n){$.inArray(n,r)===-1&&r.push(n)})})});$("#tipSelectPanel").html("<strong>Number of Matching Panels: "+r.length+" out of "+t.totalPanelCount+"<\/strong>")};$(".tree-wrapper").each(function(){n=$(this).find(".tree").fancytree("getRootNode").visit(function(n){n.setTitle(n.title+" ("+n.data.panelCount+")")})})});$("#divCategoryTree").length>0&&($("#filter").val(""),n.clearFilter())}$("#search-result").html("");$("#search-result").prev("fieldset.container").remove();$("#form-SearchType").val()==="Search"?($("#form-KeywordHidden").val(""),$("#form-KeywordTypeSearch").val("AllWord"),$("#form-PanelId").val(""),$("#form-SonId").val(""),$("#form-SupplierName").val(""),$("#form-SupplierAbn").val(""),$("#search-result").html('<p class="italic-text">Please start by entering at least one search criteria: Keyword, Panel ID, SON ID, Supplier Name or Supplier ABN.<\/p>')):$("#form-SearchType").val()==="List by Category"&&($("#search-result").html('<p class="italic-text">Please start by selecting categories.<\/p>'),r())});$("#form-UnspscCode").val().length>0?(f=$("#form-UnspscCode").val().split(","),u(f)):u()}t=!1;$("#formPanelSearch").bind("submit",function(){if(t)return!1;t=!0;var n=[];return $(".tree-wrapper").each(function(){for(var r=$(this).find(".tree").fancytree("getTree"),i=r.getSelectedNodes(),t=0;t<i.length;t++)n.push(i[t].data.code)}),$("#form-SearchType").val()==="Search"?$("#form-UnspscCode").val(""):$("#form-UnspscCode").val(n.join()),$("#form-Keyword").val($("#form-KeywordHidden").val()),!0})});$(function(){if($("#panelCapabilities").length>0&&$("#panelUuid").val()!=undefined){var n="/api/panel/GetCapabilityJsonData",t=function(){$.ajax({type:"POST",cache:!0,dataType:"json",url:n,data:{panelUuid:$("#panelUuid").val(),mode:$("#mode").val()}}).done(function(n){n=jQuery.parseJSON(n.Data);for(var t=0;t<n.length;t++)$("#topcap-"+t+" .tree").fancytree({extensions:["filter"],quicksearch:!0,source:n[t].children,checkbox:!1,selectMode:3,clickFolderMode:1,filter:{mode:"hide",autoApply:!0},click:function(n,t){var i=n;n.preventDefault();n.srcElement!=undefined?i=n.srcElement:n.originalEvent.target&&(i=n.originalEvent.target);$(i).hasClass("showTipOnly")||t.node.toggleExpanded()}})})};t();$(".tree-wrapper a.expander").parents("h2").on("click",function(n){$(n.target).hasClass("showTipOnly")||($(this).closest(".tree-wrapper").find(".tree").slideToggle("fast"),$(this).children("a.expander").toggleClass("expanderClose"))})}});$(document).ready(function(){function n(n){$("#form-Status-Current").attr("disabled",n!=="MaaSonReport");$("#form-Status-Closed").attr("disabled",n!=="MaaSonReport");$("#form-Status-All").attr("disabled",n!=="MaaSonReport");n!=="MaaSonReport"&&($("#form-Status-Current").attr("checked",!1),$("#form-Status-Closed").attr("checked",!1),$("#form-Status-All").attr("checked",!1))}n($("#ReportType").val());$("#ReportType").on("change",function(){n(this.value)})}),function(n){var r=/^\s*|\s*$/g,i,u="B".replace(/A(.)|B/,"$1")==="$1",t={majorVersion:"3",minorVersion:"5.6",releaseDate:"2012-07-26",_init:function(){function l(n){return n.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(n.src)?(/_(src|dev)\.js/g.test(n.src)&&(t.suffix="_src"),(c=n.src.indexOf("?"))!=-1&&(t.query=n.src.substring(c+1)),t.baseURL=n.src.substring(0,n.src.lastIndexOf("/")),s&&t.baseURL.indexOf("://")==-1&&t.baseURL.indexOf("/")!==0&&(t.baseURL=s+t.baseURL),t.baseURL):null}var t=this,e=document,h=navigator,r=h.userAgent,i,u,o,s,c,f;if(t.isOpera=n.opera&&opera.buildNumber,t.isWebKit=/WebKit/.test(r),t.isIE=!t.isWebKit&&!t.isOpera&&/MSIE/gi.test(r)&&/Explorer/gi.test(h.appName),t.isIE6=t.isIE&&/MSIE [56]/.test(r),t.isIE7=t.isIE&&/MSIE [7]/.test(r),t.isIE8=t.isIE&&/MSIE [8]/.test(r),t.isIE9=t.isIE&&/MSIE [9]/.test(r),t.isGecko=!t.isWebKit&&/Gecko/.test(r),t.isMac=r.indexOf("Mac")!=-1,t.isAir=/adobeair/i.test(r),t.isIDevice=/(iPad|iPhone)/.test(r),t.isIOS5=t.isIDevice&&r.match(/AppleWebKit\/(\d*)/)[1]>=534,n.tinyMCEPreInit){t.suffix=tinyMCEPreInit.suffix;t.baseURL=tinyMCEPreInit.base;t.query=tinyMCEPreInit.query;return}for(t.suffix="",u=e.getElementsByTagName("base"),i=0;i<u.length;i++)f=u[i].href,f&&(/^https?:\/\/[^\/]+$/.test(f)&&(f+="/"),s=f?f.match(/.*\//)[0]:"");for(u=e.getElementsByTagName("script"),i=0;i<u.length;i++)if(l(u[i]))return;if(o=e.getElementsByTagName("head")[0],o)for(u=o.getElementsByTagName("script"),i=0;i<u.length;i++)if(l(u[i]))return;return},is:function(n,t){return t?t=="array"&&n.hasOwnProperty&&n instanceof Array?!0:typeof n==t:n!==i},makeMap:function(n,t,i){var r;for(n=n||[],t=t||",",typeof n=="string"&&(n=n.split(t)),i=i||{},r=n.length;r--;)i[n[r]]={};return i},each:function(n,t,r){var u,f;if(!n)return 0;if(r=r||n,n.length!==i){for(u=0,f=n.length;u<f;u++)if(t.call(r,n[u],u,n)===!1)return 0}else for(u in n)if(n.hasOwnProperty(u)&&t.call(r,n[u],u,n)===!1)return 0;return 1},map:function(n,i){var r=[];return t.each(n,function(n){r.push(i(n))}),r},grep:function(n,i){var r=[];return t.each(n,function(n){(!i||i(n))&&r.push(n)}),r},inArray:function(n,t){var i,r;if(n)for(i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},extend:function(n,t){for(var u,o=arguments,f,r=1,e=o.length;r<e;r++){t=o[r];for(u in t)t.hasOwnProperty(u)&&(f=t[u],f!==i&&(n[u]=f))}return n},trim:function(n){return(n?""+n:"").replace(r,"")},create:function(n,t,i){var e=this,f,u,r,o,s,h=0;if(n=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(n),r=n[3].match(/(^|\.)(\w+)$/i)[2],u=e.createNS(n[3].replace(/\.\w+$/,""),i),!u[r]){if(n[2]=="static"){if(u[r]=t,this.onCreate)this.onCreate(n[2],n[3],u[r]);return}if(t[r]||(t[r]=function(){},h=1),u[r]=t[r],e.extend(u[r].prototype,t),n[5]&&(f=e.resolve(n[5]).prototype,o=n[5].match(/\.(\w+)$/i)[1],s=u[r],u[r]=h?function(){return f[o].apply(this,arguments)}:function(){return this.parent=f[o],s.apply(this,arguments)},u[r].prototype[r]=u[r],e.each(f,function(n,t){u[r].prototype[t]=f[t]}),e.each(t,function(n,t){f[t]?u[r].prototype[t]=function(){return this.parent=f[t],n.apply(this,arguments)}:t!=r&&(u[r].prototype[t]=n)})),e.each(t.static,function(n,t){u[r][t]=n}),this.onCreate)this.onCreate(n[2],n[3],u[r].prototype)}},walk:function(n,i,r,u){u=u||this;n&&(r&&(n=n[r]),t.each(n,function(n,f){if(i.call(u,n,f,r)===!1)return!1;t.walk(n,i,r,u)}))},createNS:function(t,i){var r,u;for(i=i||n,t=t.split("."),r=0;r<t.length;r++)u=t[r],i[u]||(i[u]={}),i=i[u];return i},resolve:function(t,i){var r,u;for(i=i||n,t=t.split("."),r=0,u=t.length;r<u;r++)if(i=i[t[r]],!i)break;return i},addUnload:function(t,i){function f(){function i(){t.detachEvent("onstop",i);r&&r();t=0}var t=document;t.readyState=="interactive"&&(t&&t.attachEvent("onstop",i),n.setTimeout(function(){t&&t.detachEvent("onstop",i)},0))}var u=this,r;return r=function(){var i=u.unloads,t,e;if(i){for(e in i)t=i[e],t&&t.func&&t.func.call(t.scope,1);n.detachEvent?(n.detachEvent("onbeforeunload",f),n.detachEvent("onunload",r)):n.removeEventListener&&n.removeEventListener("unload",r,!1);u.unloads=t=i=w=r=0;n.CollectGarbage&&CollectGarbage()}},t={func:t,scope:i||this},u.unloads?u.unloads.push(t):(n.attachEvent?(n.attachEvent("onunload",r),n.attachEvent("onbeforeunload",f)):n.addEventListener&&n.addEventListener("unload",r,!1),u.unloads=[t]),t},removeUnload:function(n){var i=this.unloads,r=null;return t.each(i,function(t,u){if(t&&t.func==n)return i.splice(u,1),r=n,!1}),r},explode:function(n,i){return!n||t.is(n,"array")?n:t.map(n.split(i||","),t.trim)},_addVer:function(n){var t;return this.query?(t=(n.indexOf("?")==-1?"?":"&")+this.query,n.indexOf("#")==-1)?n+t:n.replace("#",t+"#"):n},_replace:function(n,t,r){return u?r.replace(n,function(){for(var r=t,u=arguments,n=0;n<u.length-2;n++)r=u[n]===i?r.replace(new RegExp("\\$"+n,"g"),""):r.replace(new RegExp("\\$"+n,"g"),u[n]);return r}):r.replace(n,t)}};t._init();n.tinymce=n.tinyMCE=t}(window);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:!1,Dispatcher:function(n){this.scope=n||this;this.listeners=[]},add:function(n,t){return this.listeners.push({cb:n,scope:t||this.scope}),n},addToTop:function(n,t){var i=this,r={cb:n,scope:t||i.scope};return i.inDispatch?i.listeners=[r].concat(i.listeners):i.listeners.unshift(r),n},remove:function(n){var t=this.listeners,i=null;return tinymce.each(t,function(r,u){if(n==r.cb)return i=r,t.splice(u,1),!1}),i},dispatch:function(){var i=this,r,u=arguments,n,f=i.listeners,t;for(i.inDispatch=!0,n=0;n<f.length;n++)if(t=f[n],r=t.cb.apply(t.scope,u.length>0?u:[t.scope]),r===!1)break;return i.inDispatch=!1,r}}),function(){var n=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(t,i){var r=this,u,f;if(t=tinymce.trim(t),i=r.settings=i||{},/^([\w\-]+):([^\/]{2})/i.test(t)||/^\s*#/.test(t)){r.source=t;return}t.indexOf("/")===0&&t.indexOf("//")!==0&&(t=(i.base_uri?i.base_uri.protocol||"http":"http")+"://mce_host"+t);/^[\w\-]*:?\/\//.test(t)||(f=i.base_uri?i.base_uri.path:new tinymce.util.URI(location.href).directory,t=(i.base_uri&&i.base_uri.protocol||"http")+"://mce_host"+r.toAbsPath(f,t));t=t.replace(/@@/g,"(mce_at)");t=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(t);n(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(n,i){var u=t[i];u&&(u=u.replace(/\(mce_at\)/g,"@@"));r[n]=u});u=i.base_uri;u&&(r.protocol||(r.protocol=u.protocol),r.userInfo||(r.userInfo=u.userInfo),r.port||r.host!=="mce_host"||(r.port=u.port),r.host&&r.host!=="mce_host"||(r.host=u.host),r.source="")},setPath:function(n){var t=this;n=/^(.*?)\/?(\w+)?$/.exec(n);t.path=n[0];t.directory=n[1];t.file=n[2];t.source="";t.getURI()},toRelative:function(n){var t=this,r,i,u;return n==="./"?n:(n=new tinymce.util.URI(n,{base_uri:t}),n.host!="mce_host"&&t.host!=n.host&&n.host||t.port!=n.port||t.protocol!=n.protocol)?n.getURI():(i=t.getURI(),u=n.getURI(),i==u||i.charAt(i.length-1)=="/"&&i.substr(0,i.length-1)==u)?i:(r=t.toRelPath(t.path,n.path),n.query&&(r+="?"+n.query),n.anchor&&(r+="#"+n.anchor),r)},toAbsolute:function(n,t){return n=new tinymce.util.URI(n,{base_uri:this}),n.getURI(this.host==n.host&&this.protocol==n.protocol?t:0)},toRelPath:function(n,t){var r,f=0,e="",i,u;if(n=n.substring(0,n.lastIndexOf("/")),n=n.split("/"),r=t.split("/"),n.length>=r.length)for(i=0,u=n.length;i<u;i++)if(i>=r.length||n[i]!=r[i]){f=i+1;break}if(n.length<r.length)for(i=0,u=r.length;i<u;i++)if(i>=n.length||n[i]!=r[i]){f=i+1;break}if(f===1)return t;for(i=0,u=n.length-(f-1);i<u;i++)e+="../";for(i=f-1,u=r.length;i<u;i++)e+=i!=f-1?"/"+r[i]:r[i];return e},toAbsPath:function(t,i){var r,e=0,f=[],o,u;for(o=/\/$/.test(i)?"/":"",t=t.split("/"),i=i.split("/"),n(t,function(n){n&&f.push(n)}),t=f,r=i.length-1,f=[];r>=0;r--)if(i[r].length!==0&&i[r]!=="."){if(i[r]===".."){e++;continue}if(e>0){e--;continue}f.push(i[r])}return r=t.length-e,u=r<=0?f.reverse().join("/"):t.slice(0,r).join("/")+"/"+f.reverse().join("/"),u.indexOf("/")!==0&&(u="/"+u),o&&u.lastIndexOf("/")!==u.length-1&&(u+=o),u},getURI:function(n){var i,t=this;return(!t.source||n)&&(i="",n||(t.protocol&&(i+=t.protocol+"://"),t.userInfo&&(i+=t.userInfo+"@"),t.host&&(i+=t.host),t.port&&(i+=":"+t.port)),t.path&&(i+=t.path),t.query&&(i+="?"+t.query),t.anchor&&(i+="#"+t.anchor),t.source=i),t.source}})}(),function(){var n=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(t){var r=this.get(t),i;return r&&n(r.split("&"),function(n){n=n.split("=");i=i||{};i[unescape(n[0])]=unescape(n[1])}),i},setHash:function(t,i,r,u,f,e){var o="";n(i,function(n,t){o+=(o?"&":"")+escape(t)+"="+escape(n)});this.set(t,o,r,u,f,e)},get:function(n){var i=document.cookie,r,u=n+"=",t;if(i){if(t=i.indexOf("; "+u),t==-1){if(t=i.indexOf(u),t!==0)return null}else t+=2;return r=i.indexOf(";",t),r==-1&&(r=i.length),unescape(i.substring(t+u.length,r))}},set:function(n,t,i,r,u,f){document.cookie=n+"="+escape(t)+(i?"; expires="+i.toGMTString():"")+(r?"; path="+escape(r):"")+(u?"; domain="+u:"")+(f?"; secure":"")},remove:function(n,t,i){var r=new Date;r.setTime(r.getTime()-1e3);this.set(n,"",r,t,i)}})}(),function(){function n(t,i){var u,r,e,f;if(i=i||'"',t==null)return"null";if(e=typeof t,e=="string")return r="\bb\tt\nn\ff\rr\"\"''\\\\",i+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(n,t){return i==='"'&&n==="'"?n:(u=r.indexOf(t),u+1)?"\\"+r.charAt(u+1):(n=t.charCodeAt().toString(16),"\\u"+"0000".substring(n.length)+n)})+i;if(e=="object"){if(t.hasOwnProperty&&t instanceof Array){for(u=0,r="[";u<t.length;u++)r+=(u>0?",":"")+n(t[u],i);return r+"]"}r="{";for(f in t)t.hasOwnProperty(f)&&(r+=typeof t[f]!="function"?(r.length>1?","+i:i)+f+i+":"+n(t[f],i):"");return r+"}"}return""+t}tinymce.util.JSON={serialize:n,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}}();tinymce.create("static tinymce.util.XHR",{send:function(n){function u(){!n.async||t.readyState==4||r++>1e4?(n.success&&r<1e4&&t.status==200?n.success.call(n.success_scope,""+t.responseText,t,n):n.error&&n.error.call(n.error_scope,r>1e4?"TIMED_OUT":"GENERAL",t,n),t=null):i.setTimeout(u,10)}function f(n){t=0;try{t=new ActiveXObject(n)}catch(i){}return t}var t,e,i=window,r=0;if(n.scope=n.scope||this,n.success_scope=n.success_scope||n.scope,n.error_scope=n.error_scope||n.scope,n.async=n.async===!1?!1:!0,n.data=n.data||"",t=i.XMLHttpRequest?new XMLHttpRequest:f("Microsoft.XMLHTTP")||f("Msxml2.XMLHTTP"),t){if(t.overrideMimeType&&t.overrideMimeType(n.content_type),t.open(n.type||(n.data?"POST":"GET"),n.url,n.async),n.content_type&&t.setRequestHeader("Content-Type",n.content_type),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.send(n.data),!n.async)return u();e=i.setTimeout(u,10)}}}),function(){var n=tinymce.extend,t=tinymce.util.JSON,i=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(t){this.settings=n({},t);this.count=0},send:function(r){var u=r.error,f=r.success;r=n(this.settings,r);r.success=function(n,i){n=t.parse(n);typeof n=="undefined"&&(n={error:"JSON Parse error."});n.error?u.call(r.error_scope||r.scope,n.error,i):f.call(r.success_scope||r.scope,n.result)};r.error=function(n,t){u&&u.call(r.error_scope||r.scope,n,t)};r.data=t.serialize({id:r.id||"c"+this.count++,method:r.method,params:r.params});r.content_type="application/json";i.send(r)},static:{sendRPC:function(n){return(new tinymce.util.JSONRequest).send(n)}}})}(),function(n){n.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(n){return n.shiftKey||n.ctrlKey||n.altKey},metaKeyPressed:function(t){return n.isMac?t.metaKey:t.ctrlKey&&!t.altKey}}}(tinymce);tinymce.util.Quirks=function(n){function e(t,i){try{n.getDoc().execCommand(t,!1,i)}catch(r){}}function s(){var t=n.getDoc().documentMode;return t?t:6}function l(){function f(r){var e,f,u,o;if(e=i.getRng(),f=t.getParent(e.startContainer,t.isBlock),r&&(f=t.getNext(f,t.isBlock)),f){for(u=f.firstChild;u&&u.nodeType==3&&u.nodeValue.length===0;)u=u.nextSibling;u&&u.nodeName==="SPAN"&&(o=u.cloneNode(!1))}n.getDoc().execCommand(r?"ForwardDelete":"Delete",!1,null);f=t.getParent(e.startContainer,t.isBlock);tinymce.each(t.select("span.Apple-style-span,font.Apple-style-span",f),function(n){var r=i.getBookmark();o?t.replace(o.cloneNode(!1),n,!0):t.remove(n,!0);i.moveToBookmark(r)})}n.onKeyDown.add(function(n,t){var i;i=t.keyCode==o;t.isDefaultPrevented()||!i&&t.keyCode!=u||r.modifierPressed(t)||(t.preventDefault(),f(i))});n.addCommand("Delete",function(){f()})}function a(){function r(n){var r=t.create("body"),u=n.cloneContents();return r.appendChild(u),i.serializer.serialize(r,{format:"html"})}function f(i){var e=r(i),u=t.createRng(),f;return u.selectNode(n.getBody()),f=r(u),e===f}n.onKeyDown.add(function(n,i){var e=i.keyCode,r;if(!i.isDefaultPrevented()&&(e==o||e==u)){if(r=n.selection.isCollapsed(),r&&!t.isEmpty(n.getBody()))return;if(tinymce.isIE&&!r)return;if(!r&&!f(n.selection.getRng()))return;n.setContent("");n.selection.setCursorLocation(n.getBody(),0);n.nodeChanged()}})}function v(){n.onKeyDown.add(function(n,t){t.keyCode==65&&r.metaKeyPressed(t)&&(t.preventDefault(),n.execCommand("SelectAll"))})}function y(){n.settings.content_editable||(t.bind(n.getDoc(),"focusin",function(){i.setRng(i.getRng())}),t.bind(n.getDoc(),"mousedown",function(t){t.target==n.getDoc().documentElement&&(n.getWin().focus(),i.setRng(i.getRng()))}))}function h(){n.onKeyDown.add(function(n,r){if(!r.isDefaultPrevented()&&r.keyCode===u&&i.isCollapsed()&&i.getRng(!0).startOffset===0){var e=i.getNode(),f=e.previousSibling;f&&f.nodeName&&f.nodeName.toLowerCase()==="hr"&&(t.remove(f),tinymce.dom.Event.cancel(r))}})}function p(){Range.prototype.getClientRects||n.onMouseDown.add(function(n,t){if(t.target.nodeName==="HTML"){var i=n.getBody();i.blur();setTimeout(function(){i.focus()},0)}})}function w(){n.onClick.add(function(n,r){r=r.target;/^(IMG|HR)$/.test(r.nodeName)&&i.getSel().setBaseAndExtent(r,0,r,1);r.nodeName=="A"&&t.hasClass(r,"mceItemAnchor")&&i.select(r);n.nodeChanged()})}function b(){function r(){var r=t.getAttribs(i.getStart().cloneNode(!1));return function(){var u=i.getStart();u!==n.getBody()&&(t.setAttrib(u,"style",null),tinymce.each(r,function(n){u.setAttributeNode(n.cloneNode(!0))}))}}function u(){return!i.isCollapsed()&&t.getParent(i.getStart(),t.isBlock)!=t.getParent(i.getEnd(),t.isBlock)}function f(n,t){return t.preventDefault(),!1}n.onKeyPress.add(function(n,t){var i;if((t.keyCode==8||t.keyCode==46)&&u())return i=r(),n.getDoc().execCommand("delete",!1,null),i(),t.preventDefault(),!1});t.bind(n.getDoc(),"cut",function(){var t;u()&&(t=r(),n.onKeyUp.addToTop(f),setTimeout(function(){t();n.onKeyUp.remove(f)},0))})}function k(){var u,r;t.bind(n.getDoc(),"selectionchange",function(){r&&(clearTimeout(r),r=0);r=window.setTimeout(function(){var t=i.getRng();u&&tinymce.dom.RangeUtils.compareRanges(t,u)||(n.nodeChanged(),u=t)},50)})}function d(){document.body.setAttribute("role","application")}function g(){n.onKeyDown.add(function(n,t){if(!t.isDefaultPrevented()&&t.keyCode===u&&i.isCollapsed()&&i.getRng(!0).startOffset===0){var r=i.getNode().previousSibling;if(r&&r.nodeName&&r.nodeName.toLowerCase()==="table")return tinymce.dom.Event.cancel(t)}})}function nt(){s()>7||(e("RespectVisibilityInDesign",!0),n.contentStyles.push(".mceHideBrInPre pre br {display: none}"),t.addClass(n.getBody(),"mceHideBrInPre"),n.parser.addNodeFilter("pre",function(n){for(var f=n.length,r,u,i,t;f--;)for(r=n[f].getAll("br"),u=r.length;u--;)i=r[u],t=i.prev,t&&t.type===3&&t.value.charAt(t.value-1)!="\n"?t.value+="\n":i.parent.insert(new tinymce.html.Node("#text",3),i,!0).value="\n"}),n.serializer.addNodeFilter("pre",function(n){for(var u=n.length,i,r,f,t;u--;)for(i=n[u].getAll("br"),r=i.length;r--;)f=i[r],t=f.prev,t&&t.type==3&&(t.value=t.value.replace(/\r?\n$/,""))}))}function tt(){t.bind(n.getBody(),"mouseup",function(){var r,n=i.getNode();n.nodeName=="IMG"&&((r=t.getStyle(n,"width"))&&(t.setAttrib(n,"width",r.replace(/[^0-9%]+/g,"")),t.setStyle(n,"width","")),(r=t.getStyle(n,"height"))&&(t.setAttrib(n,"height",r.replace(/[^0-9%]+/g,"")),t.setStyle(n,"height","")))})}function it(){n.onKeyDown.add(function(n,f){var h,c,e,l,v,s,a;h=f.keyCode==o;f.isDefaultPrevented()||!h&&f.keyCode!=u||r.modifierPressed(f)||(c=i.getRng(),e=c.startContainer,l=c.startOffset,a=c.collapsed,e.nodeType==3&&e.nodeValue.length>0&&(l===0&&!a||a&&l===(h?0:1))&&(nonEmptyElements=n.schema.getNonEmptyElements(),f.preventDefault(),v=t.create("br",{id:"__tmp"}),e.parentNode.insertBefore(v,e),n.getDoc().execCommand(h?"ForwardDelete":"Delete",!1,null),e=i.getRng().startContainer,s=e.previousSibling,s&&s.nodeType==1&&!t.isBlock(s)&&t.isEmpty(s)&&!nonEmptyElements[s.nodeName.toLowerCase()]&&t.remove(s),t.remove("__tmp")))})}function rt(){n.onKeyDown.add(function(n,u){var e,o,s,h,f;if(!u.isDefaultPrevented()&&u.keyCode==r.BACKSPACE&&(e=i.getRng(),o=e.startContainer,s=e.startOffset,h=t.getRoot(),f=o,e.collapsed&&s===0)){while(f&&f.parentNode&&f.parentNode.firstChild==f&&f.parentNode!=h)f=f.parentNode;f.tagName==="BLOCKQUOTE"&&(n.formatter.toggle("blockquote",null,f),e.setStart(o,0),e.setEnd(o,0),i.setRng(e),i.collapse(!1))}})}function ut(){function t(){n._refreshContentEditable();e("StyleWithCSS",!1);e("enableInlineTableEditing",!1);f.object_resizing||e("enableObjectResizing",!1)}f.readonly||(n.onBeforeExecCommand.add(t),n.onMouseDown.add(t))}function ft(){function r(){tinymce.each(t.select("a"),function(n){var i=n.parentNode,r=t.getRoot();if(i.lastChild===n){while(i&&!t.isBlock(i)){if(i.parentNode.lastChild!==i||i===r)return;i=i.parentNode}t.add(i,"br",{"data-mce-bogus":1})}})}n.onExecCommand.add(function(n,t){t==="CreateLink"&&r(n)});n.onSetContent.add(i.onSetContent.add(r))}function et(){f.forced_root_block&&n.onInit.add(function(){e("DefaultParagraphSeparator",f.forced_root_block)})}function ot(){function t(t,i){t&&i.initial||n.execCommand("mceRepaint")}n.onUndo.add(t);n.onRedo.add(t);n.onSetContent.add(t)}function st(){n.onKeyDown.add(function(n,i){var r;i.isDefaultPrevented()||i.keyCode!=u||(r=n.getDoc().selection.createRange(),r&&r.item&&(i.preventDefault(),n.undoManager.beforeChange(),t.remove(r.item(0)),n.undoManager.add()))})}function ht(){var t;s()>=10&&(t="",tinymce.each("p div h1 h2 h3 h4 h5 h6".split(" "),function(n,i){t+=(i>0?",":"")+n+":empty"}),n.contentStyles.push(t+"{padding-right: 1px !important}"))}function c(){function k(n){var i,f;i=n.screenX-nt;f=n.screenY-tt;o=i*l[2]+w;s=f*l[3]+b;o=o<5?5:o;s=s<5?5:s;(r.modifierPressed(n)||u.nodeName=="IMG"&&l[2]*l[3]!=0)&&(o=Math.round(s/d),s=Math.round(o*d));t.setStyles(h,{width:o,height:s});l[2]<0&&h.clientWidth<=o&&t.setStyle(h,"left",y+(w-o));l[3]<0&&h.clientHeight<=s&&t.setStyle(h,"top",p+(b-s))}function v(){function i(i,r){r&&(u.style[i]||!n.schema.isValid(u.nodeName.toLowerCase(),i)?t.setStyle(u,i,r):t.setAttrib(u,i,r))}i("width",o);i("height",s);t.unbind(c,"mousemove",k);t.unbind(c,"mouseup",v);a!=c&&(t.unbind(a,"mousemove",k),t.unbind(a,"mouseup",v));t.remove(h);it(u)}function it(n){var i,r,f;rt();i=t.getPos(n);y=i.x;p=i.y;r=n.offsetWidth;f=n.offsetHeight;u!=n&&(u=n,o=s=0);tinymce.each(g,function(n,i){var e;e=t.get("mceResizeHandle"+i);e?t.show(e):(e=t.add(c.documentElement,"div",{id:"mceResizeHandle"+i,"class":"mceResizeHandle",style:"cursor:"+i+"-resize; margin:0; padding:0"}),t.bind(e,"mousedown",function(i){i.preventDefault();v();nt=i.screenX;tt=i.screenY;w=u.clientWidth;b=u.clientHeight;d=b/w;l=n;h=u.cloneNode(!0);t.addClass(h,"mceClonedResizable");t.setStyles(h,{left:y,top:p,margin:0});c.documentElement.appendChild(h);t.bind(c,"mousemove",k);t.bind(c,"mouseup",v);a!=c&&(t.bind(a,"mousemove",k),t.bind(a,"mouseup",v))}));t.setStyles(e,{left:r*n[0]+y-e.offsetWidth/2,top:f*n[1]+p-e.offsetHeight/2})});tinymce.isOpera||u.nodeName!="IMG"||u.setAttribute("data-mce-selected","1")}function rt(){u&&u.removeAttribute("data-mce-selected");for(var n in g)t.hide("mceResizeHandle"+n)}function ut(){var n=t.getParent(i.getNode(),"table,img");tinymce.each(t.select("img[data-mce-selected]"),function(n){n.removeAttribute("data-mce-selected")});n?it(n):rt()}var y,p,u,h,l,nt,tt,w,b,d,g,o,s,a=document,c=n.getDoc();f.object_resizing&&f.webkit_fake_resize!==!1&&(e("enableObjectResizing",!1),g={n:[.5,0,0,-1],e:[1,.5,1,0],s:[.5,1,0,1],w:[0,.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},n.contentStyles.push(".mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}"),n.onNodeChange.add(ut),t.bind(c,"selectionchange",ut),n.serializer.addAttributeFilter("data-mce-selected",function(n,t){for(var i=n.length;i--;)n[i].attr(t,null)}))}var r=tinymce.VK,u=r.BACKSPACE,o=r.DELETE,t=n.dom,i=n.selection,f=n.settings;g();rt();a();tinymce.isWebKit&&(it(),l(),y(),w(),et(),tinymce.isIDevice?k():(c(),v()));tinymce.isIE&&(h(),d(),nt(),tt(),st(),ht());tinymce.isGecko&&(h(),p(),b(),ut(),ft(),ot());tinymce.isOpera&&c()},function(n){function c(n){var t;return t=document.createElement("div"),t.innerHTML=n,t.textContent||t.innerText||n}function e(n,i){var r,u,f,e={};if(n){for(n=n.split(","),i=i||10,r=0;r<n.length;r+=2)u=String.fromCharCode(parseInt(n[r],i)),t[u]||(f="&"+n[r+1]+";",e[u]=f,e[f]=u);return e}}var i,t,f,r=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=/[<>&\"\']/g,s=/&(#x|#)?([\w]+);/g,h={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};t={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"};f={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};i=e("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);n.html=n.html||{};n.html.Entities={encodeRaw:function(n,i){return n.replace(i?r:u,function(n){return t[n]||n})},encodeAllRaw:function(n){return(""+n).replace(o,function(n){return t[n]||n})},encodeNumeric:function(n,i){return n.replace(i?r:u,function(n){return n.length>1?"&#"+((n.charCodeAt(0)-55296)*1024+(n.charCodeAt(1)-56320)+65536)+";":t[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,f,e){return e=e||i,n.replace(f?r:u,function(n){return t[n]||e[n]||n})},getEncodeFunc:function(f,o){function h(n,i){return n.replace(i?r:u,function(n){return t[n]||o[n]||"&#"+n.charCodeAt(0)+";"||n})}function c(n,t){return s.encodeNamed(n,t,o)}var s=n.html.Entities;return(o=e(o)||i,f=n.makeMap(f.replace(/\+/g,",")),f.named&&f.numeric)?h:f.named?o?c:s.encodeNamed:f.numeric?s.encodeNumeric:s.encodeRaw},decode:function(n){return n.replace(s,function(n,t,r){return t?(r=parseInt(r,t.length===2?16:10),r>65535?(r-=65536,String.fromCharCode(55296+(r>>10),56320+(r&1023))):h[r]||String.fromCharCode(r)):f[n]||i[n]||c(n)})}}}(tinymce);tinymce.html.Styles=function(n,t){function h(n,t,i,r){function u(n){return n=parseInt(n).toString(16),n.length>1?n:"0"+n}return"#"+u(t)+u(i)+u(r)}var f=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,c=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,e=/\s*([^:]+):\s*([^;]+);?/g,o=/\s+$/,s,i,r={},u;for(n=n||{},u="\\\" \\' \\; \\: ; : ﻿".split(" "),i=0;i<u.length;i++)r[u[i]]="﻿"+i,r["﻿"+i]=u[i];return{toHex:function(n){return n.replace(f,h)},parse:function(t){function l(n,t){var r,u,f,e;(r=i[n+"-top"+t],r)&&(u=i[n+"-right"+t],r==u)&&(f=i[n+"-bottom"+t],u==f)&&(e=i[n+"-left"+t],f==e)&&(i[n+t]=e,delete i[n+"-top"+t],delete i[n+"-right"+t],delete i[n+"-bottom"+t],delete i[n+"-left"+t])}function y(n){var t=i[n],r;if(t&&!(t.indexOf(" ")<0)){for(t=t.split(" "),r=t.length;r--;)if(t[r]!==t[0])return!1;return i[n]=t[0],!0}}function d(n,t,r,u){y(t)&&y(r)&&y(u)&&(i[n]=i[t]+" "+i[r]+" "+i[u],delete i[t],delete i[r],delete i[u])}function b(n){return v=!0,r[n]}function p(n,t){return v&&(n=n.replace(/\uFEFF[0-9]/g,function(n){return r[n]})),t||(n=n.replace(/\\([\'\";:])/g,"$1")),n}function g(n,t,i,r,u,f){return(u=u||f,u)?(u=p(u),"'"+u.replace(/\'/g,"\\'")+"'"):(t=p(t||i||r),w&&(t=w.call(k,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')")}var i={},a,s,u,v,w=n.url_converter,k=n.url_converter_scope||this;if(t){for(t=t.replace(/\\[\"\';:\uFEFF]/g,b).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(n){return n.replace(/[;:]/g,b)});a=e.exec(t);)s=a[1].replace(o,"").toLowerCase(),u=a[2].replace(o,""),s&&u.length>0&&(s==="font-weight"&&u==="700"?u="bold":(s==="color"||s==="background-color")&&(u=u.toLowerCase()),u=u.replace(f,h),u=u.replace(c,g),i[s]=v?p(u,!0):u),e.lastIndex=a.index+a[0].length;l("border","");l("border","-width");l("border","-color");l("border","-style");l("padding","");l("margin","");d("border","border-width","border-style","border-color");i.border==="medium none"&&delete i.border}return i},serialize:function(n,i){function e(i){var u,f,o,e;if(u=t.styles[i],u)for(f=0,o=u.length;f<o;f++)i=u[f],e=n[i],e!==s&&e.length>0&&(r+=(r.length>0?" ":"")+i+": "+e+";")}var r="",f,u;if(i&&t&&t.styles)e("*"),e(i);else for(f in n)u=n[f],u!==s&&u.length>0&&(r+=(r.length>0?" ":"")+f+": "+u+";");return r}}},function(n){function i(n,t){return n.split(t||",")}function f(n,t){function f(t){return t.replace(/[A-Z]+/g,function(t){return f(n[t])})}var u,e={};for(u in n)n.hasOwnProperty(u)&&(n[u]=f(n[u]));return f(t).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(n,t,u,f){u=i(u,"|");e[t]={attributes:r(u),attributesOrder:u,children:r(f,"|",{"#comment":{}})}}),e}function e(){var n=u.html5;return n||(n=u.html5=f({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")),n}function o(){var n=u.html4;return n||(n=u.html4=f({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")),n}var u={},r=n.makeMap,t=n.each;n.html.Schema=function(f){function l(t,i,e){var o=f[t];return o?o=r(o,",",r(o.toUpperCase()," ")):(o=u[t],o||(o=r(i," ",r(i.toUpperCase()," ")),o=n.extend(o,e),u[t]=o)),o}function ut(n){return new RegExp("^"+n.replace(/([?+*])/g,".$1")+"$")}function v(t){var b,it,k,rt,f,u,o,v,y,e,d,l,s,c,g,p,nt,tt,w,ft=/[*?+]/;if(t)for(t=i(t),h["@"]&&(p=h["@"].attributes,nt=h["@"].attributesOrder),b=0,it=t.length;b<it;b++)if(f=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/.exec(t[b]),f){if(c=f[1],y=f[2],g=f[3],v=f[4],l={},s=[],u={attributes:l,attributesOrder:s},c==="#"&&(u.paddEmpty=!0),c==="-"&&(u.removeEmpty=!0),p){for(tt in p)l[tt]=p[tt];s.push.apply(s,nt)}if(v)for(v=i(v,"|"),k=0,rt=v.length;k<rt;k++)if(f=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/.exec(v[k]),f){if(o={},d=f[1],e=f[2].replace(/::/g,":"),c=f[3],w=f[4],d==="!"&&(u.attributesRequired=u.attributesRequired||[],u.attributesRequired.push(e),o.required=!0),d==="-"){delete l[e];s.splice(n.inArray(s,e),1);continue}c&&(c==="="&&(u.attributesDefault=u.attributesDefault||[],u.attributesDefault.push({name:e,value:w}),o.defaultValue=w),c===":"&&(u.attributesForced=u.attributesForced||[],u.attributesForced.push({name:e,value:w}),o.forcedValue=w),c==="<"&&(o.validValues=r(w,"?")));ft.test(e)?(u.attributePatterns=u.attributePatterns||[],o.pattern=ut(e),u.attributePatterns.push(o)):(l[e]||s.push(e),l[e]=o)}p||y!="@"||(p=l,nt=s);g&&(u.outputName=y,h[g]=u);ft.test(y)?(u.pattern=ut(y),a.push(u)):h[y]=u}}function ft(n){h={};a=[];v(n);t(p,function(n,t){c[t]=n.children})}function et(n){var r=/^(~)?(.+)$/;n&&t(i(n),function(n){var f=r.exec(n),e=f[1]==="~",i=e?"span":"div",u=f[2];c[u]=c[i];rt[u]=i;e||(b[u]={});t(c,function(n){n[i]&&(n[u]=n[i])})})}function k(n){var r=/^([+\-]?)(\w+)\[([^\]]+)\]$/;n&&t(i(n),function(n){var u=r.exec(n),f,e;u&&(e=u[1],f=e?c[u[2]]:c[u[2]]={"#comment":{}},f=c[u[2]],t(i(u[3],"|"),function(n){e==="-"?delete f[n]:f[n]={}}))})}function d(n){var t=h[n],i;if(t)return t;for(i=a.length;i--;)if(t=a[i],t.pattern.test(n))return t}var s=this,h={},c={},a=[],y,p,g,nt,w,tt,b,it,rt={};f=f||{};p=f.schema=="html5"?e():o();f.verify_html===!1&&(f.valid_elements="*[*]");f.valid_styles&&(y={},t(f.valid_styles,function(t,i){y[i]=n.explode(t)}));g=l("whitespace_elements","pre script style textarea");nt=l("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");w=l("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");tt=l("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");it=l("non_empty_elements","td th iframe video audio object",w);b=l("block_elements","h1 h2 h3 h4 h5 h6 hr p div address pre form table tbody thead tfoot th tr td li ol ul caption blockquote center dl dt dd dir fieldset noscript menu isindex samp header footer article section hgroup aside nav figure option datalist select optgroup");f.valid_elements?ft(f.valid_elements):(t(p,function(n,t){h[t]={attributes:n.attributes,attributesOrder:n.attributesOrder};c[t]=n.children}),f.schema!="html5"&&t(i("strong/b,em/i"),function(n){n=i(n,"/");h[n[1]].outputName=n[0]}),h.img.attributesDefault=[{name:"alt",value:""}],t(i("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(n){h[n]&&(h[n].removeEmpty=!0)}),t(i("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(n){h[n].paddEmpty=!0}));et(f.custom_elements);k(f.valid_children);v(f.extended_valid_elements);k("+ol[ul|ol],+ul[ul|ol]");f.invalid_elements&&n.each(n.explode(f.invalid_elements),function(n){h[n]&&delete h[n]});d("span")||v("span[!data-mce-type|*]");s.children=c;s.styles=y;s.getBoolAttrs=function(){return tt};s.getBlockElements=function(){return b};s.getShortEndedElements=function(){return w};s.getSelfClosingElements=function(){return nt};s.getNonEmptyElements=function(){return it};s.getWhiteSpaceElements=function(){return g};s.isValidChild=function(n,t){var i=c[n];return!!(i&&i[t])};s.isValid=function(n,t){var i,r,u=d(n);if(u)if(t){if(u.attributes[t])return!0;if(i=u.attributePatterns,i)for(r=i.length;r--;)if(i[r].pattern.test(n))return!0}else return!0;return!1};s.getElementRule=d;s.getCustomElements=function(){return rt};s.addValidElements=v;s.setValidElements=ft;s.addCustomElements=et;s.addValidChildren=k}}(tinymce),function(n){n.html.SaxParser=function(t,i){var r=this,u=function(){};t=t||{};r.schema=i=i||new n.html.Schema;t.fix_self_closing!==!1&&(t.fix_self_closing=!0);n.each("comment cdata text start end pi doctype".split(" "),function(n){n&&(r[n]=t[n]||u)});r.parse=function(r){function kt(n){for(var i,t=c.length;t--;)if(c[t].name===n)break;if(t>=0){for(i=c.length-1;i>=t;i--)n=c[i],n.valid&&h.end(n.name);c.length=t}}function dt(n,t,i,r,u){var f,o;if(t=t.toLowerCase(),i=t in lt?t:ot(i||r||u||""),b&&!d&&t.indexOf("data-")!==0){if(f=at[t],!f&&g){for(o=g.length;o--;)if(f=g[o],f.pattern.test(t))break;o===-1&&(f=null)}if(!f)return;if(f.validValues&&!(i in f.validValues))return}e.map[t]=i;e.push({name:t,value:i})}var h=this,f,s=0,u,rt,c=[],e,o,k,v,d,ht,ct,lt,ut,b,y,l,p,w,ft,at,g,nt,tt,it,vt,et,yt,pt,a,wt=0,ot=n.html.Entities.decode,bt,st;for(et=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),yt=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g,pt={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi},ct=i.getShortEndedElements(),vt=t.self_closing_elements||i.getSelfClosingElements(),lt=i.getBoolAttrs(),b=t.validate,ht=t.remove_internals,bt=t.fix_self_closing,st=n.isIE,ft=/^:/;f=et.exec(r);){if(s<f.index&&h.text(ot(r.substr(s,f.index-s))),u=f[6])u=u.toLowerCase(),st&&ft.test(u)&&(u=u.substr(1)),kt(u);else if(u=f[7]){if(u=u.toLowerCase(),st&&ft.test(u)&&(u=u.substr(1)),ut=u in ct,bt&&vt[u]&&c.length>0&&c[c.length-1].name===u&&kt(u),!b||(y=i.getElementRule(u))){if(l=!0,b&&(at=y.attributes,g=y.attributePatterns),(w=f[8])?(d=w.indexOf("data-mce-type")!==-1,d&&ht&&(l=!1),e=[],e.map={},w.replace(yt,dt)):(e=[],e.map={}),b&&!d){if(nt=y.attributesRequired,tt=y.attributesDefault,it=y.attributesForced,it)for(o=it.length;o--;)p=it[o],v=p.name,a=p.value,a==="{$uid}"&&(a="mce_"+wt++),e.map[v]=a,e.push({name:v,value:a});if(tt)for(o=tt.length;o--;)p=tt[o],v=p.name,v in e.map||(a=p.value,a==="{$uid}"&&(a="mce_"+wt++),e.map[v]=a,e.push({name:v,value:a}));if(nt){for(o=nt.length;o--;)if(nt[o]in e.map)break;o===-1&&(l=!1)}e.map["data-mce-bogus"]&&(l=!1)}l&&h.start(u,e,ut)}else l=!1;if(rt=pt[u]){rt.lastIndex=s=f.index+f[0].length;(f=rt.exec(r))?(l&&(k=r.substr(s,f.index-s)),s=f.index+f[0].length):(k=r.substr(s),s=r.length);l&&k.length>0&&h.text(k,!0);l&&h.end(u);et.lastIndex=s;continue}ut||(w&&w.indexOf("/")==w.length-1?l&&h.end(u):c.push({name:u,valid:l}))}else(u=f[1])?h.comment(u):(u=f[2])?h.cdata(u):(u=f[3])?h.doctype(u):(u=f[4])&&h.pi(u,f[5]);s=f.index+f[0].length}for(s<r.length&&h.text(ot(r.substr(s))),o=c.length-1;o>=0;o--)u=c[o],u.valid&&h.end(u.name)}}}(tinymce),function(n){function i(n,t,i){var r,u,f=i?"lastChild":"firstChild",e=i?"prev":"next";if(n[f])return n[f];if(n!==t){if(r=n[e],r)return r;for(u=n.parent;u&&u!==t;u=u.parent)if(r=u[e],r)return r}}function t(n,t){this.name=n;this.type=t;t===1&&(this.attributes=[],this.attributes.map={})}var r=/^[ \t\r\n]*$/,u={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};n.extend(t.prototype,{replace:function(n){var t=this;return n.parent&&n.remove(),t.insert(n,t),t.remove(),t},attr:function(n,t){var u=this,i,r,f;if(typeof n!="string"){for(r in n)u.attr(r,n[r]);return u}if(i=u.attributes){if(t!==f){if(t===null){if(n in i.map)for(delete i.map[n],r=i.length;r--;)if(i[r].name===n)return i=i.splice(r,1),u;return u}if(n in i.map){for(r=i.length;r--;)if(i[r].name===n){i[r].value=t;break}}else i.push({name:n,value:t});return i.map[n]=t,u}return i.map[n]}},clone:function(){var r=this,u=new t(r.name,r.type),f,o,e,n,i;if(e=r.attributes){for(i=[],i.map={},f=0,o=e.length;f<o;f++)n=e[f],n.name!=="id"&&(i[i.length]={name:n.name,value:n.value},i.map[n.name]=n.value);u.attributes=i}return u.value=r.value,u.shortEnded=r.shortEnded,u},wrap:function(n){var t=this;return t.parent.insert(n,t),n.append(t),t},unwrap:function(){for(var t=this,i,n=t.firstChild;n;)i=n.next,t.insert(n,t,!0),n=i;t.remove()},remove:function(){var n=this,t=n.parent,i=n.next,r=n.prev;return t&&(t.firstChild===n?(t.firstChild=i,i&&(i.prev=null)):r.next=i,t.lastChild===n?(t.lastChild=r,r&&(r.next=null)):i.prev=r,n.parent=n.next=n.prev=null),n},append:function(n){var t=this,i;return n.parent&&n.remove(),i=t.lastChild,i?(i.next=n,n.prev=i,t.lastChild=n):t.lastChild=t.firstChild=n,n.parent=t,n},insert:function(n,t,i){var r;return n.parent&&n.remove(),r=t.parent||this,i?(t===r.firstChild?r.firstChild=n:t.prev.next=n,n.prev=t.prev,n.next=t,t.prev=n):(t===r.lastChild?r.lastChild=n:t.next.prev=n,n.next=t.next,n.prev=t,t.next=n),n.parent=r,n},getAll:function(n){for(var r=this,u=[],t=r.firstChild;t;t=i(t,r))t.name===n&&u.push(t);return u},empty:function(){var t=this,r,u,n;if(t.firstChild){for(r=[],n=t.firstChild;n;n=i(n,t))r.push(n);for(u=r.length;u--;)n=r[u],n.parent=n.firstChild=n.lastChild=n.next=n.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(n){var e=this,t=e.firstChild,u,f;if(t)do{if(t.type===1){if(t.attributes.map["data-mce-bogus"])continue;if(n[t.name])return!1;for(u=t.attributes.length;u--;)if(f=t.attributes[u].name,f==="name"||f.indexOf("data-")===0)return!1}if(t.type===8||t.type===3&&!r.test(t.value))return!1}while(t=i(t,e));return!0},walk:function(n){return i(this,null,n)}});n.extend(t,{create:function(n,i){var r,f;if(r=new t(n,u[n]||1),i)for(f in i)r.attr(f,i[f]);return r}});n.html.Node=t}(tinymce),function(n){var t=n.html.Node;n.html.DomParser=function(i,r){function h(i){var v,f,e,o,y,l,a,c,h,p,w,s,b;for(w=n.makeMap("tr,td,th,tbody,thead,tfoot,table"),p=r.getNonEmptyElements(),v=0;v<i.length;v++)if(f=i[v],f.parent){for(o=[f],e=f.parent;e&&!r.isValidChild(e.name,f.name)&&!w[e.name];e=e.parent)o.push(e);if(e&&o.length>1){for(o.reverse(),y=l=u.filterNode(o[0].clone()),h=0;h<o.length-1;h++){for(r.isValidChild(l.name,o[h].name)?(a=u.filterNode(o[h].clone()),l.append(a)):a=l,c=o[h].firstChild;c&&c!=o[h+1];)b=c.next,a.append(c),c=b;l=a}y.isEmpty(p)?e.insert(f,o[0],!0):(e.insert(y,o[0],!0),e.insert(f,y));e=o[0];(e.isEmpty(p)||e.firstChild===e.lastChild&&e.firstChild.name==="br")&&e.empty().remove()}else if(f.parent){if(f.name==="li"){if(s=f.prev,s&&(s.name==="ul"||s.name==="ul")){s.append(f);continue}if(s=f.next,s&&(s.name==="ul"||s.name==="ul")){s.insert(f,s.firstChild,!0);continue}f.wrap(u.filterNode(new t("ul",1)));continue}r.isValidChild(f.parent.name,"div")&&r.isValidChild("div",f.name)?f.wrap(u.filterNode(new t("div",1))):f.name==="style"||f.name==="script"?f.empty().remove():f.unwrap()}}}var u=this,s={},f=[],e={},o={};i=i||{};i.validate="validate"in i?i.validate:!0;i.root_name=i.root_name||"body";u.schema=r=r||new n.html.Schema;u.filterNode=function(n){var r,t,i;for((t in s)&&(i=e[t],i?i.push(n):e[t]=[n]),r=f.length;r--;)t=f[r].name,t in n.attributes.map&&(i=o[t],i?i.push(n):o[t]=[n]);return n};u.addNodeFilter=function(t,i){n.each(n.explode(t),function(n){var t=s[n];t||(s[n]=t=[]);t.push(i)})};u.addAttributeFilter=function(t,i){n.each(n.explode(t),function(n){for(var t=0;t<f.length;t++)if(f[t].name===n){f[t].callbacks.push(i);return}f.push({name:n,callbacks:[i]})})};u.parse=function(u,c){function yt(){for(var n=k.firstChild,i,t;n;)i=n.next,n.type!=3&&(n.type!=1||n.name==="p"||g[n.name]||n.attr("data-mce-type"))?t=null:t?t.append(n):(t=w(st,1),k.insert(t,n),t.append(n)),n=i}function w(n,i){var r=new t(n,i),u;return n in s&&(u=e[n],u?u.push(r):e[n]=[r]),r}function ht(n){for(var i,r,t=n.prev;t&&t.type===3;)i=t.value.replace(ut,""),i.length>0?(t.value=i,t=t.prev):(r=t.prev,t.remove(),t=r)}function pt(n){var t,i={};for(t in n)t!=="li"&&t!="p"&&(i[t]=n[t]);return i}var ct,k,l,y,p,nt,a,lt,v,tt,d,g,it,rt=[],b,ut,at,ft,et,ot,vt,st;if(c=c||{},e={},o={},g=n.extend(n.makeMap("script,style,head,html,body,title,meta,param"),r.getBlockElements()),vt=r.getNonEmptyElements(),ot=r.children,d=i.validate,st="forced_root_block"in c?c.forced_root_block:i.forced_root_block,et=r.getWhiteSpaceElements(),it=/^[ \t\r\n]+/,ut=/[ \t\r\n]+$/,at=/[ \t\r\n]+/g,ft=/^[ \t\r\n]+$/,ct=new n.html.SaxParser({validate:d,self_closing_elements:pt(r.getSelfClosingElements()),cdata:function(n){l.append(w("#cdata",4)).value=n},text:function(n,t){var i;b||(n=n.replace(at," "),l.lastChild&&g[l.lastChild.name]&&(n=n.replace(it,"")));n.length!==0&&(i=w("#text",3),i.raw=!!t,l.append(i).value=n)},comment:function(n){l.append(w("#comment",8)).value=n},pi:function(n,t){l.append(w(n,7)).value=t;ht(l)},doctype:function(n){var t;t=l.append(w("#doctype",10));t.value=n;ht(l)},start:function(n,t,i){var u,s,h,e,c;if(h=d?r.getElementRule(n):{},h){for(u=w(h.outputName||n,1),u.attributes=t,u.shortEnded=i,l.append(u),c=ot[l.name],c&&ot[u.name]&&!c[u.name]&&rt.push(u),s=f.length;s--;)e=f[s].name,e in t.map&&(v=o[e],v?v.push(u):o[e]=[u]);g[n]&&ht(u);i||(l=u);!b&&et[n]&&(b=!0)}},end:function(n){var i,e,u,f,o;if(e=d?r.getElementRule(n):{},e){if(g[n]){if(!b){if(i=l.firstChild,i&&i.type===3)for(u=i.value.replace(it,""),u.length>0?(i.value=u,i=i.next):(f=i.next,i.remove(),i=f);i&&i.type===3;)u=i.value,f=i.next,(u.length===0||ft.test(u))&&(i.remove(),i=f),i=f;if(i=l.lastChild,i&&i.type===3)for(u=i.value.replace(ut,""),u.length>0?(i.value=u,i=i.prev):(f=i.prev,i.remove(),i=f);i&&i.type===3;)u=i.value,f=i.prev,(u.length===0||ft.test(u))&&(i.remove(),i=f),i=f}i=l.prev;i&&i.type===3&&(u=i.value.replace(it,""),u.length>0?i.value=u:i.remove())}if(b&&et[n]&&(b=!1),(e.removeEmpty||e.paddEmpty)&&l.isEmpty(vt))if(e.paddEmpty)l.empty().append(new t("#text","3")).value=" ";else if(!l.attributes.map.name&&!l.attributes.map.id){o=l.parent;l.empty().remove();l=o;return}l=l.parent}}},r),k=l=new t(c.context||i.root_name,11),ct.parse(u),d&&rt.length&&(c.context?c.invalid=!0:h(rt)),st&&k.name=="body"&&yt(),!c.invalid){for(tt in e){for(v=s[tt],y=e[tt],a=y.length;a--;)y[a].parent||y.splice(a,1);for(p=0,nt=v.length;p<nt;p++)v[p](y,tt,c)}for(p=0,nt=f.length;p<nt;p++)if(v=f[p],v.name in o){for(y=o[v.name],a=y.length;a--;)y[a].parent||y.splice(a,1);for(a=0,lt=v.callbacks.length;a<lt;a++)v.callbacks[a](y,v.name,c)}}return k};i.remove_trailing_brs&&u.addNodeFilter("br",function(t){var o,c=t.length,u,h=n.extend({},r.getBlockElements()),l=r.getNonEmptyElements(),i,e,f,s;for(h.body=1,o=0;o<c;o++)if(u=t[o],i=u.parent,h[u.parent.name]&&u===i.lastChild){for(f=u.prev;f;){if(s=f.name,s!=="span"||f.attr("data-mce-type")!=="bookmark"){if(s!=="br")break;if(s==="br"){u=null;break}}f=f.prev}u&&(u.remove(),i.isEmpty(l)&&(elementRule=r.getElementRule(i.name),elementRule&&(elementRule.removeEmpty?i.remove():elementRule.paddEmpty&&(i.empty().append(new n.html.Node("#text",3)).value=" "))))}else{for(e=u;i.firstChild===e&&i.lastChild===e;){if(e=i,h[i.name])break;i=i.parent}e===i&&(textNode=new n.html.Node("#text",3),textNode.value=" ",u.replace(textNode))}});i.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(n){for(var r=n.length,i,u,f,t;r--;)if(t=n[r],t.name==="a"&&t.firstChild&&!t.attr("href")){f=t.parent;i=t.lastChild;do u=i.prev,f.insert(i,t),i=u;while(i)}})}}(tinymce);tinymce.html.Writer=function(n){var t=[],i,f,r,u,e;return n=n||{},i=n.indent,f=tinymce.makeMap(n.indent_before||""),r=tinymce.makeMap(n.indent_after||""),u=tinymce.html.Entities.getEncodeFunc(n.entity_encoding||"raw",n.entities),e=n.element_format=="html",{start:function(n,o,s){var c,a,l,h;if(i&&f[n]&&t.length>0&&(h=t[t.length-1],h.length>0&&h!=="\n"&&t.push("\n")),t.push("<",n),o)for(c=0,a=o.length;c<a;c++)l=o[c],t.push(" ",l.name,'="',u(l.value,!0),'"');t[t.length]=!s||e?">":" />";s&&i&&r[n]&&t.length>0&&(h=t[t.length-1],h.length>0&&h!=="\n"&&t.push("\n"))},end:function(n){var u;t.push("<\/",n,">");i&&r[n]&&t.length>0&&(u=t[t.length-1],u.length>0&&u!=="\n"&&t.push("\n"))},text:function(n,i){n.length>0&&(t[t.length]=i?n:u(n))},cdata:function(n){t.push("<![CDATA[",n,"]\]>")},comment:function(n){t.push("<!--",n,"-->")},pi:function(n,r){r?t.push("<?",n," ",r,"?>"):t.push("<?",n,"?>");i&&t.push("\n")},doctype:function(n){t.push("<!DOCTYPE",n,">",i?"\n":"")},reset:function(){t.length=0},getContent:function(){return t.join("").replace(/\n$/,"")}}},function(n){n.html.Serializer=function(t,i){var u=this,r=new n.html.Writer(t);t=t||{};t.validate="validate"in t?t.validate:!0;u.schema=i=i||new n.html.Schema;u.writer=r;u.serialize=function(n){function f(n){var y=u[n.type],p,a,t,o,c,s,h,l,v;if(y)y(n);else{if(p=n.name,a=n.shortEnded,t=n.attributes,e&&t&&t.length>1){for(s=[],s.map={},v=i.getElementRule(n.name),h=0,l=v.attributesOrder.length;h<l;h++)o=v.attributesOrder[h],o in t.map&&(c=t.map[o],s.map[o]=c,s.push({name:o,value:c}));for(h=0,l=t.length;h<l;h++)o=t[h].name,o in s.map||(c=t.map[o],s.map[o]=c,s.push({name:o,value:c}));t=s}if(r.start(n.name,t,a),!a){if(n=n.firstChild)do f(n);while(n=n.next);r.end(p)}}}var u,e;return e=t.validate,u={3:function(n){r.text(n.value,n.raw)},8:function(n){r.comment(n.value)},7:function(n){r.pi(n.name,n.value)},10:function(n){r.doctype(n.value)},4:function(n){r.cdata(n.value)},11:function(n){if(n=n.firstChild)do f(n);while(n=n.next)}},r.reset(),n.type!=1||t.inner?u[11](n):f(n),r.getContent()}}}(tinymce);tinymce.dom={},function(n,t){function u(n,t,i,r){n.addEventListener?n.addEventListener(t,i,r||!1):n.attachEvent&&n.attachEvent("on"+t,i)}function f(n,t,i,r){n.removeEventListener?n.removeEventListener(t,i,r||!1):n.detachEvent&&n.detachEvent("on"+t,i)}function i(n,t){function u(){return!1}function f(){return!0}var r,i=t||{};for(r in n)r!=="layerX"&&r!=="layerY"&&(i[r]=n[r]);return i.target||(i.target=i.srcElement||document),i.preventDefault=function(){i.isDefaultPrevented=f;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},i.stopPropagation=function(){i.isPropagationStopped=f;n&&(n.stopPropagation?n.stopPropagation():n.cancelBubble=!0)},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=f;i.stopPropagation()},i.isDefaultPrevented||(i.isDefaultPrevented=u,i.isPropagationStopped=u,i.isImmediatePropagationStopped=u),i}function o(n,t,i){function o(){i.domLoaded||(i.domLoaded=!0,t(s))}var e=n.document,s={type:"ready"};r?u(n,"DOMContentLoaded",o):(u(e,"readystatechange",function(){e.readyState==="complete"&&(f(e,"readystatechange",arguments.callee),o())}),e.documentElement.doScroll&&n===n.top&&function(){try{e.documentElement.doScroll("left")}catch(n){setTimeout(arguments.callee,0);return}o()}());u(n,"load",o)}function e(n){function h(n,t){var i,r,f,u;if(i=s[t][n.type],i)for(r=0,f=i.length;r<f;r++)if(u=i[r],u&&u.func.call(u.scope,n)===!1&&n.preventDefault(),n.isImmediatePropagationStopped())return}var e=this,s={},c,l,a,v;a="onmouseenter"in document.documentElement;l="onfocusin"in document.documentElement;v={mouseenter:"mouseover",mouseleave:"mouseout"};c=1;e.domLoaded=!1;e.events=s;e.bind=function(f,y,p,w){function ut(n){h(i(n||rt.event),k)}var k,d,it,b,g,nt,tt,rt=window;if(f&&f.nodeType!==3&&f.nodeType!==8){for(f[t]?(k=f[t],s[k]||(s[k]={})):(k=c++,f[t]=k,s[k]={}),w=w||f,y=y.split(" "),it=y.length;it--;){if(b=y[it],nt=ut,g=tt=!1,b==="DOMContentLoaded"&&(b="ready"),(e.domLoaded||f.readyState=="complete")&&b==="ready"){e.domLoaded=!0;p.call(w,i({type:b}));continue}a||(g=v[b],g&&(nt=function(n){var r,t;if(r=n.currentTarget,t=n.relatedTarget,t&&r.contains)t=r.contains(t);else while(t&&t!==r)t=t.parentNode;t||(n=i(n||rt.event),n.type=n.type==="mouseout"?"mouseleave":"mouseenter",n.target=r,h(n,k))}));l||b!=="focusin"&&b!=="focusout"||(tt=!0,g=b==="focusin"?"focus":"blur",nt=function(n){n=i(n||rt.event);n.type=n.type==="focus"?"focusin":"focusout";h(n,k)});d=s[k][b];d?d.push({func:p,scope:w}):(s[k][b]=d=[{func:p,scope:w}],d.fakeName=g,d.capture=tt,d.nativeHandler=nt,r||(d.proxyHandler=n(k)),b==="ready"?o(f,nt,e):u(f,g||b,r?nt:d.proxyHandler,tt))}return f=d=0,p}};e.unbind=function(n,i,u){var l,o,v,a,h,c;if(!n||n.nodeType===3||n.nodeType===8)return e;if(l=n[t],l){if(c=s[l],i){for(i=i.split(" "),v=i.length;v--;)if(h=i[v],o=c[h],o){if(u)for(a=o.length;a--;)o[a].func===u&&o.splice(a,1);u&&o.length!==0||(delete c[h],f(n,o.fakeName||h,r?o.nativeHandler:o.proxyHandler,o.capture))}}else{for(h in c)o=c[h],f(n,o.fakeName||h,r?o.nativeHandler:o.proxyHandler,o.capture);c={}}for(h in c)return e;delete s[l];try{delete n[t]}catch(y){n[t]=null}}return e};e.fire=function(n,r,u){var o,f;if(!n||n.nodeType===3||n.nodeType===8)return e;f=i(null,u);f.type=r;do o=n[t],o&&h(f,o),n=n.parentNode||n.ownerDocument||n.defaultView||n.parentWindow;while(n&&!f.isPropagationStopped());return e};e.clean=function(n){var i,r,u=e.unbind;if(!n||n.nodeType===3||n.nodeType===8)return e;if(n[t]&&u(n),n.getElementsByTagName||(n=n.document),n&&n.getElementsByTagName)for(u(n),r=n.getElementsByTagName("*"),i=r.length;i--;)n=r[i],n[t]&&u(n);return e};e.callNativeHandler=function(n,t){s&&s[n][t.type].nativeHandler(t)};e.destory=function(){s={}};e.add=function(n,t,i,r){if(typeof n=="string"&&(n=document.getElementById(n)),n&&n instanceof Array){for(var u=n.length;u--;)e.add(n[u],t,i,r);return}return t==="init"&&(t="ready"),e.bind(n,t instanceof Array?t.join(" "):t,i,r)};e.remove=function(n,t,i,r){if(!n)return e;if(typeof n=="string"&&(n=document.getElementById(n)),n instanceof Array){for(var u=n.length;u--;)e.remove(n[u],t,i,r);return e}return e.unbind(n,t instanceof Array?t.join(" "):t,i)};e.clear=function(n){return typeof n=="string"&&(n=document.getElementById(n)),e.clean(n)};e.cancel=function(n){return n&&(e.prevent(n),e.stop(n)),!1};e.prevent=function(n){return n.preventDefault||(n=i(n)),n.preventDefault(),!1};e.stop=function(n){return n.stopPropagation||(n=i(n)),n.stopPropagation(),!1}}var r=!!document.addEventListener;n.EventUtils=e;n.Event=new e(function(n){return function(t){tinymce.dom.Event.callNativeHandler(n,t)}});n.Event.bind(window,"ready",function(){});n=0}(tinymce.dom,"data-mce-expando");tinymce.dom.TreeWalker=function(n,t){function r(n,i,r,u){var f,e;if(n){if(!u&&n[i])return n[i];if(n!=t){if(f=n[r],f)return f;for(e=n.parentNode;e&&e!=t;e=e.parentNode)if(f=e[r],f)return f}}}var i=n;this.current=function(){return i};this.next=function(n){return i=r(i,"firstChild","nextSibling",n)};this.prev=function(n){return i=r(i,"lastChild","previousSibling",n)}},function(n){var t=n.each,r=n.is,f=n.isWebKit,i=n.isIE,u=n.html.Entities,e=/^([a-z0-9],?)+$/i,o=/^[ \t\r\n]*$/;n.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(t,i){var r=this,u;if(r.doc=t,r.win=window,r.files={},r.cssFlicker=!1,r.counter=0,r.stdMode=!n.isIE||t.documentMode>=8,r.boxModel=!n.isIE||t.compatMode=="CSS1Compat"||r.stdMode,r.hasOuterHTML="outerHTML"in t.createElement("a"),r.settings=i=n.extend({keep_values:!1,hex_colors:1},i),r.schema=i.schema,r.styles=new n.html.Styles({url_converter:i.url_converter,url_converter_scope:i.url_converter_scope},i.schema),n.isIE6)try{t.execCommand("BackgroundImageCache",!1,!0)}catch(f){r.cssFlicker=!0}r.fixDoc(t);r.events=i.ownEvents?new n.dom.EventUtils(i.proxy):n.dom.Event;n.addUnload(r.destroy,r);u=i.schema?i.schema.getBlockElements():{};r.isBlock=function(n){var t=n.nodeType;return t?!!(t===1&&u[n.nodeName]):!!u[n]}},fixDoc:function(n){var t=this.settings,r;if(i&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){n.createElement(t)});for(r in t.schema.getCustomElements())n.createElement(r)}},clone:function(n,r){var u=this,f,e;return!i||n.nodeType!==1||r?n.cloneNode(r):(e=u.doc,!r)?(f=e.createElement(n.nodeName),t(u.getAttribs(n),function(t){u.setAttrib(f,t.nodeName,u.getAttrib(n,t.nodeName))}),f):f.firstChild},getRoot:function(){var n=this,t=n.settings;return t&&n.get(t.root_element)||n.doc.body},getViewPort:function(n){var i,t;return n=n?n:this.win,i=n.document,t=this.boxModel?i.documentElement:i.body,{x:n.pageXOffset||t.scrollLeft,y:n.pageYOffset||t.scrollTop,w:n.innerWidth||t.clientWidth,h:n.innerHeight||t.clientHeight}},getRect:function(n){var t,i=this,r;return n=i.get(n),t=i.getPos(n),r=i.getSize(n),{x:t.x,y:t.y,w:r.w,h:r.h}},getSize:function(n){var r=this,t,i;return n=r.get(n),t=r.getStyle(n,"width"),i=r.getStyle(n,"height"),t.indexOf("px")===-1&&(t=0),i.indexOf("px")===-1&&(i=0),{w:parseInt(t,10)||n.offsetWidth||n.clientWidth,h:parseInt(i,10)||n.offsetHeight||n.clientHeight}},getParent:function(n,t,i){return this.getParents(n,t,i,!1)},getParents:function(n,t,i,u){var f=this,e,s=f.settings,o=[];for(n=f.get(n),u=u===undefined,s.strict_root&&(i=i||f.getRoot()),r(t,"string")&&(e=t,t=t==="*"?function(n){return n.nodeType==1}:function(n){return f.is(n,e)});n;){if(n==i||!n.nodeType||n.nodeType===9)break;if(!t||t(n))if(u)o.push(n);else return n;n=n.parentNode}return u?o:null},get:function(n){var t;return n&&this.doc&&typeof n=="string"&&(t=n,n=this.doc.getElementById(n),n&&n.id!==t)?this.doc.getElementsByName(t)[1]:n},getNext:function(n,t){return this._findSib(n,t,"nextSibling")},getPrev:function(n,t){return this._findSib(n,t,"previousSibling")},select:function(t,i){var r=this;return n.dom.Sizzle(t,r.get(i)||r.get(r.settings.root_element)||r.doc,[])},is:function(t,i){var r;if(t.length===undefined){if(i==="*")return t.nodeType==1;if(e.test(i)){for(i=i.toLowerCase().split(/,/),t=t.nodeName.toLowerCase(),r=i.length-1;r>=0;r--)if(i[r]==t)return!0;return!1}}return n.dom.Sizzle.matches(i,t.nodeType?[t]:t).length>0},add:function(n,t,i,u,f){var e=this;return this.run(n,function(n){var o;return o=r(t,"string")?e.doc.createElement(t):t,e.setAttribs(o,i),u&&(u.nodeType?o.appendChild(u):e.setHTML(o,u)),f?o:n.appendChild(o)})},create:function(n,t,i){return this.add(this.doc.createElement(n),n,t,i,1)},createHTML:function(n,t,i){var r="",f=this,u;r+="<"+n;for(u in t)t.hasOwnProperty(u)&&(r+=" "+u+'="'+f.encode(t[u])+'"');return typeof i!="undefined"?r+">"+i+"<\/"+n+">":r+" />"},remove:function(t,i){return this.run(t,function(t){var r,u=t.parentNode;if(!u)return null;if(i)while(r=t.firstChild)!n.isIE||r.nodeType!==3||r.nodeValue?u.insertBefore(r,t):t.removeChild(r);return u.removeChild(t)})},setStyle:function(t,r,u){var f=this;return f.run(t,function(e){var o;o=e.style;r=r.replace(/-(\D)/g,function(n,t){return t.toUpperCase()});f.pixelStyles.test(r)&&(n.is(u,"number")||/^[\-0-9\.]+$/.test(u))&&(u+="px");switch(r){case"opacity":i&&(o.filter=u===""?"":"alpha(opacity="+u*100+")",t.currentStyle&&t.currentStyle.hasLayout||(o.display="inline-block"));o[r]=o["-moz-opacity"]=o["-khtml-opacity"]=u||"";break;case"float":i?o.styleFloat=u:o.cssFloat=u;break;default:o[r]=u||""}f.settings.update_styles&&f.setAttrib(e,"data-mce-style")})},getStyle:function(n,t,r){if(n=this.get(n),n){if(this.doc.defaultView&&r){t=t.replace(/[A-Z]/g,function(n){return"-"+n});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(t)}catch(u){return null}}return(t=t.replace(/-(\D)/g,function(n,t){return t.toUpperCase()}),t=="float"&&(t=i?"styleFloat":"cssFloat"),n.currentStyle&&r)?n.currentStyle[t]:n.style?n.style[t]:undefined}},setStyles:function(n,i){var u=this,r=u.settings,f;f=r.update_styles;r.update_styles=0;t(i,function(t,i){u.setStyle(n,i,t)});r.update_styles=f;r.update_styles&&u.setAttrib(n,r.cssText)},removeAllAttribs:function(n){return this.run(n,function(n){for(var i=n.attributes,t=i.length-1;t>=0;t--)n.removeAttributeNode(i.item(t))})},setAttrib:function(n,i,u){var f=this;if(n&&i)return f.settings.strict&&(i=i.toLowerCase()),this.run(n,function(n){var e=f.settings,s=n.getAttribute(i),o;if(u!==null)switch(i){case"style":if(!r(u,"string")){t(u,function(t,i){f.setStyle(n,i,t)});return}e.keep_values&&(u&&!f._isRes(u)?n.setAttribute("data-mce-style",u,2):n.removeAttribute("data-mce-style",2));n.style.cssText=u;break;case"class":n.className=u||"";break;case"src":case"href":e.keep_values&&(e.url_converter&&(u=e.url_converter.call(e.url_converter_scope||f,u,i,n)),f.setAttrib(n,"data-mce-"+i,u,2));break;case"shape":n.setAttribute("data-mce-style",u)}r(u)&&u!==null&&u.length!==0?n.setAttribute(i,""+u,2):n.removeAttribute(i,2);tinyMCE.activeEditor&&s!=u&&(o=tinyMCE.activeEditor,o.onSetAttrib.dispatch(o,n,i,u))})},setAttribs:function(n,i){var r=this;return this.run(n,function(n){t(i,function(t,i){r.setAttrib(n,i,t)})})},getAttrib:function(t,u,e){var o,s=this,h;if(t=s.get(t),!t||t.nodeType!==1)return e===h?!1:e;if(r(e)||(e=""),/^(src|href|style|coords|shape)$/.test(u)&&(o=t.getAttribute("data-mce-"+u),o))return o;if(i&&s.props[u]&&(o=t[s.props[u]],o=o&&o.nodeValue?o.nodeValue:o),o||(o=t.getAttribute(u,2)),/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(u))return t[s.props[u]]===!0&&o===""?u:o?u:"";if(t.nodeName==="FORM"&&t.getAttributeNode(u))return t.getAttributeNode(u).nodeValue;if(u==="style"&&(o=o||t.style.cssText,o&&(o=s.serializeStyle(s.parseStyle(o),t.nodeName),s.settings.keep_values&&!s._isRes(o)&&t.setAttribute("data-mce-style",o))),f&&u==="class"&&o&&(o=o.replace(/(apple|webkit)\-[a-z\-]+/gi,"")),i)switch(u){case"rowspan":case"colspan":o===1&&(o="");break;case"size":(o==="+0"||o===20||o===0)&&(o="");break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":o===0&&(o="");break;case"hspace":o===-1&&(o="");break;case"maxlength":case"tabindex":(o===32768||o===2147483647||o==="32768")&&(o="");break;case"multiple":case"compact":case"noshade":case"nowrap":return o===65535?u:e;case"shape":o=o.toLowerCase();break;default:u.indexOf("on")===0&&o&&(o=n._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+o))}return o!==h&&o!==null&&o!==""?""+o:e},getPos:function(n,t){var e=this,u=0,f=0,o,r=e.doc,i;if(n=e.get(n),t=t||r.body,n){if(n.getBoundingClientRect)return n=n.getBoundingClientRect(),o=e.boxModel?r.documentElement:r.body,u=n.left+(r.documentElement.scrollLeft||r.body.scrollLeft)-o.clientTop,f=n.top+(r.documentElement.scrollTop||r.body.scrollTop)-o.clientLeft,{x:u,y:f};for(i=n;i&&i!=t&&i.nodeType;)u+=i.offsetLeft||0,f+=i.offsetTop||0,i=i.offsetParent;for(i=n.parentNode;i&&i!=t&&i.nodeType;)u-=i.scrollLeft||0,f-=i.scrollTop||0,i=i.parentNode}return{x:u,y:f}},parseStyle:function(n){return this.styles.parse(n)},serializeStyle:function(n,t){return this.styles.serialize(n,t)},addStyle:function(n){var i=this.doc,t;styleElm=i.getElementById("mceDefaultStyles");styleElm||(styleElm=i.createElement("style"),styleElm.id="mceDefaultStyles",styleElm.type="text/css",t=i.getElementsByTagName("head")[0],t.firstChild?t.insertBefore(styleElm,t.firstChild):t.appendChild(styleElm));styleElm.styleSheet?styleElm.styleSheet.cssText+=n:styleElm.appendChild(i.createTextNode(n))},loadCSS:function(r){var f=this,u=f.doc,e;r||(r="");e=u.getElementsByTagName("head")[0];t(r.split(","),function(t){var r;f.files[t]||(f.files[t]=!0,r=f.create("link",{rel:"stylesheet",href:n._addVer(t)}),i&&u.documentMode&&u.recalc&&(r.onload=function(){u.recalc&&u.recalc();r.onload=null}),e.appendChild(r))})},addClass:function(n,t){return this.run(n,function(n){var i;return t?this.hasClass(n,t)?n.className:(i=this.removeClass(n,t),n.className=(i!=""?i+" ":"")+t):0})},removeClass:function(t,i){var u=this,r;return u.run(t,function(t){var f;return u.hasClass(t,i)?(r||(r=new RegExp("(^|\\s+)"+i+"(\\s+|$)","g")),f=t.className.replace(r," "),f=n.trim(f!=" "?f:""),t.className=f,f||(t.removeAttribute("class"),t.removeAttribute("className")),f):t.className})},hasClass:function(n,t){return(n=this.get(n),!n||!t)?!1:(" "+n.className+" ").indexOf(" "+t+" ")!==-1},show:function(n){return this.setStyle(n,"display","block")},hide:function(n){return this.setStyle(n,"display","none")},isHidden:function(n){return n=this.get(n),!n||n.style.display=="none"||this.getStyle(n,"display")=="none"},uniqueId:function(n){return(n?n:"mce_")+this.counter++},setHTML:function(r,u){var f=this;return f.run(r,function(r){if(i){while(r.firstChild)r.removeChild(r.firstChild);try{r.innerHTML="<br />"+u;r.removeChild(r.firstChild)}catch(o){var e=f.create("div");e.innerHTML="<br />"+u;t(n.grep(e.childNodes),function(n,t){t&&r.canHaveHTML&&r.appendChild(n)})}}else r.innerHTML=u;return u})},getOuterHTML:function(n){var t,i=this;return(n=i.get(n),!n)?null:n.nodeType===1&&i.hasOuterHTML?n.outerHTML:(t=(n.ownerDocument||i.doc).createElement("body"),t.appendChild(n.cloneNode(!0)),t.innerHTML)},setOuterHTML:function(n,t,r){function f(n,t,i){var r,f;for(f=i.createElement("body"),f.innerHTML=t,r=f.lastChild;r;)u.insertAfter(r.cloneNode(!0),n),r=r.previousSibling;u.remove(n)}var u=this;return this.run(n,function(n){if(n=u.get(n),n.nodeType==1)if(r=r||n.ownerDocument||u.doc,i)try{i&&n.nodeType==1?n.outerHTML=t:f(n,t,r)}catch(e){f(n,t,r)}else f(n,t,r)})},decode:u.decode,encode:u.encodeAllRaw,insertAfter:function(n,t){return t=this.get(t),this.run(n,function(n){var i,r;return i=t.parentNode,r=t.nextSibling,r?i.insertBefore(n,r):i.appendChild(n),n})},replace:function(i,u,f){var e=this;return r(u,"array")&&(i=i.cloneNode(!0)),e.run(u,function(r){return f&&t(n.grep(r.childNodes),function(n){i.appendChild(n)}),r.parentNode.replaceChild(i,r)})},rename:function(n,i){var r=this,u;return n.nodeName!=i.toUpperCase()&&(u=r.create(i),t(r.getAttribs(n),function(t){r.setAttrib(u,t.nodeName,r.getAttrib(n,t.nodeName))}),r.replace(u,n,1)),u||n},findCommonAncestor:function(n,t){for(var i=n,r;i;){for(r=t;r&&i!=r;)r=r.parentNode;if(i==r)break;i=i.parentNode}return!i&&n.ownerDocument?n.ownerDocument.documentElement:i},toHex:function(n){function i(n){return n=parseInt(n,10).toString(16),n.length>1?n:"0"+n}var t=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(n);return t?"#"+i(t[1])+i(t[2])+i(t[3]):n},getClasses:function(){function u(i){t(i.imports,function(n){u(n)});t(i.cssRules||i.rules,function(i){switch(i.type||1){case 1:i.selectorText&&t(i.selectorText.split(","),function(t){(t=t.replace(/^\s*|\s*$|^\s\./g,""),!/\.mce/.test(t)&&/\.[\w\-]+$/.test(t))&&(o=t,t=n._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t),!e||(t=e(t,o)))&&(f[t]||(r.push({"class":t}),f[t]=1))});break;case 3:u(i.styleSheet)}})}var i=this,r=[],f={},e=i.settings.class_filter,o;if(i.classes)return i.classes;try{t(i.doc.styleSheets,u)}catch(s){}return r.length>0&&(i.classes=r),r},run:function(n,i,r){var u=this,f;return(u.doc&&typeof n=="string"&&(n=u.get(n)),!n)?!1:(r=r||this,!n.nodeType&&(n.length||n.length===0))?(f=[],t(n,function(n,t){n&&(typeof n=="string"&&(n=u.doc.getElementById(n)),f.push(i.call(r,n,t)))}),f):i.call(r,n)},getAttribs:function(n){var t;return(n=this.get(n),!n)?[]:i?(t=[],n.nodeName=="OBJECT")?n.attributes:(n.nodeName==="OPTION"&&this.getAttrib(n,"selected")&&t.push({specified:1,nodeName:"selected"}),n.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(n){t.push({specified:1,nodeName:n})}),t):n.attributes},isEmpty:function(t,i){var f=this,e,c,u,s,r,h=0;if(t=t.firstChild,t){s=new n.dom.TreeWalker(t,t.parentNode);i=i||f.schema?f.schema.getNonEmptyElements():null;do{if(u=t.nodeType,u===1){if(t.getAttribute("data-mce-bogus"))continue;if(r=t.nodeName.toLowerCase(),i&&i[r]){if(r==="br"){h++;continue}return!1}for(c=f.getAttribs(t),e=t.attributes.length;e--;)if(r=t.attributes[e].nodeName,r==="name"||r==="data-mce-bookmark")return!1}if(u==8||u===3&&!o.test(t.nodeValue))return!1}while(t=s.next())}return h<=1},destroy:function(t){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;t||n.removeUnload(i.destroy)},createRng:function(){var t=this.doc;return t.createRange?t.createRange():new n.dom.Range(this)},nodeIndex:function(n,t){var u=0,r,f,i;if(n)for(r=n.nodeType,n=n.previousSibling,f=n;n;n=n.previousSibling)(i=n.nodeType,!t||i!=3||i!=r&&n.nodeValue.length)&&(u++,r=i);return u},split:function(t,i,r){function o(t){function s(n){var t=n.previousSibling&&n.previousSibling.nodeName=="SPAN",i=n.nextSibling&&n.nextSibling.nodeName=="SPAN";return t&&i}var r,i=t.childNodes,f=t.nodeType,e;if(f!=1||t.getAttribute("data-mce-type")!="bookmark"){for(r=i.length-1;r>=0;r--)o(i[r]);if(f!=9){if(f==3&&t.nodeValue.length>0){if(e=n.trim(t.nodeValue).length,!u.isBlock(t.parentNode)||e>0||e===0&&s(t))return}else if(f==1&&(i=t.childNodes,i.length==1&&i[0]&&i[0].nodeType==1&&i[0].getAttribute("data-mce-type")=="bookmark"&&t.parentNode.insertBefore(i[0],t),i.length||/^(br|hr|input|img)$/i.test(t.nodeName)))return;u.remove(t)}return t}}var u=this,f=u.createRng(),s,h,e;if(t&&i)return f.setStart(t.parentNode,u.nodeIndex(t)),f.setEnd(i.parentNode,u.nodeIndex(i)),s=f.extractContents(),f=u.createRng(),f.setStart(i.parentNode,u.nodeIndex(i)+1),f.setEnd(t.parentNode,u.nodeIndex(t)+1),h=f.extractContents(),e=t.parentNode,e.insertBefore(o(s),t),r?e.replaceChild(r,i):e.insertBefore(i,t),e.insertBefore(o(h),t),u.remove(t),r||i},bind:function(n,t,i,r){return this.events.add(n,t,i,r||this)},unbind:function(n,t,i){return this.events.remove(n,t,i)},fire:function(n,t,i){return this.events.fire(n,t,i)},getContentEditable:function(n){var t;return n.nodeType!=1?null:(t=n.getAttribute("data-mce-contenteditable"),t&&t!=="inherit")?t:n.contentEditable!=="inherit"?n.contentEditable:null},_findSib:function(n,t,i){var f=this,u=t;if(n)for(r(u,"string")&&(u=function(n){return f.is(n,t)}),n=n[i];n;n=n[i])if(u(n))return n;return null},_isRes:function(n){return/^(top|left|bottom|right|width|height)/i.test(n)||/;\s*(top|left|bottom|right|width|height)/i.test(n)}});n.DOM=new n.dom.DOMUtils(document,{process_html:0})}(tinymce),function(n){function t(n){function w(){return v.createDocumentFragment()}function b(n,t){ut(e,n,t)}function k(n,t){ut(h,n,t)}function tt(n){b(n.parentNode,l(n))}function st(n){b(n.parentNode,l(n)+1)}function ht(n){k(n.parentNode,l(n))}function it(n){k(n.parentNode,l(n)+1)}function ct(n){n?(i[f]=i[r],i[o]=i[u]):(i[r]=i[f],i[u]=i[o]);i.collapsed=e}function lt(n){tt(n);it(n)}function at(n){b(n,0);k(n,n.nodeType===1?n.childNodes.length:n.nodeValue.length)}function vt(n,t){var e=i[r],s=i[u],h=i[f],c=i[o],l=t.startContainer,a=t.startOffset,v=t.endContainer,p=t.endOffset;return n===0?y(e,s,l,a):n===1?y(h,c,l,a):n===2?y(h,c,v,p):n===3?y(e,s,v,p):void 0}function yt(){g(s)}function pt(){return g(ot)}function rt(){return g(c)}function wt(t){var i=this[r],f=this[u],o,e;(i.nodeType===3||i.nodeType===4)&&i.nodeValue?f?f>=i.nodeValue.length?n.insertAfter(t,i):(o=i.splitText(f),i.parentNode.insertBefore(t,o)):i.parentNode.insertBefore(t,i):(i.childNodes.length>0&&(e=i.childNodes[f]),e?i.insertBefore(t,e):i.appendChild(t))}function bt(n){var t=i.extractContents();i.insertNode(n);n.appendChild(t);i.selectNode(n)}function kt(){return nt(new t(n),{startContainer:i[r],startOffset:i[u],endContainer:i[f],endOffset:i[o],collapsed:i.collapsed,commonAncestorContainer:i.commonAncestorContainer})}function d(n,t){var i;if(n.nodeType==3||t<0)return n;for(i=n.firstChild;i&&t>0;)--t,i=i.nextSibling;return i?i:n}function dt(){return i[r]==i[f]&&i[u]==i[o]}function y(t,i,r,u){var f,h,e,c,o,s;if(t==r)return i==u?0:i<u?-1:1;for(f=r;f&&f.parentNode!=t;)f=f.parentNode;if(f){for(h=0,e=t.firstChild;e!=f&&h<i;)h++,e=e.nextSibling;return i<=h?-1:1}for(f=t;f&&f.parentNode!=r;)f=f.parentNode;if(f){for(h=0,e=r.firstChild;e!=f&&h<u;)h++,e=e.nextSibling;return h<u?-1:1}for(c=n.findCommonAncestor(t,r),o=t;o&&o.parentNode!=c;)o=o.parentNode;for(o||(o=c),s=r;s&&s.parentNode!=c;)s=s.parentNode;if(s||(s=c),o==s)return 0;for(e=c.firstChild;e;){if(e==o)return-1;if(e==s)return 1;e=e.nextSibling}}function ut(t,e,s){var h,c;for(t?(i[r]=e,i[u]=s):(i[f]=e,i[o]=s),h=i[f];h.parentNode;)h=h.parentNode;for(c=i[r];c.parentNode;)c=c.parentNode;c==h?y(i[r],i[u],i[f],i[o])>0&&i.collapse(t):i.collapse(t);i.collapsed=dt();i.commonAncestorContainer=n.findCommonAncestor(i[r],i[f])}function g(n){var u,l=0,a=0,t,s,e,o,h,c;if(i[r]==i[f])return gt(n);for(u=i[f],t=u.parentNode;t;u=t,t=t.parentNode){if(t==i[r])return ni(u,n);++l}for(u=i[r],t=u.parentNode;t;u=t,t=t.parentNode){if(t==i[f])return ti(u,n);++a}for(s=a-l,e=i[r];s>0;)e=e.parentNode,s--;for(o=i[f];s<0;)o=o.parentNode,s++;for(h=e.parentNode,c=o.parentNode;h!=c;h=h.parentNode,c=c.parentNode)e=h,o=c;return ii(e,o,n)}function gt(n){var f,b,h,t,l,k,g,a,y;if(n!=s&&(f=w()),i[u]==i[o])return f;if(i[r].nodeType==3)return(b=i[r].nodeValue,h=b.substring(i[u],i[o]),n!=c&&(t=i[r],a=i[u],y=i[o]-i[u],a===0&&y>=t.nodeValue.length-1?t.parentNode.removeChild(t):t.deleteData(a,y),i.collapse(e)),n==s)?void 0:(h.length>0&&f.appendChild(v.createTextNode(h)),f);for(t=d(i[r],i[u]),l=i[o]-i[u];t&&l>0;)k=t.nextSibling,g=p(t,n),f&&f.appendChild(g),--l,t=k;return n!=c&&i.collapse(e),f}function ni(n,t){var r,f,o,e,a,v;if(t!=s&&(r=w()),f=ft(n,t),r&&r.appendChild(f),o=l(n),e=o-i[u],e<=0)return t!=c&&(i.setEndBefore(n),i.collapse(h)),r;for(f=n.previousSibling;e>0;)a=f.previousSibling,v=p(f,t),r&&r.insertBefore(v,r.firstChild),--e,f=a;return t!=c&&(i.setEndBefore(n),i.collapse(h)),r}function ti(n,t){var u,f,r,h,a,v;for(t!=s&&(u=w()),r=et(n,t),u&&u.appendChild(r),f=l(n),++f,h=i[o]-f,r=n.nextSibling;r&&h>0;)a=r.nextSibling,v=p(r,t),u&&u.appendChild(v),--h,r=a;return t!=c&&(i.setStartAfter(n),i.collapse(e)),u}function ii(n,t,r){var f,u,b,h,v,a,o,y;for(r!=s&&(u=w()),f=et(n,r),u&&u.appendChild(f),b=n.parentNode,h=l(n),v=l(t),++h,a=v-h,o=n.nextSibling;a>0;)y=o.nextSibling,f=p(o,r),u&&u.appendChild(f),o=y,--a;return f=ft(t,r),u&&u.appendChild(f),r!=c&&(i.setStartAfter(n),i.collapse(e)),u}function ft(n,t){var r=d(i[f],i[o]-1),u,c,y,p,l,v=r!=i[f];if(r==n)return a(r,v,h,t);for(u=r.parentNode,c=a(u,h,h,t);u;){while(r)y=r.previousSibling,p=a(r,v,h,t),t!=s&&c.insertBefore(p,c.firstChild),v=e,r=y;if(u==n)return c;r=u.previousSibling;u=u.parentNode;l=a(u,h,h,t);t!=s&&l.appendChild(c);c=l}}function et(n,t){var f=d(i[r],i[u]),l=f!=i[r],o,c,y,p,v;if(f==n)return a(f,l,e,t);for(o=f.parentNode,c=a(o,h,e,t);o;){while(f)y=f.nextSibling,p=a(f,l,e,t),t!=s&&c.appendChild(p),l=e,f=y;if(o==n)return c;f=o.nextSibling;o=o.parentNode;v=a(o,h,e,t);t!=s&&v.appendChild(c);c=v}}function a(t,r,f,e){var a,v,y,l,w;return r?p(t,e):t.nodeType==3?(a=t.nodeValue,f?(l=i[u],v=a.substring(l),y=a.substring(0,l)):(l=i[o],v=a.substring(0,l),y=a.substring(l)),e!=c&&(t.nodeValue=y),e==s)?void 0:(w=n.clone(t,h),w.nodeValue=v,w):e==s?void 0:n.clone(t,h)}function p(t,i){if(i!=s)return i==c?n.clone(t,e):t;t.parentNode.removeChild(t)}function ri(){return n.create("body",null,rt()).outerText}var i=this,v=n.doc,ot=0,c=1,s=2,e=!0,h=!1,u="startOffset",r="startContainer",f="endContainer",o="endOffset",nt=tinymce.extend,l=n.nodeIndex;return nt(i,{startContainer:v,startOffset:0,endContainer:v,endOffset:0,collapsed:e,commonAncestorContainer:v,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:b,setEnd:k,setStartBefore:tt,setStartAfter:st,setEndBefore:ht,setEndAfter:it,collapse:ct,selectNode:lt,selectNodeContents:at,compareBoundaryPoints:vt,deleteContents:yt,extractContents:pt,cloneContents:rt,insertNode:wt,surroundContents:bt,cloneRange:kt,toStringIE:ri}),i}n.Range=t;t.prototype.toString=function(){return this.toStringIE()}}(tinymce.dom),function(){function n(n){function r(t,i){var r,c=0,s,a,l,f,e,h,o=-1,u;if(r=t.duplicate(),r.collapse(i),u=r.parentElement(),u.ownerDocument===n.dom.doc){while(u.contentEditable==="false")u=u.parentNode;if(!u.hasChildNodes())return{node:u,inside:1};for(l=u.children,s=l.length-1;c<=s;)if(h=Math.floor((c+s)/2),f=l[h],r.moveToElementText(f),o=r.compareEndPoints(i?"StartToStart":"EndToEnd",t),o>0)s=h-1;else if(o<0)c=h+1;else return{node:f};if(o<0)for(f?r.collapse(!1):(r.moveToElementText(u),r.collapse(!0),f=u,a=!0),e=0;r.compareEndPoints(i?"StartToStart":"StartToEnd",t)!==0;){if(r.move("character",1)===0||u!=r.parentElement())break;e++}else for(r.collapse(!0),e=0;r.compareEndPoints(i?"StartToStart":"StartToEnd",t)!==0;){if(r.move("character",-1)===0||u!=r.parentElement())break;e++}return{node:f,position:o,offset:e,inside:a}}}function f(){function h(n){var s=r(f,n),i,o,e=0,t,c,h;if(i=s.node,o=s.offset,s.inside&&!i.hasChildNodes()){u[n?"setStart":"setEnd"](i,0);return}if(o===c){u[n?"setStartBefore":"setEndAfter"](i);return}if(s.position<0){if(t=s.inside?i.firstChild:i.nextSibling,!t){u[n?"setStartAfter":"setEndAfter"](i);return}if(!o){t.nodeType==3?u[n?"setStart":"setEnd"](t,0):u[n?"setStartBefore":"setEndBefore"](t);return}while(t){if(h=t.nodeValue,e+=h.length,e>=o){i=t;e-=o;e=h.length-e;break}t=t.nextSibling}}else{if(t=i.previousSibling,!t)return u[n?"setStartBefore":"setEndBefore"](i);if(!o){i.nodeType==3?u[n?"setStart":"setEnd"](t,i.nodeValue.length):u[n?"setStartAfter":"setEndAfter"](t);return}while(t){if(e+=t.nodeValue.length,e>=o){i=t;e-=o;break}t=t.previousSibling}}u[n?"setStart":"setEnd"](i,e)}var f=n.getRng(),u=t.createRng(),e,s,o,c,l;if(e=f.item?f.item(0):f.parentElement(),e.ownerDocument!=t.doc)return u;if(s=n.isCollapsed(),f.item)return u.setStart(e.parentNode,t.nodeIndex(e)),u.setEnd(u.startContainer,u.startOffset+1),u;try{h(!0);s||h()}catch(a){if(a.number==-2147024809)l=i.getBookmark(2),o=f.duplicate(),o.collapse(!0),e=o.parentElement(),s||(o=f.duplicate(),o.collapse(!1),c=o.parentElement(),c.innerHTML=c.innerHTML),e.innerHTML=e.innerHTML,i.moveToBookmark(l),f=n.getRng(),h(!0),s||h();else throw a;}return u}var i=this,t=n.dom,u=!1;this.getBookmark=function(i){function e(n){for(var u,r,e=[],i=n.parentNode,f=t.getRoot().parentNode;i!=f&&i.nodeType!==9;){for(u=i.children,r=u.length;r--;)if(n===u[r]){e.push(r);break}n=i;i=i.parentNode}return e}function o(n){var t;return t=r(f,n),t?{position:t.position,offset:t.offset,indexes:e(t.node),inside:t.inside}:void 0}var f=n.getRng(),u={};return i===2&&(f.item?u.start={ctrl:!0,indexes:e(f.item(0))}:(u.start=o(!0),n.isCollapsed()||(u.end=o()))),u};this.moveToBookmark=function(n){function u(n){for(var u,f,i=t.getRoot(),r=n.length-1;r>=0;r--)f=i.children,u=n[r],u<=f.length-1&&(i=f[u]);return i}function f(t){var e=n[t?"start":"end"],o,f,s;e&&(o=e.position>0,f=r.createTextRange(),f.moveToElementText(u(e.indexes)),offset=e.offset,offset!==s?(f.collapse(e.inside||o),f.moveStart("character",o?-offset:offset)):f.collapse(t),i.setEndPoint(t?"StartToStart":"EndToStart",f),t&&i.collapse(!0))}var i,r=t.doc.body;n.start&&(n.start.ctrl?(i=r.createControlRange(),i.addElement(u(n.start.indexes)),i.select()):(i=r.createTextRange(),f(!0),f(),i.select()))};this.addRange=function(i){function p(n){var i,y,f,h,v;f=t.create("a");i=n?r:c;y=n?o:s;h=e.duplicate();(i==l||i==l.documentElement)&&(i=a,y=0);i.nodeType==3?(i.parentNode.insertBefore(f,i),h.moveToElementText(f),h.moveStart("character",y),t.remove(f),e.setEndPoint(n?"StartToStart":"EndToEnd",h)):(v=i.childNodes,v.length?(y>=v.length?t.insertAfter(f,v[v.length-1]):i.insertBefore(f,v[y]),h.moveToElementText(f)):i.canHaveHTML&&(i.innerHTML="<span>﻿<\/span>",f=i.firstChild,h.moveToElementText(f),h.collapse(u)),e.setEndPoint(n?"StartToStart":"EndToEnd",h),t.remove(f))}var e,h,r,o,c,s,f,l=n.dom.doc,a=l.body,v,y;if(r=i.startContainer,o=i.startOffset,c=i.endContainer,s=i.endOffset,e=a.createTextRange(),r==c&&r.nodeType==1){if(o==s&&!r.hasChildNodes()){if(r.canHaveHTML){f=r.previousSibling;f&&!f.hasChildNodes()&&t.isBlock(f)?f.innerHTML="﻿":f=null;r.innerHTML="<span>﻿<\/span><span>﻿<\/span>";e.moveToElementText(r.lastChild);e.select();t.doc.selection.clear();r.innerHTML="";f&&(f.innerHTML="");return}o=t.nodeIndex(r);r=r.parentNode}if(o==s-1)try{if(y=r.childNodes[o],h=a.createControlRange(),h.addElement(y),h.select(),v=n.getRng(),v.item&&y===v.item(0))return}catch(w){}}p(!0);p();e.select()};this.getRangeAt=f}tinymce.dom.TridentSelection=n}(),function(){function b(n,t,i,u,f,e){for(var o,h,s=0,c=u.length;s<c;s++)if(o=u[s],o){for(h=!1,o=o[n];o;){if(o[r]===i){h=u[o.sizset];break}if(o.nodeType!==1||e||(o[r]=i,o.sizset=s),o.nodeName.toLowerCase()===t){h=o;break}o=o[n]}u[s]=h}}function k(t,i,u,f,e,o){for(var s,c,h=0,l=f.length;h<l;h++)if(s=f[h],s){for(c=!1,s=s[t];s;){if(s[r]===u){c=f[s.sizset];break}if(s.nodeType===1)if(o||(s[r]=u,s.sizset=h),typeof i!="string"){if(s===i){c=!0;break}}else if(n.filter(i,[s]).length>0){c=s;break}s=s[t]}f[h]=c}}var c=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,r="sizcache",l=0,y=Object.prototype.toString,o=!1,p=!0,u=/\\/g,d=/\r\n/g,s=/\W/,n,f,i,h,e,v;[0,0].sort(function(){return p=!1,0});n=function(r,u,f,e){var nt;if(f=f||[],u=u||document,nt=u,u.nodeType!==1&&u.nodeType!==9)return[];if(!r||typeof r!="string")return f;var p,a,s,g,l,b,k,h,tt=!0,d=n.isXML(u),o=[],it=r;do if(c.exec(""),p=c.exec(it),p&&(it=p[3],o.push(p[1]),p[2])){g=p[3];break}while(p);if(o.length>1&&w.exec(r))if(o.length===2&&t.relative[o[0]])a=v(o[0]+o[1],u,e);else for(a=t.relative[o[0]]?[u]:n(o.shift(),u);o.length;)r=o.shift(),t.relative[r]&&(r+=o.shift()),a=v(r,a,e);else if(!e&&o.length>1&&u.nodeType===9&&!d&&t.match.ID.test(o[0])&&!t.match.ID.test(o[o.length-1])&&(l=n.find(o.shift(),u,d),u=l.expr?n.filter(l.expr,l.set)[0]:l.set[0]),u)for(l=e?{expr:o.pop(),set:i(e)}:n.find(o.pop(),o.length===1&&(o[0]==="~"||o[0]==="+")&&u.parentNode?u.parentNode:u,d),a=l.expr?n.filter(l.expr,l.set):l.set,o.length>0?s=i(a):tt=!1;o.length;)b=o.pop(),k=b,t.relative[b]?k=o.pop():b="",k==null&&(k=u),t.relative[b](s,k,d);else s=o=[];if(s||(s=a),s||n.error(b||r),y.call(s)==="[object Array]")if(tt)if(u&&u.nodeType===1)for(h=0;s[h]!=null;h++)s[h]&&(s[h]===!0||s[h].nodeType===1&&n.contains(u,s[h]))&&f.push(a[h]);else for(h=0;s[h]!=null;h++)s[h]&&s[h].nodeType===1&&f.push(a[h]);else f.push.apply(f,s);else i(s,f);return g&&(n(g,nt,f,e),n.uniqueSort(f)),f};n.uniqueSort=function(n){if(h&&(o=p,n.sort(h),o))for(var t=1;t<n.length;t++)n[t]===n[t-1]&&n.splice(t--,1);return n};n.matches=function(t,i){return n(t,null,null,i)};n.matchesSelector=function(t,i){return n(i,null,null,[t]).length>0};n.find=function(n,i,r){var e,o,c,f,s,h;if(!n)return[];for(o=0,c=t.order.length;o<c;o++)if(s=t.order[o],(f=t.leftMatch[s].exec(n))&&(h=f[1],f.splice(1,1),h.substr(h.length-1)!=="\\"&&(f[1]=(f[1]||"").replace(u,""),e=t.find[s](f,i,r),e!=null))){n=n.replace(t.match[s],"");break}return e||(e=typeof i.getElementsByTagName!="undefined"?i.getElementsByTagName("*"):[]),{set:e,expr:n}};n.filter=function(i,r,u,f){for(var e,s,h,c,v,w,y,l,p,b=i,a=[],o=r,k=r&&r[0]&&n.isXML(r[0]);i&&r.length;){for(h in t.filter)if((e=t.leftMatch[h].exec(i))!=null&&e[2]){if(w=t.filter[h],y=e[1],s=!1,e.splice(1,1),y.substr(y.length-1)==="\\")continue;if(o===a&&(a=[]),t.preFilter[h])if(e=t.preFilter[h](e,o,u,a,f,k),e){if(e===!0)continue}else s=c=!0;if(e)for(l=0;(v=o[l])!=null;l++)v&&(c=w(v,e,l,o),p=f^c,u&&c!=null?p?s=!0:o[l]=!1:p&&(a.push(v),s=!0));if(c!==undefined){if(u||(o=a),i=i.replace(t.match[h],""),!s)return[];break}}if(i===b)if(s==null)n.error(i);else break;b=i}return o};n.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};var a=n.getText=function(n){var i,r,t=n.nodeType,u="";if(t){if(t===1||t===9||t===11){if(typeof n.textContent=="string")return n.textContent;if(typeof n.innerText=="string")return n.innerText.replace(d,"");for(n=n.firstChild;n;n=n.nextSibling)u+=a(n)}else if(t===3||t===4)return n.nodeValue}else for(i=0;r=n[i];i++)r.nodeType!==8&&(u+=a(r));return u},t=n.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(n){return n.getAttribute("href")},type:function(n){return n.getAttribute("type")}},relative:{"+":function(t,i){var f=typeof i=="string",e=f&&!s.test(i),o=f&&!e,u,h,r;for(e&&(i=i.toLowerCase()),u=0,h=t.length;u<h;u++)if(r=t[u]){while((r=r.previousSibling)&&r.nodeType!==1);t[u]=o||r&&r.nodeName.toLowerCase()===i?r||!1:r===i}o&&n.filter(i,t,!0)},">":function(t,i){var u,f=typeof i=="string",r=0,o=t.length,e;if(f&&!s.test(i))for(i=i.toLowerCase();r<o;r++)u=t[r],u&&(e=u.parentNode,t[r]=e.nodeName.toLowerCase()===i?e:!1);else{for(;r<o;r++)u=t[r],u&&(t[r]=f?u.parentNode:u.parentNode===i);f&&n.filter(i,t,!0)}},"":function(n,t,i){var r,f=l++,u=k;typeof t!="string"||s.test(t)||(t=t.toLowerCase(),r=t,u=b);u("parentNode",t,f,n,r,i)},"~":function(n,t,i){var r,f=l++,u=k;typeof t!="string"||s.test(t)||(t=t.toLowerCase(),r=t,u=b);u("previousSibling",t,f,n,r,i)}},find:{ID:function(n,t,i){if(typeof t.getElementById!="undefined"&&!i){var r=t.getElementById(n[1]);return r&&r.parentNode?[r]:[]}},NAME:function(n,t){var r,u,i,f;if(typeof t.getElementsByName!="undefined"){for(r=[],u=t.getElementsByName(n[1]),i=0,f=u.length;i<f;i++)u[i].getAttribute("name")===n[1]&&r.push(u[i]);return r.length===0?null:r}},TAG:function(n,t){if(typeof t.getElementsByTagName!="undefined")return t.getElementsByTagName(n[1])}},preFilter:{CLASS:function(n,t,i,r,f,e){if(n=" "+n[1].replace(u,"")+" ",e)return n;for(var s=0,o;(o=t[s])!=null;s++)o&&(f^(o.className&&(" "+o.className+" ").replace(/[\t\n\r]/g," ").indexOf(n)>=0)?i||r.push(o):i&&(t[s]=!1));return!1},ID:function(n){return n[1].replace(u,"")},TAG:function(n){return n[1].replace(u,"").toLowerCase()},CHILD:function(t){if(t[1]==="nth"){t[2]||n.error(t[0]);t[2]=t[2].replace(/^\+|\s*/g,"");var i=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(t[2]==="even"&&"2n"||t[2]==="odd"&&"2n+1"||!/\D/.test(t[2])&&"0n+"+t[2]||t[2]);t[2]=i[1]+(i[2]||1)-0;t[3]=i[3]-0}else t[2]&&n.error(t[0]);return t[0]=l++,t},ATTR:function(n,i,r,f,e,o){var s=n[1]=n[1].replace(u,"");return!o&&t.attrMap[s]&&(n[1]=t.attrMap[s]),n[4]=(n[4]||n[5]||"").replace(u,""),n[2]==="~="&&(n[4]=" "+n[4]+" "),n},PSEUDO:function(i,r,u,f,e){if(i[1]==="not")if((c.exec(i[3])||"").length>1||/^\w/.test(i[3]))i[3]=n(i[3],null,null,r);else{var o=n.filter(i[3],r,u,!0^e);return u||f.push.apply(f,o),!1}else if(t.match.POS.test(i[0])||t.match.CHILD.test(i[0]))return!0;return i},POS:function(n){return n.unshift(!0),n}},filters:{enabled:function(n){return n.disabled===!1&&n.type!=="hidden"},disabled:function(n){return n.disabled===!0},checked:function(n){return n.checked===!0},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},parent:function(n){return!!n.firstChild},empty:function(n){return!n.firstChild},has:function(t,i,r){return!!n(r[3],t).length},header:function(n){return/h\d/i.test(n.nodeName)},text:function(n){var t=n.getAttribute("type"),i=n.type;return n.nodeName.toLowerCase()==="input"&&"text"===i&&(t===i||t===null)},radio:function(n){return n.nodeName.toLowerCase()==="input"&&"radio"===n.type},checkbox:function(n){return n.nodeName.toLowerCase()==="input"&&"checkbox"===n.type},file:function(n){return n.nodeName.toLowerCase()==="input"&&"file"===n.type},password:function(n){return n.nodeName.toLowerCase()==="input"&&"password"===n.type},submit:function(n){var t=n.nodeName.toLowerCase();return(t==="input"||t==="button")&&"submit"===n.type},image:function(n){return n.nodeName.toLowerCase()==="input"&&"image"===n.type},reset:function(n){var t=n.nodeName.toLowerCase();return(t==="input"||t==="button")&&"reset"===n.type},button:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&"button"===n.type||t==="button"},input:function(n){return/input|select|textarea|button/i.test(n.nodeName)},focus:function(n){return n===n.ownerDocument.activeElement}},setFilters:{first:function(n,t){return t===0},last:function(n,t,i,r){return t===r.length-1},even:function(n,t){return t%2==0},odd:function(n,t){return t%2==1},lt:function(n,t,i){return t<i[3]-0},gt:function(n,t,i){return t>i[3]-0},nth:function(n,t,i){return i[3]-0===t},eq:function(n,t,i){return i[3]-0===t}},filter:{PSEUDO:function(i,r,u,f){var e=r[1],h=t.filters[e],s,o,c;if(h)return h(i,u,r,f);if(e==="contains")return(i.textContent||i.innerText||a([i])||"").indexOf(r[3])>=0;if(e==="not"){for(s=r[3],o=0,c=s.length;o<c;o++)if(s[o]===i)return!1;return!0}n.error(e)},CHILD:function(n,t){var u,o,s,f,h,e,c=t[1],i=n;switch(c){case"only":case"first":while(i=i.previousSibling)if(i.nodeType===1)return!1;if(c==="first")return!0;i=n;case"last":while(i=i.nextSibling)if(i.nodeType===1)return!1;return!0;case"nth":if(u=t[2],o=t[3],u===1&&o===0)return!0;if(s=t[0],f=n.parentNode,f&&(f[r]!==s||!n.nodeIndex)){for(h=0,i=f.firstChild;i;i=i.nextSibling)i.nodeType===1&&(i.nodeIndex=++h);f[r]=s}return e=n.nodeIndex-o,u===0?e===0:e%u==0&&e/u>=0}},ID:function(n,t){return n.nodeType===1&&n.getAttribute("id")===t},TAG:function(n,t){return t==="*"&&n.nodeType===1||!!n.nodeName&&n.nodeName.toLowerCase()===t},CLASS:function(n,t){return(" "+(n.className||n.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(i,r){var o=r[1],s=n.attr?n.attr(i,o):t.attrHandle[o]?t.attrHandle[o](i):i[o]!=null?i[o]:i.getAttribute(o),f=s+"",e=r[2],u=r[4];return s==null?e==="!=":!e&&n.attr?s!=null:e==="="?f===u:e==="*="?f.indexOf(u)>=0:e==="~="?(" "+f+" ").indexOf(u)>=0:u?e==="!="?f!==u:e==="^="?f.indexOf(u)===0:e==="$="?f.substr(f.length-u.length)===u:e==="|="?f===u||f.substr(0,u.length+1)===u+"-":!1:f&&s!==!1},POS:function(n,i,r,u){var e=i[2],f=t.setFilters[e];if(f)return f(n,r,i,u)}}},w=t.match.POS,g=function(n,t){return"\\"+(+t+1)};for(f in t.match)t.match[f]=new RegExp(t.match[f].source+/(?![^\[]*\])(?![^\(]*\))/.source),t.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+t.match[f].source.replace(/\\(\d+)/g,g));t.match.globalPOS=w;i=function(n,t){return(n=Array.prototype.slice.call(n,0),t)?(t.push.apply(t,n),t):n};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(nt){i=function(n,t){var i=0,r=t||[],u;if(y.call(n)==="[object Array]")Array.prototype.push.apply(r,n);else if(typeof n.length=="number")for(u=n.length;i<u;i++)r.push(n[i]);else for(;n[i];i++)r.push(n[i]);return r}}document.documentElement.compareDocumentPosition?h=function(n,t){return n===t?(o=!0,0):!n.compareDocumentPosition||!t.compareDocumentPosition?n.compareDocumentPosition?-1:1:n.compareDocumentPosition(t)&4?-1:1}:(h=function(n,t){var i;if(n===t)return o=!0,0;if(n.sourceIndex&&t.sourceIndex)return n.sourceIndex-t.sourceIndex;var s,l,u=[],f=[],h=n.parentNode,c=t.parentNode,r=h;if(h===c)return e(n,t);if(h){if(!c)return 1}else return-1;while(r)u.unshift(r),r=r.parentNode;for(r=c;r;)f.unshift(r),r=r.parentNode;for(s=u.length,l=f.length,i=0;i<s&&i<l;i++)if(u[i]!==f[i])return e(u[i],f[i]);return i===s?e(n,f[i],-1):e(u[i],t,1)},e=function(n,t,i){if(n===t)return i;for(var r=n.nextSibling;r;){if(r===t)return-1;r=r.nextSibling}return 1}),function(){var n=document.createElement("div"),r="script"+(new Date).getTime(),i=document.documentElement;n.innerHTML="<a name='"+r+"'/>";i.insertBefore(n,i.firstChild);document.getElementById(r)&&(t.find.ID=function(n,t,i){if(typeof t.getElementById!="undefined"&&!i){var r=t.getElementById(n[1]);return r?r.id===n[1]||typeof r.getAttributeNode!="undefined"&&r.getAttributeNode("id").nodeValue===n[1]?[r]:undefined:[]}},t.filter.ID=function(n,t){var i=typeof n.getAttributeNode!="undefined"&&n.getAttributeNode("id");return n.nodeType===1&&i&&i.nodeValue===t});i.removeChild(n);i=n=null}(),function(){var n=document.createElement("div");n.appendChild(document.createComment(""));n.getElementsByTagName("*").length>0&&(t.find.TAG=function(n,t){var i=t.getElementsByTagName(n[1]),u,r;if(n[1]==="*"){for(u=[],r=0;i[r];r++)i[r].nodeType===1&&u.push(i[r]);i=u}return i});n.innerHTML="<a href='#'><\/a>";n.firstChild&&typeof n.firstChild.getAttribute!="undefined"&&n.firstChild.getAttribute("href")!=="#"&&(t.attrHandle.href=function(n){return n.getAttribute("href",2)});n=null}();document.querySelectorAll&&function(){var u=n,r=document.createElement("div"),e="__sizzle__",f;if(r.innerHTML="<p class='TEST'><\/p>",!r.querySelectorAll||r.querySelectorAll(".TEST").length!==0){n=function(r,f,o,s){var h,c;if(f=f||document,!s&&!n.isXML(f)){if(h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(r),h&&(f.nodeType===1||f.nodeType===9)){if(h[1])return i(f.getElementsByTagName(r),o);if(h[2]&&t.find.CLASS&&f.getElementsByClassName)return i(f.getElementsByClassName(h[2]),o)}if(f.nodeType===9){if(r==="body"&&f.body)return i([f.body],o);if(h&&h[3])if(c=f.getElementById(h[3]),c&&c.parentNode){if(c.id===h[3])return i([c],o)}else return i([],o);try{return i(f.querySelectorAll(r),o)}catch(w){}}else if(f.nodeType===1&&f.nodeName.toLowerCase()!=="object"){var p=f,a=f.getAttribute("id"),l=a||e,v=f.parentNode,y=/^\s*[+~]/.test(r);a?l=l.replace(/'/g,"\\$&"):f.setAttribute("id",l);y&&v&&(f=f.parentNode);try{if(!y||v)return i(f.querySelectorAll("[id='"+l+"'] "+r),o)}catch(b){}finally{a||p.removeAttribute("id")}}}return u(r,f,o,s)};for(f in u)n[f]=u[f];r=null}}(),function(){var i=document.documentElement,r=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.msMatchesSelector,f,u;if(r){f=!r.call(document.createElement("div"),"div");u=!1;try{r.call(document.documentElement,"[test!='']:sizzle")}catch(e){u=!0}n.matchesSelector=function(i,e){if(e=e.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!n.isXML(i))try{if(u||!t.match.PSEUDO.test(e)&&!/!=/.test(e)){var o=r.call(i,e);if(o||!f||i.document&&i.document.nodeType!==11)return o}}catch(s){}return n(e,null,null,[i]).length>0}}}(),function(){var n=document.createElement("div");(n.innerHTML="<div class='test e'><\/div><div class='test'><\/div>",n.getElementsByClassName&&n.getElementsByClassName("e").length!==0)&&(n.lastChild.className="e",n.getElementsByClassName("e").length!==1)&&(t.order.splice(1,0,"CLASS"),t.find.CLASS=function(n,t,i){if(typeof t.getElementsByClassName!="undefined"&&!i)return t.getElementsByClassName(n[1])},n=null)}();n.contains=document.documentElement.contains?function(n,t){return n!==t&&(n.contains?n.contains(t):!0)}:document.documentElement.compareDocumentPosition?function(n,t){return!!(n.compareDocumentPosition(t)&16)}:function(){return!1};n.isXML=function(n){var t=(n?n.ownerDocument||n:0).documentElement;return t?t.nodeName!=="HTML":!1};v=function(i,r,u){for(var e,o=[],s="",h=r.nodeType?[r]:r,f,c;e=t.match.PSEUDO.exec(i);)s+=e[0],i=i.replace(t.match.PSEUDO,"");for(i=t.relative[i]?i+"*":i,f=0,c=h.length;f<c;f++)n(i,h[f],o,u);return n.filter(s,o)};window.tinymce.dom.Sizzle=n}(),function(n){n.dom.Element=function(t,i){var r=this,u,f;r.settings=i=i||{};r.id=t;r.dom=u=i.dom||n.DOM;n.isIE||(f=u.get(r.id));n.each("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get".split(/,/),function(n){r[n]=function(){for(var i=[t],f=0;f<arguments.length;f++)i.push(arguments[f]);return i=u[n].apply(u,i),r.update(n),i}});n.extend(r,{on:function(t,i,u){return n.dom.Event.add(r.id,t,i,u)},getXY:function(){return{x:parseInt(r.getStyle("left")),y:parseInt(r.getStyle("top"))}},getSize:function(){var n=u.get(r.id);return{w:parseInt(r.getStyle("width")||n.clientWidth),h:parseInt(r.getStyle("height")||n.clientHeight)}},moveTo:function(n,t){r.setStyles({left:n,top:t})},moveBy:function(n,t){var i=r.getXY();r.moveTo(i.x+n,i.y+t)},resizeTo:function(n,t){r.setStyles({width:n,height:t})},resizeBy:function(n,t){var i=r.getSize();r.resizeTo(i.w+n,i.h+t)},update:function(t){var f;if(n.isIE6&&i.blocker){if(t=t||"",t.indexOf("get")===0||t.indexOf("has")===0||t.indexOf("is")===0)return;if(t=="remove"){u.remove(r.blocker);return}r.blocker?f=u.get(r.blocker):(r.blocker=u.uniqueId(),f=u.add(i.container||u.getRoot(),"iframe",{id:r.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'}),u.setStyle(f,"opacity",0));u.setStyles(f,{left:r.getStyle("left",1),top:r.getStyle("top",1),width:r.getStyle("width",1),height:r.getStyle("height",1),display:r.getStyle("display",1),zIndex:parseInt(r.getStyle("zIndex",1)||0)-1})}}})}}(tinymce),function(n){var r=n.is,u=n.isIE,t=n.each,i=n.dom.TreeWalker;n.create("tinymce.dom.Selection",{Selection:function(i,r,u,f){var e=this;e.dom=i;e.win=r;e.serializer=u;e.editor=f;t(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(t){e[t]=new n.util.Dispatcher(e)});e.win.getSelection||(e.tridentSel=new n.dom.TridentSelection(e));n.isIE&&i.boxModel&&this._fixIESelection();n.addUnload(e.destroy,e)},setCursorLocation:function(n,t){var i=this,r=i.dom.createRng();r.setStart(n,t);r.setEnd(n,t);i.setRng(r);i.collapse(!1)},getContent:function(n){var t=this,i=t.getRng(),u=t.dom.create("body"),s=t.getSel(),f,e,o;return(n=n||{},f=e="",n.get=!0,n.format=n.format||"html",n.forced_root_block="",t.onBeforeGetContent.dispatch(t,n),n.format=="text")?t.isCollapsed()?"":i.text||(s.toString?s.toString():""):(i.cloneContents?(o=i.cloneContents(),o&&u.appendChild(o)):r(i.item)||r(i.htmlText)?(u.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText),u.removeChild(u.firstChild)):u.innerHTML=i.toString(),/^\s/.test(u.innerHTML)&&(f=" "),/\s+$/.test(u.innerHTML)&&(e=" "),n.getInner=!0,n.content=t.isCollapsed()?"":f+t.serializer.serialize(u,n)+e,t.onGetContent.dispatch(t,n),n.content)},setContent:function(n,t){var r=this,i=r.getRng(),f,u=r.win.document,e,o;if(t=t||{format:"html"},t.set=!0,n=t.content=n,t.no_events||r.onBeforeSetContent.dispatch(r,t),n=t.content,i.insertNode){n+='<span id="__caret">_<\/span>';i.startContainer==u&&i.endContainer==u?u.body.innerHTML=n:(i.deleteContents(),u.body.childNodes.length===0?u.body.innerHTML=n:i.createContextualFragment?i.insertNode(i.createContextualFragment(n)):(e=u.createDocumentFragment(),o=u.createElement("div"),e.appendChild(o),o.outerHTML=n,i.insertNode(e)));f=r.dom.get("__caret");i=u.createRange();i.setStartBefore(f);i.setEndBefore(f);r.setRng(i);r.dom.remove("__caret");try{r.setRng(i)}catch(s){}}else i.item&&(u.execCommand("Delete",!1,null),i=r.getRng()),/^\s+/.test(n)?(i.pasteHTML('<span id="__mce_tmp">_<\/span>'+n),r.dom.remove("__mce_tmp")):i.pasteHTML(n);t.no_events||r.onSetContent.dispatch(r,t)},getStart:function(){var r=this,t=r.getRng(),n,f,u,i;if(t.duplicate||t.item){if(t.item)return t.item(0);for(u=t.duplicate(),u.collapse(1),n=u.parentElement(),n.ownerDocument!==r.dom.doc&&(n=r.dom.getRoot()),f=i=t.parentElement();i=i.parentNode;)if(i==n){n=f;break}return n}return(n=t.startContainer,n.nodeType==1&&n.hasChildNodes()&&(n=n.childNodes[Math.min(n.childNodes.length-1,t.startOffset)]),n&&n.nodeType==3)?n.parentNode:n},getEnd:function(){var r=this,t=r.getRng(),n,i;return t.duplicate||t.item?t.item?t.item(0):(t=t.duplicate(),t.collapse(0),n=t.parentElement(),n.ownerDocument!==r.dom.doc&&(n=r.dom.getRoot()),n&&n.nodeName=="BODY")?n.lastChild||n:n:(n=t.endContainer,i=t.endOffset,n.nodeType==1&&n.hasChildNodes()&&(n=n.childNodes[i>0?i-1:i]),n&&n.nodeType==3)?n.parentNode:n},getBookmark:function(n,i){function v(n,i){var r=0;return t(h.select(n),function(n,t){n==i&&(r=t)}),r}function y(n){function t(t){var i,r,u,f=t?"start":"end";i=n[f+"Container"];r=n[f+"Offset"];i.nodeType==1&&i.nodeName=="TR"&&(u=i.childNodes,i=u[Math.min(t?r:r-1,u.length-1)],i&&(r=t?0:i.childNodes.length,n["set"+(t?"Start":"End")](i,r)))}return t(!0),t(),n}function p(){function r(n,t){var r=n[t?"startContainer":"endContainer"],o=n[t?"startOffset":"endOffset"],h=[],e,s,c=0;if(r.nodeType==3){if(i)for(e=r.previousSibling;e&&e.nodeType==3;e=e.previousSibling)o+=e.nodeValue.length;h.push(o)}else s=r.childNodes,o>=s.length&&s.length&&(c=1,o=Math.max(0,s.length-1)),h.push(u.dom.nodeIndex(s[o],i)+c);for(;r&&r!=f;r=r.parentNode)h.push(u.dom.nodeIndex(r,i));return h}var t=u.getRng(!0),f=h.getRoot(),n={};return n.start=r(t,!0),u.isCollapsed()||(n.end=r(t)),n}var u=this,h=u.dom,r,f,e,a,o,s,l="﻿",c;if(n==2)return u.tridentSel?u.tridentSel.getBookmark(n):p();if(n)return{rng:u.getRng()};if(r=u.getRng(),e=h.uniqueId(),a=tinyMCE.activeEditor.selection.isCollapsed(),c="overflow:hidden;line-height:0px",r.duplicate||r.item){if(r.item)return s=r.item(0),o=s.nodeName,{name:o,index:v(o,s)};f=r.duplicate();try{r.collapse();r.pasteHTML('<span data-mce-type="bookmark" id="'+e+'_start" style="'+c+'">'+l+"<\/span>");a||(f.collapse(!1),r.moveToElementText(f.parentElement()),r.compareEndPoints("StartToEnd",f)===0&&f.move("character",-1),f.pasteHTML('<span data-mce-type="bookmark" id="'+e+'_end" style="'+c+'">'+l+"<\/span>"))}catch(w){return null}}else{if(s=u.getNode(),o=s.nodeName,o=="IMG")return{name:o,index:v(o,s)};f=y(r.cloneRange());a||(f.collapse(!1),f.insertNode(h.create("span",{"data-mce-type":"bookmark",id:e+"_end",style:c},l)));r=y(r);r.collapse(!0);r.insertNode(h.create("span",{"data-mce-type":"bookmark",id:e+"_start",style:c},l))}return u.moveToBookmark({id:e,keep:1}),{id:e}},moveToBookmark:function(i){function a(n){var r=i[n?"start":"end"],u,t,e,o;if(r){for(e=r[0],t=l,u=r.length-1;u>=1;u--){if(o=t.childNodes,r[u]>o.length-1)return;t=o[r[u]]}t.nodeType===3&&(e=Math.min(r[0],t.nodeValue.length));t.nodeType===1&&(e=Math.min(r[0],t.childNodes.length));n?f.setStart(t,e):f.setEnd(t,e)}return!0}function v(u){var f=r.get(i.id+"_"+u),a,e,v,l,y=i.keep;if(f&&(a=f.parentNode,u=="start"?(y?(a=f.firstChild,e=1):e=r.nodeIndex(f),h=o=a,c=s=e):(y?(a=f.firstChild,e=1):e=r.nodeIndex(f),o=a,s=e),!y)){for(l=f.previousSibling,v=f.nextSibling,t(n.grep(f.childNodes),function(n){n.nodeType==3&&(n.nodeValue=n.nodeValue.replace(/\uFEFF/g,""))});f=r.get(i.id+"_"+u);)r.remove(f,1);l&&v&&l.nodeType==v.nodeType&&l.nodeType==3&&!n.isOpera&&(e=l.nodeValue.length,l.appendData(v.nodeValue),r.remove(v),u=="start"?(h=o=l,c=s=e):(o=l,s=e))}}function y(n){return!r.isBlock(n)||n.innerHTML||u||(n.innerHTML='<br data-mce-bogus="1" />'),n}var e=this,r=e.dom,f,l,h,o,c,s;if(i)if(i.start){if(f=r.createRng(),l=r.getRoot(),e.tridentSel)return e.tridentSel.moveToBookmark(i);a(!0)&&a()&&e.setRng(f)}else i.id?(v("start"),v("end"),h&&(f=r.createRng(),f.setStart(y(h),c),f.setEnd(y(o),s),e.setRng(f))):i.name?e.select(r.select(i.name)[i.index]):i.rng&&e.setRng(i.rng)},select:function(t,r){function s(t,r){var f=new i(t,t);do{if(t.nodeType==3&&n.trim(t.nodeValue).length!==0){r?u.setStart(t,0):u.setEnd(t,t.nodeValue.length);return}if(t.nodeName=="BR"){r?u.setStartBefore(t):u.setEndBefore(t);return}}while(t=r?f.next():f.prev())}var e=this,o=e.dom,u=o.createRng(),f;return t&&(f=o.nodeIndex(t),u.setStart(t.parentNode,f),u.setEnd(t.parentNode,f+1),r&&(s(t,1),s(t)),e.setRng(u)),t},isCollapsed:function(){var t=this,n=t.getRng(),i=t.getSel();return!n||n.item?!1:n.compareEndPoints?n.compareEndPoints("StartToEnd",n)===0:!i||n.collapsed},collapse:function(n){var i=this,t=i.getRng(),r;t.item&&(r=t.item(0),t=i.win.document.body.createTextRange(),t.moveToElementText(r));t.collapse(!!n);i.setRng(t)},getSel:function(){var t=this,n=this.win;return n.getSelection?n.getSelection():n.document.selection},getRng:function(t){var r=this,e,i,f,u=r.win.document;if(t&&r.tridentSel)return r.tridentSel.getRangeAt(0);try{(e=r.getSel())&&(i=e.rangeCount>0?e.getRangeAt(0):e.createRange?e.createRange():u.createRange())}catch(o){}return n.isIE&&i&&i.setStart&&u.selection.createRange().item&&(f=u.selection.createRange().item(0),i=u.createRange(),i.setStartBefore(f),i.setEndAfter(f)),i||(i=u.createRange?u.createRange():u.body.createTextRange()),i.setStart&&i.startContainer.nodeType===9&&i.collapsed&&(f=r.dom.getRoot(),i.setStart(f,0),i.setEnd(f,0)),r.selectedRange&&r.explicitRange&&(i.compareBoundaryPoints(i.START_TO_START,r.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,r.selectedRange)===0?i=r.explicitRange:(r.selectedRange=null,r.explicitRange=null)),i},setRng:function(n,t){var i,r=this;if(r.tridentSel){if(n.cloneRange)try{r.tridentSel.addRange(n);return}catch(u){}try{n.select()}catch(u){}}else if(i=r.getSel(),i){r.explicitRange=n;try{i.removeAllRanges()}catch(u){}i.addRange(n);t===!1&&i.extend&&(i.collapse(n.endContainer,n.endOffset),i.extend(n.startContainer,n.startOffset));r.selectedRange=i.rangeCount>0?i.getRangeAt(0):null}},setNode:function(n){var t=this;return t.setContent(t.dom.getOuterHTML(n)),n},getNode:function(){function f(n,t){for(var i=n;n&&n.nodeType===3&&n.length===0;)n=t?n.nextSibling:n.previousSibling;return n||i}var u=this,n=u.getRng(),e=u.getSel(),i,t=n.startContainer,r=n.endContainer;return n?n.setStart?(i=n.commonAncestorContainer,!n.collapsed&&(n.startContainer==n.endContainer&&n.endOffset-n.startOffset<2&&n.startContainer.hasChildNodes()&&(i=n.startContainer.childNodes[n.startOffset]),t.nodeType===3&&r.nodeType===3&&(t=t.length===n.startOffset?f(t.nextSibling,!0):t.parentNode,r=n.endOffset===0?f(r.previousSibling,!1):r.parentNode,t&&t===r)))?t:i&&i.nodeType==3?i.parentNode:i:n.item?n.item(0):n.parentElement():u.dom.getRoot()},getSelectedBlocks:function(n,t){var s=this,f=s.dom,r,u,e,o=[],h;if(r=f.getParent(n||s.getStart(),f.isBlock),u=f.getParent(t||s.getEnd(),f.isBlock),r&&o.push(r),r&&u&&r!=u)for(e=r,h=new i(r,f.getRoot());(e=h.next())&&e!=u;)f.isBlock(e)&&o.push(e);return u&&r!=u&&o.push(u),o},isForward:function(){var r=this.dom,n=this.getSel(),t,i;return!n||n.anchorNode==null||n.focusNode==null?!0:(t=r.createRng(),t.setStart(n.anchorNode,n.anchorOffset),t.collapse(!0),i=r.createRng(),i.setStart(n.focusNode,n.focusOffset),i.collapse(!0),t.compareBoundaryPoints(t.START_TO_START,i)<=0)},normalize:function(){function e(n){function y(n,t){for(var r=new i(n,h.getParent(n.parentNode,h.isBlock)||c);n=r[t?"prev":"next"]();)if(n.nodeName==="BR")return!0}function v(n,t){var a,f;for(t=t||o,a=new i(t,h.getParent(t.parentNode,h.isBlock)||c);e=a[n?"prev":"next"]();){if(e.nodeType===3&&e.nodeValue.length>0){o=e;s=n?e.nodeValue.length:0;r=!0;return}if(h.isBlock(e)||l[e.nodeName.toLowerCase()])return;f=e}u&&f&&(o=f,r=!0,s=0)}var o,s,a,h=f.dom,c=h.getRoot(),e,l,p;if(o=t[(n?"start":"end")+"Container"],s=t[(n?"start":"end")+"Offset"],l=h.schema.getNonEmptyElements(),o.nodeType===9&&(o=h.getRoot(),s=0),o===c){if(n&&(e=o.childNodes[s>0?s-1:0],e&&(p=e.nodeName.toLowerCase(),l[e.nodeName]||e.nodeName=="TABLE")))return;if(o.hasChildNodes()&&(o=o.childNodes[Math.min(!n&&s>0?s-1:s,o.childNodes.length-1)],s=0,o.hasChildNodes()&&!/TABLE/.test(o.nodeName))){e=o;a=new i(o,c);do{if(e.nodeType===3&&e.nodeValue.length>0){s=n?0:e.nodeValue.length;o=e;r=!0;break}if(l[e.nodeName.toLowerCase()]){s=h.nodeIndex(e);o=e.parentNode;e.nodeName!="IMG"||n||s++;r=!0;break}}while(e=n?a.next():a.prev())}}u&&(o.nodeType===3&&s===0&&v(!0),o.nodeType===1&&(e=o.childNodes[s],!e||e.nodeName!=="BR"||y(e)||y(e,!0)||v(!0,o.childNodes[s])));n&&!u&&o.nodeType===3&&s===o.nodeValue.length&&v(!1);r&&t["set"+(n?"Start":"End")](o,s)}var f=this,t,r,u;n.isIE||(t=f.getRng(),u=t.collapsed,e(!0),u||e(),r&&(u&&t.collapse(!0),f.setRng(t,f.isForward())))},selectorChanged:function(n,i){var r=this,u;return r.selectorChangedData||(r.selectorChangedData={},u={},r.editor.onNodeChange.addToTop(function(n,i,f){var e=r.dom,o=e.getParents(f,null,e.getRoot()),s={};t(r.selectorChangedData,function(n,i){t(o,function(r){if(e.is(r,i))return u[i]||(t(n,function(n){n(!0,{node:r,selector:i,parents:o})}),u[i]=n),s[i]=n,!1})});t(u,function(n,i){s[i]||(delete u[i],t(n,function(n){n(!1,{node:f,selector:i,parents:o})}))})})),r.selectorChangedData[n]||(r.selectorChangedData[n]=[]),r.selectorChangedData[n].push(i),r},destroy:function(t){var i=this;i.win=null;t||n.removeUnload(i.destroy)},_fixIESelection:function(){function e(n,t){var i=s.createTextRange();try{i.moveToPoint(n,t)}catch(r){i=null}return i}function o(n){var i;n.button?(i=e(n.x,n.y),i&&(i.compareEndPoints("StartToStart",t)>0?i.setEndPoint("StartToStart",t):i.setEndPoint("EndToEnd",t),i.select())):r()}function r(){var f=n.selection.createRange();t&&!f.item&&f.compareEndPoints("StartToEnd",f)===0&&t.select();i.unbind(n,"mouseup",r);i.unbind(n,"mousemove",o);t=u=0}var i=this.dom,n=i.doc,s=n.body,u,t,f;n.documentElement.unselectable=!0;i.bind(n,["mousedown","contextmenu"],function(s){if(s.target.nodeName==="HTML"){if(u&&r(),f=n.documentElement,f.scrollHeight>f.clientHeight)return;u=1;t=e(s.x,s.y);t&&(i.bind(n,"mouseup",r),i.bind(n,"mousemove",o),i.win.focus(),t.select())}})}})}(tinymce),function(n){n.dom.Serializer=function(t,i,r){var f,e,o=n.isIE,s=n.each,u;return t.apply_source_formatting||(t.indent=!1),i=i||n.DOM,r=r||new n.html.Schema(t),t.entity_encoding=t.entity_encoding||"named",t.remove_trailing_brs="remove_trailing_brs"in t?t.remove_trailing_brs:!0,f=new n.util.Dispatcher(self),e=new n.util.Dispatcher(self),u=new n.html.DomParser(t,r),u.addAttributeFilter("src,href,style",function(n,r){for(var e=n.length,f,u,o="data-mce-"+r,s=t.url_converter,h=t.url_converter_scope,c;e--;)f=n[e],u=f.attributes.map[o],u!==c?(f.attr(r,u.length>0?u:null),f.attr(o,null)):(u=f.attributes.map[r],r==="style"?u=i.serializeStyle(i.parseStyle(u),f.name):s&&(u=s.call(h,u,r,f.name)),f.attr(r,u.length>0?u:null))}),u.addAttributeFilter("class",function(n){for(var r=n.length,t,i;r--;)t=n[r],i=t.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,""),t.attr("class",i.length>0?i:null)}),u.addAttributeFilter("data-mce-type",function(n,t,i){for(var u=n.length,r;u--;)r=n[u],r.attributes.map["data-mce-type"]!=="bookmark"||i.cleanup||r.remove()}),u.addAttributeFilter("data-mce-expando",function(n,t){for(var i=n.length;i--;)n[i].attr(t,null)}),u.addNodeFilter("script,style",function(n,t){function f(n){return n.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var u=n.length,i,r;u--;)i=n[u],r=i.firstChild?i.firstChild.value:"",t==="script"?(i.attr("type",(i.attr("type")||"text/javascript").replace(/^mce\-/,"")),r.length>0&&(i.firstChild.value="// <![CDATA[\n"+f(r)+"\n// ]\]>")):r.length>0&&(i.firstChild.value="<!--\n"+f(r)+"\n-->")}),u.addNodeFilter("#comment",function(n){for(var i=n.length,t;i--;)t=n[i],t.value.indexOf("[CDATA[")===0?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):t.value.indexOf("mce:protected ")===0&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),u.addNodeFilter("xml:namespace,input",function(n,t){for(var r=n.length,i;r--;)i=n[r],i.type===7?i.remove():i.type===1&&(t!=="input"||"type"in i.attributes.map||i.attr("type","text"))}),t.fix_list_elements&&u.addNodeFilter("ul,ol",function(n){for(var r=n.length,t,i;r--;)t=n[r],i=t.parent,(i.name==="ul"||i.name==="ol")&&t.prev&&t.prev.name==="li"&&t.prev.append(t)}),u.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(n,t){for(var i=n.length;i--;)n[i].attr(t,null)}),{schema:r,addNodeFilter:u.addNodeFilter,addAttributeFilter:u.addAttributeFilter,onPreProcess:f,onPostProcess:e,serialize:function(h,c){var a,l,v,y,p;return o&&i.select("script,style,select,map").length>0?(p=h.innerHTML,h=h.cloneNode(!1),i.setHTML(h,p)):h=h.cloneNode(!0),a=h.ownerDocument.implementation,a.createHTMLDocument&&(l=a.createHTMLDocument(""),s(h.nodeName=="BODY"?h.childNodes:[h],function(n){l.body.appendChild(l.importNode(n,!0))}),h=h.nodeName!="BODY"?l.body.firstChild:l.body,v=i.doc,i.doc=l),c=c||{},c.format=c.format||"html",c.no_events||(c.node=h,f.dispatch(self,c)),y=new n.html.Serializer(t,r),c.content=y.serialize(u.parse(n.trim(c.getInner?h.innerHTML:i.getOuterHTML(h)),c)),c.cleanup||(c.content=c.content.replace(/\uFEFF/g,"")),c.no_events||e.dispatch(self,c),v&&(i.doc=v),c.node=null,c.content},addRules:function(n){r.addValidElements(n)},setRules:function(n){r.setValidElements(n)}}}}(tinymce),function(n){n.dom.ScriptLoader=function(){function c(t,i){function s(){f.remove(o);r&&(r.onreadystatechange=r.onload=r=null);i()}function h(){typeof console!="undefined"&&console.log&&console.log("Failed to load: "+t)}var c=this,f=n.DOM,r,u,e,o;if(o=f.uniqueId(),n.isIE6&&(u=new n.util.URI(t),e=location,u.host==e.hostname&&u.port==e.port&&u.protocol+":"==e.protocol&&u.protocol.toLowerCase()!="file")){n.util.XHR.send({url:n._addVer(u.getURI()),success:function(n){var t=f.create("script",{type:"text/javascript"});t.text=n;document.getElementsByTagName("head")[0].appendChild(t);f.remove(t);s()},error:h});return}r=document.createElement("script");r.id=o;r.type="text/javascript";r.src=n._addVer(t);n.isIE||(r.onload=s);r.onerror=h;n.isOpera||(r.onreadystatechange=function(){var n=r.readyState;(n=="complete"||n=="loaded")&&s()});(document.getElementsByTagName("head")[0]||document.body).appendChild(r)}var h=0,e=1,r=2,t={},o=[],i={},u=[],f=0,s;this.isDone=function(n){return t[n]==r};this.markDone=function(n){t[n]=r};this.add=this.load=function(n,r,u){var f=t[n];f==s&&(o.push(n),t[n]=h);r&&(i[n]||(i[n]=[]),i[n].push({func:r,scope:u||this}))};this.loadQueue=function(n,t){this.loadScripts(o,n,t)};this.loadScripts=function(o,h,l){function v(t){n.each(i[t],function(n){n.func.call(n.scope)});i[t]=s}var a;u.push({func:h,scope:l||this});a=function(){var i=n.grep(o);o.length=0;n.each(i,function(n){if(t[n]==r){v(n);return}t[n]!=e&&(t[n]=e,f++,c(n,function(){t[n]=r;f--;v(n);a()}))});f||(n.each(u,function(n){n.func.call(n.scope)}),u.length=0)};a()}};n.ScriptLoader=new n.dom.ScriptLoader}(tinymce),function(n){n.dom.RangeUtils=function(t){this.walk=function(i,r){function y(n){var t;return t=n[0],t.nodeType===3&&t===f&&p>=t.nodeValue.length&&n.splice(0,1),t=n[n.length-1],w===0&&n.length>0&&t===e&&t.nodeType===3&&n.splice(n.length-1,1),n}function b(n,t,i){for(var r=[];n&&n!=i;n=n[t])r.push(n);return r}function k(n,t){do{if(n.parentNode==t)return n;n=n.parentNode}while(n)}function l(n,t,i){var f=i?"nextSibling":"previousSibling";for(u=n,a=u.parentNode;u&&u!=t;u=a)a=u.parentNode,s=b(u==n?u:u[f],f),s.length&&(i||s.reverse(),r(y(s)))}var f=i.startContainer,p=i.startOffset,e=i.endContainer,w=i.endOffset,o,h,c,u,a,s,v;if(v=t.select("td.mceSelected,th.mceSelected"),v.length>0){n.each(v,function(n){r([n])});return}if(f.nodeType==1&&f.hasChildNodes()&&(f=f.childNodes[p]),e.nodeType==1&&e.hasChildNodes()&&(e=e.childNodes[Math.min(w-1,e.childNodes.length-1)]),f==e)return r(y([f]));for(o=t.findCommonAncestor(f,e),u=f;u;u=u.parentNode){if(u===e)return l(f,o,!0);if(u===o)break}for(u=e;u;u=u.parentNode){if(u===f)return l(e,o);if(u===o)break}h=k(f,o)||f;c=k(e,o)||e;l(f,h,!0);s=b(h==f?h:h.nextSibling,"nextSibling",c==e?c.nextSibling:c);s.length&&r(y(s));l(e,c)};this.split=function(n){function f(n,t){return n.splitText(t)}var i=n.startContainer,r=n.startOffset,t=n.endContainer,u=n.endOffset;return i==t&&i.nodeType==3?r>0&&r<i.nodeValue.length&&(t=f(i,r),i=t.previousSibling,u>r?(u=u-r,i=t=f(t,u).previousSibling,u=t.nodeValue.length,r=0):u=0):(i.nodeType==3&&r>0&&r<i.nodeValue.length&&(i=f(i,r),r=0),t.nodeType==3&&u>0&&u<t.nodeValue.length&&(t=f(t,u).previousSibling,u=t.nodeValue.length)),{startContainer:i,startOffset:r,endContainer:t,endOffset:u}}};n.dom.RangeUtils.compareRanges=function(n,t){if(n&&t)if(n.item||n.duplicate){if(n.item&&t.item&&n.item(0)===t.item(0)||n.isEqual&&t.isEqual&&t.isEqual(n))return!0}else return n.startContainer==t.startContainer&&n.startOffset==t.startOffset;return!1}}(tinymce),function(n){var t=n.dom.Event,i=n.each;n.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(r,u){var f=this,s=r.root,e=r.items,y=r.enableUpDown,p=r.enableLeftRight||!r.enableUpDown,w=r.excludeFromTabOrder,h,c,l,a,o,v;u=u||n.DOM;h=function(n){o=n.target.id};c=function(n){u.setAttrib(n.target.id,"tabindex","-1")};a=function(){var n=u.get(o);u.setAttrib(n,"tabindex","0");n.focus()};f.focus=function(){u.get(o).focus()};f.destroy=function(){i(e,function(n){var t=u.get(n.id);u.unbind(t,"focus",h);u.unbind(t,"blur",c)});var n=u.get(s);u.unbind(n,"focus",a);u.unbind(n,"keydown",l);e=u=s=f.focus=h=c=l=a=null;f.destroy=function(){}};f.moveFocus=function(n,s){var h=-1,l=f.controls,c;if(o){if(i(e,function(n,t){if(n.id===o)return h=t,!1}),h+=n,h<0?h=e.length-1:h>=e.length&&(h=0),c=e[h],u.setAttrib(o,"tabindex","-1"),u.setAttrib(c.id,"tabindex","0"),u.get(c.id).focus(),r.actOnFocus)r.onAction(c.id);s&&t.cancel(s)}};l=function(n){switch(n.keyCode){case 37:p&&f.moveFocus(-1);break;case 39:p&&f.moveFocus(1);break;case 38:y&&f.moveFocus(-1);break;case 40:y&&f.moveFocus(1);break;case 27:r.onCancel&&(r.onCancel(),t.cancel(n));break;case 14:case 13:case 32:if(r.onAction){r.onAction(o);t.cancel(n)}}};i(e,function(n,t){var r,i;n.id||(n.id=u.uniqueId("_mce_item_"));i=u.get(n.id);w?(u.bind(i,"blur",c),r="-1"):r=t===0?"0":"-1";i.setAttribute("tabindex",r);u.bind(i,"focus",h)});e[0]&&(o=e[0].id);u.setAttrib(s,"tabindex","-1");v=u.get(s);u.bind(v,"focus",a);u.bind(v,"keydown",l)}})}(tinymce),function(n){var t=n.DOM,i=n.is;n.create("tinymce.ui.Control",{Control:function(t,i,r){this.id=t;this.settings=i=i||{};this.rendered=!1;this.onRender=new n.util.Dispatcher(this);this.classPrefix="";this.scope=i.scope||this;this.disabled=0;this.active=0;this.editor=r},setAriaProperty:function(n,i){var r=t.get(this.id+"_aria")||t.get(this.id);r&&t.setAttrib(r,"aria-"+n,!!i)},focus:function(){t.get(this.id).focus()},setDisabled:function(n){n!=this.disabled&&(this.setAriaProperty("disabled",n),this.setState("Disabled",n),this.setState("Enabled",!n),this.disabled=n)},isDisabled:function(){return this.disabled},setActive:function(n){n!=this.active&&(this.setState("Active",n),this.active=n,this.setAriaProperty("pressed",n))},isActive:function(){return this.active},setState:function(n,i){var r=t.get(this.id);n=this.classPrefix+n;i?t.addClass(r,n):t.removeClass(r,n)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(n){t.setHTML(n,this.renderHTML())},postRender:function(){var n=this,t;i(n.disabled)&&(t=n.disabled,n.disabled=-1,n.setDisabled(t));i(n.active)&&(t=n.active,n.active=-1,n.setActive(t))},remove:function(){t.remove(this.id);this.destroy()},destroy:function(){n.dom.Event.clear(this.id)}})}(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(n,t,i){this.parent(n,t,i);this.controls=[];this.lookup={}},add:function(n){return this.lookup[n.id]=n,this.controls.push(n),n},get:function(n){return this.lookup[n]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(n,t){this.parent(n,t);this.classPrefix="mceSeparator";this.setDisabled(!0)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}}),function(n){var t=n.is,i=n.DOM,r=n.each,u=n.walk;n.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(n,t){this.parent(n,t);this.classPrefix="mceMenuItem"},setSelected:function(n){this.setState("Selected",n);this.setAriaProperty("checked",!!n);this.selected=n},isSelected:function(){return this.selected},postRender:function(){var n=this;n.parent();t(n.selected)&&n.setSelected(n.selected)}})}(tinymce),function(n){var r=n.is,i=n.DOM,u=n.each,t=n.walk;n.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(t,i){var r=this;r.parent(t,i);r.items={};r.collapsed=!1;r.menuCount=0;r.onAddItem=new n.util.Dispatcher(this)},expand:function(n){var i=this;n&&t(i,function(n){n.expand&&n.expand()},"items",i);i.collapsed=!1},collapse:function(n){var i=this;n&&t(i,function(n){n.collapse&&n.collapse()},"items",i);i.collapsed=!0},isCollapsed:function(){return this.collapsed},add:function(t){return t.settings||(t=new n.ui.MenuItem(t.id||i.uniqueId(),t)),this.onAddItem.dispatch(this,t),this.items[t.id]=t},addSeparator:function(){return this.add({separator:!0})},addMenu:function(n){return n.collapse||(n=this.createMenu(n)),this.menuCount++,this.add(n)},hasMenus:function(){return this.menuCount!==0},remove:function(n){delete this.items[n.id]},removeAll:function(){var n=this;t(n,function(n){n.removeAll?n.removeAll():n.remove();n.destroy()},"items",n);n.items={}},createMenu:function(t){var r=new n.ui.Menu(t.id||i.uniqueId(),t);return r.onAddItem.add(this.onAddItem.dispatch,this.onAddItem),r}})}(tinymce),function(n){var f=n.is,t=n.DOM,r=n.each,i=n.dom.Event,u=n.dom.Element;n.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(i,r){r=r||{};r.container=r.container||t.doc.body;r.offset_x=r.offset_x||0;r.offset_y=r.offset_y||0;r.vp_offset_x=r.vp_offset_x||0;r.vp_offset_y=r.vp_offset_y||0;f(r.icons)&&!r.icons&&(r["class"]+=" mceNoIcons");this.parent(i,r);this.onShowMenu=new n.util.Dispatcher(this);this.onHideMenu=new n.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(i){var u=this,r=u.settings,f;return i.container=i.container||r.container,i.parent=u,i.constrain=i.constrain||r.constrain,i["class"]=i["class"]||r["class"],i.vp_offset_x=i.vp_offset_x||r.vp_offset_x,i.vp_offset_y=i.vp_offset_y||r.vp_offset_y,i.keyboard_focus=r.keyboard_focus,f=new n.ui.DropMenu(i.id||t.uniqueId(),i),f.onAddItem.add(u.onAddItem.dispatch,u.onAddItem),f},focus:function(){var n=this;n.keyboardNav&&n.keyboardNav.focus()},update:function(){var i=this,n=i.settings,r=t.get("menu_"+i.id+"_tbl"),e=t.get("menu_"+i.id+"_co"),u,f;u=n.max_width?Math.min(r.offsetWidth,n.max_width):r.offsetWidth;f=n.max_height?Math.min(r.offsetHeight,n.max_height):r.offsetHeight;t.boxModel?i.element.setStyles({width:u,height:f}):i.element.setStyles({width:u+2,height:f+2});n.max_width&&t.setStyle(e,"width",u);n.max_height&&(t.setStyle(e,"height",f),r.clientHeight<n.max_height&&t.setStyle(e,"overflow","hidden"))},showMenu:function(f,e,o){var s=this,c=s.settings,h,l=t.getViewPort(),v,p,w,b,y=2,a,k=s.classPrefix;(s.collapse(1),s.isMenuVisible)||(s.rendered?h=t.get("menu_"+s.id):(h=t.add(s.settings.container,s.renderNode()),r(s.items,function(n){n.postRender()}),s.element=new u("menu_"+s.id,{blocker:1,container:c.container})),n.isOpera||t.setStyles(h,{left:-65535,top:-65535}),t.show(h),s.update(),f+=c.offset_x||0,e+=c.offset_y||0,l.w-=4,l.h-=4,c.constrain&&(v=h.clientWidth-y,p=h.clientHeight-y,w=l.x+l.w,b=l.y+l.h,f+c.vp_offset_x+v>w&&(f=o?o-v:Math.max(0,w-c.vp_offset_x-v)),e+c.vp_offset_y+p>b&&(e=Math.max(0,b-c.vp_offset_y-p))),t.setStyles(h,{left:f,top:e}),s.element.update(),s.isMenuVisible=1,s.mouseClickFunc=i.add(h,"click",function(n){var i;if(n=n.target,n&&(n=t.getParent(n,"tr"))&&!t.hasClass(n,k+"ItemSub")){if(i=s.items[n.id],i.isDisabled())return;for(a=s;a;)a.hideMenu&&a.hideMenu(),a=a.settings.parent;if(i.settings.onclick)i.settings.onclick(n);return!1}}),s.hasMenus()&&(s.mouseOverFunc=i.add(h,"mouseover",function(n){var i,r;if(n=n.target,n&&(n=t.getParent(n,"tr"))){if(i=s.items[n.id],s.lastMenu&&s.lastMenu.collapse(1),i.isDisabled())return;n&&t.hasClass(n,k+"ItemSub")&&(r=t.getRect(n),i.showMenu(r.x+r.w-y,r.y-y,r.x),s.lastMenu=i,t.addClass(t.get(i.id).firstChild,k+"ItemActive"))}})),i.add(h,"keydown",s._keyHandler,s),s.onShowMenu.dispatch(s),c.keyboard_focus&&s._setupKeyboardNav())},hideMenu:function(n){var r=this,u=t.get("menu_"+r.id),f;r.isMenuVisible&&(r.keyboardNav&&r.keyboardNav.destroy(),i.remove(u,"mouseover",r.mouseOverFunc),i.remove(u,"click",r.mouseClickFunc),i.remove(u,"keydown",r._keyHandler),t.hide(u),r.isMenuVisible=0,n||r.collapse(1),r.element&&r.element.hide(),(f=t.get(r.id))&&t.removeClass(f.firstChild,r.classPrefix+"ItemActive"),r.onHideMenu.dispatch(r))},add:function(n){var i=this,r;return n=i.parent(n),i.isRendered&&(r=t.get("menu_"+i.id))&&i._add(t.select("tbody",r)[0],n),n},collapse:function(n){this.parent(n);this.hideMenu(1)},remove:function(n){return t.remove(n.id),this.destroy(),this.parent(n)},destroy:function(){var n=this,r=t.get("menu_"+n.id);n.keyboardNav&&n.keyboardNav.destroy();i.remove(r,"mouseover",n.mouseOverFunc);i.remove(t.select("a",r),"focus",n.mouseOverFunc);i.remove(r,"click",n.mouseClickFunc);i.remove(r,"keydown",n._keyHandler);n.element&&n.element.remove();t.remove(r)},renderNode:function(){var n=this,i=n.settings,o,s,e,f;return f=t.create("div",{role:"listbox",id:"menu_"+n.id,"class":i["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"}),n.settings.parent&&t.setAttrib(f,"aria-parent","menu_"+n.settings.parent.id),e=t.add(f,"div",{role:"presentation",id:"menu_"+n.id+"_co","class":n.classPrefix+(i["class"]?" "+i["class"]:"")}),n.element=new u("menu_"+n.id,{blocker:1,container:i.container}),i.menu_line&&t.add(e,"span",{"class":n.classPrefix+"Line"}),o=t.add(e,"table",{role:"presentation",id:"menu_"+n.id+"_tbl",border:0,cellPadding:0,cellSpacing:0}),s=t.add(o,"tbody"),r(n.items,function(t){n._add(s,t)}),n.rendered=!0,f},_setupKeyboardNav:function(){var r,u,i=this;r=t.get("menu_"+i.id);u=t.select("a[role=option]","menu_"+i.id);u.splice(0,0,r);i.keyboardNav=new n.ui.KeyboardNavigation({root:"menu_"+i.id,items:u,onCancel:function(){i.hideMenu()},enableUpDown:!0});r.focus()},_keyHandler:function(n){var t=this;switch(n.keyCode){case 37:t.settings.parent&&(t.hideMenu(),t.settings.parent.focus(),i.cancel(n));break;case 39:t.mouseOverFunc&&t.mouseOverFunc(n)}},_add:function(n,i){var r,u=i.settings,o,f,s,e=this.classPrefix,h;if(u.separator){f=t.add(n,"tr",{id:i.id,"class":e+"ItemSeparator"});t.add(f,"td",{"class":e+"ItemSeparator"});(r=f.previousSibling)&&t.addClass(r,"mceLast");return}r=f=t.add(n,"tr",{id:i.id,"class":e+"Item "+e+"ItemEnabled"});r=s=t.add(r,u.titleItem?"th":"td");r=o=t.add(r,"a",{id:i.id+"_aria",role:u.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});u.parent&&(t.setAttrib(o,"aria-haspopup","true"),t.setAttrib(o,"aria-owns","menu_"+i.id));t.addClass(s,u["class"]);h=t.add(r,"span",{"class":"mceIcon"+(u.icon?" mce_"+u.icon:"")});u.icon_src&&t.add(h,"img",{src:u.icon_src});r=t.add(r,u.element||"span",{"class":"mceText",title:i.settings.title},i.settings.title);i.settings.style&&(typeof i.settings.style=="function"&&(i.settings.style=i.settings.style()),t.setAttrib(r,"style",i.settings.style));n.childNodes.length==1&&t.addClass(f,"mceFirst");(r=f.previousSibling)&&t.hasClass(r,e+"ItemSeparator")&&t.addClass(f,"mceFirst");i.collapse&&t.addClass(f,e+"ItemSub");(r=f.previousSibling)&&t.removeClass(r,"mceLast");t.addClass(f,"mceLast")}})}(tinymce),function(n){var t=n.DOM;n.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(n,t,i){this.parent(n,t,i);this.classPrefix="mceButton"},renderHTML:function(){var r=this.classPrefix,n=this.settings,u,i;return i=t.encode(n.label||""),u='<a role="button" id="'+this.id+'" href="javascript:;" class="'+r+" "+r+"Enabled "+n["class"]+(i?" "+r+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+t.encode(n.title)+'">',u+=!n.image||this.editor&&this.editor.forcedHighContrastMode?'<span class="mceIcon '+n["class"]+'"><\/span>'+(i?'<span class="'+r+'Label">'+i+"<\/span>":""):'<span class="mceIcon '+n["class"]+'"><img class="mceIcon" src="'+n.image+'" alt="'+t.encode(n.title)+'" /><\/span>'+(i?'<span class="'+r+'Label">'+i+"<\/span>":""),u+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+n.title+"<\/span>",u+"<\/a>"},postRender:function(){var t=this,i=t.settings,r;n.isIE&&t.editor&&n.dom.Event.add(t.id,"mousedown",function(){var n=t.editor.selection.getNode().nodeName;r=n==="IMG"?t.editor.selection.getBookmark():null});n.dom.Event.add(t.id,"click",function(u){if(!t.isDisabled())return n.isIE&&t.editor&&r!==null&&t.editor.selection.moveToBookmark(r),i.onclick.call(i.scope,u)});n.dom.Event.add(t.id,"keyup",function(r){if(!t.isDisabled()&&r.keyCode==n.VK.SPACEBAR)return i.onclick.call(i.scope,r)})}})}(tinymce),function(n){var t=n.DOM,i=n.dom.Event,r=n.each,u=n.util.Dispatcher,f;n.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(t,i,r){var f=this;f.parent(t,i,r);f.items=[];f.onChange=new u(f);f.onPostRender=new u(f);f.onAdd=new u(f);f.onRenderMenu=new n.util.Dispatcher(this);f.classPrefix="mceListBox";f.marked={}},select:function(n){var t=this,i,u;if(t.marked={},n==f)return t.selectByIndex(-1);u=n&&typeof n=="function"?n:function(t){return t==n};n!=t.selectedValue&&(r(t.items,function(n,r){if(u(n.value))return i=1,t.selectByIndex(r),!1}),i||t.selectByIndex(-1))},selectByIndex:function(n){var i=this,r,u,f;i.marked={};n!=i.selectedIndex&&(r=t.get(i.id+"_text"),f=t.get(i.id+"_voiceDesc"),u=i.items[n],u?(i.selectedValue=u.value,i.selectedIndex=n,t.setHTML(r,t.encode(u.title)),t.setHTML(f,i.settings.title+" - "+u.title),t.removeClass(r,"mceTitle"),t.setAttrib(i.id,"aria-valuenow",u.title)):(t.setHTML(r,t.encode(i.settings.title)),t.setHTML(f,t.encode(i.settings.title)),t.addClass(r,"mceTitle"),i.selectedValue=i.selectedIndex=null,t.setAttrib(i.id,"aria-valuenow",i.settings.title)),r=0)},mark:function(n){this.marked[n]=!0},add:function(t,i,r){var u=this;r=r||{};r=n.extend(r,{title:t,value:i});u.items.push(r);u.onAdd.dispatch(u,r)},getLength:function(){return this.items.length},renderHTML:function(){var i="",n=this,r=n.settings,u=n.classPrefix;return i='<span role="listbox" aria-haspopup="true" aria-labelledby="'+n.id+'_voiceDesc" aria-describedby="'+n.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+n.id+'" cellpadding="0" cellspacing="0" class="'+u+" "+u+"Enabled"+(r["class"]?" "+r["class"]:"")+'"><tbody><tr>',i+="<td>"+t.createHTML("span",{id:n.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},n.settings.title),i+=t.createHTML("a",{id:n.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},t.encode(n.settings.title))+"<\/td>",i+="<td>"+t.createHTML("a",{id:n.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">▼<\/span><\/span>')+"<\/td>",i+"<\/tr><\/tbody><\/table><\/span>"},showMenu:function(){var u=this,e,o=t.get(this.id),f;if(!u.isDisabled()&&u.items.length!==0){if(u.menu&&u.menu.isMenuVisible)return u.hideMenu();u.isMenuRendered||(u.renderMenu(),u.isMenuRendered=!0);e=t.getPos(o);f=u.menu;f.settings.offset_x=e.x;f.settings.offset_y=e.y;f.settings.keyboard_focus=!n.isOpera;r(u.items,function(n){f.items[n.id]&&f.items[n.id].setSelected(0)});r(u.items,function(n){f.items[n.id]&&u.marked[n.value]&&f.items[n.id].setSelected(1);n.value===u.selectedValue&&f.items[n.id].setSelected(1)});f.showMenu(0,o.clientHeight);i.add(t.doc,"mousedown",u.hideMenu,u);t.addClass(u.id,u.classPrefix+"Selected")}},hideMenu:function(n){var r=this;if(r.menu&&r.menu.isMenuVisible){if(t.removeClass(r.id,r.classPrefix+"Selected"),n&&n.type=="mousedown"&&(n.target.id==r.id+"_text"||n.target.id==r.id+"_open"))return;n&&t.getParent(n.target,".mceMenu")||(t.removeClass(r.id,r.classPrefix+"Selected"),i.remove(t.doc,"mousedown",r.hideMenu,r),r.menu.hideMenu())}},renderMenu:function(){var n=this,i;i=n.settings.control_manager.createDropMenu(n.id+"_menu",{menu_line:1,"class":n.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});i.onHideMenu.add(function(){n.hideMenu();n.focus()});i.add({title:n.settings.title,"class":"mceMenuItemTitle",onclick:function(){n.settings.onselect("")!==!1&&n.select("")}});r(n.items,function(r){r.value===f?i.add({title:r.title,role:"option","class":"mceMenuItemTitle",onclick:function(){n.settings.onselect("")!==!1&&n.select("")}}):(r.id=t.uniqueId(),r.role="option",r.onclick=function(){n.settings.onselect(r.value)!==!1&&n.select(r.value)},i.add(r))});n.onRenderMenu.dispatch(n,i);n.menu=i},postRender:function(){var r=this,u=r.classPrefix;i.add(r.id,"click",r.showMenu,r);i.add(r.id,"keydown",function(n){n.keyCode==32&&(r.showMenu(n),i.cancel(n))});i.add(r.id,"focus",function(){r._focused||(r.keyDownHandler=i.add(r.id,"keydown",function(n){n.keyCode==40&&(r.showMenu(),i.cancel(n))}),r.keyPressHandler=i.add(r.id,"keypress",function(n){var t;if(n.keyCode==13){t=r.selectedValue;r.selectedValue=null;i.cancel(n);r.settings.onselect(t)}}));r._focused=1});i.add(r.id,"blur",function(){i.remove(r.id,"keydown",r.keyDownHandler);i.remove(r.id,"keypress",r.keyPressHandler);r._focused=0});(n.isIE6||!t.boxModel)&&(i.add(r.id,"mouseover",function(){t.hasClass(r.id,u+"Disabled")||t.addClass(r.id,u+"Hover")}),i.add(r.id,"mouseout",function(){t.hasClass(r.id,u+"Disabled")||t.removeClass(r.id,u+"Hover")}));r.onPostRender.dispatch(r,t.get(r.id))},destroy:function(){this.parent();i.clear(this.id+"_text");i.clear(this.id+"_open")}})}(tinymce),function(n){var t=n.DOM,i=n.dom.Event,r=n.each,f=n.util.Dispatcher,u;n.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(n,t){this.parent(n,t);this.classPrefix="mceNativeListBox"},setDisabled:function(n){t.get(this.id).disabled=n;this.setAriaProperty("disabled",n)},isDisabled:function(){return t.get(this.id).disabled},select:function(n){var t=this,i,f;if(n==u)return t.selectByIndex(-1);f=n&&typeof n=="function"?n:function(t){return t==n};n!=t.selectedValue&&(r(t.items,function(n,r){if(f(n.value))return i=1,t.selectByIndex(r),!1}),i||t.selectByIndex(-1))},selectByIndex:function(n){t.get(this.id).selectedIndex=n+1;this.selectedValue=this.items[n]?this.items[n].value:null},add:function(n,i,r){var f,u=this;r=r||{};r.value=i;u.isRendered()&&t.add(t.get(this.id),"option",r,n);f={title:n,value:i,attribs:r};u.items.push(f);u.onAdd.dispatch(u,f)},getLength:function(){return this.items.length},renderHTML:function(){var i,n=this;return i=t.createHTML("option",{value:""},"-- "+n.settings.title+" --"),r(n.items,function(n){i+=t.createHTML("option",{value:n.value},n.title)}),i=t.createHTML("select",{id:n.id,"class":"mceNativeListBox","aria-labelledby":n.id+"_aria"},i),i+=t.createHTML("span",{id:n.id+"_aria",style:"display: none"},n.settings.title)},postRender:function(){function f(n){var t=r.items[n.target.selectedIndex-1];if(t&&(t=t.value)&&(r.onChange.dispatch(r,t),r.settings.onselect))r.settings.onselect(t)}var r=this,e,u=!0;r.rendered=!0;i.add(r.id,"change",f);i.add(r.id,"keydown",function(t){var o;return(i.remove(r.id,"change",e),u=!1,o=i.add(r.id,"blur",function(){u||(u=!0,i.add(r.id,"change",f),i.remove(r.id,"blur",o))}),n.isWebKit&&(t.keyCode==37||t.keyCode==39))?i.prevent(t):t.keyCode==13||t.keyCode==32?(f(t),i.cancel(t)):void 0});r.onPostRender.dispatch(r,t.get(r.id))}})}(tinymce),function(n){var t=n.DOM,i=n.dom.Event,r=n.each;n.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(i,r,u){this.parent(i,r,u);this.onRenderMenu=new n.util.Dispatcher(this);r.menu_container=r.menu_container||t.doc.body},showMenu:function(){var n=this,e,u,f=t.get(n.id),r;if(!n.isDisabled()){if(n.isMenuRendered||(n.renderMenu(),n.isMenuRendered=!0),n.isMenuVisible)return n.hideMenu();e=t.getPos(n.settings.menu_container);u=t.getPos(f);r=n.menu;r.settings.offset_x=u.x;r.settings.offset_y=u.y;r.settings.vp_offset_x=u.x;r.settings.vp_offset_y=u.y;r.settings.keyboard_focus=n._focused;r.showMenu(0,f.firstChild.clientHeight);i.add(t.doc,"mousedown",n.hideMenu,n);n.setState("Selected",1);n.isMenuVisible=1}},renderMenu:function(){var n=this,t;t=n.settings.control_manager.createDropMenu(n.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:n.settings.icons});t.onHideMenu.add(function(){n.hideMenu();n.focus()});n.onRenderMenu.dispatch(n,t);n.menu=t},hideMenu:function(n){var r=this;n&&n.type=="mousedown"&&t.getParent(n.target,function(n){return n.id===r.id||n.id===r.id+"_open"})||(n&&t.getParent(n.target,".mceMenu")||(r.setState("Selected",0),i.remove(t.doc,"mousedown",r.hideMenu,r),r.menu&&r.menu.hideMenu()),r.isMenuVisible=0)},postRender:function(){var n=this,t=n.settings;i.add(n.id,"click",function(){if(!n.isDisabled()){if(t.onclick)t.onclick(n.value);n.showMenu()}})}})}(tinymce),function(n){var i=n.DOM,t=n.dom.Event,r=n.each;n.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(n,t,i){this.parent(n,t,i);this.classPrefix="mceSplitButton"},renderHTML:function(){var t,r=this,n=r.settings,u;return t="<tbody><tr>",u=n.image?i.createHTML("img ",{src:n.image,role:"presentation","class":"mceAction "+n["class"]}):i.createHTML("span",{"class":"mceAction "+n["class"]},""),u+=i.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:r.id+"_voice",style:"display:none;"},n.title),t+="<td >"+i.createHTML("a",{role:"button",id:r.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+n["class"],onclick:"return false;",onmousedown:"return false;",title:n.title},u)+"<\/td>",u=i.createHTML("span",{"class":"mceOpen "+n["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">▼<\/span>'),t+="<td >"+i.createHTML("a",{role:"button",id:r.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+n["class"],onclick:"return false;",onmousedown:"return false;",title:n.title},u)+"<\/td>",t+="<\/tr><\/tbody>",t=i.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+n["class"],cellpadding:"0",cellspacing:"0",title:n.title},t),i.createHTML("div",{id:r.id,role:"button",tabindex:"0","aria-labelledby":r.id+"_voice","aria-haspopup":"true"},t)},postRender:function(){var r=this,f=r.settings,u;f.onclick&&(u=function(n){if(!r.isDisabled()){f.onclick(r.value);t.cancel(n)}},t.add(r.id+"_action","click",u),t.add(r.id,["click","keydown"],function(n){n.keyCode!==32&&n.keyCode!==13&&n.keyCode!==14||n.altKey||n.ctrlKey||n.metaKey?(n.type==="click"||n.keyCode===40)&&(r.showMenu(),t.cancel(n)):(u(),t.cancel(n))}));t.add(r.id+"_open","click",function(n){r.showMenu();t.cancel(n)});t.add([r.id,r.id+"_open"],"focus",function(){r._focused=1});t.add([r.id,r.id+"_open"],"blur",function(){r._focused=0});(n.isIE6||!i.boxModel)&&(t.add(r.id,"mouseover",function(){i.hasClass(r.id,"mceSplitButtonDisabled")||i.addClass(r.id,"mceSplitButtonHover")}),t.add(r.id,"mouseout",function(){i.hasClass(r.id,"mceSplitButtonDisabled")||i.removeClass(r.id,"mceSplitButtonHover")}))},destroy:function(){this.parent();t.clear(this.id+"_action");t.clear(this.id+"_open");t.clear(this.id)}})}(tinymce),function(n){var t=n.DOM,i=n.dom.Event,r=n.is,u=n.each;n.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(t,i,r){var u=this;u.parent(t,i,r);u.settings=i=n.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},u.settings);u.onShowMenu=new n.util.Dispatcher(u);u.onHideMenu=new n.util.Dispatcher(u);u.value=i.default_color},showMenu:function(){var r=this,u,f;if(!r.isDisabled()){if(r.isMenuRendered||(r.renderMenu(),r.isMenuRendered=!0),r.isMenuVisible)return r.hideMenu();u=t.get(r.id);t.show(r.id+"_menu");t.addClass(u,"mceSplitButtonSelected");f=t.getPos(u);t.setStyles(r.id+"_menu",{left:f.x,top:f.y+u.firstChild.clientHeight,zIndex:2e5});u=0;i.add(t.doc,"mousedown",r.hideMenu,r);r.onShowMenu.dispatch(r);r._focused&&(r._keyHandler=i.add(r.id+"_menu","keydown",function(n){n.keyCode==27&&r.hideMenu()}),t.select("a",r.id+"_menu")[0].focus());r.keyboardNav=new n.ui.KeyboardNavigation({root:r.id+"_menu",items:t.select("a",r.id+"_menu"),onCancel:function(){r.hideMenu();r.focus()}});r.keyboardNav.focus();r.isMenuVisible=1}},hideMenu:function(n){var r=this;if(r.isMenuVisible){if(n&&n.type=="mousedown"&&t.getParent(n.target,function(n){return n.id===r.id+"_open"}))return;n&&t.getParent(n.target,".mceSplitButtonMenu")||(t.removeClass(r.id,"mceSplitButtonSelected"),i.remove(t.doc,"mousedown",r.hideMenu,r),i.remove(r.id+"_menu","keydown",r._keyHandler),t.hide(r.id+"_menu"));r.isMenuVisible=0;r.onHideMenu.dispatch();r.keyboardNav.destroy()}},renderMenu:function(){var o=this,s,c=0,e=o.settings,f,h,v,l,a;return l=t.add(e.menu_container,"div",{role:"listbox",id:o.id+"_menu","class":e.menu_class+" "+e["class"],style:"position:absolute;left:0;top:-1000px;"}),s=t.add(l,"div",{"class":e["class"]+" mceSplitButtonMenu"}),t.add(s,"span",{"class":"mceMenuLine"}),f=t.add(s,"table",{role:"presentation","class":"mceColorSplitMenu"}),h=t.add(f,"tbody"),c=0,u(r(e.colors,"array")?e.colors:e.colors.split(","),function(i){i=i.replace(/^#/,"");c--||(v=t.add(h,"tr"),c=e.grid_width-1);f=t.add(v,"td");var r={href:"javascript:;",style:{backgroundColor:"#"+i},title:o.editor.getLang("colors."+i,i),"data-mce-color":"#"+i};n.isIE||(r.role="option");f=t.add(f,"a",r);o.editor.forcedHighContrastMode&&(f=t.add(f,"canvas",{width:16,height:16,"aria-hidden":"true"}),f.getContext&&(a=f.getContext("2d"))?(a.fillStyle="#"+i,a.fillRect(0,0,16,16)):t.remove(f))}),e.more_colors_func&&(f=t.add(h,"tr"),f=t.add(f,"td",{colspan:e.grid_width,"class":"mceMoreColors"}),f=t.add(f,"a",{role:"option",id:o.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},e.more_colors_title),i.add(f,"click",function(n){return e.more_colors_func.call(e.more_colors_scope||this),i.cancel(n)})),t.addClass(s,"mceColorSplitMenu"),i.add(o.id+"_menu","mousedown",function(n){return i.cancel(n)}),i.add(o.id+"_menu","click",function(n){var i;return n=t.getParent(n.target,"a",h),n&&n.nodeName.toLowerCase()=="a"&&(i=n.getAttribute("data-mce-color"))&&o.setColor(i),!1}),l},setColor:function(n){this.displayColor(n);this.hideMenu();this.settings.onselect(n)},displayColor:function(n){var i=this;t.setStyle(i.id+"_preview","backgroundColor",n);i.value=n},postRender:function(){var n=this,i=n.id;n.parent();t.add(i+"_action","div",{id:i+"_preview","class":"mceColorPreview"});t.setStyle(n.id+"_preview","backgroundColor",n.value)},destroy:function(){var n=this;n.parent();i.clear(n.id+"_menu");i.clear(n.id+"_more");t.remove(n.id+"_menu");n.keyboardNav&&n.keyboardNav.destroy()}})}(tinymce),function(n){var t=n.DOM,i=n.each,r=n.dom.Event;n.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var r=this,i=[],u=r.controls,f=n.each,e=r.settings;return i.push('<div id="'+r.id+'" role="group" aria-labelledby="'+r.id+'_voice">'),i.push("<span role='application'>"),i.push('<span id="'+r.id+'_voice" class="mceVoiceLabel" style="display:none;">'+t.encode(e.name)+"<\/span>"),f(u,function(n){i.push(n.renderHTML())}),i.push("<\/span>"),i.push("<\/div>"),i.join("")},focus:function(){var n=this;t.get(n.id).focus()},postRender:function(){var r=this,u=[];i(r.controls,function(n){i(n.controls,function(n){n.id&&u.push(n)})});r.keyNav=new n.ui.KeyboardNavigation({root:r.id,items:u,onCancel:function(){n.isWebKit&&t.get(r.editor.id+"_ifr").focus();r.editor.focus()},excludeFromTabOrder:!r.settings.tab_focus_toolbar})},destroy:function(){var n=this;n.parent();n.keyNav.destroy();r.clear(n.id)}})}(tinymce),function(n){var t=n.DOM,i=n.each;n.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){for(var e=this,u="",i,n,h=e.settings,o,s,f=e.controls,r=0;r<f.length;r++)n=f[r],o=f[r-1],s=f[r+1],r===0&&(i="mceToolbarStart",n.Button?i+=" mceToolbarStartButton":n.SplitButton?i+=" mceToolbarStartSplitButton":n.ListBox&&(i+=" mceToolbarStartListBox"),u+=t.createHTML("td",{"class":i},t.createHTML("span",null,"<!-- IE -->"))),o&&n.ListBox&&(o.Button||o.SplitButton)&&(u+=t.createHTML("td",{"class":"mceToolbarEnd"},t.createHTML("span",null,"<!-- IE -->"))),u+=t.stdMode?'<td style="position: relative">'+n.renderHTML()+"<\/td>":"<td>"+n.renderHTML()+"<\/td>",s&&n.ListBox&&(s.Button||s.SplitButton)&&(u+=t.createHTML("td",{"class":"mceToolbarStart"},t.createHTML("span",null,"<!-- IE -->")));return i="mceToolbarEnd",n.Button?i+=" mceToolbarEndButton":n.SplitButton?i+=" mceToolbarEndSplitButton":n.ListBox&&(i+=" mceToolbarEndListBox"),u+=t.createHTML("td",{"class":i},t.createHTML("span",null,"<!-- IE -->")),t.createHTML("table",{id:e.id,"class":"mceToolbar"+(h["class"]?" "+h["class"]:""),cellpadding:"0",cellspacing:"0",align:e.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+u+"<\/tr><\/tbody>")}})}(tinymce),function(n){var t=n.util.Dispatcher,i=n.each;n.create("tinymce.AddOnManager",{AddOnManager:function(){var n=this;n.items=[];n.urls={};n.lookup={};n.onAdd=new t(n)},get:function(n){return this.lookup[n]?this.lookup[n].instance:undefined},dependencies:function(n){var t;return this.lookup[n]&&(t=this.lookup[n].dependencies),t||[]},requireLangPack:function(t){var i=n.settings;i&&i.language&&i.language_load!==!1&&n.ScriptLoader.add(this.urls[t]+"/langs/"+i.language+".js")},add:function(n,t,i){return this.items.push(t),this.lookup[n]={instance:t,dependencies:i},this.onAdd.dispatch(this,n,t),t},createUrl:function(n,t){return typeof t=="object"?t:{prefix:n.prefix,resource:t,suffix:n.suffix}},addComponents:function(t,i){var r=this.urls[t];n.each(i,function(t){n.ScriptLoader.add(r+"/"+t)})},load:function(t,i,r,u){function o(){var f=e.dependencies(t);n.each(f,function(n){var t=e.createUrl(i,n);e.load(t.resource,t,undefined,undefined)});r&&(u?r.call(u):r.call(n.ScriptLoader))}var e=this,f=i;e.urls[t]||(typeof i=="object"&&(f=i.prefix+i.resource+i.suffix),f.indexOf("/")!==0&&f.indexOf("://")==-1&&(f=n.baseURL+"/"+f),e.urls[t]=f.substring(0,f.lastIndexOf("/")),e.lookup[t]?o():n.ScriptLoader.add(f,o,u))}});n.PluginManager=new n.AddOnManager;n.ThemeManager=new n.AddOnManager}(tinymce),function(n){var t=n.each,f=n.extend,i=n.DOM,u=n.dom.Event,h=n.ThemeManager,c=n.PluginManager,e=n.explode,r=n.util.Dispatcher,o,s=0;n.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");/[\/\\]$/.test(n.documentBaseURL)||(n.documentBaseURL+="/");n.baseURL=new n.util.URI(n.documentBaseURL).toAbsolute(n.baseURL);n.baseURI=new n.util.URI(n.baseURL);n.onBeforeUnload=new r(n);u.add(window,"beforeunload",function(t){n.onBeforeUnload.dispatch(n,t)});n.onAddEditor=new r(n);n.onRemoveEditor=new r(n);n.EditorManager=f(n,{editors:[],i18n:{},activeEditor:null,init:function(r){function h(n){var t=n.id;return t||(t=n.name,t=t&&!i.get(t)?n.name:i.uniqueId(),n.setAttribute("id",t)),t}function c(t,i,r){var u=t[i];if(u)return n.is(u,"string")&&(r=u.replace(/\.\w+$/,""),r=r?n.resolve(r):0,u=n.resolve(u)),u.apply(r||this,Array.prototype.slice.call(arguments,2))}function l(n,t){return t.constructor===RegExp?t.test(n.className):i.hasClass(n,t)}var a=this,v=n.ScriptLoader,o=[],f;a.settings=r;u.bind(window,"ready",function(){var u,a;c(r,"onpageload");switch(r.mode){case"exact":u=r.elements||"";u.length>0&&t(e(u),function(u){i.get(u)?(f=new n.Editor(u,r),o.push(f),f.render(1)):t(document.forms,function(e){t(e.elements,function(t){t.name===u&&(u="mce_editor_"+s++,i.setAttrib(t,"id",u),f=new n.Editor(u,r),o.push(f),f.render(1))})})});break;case"textareas":case"specific_textareas":t(i.select("textarea"),function(t){r.editor_deselector&&l(t,r.editor_deselector)||(!r.editor_selector||l(t,r.editor_selector))&&(f=new n.Editor(h(t),r),o.push(f),f.render(1))});break;default:r.types?t(r.types,function(u){t(i.select(u.selector),function(t){var i=new n.Editor(h(t),n.extend({},r,u));o.push(i);i.render(1)})}):r.selector&&t(i.select(r.selector),function(t){var i=new n.Editor(h(t),r);o.push(i);i.render(1)})}r.oninit&&(u=a=0,t(o,function(n){a++;n.initialized?u++:n.onInit.add(function(){u++;u==a&&c(r,"oninit")});u==a&&c(r,"oninit")}))})},get:function(n){return n===o?this.editors:this.editors[n]},getInstanceById:function(n){return this.get(n)},add:function(n){var t=this,i=t.editors;return i[n.id]=n,i.push(n),t._setActive(n),t.onAddEditor.dispatch(t,n),n},remove:function(n){var i=this,r,t=i.editors;if(!t[n.id])return null;for(delete t[n.id],r=0;r<t.length;r++)if(t[r]==n){t.splice(r,1);break}return i.activeEditor==n&&i._setActive(t[0]),n.destroy(),i.onRemoveEditor.dispatch(i,n),n},execCommand:function(t,i,r){function o(){u.destroy();f.detachEvent("onunload",o);f=f.tinyMCE=f.tinymce=null}var e=this,u=e.get(r),f;switch(t){case"mceFocus":return u.focus(),!0;case"mceAddEditor":case"mceAddControl":return e.get(r)||new n.Editor(r,e.settings).render(),!0;case"mceAddFrameControl":return f=r.window,f.tinyMCE=tinyMCE,f.tinymce=n,n.DOM.doc=f.document,n.DOM.win=f,u=new n.Editor(r.element_id,r),u.render(),n.isIE&&f.attachEvent("onunload",o),r.page_window=null,!0;case"mceRemoveEditor":case"mceRemoveControl":return u&&u.remove(),!0;case"mceToggleEditor":return u?(u.isHidden()?u.show():u.hide(),!0):(e.execCommand("mceAddControl",0,r),!0)}return e.activeEditor?e.activeEditor.execCommand(t,i,r):!1},execInstanceCommand:function(n,t,i,r){var u=this.get(n);return u?u.execCommand(t,i,r):!1},triggerSave:function(){t(this.editors,function(n){n.save()})},addI18n:function(i,r){var u=this.i18n;n.is(i,"string")?t(r,function(n,t){u[i+"."+t]=n}):t(i,function(n,i){t(n,function(n,r){t(n,function(n,t){r==="common"?u[i+"."+t]=n:u[i+"."+r+"."+t]=n})})})},_setActive:function(n){this.selectedInstance=this.activeEditor=n}})}(tinymce),function(n){var t=n.DOM,r=n.dom.Event,h=n.extend,i=n.each,c=n.isGecko,e=n.isIE,l=n.isWebKit,u=n.is,s=n.ThemeManager,f=n.PluginManager,o=n.explode;n.create("tinymce.Editor",{Editor:function(t,i){var u=this,r=!0;u.settings=i=h({id:t,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:n.documentBaseURL,add_form_submit_trigger:r,submit_patch:r,add_unload_trigger:r,convert_urls:r,relative_urls:r,remove_script_host:r,table_inline_editing:!1,object_resizing:r,accessibility_focus:r,doctype:n.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:r,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:r,directionality:"ltr",forced_root_block:"p",hidden_input:r,padd_empty_editor:r,render_ui:r,indentation:"30px",fix_table_elements:r,inline_styles:r,convert_fonts_to_spans:r,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:r,entity_encoding:"named",url_converter:u.convertURL,url_converter_scope:u,ie7_compat:r},i);u.id=u.editorId=t;u.isNotDirty=!1;u.plugins={};u.documentBaseURI=new n.util.URI(i.document_base_url||n.documentBaseURL,{base_uri:tinyMCE.baseURI});u.baseURI=n.baseURI;u.contentCSS=[];u.contentStyles=[];u.setupEvents();u.execCommands={};u.queryStateCommands={};u.queryValueCommands={};u.execCallback("setup",u)},render:function(){function l(){e.language&&e.language_load!==!1&&c.add(n.baseURL+"/langs/"+e.language+".js");e.theme&&typeof e.theme!="function"&&e.theme.charAt(0)!="-"&&!s.urls[e.theme]&&s.load(e.theme,"themes/"+e.theme+"/editor_template"+n.suffix+".js");i(o(e.plugins),function(t){if(t&&!f.urls[t])if(t.charAt(0)=="-"){t=t.substr(1,t.length);var r=f.dependencies(t);i(r,function(t){var i={prefix:"plugins/",resource:t,suffix:"/editor_plugin"+n.suffix+".js"};t=f.createUrl(i,t);f.load(t.resource,t)})}else{if(t=="safari")return;f.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+n.suffix+".js"})}});c.loadQueue(function(){u.removed||u.init()})}var u=this,e=u.settings,h=u.id,c=n.ScriptLoader;if(!r.domLoaded){r.add(window,"ready",function(){u.render()});return}(tinyMCE.settings=e,u.getElement())&&(!n.isIDevice||n.isIOS5)&&(!/TEXTAREA|INPUT/i.test(u.getElement().nodeName)&&e.hidden_input&&t.getParent(h,"form")&&t.insertAfter(t.create("input",{type:"hidden",name:h}),h),e.content_editable||(u.orgVisibility=u.getElement().style.visibility,u.getElement().style.visibility="hidden"),n.WindowManager&&(u.windowManager=new n.WindowManager(u)),e.encoding=="xml"&&u.onGetContent.add(function(n,i){i.save&&(i.content=t.encode(i.content))}),e.add_form_submit_trigger&&u.onSubmit.addToTop(function(){u.initialized&&(u.save(),u.isNotDirty=1)}),e.add_unload_trigger&&(u._beforeUnload=tinyMCE.onBeforeUnload.add(function(){!u.initialized||u.destroyed||u.isHidden()||u.save({format:"raw",no_events:!0})})),n.addUnload(u.destroy,u),e.submit_patch&&u.onBeforeRenderUI.add(function(){var t=u.getElement().form;t&&(t._mceOldSubmit||(t.submit.nodeType||t.submit.length||(u.formElement=t,t._mceOldSubmit=t.submit,t.submit=function(){return n.triggerSave(),u.isNotDirty=1,u.formElement._mceOldSubmit(u.formElement)}),t=null))}),l())},init:function(){function nt(t){var e=f.get(t),o=f.urls[t]||n.documentBaseURL.replace(/\/$/,""),u;e&&n.inArray(g,t)===-1&&(i(f.dependencies(t),function(n){nt(n)}),u=new e(r,o),r.plugins[t]=u,u.init&&(u.init(r,o),g.push(t)))}var b,r=this,u=r.settings,v,c,p,l=r.getElement(),h,k,a,y,d,w,g=[];if(n.add(r),u.aria_label=u.aria_label||t.getAttrib(l,"aria-label",r.getLang("aria.rich_text_area")),u.theme&&(typeof u.theme!="function"?(u.theme=u.theme.replace(/-/,""),h=s.get(u.theme),r.theme=new h,r.theme.init&&r.theme.init(r,s.urls[u.theme]||n.documentBaseURL.replace(/\/$/,""))):r.theme=u.theme),i(o(u.plugins.replace(/\-/g,"")),nt),u.popup_css!==!1&&(u.popup_css=u.popup_css?r.documentBaseURI.toAbsolute(u.popup_css):r.baseURI.toAbsolute("themes/"+u.theme+"/skins/"+u.skin+"/dialog.css")),u.popup_css_add&&(u.popup_css+=","+r.documentBaseURI.toAbsolute(u.popup_css_add)),r.controlManager=new n.ControlManager(r),r.onBeforeRenderUI.dispatch(r,r.controlManager),u.render_ui&&r.theme&&(r.orgDisplay=l.style.display,typeof u.theme!="function"?(v=u.width||l.style.width||l.offsetWidth,c=u.height||l.style.height||l.offsetHeight,p=u.min_height||100,d=/^[0-9\.]+(|px)$/i,d.test(""+v)&&(v=Math.max(parseInt(v,10)+(h.deltaWidth||0),100)),d.test(""+c)&&(c=Math.max(parseInt(c,10)+(h.deltaHeight||0),p)),h=r.theme.renderUI({targetNode:l,width:v,height:c,deltaWidth:u.delta_width,deltaHeight:u.delta_height}),t.setStyles(h.sizeContainer||h.editorContainer,{width:v,height:c}),c=(h.iframeHeight||c)+(typeof c=="number"?h.deltaHeight||0:""),c<p&&(c=p)):(h=u.theme(r,l),h.editorContainer.nodeType&&(h.editorContainer=h.editorContainer.id=h.editorContainer.id||r.id+"_parent"),h.iframeContainer.nodeType&&(h.iframeContainer=h.iframeContainer.id=h.iframeContainer.id||r.id+"_iframecontainer"),c=h.iframeHeight||l.offsetHeight,e&&r.onInit.add(function(n){n.dom.bind(n.getBody(),"beforedeactivate keydown",function(){n.lastIERng=n.selection.getRng()})})),r.editorContainer=h.editorContainer),u.content_css&&i(o(u.content_css),function(n){r.contentCSS.push(r.documentBaseURI.toAbsolute(n))}),u.content_style&&r.contentStyles.push(u.content_style),u.content_editable)return l=b=h=null,r.initContentBody();for(document.domain&&location.hostname!=document.domain&&(n.relaxedDomain=document.domain),r.iframeHTML=u.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">',u.document_base_url!=n.documentBaseURL&&(r.iframeHTML+='<base href="'+r.documentBaseURI.getURI()+'" />'),r.iframeHTML+=u.ie7_compat?'<meta http-equiv="X-UA-Compatible" content="IE=7" />':'<meta http-equiv="X-UA-Compatible" content="IE=edge" />',r.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',w=0;w<r.contentCSS.length;w++)r.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+r.contentCSS[w]+'" />';r.contentCSS=[];a=u.body_id||"tinymce";a.indexOf("=")!=-1&&(a=r.getParam("body_id","","hash"),a=a[r.id]||a);y=u.body_class||"";y.indexOf("=")!=-1&&(y=r.getParam("body_class","","hash"),y=y[r.id]||"");r.iframeHTML+='<\/head><body id="'+a+'" class="mceContentBody '+y+'" onload="window.parent.tinyMCE.get(\''+r.id+"').onLoad.dispatch();\"><br><\/body><\/html>";n.relaxedDomain&&(e||n.isOpera&&parseFloat(opera.version())<11)&&(k='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+r.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()');b=t.add(h.iframeContainer,"iframe",{id:r.id+"_ifr",src:k||'javascript:""',frameBorder:"0",allowTransparency:"true",title:u.aria_label,style:{width:"100%",height:c,display:"block"}});r.contentAreaContainer=h.iframeContainer;h.editorContainer&&(t.get(h.editorContainer).style.display=r.orgDisplay);l.style.visibility=r.orgVisibility;t.get(r.id).style.display="none";t.setAttrib(r.id,"aria-hidden",!0);n.relaxedDomain&&k||r.initContentBody();l=b=h=null},initContentBody:function(){var r=this,u=r.settings,s=t.get(r.id),f=r.getDoc(),o,h;e&&n.relaxedDomain||u.content_editable||(f.open(),f.write(r.iframeHTML),f.close(),n.relaxedDomain&&(f.domain=n.relaxedDomain));u.content_editable&&(t.addClass(s,"mceContentBody"),r.contentDocument=f=u.content_document||document,r.contentWindow=u.content_window||window,r.bodyElement=s,u.content_document=u.content_window=null);o=r.getBody();o.disabled=!0;u.readonly||(o.contentEditable=r.getParam("content_editable_state",!0));o.disabled=!1;r.schema=new n.html.Schema(u);r.dom=new n.dom.DOMUtils(f,{keep_values:!0,url_converter:r.convertURL,url_converter_scope:r,hex_colors:u.force_hex_style_colors,class_filter:u.class_filter,update_styles:!0,root_element:u.content_editable?r.id:null,schema:r.schema});r.parser=new n.html.DomParser(u,r.schema);r.parser.addAttributeFilter("src,href,style",function(n,t){for(var e=n.length,i,o=r.dom,f,u;e--;)i=n[e],f=i.attr(t),u="data-mce-"+t,i.attributes.map[u]||(t==="style"?i.attr(u,o.serializeStyle(o.parseStyle(f),i.name)):i.attr(u,r.convertURL(f,t,i.name)))});r.parser.addNodeFilter("script",function(n){for(var i=n.length,t;i--;)t=n[i],t.attr("type","mce-"+(t.attr("type")||"text/javascript"))});r.parser.addNodeFilter("#cdata",function(n){for(var i=n.length,t;i--;)t=n[i],t.type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"});r.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t){for(var u=t.length,i,f=r.schema.getNonEmptyElements();u--;)i=t[u],i.isEmpty(f)&&(i.empty().append(new n.html.Node("br",1)).shortEnded=!0)});r.serializer=new n.dom.Serializer(u,r.dom,r.schema);r.selection=new n.dom.Selection(r.dom,r.getWin(),r.serializer,r);r.formatter=new n.Formatter(r);r.undoManager=new n.UndoManager(r);r.forceBlocks=new n.ForceBlocks(r);r.enterKey=new n.EnterKey(r);r.editorCommands=new n.EditorCommands(r);r.onExecCommand.add(function(n,t){/^(FontName|FontSize)$/.test(t)||r.nodeChanged()});r.serializer.onPreProcess.add(function(n,t){return r.onPreProcess.dispatch(r,t,n)});r.serializer.onPostProcess.add(function(n,t){return r.onPostProcess.dispatch(r,t,n)});r.onPreInit.dispatch(r);u.browser_spellcheck||u.gecko_spellcheck||(f.body.spellcheck=!1);u.readonly||r.bindNativeEvents();r.controlManager.onPostRender.dispatch(r,r.controlManager);r.onPostRender.dispatch(r);r.quirks=n.util.Quirks(r);u.directionality&&(o.dir=u.directionality);u.nowrap&&(o.style.whiteSpace="nowrap");u.protect&&r.onBeforeSetContent.add(function(n,t){i(u.protect,function(n){t.content=t.content.replace(n,function(n){return"<!--mce:protected "+escape(n)+"-->"})})});r.onSetContent.add(function(){r.addVisual(r.getBody())});u.padd_empty_editor&&r.onPostProcess.add(function(n,t){t.content=t.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")});r.load({initial:!0,format:"html"});r.startContent=r.getContent({format:"raw"});r.initialized=!0;r.onInit.dispatch(r);r.execCallback("setupcontent_callback",r.id,o,f);r.execCallback("init_instance_callback",r);r.focus(!0);r.nodeChanged({initial:!0});r.contentStyles.length>0&&(h="",i(r.contentStyles,function(n){h+=n+"\r\n"}),r.dom.addStyle(h));i(r.contentCSS,function(n){r.dom.loadCSS(n)});u.auto_focus&&setTimeout(function(){var t=n.get(u.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100);s=f=o=null},focus:function(t){var u,i=this,o=i.selection,s=i.settings.content_editable,r,f,h=i.getDoc(),e;t||(i.lastIERng&&o.setRng(i.lastIERng),r=o.getRng(),r.item&&(f=r.item(0)),i._refreshContentEditable(),s||i.getWin().focus(),(n.isGecko||s)&&(e=i.getBody(),e.setActive?e.setActive():e.focus(),s&&o.normalize()),f&&f.ownerDocument==h&&(r=h.body.createControlRange(),r.addElement(f),r.select()));n.activeEditor!=i&&((u=n.activeEditor)!=null&&u.onDeactivate.dispatch(u,i),i.onActivate.dispatch(i,u));n._setActive(i)},execCallback:function(t){var f=this,r=f.settings[t],i;if(r)return f.callbackLookup&&(i=f.callbackLookup[t])&&(r=i.func,i=i.scope),u(r,"string")&&(i=r.replace(/\.\w+$/,""),i=i?n.resolve(i):0,r=n.resolve(r),f.callbackLookup=f.callbackLookup||{},f.callbackLookup[t]={func:r,scope:i}),r.apply(i||f,Array.prototype.slice.call(arguments,1))},translate:function(t){var i=this.settings.language||"en",r=n.i18n;return t?r[i+"."+t]||t.replace(/\{\#([^\}]+)\}/g,function(n,t){return r[i+"."+t]||"{#"+t+"}"}):""},getLang:function(t,i){return n.i18n[(this.settings.language||"en")+"."+t]||(u(i)?i:"{#"+t+"}")},getParam:function(t,r,f){var s=n.trim,e=u(this.settings[t])?this.settings[t]:r,o;return f==="hash"?(o={},u(e,"string")?i(e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(","),function(n){n=n.split("=");o[s(n[0])]=n.length>1?s(n[1]):s(n)}):o=e,o):e},nodeChanged:function(n){var t=this,r=t.selection,i;t.initialized&&(n=n||{},i=r.getStart()||t.getBody(),i=e&&i.ownerDocument!=t.getDoc()?t.getBody():i,n.parents=[],t.dom.getParent(i,function(t){if(t.nodeName=="BODY")return!0;n.parents.push(t)}),t.onNodeChange.dispatch(t,n?n.controlManager||t.controlManager:t.controlManager,i,r.isCollapsed(),n))},addButton:function(n,t){var i=this;i.buttons=i.buttons||{};i.buttons[n]=t},addCommand:function(n,t,i){this.execCommands[n]={func:t,scope:i||this}},addQueryStateHandler:function(n,t,i){this.queryStateCommands[n]={func:t,scope:i||this}},addQueryValueHandler:function(n,t,i){this.queryValueCommands[n]={func:t,scope:i||this}},addShortcut:function(n,t,r,f){var e=this,s;return e.settings.custom_shortcuts===!1?!1:(e.shortcuts=e.shortcuts||{},u(r,"string")&&(s=r,r=function(){e.execCommand(s,!1,null)}),u(r,"object")&&(s=r,r=function(){e.execCommand(s[0],s[1],s[2])}),i(o(n),function(n){var u={func:r,scope:f||this,desc:e.translate(t),alt:!1,ctrl:!1,shift:!1};i(o(n,"+"),function(n){switch(n){case"alt":case"ctrl":case"shift":u[n]=!0;break;default:u.charCode=n.charCodeAt(0);u.keyCode=n.toUpperCase().charCodeAt(0)}});e.shortcuts[(u.ctrl?"ctrl":"")+","+(u.alt?"alt":"")+","+(u.shift?"shift":"")+","+u.keyCode]=u}),!0)},execCommand:function(n,t,r,u){var f=this,s=0,e,o;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(n)||u&&u.skip_focus||f.focus(),u=h({},u),f.onBeforeExecCommand.dispatch(f,n,t,r,u),u.terminate)return!1;if(f.execCallback("execcommand_callback",f.id,f.selection.getNode(),n,t,r))return f.onExecCommand.dispatch(f,n,t,r,u),!0;if((e=f.execCommands[n])&&(o=e.func.call(e.scope,t,r),o!==!0))return f.onExecCommand.dispatch(f,n,t,r,u),o;if(i(f.plugins,function(i){if(i.execCommand&&i.execCommand(n,t,r))return f.onExecCommand.dispatch(f,n,t,r,u),s=1,!1}),s)return!0;if(f.theme&&f.theme.execCommand&&f.theme.execCommand(n,t,r)||f.editorCommands.execCommand(n,t,r))return f.onExecCommand.dispatch(f,n,t,r,u),!0;f.getDoc().execCommand(n,t,r);f.onExecCommand.dispatch(f,n,t,r,u)},queryCommandState:function(n){var i=this,t,r;if(!i._isHidden()){if((t=i.queryStateCommands[n])&&(r=t.func.call(t.scope),r!==!0))return r;if(t=i.editorCommands.queryCommandState(n),t!==-1)return t;try{return this.getDoc().queryCommandState(n)}catch(u){}}},queryCommandValue:function(n){var i=this,t,r;if(!i._isHidden()){if((t=i.queryValueCommands[n])&&(r=t.func.call(t.scope),r!==!0))return r;if(t=i.editorCommands.queryCommandValue(n),u(t))return t;try{return this.getDoc().queryCommandValue(n)}catch(f){}}},show:function(){var n=this;t.show(n.getContainer());t.hide(n.id);n.load()},hide:function(){var n=this,i=n.getDoc();e&&i&&i.execCommand("SelectAll");n.save();t.hide(n.getContainer());t.setStyle(n.id,"display",n.orgDisplay)},isHidden:function(){return!t.isHidden(this.id)},setProgressState:function(n,t,i){return this.onSetProgressState.dispatch(this,n,t,i),n},load:function(n){var i=this,t=i.getElement(),r;if(t)return n=n||{},n.load=!0,r=i.setContent(u(t.value)?t.value:t.innerHTML,n),n.element=t,n.no_events||i.onLoadContent.dispatch(i,n),n.element=t=null,r},save:function(n){var r=this,u=r.getElement(),f,e;if(u&&r.initialized)return n=n||{},n.save=!0,n.element=u,f=n.content=r.getContent(n),n.no_events||r.onSaveContent.dispatch(r,n),f=n.content,/TEXTAREA|INPUT/i.test(u.nodeName)?u.value=f:(u.innerHTML=f,(e=t.getParent(r.id,"form"))&&i(e.elements,function(n){if(n.name==r.id)return n.value=f,!1})),n.element=u=null,f},setContent:function(t,i){var r=this,f=r.getBody(),u;if(i=i||{},i.format=i.format||"html",i.set=!0,i.content=t,i.no_events||r.onBeforeSetContent.dispatch(r,i),t=i.content,!n.isIE&&(t.length===0||/^\s+$/.test(t))){u=r.settings.forced_root_block;t=u?"<"+u+'><br data-mce-bogus="1"><\/'+u+">":'<br data-mce-bogus="1">';f.innerHTML=t;r.selection.select(f,!0);r.selection.collapse(!0);return}return i.format!=="raw"&&(t=new n.html.Serializer({},r.schema).serialize(r.parser.parse(t))),i.content=n.trim(t),r.dom.setHTML(f,i.content),i.no_events||r.onSetContent.dispatch(r,i),r.settings.content_editable&&document.activeElement!==r.getBody()||r.selection.normalize(),i.content},getContent:function(t){var i=this,u,r=i.getBody();return t=t||{},t.format=t.format||"html",t.get=!0,t.getInner=!0,t.no_events||i.onBeforeGetContent.dispatch(i,t),u=t.format=="raw"?r.innerHTML:t.format=="text"?r.innerText||r.textContent:i.serializer.serialize(r,t),t.content=t.format!="text"?n.trim(u):u,t.no_events||i.onGetContent.dispatch(i,t),t.content},isDirty:function(){var t=this;return n.trim(t.startContent)!=n.trim(t.getContent({format:"raw",no_events:1}))&&!t.isNotDirty},getContainer:function(){var n=this;return n.container||(n.container=t.get(n.editorContainer||n.id+"_parent")),n.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return t.get(this.settings.content_element||this.id)},getWin:function(){var n=this,i;return n.contentWindow||(i=t.get(n.id+"_ifr"),i&&(n.contentWindow=i.contentWindow)),n.contentWindow},getDoc:function(){var n=this,t;return n.contentDocument||(t=n.getWin(),t&&(n.contentDocument=t.document)),n.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(n,t,i){var r=this,u=r.settings;return u.urlconverter_callback?r.execCallback("urlconverter_callback",n,i,!0,t):!u.convert_urls||i&&i.nodeName=="LINK"||n.indexOf("file:")===0?n:u.relative_urls?r.documentBaseURI.toRelative(n):r.documentBaseURI.toAbsolute(n,u.remove_script_host)},addVisual:function(n){var t=this,e=t.settings,r=t.dom,f;n=n||t.getBody();u(t.hasVisual)||(t.hasVisual=e.visual);i(r.select("table,a",n),function(n){var i;switch(n.nodeName){case"TABLE":f=e.visual_table_class||"mceItemTable";i=r.getAttrib(n,"border");i&&i!="0"||(t.hasVisual?r.addClass(n,f):r.removeClass(n,f));return;case"A":r.getAttrib(n,"href",!1)||(i=r.getAttrib(n,"name")||n.id,f="mceItemAnchor",i&&(t.hasVisual?r.addClass(n,f):r.removeClass(n,f)));return}});t.onVisualAid.dispatch(t,n,t.hasVisual)},remove:function(){var i=this,u=i.getContainer();i.removed||(i.removed=1,i.hide(),i.settings.content_editable||(r.unbind(i.getWin()),r.unbind(i.getDoc())),r.unbind(i.getBody()),r.clear(u),i.execCallback("remove_instance_callback",i),i.onRemove.dispatch(i),i.onExecCommand.listeners=[],n.remove(i),t.remove(u))},destroy:function(t){var i=this;i.destroyed||(c&&(r.unbind(i.getDoc()),r.unbind(i.getWin()),r.unbind(i.getBody())),t||(n.removeUnload(i.destroy),tinyMCE.onBeforeUnload.remove(i._beforeUnload),i.theme&&i.theme.destroy&&i.theme.destroy(),i.controlManager.destroy(),i.selection.destroy(),i.dom.destroy()),i.formElement&&(i.formElement.submit=i.formElement._mceOldSubmit,i.formElement._mceOldSubmit=null),i.contentAreaContainer=i.formElement=i.container=i.settings.content_element=i.bodyElement=i.contentDocument=i.contentWindow=null,i.selection&&(i.selection=i.selection.win=i.selection.dom=i.selection.dom.doc=null),i.destroyed=1)},_refreshContentEditable:function(){var i=this,n,t;i._isHidden()&&(n=i.getBody(),t=n.parentNode,t.removeChild(n),t.appendChild(n),n.focus())},_isHidden:function(){var n;return c?(n=this.selection.getSel(),!n||!n.rangeCount||n.rangeCount===0):0}})}(tinymce),function(n){var t=n.each;n.Editor.prototype.setupEvents=function(){var i=this,r=i.settings;t(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(t){i[t]=new n.util.Dispatcher(i)});r.cleanup_callback&&(i.onBeforeSetContent.add(function(n,t){t.content=n.execCallback("cleanup_callback","insert_to_editor",t.content,t)}),i.onPreProcess.add(function(n,t){t.set&&n.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t);t.get&&n.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}),i.onPostProcess.add(function(n,t){t.set&&(t.content=n.execCallback("cleanup_callback","insert_to_editor",t.content,t));t.get&&(t.content=n.execCallback("cleanup_callback","get_from_editor",t.content,t))}));r.save_callback&&i.onGetContent.add(function(n,t){t.save&&(t.content=n.execCallback("save_callback",n.id,t.content,n.getBody()))});r.handle_event_callback&&i.onEvent.add(function(n,t,r){i.execCallback("handle_event_callback",t,n,r)===!1&&(t.preventDefault(),t.stopPropagation())});r.handle_node_change_callback&&i.onNodeChange.add(function(n,t,i){n.execCallback("handle_node_change_callback",n.id,i,-1,-1,!0,n.selection.isCollapsed())});r.save_callback&&i.onSaveContent.add(function(n,t){var i=n.execCallback("save_callback",n.id,t.content,n.getBody());i&&(t.content=i)});r.onchange_callback&&i.onChange.add(function(n,t){n.execCallback("onchange_callback",n,t)})};n.Editor.prototype.bindNativeEvents=function(){function u(n,t){var r=n.type;i.removed||i.onEvent.dispatch(i,n,t)!==!1&&i[e[n.fakeType||n.type]].dispatch(i,n,t)}function s(){i.focus(!0)}function h(t,r){r.keyCode==65&&n.VK.metaKeyPressed(r)||i.selection.normalize();i.nodeChanged()}function o(r,u){(r.altKey||r.ctrlKey||r.metaKey)&&t(i.shortcuts,function(t){var i=n.isMac?r.metaKey:r.ctrlKey;if(t.ctrl==i&&t.alt==r.altKey&&t.shift==r.shiftKey)return r.keyCode==t.keyCode||r.charCode&&r.charCode==t.charCode?(r.preventDefault(),u&&t.func.call(t.scope),!0):void 0})}var i=this,f=i.settings,r=i.dom,e;e={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};t(e,function(t,e){var o=f.content_editable?i.getBody():i.getDoc();switch(e){case"contextmenu":r.bind(o,e,u);break;case"paste":r.bind(i.getBody(),e,u);break;case"submit":case"reset":r.bind(i.getElement().form||n.DOM.getParent(i.id,"form"),e,u);break;default:r.bind(o,e,u)}});r.bind(f.content_editable?i.getBody():n.isGecko?i.getDoc():i.getWin(),"focus",function(){i.focus(!0)});f.content_editable&&n.isOpera&&(r.bind(i.getBody(),"click",s),r.bind(i.getBody(),"keydown",s));i.onMouseUp.add(h);i.onKeyUp.add(function(t,i){var r=i.keyCode;(r>=33&&r<=36||r>=37&&r<=40||r==13||r==45||r==46||r==8||n.isMac&&(r==91||r==93)||i.ctrlKey)&&h(t,i)});i.onReset.add(function(){i.setContent(i.startContent,{format:"raw"})});i.onKeyUp.add(function(n,t){o(t)});i.onKeyPress.add(function(n,t){o(t)});i.onKeyDown.add(function(n,t){o(t,!0)});n.isOpera&&i.onClick.add(function(n,t){t.preventDefault()})}}(tinymce),function(n){var r=n.each,u,t=!0,i=!1;n.EditorCommands=function(f){function k(n,r,u){var f;return(n=n.toLowerCase(),f=y.exec[n])?(f(n,r,u),t):i}function l(n){var t;return(n=n.toLowerCase(),t=y.state[n])?t(n):-1}function g(n){var t;return(n=n.toLowerCase(),t=y.value[n])?t(n):i}function a(n,t){t=t||"exec";r(n,function(n,i){r(i.toLowerCase().split(","),function(i){y[t][i]=n})})}function v(n,t,r){return t===u&&(t=i),r===u&&(r=null),f.getDoc().execCommand(n,t,r)}function d(n){return s.match(n)}function h(n,t){s.toggle(n,t?{value:t}:u)}function p(n){b=e.getBookmark(n)}function w(){e.moveToBookmark(b)}var o=f.dom,e=f.selection,y={state:{},exec:{},value:{}},c=f.settings,s=f.formatter,b;n.extend(this,{execCommand:k,queryCommandState:l,queryCommandValue:g,addCommands:a});a({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){f.undoManager.add()},"Cut,Copy,Paste":function(i){var u=f.getDoc(),r;try{v(i)}catch(e){r=t}(r||!u.queryCommandSupported(i))&&(n.isGecko?f.windowManager.confirm(f.getLang("clipboard_msg"),function(n){n&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):f.windowManager.alert(f.getLang("clipboard_no_support")))},unlink:function(n){e.isCollapsed()&&e.select(e.getNode());v(n);e.collapse(i)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(n){var t=n.substring(7);r("left,center,right,full".split(","),function(n){t!=n&&s.remove("align"+n)});h("align"+t);k("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(n){var t,i;v(n);t=o.getParent(e.getNode(),"ol,ul");t&&(i=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(i.nodeName)&&(p(),o.split(i,t),w()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(n){h(n)},"ForeColor,HiliteColor,FontName":function(n,t,i){h(n,i)},FontSize:function(t,i,r){var u,f;r>=1&&r<=7&&(f=n.explode(c.font_size_style_values),u=n.explode(c.font_size_classes),r=u?u[r-1]||r:f[r-1]||r);h(t,r)},RemoveFormat:function(n){s.remove(n)},mceBlockQuote:function(){h("blockquote")},FormatBlock:function(n,t,i){return h(i||"p")},mceCleanup:function(){var n=e.getBookmark();f.setContent(f.getContent({cleanup:t}),{cleanup:t});e.moveToBookmark(n)},mceRemoveNode:function(n,i,r){var u=r||e.getNode();u!=f.getBody()&&(p(),f.dom.remove(u,t),w())},mceSelectNodeDepth:function(n,t,r){var u=0;o.getParent(e.getNode(),function(n){if(n.nodeType==1&&u++==r)return e.select(n),i},f.getBody())},mceSelectNode:function(n,t,i){e.select(i)},mceInsertContent:function(t,i,r){var b,p,s,a,w,v,h,c,l,y,u,g,k,d;if(b=f.parser,p=new n.html.Serializer({},f.schema),k='<span id="mce_marker" data-mce-type="bookmark">﻿<\/span>',v={content:r,format:"html"},e.onBeforeSetContent.dispatch(e,v),r=v.content,r.indexOf("{$caret}")==-1&&(r+="{$caret}"),r=r.replace(/\{\$caret\}/,k),e.isCollapsed()||f.getDoc().execCommand("Delete",!1,null),s=e.getNode(),v={context:s.nodeName.toLowerCase()},w=b.parse(r,v),u=w.lastChild,u.attr("id")=="mce_marker")for(h=u,u=u.prev;u;u=u.walk(!0))if(u.type==3||!o.isBlock(u.name)){u.parent.insert(h,u,u.name==="br");break}if(v.invalid){for(e.setContent(k),s=e.getNode(),a=f.getBody(),s.nodeType==9?s=u=a:u=s;u!==a;)s=u,u=u.parentNode;r=s==a?a.innerHTML:o.getOuterHTML(s);r=p.serialize(b.parse(r.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return p.serialize(w)})));s==a?o.setHTML(a,r):o.setOuterHTML(s,r)}else r=p.serialize(w),u=s.firstChild,g=s.lastChild,u&&(u!==g||u.nodeName!=="BR")?e.setContent(r):o.setHTML(s,r);h=o.get("mce_marker");c=o.getRect(h);l=o.getViewPort(f.getWin());(c.y+c.h>l.y+l.h||c.y<l.y||c.x>l.x+l.w||c.x<l.x)&&(d=n.isIE?f.getDoc().documentElement:f.getBody(),d.scrollLeft=c.x,d.scrollTop=c.y-l.h+25);y=o.createRng();u=h.previousSibling;u&&u.nodeType==3?y.setStart(u,u.nodeValue.length):(y.setStartBefore(h),y.setEndBefore(h));o.remove(h);e.setRng(y);e.onSetContent.dispatch(e,v);f.addVisual()},mceInsertRawHTML:function(n,t,i){e.setContent("tiny_mce_marker");f.setContent(f.getContent().replace(/tiny_mce_marker/g,function(){return i}))},mceToggleFormat:function(n,t,i){h(i)},mceSetContent:function(n,t,i){f.setContent(i)},"Indent,Outdent":function(n){var t,i,u;t=c.indentation;i=/[a-z%]+$/i.exec(t);t=parseInt(t);l("InsertUnorderedList")||l("InsertOrderedList")?v(n):(c.forced_root_block||o.getParent(e.getNode(),o.isBlock)||s.apply("div"),r(e.getSelectedBlocks(),function(r){n=="outdent"?(u=Math.max(0,parseInt(r.style.paddingLeft||0)-t),o.setStyle(r,"paddingLeft",u?u+i:"")):o.setStyle(r,"paddingLeft",parseInt(r.style.paddingLeft||0)+t+i)}))},mceRepaint:function(){if(n.isGecko)try{p(t);e.getSel()&&e.getSel().selectAllChildren(f.getBody());e.collapse(t);w()}catch(i){}},mceToggleFormat:function(n,t,i){s.toggle(i)},InsertHorizontalRule:function(){f.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){f.hasVisual=!f.hasVisual;f.addVisual()},mceReplaceContent:function(n,t,i){f.execCommand("mceInsertContent",!1,i.replace(/\{\$selection\}/g,e.getContent({format:"text"})))},mceInsertLink:function(n,t,i){var r;typeof i=="string"&&(i={href:i});r=o.getParent(e.getNode(),"a");i.href=i.href.replace(" ","%20");r&&i.href||s.remove("link");i.href&&s.apply("link",i,r)},selectAll:function(){var n=o.getRoot(),t=o.createRng();e.getRng().setStart?(t.setStart(n,0),t.setEnd(n,n.childNodes.length),e.setRng(t)):v("SelectAll")}});a({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(i){var r="align"+i.substring(7),u=e.isCollapsed()?[o.getParent(e.getNode(),o.isBlock)]:e.getSelectedBlocks(),f=n.map(u,function(n){return!!s.matchNode(n,r)});return n.inArray(f,t)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(n){return d(n)},mceBlockQuote:function(){return d("blockquote")},Outdent:function(){var n;return c.inline_styles&&((n=o.getParent(e.getStart(),o.isBlock))&&parseInt(n.style.paddingLeft)>0||(n=o.getParent(e.getEnd(),o.isBlock))&&parseInt(n.style.paddingLeft)>0)?t:l("InsertUnorderedList")||l("InsertOrderedList")||!c.inline_styles&&!!o.getParent(e.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(n){var t=o.getParent(e.getNode(),"ul,ol");return t&&(n==="insertunorderedlist"&&t.tagName==="UL"||n==="insertorderedlist"&&t.tagName==="OL")}},"state");a({"FontSize,FontName":function(n){var i=0,t;return(t=o.getParent(e.getNode(),"span"))&&(i=n=="fontsize"?t.style.fontSize:t.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),i}},"value");a({Undo:function(){f.undoManager.undo()},Redo:function(){f.undoManager.redo()}})}}(tinymce),function(n){var t=n.util.Dispatcher;n.UndoManager=function(i){function l(){return n.trim(i.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function e(){r.typing=!1;r.add()}var r,f=0,u=[],c,o,s,h;return onBeforeAdd=new t(r),o=new t(r),s=new t(r),h=new t(r),o.add(function(n,t){if(n.hasUndo())return i.onChange.dispatch(i,t,n)}),s.add(function(n,t){return i.onUndo.dispatch(i,t,n)}),h.add(function(n,t){return i.onRedo.dispatch(i,t,n)}),i.onInit.add(function(){r.add()}),i.onBeforeExecCommand.add(function(n,t,i,u,f){t=="Undo"||t=="Redo"||t=="mceRepaint"||f&&f.skip_undo||r.beforeChange()}),i.onExecCommand.add(function(n,t,i,u,f){t=="Undo"||t=="Redo"||t=="mceRepaint"||f&&f.skip_undo||r.add()}),i.onSaveContent.add(e),i.dom.bind(i.dom.getRoot(),"dragend",e),i.dom.bind(i.getDoc(),n.isGecko?"blur":"focusout",function(){!i.removed&&r.typing&&e()}),i.onKeyUp.add(function(n,t){var i=t.keyCode;(i>=33&&i<=36||i>=37&&i<=40||i==45||i==13||t.ctrlKey)&&e()}),i.onKeyDown.add(function(n,t){var i=t.keyCode;if(i>=33&&i<=36||i>=37&&i<=40||i==45){r.typing&&e();return}(i<16||i>20)&&i!=224&&i!=91&&!r.typing&&(r.beforeChange(),r.typing=!0,r.add())}),i.onMouseDown.add(function(){r.typing&&e()}),i.addShortcut("ctrl+z","undo_desc","Undo"),i.addShortcut("ctrl+y","redo_desc","Redo"),r={data:u,typing:!1,onBeforeAdd:onBeforeAdd,onAdd:o,onUndo:s,onRedo:h,beforeChange:function(){c=i.selection.getBookmark(2,!0)},add:function(n){var t,o=i.settings,e;if(n=n||{},n.content=l(),r.onBeforeAdd.dispatch(r,n),e=u[f],e&&e.content==n.content)return null;if(u[f]&&(u[f].beforeBookmark=c),o.custom_undo_redo_levels&&u.length>o.custom_undo_redo_levels){for(t=0;t<u.length-1;t++)u[t]=u[t+1];u.length--;f=u.length}return n.bookmark=i.selection.getBookmark(2,!0),f<u.length-1&&(u.length=f+1),u.push(n),f=u.length-1,r.onAdd.dispatch(r,n),i.isNotDirty=0,n},undo:function(){var n;return r.typing&&(r.add(),r.typing=!1),f>0&&(n=u[--f],i.setContent(n.content,{format:"raw"}),i.selection.moveToBookmark(n.beforeBookmark),r.onUndo.dispatch(r,n)),n},redo:function(){var n;return f<u.length-1&&(n=u[++f],i.setContent(n.content,{format:"raw"}),i.selection.moveToBookmark(n.bookmark),r.onRedo.dispatch(r,n)),n},clear:function(){u=[];f=0;r.typing=!1},hasUndo:function(){return f>0||this.typing},hasRedo:function(){return f<u.length-1&&!this.typing}}}}(tinymce);tinymce.ForceBlocks=function(n){function f(){var f=i.getStart(),l=n.getBody(),e,a,o,v,s,h,c,y=-16777215,p,w;if(f&&f.nodeType===1&&t.forced_root_block){while(f&&f!=l){if(u[f.nodeName])return;f=f.parentNode}for(e=i.getRng(),e.setStart?(a=e.startContainer,o=e.startOffset,v=e.endContainer,s=e.endOffset):(e.item&&(f=e.item(0),e=n.getDoc().body.createTextRange(),e.moveToElementText(f)),w=e.parentElement().ownerDocument===n.getDoc(),tmpRng=e.duplicate(),tmpRng.collapse(!0),o=tmpRng.move("character",y)*-1,tmpRng.collapsed||(tmpRng=e.duplicate(),tmpRng.collapse(!1),s=tmpRng.move("character",y)*-1-o)),f=l.firstChild;f;)if(f.nodeType!==3&&(f.nodeType!=1||u[f.nodeName]))h=null,f=f.nextSibling;else{if(f.nodeType===3&&f.nodeValue.length==0){c=f;f=f.nextSibling;r.remove(c);continue}h||(h=r.create(t.forced_root_block),f.parentNode.insertBefore(h,f),p=!0);c=f;f=f.nextSibling;h.appendChild(c)}if(p){if(e.setStart)e.setStart(a,o),e.setEnd(v,s),i.setRng(e);else if(w)try{e=n.getDoc().body.createTextRange();e.moveToElementText(l);e.collapse(!0);e.moveStart("character",o);s>0&&e.moveEnd("character",s);e.select()}catch(b){}n.nodeChanged()}}}var t=n.settings,r=n.dom,i=n.selection,u=n.schema.getBlockElements();t.forced_root_block&&(n.onKeyUp.add(f),n.onNodeChange.add(f))},function(n){var u=n.DOM,r=n.dom.Event,i=n.each,t=n.extend;n.create("tinymce.ControlManager",{ControlManager:function(t,r){var u=this;r=r||{};u.editor=t;u.controls={};u.onAdd=new n.util.Dispatcher(u);u.onPostRender=new n.util.Dispatcher(u);u.prefix=r.prefix||t.id+"_";u._cls={};u.onPostRender.add(function(){i(u.controls,function(n){n.postRender()})})},get:function(n){return this.controls[this.prefix+n]||this.controls[n]},setActive:function(n,t){var i=null;return(i=this.get(n))&&i.setActive(t),i},setDisabled:function(n,t){var i=null;return(i=this.get(n))&&i.setDisabled(t),i},add:function(n){var t=this;return n&&(t.controls[n.id]=n,t.onAdd.dispatch(n,t)),n},createControl:function(n){var r,u,o,t=this,f=t.editor,e;for(t.controlFactories||(t.controlFactories=[],i(f.plugins,function(n){n.createControl&&t.controlFactories.push(n)})),e=t.controlFactories,u=0,o=e.length;u<o;u++)if(r=e[u].createControl(n,t),r)return t.add(r);return n==="|"||n==="separator"?t.createSeparator():f.buttons&&(r=f.buttons[n])?t.createButton(n,r):t.add(r)},createDropMenu:function(i,r,u){var o=this,f=o.editor,e,s,h,c;return r=t({"class":"mceDropDown",constrain:f.settings.constrain_menus},r),r["class"]=r["class"]+" "+f.getParam("skin")+"Skin",(h=f.getParam("skin_variant"))&&(r["class"]+=" "+f.getParam("skin")+"Skin"+h.substring(0,1).toUpperCase()+h.substring(1)),r["class"]+=f.settings.directionality=="rtl"?" mceRtl":"",i=o.prefix+i,c=u||o._cls.dropmenu||n.ui.DropMenu,e=o.controls[i]=new c(i,r),e.onAddItem.add(function(n,t){var i=t.settings;i.title=f.getLang(i.title,i.title);i.onclick||(i.onclick=function(){i.cmd&&f.execCommand(i.cmd,i.ui||!1,i.value)})}),f.onRemove.add(function(){e.destroy()}),n.isIE&&(e.onShowMenu.add(function(){f.focus();s=f.selection.getBookmark(1)}),e.onHideMenu.add(function(){s&&(f.selection.moveToBookmark(s),s=0)})),o.add(e)},createListBox:function(i,u,f){function c(t){return t.settings.use_accessible_selects&&!n.isGecko}var s=this,e=s.editor,o,h;return s.get(i)?null:(u.title=e.translate(u.title),u.scope=u.scope||e,u.onselect||(u.onselect=function(n){e.execCommand(u.cmd,u.ui||!1,n||u.value)}),u=t({title:u.title,"class":"mce_"+i,scope:u.scope,control_manager:s},u),i=s.prefix+i,e.settings.use_native_selects||c(e)?o=new n.ui.NativeListBox(i,u):(h=f||s._cls.listbox||n.ui.ListBox,o=new h(i,u,e)),s.controls[i]=o,n.isWebKit&&o.onPostRender.add(function(n,t){r.add(t,"mousedown",function(){e.bookmark=e.selection.getBookmark(1)});r.add(t,"focus",function(){e.selection.moveToBookmark(e.bookmark);e.bookmark=null})}),o.hideMenu&&e.onMouseDown.add(o.hideMenu,o),s.add(o))},createButton:function(i,r,u){var e=this,f=e.editor,o,s;return e.get(i)?null:(r.title=f.translate(r.title),r.label=f.translate(r.label),r.scope=r.scope||f,r.onclick||r.menu_button||(r.onclick=function(){f.execCommand(r.cmd,r.ui||!1,r.value)}),r=t({title:r.title,"class":"mce_"+i,unavailable_prefix:f.getLang("unavailable",""),scope:r.scope,control_manager:e},r),i=e.prefix+i,r.menu_button?(s=u||e._cls.menubutton||n.ui.MenuButton,o=new s(i,r,f),f.onMouseDown.add(o.hideMenu,o)):(s=e._cls.button||n.ui.Button,o=new s(i,r,f)),e.add(o))},createMenuButton:function(n,t,i){return t=t||{},t.menu_button=1,this.createButton(n,t,i)},createSplitButton:function(i,r,u){var f=this,e=f.editor,o,s;return f.get(i)?null:(r.title=e.translate(r.title),r.scope=r.scope||e,r.onclick||(r.onclick=function(n){e.execCommand(r.cmd,r.ui||!1,n||r.value)}),r.onselect||(r.onselect=function(n){e.execCommand(r.cmd,r.ui||!1,n||r.value)}),r=t({title:r.title,"class":"mce_"+i,scope:r.scope,control_manager:f},r),i=f.prefix+i,s=u||f._cls.splitbutton||n.ui.SplitButton,o=f.add(new s(i,r,e)),e.onMouseDown.add(o.hideMenu,o),o)},createColorSplitButton:function(i,r,u){var o=this,f=o.editor,e,h,s;return o.get(i)?null:(r.title=f.translate(r.title),r.scope=r.scope||f,r.onclick||(r.onclick=function(t){n.isIE&&(s=f.selection.getBookmark(1));f.execCommand(r.cmd,r.ui||!1,t||r.value)}),r.onselect||(r.onselect=function(n){f.execCommand(r.cmd,r.ui||!1,n||r.value)}),r=t({title:r.title,"class":"mce_"+i,menu_class:f.getParam("skin")+"Skin",scope:r.scope,more_colors_title:f.getLang("more_colors")},r),i=o.prefix+i,h=u||o._cls.colorsplitbutton||n.ui.ColorSplitButton,e=new h(i,r,f),f.onMouseDown.add(e.hideMenu,e),f.onRemove.add(function(){e.destroy()}),n.isIE&&(e.onShowMenu.add(function(){f.focus();s=f.selection.getBookmark(1)}),e.onHideMenu.add(function(){s&&(f.selection.moveToBookmark(s),s=0)})),o.add(e))},createToolbar:function(t,i,r){var f,u=this,e;return(t=u.prefix+t,e=r||u._cls.toolbar||n.ui.Toolbar,f=new e(t,i,u.editor),u.get(t))?null:u.add(f)},createToolbarGroup:function(t,i,r){var f,u=this,e;return(t=u.prefix+t,e=r||this._cls.toolbarGroup||n.ui.ToolbarGroup,f=new e(t,i,u.editor),u.get(t))?null:u.add(f)},createSeparator:function(t){var i=t||this._cls.separator||n.ui.Separator;return new i},setControlType:function(n,t){return this._cls[n.toLowerCase()]=t},destroy:function(){i(this.controls,function(n){n.destroy()});this.controls=null}})}(tinymce),function(n){var i=n.util.Dispatcher,u=n.each,t=n.isIE,r=n.isOpera;n.create("tinymce.WindowManager",{WindowManager:function(n){var t=this;t.editor=n;t.onOpen=new i(t);t.onClose=new i(t);t.params={};t.features={}},open:function(i,f){var e=this,o="",h=e.editor.settings.dialog_type=="modal",c,l,a,v=n.DOM.getViewPort(),s;i=i||{};f=f||{};l=r?v.w:screen.width;a=r?v.h:screen.height;i.name=i.name||"mc_"+(new Date).getTime();i.width=parseInt(i.width||320);i.height=parseInt(i.height||240);i.resizable=!0;i.left=i.left||parseInt(l/2)-i.width/2;i.top=i.top||parseInt(a/2)-i.height/2;f.inline=!1;f.mce_width=i.width;f.mce_height=i.height;f.mce_auto_focus=i.auto_focus;h&&t&&(i.center=!0,i.help=!1,i.dialogWidth=i.width+"px",i.dialogHeight=i.height+"px",i.scroll=i.scrollbars||!1);u(i,function(i,r){n.is(i,"boolean")&&(i=i?"yes":"no");/^(name|url)$/.test(r)||(o+=t&&h?(o?";":"")+r+":"+i:(o?",":"")+r+"="+i)});e.features=i;e.params=f;e.onOpen.dispatch(e,i,f);s=i.url||i.file;s=n._addVer(s);try{t&&h?(c=1,window.showModalDialog(s,window,o)):c=window.open(s,i.name,o)}catch(y){}c||alert(e.editor.getLang("popup_blocked"))},close:function(n){n.close();this.onClose.dispatch(this)},createInstance:function(t,i,r,u,f,e){var o=n.resolve(t);return new o(i,r,u,f,e)},confirm:function(n,t,i,r){r=r||window;t.call(i||this,r.confirm(this._decode(this.editor.getLang(n,n))))},alert:function(n,t,i,r){var u=this;r=r||window;r.alert(u._decode(u.editor.getLang(n,n)));t&&t.call(i||u)},resizeBy:function(n,t,i){i.resizeBy(n,t)},_decode:function(t){return n.DOM.decode(t).replace(/\\n/g,"\n")}})}(tinymce),function(n){n.Formatter=function(t){function g(n,t){return i.getParents(n,t,i.getRoot())}function st(n){return n.nodeType===1&&n.id==="_mce_caret"}function ti(){nt({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:!1},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:!1},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(n,t,u){r(u,function(t,r){i.setAttrib(n,r,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]});r("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(n){nt(n,{block:n,remove:"all"})});nt(t.settings.formats)}function ii(){t.addShortcut("ctrl+b","bold_desc","Bold");t.addShortcut("ctrl+i","italic_desc","Italic");t.addShortcut("ctrl+u","underline_desc","Underline");for(var n=1;n<=6;n++)t.addShortcut("ctrl+"+n,"",["FormatBlock",!1,"h"+n]);t.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]);t.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]);t.addShortcut("ctrl+9","",["FormatBlock",!1,"address"])}function l(n){return n?et[n]:et}function nt(n,t){n&&(typeof n!="string"?r(n,function(n,t){nt(t,n)}):(t=t.length?t:[t],r(t,function(n){n.deep===w&&(n.deep=!n.selector);n.split===w&&(n.split=!n.selector||n.inline);n.remove===w&&n.selector&&!n.inline&&(n.remove="none");n.selector&&n.inline&&(n.mixed=!0,n.block_expand=!0);typeof n.classes=="string"&&(n.classes=n.classes.split(/\s+/))}),et[n]=t))}function k(a,v,w){function et(n,t){if(t=t||d,n){if(t.onformat)t.onformat(n,t,v,w);r(t.styles,function(t,r){i.setStyle(n,r,y(t,v))});r(t.attributes,function(t,r){i.setAttrib(n,r,y(t,v))});r(t.classes,function(t){t=y(t,v);i.hasClass(n,t)||i.addClass(n,t)})}}function pt(){function e(n,t){var i=new p(t);for(w=i.current();w;w=i.prev())if(w.childNodes.length>1||w==n||w.tagName=="BR")return w}var n=t.selection.getRng(),r=n.startContainer,u=n.endContainer,i,f;return r!=u&&n.endOffset===0&&(i=e(r,u),f=i.nodeType==3?i.length:i.childNodes.length,n.setEnd(i,f)),n}function kt(t,u,f,o,s){var v=[],h=-1,a,c=-1,y=-1,l;return r(t.childNodes,function(n,t){if(n.nodeName==="UL"||n.nodeName==="OL")return h=t,a=n,!1}),r(t.childNodes,function(n,t){n.nodeName==="SPAN"&&i.getAttrib(n,"data-mce-type")=="bookmark"&&(n.id==u.id+"_start"?c=t:n.id==u.id+"_end"&&(y=t))}),h<=0||c<h&&y>h?(r(n.grep(t.childNodes),s),0):(l=i.clone(f,e),r(n.grep(t.childNodes),function(n,t){(c<h&&t<h||c>h&&t>h)&&(v.push(n),n.parentNode.removeChild(n))}),c<h?t.insertBefore(l,a):c>h&&t.insertBefore(l,a.nextSibling),o.push(l),r(v,function(n){l.appendChild(n)}),l)}function at(t,u,l){var y=[],w,k,p=!0;w=d.inline||d.block;k=i.create(w);et(k);rt.walk(t,function(t){function o(t){var s,it,rt,nt,tt;if(tt=p,s=t.nodeName.toLowerCase(),it=t.parentNode.nodeName.toLowerCase(),t.nodeType===1&&b(t)&&(tt=p,p=b(t)==="true",nt=!0),c(s,"br")){f=0;d.block&&i.remove(t);return}if(d.wrapper&&h(t,a,v)){f=0;return}if(p&&!nt&&d.block&&!d.wrapper&&si(s)){t=i.rename(t,w);et(t);y.push(t);f=0;return}if(d.selector&&(r(g,function(n){"collapsed"in n&&n.collapsed!==vt||i.is(t,n.selector)&&!st(t)&&(et(t,n),rt=!0)}),!d.inline||rt)){f=0;return}!p||nt||!ot(w,s)||!ot(it,w)||!l&&t.nodeType===3&&t.nodeValue.length===1&&t.nodeValue.charCodeAt(0)===65279||st(t)?s=="li"&&u?f=kt(t,u,k,y,o):(f=0,r(n.grep(t.childNodes),o),nt&&(p=tt),f=0):(f||(f=i.clone(k,e),t.parentNode.insertBefore(f,t),y.push(f)),f.appendChild(t))}var f;r(t,o)});d.wrap_links===!1&&r(y,function(t){function u(t){var f,o,s;if(t.nodeName==="A"){for(o=i.clone(k,e),y.push(o),s=n.grep(t.childNodes),f=0;f<s.length;f++)o.appendChild(s[f]);t.appendChild(o)}r(n.grep(t.childNodes),u)}u(t)});r(y,function(n){function u(n){var t=0;return r(n.childNodes,function(n){tt(n)||s(n)||t++}),t}function c(n){var t,u;return r(n.childNodes,function(n){if(n.nodeType==1&&!s(n)&&!st(n))return t=n,e}),t&&lt(t,d)&&(u=i.clone(t,e),et(u),i.replace(u,n,f),i.remove(t,1)),u||n}var t;if(t=u(n),(y.length>1||!o(n))&&t===0){i.remove(n,1);return}if(d.inline||d.wrapper){if(d.exact||t!==1||(n=c(n)),r(g,function(t){r(i.select(t.inline,n),function(n){var i;if(t.wrap_links===!1){i=n.parentNode;do if(i.nodeName==="A")return;while(i=i.parentNode)}ft(t,v,n,t.exact?n:null)})}),h(n.parentNode,a,v))return i.remove(n,1),n=0,f;d.merge_with_parents&&i.getParent(n.parentNode,function(t){if(h(t,a,v))return i.remove(n,1),n=0,f});n&&d.merge_siblings!==!1&&(n=bt(yt(n),n),n=bt(n,yt(n,f)))}})}var g=l(a),d=g[0],ct,nt,vt=u.isCollapsed(),ht;d&&(w?w.nodeType?(nt=i.createRng(),nt.setStartBefore(w),nt.setEndAfter(w),at(it(nt,g),null,!0)):at(w,null,!0):vt&&d.inline&&!i.select("td.mceSelected,th.mceSelected").length?dt("apply",a,v):(ht=t.selection.getNode(),ut||!g[0].defaultBlock||i.getParent(ht,i.isBlock)||k(g[0].defaultBlock),t.selection.setRng(pt()),ct=u.getBookmark(),at(it(u.getRng(f),g),ct),d.styles&&(d.styles.color||d.styles.textDecoration)&&(n.walk(ht,wt,"childNodes"),wt(ht)),u.moveToBookmark(ct),gt(u.getRng(f)),t.nodeChanged()))}function ht(c,a,v){function et(t){var r,i,u,e,f;if(t.nodeType===1&&b(t)&&(e=k,k=b(t)==="true",f=!0),r=n.grep(t.childNodes),k&&!f)for(i=0,u=y.length;i<u;i++)if(ft(y[i],a,t,t))break;if(p.deep&&r.length){for(i=0,u=r.length;i<u;i++)et(r[i]);f&&(k=e)}}function st(n){var t;return r(g(n.parentNode).reverse(),function(n){var i;t||n.id=="_start"||n.id=="_end"||(i=h(n,c,a),i&&i.split!==!1&&(t=n))}),t}function ht(n,t,r,u){var s,f,h,l,c,v;if(n){for(v=n.parentNode,s=t.parentNode;s&&s!=v;s=s.parentNode){for(f=i.clone(s,e),c=0;c<y.length;c++)if(ft(y[c],a,f,f)){f=0;break}f&&(h&&f.appendChild(h),l||(l=f),h=f)}!u||p.mixed&&o(n)||(t=i.split(n,t));h&&(r.parentNode.insertBefore(h,r),l.appendChild(r))}return t}function nt(n){return ht(st(n),n,n,!0)}function ot(n){var r=i.get(n?"_start":"_end"),t=r[n?"firstChild":"lastChild"];return s(t)&&(t=t[n?"firstChild":"lastChild"]),i.remove(r,!0),t}function tt(n){var i,u;n=it(n,y,f);p.split&&(i=kt(n,f),u=kt(n),i!=u?(/^(TR|TD)$/.test(i.nodeName)&&i.firstChild&&(i=(i.nodeName=="TD"?i.firstChild:i.firstChild.firstChild)||i),i=vt(i,"span",{id:"_start","data-mce-type":"bookmark"}),u=vt(u,"span",{id:"_end","data-mce-type":"bookmark"}),nt(i),nt(u),i=ot(f),u=ot()):i=u=nt(i),n.startContainer=i.parentNode,n.startOffset=d(i),n.endContainer=u.parentNode,n.endOffset=d(u)+1);rt.walk(n,function(n){r(n,function(n){et(n);n.nodeType===1&&t.dom.getStyle(n,"text-decoration")==="underline"&&n.parentNode&&pt(n.parentNode)==="underline"&&ft({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,n)})})}var y=l(c),p=y[0],ut,w,k=!0;if(v){v.nodeType?(w=i.createRng(),w.setStartBefore(v),w.setEndAfter(v),tt(w)):tt(v);return}u.isCollapsed()&&p.inline&&!i.select("td.mceSelected,th.mceSelected").length?dt("remove",c,a):(ut=u.getBookmark(),tt(u.getRng(f)),u.moveToBookmark(ut),p.inline&&ct(c,a,u.getStart())&&gt(u.getRng(!0)),t.nodeChanged())}function ri(n,t,i){var r=l(n);!ct(n,t,i)||"toggle"in r[0]&&!r[0].toggle?k(n,t,i):ht(n,t,i)}function h(n,t,r,u){function h(n,t,f){var o,h,e=t[f],s;if(t.onmatch)return t.onmatch(n,t,f);if(e)if(e.length===w){for(o in e)if(e.hasOwnProperty(o)){if(h=f==="attributes"?i.getAttrib(n,o):at(n,o),u&&!h&&!t.exact)return;if((!u||t.exact)&&!c(h,y(e[o],r)))return}}else for(s=0;s<e.length;s++)if(f==="attributes"?i.getAttrib(n,e[s]):at(n,e[s]))return t;return t}var o=l(t),e,f,s;if(o&&n)for(f=0;f<o.length;f++)if(e=o[f],lt(n,e)&&h(n,e,"attributes")&&h(n,e,"styles")){if(s=e.classes)for(f=0;f<s.length;f++)if(!i.hasClass(n,s[f]))return;return e}}function ct(n,t,r){function s(r){return r=i.getParent(r,function(i){return!!h(i,n,t,!0)}),h(r,n,t)}var o;return r?s(r):(r=u.getNode(),s(r))?f:(o=u.getStart(),o!=r&&s(o))?f:e}function ui(n,t){var r,f=[],e={};return r=u.getStart(),i.getParent(r,function(i){for(var r,u=0;u<n.length;u++)r=n[u],!e[r]&&h(i,r,t)&&(e[r]=!0,f.push(r))},i.getRoot()),f}function fi(n){var o=l(n),c,s,t,r,h;if(o)for(c=u.getStart(),s=g(c),r=o.length-1;r>=0;r--){if(h=o[r].selector,!h)return f;for(t=s.length-1;t>=0;t--)if(i.is(s[t],h))return f}return e}function ei(n,i,u){var f;return v||(v={},f={},t.onNodeChange.addToTop(function(n,t,i){var u=g(i),e={};r(v,function(n,t){r(u,function(i){if(h(i,t,{},n.similar))return f[t]||(r(n,function(n){n(!0,{node:i,format:t,parents:u})}),f[t]=n),e[t]=n,!1})});r(f,function(n,t){e[t]||(delete f[t],r(n,function(n){n(!1,{node:i,format:t,parents:u})}))})})),r(n.split(","),function(n){v[n]||(v[n]=[],v[n].similar=u);v[n].push(i)}),this}function lt(n,t){return c(n,t.inline)?f:c(n,t.block)?f:t.selector?i.is(n,t.selector):void 0}function c(n,t){return n=n||"",t=t||"",n=""+(n.nodeName||n),t=""+(t.nodeName||t),n.toLowerCase()==t.toLowerCase()}function at(n,t){var r=i.getStyle(n,t);return(t=="color"||t=="backgroundColor")&&(r=i.toHex(r)),t=="fontWeight"&&r==700&&(r="bold"),""+r}function y(n,t){return typeof n!="string"?n=n(t):t&&(n=n.replace(/%(\w+)/g,function(n,i){return t[i]||n})),n}function tt(n){return n&&n.nodeType===3&&/^([\t \r\n]+|)$/.test(n.nodeValue)}function vt(n,t,r){var u=i.create(t,r);return n.parentNode.insertBefore(u,n),u.appendChild(n),u}function it(n,r,u){function nt(n){var u,t,e,c,l;if(u=t=n?h:f,c=n?"previousSibling":"nextSibling",l=i.getRoot(),u.nodeType==3&&!tt(u)&&(n?v>0:a<u.nodeValue.length))return u;for(;;){if(!r[0].block_expand&&o(t))return t;for(e=t[c];e;e=e[c])if(!s(e)&&!tt(e))return t;if(t.parentNode==l){u=t;break}t=t.parentNode}return u}function it(n,t){for(t===w&&(t=n.nodeType===3?n.length:n.childNodes.length);n&&n.hasChildNodes();)n=n.childNodes[t],n&&(t=n.nodeType===3?n.length:n.childNodes.length);return{node:n,offset:t}}function rt(n){for(var t=n;t;){if(t.nodeType===1&&b(t))return b(t)==="false"?t:n;t=t.parentNode}return n}function ut(n,r,f){function l(n,t){var i,r,e=n.nodeValue;return typeof t=="undefined"&&(t=f?e.length:0),f?(i=e.lastIndexOf(" ",t),r=e.lastIndexOf(" ",t),i=i>r?i:r,i===-1||u||i++):(i=e.indexOf(" ",t),r=e.indexOf(" ",t),i=i!==-1&&(r===-1||i<r)?i:r),i}var c,e,s,h;if(n.nodeType===3){if(s=l(n,r),s!==-1)return{container:n,offset:s};h=n}for(c=new p(n,i.getParent(n,o)||t.getBody());e=c[f?"prev":"next"]();)if(e.nodeType===3){if(h=e,s=l(e),s!==-1)return{container:e,offset:s}}else if(o(e))break;if(h)return r=f?0:h.length,{container:h,offset:r}}function ft(t,u){var e,f,o,s;for(t.nodeType==3&&t.nodeValue.length===0&&t[u]&&(t=t[u]),e=g(t),f=0;f<e.length;f++)for(o=0;o<r.length;o++)if((s=r[o],!("collapsed"in s)||s.collapsed===n.collapsed)&&i.is(e[f],s.selector))return e[f];return t}function et(n,t){var u;if(r[0].wrapper||(u=i.getParent(n,r[0].block)),u||(u=i.getParent(n.nodeType==3?n.parentNode:n,o)),u&&r[0].wrapper&&(u=g(u,"ul,ol").reverse()[0]||u),!u)for(u=n;u[t]&&!o(u[t]);)if(u=u[t],c(u,"br"))break;return u||n}var k,l,y,h=n.startContainer,v=n.startOffset,f=n.endContainer,a=n.endOffset;if(h.nodeType==1&&h.hasChildNodes()&&(k=h.childNodes.length-1,h=h.childNodes[v>k?k:v],h.nodeType==3&&(v=0)),f.nodeType==1&&f.hasChildNodes()&&(k=f.childNodes.length-1,f=f.childNodes[a>k?k:a-1],f.nodeType==3&&(a=f.nodeValue.length)),h=rt(h),f=rt(f),(s(h.parentNode)||s(h))&&(h=s(h)?h:h.parentNode,h=h.nextSibling||h,h.nodeType==3&&(v=0)),(s(f.parentNode)||s(f))&&(f=s(f)?f:f.parentNode,f=f.previousSibling||f,f.nodeType==3&&(a=f.length)),r[0].inline&&(n.collapsed&&(y=ut(h,v,!0),y&&(h=y.container,v=y.offset),y=ut(f,a),y&&(f=y.container,a=y.offset)),l=it(f,a),l.node)){while(l.node&&l.offset===0&&l.node.previousSibling)l=it(l.node.previousSibling);l.node&&l.offset>0&&l.node.nodeType===3&&l.node.nodeValue.charAt(l.offset-1)===" "&&l.offset>1&&(f=l.node,f.splitText(l.offset-1))}return(r[0].inline||r[0].block_expand)&&(r[0].inline&&h.nodeType==3&&v!==0||(h=nt(!0)),r[0].inline&&f.nodeType==3&&a!==f.nodeValue.length||(f=nt())),r[0].selector&&r[0].expand!==e&&!r[0].inline&&(h=ft(h,"previousSibling"),f=ft(f,"nextSibling")),(r[0].block||r[0].selector)&&(h=et(h,"previousSibling"),f=et(f,"nextSibling"),r[0].block&&(o(h)||(h=nt(!0)),o(f)||(f=nt()))),h.nodeType==1&&(v=d(h),h=h.parentNode),f.nodeType==1&&(a=d(f)+1,f=f.parentNode),{startContainer:h,startOffset:v,endContainer:f,endOffset:a}}function ft(n,t,u,o){var s,h,l;if(!lt(u,n))return e;if(n.remove!="all")for(r(n.styles,function(n,r){n=y(n,t);typeof r=="number"&&(r=n,o=0);(!o||c(at(o,r),n))&&i.setStyle(u,r,"");l=1}),l&&i.getAttrib(u,"style")==""&&(u.removeAttribute("style"),u.removeAttribute("data-mce-style")),r(n.attributes,function(n,f){var e;if(n=y(n,t),typeof f=="number"&&(f=n,o=0),!o||c(i.getAttrib(o,f),n)){if(f=="class"&&(n=i.getAttrib(u,f),n&&(e="",r(n.split(/\s+/),function(n){/mce\w+/.test(n)&&(e+=(e?" ":"")+n)}),e))){i.setAttrib(u,f,e);return}f=="class"&&u.removeAttribute("className");ni.test(f)&&u.removeAttribute("data-mce-"+f);u.removeAttribute(f)}}),r(n.classes,function(n){n=y(n,t);(!o||i.hasClass(o,n))&&i.removeClass(u,n)}),h=i.getAttribs(u),s=0;s<h.length;s++)if(h[s].nodeName.indexOf("_")!==0)return e;if(n.remove!="none")return oi(u,n),f}function oi(t,u){function h(n,t,i){return n=yt(n,t,i),!n||n.nodeName=="BR"||o(n)}var l=t.parentNode,s;(u.block&&(ut?l==i.getRoot()&&(u.list_block&&c(t,u.list_block)||r(n.grep(t.childNodes),function(n){ot(ut,n.nodeName.toLowerCase())?s?s.appendChild(n):s=vt(n,ut):s=0})):o(t)&&!o(l)&&(h(t,e)||h(t.firstChild,f,1)||t.insertBefore(i.create("br"),t.firstChild),h(t,f)||h(t.lastChild,e,1)||t.appendChild(i.create("br")))),u.selector&&u.inline&&!c(u.inline,t))||i.remove(t,1)}function yt(n,t,i){if(n)for(t=t?"nextSibling":"previousSibling",n=i?n:n[t];n;n=n[t])if(n.nodeType==1||!tt(n))return n}function s(n){return n&&n.nodeType==1&&n.getAttribute("data-mce-type")=="bookmark"}function bt(t,u){function l(n,t){function u(n){var t={};return r(i.getAttribs(n),function(r){var u=r.nodeName.toLowerCase();u.indexOf("_")!==0&&u!=="style"&&(t[u]=i.getAttrib(n,u))}),t}function o(n,t){var r;for(var i in n)if(n.hasOwnProperty(i)){if((r=t[i],r===w)||n[i]!=r)return e;delete t[i]}for(i in t)if(t.hasOwnProperty(i))return e;return f}return n.nodeName!=t.nodeName?e:o(u(n),u(t))?o(i.parseStyle(i.getAttrib(n,"style")),i.parseStyle(i.getAttrib(t,"style")))?f:e:e}function c(n,t){for(o=n;o;o=o[t]){if(o.nodeType==3&&o.nodeValue.length!==0)return n;if(o.nodeType==1&&!s(o))return o}return n}var o,h;if(t&&u&&(t=c(t,"previousSibling"),u=c(u,"nextSibling"),l(t,u))){for(o=t.nextSibling;o&&o!=u;)h=o,o=o.nextSibling,t.appendChild(h);return i.remove(u),r(n.grep(u.childNodes),function(n){t.appendChild(n)}),t}return u}function si(n){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(n)}function kt(n,i){var r,u,f;return r=n[i?"startContainer":"endContainer"],u=n[i?"startOffset":"endOffset"],r.nodeType==1&&(f=r.childNodes.length-1,!i&&u&&u--,r=r.childNodes[u>f?f:u]),r.nodeType===3&&i&&u>=r.nodeValue.length&&(r=new p(r,t.getBody()).next()||r),r.nodeType!==3||i||u!==0||(r=new p(r,t.getBody()).prev()||r),r}function dt(r,f,e){function y(n){var r=i.create("span",{id:s,"data-mce-bogus":!0,style:d?"color:red":""});return n&&r.appendChild(t.getDoc().createTextNode(a)),r}function w(n,t){while(n){if(n.nodeType===3&&n.nodeValue!==a||n.childNodes.length>1)return!1;t&&n.nodeType===1&&t.push(n);n=n.firstChild}return!0}function o(n){while(n){if(n.id===s)return n;n=n.parentNode}}function b(n){var t;if(n)for(t=new p(n,n),n=t.current();n;n=t.next())if(n.nodeType===3)return n}function c(n,t){var r,f;if(n)f=u.getRng(!0),w(n)?(t!==!1&&(f.setStartBefore(n),f.setEndBefore(n)),i.remove(n)):(r=b(n),r.nodeValue.charAt(0)===a&&(r=r.deleteData(0,1)),i.remove(n,1)),u.setRng(f);else if(n=o(u.getStart()),!n)while(n=i.get(s))c(n,!1)}function g(){var n,t,s,i,h,c,r;n=u.getRng(!0);i=n.startOffset;c=n.startContainer;r=c.nodeValue;t=o(u.getStart());t&&(s=b(t));r&&i>0&&i<r.length&&/\w/.test(r.charAt(i))&&/\w/.test(r.charAt(i-1))?(h=u.getBookmark(),n.collapse(!0),n=it(n,l(f)),n=rt.split(n),k(f,e,n),u.moveToBookmark(h)):(t&&s.nodeValue===a?k(f,e,t):(t=y(!0),s=t.firstChild,n.insertNode(t),i=1,k(f,e,t)),u.setCursorLocation(s,i))}function nt(){var t=u.getRng(!0),r,w,b,s,n,c,v=[],o,p;for(r=t.startContainer,w=t.startOffset,n=r,r.nodeType==3&&((w!=r.nodeValue.length||r.nodeValue===a)&&(s=!0),n=n.parentNode);n;){if(h(n,f,e)){c=n;break}n.nextSibling&&(s=!0);v.push(n);n=n.parentNode}if(c)if(s)b=u.getBookmark(),t.collapse(!0),t=it(t,l(f),!0),t=rt.split(t),ht(f,e,t),u.moveToBookmark(b);else{for(p=y(),n=p,o=v.length-1;o>=0;o--)n.appendChild(i.clone(v[o],!1)),n=n.firstChild;n.appendChild(i.doc.createTextNode(a));n=n.firstChild;i.insertAfter(p,c);u.setCursorLocation(n,1)}}function v(){var t;t=o(u.getStart());t&&!i.isEmpty(t)&&n.walk(t,function(n){n.nodeType!=1||n.id===s||i.isEmpty(n)||i.setAttrib(n,"data-mce-bogus",null)},"childNodes")}var s="_mce_caret",d=t.settings.caret_debug;self._hasCaretEvents||(t.onBeforeGetContent.addToTop(function(){var n=[],t;if(w(o(u.getStart()),n))for(t=n.length;t--;)i.setAttrib(n[t],"data-mce-bogus","1")}),n.each("onMouseUp onKeyUp".split(" "),function(n){t[n].addToTop(function(){c();v()})}),t.onKeyDown.addToTop(function(n,t){var i=t.keyCode;(i==8||i==37||i==39)&&c(o(u.getStart()));v()}),u.onSetContent.add(v),self._hasCaretEvents=!0);r=="apply"?g():nt()}function gt(n){var t=n.startContainer,f=n.startOffset,h,e,r,o,s;if(t.nodeType==3&&f>=t.nodeValue.length&&(f=d(t),t=t.parentNode,h=!0),t.nodeType==1)for(o=t.childNodes,t=o[Math.min(f,o.length-1)],e=new p(t,i.getParent(t,i.isBlock)),(f>o.length-1||h)&&e.next(),r=e.current();r;r=e.next())if(r.nodeType==3&&!tt(r)){s=i.create("a",null,a);r.parentNode.insertBefore(s,r);n.setStart(r,0);u.setRng(n);i.remove(s);return}}var et={},r=n.each,i=t.dom,u=t.selection,p=n.dom.TreeWalker,rt=new n.dom.RangeUtils(i),ot=t.schema.isValidChild,o=i.isBlock,ut=t.settings.forced_root_block,d=i.nodeIndex,a="﻿",ni=/^(src|href|style)$/,e=!1,f=!0,v,w,b=i.getContentEditable,pt=function(n){var i;return t.dom.getParent(n,function(n){return i=t.dom.getStyle(n,"text-decoration"),i&&i!=="none"}),i},wt=function(n){var i;n.nodeType===1&&n.parentNode&&n.parentNode.nodeType===1&&(i=pt(n.parentNode),t.dom.getStyle(n,"color")&&i?t.dom.setStyle(n,"text-decoration",i):t.dom.getStyle(n,"textdecoration")===i&&t.dom.setStyle(n,"text-decoration",null))};n.extend(this,{get:l,register:nt,apply:k,remove:ht,toggle:ri,match:ct,matchAll:ui,matchNode:h,canApply:fi,formatChanged:ei});ti();ii()}}(tinymce);tinymce.onAddEditor.add(function(n,t){function u(t,r){n.each(r,function(n,r){n&&i.setStyle(t,r,n)});i.rename(t,"span")}function f(u,f){i=u.dom;r.convert_fonts_to_spans&&n.each(i.select("font,u,strike",f.node),function(n){e[n.nodeName.toLowerCase()](t.dom,n)})}var e,o,i,r=t.settings;r.inline_styles&&(o=n.explode(r.font_size_legacy_values),e={font:function(n,t){u(t,{backgroundColor:t.style.backgroundColor,color:t.color,fontFamily:t.face,fontSize:o[parseInt(t.size,10)-1]})},u:function(n,t){u(t,{textDecoration:"underline"})},strike:function(n,t){u(t,{textDecoration:"line-through"})}},t.onPreProcess.add(f),t.onSetContent.add(f),t.onInit.add(function(){t.selection.onSetContent.add(f)}))}),function(n){var t=n.dom.TreeWalker;n.EnterKey=function(i){function s(s){function et(n){return n&&r.isBlock(n)&&!/^(TD|TH|CAPTION|FORM)$/.test(n.nodeName)&&!/^(fixed|absolute)/i.test(n.style.position)&&r.getContentEditable(n)!=="true"}function ot(t){var i;n.isIE&&r.isBlock(t)&&(i=u.getRng(),t.appendChild(r.create("span",null," ")),u.select(t),t.lastChild.outerHTML="",u.setRng(i))}function ht(n){for(var t=n,i=[],u;t=t.firstChild;){if(r.isBlock(t))return;t.nodeType!=1||o[t.nodeName.toLowerCase()]||i.push(t)}for(u=i.length;u--;)t=i[u],t.hasChildNodes()&&(t.firstChild!=t.lastChild||t.firstChild.nodeValue!=="")?t.nodeName=="A"&&(t.innerText||t.textContent)===" "&&r.remove(t):r.remove(t)}function ut(n){var c,e,f,s,h,l=n,a;if(f=r.createRng(),n.hasChildNodes()){for(c=new t(n,n);e=c.current();){if(e.nodeType==3){f.setStart(e,0);f.setEnd(e,0);break}if(o[e.nodeName.toLowerCase()]){f.setStartBefore(e);f.setEndBefore(e);break}l=e;e=c.next()}e||(f.setStart(l,0),f.setEnd(l,0))}else n.nodeName=="BR"?n.nextSibling&&r.isBlock(n.nextSibling)?((!nt||nt<9)&&(a=r.create("br"),n.parentNode.insertBefore(a,n)),f.setStartBefore(n),f.setEndBefore(n)):(f.setStartAfter(n),f.setEndAfter(n)):(f.setStart(n,0),f.setEnd(n,0));u.setRng(f);r.remove(a);h=r.getViewPort(i.getWin());s=r.getPos(n).y;(s<h.y||s+25>h.y+h.h)&&i.getWin().scrollTo(0,s<h.y?s:s-h.h+25)}function it(t){var e=h,i,u,o;if(i=t||k=="TABLE"?r.create(t||v):c.cloneNode(!1),o=i,f.keep_styles!==!1)do/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(e.nodeName)&&(u=e.cloneNode(!1),r.setAttrib(u,"id",""),i.hasChildNodes()?(u.appendChild(i.firstChild),i.appendChild(u)):(o=u,i.appendChild(u)));while(e=e.parentNode);return n.isIE||(o.innerHTML="<br>"),i}function st(n){var i,r,u;if(h.nodeType==3&&(n?p>0:p<h.nodeValue.length))return!1;if(h.parentNode==c&&tt&&!n||n&&h.nodeType==1&&h==c.firstChild)return!0;if(h.nodeName==="TABLE"||h.previousSibling&&h.previousSibling.nodeName=="TABLE")return tt&&!n||!tt&&n;for(i=new t(h,c),h.nodeType==3&&(n&&p==0?i.prev():n||p!=h.nodeValue.length||i.next());r=i.current();){if(r.nodeType===1){if(!r.getAttribute("data-mce-bogus")&&(u=r.nodeName.toLowerCase(),o[u]&&u!=="br"))return!1}else if(r.nodeType===3&&!/^[ \t\r\n]*$/.test(r.nodeValue))return!1;n?i.prev():i.next()}return!0}function ct(n,t){var u,f,e,i,o,s=v||"P";if(f=r.getParent(n,r.isBlock),!f||!et(f)){if(f=f||g,!f.hasChildNodes())return u=r.create(s),f.appendChild(u),l.setStart(u,0),l.setEnd(u,0),u;for(i=n;i.parentNode!=f;)i=i.parentNode;while(i&&!r.isBlock(i))e=i,i=i.previousSibling;if(e){for(u=r.create(s),e.parentNode.insertBefore(u,e),i=e;i&&!r.isBlock(i);)o=i.nextSibling,u.appendChild(i),i=o;l.setStart(n,t);l.setEnd(n,t)}}return n}function lt(){function n(n){for(var t=y[n?"firstChild":"lastChild"];t;){if(t.nodeType==1)break;t=t[n?"nextSibling":"previousSibling"]}return t===c}a=v?it(v):r.create("BR");n(!0)&&n()?r.replace(a,y):n(!0)?y.parentNode.insertBefore(a,y):n()?(r.insertAfter(a,y),ot(a)):(b=l.cloneRange(),b.setStartAfter(c),b.setEndAfter(y),d=b.extractContents(),r.insertAfter(d,y),r.insertAfter(a,y));r.remove(c);ut(a);e.add()}function at(){for(var i=new t(h,c),n;n=i.current();){if(n.nodeName=="BR")return!0;n=i.next()}}function rt(){var t,i;h&&h.nodeType==3&&p>=h.nodeValue.length&&(n.isIE||at()||(t=r.create("br"),l.insertNode(t),l.setStartAfter(t),l.setEndAfter(t),i=!0));t=r.create("br");l.insertNode(t);n.isIE&&k=="PRE"&&(!nt||nt<8)&&t.parentNode.insertBefore(r.doc.createTextNode("\r"),t);i?(l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t));u.setRng(l);e.add()}function vt(n){do n.nodeType===3&&(n.nodeValue=n.nodeValue.replace(/^[\r\n]+/,"")),n=n.firstChild;while(n)}function yt(n){for(var i=r.getRoot(),u,t=n;t!==i&&r.getContentEditable(t)!=="false";)r.getContentEditable(t)==="true"&&(u=t),t=t.parentNode;return t!==i?u:i}function pt(t){var i;n.isIE||(t.normalize(),i=t.lastChild,(!i||/^(left|right)$/gi.test(r.getStyle(i,"float",!0)))&&r.add(t,"br"))}var l=u.getRng(!0),b,g,h,p,c,nt,w,a,d,y,k,ft,v,tt;if(!l.collapsed){i.execCommand("Delete");return}if(!s.isDefaultPrevented()&&(h=l.startContainer,p=l.startOffset,v=(f.force_p_newlines?"p":"")||f.forced_root_block,v=v?v.toUpperCase():"",nt=r.doc.documentMode,w=s.shiftKey,h.nodeType==1&&h.hasChildNodes()&&(tt=p>h.childNodes.length-1,h=h.childNodes[Math.min(p,h.childNodes.length-1)]||h,p=tt&&h.nodeType==3?h.nodeValue.length:0),g=yt(h),g)){if(e.beforeChange(),!r.isBlock(g)&&g!=r.getRoot()){(!v||w)&&rt();return}if((v&&!w||!v&&w)&&(h=ct(h,p)),c=r.getParent(h,r.isBlock),y=c?r.getParent(c.parentNode,r.isBlock):null,k=c?c.nodeName.toUpperCase():"",ft=y?y.nodeName.toUpperCase():"",k=="LI"){if(!v&&w){rt();return}if(r.isEmpty(c)){if(/^(UL|OL|LI)$/.test(y.parentNode.nodeName))return!1;lt();return}}if(k=="PRE"&&f.br_in_pre!==!1){if(!w){rt();return}}else if(!v&&!w&&k!="LI"||v&&w){rt();return}v=v||"P";st()?(a=/^(H[1-6]|PRE)$/.test(k)&&ft!="HGROUP"?it(v):it(),f.end_container_on_empty_block&&et(y)&&r.isEmpty(c)?a=r.split(y,c):r.insertAfter(a,c),ut(a)):st(!0)?(a=c.parentNode.insertBefore(it(),c),ot(a)):(b=l.cloneRange(),b.setEndAfter(c),d=b.extractContents(),vt(d),a=d.firstChild,r.insertAfter(d,c),ht(a),pt(c),ut(a));r.setAttrib(a,"id","");e.add()}}var r=i.dom,u=i.selection,f=i.settings,e=i.undoManager,o=i.schema.getNonEmptyElements();i.onKeyDown.add(function(n,t){t.keyCode==13&&s(t)!==!1&&t.preventDefault()})}}(tinymce)