// This file was generated by modules-webmake (modules for web) project.
// See: https://github.com/medikoo/modules-webmake

(function (modules) {
	'use strict';

	var resolve, getRequire, wmRequire, notFoundError, findFile
	  , extensions = {".js":[],".json":[],".css":[],".html":[]}
	  , envRequire = typeof require === 'function' ? require : null;

	notFoundError = function (path) {
		var error = new Error("Could not find module '" + path + "'");
		error.code = 'MODULE_NOT_FOUND';
		return error;
	};
	findFile = function (scope, name, extName) {
		var i, ext;
		if (typeof scope[name + extName] === 'function') return name + extName;
		for (i = 0; (ext = extensions[extName][i]); ++i) {
			if (typeof scope[name + ext] === 'function') return name + ext;
		}
		return null;
	};
	resolve = function (scope, tree, path, fullPath, state, id) {
		var name, dir, exports, module, fn, found, ext;
		path = path.split('/');
		name = path.pop();
		if ((name === '.') || (name === '..')) {
			path.push(name);
			name = '';
		}
		while ((dir = path.shift()) != null) {
			if (!dir || (dir === '.')) continue;
			if (dir === '..') {
				scope = tree.pop();
				id = id.slice(0, id.lastIndexOf('/'));
			} else {
				tree.push(scope);
				scope = scope[dir];
				id += '/' + dir;
			}
			if (!scope) throw notFoundError(fullPath);
		}
		if (name && (typeof scope[name] !== 'function')) {
			found = findFile(scope, name, '.js');
			if (!found) found = findFile(scope, name, '.json');
			if (!found) found = findFile(scope, name, '.css');
			if (!found) found = findFile(scope, name, '.html');
			if (found) {
				name = found;
			} else if ((state !== 2) && (typeof scope[name] === 'object')) {
				tree.push(scope);
				scope = scope[name];
				id += '/' + name;
				name = '';
			}
		}
		if (!name) {
			if ((state !== 1) && scope[':mainpath:']) {
				return resolve(scope, tree, scope[':mainpath:'], fullPath, 1, id);
			}
			return resolve(scope, tree, 'index', fullPath, 2, id);
		}
		fn = scope[name];
		if (!fn) throw notFoundError(fullPath);
		if (fn.hasOwnProperty('module')) return fn.module.exports;
		exports = {};
		fn.module = module = { exports: exports, id: id + '/' + name };
		fn.call(exports, exports, module, getRequire(scope, tree, id));
		return module.exports;
	};
	wmRequire = function (scope, tree, fullPath, id) {
		var name, path = fullPath, t = fullPath.charAt(0), state = 0;
		if (t === '/') {
			path = path.slice(1);
			scope = modules['/'];
			if (!scope) {
				if (envRequire) return envRequire(fullPath);
				throw notFoundError(fullPath);
			}
			id = '/';
			tree = [];
		} else if (t !== '.') {
			name = path.split('/', 1)[0];
			scope = modules[name];
			if (!scope) {
				if (envRequire) return envRequire(fullPath);
				throw notFoundError(fullPath);
			}
			id = name;
			tree = [];
			path = path.slice(name.length + 1);
			if (!path) {
				path = scope[':mainpath:'];
				if (path) {
					state = 1;
				} else {
					path = 'index';
					state = 2;
				}
			}
		}
		return resolve(scope, tree, path, fullPath, state, id);
	};
	getRequire = function (scope, tree, id) {
		return function (path) {
			return wmRequire(scope, [].concat(tree), path, id);
		};
	};
	return getRequire(modules, [], '');
})({
	"workspace": {
		"tcb-bridge": {
			"assets": {
				"js": {
					"internal": {
						"_utils.js": function (exports, module, require) {
							eval("/**\n * Created by Ovidiu on 7/21/2017.\n */\n(function ( $ ) {\n\tmodule.exports = {\n\t\ttpl_ajax: function ( data, ajax_param, no_loader ) {\n\t\t\tvar params = {\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\turl: tve_ult_page_data.ajaxurl\n\t\t\t};\n\t\t\tif ( typeof no_loader === 'undefined' || ! no_loader ) {\n\t\t\t\tTVE.main.overlay();\n\t\t\t}\n\t\t\tdata.action = tve_ult_page_data.tpl_action;\n\t\t\tdata.design_id = data.design_id || tve_ult_page_data.design_id;\n\t\t\tdata.post_id = tve_ult_page_data.post_id;\n\t\t\tdata.security = tve_ult_page_data.security;\n\t\t\tparams.data = data;\n\n\t\t\tif ( ajax_param ) {\n\t\t\t\tfor ( var k in ajax_param ) {\n\t\t\t\t\tparams[k] = ajax_param[k];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn jQuery.ajax( params, data );\n\t\t},\n\t\t/**\n\t\t * actions related to a state\n\t\t * @param data\n\t\t * @param ajax_param\n\t\t * @returns {*}\n\t\t */\n\t\tstate_ajax: function ( data, ajax_param ) {\n\t\t\tvar params = {\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\turl: tve_ult_page_data.ajaxurl\n\t\t\t};\n\n\t\t\tdata.action = tve_ult_page_data.state_action;\n\t\t\tdata.design_id = data.design_id || tve_ult_page_data.design_id;\n\t\t\tdata.post_id = tve_ult_page_data.post_id;\n\t\t\tdata.security = tve_ult_page_data.security;\n\n\t\t\tparams.data = data;\n\n\t\t\tif ( ajax_param ) {\n\t\t\t\tfor ( var k in ajax_param ) {\n\t\t\t\t\tparams[k] = ajax_param[k];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn jQuery.ajax( params, data );\n\t\t},\n\t\tstateResponse: function ( response, self ) {\n\t\t\tif ( ! response || response.success === false ) {\n\t\t\t\tvar _msg = 'Something went wrong';\n\t\t\t\tif ( response && response.success === false ) {\n\t\t\t\t\t_msg += ': ' + response.message;\n\t\t\t\t}\n\t\t\t\tTVE.page_message( _msg, true );\n\t\t\t\tTVE.main.overlay( 'close' );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Insert response only if main page content is returned.\n\t\t\t */\n\t\t\tif ( response.main_page_content ) {\n\t\t\t\tself.insertResponse( response );\n\t\t\t}\n\n\t\t\tjQuery( '.design-states' ).replaceWith( response.state_bar );\n\n\t\t\tTVE.main.overlay( 'close' );\n\t\t},\n\t\tinsertResponse: function ( response ) {\n\t\t\tif ( ! response || response.success === false ) {\n\t\t\t\tTVE.page_message( 'Something went wrong' + (\n\t\t\t\t\t\tresponse && response.success === false ? ': ' + response.message : ''\n\t\t\t\t\t), true );\n\t\t\t\tsetTimeout( function () {\n\t\t\t\t\tTVE.main.overlay( 'close' );\n\t\t\t\t}, 1 );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * callback to be applied when all css files are loaded and available\n\t\t\t */\n\t\t\tfunction on_resources_loaded() {\n\t\t\t\t/**\n\t\t\t\t * javascript page data\n\t\t\t\t */\n\t\t\t\ttve_ult_page_data = jQuery.extend( tve_ult_page_data, response.tve_ult_page_data, true );\n\n\t\t\t\t/**\n\t\t\t\t * javascript params that need updating\n\t\t\t\t */\n\t\t\t\tTVE.CONST = jQuery.extend( TVE.CONST, response.tve_path_params, true );\n\n\t\t\t\tTVE.inner_$( '#tve-ult-editor-replace' ).replaceWith( response.main_page_content );\n\n\t\t\t\tTVE.Editor_Page.initEditorActions();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * browser-compliant way of accessing stylesheet rules\n\t\t\t */\n\t\t\tvar sheet, cssRules, _link = document.createElement( 'link' );\n\t\t\tif ( 'sheet' in _link ) {\n\t\t\t\tsheet = 'sheet';\n\t\t\t\tcssRules = 'cssRules';\n\t\t\t} else {\n\t\t\t\tsheet = 'styleSheet';\n\t\t\t\tcssRules = 'rules';\n\t\t\t}\n\n\t\t\t/** custom CSS */\n\t\t\tTVE.inner_$( '.tve_custom_style,.tve_user_custom_style' ).remove();\n\t\t\tTVE.CSS_Rule_Cache.clear();\n\t\t\tif ( response.custom_css && response.custom_css.length ) {\n\t\t\t\tTVE.inner_$( 'head' ).append( response.custom_css );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * checks if all the added CSS <link> elements are available (finished loading and applied)\n\t\t\t *\n\t\t\t * @param {jQuery} $jq_links collection of added <link> nodes\n\t\t\t * @param {Function} complete_callback\n\t\t\t */\n\t\t\tfunction check_loaded( $jq_links, complete_callback ) {\n\t\t\t\tvar all_loaded = true;\n\t\t\t\twindow.tvu_loaded_count = window.tvu_loaded_count || 1;\n\t\t\t\twindow.tvu_loaded_count ++;\n\t\t\t\t$jq_links.each( function () {\n\n\t\t\t\t\t/** firefox throws an Error when testing this condition and the css is not loaded yet */\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif ( ! this[sheet] || ! this[sheet][cssRules] || ! this[sheet][cssRules].length ) {\n\t\t\t\t\t\t\tall_loaded = false;\n\t\t\t\t\t\t\treturn false; // break the loop\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\tall_loaded = false;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tif ( all_loaded || window.tvu_loaded_count > 40 ) {\n\t\t\t\t\tcomplete_callback();\n\t\t\t\t} else {\n\t\t\t\t\tsetTimeout( function () {\n\t\t\t\t\t\tcheck_loaded( $jq_links, complete_callback );\n\t\t\t\t\t}, 500 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar found = false,\n\t\t\t\t$css_list = jQuery();\n\t\t\tTVE.inner_$.each( response.css, function ( _id, href ) {\n\t\t\t\tif ( ! TVE.inner_$( 'link#' + _id + '-css' ).length ) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tvar $link = TVE.inner_$( '<link />', {\n\t\t\t\t\t\trel: 'stylesheet',\n\t\t\t\t\t\ttype: 'text/css',\n\t\t\t\t\t\tid: _id + '-css',\n\t\t\t\t\t\thref: href\n\t\t\t\t\t} ).appendTo( 'head' );\n\t\t\t\t\t/* for some reason, <link>s from google fonts always have empty cssRules fields - we cannot be sure when those are loaded using the check_loaded function */\n\t\t\t\t\tif ( href.indexOf( 'fonts.googleapis' ) === - 1 ) {\n\t\t\t\t\t\t$css_list = $css_list.add( $link );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tif ( found ) {\n\t\t\t\tcheck_loaded( $css_list, on_resources_loaded );\n\t\t\t} else {\n\t\t\t\ton_resources_loaded()\n\t\t\t}\n\t\t}\n\t}\n})( jQuery );\n//# sourceURL=workspace/tcb-bridge/assets/js/internal/_utils.js");
						},
						"main.js": function (exports, module, require) {
							eval("/**\n * Created by Ovidiu on 7/21/2017.\n */\nvar TVE_Ult_Int = window.TVE_Ult_Int = TVE_Ult_Int || {};\n\n(function ( $ ) {\n\n\t/**\n\t * On TCB Main Ready\n\t */\n\t$( document ).on( 'tcb_main_ready', function () {\n\n\t\tTVE_Ult_Int.DesignTemplates = require( './modals/design-templates' );\n\t\tTVE_Ult_Int.DesignReset = require( './modals/design-reset' );\n\t\tTVE_Ult_Int.DesignSave = require( './modals/design-save' );\n\t\tTVE_Ult_Int.AddEditState = require( './modals/add-edit-state' );\n\n\t\tvar _states = require( './states' );\n\t\tTVE_Ult_Int.States = new _states( {\n\t\t\tel: jQuery( '#tu-form-states' )[0]\n\t\t} );\n\n\t\tTVE.add_filter( 'editor_loaded_callback', function () {\n\t\t\tTVE.main.sidebar_settings.tve_ult_choose_template = function () {\n\t\t\t\tvar designTemplatesModal = TVE_Ult_Int.DesignTemplates.get_instance( TVE.modal.get_element( 'design-templates' ) );\n\t\t\t\tdesignTemplatesModal.open( {\n\t\t\t\t\ttop: '15%',\n\t\t\t\t\tcss: {\n\t\t\t\t\t\twidth: '80%',\n\t\t\t\t\t\tleft: '10%'\n\t\t\t\t\t},\n\t\t\t\t\tdismissible: ( tve_ult_page_data.has_content )\n\t\t\t\t} );\n\t\t\t};\n\n\t\t\tTVE.main.sidebar_settings.tve_ult_save_template = function () {\n\t\t\t\tvar designSaveModal = TVE_Ult_Int.DesignSave.get_instance( TVE.modal.get_element( 'design-save' ) );\n\t\t\t\tdesignSaveModal.open( {\n\t\t\t\t\ttop: '20%'\n\t\t\t\t} );\n\t\t\t};\n\n\t\t\tTVE.main.sidebar_settings.tve_ult_reset_template = function () {\n\t\t\t\tvar designResetsModal = TVE_Ult_Int.DesignReset.get_instance( TVE.modal.get_element( 'design-reset' ) );\n\t\t\t\tdesignResetsModal.open( {\n\t\t\t\t\ttop: '20%'\n\t\t\t\t} );\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Open Template Chooser if the variation is empty\n\t\t\t */\n\t\t\tif ( ! tve_ult_page_data.has_content ) {\n\t\t\t\tTVE.main.sidebar_settings.tve_ult_choose_template();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Backwards Compatibility:\n\t\t\t * Adds thrv-inline-text class to countdown elements that doesn't have it on caption class\n\t\t\t */\n\t\t\tTVE.inner_$( '.thrv_countdown_timer .t-caption:not(.thrv-inline-text)' ).each( function () {\n\t\t\t\tjQuery( this ).addClass( 'thrv-inline-text' );\n\t\t\t} );\n\t\t} );\n\n\t} );\n})( jQuery );\n//# sourceURL=workspace/tcb-bridge/assets/js/internal/main.js");
						},
						"modals": {
							"add-edit-state.js": function (exports, module, require) {
								eval("/**\n * Created by Ovidiu on 7/25/2017.\n */\nvar _instance = null,\n\t_utils = require( '../_utils' );\n\nmodule.exports = TVE.modal.base.extend( {\n\tafter_initialize: function ( args ) {\n\t\tthis.$el.addClass( 'medium' );\n\t},\n\tbefore_open: function () {\n\t\tthis.$( 'input#tve-ult-state-name' ).val( '' );\n\t\tif ( this.state_id && this.state_name ) {\n\t\t\tthis.$( 'input#tve-ult-state-name' ).val( this.state_name );\n\t\t}\n\t},\n\tsave: function () {\n\t\tvar _name = this.$( 'input#tve-ult-state-name' ).val(),\n\t\t\tself = this;\n\n\t\tif ( _name && _name.length > 0 ) {\n\t\t\tTVE.main.overlay();\n\n\t\t\tTVE.Editor_Page.save( false, function () {\n\t\t\t\tif ( self.state_id && self.state_name ) {\n\t\t\t\t\t_utils.state_ajax( {\n\t\t\t\t\t\tcustom_action: 'edit_name',\n\t\t\t\t\t\tpost_title: _name,\n\t\t\t\t\t\tid: self.state_id\n\t\t\t\t\t} ).done( function ( response ) {\n\t\t\t\t\t\t_utils.stateResponse( response, _utils );\n\t\t\t\t\t\tself.close();\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\t_utils.state_ajax( {\n\t\t\t\t\t\tcustom_action: 'add',\n\t\t\t\t\t\tpost_title: _name\n\t\t\t\t\t} ).done( function ( response ) {\n\t\t\t\t\t\t_utils.stateResponse( response, _utils );\n\t\t\t\t\t\tself.close();\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tTVE.page_message( tve_ult_page_data.L.state_name_required, true, 5000 );\n\t\t}\n\t}\n}, {\n\t/**\n\t * \"Singleton\" implementation for modal instance\n\t *\n\t * @param el\n\t */\n\tget_instance: function ( el ) {\n\t\tif ( ! _instance ) {\n\t\t\t_instance = new TVE_Ult_Int.AddEditState( {\n\t\t\t\tel: el\n\t\t\t} );\n\t\t}\n\n\t\treturn _instance;\n\t}\n} );\n//# sourceURL=workspace/tcb-bridge/assets/js/internal/modals/add-edit-state.js");
							},
							"design-reset.js": function (exports, module, require) {
								eval("/**\n * Created by Ovidiu on 7/21/2017.\n */\nvar _instance = null,\n\t_utils = require( '../_utils' );\n\nmodule.exports = TVE.modal.base.extend( {\n\tafter_initialize: function () {\n\t\tthis.$el.addClass( 'medium' );\n\t},\n\treset: function () {\n\t\tvar self = this;\n\t\t_utils.tpl_ajax( {\n\t\t\tcustom: 'reset'\n\t\t} ).done( function ( response ) {\n\t\t\t_utils.insertResponse( response );\n\t\t\tself.close();\n\t\t\tTVE.main.overlay( 'close' );\n\t\t} );\n\t}\n}, {\n\t/**\n\t * \"Singleton\" implementation for modal instance\n\t *\n\t * @param el\n\t */\n\tget_instance: function ( el ) {\n\t\tif ( ! _instance ) {\n\t\t\t_instance = new TVE_Ult_Int.DesignReset( {\n\t\t\t\tel: el\n\t\t\t} );\n\t\t}\n\n\t\treturn _instance;\n\t}\n} );\n//# sourceURL=workspace/tcb-bridge/assets/js/internal/modals/design-reset.js");
							},
							"design-save.js": function (exports, module, require) {
								eval("/**\n * Created by Ovidiu on 7/21/2017.\n */\nvar _instance = null,\n\t_utils = require( '../_utils' );\n\nmodule.exports = TVE.modal.base.extend( {\n\tafter_initialize: function () {\n\t\tthis.$el.addClass( 'medium' );\n\t},\n\tsave: function () {\n\t\tvar _name = this.$( 'input#tve-template-name' ).val(),\n\t\t\tself = this;\n\n\t\tif ( _name && _name.length > 0 ) {\n\t\t\t_utils.tpl_ajax( {\n\t\t\t\tcustom: 'save',\n\t\t\t\tname: _name\n\t\t\t} ).done( function ( response ) {\n\t\t\t\tself.close();\n\t\t\t\tTVE.main.overlay( 'close' );\n\t\t\t} );\n\t\t} else {\n\t\t\tTVE.page_message( tve_ult_page_data.L.tpl_name_required, true, 5000 );\n\t\t}\n\t}\n}, {\n\t/**\n\t * \"Singleton\" implementation for modal instance\n\t *\n\t * @param el\n\t */\n\tget_instance: function ( el ) {\n\t\tif ( ! _instance ) {\n\t\t\t_instance = new TVE_Ult_Int.DesignSave( {\n\t\t\t\tel: el\n\t\t\t} );\n\t\t}\n\n\t\treturn _instance;\n\t}\n} );\n//# sourceURL=workspace/tcb-bridge/assets/js/internal/modals/design-save.js");
							},
							"design-templates.js": function (exports, module, require) {
								eval("/**\n * Created by Ovidiu on 7/21/2017.\n */\nvar _instance = null,\n\t_utils = require( '../_utils' );\n\nmodule.exports = TVE.modal.base.extend( {\n\tsaved_tpl_delete_confirmation: TVE.tpl( 'landing-pages/delete-confirmation' ),\n\tevents: function () {\n\t\treturn _.extend( {}, TVE.modal.base.prototype.events(), {\n\t\t\t'click .tcb-cancel-delete-template': 'no_delete_template',\n\t\t\t'click .tcb-apply-delete-template': 'yes_delete_template'\n\t\t} );\n\t},\n\tafter_initialize: function () {\n\t\tthis.$el.addClass( 'medium' );\n\t\tthis.$tabs = this.$( '.tab-item' );\n\t\tthis.$content = this.$( '.tve-tab-content' );\n\t},\n\ttab_click: function ( event ) {\n\t\tvar tab = event.currentTarget.getAttribute( 'data-content' );\n\n\t\tthis.$tabs.removeClass( 'active' );\n\t\tevent.currentTarget.classList.add( 'active' );\n\n\t\tthis.$content.removeClass( 'active' );\n\t\tthis.$content.filter( '[data-content=\"' + tab + '\"]' ).addClass( 'active' );\n\n\t\tif ( tab === 'saved' ) {\n\t\t\tthis.get_saved();\n\t\t}\n\t},\n\t/**\n\t * Returns the save templates preview\n\t */\n\tget_saved: function () {\n\t\tvar self = this;\n\t\tthis.$( '.tve-saved-templates-list' ).html( tve_ult_page_data.L.fetching_saved_templates );\n\n\t\t_utils.tpl_ajax( {\n\t\t\tcustom: 'get_saved'\n\t\t}, {\n\t\t\tdataType: 'html'\n\t\t}, true ).done( function ( response ) {\n\t\t\tTVE.main.overlay( 'close' );\n\t\t\tself.$( '.tve-saved-templates-list' ).html( response );\n\t\t} );\n\t},\n\tselect_template: function ( event ) {\n\t\tthis.$( '.template-wrapper.active' ).removeClass( 'active' );\n\t\tevent.currentTarget.classList.toggle( 'active' );\n\t},\n\n\t/**\n\t * Shows The Delete Confirmation View\n\t *\n\t * @param event\n\t */\n\tdelete_confirmation: function ( event ) {\n\t\tvar $templateItem = jQuery( event.currentTarget ).closest( '.tve-template-item' );\n\n\t\t$templateItem.find( '.template-wrapper' ).hide();\n\t\t$templateItem.append( this.saved_tpl_delete_confirmation() );\n\t},\n\n\t/**\n\t * Cancel A Delete Action And Returns to Default State\n\t *\n\t * @param event\n\t */\n\tno_delete_template: function ( event ) {\n\t\tvar $templateItem = jQuery( event.currentTarget ).closest( '.tve-template-item' );\n\t\t$templateItem.find( '.template-wrapper' ).show();\n\t\t$templateItem.find( '.tcb-delete-template-confirmation' ).remove();\n\t},\n\n\t/**\n\t * Deletes A Saved Landing Page\n\t *\n\t * @param event\n\t */\n\tyes_delete_template: function ( event ) {\n\t\tvar $templateItem = jQuery( event.currentTarget ).closest( '.tve-template-item' );\n\n\t\tTVE.main.overlay();\n\t\t_utils.tpl_ajax( {\n\t\t\tcustom: 'delete'\n\t\t}, {\n\t\t\tdataType: 'html'\n\t\t}, true ).done( function () {\n\t\t\t$templateItem.remove();\n\t\t\tTVE.main.overlay( 'close' );\n\t\t} );\n\t},\n\tsave: function () {\n\t\tvar $template = this.$( '.tve-template-item .active' ),\n\t\t\tself = this;\n\t\tif ( $template && $template.length ) {\n\n\t\t\t_utils.tpl_ajax( {\n\t\t\t\tcustom: 'choose',\n\t\t\t\ttpl: $template.data( 'key' )\n\t\t\t} ).done( function ( response ) {\n\t\t\t\t_utils.insertResponse( response );\n\n\t\t\t\tTVE.main.overlay( 'close' );\n\t\t\t\tself.close();\n\t\t\t} );\n\n\t\t} else {\n\t\t\tTVE.page_message( TVE.t.SelectTemplate, true, 5000 );\n\t\t}\n\t}\n}, {\n\t/**\n\t * \"Singleton\" implementation for modal instance\n\t *\n\t * @param el\n\t */\n\tget_instance: function ( el ) {\n\t\tif ( ! _instance ) {\n\t\t\t_instance = new TVE_Ult_Int.DesignTemplates( {\n\t\t\t\tel: el\n\t\t\t} );\n\t\t}\n\n\t\treturn _instance;\n\t}\n} );\n//# sourceURL=workspace/tcb-bridge/assets/js/internal/modals/design-templates.js");
							}
						},
						"states.js": function (exports, module, require) {
							eval("/**\n * Created by Ovidiu on 7/25/2017.\n */\nvar _utils = require( './_utils' );\n\nmodule.exports = TVE.Views.Base.base_view.extend( {\n\tafter_initialize: function () {\n\t\tthis.dom = {\n\t\t\tbtn: this.$( '.states-button-container' )\n\t\t};\n\t},\n\texpand: function () {\n\t\tthis.$( '.design-states' ).show();\n\t\tthis.dom.btn.hide();\n\t},\n\tcollapse: function () {\n\t\tthis.$( '.design-states' ).hide();\n\t\tthis.dom.btn.show();\n\t},\n\t/**\n\t * Add a new state\n\t *\n\t * @param e\n\t */\n\tadd: function ( e ) {\n\t\tthis.collapse();\n\n\t\tvar addEditStateModal = TVE_Ult_Int.AddEditState.get_instance( TVE.modal.get_element( 'add-edit-state' ) );\n\t\taddEditStateModal.state_name = null;\n\t\taddEditStateModal.state_id = null;\n\t\taddEditStateModal.open( {\n\t\t\ttop: '20%'\n\t\t} );\n\n\t\treturn false;\n\t},\n\t/**\n\t * Edit a state name\n\t *\n\t * @param e\n\t */\n\tedit: function ( e ) {\n\t\tthis.collapse();\n\n\t\tvar addEditStateModal = TVE_Ult_Int.AddEditState.get_instance( TVE.modal.get_element( 'add-edit-state' ) );\n\t\taddEditStateModal.state_name = e.currentTarget.getAttribute( 'data-state-name' );\n\t\taddEditStateModal.state_id = e.currentTarget.getAttribute( 'data-id' );\n\t\taddEditStateModal.open( {\n\t\t\ttop: '20%'\n\t\t} );\n\n\t\treturn false;\n\t},\n\tselect: function ( e ) {\n\t\tthis.collapse();\n\n\t\tTVE.main.overlay();\n\t\tTVE.Editor_Page.save( false, function () {\n\t\t\t_utils.state_ajax( {\n\t\t\t\tcustom_action: 'display',\n\t\t\t\tid: e.currentTarget.getAttribute( 'data-id' )\n\t\t\t} ).done( function ( response ) {\n\t\t\t\t_utils.stateResponse( response, _utils )\n\t\t\t} );\n\t\t} );\n\n\t\treturn false;\n\t},\n\tduplicate: function ( e, link ) {\n\t\tthis.collapse();\n\n\t\tTVE.main.overlay();\n\t\tTVE.Editor_Page.save( false, function () {\n\t\t\t_utils.state_ajax( {\n\t\t\t\tcustom_action: 'duplicate',\n\t\t\t\tid: link.getAttribute( 'data-id' )\n\t\t\t} ).done( function ( response ) {\n\t\t\t\t_utils.stateResponse( response, _utils )\n\t\t\t} );\n\t\t} );\n\n\t\treturn false;\n\t},\n\tremove: function ( e, link ) {\n\t\tthis.collapse();\n\n\t\tTVE.main.overlay();\n\t\t_utils.state_ajax( {\n\t\t\tcustom_action: 'delete',\n\t\t\tid: link.getAttribute( 'data-id' )\n\t\t} ).done( function ( response ) {\n\t\t\tTVE.page_message( 'State Deleted' );\n\t\t\t_utils.stateResponse( response, _utils );\n\t\t} );\n\n\t\treturn false;\n\t}\n} );\n//# sourceURL=workspace/tcb-bridge/assets/js/internal/states.js");
						}
					}
				}
			}
		}
	}
})("workspace/tcb-bridge/assets/js/internal/main");
