<commit_before>/*global JSON, JsonFx */
/*
	JsonFx_IO.js
	Ajax & JSON-RPC support

	Created: 2006-11-09-0120
	Modified: 2009-01-31-1623

	Copyright (c)2006-2009 <NAME>
	Released under an open-source license: http://jsonfx.net/license
*/

/* dependency checks --------------------------------------------*/

if ("undefined" === typeof window.JSON) {
	throw new Error("JsonFx_IO.js requires json2.js");
}

/* ----------------------------------------------------*/

(function () {
	// wrapping in anonymous function so that the XHR ID list
	// will be only available as a closure, as this will not
	// modify the global namespace, and it will be shared
	var XHR_OCXs;

	if ("undefined" === typeof window.XMLHttpRequest) {

		// these IDs are as per MSDN documentation (including case)
		/*string[]*/ XHR_OCXs = !window.ActiveXObject ? [] :
			[
				"Msxml2.XMLHTTP.6.0",
				"Msxml2.XMLHttp.5.0",
				"Msxml2.XMLHttp.4.0",
				"MSXML2.XMLHTTP.3.0",
				"MSXML2.XMLHTTP",
				"Microsoft.XMLHTTP"
			];

		// XMLHttpRequest: augment browser to have "native" XHR
		/*XMLHttpRequest*/ window.XMLHttpRequest = function() {
			while (XHR_OCXs.length) {
				try {
					return new window.ActiveXObject(XHR_OCXs[0]);
				} catch (ex) {
					// remove the failed XHR_OCXs for all future requests
					XHR_OCXs.shift();
				}
			}

			// all XHR_OCXs failed		
			return null;
		};
	}
})();

/* ----------------------------------------------------*/

/* namespace JsonFx */
if ("undefined" === typeof window.JsonFx) {
	window.JsonFx = {};
}

if ("undefined" === typeof JsonFx.jsonReviver) {
	/*object*/ JsonFx.jsonReviver = function(/*string*/ key, /*object*/ value) {
		var a;
		if ("string" === typeof value) {
			a = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
			if (a) {
				return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6]));
			}
		}
		return value;
	};
}

/*
	RequestOptions = {
		// HTTP Options
		async : bool,
		method : string,
		headers : Dictionary<string, string>,
		timeout : number,
		params : string,

		// callbacks
		onCreate : function(XMLHttpRequest, context){},
		onSuccess : function(XMLHttpRequest, context){},
		onFailure : function(XMLHttpRequest, context, Error){},
		onTimeout : function(XMLHttpRequest, context, Error){},
		onComplete : function(XMLHttpRequest, context){},

		// callback context
		context : object
	};
*/

/* namespace JsonFx.IO */
JsonFx.IO = {
	/*bool*/ hasAjax: !!new XMLHttpRequest(),<commit_msg>- fixing the situation where DateTimeKind.Unspecified DateTimes were being treated as server-local time - now DateTimeKind.Unspecified DateTimes are treated as browser-local time<commit_after>/*global JSON, JsonFx */
/*
	JsonFx_IO.js
	Ajax & JSON-RPC support

	Created: 2006-11-09-0120
	Modified: 2009-01-31-1623

	Copyright (c)2006-2009 <NAME>
	Released under an open-source license: http://jsonfx.net/license
*/

/* dependency checks --------------------------------------------*/

if ("undefined" === typeof window.JSON) {
	throw new Error("JsonFx_IO.js requires json2.js");
}

/* ----------------------------------------------------*/

(function () {
	// wrapping in anonymous function so that the XHR ID list
	// will be only available as a closure, as this will not
	// modify the global namespace, and it will be shared
	var XHR_OCXs;

	if ("undefined" === typeof window.XMLHttpRequest) {

		// these IDs are as per MSDN documentation (including case)
		/*string[]*/ XHR_OCXs = !window.ActiveXObject ? [] :
			[
				"Msxml2.XMLHTTP.6.0",
				"Msxml2.XMLHttp.5.0",
				"Msxml2.XMLHttp.4.0",
				"MSXML2.XMLHTTP.3.0",
				"MSXML2.XMLHTTP",
				"Microsoft.XMLHTTP"
			];

		// XMLHttpRequest: augment browser to have "native" XHR
		/*XMLHttpRequest*/ window.XMLHttpRequest = function() {
			while (XHR_OCXs.length) {
				try {
					return new window.ActiveXObject(XHR_OCXs[0]);
				} catch (ex) {
					// remove the failed XHR_OCXs for all future requests
					XHR_OCXs.shift();
				}
			}

			// all XHR_OCXs failed		
			return null;
		};
	}
})();

/* ----------------------------------------------------*/

/* namespace JsonFx */
if ("undefined" === typeof window.JsonFx) {
	window.JsonFx = {};
}

if ("undefined" === typeof JsonFx.jsonReviver) {
	/*object*/ JsonFx.jsonReviver = function(/*string*/ key, /*object*/ value) {
		var a;
		if ("string" === typeof value) {
			a = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(Z)?$/.exec(value);
			if (a) {
				if (a[7]) {
					return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6]));
				} else {
					return new Date(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6]);
				}
			}
		}
		return value;
	};
}

/*
	RequestOptions = {
		// HTTP Options
		async : bool,
		method : string,
		headers : Dictionary<string, string>,
		timeout : number,
		params : string,

		// callbacks
		onCreate : function(XMLHttpRequest, context){},
		onSuccess : function(XMLHttpRequest, context){},
		onFailure : function(XMLHttpRequest, context, Error){},
		onTimeout : function(XMLHttpRequest, context, Error){},
		onComplete : function(XMLHttpRequest, context){},

		// callback context
		context : object
	};
*/

/* namespace JsonFx.IO */
JsonFx.IO = {
	/*bool*/ hasAjax: !!new XMLHttpRequest(),
{'fraction_non_alphanumeric': 0.2227307398932113, 'fraction_numerical': 0.02440884820747521, 'mean_word_length': 2.568027210884354, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5696869', 'n_tokens_mistral': 2061, 'n_tokens_neox': 1801, 'n_words': 429}