1/* This file is part of Mura CMS. 2 3 Mura CMS is free software: you can redistribute it and/or modify 4 it under the terms of the GNU General Public License as published by 5 the Free Software Foundation, Version 2 of the License. 6 7 Mura CMS is distributed in the hope that it will be useful, 8 but WITHOUT ANY WARRANTY; without even the implied warranty of 9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 GNU General Public License for more details. 11 12 You should have received a copy of the GNU General Public License 13 along with Mura CMS. If not, see <http://www.gnu.org/licenses/>. 14 15 Linking Mura CMS statically or dynamically with other modules constitutes the preparation of a derivative work based on 16 Mura CMS. Thus, the terms and conditions of the GNU General Public License version 2 ("GPL") cover the entire combined work. 17 18 However, as a special exception, the copyright holders of Mura CMS grant you permission to combine Mura CMS with programs 19 or libraries that are released under the GNU Lesser General Public License version 2.1. 20 21 In addition, as a special exception, the copyright holders of Mura CMS grant you permission to combine Mura CMS with 22 independent software modules (plugins, themes and bundles), and to distribute these plugins, themes and bundles without 23 Mura CMS under the license of your choice, provided that you follow these specific guidelines: 24 25 Your custom code 26 27 ⢠Must not alter any default objects in the Mura CMS database and 28 ⢠May not alter the default display of the Mura CMS logo within Mura CMS and 29 ⢠Must not alter any files in the following directories. 30 31 /admin/ 32 /tasks/ 33 /config/ 34 /requirements/mura/ 35 /Application.cfc 36 /index.cfm 37 /MuraProxy.cfc 38 39 You may copy and distribute Mura CMS with a plug-in, theme or bundle that meets the above guidelines as a combined work 40 under the terms of GPL for Mura CMS, provided that you include the source code of that other code when and as the GNU GPL 41 requires distribution of source code. 42 43 For clarity, if you create a modified version of Mura CMS, you are not obligated to grant this special exception for your 44 modified version; it is your choice whether to do so, or to make such modified version available under the GNU General Public License 45 version 2 without this exception. You may, if you choose, apply this exception to your own modified versions of Mura CMS. */if(window.Prototype){delete Object.prototype.toJSON;delete Array.prototype.toJSON;delete Hash.prototype.toJSON;delete String.prototype.toJSON}this.JSON||(JSON=function(){function f(e){return e<10?"0"+e:e}function quote(e){escapeable.lastIndex=0;return escapeable.test(e)?'"'+e.replace(escapeable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+(+e.charCodeAt(0)).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e));typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent;u=[];if(typeof a.length=="number"&&!a.propertyIsEnumerable("length")){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]";gap=o;return i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1){r=rep[n];if(typeof r=="string"){i=str(r,a,rep);i&&u.push(quote(r)+(gap?": ":":")+i)}}}else for(r in a)if(Object.hasOwnProperty.call(a,r)){i=str(r,a,rep);i&&u.push(quote(r)+(gap?": ":":")+i)}i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}";gap=o;return i}}Date.prototype.toJSON=function(e){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapeable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;return{stringify:function(e,t,n){var r;gap="";indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")},parse:function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)if(Object.hasOwnProperty.call(i,n)){r=walk(i,n);r!==undefined?i[n]=r:delete i[n]}return reviver.call(e,t,i)}var j;cx.lastIndex=0;cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+(+e.charCodeAt(0)).toString(16)).slice(-4)}));if(/^[\],:{}\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,""))){j=eval("("+text+")");return typeof reviver=="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());(function(e,t){var n=function(t){(e.execScript||function(t){e.eval.call(e,t)})(t)},r=function(e,t){return e instanceof(t||Array)},i=document,s="getElementsByTagName",o="length",u="readyState",a="onreadystatechange",f=i[s]("script"),l=f[f[o]-1],c=l.innerHTML.replace(/^\s+|\s+$/g,"");if(!e.ljs){var h=l.src.match(/checkLoaded/)?1:0,p=i[s]("head")[0]||i.documentElement,d=function(e){var t={};t.u=e.replace(/#(=)?([^#]*)?/g,function(e,n,r){t[n?"f":"i"]=r;return""});return t},v=function(e,t,n){var r=i.createElement(e),s;n&&(r[u]?r[a]=function(){if(r[u]==="loaded"||r[u]==="complete"){r[a]=null;n()}}:r.onload=n);for(s in t)t[s]&&(r[s]=t[s]);p.appendChild(r)},m=function(e,t){if(this.aliases&&this.aliases[e]){var n=this.aliases[e].slice(0);r(n)||(n=[n]);t&&n.push(t);return this.load.apply(this,n)}if(r(e)){for(var i=e[o];i--;)this.load(e[i]);t&&e.push(t);return this.load.apply(this,e)}return e.match(/\.css\b/)?this.loadcss(e,t):this.loadjs(e,t)},g={},y={aliases:{},loadjs:function(e,n,r){if(typeof e=="object"){if(Array.isArray(e))return y.load.apply(this,arguments);if(typeof n=="function"){r=n;n={};e=n.href}else{if(typeof n=="string"||typeof n=="object"&&Array.isArray(n))return y.load.apply(this,arguments);n=e;e=n.href;r=t}}else if(typeof n=="function"){r=n;n={}}else if(typeof n=="string"||typeof n=="object"&&Array.isArray(n))return y.load.apply(this,arguments);typeof n=="undefined"&&(n={});var i=d(e),s=[["i","id"],["f","fallback"],["u","src"]];for(var o=0;o<s.length;o++){var u=s[o];
45!(u[1]in n)&&u[0]in i&&(n[u[1]]=i[u[0]])}typeof n.type=="undefined"&&(n.type="text/javascript");var a={};for(var f in n)f!="fallback"&&(a[f]=n[f]);a.onerror=function(e){if(n.fallback){var t=e.currentTarget;t.parentNode.removeChild(t);a.src=n.fallback;v("script",n,r)}};if(g[a.src]===!0){r&&r();return this}if(g[a.src]!==t){r&&(g[a.src]=function(e,t){return function(){e&&e();t&&t()}}(g[a.src],r));return this}g[a.src]=function(e){return function(){g[a.src]=!0;e&&e()}}(r);r=function(){g[e]()};v("script",a,r);return this},loadcss:function(e,n,r){if(typeof e=="object"){if(Array.isArray(e))return y.load.apply(this,arguments);if(typeof n=="function"){r=n;n=e;e=n.href}else{if(typeof n=="string"||typeof n=="object"&&Array.isArray(n))return y.load.apply(this,arguments);n=e;e=n.href;r=t}}else if(typeof n=="function"){r=n;n={}}else if(typeof n=="string"||typeof n=="object"&&Array.isArray(n))return y.load.apply(this,arguments);var i=d(e);i={type:"text/css",rel:"stylesheet",href:e,id:i.i};if(typeof n!="undefined")for(var s in n)i[s]=n[s];g[i.href]||v("link",i);g[i.href]=!0;r&&r();return this},load:function(){var e=arguments,n=e[o];if(n===1&&r(e[0],Function)){e[0]();return this}m.call(this,e[0],n<=1?t:function(){y.load.apply(y,[].slice.call(e,1))});return this},addAliases:function(e){for(var t in e)this.aliases[t]=r(e[t])?e[t].slice(0):e[t];return this}};if(h){var b,w,E,S;for(b=0,w=f[o];b<w;b++)(S=f[b].getAttribute("src"))&&(g[S.replace(/#.*$/,"")]=!0);E=i[s]("link");for(b=0,w=E[o];b<w;b++)(E[b].rel==="stylesheet"||E[b].type==="text/css")&&(g[E[b].getAttribute("href").replace(/#.*$/,"")]=!0)}e.ljs=y}c&&n(c)})(window);(function(e){e.fn.serializeObject=function(){var t=this,n={},r={},i={validate:/^[a-zA-Z][a-zA-Z0-9_]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/,key:/[a-zA-Z0-9_]+|(?=\[\])/g,push:/^$/,fixed:/^\d+$/,named:/^[a-zA-Z0-9_]+$/};this.build=function(e,t,n){e[t]=n;return e};this.push_counter=function(e){r[e]===undefined&&(r[e]=0);return r[e]++};e.each(e(this).serializeArray(),function(){if(!i.validate.test(this.name))return;var r,s=this.name.match(i.key),o=this.value,u=this.name;while((r=s.pop())!==undefined){u=u.replace(new RegExp("\\["+r+"\\]$"),"");r.match(i.push)?o=t.build([],t.push_counter(u),o):r.match(i.fixed)?o=t.build([],r,o):r.match(i.named)&&(o=t.build({},r,o))}n=e.extend(!0,n,o)});return n}})(jQuery);$.fn.changeElementType=function(e){var t={};$.each(this[0].attributes,function(e,n){t[n.nodeName]=n.value});var n=$("<"+e+"/>",t).append($(this).contents());this.replaceWith(n);return n};Object.keys||(Object.keys=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(i){if(typeof i=="object"||typeof i=="function"&&i!==null){var s=[],o,u;for(o in i)e.call(i,o)&&s.push(o);if(t)for(u=0;u<r;u++)e.call(i,n[u])&&s.push(n[u]);return s}throw new TypeError("Object.keys called on non-object")}}());var initMura=function(config){!window.jQuery&&document.write(unescape('%3Cscript type="text/javascript" src="'+config.assetpath+'/jquery/jquery.js"%3E%3C/script%3E'));config.context||(config.context="");config.assetpath||(config.assetpath=config.context);config.apiEndpoint||(config.apiEndpoint=config.context+"/index.cfm/_api/json/v1/");config.requirementspath||(config.requirementspath=config.context+"/requirements");typeof config.adminpreview=="undefined"&&(config.adminpreview=!1);typeof config.mobileformat=="undefined"&&(config.mobileformat=!1);typeof config.windowdocumentdomain!="undefined"&&config.windowdocumentdomain!=""&&(window.document.domain=config.windowdocumentdomain);var createCookie=function(e,t,n){if(n){var r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);var i="; expires="+r.toGMTString()}else var i="";document.cookie=e+"="+t+i+"; path=/"},readCookie=function(e){var t=e+"=",n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=n[r];while(i.charAt(0)==" ")i=i.substring(1,i.length);if(i.indexOf(t)==0)return unescape(i.substring(t.length,i.length))}return""},eraseCookie=function(e){createCookie(e,"",-1)},addLoadEvent=function(e){var t=window.onload;typeof window.onload!="function"?window.onload=e:window.onload=function(){t();e()}},noSpam=function(e,t){locationstring="mailto:"+e+"@"+t;window.location=locationstring},setHTMLEditor=function(e){var t=function(){var t=CKEDITOR.instances[$(e).attr("id")],i={height:200,width:"70%"};$(e).data("editorconfig")&&$.extend(i,$(e).data("editorconfig"));if(t){t.destroy();CKEDITOR.remove(t)}$("#"+$(e).attr("id")).ckeditor(r(i),n)},n=function(e){var t=jQuery(e).ckeditorGet();t.resetDirty();var n=CKEDITOR.instances},r=function(e){var t="",n={toolbar:"htmlEditor",customConfig:"config.js.cfm"};typeof e=="object"&&$.extend(n,e);return n};loader().loadjs(config.requirementspath+"/ckeditor/ckeditor.js",config.requirementspath+"/ckeditor/adapters/jquery.js",function(){t()})},pressed_keys="",loginCheck=function(e){e==27?pressed_keys=e.toString():e==76&&(pressed_keys=pressed_keys+""+e.toString());e!=27&&e!=76&&(pressed_keys="");if(pressed_keys!=""){var t=pressed_keys;if(t.indexOf("2776")!=-1&&location.search.indexOf("display=login")==-1){typeof config.loginURL!="undefined"?lu=config.loginURL:typeof config.loginurl!="undefined"?lu=config.loginurl:lu="?display=login";typeof config.returnURL!="undefined"?ru=config.returnURL:typeof config.returnurl!="undefined"?ru=config.returnURL:ru=location.href;pressed_keys="";lu=new String(lu);
45lu.indexOf("?")!=-1?location.href=lu+"&returnUrl="+escape(ru):location.href=lu+"?returnUrl="+escape(ru)}}},isInteger=function(e){var t;for(t=0;t<e.length;t++){var n=e.charAt(t);if(n<"0"||n>"9")return!1}return!0},createDate=function(e){var t=e.split("/"),n=t[0],r=t[1],i=t[2],s=new Date(i,n-1,r);return isNaN(s.getMonth())?new Date:s},dateToString=function(e){var t=e.getMonth()+1,n=e.getDate(),r=e.getFullYear();t<10&&(t="0"+t);n<10&&(n="0"+n);return t+"/"+n+"/20"+(new String(r)).substring(2,4)},stripCharsInBag=function(e,t){var n,r="";for(n=0;n<e.length;n++){var i=e.charAt(n);t.indexOf(i)==-1&&(r+=i)}return r},daysInFebruary=function(e){return e%4!=0||e%100==0&&e%400!=0?28:29},DaysArray=function(e){for(var t=1;t<=e;t++){this[t]=31;if(t==4||t==6||t==9||t==11)this[t]=30;t==2&&(this[t]=29)}return this},isDate=function(e,t){var n=DaysArray(12),r=e.split(config.dtCh);if(r.length!=3)return!1;var i=r[config.dtFormat[0]],s=r[config.dtFormat[1]],o=r[config.dtFormat[2]];strYr=o;s.charAt(0)=="0"&&s.length>1&&(s=s.substring(1));i.charAt(0)=="0"&&i.length>1&&(i=i.substring(1));for(var u=1;u<=3;u++)strYr.charAt(0)=="0"&&strYr.length>1&&(strYr=strYr.substring(1));month=parseInt(i);day=parseInt(s);year=parseInt(strYr);return month<1||month>12?!1:day<1||day>31||month==2&&day>daysInFebruary(year)||day>n[month]?!1:o.length!=4||year==0||year<config.minYear||year>config.maxYear?!1:isInteger(stripCharsInBag(e,config.dtCh))==0?!1:!0},isEmail=function(e){var t=e;return t.indexOf("@")==-1||t.indexOf(".")==-1?!1:!0},initShadowBox=function(e){$(e).find('[data-rel^="shadowbox"],[rel^="shadowbox"]').length&&loader().load(config.assetpath+"/css/shadowbox.min.css",config.assetpath+"/js/adapter/shadowbox-jquery.min.js",config.assetpath+"/js/shadowbox.min.js",function(){window.Shadowbox.init()})},validateForm=function(frm,customaction){var getValidationFieldName=function(e){return e.getAttribute("data-label")!=undefined?e.getAttribute("data-label"):e.getAttribute("label")!=undefined?e.getAttribute("label"):e.getAttribute("name")},getValidationIsRequired=function(e){return e.getAttribute("data-required")!=undefined?e.getAttribute("data-required").toLowerCase()=="true":e.getAttribute("required")!=undefined?e.getAttribute("required").toLowerCase()=="true":!1},getValidationMessage=function(e,t){return e.getAttribute("data-message")!=undefined?e.getAttribute("data-message"):e.getAttribute("message")!=undefined?e.getAttribute("message"):getValidationFieldName(e).toUpperCase()+t},getValidationType=function(e){return e.getAttribute("data-validate")!=undefined?e.getAttribute("data-validate").toUpperCase():e.getAttribute("validate")!=undefined?e.getAttribute("validate").toUpperCase():""},hasValidationMatchField=function(e){return e.getAttribute("data-matchfield")!=undefined&&e.getAttribute("data-matchfield")!=""?!0:e.getAttribute("matchfield")!=undefined&&e.getAttribute("matchfield")!=""?!0:!1},getValidationMatchField=function(e){return e.getAttribute("data-matchfield")!=undefined?e.getAttribute("data-matchfield"):e.getAttribute("matchfield")!=undefined?e.getAttribute("matchfield"):""},hasValidationRegex=function(e){if(e.value==undefined)return!1;if(e.getAttribute("data-regex")!=undefined&&e.getAttribute("data-regex")!="")return!0;if(e.getAttribute("regex")!=undefined&&e.getAttribute("regex")!="")return!0},getValidationRegex=function(e){return e.getAttribute("data-regex")!=undefined?e.getAttribute("data-regex"):e.getAttribute("regex")!=undefined?e.getAttribute("regex"):""},theForm=frm,errors="",setFocus=0,started=!1,startAt,firstErrorNode,validationType="",validations={properties:{}},frmInputs=theForm.getElementsByTagName("input"),rules=new Array,data={},$customaction=customaction;for(var f=0;f<frmInputs.length;f++){var theField=frmInputs[f];validationType=getValidationType(theField).toUpperCase();rules=new Array;if(theField.style.display==""){getValidationIsRequired(theField)&&rules.push({required:!0,message:getValidationMessage(theField," is required.")});validationType!=""&&(validationType=="EMAIL"&&theField.value!=""?rules.push({dataType:"EMAIL",message:getValidationMessage(theField," must be a valid email address.")}
45):validationType=="NUMERIC"&&theField.value!=""?rules.push({dataType:"NUMERIC",message:getValidationMessage(theField," must be numeric.")}):validationType=="REGEX"&&theField.value!=""&&hasValidationRegex(theField)?rules.push({regex:getValidationRegex(theField),message:getValidationMessage(theField," is not valid.")}):validationType=="MATCH"&&hasValidationMatchField(theField)&&theField.value!=theForm[getValidationMatchField(theField)].value?rules.push({eq:theForm[getValidationMatchField(theField)].value,message:getValidationMessage(theField," must match"+getValidationMatchField(theField)+".")}):validationType=="DATE"&&theField.value!=""&&rules.push({dataType:"DATE",message:getValidationMessage(theField," must be a valid date [MM/DD/YYYY].")}));if(rules.length){validations.properties[theField.getAttribute("name")]=rules;data[theField.getAttribute("name")]=theField.value}}}var frmTextareas=theForm.getElementsByTagName("textarea");for(f=0;f<frmTextareas.length;f++){theField=frmTextareas[f];validationType=getValidationType(theField);rules=new Array;theField.style.display==""&&getValidationIsRequired(theField)?rules.push({required:!0,message:getValidationMessage(theField," is required.")}
45):validationType!=""&&validationType=="REGEX"&&theField.value!=""&&hasValidationRegex(theField)&&rules.push({regex:getValidationRegex(theField),message:getValidationMessage(theField," is not valid.")});if(rules.length){validations.properties[theField.getAttribute("name")]=rules;data[theField.getAttribute("name")]=theField.value}}var frmSelects=theForm.getElementsByTagName("select");for(f=0;f<frmSelects.length;f++){theField=frmSelects[f];validationType=getValidationType(theField);rules=new Array;theField.style.display==""&&getValidationIsRequired(theField)&&rules.push({required:!0,message:getValidationMessage(theField," is required.")});if(rules.length){validations.properties[theField.getAttribute("name")]=rules;data[theField.getAttribute("name")]=theField.value}}try{jQuery.ajax({type:"post",url:config.apiEndpoint+"?method=validate",dataType:"text",data:{data:escape(JSON.stringify(data)),validations:escape(JSON.stringify(validations)),version:4},success:function(resp){var _data=eval("("+resp+")");data=_data.data;if(jQuery.isEmptyObject(data)){if(typeof $customaction=="function"){$customaction(theForm);return!1}theForm.submit()}else{var msg="";for(var e in data)msg=msg+data[e]+"\n";alert(msg)}},error:function(e){alert(JSON.stringify(e))}})}catch(err){console.log(err)}return!1},setLowerCaseKeys=function(e){$.map(e,function(t,n){if(n!==n.toLowerCase()){e[n.toLowerCase()]=e[n];delete e[n]}typeof e[n.toLowerCase()]=="object"&&setLowerCaseKeys(e[n.toLowerCase()])});return e},loader=function(){return window.ljs},processHandlers=function(e){var t=[function(){$(e).find(".mura-async-object").each(function(){processAsyncObject(this)})},function(){$(e).find(".htmlEditor").each(function(){setHTMLEditor(this)})},function(){($(e).find(".cffp_applied").length||$(e).find(".cffp_mm").length||$(e).find(".cffp_kp").length)&&$.getScript(config.requirementspath+"/cfformprotect/js/cffp.js")},function(){$(e).find(".g-recaptcha").length&&$.getScript("https://www.google.com/recaptcha/api.js?hl="+config.reCAPTCHALanguage);$(e).find(".g-recaptcha-container").length&&loader().loadjs("https://www.google.com/recaptcha/api.js?hl="+config.reCAPTCHALanguage,function(){$(e).find(".g-recaptcha-container").each(function(){var e=this,t=function(){typeof grecaptcha=="object"?grecaptcha.render($(e).attr("id"),{sitekey:$(e).data("sitekey"),theme:$(e).data("theme"),type:$(e).data("type")}):window.setTimeout(function(){t()},10)};t()})})},function(){if(typeof resizeEditableObject=="function"){$(e).closest(".editableObject").each(function(){resizeEditableObject(this)});$(e).find(".frontEndToolsModal").each(function(){jQuery(this).click(function(e){e.preventDefault();openFrontEndToolsModal(this)})});$(e).find(".editableObject").each(function(){resizeEditableObject(this)})}},function(){initShadowBox(e)},function(){(config.adminpreview=="yes"||config.adminpreview=="true")&&$("a").attr("href",function(e,t){return t.indexOf("muraadminpreview")==-1?t+(t.indexOf("?")!=-1?"&muraadminpreview&mobileformat="+config.mobileformat:"?muraadminpreview&muraadminpreview&mobileformat="+config.mobileformat):f})}];for(var n=0;n<t.length;n++)t[n]()},registeredHandlers={},getRegisteredHandlers=function(e){typeof registeredHandlers[e]=="undefined"&&(registeredHandlers[e]=[]);return registeredHandlers[e]},addEventHandler=function(e,t){if(typeof e=="object")for(var n in e)getRegisteredHandlers(n).push(e[n]);else getRegisteredHandlers(e).push(t)},announceEvent=function(e,t){var n=getRegisteredHandlers(e);for(var r in n)n[r].apply(t)},processAsyncObject=function(e){var t=e,n=function(e){var n=function(e){$(t).html(e);processHandlers(t);$(t).find("form").each(function(){$(this).removeAttr("onsubmit");$(this).on("submit",function(){return r(document.getElementById($(this).attr("id")))})});announceEvent("asyncObjectRendered",t);$(t).trigger("asyncObjectRendered")};"html"in e.data?n(e.data.html):"redirect"in e.data?location.href=e.data.redirect:"render"in e.data&&$.ajax({type:"POST",xhrFields:{withCredentials:!0},crossDomain:!0,url:e.data.render,data:e.data,success:function(e){typeof e=="string"?n(e):typeof e=="object"&&"html"in e&&n(e.html)}})},r=function(e){if(typeof FormData!="undefined"&&$(e).attr("enctype")=="multipart/form-data"){var r=new FormData(e),i=setLowerCaseKeys($(e).serializeObject()),s=["contentid","contenthistid","siteid","object","objectid"];for(var o in s)s[o]in i||r.append(s[o],$(t).data(s[o]));"objectparams"in i&&r.append("objectparams2",escape(JSON.stringify($(t).data("objectparams"))));"nocache"in i&&r.append("nocache",1);var u={url:config.apiEndpoint+"?method=processAsyncObject",type:"POST",data:r,processData:!1,contentType:!1,dataType:"JSON"}}else{var r=$.extend(!0,setLowerCaseKeys($(e).serializeObject()),{siteid:config.siteid,contentid:config.contentid,contenthistid:config.contenthistid,nocache:1},setLowerCaseKeys($(t).data()));!("g-recaptcha-response"in r)&&$("#g-recaptcha-response").length&&(r["g-recaptcha-response"]=$("#g-recaptcha-response").val());"objectparams"in r&&(r.objectparams=escape(JSON.stringify(r.objectparams)));var u={url:config.apiEndpoint+"?method=processAsyncObject",type:"POST",data:r,dataType:"JSON"}}validateForm(e,function(e){$(t).html(config.preloaderMarkup);$.ajax(u).then(n)});return!1},i=$.extend(!0,{siteid:config.siteid,contentid:config.contentid,contenthistid:config.contenthistid,nocache:config.nocache},$(t).data());"objectparams"in i&&(i.objectparams=escape(JSON.stringify(i.objectparams)));$(t).html(config.preloaderMarkup);$.ajax({url:config.apiEndpoint+"?method=processAsyncObject",type:"GET",data:i,dataType:"JSON"}).then(n)};$.extend(config,{processAsyncObject:processAsyncObject,setLowerCaseKeys:setLowerCaseKeys,noSpam:noSpam,addLoadEvent:addLoadEvent,loader:loader,announceEvent:announceEvent,addEventHandler:addEventHandler});config.validateForm=validateForm;$.extend(window,{mura:config,validateForm:validateForm,setHTMLEditor:setHTMLEditor,createCookie
45:createCookie,addLoadEvent:addLoadEvent,noSpam:noSpam});$(function(){processHandlers(document);$(document).on("keydown",function(e){loginCheck(e.which)});$.fn.appendMuraObject=function(e){var t=$('<div class="mura-async-object"></div>');for(var n in args)$.data(t,n,args[n]);$(this).append(t);processAsyncObject(this);return t};$.fn.prependMuraObject=function(e){var t=$('<div class="mura-async-object"></div>');for(var n in args)$.data(t,n,args[n]);$(this).prepend(t);processAsyncObject(this);return t};$(document).trigger("muraReady")});return config};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.