text: var crypto = require('crypto');
  function EmailDialog(__SLAG_PROPERTIES) {
  	__SLAG_PROPERTIES = __SLAG_PROPERTIES || {};
  	var __SLAG_DEVICE = JSON.parse(process.env.SLAG_DEVICE);
  	var __SLAG_CHECKS = [], __SLAG_NAMES = [
  			'bubbleParent',
  			'apiName',
  			'lifecycleContainer',
  			'barColor',
  			'CANCELLED',
  			'FAILED',
  			'SAVED',
  			'SENT',
  			'bccRecipients',
  			'ccRecipients',
  			'html',
  			'messageBody',
  			'subject',
  			'toRecipients',
  			'id'
  		];
  	if (__SLAG_NAMES.length > 0 && process.env.SLAG_STRICT === 'true') {
  		for (var __SLAG_NAME in __SLAG_PROPERTIES) {
  			if (__SLAG_NAMES.indexOf(__SLAG_NAME) === -1) {
  				throw new Error('Use user custom property ' + __SLAG_NAME);
  			}
  		}
  	} else if (__SLAG_NAMES.length === 0 && __SLAG_PROPERTIES.length > 0 && process.env.SLAG_STRICT === 'true') {
  		throw new Error('Use user custom properties. ' + __SLAG_PROPERTIES.join(', '));
  	}
  	var md5 = crypto.createHash('md5');
  	md5.update(crypto.randomBytes(32), 'binary');
  	this.__SLAG_ID = md5.digest('hex');
  	this.__SLAG_PARENT;
  	if ([
  			'android',
  			'ios'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.bubbleParent = undefined;
  	} else {
  		this.bubbleParent = __SLAG_PROPERTIES.bubbleParent || true;
  	}
  	if (__SLAG_PROPERTIES.apiName) {
  		throw new Error('Ti.UI.EmailDialog.apiName is read only property');
  	}
  	this.apiName = 'Ti.UI.EmailDialog';
  	if (['android'].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.lifecycleContainer = undefined;
  	} else {
  		this.lifecycleContainer = __SLAG_PROPERTIES.lifecycleContainer || {};
  	}
  	if (['ios'].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.barColor = undefined;
  	} else {
  		this.barColor = __SLAG_PROPERTIES.barColor || '';
  	}
  	if (__SLAG_PROPERTIES.CANCELLED) {
  		throw new Error('Ti.UI.EmailDialog.CANCELLED is read only property');
  	}
  	if ([
  			'ios',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.CANCELLED = undefined;
  	} else {
  		this.CANCELLED = 0;
  	}
  	if (__SLAG_PROPERTIES.FAILED) {
  		throw new Error('Ti.UI.EmailDialog.FAILED is read only property');
  	}
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.FAILED = undefined;
  	} else {
  		this.FAILED = 0;
  	}
  	if (__SLAG_PROPERTIES.SAVED) {
  		throw new Error('Ti.UI.EmailDialog.SAVED is read only property');
  	}
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.SAVED = undefined;
  	} else {
  		this.SAVED = 0;
  	}
  	if (__SLAG_PROPERTIES.SENT) {
  		throw new Error('Ti.UI.EmailDialog.SENT is read only property');
  	}
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.SENT = undefined;
  	} else {
  		this.SENT = 0;
  	}
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.bccRecipients = undefined;
  	} else {
  		this.bccRecipients = __SLAG_PROPERTIES.bccRecipients || '';
  	}
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.ccRecipients = undefined;
  	} else {
  		this.ccRecipients = __SLAG_PROPERTIES.ccRecipients || '';
  	}
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.html = undefined;
  	} else {
  		this.html = __SLAG_PROPERTIES.html || true;
  	}
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.messageBody = undefined;
  	} else {
  		this.messageBody = __SLAG_PROPERTIES.messageBody || '';
  	}
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.subject = undefined;
  	} else {
  		this.subject = __SLAG_PROPERTIES.subject || '';
  	}
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		this.toRecipients = undefined;
  	} else {
  		this.toRecipients = __SLAG_PROPERTIES.toRecipients || '';
  	}
  	this.id = __SLAG_PROPERTIES.id || '';
  	return this;
  }
  EmailDialog.prototype.addEventListener = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  };
  EmailDialog.prototype.removeEventListener = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  };
  EmailDialog.prototype.applyProperties = function (__SLAG_PROPERTIES) {
  	for (var __SLAG_NAME in __SLAG_PROPERTIES) {
  		this[__SLAG_NAME] = __SLAG_PROPERTIES[__SLAG_NAME];
  	}
  };
  EmailDialog.prototype.fireEvent = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  };
  EmailDialog.prototype.finishLayout = function () {
  	throw new Error('Ti.UI.EmailDialog.finishLayout was deprecated, since 3.0.0');
  };
  EmailDialog.prototype.startLayout = function () {
  	throw new Error('Ti.UI.EmailDialog.startLayout was deprecated, since 3.0.0');
  };
  EmailDialog.prototype.updateLayout = function () {
  	throw new Error('Ti.UI.EmailDialog.updateLayout was deprecated, since 3.0.0');
  };
  EmailDialog.prototype.hide = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  };
  EmailDialog.prototype.show = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  };
  EmailDialog.prototype.addAttachment = function () {
  	if ([
  			'android',
  			'ios',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  };
  EmailDialog.prototype.isSupported = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return true;
  };
  EmailDialog.prototype.open = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  };
  EmailDialog.prototype.getBubbleParent = function () {
  	if ([
  			'android',
  			'ios'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return this.bubbleParent;
  };
  EmailDialog.prototype.setBubbleParent = function (__SLAG__PROPERTY) {
  	if ([
  			'android',
  			'ios'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	this.bubbleParent = __SLAG__PROPERTY;
  };
  EmailDialog.prototype.getApiName = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return this.apiName;
  };
  EmailDialog.prototype.getLifecycleContainer = function () {
  	if (['android'].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return this.lifecycleContainer;
  };
  EmailDialog.prototype.setLifecycleContainer = function (__SLAG__PROPERTY) {
  	if (['android'].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	this.lifecycleContainer = __SLAG__PROPERTY;
  };
  EmailDialog.prototype.getBarColor = function () {
  	if (['ios'].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return this.barColor;
  };
  EmailDialog.prototype.setBarColor = function (__SLAG__PROPERTY) {
  	if (['ios'].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	this.barColor = __SLAG__PROPERTY;
  };
  EmailDialog.prototype.getBccRecipients = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return this.bccRecipients;
  };
  EmailDialog.prototype.setBccRecipients = function (__SLAG__PROPERTY) {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	this.bccRecipients = __SLAG__PROPERTY;
  };
  EmailDialog.prototype.getCcRecipients = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return this.ccRecipients;
  };
  EmailDialog.prototype.setCcRecipients = function (__SLAG__PROPERTY) {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	this.ccRecipients = __SLAG__PROPERTY;
  };
  EmailDialog.prototype.getHtml = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return this.html;
  };
  EmailDialog.prototype.setHtml = function (__SLAG__PROPERTY) {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	this.html = __SLAG__PROPERTY;
  };
  EmailDialog.prototype.getMessageBody = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return this.messageBody;
  };
  EmailDialog.prototype.setMessageBody = function (__SLAG__PROPERTY) {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	this.messageBody = __SLAG__PROPERTY;
  };
  EmailDialog.prototype.getSubject = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return this.subject;
  };
  EmailDialog.prototype.setSubject = function (__SLAG__PROPERTY) {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	this.subject = __SLAG__PROPERTY;
  };
  EmailDialog.prototype.getToRecipients = function () {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	return this.toRecipients;
  };
  EmailDialog.prototype.setToRecipients = function (__SLAG__PROPERTY) {
  	if ([
  			'android',
  			'ios',
  			'mobileweb',
  			'windowsphone'
  		].indexOf(process.env.SLAG_PLATFORM) === -1) {
  		throw new Error('This method is not support specified platform');
  	}
  	this.toRecipients = __SLAG__PROPERTY;
  };
  module.exports = function (properties) {
  	return new EmailDialog(properties);
  };