window.configuration.__user = {};
function checkAuthorization() {
	var auth = document.querySelector('meta[property="thinqi-auth-req"]');
	var authzAction = document.querySelector('meta[property="thinqi-authz-action"]');
	var authzObject = document.querySelector('meta[property="thinqi-authz-object"]');
	if (auth != null && auth.getAttribute('content') == "true" && window.configuration.get('user') == null) {
window.location = "/errors/401?redirectUrl=" + encodeURIComponent(window.location.href);	}
	else if (authzAction != null) {
		var action = authzAction.getAttribute('content');
		var object = authzObject.getAttribute('content');
		var authorization = window.configuration.get('authorization');
		if(authorization == undefined || authorization[object] == null || authorization[object].indexOf(action) == -1) {
			window.location = "/errors/403";
		}
	}
}
if (window.location.href.indexOf('/errors/') == -1) { checkAuthorization(); }

if (configuration.get('user') != null) {
	var intercom = configuration.get('user')['intercom'];
	if (intercom.enabled) {
		window.intercomSettings = intercom;
		(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/vndhb8sv';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(document.readyState==='complete'){l();}else if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();
	}
}