(function () {
String.prototype.hashCode = function() {
var hash = 0, i, chr;
if (this.length === 0) return hash;
for (i = 0; i < this.length; i++) {
chr = this.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0;
}
return hash;
};
window._ev_internal = new Object();
var callbacks = {};
window._ev_internal.evaluateCallback = function () {
var callbackArgs = new Array(arguments.length - 1);
var id = arguments[0];
for (var i = 0; i < arguments.length - 1; ++i) {
var argument = arguments[i+1];
if (argument.indexOf('[json]') === 0) {
argument = JSON.parse(argument.replace('[json]', ''));
}
callbackArgs[i] = argument;
}
callbacks[id].apply(null, callbackArgs);
delete callbacks[id];
}
// Data
EventSDK.appSettings = function () {
return JSON.parse(JsDataProvider.getAppSettings());
}