/*
	Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

//>>built
define("dojo/json",["./has"],function(l){var r="undefined"!=typeof JSON;l.add("json-parse",r);l.add("json-stringify",r&&'{"a":1}'==JSON.stringify({a:0},function(e,d){return d||1}));if(l("json-stringify"))return JSON;var t=function(e){return('"'+e.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};return{parse:l("json-parse")?JSON.parse:function(e,d){if(d&&!/^([\s\[\{]*(?:"(?:\\.|[^"])*"|-?\d[\d\.]*(?:[Ee][+-]?\d+)?|null|true|false|)[\s\]\}]*(?:,|:|$))+$/.test(e))throw new SyntaxError("Invalid characters in JSON");
return eval("("+e+")")},stringify:function(e,d,f){function g(a,h,b){d&&(a=d(b,a));var c=typeof a;if("number"==c)return isFinite(a)?a+"":"null";if("boolean"==c)return a+"";if(null===a)return"null";if("string"==typeof a)return t(a);if("function"==c||"undefined"==c)return v;if("function"==typeof a.toJSON)return g(a.toJSON(b),h,b);if(a instanceof Date)return'"{FullYear}-{Month+}-{Date}T{Hours}:{Minutes}:{Seconds}Z"'.replace(/\{(\w+)(\+)?\}/g,function(m,w,x){m=a["getUTC"+w]()+(x?1:0);return 10>m?"0"+m:
m});if(a.valueOf()!==a)return g(a.valueOf(),h,b);var n=f?h+f:"",q=f?" ":"",p=f?"\n":"";if(a instanceof Array){q=a.length;var k=[];for(b=0;b<q;b++)c=g(a[b],n,b),"string"!=typeof c&&(c="null"),k.push(p+n+c);return"["+k.join(",")+p+h+"]"}k=[];for(b in a)if(a.hasOwnProperty(b)){if("number"==typeof b)var u='"'+b+'"';else if("string"==typeof b)u=t(b);else continue;c=g(a[b],n,b);"string"==typeof c&&k.push(p+n+u+":"+q+c)}return"{"+k.join(",")+p+h+"}"}var v;"string"==typeof d&&(f=d,d=null);return g(e,"","")}}});