Version Description
- 07. August 2017. =
- Feature: Column count is not limited anymore
- Feature: Post generator post meta variables
- Feature: WordPress text widget's shortcode will be replaced, even if your theme doesn't replace it
- Feature: WordPress twenty-seventeen theme better compatibility on specific positions
- Feature: AJAX can load the slider in most cases
- Feature: Lots of optimization to make the editing smoother and the loading faster
- Feature: Elementor 1.6.x compatibility
- Feature: Stability and speed improvements
- Feature: Visual Composer Ultimate Layouts compatibility
- Feature: Disable Font Awesome icons if you load your own library.
- Fix: jQuery 3.x fixes
- Fix: Dynamic slide Static save
- Fix: Delayed (for lightbox/tabs) compatibility fix with new tab plugins
Download this release
Release Info
Developer | nextendweb |
Plugin | Smart Slider 3 |
Version | 3.2.5 |
Comparing to | |
See all releases |
Code changes from version 3.2.4 to 3.2.5
- editor/shortcode.php +0 -3
- includes/integrations/BeaverBuilder.php +10 -6
- includes/integrations/Divi.php +16 -7
- includes/integrations/Elementor.php +48 -34
- includes/integrations/VisualComposer.php +7 -3
- includes/integrations/tailor.php +1 -1
- includes/shortcode.php +37 -16
- includes/smartslider3.php +34 -13
- includes/widget.php +3 -0
- library/media/admin/dist/smartslider-backend.css +15 -5
- library/media/admin/dist/smartslider-backend.min.css +1 -1
- library/media/dist/smartslider-backend.js +477 -633
- library/media/dist/smartslider-backend.min.js +9 -9
- library/media/dist/smartslider-frontend.js +1211 -1240
- library/media/dist/smartslider-frontend.min.js +3 -4
editor/shortcode.php
CHANGED
@@ -55,9 +55,6 @@ class N2SSShortcodeInsert {
|
|
55 |
'addButtonDialog'
|
56 |
));
|
57 |
|
58 |
-
wp_enqueue_script('jquery-ui-dialog');
|
59 |
-
wp_enqueue_style("wp-jquery-ui-dialog");
|
60 |
-
|
61 |
$added = true;
|
62 |
}
|
63 |
}
|
55 |
'addButtonDialog'
|
56 |
));
|
57 |
|
|
|
|
|
|
|
58 |
$added = true;
|
59 |
}
|
60 |
}
|
includes/integrations/BeaverBuilder.php
CHANGED
@@ -3,15 +3,19 @@ if (!defined('ABSPATH')) {
|
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
add_action('fl_builder_editing_enabled', "N2SSShortcodeInsert::addForcedFrontend");
|
8 |
|
9 |
|
10 |
-
add_action('fl_ajax_before_render_new_module', '
|
11 |
-
add_action('fl_ajax_before_render_layout', '
|
12 |
-
add_action('fl_ajax_before_render_module_settings', '
|
13 |
-
add_action('fl_ajax_before_save_settings', '
|
14 |
-
add_action('fl_ajax_before_copy_module', '
|
15 |
|
16 |
/**
|
17 |
* Custom modules
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
6 |
+
function n2_fl_builder_force_iframe() {
|
7 |
+
N2SS3Shortcode::forceIframe('beaverbuilder');
|
8 |
+
}
|
9 |
+
|
10 |
+
add_action('fl_builder_editing_enabled', 'n2_fl_builder_force_iframe');
|
11 |
add_action('fl_builder_editing_enabled', "N2SSShortcodeInsert::addForcedFrontend");
|
12 |
|
13 |
|
14 |
+
add_action('fl_ajax_before_render_new_module', 'n2_fl_builder_force_iframe');
|
15 |
+
add_action('fl_ajax_before_render_layout', 'n2_fl_builder_force_iframe');
|
16 |
+
add_action('fl_ajax_before_render_module_settings', 'n2_fl_builder_force_iframe');
|
17 |
+
add_action('fl_ajax_before_save_settings', 'n2_fl_builder_force_iframe');
|
18 |
+
add_action('fl_ajax_before_copy_module', 'n2_fl_builder_force_iframe');
|
19 |
|
20 |
/**
|
21 |
* Custom modules
|
includes/integrations/Divi.php
CHANGED
@@ -12,8 +12,8 @@ function Nextend_ET_Builder_Module_Smart_Slider_Field() {
|
|
12 |
class Nextend_ET_Builder_Module_Smart_Slider extends ET_Builder_Module {
|
13 |
|
14 |
function init() {
|
15 |
-
$this->name
|
16 |
-
$this->slug
|
17 |
$this->whitelisted_fields = array(
|
18 |
'admin_label'
|
19 |
);
|
@@ -47,7 +47,7 @@ class Nextend_ET_Builder_Module_Smart_Slider extends ET_Builder_Module {
|
|
47 |
|
48 |
function get_fields() {
|
49 |
$fields = array(
|
50 |
-
'slider'
|
51 |
'label' => 'Slider',
|
52 |
'option_category' => 'basic_option',
|
53 |
'type' => 'text',
|
@@ -55,9 +55,9 @@ class Nextend_ET_Builder_Module_Smart_Slider extends ET_Builder_Module {
|
|
55 |
'renderer_with_field' => true
|
56 |
),
|
57 |
'admin_label' => array(
|
58 |
-
'label' => esc_html__(
|
59 |
'type' => 'text',
|
60 |
-
'description' => esc_html__(
|
61 |
'toggle_slug' => 'admin_label',
|
62 |
)
|
63 |
);
|
@@ -93,11 +93,20 @@ function Nextend_et_builder_get_child_modules_fix($child_modules) {
|
|
93 |
|
94 |
add_filter('et_builder_get_child_modules', 'Nextend_et_builder_get_child_modules_fix');
|
95 |
|
|
|
|
|
|
|
|
|
|
|
96 |
if (function_exists('et_fb_is_enabled') && et_fb_is_enabled()) {
|
97 |
-
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
|
100 |
-
add_action('wp_ajax_et_fb_retrieve_builder_data', '
|
101 |
|
102 |
new Nextend_ET_Builder_Module_Smart_Slider;
|
103 |
new Nextend_ET_Builder_Module_Smart_Slider_Fullwidth;
|
12 |
class Nextend_ET_Builder_Module_Smart_Slider extends ET_Builder_Module {
|
13 |
|
14 |
function init() {
|
15 |
+
$this->name = 'Smart Slider 3';
|
16 |
+
$this->slug = 'et_pb_nextend_smart_slider_3';
|
17 |
$this->whitelisted_fields = array(
|
18 |
'admin_label'
|
19 |
);
|
47 |
|
48 |
function get_fields() {
|
49 |
$fields = array(
|
50 |
+
'slider' => array(
|
51 |
'label' => 'Slider',
|
52 |
'option_category' => 'basic_option',
|
53 |
'type' => 'text',
|
55 |
'renderer_with_field' => true
|
56 |
),
|
57 |
'admin_label' => array(
|
58 |
+
'label' => esc_html__('Admin Label', 'et_builder'),
|
59 |
'type' => 'text',
|
60 |
+
'description' => esc_html__('This will change the label of the module in the builder for easy identification.', 'et_builder'),
|
61 |
'toggle_slug' => 'admin_label',
|
62 |
)
|
63 |
);
|
93 |
|
94 |
add_filter('et_builder_get_child_modules', 'Nextend_et_builder_get_child_modules_fix');
|
95 |
|
96 |
+
|
97 |
+
function n2_divi_force_iframe() {
|
98 |
+
N2SS3Shortcode::forceIframe('divi');
|
99 |
+
}
|
100 |
+
|
101 |
if (function_exists('et_fb_is_enabled') && et_fb_is_enabled()) {
|
102 |
+
n2_divi_force_iframe();
|
103 |
+
}
|
104 |
+
|
105 |
+
if (function_exists('is_et_pb_preview') && is_et_pb_preview()) {
|
106 |
+
n2_divi_force_iframe();
|
107 |
}
|
108 |
|
109 |
+
add_action('wp_ajax_et_fb_retrieve_builder_data', 'n2_divi_force_iframe', 9);
|
110 |
|
111 |
new Nextend_ET_Builder_Module_Smart_Slider;
|
112 |
new Nextend_ET_Builder_Module_Smart_Slider_Fullwidth;
|
includes/integrations/Elementor.php
CHANGED
@@ -5,14 +5,29 @@ if (!defined('ABSPATH')) {
|
|
5 |
exit; // Exit if accessed directly
|
6 |
}
|
7 |
|
|
|
|
|
|
|
|
|
8 |
add_action('template_redirect', function () {
|
9 |
if (\Elementor\Plugin::instance()->editor->is_edit_mode() || \Elementor\Plugin::instance()->preview->is_preview_mode()) {
|
10 |
-
|
11 |
}
|
12 |
}, -1);
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
-
add_action('wp_ajax_elementor_render_widget', 'N2SS3Shortcode::forceIframe', -1);
|
16 |
add_action('elementor/editor/before_enqueue_scripts', 'N2SSShortcodeInsert::addForcedFrontend');
|
17 |
|
18 |
add_action('elementor/widgets/widgets_registered', function () {
|
@@ -37,19 +52,15 @@ class Nextend_Widget_SmartSlider extends \Elementor\Widget_Base {
|
|
37 |
|
38 |
protected function _register_controls() {
|
39 |
|
40 |
-
$this->start_controls_section('
|
41 |
'label' => esc_html('Smart Slider'),
|
42 |
]);
|
43 |
|
44 |
-
NextendRegisterControlSmartSliderField();
|
45 |
-
\Elementor\Plugin::instance()->controls_manager->register_control('smartsliderfield', new Control_SmartSliderField());
|
46 |
-
|
47 |
-
|
48 |
$this->add_control('smartsliderid', [
|
49 |
'label' => 'Slider ID',
|
50 |
'type' => 'smartsliderfield',
|
51 |
'default' => '',
|
52 |
-
'title' =>
|
53 |
]);
|
54 |
|
55 |
$this->end_controls_section();
|
@@ -74,47 +85,50 @@ class Nextend_Widget_SmartSlider extends \Elementor\Widget_Base {
|
|
74 |
|
75 |
}
|
76 |
|
77 |
-
function NextendRegisterControlSmartSliderField() {
|
78 |
-
static $registered;
|
79 |
-
if (!$registered) {
|
80 |
-
if (class_exists('\Elementor\Base_Data_Control')) {
|
81 |
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
84 |
|
85 |
-
class_alias('\Elementor\Control_Base', '\Elementor\NextendElementorFieldAbstract');
|
86 |
}
|
|
|
87 |
|
88 |
-
|
89 |
|
90 |
-
|
|
|
91 |
|
92 |
-
|
93 |
-
return 'smartsliderfield';
|
94 |
-
}
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
<label class="elementor-control-title">{{{ data.label }}}</label>
|
100 |
<div class="elementor-control-input-wrapper">
|
101 |
<a style="margin-bottom:10px;" href="#" onclick="return NextendSmartSliderSelectModal(jQuery(this).siblings('input'));" class="button button-primary elementor-button elementor-button-smartslider" title="Select slider">Select slider</a>
|
102 |
<input type="{{ data.input_type }}" title="{{ data.title }}" data-setting="{{ data.name }}""/>
|
103 |
</div>
|
104 |
</div>
|
105 |
-
|
106 |
<div class="elementor-control-field-description">{{{ data.description }}}</div>
|
107 |
<# } #>
|
108 |
-
|
109 |
-
}
|
110 |
-
|
111 |
-
public function get_default_settings() {
|
112 |
-
return [
|
113 |
-
'input_type' => 'text',
|
114 |
-
];
|
115 |
-
}
|
116 |
}
|
117 |
|
118 |
-
|
|
|
|
|
|
|
|
|
119 |
}
|
120 |
-
|
|
|
|
5 |
exit; // Exit if accessed directly
|
6 |
}
|
7 |
|
8 |
+
function n2_elementor_force_iframe() {
|
9 |
+
\N2SS3Shortcode::forceIframe('elementor');
|
10 |
+
}
|
11 |
+
|
12 |
add_action('template_redirect', function () {
|
13 |
if (\Elementor\Plugin::instance()->editor->is_edit_mode() || \Elementor\Plugin::instance()->preview->is_preview_mode()) {
|
14 |
+
n2_elementor_force_iframe();
|
15 |
}
|
16 |
}, -1);
|
17 |
|
18 |
+
add_action('admin_action_elementor', function () {
|
19 |
+
n2_elementor_force_iframe();
|
20 |
+
}, -10000);
|
21 |
+
|
22 |
+
add_action('wp_ajax_elementor_render_widget', '\Elementor\n2_elementor_force_iframe', -1);
|
23 |
+
|
24 |
+
|
25 |
+
add_action('elementor/editor/before_enqueue_styles', function () {
|
26 |
+
wp_register_style('smart-slider-editor', plugin_dir_url(NEXTEND_SMARTSLIDER_3__FILE__) . 'editor/editor.min.css', array(), '3.22', 'screen');
|
27 |
+
|
28 |
+
wp_enqueue_style('smart-slider-editor');
|
29 |
+
});
|
30 |
|
|
|
31 |
add_action('elementor/editor/before_enqueue_scripts', 'N2SSShortcodeInsert::addForcedFrontend');
|
32 |
|
33 |
add_action('elementor/widgets/widgets_registered', function () {
|
52 |
|
53 |
protected function _register_controls() {
|
54 |
|
55 |
+
$this->start_controls_section('section_smart_slider_elementor', [
|
56 |
'label' => esc_html('Smart Slider'),
|
57 |
]);
|
58 |
|
|
|
|
|
|
|
|
|
59 |
$this->add_control('smartsliderid', [
|
60 |
'label' => 'Slider ID',
|
61 |
'type' => 'smartsliderfield',
|
62 |
'default' => '',
|
63 |
+
'title' => 'Slider ID',
|
64 |
]);
|
65 |
|
66 |
$this->end_controls_section();
|
85 |
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
88 |
|
89 |
+
add_action('elementor/controls/controls_registered', function ($controls_manager) {
|
90 |
+
|
91 |
+
if (class_exists('\Elementor\Base_Data_Control')) {
|
92 |
+
|
93 |
+
abstract class NextendElementorFieldAbstract extends Base_Data_Control {
|
94 |
|
|
|
95 |
}
|
96 |
+
} else {
|
97 |
|
98 |
+
abstract class NextendElementorFieldAbstract extends Control_Base {
|
99 |
|
100 |
+
}
|
101 |
+
}
|
102 |
|
103 |
+
class_exists('\Elementor\Group_Control_Background');
|
|
|
|
|
104 |
|
105 |
+
class Control_SmartSliderField extends \Elementor\NextendElementorFieldAbstract {
|
106 |
+
|
107 |
+
public function get_type() {
|
108 |
+
return 'smartsliderfield';
|
109 |
+
}
|
110 |
+
|
111 |
+
public function content_template() {
|
112 |
+
?>
|
113 |
+
<div class="elementor-control-field">
|
114 |
<label class="elementor-control-title">{{{ data.label }}}</label>
|
115 |
<div class="elementor-control-input-wrapper">
|
116 |
<a style="margin-bottom:10px;" href="#" onclick="return NextendSmartSliderSelectModal(jQuery(this).siblings('input'));" class="button button-primary elementor-button elementor-button-smartslider" title="Select slider">Select slider</a>
|
117 |
<input type="{{ data.input_type }}" title="{{ data.title }}" data-setting="{{ data.name }}""/>
|
118 |
</div>
|
119 |
</div>
|
120 |
+
<# if ( data.description ) { #>
|
121 |
<div class="elementor-control-field-description">{{{ data.description }}}</div>
|
122 |
<# } #>
|
123 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
125 |
|
126 |
+
public function get_default_settings() {
|
127 |
+
return [
|
128 |
+
'input_type' => 'text',
|
129 |
+
];
|
130 |
+
}
|
131 |
}
|
132 |
+
|
133 |
+
$controls_manager->register_control('smartsliderfield', new Control_SmartSliderField());
|
134 |
+
});
|
includes/integrations/VisualComposer.php
CHANGED
@@ -3,14 +3,18 @@ if (!defined('ABSPATH')) {
|
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
|
|
|
|
|
|
|
|
6 |
class NextendSmartSlider3VisualComposer {
|
7 |
|
8 |
public static function init() {
|
9 |
self::vc_add_element();
|
10 |
|
11 |
-
add_action('vc_frontend_editor_render', '
|
12 |
-
add_action('vc_front_load_page_', '
|
13 |
-
add_action('vc_load_shortcode', '
|
14 |
}
|
15 |
|
16 |
public static function vc_add_element() {
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
6 |
+
function n2_visualcomposer_force_iframe() {
|
7 |
+
N2SS3Shortcode::forceIframe('visualcomposer');
|
8 |
+
}
|
9 |
+
|
10 |
class NextendSmartSlider3VisualComposer {
|
11 |
|
12 |
public static function init() {
|
13 |
self::vc_add_element();
|
14 |
|
15 |
+
add_action('vc_frontend_editor_render', 'n2_visualcomposer_force_iframe');
|
16 |
+
add_action('vc_front_load_page_', 'n2_visualcomposer_force_iframe');
|
17 |
+
add_action('vc_load_shortcode', 'n2_visualcomposer_force_iframe');
|
18 |
}
|
19 |
|
20 |
public static function vc_add_element() {
|
includes/integrations/tailor.php
CHANGED
@@ -5,5 +5,5 @@ if (!defined('ABSPATH')) {
|
|
5 |
}
|
6 |
|
7 |
add_action('wp_ajax_tailor_render', function () {
|
8 |
-
\N2SS3Shortcode::forceIframe();
|
9 |
}, -1);
|
5 |
}
|
6 |
|
7 |
add_action('wp_ajax_tailor_render', function () {
|
8 |
+
\N2SS3Shortcode::forceIframe('tailor');
|
9 |
}, -1);
|
includes/shortcode.php
CHANGED
@@ -4,8 +4,11 @@ class N2SS3Shortcode {
|
|
4 |
|
5 |
public static $iframe = false;
|
6 |
|
7 |
-
public static
|
8 |
-
|
|
|
|
|
|
|
9 |
}
|
10 |
|
11 |
public static function doShortcode($parameters) {
|
@@ -22,8 +25,7 @@ class N2SS3Shortcode {
|
|
22 |
|
23 |
public static function renderIframe($sliderID) {
|
24 |
|
25 |
-
$
|
26 |
-
if(typeof window.n2SSIframeLoader != "function"){
|
27 |
(function($){
|
28 |
var frames = [],
|
29 |
clientHeight = 0;
|
@@ -97,22 +99,41 @@ if(typeof window.n2SSIframeLoader != "function"){
|
|
97 |
frames.push(iframe);
|
98 |
}
|
99 |
})(jQuery);
|
100 |
-
}
|
101 |
-
|
102 |
-
|
103 |
-
return N2HTML::tag('iframe', array(
|
104 |
-
'onload' => str_replace(array(
|
105 |
-
"\n",
|
106 |
-
"\r",
|
107 |
-
"\r\n"
|
108 |
-
), "", $onload),
|
109 |
'class' => "n2-ss-slider-frame",
|
110 |
'style' => 'width:100%',
|
111 |
'frameborder' => 0,
|
112 |
-
'src' => site_url() . '?n2prerender=1&n2app=smartslider&n2controller=slider&n2action=iframe&sliderid=' . $sliderID
|
113 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
-
return
|
116 |
}
|
117 |
|
118 |
public static function render($parameters, $usage = 'WordPress Shortcode') {
|
4 |
|
5 |
public static $iframe = false;
|
6 |
|
7 |
+
public static $iframeReason = '';
|
8 |
+
|
9 |
+
public static function forceIframe($reason) {
|
10 |
+
self::$iframe = true;
|
11 |
+
self::$iframeReason = $reason;
|
12 |
}
|
13 |
|
14 |
public static function doShortcode($parameters) {
|
25 |
|
26 |
public static function renderIframe($sliderID) {
|
27 |
|
28 |
+
$script = 'if(typeof window.n2SSIframeLoader != "function"){
|
|
|
29 |
(function($){
|
30 |
var frames = [],
|
31 |
clientHeight = 0;
|
99 |
frames.push(iframe);
|
100 |
}
|
101 |
})(jQuery);
|
102 |
+
}';
|
103 |
+
|
104 |
+
$attributes = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
'class' => "n2-ss-slider-frame",
|
106 |
'style' => 'width:100%',
|
107 |
'frameborder' => 0,
|
108 |
+
'src' => site_url() . '?n2prerender=1&n2app=smartslider&n2controller=slider&n2action=iframe&sliderid=' . $sliderID . '&hash=' . md5($sliderID . NONCE_SALT)
|
109 |
+
);
|
110 |
+
$html = '';
|
111 |
+
|
112 |
+
switch (self::$iframeReason) {
|
113 |
+
case 'divi':
|
114 |
+
$attributes['onload'] = str_replace(array(
|
115 |
+
"\n",
|
116 |
+
"\r",
|
117 |
+
"\r\n",
|
118 |
+
'"',
|
119 |
+
), array(
|
120 |
+
"",
|
121 |
+
"",
|
122 |
+
"",
|
123 |
+
"'"
|
124 |
+
), $script) . 'n2SSIframeLoader(this);';
|
125 |
+
break;
|
126 |
+
case 'visualcomposer':
|
127 |
+
default:
|
128 |
+
$attributes['onload'] = str_replace(array(
|
129 |
+
"\n",
|
130 |
+
"\r",
|
131 |
+
"\r\n"
|
132 |
+
), "", $script) . 'n2SSIframeLoader(this);';
|
133 |
+
break;
|
134 |
+
}
|
135 |
|
136 |
+
return $html . N2HTML::tag('iframe', $attributes);
|
137 |
}
|
138 |
|
139 |
public static function render($parameters, $usage = 'WordPress Shortcode') {
|
includes/smartslider3.php
CHANGED
@@ -52,6 +52,10 @@ class SmartSlider3 {
|
|
52 |
if (class_exists('MPCEShortcode', false)) {
|
53 |
SmartSlider3::motoPressCE();
|
54 |
}
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
public static function unyson_extension($locations) {
|
@@ -88,19 +92,36 @@ class SmartSlider3 {
|
|
88 |
}
|
89 |
|
90 |
public static function preRender() {
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
}
|
105 |
}
|
106 |
}
|
52 |
if (class_exists('MPCEShortcode', false)) {
|
53 |
SmartSlider3::motoPressCE();
|
54 |
}
|
55 |
+
|
56 |
+
if (isset($_GET['pswLoad']) && $_GET['pswLoad'] == 1 || isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
|
57 |
+
N2SS3Shortcode::forceIframe('psw');
|
58 |
+
}
|
59 |
}
|
60 |
|
61 |
public static function unyson_extension($locations) {
|
92 |
}
|
93 |
|
94 |
public static function preRender() {
|
95 |
+
|
96 |
+
if (isset($_GET['n2prerender']) && isset($_GET['n2app'])) {
|
97 |
+
if (current_user_can('smartslider')) {
|
98 |
+
try {
|
99 |
+
N2Base::getApplication($_GET['n2app'])
|
100 |
+
->getApplicationType(N2Platform::$isAdmin ? 'backend' : 'frontend')
|
101 |
+
->setCurrent()
|
102 |
+
->render(array(
|
103 |
+
"prerender" => true,
|
104 |
+
"controller" => $_GET['n2controller'],
|
105 |
+
"action" => $_GET['n2action']
|
106 |
+
));
|
107 |
+
n2_exit(true);
|
108 |
+
} catch (Exception $e) {
|
109 |
+
exit;
|
110 |
+
}
|
111 |
+
} else if (isset($_GET['sliderid']) && isset($_GET['hash']) && md5($_GET['sliderid'] . NONCE_SALT) == $_GET['hash']) {
|
112 |
+
try {
|
113 |
+
N2Base::getApplication('smartslider')
|
114 |
+
->getApplicationType('frontend')
|
115 |
+
->setCurrent()
|
116 |
+
->render(array(
|
117 |
+
"prerender" => true,
|
118 |
+
"controller" => 'slider',
|
119 |
+
"action" => 'iframe'
|
120 |
+
));
|
121 |
+
n2_exit(true);
|
122 |
+
} catch (Exception $e) {
|
123 |
+
exit;
|
124 |
+
}
|
125 |
}
|
126 |
}
|
127 |
}
|
includes/widget.php
CHANGED
@@ -20,6 +20,9 @@ class N2SS3Widget extends WP_Widget {
|
|
20 |
$this,
|
21 |
'notPreventRender'
|
22 |
), 10000000000);
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
public static function register_widget() {
|
20 |
$this,
|
21 |
'notPreventRender'
|
22 |
), 10000000000);
|
23 |
+
|
24 |
+
// Enable shortcodes for text widgets
|
25 |
+
add_filter( 'widget_text', 'do_shortcode' );
|
26 |
}
|
27 |
|
28 |
public static function register_widget() {
|
library/media/admin/dist/smartslider-backend.css
CHANGED
@@ -5,8 +5,13 @@
|
|
5 |
display: none;
|
6 |
}
|
7 |
|
8 |
-
#html-body #anchor-content {
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
10 |
}
|
11 |
|
12 |
.unselectable {
|
@@ -563,6 +568,8 @@ html[data-slides='0'] .n2-ss-create-static-slide {
|
|
563 |
box-sizing: border-box;
|
564 |
padding: 90px 60px 0;
|
565 |
line-height: 12px;
|
|
|
|
|
566 |
}
|
567 |
|
568 |
html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-drag-images,
|
@@ -1616,7 +1623,7 @@ html[dir=rtl] .n2-ss-small-more {
|
|
1616 |
margin: 5px;
|
1617 |
background-color: #6b7986;
|
1618 |
color: #ffffff;
|
1619 |
-
line-height:
|
1620 |
cursor: pointer;
|
1621 |
text-align: center;
|
1622 |
|
@@ -1625,8 +1632,10 @@ html[dir=rtl] .n2-ss-small-more {
|
|
1625 |
border-radius: 3px;
|
1626 |
|
1627 |
width: 90px;
|
1628 |
-
height:
|
1629 |
z-index: 1000;
|
|
|
|
|
1630 |
}
|
1631 |
|
1632 |
.n2-ss-core-item:before {
|
@@ -1635,7 +1644,8 @@ html[dir=rtl] .n2-ss-small-more {
|
|
1635 |
content: "\e943";
|
1636 |
display: block;
|
1637 |
line-height: 32px;
|
1638 |
-
margin-top:
|
|
|
1639 |
}
|
1640 |
|
1641 |
.n2-ss-core-item[data-item="heading"]:before {
|
5 |
display: none;
|
6 |
}
|
7 |
|
8 |
+
#html-body #anchor-content #n2-admin {
|
9 |
+
mragin-top: 30px;
|
10 |
+
}
|
11 |
+
|
12 |
+
#html-body .header {
|
13 |
+
position: relative;
|
14 |
+
z-index: 1100;
|
15 |
}
|
16 |
|
17 |
.unselectable {
|
568 |
box-sizing: border-box;
|
569 |
padding: 90px 60px 0;
|
570 |
line-height: 12px;
|
571 |
+
border: 2px dashed #b2bfc9;
|
572 |
+
box-shadow: none;
|
573 |
}
|
574 |
|
575 |
html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-drag-images,
|
1623 |
margin: 5px;
|
1624 |
background-color: #6b7986;
|
1625 |
color: #ffffff;
|
1626 |
+
line-height: 15px;
|
1627 |
cursor: pointer;
|
1628 |
text-align: center;
|
1629 |
|
1632 |
border-radius: 3px;
|
1633 |
|
1634 |
width: 90px;
|
1635 |
+
min-height: 73px;
|
1636 |
z-index: 1000;
|
1637 |
+
vertical-align: top;
|
1638 |
+
padding-bottom: 5px;
|
1639 |
}
|
1640 |
|
1641 |
.n2-ss-core-item:before {
|
1644 |
content: "\e943";
|
1645 |
display: block;
|
1646 |
line-height: 32px;
|
1647 |
+
margin-top: 16px;
|
1648 |
+
margin-bottom: 3px;
|
1649 |
}
|
1650 |
|
1651 |
.n2-ss-core-item[data-item="heading"]:before {
|
library/media/admin/dist/smartslider-backend.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#html-body header,.adminhtml-smartslider3-index #footer,.adminhtml-smartslider3-index .footer,.smartslider3-index-index footer{display:none}#html-body #anchor-content{padding-top:30px}.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;user-select:none}.n2-definition-list dt.n2-ss-slider-ordering{color:#fff;background-color:#212d3a;border:0}.n2-definition-list dt.n2-ss-slider-ordering>div{padding:0 30px}.n2-definition-list .n2-ss-slider-ordering .n2-button{min-width:28px;line-height:28px;height:28px;margin-left:10px;background-color:#54667b;color:#fff}.n2-definition-list .n2-ss-slider-ordering .n2-button.n2-active{background:#0c92df}.n2-definition-list dt.n2-ss-slider-ordering .n2-actions{background-color:#212d3a;padding-top:16px}.n2-definition-list .n2-ss-slider-ordering>.n2-actions a{display:inline-block;padding:0}.n2-definition-list .n2-ss-slider-ordering>.n2-actions .n2-i{vertical-align:top}.n2-ss-slide2-list li .n2-actions .n2-i-delete,.n2-ss-slide2-list li .n2-actions .n2-i-duplicate,.n2-ss-slide2-list li .n2-actions .n2-i-star{visibility:hidden}.n2-ss-slide2-list li .n2-actions .n2-i-star.n2-active,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-delete,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-duplicate,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-star{visibility:visible}.n2-lightbox-sidebar-list{overflow-y:auto}#n2-tab-widgets{border-bottom:0;margin-bottom:1000px}.n2-i-edit.n2-active{color:#0c92df}.n2-ss-live-preview span{text-decoration:line-through;vertical-align:middle}.n2-ss-live-preview .n2-button,.n2-widget-area{vertical-align:middle;margin:0 20px}.n2-ss-live-preview.n2-active span{text-decoration:none}.n2-ss-live-preview.n2-active .n2-button{display:none}.n2-widget-area{display:inline-block;width:80px;height:80px;position:relative;margin:0 10px}.n2-form .n2-widget-area{margin-bottom:10px}.n2-widget-area-inner{position:absolute;top:14px;left:14px;width:46px;height:46px;border:3px solid #bbc3cc;border-radius:3px}.n2-widget-area .n2-area{position:absolute;background-color:#a1aeb5;border-radius:2px;cursor:pointer;width:10px;height:10px;left:0;top:0}.n2-widget-area .n2-area.n2-active{background-color:#0c92df;cursor:default}.n2-widget-area .n2-area-1{left:35px}.n2-widget-area .n2-area-2{left:21px;top:21px}.n2-widget-area .n2-area-3{left:35px;top:21px}.n2-widget-area .n2-area-4{left:49px;top:21px}.n2-widget-area .n2-area-5{top:35px}.n2-widget-area .n2-area-6{left:21px;top:35px}.n2-widget-area .n2-area-7{left:49px;top:35px}.n2-widget-area .n2-area-8{left:70px;top:35px}.n2-widget-area .n2-area-9{left:21px;top:49px}.n2-widget-area .n2-area-10{left:35px;top:49px}.n2-widget-area .n2-area-11{left:49px;top:49px}.n2-widget-area .n2-area-12{left:35px;top:70px}.n2-ss-slider-publish{border-collapse:collapse;overflow:hidden}.n2-ss-slider-publish .n2-td{text-align:center;border-right:1px solid #ccd1d6;color:#6b7989;padding:48px 0 0}.n2-ss-slider-publish .n2-td .n2-h2 a{color:#6b7989}.n2-ss-slider-publish .n2-td.n2-last{border-right:0}.n2-ss-slider-publish div.n2-h2{line-height:30px;font-size:18px}.n2-ss-slider-publish div.n2-h4{line-height:26px}.n2-ss-slider-publish .n2-code{display:inline-block;padding:16px 30px;line-height:20px;border-radius:3px;background-color:#f5e293;text-align:left;margin:17px 0;color:#6f653f;font-size:12px;border:0}.n2-ss-slider-publish img{margin-top:17px;margin-bottom:-10px}.n2-ss-generator-modal .n2-modal-content h3{text-align:left}.n2-generator-records td div{max-height:100px;overflow:hidden;padding:10px;margin:-10px}.n2-generator-records td:HOVER div{overflow-y:auto;overflow-x:visible}#n2-admin[data-slider-type=block] .n2-fm-arrow,#n2-admin[data-slider-type=block] .n2-fm-autoplay,#n2-admin[data-slider-type=block] .n2-fm-bar,#n2-admin[data-slider-type=block] .n2-fm-bullet,#n2-admin[data-slider-type=block] .n2-fm-indicator,#n2-admin[data-slider-type=block] .n2-fm-slides,#n2-admin[data-slider-type=block] .n2-fm-thumbnail{display:none}.n2-ss-container-device{position:relative;background-color:#fff;border:1px solid #ccd1d6;border-width:0 1px;margin:40px auto 0}.n2-modal.n2-ss-go-pro .n2-modal-window{text-align:center;line-height:2}.n2-modal.n2-ss-go-pro .n2-ss-rate{margin:50px -20px 0;background:url(../images/free/rate.png);height:90px;line-height:90px;color:#fff}.n2-modal.n2-ss-go-pro .n2-ss-rate .n2-h3{display:inline-block;margin-right:30px}.n2-modal.n2-ss-go-pro .n2-modal-controls{margin-bottom:40px}.n2-ss-create-slider-free-sample{float:left;height:70px;width:170px;cursor:pointer}.n2-ss-create-slider-free-sample:HOVER{background-position:0 -80px}.n2-ss-modal-subscribe>.n2-modal-window{text-align:center}.n2-ss-modal-subscribe .n2-form{margin:0 -20px}.n2-ss-modal-subscribe .n2-h3{margin:0 auto;width:95%;text-align:center;line-height:2}.n2-ss-preview-subscribe .n2-input-button{display:inline-block}.n2-input-button,.n2-ss-modal-subscribe .n2-input-button{display:inline-block;margin-top:20px}.n2-input-button>*,.n2-ss-modal-subscribe .n2-input-button>*,.n2-ss-preview-subscribe .n2-input-button>*{display:inline-block;white-space:nowrap}.n2-input-button input,.n2-input-button input:focus,.n2-ss-modal-subscribe input,.n2-ss-modal-subscribe input:focus,.n2-ss-preview-subscribe input,.n2-ss-preview-subscribe input:focus{margin:0 auto;width:250px;height:36px;border:2px solid #b9c3c9;border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px;overflow:hidden;padding:0 10px;line-height:36px;box-shadow:none;color:#7b8898;font-size:12px;background:#fff}.n2-input-button .n2-button,.n2-ss-modal-subscribe .n2-input-button .n2-button,.n2-ss-preview-subscribe .n2-input-button .n2-button{border-top-left-radius:0;border-bottom-left-radius:0}.n2-ss-preview-subscribe{position:fixed;left:50%;margin-left:-500px;bottom:-100px;transition:bottom .5s ease;background:url(../images/free/subscribepreview.png);width:1000px;height:90px;z-index:1000}.n2-ss-preview-subscribe.n2-active{bottom:10px}.n2-ss-preview-subscribe-close{position:absolute;top:-12px;right:-12px;width:24px;height:24px;cursor:pointer;background:url(../images/free/close.png) no-repeat center center}.n2-ss-preview-subscribe .n2-input-button{position:absolute;right:20px;top:0;margin-top:28px}.n2-ss-slider-edit>.n2-form>.n2-form-tab{margin:20px 0 0;border-radius:0;border:0}.n2-ss-slider-edit>.n2-form>.n2-form-tab .n2-form-matrix-views{border-radius:0}.n2-box-add-license.n2-ss-license-has-active-key,.n2-box-license-activated.n2-ss-license-no-active-key{display:none}#n2-ss-slider-container,#n2-ss-slides{position:relative;padding:25px}.n2-ss-sliders .n2-box-new-slider>a:before{content:"\e952"}.n2-ss-sliders .n2-box-template-library>a:before{content:"\e951"}.n2-box-up-group>a:before{content:"\e958"}.n2-box-insert-group>a:before{content:"\e959"}.n2-ss-sliders-header>*{margin:0 10px}html[data-sliders='0'] .n2-ss-sliders-header{visibility:hidden}.n2-ss-box-slider{cursor:pointer}#n2-ss-slider-container[data-groupid="0"] .n2-ss-remove-from-group,.n2-ss-box-slider-group .n2-ss-add-to-group,.n2-ss-box-slider-group .n2-ss-remove-from-group,.n2-ss-slider-over-group .n2-box-sortable-placeholder,html[data-slides='0'] .n2-ss-slider-edit{display:none}.n2-ss-slides-outer-container{display:block}.n2-modal-window .n2-ss-slides-outer-container{height:100%;overflow:auto}.n2-ss-slides-container{position:relative;margin:0 -10px}.n2-slide-first.n2-i{line-height:16px}.n2-slide-first.n2-i,.n2-slide-published{font-size:16px;padding:3px}.n2-i-unpublished{color:#c54633}.n2-slide-state-published .n2-i-unpublished{color:#6fbc49}.n2-slide-state-published .n2-i-unpublished:before{content:"\e60c"}.n2-box.n2-first-slide:HOVER .n2-slide-first,.n2-slide-first,.n2-slide-is-first{display:none}.n2-first-slide .n2-slide-is-first{display:inline-block}.n2-slide-duplicate{margin-right:5px}.n2-slide-delete,.n2-slide-duplicate,.n2-slide-selected{padding:0;width:24px}#n2-ss-slides .n2-box.n2-ss-slide-active{box-shadow:0 0 0 3px #0c92df}#n2-ss-slides .n2-box-slide-dummy{background:#e9edf0;border:2px dashed #b2bfc9;box-sizing:border-box;background-image:url(../images/dummy-slide.png);background-repeat:no-repeat;background-position:center 36px;color:#7b8898;font-size:14px;text-align:center;line-height:200px}#n2-ss-slides .n2-box-slide-drag-images{background:url(../images/drag.png) no-repeat center 4px;text-align:center;color:#7b8898;box-sizing:border-box;padding:90px 60px 0;line-height:12px}html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy,html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-drag-images,html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-dummy{display:none}.n2-ss-slides-control{position:relative;padding:22px 10px;border-bottom:1px solid RGBA(0,0,0,.3)}.n2-ss-slides-control .n2-button{margin:0 10px}.n2-slides-add{vertical-align:bottom;margin:-2px}#n2-ss-slides .n2-box-slide-drag-upload{display:none;position:absolute;z-index:101;left:0;top:0;width:100%;height:100%;background-color:rgba(32,41,52,.9);border:0;right:0;bottom:0;margin:0;vertical-align:bottom;line-height:130px;text-align:center;color:#fff}#n2-ss-slides .n2-drag-over .n2-box-slide-drag-upload{display:block}.n2-box-slide .n2-button.n2-sidebar-list-bg:HOVER{background-color:#0c92df}.n2-ss-quick-slides-edit-modal .n2-modal-content table{border-spacing:10px;border-collapse:separate;margin:10px auto}.n2-ss-quick-slides-edit-modal .n2-modal-content table td{padding:0}.n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label{margin-top:0;margin-bottom:3px}.n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label label{font-size:11px}.n2-slide-state-first [data-action=setFirst],.n2-slide-state-published [data-action=publish],[data-action=generator],[data-action=unpublish]{display:none}.n2-slide-state-has-generator [data-action=generator],.n2-slide-state-published [data-action=unpublish]{display:block}.n2-box-slide .n2-i-star{display:none}.n2-box-slide.n2-slide-state-first .n2-i-star{display:inline;color:#e19f21;font-size:16px}#n2-ss-slides .n2-box:HOVER img{opacity:.1}.n2-ss-slides-header{position:relative;z-index:9;color:#6b7989;margin-top:-10px}.n2-ss-bulk-controls{visibility:hidden}.n2-ss-has-box-selection .n2-ss-bulk-controls{visibility:visible}.n2-ss-slides-header .n2-button-menu-open .n2-button-menu{right:-90px}#n2-ss-slides .n2-box-slide-add{display:inline-block;color:#b2bfc9;background:0 0;text-align:center;z-index:5}#n2-ss-slides .n2-box-slide-add>.n2-add-quick-image,.n2-box-add-sample-slide>a{width:100%;height:135px;padding:0}#n2-ss-slides .n2-box-slide-add>.n2-add-quick-image:before,.n2-box-add-sample-slide>a:before{display:block;font-family:'Nextend'!important;font-size:48px;line-height:68px;content:"\e981";margin-top:20px}.n2-box-add-sample-slide>a:before{content:"\e97d"}.n2-ss-slides-header>*{vertical-align:middle;display:inline-block}.n2-ss-slides-header .n2-h5,.n2-ss-slides-header .n2-h5 a{margin-right:10px;color:#6b7986}.n2-ss-slides-header .n2-h5 .n2-i{font-size:16px}.n2-top-bar-menu .n2-ss-back-dashboard:before{content:"\e94a"}.n2-top-bar-menu .n2-ss-back-slider:before{content:"\e94b"}.n2-top-bar-menu .n2-ss-back-slides:before{content:"\e91a"}.n2-top-bar-menu>#n2-ss-preview:before{content:"\e92d"}.n2-ss-block-slides-notice{display:none;color:#7b8898}html:not([data-slides='0']):not([data-slides='1']) #n2-admin[data-slider-type=block] .n2-ss-block-slides-notice{display:block}html[data-slides='0'] .n2-ss-create-static-slide{display:none}div#n2-ss-0:HOVER .n2-ss-static-slide{display:none}div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide{display:flex}.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .n2-ss-layer-cc,.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-customresizable-handle,.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-resizable-handle{display:none!important}.n2-ss-select-layer-mode-group .n2-list li.n2-ss-layerlist-row.n2-active.n2-selected{color:#b2bfc9}#n2-ss-0 .n2-ss-layer{cursor:not-allowed}#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer{cursor:move;background:RGBA(0,0,0,0)}#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-type=col],#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-type=col] .n2-ss-layer{cursor:pointer}#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked,#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked{cursor:auto}.n2-ss-preview-mode #n2-ss-0 .n2-ss-layer{cursor:default}#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-chain-parent,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .ui-customresizable-handle,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .ui-resizable-handle,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-highlight,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-selected .ui-item-overlay{display:none!important}.n2-grid{background:#4affff;position:absolute;left:0;top:0;z-index:1000000;display:none}.n2-grid-h{width:100%;height:1px}.n2-grid-v{height:100%;width:1px}.n2-sidebar{width:340px}.n2-ss-edit-slide-top{background:#fff;border-bottom:1px solid #ccd1d6;padding:30px 20px 30px 40px;display:flex;flex-wrap:nowrap;justify-content:space-between;flex-flow:row}.n2-ss-edit-slide-top-thumbnail{width:200px;height:135px;cursor:pointer}.n2-ss-edit-slide-top-thumbnail img{width:200px;height:135px;border-radius:5px}.n2-ss-edit-slide-top-actions{width:180px;text-align:left;vertical-align:middle;flex:1}.n2-ss-edit-slide-top-actions>*{margin:10px 0}.n2-ss-edit-slide-top-details{flex:1;align-self:flex-end;padding:0 20px}.n2-ss-edit-slide-top-details .n2-h1{color:#606d7b;margin-bottom:15px;cursor:pointer;line-height:30px}.n2-ss-edit-slide-top-details .n2-h1:HOVER:after{font-family:'Nextend'!important;content:"\e94f";font-size:22px;vertical-align:top;margin:0 5px;color:#b0b9bf}.n2-ss-edit-slide-top-details .n2-h4 a{color:#7b8898}.n2-ss-edit-slide-top-details .n2-h4 a .n2-i{font-size:16px}.n2-ss-edit-slide-top-tabs{margin-top:15px}.n2-ss-edit-slide-top-tabs a{margin:0}.n2-ss-edit-slide-top-tabs a.n2-active{color:#fff;background-color:#0c92df;border-color:#0c92df}.n2-ss-edit-slide-top-tabs .n2-button{border-radius:0;border-left:0;padding:0 20px}.n2-ss-edit-slide-top-tabs .n2-button.n2-first{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left:2px solid #e0e6ed}.n2-ss-edit-slide-top-tabs .n2-button.n2-last{border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-ss-edit-slide-top-tabs .n2-button.n2-active{background:#0c92df;color:#fff;border-color:#0c92df}.n2-ss-edit-slide-top-tabs .n2-button.n2-active:not(.n2-first){border-left:2px solid #0c92df;margin-left:-2px}#n2-form-matrix-slide-settings{margin:0;border:0;border-radius:0}.n2-ss-slider-real-container{position:relative}.n2-ss-slider-outer-container{position:relative;float:left}.n2-ss-canvas-slider-container{padding-bottom:99px;float:left;margin:10px}.n2-ss-has-ruler .n2-ss-canvas-slider-container{margin:40px 0 0 40px}.n2-i-desktopPortrait:before{content:'\e925'}.n2-i-desktopLandscape:before{content:'\e95a'}.n2-i-tabletPortrait:before{content:'\e928'}.n2-i-tabletLandscape:before{content:'\e927'}.n2-i-mobilePortrait:before{content:'\e92a'}.n2-i-mobileLandscape:before{content:'\e929'}#n2-tab-basiccsspreset{background-color:#3c4958;z-index:3}#n2-tab-basiccsspreset>.n2-h2{margin-bottom:0}.n2-basiccss-show-preset-list .n2-editor-header .n2-ss-button-container>.n2-basiccss-choose,.n2-editor-header .n2-ss-button-container>.n2-basiccss-back{display:none}.n2-basiccss-show-preset-list .n2-editor-header .n2-ss-button-container>.n2-basiccss-back{display:inline-block}.n2-ss-preview-modal .n2-modal-window{background-color:#e9edf0}#n2-admin.n2-ss-mode-desktopPortrait .n2-ss-responsive-helper,.n2-ss-background-type-color .n2-ss-background-image-param,.n2-ss-background-type-color .n2-ss-background-video-param,.n2-ss-background-type-gradient .n2-ss-background-image-param,.n2-ss-background-type-gradient .n2-ss-background-video-param,.n2-ss-background-type-image .n2-ss-background-video-param,body[data-editormode=content] #n2-admin .n2-ss-responsive-helper{display:none}#n2-tab-animations-events td.n2-label{padding:0}#n2-tab-animations-events td.n2-element{padding:6px 0}.n2-ss-editor-window-notice{padding:8px 10px;line-height:18px;background:#6b7986;color:#fff}.n2-ss-editor-window-notice a{color:#ffb527}#n2-ss-slide-edit-slides{display:none;border-bottom:1px solid #e0e6ed}.n2-ss-show-slides #n2-ss-slide-edit-slides{display:block}.n2-ss-show-slides a.n2-ss-back-slides,.n2-ss-show-slides a.n2-ss-back-slides:before{color:#fff}.n2-ss-columns-element{background:#28313a}.n2-ss-columns-element-add-col{vertical-align:top;display:inline-block;background:#51b82d;width:28px;height:28px;border-radius:3px;margin:8px 0;cursor:pointer;text-align:center;color:#fff;font-size:16px}.n2-ss-columns-element-add-col .n2-i,.n2-ss-columns-element-container .n2-ss-columns-element-handle .n2-i{line-height:28px}.n2-ss-columns-element-container{vertical-align:top;position:relative;width:300px;display:inline-flex;padding:8px;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;overflow:hidden}.n2-ss-columns-element-container>.n2-ss-columns-element-column{position:relative;flex:0 0 auto;background:#51b82d;height:28px;line-height:28px;width:25%;color:#fff;text-align:center;overflow:hidden;cursor:move;border-radius:3px;min-width:5px}.n2-ss-columns-element-container .n2-ss-columns-element-handle{display:block;width:11px;height:28px;background:#202934;flex:0 0 11px;border-radius:3px;margin:0 2px;cursor:ew-resize;color:#9aa7b2;text-align:center}.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-handle{display:none}.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-column{margin-right:15px}.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-column:last-child{margin-right:0}.n2-ss-section-main-content{min-height:20px}#n2-ss-layer-window{z-index:100000;position:fixed;left:100px;top:100px;width:355px}#n2-ss-layer-window.n2-ss-layer-window-minized .n2-ss-layer-window-resizer,.n2-ss-has-layers.n2-ss-layer-edit-visible.n2-ss-preview-mode #n2-ss-layer-window,.n2-ss-layer-edit-visible.n2-ss-move-layer #n2-ss-layer-window,.n2-ss-layer-edit-visible.n2-ss-resize-layer #n2-ss-layer-window,body:not(.n2-ss-has-layers) #n2-ss-layer-window,body:not(.n2-ss-layer-edit-visible) #n2-ss-layer-window{display:none}#n2-ss-layer-window.n2-ss-layer-window-minized{height:30px!important}#n2-ss-layer-window.n2-ss-layer-window-minized .n2-i-minimize:before{content:'\e915'}#n2-ss-layer-window .n2-ss-layer-window-actions{display:none;position:absolute;top:0;left:-35px;width:32px;background-color:#202934;border-radius:3px}#n2-ss-layer-window .n2-ss-layer-window-actions>.n2-button{width:32px;height:32px;line-height:32px;color:#b0bdc7}#n2-ss-layer-window .n2-ss-layer-window-resizer{height:7px;width:100%;cursor:ns-resize;text-align:center;color:#95a1ab;bottom:0;background:#202934;border-bottom-left-radius:5px;border-bottom-right-radius:5px}#n2-ss-layer-window .n2-ss-layer-window-crop{position:relative;width:100%;height:100%;border-radius:3px;box-shadow:0 1px 10px RGBA(0,0,0,.5);overflow:hidden;background:#3c4958;z-index:2}.n2-ss-layer-window-title{position:relative;line-height:60px;height:60px;overflow:hidden;background:#202934;font-size:12px;color:#cbd6df;text-align:left}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav{position:absolute;top:0;line-height:30px;height:30px;margin:0 5px}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav-left{left:0}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav-right{right:0}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav>*{display:inline-block;width:20px;height:30px;line-height:30px;font-size:16px;color:#fff;padding:0;vertical-align:top;text-align:center}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav .n2-i{vertical-align:middle}.n2-ss-layer-window-title .n2-ss-layer-window-title span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 60px;text-align:center}.n2-ss-layer-window-breadcrumb{display:none;height:22px;font-size:11px;color:#b2bfc9;background-color:#202934;border-bottom:1px solid #1a2028;text-transform:uppercase;padding:0 5px}.n2-ss-layer-window-breadcrumb.n2-has-breadcrumb{display:block}.n2-ss-layer-window-breadcrumb *{display:inline-block;height:22px;vertical-align:top;line-height:22px}.n2-window-title-structure-nav span{padding:0 5px;cursor:pointer}.n2-window-title-structure-nav .n2-i-mini-arrow-thin{font-size:16px;padding:0}.n2-window-title-structure-nav:last-child{color:#fff}.n2-window-title-structure-nav:last-child .n2-i-mini-arrow-thin{display:none}#n2-tabbed-slide-editor-settings .n2-tabs{position:relative;overflow-y:auto;overflow-x:hidden}#n2-ss-layer-window table,#n2-ss-layer-window tbody,#n2-ss-layer-window tr{display:block}#n2-ss-layer-window td{display:block;width:auto}#n2-ss-layer-window .n2-label{background:#3c4958;border-top:1px solid #303b47;padding:3px 10px 0}#n2-ss-layer-window .n2-empty-label{padding:0;height:4px}#n2-ss-layer-window .n2-empty-group-label{padding:0;height:0}#n2-ss-layer-window .n2-label label{color:#b2bfc9;font-size:10px}#n2-ss-layer-window .n2-element{background:#3c4958;border-top:0;padding:0}#n2-ss-layer-window textarea{max-width:290px!important;width:290px!important}#n2-ss-layer-window .n2-form-element-button{max-width:38px;overflow:hidden}#n2-ss-layer-window .n2-sidebar-row{line-height:34px;background:#28313a}#n2-ss-layer-window .n2-list li,#n2-ss-layer-window .n2-sidebar-row{border-bottom:1px solid RGBA(0,0,0,.2)}#n2-ss-layer-window .n2-button-m{height:24px;line-height:24px}#n2-ss-layer-window .n2-sidebar-tab-switcher{border:0;border-collapse:separate}#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td{font-size:11px;line-height:47px;height:47px;border:1px solid #1a2028;border-left:0;color:#b2bfc9}#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td .n2-i{font-size:32px;line-height:47px}#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td.n2-active{background:#0c92df;color:#fff}#n2-ss-layer-window .n2-has-underline>.n2-underline::after,#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td[data-tab=style]{display:none}#n2-ss-layer-window.n2-ss-has-design-option .n2-sidebar-tab-switcher .n2-td[data-tab=style]{display:table-cell}#n2-ss-layer-window .n2-ss-layer-window-title{line-height:30px;height:30px;cursor:move;border-top-left-radius:5px;border-top-right-radius:5px}#n2-ss-layer-window .n2-ss-layer-window-title .n2-ss-layer-window-title-inner{white-space:nowrap;margin:0 10px;text-align:center}#n2-ss-layer-window .ui-autocomplete{padding:0;max-height:200px;overflow-y:auto;overflow-x:hidden}#n2-ss-layer-window .n2-form-element-autocomplete .ui-autocomplete .ui-menu-item{padding-right:20px}#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner>a,#n2-ss-layer-window .n2-ss-generator-param{display:none}.n2-ss-dynamic-slide #n2-ss-layer-window .n2-ss-generator-param{display:block}#n2-tabbed-animations-tabbed>.n2-table{border-spacing:8px;border-collapse:separate;background:#28313a;border-bottom:1px solid #20282f}#n2-tabbed-animations-tabbed .n2-sidebar-tab-switcher .n2-td{line-height:28px;height:28px;border:0;border-radius:50px}#n2-tabbed-animations-tabbed .n2-editor-header.n2-h2{background:#303b47;border-bottom:1px solid #28313a;position:relative}.n2-ss-small-more{float:right;margin:-38px 20px 0}html[dir=rtl] .n2-ss-small-more{float:left}.n2-button-single-animation-play.n2-active .n2-i:before{content:'\e607'}#n2-ss-add-sidebar{background:#212d3a;position:absolute;left:-1px;top:54px;bottom:-1px;width:50px;text-align:center}#n2-ss-add-sidebar .n2-ss-add-sidebar-inner{position:relative;padding-top:.01px}#n2-ss-add-sidebar .n2-ss-add-sidebar-inner>*{margin-top:10px;color:#80a3b5}#n2-ss-add-sidebar .n2-ss-add-sidebar-inner>.n2-button-blue,.n2-ss-theme-dark .n2-ruler>span span{color:#fff}#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner>*{margin-top:0}#n2-ss-add-sidebar.n2-active{width:341px;z-index:1010}#n2-ss-add-sidebar.n2-active .n2-ss-add-layer-button{margin:0;background:0 0;position:absolute;top:16px;right:5px}#n2-ss-add-sidebar.n2-active .n2-ss-add-layer-button .n2-i:before{content:"\e90a";color:#b2bfc9}#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner{width:341px!important}#n2-ss-add-sidebar.n2-active .n2-ss-available-layers{display:block}.n2-ss-available-layers .n2-sidebar-tab-switcher{border:0}.n2-ss-available-layers-container{width:300px;margin:0 auto;padding:10px 0}.n2-ss-slide-item-group{color:#b2bfc9;padding:4px 5px 1px}.n2-ss-addlayer .n2-ss-available-layers{display:none;box-sizing:border-box;white-space:normal;text-align:left}.n2-ss-core-item{display:inline-block;margin:5px;background-color:#6b7986;color:#fff;line-height:20px;cursor:pointer;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:90px;height:80px;z-index:1000}.n2-ss-core-item:before{font-family:'Nextend';font-size:32px;content:"\e943";display:block;line-height:32px;margin-top:20px}.n2-ss-core-item[data-item=heading]:before{content:"\e945"}.n2-ss-core-item[data-item=text]:before{content:"\e944"}.n2-ss-core-item[data-item=button]:before{content:"\e942"}.n2-ss-core-item[data-item=imagearea]:before{content:"\e950"}.n2-ss-core-item[data-item=icon2]:before,.n2-ss-core-item[data-item=icon]:before{content:"\e941"}.n2-ss-core-item[data-item=input]:before{content:"\e939"}.n2-ss-core-item[data-item=iframe]:before{content:"\e938"}.n2-ss-core-item[data-item=area]:before{content:"\e937"}.n2-ss-core-item[data-item=list]:before{content:"\e93e"}.n2-ss-core-item[data-item=caption]:before{content:"\e940"}.n2-ss-core-item[data-item=transition]:before{content:"\e93f"}.n2-ss-core-item[data-item=youtube]:before{content:"\e93d"}.n2-ss-core-item[data-item=vimeo]:before{content:"\e93c"}.n2-ss-core-item[data-item=video]:before{content:"\e93b"}.n2-ss-core-item[data-item=html]:before{content:"\e93a"}.n2-ss-core-item[data-item=progressbar]:before{content:"\e982"}.n2-ss-core-item[data-item=imagebox]:before{content:"\e983"}.n2-ss-core-item[data-item=counter]:before{content:"\e984"}.n2-ss-core-item[data-item=circlecounter]:before{content:"\e985"}.n2-ss-core-item[data-item=audio]:before{content:"\e986"}.n2-ss-core-item[data-item=structure]:before{font-size:74px;margin-top:24px}.n2-ss-core-item[data-item=structure][data-type="1col"]:before{content:"\e967"}.n2-ss-core-item[data-item=structure][data-type="2col"]:before{content:"\e966"}.n2-ss-core-item[data-item=structure][data-type="3col"]:before{content:"\e961"}.n2-ss-core-item[data-item=structure][data-type="4col"]:before{content:"\e95f"}.n2-ss-core-item[data-item=structure][data-type="2col-60-40"]:before{content:"\e965"}.n2-ss-core-item[data-item=structure][data-type="2col-40-60"]:before{content:"\e964"}.n2-ss-core-item[data-item=structure][data-type="2col-80-20"]:before{content:"\e963"}.n2-ss-core-item[data-item=structure][data-type="2col-20-80"]:before{content:"\e962"}.n2-ss-core-item[data-item=structure][data-type="3col-20-60-20"]:before{content:"\e960"}.n2-ss-core-item[data-item=structure][data-type=special]:before{content:"\e95d"}#n2-ss-toolbar{z-index:9;position:relative;height:28px;line-height:28px;background:#f2f5fa;white-space:nowrap;padding:13px 10px}.n2-ss-slider-visible #n2-ss-slide-canvas-container #n2-ss-toolbar{height:auto}#n2-ss-slide-canvas-container.n2-scroll-disable #n2-ss-toolbar{height:28px;border-bottom:0}#n2-ss-toolbar>*{line-height:28px;height:28px;vertical-align:top;display:inline-block}#n2-ss-toolbar .n2-ss-tool{margin:0 5px;display:inline-block;vertical-align:top!important}#n2-ss-toolbar .n2-ss-tool.n2-form-element-text{height:24px;line-height:24px;position:relative}#n2-ss-toolbar .n2-text-sub-label{font-size:16px}#n2-ss-layer-list>.n2-list>li li,.n2-ss-theme-dark #n2-ss-slide-canvas-container-inner,.n2-ss-theme-dark .n2-ruler-vertical{background-color:#28313a}.n2-ss-preview-mode .n2-main-top-bar{opacity:0}#n2-ss-slide-canvas-settings{display:inline-block;position:relative}#n2-ss-slide-canvas-settings>.n2-button{width:28px;padding:0;text-align:center}#n2-ss-slide-canvas-settings.n2-active>.n2-button{background-color:#0c92df;border-color:#0c92df}#n2-ss-slide-canvas-settings .n2-ss-settings-panel{position:absolute;left:0;top:28px}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner{margin-top:6px;min-width:180px;box-shadow:0 0 5px 0 RGBA(0,0,0,.3);background-color:#fff;border-radius:3px}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner>*{display:block;line-height:32px;margin:0 10px;position:relative;text-align:left}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner a{color:#7b8898}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-panel-action{color:#0c92df}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick{display:block;position:absolute;right:0;top:8px;border-radius:3px;border:2px solid #8793a2;width:12px;height:12px}#n2-ss-layer-show-on,#n2-ss-slide-canvas-settings.n2-active .n2-ss-settings-panel{display:inline-block}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-enabled .n2-setting-tick{border-color:#1999e3;background-color:#1999e3}#n2-ss-slide-canvas-settings .n2-ss-settings-panel,#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick .n2-i{display:none}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-enabled .n2-i{display:inline-block;color:#fff;font-size:16px;line-height:12px;margin:0 -2px}#n2-ss-toolbar .n2-button-grey{background-color:#a1aeb5}#n2-ss-toolbar .n2-radio-option{background-color:#a1aeb5;border-left:1px solid #8c99a1}#n2-ss-toolbar .n2-radio-option.n2-first{border-left-width:0}#n2-ss-toolbar .n2-radio-option.n2-active{background-color:#0c92df;border-color:#0c92df}#n2-ss-toolbar .n2-radio-option.n2-sub-active{background-color:#51b82d;border-color:#51b82d}#n2-ss-toolbar .n2-ss-tool.n2-button{height:28px;line-height:28px;background-color:#a1aeb5}#n2-ss-toolbar .n2-ss-tool.n2-button-icon{padding:0;width:28px}#n2-ss-toolbar .n2-ss-tool.n2-button.n2-active{background-color:#0c92df}#n2-ss-toolbar .n2-ss-tool.n2-button.n2-sub-active{background-color:#51b82d}#n2-ss-toolbar .ui-autocomplete{max-width:100%}#n2-ss-layer-parent-linker,#n2-ss-theme,#n2-ss-toolbar #n2-ss-theme.n2-active{width:28px;height:28px;line-height:28px;padding:0;background-color:#a1aeb5}#n2-ss-theme.n2-active .n2-i:before{content:"\e64c"}#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-ss-ll-dragging-parent{background:#000}#n2-ss-layer-list>.n2-list>li{background-color:#303b47}#n2-ss-layer-list .n2-list>li{line-height:31px}#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-active,#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-selected,.n2-list .n2-ss-layerlist-row.n2-active,.n2-list .n2-ss-layerlist-row.n2-selected{background:#1681c1}#n2-ss-layer-list .n2-ss-layer-content-row .n2-list>li .n2-actions-left,#n2-ss-layer-list .n2-ss-layerlist-row-row .n2-list>li .n2-actions-left,#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging .n2-actions,#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging .n2-actions-left{display:none}#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging{position:absolute;left:0;width:100%;height:32px;overflow:hidden;opacity:.5}#n2-ss-layers .nextend-sortable-placeholder{border:0;position:relative;height:0;overflow:visible;z-index:1001}#n2-ss-layers .nextend-sortable-placeholder div{position:absolute;left:0;top:-1px;width:100%;height:0;box-shadow:0 0 0 2px #0c92df}#n2-ss-layers ul .nextend-sortable-placeholder div{margin-left:30px}#n2-ss-layers ul ul .nextend-sortable-placeholder div{margin-left:50px}#n2-ss-layers ul ul ul .nextend-sortable-placeholder div{margin-left:70px}#n2-ss-layers ul ul ul ul .nextend-sortable-placeholder div{margin-left:90px}#n2-ss-layers ul ul ul ul ul .nextend-sortable-placeholder div{margin-left:110px}#n2-ss-layers ul ul ul ul ul ul .nextend-sortable-placeholder div{margin-left:130px}#n2-ss-layers .ui-sortable-helper{opacity:.5}#n2-ss-layers-table .n2-list li,.n2-list .n2-ss-layer-group-row{border-bottom:0}#n2-ss-layers-table .n2-ss-layer-title{border-bottom:1px solid RGBA(0,0,0,.2)}#n2-ss-layers-table .n2-active>.n2-ss-layer-title,#n2-ss-layers-table .n2-selected>.n2-ss-layer-title{border-color:#1681c1}.n2-ss-layer-group-row ul.n2-list{margin-top:-10px;padding-top:10px}.n2-ss-layer-title{display:block;line-height:31px;position:relative;cursor:pointer;overflow:hidden}.n2-ss-layer-title span{margin:0 30px;display:block;width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n2-ss-layer-group-row>.n2-ss-layer-title span,ul>li>.n2-ss-layer-title span{margin:0 30px}.n2-ss-layer-icon{position:absolute;top:2px}ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:3px}#n2-ss-layer-list>ul>li.n2-ss-layer-content-row>.n2-ss-layer-title span,#n2-ss-layer-list>ul>li.n2-ss-layer-row-row>.n2-ss-layer-title span,ul>li .n2-inline-form,ul>li>ul>li>.n2-ss-layer-title span{margin:0 50px}#n2-ss-layer-list>ul>li.n2-ss-layer-content-row>.n2-ss-layer-title .n2-ss-layer-icon,#n2-ss-layer-list>ul>li.n2-ss-layer-row-row>.n2-ss-layer-title .n2-ss-layer-icon,ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:23px}ul>li>ul>li>ul>li .n2-inline-form,ul>li>ul>li>ul>li>.n2-ss-layer-title span{margin:0 70px}ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:43px}ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title span,ul>li>ul>li>ul>li>ul>li>ul>li .n2-inline-form{margin:0 90px}ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:63px}ul>li>ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title span{margin:0 110px}ul>li>ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:83px}ul>li>ul>li>ul>li>ul>li>ul>li>ul>li .n2-ss-layer-title span{margin:0 130px}ul>li>ul>li>ul>li>ul>li>ul>li>ul>li .n2-ss-layer-title .n2-ss-layer-icon{left:103px}.n2-ss-layerlist-row .n2-inline-form input{background:#3c4958 0 0;color:#b2bfc9;font-size:11px;border:2px solid #28313a;line-height:24px;padding:0 10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:0}.n2-ss-layerlist-row .n2-inline-form input:focus{box-shadow:none}.n2-ss-layer-title .n2-actions{position:absolute;top:0;right:0;padding:0 6px;cursor:default;opacity:.2}.n2-active>.n2-ss-layer-title .n2-actions{opacity:1}.n2-ss-layer-title .n2-actions-left{position:absolute;top:0;left:0;padding:2px 0;cursor:default;line-height:24px}html[dir=rtl] .n2-ss-layer-title .n2-actions-left{padding:0 16px 0 0}#n2-ss-layer-list .n2-ss-layerlist-row.n2-active>.n2-ss-layer-title,#n2-ss-layer-list .n2-ss-layerlist-row.n2-active>.n2-ss-layer-title .n2-i,#n2-ss-layer-list .n2-ss-layerlist-row.n2-selected .n2-ss-layer-title,#n2-ss-layer-list .n2-ss-layerlist-row.n2-selected .n2-ss-layer-title .n2-i{color:#fff}.n2-ss-layer-title .n2-actions a,.n2-ss-layer-title .n2-actions-left a{display:inline-block;padding:0}.n2-ss-layer-title .n2-actions-left i{padding:0 2px;vertical-align:middle}.n2-ss-layer-title .n2-i-order{cursor:move}.n2-ss-layer-status{display:inline-block;position:relative;margin:0 3px}#n2-ss-layer-list a .n2-i,#n2-ss-layer-list a:HOVER .n2-i{color:#b2bfc9}.n2-ss-layer-status-hidden .n2-ss-layer-status .n2-ss-sc-hide .n2-i:before{content:"\e923"}.n2-ss-layer-list-top-bar .n2-h2{display:inline-block;line-height:28px;color:#fff;padding:0 5px}.n2-ss-layer-list-opener{width:28px;display:inline-block;padding:0;vertical-align:top;margin:0 5px}#n2-ss-layers.n2-active .n2-ss-layer-list-opener>.n2-i:before{content:"\e92c"}.n2-closed .n2-i-col:before,.n2-closed .n2-i-row:before,.n2-ss-layer-list-group-opener.n2-closed .n2-i:before{content:"\e921"}#n2-ss-layers{position:fixed;bottom:0;width:340px;margin:0 -1px;height:48px;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;display:none;background-color:#28313a;z-index:1019}#n2-ss-layers.n2-active{height:100px}#n2-ss-layers:not(.n2-active){width:50px!important}#n2-ss-layers:not(.n2-active) .n2-ss-layers-sidebar{width:50px}#n2-ss-layers:not(.n2-active) .n2-ss-layer-list-layers-top-bar>div{display:none!important}.n2-ss-has-layers #n2-ss-layers{display:block}#n2-ss-layers-table .n2-td{position:relative;vertical-align:top}#n2-ss-layers-table .n2-ss-layers-sidebar{width:340px}.n2-ss-layer-list-top-bar{position:relative;padding:10px 5px 9px;height:28px;background-color:#212d3a;border-bottom:1px solid #20282f}#n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar{cursor:ns-resize}.n2-ss-layer-list-bulk-top-bar,[data-component=layer] .n2-ss-select-layer-mode #n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar{display:none}[data-component=layer] .n2-ss-select-layer-mode #n2-ss-layers.n2-active .n2-ss-layer-list-bulk-top-bar{display:block}.n2-ss-layer-list-top-bar .n2-form-element-text{margin:0}.n2-ss-layers-sidebar-rows{position:relative;height:100%;overflow-x:hidden;overflow-y:visible}#n2-ss-layers .n2-form-element-text{margin:0 10px;line-height:2px}#n2-ss-layers .n2-text-sub-label{width:30px;text-align:center;overflow:hidden}.n2-ss-layer-list-bulk-top-bar{text-align:right;color:#fff;vertical-align:top;padding:10px 15px 9px}.n2-ss-layer-list-bulk-top-bar .n2-button{vertical-align:middle}.n2-ss-layer-list-bulk-top-bar .n2-button+.n2-button,.n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control .n2-button{margin:0 0 0 5px}html[dir=rtl] .n2-ss-layer-list-top-bar .n2-button+.n2-button,html[dir=rtl] .n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control .n2-button{margin:0 5px 0 0}.n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control{position:absolute;top:10px;right:5px;margin:0 10px}html[dir=rtl] .n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control{right:auto;left:5px}.n2-ss-layer-list-topbar-control{text-align:right;color:#fff;padding:0 10px;vertical-align:top}#n2-ss-layers .n2-ss-layer-list-topbar-control{padding:0}.n2-ss-layer-list-topbar-control .n2-button{padding:0;width:28px;font-size:16px;vertical-align:middle}.n2-ss-layer-list-topbar-control .n2-button i{line-height:inherit}.n2-play.n2-active i:before{content:"\e607"}#n2-ss-slide-canvas-container{background-color:#fff;border-width:1px 0 0;padding-bottom:400px;padding-bottom:40vh;position:relative;border-top:1px solid #ccd1d6}#smartslider-form>div{margin-bottom:-1px}#n2-ss-slide-canvas-container-inner{position:relative;z-index:1;overflow:hidden;border-bottom:1px solid #ccd1d6;background-color:#e9edf0;margin-left:49px;border-top:1px solid #ccd1d6}.n2-ss-position-display{display:none;position:absolute;border-radius:3px;z-index:10000;line-height:16px;padding:4px 6px;color:#fff;font-size:10px;background:RGBA(32,41,52,.95)}.n2-ss-position-display.n2-active{display:block}#n2-ss-0 .n2-ss-slide-border{display:none;position:absolute;background:#a1aeb5;width:1px;height:1px}#n2-ss-0 .n2-ss-slide-border-left{left:0;top:0;height:100%}#n2-ss-0 .n2-ss-slide-border-right{right:0;top:0;height:100%}#n2-ss-0 .n2-ss-slide-border-top{left:0;top:0;width:100%}#n2-ss-0 .n2-ss-slide-border-bottom{left:0;bottom:0;width:100%}#n2-ss-0:HOVER .n2-ss-slide-border{display:block}.n2-ss-layer-placeholder{position:relative;height:0;width:100%;box-shadow:0 0 0 2px #0c92df;display:block;z-index:100000}.n2-ss-layer-inline>.n2-ss-layer-placeholder,.n2-ss-layer-row>.n2-ss-layer-placeholder{height:auto;width:0;align-self:stretch;flex:0 0 auto}.n2-ss-core-item.n2-canvas-item-drag{opacity:.5;z-index:9999;margin:0}.n2-canvas-item-drag{opacity:.5!important}.n2-ss-move-layer div#n2-ss-0 .n2-ss-layer.ui-resizable,.n2-ss-resize-layer div#n2-ss-0 .n2-ss-layer.ui-resizable{box-shadow:inset 0 0 0 1px #0c92df}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-ss-mouse-over{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}div#n2-ss-0 .n2-ss-layer-ui-label-container{display:none;position:absolute;left:0;top:0;text-align:left;line-height:16px;z-index:91;white-space:nowrap;border-bottom-right-radius:2px;overflow:hidden;background:#0c92df;max-width:100%;max-height:100%}div#n2-ss-0 .n2-ss-layer-ui-label-container:HOVER{max-width:none;max-height:none}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer.n2-active>.n2-ss-layer-ui-label-container,div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-over-delayed>.n2-ss-layer-ui-label-container{display:block}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-ui-label{display:inline-block;height:16px;font-size:10px;line-height:16px;color:#fff;padding:0 5px;vertical-align:top;text-transform:uppercase;border-left:1px solid #0b7dbe}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-label-action{padding:0;cursor:pointer;font-size:16px;display:none}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-active>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-label-action,#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container:HOVER .n2-ss-layer-ui-label-action{display:inline-block}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-label:first-child{border-left:0}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-layer-move{cursor:move}div#n2-ss-0 .n2-ss-layer-ui-label-container.invisible{visibility:hidden}.n2-ss-layer[data-type=col].n2-highlight{box-shadow:inset 0 0 0 1px #0c92df}div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-hover[data-type=col]{z-index:2}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer.n2-active{box-shadow:inset 0 0 0 1px #0c92df}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER #n2-ss-0 .n2-ss-layer[data-type=row].n2-active,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer .n2-ss-layer[data-type=col].n2-active{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}.n2-ss-move-layer .n2-ss-layer[data-type=col]{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}.n2-ss-move-layer #n2-ss-0 .n2-ss-layer:HOVER{box-shadow:none}div#n2-ss-0 .n2-ss-layer[data-type=col] .n2-ss-layer.ui-draggable-dragging,div#n2-ss-0 .n2-ss-layer[data-type=content] .n2-ss-layer.ui-draggable-dragging{z-index:100000;outline:0!important}.ui-item-overlay{display:none;position:absolute;top:0;left:0;width:100%;height:100%}.n2-ss-select-layer-mode .n2-ss-layer-selected .ui-item-overlay{display:block;background-color:RGBA(0,132,255,.4)}.n2-ss-item-html .ui-item-overlay,.n2-ss-item-iframe .ui-item-overlay{display:block}.n2-ss-layer .n2-ss-layer-cc,.n2-ss-layer .ui-resizable-ne,.n2-ss-layer .ui-resizable-nw,.n2-ss-layer .ui-resizable-se,.n2-ss-layer .ui-resizable-sw{opacity:0}.n2-ss-layer .ui-resizable-ne:HOVER,.n2-ss-layer .ui-resizable-nw:HOVER,.n2-ss-layer .ui-resizable-se:HOVER,.n2-ss-layer .ui-resizable-sw:HOVER,.n2-ss-layer-cc:HOVER,.ui-resizable-e:HOVER,.ui-resizable-n:HOVER,.ui-resizable-s:HOVER,.ui-resizable-w:HOVER{opacity:1}.n2-ss-layer[data-align=center][data-valign=bottom] .ui-resizable-s,.n2-ss-layer[data-align=center][data-valign=middle] .n2-ss-layer-cc,.n2-ss-layer[data-align=center][data-valign=top] .ui-resizable-n,.n2-ss-layer[data-align=left][data-valign=bottom] .ui-resizable-sw,.n2-ss-layer[data-align=left][data-valign=middle] .ui-resizable-w,.n2-ss-layer[data-align=left][data-valign=top] .ui-resizable-nw,.n2-ss-layer[data-align=right][data-valign=bottom] .ui-resizable-se,.n2-ss-layer[data-align=right][data-valign=middle] .ui-resizable-e,.n2-ss-layer[data-align=right][data-valign=top] .ui-resizable-ne{background:#0c92df;opacity:1;border:1px solid #fff}.n2-ss-layer-cc{position:absolute;font-size:.1px;display:block;z-index:92}.n2-ss-layer .ui-customresizable-handle,.n2-ss-layer .ui-resizable-handle{border-radius:50px}.n2-ss-layer .n2-ss-layer-cc,.n2-ss-layer .ui-customresizable-handle,.n2-ss-layer .ui-resizable-handle{display:none!important;background-image:none;border:1px solid #0c92df;height:7px;width:7px;background:#fff}.n2-ss-layer .ui-column-width-handle{display:none!important;position:absolute;top:25%;height:50%;cursor:ew-resize;width:5px;background:RGBA(12,146,223,.5);z-index:88;opacity:1;box-sizing:border-box!important;border-radius:5px}.n2-ss-layer .ui-column-width-handle:HOVER{background:RGBA(12,146,223,1)}.n2-ss-layer .ui-spacing-handle{display:none!important;z-index:89;background:#0c92df;opacity:.5;overflow:hidden}.n2-ss-layer .ui-spacing-handle.ui-spacing-under-spacing,.n2-ss-layer .ui-spacing-handle:HOVER{opacity:.8}.n2-ss-layer .ui-resizable-n{left:50%;top:-4px;margin-left:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-n{min-height:5px;cursor:s-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-n{top:0;margin-left:0;left:25%;width:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-n{left:0;bottom:100%;width:100%}.n2-ss-layer .ui-customresizable-e,.n2-ss-layer .ui-resizable-e{right:-4px;top:50%;margin-top:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-e{min-width:5px;cursor:w-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-e{top:25%;margin-top:0;right:0;height:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-e{top:0;left:100%;height:100%}.n2-ss-layer .ui-customresizable-s,.n2-ss-layer .ui-resizable-s{bottom:-4px;left:50%;margin-left:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-s{min-height:5px;cursor:n-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-s{bottom:0;margin-left:0;left:25%;width:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-s{bottom:auto;top:100%;left:0;width:100%}.n2-ss-layer .ui-customresizable-w,.n2-ss-layer .ui-resizable-w{left:-4px;top:50%;margin-top:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-w{min-width:5px;cursor:e-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-w{top:25%;margin-top:0;left:0;height:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-w{left:auto;right:100%;top:0;height:100%}.n2-ss-layer .ui-resizable-ne{right:-4px;top:-4px}.n2-ss-layer .ui-resizable-se{right:-4px;bottom:-4px}.n2-ss-layer .ui-resizable-sw{left:-4px;bottom:-4px}.n2-ss-layer .ui-resizable-nw{left:-4px;top:-4px}.n2-ss-layer .n2-ss-layer-cc{left:50%;top:50%;margin-top:-4px;margin-left:-4px}.n2-ss-layer.n2-active:HOVER{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.n2-ss-layer-cc,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.ui-customresizable-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.ui-resizable-handle,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-cc,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.ui-column-width-handle,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.ui-spacing-handle,.n2-ss-layer.n2-active:HOVER>.ui-customresizable-handle,.n2-ss-layer.n2-active:HOVER>.ui-resizable-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.n2-ss-layer-row>.ui-column-width-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.n2-ss-layer-row>.ui-spacing-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.ui-customresizable-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.ui-resizable-handle{display:block!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.ui-spacing-handle{display:none!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.n2-ss-layer-content>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-resizable-resizing>div>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-spacing-resizing>.ui-spacing-handle,.ui-resizable-resizing>.ui-spacing-handle,.ui-spacing-resizing>.ui-spacing-handle{display:block!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-spacing-resizing>.ui-spacing-handle.ui-spacing-under-spacing{opacity:1}#n2-ss-0 .n2-ss-layer-row.n2-ss-row-wrapped .ui-column-width-handle,#n2-ss-0 .ui-spacing-resizing .ui-column-width-handle{display:none!important}.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .ui-customresizable-handle,.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .ui-resizable-handle,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .n2-ss-layer-cc,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .ui-customresizable-handle,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .ui-resizable-handle{display:none!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active{overflow:visible!important}.n2-ss-item{position:relative;float:left;width:100%}.n2-ss-item-area,.n2-ss-item-imagearea,.n2-ss-item-video,.n2-ss-item-vimeo,.n2-ss-item-youtube{height:100%}.n2-ss-editor-group-mode-only,.n2-ss-editor-layer-mode-only,[data-placement=""] [data-placement],[data-placement=absolute] [data-placement]:not([data-placement=absolute]):not([data-placement=all]),[data-placement=content] [data-placement]:not([data-placement=content]):not([data-placement=all]),[data-placement=default] [data-placement]:not([data-placement=default]):not([data-placement=all]),[data-placement=group] [data-placement]:not([data-placement=group]):not([data-placement=all]),[data-placement=normal] [data-placement]:not([data-placement=normal]):not([data-placement=all]){display:none!important}.n2-ss-has-layers[data-component=group] .n2-ss-editor-group-mode-only,.n2-ss-has-layers[data-component=layer] .n2-ss-editor-layer-mode-only{display:inline-block!important}div#n2-ss-0 .n2-ss-layer-chain-parent{position:absolute;z-index:10;right:10px;top:10px;line-height:18px;font-size:12px;width:18px;display:none}.n2-ss-layer-edit-visible .n2-ss-mode-desktopPortrait #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active.n2-ss-layer-has-parent .n2-ss-layer-chain-parent,.n2-ss-mode-desktopPortrait #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active.n2-ss-layer-has-parent:HOVER .n2-ss-layer-chain-parent{display:inline-block}.n2-ss-layer-highlight{position:absolute;background:#0c92df;z-index:91;opacity:1}.n2-ss-layer-highlight-n{top:0;left:0;width:100%;height:1px}.n2-ss-layer-highlight-e{top:0;right:0;width:1px;height:100%}.n2-ss-layer-highlight-s{bottom:0;left:0;width:100%;height:1px}.n2-ss-layer-highlight-w{top:0;left:0;width:1px;height:100%}#n2-ss-0 .n2-ss-layer-row .n2-ss-layer-content{min-height:20px}[data-devicespecific]{position:relative}#n2-ss-devicespecific-settings{position:absolute;bottom:40px;left:0;padding:0 10px;white-space:nowrap;z-index:2}#n2-ss-devicespecific-settings *{cursor:pointer;background:#a1aeb5;display:inline-block;width:20px;height:20px;line-height:20px;text-align:center;font-size:16px;color:#fff;border-left:1px solid #5b6874}#n2-ss-devicespecific-settings>:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left:0}#n2-ss-devicespecific-settings>:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-ss-mode-desktopLandscape #n2-ss-devicespecific-settings .n2-i-mini-desktop-landscape,.n2-ss-mode-desktopPortrait #n2-ss-devicespecific-settings .n2-i-mini-desktop-portrait,.n2-ss-mode-mobileLandscape #n2-ss-devicespecific-settings .n2-i-mini-mobile-landscape,.n2-ss-mode-mobilePortrait #n2-ss-devicespecific-settings .n2-i-mini-mobile-portrait,.n2-ss-mode-tabletLandscape #n2-ss-devicespecific-settings .n2-i-mini-tablet-landscape,.n2-ss-mode-tabletPortrait #n2-ss-devicespecific-settings .n2-i-mini-tablet-portrait{background:#0c92df;border-color:#0b7dbe}.n2-ss-layer[data-type=col]>.n2-ss-layer-ui-label-container>.n2-ss-layer-ui-label-self{cursor:move}.n2-highlight-structure .n2-ss-layer[data-type=col]{box-shadow:0 0 0 2px #0c92df}.n2-ss-layer-under-creation{visibility:hidden!important}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layers-container>.n2-ss-layer>.n2-ss-layer-ui-label-container>.n2-ss-layer-ui-label-up,[data-editormode=canvas] div#n2-ss-0 .n2-ss-layer[data-type=content].n2-ss-content-empty{display:none}[data-editormode=content] div#n2-ss-0 .n2-ss-layer[data-type=content].n2-ss-content-empty{height:100%}div#n2-ss-0 .n2-ss-layer-content .n2-ss-layer.n2-active:HOVER{z-index:10}#n2-ss-editor-mode .n2-i{font-size:16px;vertical-align:middle}.n2-context-menu{display:none;position:absolute;left:0;top:0;font-family:"Montserrat",Arial,sans-serif;font-size:13px;background-color:#202934;color:#cedae2;z-index:1000000;border-radius:3px;line-height:25px}.n2-context-menu.n2-active{display:block}.n2-context-menu>div{padding:3px 10px;cursor:pointer}.n2-context-menu>div:HOVER{background-color:RGBA(255,255,255,.2)}.n2-context-menu>div *{margin:0 3px;vertical-align:middle}.n2-context-menu>div .n2-i{font-size:16px}#n2-ss32-content-mode-tutorial{background-color:#212d3a;margin:0 -1px;z-index:2;position:relative;color:#fff}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container{display:flex;align-items:center;max-width:960px}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container>div{margin:20px}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container a+a{margin:0 20px}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container p{color:#b2bfc9;font-size:14px;margin:20px 0}.n2-ss-section-outer{min-height:10px}[data-visibility=hidden],[data-visibility=hidden] *{visibility:hidden!important}div div#n2-ss-0 .n2-ss-static-slide .n2-ss-section-outer,div div#n2-ss-0 .n2-ss-static-slide div[data-type=content],div div#n2-ss-0 .n2-ss-static-slide div[data-type=content] div.n2-ss-section-main-content{visibility:visible}.n2-ss-sample-slides-container{display:none;position:relative;margin:0 -1px -1px;background-color:#202934;z-index:2}.n2-ss-add-slide-with-sample .n2-main-top-bar{display:none}.n2-ss-add-slide-with-sample .n2-ss-sample-slides-container{display:block}.n2-ss-add-slide-with-sample #n2-ss-devices,.n2-ss-add-slide-with-sample #n2-ss-toolbar,.n2-ss-add-slide-with-sample #smartslider-form,.n2-ss-add-slide-with-sample .n2-ss-edit-slide-top{display:none}.n2-ss-add-slide-with-sample #n2-ss-add-sidebar{top:0}.n2-ss-add-slide-with-sample #n2-ss-slide-canvas-container-inner{border-top:0}.n2-ss-sample-slides-container iframe{width:100%;height:240px;border:0}.n2-ss-sample-slide-settings{padding:20px;background:#212d3a;height:68px;display:flex}.n2-ss-sample-slide-settings .n2-ss-sample-slide-settings-col{flex:0 0 auto;margin:0 10px;display:flex;flex-direction:column;justify-content:space-around}.n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting{flex:0 0 auto;display:flex;align-items:center}.n2-ss-sample-slide-setting-label{color:#b2bfc9;font-size:10px;text-transform:uppercase;padding-right:20px}#n2-ss-sample-slide-setting-background-image{position:relative;width:100px;height:68px;background-size:cover;border-radius:5px;overflow:hidden;cursor:pointer}#n2-ss-sample-slide-setting-background-image .n2-i-close{position:absolute;right:0;top:0;display:block;width:16px;height:16px;border-bottom-left-radius:5px;background-color:#526377;color:#fff;font-size:14px;text-align:center;line-height:16px;cursor:pointer}.n2-ss-sample-slide-setting-field{margin-left:auto}.n2-ss-sample-slide-setting-field .ui-slider{width:100px;position:relative;background:#374d64;height:6px;margin:10px;border-radius:10px}.n2-ss-sample-slide-setting-field .ui-slider .ui-slider-handle{position:absolute;top:0;z-index:2;width:14px;height:14px;-ms-touch-action:none;touch-action:none;background:#fff;margin:-4px -7px 0;border-radius:50px;cursor:ew-resize}.n2-ss-sample-slide-settings .n2-ss-sample-slide-settings-col.n2-ss-sample-slide-settings-image-specific,.n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting.n2-ss-sample-slide-setting-gradient-specific{display:none}.n2-ss-sample-slide-settings.n2-ss-has-gradient .n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting.n2-ss-sample-slide-setting-gradient-specific,.n2-ss-sample-slide-settings.n2-ss-has-image .n2-ss-sample-slide-settings-col.n2-ss-sample-slide-settings-image-specific{display:flex}.n2-ss-scrollbar-wrapper{background-color:#212d3a;padding:4px;height:8px;z-index:10}.n2-scroll-disable .n2-ss-scrollbar-wrapper{visibility:hidden;height:0;padding:0}.n2-ss-scrollbar-wrapper .track{position:relative;height:8px}.n2-ss-scrollbar-wrapper .thumb{position:absolute;top:0;background-color:#49586a;height:8px;cursor:default;width:20px;z-index:2;border:0;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.n2-ss-scrollbar-wrapper.n2-ss-scrollbar-light{background-color:#b9c3c9}.n2-ss-scrollbar-wrapper.n2-ss-scrollbar-light .thumb{background-color:#fff}#n2-ss-zoom{width:280px;text-align:center;vertical-align:middle}#n2-ss-zoom .n2-ss-slider-zoom-container{position:relative;display:inline-block;vertical-align:middle;width:150px;height:34px;padding:0 23px}#n2-ss-zoom .n2-ss-slider-zoom-container>.n2-i{position:absolute;top:9px;color:#6b7986;font-size:16px}#n2-ss-zoom .n2-ss-slider-zoom-container .n2-i-minus{left:-18px}#n2-ss-zoom .n2-ss-slider-zoom-container .n2-i-plus{right:-18px}.n2-ss-slider-zoom-bg{position:absolute;left:0;top:50%;margin-top:-3px;width:100%;background:#505c69;height:6px;border-radius:3px}#n2-ss-slider-zoom{height:100%;position:relative;margin:0;background:0 0;border:none;border-radius:0}#n2-ss-slider-zoom .ui-slider-range{display:none}#n2-ss-slider-zoom .ui-slider-handle{position:absolute;top:50%;display:block;width:47px;height:22px;margin-top:-11px;margin-left:-23px;background-color:#e6eaee;background:#e6eaee;border:none;border-radius:3px;z-index:2;color:#7b8898;font-size:10px;text-align:center;line-height:22px;cursor:pointer}.n2-ss-slider-zoom-1{position:absolute;left:50%;top:0;margin-left:-1.5px;width:3px;height:100%;background-color:#6b7986}#n2-ss-lock{display:inline-block;position:absolute;right:-36px;top:9px;cursor:pointer;line-height:16px}#n2-ss-lock .n2-i{color:#6b7986;font-size:16px}#n2-ss-lock.n2-active .n2-i:before{content:"\e609"}.n2-ss-device-zoomer{min-width:280px}.n2-ss-device-zoomer #n2-ss-zoom{padding:10px 0;background:#212d3a;margin:0 auto;display:none;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.n2-ss-device-zoomer:HOVER #n2-ss-zoom{display:block}.n2-ss-device-zoomer .n2-ss-slider-zoom-1,.n2-ss-device-zoomer .n2-ss-slider-zoom-bg{background-color:#374d64}.n2-ss-device-zoomer #n2-ss-zoom #n2-ss-lock>.n2-i,.n2-ss-device-zoomer #n2-ss-zoom .n2-ss-slider-zoom-container>.n2-i{color:#4e667f}.n2-ss-device-zoomer #n2-ss-slider-zoom .ui-slider-handle{background-color:#526a80;color:#fff}#n2-ss-devices{height:60px}#n2-ss-devices.n2-ss-devices-compact>.n2-controls-panel{width:260px}#n2-ss-devices .n2-table{font-size:32px;color:#80a3b5;margin:0 auto}.n2-lb-header #n2-ss-devices .n2-table{color:#a4b0b7}html[dir=rtl] #n2-ss-devices .n2-table{float:left}#n2-ss-devices .n2-td{height:60px;vertical-align:middle;text-align:center;padding:0 15px;cursor:pointer}#n2-ss-devices .n2-td.n2-active{cursor:default;color:#0c92df}.n2-i-devices:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAAAeCAMAAABzNtkNAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACdlBMVEUAAAChrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrUZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrUZmeMAAAA99lBfAAAA0XRSTlMAJ6DHzCgytbY2MLMnoMfMKDK1tjYws5+ytLGfsrSxxh0ixh0il5qXmgY7a5SvvspsB2aHBjtrlK++ymwHZod+wiN+wiMSgbh6SiYQAnl9DBKBuHpKJhACeX0MNbmdQwQzNbmdQwQzRrtLAUa7SwHIpRWkyKUVpJgKUqLDnk2YClKiw55Nhq2KhIatioTLLlgOT8suWA5PcH9ZX3B/WV+sJcQqrqwlxCquKSmjXqNeV1eRiZGJCQmIiLq6AzQDNIK3SYK3SSQkCG2hCG2hsLA3NxRx1r0AAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAAE0UlEQVRo3s2a+18UVRTAN/eYJLmHJCAjS4pehG4vQrcHhq0bCrFu6BKkRmq+JSNTpBQpVlnjEY+wtAglFIjeWmCWZb7t8Se109z57Mzcc+eBLrPnl7nn3DOP8/3MvXPPueNyWZSbprhBKO4pU9W+N0+jnFJuIS47PVXrlDrd6gPp5NYZHhSKZ0aa2ve2mZRT+u3EZTMytU6ZGZafKAsMJUvtewftk0Jcdpbe6c4JEstGQ8lW+95F+6QTl52td7rb8hO5wagX7tFopC9pBZijVnPA8DYG4kGjXrxXo5G+pBXxPrWai4a3MY9X0BvT7te/Ow+IiNm5jRETtN4b0x7UvzsPiYiJ9YfzHsmfO8/rnTc3/9G8x6jQHhcNySd4YryTiBjnJ5AnC54qnL/A51swv/Dpgmeo0J4VDcnneGK8k4gY58ckp2ih+rEXFj3PExPPYhQx4vTrIJZbvEj92IuKX+CJiWcxihhxug1i/sVegMCLJUuWlpYuXVJSFgDwvlRuKWSqyxYxY12W4DIfYujliuUrwuEVyysqQ4i+V6oshUx12SJG6tWvAqxctTpuX71qJcC015KFWM3riGvWrosb1q1dgzjzDceIrXfDho2btD2bNm4A9/rkILbZg1u2btPatm3dgp7NDhGrroU3t/O+298Cd3UyEKupw7d38GfueAc9NY4Q8wdg5y5ZLa3f3dDw7nvsddu1EwJ+54kFQ7hnr9wMN+5ranr/A/a67d2DoaATxJohwub40v3y1+oAQ1YegWbnibVglM3x4YPy1+pDhqwqii0OEMtp9bYxrR7c7R0d7W74iBnavK05ThPL7fR1sWYjerp7ero9+DEzdPk6cyefWC8cUrQs+EQ6fBpPEhdDr9PEDuMRpZmNn0mHz+NJ4jI8PPnE+uALReuHDunQAf2K5Sgcc5rYAH6pNAexRzr04KBiOY4nJp9YBI6KiQ05TyyKx8XEhp0g1gtFijYij8qv4qPyUDKMymKlOSqPyq/jo/KIE6MyNvMPMe0bZeavZ4ah5Jj5h1nzW2Xmb2SGYUdm/tjqok9ZXXwnry6+L5X18r7kWF0MKKuLH+TVxY9hWa8acGR18f8K9iRD1j7S37+7ngE7ya9gE1G7MCMmrWBPMWTdo4OD+xoZsFP8CjYRtQtCj2VJI1SWNAK12ixpvwjYT4nOkkapLGkU67RZ0kERsJ8TkImPlegz8ZIxLhM3kERn4uMV+ky8YpzLxA3khld7xqRqz+m4/bRU7Un5xSwUQ2I3sAZbMy5Ve87EDWekak/6r0ahmRK7vhqs/7dYRfFsGaso/l52FqC1SFtRtLkz0mw2cu0QcwX/iFUUz1WyiuKflecQO4u1FUWbOyMtZiPXhJjLdV5ftT6vO9XO7putvSQLTjG5oK9aX9A52Nl9s7WXJNYv5l3Kj0g7I5H8S3kXuVOnXq4V86q9rNnhVYVNN3nXhgZjYi7XlYKrhVFpZyRaeLXgCteddq1OzKvuWpogbLrJuzY1GcE2FTkscXAJIWZD5LDEwSU1MTMrgF+t+iebmJkVMahWgxMhZmGv7C967KYSrql6p4n+RaCKkZqnNfI3PXYzCddMvZP1vwjsEGs7RgGbRf2p8k9AB2yif6rYIdZ1ggI2m/pT5d+QDljGf3zSNGZGqKPpAAAAAElFTkSuQmCC)}.n2-i-devices-all:before{background-position:0 0}.n2-i-devices-desktop:before{background-position:-40px 0}.n2-i-devices-tablet:before{background-position:-80px 0}.n2-i-devices-phone:before{background-position:-120px 0}.n2-active>.n2-i-devices-all:before{background-position:-160px 0}.n2-active>.n2-i-devices-desktop:before{background-position:-200px 0}.n2-active>.n2-i-devices-tablet:before{background-position:-240px 0}.n2-active>.n2-i-devices-phone:before{background-position:-280px 0}.n2-generator-insert-variable .n2-variable-container{height:90px;overflow:auto}.n2-generator-insert-variable .n2-group-container{height:40px;overflow:auto}.n2-generator-insert-variable .n2-group-container .n2-button,.n2-generator-insert-variable .n2-variable-container .n2-button{margin:3px}.n2-generator-insert-variable .n2-group-container .n2-button.n2-active,.n2-generator-insert-variable .n2-variable-container .n2-button.n2-active,.n2-ss-layer-picker.n2-active{background:#0c92df}.n2-generator-result-container{height:100px;overflow:auto;margin:0 3px}.n2-ss-layer-picker{background:#6b7986;color:#fff;font-size:16px;height:28px;line-height:28px;padding:0;text-align:center;width:28px;border-radius:3px;margin:0 10px 10px;cursor:pointer}#n2-ss-toolbar #n2-ss-layer-parent-linker.n2-under-pick,.n2-ss-layer-picker.n2-under-pick{background-color:#51b82d}#n2-ss-layer-parent-linker.n2-under-pick .n2-i-layerlink:before,.n2-ss-layer-picker.n2-under-pick .n2-i-layerlink:before{content:"\e64b"}.n2-ss-picker-overlay,.n2-ss-picker-overlay-tile{position:absolute;left:0;top:0;background:RGBA(25,153,227,.8);cursor:pointer;width:100%;height:100%;z-index:1000000;box-shadow:inset 0 0 0 1px rgba(0,0,0,.4)}.n2-ss-picker-overlay-tile{width:33%;height:33%}.n2-ss-picker-overlay-tile:HOVER,.n2-ss-picker-overlay:HOVER{background:RGBA(42,52,63,.9)}.n2-ss-picker-overlay-tile.n2-active,.n2-ss-picker-overlay-tile.n2-active:HOVER{background:RGBA(0,52,63,.9)}#n2-ss-toolbar #n2-ss-layer-parent-linker{display:none}.n2-ss-has-layers .n2-ss-mode-desktopPortrait #n2-ss-toolbar #n2-ss-layer-parent-linker,.n2-ss-has-ruler .n2-ruler>span{display:inline-block}.n2-ss-layer.n2-ss-picking-on-layer{z-index:1000000!important}.n2-ruler-container{position:absolute;left:0;top:0;height:100%;width:100%;visibility:hidden;z-index:10}.n2-ruler-container>*{visibility:visible}.n2-ruler,.n2-ruler-guide{position:absolute;left:0;top:0}.n2-ruler{box-sizing:border-box;white-space:nowrap}.n2-ruler>span{position:relative;display:none;vertical-align:top}.n2-ruler>span span{position:absolute;display:block;font-size:10px;color:#7b8898;line-height:10px}.n2-ruler-guide{display:none;z-index:2}.n2-ss-show-guides .n2-ruler-guide{display:block}.n2-ruler-guide .n2-ruler-guide-handle{position:absolute;background:#e6b625;left:0;top:0;width:9px;height:9px;cursor:pointer;font-family:'Nextend'!important;font-size:9px;color:#fff;line-height:9px;text-align:center}.n2-ruler-guide .n2-ruler-guide-handle:before{content:"\e90a"}.n2-ruler-horizontal{padding-left:1px;height:0;width:100%}.n2-ss-has-ruler .n2-ruler-horizontal{height:39px}.n2-ruler-horizontal>span.n2-ss-ruler-mark-large{height:20px}.n2-ruler-horizontal>span.n2-ss-ruler-mark-medium{height:10px}.n2-ruler-horizontal>span{width:9px;height:5px;border-right:1px solid #bcc4c8}.n2-ruler-horizontal span span{left:12px;top:10px}.n2-ruler-vertical .n2-ruler-guide{height:0;width:3000px}.n2-ss-lock-guides .n2-ruler-vertical .n2-ruler-guide{cursor:default}.n2-ruler-vertical .n2-ruler-guide .n2-ruler-guide-border{border-bottom:1px solid #ccaa2b;width:100%}.n2-ruler-vertical .n2-ruler-guide-handle{top:-4px}.n2-ruler-vertical{padding-top:1px;width:0;height:100%;background:#e9edf0;z-index:5}.n2-ss-has-ruler .n2-ruler-vertical{width:40px}.n2-ruler-vertical>span.n2-ss-ruler-mark-large{width:20px}.n2-ruler-vertical>span.n2-ss-ruler-mark-medium{width:10px}.n2-ruler-vertical>span{display:none;width:5px;height:9px;border-bottom:1px solid #bcc4c8}.n2-ss-has-ruler .n2-ruler-vertical>span{display:block}.n2-ruler-vertical span span{left:8px;top:12px}.n2-ruler-horizontal .n2-ruler-guide{width:0;height:3000px}.n2-ss-lock-guides .n2-ruler-horizontal .n2-ruler-guide{cursor:default}.n2-ruler-horizontal .n2-ruler-guide .n2-ruler-guide-border{border-right:1px solid #ccaa2b;height:100%}.n2-ruler-horizontal .n2-ruler-guide-handle{left:-4px}.n2-ruler-guide-handle{display:none}.n2-ss-has-ruler .n2-ruler-guide-handle{display:block}
|
1 |
+
#html-body header,.adminhtml-smartslider3-index #footer,.adminhtml-smartslider3-index .footer,.smartslider3-index-index footer{display:none}#html-body #anchor-content #n2-admin{mragin-top:30px}#html-body .header{position:relative;z-index:1100}.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;user-select:none}.n2-definition-list dt.n2-ss-slider-ordering{color:#fff;background-color:#212d3a;border:0}.n2-definition-list dt.n2-ss-slider-ordering>div{padding:0 30px}.n2-definition-list .n2-ss-slider-ordering .n2-button{min-width:28px;line-height:28px;height:28px;margin-left:10px;background-color:#54667b;color:#fff}.n2-definition-list .n2-ss-slider-ordering .n2-button.n2-active{background:#0c92df}.n2-definition-list dt.n2-ss-slider-ordering .n2-actions{background-color:#212d3a;padding-top:16px}.n2-definition-list .n2-ss-slider-ordering>.n2-actions a{display:inline-block;padding:0}.n2-definition-list .n2-ss-slider-ordering>.n2-actions .n2-i{vertical-align:top}.n2-ss-slide2-list li .n2-actions .n2-i-delete,.n2-ss-slide2-list li .n2-actions .n2-i-duplicate,.n2-ss-slide2-list li .n2-actions .n2-i-star{visibility:hidden}.n2-ss-slide2-list li .n2-actions .n2-i-star.n2-active,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-delete,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-duplicate,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-star{visibility:visible}.n2-lightbox-sidebar-list{overflow-y:auto}#n2-tab-widgets{border-bottom:0;margin-bottom:1000px}.n2-i-edit.n2-active{color:#0c92df}.n2-ss-live-preview span{text-decoration:line-through;vertical-align:middle}.n2-ss-live-preview .n2-button,.n2-widget-area{vertical-align:middle;margin:0 20px}.n2-ss-live-preview.n2-active span{text-decoration:none}.n2-ss-live-preview.n2-active .n2-button{display:none}.n2-widget-area{display:inline-block;width:80px;height:80px;position:relative;margin:0 10px}.n2-form .n2-widget-area{margin-bottom:10px}.n2-widget-area-inner{position:absolute;top:14px;left:14px;width:46px;height:46px;border:3px solid #bbc3cc;border-radius:3px}.n2-widget-area .n2-area{position:absolute;background-color:#a1aeb5;border-radius:2px;cursor:pointer;width:10px;height:10px;left:0;top:0}.n2-widget-area .n2-area.n2-active{background-color:#0c92df;cursor:default}.n2-widget-area .n2-area-1{left:35px}.n2-widget-area .n2-area-2{left:21px;top:21px}.n2-widget-area .n2-area-3{left:35px;top:21px}.n2-widget-area .n2-area-4{left:49px;top:21px}.n2-widget-area .n2-area-5{top:35px}.n2-widget-area .n2-area-6{left:21px;top:35px}.n2-widget-area .n2-area-7{left:49px;top:35px}.n2-widget-area .n2-area-8{left:70px;top:35px}.n2-widget-area .n2-area-9{left:21px;top:49px}.n2-widget-area .n2-area-10{left:35px;top:49px}.n2-widget-area .n2-area-11{left:49px;top:49px}.n2-widget-area .n2-area-12{left:35px;top:70px}.n2-ss-slider-publish{border-collapse:collapse;overflow:hidden}.n2-ss-slider-publish .n2-td{text-align:center;border-right:1px solid #ccd1d6;color:#6b7989;padding:48px 0 0}.n2-ss-slider-publish .n2-td .n2-h2 a{color:#6b7989}.n2-ss-slider-publish .n2-td.n2-last{border-right:0}.n2-ss-slider-publish div.n2-h2{line-height:30px;font-size:18px}.n2-ss-slider-publish div.n2-h4{line-height:26px}.n2-ss-slider-publish .n2-code{display:inline-block;padding:16px 30px;line-height:20px;border-radius:3px;background-color:#f5e293;text-align:left;margin:17px 0;color:#6f653f;font-size:12px;border:0}.n2-ss-slider-publish img{margin-top:17px;margin-bottom:-10px}.n2-ss-generator-modal .n2-modal-content h3{text-align:left}.n2-generator-records td div{max-height:100px;overflow:hidden;padding:10px;margin:-10px}.n2-generator-records td:HOVER div{overflow-y:auto;overflow-x:visible}#n2-admin[data-slider-type=block] .n2-fm-arrow,#n2-admin[data-slider-type=block] .n2-fm-autoplay,#n2-admin[data-slider-type=block] .n2-fm-bar,#n2-admin[data-slider-type=block] .n2-fm-bullet,#n2-admin[data-slider-type=block] .n2-fm-indicator,#n2-admin[data-slider-type=block] .n2-fm-slides,#n2-admin[data-slider-type=block] .n2-fm-thumbnail{display:none}.n2-ss-container-device{position:relative;background-color:#fff;border:1px solid #ccd1d6;border-width:0 1px;margin:40px auto 0}.n2-modal.n2-ss-go-pro .n2-modal-window{text-align:center;line-height:2}.n2-modal.n2-ss-go-pro .n2-ss-rate{margin:50px -20px 0;background:url(../images/free/rate.png);height:90px;line-height:90px;color:#fff}.n2-modal.n2-ss-go-pro .n2-ss-rate .n2-h3{display:inline-block;margin-right:30px}.n2-modal.n2-ss-go-pro .n2-modal-controls{margin-bottom:40px}.n2-ss-create-slider-free-sample{float:left;height:70px;width:170px;cursor:pointer}.n2-ss-create-slider-free-sample:HOVER{background-position:0 -80px}.n2-ss-modal-subscribe>.n2-modal-window{text-align:center}.n2-ss-modal-subscribe .n2-form{margin:0 -20px}.n2-ss-modal-subscribe .n2-h3{margin:0 auto;width:95%;text-align:center;line-height:2}.n2-ss-preview-subscribe .n2-input-button{display:inline-block}.n2-input-button,.n2-ss-modal-subscribe .n2-input-button{display:inline-block;margin-top:20px}.n2-input-button>*,.n2-ss-modal-subscribe .n2-input-button>*,.n2-ss-preview-subscribe .n2-input-button>*{display:inline-block;white-space:nowrap}.n2-input-button input,.n2-input-button input:focus,.n2-ss-modal-subscribe input,.n2-ss-modal-subscribe input:focus,.n2-ss-preview-subscribe input,.n2-ss-preview-subscribe input:focus{margin:0 auto;width:250px;height:36px;border:2px solid #b9c3c9;border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px;overflow:hidden;padding:0 10px;line-height:36px;box-shadow:none;color:#7b8898;font-size:12px;background:#fff}.n2-input-button .n2-button,.n2-ss-modal-subscribe .n2-input-button .n2-button,.n2-ss-preview-subscribe .n2-input-button .n2-button{border-top-left-radius:0;border-bottom-left-radius:0}.n2-ss-preview-subscribe{position:fixed;left:50%;margin-left:-500px;bottom:-100px;transition:bottom .5s ease;background:url(../images/free/subscribepreview.png);width:1000px;height:90px;z-index:1000}.n2-ss-preview-subscribe.n2-active{bottom:10px}.n2-ss-preview-subscribe-close{position:absolute;top:-12px;right:-12px;width:24px;height:24px;cursor:pointer;background:url(../images/free/close.png) no-repeat center center}.n2-ss-preview-subscribe .n2-input-button{position:absolute;right:20px;top:0;margin-top:28px}.n2-ss-slider-edit>.n2-form>.n2-form-tab{margin:20px 0 0;border-radius:0;border:0}.n2-ss-slider-edit>.n2-form>.n2-form-tab .n2-form-matrix-views{border-radius:0}.n2-box-add-license.n2-ss-license-has-active-key,.n2-box-license-activated.n2-ss-license-no-active-key{display:none}#n2-ss-slider-container,#n2-ss-slides{position:relative;padding:25px}.n2-ss-sliders .n2-box-new-slider>a:before{content:"\e952"}.n2-ss-sliders .n2-box-template-library>a:before{content:"\e951"}.n2-box-up-group>a:before{content:"\e958"}.n2-box-insert-group>a:before{content:"\e959"}.n2-ss-sliders-header>*{margin:0 10px}html[data-sliders='0'] .n2-ss-sliders-header{visibility:hidden}.n2-ss-box-slider{cursor:pointer}#n2-ss-slider-container[data-groupid="0"] .n2-ss-remove-from-group,.n2-ss-box-slider-group .n2-ss-add-to-group,.n2-ss-box-slider-group .n2-ss-remove-from-group,.n2-ss-slider-over-group .n2-box-sortable-placeholder,html[data-slides='0'] .n2-ss-slider-edit{display:none}.n2-ss-slides-outer-container{display:block}.n2-modal-window .n2-ss-slides-outer-container{height:100%;overflow:auto}.n2-ss-slides-container{position:relative;margin:0 -10px}.n2-slide-first.n2-i{line-height:16px}.n2-slide-first.n2-i,.n2-slide-published{font-size:16px;padding:3px}.n2-i-unpublished{color:#c54633}.n2-slide-state-published .n2-i-unpublished{color:#6fbc49}.n2-slide-state-published .n2-i-unpublished:before{content:"\e60c"}.n2-box.n2-first-slide:HOVER .n2-slide-first,.n2-slide-first,.n2-slide-is-first{display:none}.n2-first-slide .n2-slide-is-first{display:inline-block}.n2-slide-duplicate{margin-right:5px}.n2-slide-delete,.n2-slide-duplicate,.n2-slide-selected{padding:0;width:24px}#n2-ss-slides .n2-box.n2-ss-slide-active{box-shadow:0 0 0 3px #0c92df}#n2-ss-slides .n2-box-slide-drag-images,#n2-ss-slides .n2-box-slide-dummy{text-align:center;color:#7b8898;box-sizing:border-box;border:2px dashed #b2bfc9}#n2-ss-slides .n2-box-slide-dummy{background:#e9edf0;background-image:url(../images/dummy-slide.png);background-repeat:no-repeat;background-position:center 36px;font-size:14px;line-height:200px}#n2-ss-slides .n2-box-slide-drag-images{background:url(../images/drag.png) no-repeat center 4px;padding:90px 60px 0;line-height:12px;box-shadow:none}html:not([data-slides='0']) #n2-ss-slides .n2-box-dummy,html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-drag-images,html:not([data-slides='0']) #n2-ss-slides-container .n2-box-slide-dummy{display:none}.n2-ss-slides-control{position:relative;padding:22px 10px;border-bottom:1px solid RGBA(0,0,0,.3)}.n2-ss-slides-control .n2-button{margin:0 10px}.n2-slides-add{vertical-align:bottom;margin:-2px}#n2-ss-slides .n2-box-slide-drag-upload{display:none;position:absolute;z-index:101;left:0;top:0;width:100%;height:100%;background-color:rgba(32,41,52,.9);border:0;right:0;bottom:0;margin:0;vertical-align:bottom;line-height:130px;text-align:center;color:#fff}#n2-ss-slides .n2-drag-over .n2-box-slide-drag-upload{display:block}.n2-box-slide .n2-button.n2-sidebar-list-bg:HOVER{background-color:#0c92df}.n2-ss-quick-slides-edit-modal .n2-modal-content table{border-spacing:10px;border-collapse:separate;margin:10px auto}.n2-ss-quick-slides-edit-modal .n2-modal-content table td{padding:0}.n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label{margin-top:0;margin-bottom:3px}.n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label label{font-size:11px}.n2-slide-state-first [data-action=setFirst],.n2-slide-state-published [data-action=publish],[data-action=generator],[data-action=unpublish]{display:none}.n2-slide-state-has-generator [data-action=generator],.n2-slide-state-published [data-action=unpublish]{display:block}.n2-box-slide .n2-i-star{display:none}.n2-box-slide.n2-slide-state-first .n2-i-star{display:inline;color:#e19f21;font-size:16px}#n2-ss-slides .n2-box:HOVER img{opacity:.1}.n2-ss-slides-header{position:relative;z-index:9;color:#6b7989;margin-top:-10px}.n2-ss-bulk-controls{visibility:hidden}.n2-ss-has-box-selection .n2-ss-bulk-controls{visibility:visible}.n2-ss-slides-header .n2-button-menu-open .n2-button-menu{right:-90px}#n2-ss-slides .n2-box-slide-add{display:inline-block;color:#b2bfc9;background:0 0;text-align:center;z-index:5}#n2-ss-slides .n2-box-slide-add>.n2-add-quick-image,.n2-box-add-sample-slide>a{width:100%;height:135px;padding:0}#n2-ss-slides .n2-box-slide-add>.n2-add-quick-image:before,.n2-box-add-sample-slide>a:before{display:block;font-family:'Nextend'!important;font-size:48px;line-height:68px;content:"\e981";margin-top:20px}.n2-box-add-sample-slide>a:before{content:"\e97d"}.n2-ss-slides-header>*{vertical-align:middle;display:inline-block}.n2-ss-slides-header .n2-h5,.n2-ss-slides-header .n2-h5 a{margin-right:10px;color:#6b7986}.n2-ss-slides-header .n2-h5 .n2-i{font-size:16px}.n2-top-bar-menu .n2-ss-back-dashboard:before{content:"\e94a"}.n2-top-bar-menu .n2-ss-back-slider:before{content:"\e94b"}.n2-top-bar-menu .n2-ss-back-slides:before{content:"\e91a"}.n2-top-bar-menu>#n2-ss-preview:before{content:"\e92d"}.n2-ss-block-slides-notice{display:none;color:#7b8898}html:not([data-slides='0']):not([data-slides='1']) #n2-admin[data-slider-type=block] .n2-ss-block-slides-notice{display:block}html[data-slides='0'] .n2-ss-create-static-slide{display:none}div#n2-ss-0:HOVER .n2-ss-static-slide{display:none}div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide{display:flex}.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .n2-ss-layer-cc,.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-customresizable-handle,.n2-ss-select-layer-mode #n2-ss-0 .n2-ss-layer-selected .ui-resizable-handle{display:none!important}.n2-ss-select-layer-mode-group .n2-list li.n2-ss-layerlist-row.n2-active.n2-selected{color:#b2bfc9}#n2-ss-0 .n2-ss-layer{cursor:not-allowed}#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer{cursor:move;background:RGBA(0,0,0,0)}#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-type=col],#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer[data-type=col] .n2-ss-layer{cursor:pointer}#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked,#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked{cursor:auto}.n2-ss-preview-mode #n2-ss-0 .n2-ss-layer{cursor:default}#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-cc,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-chain-parent,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .ui-customresizable-handle,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .ui-resizable-handle,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-highlight,.n2-ss-preview-mode #n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer-selected .ui-item-overlay{display:none!important}.n2-grid{background:#4affff;position:absolute;left:0;top:0;z-index:1000000;display:none}.n2-grid-h{width:100%;height:1px}.n2-grid-v{height:100%;width:1px}.n2-sidebar{width:340px}.n2-ss-edit-slide-top{background:#fff;border-bottom:1px solid #ccd1d6;padding:30px 20px 30px 40px;display:flex;flex-wrap:nowrap;justify-content:space-between;flex-flow:row}.n2-ss-edit-slide-top-thumbnail{width:200px;height:135px;cursor:pointer}.n2-ss-edit-slide-top-thumbnail img{width:200px;height:135px;border-radius:5px}.n2-ss-edit-slide-top-actions{width:180px;text-align:left;vertical-align:middle;flex:1}.n2-ss-edit-slide-top-actions>*{margin:10px 0}.n2-ss-edit-slide-top-details{flex:1;align-self:flex-end;padding:0 20px}.n2-ss-edit-slide-top-details .n2-h1{color:#606d7b;margin-bottom:15px;cursor:pointer;line-height:30px}.n2-ss-edit-slide-top-details .n2-h1:HOVER:after{font-family:'Nextend'!important;content:"\e94f";font-size:22px;vertical-align:top;margin:0 5px;color:#b0b9bf}.n2-ss-edit-slide-top-details .n2-h4 a{color:#7b8898}.n2-ss-edit-slide-top-details .n2-h4 a .n2-i{font-size:16px}.n2-ss-edit-slide-top-tabs{margin-top:15px}.n2-ss-edit-slide-top-tabs a{margin:0}.n2-ss-edit-slide-top-tabs a.n2-active{color:#fff;background-color:#0c92df;border-color:#0c92df}.n2-ss-edit-slide-top-tabs .n2-button{border-radius:0;border-left:0;padding:0 20px}.n2-ss-edit-slide-top-tabs .n2-button.n2-first{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left:2px solid #e0e6ed}.n2-ss-edit-slide-top-tabs .n2-button.n2-last{border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-ss-edit-slide-top-tabs .n2-button.n2-active{background:#0c92df;color:#fff;border-color:#0c92df}.n2-ss-edit-slide-top-tabs .n2-button.n2-active:not(.n2-first){border-left:2px solid #0c92df;margin-left:-2px}#n2-form-matrix-slide-settings{margin:0;border:0;border-radius:0}.n2-ss-slider-real-container{position:relative}.n2-ss-slider-outer-container{position:relative;float:left}.n2-ss-canvas-slider-container{padding-bottom:99px;float:left;margin:10px}.n2-ss-has-ruler .n2-ss-canvas-slider-container{margin:40px 0 0 40px}.n2-i-desktopPortrait:before{content:'\e925'}.n2-i-desktopLandscape:before{content:'\e95a'}.n2-i-tabletPortrait:before{content:'\e928'}.n2-i-tabletLandscape:before{content:'\e927'}.n2-i-mobilePortrait:before{content:'\e92a'}.n2-i-mobileLandscape:before{content:'\e929'}#n2-tab-basiccsspreset{background-color:#3c4958;z-index:3}#n2-tab-basiccsspreset>.n2-h2{margin-bottom:0}.n2-basiccss-show-preset-list .n2-editor-header .n2-ss-button-container>.n2-basiccss-choose,.n2-editor-header .n2-ss-button-container>.n2-basiccss-back{display:none}.n2-basiccss-show-preset-list .n2-editor-header .n2-ss-button-container>.n2-basiccss-back{display:inline-block}.n2-ss-preview-modal .n2-modal-window{background-color:#e9edf0}#n2-admin.n2-ss-mode-desktopPortrait .n2-ss-responsive-helper,.n2-ss-background-type-color .n2-ss-background-image-param,.n2-ss-background-type-color .n2-ss-background-video-param,.n2-ss-background-type-gradient .n2-ss-background-image-param,.n2-ss-background-type-gradient .n2-ss-background-video-param,.n2-ss-background-type-image .n2-ss-background-video-param,body[data-editormode=content] #n2-admin .n2-ss-responsive-helper{display:none}#n2-tab-animations-events td.n2-label{padding:0}#n2-tab-animations-events td.n2-element{padding:6px 0}.n2-ss-editor-window-notice{padding:8px 10px;line-height:18px;background:#6b7986;color:#fff}.n2-ss-editor-window-notice a{color:#ffb527}#n2-ss-slide-edit-slides{display:none;border-bottom:1px solid #e0e6ed}.n2-ss-show-slides #n2-ss-slide-edit-slides{display:block}.n2-ss-show-slides a.n2-ss-back-slides,.n2-ss-show-slides a.n2-ss-back-slides:before{color:#fff}.n2-ss-columns-element{background:#28313a}.n2-ss-columns-element-add-col{vertical-align:top;display:inline-block;background:#51b82d;width:28px;height:28px;border-radius:3px;margin:8px 0;cursor:pointer;text-align:center;color:#fff;font-size:16px}.n2-ss-columns-element-add-col .n2-i,.n2-ss-columns-element-container .n2-ss-columns-element-handle .n2-i{line-height:28px}.n2-ss-columns-element-container{vertical-align:top;position:relative;width:300px;display:inline-flex;padding:8px;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;overflow:hidden}.n2-ss-columns-element-container>.n2-ss-columns-element-column{position:relative;flex:0 0 auto;background:#51b82d;height:28px;line-height:28px;width:25%;color:#fff;text-align:center;overflow:hidden;cursor:move;border-radius:3px;min-width:5px}.n2-ss-columns-element-container .n2-ss-columns-element-handle{display:block;width:11px;height:28px;background:#202934;flex:0 0 11px;border-radius:3px;margin:0 2px;cursor:ew-resize;color:#9aa7b2;text-align:center}.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-handle{display:none}.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-column{margin-right:15px}.n2-ss-columns-element-container.n2-sortable-currently-sorted .n2-ss-columns-element-column:last-child{margin-right:0}.n2-ss-section-main-content{min-height:20px}#n2-ss-layer-window{z-index:100000;position:fixed;left:100px;top:100px;width:355px}#n2-ss-layer-window.n2-ss-layer-window-minized .n2-ss-layer-window-resizer,.n2-ss-has-layers.n2-ss-layer-edit-visible.n2-ss-preview-mode #n2-ss-layer-window,.n2-ss-layer-edit-visible.n2-ss-move-layer #n2-ss-layer-window,.n2-ss-layer-edit-visible.n2-ss-resize-layer #n2-ss-layer-window,body:not(.n2-ss-has-layers) #n2-ss-layer-window,body:not(.n2-ss-layer-edit-visible) #n2-ss-layer-window{display:none}#n2-ss-layer-window.n2-ss-layer-window-minized{height:30px!important}#n2-ss-layer-window.n2-ss-layer-window-minized .n2-i-minimize:before{content:'\e915'}#n2-ss-layer-window .n2-ss-layer-window-actions{display:none;position:absolute;top:0;left:-35px;width:32px;background-color:#202934;border-radius:3px}#n2-ss-layer-window .n2-ss-layer-window-actions>.n2-button{width:32px;height:32px;line-height:32px;color:#b0bdc7}#n2-ss-layer-window .n2-ss-layer-window-resizer{height:7px;width:100%;cursor:ns-resize;text-align:center;color:#95a1ab;bottom:0;background:#202934;border-bottom-left-radius:5px;border-bottom-right-radius:5px}#n2-ss-layer-window .n2-ss-layer-window-crop{position:relative;width:100%;height:100%;border-radius:3px;box-shadow:0 1px 10px RGBA(0,0,0,.5);overflow:hidden;background:#3c4958;z-index:2}.n2-ss-layer-window-title{position:relative;line-height:60px;height:60px;overflow:hidden;background:#202934;font-size:12px;color:#cbd6df;text-align:left}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav{position:absolute;top:0;line-height:30px;height:30px;margin:0 5px}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav-left{left:0}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav-right{right:0}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav>*{display:inline-block;width:20px;height:30px;line-height:30px;font-size:16px;color:#fff;padding:0;vertical-align:top;text-align:center}.n2-ss-layer-window-title .n2-ss-layer-window-title-nav .n2-i{vertical-align:middle}.n2-ss-layer-window-title .n2-ss-layer-window-title span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 60px;text-align:center}.n2-ss-layer-window-breadcrumb{display:none;height:22px;font-size:11px;color:#b2bfc9;background-color:#202934;border-bottom:1px solid #1a2028;text-transform:uppercase;padding:0 5px}.n2-ss-layer-window-breadcrumb.n2-has-breadcrumb{display:block}.n2-ss-layer-window-breadcrumb *{display:inline-block;height:22px;vertical-align:top;line-height:22px}.n2-window-title-structure-nav span{padding:0 5px;cursor:pointer}.n2-window-title-structure-nav .n2-i-mini-arrow-thin{font-size:16px;padding:0}.n2-window-title-structure-nav:last-child{color:#fff}.n2-window-title-structure-nav:last-child .n2-i-mini-arrow-thin{display:none}#n2-tabbed-slide-editor-settings .n2-tabs{position:relative;overflow-y:auto;overflow-x:hidden}#n2-ss-layer-window table,#n2-ss-layer-window tbody,#n2-ss-layer-window tr{display:block}#n2-ss-layer-window td{display:block;width:auto}#n2-ss-layer-window .n2-label{background:#3c4958;border-top:1px solid #303b47;padding:3px 10px 0}#n2-ss-layer-window .n2-empty-label{padding:0;height:4px}#n2-ss-layer-window .n2-empty-group-label{padding:0;height:0}#n2-ss-layer-window .n2-label label{color:#b2bfc9;font-size:10px}#n2-ss-layer-window .n2-element{background:#3c4958;border-top:0;padding:0}#n2-ss-layer-window textarea{max-width:290px!important;width:290px!important}#n2-ss-layer-window .n2-form-element-button{max-width:38px;overflow:hidden}#n2-ss-layer-window .n2-sidebar-row{line-height:34px;background:#28313a}#n2-ss-layer-window .n2-list li,#n2-ss-layer-window .n2-sidebar-row{border-bottom:1px solid RGBA(0,0,0,.2)}#n2-ss-layer-window .n2-button-m{height:24px;line-height:24px}#n2-ss-layer-window .n2-sidebar-tab-switcher{border:0;border-collapse:separate}#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td{font-size:11px;line-height:47px;height:47px;border:1px solid #1a2028;border-left:0;color:#b2bfc9}#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td .n2-i{font-size:32px;line-height:47px}#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td.n2-active{background:#0c92df;color:#fff}#n2-ss-layer-window .n2-has-underline>.n2-underline::after,#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td[data-tab=style]{display:none}#n2-ss-layer-window.n2-ss-has-design-option .n2-sidebar-tab-switcher .n2-td[data-tab=style]{display:table-cell}#n2-ss-layer-window .n2-ss-layer-window-title{line-height:30px;height:30px;cursor:move;border-top-left-radius:5px;border-top-right-radius:5px}#n2-ss-layer-window .n2-ss-layer-window-title .n2-ss-layer-window-title-inner{white-space:nowrap;margin:0 10px;text-align:center}#n2-ss-layer-window .ui-autocomplete{padding:0;max-height:200px;overflow-y:auto;overflow-x:hidden}#n2-ss-layer-window .n2-form-element-autocomplete .ui-autocomplete .ui-menu-item{padding-right:20px}#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner>a,#n2-ss-layer-window .n2-ss-generator-param{display:none}.n2-ss-dynamic-slide #n2-ss-layer-window .n2-ss-generator-param{display:block}#n2-tabbed-animations-tabbed>.n2-table{border-spacing:8px;border-collapse:separate;background:#28313a;border-bottom:1px solid #20282f}#n2-tabbed-animations-tabbed .n2-sidebar-tab-switcher .n2-td{line-height:28px;height:28px;border:0;border-radius:50px}#n2-tabbed-animations-tabbed .n2-editor-header.n2-h2{background:#303b47;border-bottom:1px solid #28313a;position:relative}.n2-ss-small-more{float:right;margin:-38px 20px 0}html[dir=rtl] .n2-ss-small-more{float:left}.n2-button-single-animation-play.n2-active .n2-i:before{content:'\e607'}#n2-ss-add-sidebar{background:#212d3a;position:absolute;left:-1px;top:54px;bottom:-1px;width:50px;text-align:center}#n2-ss-add-sidebar .n2-ss-add-sidebar-inner{position:relative;padding-top:.01px}#n2-ss-add-sidebar .n2-ss-add-sidebar-inner>*{margin-top:10px;color:#80a3b5}#n2-ss-add-sidebar .n2-ss-add-sidebar-inner>.n2-button-blue,.n2-ss-theme-dark .n2-ruler>span span{color:#fff}#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner>*{margin-top:0}#n2-ss-add-sidebar.n2-active{width:341px;z-index:1010}#n2-ss-add-sidebar.n2-active .n2-ss-add-layer-button{margin:0;background:0 0;position:absolute;top:16px;right:5px}#n2-ss-add-sidebar.n2-active .n2-ss-add-layer-button .n2-i:before{content:"\e90a";color:#b2bfc9}#n2-ss-add-sidebar.n2-active .n2-ss-add-sidebar-inner{width:341px!important}#n2-ss-add-sidebar.n2-active .n2-ss-available-layers{display:block}.n2-ss-available-layers .n2-sidebar-tab-switcher{border:0}.n2-ss-available-layers-container{width:300px;margin:0 auto;padding:10px 0}.n2-ss-slide-item-group{color:#b2bfc9;padding:4px 5px 1px}.n2-ss-addlayer .n2-ss-available-layers{display:none;box-sizing:border-box;white-space:normal;text-align:left}.n2-ss-core-item{display:inline-block;margin:5px;background-color:#6b7986;color:#fff;line-height:15px;cursor:pointer;text-align:center;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:90px;min-height:73px;z-index:1000;vertical-align:top;padding-bottom:5px}.n2-ss-core-item:before{font-family:'Nextend';font-size:32px;content:"\e943";display:block;line-height:32px;margin-top:16px;margin-bottom:3px}.n2-ss-core-item[data-item=heading]:before{content:"\e945"}.n2-ss-core-item[data-item=text]:before{content:"\e944"}.n2-ss-core-item[data-item=button]:before{content:"\e942"}.n2-ss-core-item[data-item=imagearea]:before{content:"\e950"}.n2-ss-core-item[data-item=icon2]:before,.n2-ss-core-item[data-item=icon]:before{content:"\e941"}.n2-ss-core-item[data-item=input]:before{content:"\e939"}.n2-ss-core-item[data-item=iframe]:before{content:"\e938"}.n2-ss-core-item[data-item=area]:before{content:"\e937"}.n2-ss-core-item[data-item=list]:before{content:"\e93e"}.n2-ss-core-item[data-item=caption]:before{content:"\e940"}.n2-ss-core-item[data-item=transition]:before{content:"\e93f"}.n2-ss-core-item[data-item=youtube]:before{content:"\e93d"}.n2-ss-core-item[data-item=vimeo]:before{content:"\e93c"}.n2-ss-core-item[data-item=video]:before{content:"\e93b"}.n2-ss-core-item[data-item=html]:before{content:"\e93a"}.n2-ss-core-item[data-item=progressbar]:before{content:"\e982"}.n2-ss-core-item[data-item=imagebox]:before{content:"\e983"}.n2-ss-core-item[data-item=counter]:before{content:"\e984"}.n2-ss-core-item[data-item=circlecounter]:before{content:"\e985"}.n2-ss-core-item[data-item=audio]:before{content:"\e986"}.n2-ss-core-item[data-item=structure]:before{font-size:74px;margin-top:24px}.n2-ss-core-item[data-item=structure][data-type="1col"]:before{content:"\e967"}.n2-ss-core-item[data-item=structure][data-type="2col"]:before{content:"\e966"}.n2-ss-core-item[data-item=structure][data-type="3col"]:before{content:"\e961"}.n2-ss-core-item[data-item=structure][data-type="4col"]:before{content:"\e95f"}.n2-ss-core-item[data-item=structure][data-type="2col-60-40"]:before{content:"\e965"}.n2-ss-core-item[data-item=structure][data-type="2col-40-60"]:before{content:"\e964"}.n2-ss-core-item[data-item=structure][data-type="2col-80-20"]:before{content:"\e963"}.n2-ss-core-item[data-item=structure][data-type="2col-20-80"]:before{content:"\e962"}.n2-ss-core-item[data-item=structure][data-type="3col-20-60-20"]:before{content:"\e960"}.n2-ss-core-item[data-item=structure][data-type=special]:before{content:"\e95d"}#n2-ss-toolbar{z-index:9;position:relative;height:28px;line-height:28px;background:#f2f5fa;white-space:nowrap;padding:13px 10px}.n2-ss-slider-visible #n2-ss-slide-canvas-container #n2-ss-toolbar{height:auto}#n2-ss-slide-canvas-container.n2-scroll-disable #n2-ss-toolbar{height:28px;border-bottom:0}#n2-ss-toolbar>*{line-height:28px;height:28px;vertical-align:top;display:inline-block}#n2-ss-toolbar .n2-ss-tool{margin:0 5px;display:inline-block;vertical-align:top!important}#n2-ss-toolbar .n2-ss-tool.n2-form-element-text{height:24px;line-height:24px;position:relative}#n2-ss-toolbar .n2-text-sub-label{font-size:16px}#n2-ss-layer-list>.n2-list>li li,.n2-ss-theme-dark #n2-ss-slide-canvas-container-inner,.n2-ss-theme-dark .n2-ruler-vertical{background-color:#28313a}.n2-ss-preview-mode .n2-main-top-bar{opacity:0}#n2-ss-slide-canvas-settings{display:inline-block;position:relative}#n2-ss-slide-canvas-settings>.n2-button{width:28px;padding:0;text-align:center}#n2-ss-slide-canvas-settings.n2-active>.n2-button{background-color:#0c92df;border-color:#0c92df}#n2-ss-slide-canvas-settings .n2-ss-settings-panel{position:absolute;left:0;top:28px}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner{margin-top:6px;min-width:180px;box-shadow:0 0 5px 0 RGBA(0,0,0,.3);background-color:#fff;border-radius:3px}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner>*{display:block;line-height:32px;margin:0 10px;position:relative;text-align:left}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner a{color:#7b8898}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-panel-action{color:#0c92df}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick{display:block;position:absolute;right:0;top:8px;border-radius:3px;border:2px solid #8793a2;width:12px;height:12px}#n2-ss-layer-show-on,#n2-ss-slide-canvas-settings.n2-active .n2-ss-settings-panel{display:inline-block}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-enabled .n2-setting-tick{border-color:#1999e3;background-color:#1999e3}#n2-ss-slide-canvas-settings .n2-ss-settings-panel,#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-tick .n2-i{display:none}#n2-ss-slide-canvas-settings .n2-ss-settings-panel-inner .n2-setting-enabled .n2-i{display:inline-block;color:#fff;font-size:16px;line-height:12px;margin:0 -2px}#n2-ss-toolbar .n2-button-grey{background-color:#a1aeb5}#n2-ss-toolbar .n2-radio-option{background-color:#a1aeb5;border-left:1px solid #8c99a1}#n2-ss-toolbar .n2-radio-option.n2-first{border-left-width:0}#n2-ss-toolbar .n2-radio-option.n2-active{background-color:#0c92df;border-color:#0c92df}#n2-ss-toolbar .n2-radio-option.n2-sub-active{background-color:#51b82d;border-color:#51b82d}#n2-ss-toolbar .n2-ss-tool.n2-button{height:28px;line-height:28px;background-color:#a1aeb5}#n2-ss-toolbar .n2-ss-tool.n2-button-icon{padding:0;width:28px}#n2-ss-toolbar .n2-ss-tool.n2-button.n2-active{background-color:#0c92df}#n2-ss-toolbar .n2-ss-tool.n2-button.n2-sub-active{background-color:#51b82d}#n2-ss-toolbar .ui-autocomplete{max-width:100%}#n2-ss-layer-parent-linker,#n2-ss-theme,#n2-ss-toolbar #n2-ss-theme.n2-active{width:28px;height:28px;line-height:28px;padding:0;background-color:#a1aeb5}#n2-ss-theme.n2-active .n2-i:before{content:"\e64c"}#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-ss-ll-dragging-parent{background:#000}#n2-ss-layer-list>.n2-list>li{background-color:#303b47}#n2-ss-layer-list .n2-list>li{line-height:31px}#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-active,#n2-ss-layer-list .n2-list .n2-ss-layerlist-row.n2-selected,.n2-list .n2-ss-layerlist-row.n2-active,.n2-list .n2-ss-layerlist-row.n2-selected{background:#1681c1}#n2-ss-layer-list .n2-ss-layer-content-row .n2-list>li .n2-actions-left,#n2-ss-layer-list .n2-ss-layerlist-row-row .n2-list>li .n2-actions-left,#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging .n2-actions,#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging .n2-actions-left{display:none}#n2-ss-layer-list .n2-ss-layerlist-row.n2-ss-ll-dragging{position:absolute;left:0;width:100%;height:32px;overflow:hidden;opacity:.5}#n2-ss-layers .nextend-sortable-placeholder{border:0;position:relative;height:0;overflow:visible;z-index:1001}#n2-ss-layers .nextend-sortable-placeholder div{position:absolute;left:0;top:-1px;width:100%;height:0;box-shadow:0 0 0 2px #0c92df}#n2-ss-layers ul .nextend-sortable-placeholder div{margin-left:30px}#n2-ss-layers ul ul .nextend-sortable-placeholder div{margin-left:50px}#n2-ss-layers ul ul ul .nextend-sortable-placeholder div{margin-left:70px}#n2-ss-layers ul ul ul ul .nextend-sortable-placeholder div{margin-left:90px}#n2-ss-layers ul ul ul ul ul .nextend-sortable-placeholder div{margin-left:110px}#n2-ss-layers ul ul ul ul ul ul .nextend-sortable-placeholder div{margin-left:130px}#n2-ss-layers .ui-sortable-helper{opacity:.5}#n2-ss-layers-table .n2-list li,.n2-list .n2-ss-layer-group-row{border-bottom:0}#n2-ss-layers-table .n2-ss-layer-title{border-bottom:1px solid RGBA(0,0,0,.2)}#n2-ss-layers-table .n2-active>.n2-ss-layer-title,#n2-ss-layers-table .n2-selected>.n2-ss-layer-title{border-color:#1681c1}.n2-ss-layer-group-row ul.n2-list{margin-top:-10px;padding-top:10px}.n2-ss-layer-title{display:block;line-height:31px;position:relative;cursor:pointer;overflow:hidden}.n2-ss-layer-title span{margin:0 30px;display:block;width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n2-ss-layer-group-row>.n2-ss-layer-title span,ul>li>.n2-ss-layer-title span{margin:0 30px}.n2-ss-layer-icon{position:absolute;top:2px}ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:3px}#n2-ss-layer-list>ul>li.n2-ss-layer-content-row>.n2-ss-layer-title span,#n2-ss-layer-list>ul>li.n2-ss-layer-row-row>.n2-ss-layer-title span,ul>li .n2-inline-form,ul>li>ul>li>.n2-ss-layer-title span{margin:0 50px}#n2-ss-layer-list>ul>li.n2-ss-layer-content-row>.n2-ss-layer-title .n2-ss-layer-icon,#n2-ss-layer-list>ul>li.n2-ss-layer-row-row>.n2-ss-layer-title .n2-ss-layer-icon,ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:23px}ul>li>ul>li>ul>li .n2-inline-form,ul>li>ul>li>ul>li>.n2-ss-layer-title span{margin:0 70px}ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:43px}ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title span,ul>li>ul>li>ul>li>ul>li>ul>li .n2-inline-form{margin:0 90px}ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:63px}ul>li>ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title span{margin:0 110px}ul>li>ul>li>ul>li>ul>li>ul>li>.n2-ss-layer-title .n2-ss-layer-icon{left:83px}ul>li>ul>li>ul>li>ul>li>ul>li>ul>li .n2-ss-layer-title span{margin:0 130px}ul>li>ul>li>ul>li>ul>li>ul>li>ul>li .n2-ss-layer-title .n2-ss-layer-icon{left:103px}.n2-ss-layerlist-row .n2-inline-form input{background:#3c4958 0 0;color:#b2bfc9;font-size:11px;border:2px solid #28313a;line-height:24px;padding:0 10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;margin:0}.n2-ss-layerlist-row .n2-inline-form input:focus{box-shadow:none}.n2-ss-layer-title .n2-actions{position:absolute;top:0;right:0;padding:0 6px;cursor:default;opacity:.2}.n2-active>.n2-ss-layer-title .n2-actions{opacity:1}.n2-ss-layer-title .n2-actions-left{position:absolute;top:0;left:0;padding:2px 0;cursor:default;line-height:24px}html[dir=rtl] .n2-ss-layer-title .n2-actions-left{padding:0 16px 0 0}#n2-ss-layer-list .n2-ss-layerlist-row.n2-active>.n2-ss-layer-title,#n2-ss-layer-list .n2-ss-layerlist-row.n2-active>.n2-ss-layer-title .n2-i,#n2-ss-layer-list .n2-ss-layerlist-row.n2-selected .n2-ss-layer-title,#n2-ss-layer-list .n2-ss-layerlist-row.n2-selected .n2-ss-layer-title .n2-i{color:#fff}.n2-ss-layer-title .n2-actions a,.n2-ss-layer-title .n2-actions-left a{display:inline-block;padding:0}.n2-ss-layer-title .n2-actions-left i{padding:0 2px;vertical-align:middle}.n2-ss-layer-title .n2-i-order{cursor:move}.n2-ss-layer-status{display:inline-block;position:relative;margin:0 3px}#n2-ss-layer-list a .n2-i,#n2-ss-layer-list a:HOVER .n2-i{color:#b2bfc9}.n2-ss-layer-status-hidden .n2-ss-layer-status .n2-ss-sc-hide .n2-i:before{content:"\e923"}.n2-ss-layer-list-top-bar .n2-h2{display:inline-block;line-height:28px;color:#fff;padding:0 5px}.n2-ss-layer-list-opener{width:28px;display:inline-block;padding:0;vertical-align:top;margin:0 5px}#n2-ss-layers.n2-active .n2-ss-layer-list-opener>.n2-i:before{content:"\e92c"}.n2-closed .n2-i-col:before,.n2-closed .n2-i-row:before,.n2-ss-layer-list-group-opener.n2-closed .n2-i:before{content:"\e921"}#n2-ss-layers{position:fixed;bottom:0;width:340px;margin:0 -1px;height:48px;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;display:none;background-color:#28313a;z-index:1019}#n2-ss-layers.n2-active{height:100px}#n2-ss-layers:not(.n2-active){width:50px!important}#n2-ss-layers:not(.n2-active) .n2-ss-layers-sidebar{width:50px}#n2-ss-layers:not(.n2-active) .n2-ss-layer-list-layers-top-bar>div{display:none!important}.n2-ss-has-layers #n2-ss-layers{display:block}#n2-ss-layers-table .n2-td{position:relative;vertical-align:top}#n2-ss-layers-table .n2-ss-layers-sidebar{width:340px}.n2-ss-layer-list-top-bar{position:relative;padding:10px 5px 9px;height:28px;background-color:#212d3a;border-bottom:1px solid #20282f}#n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar{cursor:ns-resize}.n2-ss-layer-list-bulk-top-bar,[data-component=layer] .n2-ss-select-layer-mode #n2-ss-layers.n2-active .n2-ss-layer-list-layers-top-bar{display:none}[data-component=layer] .n2-ss-select-layer-mode #n2-ss-layers.n2-active .n2-ss-layer-list-bulk-top-bar{display:block}.n2-ss-layer-list-top-bar .n2-form-element-text{margin:0}.n2-ss-layers-sidebar-rows{position:relative;height:100%;overflow-x:hidden;overflow-y:visible}#n2-ss-layers .n2-form-element-text{margin:0 10px;line-height:2px}#n2-ss-layers .n2-text-sub-label{width:30px;text-align:center;overflow:hidden}.n2-ss-layer-list-bulk-top-bar{text-align:right;color:#fff;vertical-align:top;padding:10px 15px 9px}.n2-ss-layer-list-bulk-top-bar .n2-button{vertical-align:middle}.n2-ss-layer-list-bulk-top-bar .n2-button+.n2-button,.n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control .n2-button{margin:0 0 0 5px}html[dir=rtl] .n2-ss-layer-list-top-bar .n2-button+.n2-button,html[dir=rtl] .n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control .n2-button{margin:0 5px 0 0}.n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control{position:absolute;top:10px;right:5px;margin:0 10px}html[dir=rtl] .n2-ss-layer-list-top-bar .n2-ss-layer-list-topbar-control{right:auto;left:5px}.n2-ss-layer-list-topbar-control{text-align:right;color:#fff;padding:0 10px;vertical-align:top}#n2-ss-layers .n2-ss-layer-list-topbar-control{padding:0}.n2-ss-layer-list-topbar-control .n2-button{padding:0;width:28px;font-size:16px;vertical-align:middle}.n2-ss-layer-list-topbar-control .n2-button i{line-height:inherit}.n2-play.n2-active i:before{content:"\e607"}#n2-ss-slide-canvas-container{background-color:#fff;border-width:1px 0 0;padding-bottom:400px;padding-bottom:40vh;position:relative;border-top:1px solid #ccd1d6}#smartslider-form>div{margin-bottom:-1px}#n2-ss-slide-canvas-container-inner{position:relative;z-index:1;overflow:hidden;border-bottom:1px solid #ccd1d6;background-color:#e9edf0;margin-left:49px;border-top:1px solid #ccd1d6}.n2-ss-position-display{display:none;position:absolute;border-radius:3px;z-index:10000;line-height:16px;padding:4px 6px;color:#fff;font-size:10px;background:RGBA(32,41,52,.95)}.n2-ss-position-display.n2-active{display:block}#n2-ss-0 .n2-ss-slide-border{display:none;position:absolute;background:#a1aeb5;width:1px;height:1px}#n2-ss-0 .n2-ss-slide-border-left{left:0;top:0;height:100%}#n2-ss-0 .n2-ss-slide-border-right{right:0;top:0;height:100%}#n2-ss-0 .n2-ss-slide-border-top{left:0;top:0;width:100%}#n2-ss-0 .n2-ss-slide-border-bottom{left:0;bottom:0;width:100%}#n2-ss-0:HOVER .n2-ss-slide-border{display:block}.n2-ss-layer-placeholder{position:relative;height:0;width:100%;box-shadow:0 0 0 2px #0c92df;display:block;z-index:100000}.n2-ss-layer-inline>.n2-ss-layer-placeholder,.n2-ss-layer-row>.n2-ss-layer-placeholder{height:auto;width:0;align-self:stretch;flex:0 0 auto}.n2-ss-core-item.n2-canvas-item-drag{opacity:.5;z-index:9999;margin:0}.n2-canvas-item-drag{opacity:.5!important}.n2-ss-move-layer div#n2-ss-0 .n2-ss-layer.ui-resizable,.n2-ss-resize-layer div#n2-ss-0 .n2-ss-layer.ui-resizable{box-shadow:inset 0 0 0 1px #0c92df}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-ss-mouse-over{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}div#n2-ss-0 .n2-ss-layer-ui-label-container{display:none;position:absolute;left:0;top:0;text-align:left;line-height:16px;z-index:91;white-space:nowrap;border-bottom-right-radius:2px;overflow:hidden;background:#0c92df;max-width:100%;max-height:100%}div#n2-ss-0 .n2-ss-layer-ui-label-container:HOVER{max-width:none;max-height:none}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer.n2-active>.n2-ss-layer-ui-label-container,div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-over-delayed>.n2-ss-layer-ui-label-container{display:block}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer .n2-ss-layer-ui-label{display:inline-block;height:16px;font-size:10px;line-height:16px;color:#fff;padding:0 5px;vertical-align:top;text-transform:uppercase;border-left:1px solid #0b7dbe}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-label-action{padding:0;cursor:pointer;font-size:16px;display:none}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer.n2-active>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-label-action,#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container:HOVER .n2-ss-layer-ui-label-action{display:inline-block}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-label:first-child{border-left:0}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layer>.n2-ss-layer-ui-label-container .n2-ss-layer-ui-layer-move{cursor:move}div#n2-ss-0 .n2-ss-layer-ui-label-container.invisible{visibility:hidden}.n2-ss-layer[data-type=col].n2-highlight{box-shadow:inset 0 0 0 1px #0c92df}div#n2-ss-0 .n2-ss-layer.n2-ss-mouse-hover[data-type=col]{z-index:2}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer.n2-active{box-shadow:inset 0 0 0 1px #0c92df}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER #n2-ss-0 .n2-ss-layer[data-type=row].n2-active,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER div#n2-ss-0 .n2-ss-layer .n2-ss-layer[data-type=col].n2-active{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}.n2-ss-move-layer .n2-ss-layer[data-type=col]{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}.n2-ss-move-layer #n2-ss-0 .n2-ss-layer:HOVER{box-shadow:none}div#n2-ss-0 .n2-ss-layer[data-type=col] .n2-ss-layer.ui-draggable-dragging,div#n2-ss-0 .n2-ss-layer[data-type=content] .n2-ss-layer.ui-draggable-dragging{z-index:100000;outline:0!important}.ui-item-overlay{display:none;position:absolute;top:0;left:0;width:100%;height:100%}.n2-ss-select-layer-mode .n2-ss-layer-selected .ui-item-overlay{display:block;background-color:RGBA(0,132,255,.4)}.n2-ss-item-html .ui-item-overlay,.n2-ss-item-iframe .ui-item-overlay{display:block}.n2-ss-layer .n2-ss-layer-cc,.n2-ss-layer .ui-resizable-ne,.n2-ss-layer .ui-resizable-nw,.n2-ss-layer .ui-resizable-se,.n2-ss-layer .ui-resizable-sw{opacity:0}.n2-ss-layer .ui-resizable-ne:HOVER,.n2-ss-layer .ui-resizable-nw:HOVER,.n2-ss-layer .ui-resizable-se:HOVER,.n2-ss-layer .ui-resizable-sw:HOVER,.n2-ss-layer-cc:HOVER,.ui-resizable-e:HOVER,.ui-resizable-n:HOVER,.ui-resizable-s:HOVER,.ui-resizable-w:HOVER{opacity:1}.n2-ss-layer[data-align=center][data-valign=bottom] .ui-resizable-s,.n2-ss-layer[data-align=center][data-valign=middle] .n2-ss-layer-cc,.n2-ss-layer[data-align=center][data-valign=top] .ui-resizable-n,.n2-ss-layer[data-align=left][data-valign=bottom] .ui-resizable-sw,.n2-ss-layer[data-align=left][data-valign=middle] .ui-resizable-w,.n2-ss-layer[data-align=left][data-valign=top] .ui-resizable-nw,.n2-ss-layer[data-align=right][data-valign=bottom] .ui-resizable-se,.n2-ss-layer[data-align=right][data-valign=middle] .ui-resizable-e,.n2-ss-layer[data-align=right][data-valign=top] .ui-resizable-ne{background:#0c92df;opacity:1;border:1px solid #fff}.n2-ss-layer-cc{position:absolute;font-size:.1px;display:block;z-index:92}.n2-ss-layer .ui-customresizable-handle,.n2-ss-layer .ui-resizable-handle{border-radius:50px}.n2-ss-layer .n2-ss-layer-cc,.n2-ss-layer .ui-customresizable-handle,.n2-ss-layer .ui-resizable-handle{display:none!important;background-image:none;border:1px solid #0c92df;height:7px;width:7px;background:#fff}.n2-ss-layer .ui-column-width-handle{display:none!important;position:absolute;top:25%;height:50%;cursor:ew-resize;width:5px;background:RGBA(12,146,223,.5);z-index:88;opacity:1;box-sizing:border-box!important;border-radius:5px}.n2-ss-layer .ui-column-width-handle:HOVER{background:RGBA(12,146,223,1)}.n2-ss-layer .ui-spacing-handle{display:none!important;z-index:89;background:#0c92df;opacity:.5;overflow:hidden}.n2-ss-layer .ui-spacing-handle.ui-spacing-under-spacing,.n2-ss-layer .ui-spacing-handle:HOVER{opacity:.8}.n2-ss-layer .ui-resizable-n{left:50%;top:-4px;margin-left:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-n{min-height:5px;cursor:s-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-n{top:0;margin-left:0;left:25%;width:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-n{left:0;bottom:100%;width:100%}.n2-ss-layer .ui-customresizable-e,.n2-ss-layer .ui-resizable-e{right:-4px;top:50%;margin-top:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-e{min-width:5px;cursor:w-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-e{top:25%;margin-top:0;right:0;height:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-e{top:0;left:100%;height:100%}.n2-ss-layer .ui-customresizable-s,.n2-ss-layer .ui-resizable-s{bottom:-4px;left:50%;margin-left:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-s{min-height:5px;cursor:n-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-s{bottom:0;margin-left:0;left:25%;width:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-s{bottom:auto;top:100%;left:0;width:100%}.n2-ss-layer .ui-customresizable-w,.n2-ss-layer .ui-resizable-w{left:-4px;top:50%;margin-top:-4px}.n2-ss-layer .ui-spacing-handle.ui-spacing-w{min-width:5px;cursor:e-resize}.n2-ss-layer .ui-spacing-handle-padding.ui-spacing-w{top:25%;margin-top:0;left:0;height:50%}.n2-ss-layer .ui-spacing-handle-margin.ui-spacing-w{left:auto;right:100%;top:0;height:100%}.n2-ss-layer .ui-resizable-ne{right:-4px;top:-4px}.n2-ss-layer .ui-resizable-se{right:-4px;bottom:-4px}.n2-ss-layer .ui-resizable-sw{left:-4px;bottom:-4px}.n2-ss-layer .ui-resizable-nw{left:-4px;top:-4px}.n2-ss-layer .n2-ss-layer-cc{left:50%;top:50%;margin-top:-4px;margin-left:-4px}.n2-ss-layer.n2-active:HOVER{box-shadow:inset 0 0 0 1px RGBA(12,146,223,1)}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.n2-ss-layer-cc,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.ui-customresizable-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.ui-resizable-handle,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-cc,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.ui-column-width-handle,.n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.ui-spacing-handle,.n2-ss-layer.n2-active:HOVER>.ui-customresizable-handle,.n2-ss-layer.n2-active:HOVER>.ui-resizable-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.n2-ss-layer-row>.ui-column-width-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.n2-ss-layer-row>.ui-spacing-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.ui-customresizable-handle,.n2-ss-resize-layer .n2-ss-layer.n2-active>.ui-resizable-handle{display:block!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active>.ui-spacing-handle{display:none!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.n2-ss-layer-content>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.n2-ss-layer-row>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container .n2-ss-layer.n2-active:HOVER>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-resizable-resizing>div>.ui-spacing-handle,.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-spacing-resizing>.ui-spacing-handle,.ui-resizable-resizing>.ui-spacing-handle,.ui-spacing-resizing>.ui-spacing-handle{display:block!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.ui-spacing-resizing>.ui-spacing-handle.ui-spacing-under-spacing{opacity:1}#n2-ss-0 .n2-ss-layer-row.n2-ss-row-wrapped .ui-column-width-handle,#n2-ss-0 .ui-spacing-resizing .ui-column-width-handle{display:none!important}.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .n2-ss-layer-cc,.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .ui-customresizable-handle,.n2-ss-animation-play-single #n2-ss-0 .n2-ss-layer .ui-resizable-handle,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .n2-ss-layer-cc,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .ui-customresizable-handle,.n2-ss-move-layer .n2-ss-layer.n2-active:HOVER .ui-resizable-handle{display:none!important}.n2-ss-layer-edit-visible #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active{overflow:visible!important}.n2-ss-item{position:relative;float:left;width:100%}.n2-ss-item-area,.n2-ss-item-imagearea,.n2-ss-item-video,.n2-ss-item-vimeo,.n2-ss-item-youtube{height:100%}.n2-ss-editor-group-mode-only,.n2-ss-editor-layer-mode-only,[data-placement=""] [data-placement],[data-placement=absolute] [data-placement]:not([data-placement=absolute]):not([data-placement=all]),[data-placement=content] [data-placement]:not([data-placement=content]):not([data-placement=all]),[data-placement=default] [data-placement]:not([data-placement=default]):not([data-placement=all]),[data-placement=group] [data-placement]:not([data-placement=group]):not([data-placement=all]),[data-placement=normal] [data-placement]:not([data-placement=normal]):not([data-placement=all]){display:none!important}.n2-ss-has-layers[data-component=group] .n2-ss-editor-group-mode-only,.n2-ss-has-layers[data-component=layer] .n2-ss-editor-layer-mode-only{display:inline-block!important}div#n2-ss-0 .n2-ss-layer-chain-parent{position:absolute;z-index:10;right:10px;top:10px;line-height:18px;font-size:12px;width:18px;display:none}.n2-ss-layer-edit-visible .n2-ss-mode-desktopPortrait #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active.n2-ss-layer-has-parent .n2-ss-layer-chain-parent,.n2-ss-mode-desktopPortrait #n2-ss-slide-canvas-container:HOVER .n2-ss-layer.n2-active.n2-ss-layer-has-parent:HOVER .n2-ss-layer-chain-parent{display:inline-block}.n2-ss-layer-highlight{position:absolute;background:#0c92df;z-index:91;opacity:1}.n2-ss-layer-highlight-n{top:0;left:0;width:100%;height:1px}.n2-ss-layer-highlight-e{top:0;right:0;width:1px;height:100%}.n2-ss-layer-highlight-s{bottom:0;left:0;width:100%;height:1px}.n2-ss-layer-highlight-w{top:0;left:0;width:1px;height:100%}#n2-ss-0 .n2-ss-layer-row .n2-ss-layer-content{min-height:20px}[data-devicespecific]{position:relative}#n2-ss-devicespecific-settings{position:absolute;bottom:40px;left:0;padding:0 10px;white-space:nowrap;z-index:2}#n2-ss-devicespecific-settings *{cursor:pointer;background:#a1aeb5;display:inline-block;width:20px;height:20px;line-height:20px;text-align:center;font-size:16px;color:#fff;border-left:1px solid #5b6874}#n2-ss-devicespecific-settings>:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left:0}#n2-ss-devicespecific-settings>:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-ss-mode-desktopLandscape #n2-ss-devicespecific-settings .n2-i-mini-desktop-landscape,.n2-ss-mode-desktopPortrait #n2-ss-devicespecific-settings .n2-i-mini-desktop-portrait,.n2-ss-mode-mobileLandscape #n2-ss-devicespecific-settings .n2-i-mini-mobile-landscape,.n2-ss-mode-mobilePortrait #n2-ss-devicespecific-settings .n2-i-mini-mobile-portrait,.n2-ss-mode-tabletLandscape #n2-ss-devicespecific-settings .n2-i-mini-tablet-landscape,.n2-ss-mode-tabletPortrait #n2-ss-devicespecific-settings .n2-i-mini-tablet-portrait{background:#0c92df;border-color:#0b7dbe}.n2-ss-layer[data-type=col]>.n2-ss-layer-ui-label-container>.n2-ss-layer-ui-label-self{cursor:move}.n2-highlight-structure .n2-ss-layer[data-type=col]{box-shadow:0 0 0 2px #0c92df}.n2-ss-layer-under-creation{visibility:hidden!important}#n2-ss-slide-canvas-container #n2-ss-0 .n2-ss-layers-container>.n2-ss-layer>.n2-ss-layer-ui-label-container>.n2-ss-layer-ui-label-up,[data-editormode=canvas] div#n2-ss-0 .n2-ss-layer[data-type=content].n2-ss-content-empty{display:none}[data-editormode=content] div#n2-ss-0 .n2-ss-layer[data-type=content].n2-ss-content-empty{height:100%}div#n2-ss-0 .n2-ss-layer-content .n2-ss-layer.n2-active:HOVER{z-index:10}#n2-ss-editor-mode .n2-i{font-size:16px;vertical-align:middle}.n2-context-menu{display:none;position:absolute;left:0;top:0;font-family:"Montserrat",Arial,sans-serif;font-size:13px;background-color:#202934;color:#cedae2;z-index:1000000;border-radius:3px;line-height:25px}.n2-context-menu.n2-active{display:block}.n2-context-menu>div{padding:3px 10px;cursor:pointer}.n2-context-menu>div:HOVER{background-color:RGBA(255,255,255,.2)}.n2-context-menu>div *{margin:0 3px;vertical-align:middle}.n2-context-menu>div .n2-i{font-size:16px}#n2-ss32-content-mode-tutorial{background-color:#212d3a;margin:0 -1px;z-index:2;position:relative;color:#fff}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container{display:flex;align-items:center;max-width:960px}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container>div{margin:20px}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container a+a{margin:0 20px}#n2-ss32-content-mode-tutorial .n2-ss-tutorial-container p{color:#b2bfc9;font-size:14px;margin:20px 0}.n2-ss-section-outer{min-height:10px}[data-visibility=hidden],[data-visibility=hidden] *{visibility:hidden!important}div div#n2-ss-0 .n2-ss-static-slide .n2-ss-section-outer,div div#n2-ss-0 .n2-ss-static-slide div[data-type=content],div div#n2-ss-0 .n2-ss-static-slide div[data-type=content] div.n2-ss-section-main-content{visibility:visible}.n2-ss-sample-slides-container{display:none;position:relative;margin:0 -1px -1px;background-color:#202934;z-index:2}.n2-ss-add-slide-with-sample .n2-main-top-bar{display:none}.n2-ss-add-slide-with-sample .n2-ss-sample-slides-container{display:block}.n2-ss-add-slide-with-sample #n2-ss-devices,.n2-ss-add-slide-with-sample #n2-ss-toolbar,.n2-ss-add-slide-with-sample #smartslider-form,.n2-ss-add-slide-with-sample .n2-ss-edit-slide-top{display:none}.n2-ss-add-slide-with-sample #n2-ss-add-sidebar{top:0}.n2-ss-add-slide-with-sample #n2-ss-slide-canvas-container-inner{border-top:0}.n2-ss-sample-slides-container iframe{width:100%;height:240px;border:0}.n2-ss-sample-slide-settings{padding:20px;background:#212d3a;height:68px;display:flex}.n2-ss-sample-slide-settings .n2-ss-sample-slide-settings-col{flex:0 0 auto;margin:0 10px;display:flex;flex-direction:column;justify-content:space-around}.n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting{flex:0 0 auto;display:flex;align-items:center}.n2-ss-sample-slide-setting-label{color:#b2bfc9;font-size:10px;text-transform:uppercase;padding-right:20px}#n2-ss-sample-slide-setting-background-image{position:relative;width:100px;height:68px;background-size:cover;border-radius:5px;overflow:hidden;cursor:pointer}#n2-ss-sample-slide-setting-background-image .n2-i-close{position:absolute;right:0;top:0;display:block;width:16px;height:16px;border-bottom-left-radius:5px;background-color:#526377;color:#fff;font-size:14px;text-align:center;line-height:16px;cursor:pointer}.n2-ss-sample-slide-setting-field{margin-left:auto}.n2-ss-sample-slide-setting-field .ui-slider{width:100px;position:relative;background:#374d64;height:6px;margin:10px;border-radius:10px}.n2-ss-sample-slide-setting-field .ui-slider .ui-slider-handle{position:absolute;top:0;z-index:2;width:14px;height:14px;-ms-touch-action:none;touch-action:none;background:#fff;margin:-4px -7px 0;border-radius:50px;cursor:ew-resize}.n2-ss-sample-slide-settings .n2-ss-sample-slide-settings-col.n2-ss-sample-slide-settings-image-specific,.n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting.n2-ss-sample-slide-setting-gradient-specific{display:none}.n2-ss-sample-slide-settings.n2-ss-has-gradient .n2-ss-sample-slide-settings-col .n2-ss-sample-slide-setting.n2-ss-sample-slide-setting-gradient-specific,.n2-ss-sample-slide-settings.n2-ss-has-image .n2-ss-sample-slide-settings-col.n2-ss-sample-slide-settings-image-specific{display:flex}.n2-ss-scrollbar-wrapper{background-color:#212d3a;padding:4px;height:8px;z-index:10}.n2-scroll-disable .n2-ss-scrollbar-wrapper{visibility:hidden;height:0;padding:0}.n2-ss-scrollbar-wrapper .track{position:relative;height:8px}.n2-ss-scrollbar-wrapper .thumb{position:absolute;top:0;background-color:#49586a;height:8px;cursor:default;width:20px;z-index:2;border:0;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.n2-ss-scrollbar-wrapper.n2-ss-scrollbar-light{background-color:#b9c3c9}.n2-ss-scrollbar-wrapper.n2-ss-scrollbar-light .thumb{background-color:#fff}#n2-ss-zoom{width:280px;text-align:center;vertical-align:middle}#n2-ss-zoom .n2-ss-slider-zoom-container{position:relative;display:inline-block;vertical-align:middle;width:150px;height:34px;padding:0 23px}#n2-ss-zoom .n2-ss-slider-zoom-container>.n2-i{position:absolute;top:9px;color:#6b7986;font-size:16px}#n2-ss-zoom .n2-ss-slider-zoom-container .n2-i-minus{left:-18px}#n2-ss-zoom .n2-ss-slider-zoom-container .n2-i-plus{right:-18px}.n2-ss-slider-zoom-bg{position:absolute;left:0;top:50%;margin-top:-3px;width:100%;background:#505c69;height:6px;border-radius:3px}#n2-ss-slider-zoom{height:100%;position:relative;margin:0;background:0 0;border:none;border-radius:0}#n2-ss-slider-zoom .ui-slider-range{display:none}#n2-ss-slider-zoom .ui-slider-handle{position:absolute;top:50%;display:block;width:47px;height:22px;margin-top:-11px;margin-left:-23px;background-color:#e6eaee;background:#e6eaee;border:none;border-radius:3px;z-index:2;color:#7b8898;font-size:10px;text-align:center;line-height:22px;cursor:pointer}.n2-ss-slider-zoom-1{position:absolute;left:50%;top:0;margin-left:-1.5px;width:3px;height:100%;background-color:#6b7986}#n2-ss-lock{display:inline-block;position:absolute;right:-36px;top:9px;cursor:pointer;line-height:16px}#n2-ss-lock .n2-i{color:#6b7986;font-size:16px}#n2-ss-lock.n2-active .n2-i:before{content:"\e609"}.n2-ss-device-zoomer{min-width:280px}.n2-ss-device-zoomer #n2-ss-zoom{padding:10px 0;background:#212d3a;margin:0 auto;display:none;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.n2-ss-device-zoomer:HOVER #n2-ss-zoom{display:block}.n2-ss-device-zoomer .n2-ss-slider-zoom-1,.n2-ss-device-zoomer .n2-ss-slider-zoom-bg{background-color:#374d64}.n2-ss-device-zoomer #n2-ss-zoom #n2-ss-lock>.n2-i,.n2-ss-device-zoomer #n2-ss-zoom .n2-ss-slider-zoom-container>.n2-i{color:#4e667f}.n2-ss-device-zoomer #n2-ss-slider-zoom .ui-slider-handle{background-color:#526a80;color:#fff}#n2-ss-devices{height:60px}#n2-ss-devices.n2-ss-devices-compact>.n2-controls-panel{width:260px}#n2-ss-devices .n2-table{font-size:32px;color:#80a3b5;margin:0 auto}.n2-lb-header #n2-ss-devices .n2-table{color:#a4b0b7}html[dir=rtl] #n2-ss-devices .n2-table{float:left}#n2-ss-devices .n2-td{height:60px;vertical-align:middle;text-align:center;padding:0 15px;cursor:pointer}#n2-ss-devices .n2-td.n2-active{cursor:default;color:#0c92df}.n2-i-devices:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAAAeCAMAAABzNtkNAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACdlBMVEUAAAChrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrUZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrUZmeMAAAA99lBfAAAA0XRSTlMAJ6DHzCgytbY2MLMnoMfMKDK1tjYws5+ytLGfsrSxxh0ixh0il5qXmgY7a5SvvspsB2aHBjtrlK++ymwHZod+wiN+wiMSgbh6SiYQAnl9DBKBuHpKJhACeX0MNbmdQwQzNbmdQwQzRrtLAUa7SwHIpRWkyKUVpJgKUqLDnk2YClKiw55Nhq2KhIatioTLLlgOT8suWA5PcH9ZX3B/WV+sJcQqrqwlxCquKSmjXqNeV1eRiZGJCQmIiLq6AzQDNIK3SYK3SSQkCG2hCG2hsLA3NxRx1r0AAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAAE0UlEQVRo3s2a+18UVRTAN/eYJLmHJCAjS4pehG4vQrcHhq0bCrFu6BKkRmq+JSNTpBQpVlnjEY+wtAglFIjeWmCWZb7t8Se109z57Mzcc+eBLrPnl7nn3DOP8/3MvXPPueNyWZSbprhBKO4pU9W+N0+jnFJuIS47PVXrlDrd6gPp5NYZHhSKZ0aa2ve2mZRT+u3EZTMytU6ZGZafKAsMJUvtewftk0Jcdpbe6c4JEstGQ8lW+95F+6QTl52td7rb8hO5wagX7tFopC9pBZijVnPA8DYG4kGjXrxXo5G+pBXxPrWai4a3MY9X0BvT7te/Ow+IiNm5jRETtN4b0x7UvzsPiYiJ9YfzHsmfO8/rnTc3/9G8x6jQHhcNySd4YryTiBjnJ5AnC54qnL/A51swv/Dpgmeo0J4VDcnneGK8k4gY58ckp2ih+rEXFj3PExPPYhQx4vTrIJZbvEj92IuKX+CJiWcxihhxug1i/sVegMCLJUuWlpYuXVJSFgDwvlRuKWSqyxYxY12W4DIfYujliuUrwuEVyysqQ4i+V6oshUx12SJG6tWvAqxctTpuX71qJcC015KFWM3riGvWrosb1q1dgzjzDceIrXfDho2btD2bNm4A9/rkILbZg1u2btPatm3dgp7NDhGrroU3t/O+298Cd3UyEKupw7d38GfueAc9NY4Q8wdg5y5ZLa3f3dDw7nvsddu1EwJ+54kFQ7hnr9wMN+5ranr/A/a67d2DoaATxJohwub40v3y1+oAQ1YegWbnibVglM3x4YPy1+pDhqwqii0OEMtp9bYxrR7c7R0d7W74iBnavK05ThPL7fR1sWYjerp7ero9+DEzdPk6cyefWC8cUrQs+EQ6fBpPEhdDr9PEDuMRpZmNn0mHz+NJ4jI8PPnE+uALReuHDunQAf2K5Sgcc5rYAH6pNAexRzr04KBiOY4nJp9YBI6KiQ05TyyKx8XEhp0g1gtFijYij8qv4qPyUDKMymKlOSqPyq/jo/KIE6MyNvMPMe0bZeavZ4ah5Jj5h1nzW2Xmb2SGYUdm/tjqok9ZXXwnry6+L5X18r7kWF0MKKuLH+TVxY9hWa8acGR18f8K9iRD1j7S37+7ngE7ya9gE1G7MCMmrWBPMWTdo4OD+xoZsFP8CjYRtQtCj2VJI1SWNAK12ixpvwjYT4nOkkapLGkU67RZ0kERsJ8TkImPlegz8ZIxLhM3kERn4uMV+ky8YpzLxA3khld7xqRqz+m4/bRU7Un5xSwUQ2I3sAZbMy5Ve87EDWekak/6r0ahmRK7vhqs/7dYRfFsGaso/l52FqC1SFtRtLkz0mw2cu0QcwX/iFUUz1WyiuKflecQO4u1FUWbOyMtZiPXhJjLdV5ftT6vO9XO7putvSQLTjG5oK9aX9A52Nl9s7WXJNYv5l3Kj0g7I5H8S3kXuVOnXq4V86q9rNnhVYVNN3nXhgZjYi7XlYKrhVFpZyRaeLXgCteddq1OzKvuWpogbLrJuzY1GcE2FTkscXAJIWZD5LDEwSU1MTMrgF+t+iebmJkVMahWgxMhZmGv7C967KYSrql6p4n+RaCKkZqnNfI3PXYzCddMvZP1vwjsEGs7RgGbRf2p8k9AB2yif6rYIdZ1ggI2m/pT5d+QDljGf3zSNGZGqKPpAAAAAElFTkSuQmCC)}.n2-i-devices-all:before{background-position:0 0}.n2-i-devices-desktop:before{background-position:-40px 0}.n2-i-devices-tablet:before{background-position:-80px 0}.n2-i-devices-phone:before{background-position:-120px 0}.n2-active>.n2-i-devices-all:before{background-position:-160px 0}.n2-active>.n2-i-devices-desktop:before{background-position:-200px 0}.n2-active>.n2-i-devices-tablet:before{background-position:-240px 0}.n2-active>.n2-i-devices-phone:before{background-position:-280px 0}.n2-generator-insert-variable .n2-variable-container{height:90px;overflow:auto}.n2-generator-insert-variable .n2-group-container{height:40px;overflow:auto}.n2-generator-insert-variable .n2-group-container .n2-button,.n2-generator-insert-variable .n2-variable-container .n2-button{margin:3px}.n2-generator-insert-variable .n2-group-container .n2-button.n2-active,.n2-generator-insert-variable .n2-variable-container .n2-button.n2-active,.n2-ss-layer-picker.n2-active{background:#0c92df}.n2-generator-result-container{height:100px;overflow:auto;margin:0 3px}.n2-ss-layer-picker{background:#6b7986;color:#fff;font-size:16px;height:28px;line-height:28px;padding:0;text-align:center;width:28px;border-radius:3px;margin:0 10px 10px;cursor:pointer}#n2-ss-toolbar #n2-ss-layer-parent-linker.n2-under-pick,.n2-ss-layer-picker.n2-under-pick{background-color:#51b82d}#n2-ss-layer-parent-linker.n2-under-pick .n2-i-layerlink:before,.n2-ss-layer-picker.n2-under-pick .n2-i-layerlink:before{content:"\e64b"}.n2-ss-picker-overlay,.n2-ss-picker-overlay-tile{position:absolute;left:0;top:0;background:RGBA(25,153,227,.8);cursor:pointer;width:100%;height:100%;z-index:1000000;box-shadow:inset 0 0 0 1px rgba(0,0,0,.4)}.n2-ss-picker-overlay-tile{width:33%;height:33%}.n2-ss-picker-overlay-tile:HOVER,.n2-ss-picker-overlay:HOVER{background:RGBA(42,52,63,.9)}.n2-ss-picker-overlay-tile.n2-active,.n2-ss-picker-overlay-tile.n2-active:HOVER{background:RGBA(0,52,63,.9)}#n2-ss-toolbar #n2-ss-layer-parent-linker{display:none}.n2-ss-has-layers .n2-ss-mode-desktopPortrait #n2-ss-toolbar #n2-ss-layer-parent-linker,.n2-ss-has-ruler .n2-ruler>span{display:inline-block}.n2-ss-layer.n2-ss-picking-on-layer{z-index:1000000!important}.n2-ruler-container{position:absolute;left:0;top:0;height:100%;width:100%;visibility:hidden;z-index:10}.n2-ruler-container>*{visibility:visible}.n2-ruler,.n2-ruler-guide{position:absolute;left:0;top:0}.n2-ruler{box-sizing:border-box;white-space:nowrap}.n2-ruler>span{position:relative;display:none;vertical-align:top}.n2-ruler>span span{position:absolute;display:block;font-size:10px;color:#7b8898;line-height:10px}.n2-ruler-guide{display:none;z-index:2}.n2-ss-show-guides .n2-ruler-guide{display:block}.n2-ruler-guide .n2-ruler-guide-handle{position:absolute;background:#e6b625;left:0;top:0;width:9px;height:9px;cursor:pointer;font-family:'Nextend'!important;font-size:9px;color:#fff;line-height:9px;text-align:center}.n2-ruler-guide .n2-ruler-guide-handle:before{content:"\e90a"}.n2-ruler-horizontal{padding-left:1px;height:0;width:100%}.n2-ss-has-ruler .n2-ruler-horizontal{height:39px}.n2-ruler-horizontal>span.n2-ss-ruler-mark-large{height:20px}.n2-ruler-horizontal>span.n2-ss-ruler-mark-medium{height:10px}.n2-ruler-horizontal>span{width:9px;height:5px;border-right:1px solid #bcc4c8}.n2-ruler-horizontal span span{left:12px;top:10px}.n2-ruler-vertical .n2-ruler-guide{height:0;width:3000px}.n2-ss-lock-guides .n2-ruler-vertical .n2-ruler-guide{cursor:default}.n2-ruler-vertical .n2-ruler-guide .n2-ruler-guide-border{border-bottom:1px solid #ccaa2b;width:100%}.n2-ruler-vertical .n2-ruler-guide-handle{top:-4px}.n2-ruler-vertical{padding-top:1px;width:0;height:100%;background:#e9edf0;z-index:5}.n2-ss-has-ruler .n2-ruler-vertical{width:40px}.n2-ruler-vertical>span.n2-ss-ruler-mark-large{width:20px}.n2-ruler-vertical>span.n2-ss-ruler-mark-medium{width:10px}.n2-ruler-vertical>span{display:none;width:5px;height:9px;border-bottom:1px solid #bcc4c8}.n2-ss-has-ruler .n2-ruler-vertical>span{display:block}.n2-ruler-vertical span span{left:8px;top:12px}.n2-ruler-horizontal .n2-ruler-guide{width:0;height:3000px}.n2-ss-lock-guides .n2-ruler-horizontal .n2-ruler-guide{cursor:default}.n2-ruler-horizontal .n2-ruler-guide .n2-ruler-guide-border{border-right:1px solid #ccaa2b;height:100%}.n2-ruler-horizontal .n2-ruler-guide-handle{left:-4px}.n2-ruler-guide-handle{display:none}.n2-ss-has-ruler .n2-ruler-guide-handle{display:block}
|
library/media/dist/smartslider-backend.js
CHANGED
@@ -263,10 +263,10 @@ N2Require('Zoom', [], [], function ($, scope, undefined) {
|
|
263 |
for (var i = 0; i < this.responsives.length; i++) {
|
264 |
switch (mode) {
|
265 |
case 'sync':
|
266 |
-
this.responsives[i].doResize();
|
267 |
break;
|
268 |
default:
|
269 |
-
this.responsives[i].doResize(true);
|
270 |
break;
|
271 |
}
|
272 |
}
|
@@ -341,12 +341,12 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
341 |
name: n2_('Thumbnail - horizontal'),
|
342 |
image: '$ss$/admin/images/sliderpresets/thumbnailhorizontal.png'
|
343 |
});
|
|
|
|
|
|
|
344 |
this.createSliderModal = new NextendModal({
|
345 |
zero: {
|
346 |
-
size:
|
347 |
-
N2SSPRO ? 750 : 550,
|
348 |
-
N2SSPRO ? 630 : 390 + 130
|
349 |
-
],
|
350 |
title: n2_('Create Slider'),
|
351 |
back: false,
|
352 |
close: true,
|
@@ -378,9 +378,10 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
378 |
sliderHeight.parent().addClass('n2-form-element-autocomplete ui-front');
|
379 |
|
380 |
this.createHeading(n2_('Preset')).appendTo(this.content);
|
381 |
-
|
|
|
382 |
var imageRadio = this.createImageRadio(presets)
|
383 |
-
.css('height',
|
384 |
.appendTo(this.content),
|
385 |
sliderPreset = imageRadio.find('input');
|
386 |
imageRadio.css('overflow', 'hidden');
|
@@ -593,16 +594,6 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
593 |
this.menu = $('#n2-ss-slider-menu').detach().addClass('n2-inited');
|
594 |
|
595 |
this.menuActions = {
|
596 |
-
addToGroup: this.menu.find('.n2-ss-add-to-group').on('click', $.proxy(function (e) {
|
597 |
-
e.stopPropagation();
|
598 |
-
e.preventDefault();
|
599 |
-
this.addToGroup([this.slider.getId()]);
|
600 |
-
}, this)),
|
601 |
-
removeFromGroup: this.menu.find('.n2-ss-remove-from-group').on('click', $.proxy(function (e) {
|
602 |
-
e.stopPropagation();
|
603 |
-
e.preventDefault();
|
604 |
-
this.removeFromGroup([this.slider.getId()]);
|
605 |
-
}, this)),
|
606 |
duplicate: this.menu.find('.n2-ss-duplicate').on('click', $.proxy(function (e) {
|
607 |
this.slider.duplicate(e);
|
608 |
}, this)),
|
@@ -611,8 +602,8 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
611 |
}, this)),
|
612 |
preview: this.menu.find('.n2-ss-preview').on('click', $.proxy(function (e) {
|
613 |
this.slider.preview(e);
|
614 |
-
}, this))
|
615 |
-
}
|
616 |
|
617 |
this.menu.find('.n2-button').on('click', $.proxy(function (e) {
|
618 |
e.preventDefault();
|
@@ -625,20 +616,20 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
625 |
});
|
626 |
}
|
627 |
}, this));
|
628 |
-
}
|
629 |
|
630 |
|
631 |
ManageSliders.prototype.showMenu = function (slider) {
|
632 |
this.slider = slider;
|
633 |
this.menu.appendTo(slider.box);
|
634 |
-
}
|
635 |
|
636 |
ManageSliders.prototype.hideMenu = function () {
|
637 |
if (this.menu.hasClass('n2-active')) {
|
638 |
this.menu.removeClass('n2-active').off('mouseleave');
|
639 |
}
|
640 |
this.menu.detach();
|
641 |
-
}
|
642 |
|
643 |
ManageSliders.prototype.deleteSliders = function (ids, sliders) {
|
644 |
this.hideMenu();
|
@@ -735,14 +726,14 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
735 |
this.enterBulk();
|
736 |
}
|
737 |
this.selection.push(slider);
|
738 |
-
}
|
739 |
|
740 |
ManageSliders.prototype.removeSelection = function (slider) {
|
741 |
this.selection.splice($.inArray(slider, this.selection), 1);
|
742 |
if (this.selection.length == 0) {
|
743 |
this.leaveBulk();
|
744 |
}
|
745 |
-
}
|
746 |
|
747 |
ManageSliders.prototype.bulkSelect = function (cb) {
|
748 |
for (var i = 0; i < this.sliders.length; i++) {
|
@@ -796,151 +787,6 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
796 |
}
|
797 |
};
|
798 |
|
799 |
-
ManageSliders.prototype.removeFromGroup = function (sliders) {
|
800 |
-
return NextendAjaxHelper.ajax({
|
801 |
-
type: "POST",
|
802 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
803 |
-
nextendaction: 'removeFromGroup'
|
804 |
-
}),
|
805 |
-
data: {
|
806 |
-
currentGroupID: this.groupID,
|
807 |
-
sliders: sliders
|
808 |
-
},
|
809 |
-
dataType: 'json'
|
810 |
-
}).done($.proxy(function (response) {
|
811 |
-
for (var i = 0; i < sliders.length; i++) {
|
812 |
-
$('[data-sliderid="' + sliders[i] + '"]').data('slider').deleted();
|
813 |
-
}
|
814 |
-
this.initSliders();
|
815 |
-
}, this));
|
816 |
-
}
|
817 |
-
|
818 |
-
ManageSliders.prototype._addToGroup = function (action, groupID, sliders) {
|
819 |
-
return NextendAjaxHelper.ajax({
|
820 |
-
type: "POST",
|
821 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
822 |
-
nextendaction: 'addToGroup'
|
823 |
-
}),
|
824 |
-
data: {
|
825 |
-
currentGroupID: this.groupID,
|
826 |
-
groupID: groupID,
|
827 |
-
action: action,
|
828 |
-
sliders: sliders
|
829 |
-
},
|
830 |
-
dataType: 'json'
|
831 |
-
}).done($.proxy(function (response) {
|
832 |
-
|
833 |
-
if (action == 'move') {
|
834 |
-
for (var i = 0; i < sliders.length; i++) {
|
835 |
-
$('[data-sliderid="' + sliders[i] + '"]').data('slider').deleted();
|
836 |
-
}
|
837 |
-
|
838 |
-
this.initSliders();
|
839 |
-
}
|
840 |
-
|
841 |
-
var groupCounter = $('[data-sliderid="' + groupID + '"] .n2-box-placeholder-buttons .n2-button-grey');
|
842 |
-
groupCounter.html(parseInt(groupCounter.html()) + sliders.length);
|
843 |
-
}, this));
|
844 |
-
};
|
845 |
-
|
846 |
-
ManageSliders.prototype.addToGroup = function (sliders) {
|
847 |
-
var groups = null;
|
848 |
-
var that = this;
|
849 |
-
var ajaxUrl = this.ajaxUrl;
|
850 |
-
|
851 |
-
var addToGroupModal = new NextendModal({
|
852 |
-
zero: {
|
853 |
-
size: [
|
854 |
-
350,
|
855 |
-
220
|
856 |
-
],
|
857 |
-
title: n2_('Add to group'),
|
858 |
-
back: false,
|
859 |
-
close: true,
|
860 |
-
content: '<form class="n2-form"></form>',
|
861 |
-
controls: [
|
862 |
-
'<div class="n2-button n2-button-with-actions n2-button-l n2-button-green n2-radius-s n2-h4"><a class="n2-button-inner" href="#" data-action="move">' + n2_('Move') + '</a>' +
|
863 |
-
'<div class="n2-button-menu-open"><i class="n2-i n2-i-buttonarrow"></i><div class="n2-button-menu"><div class="n2-button-menu-inner n2-border-radius">' +
|
864 |
-
'<a class="n2-h4" href="#" data-action="copy">' + n2_('Copy') + '</a>' +
|
865 |
-
'<a class="n2-h4" href="#" data-action="link">' + n2_('Link') + '</a>' +
|
866 |
-
'</div></div></div></div>',
|
867 |
-
],
|
868 |
-
fn: {
|
869 |
-
show: function () {
|
870 |
-
|
871 |
-
this.controls.find(".n2-button-menu-open").n2opener();
|
872 |
-
|
873 |
-
var button = this.controls.find('a'),
|
874 |
-
form = this.content.find('.n2-form').on('submit', function (e) {
|
875 |
-
e.preventDefault();
|
876 |
-
button.eq(0).trigger('click');
|
877 |
-
});
|
878 |
-
|
879 |
-
form.append(this.createSelect(n2_('Group'), 'choosegroup', groups, 'width:300px;'));
|
880 |
-
|
881 |
-
var choosegroup = $('#choosegroup');
|
882 |
-
|
883 |
-
button.on('click', $.proxy(function (e) {
|
884 |
-
|
885 |
-
e.preventDefault();
|
886 |
-
|
887 |
-
that._addToGroup($(e.currentTarget).data('action'), choosegroup.val(), sliders)
|
888 |
-
.done($.proxy(function () {
|
889 |
-
this.hide(e);
|
890 |
-
}, this));
|
891 |
-
|
892 |
-
}, this));
|
893 |
-
}
|
894 |
-
}
|
895 |
-
}
|
896 |
-
});
|
897 |
-
|
898 |
-
|
899 |
-
NextendAjaxHelper.ajax({
|
900 |
-
type: "POST",
|
901 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
902 |
-
nextendcontroller: 'sliders',
|
903 |
-
nextendaction: 'listGroups'
|
904 |
-
}),
|
905 |
-
dataType: 'json'
|
906 |
-
}).done($.proxy(function (response) {
|
907 |
-
groups = response.data;
|
908 |
-
if (typeof groups[this.groupID] !== 'undefined') {
|
909 |
-
delete groups[this.groupID];
|
910 |
-
}
|
911 |
-
if ($.isEmptyObject(groups)) {
|
912 |
-
$('body').on({
|
913 |
-
'groupAdded.addToGroup': $.proxy(function () {
|
914 |
-
$('body').off('.addToGroup');
|
915 |
-
NextendAjaxHelper.ajax({
|
916 |
-
type: "POST",
|
917 |
-
url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
|
918 |
-
nextendcontroller: 'sliders',
|
919 |
-
nextendaction: 'listGroups'
|
920 |
-
}),
|
921 |
-
dataType: 'json'
|
922 |
-
}).done($.proxy(function (response) {
|
923 |
-
groups = response.data;
|
924 |
-
if (typeof groups[this.groupID] !== 'undefined') {
|
925 |
-
delete groups[this.groupID];
|
926 |
-
}
|
927 |
-
addToGroupModal.show();
|
928 |
-
}, this));
|
929 |
-
|
930 |
-
}, this),
|
931 |
-
'groupAddCanceled.addToGroup': $.proxy(function () {
|
932 |
-
$('body').off('.addToGroup');
|
933 |
-
}, this)
|
934 |
-
});
|
935 |
-
|
936 |
-
this.createGroup.showModal();
|
937 |
-
|
938 |
-
} else {
|
939 |
-
addToGroupModal.show();
|
940 |
-
}
|
941 |
-
}, this));
|
942 |
-
};
|
943 |
-
|
944 |
return ManageSliders;
|
945 |
});
|
946 |
N2Require('Slider', [], [], function ($, scope, undefined) {
|
@@ -1067,7 +913,7 @@ N2Require('FormElementAnimationManager', ['FormElement'], [], function ($, scope
|
|
1067 |
this.updateName(this.element.val());
|
1068 |
|
1069 |
scope.FormElement.prototype.constructor.apply(this, arguments);
|
1070 |
-
}
|
1071 |
|
1072 |
|
1073 |
FormElementAnimationManager.prototype = Object.create(scope.FormElement.prototype);
|
@@ -2137,283 +1983,6 @@ N2Require('FormElementColumns', ['FormElement'], [], function ($, scope, undefin
|
|
2137 |
root['Fraction'] = Fraction;
|
2138 |
|
2139 |
})(this);
|
2140 |
-
N2Require('FormElementLayerPicker', ['FormElement'], [], function ($, scope, undefined) {
|
2141 |
-
|
2142 |
-
var STATUS = {
|
2143 |
-
INITIALIZED: 0,
|
2144 |
-
PICK_PARENT: 1,
|
2145 |
-
PICK_CHILD: 2,
|
2146 |
-
PICK_PARENT_ALIGN: 3,
|
2147 |
-
PICK_CHILD_ALIGN: 4
|
2148 |
-
},
|
2149 |
-
OVERLAYS = '<div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="top" />' +
|
2150 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="top" style="left:33%;top:0;" />' +
|
2151 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="top" style="left:66%;top:0;width:34%;" />' +
|
2152 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="middle" style="left:0;top:33%;" />' +
|
2153 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="middle" style="left:33%;top:33%; " />' +
|
2154 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="middle" style="left:66%;top:33%;width:34%;" />' +
|
2155 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="bottom" style="left:0;top:66%;height:34%;" />' +
|
2156 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="bottom" style="left:33%;top:66%;height:34%;" />' +
|
2157 |
-
'<div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="bottom" style="left:66%;top:66%;width:34%;height:34%;" />';
|
2158 |
-
|
2159 |
-
function FormElementLayerPicker(id) {
|
2160 |
-
this.status = 0;
|
2161 |
-
this.element = $('#' + id);
|
2162 |
-
this.$container = $('.n2-ss-parent-picker');
|
2163 |
-
this.overlays = null;
|
2164 |
-
|
2165 |
-
this.aligns = this.element.parent().parent().siblings();
|
2166 |
-
|
2167 |
-
this.picker = this.element.siblings('.n2-ss-layer-picker')
|
2168 |
-
.on({
|
2169 |
-
click: $.proxy(function () {
|
2170 |
-
this.change('');
|
2171 |
-
}, this)
|
2172 |
-
});
|
2173 |
-
|
2174 |
-
|
2175 |
-
scope.FormElement.prototype.constructor.apply(this, arguments);
|
2176 |
-
};
|
2177 |
-
|
2178 |
-
|
2179 |
-
FormElementLayerPicker.prototype = Object.create(scope.FormElement.prototype);
|
2180 |
-
FormElementLayerPicker.prototype.constructor = FormElementLayerPicker;
|
2181 |
-
|
2182 |
-
FormElementLayerPicker.prototype.click = function (e) {
|
2183 |
-
if (!$('#n2-admin').hasClass('n2-ss-mode-desktopPortrait')) {
|
2184 |
-
nextend.notificationCenter.notice(n2_('To chain layers together, please switch to desktop portrait mode!'));
|
2185 |
-
return;
|
2186 |
-
}
|
2187 |
-
if (this.status == STATUS.INITIALIZED) {
|
2188 |
-
this.data = {
|
2189 |
-
parent: null,
|
2190 |
-
parentVAlign: null,
|
2191 |
-
parentHAlign: null,
|
2192 |
-
child: null,
|
2193 |
-
childVAlign: null,
|
2194 |
-
childHAlign: null,
|
2195 |
-
};
|
2196 |
-
|
2197 |
-
$('body').on('mousedown.n2-ss-parent-linker', $.proxy(function (e) {
|
2198 |
-
var $el = $(e.target);
|
2199 |
-
if (!$el.hasClass('n2-ss-picker-overlay') && !$el.hasClass('n2-ss-picker-overlay-tile')) {
|
2200 |
-
this.destroy();
|
2201 |
-
}
|
2202 |
-
}, this));
|
2203 |
-
|
2204 |
-
NextendEsc.add($.proxy(function () {
|
2205 |
-
this.destroy();
|
2206 |
-
return false;
|
2207 |
-
}, this));
|
2208 |
-
|
2209 |
-
this.pickParent(e);
|
2210 |
-
} else {
|
2211 |
-
this.data = null;
|
2212 |
-
this.change('');
|
2213 |
-
this.destroy();
|
2214 |
-
}
|
2215 |
-
}
|
2216 |
-
|
2217 |
-
FormElementLayerPicker.prototype.getAbsoluteLayers = function (container) {
|
2218 |
-
var layers = [],
|
2219 |
-
_layers = container.getSortedLayers();
|
2220 |
-
for (var i = 0; i < _layers.length; i++) {
|
2221 |
-
switch (_layers[i].placement.getType()) {
|
2222 |
-
case 'absolute':
|
2223 |
-
layers.push(_layers[i].layer[0]);
|
2224 |
-
break;
|
2225 |
-
case 'group':
|
2226 |
-
layers.push.apply(layers, this.getAbsoluteLayers(_layers[i].container));
|
2227 |
-
break;
|
2228 |
-
}
|
2229 |
-
}
|
2230 |
-
|
2231 |
-
return layers;
|
2232 |
-
}
|
2233 |
-
|
2234 |
-
FormElementLayerPicker.prototype.pickParent = function (e) {
|
2235 |
-
var canvasManager = nextend.smartSlider.canvasManager,
|
2236 |
-
layers = $(this.getAbsoluteLayers(canvasManager.mainContainer.container));
|
2237 |
-
this.tempLayers = layers;
|
2238 |
-
if (layers.length == 0) {
|
2239 |
-
this.destroy();
|
2240 |
-
} else {
|
2241 |
-
|
2242 |
-
this.status = STATUS.PICK_PARENT;
|
2243 |
-
nextend.tooltipMouse.show(n2_('Pick the parent layer!'), e);
|
2244 |
-
|
2245 |
-
var overlays = $('<div class="n2-ss-picker-overlay"></div>').appendTo(layers)
|
2246 |
-
.on('click', $.proxy(function (e) {
|
2247 |
-
e.preventDefault();
|
2248 |
-
e.stopPropagation();
|
2249 |
-
var $layer = $(e.currentTarget).parent(),
|
2250 |
-
layer = $layer.data('layerObject');
|
2251 |
-
|
2252 |
-
this.data.parent = $layer;
|
2253 |
-
|
2254 |
-
this._destroy();
|
2255 |
-
this.pickParentAlign(e);
|
2256 |
-
|
2257 |
-
}, this));
|
2258 |
-
}
|
2259 |
-
}
|
2260 |
-
|
2261 |
-
FormElementLayerPicker.prototype.pickParentAlign = function (e) {
|
2262 |
-
this.status = STATUS.PICK_PARENT_ALIGN;
|
2263 |
-
nextend.tooltipMouse.show(n2_('Pick the align point of the parent layer!'), e);
|
2264 |
-
|
2265 |
-
var overlays = $(OVERLAYS).appendTo(this.data.parent)
|
2266 |
-
.on('click', $.proxy(function (e) {
|
2267 |
-
e.preventDefault();
|
2268 |
-
e.stopPropagation();
|
2269 |
-
|
2270 |
-
var $currentTarget = $(e.currentTarget);
|
2271 |
-
this.data.parentHAlign = $currentTarget.data('align');
|
2272 |
-
this.data.parentVAlign = $currentTarget.data('valign');
|
2273 |
-
$currentTarget.off('click').addClass('n2-active');
|
2274 |
-
|
2275 |
-
overlays.not($currentTarget).remove();
|
2276 |
-
this.pickChild(e);
|
2277 |
-
}, this));
|
2278 |
-
}
|
2279 |
-
|
2280 |
-
FormElementLayerPicker.prototype.pickChild = function (e) {
|
2281 |
-
this.status = STATUS.PICK_CHILD;
|
2282 |
-
nextend.tooltipMouse.show(n2_('Pick the child layer!'), e);
|
2283 |
-
|
2284 |
-
var layers = this.tempLayers.not(this.data.parent);
|
2285 |
-
delete this.tempLayers;
|
2286 |
-
|
2287 |
-
/**
|
2288 |
-
* Parent layers can not be child of one of their child layers.
|
2289 |
-
* @param layer
|
2290 |
-
*/
|
2291 |
-
var recursiveRemoveParents = function (layer) {
|
2292 |
-
var pID = layer.data('layerObject').getProperty('parentid');
|
2293 |
-
if (pID && pID != '') {
|
2294 |
-
recursiveRemoveParents($('#' + pID));
|
2295 |
-
}
|
2296 |
-
layers = layers.not(layer);
|
2297 |
-
};
|
2298 |
-
|
2299 |
-
// Possible parent layers of the selected parent layer can't be the child of the selected parent :)
|
2300 |
-
recursiveRemoveParents(this.data.parent);
|
2301 |
-
|
2302 |
-
if (!layers.length) {
|
2303 |
-
nextend.notificationCenter.error(n2_('There is not any layer available to be child of the selected layer!'));
|
2304 |
-
this.destroy();
|
2305 |
-
return;
|
2306 |
-
}
|
2307 |
-
|
2308 |
-
var overlays = $('<div class="n2-ss-picker-overlay"></div>').appendTo(layers)
|
2309 |
-
.on('click', $.proxy(function (e) {
|
2310 |
-
e.preventDefault();
|
2311 |
-
e.stopPropagation();
|
2312 |
-
var $layer = $(e.currentTarget).parent(),
|
2313 |
-
layer = $layer.data('layerObject');
|
2314 |
-
|
2315 |
-
this.data.child = $layer;
|
2316 |
-
|
2317 |
-
overlays.remove();
|
2318 |
-
this.pickChildAlign(e);
|
2319 |
-
|
2320 |
-
}, this));
|
2321 |
-
}
|
2322 |
-
|
2323 |
-
FormElementLayerPicker.prototype.pickChildAlign = function (e) {
|
2324 |
-
this.status = STATUS.PICK_CHILD_ALIGN;
|
2325 |
-
|
2326 |
-
nextend.tooltipMouse.show(n2_('Pick the align point of the child layer!'), e);
|
2327 |
-
|
2328 |
-
var overlays = $(OVERLAYS).appendTo(this.data.child)
|
2329 |
-
.on('click', $.proxy(function (e) {
|
2330 |
-
e.preventDefault();
|
2331 |
-
e.stopPropagation();
|
2332 |
-
|
2333 |
-
var $currentTarget = $(e.currentTarget);
|
2334 |
-
this.data.childHAlign = $currentTarget.data('align');
|
2335 |
-
this.data.childVAlign = $currentTarget.data('valign');
|
2336 |
-
|
2337 |
-
this.done();
|
2338 |
-
|
2339 |
-
}, this));
|
2340 |
-
}
|
2341 |
-
|
2342 |
-
FormElementLayerPicker.prototype._destroy = function () {
|
2343 |
-
$('.n2-ss-picker-overlay').remove();
|
2344 |
-
$('.n2-ss-picker-overlay-tile').remove();
|
2345 |
-
}
|
2346 |
-
|
2347 |
-
FormElementLayerPicker.prototype.destroy = function () {
|
2348 |
-
nextend.tooltipMouse.hide();
|
2349 |
-
this._destroy();
|
2350 |
-
$('body').off('.n2-ss-parent-linker');
|
2351 |
-
NextendEsc.pop();
|
2352 |
-
|
2353 |
-
this.status = STATUS.INITIALIZED;
|
2354 |
-
}
|
2355 |
-
|
2356 |
-
FormElementLayerPicker.prototype.done = function () {
|
2357 |
-
|
2358 |
-
this.data.child.data('layerObject').placement.current
|
2359 |
-
.parentPicked(this.data.parent.data('layerObject'), this.data.parentHAlign, this.data.parentVAlign, this.data.childHAlign, this.data.childVAlign);
|
2360 |
-
this.destroy();
|
2361 |
-
}
|
2362 |
-
|
2363 |
-
FormElementLayerPicker.prototype.change = function (value) {
|
2364 |
-
this.element.val(value).trigger('change');
|
2365 |
-
this._setValue(value);
|
2366 |
-
this.triggerOutsideChange();
|
2367 |
-
};
|
2368 |
-
|
2369 |
-
FormElementLayerPicker.prototype.insideChange = function (value) {
|
2370 |
-
this.element.val(value);
|
2371 |
-
this._setValue(value);
|
2372 |
-
|
2373 |
-
this.triggerInsideChange();
|
2374 |
-
};
|
2375 |
-
|
2376 |
-
FormElementLayerPicker.prototype._setValue = function (value) {
|
2377 |
-
if (value && value != '') {
|
2378 |
-
this.$container.css('display', '');
|
2379 |
-
} else {
|
2380 |
-
this.$container.css('display', 'none');
|
2381 |
-
}
|
2382 |
-
};
|
2383 |
-
|
2384 |
-
return FormElementLayerPicker;
|
2385 |
-
});
|
2386 |
-
N2Require('FormElementPostAnimationManager', ['FormElementAnimationManager'], [], function ($, scope, undefined) {
|
2387 |
-
|
2388 |
-
function FormElementPostAnimationManager() {
|
2389 |
-
scope.FormElementAnimationManager.prototype.constructor.apply(this, arguments);
|
2390 |
-
};
|
2391 |
-
|
2392 |
-
FormElementPostAnimationManager.prototype = Object.create(scope.FormElementAnimationManager.prototype);
|
2393 |
-
FormElementPostAnimationManager.prototype.constructor = FormElementPostAnimationManager;
|
2394 |
-
|
2395 |
-
FormElementPostAnimationManager.prototype.clear = function (e) {
|
2396 |
-
e.preventDefault();
|
2397 |
-
e.stopPropagation();
|
2398 |
-
var data = this.element.val().split('|*|');
|
2399 |
-
data[2] = '';
|
2400 |
-
this.val(data.join('|*|'));
|
2401 |
-
};
|
2402 |
-
FormElementPostAnimationManager.prototype.updateName = function (value) {
|
2403 |
-
var data = value.split('|*|');
|
2404 |
-
value = data[2];
|
2405 |
-
if (value == '') {
|
2406 |
-
value = n2_('Disabled');
|
2407 |
-
} else if (value.split('||').length > 1) {
|
2408 |
-
value = n2_('Multiple animations');
|
2409 |
-
} else {
|
2410 |
-
value = n2_('Single animation');
|
2411 |
-
}
|
2412 |
-
this.name.val(value);
|
2413 |
-
};
|
2414 |
-
|
2415 |
-
return FormElementPostAnimationManager;
|
2416 |
-
});
|
2417 |
N2Require('FormElementSliderType', [], [], function ($, scope, undefined) {
|
2418 |
|
2419 |
function FormElementSliderType(id) {
|
@@ -3576,6 +3145,121 @@ N2Require('SlideAdmin', [], [], function ($, scope, undefined) {
|
|
3576 |
|
3577 |
return SlideAdmin;
|
3578 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3579 |
N2Require('SlideEditManager', ['SlideAdmin'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
3580 |
"use strict";
|
3581 |
|
@@ -3586,7 +3270,8 @@ N2Require('SlideEditManager', ['SlideAdmin'], ['smartSlider'], function ($, scop
|
|
3586 |
slideAsFile: 0,
|
3587 |
isUploadDisabled: true,
|
3588 |
uploadUrl: '',
|
3589 |
-
uploadDir: ''
|
|
|
3590 |
}, options);
|
3591 |
|
3592 |
|
@@ -3596,11 +3281,8 @@ N2Require('SlideEditManager', ['SlideAdmin'], ['smartSlider'], function ($, scop
|
|
3596 |
this.slideStartValue = this.$slideContentElement.val();
|
3597 |
|
3598 |
|
3599 |
-
window[sliderElementID].
|
3600 |
-
|
3601 |
-
this.startSampleSlides();
|
3602 |
-
}
|
3603 |
-
};
|
3604 |
|
3605 |
SlideEditManager.prototype.startSampleSlides = function () {
|
3606 |
var sampleSlidesUrl = 'https://smartslider3.com/slides/' + window.N2SS3VERSION + '/free/';
|
@@ -3777,7 +3459,7 @@ N2Require('SlideEditManager', ['SlideAdmin'], ['smartSlider'], function ($, scop
|
|
3777 |
}
|
3778 |
}
|
3779 |
}, false);
|
3780 |
-
}
|
3781 |
|
3782 |
SlideEditManager.prototype.sliderStarted = function () {
|
3783 |
|
@@ -3803,17 +3485,14 @@ N2Require('SlideEditManager', ['SlideAdmin'], ['smartSlider'], function ($, scop
|
|
3803 |
});
|
3804 |
});
|
3805 |
|
3806 |
-
smartSlider.$currentSlideElement = smartSlider.frontend.
|
|
|
3807 |
|
3808 |
new scope.Generator();
|
3809 |
|
3810 |
-
|
3811 |
|
3812 |
-
|
3813 |
-
|
3814 |
-
this.settings = new scope.SlideSettings(staticSlide);
|
3815 |
-
|
3816 |
-
this.canvasManager = new scope.CanvasManager(this, staticSlide, this.options);
|
3817 |
|
3818 |
this.readyDeferred.resolve();
|
3819 |
|
@@ -3821,6 +3500,10 @@ N2Require('SlideEditManager', ['SlideAdmin'], ['smartSlider'], function ($, scop
|
|
3821 |
checkChanged: $.proxy(this.prepareFormForCheck, this),
|
3822 |
submit: $.proxy(this.onSlideSubmit, this)
|
3823 |
});
|
|
|
|
|
|
|
|
|
3824 |
}
|
3825 |
|
3826 |
SlideEditManager.prototype.ready = function (fn) {
|
@@ -4885,16 +4568,16 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
4885 |
fields[name] = $field.on('nextendChange', $.proxy(this.onChange, this, name));
|
4886 |
}, this));
|
4887 |
|
|
|
|
|
|
|
4888 |
this.fields = fields;
|
4889 |
|
4890 |
this.slideBackground = smartSlider.$currentSlideElement.data('slideBackground');
|
4891 |
|
4892 |
if (!isStatic) {
|
4893 |
|
4894 |
-
this.
|
4895 |
-
this.canvas = smartSlider.$currentSlideElement.find('.n2-ss-slide-background');
|
4896 |
-
|
4897 |
-
this.currentBackgroundType = this.fields['background-type'].val();
|
4898 |
|
4899 |
// Auto fill thumbnail if empty
|
4900 |
var thumbnail = $('#slidethumbnail');
|
@@ -4937,15 +4620,15 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
4937 |
this.values[id] = newValue;
|
4938 |
}, this));
|
4939 |
}, this));
|
4940 |
-
}
|
4941 |
|
4942 |
SlideSettings.prototype.getSelf = function () {
|
4943 |
return this;
|
4944 |
-
}
|
4945 |
|
4946 |
SlideSettings.prototype.historyUpdateSlideValue = function (value, field) {
|
4947 |
field.insideChange(value);
|
4948 |
-
}
|
4949 |
|
4950 |
SlideSettings.prototype.getAllData = function () {
|
4951 |
|
@@ -4956,7 +4639,7 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
4956 |
}
|
4957 |
|
4958 |
return data;
|
4959 |
-
}
|
4960 |
|
4961 |
var backgroundFields = ['thumbnail', 'background-type', 'backgroundColor', 'backgroundGradient', 'backgroundColorEnd', 'backgroundImage', 'backgroundImageOpacity', 'backgroundImageBlur', 'backgroundFocusX', 'backgroundFocusY', 'backgroundMode'];
|
4962 |
|
@@ -4969,7 +4652,7 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
4969 |
}
|
4970 |
|
4971 |
return data;
|
4972 |
-
}
|
4973 |
|
4974 |
SlideSettings.prototype.setData = function (data, disableVisualLoad) {
|
4975 |
|
@@ -4984,19 +4667,19 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
4984 |
if (disableVisualLoad) {
|
4985 |
this.slideBackground.setVisualLoad(false);
|
4986 |
}
|
4987 |
-
}
|
4988 |
|
4989 |
SlideSettings.prototype.onChange = function (name, e) {
|
4990 |
if (typeof this['sync_' + name] === 'function') {
|
4991 |
this['sync_' + name].call(this);
|
4992 |
}
|
4993 |
-
}
|
4994 |
|
4995 |
SlideSettings.prototype.sync_backgroundColor =
|
4996 |
SlideSettings.prototype.sync_backgroundGradient =
|
4997 |
SlideSettings.prototype.sync_backgroundColorEnd = function () {
|
4998 |
this.updateBackgroundColor();
|
4999 |
-
}
|
5000 |
|
5001 |
SlideSettings.prototype.updateBackgroundColor = function () {
|
5002 |
var backgroundColor = this.fields.backgroundColor.val(),
|
@@ -5053,7 +4736,7 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
5053 |
|
5054 |
SlideSettings.prototype.sync_backgroundImage = function () {
|
5055 |
this['sync_background-type']();
|
5056 |
-
}
|
5057 |
|
5058 |
SlideSettings.prototype['sync_background-type'] = function () {
|
5059 |
var type = this.fields['background-type'].val();
|
@@ -5062,19 +4745,19 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
|
|
5062 |
} else {
|
5063 |
this.slideBackground.setDesktopSrc(smartSlider.generator.fill(this.fields.backgroundImage.val()));
|
5064 |
}
|
5065 |
-
}
|
5066 |
|
5067 |
SlideSettings.prototype.sync_backgroundMode = function () {
|
5068 |
this.slideBackground.setMode(this.fields.backgroundMode.val());
|
5069 |
-
}
|
5070 |
|
5071 |
SlideSettings.prototype.sync_backgroundFocusY = function () {
|
5072 |
this.slideBackground.setFocus(this.fields.backgroundFocusX.val(), this.fields.backgroundFocusY.val());
|
5073 |
-
}
|
5074 |
|
5075 |
SlideSettings.prototype.sync_backgroundFocusX = function () {
|
5076 |
this.slideBackground.setFocus(this.fields.backgroundFocusX.val(), this.fields.backgroundFocusY.val());
|
5077 |
-
}
|
5078 |
|
5079 |
SlideSettings.prototype.sync_backgroundImageOpacity = function () {
|
5080 |
this.slideBackground.setOpacity(this.fields.backgroundImageOpacity.val() / 100);
|
@@ -5103,7 +4786,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5103 |
|
5104 |
LayerContainer.prototype.setLayerContainerElement = function ($layerContainerElement) {
|
5105 |
this.layerContainerElement = $layerContainerElement;
|
5106 |
-
}
|
5107 |
|
5108 |
LayerContainer.prototype.startWithExistingNodes = function () {
|
5109 |
var nodes = this.layerContainerElement.find(this.childrenSelector);
|
@@ -5111,19 +4794,41 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5111 |
this._loadNode(nodes.eq(i), false);
|
5112 |
}
|
5113 |
this.component.onChildCountChange();
|
5114 |
-
}
|
5115 |
|
5116 |
LayerContainer.prototype.isChildAllowed = function (type) {
|
5117 |
return $.inArray(type, this.allowedChildren) !== -1;
|
5118 |
-
}
|
5119 |
|
5120 |
LayerContainer.prototype._loadNode = function ($el, needSync) {
|
5121 |
var type = $el.data('type');
|
5122 |
if (this.isChildAllowed(type)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5123 |
var component;
|
5124 |
switch (type) {
|
5125 |
case 'layer':
|
5126 |
component = new scope.Layer(this.component.canvasManager, this.component);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5127 |
break;
|
5128 |
case 'content':
|
5129 |
component = new scope.Content(this.component.canvasManager, this.component);
|
@@ -5149,15 +4854,15 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5149 |
console.error(type + ' is not allowed in ' + this.component.label);
|
5150 |
}
|
5151 |
return false;
|
5152 |
-
}
|
5153 |
|
5154 |
LayerContainer.prototype.getLayerCount = function () {
|
5155 |
return this.layerContainerElement.find(this.childrenSelector).length;
|
5156 |
-
}
|
5157 |
|
5158 |
LayerContainer.prototype.getLayerIndex = function ($layer) {
|
5159 |
return this.layerContainerElement.find(this.childrenSelector).index($layer);
|
5160 |
-
}
|
5161 |
|
5162 |
LayerContainer.prototype.getSortedLayers = function () {
|
5163 |
var layers = [];
|
@@ -5168,14 +4873,14 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5168 |
}
|
5169 |
});
|
5170 |
return layers;
|
5171 |
-
}
|
5172 |
|
5173 |
LayerContainer.prototype.append = function ($layer) {
|
5174 |
$layer.appendTo(this.layerContainerElement);
|
5175 |
var layer = this._loadNode($layer, true);
|
5176 |
this.component.onChildCountChange();
|
5177 |
return layer;
|
5178 |
-
}
|
5179 |
|
5180 |
LayerContainer.prototype.insertAt = function ($layer, index) {
|
5181 |
|
@@ -5189,11 +4894,11 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5189 |
var layer = this._loadNode($layer, true);
|
5190 |
this.component.onChildCountChange();
|
5191 |
return layer;
|
5192 |
-
}
|
5193 |
|
5194 |
LayerContainer.prototype.insert = function (layer) {
|
5195 |
layer.getRootElement().appendTo(this.layerContainerElement);
|
5196 |
-
}
|
5197 |
|
5198 |
LayerContainer.prototype.insertLayerAt = function (layer, index) {
|
5199 |
|
@@ -5212,7 +4917,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5212 |
}
|
5213 |
|
5214 |
this.syncLayerRow(layer);
|
5215 |
-
}
|
5216 |
|
5217 |
LayerContainer.prototype.syncLayerRow = function (layer) {
|
5218 |
var relatedLayer,
|
@@ -5232,7 +4937,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5232 |
if (layer.animations) {
|
5233 |
layer.animations.syncRow(relatedLayer, isReversed);
|
5234 |
}
|
5235 |
-
}
|
5236 |
|
5237 |
LayerContainer.prototype.getChildLayersRecursive = function (nodeOnly) {
|
5238 |
var _layers = this.getSortedLayers();
|
@@ -5248,11 +4953,11 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5248 |
}
|
5249 |
}
|
5250 |
return layers;
|
5251 |
-
}
|
5252 |
|
5253 |
LayerContainer.prototype.moveLayerToGroup = function (layer, newLocalIndex) {
|
5254 |
this.moveLayersToGroup([layer], [newLocalIndex]);
|
5255 |
-
}
|
5256 |
|
5257 |
LayerContainer.prototype.moveLayersToGroup = function (layers, newLocalIndexs) {
|
5258 |
newLocalIndexs = newLocalIndexs || [];
|
@@ -5280,14 +4985,14 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5280 |
for (var i = 0; i < originalGroups.length; i++) {
|
5281 |
originalGroups[i].update();
|
5282 |
}
|
5283 |
-
}
|
5284 |
|
5285 |
LayerContainer.prototype.activateFirst = function () {
|
5286 |
var layers = this.getSortedLayers();
|
5287 |
if (layers.length > 0) {
|
5288 |
layers[layers.length - 1].activate(); //Do not show editor on load!
|
5289 |
}
|
5290 |
-
}
|
5291 |
|
5292 |
LayerContainer.prototype.resetModes = function (mode) {
|
5293 |
var layers = this.getSortedLayers();
|
@@ -5297,7 +5002,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5297 |
layers[i].container.resetModes(mode);
|
5298 |
}
|
5299 |
}
|
5300 |
-
}
|
5301 |
|
5302 |
LayerContainer.prototype.copyModes = function (mode, currentMode) {
|
5303 |
var layers = this.getSortedLayers();
|
@@ -5307,7 +5012,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5307 |
layers[i].container.copyModes(mode, currentMode);
|
5308 |
}
|
5309 |
}
|
5310 |
-
}
|
5311 |
|
5312 |
LayerContainer.prototype.changeEditorModes = function (mode) {
|
5313 |
var layers = this.getSortedLayers();
|
@@ -5317,7 +5022,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5317 |
layers[i].container.changeEditorModes(mode);
|
5318 |
}
|
5319 |
}
|
5320 |
-
}
|
5321 |
|
5322 |
LayerContainer.prototype.renderModeProperties = function () {
|
5323 |
var layers = this.getSortedLayers();
|
@@ -5327,7 +5032,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5327 |
layers[i].container.renderModeProperties();
|
5328 |
}
|
5329 |
}
|
5330 |
-
}
|
5331 |
|
5332 |
LayerContainer.prototype.getAllLayers = function (layers) {
|
5333 |
layers = layers || [];
|
@@ -5339,7 +5044,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5339 |
}
|
5340 |
}
|
5341 |
return layers;
|
5342 |
-
}
|
5343 |
|
5344 |
LayerContainer.prototype.getData = function (params) {
|
5345 |
params = $.extend({
|
@@ -5360,7 +5065,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5360 |
}
|
5361 |
|
5362 |
return layers;
|
5363 |
-
}
|
5364 |
|
5365 |
LayerContainer.prototype.getHTML = function (base64) {
|
5366 |
var layers = this.getSortedLayers(),
|
@@ -5369,7 +5074,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5369 |
nodes.push(layers[i].getHTML(base64));
|
5370 |
}
|
5371 |
return nodes;
|
5372 |
-
}
|
5373 |
|
5374 |
/**
|
5375 |
* Used for layer editor
|
@@ -5393,7 +5098,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5393 |
}
|
5394 |
|
5395 |
return droppables;
|
5396 |
-
}
|
5397 |
|
5398 |
/**
|
5399 |
* Used for Layer List
|
@@ -5416,7 +5121,7 @@ N2Require('LayerContainer', [], ['smartSlider'], function ($, scope, smartSlider
|
|
5416 |
}
|
5417 |
|
5418 |
return droppables;
|
5419 |
-
}
|
5420 |
|
5421 |
return LayerContainer;
|
5422 |
});
|
@@ -6142,7 +5847,11 @@ N2Require('CanvasManager', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
6142 |
} else {
|
6143 |
var activeLayer = this.mainContainer.getSelectedLayer();
|
6144 |
if (activeLayer) {
|
6145 |
-
|
|
|
|
|
|
|
|
|
6146 |
}
|
6147 |
}
|
6148 |
} else {
|
@@ -7893,11 +7602,12 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7893 |
|
7894 |
/**
|
7895 |
*
|
7896 |
-
* @alias scope.PlacementAbsolute
|
7897 |
* @param placement
|
7898 |
* @param layer
|
7899 |
* @param canvasManager
|
7900 |
* @constructor
|
|
|
|
|
7901 |
*/
|
7902 |
function PlacementAbsolute(placement, layer, canvasManager) {
|
7903 |
this.type = 'absolute';
|
@@ -7978,7 +7688,48 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
7978 |
|
7979 |
this.___makeLayerAlign();
|
7980 |
this.___makeLayerResizeable();
|
7981 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7982 |
|
7983 |
PlacementAbsolute.prototype.deActivated = function (newMode) {
|
7984 |
|
@@ -8002,9 +7753,8 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8002 |
this.$layer.triggerHandler('LayerUnavailable');
|
8003 |
|
8004 |
var properties = ['parentid', 'responsiveposition', 'responsivesize', 'parentalign', 'parentvalign',
|
8005 |
-
|
8006 |
-
|
8007 |
-
var historicalData = this.layer.getPropertiesData(properties);
|
8008 |
|
8009 |
this.layer.removeProperties(properties);
|
8010 |
|
@@ -8865,47 +8615,53 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8865 |
|
8866 |
PlacementAbsolute.prototype.subscribeParent = function () {
|
8867 |
var that = this;
|
8868 |
-
|
8869 |
-
|
8870 |
-
|
8871 |
-
|
8872 |
-
|
8873 |
-
|
8874 |
-
|
8875 |
-
|
8876 |
-
|
8877 |
-
|
8878 |
-
|
8879 |
-
|
8880 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8881 |
|
8882 |
-
|
8883 |
-
|
8884 |
-
|
8885 |
|
8886 |
-
|
8887 |
-
|
8888 |
-
|
8889 |
-
|
8890 |
-
|
8891 |
-
|
8892 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8893 |
}
|
8894 |
-
}
|
8895 |
-
|
8896 |
-
|
8897 |
-
|
8898 |
-
|
8899 |
-
that.$layerRow.removeClass('n2-parent-active');
|
8900 |
-
},
|
8901 |
-
'LayerGetDataWithChildren': function (e, layers) {
|
8902 |
-
that.layer.getDataWithChildren(layers);
|
8903 |
-
}
|
8904 |
-
};
|
8905 |
-
this.parent = $('#' + this.layer.property.parentid).on(this.subscribeParentCallbacks);
|
8906 |
-
this.parent.data('layerObject').placement.current.addChild(this);
|
8907 |
-
this.$layer.addClass('n2-ss-layer-has-parent');
|
8908 |
-
|
8909 |
};
|
8910 |
|
8911 |
PlacementAbsolute.prototype.unSubscribeParent = function (context) {
|
@@ -8913,12 +8669,12 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8913 |
this.$layer.removeClass('n2-ss-layer-has-parent');
|
8914 |
if (this.parent) {
|
8915 |
this.parent.off(this.subscribeParentCallbacks);
|
8916 |
-
|
8917 |
-
|
8918 |
-
|
8919 |
-
|
8920 |
-
|
8921 |
-
|
8922 |
}
|
8923 |
|
8924 |
};
|
@@ -8962,6 +8718,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8962 |
this.$layer.removeAttr('data-parentid');
|
8963 |
this.unSubscribeParent();
|
8964 |
} else {
|
|
|
8965 |
if ($('#' + value).length == 0) {
|
8966 |
this.layer.setProperty('parentid', '', 'layer');
|
8967 |
} else {
|
@@ -8970,6 +8727,7 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
|
|
8970 |
var position = this.$layer.position();
|
8971 |
this._setPosition(null, null, position.left, position.top, null, null, true);
|
8972 |
}
|
|
|
8973 |
}
|
8974 |
};
|
8975 |
|
@@ -9170,11 +8928,12 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9170 |
|
9171 |
/**
|
9172 |
*
|
9173 |
-
* @alias scope.PlacementNormal
|
9174 |
* @param placement
|
9175 |
* @param layer
|
9176 |
* @param canvasManager
|
9177 |
* @constructor
|
|
|
|
|
9178 |
*/
|
9179 |
function PlacementNormal(placement, layer, canvasManager) {
|
9180 |
this.type = 'normal';
|
@@ -9189,7 +8948,7 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9189 |
|
9190 |
PlacementNormal.prototype.start = function () {
|
9191 |
this.$layer = this.layer.layer;
|
9192 |
-
}
|
9193 |
|
9194 |
PlacementNormal.prototype.preActivation = function (lastPlacement) {
|
9195 |
if (lastPlacement.type == 'absolute' && this.layer.item && this.layer.item.needSize) {
|
@@ -9200,7 +8959,7 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9200 |
this.transferredProperties.height = height;
|
9201 |
}
|
9202 |
}
|
9203 |
-
}
|
9204 |
|
9205 |
PlacementNormal.prototype.activated = function (properties) {
|
9206 |
this.loadProperties($.extend(properties, this.transferredProperties));
|
@@ -9218,14 +8977,52 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9218 |
e.stopPropagation();
|
9219 |
})
|
9220 |
});
|
9221 |
-
}
|
9222 |
|
9223 |
PlacementNormal.prototype.loadProperties = function (options) {
|
9224 |
this.layer.createDeviceProperty('margin', {desktopPortrait: '0|*|0|*|0|*|0|*|px+'}, this.layer.layer, this);
|
9225 |
this.layer.createDeviceProperty('height', {desktopPortrait: (options.height || 0)}, this.layer.layer, this);
|
9226 |
this.layer.createDeviceProperty('maxwidth', {desktopPortrait: 0}, this.layer.layer, this);
|
9227 |
this.layer.createDeviceProperty('selfalign', {desktopPortrait: 'inherit'}, this.layer.layer, this);
|
9228 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9229 |
|
9230 |
PlacementNormal.prototype.deActivated = function (newMode) {
|
9231 |
this.layer.$.off('.placementnormal');
|
@@ -9235,11 +9032,9 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9235 |
this.layer.layer.removeClass('n2-ss-has-maxwidth');
|
9236 |
this.layer.layer.removeAttr('data-cssselfalign');
|
9237 |
|
9238 |
-
var
|
9239 |
-
|
9240 |
-
this.layer.
|
9241 |
-
this.layer.removeProperty('maxwidth');
|
9242 |
-
this.layer.removeProperty('selfalign');
|
9243 |
|
9244 |
|
9245 |
this.layer.layer.css({
|
@@ -9249,7 +9044,7 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9249 |
maxWidth: ''
|
9250 |
});
|
9251 |
return historicalData;
|
9252 |
-
}
|
9253 |
|
9254 |
PlacementNormal.prototype._renderModeProperties = function (isReset) {
|
9255 |
|
@@ -9257,7 +9052,7 @@ N2Require('PlacementNormal', ['PlacementAbstract'], ['smartSlider'], function ($
|
|
9257 |
this._syncheight();
|
9258 |
this._syncmaxwidth();
|
9259 |
this._syncselfalign();
|
9260 |
-
}
|
9261 |
|
9262 |
PlacementNormal.prototype._syncmargin = function () {
|
9263 |
var margin = this.layer.getProperty('margin').split('|*|'),
|
@@ -9625,14 +9420,17 @@ N2Require('PlacementAbstract', ['Placement'], [], function ($, scope, undefined)
|
|
9625 |
N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
9626 |
"use strict";
|
9627 |
|
9628 |
-
|
|
|
|
|
|
|
9629 |
function Item($item, layer, itemEditor) {
|
9630 |
|
9631 |
if (this.type === undefined) {
|
9632 |
this.type = $item.data('item');
|
9633 |
}
|
9634 |
|
9635 |
-
this.needSize = this.needSize
|
9636 |
|
9637 |
this.self = this;
|
9638 |
this.$item = $item;
|
@@ -9677,21 +9475,23 @@ N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefine
|
|
9677 |
|
9678 |
|
9679 |
$(window).trigger('ItemCreated');
|
9680 |
-
}
|
|
|
|
|
9681 |
|
9682 |
Item.prototype.setSelf = function (self) {
|
9683 |
if (this.self != this) {
|
9684 |
this.self.setSelf(self);
|
9685 |
}
|
9686 |
this.self = self;
|
9687 |
-
}
|
9688 |
|
9689 |
Item.prototype.getSelf = function () {
|
9690 |
if (this.self != this) {
|
9691 |
this.self = this.self.getSelf();
|
9692 |
}
|
9693 |
return this.self;
|
9694 |
-
}
|
9695 |
|
9696 |
Item.prototype.changeValue = function (property, value) {
|
9697 |
if (this == this.itemEditor.activeItem) {
|
@@ -9857,7 +9657,7 @@ N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefine
|
|
9857 |
var layer = this.layer;
|
9858 |
$("<img/>")
|
9859 |
.attr("src", image)
|
9860 |
-
.load
|
9861 |
var slideSize = smartSlider.frontend.dimensions.slide;
|
9862 |
var width = this.width,
|
9863 |
height = this.height,
|
@@ -9993,7 +9793,7 @@ N2Require('ItemManager', [], ['smartSlider'], function ($, scope, smartSlider, u
|
|
9993 |
} else {
|
9994 |
this.activeForm.fields.eq(0).data('field').focus(typeof context !== 'undefined' && context);
|
9995 |
}
|
9996 |
-
}
|
9997 |
|
9998 |
ItemManager.prototype.startItems = function () {
|
9999 |
|
@@ -10443,6 +10243,11 @@ N2Require('PluginShowOn', [], ['smartSlider'], function ($, scope, smartSlider,
|
|
10443 |
N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
10444 |
"use strict";
|
10445 |
|
|
|
|
|
|
|
|
|
|
|
10446 |
function Col(canvasManager, group, properties) {
|
10447 |
this.label = 'Col';
|
10448 |
this.type = 'col';
|
@@ -10460,13 +10265,14 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10460 |
Col.prototype._createLayer = function () {
|
10461 |
return $('<div class="n2-ss-layer"><div class="n2-ss-layer-content n2-ss-layer-col"></div></div>')
|
10462 |
.attr('data-type', this.type);
|
10463 |
-
}
|
10464 |
|
10465 |
Col.prototype.addProperties = function ($layer) {
|
10466 |
|
10467 |
scope.ContentAbstract.prototype.addProperties.call(this, $layer);
|
10468 |
|
10469 |
this.createProperty('colwidth', '1', $layer);
|
|
|
10470 |
this.createProperty('borderradius', 0, $layer);
|
10471 |
this.createProperty('boxshadow', '0|*|0|*|0|*|0|*|00000080', $layer);
|
10472 |
|
@@ -10475,7 +10281,7 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10475 |
this.createProperty('bordercolor', 'ffffffff', $layer);
|
10476 |
|
10477 |
this.createDeviceProperty('order', {desktopPortrait: 0}, $layer);
|
10478 |
-
}
|
10479 |
|
10480 |
Col.prototype.create = function () {
|
10481 |
scope.ContentAbstract.prototype.create.call(this);
|
@@ -10488,7 +10294,7 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10488 |
this._syncboxshadow();
|
10489 |
|
10490 |
this._onReady();
|
10491 |
-
}
|
10492 |
|
10493 |
Col.prototype.load = function ($layer) {
|
10494 |
|
@@ -10512,7 +10318,7 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10512 |
this.group.setColsWidth(widths);
|
10513 |
}
|
10514 |
}
|
10515 |
-
}
|
10516 |
|
10517 |
Col.prototype.createRow = function () {
|
10518 |
this.$content = this.layer.find('.n2-ss-layer-content:first');
|
@@ -10537,7 +10343,7 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10537 |
this.container.$ul.appendTo(this.layerRow);
|
10538 |
|
10539 |
this.readyDeferred.done($.proxy(this._syncopened, this));
|
10540 |
-
}
|
10541 |
|
10542 |
Col.prototype._start = function (isCreate) {
|
10543 |
|
@@ -10546,7 +10352,7 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10546 |
if (isCreate) {
|
10547 |
this.highlight(2000);
|
10548 |
}
|
10549 |
-
}
|
10550 |
|
10551 |
Col.prototype.getRealOrder = function () {
|
10552 |
var order = this.getProperty('order');
|
@@ -10554,7 +10360,7 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10554 |
return 10;
|
10555 |
}
|
10556 |
return order;
|
10557 |
-
}
|
10558 |
|
10559 |
Col.prototype._syncorder = function () {
|
10560 |
var order = this.getProperty('order');
|
@@ -10566,22 +10372,25 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10566 |
}
|
10567 |
|
10568 |
this.group.refreshUI();
|
10569 |
-
}
|
10570 |
|
10571 |
Col.prototype._synccolwidth = function () {
|
10572 |
this.layer.css('width', ((new Fraction(this.getProperty('colwidth'))).valueOf() * 100) + '%');
|
10573 |
this.group.refreshUI();
|
10574 |
-
}
|
|
|
|
|
|
|
10575 |
|
10576 |
Col.prototype._syncborderradius = function () {
|
10577 |
this.$content.css('border-radius', this.getProperty('borderradius') + 'px');
|
10578 |
-
}
|
10579 |
|
10580 |
Col.prototype._syncborderwidth =
|
10581 |
Col.prototype._syncbordercolor =
|
10582 |
Col.prototype._syncborderstyle = function () {
|
10583 |
this._syncborder();
|
10584 |
-
}
|
10585 |
|
10586 |
Col.prototype._syncborder = function () {
|
10587 |
var borderstyle = this.getProperty('borderstyle');
|
@@ -10597,7 +10406,7 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10597 |
}
|
10598 |
|
10599 |
this.update();
|
10600 |
-
}
|
10601 |
|
10602 |
Col.prototype._syncboxshadow = function () {
|
10603 |
var boxShadow = this.getProperty('boxshadow').split('|*|');
|
@@ -10606,7 +10415,7 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10606 |
} else {
|
10607 |
this.$content.css('box-shadow', '');
|
10608 |
}
|
10609 |
-
}
|
10610 |
|
10611 |
Col.prototype.delete = function () {
|
10612 |
if (this.group.container.getLayerCount() > 1) {
|
@@ -10614,26 +10423,26 @@ N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smart
|
|
10614 |
} else {
|
10615 |
this.group.delete();
|
10616 |
}
|
10617 |
-
}
|
10618 |
|
10619 |
Col.prototype.getHTML = function (base64) {
|
10620 |
var layer = scope.ComponentAbstract.prototype.getHTML.call(this, base64);
|
10621 |
|
10622 |
layer.attr('data-rowcolumns', this.group.getColumns());
|
10623 |
return layer;
|
10624 |
-
}
|
10625 |
|
10626 |
Col.prototype.renderModeProperties = function (isReset) {
|
10627 |
this._syncorder();
|
10628 |
|
10629 |
scope.ContentAbstract.prototype.renderModeProperties.call(this, isReset);
|
10630 |
-
}
|
10631 |
|
10632 |
Col.prototype.update = function () {
|
10633 |
|
10634 |
this.group._syncwrapafter();
|
10635 |
scope.ComponentAbstract.prototype.update.call(this);
|
10636 |
-
}
|
10637 |
|
10638 |
return Col;
|
10639 |
});
|
@@ -11228,7 +11037,8 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11228 |
|
11229 |
ComponentAbstract.prototype.getData = function (params) {
|
11230 |
var data = {
|
11231 |
-
type: this.type
|
|
|
11232 |
};
|
11233 |
|
11234 |
if (this.status > scope.ComponentAbstract.STATUS.NORMAL) {
|
@@ -11274,15 +11084,24 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11274 |
|
11275 |
ComponentAbstract.prototype.onChildCountChange = function () {
|
11276 |
|
11277 |
-
}
|
11278 |
|
11279 |
-
|
11280 |
-
|
11281 |
-
|
11282 |
-
|
11283 |
-
|
11284 |
-
|
11285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11286 |
};
|
11287 |
|
11288 |
ComponentAbstract.prototype.markOver = function (e) {
|
@@ -11683,6 +11502,11 @@ N2Require('ComponentAbstract', dependencies, ['smartSlider'], function ($, scope
|
|
11683 |
N2Require('Content', ['ContentAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
11684 |
"use strict";
|
11685 |
|
|
|
|
|
|
|
|
|
|
|
11686 |
function Content(canvasManager, group, properties) {
|
11687 |
this.label = n2_('Content');
|
11688 |
this.type = 'content';
|
@@ -12192,6 +12016,11 @@ N2Require('ContentAbstract', ['LayerContainer', 'ComponentAbstract'], ['smartSli
|
|
12192 |
N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
12193 |
"use strict";
|
12194 |
|
|
|
|
|
|
|
|
|
|
|
12195 |
function Layer(canvasManager, group, properties) {
|
12196 |
this.label = n2_('Layer');
|
12197 |
this.type = 'layer';
|
@@ -12256,9 +12085,11 @@ N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, s
|
|
12256 |
}
|
12257 |
}, this),
|
12258 |
dblclick: $.proxy(function (e) {
|
12259 |
-
|
12260 |
-
|
12261 |
-
|
|
|
|
|
12262 |
}, this)
|
12263 |
});
|
12264 |
}
|
@@ -12455,7 +12286,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12455 |
|
12456 |
|
12457 |
smartSlider.frontend.sliderElement.on('SliderResize', $.proxy(this.onResize, this));
|
12458 |
-
}
|
12459 |
|
12460 |
MainContainer.prototype.onResize = function (e, ratios) {
|
12461 |
|
@@ -12498,11 +12329,11 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12498 |
|
12499 |
MainContainer.prototype.blurActiveGroup = function () {
|
12500 |
this.isActiveGroupBlurred = true;
|
12501 |
-
}
|
12502 |
|
12503 |
MainContainer.prototype.unBlurActiveGroup = function () {
|
12504 |
this.isActiveGroupBlurred = false;
|
12505 |
-
}
|
12506 |
|
12507 |
MainContainer.prototype.getActiveGroup = function () {
|
12508 |
if (this.isActiveGroupBlurred) {
|
@@ -12530,8 +12361,12 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12530 |
|
12531 |
return group;
|
12532 |
}
|
|
|
|
|
|
|
|
|
12533 |
return this;
|
12534 |
-
}
|
12535 |
|
12536 |
MainContainer.prototype.getSelectedLayer = function () {
|
12537 |
if (this.activeLayer == null) {
|
@@ -12544,13 +12379,13 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12544 |
if (requestedLayers === undefined) {
|
12545 |
return [];
|
12546 |
}
|
12547 |
-
var
|
|
|
12548 |
|
12549 |
for (var i = 0; i < requestedLayers.length; i++) {
|
12550 |
-
requestedLayers[i].getDataWithChildren(layers);
|
12551 |
}
|
12552 |
-
|
12553 |
-
return layers;
|
12554 |
};
|
12555 |
|
12556 |
MainContainer.prototype.layerDeleted = function (layer) {
|
@@ -12577,31 +12412,31 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12577 |
MainContainer.prototype.refreshHasLayers = function () {
|
12578 |
$('body').toggleClass('n2-ss-has-layers', this.container.getLayerCount() > 0);
|
12579 |
nextend.triggerResize();
|
12580 |
-
}
|
12581 |
|
12582 |
MainContainer.prototype.getName = function () {
|
12583 |
return 'Slide';
|
12584 |
-
}
|
12585 |
|
12586 |
MainContainer.prototype.update = function () {
|
12587 |
|
12588 |
-
}
|
12589 |
|
12590 |
MainContainer.prototype.onChildCountChange = function () {
|
12591 |
|
12592 |
-
}
|
12593 |
|
12594 |
MainContainer.prototype.markEnter = function (e) {
|
12595 |
|
12596 |
-
}
|
12597 |
|
12598 |
MainContainer.prototype.markLeave = function (e) {
|
12599 |
|
12600 |
-
}
|
12601 |
|
12602 |
MainContainer.prototype.getSelf = function () {
|
12603 |
return this;
|
12604 |
-
}
|
12605 |
|
12606 |
MainContainer.prototype.createLayerAnimations = function (horizontalRatio, verticalRatio) {
|
12607 |
var animations = [];
|
@@ -12610,7 +12445,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12610 |
animations.push.apply(animations, children[i].createLayerAnimations(horizontalRatio, verticalRatio));
|
12611 |
}
|
12612 |
return animations;
|
12613 |
-
}
|
12614 |
|
12615 |
MainContainer.prototype.getDroppables = function (exclude) {
|
12616 |
var editorMode = this.canvasManager.currentEditorMode,
|
@@ -12640,11 +12475,11 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12640 |
}
|
12641 |
|
12642 |
return droppables;
|
12643 |
-
}
|
12644 |
|
12645 |
MainContainer.prototype.getLLDroppables = function (layer) {
|
12646 |
return this.container.getLLDroppables(layer);
|
12647 |
-
}
|
12648 |
|
12649 |
MainContainer.prototype.getDroppable = function () {
|
12650 |
return {
|
@@ -12652,7 +12487,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12652 |
layer: this,
|
12653 |
placement: 'absolute'
|
12654 |
}
|
12655 |
-
}
|
12656 |
|
12657 |
MainContainer.prototype.getLLDroppable = function (layer) {
|
12658 |
switch (layer.type) {
|
@@ -12667,7 +12502,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12667 |
break;
|
12668 |
}
|
12669 |
return false;
|
12670 |
-
}
|
12671 |
|
12672 |
MainContainer.prototype.replaceLayers = function (layersData) {
|
12673 |
|
@@ -12686,6 +12521,9 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12686 |
|
12687 |
this.canvasManager.refreshMode();
|
12688 |
|
|
|
|
|
|
|
12689 |
if (!this.getSelectedLayer()) {
|
12690 |
if (layers.length > 0) {
|
12691 |
layers[0].activate();
|
@@ -12697,7 +12535,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12697 |
}
|
12698 |
|
12699 |
return layers;
|
12700 |
-
}
|
12701 |
|
12702 |
MainContainer.prototype.historyDeleteAll = function (layersData, historicalLayers) {
|
12703 |
for (var i = 0; i < historicalLayers.length; i++) {
|
@@ -12705,7 +12543,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12705 |
}
|
12706 |
|
12707 |
this.canvasManager.mainContent.getSelf().remove();
|
12708 |
-
}
|
12709 |
|
12710 |
MainContainer.prototype.historyReplaceLayers = function (layersData, historicalLayers, historicalAllLayers) {
|
12711 |
this.replaceLayers(layersData);
|
@@ -12714,7 +12552,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12714 |
for (var i = 0; i < historicalAllLayers.length; i++) {
|
12715 |
historicalAllLayers[i].setSelf(layers[i]);
|
12716 |
}
|
12717 |
-
}
|
12718 |
|
12719 |
MainContainer.prototype.addLayers = function (layersData, group) {
|
12720 |
|
@@ -12731,20 +12569,20 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12731 |
smartSlider.history.addSimple(this, this.historyDeleteLayers, this.historyAddLayers, [layersData, layers, group]);
|
12732 |
|
12733 |
return layers;
|
12734 |
-
}
|
12735 |
|
12736 |
MainContainer.prototype.historyDeleteLayers = function (layersData, historicalLayers, historicalGroup) {
|
12737 |
for (var i = 0; i < historicalLayers.length; i++) {
|
12738 |
historicalLayers[i].getSelf().delete();
|
12739 |
}
|
12740 |
-
}
|
12741 |
|
12742 |
MainContainer.prototype.historyAddLayers = function (layersData, historicalLayers, historicalGroup) {
|
12743 |
var layers = this.addLayers(layersData, historicalGroup.getSelf());
|
12744 |
for (var i = 0; i < historicalLayers.length; i++) {
|
12745 |
historicalLayers[i].setSelf(layers[i]);
|
12746 |
}
|
12747 |
-
}
|
12748 |
|
12749 |
MainContainer.prototype.dataToLayers = function (layers, $targetGroupContent) {
|
12750 |
var nodes = [];
|
@@ -12771,7 +12609,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12771 |
}
|
12772 |
|
12773 |
return nodes;
|
12774 |
-
}
|
12775 |
|
12776 |
MainContainer.prototype._buildNodePrepareID = function ($layer, layerData) {
|
12777 |
if (layerData.id) {
|
@@ -12806,7 +12644,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12806 |
layerData.parentid = '';
|
12807 |
}
|
12808 |
}
|
12809 |
-
}
|
12810 |
|
12811 |
|
12812 |
MainContainer.prototype.buildContentNode = function (layerData, $targetGroupContent) {
|
@@ -12824,7 +12662,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12824 |
this.dataToLayers(layerData.layers, $content);
|
12825 |
|
12826 |
return $layer;
|
12827 |
-
}
|
12828 |
|
12829 |
MainContainer.prototype.buildRowNode = function (layerData, $targetGroupContent) {
|
12830 |
|
@@ -12843,7 +12681,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12843 |
this.dataToLayers(layerData.cols, $content);
|
12844 |
|
12845 |
return $layer;
|
12846 |
-
}
|
12847 |
|
12848 |
MainContainer.prototype.buildColNode = function (layerData, $targetGroupContent) {
|
12849 |
|
@@ -12860,7 +12698,7 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12860 |
this.dataToLayers(layerData.layers, $content);
|
12861 |
|
12862 |
return $layer;
|
12863 |
-
}
|
12864 |
|
12865 |
MainContainer.prototype.buildLayerNode = function (layerData, $targetGroupContent) {
|
12866 |
|
@@ -12902,6 +12740,11 @@ N2Require('MainContainer', ['LayerContainer'], ['smartSlider'], function ($, sco
|
|
12902 |
N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
12903 |
"use strict";
|
12904 |
|
|
|
|
|
|
|
|
|
|
|
12905 |
function Row(canvasManager, group, properties) {
|
12906 |
this.label = n2_('Row');
|
12907 |
this.type = 'row';
|
@@ -13844,6 +13687,7 @@ N2Require('ComponentSettings', [], ['smartSlider'], function ($, scope, smartSli
|
|
13844 |
inneralign: $('#layercol-inneralign'),
|
13845 |
verticalalign: $('#layercol-verticalalign'),
|
13846 |
bgcolor: $('#layercol-background-color'),
|
|
|
13847 |
bgimage: $('#layercol-background-image'),
|
13848 |
bgimagex: $('#layercol-background-focus-x'),
|
13849 |
bgimagey: $('#layercol-background-focus-y'),
|
263 |
for (var i = 0; i < this.responsives.length; i++) {
|
264 |
switch (mode) {
|
265 |
case 'sync':
|
266 |
+
this.responsives[i].doResize(event);
|
267 |
break;
|
268 |
default:
|
269 |
+
this.responsives[i].doResize(event, true);
|
270 |
break;
|
271 |
}
|
272 |
}
|
341 |
name: n2_('Thumbnail - horizontal'),
|
342 |
image: '$ss$/admin/images/sliderpresets/thumbnailhorizontal.png'
|
343 |
});
|
344 |
+
var size = [550, 390 + 130];
|
345 |
+
|
346 |
+
|
347 |
this.createSliderModal = new NextendModal({
|
348 |
zero: {
|
349 |
+
size: size,
|
|
|
|
|
|
|
350 |
title: n2_('Create Slider'),
|
351 |
back: false,
|
352 |
close: true,
|
378 |
sliderHeight.parent().addClass('n2-form-element-autocomplete ui-front');
|
379 |
|
380 |
this.createHeading(n2_('Preset')).appendTo(this.content);
|
381 |
+
var imageRadioHeight = 100
|
382 |
+
|
383 |
var imageRadio = this.createImageRadio(presets)
|
384 |
+
.css('height', imageRadioHeight)
|
385 |
.appendTo(this.content),
|
386 |
sliderPreset = imageRadio.find('input');
|
387 |
imageRadio.css('overflow', 'hidden');
|
594 |
this.menu = $('#n2-ss-slider-menu').detach().addClass('n2-inited');
|
595 |
|
596 |
this.menuActions = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
597 |
duplicate: this.menu.find('.n2-ss-duplicate').on('click', $.proxy(function (e) {
|
598 |
this.slider.duplicate(e);
|
599 |
}, this)),
|
602 |
}, this)),
|
603 |
preview: this.menu.find('.n2-ss-preview').on('click', $.proxy(function (e) {
|
604 |
this.slider.preview(e);
|
605 |
+
}, this))
|
606 |
+
};
|
607 |
|
608 |
this.menu.find('.n2-button').on('click', $.proxy(function (e) {
|
609 |
e.preventDefault();
|
616 |
});
|
617 |
}
|
618 |
}, this));
|
619 |
+
};
|
620 |
|
621 |
|
622 |
ManageSliders.prototype.showMenu = function (slider) {
|
623 |
this.slider = slider;
|
624 |
this.menu.appendTo(slider.box);
|
625 |
+
};
|
626 |
|
627 |
ManageSliders.prototype.hideMenu = function () {
|
628 |
if (this.menu.hasClass('n2-active')) {
|
629 |
this.menu.removeClass('n2-active').off('mouseleave');
|
630 |
}
|
631 |
this.menu.detach();
|
632 |
+
};
|
633 |
|
634 |
ManageSliders.prototype.deleteSliders = function (ids, sliders) {
|
635 |
this.hideMenu();
|
726 |
this.enterBulk();
|
727 |
}
|
728 |
this.selection.push(slider);
|
729 |
+
};
|
730 |
|
731 |
ManageSliders.prototype.removeSelection = function (slider) {
|
732 |
this.selection.splice($.inArray(slider, this.selection), 1);
|
733 |
if (this.selection.length == 0) {
|
734 |
this.leaveBulk();
|
735 |
}
|
736 |
+
};
|
737 |
|
738 |
ManageSliders.prototype.bulkSelect = function (cb) {
|
739 |
for (var i = 0; i < this.sliders.length; i++) {
|
787 |
}
|
788 |
};
|
789 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
790 |
return ManageSliders;
|
791 |
});
|
792 |
N2Require('Slider', [], [], function ($, scope, undefined) {
|
913 |
this.updateName(this.element.val());
|
914 |
|
915 |
scope.FormElement.prototype.constructor.apply(this, arguments);
|
916 |
+
}
|
917 |
|
918 |
|
919 |
FormElementAnimationManager.prototype = Object.create(scope.FormElement.prototype);
|
1983 |
root['Fraction'] = Fraction;
|
1984 |
|
1985 |
})(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1986 |
N2Require('FormElementSliderType', [], [], function ($, scope, undefined) {
|
1987 |
|
1988 |
function FormElementSliderType(id) {
|
3145 |
|
3146 |
return SlideAdmin;
|
3147 |
})
|
3148 |
+
N2Require('SmartSliderBackgroundImageAdmin', ['SmartSliderBackgroundImage'], [], function ($, scope, undefined) {
|
3149 |
+
|
3150 |
+
|
3151 |
+
function SmartSliderBackgroundImageAdmin(slide, element, manager) {
|
3152 |
+
this.allowVisualLoad = true;
|
3153 |
+
|
3154 |
+
this.hash = element.data('hash');
|
3155 |
+
|
3156 |
+
scope.SmartSliderBackgroundImage.prototype.constructor.call(this, slide, element, manager);
|
3157 |
+
this.loadAllowed = true;
|
3158 |
+
|
3159 |
+
this.listenImageManager();
|
3160 |
+
};
|
3161 |
+
|
3162 |
+
SmartSliderBackgroundImageAdmin.prototype = Object.create(scope.SmartSliderBackgroundImage.prototype);
|
3163 |
+
SmartSliderBackgroundImageAdmin.prototype.constructor = SmartSliderBackgroundImageAdmin;
|
3164 |
+
|
3165 |
+
|
3166 |
+
SmartSliderBackgroundImageAdmin.prototype.startColorMode = function () {
|
3167 |
+
|
3168 |
+
// Create an empty div for the background image in the editor
|
3169 |
+
this.$background = $('<div class="n2-ss-background-image"/>')
|
3170 |
+
.appendTo(this.element);
|
3171 |
+
this.loadDeferred.resolve();
|
3172 |
+
}
|
3173 |
+
|
3174 |
+
SmartSliderBackgroundImageAdmin.prototype.setVisualLoad = function (state) {
|
3175 |
+
this.allowVisualLoad = state;
|
3176 |
+
}
|
3177 |
+
|
3178 |
+
SmartSliderBackgroundImageAdmin.prototype.listenImageManager = function () {
|
3179 |
+
if (this.hash != '') {
|
3180 |
+
$(window).on(this.hash, $.proxy(this.onImageManagerChanged, this));
|
3181 |
+
}
|
3182 |
+
};
|
3183 |
+
|
3184 |
+
SmartSliderBackgroundImageAdmin.prototype.notListenImageManager = function () {
|
3185 |
+
if (this.hash != '') {
|
3186 |
+
$(window).off(this.hash, null, $.proxy(this.onImageManagerChanged, this));
|
3187 |
+
}
|
3188 |
+
};
|
3189 |
+
|
3190 |
+
SmartSliderBackgroundImageAdmin.prototype.onImageManagerChanged = function (e, imageData) {
|
3191 |
+
this.tabletSrc = imageData.tablet.image;
|
3192 |
+
this.mobileSrc = imageData.mobile.image;
|
3193 |
+
|
3194 |
+
this.updateBackgroundToDevice(this.manager.device);
|
3195 |
+
};
|
3196 |
+
|
3197 |
+
SmartSliderBackgroundImageAdmin.prototype.setDesktopSrc = function (src) {
|
3198 |
+
this.notListenImageManager();
|
3199 |
+
this.desktopSrc = src;
|
3200 |
+
this.hash = md5(src);
|
3201 |
+
|
3202 |
+
if (src != '' && this.allowVisualLoad) {
|
3203 |
+
var img = new Image();
|
3204 |
+
img.addEventListener("load", $.proxy(function () {
|
3205 |
+
$.when(nextend.imageManager.getVisual(src))
|
3206 |
+
.done($.proxy(function (visual) {
|
3207 |
+
this.onImageManagerChanged(null, visual.value);
|
3208 |
+
this.listenImageManager();
|
3209 |
+
}, this));
|
3210 |
+
}, this), false);
|
3211 |
+
img.src = nextend.imageHelper.fixed(src);
|
3212 |
+
} else {
|
3213 |
+
this.tabletSrc = '';
|
3214 |
+
this.mobileSrc = '';
|
3215 |
+
|
3216 |
+
this.setSrc(nextend.imageHelper.fixed(src));
|
3217 |
+
}
|
3218 |
+
}
|
3219 |
+
SmartSliderBackgroundImageAdmin.prototype.setSrc = function (src) {
|
3220 |
+
scope.SmartSliderBackgroundImage.prototype.setSrc.call(this, nextend.imageHelper.fixed(src));
|
3221 |
+
}
|
3222 |
+
|
3223 |
+
SmartSliderBackgroundImageAdmin.prototype.startFixed = function () {
|
3224 |
+
|
3225 |
+
}
|
3226 |
+
|
3227 |
+
SmartSliderBackgroundImageAdmin.prototype.setMode = function (newMode) {
|
3228 |
+
if (newMode == 'default') {
|
3229 |
+
newMode = nextend.smartSlider.slideBackgroundMode;
|
3230 |
+
}
|
3231 |
+
this.element.attr('data-mode', newMode);
|
3232 |
+
this.mode = newMode;
|
3233 |
+
}
|
3234 |
+
|
3235 |
+
SmartSliderBackgroundImageAdmin.prototype.setFocus = function (x, y) {
|
3236 |
+
this.$background.css('background-position', x + '% ' + y + '%');
|
3237 |
+
}
|
3238 |
+
|
3239 |
+
SmartSliderBackgroundImageAdmin.prototype.setOpacity = function (opacity) {
|
3240 |
+
this.opacity = opacity;
|
3241 |
+
this.$background.css('opacity', opacity);
|
3242 |
+
};
|
3243 |
+
|
3244 |
+
SmartSliderBackgroundImageAdmin.prototype.setBlur = function (blur) {
|
3245 |
+
if (window.n2FilterProperty) {
|
3246 |
+
if (blur > 0) {
|
3247 |
+
this.$background.css({
|
3248 |
+
margin: '-' + (blur * 2) + 'px',
|
3249 |
+
padding: (blur * 2) + 'px'
|
3250 |
+
}).css(window.n2FilterProperty, 'blur(' + blur + 'px)');
|
3251 |
+
} else {
|
3252 |
+
this.$background.css({
|
3253 |
+
margin: '',
|
3254 |
+
padding: ''
|
3255 |
+
}).css(window.n2FilterProperty, '');
|
3256 |
+
}
|
3257 |
+
}
|
3258 |
+
this.blur = blur;
|
3259 |
+
};
|
3260 |
+
|
3261 |
+
return SmartSliderBackgroundImageAdmin;
|
3262 |
+
});
|
3263 |
N2Require('SlideEditManager', ['SlideAdmin'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
3264 |
"use strict";
|
3265 |
|
3270 |
slideAsFile: 0,
|
3271 |
isUploadDisabled: true,
|
3272 |
uploadUrl: '',
|
3273 |
+
uploadDir: '',
|
3274 |
+
isAddSample: false,
|
3275 |
}, options);
|
3276 |
|
3277 |
|
3281 |
this.slideStartValue = this.$slideContentElement.val();
|
3282 |
|
3283 |
|
3284 |
+
window[sliderElementID].visible($.proxy(this.sliderStarted, this));
|
3285 |
+
}
|
|
|
|
|
|
|
3286 |
|
3287 |
SlideEditManager.prototype.startSampleSlides = function () {
|
3288 |
var sampleSlidesUrl = 'https://smartslider3.com/slides/' + window.N2SS3VERSION + '/free/';
|
3459 |
}
|
3460 |
}
|
3461 |
}, false);
|
3462 |
+
};
|
3463 |
|
3464 |
SlideEditManager.prototype.sliderStarted = function () {
|
3465 |
|
3485 |
});
|
3486 |
});
|
3487 |
|
3488 |
+
smartSlider.$currentSlideElement = smartSlider.frontend.sliderElement.find('.n2-ss-currently-edited-slide');
|
3489 |
+
var isStatic = smartSlider.$currentSlideElement.hasClass('n2-ss-static-slide');
|
3490 |
|
3491 |
new scope.Generator();
|
3492 |
|
3493 |
+
this.settings = new scope.SlideSettings(isStatic);
|
3494 |
|
3495 |
+
this.canvasManager = new scope.CanvasManager(this, isStatic, this.options);
|
|
|
|
|
|
|
|
|
3496 |
|
3497 |
this.readyDeferred.resolve();
|
3498 |
|
3500 |
checkChanged: $.proxy(this.prepareFormForCheck, this),
|
3501 |
submit: $.proxy(this.onSlideSubmit, this)
|
3502 |
});
|
3503 |
+
|
3504 |
+
if (this.options.isAddSample) {
|
3505 |
+
this.startSampleSlides();
|
3506 |
+
}
|
3507 |
}
|
3508 |
|
3509 |
SlideEditManager.prototype.ready = function (fn) {
|
4568 |
fields[name] = $field.on('nextendChange', $.proxy(this.onChange, this, name));
|
4569 |
}, this));
|
4570 |
|
4571 |
+
/**
|
4572 |
+
* @type {object}
|
4573 |
+
*/
|
4574 |
this.fields = fields;
|
4575 |
|
4576 |
this.slideBackground = smartSlider.$currentSlideElement.data('slideBackground');
|
4577 |
|
4578 |
if (!isStatic) {
|
4579 |
|
4580 |
+
this.canvas = this.slideBackground.element;
|
|
|
|
|
|
|
4581 |
|
4582 |
// Auto fill thumbnail if empty
|
4583 |
var thumbnail = $('#slidethumbnail');
|
4620 |
this.values[id] = newValue;
|
4621 |
}, this));
|
4622 |
}, this));
|
4623 |
+
};
|
4624 |
|
4625 |
SlideSettings.prototype.getSelf = function () {
|
4626 |
return this;
|
4627 |
+
};
|
4628 |
|
4629 |
SlideSettings.prototype.historyUpdateSlideValue = function (value, field) {
|
4630 |
field.insideChange(value);
|
4631 |
+
};
|
4632 |
|
4633 |
SlideSettings.prototype.getAllData = function () {
|
4634 |
|
4639 |
}
|
4640 |
|
4641 |
return data;
|
4642 |
+
};
|
4643 |
|
4644 |
var backgroundFields = ['thumbnail', 'background-type', 'backgroundColor', 'backgroundGradient', 'backgroundColorEnd', 'backgroundImage', 'backgroundImageOpacity', 'backgroundImageBlur', 'backgroundFocusX', 'backgroundFocusY', 'backgroundMode'];
|
4645 |
|
4652 |
}
|
4653 |
|
4654 |
return data;
|
4655 |
+
};
|
4656 |
|
4657 |
SlideSettings.prototype.setData = function (data, disableVisualLoad) {
|
4658 |
|
4667 |
if (disableVisualLoad) {
|
4668 |
this.slideBackground.setVisualLoad(false);
|
4669 |
}
|
4670 |
+
};
|
4671 |
|
4672 |
SlideSettings.prototype.onChange = function (name, e) {
|
4673 |
if (typeof this['sync_' + name] === 'function') {
|
4674 |
this['sync_' + name].call(this);
|
4675 |
}
|
4676 |
+
};
|
4677 |
|
4678 |
SlideSettings.prototype.sync_backgroundColor =
|
4679 |
SlideSettings.prototype.sync_backgroundGradient =
|
4680 |
SlideSettings.prototype.sync_backgroundColorEnd = function () {
|
4681 |
this.updateBackgroundColor();
|
4682 |
+
};
|
4683 |
|
4684 |
SlideSettings.prototype.updateBackgroundColor = function () {
|
4685 |
var backgroundColor = this.fields.backgroundColor.val(),
|
4736 |
|
4737 |
SlideSettings.prototype.sync_backgroundImage = function () {
|
4738 |
this['sync_background-type']();
|
4739 |
+
};
|
4740 |
|
4741 |
SlideSettings.prototype['sync_background-type'] = function () {
|
4742 |
var type = this.fields['background-type'].val();
|
4745 |
} else {
|
4746 |
this.slideBackground.setDesktopSrc(smartSlider.generator.fill(this.fields.backgroundImage.val()));
|
4747 |
}
|
4748 |
+
};
|
4749 |
|
4750 |
SlideSettings.prototype.sync_backgroundMode = function () {
|
4751 |
this.slideBackground.setMode(this.fields.backgroundMode.val());
|
4752 |
+
};
|
4753 |
|
4754 |
SlideSettings.prototype.sync_backgroundFocusY = function () {
|
4755 |
this.slideBackground.setFocus(this.fields.backgroundFocusX.val(), this.fields.backgroundFocusY.val());
|
4756 |
+
};
|
4757 |
|
4758 |
SlideSettings.prototype.sync_backgroundFocusX = function () {
|
4759 |
this.slideBackground.setFocus(this.fields.backgroundFocusX.val(), this.fields.backgroundFocusY.val());
|
4760 |
+
};
|
4761 |
|
4762 |
SlideSettings.prototype.sync_backgroundImageOpacity = function () {
|
4763 |
this.slideBackground.setOpacity(this.fields.backgroundImageOpacity.val() / 100);
|
4786 |
|
4787 |
LayerContainer.prototype.setLayerContainerElement = function ($layerContainerElement) {
|
4788 |
this.layerContainerElement = $layerContainerElement;
|
4789 |
+
};
|
4790 |
|
4791 |
LayerContainer.prototype.startWithExistingNodes = function () {
|
4792 |
var nodes = this.layerContainerElement.find(this.childrenSelector);
|
4794 |
this._loadNode(nodes.eq(i), false);
|
4795 |
}
|
4796 |
this.component.onChildCountChange();
|
4797 |
+
};
|
4798 |
|
4799 |
LayerContainer.prototype.isChildAllowed = function (type) {
|
4800 |
return $.inArray(type, this.allowedChildren) !== -1;
|
4801 |
+
};
|
4802 |
|
4803 |
LayerContainer.prototype._loadNode = function ($el, needSync) {
|
4804 |
var type = $el.data('type');
|
4805 |
if (this.isChildAllowed(type)) {
|
4806 |
+
var lastPlacement = $el.data('lastplacement'),
|
4807 |
+
removedPlacementData = {};
|
4808 |
+
if (lastPlacement !== undefined && lastPlacement != this.allowedPlacementMode) {
|
4809 |
+
switch (lastPlacement) {
|
4810 |
+
case 'absolute':
|
4811 |
+
removedPlacementData = scope.PlacementAbsolute.cleanLayer($el);
|
4812 |
+
break;
|
4813 |
+
case 'normal':
|
4814 |
+
removedPlacementData = scope.PlacementNormal.cleanLayer($el);
|
4815 |
+
break;
|
4816 |
+
}
|
4817 |
+
}
|
4818 |
+
/** @type {ComponentAbstract} */
|
4819 |
var component;
|
4820 |
switch (type) {
|
4821 |
case 'layer':
|
4822 |
component = new scope.Layer(this.component.canvasManager, this.component);
|
4823 |
+
|
4824 |
+
var itemClass = component.itemEditor.getItemClass($el.find('.n2-ss-item').data('item'));
|
4825 |
+
if (itemClass && scope[itemClass].needSize) {
|
4826 |
+
if (removedPlacementData.desktopportraitheight !== undefined) {
|
4827 |
+
// If absolute layer pasted into normal position then we should force the absolute height
|
4828 |
+
// when the item has needSize property true.
|
4829 |
+
$el.data('desktopportraitheight', removedPlacementData.desktopportraitheight);
|
4830 |
+
}
|
4831 |
+
}
|
4832 |
break;
|
4833 |
case 'content':
|
4834 |
component = new scope.Content(this.component.canvasManager, this.component);
|
4854 |
console.error(type + ' is not allowed in ' + this.component.label);
|
4855 |
}
|
4856 |
return false;
|
4857 |
+
};
|
4858 |
|
4859 |
LayerContainer.prototype.getLayerCount = function () {
|
4860 |
return this.layerContainerElement.find(this.childrenSelector).length;
|
4861 |
+
};
|
4862 |
|
4863 |
LayerContainer.prototype.getLayerIndex = function ($layer) {
|
4864 |
return this.layerContainerElement.find(this.childrenSelector).index($layer);
|
4865 |
+
};
|
4866 |
|
4867 |
LayerContainer.prototype.getSortedLayers = function () {
|
4868 |
var layers = [];
|
4873 |
}
|
4874 |
});
|
4875 |
return layers;
|
4876 |
+
};
|
4877 |
|
4878 |
LayerContainer.prototype.append = function ($layer) {
|
4879 |
$layer.appendTo(this.layerContainerElement);
|
4880 |
var layer = this._loadNode($layer, true);
|
4881 |
this.component.onChildCountChange();
|
4882 |
return layer;
|
4883 |
+
};
|
4884 |
|
4885 |
LayerContainer.prototype.insertAt = function ($layer, index) {
|
4886 |
|
4894 |
var layer = this._loadNode($layer, true);
|
4895 |
this.component.onChildCountChange();
|
4896 |
return layer;
|
4897 |
+
};
|
4898 |
|
4899 |
LayerContainer.prototype.insert = function (layer) {
|
4900 |
layer.getRootElement().appendTo(this.layerContainerElement);
|
4901 |
+
};
|
4902 |
|
4903 |
LayerContainer.prototype.insertLayerAt = function (layer, index) {
|
4904 |
|
4917 |
}
|
4918 |
|
4919 |
this.syncLayerRow(layer);
|
4920 |
+
};
|
4921 |
|
4922 |
LayerContainer.prototype.syncLayerRow = function (layer) {
|
4923 |
var relatedLayer,
|
4937 |
if (layer.animations) {
|
4938 |
layer.animations.syncRow(relatedLayer, isReversed);
|
4939 |
}
|
4940 |
+
};
|
4941 |
|
4942 |
LayerContainer.prototype.getChildLayersRecursive = function (nodeOnly) {
|
4943 |
var _layers = this.getSortedLayers();
|
4953 |
}
|
4954 |
}
|
4955 |
return layers;
|
4956 |
+
};
|
4957 |
|
4958 |
LayerContainer.prototype.moveLayerToGroup = function (layer, newLocalIndex) {
|
4959 |
this.moveLayersToGroup([layer], [newLocalIndex]);
|
4960 |
+
};
|
4961 |
|
4962 |
LayerContainer.prototype.moveLayersToGroup = function (layers, newLocalIndexs) {
|
4963 |
newLocalIndexs = newLocalIndexs || [];
|
4985 |
for (var i = 0; i < originalGroups.length; i++) {
|
4986 |
originalGroups[i].update();
|
4987 |
}
|
4988 |
+
};
|
4989 |
|
4990 |
LayerContainer.prototype.activateFirst = function () {
|
4991 |
var layers = this.getSortedLayers();
|
4992 |
if (layers.length > 0) {
|
4993 |
layers[layers.length - 1].activate(); //Do not show editor on load!
|
4994 |
}
|
4995 |
+
};
|
4996 |
|
4997 |
LayerContainer.prototype.resetModes = function (mode) {
|
4998 |
var layers = this.getSortedLayers();
|
5002 |
layers[i].container.resetModes(mode);
|
5003 |
}
|
5004 |
}
|
5005 |
+
};
|
5006 |
|
5007 |
LayerContainer.prototype.copyModes = function (mode, currentMode) {
|
5008 |
var layers = this.getSortedLayers();
|
5012 |
layers[i].container.copyModes(mode, currentMode);
|
5013 |
}
|
5014 |
}
|
5015 |
+
};
|
5016 |
|
5017 |
LayerContainer.prototype.changeEditorModes = function (mode) {
|
5018 |
var layers = this.getSortedLayers();
|
5022 |
layers[i].container.changeEditorModes(mode);
|
5023 |
}
|
5024 |
}
|
5025 |
+
};
|
5026 |
|
5027 |
LayerContainer.prototype.renderModeProperties = function () {
|
5028 |
var layers = this.getSortedLayers();
|
5032 |
layers[i].container.renderModeProperties();
|
5033 |
}
|
5034 |
}
|
5035 |
+
};
|
5036 |
|
5037 |
LayerContainer.prototype.getAllLayers = function (layers) {
|
5038 |
layers = layers || [];
|
5044 |
}
|
5045 |
}
|
5046 |
return layers;
|
5047 |
+
};
|
5048 |
|
5049 |
LayerContainer.prototype.getData = function (params) {
|
5050 |
params = $.extend({
|
5065 |
}
|
5066 |
|
5067 |
return layers;
|
5068 |
+
};
|
5069 |
|
5070 |
LayerContainer.prototype.getHTML = function (base64) {
|
5071 |
var layers = this.getSortedLayers(),
|
5074 |
nodes.push(layers[i].getHTML(base64));
|
5075 |
}
|
5076 |
return nodes;
|
5077 |
+
};
|
5078 |
|
5079 |
/**
|
5080 |
* Used for layer editor
|
5098 |
}
|
5099 |
|
5100 |
return droppables;
|
5101 |
+
};
|
5102 |
|
5103 |
/**
|
5104 |
* Used for Layer List
|
5121 |
}
|
5122 |
|
5123 |
return droppables;
|
5124 |
+
};
|
5125 |
|
5126 |
return LayerContainer;
|
5127 |
});
|
5847 |
} else {
|
5848 |
var activeLayer = this.mainContainer.getSelectedLayer();
|
5849 |
if (activeLayer) {
|
5850 |
+
if (this.isCol(activeLayer) || this.isContent(activeLayer)) {
|
5851 |
+
requestedLayers = activeLayer.container.getSortedLayers()
|
5852 |
+
} else {
|
5853 |
+
requestedLayers = [activeLayer];
|
5854 |
+
}
|
5855 |
}
|
5856 |
}
|
5857 |
} else {
|
7602 |
|
7603 |
/**
|
7604 |
*
|
|
|
7605 |
* @param placement
|
7606 |
* @param layer
|
7607 |
* @param canvasManager
|
7608 |
* @constructor
|
7609 |
+
* @augments PlacementAbstract
|
7610 |
+
* @memberof scope
|
7611 |
*/
|
7612 |
function PlacementAbsolute(placement, layer, canvasManager) {
|
7613 |
this.type = 'absolute';
|
7688 |
|
7689 |
this.___makeLayerAlign();
|
7690 |
this.___makeLayerResizeable();
|
7691 |
+
};
|
7692 |
+
|
7693 |
+
PlacementAbsolute.cleanLayer = function ($layer) {
|
7694 |
+
var devices = [
|
7695 |
+
'desktopPortrait',
|
7696 |
+
'desktopLandscape',
|
7697 |
+
'tabletPortrait',
|
7698 |
+
'tabletLandscape',
|
7699 |
+
'mobilePortrait',
|
7700 |
+
'mobileLandscape'
|
7701 |
+
];
|
7702 |
+
|
7703 |
+
$layer
|
7704 |
+
.removeAttr('data-align')
|
7705 |
+
.removeAttr('data-valign')
|
7706 |
+
.css({
|
7707 |
+
left: '',
|
7708 |
+
top: '',
|
7709 |
+
right: '',
|
7710 |
+
bottom: '',
|
7711 |
+
width: '',
|
7712 |
+
height: '',
|
7713 |
+
'text-align': ''
|
7714 |
+
});
|
7715 |
+
var properties = ['parentid', 'responsiveposition', 'responsivesize', 'parentalign', 'parentvalign',
|
7716 |
+
'align', 'valign', 'left', 'top', 'width', 'height'];
|
7717 |
+
|
7718 |
+
var data = {};
|
7719 |
+
for (var i = 0; i < properties.length; i++) {
|
7720 |
+
var prop = properties[i].toLowerCase();
|
7721 |
+
data[prop] = $layer.data(prop);
|
7722 |
+
$layer.removeAttr(prop);
|
7723 |
+
$layer.removeData(prop);
|
7724 |
+
for (var j = 0; j < devices.length; j++) {
|
7725 |
+
var device = devices[j].toLowerCase();
|
7726 |
+
data[device + prop] = $layer.data(device + prop);
|
7727 |
+
$layer.removeAttr(device + prop);
|
7728 |
+
$layer.removeData(device + prop);
|
7729 |
+
}
|
7730 |
+
}
|
7731 |
+
return data;
|
7732 |
+
};
|
7733 |
|
7734 |
PlacementAbsolute.prototype.deActivated = function (newMode) {
|
7735 |
|
7753 |
this.$layer.triggerHandler('LayerUnavailable');
|
7754 |
|
7755 |
var properties = ['parentid', 'responsiveposition', 'responsivesize', 'parentalign', 'parentvalign',
|
7756 |
+
'align', 'valign', 'left', 'top', 'width', 'height'],
|
7757 |
+
historicalData = this.layer.getPropertiesData(properties);
|
|
|
7758 |
|
7759 |
this.layer.removeProperties(properties);
|
7760 |
|
8615 |
|
8616 |
PlacementAbsolute.prototype.subscribeParent = function () {
|
8617 |
var that = this;
|
8618 |
+
var $newParent = $('#' + this.layer.property.parentid);
|
8619 |
+
if (this.parent && !$newParent.is(this.parent)) {
|
8620 |
+
this.parent.off(this.subscribeParentCallbacks);
|
8621 |
+
this.parent = false;
|
8622 |
+
}
|
8623 |
+
if (!this.parent) {
|
8624 |
+
this.subscribeParentCallbacks = {
|
8625 |
+
LayerResized: function () {
|
8626 |
+
that.resizeParent.apply(that, arguments);
|
8627 |
+
},
|
8628 |
+
LayerParent: function () {
|
8629 |
+
that.$layer.addClass('n2-ss-layer-parent');
|
8630 |
+
that.$layer.triggerHandler('LayerParent');
|
8631 |
+
},
|
8632 |
+
LayerUnParent: function () {
|
8633 |
+
that.$layer.removeClass('n2-ss-layer-parent');
|
8634 |
+
that.$layer.triggerHandler('LayerUnParent');
|
8635 |
+
},
|
8636 |
+
LayerDeleted: function (e) {
|
8637 |
|
8638 |
+
that.layer.setProperty('parentid', '', 'layer');
|
8639 |
+
},
|
8640 |
+
LayerUnavailable: function (e) {
|
8641 |
|
8642 |
+
that.layer.setProperty('parentid', '', 'layer');
|
8643 |
+
that.layer.setProperty('left', 0, 'layer');
|
8644 |
+
that.layer.setProperty('top', 0, 'layer');
|
8645 |
+
},
|
8646 |
+
LayerShowChange: function (e, mode, value) {
|
8647 |
+
if (that.layer.getMode() == mode) {
|
8648 |
+
that.parentIsVisible = value;
|
8649 |
+
}
|
8650 |
+
},
|
8651 |
+
'n2-ss-activate': function () {
|
8652 |
+
that.$layerRow.addClass('n2-parent-active');
|
8653 |
+
},
|
8654 |
+
'n2-ss-deactivate': function () {
|
8655 |
+
that.$layerRow.removeClass('n2-parent-active');
|
8656 |
+
},
|
8657 |
+
'LayerGetDataWithChildren': function (e, layersData, layers) {
|
8658 |
+
that.layer.getDataWithChildren(layersData, layers);
|
8659 |
}
|
8660 |
+
};
|
8661 |
+
this.parent = $newParent.on(this.subscribeParentCallbacks);
|
8662 |
+
this.parent.data('layerObject').placement.current.addChild(this);
|
8663 |
+
this.$layer.addClass('n2-ss-layer-has-parent');
|
8664 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8665 |
};
|
8666 |
|
8667 |
PlacementAbsolute.prototype.unSubscribeParent = function (context) {
|
8669 |
this.$layer.removeClass('n2-ss-layer-has-parent');
|
8670 |
if (this.parent) {
|
8671 |
this.parent.off(this.subscribeParentCallbacks);
|
8672 |
+
this.parent = false;
|
8673 |
+
this.subscribeParentCallbacks = {};
|
8674 |
+
if (context != 'delete') {
|
8675 |
+
var position = this.$layer.position();
|
8676 |
+
this._setPosition(null, null, position.left, position.top, null, null, true);
|
8677 |
+
}
|
8678 |
}
|
8679 |
|
8680 |
};
|
8718 |
this.$layer.removeAttr('data-parentid');
|
8719 |
this.unSubscribeParent();
|
8720 |
} else {
|
8721 |
+
//setTimeout($.proxy(function () {
|
8722 |
if ($('#' + value).length == 0) {
|
8723 |
this.layer.setProperty('parentid', '', 'layer');
|
8724 |
} else {
|
8727 |
var position = this.$layer.position();
|
8728 |
this._setPosition(null, null, position.left, position.top, null, null, true);
|
8729 |
}
|
8730 |
+
//}, this), 50);
|
8731 |
}
|
8732 |
};
|
8733 |
|
8928 |
|
8929 |
/**
|
8930 |
*
|
|
|
8931 |
* @param placement
|
8932 |
* @param layer
|
8933 |
* @param canvasManager
|
8934 |
* @constructor
|
8935 |
+
* @augments PlacementAbstract
|
8936 |
+
* @memberof scope
|
8937 |
*/
|
8938 |
function PlacementNormal(placement, layer, canvasManager) {
|
8939 |
this.type = 'normal';
|
8948 |
|
8949 |
PlacementNormal.prototype.start = function () {
|
8950 |
this.$layer = this.layer.layer;
|
8951 |
+
};
|
8952 |
|
8953 |
PlacementNormal.prototype.preActivation = function (lastPlacement) {
|
8954 |
if (lastPlacement.type == 'absolute' && this.layer.item && this.layer.item.needSize) {
|
8959 |
this.transferredProperties.height = height;
|
8960 |
}
|
8961 |
}
|
8962 |
+
};
|
8963 |
|
8964 |
PlacementNormal.prototype.activated = function (properties) {
|
8965 |
this.loadProperties($.extend(properties, this.transferredProperties));
|
8977 |
e.stopPropagation();
|
8978 |
})
|
8979 |
});
|
8980 |
+
};
|
8981 |
|
8982 |
PlacementNormal.prototype.loadProperties = function (options) {
|
8983 |
this.layer.createDeviceProperty('margin', {desktopPortrait: '0|*|0|*|0|*|0|*|px+'}, this.layer.layer, this);
|
8984 |
this.layer.createDeviceProperty('height', {desktopPortrait: (options.height || 0)}, this.layer.layer, this);
|
8985 |
this.layer.createDeviceProperty('maxwidth', {desktopPortrait: 0}, this.layer.layer, this);
|
8986 |
this.layer.createDeviceProperty('selfalign', {desktopPortrait: 'inherit'}, this.layer.layer, this);
|
8987 |
+
};
|
8988 |
+
|
8989 |
+
PlacementNormal.cleanLayer = function ($layer) {
|
8990 |
+
var devices = [
|
8991 |
+
'desktopPortrait',
|
8992 |
+
'desktopLandscape',
|
8993 |
+
'tabletPortrait',
|
8994 |
+
'tabletLandscape',
|
8995 |
+
'mobilePortrait',
|
8996 |
+
'mobileLandscape'
|
8997 |
+
];
|
8998 |
+
|
8999 |
+
$layer
|
9000 |
+
.removeClass('n2-ss-has-maxwidth')
|
9001 |
+
.removeAttr('data-cssselfalign')
|
9002 |
+
.css({
|
9003 |
+
position: '',
|
9004 |
+
margin: '',
|
9005 |
+
height: '',
|
9006 |
+
maxWidth: ''
|
9007 |
+
});
|
9008 |
+
|
9009 |
+
var properties = ['margin', 'height', 'maxwidth', 'selfalign'];
|
9010 |
+
|
9011 |
+
var data = {};
|
9012 |
+
for (var i = 0; i < properties.length; i++) {
|
9013 |
+
var prop = properties[i].toLowerCase();
|
9014 |
+
data[prop] = $layer.data(prop);
|
9015 |
+
$layer.removeAttr(prop);
|
9016 |
+
$layer.removeData(prop);
|
9017 |
+
for (var j = 0; j < devices.length; j++) {
|
9018 |
+
var device = devices[j].toLowerCase();
|
9019 |
+
data[prop] = $layer.data(device + prop);
|
9020 |
+
$layer.removeAttr(device + prop);
|
9021 |
+
$layer.removeData(device + prop);
|
9022 |
+
}
|
9023 |
+
}
|
9024 |
+
return data;
|
9025 |
+
};
|
9026 |
|
9027 |
PlacementNormal.prototype.deActivated = function (newMode) {
|
9028 |
this.layer.$.off('.placementnormal');
|
9032 |
this.layer.layer.removeClass('n2-ss-has-maxwidth');
|
9033 |
this.layer.layer.removeAttr('data-cssselfalign');
|
9034 |
|
9035 |
+
var properties = ['margin', 'height', 'maxwidth', 'selfalign'],
|
9036 |
+
historicalData = this.layer.getPropertiesData(properties);
|
9037 |
+
this.layer.removeProperties(properties);
|
|
|
|
|
9038 |
|
9039 |
|
9040 |
this.layer.layer.css({
|
9044 |
maxWidth: ''
|
9045 |
});
|
9046 |
return historicalData;
|
9047 |
+
};
|
9048 |
|
9049 |
PlacementNormal.prototype._renderModeProperties = function (isReset) {
|
9050 |
|
9052 |
this._syncheight();
|
9053 |
this._syncmaxwidth();
|
9054 |
this._syncselfalign();
|
9055 |
+
};
|
9056 |
|
9057 |
PlacementNormal.prototype._syncmargin = function () {
|
9058 |
var margin = this.layer.getProperty('margin').split('|*|'),
|
9420 |
N2Require('Item', [], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
9421 |
"use strict";
|
9422 |
|
9423 |
+
/**
|
9424 |
+
* @constructor
|
9425 |
+
* @memberof scope
|
9426 |
+
*/
|
9427 |
function Item($item, layer, itemEditor) {
|
9428 |
|
9429 |
if (this.type === undefined) {
|
9430 |
this.type = $item.data('item');
|
9431 |
}
|
9432 |
|
9433 |
+
this.needSize = this.constructor.needSize;
|
9434 |
|
9435 |
this.self = this;
|
9436 |
this.$item = $item;
|
9475 |
|
9476 |
|
9477 |
$(window).trigger('ItemCreated');
|
9478 |
+
}
|
9479 |
+
|
9480 |
+
Item.needSize = false;
|
9481 |
|
9482 |
Item.prototype.setSelf = function (self) {
|
9483 |
if (this.self != this) {
|
9484 |
this.self.setSelf(self);
|
9485 |
}
|
9486 |
this.self = self;
|
9487 |
+
};
|
9488 |
|
9489 |
Item.prototype.getSelf = function () {
|
9490 |
if (this.self != this) {
|
9491 |
this.self = this.self.getSelf();
|
9492 |
}
|
9493 |
return this.self;
|
9494 |
+
};
|
9495 |
|
9496 |
Item.prototype.changeValue = function (property, value) {
|
9497 |
if (this == this.itemEditor.activeItem) {
|
9657 |
var layer = this.layer;
|
9658 |
$("<img/>")
|
9659 |
.attr("src", image)
|
9660 |
+
.on('load', function () {
|
9661 |
var slideSize = smartSlider.frontend.dimensions.slide;
|
9662 |
var width = this.width,
|
9663 |
height = this.height,
|
9793 |
} else {
|
9794 |
this.activeForm.fields.eq(0).data('field').focus(typeof context !== 'undefined' && context);
|
9795 |
}
|
9796 |
+
};
|
9797 |
|
9798 |
ItemManager.prototype.startItems = function () {
|
9799 |
|
10243 |
N2Require('Col', ['ContentAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
10244 |
"use strict";
|
10245 |
|
10246 |
+
/**
|
10247 |
+
* @constructor
|
10248 |
+
* @augments ComponentAbstract
|
10249 |
+
* @memberof scope
|
10250 |
+
*/
|
10251 |
function Col(canvasManager, group, properties) {
|
10252 |
this.label = 'Col';
|
10253 |
this.type = 'col';
|
10265 |
Col.prototype._createLayer = function () {
|
10266 |
return $('<div class="n2-ss-layer"><div class="n2-ss-layer-content n2-ss-layer-col"></div></div>')
|
10267 |
.attr('data-type', this.type);
|
10268 |
+
};
|
10269 |
|
10270 |
Col.prototype.addProperties = function ($layer) {
|
10271 |
|
10272 |
scope.ContentAbstract.prototype.addProperties.call(this, $layer);
|
10273 |
|
10274 |
this.createProperty('colwidth', '1', $layer);
|
10275 |
+
this.createProperty('link', '#|*|_self', $layer);
|
10276 |
this.createProperty('borderradius', 0, $layer);
|
10277 |
this.createProperty('boxshadow', '0|*|0|*|0|*|0|*|00000080', $layer);
|
10278 |
|
10281 |
this.createProperty('bordercolor', 'ffffffff', $layer);
|
10282 |
|
10283 |
this.createDeviceProperty('order', {desktopPortrait: 0}, $layer);
|
10284 |
+
};
|
10285 |
|
10286 |
Col.prototype.create = function () {
|
10287 |
scope.ContentAbstract.prototype.create.call(this);
|
10294 |
this._syncboxshadow();
|
10295 |
|
10296 |
this._onReady();
|
10297 |
+
};
|
10298 |
|
10299 |
Col.prototype.load = function ($layer) {
|
10300 |
|
10318 |
this.group.setColsWidth(widths);
|
10319 |
}
|
10320 |
}
|
10321 |
+
};
|
10322 |
|
10323 |
Col.prototype.createRow = function () {
|
10324 |
this.$content = this.layer.find('.n2-ss-layer-content:first');
|
10343 |
this.container.$ul.appendTo(this.layerRow);
|
10344 |
|
10345 |
this.readyDeferred.done($.proxy(this._syncopened, this));
|
10346 |
+
};
|
10347 |
|
10348 |
Col.prototype._start = function (isCreate) {
|
10349 |
|
10352 |
if (isCreate) {
|
10353 |
this.highlight(2000);
|
10354 |
}
|
10355 |
+
};
|
10356 |
|
10357 |
Col.prototype.getRealOrder = function () {
|
10358 |
var order = this.getProperty('order');
|
10360 |
return 10;
|
10361 |
}
|
10362 |
return order;
|
10363 |
+
};
|
10364 |
|
10365 |
Col.prototype._syncorder = function () {
|
10366 |
var order = this.getProperty('order');
|
10372 |
}
|
10373 |
|
10374 |
this.group.refreshUI();
|
10375 |
+
};
|
10376 |
|
10377 |
Col.prototype._synccolwidth = function () {
|
10378 |
this.layer.css('width', ((new Fraction(this.getProperty('colwidth'))).valueOf() * 100) + '%');
|
10379 |
this.group.refreshUI();
|
10380 |
+
};
|
10381 |
+
|
10382 |
+
Col.prototype._synclink = function () {
|
10383 |
+
};
|
10384 |
|
10385 |
Col.prototype._syncborderradius = function () {
|
10386 |
this.$content.css('border-radius', this.getProperty('borderradius') + 'px');
|
10387 |
+
};
|
10388 |
|
10389 |
Col.prototype._syncborderwidth =
|
10390 |
Col.prototype._syncbordercolor =
|
10391 |
Col.prototype._syncborderstyle = function () {
|
10392 |
this._syncborder();
|
10393 |
+
};
|
10394 |
|
10395 |
Col.prototype._syncborder = function () {
|
10396 |
var borderstyle = this.getProperty('borderstyle');
|
10406 |
}
|
10407 |
|
10408 |
this.update();
|
10409 |
+
};
|
10410 |
|
10411 |
Col.prototype._syncboxshadow = function () {
|
10412 |
var boxShadow = this.getProperty('boxshadow').split('|*|');
|
10415 |
} else {
|
10416 |
this.$content.css('box-shadow', '');
|
10417 |
}
|
10418 |
+
};
|
10419 |
|
10420 |
Col.prototype.delete = function () {
|
10421 |
if (this.group.container.getLayerCount() > 1) {
|
10423 |
} else {
|
10424 |
this.group.delete();
|
10425 |
}
|
10426 |
+
};
|
10427 |
|
10428 |
Col.prototype.getHTML = function (base64) {
|
10429 |
var layer = scope.ComponentAbstract.prototype.getHTML.call(this, base64);
|
10430 |
|
10431 |
layer.attr('data-rowcolumns', this.group.getColumns());
|
10432 |
return layer;
|
10433 |
+
};
|
10434 |
|
10435 |
Col.prototype.renderModeProperties = function (isReset) {
|
10436 |
this._syncorder();
|
10437 |
|
10438 |
scope.ContentAbstract.prototype.renderModeProperties.call(this, isReset);
|
10439 |
+
};
|
10440 |
|
10441 |
Col.prototype.update = function () {
|
10442 |
|
10443 |
this.group._syncwrapafter();
|
10444 |
scope.ComponentAbstract.prototype.update.call(this);
|
10445 |
+
};
|
10446 |
|
10447 |
return Col;
|
10448 |
});
|
11037 |
|
11038 |
ComponentAbstract.prototype.getData = function (params) {
|
11039 |
var data = {
|
11040 |
+
type: this.type,
|
11041 |
+
lastplacement: this.placement.getType()
|
11042 |
};
|
11043 |
|
11044 |
if (this.status > scope.ComponentAbstract.STATUS.NORMAL) {
|
11084 |
|
11085 |
ComponentAbstract.prototype.onChildCountChange = function () {
|
11086 |
|
11087 |
+
};
|
11088 |
|
11089 |
+
/**
|
11090 |
+
*
|
11091 |
+
* @param array layersData Contains
|
11092 |
+
* @param array layers Contains layer objects to be able to track layers in the current copy process to prevent same layer inserted into the clipboard twice when parent picker used.
|
11093 |
+
* @returns array layersData
|
11094 |
+
*/
|
11095 |
+
ComponentAbstract.prototype.getDataWithChildren = function (layersData, layers) {
|
11096 |
+
if ($.inArray(this, layers) == -1) {
|
11097 |
+
layers.push(this);
|
11098 |
+
layersData.push(this.getData({
|
11099 |
+
layersIncluded: true,
|
11100 |
+
itemsIncluded: true
|
11101 |
+
}));
|
11102 |
+
this.layer.triggerHandler('LayerGetDataWithChildren', [layersData, layers]);
|
11103 |
+
}
|
11104 |
+
return layersData;
|
11105 |
};
|
11106 |
|
11107 |
ComponentAbstract.prototype.markOver = function (e) {
|
11502 |
N2Require('Content', ['ContentAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
11503 |
"use strict";
|
11504 |
|
11505 |
+
/**
|
11506 |
+
* @constructor
|
11507 |
+
* @augments ComponentAbstract
|
11508 |
+
* @memberof scope
|
11509 |
+
*/
|
11510 |
function Content(canvasManager, group, properties) {
|
11511 |
this.label = n2_('Content');
|
11512 |
this.type = 'content';
|
12016 |
N2Require('Layer', ['ComponentAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
12017 |
"use strict";
|
12018 |
|
12019 |
+
/**
|
12020 |
+
* @constructor
|
12021 |
+
* @augments ComponentAbstract
|
12022 |
+
* @memberof scope
|
12023 |
+
*/
|
12024 |
function Layer(canvasManager, group, properties) {
|
12025 |
this.label = n2_('Layer');
|
12026 |
this.type = 'layer';
|
12085 |
}
|
12086 |
}, this),
|
12087 |
dblclick: $.proxy(function (e) {
|
12088 |
+
if (!nextend.context.isPreventDblClick) {
|
12089 |
+
e.stopPropagation();
|
12090 |
+
$('[data-tab="item"]').trigger('click');
|
12091 |
+
this.item.itemEditor.focusFirst('dblclick');
|
12092 |
+
}
|
12093 |
}, this)
|
12094 |
});
|
12095 |
}
|
12286 |
|
12287 |
|
12288 |
smartSlider.frontend.sliderElement.on('SliderResize', $.proxy(this.onResize, this));
|
12289 |
+
};
|
12290 |
|
12291 |
MainContainer.prototype.onResize = function (e, ratios) {
|
12292 |
|
12329 |
|
12330 |
MainContainer.prototype.blurActiveGroup = function () {
|
12331 |
this.isActiveGroupBlurred = true;
|
12332 |
+
};
|
12333 |
|
12334 |
MainContainer.prototype.unBlurActiveGroup = function () {
|
12335 |
this.isActiveGroupBlurred = false;
|
12336 |
+
};
|
12337 |
|
12338 |
MainContainer.prototype.getActiveGroup = function () {
|
12339 |
if (this.isActiveGroupBlurred) {
|
12361 |
|
12362 |
return group;
|
12363 |
}
|
12364 |
+
switch (this.canvasManager.currentEditorMode) {
|
12365 |
+
case 'content':
|
12366 |
+
return this.canvasManager.mainContent;
|
12367 |
+
}
|
12368 |
return this;
|
12369 |
+
};
|
12370 |
|
12371 |
MainContainer.prototype.getSelectedLayer = function () {
|
12372 |
if (this.activeLayer == null) {
|
12379 |
if (requestedLayers === undefined) {
|
12380 |
return [];
|
12381 |
}
|
12382 |
+
var layersData = [],
|
12383 |
+
layers = [];
|
12384 |
|
12385 |
for (var i = 0; i < requestedLayers.length; i++) {
|
12386 |
+
requestedLayers[i].getDataWithChildren(layersData, layers);
|
12387 |
}
|
12388 |
+
return layersData;
|
|
|
12389 |
};
|
12390 |
|
12391 |
MainContainer.prototype.layerDeleted = function (layer) {
|
12412 |
MainContainer.prototype.refreshHasLayers = function () {
|
12413 |
$('body').toggleClass('n2-ss-has-layers', this.container.getLayerCount() > 0);
|
12414 |
nextend.triggerResize();
|
12415 |
+
};
|
12416 |
|
12417 |
MainContainer.prototype.getName = function () {
|
12418 |
return 'Slide';
|
12419 |
+
};
|
12420 |
|
12421 |
MainContainer.prototype.update = function () {
|
12422 |
|
12423 |
+
};
|
12424 |
|
12425 |
MainContainer.prototype.onChildCountChange = function () {
|
12426 |
|
12427 |
+
};
|
12428 |
|
12429 |
MainContainer.prototype.markEnter = function (e) {
|
12430 |
|
12431 |
+
};
|
12432 |
|
12433 |
MainContainer.prototype.markLeave = function (e) {
|
12434 |
|
12435 |
+
};
|
12436 |
|
12437 |
MainContainer.prototype.getSelf = function () {
|
12438 |
return this;
|
12439 |
+
};
|
12440 |
|
12441 |
MainContainer.prototype.createLayerAnimations = function (horizontalRatio, verticalRatio) {
|
12442 |
var animations = [];
|
12445 |
animations.push.apply(animations, children[i].createLayerAnimations(horizontalRatio, verticalRatio));
|
12446 |
}
|
12447 |
return animations;
|
12448 |
+
};
|
12449 |
|
12450 |
MainContainer.prototype.getDroppables = function (exclude) {
|
12451 |
var editorMode = this.canvasManager.currentEditorMode,
|
12475 |
}
|
12476 |
|
12477 |
return droppables;
|
12478 |
+
};
|
12479 |
|
12480 |
MainContainer.prototype.getLLDroppables = function (layer) {
|
12481 |
return this.container.getLLDroppables(layer);
|
12482 |
+
};
|
12483 |
|
12484 |
MainContainer.prototype.getDroppable = function () {
|
12485 |
return {
|
12487 |
layer: this,
|
12488 |
placement: 'absolute'
|
12489 |
}
|
12490 |
+
};
|
12491 |
|
12492 |
MainContainer.prototype.getLLDroppable = function (layer) {
|
12493 |
switch (layer.type) {
|
12502 |
break;
|
12503 |
}
|
12504 |
return false;
|
12505 |
+
};
|
12506 |
|
12507 |
MainContainer.prototype.replaceLayers = function (layersData) {
|
12508 |
|
12521 |
|
12522 |
this.canvasManager.refreshMode();
|
12523 |
|
12524 |
+
this.container.layerContainerElement.n2imagesLoaded()
|
12525 |
+
.always($.proxy(this.canvasManager.refreshMode, this.canvasManager));
|
12526 |
+
|
12527 |
if (!this.getSelectedLayer()) {
|
12528 |
if (layers.length > 0) {
|
12529 |
layers[0].activate();
|
12535 |
}
|
12536 |
|
12537 |
return layers;
|
12538 |
+
};
|
12539 |
|
12540 |
MainContainer.prototype.historyDeleteAll = function (layersData, historicalLayers) {
|
12541 |
for (var i = 0; i < historicalLayers.length; i++) {
|
12543 |
}
|
12544 |
|
12545 |
this.canvasManager.mainContent.getSelf().remove();
|
12546 |
+
};
|
12547 |
|
12548 |
MainContainer.prototype.historyReplaceLayers = function (layersData, historicalLayers, historicalAllLayers) {
|
12549 |
this.replaceLayers(layersData);
|
12552 |
for (var i = 0; i < historicalAllLayers.length; i++) {
|
12553 |
historicalAllLayers[i].setSelf(layers[i]);
|
12554 |
}
|
12555 |
+
};
|
12556 |
|
12557 |
MainContainer.prototype.addLayers = function (layersData, group) {
|
12558 |
|
12569 |
smartSlider.history.addSimple(this, this.historyDeleteLayers, this.historyAddLayers, [layersData, layers, group]);
|
12570 |
|
12571 |
return layers;
|
12572 |
+
};
|
12573 |
|
12574 |
MainContainer.prototype.historyDeleteLayers = function (layersData, historicalLayers, historicalGroup) {
|
12575 |
for (var i = 0; i < historicalLayers.length; i++) {
|
12576 |
historicalLayers[i].getSelf().delete();
|
12577 |
}
|
12578 |
+
};
|
12579 |
|
12580 |
MainContainer.prototype.historyAddLayers = function (layersData, historicalLayers, historicalGroup) {
|
12581 |
var layers = this.addLayers(layersData, historicalGroup.getSelf());
|
12582 |
for (var i = 0; i < historicalLayers.length; i++) {
|
12583 |
historicalLayers[i].setSelf(layers[i]);
|
12584 |
}
|
12585 |
+
};
|
12586 |
|
12587 |
MainContainer.prototype.dataToLayers = function (layers, $targetGroupContent) {
|
12588 |
var nodes = [];
|
12609 |
}
|
12610 |
|
12611 |
return nodes;
|
12612 |
+
};
|
12613 |
|
12614 |
MainContainer.prototype._buildNodePrepareID = function ($layer, layerData) {
|
12615 |
if (layerData.id) {
|
12644 |
layerData.parentid = '';
|
12645 |
}
|
12646 |
}
|
12647 |
+
};
|
12648 |
|
12649 |
|
12650 |
MainContainer.prototype.buildContentNode = function (layerData, $targetGroupContent) {
|
12662 |
this.dataToLayers(layerData.layers, $content);
|
12663 |
|
12664 |
return $layer;
|
12665 |
+
};
|
12666 |
|
12667 |
MainContainer.prototype.buildRowNode = function (layerData, $targetGroupContent) {
|
12668 |
|
12681 |
this.dataToLayers(layerData.cols, $content);
|
12682 |
|
12683 |
return $layer;
|
12684 |
+
};
|
12685 |
|
12686 |
MainContainer.prototype.buildColNode = function (layerData, $targetGroupContent) {
|
12687 |
|
12698 |
this.dataToLayers(layerData.layers, $content);
|
12699 |
|
12700 |
return $layer;
|
12701 |
+
};
|
12702 |
|
12703 |
MainContainer.prototype.buildLayerNode = function (layerData, $targetGroupContent) {
|
12704 |
|
12740 |
N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], function ($, scope, smartSlider, undefined) {
|
12741 |
"use strict";
|
12742 |
|
12743 |
+
/**
|
12744 |
+
* @constructor
|
12745 |
+
* @augments ComponentAbstract
|
12746 |
+
* @memberof scope
|
12747 |
+
*/
|
12748 |
function Row(canvasManager, group, properties) {
|
12749 |
this.label = n2_('Row');
|
12750 |
this.type = 'row';
|
13687 |
inneralign: $('#layercol-inneralign'),
|
13688 |
verticalalign: $('#layercol-verticalalign'),
|
13689 |
bgcolor: $('#layercol-background-color'),
|
13690 |
+
link: $('#layercol-link'),
|
13691 |
bgimage: $('#layercol-background-image'),
|
13692 |
bgimagex: $('#layercol-background-focus-x'),
|
13693 |
bgimagey: $('#layercol-background-focus-y'),
|
library/media/dist/smartslider-backend.min.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
N2Require("ContextMenu",[],[],function(t,e,i){function n(e,i){this.isActive=!1,this.$el=e.data("nextendcontextmenu",this),this.parameters=t.extend({selector:!1,onShow:function(){}},i),this.$menu=t('<div class="n2-context-menu"></div>').on("mousedown",function(){nextend.context.setMouseDownArea("context-menu")}).appendTo("body"),this.parameters.selector?this.$el.on("contextmenu",this.parameters.selector,t.proxy(this.onShowContextMenu,this)):this.$el.on("contextmenu",t.proxy(this.onShowContextMenu,this))}return n.prototype.onShowContextMenu=function(e){e.preventDefault(),this.clearItems(),this.parameters.onShow.call(this,e,this),this.hasItems&&(e.stopPropagation(),this.isActive=!0,this.$menu.css({left:e.pageX,top:e.pageY}),t("html").on("mouseleave.nextendcontextmenu, click.nextendcontextmenu",t.proxy(this.onHide,this))),this.$menu.toggleClass("n2-active",this.hasItems)},n.prototype.onHide=function(){t("html").off(".nextendcontextmenu"),this.$menu.removeClass("n2-active"),this.isActive=!1},n.prototype.clearItems=function(){this.isActive&&this.onHide(),this.hasItems=!1,this.$menu.html("")},n.prototype.addItem=function(e,i,n){this.hasItems=!0,this.$menu.append(t('<div><i class="n2-i '+i+'"></i><span>'+e+"</span></div>").on("click",n))},t.fn.nextendContextMenu=function(e){return this.each(function(){new n(t(this),e)})},n}),N2Require("Zoom",[],[],function(t,e,i){function n(e){this.key="n2-ss-editor-device-lock-mode",this.devices={unknownUnknown:t("<div />")},this.responsives=[e],e.setOrientation("portrait"),e.parameters.onResizeEnabled=0,e.parameters.forceFull=0,e._getDevice=e._getDeviceZoom,this.lock=t("#n2-ss-lock").on("click",t.proxy(this.switchLock,this));var i=e.parameters.sliderWidthToDevice.desktopPortrait;this.container=e.containerElement.closest(".n2-ss-container-device").addBack(),this.container.width(i),this.containerWidth=i,this.initZoom();var n=t("#n2-ss-devices .n2-tr"),r=e.parameters.deviceModes;this.devices.desktopPortrait=t('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-desktop"></i></div>').prependTo(n),r.desktopLandscape?this.devices.desktopLandscape=t('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-desktop-landscape"></i></div>').prependTo(n):this.devices.desktopLandscape=this.devices.desktopPortrait,r.tabletPortrait?this.devices.tabletPortrait=t('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-tablet"></i></div>').prependTo(n):this.devices.tabletPortrait=this.devices.desktopPortrait,r.tabletLandscape?this.devices.tabletLandscape=t('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-tablet-landscape"></i></div>').prependTo(n):this.devices.tabletLandscape=this.devices.desktopLandscape,r.mobilePortrait?this.devices.mobilePortrait=t('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-mobile"></i></div>').prependTo(n):this.devices.mobilePortrait=this.devices.tabletPortrait,r.mobileLandscape?this.devices.mobileLandscape=t('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-mobile-landscape"></i></div>').prependTo(n):this.devices.mobileLandscape=this.devices.tabletLandscape,this.deviceOptions=t("#n2-ss-devices .n2-panel-option"),this.deviceOptions.each(t.proxy(function(e,i){t(i).on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"zoomDeviceClicked"),click:t.proxy(this.setDeviceMode,this)})},this)),e.sliderElement.on("SliderDeviceOrientation",t.proxy(this.onDeviceOrientationChange,this))}var r=null;return nextend.ssBeforeResponsive=function(){r=new n(this),nextend.ssBeforeResponsive=function(){r.add(this)}},n.prototype.add=function(t){this.responsives.push(t),t.setOrientation("portrait"),t.parameters.onResizeEnabled=0,t.parameters.forceFull=0,t._getDevice=t._getDeviceZoom},n.prototype.onDeviceOrientationChange=function(e,i){t("#n2-admin").removeClass("n2-ss-mode-"+i.lastDevice+i.lastOrientation).addClass("n2-ss-mode-"+i.device+i.orientation),this.devices[i.lastDevice+i.lastOrientation].removeClass("n2-active"),this.devices[i.device+i.orientation].addClass("n2-active")},n.prototype.setDeviceMode=function(e){var i=t(e.currentTarget);if((e.ctrlKey||e.metaKey)&&nextend.smartSlider.canvasManager){var n=i.data("orientation");nextend.smartSlider.canvasManager.copyOrResetMode(i.data("device")+n[0].toUpperCase()+n.substr(1))}else for(var r=0;r<this.responsives.length;r++)this.responsives[r].setOrientation(i.data("orientation")),this.responsives[r].setMode(i.data("device"),this.responsives[r])},n.prototype.switchLock=function(e){e.preventDefault(),this.lock.toggleClass("n2-active"),this.lock.hasClass("n2-active")?(this.setZoomSyncMode(),this.zoomChange(e,this.zoom.slider("value"),"sync",!1),t.jStorage.set(this.key,"sync")):(this.setZoomFixMode(),t.jStorage.set(this.key,"fix"))},n.prototype.initZoom=function(){var e=t("#n2-ss-slider-zoom");e.length>0&&("undefined"!=typeof e[0].slide&&(e[0].slide=null),this.zoom=e.removeAttr("slide").prop("slide",!1).slider({range:"min",step:1,value:1,min:0,max:102}),this.responsives[0].sliderElement.on("SliderResize",t.proxy(this.sliderResize,this)),"fix"==t.jStorage.get(this.key,"sync")?this.setZoomFixMode():(this.setZoomSyncMode(),this.lock.addClass("n2-active")))},n.prototype.sliderResize=function(t,e){this.setZoom()},n.prototype.setZoomFixMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this)})},n.prototype.setZoomSyncMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this)})},n.prototype.zoomChangeFixMode=function(t,e){this.zoomChange(t,e.value,"fix",e)},n.prototype.zoomChangeSyncMode=function(t,e){this.zoomChange(t,e.value,"sync",e)},n.prototype.zoomChange=function(t,e,n,r){var s;if(t.originalEvent!==i){var o=1;50>e?o=nextend.smallestZoom/this.containerWidth+Math.max(e/50,0)*(1-nextend.smallestZoom/this.containerWidth):e>52&&(o=1+(e-52)/50),s=parseInt(o*this.containerWidth),this.container.width(s);for(var a=1;a<this.responsives.length;a++)this.responsives[a].containerElement.width(s);for(var a=0;a<this.responsives.length;a++)switch(n){case"sync":this.responsives[a].doResize();break;default:this.responsives[a].doResize(!0)}}else s=this.container.last().width(),this.container.width(s);r&&(r.handle.innerHTML=s+"px")},n.prototype.setZoom=function(){var t=this.responsives[0].containerElement.width()/this.containerWidth,e=50;1>t?e=(t-nextend.smallestZoom/this.containerWidth)/(1-nextend.smallestZoom/this.containerWidth)*50:t>1&&(e=50*(t-1)+52);this.zoom.slider("value");this.zoom.slider("value",e)},n}),N2Require("CreateSlider",[],[],function(t,e,i){function n(e,i){this.addToGroupModal=null,this.groupID=e,this.ajaxUrl=i,t(".n2-ss-create-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showModal()},this)),this.notificationStack=new NextendNotificationCenterStackModal(t("body")),t(".n2-ss-add-sample-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showDemoSliders()},this)),"createslider"==window.location.hash.substring(1)&&this.showModal()}return n.prototype.showModal=function(){if(!this.createSliderModal){var e=this,i=this.ajaxUrl,n=[];n.push({key:"default",name:n2_("Default"),image:"$ss$/admin/images/sliderpresets/default.png"}),n.push({key:"fullwidth",name:n2_("Full width"),image:"$ss$/admin/images/sliderpresets/fullwidth.png"}),n.push({key:"thumbnailhorizontal",name:n2_("Thumbnail - horizontal"),image:"$ss$/admin/images/sliderpresets/thumbnailhorizontal.png"}),this.createSliderModal=new NextendModal({zero:{size:[N2SSPRO?750:550,N2SSPRO?630:520],title:n2_("Create Slider"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Create")+"</a>"],fn:{show:function(){var r=this.controls.find(".n2-button-green"),s=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),r.trigger("click")});s.append(this.createInput(n2_("Slider name"),"createslidertitle","width: 240px;")),s.append(this.createInputUnit(n2_("Width"),"createsliderwidth","px","width: 30px;")),s.append(this.createInputUnit(n2_("Height"),"createsliderheight","px","width: 30px;")),new N2Classes.FormElementAutocompleteSimple("createsliderwidth",["1920","1200","1000","800","600","400"]),new N2Classes.FormElementAutocompleteSimple("createsliderheight",["800","600","500","400","300","200"]);var o=t("#createslidertitle").val(n2_("Slider")).focus(),a=t("#createsliderwidth").val(1200),l=t("#createsliderheight").val(500);a.parent().addClass("n2-form-element-autocomplete ui-front"),l.parent().addClass("n2-form-element-autocomplete ui-front"),this.createHeading(n2_("Preset")).appendTo(this.content);var h=this.createImageRadio(n).css("height",N2SSPRO?360:100).appendTo(this.content),d=h.find("input");h.css("overflow","hidden"),this.createHeading(n2_("Import Sample Sliders")).appendTo(this.content),t('<div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample1.png")+'\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample2.png")+'\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample3.png")+"')\"></div>").on("click",t.proxy(function(){this.hide(),e.showDemoSliders()},this)).appendTo(this.content),r.on("click",t.proxy(function(){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(i,{nextendaction:"create"}),data:{groupID:e.groupID,sliderTitle:o.val(),sliderSizeWidth:a.val(),sliderSizeHeight:l.val(),preset:d.val()},dataType:"json"}).done(t.proxy(function(t){NextendAjaxHelper.startLoading()},this))},this))}}}})}this.createSliderModal.show()},n.prototype.showDemoSliders=function(){var e=this;t("body").css("overflow","hidden");var i=0,n=t('<iframe src="//smartslider3.com/demo-import/?pro='+i+"&version="+N2SS3VERSION+"&utm_campaign="+N2SS3C+"&utm_source=import-slider-frame&utm_medium=smartslider-"+N2PLATFORM+"-"+(i?"pro":"free")+'" frameborder="0"></iframe>').css({position:"fixed",zIndex:1e5,left:0,top:0,width:"100%",height:"100%"}).appendTo("body"),r=function(){t("body").css("overflow",""),n.remove(),window.removeEventListener("message",o,!1),e.notificationStack.popStack()},s=function(t){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(e.ajaxUrl,{nextendaction:"importDemo"}),data:{groupID:e.groupID,key:Base64.encode(t.replace(/^(http(s)?:)?\/\//,"//"))},dataType:"json"}).fail(function(){})},o=function(t){if("http://smartslider3.com"===t.origin||"https://smartslider3.com"===t.origin){var e=t.data;switch(e.key){case"importSlider":return void("function"==typeof nextend.joinCommunity?nextend.joinCommunity(function(){s(e.data.href)}):s(e.data.href));case"closeWindow":r()}}};this.notificationStack.enableStack(),NextendEsc.add(t.proxy(function(){return r(),!0},this)),window.addEventListener("message",o,!1)},n}),N2Require("ManageSliders",[],[],function(t,e,i){function n(i,n){this.preventSort=!1,this.groupID=i,this.ajaxUrl=n,this.sliders=[],this.sliderPanel=t("#n2-ss-slider-container"),this.orderBy="ordering"==this.sliderPanel.data("orderby"),this.slidersContainer=this.sliderPanel.find(".n2-ss-sliders-container");for(var r=this.slidersContainer.find(".n2-ss-box-slider"),s=0;s<r.length;s++)this.sliders.push(new e.Slider(this,r.eq(s)));this.changed(),this.initMenu(),this.initOrderable(),this.create=new e.CreateSlider(i,n),this.initBulk()}return n.prototype.changed=function(){t("html").attr("data-sliders",this.sliders.length)},n.prototype.initSliders=function(){for(var e=(this.sliders.length,this.slidersContainer.find(".n2-ss-box-slider")),i=[],n=0;n<e.length;n++){var r=e.eq(n).data("slider");i.push(r)}this.sliders=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidersChanged")},n.prototype.initOrderable=function(){this.orderBy&&this.slidersContainer.sortable({helper:"clone",forcePlaceholderSize:!1,tolerance:"pointer",connectWith:".n2-ss-box-slider-group",items:".n2-ss-box-slider",start:function(t,e){e.item.show()},stop:t.proxy(this.saveOrder,this),placeholder:"n2-box-sortable-placeholder",distance:10})},n.prototype.saveOrder=function(e){if(this.preventSort)return this.slidersContainer.sortable("cancel"),void(this.preventSort=!1);for(var i=this.slidersContainer.find(".n2-ss-box-slider"),n=[],r=[],s=[],o=0;o<i.length;o++){var a=i.eq(o).data("slider");n.push(a),r.push(a.getId())}for(var o=0;o<this.sliders.length;o++)s.push(this.sliders[o].getId());if(JSON.stringify(s)!=JSON.stringify(r)){t(window).triggerHandler("SmartSliderSidebarSlidersOrderChanged");var l={nextendcontroller:"sliders",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{groupID:this.groupID,sliderorder:r,isReversed:"DESC"==this.sliderPanel.data("orderbydirection")?1:0}}),this.sliders=n}},n.prototype.initMenu=function(){this.slider=null,this.menu=t("#n2-ss-slider-menu").detach().addClass("n2-inited"),this.menuActions={addToGroup:this.menu.find(".n2-ss-add-to-group").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.addToGroup([this.slider.getId()])},this)),removeFromGroup:this.menu.find(".n2-ss-remove-from-group").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.removeFromGroup([this.slider.getId()])},this)),duplicate:this.menu.find(".n2-ss-duplicate").on("click",t.proxy(function(t){this.slider.duplicate(t)},this)),"delete":this.menu.find(".n2-ss-delete").on("click",t.proxy(function(t){this.slider["delete"](t)},this)),preview:this.menu.find(".n2-ss-preview").on("click",t.proxy(function(t){this.slider.preview(t)},this))},this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},n.prototype.showMenu=function(t){this.slider=t,this.menu.appendTo(t.box)},n.prototype.hideMenu=function(){this.menu.hasClass("n2-active")&&this.menu.removeClass("n2-active").off("mouseleave"),this.menu.detach()},n.prototype.deleteSliders=function(e,i){this.hideMenu();var n=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slider-delete",n,t.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"delete"}),type:"POST",data:{sliders:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSliders(),this.leaveBulk()},this))},this))},n.prototype.duplicateSliders=function(e,i){for(var n=0;n<this.sliders.length;n++)this.sliders[n].selected&&this.sliders[n].duplicate(t.Event("click",{currentTarget:null}))},n.prototype.exportSliders=function(e,i){window.location.href=NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"exportAll"})+"&"+t.param({sliders:e,currentGroupID:this.groupID})},n.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.deSelect()})},this));t(".n2-bulk-actions").find("a").on("click",t.proxy(function(e){switch(e.preventDefault(),t(e.currentTarget).data("action")){case"duplicate":this.bulkAction("duplicateSliders",!1);break;case"delete":this.bulkAction("deleteSliders",!1);break;case"export":this.bulkAction("exportSliders",!1);break;case"addToGroup":this.bulkAction("addToGroup",!0)}},this))},n.prototype.addSelection=function(t){0==this.selection.length&&this.enterBulk(),this.selection.push(t)},n.prototype.removeSelection=function(e){this.selection.splice(t.inArray(e,this.selection),1),0==this.selection.length&&this.leaveBulk()},n.prototype.bulkSelect=function(t){for(var e=0;e<this.sliders.length;e++)t(this.sliders[e])},n.prototype.bulkAction=function(t,e){var i=[],n=[];this.bulkSelect(function(t){!t.selected||e&&t.isGroup||(i.push(t),n.push(t.getId()))}),n.length?(this[t](n,i),this.leaveBulk()):e?nextend.notificationCenter.notice("Please select one or more sliders for the action!"):nextend.notificationCenter.notice("Please select one or more sliders or groups for the action!")},n.prototype.enterBulk=function(){this.isBulkSelection||(this.isBulkSelection=!0,this.orderBy&&this.slidersContainer.sortable("option","disabled",!0),t("#n2-admin").addClass("n2-ss-has-box-selection"))},n.prototype.leaveBulk=function(){if(this.isBulkSelection){this.orderBy&&this.slidersContainer.sortable("option","disabled",!1),t("#n2-admin").removeClass("n2-ss-has-box-selection");for(var e=0;e<this.sliders.length;e++)this.sliders[e].deSelect();this.selection=[],this.isBulkSelection=!1}},n.prototype.removeFromGroup=function(e){return NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"removeFromGroup"}),data:{currentGroupID:this.groupID,sliders:e},dataType:"json"}).done(t.proxy(function(i){for(var n=0;n<e.length;n++)t('[data-sliderid="'+e[n]+'"]').data("slider").deleted();this.initSliders()},this))},n.prototype._addToGroup=function(e,i,n){return NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"addToGroup"}),data:{currentGroupID:this.groupID,groupID:i,action:e,sliders:n},dataType:"json"}).done(t.proxy(function(r){if("move"==e){for(var s=0;s<n.length;s++)t('[data-sliderid="'+n[s]+'"]').data("slider").deleted();this.initSliders()}var o=t('[data-sliderid="'+i+'"] .n2-box-placeholder-buttons .n2-button-grey');o.html(parseInt(o.html())+n.length)},this))},n.prototype.addToGroup=function(e){var i=null,n=this,r=(this.ajaxUrl,new NextendModal({zero:{size:[350,220],title:n2_("Add to group"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<div class="n2-button n2-button-with-actions n2-button-l n2-button-green n2-radius-s n2-h4"><a class="n2-button-inner" href="#" data-action="move">'+n2_("Move")+'</a><div class="n2-button-menu-open"><i class="n2-i n2-i-buttonarrow"></i><div class="n2-button-menu"><div class="n2-button-menu-inner n2-border-radius"><a class="n2-h4" href="#" data-action="copy">'+n2_("Copy")+'</a><a class="n2-h4" href="#" data-action="link">'+n2_("Link")+"</a></div></div></div></div>"],fn:{show:function(){this.controls.find(".n2-button-menu-open").n2opener();var r=this.controls.find("a"),s=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),r.eq(0).trigger("click")});s.append(this.createSelect(n2_("Group"),"choosegroup",i,"width:300px;"));var o=t("#choosegroup");r.on("click",t.proxy(function(i){i.preventDefault(),n._addToGroup(t(i.currentTarget).data("action"),o.val(),e).done(t.proxy(function(){this.hide(i)},this))},this))}}}}));NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"listGroups"}),dataType:"json"}).done(t.proxy(function(e){i=e.data,"undefined"!=typeof i[this.groupID]&&delete i[this.groupID],t.isEmptyObject(i)?(t("body").on({"groupAdded.addToGroup":t.proxy(function(){t("body").off(".addToGroup"),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"listGroups"}),dataType:"json"}).done(t.proxy(function(t){i=t.data,"undefined"!=typeof i[this.groupID]&&delete i[this.groupID],r.show()},this))},this),"groupAddCanceled.addToGroup":t.proxy(function(){t("body").off(".addToGroup")},this)}),this.createGroup.showModal()):r.show()},this))},n}),N2Require("Slider",[],[],function(t,e,i){function n(e,i){this.selected=!1,this.manager=e,this.box=i.data("slider",this).addClass("n2-clickable"),this.isGroup=this.box.hasClass("n2-ss-box-slider-group"),this.box.on("mouseenter",t.proxy(function(){this.manager.showMenu(this)},this)).on("mouseleave",t.proxy(function(){this.manager.hideMenu()},this)).on("click.n2-slider",t.proxy(this.goToEdit,this)),this.box.find(".n2-ss-box-select").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.invertSelection()},this))}return n.prototype.getId=function(){return this.box.data("sliderid")},n.prototype.goToEdit=function(t,e){var i=this.box.data("editurl");"undefined"!=typeof e&&e?window.open(i,"_blank"):window.location=i},n.prototype.preview=function(t){t.stopPropagation(),t.preventDefault(),window.open(NextendAjaxHelper.makeFallbackUrl(this.box.data("editurl"),{nextendcontroller:"preview",nextendaction:"index"}),"_blank")},n.prototype.duplicate=function(e){e.stopPropagation(),e.preventDefault();var i=t.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendcontroller:"slider",nextendaction:"duplicate"})}).done(t.proxy(function(e){var r=t(e.data).insertAfter(this.box),s=new n(this.manager,r);this.manager.initSliders(),i.resolve(s)},this)),i},n.prototype["delete"]=function(t){t.stopPropagation(),t.preventDefault(),this.manager.deleteSliders([this.getId()],[this])},n.prototype.deleted=function(){this.box.remove()},n.prototype.invertSelection=function(t){t&&t.preventDefault(),this.selected?this.deSelect():this.select()},n.prototype.select=function(){this.selected||(this.selected=!0,this.box.addClass("n2-selected"),this.manager.addSelection(this))},n.prototype.deSelect=function(){this.selected&&(this.selected=!1,this.box.removeClass("n2-selected"),this.manager.removeSelection(this))},n}),N2Require("FormElementAnimationManager",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.managerIdentifier=n,this.element.parent().on("click",t.proxy(this.show,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),this.name=this.element.siblings("input"),this.updateName(this.element.val()),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.show=function(e){e.preventDefault(),nextend[this.managerIdentifier].show(this.element.val(),t.proxy(this.save,this))},n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},n.prototype.save=function(t,e){this.val(e)},n.prototype.val=function(t){this.element.val(t),this.updateName(t),this.triggerOutsideChange()},n.prototype.insideChange=function(t){this.element.val(t),this.updateName(t),this.triggerInsideChange()},n.prototype.updateName=function(t){t=""==t?n2_("Disabled"):t.split("||").length>1?n2_("Multiple animations"):n2_("Single animation"),this.name.val(t)},n}),N2Require("FormElementBackground",["FormElement"],[],function(t,e,i){function n(i,n){this.value="",this.element=t("#"+i),this.$container=this.element.closest(".n2-form-tab"),this.panel=t("#"+i+"-panel"),this.setValue(n),this.options=this.panel.find(".n2-subform-image-option").on("click",t.proxy(this.selectOption,this)),this.active=this.getIndex(this.options.filter(".n2-active").get(0)),this.element.on("change",t.proxy(function(){this.insideChange(this.element.val())},this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.selectOption=function(e){var i=this.getIndex(e.currentTarget);if(i!=this.active){this.options.eq(i).addClass("n2-active"),this.options.eq(this.active).removeClass("n2-active"),this.active=i;var n=t(e.currentTarget).data("value");this.insideChange(n)}},n.prototype.setValue=function(t){this.$container.removeClass("n2-ss-background-type-"+this.value),this.value=t,this.$container.addClass("n2-ss-background-type-"+this.value)},n.prototype.insideChange=function(t){this.setValue(t),this.element.val(t),this.options.removeClass("n2-active"),this.options.filter('[data-value="'+t+'"]').addClass("n2-active"),this.triggerInsideChange()},n.prototype.getIndex=function(e){return t.inArray(e,this.options)},n}),N2Require("FormElementColumns",["FormElement"],[],function(t,e,i){function n(i){this.denominators={1:100,2:100,3:144,4:100,5:100,6:144},this.element=t("#"+i),e.FormElement.prototype.constructor.apply(this,arguments),this.$c=t("#"+i).parent(),this.$container=this.$c.find(".n2-ss-columns-element-container"),this.containerWidth=284,this.maxWidth=0,this.$container.sortable({axis:"x",tolerance:"pointer",items:".n2-ss-columns-element-column",helper:"clone",start:t.proxy(function(t,e){this.$container.addClass("n2-sortable-currently-sorted"),e.placeholder.css("width",e.item.width());var i=this.$container.find(".n2-ss-columns-element-column");e.item.data("index",i.index(e.item))},this),stop:t.proxy(function(t,e){var i=this.$container.find(".n2-ss-columns-element-column"),n=e.item.data("index"),r=i.index(e.item);n!=r&&(this.currentRow.moveCol(n,r),e.item.data("index",null)),this.makeResizable(),this.$container.removeClass("n2-sortable-currently-sorted")},this)}),this.$c.find(".n2-ss-columns-element-add-col").on({click:t.proxy(function(){this.currentRow.createCol()},this)})}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.getDenominator=function(t){return this.denominators[t]===i&&(this.denominators[t]=15*t),this.denominators[t]},n.prototype.setRow=function(t){this.currentRow=t,this.insideChange(t.getColumnsOrdered())},n.prototype.setValue=function(t){},n.prototype.insideChange=function(t){this.start(t)},n.prototype.activateColumn=function(t){var e=this.$container.find(".n2-ss-columns-element-column").index(t.currentTarget);this.currentRow.activateColumn(e,t)},n.prototype.start=function(e){this.percentages=[];for(var i=e.split("+"),n=0;n<i.length;n++)this.percentages.push(new Fraction(i[n]));this.refreshMaxWidth(),this.$container.empty();for(var n=0;n<this.percentages.length;n++)this.updateColumn(t('<div class="n2-ss-columns-element-column">').on("click",t.proxy(this.activateColumn,this)).appendTo(this.$container),this.percentages[n]);this.makeResizable()},n.prototype.refreshMaxWidth=function(){this.maxWidth=this.containerWidth-15*(this.percentages.length-1)},n.prototype.updateColumn=function(t,e){t.css("width",this.maxWidth*e.valueOf()+"px").html(Math.round(100*e.valueOf()*10)/10+"%")},n.prototype.makeResizable=function(){this.handles&&this.handles.remove(),this.$columns=this.$container.find(".n2-ss-columns-element-column"),t('<div class="n2-ss-columns-element-handle"><div class="n2-i n2-i-more"></div></div>').insertAfter(this.$columns.not(this.$columns.last())),this.handles=this.$container.find(".n2-ss-columns-element-handle").on("mousedown",t.proxy(this._resizeStart,this))},n.prototype._resizeStart=function(e){var i=this.handles.index(e.currentTarget),n=this.$container.offset().left+8;this.resizeContext={index:i,cLeft:n,$currentCol:this.$columns.eq(i),$nextCol:this.$columns.eq(i+1),startX:Math.max(0,Math.min(e.clientX-n,this.containerWidth))},this._resizeMove(e),t("html").off(".resizecol").on({"mousemove.resizecol":t.proxy(this._resizeMove,this),"mouseup.resizecol mouseleave.resizecol":t.proxy(this._resizeStop,this)})},n.prototype._resizeMove=function(e){e.preventDefault();var i=Math.max(0,Math.min(e.clientX-this.resizeContext.cLeft,this.containerWidth)),n=this.getDenominator(this.percentages.length),r=new Fraction(Math.round((i-this.resizeContext.startX)/(this.maxWidth/n)),n);r.compare(this.percentages[this.resizeContext.index].clone().mul(-1))<0&&(r=this.percentages[this.resizeContext.index].clone().mul(-1)),r.compare(this.percentages[this.resizeContext.index+1])>0&&(r=this.percentages[this.resizeContext.index+1].clone());var s=this.percentages[this.resizeContext.index].add(r),o=this.percentages[this.resizeContext.index+1].sub(r);this.updateColumn(this.resizeContext.$currentCol,s),this.updateColumn(this.resizeContext.$nextCol,o);var a=t.extend([],this.percentages);return a[this.resizeContext.index]=s,a[this.resizeContext.index+1]=o,this.onColumnWidthChange(a),[s,o]},n.prototype._resizeStop=function(e){var i=this._resizeMove(e);this.percentages[this.resizeContext.index]=i[0],this.percentages[this.resizeContext.index+1]=i[1],t("html").off(".resizecol"),delete this.resizeContext,this.currentRow.setRealColsWidth(this.percentages)},n.prototype.onColumnWidthChange=function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].valueOf());this.currentRow.updateColumnWidth(e)},n}),function(t){"use strict";function e(t,e){return isNaN(t=parseInt(t,10))&&i(),t*e}function i(){throw"Invalid Param"}function n(t,e){return this instanceof n?(o(t,e),t=n.REDUCE?d(s.d,s.n):1,this.s=s.s,this.n=s.n/t,void(this.d=s.d/t)):new n(t,e)}var r=2e3,s={s:1,n:0,d:1},o=function(t,n){var r,o=0,a=1,l=1,h=0,d=0,c=0,p=1,u=1,y=0,g=1,f=1,v=1,m=1e7;if(void 0===t||null===t);else if(void 0!==n)o=t,a=n,l=o*a;else switch(typeof t){case"object":"d"in t&&"n"in t?(o=t.n,a=t.d,"s"in t&&(o*=t.s)):0 in t?(o=t[0],1 in t&&(a=t[1])):i(),l=o*a;break;case"number":if(0>t&&(l=t,t=-t),t%1===0)o=t;else if(t>0){for(t>=1&&(u=Math.pow(10,Math.floor(1+Math.log(t)/Math.LN10)),t/=u);m>=g&&m>=v;){if(r=(y+f)/(g+v),t===r){m>=g+v?(o=y+f,a=g+v):v>g?(o=f,a=v):(o=y,a=g);break}t>r?(y+=f,g+=v):(f+=y,v+=g),g>m?(o=f,a=v):(o=y,a=g)}o*=u}else(isNaN(t)||isNaN(n))&&(a=o=NaN);break;case"string":if(g=t.match(/\d+|./g),"-"===g[y]?(l=-1,y++):"+"===g[y]&&y++,g.length===y+1?d=e(g[y++],l):"."===g[y+1]||"."===g[y]?("."!==g[y]&&(h=e(g[y++],l)),y++,(y+1===g.length||"("===g[y+1]&&")"===g[y+3]||"'"===g[y+1]&&"'"===g[y+3])&&(d=e(g[y],l),p=Math.pow(10,g[y].length),y++),("("===g[y]&&")"===g[y+2]||"'"===g[y]&&"'"===g[y+2])&&(c=e(g[y+1],l),u=Math.pow(10,g[y+1].length)-1,y+=3)):"/"===g[y+1]||":"===g[y+1]?(d=e(g[y],l),p=e(g[y+2],1),y+=3):"/"===g[y+3]&&" "===g[y+1]&&(h=e(g[y],l),d=e(g[y+2],l),p=e(g[y+4],1),y+=5),g.length<=y){a=p*u,l=o=c+a*h+u*d;break}default:i()}if(0===a)throw"DIV/0";s.s=0>l?-1:1,s.n=Math.abs(o),s.d=Math.abs(a)},a=function(t,e,i){for(var n=1;e>0;t=t*t%i,e>>=1)1&e&&(n=n*t%i);return n},l=function(t,e){for(;e%2===0;e/=2);for(;e%5===0;e/=5);if(1===e)return 0;for(var i=10%e,n=1;1!==i;n++)if(i=10*i%e,n>r)return 0;return n},h=function(t,e,i){for(var n=1,r=a(10,i,e),s=0;300>s;s++){if(n===r)return s;n=10*n%e,r=10*r%e}return 0},d=function(t,e){if(!t)return e;if(!e)return t;for(;;){if(t%=e,!t)return e;if(e%=t,!e)return t}};n.REDUCE=1,n.prototype={s:1,n:0,d:1,abs:function(){return new n(this.n,this.d)},neg:function(){return new n(-this.s*this.n,this.d)},add:function(t,e){return o(t,e),new n(this.s*this.n*s.d+s.s*this.d*s.n,this.d*s.d)},sub:function(t,e){return o(t,e),new n(this.s*this.n*s.d-s.s*this.d*s.n,this.d*s.d)},mul:function(t,e){return o(t,e),new n(this.s*s.s*this.n*s.n,this.d*s.d)},div:function(t,e){return o(t,e),new n(this.s*s.s*this.n*s.d,this.d*s.n)},clone:function(){return new n(this)},mod:function(t,e){return isNaN(this.n)||isNaN(this.d)?new n(NaN):void 0===t?new n(this.s*this.n%this.d,1):(o(t,e),0===s.n&&0===this.d&&n(0,0),new n(this.s*s.d*this.n%(s.n*this.d),s.d*this.d))},gcd:function(t,e){return o(t,e),new n(d(s.n,this.n),s.d*this.d/d(s.d,this.d))},lcm:function(t,e){return o(t,e),0===s.n&&0===this.n?new n:new n(s.n*this.n/d(s.n,this.n),d(s.d,this.d))},ceil:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.ceil(t*this.s*this.n/this.d),t)},floor:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.floor(t*this.s*this.n/this.d),t);
|
2 |
-
},round:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.round(t*this.s*this.n/this.d),t)},inverse:function(){return new n(this.s*this.d,this.n)},pow:function(t){return 0>t?new n(Math.pow(this.s*this.d,-t),Math.pow(this.n,-t)):new n(Math.pow(this.s*this.n,t),Math.pow(this.d,t))},equals:function(t,e){return o(t,e),this.s*this.n*s.d===s.s*s.n*this.d},compare:function(t,e){o(t,e);var i=this.s*this.n*s.d-s.s*s.n*this.d;return(i>0)-(0>i)},divisible:function(t,e){return o(t,e),!(!(s.n*this.d)||this.n*s.d%(s.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(t){var e,i="",n=this.n,r=this.d;return this.s<0&&(i+="-"),1===r?i+=n:(t&&(e=Math.floor(n/r))>0&&(i+=e,i+=" ",n%=r),i+=n,i+="/",i+=r),i},toLatex:function(t){var e,i="",n=this.n,r=this.d;return this.s<0&&(i+="-"),1===r?i+=n:(t&&(e=Math.floor(n/r))>0&&(i+=e,n%=r),i+="\\frac{",i+=n,i+="}{",i+=r,i+="}"),i},toContinued:function(){var t,e=this.n,i=this.d,n=[];do n.push(Math.floor(e/i)),t=e%i,e=i,i=t;while(1!==e);return n},toString:function(){var t,e=this.n,i=this.d;if(isNaN(e)||isNaN(i))return"NaN";n.REDUCE||(t=d(e,i),e/=t,i/=t);for(var r=String(e).split(""),s=0,o=[~this.s?"":"-","",""],a="",c=l(e,i),p=h(e,i,c),u=-1,y=1,g=15+c+p+r.length,f=0;g>f;f++,s*=10){if(f<r.length?s+=Number(r[f]):(y=2,u++),c>0)if(u===p)o[y]+=a+"(",a="";else if(u===c+p){o[y]+=a+")";break}s>=i?(o[y]+=a+(s/i|0),a="",s%=i):y>1?a+="0":o[y]&&(o[y]+="0")}return o[0]+=o[1]||"0",o[2]?o[0]+"."+o[2]:o[0]}},t.Fraction=n}(this),N2Require("FormElementLayerPicker",["FormElement"],[],function(t,e,i){function n(i){this.status=0,this.element=t("#"+i),this.$container=t(".n2-ss-parent-picker"),this.overlays=null,this.aligns=this.element.parent().parent().siblings(),this.picker=this.element.siblings(".n2-ss-layer-picker").on({click:t.proxy(function(){this.change("")},this)}),e.FormElement.prototype.constructor.apply(this,arguments)}var r={INITIALIZED:0,PICK_PARENT:1,PICK_CHILD:2,PICK_PARENT_ALIGN:3,PICK_CHILD_ALIGN:4},s='<div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="top" /><div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="top" style="left:33%;top:0;" /><div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="top" style="left:66%;top:0;width:34%;" /><div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="middle" style="left:0;top:33%;" /><div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="middle" style="left:33%;top:33%; " /><div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="middle" style="left:66%;top:33%;width:34%;" /><div class="n2-ss-picker-overlay-tile" data-align="left" data-valign="bottom" style="left:0;top:66%;height:34%;" /><div class="n2-ss-picker-overlay-tile" data-align="center" data-valign="bottom" style="left:33%;top:66%;height:34%;" /><div class="n2-ss-picker-overlay-tile" data-align="right" data-valign="bottom" style="left:66%;top:66%;width:34%;height:34%;" />';return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.click=function(e){return t("#n2-admin").hasClass("n2-ss-mode-desktopPortrait")?void(this.status==r.INITIALIZED?(this.data={parent:null,parentVAlign:null,parentHAlign:null,child:null,childVAlign:null,childHAlign:null},t("body").on("mousedown.n2-ss-parent-linker",t.proxy(function(e){var i=t(e.target);i.hasClass("n2-ss-picker-overlay")||i.hasClass("n2-ss-picker-overlay-tile")||this.destroy()},this)),NextendEsc.add(t.proxy(function(){return this.destroy(),!1},this)),this.pickParent(e)):(this.data=null,this.change(""),this.destroy())):void nextend.notificationCenter.notice(n2_("To chain layers together, please switch to desktop portrait mode!"))},n.prototype.getAbsoluteLayers=function(t){for(var e=[],i=t.getSortedLayers(),n=0;n<i.length;n++)switch(i[n].placement.getType()){case"absolute":e.push(i[n].layer[0]);break;case"group":e.push.apply(e,this.getAbsoluteLayers(i[n].container))}return e},n.prototype.pickParent=function(e){var i=nextend.smartSlider.canvasManager,n=t(this.getAbsoluteLayers(i.mainContainer.container));if(this.tempLayers=n,0==n.length)this.destroy();else{this.status=r.PICK_PARENT,nextend.tooltipMouse.show(n2_("Pick the parent layer!"),e);t('<div class="n2-ss-picker-overlay"></div>').appendTo(n).on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation();var i=t(e.currentTarget).parent();i.data("layerObject");this.data.parent=i,this._destroy(),this.pickParentAlign(e)},this))}},n.prototype.pickParentAlign=function(e){this.status=r.PICK_PARENT_ALIGN,nextend.tooltipMouse.show(n2_("Pick the align point of the parent layer!"),e);var i=t(s).appendTo(this.data.parent).on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation();var n=t(e.currentTarget);this.data.parentHAlign=n.data("align"),this.data.parentVAlign=n.data("valign"),n.off("click").addClass("n2-active"),i.not(n).remove(),this.pickChild(e)},this))},n.prototype.pickChild=function(e){this.status=r.PICK_CHILD,nextend.tooltipMouse.show(n2_("Pick the child layer!"),e);var i=this.tempLayers.not(this.data.parent);delete this.tempLayers;var n=function(e){var r=e.data("layerObject").getProperty("parentid");r&&""!=r&&n(t("#"+r)),i=i.not(e)};if(n(this.data.parent),!i.length)return nextend.notificationCenter.error(n2_("There is not any layer available to be child of the selected layer!")),void this.destroy();var s=t('<div class="n2-ss-picker-overlay"></div>').appendTo(i).on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation();var i=t(e.currentTarget).parent();i.data("layerObject");this.data.child=i,s.remove(),this.pickChildAlign(e)},this))},n.prototype.pickChildAlign=function(e){this.status=r.PICK_CHILD_ALIGN,nextend.tooltipMouse.show(n2_("Pick the align point of the child layer!"),e);t(s).appendTo(this.data.child).on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation();var i=t(e.currentTarget);this.data.childHAlign=i.data("align"),this.data.childVAlign=i.data("valign"),this.done()},this))},n.prototype._destroy=function(){t(".n2-ss-picker-overlay").remove(),t(".n2-ss-picker-overlay-tile").remove()},n.prototype.destroy=function(){nextend.tooltipMouse.hide(),this._destroy(),t("body").off(".n2-ss-parent-linker"),NextendEsc.pop(),this.status=r.INITIALIZED},n.prototype.done=function(){this.data.child.data("layerObject").placement.current.parentPicked(this.data.parent.data("layerObject"),this.data.parentHAlign,this.data.parentVAlign,this.data.childHAlign,this.data.childVAlign),this.destroy()},n.prototype.change=function(t){this.element.val(t).trigger("change"),this._setValue(t),this.triggerOutsideChange()},n.prototype.insideChange=function(t){this.element.val(t),this._setValue(t),this.triggerInsideChange()},n.prototype._setValue=function(t){t&&""!=t?this.$container.css("display",""):this.$container.css("display","none")},n}),N2Require("FormElementPostAnimationManager",["FormElementAnimationManager"],[],function(t,e,i){function n(){e.FormElementAnimationManager.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElementAnimationManager.prototype),n.prototype.constructor=n,n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation();var e=this.element.val().split("|*|");e[2]="",this.val(e.join("|*|"))},n.prototype.updateName=function(t){var e=t.split("|*|");t=e[2],t=""==t?n2_("Disabled"):t.split("||").length>1?n2_("Multiple animations"):n2_("Single animation"),this.name.val(t)},n}),N2Require("FormElementSliderType",[],[],function(t,e,i){function n(e){this.element=t("#"+e),this.setAttribute(),this.element.on("nextendChange",t.proxy(this.setAttribute,this))}return n.prototype.setAttribute=function(){t("#n2-admin").attr("data-slider-type",this.element.val()),"block"==this.element.val()&&t(".n2-fm-shadow").trigger("click")},n}),N2Require("FormElementSliderWidgetArea",["FormElement"],[],function(t,e,i){function n(i){this.element=t("#"+i),this.area=t("#"+i+"_area"),this.areas=this.area.find(".n2-area"),this.areas.on("click",t.proxy(this.chooseArea,this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.chooseArea=function(e){var i=parseInt(t(e.target).data("area"));this.element.val(i),this.setSelected(i),this.triggerOutsideChange()},n.prototype.insideChange=function(t){t=parseInt(t),this.element.val(t),this.setSelected(t),this.triggerInsideChange()},n.prototype.setSelected=function(t){this.areas.removeClass("n2-active"),this.areas.eq(t-1).addClass("n2-active")},n}),N2Require("FormElementWidgetPosition",[],[],function(t,e,i){function n(e){this.element=t("#"+e+"-mode"),this.container=this.element.closest(".n2-form-element-mixed"),this.tabs=this.container.find("> .n2-mixed-group"),this.element.on("nextendChange",t.proxy(this.onChange,this)),this.onChange()}return n.prototype.onChange=function(){var t=this.element.val();"advanced"==t?(this.tabs.eq(2).css("display",""),this.tabs.eq(1).css("display","none")):(this.tabs.eq(1).css("display",""),this.tabs.eq(2).css("display","none"))},n}),N2Require("SmartSliderGeneratorRecords",[],[],function(t,e,i){function n(e){this.ajaxUrl=e,t("#generatorrecord-viewer").on("click",t.proxy(this.showRecords,this))}return n.prototype.showRecords=function(e){e.preventDefault(),NextendAjaxHelper.ajax({type:"POST",url:this.ajaxUrl,data:t("#smartslider-form").serialize(),dataType:"json"}).done(function(t){var e=new NextendModal({zero:{size:[1300,700],title:"Records",content:t.data.html}},!0);e.content.css("overflow","auto")}).error(function(t){if(200==t.status){var e=new NextendModal({zero:{size:[1300,700],title:"Response",content:t.responseText}},!0);e.content.css("overflow","auto")}})},n}),N2Require("QuickSlides",[],[],function(t,e,i){function n(e){var i=t("#n2-quick-slides-edit");i.length<1||(this.ajaxUrl=e,i.on("click",t.proxy(this.openEdit,this)))}return n.prototype.openEdit=function(e){e.preventDefault();var i=t("#n2-ss-slides .n2-box-slide"),n=this;this.modal=new NextendModal({zero:{fit:!0,fitX:!1,overflow:"auto",size:[1200,700],title:n2_("Quick Edit - Slides"),back:!1,close:!0,content:'<form class="n2-form"><table></table></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Save")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button-green"),r=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}),s=r.find("table");i.each(t.proxy(function(e,i){var r=t(i),o=t("<tr />").appendTo(s),a=r.data("slideid");o.append(t("<td />").append('<img src="'+r.data("image")+'" style="width:100px;"/>')),o.append(t("<td />").append(n.createInput("Name","title-"+a,r.data("title"),"width: 240px;"))),o.append(t("<td />").append(n.createTextarea("Description","description-"+a,r.data("description"),"width: 330px;height:24px;")));var l=r.data("link").split("|*|");o.append(t("<td />").append(n.createLink("Link","link-"+a,l[0],"width: 180px;"))),o.append(t("<td />").append(n.createTarget("Target","target-"+a,l.length>1?l[1]:"_self",""))),new N2Classes.FormElementUrl("link-"+a,nextend.NextendElementUrlParams)},this)),e.on("click",t.proxy(function(e){var r={};i.each(t.proxy(function(e,i){var n=t(i),s=n.data("slideid"),o=t("#title-"+s).val(),a=t("#description-"+s).val(),l=t("#link-"+s).val()+"|*|"+t("#target-"+s).val();o==n.data("title")&&a==n.data("description")&&l==n.data("link")||(r[s]={name:o,description:a,link:l})},this)),jQuery.isEmptyObject(r)?this.hide(e):(this.hide(e),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(n.ajaxUrl),data:{changed:Base64.encode(JSON.stringify(r))},dataType:"json"}).done(t.proxy(function(e){var i=e.data;for(var n in i){var r=t('.n2-box-slide[data-slideid="'+n+'"]');r.find(".n2-box-placeholder a.n2-h4").html(i[n].title),r.attr("data-title",i[n].rawTitle),r.data("title",i[n].rawTitle),r.attr("data-description",i[n].rawDescription),r.data("description",i[n].rawDescription),r.attr("data-link",i[n].rawLink),r.data("link",i[n].rawLink)}},this)))},this))}}}}),this.modal.setCustomClass("n2-ss-quick-slides-edit-modal"),this.modal.show()},n.prototype.createInput=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+r+'"></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTextarea=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="'+i+'" class="n2-h5" autocomplete="off" style="resize:y;'+r+'"></textarea></div></div></div></div>');return s.find("textarea").val(n),s},n.prototype.createLink=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+r+'"><a href="#" class="n2-form-element-clear"><i class="n2-i n2-it n2-i-empty n2-i-grey-opacity"></i></a><a id="'+i+'_button" class="n2-form-element-button n2-h5 n2-uc" href="#">Link</a></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTarget=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select id="'+i+'" autocomplete="off" style="'+r+'"><option value="_self">Self</option><option value="_blank">Blank</option></select</div></div></div></div>');return s.find("select").val(n),s},n}),N2Require("Slide",[],[],function(t,e,i){function n(e,i){this.selected=!1,this.manager=e,this.box=i.data("slide",this).addClass("n2-clickable"),this.box.on("mouseenter",t.proxy(function(){this.manager.showMenu(this)},this)).on("mouseleave",t.proxy(function(){this.manager.hideMenu()},this)).on("click.n2-slide",t.proxy(this.goToEdit,this)),this.publishElement=this.box.find(".n2-slide-published").on("click",t.proxy(this.switchPublished,this)),this.box.find(".n2-ss-box-select").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.invertSelection()},this))}return n.prototype.getId=function(){return this.box.data("slideid")},n.prototype.setFirst=function(e){e.stopPropagation(),e.preventDefault(),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.manager.ajaxUrl,{nextendaction:"first"}),type:"POST",data:{id:this.getId()}}).done(t.proxy(function(){this.manager.unsetFirst(),this.box.addClass("n2-slide-state-first")},this))},n.prototype.unsetFirst=function(){this.box.removeClass("n2-slide-state-first")},n.prototype.switchPublished=function(t){t.stopPropagation(),t.preventDefault(),this.isPublished()?this.manager.unPublishSlides([this.getId()],[this]):this.manager.publishSlides([this.getId()],[this])},n.prototype.isPublished=function(){return this.box.hasClass("n2-slide-state-published")},n.prototype.published=function(){this.box.addClass("n2-slide-state-published")},n.prototype.unPublished=function(){this.box.removeClass("n2-slide-state-published")},n.prototype.goToEdit=function(t,e){if(this.manager.isBulkSelection)this.invertSelection(),t.preventDefault();else{var i=this.box.data("editurl");"undefined"!=typeof e&&e?window.open(i,"_blank"):i==location.href?n2("#n2-admin").toggleClass("n2-ss-slides-outer-container-visible"):window.location=i}},n.prototype.duplicate=function(e){e.stopPropagation(),e.preventDefault();var i=t.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendaction:"duplicate"})}).done(t.proxy(function(e){var r=t(e.data).insertAfter(this.box),s=new n(this.manager,r);this.manager.initSlides(),i.resolve(s)},this)),i},n.prototype["delete"]=function(t){t.stopPropagation(),t.preventDefault(),this.manager.deleteSlides([this.getId()],[this])},n.prototype.deleted=function(){this.box.remove()},n.prototype.invertSelection=function(t){t&&t.preventDefault(),this.selected?this.deSelect():this.select()},n.prototype.select=function(){this.selected||(this.selected=!0,this.box.addClass("n2-selected"),this.manager.addSelection(this))},n.prototype.deSelect=function(){this.selected&&(this.selected=!1,this.box.removeClass("n2-selected"),this.manager.removeSelection(this))},n.prototype.publish=function(t){this.switchPublished(t)},n.prototype.unpublish=function(t){this.switchPublished(t)},n.prototype.generator=function(t){window.location=this.box.data("generator")},n.prototype.copy=function(e){this.manager.showSliderSelector(n2_("Copy slide to ..."),t.proxy(function(t){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendaction:"copy",targetSliderID:t})})},this))},n}),N2Require("SlidesManager",[],[],function(t,e,i){function n(i,n,r,s,o,a){this.quickPostModal=null,this.quickVideoModal=null,this.parameters=r,this.slides=[],this.ajaxUrl=i,this.contentAjaxUrl=n,this.slidesPanel=t("#n2-ss-slides-container"),this.slidesContainer=this.slidesPanel.find(".n2-ss-slides-container"),this.initMenu(),this.initSlidesOrderable();for(var l=this.slidesContainer.find(".n2-box-slide"),h=0;h<l.length;h++)this.slides.push(new e.Slide(this,l.eq(h)));if(t("html").attr("data-slides",this.slides.length),t(".n2-add-quick-image, .n2-box-slide-dummy").on("click",t.proxy(this.addQuickImage,this)),t(".n2-add-quick-video").on("click",t.proxy(this.addQuickVideo,this)),t(".n2-add-quick-post").on("click",t.proxy(this.addQuickPost,this)),this.initBulk(),!s){var d=[];this.slidesContainer.fileupload({url:o,pasteZone:!1,dataType:"json",paramName:"image",dropZone:t("undefined"==typeof nextend.smartSlider?document:".n2-ss-slides-outer-container"),add:t.proxy(function(t,e){e.formData={path:"/"+a},e.submit()},this),done:t.proxy(function(t,e){var i=e.result;i.data&&i.data.name?d.push({title:i.data.name,description:"",image:i.data.url}):NextendAjaxHelper.notification(i)},this),fail:t.proxy(function(t,e){NextendAjaxHelper.notification(e.jqXHR.responseJSON)},this),start:function(){NextendAjaxHelper.startLoading()},stop:t.proxy(function(){d.length?this._addQuickImages(d):setTimeout(function(){NextendAjaxHelper.stopLoading()},100),d=[]},this)});var c=null;this.slidesContainer.on("dragover",t.proxy(function(e){null!==c?(clearTimeout(c),c=null):this.slidesContainer.addClass("n2-drag-over"),c=setTimeout(t.proxy(function(){this.slidesContainer.removeClass("n2-drag-over"),c=null},this),400)},this))}}return n.prototype.changed=function(){},n.prototype.initSlidesOrderable=function(){this.slidesContainer.sortable({helper:"clone",forcePlaceholderSize:!1,tolerance:"pointer",items:".n2-box-slide",start:function(t,e){e.item.show()},stop:t.proxy(this.saveSlideOrder,this),placeholder:"n2-box-sortable-placeholder n2-box-sortable-placeholder-small",distance:10})},n.prototype.saveSlideOrder=function(e){for(var i=this.slidesContainer.find(".n2-box-slide"),n=[],r=[],s=[],o=0;o<i.length;o++){var a=i.eq(o).data("slide");n.push(a),r.push(a.getId())}for(var o=0;o<this.slides.length;o++)s.push(this.slides[o].getId());if(JSON.stringify(s)!=JSON.stringify(r)){t(window).triggerHandler("SmartSliderSidebarSlidesOrderChanged");var l={nextendcontroller:"slides",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{slideorder:r}}),this.slides=n,this.changed()}},n.prototype.initSlides=function(){for(var e=(this.slides.length,this.slidesContainer.find(".n2-box-slide")),i=[],n=0;n<e.length;n++){var r=e.eq(n).data("slide");i.push(r)}this.slides=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidesChanged"),t("html").attr("data-slides",this.slides.length)},n.prototype.unsetFirst=function(){for(var t=0;t<this.slides.length;t++)this.slides[t].unsetFirst();this.changed()},n.prototype.addQuickImage=function(e){e.preventDefault(),nextend.imageHelper.openMultipleLightbox(t.proxy(this._addQuickImages,this))},n.prototype.addBoxes=function(i){i.insertBefore(this.slidesContainer.find(".n2-clear")),i.addClass("n2-ss-box-just-added").each(t.proxy(function(i,n){new e.Slide(this,t(n))},this)),this.initSlides(),setTimeout(function(){i.removeClass("n2-ss-box-just-added")},200)},n.prototype._addQuickImages=function(e){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickImages"}),data:{images:Base64.encode(JSON.stringify(e))}}).done(t.proxy(function(e){this.addBoxes(t(e.data))},this))},n.prototype.addQuickVideo=function(e){e.preventDefault();var i=this;this.quickVideoModal||(this.quickVideoModal=new NextendModal({zero:{size:[500,350],title:n2_("Add video"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Add video")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button"),n=(this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}).append(this.createInput(n2_("Video url"),"n2-slide-video-url","width: 446px;")),this.content.find("#n2-slide-video-url").focus());this.content.append(this.createHeading(n2_("Examples"))),this.content.append(this.createTable([["YouTube","https://www.youtube.com/watch?v=lsq09izc1H4"],["Vimeo","https://vimeo.com/144598279"]],["",""])),e.on("click",t.proxy(t.proxy(function(e){e.preventDefault();var r=n.val(),s=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,o=r.match(s),a=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,l=r.match(a),h=r.match(/\.(mp4)/i);o?NextendAjaxHelper.getJSON("https://www.googleapis.com/youtube/v3/videos?id="+encodeURI(o[2])+"&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM").done(t.proxy(function(t){if(t.items.length){var e=t.items[0].snippet,n=t.items[0].snippet.thumbnails,s=n.maxres||n.standard||n.high||n.medium||n["default"];i._addQuickVideo(this,{type:"youtube",title:e.title,description:e.description,image:s.url,video:r})}},this)).fail(function(t){nextend.notificationCenter.error(t.error.errors[0].message)}):l?NextendAjaxHelper.getJSON("https://vimeo.com/api/v2/video/"+l[3]+".json").done(t.proxy(function(t){i._addQuickVideo(this,{type:"vimeo",title:t[0].title,description:t[0].description,video:l[3],image:t[0].thumbnail_large})},this)).fail(function(t){nextend.notificationCenter.error(t.responseText)}):h?nextend.notificationCenter.error("This video url is not supported!"):nextend.notificationCenter.error("This video url is not supported!")},this)))}}}})),this.quickVideoModal.show()},n.prototype._addQuickVideo=function(e,i){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickVideo"}),data:{video:Base64.encode(encodeURIComponent(JSON.stringify(i)))}}).done(t.proxy(function(e){this.addBoxes(t(e.data)),this.initSlides()},this)),e.hide()},n.prototype.addQuickPost=function(e){if(e.preventDefault(),!this.quickPostModal){var i=this,n={},r=t.proxy(function(t){return"undefined"==typeof n[t]&&(n[t]=NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.contentAjaxUrl),data:{keyword:t},dataType:"json"})),n[t]},this);this.quickPostModal=new NextendModal({zero:{size:[600,430],title:n2_("Add post"),back:!1,close:!0,content:'<div class="n2-form"></div>',fn:{show:function(){this.content.find(".n2-form").append(this.createInput(n2_("Keyword"),"n2-ss-keyword","width:546px;"));var e=t("#n2-ss-keyword"),n=this.createHeading("").appendTo(this.content),s=this.createResult().appendTo(this.content),o="";e.on("keyup",t.proxy(function(){o=e.val(),r(o).done(t.proxy(function(r){if(e.val()==o){""==o?n.html(n2_("No search term specified. Showing recent items.")):n.html(n2_printf(n2_('Showing items match for "%s"'),o));for(var a=r.data,l=[],h=this,d=0;d<a.length;d++)l.push([a[d].title,a[d].info,t('<div class="n2-button n2-button-normal n2-button-xs n2-button-green n2-radius-s n2-uc n2-h5">'+n2_("Select")+"</div>").on("click",{post:a[d]},function(t){i._addQuickPost(h,t.data.post)})]);s.html(""),this.createTable(l,["width:100%;","",""]).appendTo(this.createTableWrap().appendTo(s))}},this))},this)).trigger("keyup").focus()}}}})}this.quickPostModal.show()},n.prototype._addQuickPost=function(e,i){i.image||(i.image=""),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickPost"}),data:{post:i}}).done(t.proxy(function(e){this.addBoxes(t(e.data)),this.initSlides()},this)),e.hide()},n.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.deSelect()})},this)),e.eq(2).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.box.hasClass("n2-slide-state-published")?t.select():t.deSelect()})},this)),e.eq(3).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.box.hasClass("n2-slide-state-published")?t.deSelect():t.select()})},this)),t(".n2-bulk-actions a").on("click",t.proxy(function(e){var i=t(e.currentTarget).data("action");i&&(e.preventDefault(),this.bulkAction(i))},this))},n.prototype.addSelection=function(t){0==this.selection.length&&this.enterBulk(),this.selection.push(t)},n.prototype.removeSelection=function(e){this.selection.splice(t.inArray(e,this.selection),1),0==this.selection.length&&this.leaveBulk()},n.prototype.bulkSelect=function(t){for(var e=0;e<this.slides.length;e++)t(this.slides[e])},n.prototype.bulkAction=function(t){var e=[],i=[];this.bulkSelect(function(t){t.selected&&(e.push(t),i.push(t.getId()))}),i.length?this[t](i,e):nextend.notificationCenter.notice("Please select one or more slides for the action!")},n.prototype.enterBulk=function(){this.isBulkSelection||(this.isBulkSelection=!0,this.slidesContainer.sortable("option","disabled",!0),t("#n2-admin").addClass("n2-ss-has-box-selection"))},n.prototype.leaveBulk=function(){if(this.isBulkSelection){this.slidesContainer.sortable("option","disabled",!1),t("#n2-admin").removeClass("n2-ss-has-box-selection");for(var e=0;e<this.slides.length;e++)this.slides[e].deSelect();this.selection=[],this.isBulkSelection=!1}},n.prototype.deleteSlides=function(e,i){this.hideMenu();var n=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slide-delete",n,t.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"delete"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSlides(),this.leaveBulk()},this))},this))},n.prototype.duplicateSlides=function(e,i){for(var n=0;n<this.slides.length;n++)this.slides[n].selected&&this.slides[n].duplicate(t.Event("click",{currentTarget:null}))},n.prototype.copySlides=function(e,i){this.showSliderSelector(n2_("Copy slide to ..."),t.proxy(function(t){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"copySlides",targetSliderID:t}),type:"POST",data:{slides:e}})},this))},n.prototype.publishSlides=function(e,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"publish"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].published();this.changed()},this))},n.prototype.unPublishSlides=function(e,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"unpublish"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].unPublished();this.changed()},this))},n.prototype.initMenu=function(){this.slide=null,this.menu=t("#n2-ss-slide-menu").detach().addClass("n2-inited"),this.menu.find("li").on("click",t.proxy(function(e){e.stopPropagation();var i=t(e.currentTarget).data("action");i&&"function"==typeof this.slide[i]&&this.slide[i](e)},this)),this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},n.prototype.showMenu=function(t){this.slide=t,this.menu.appendTo(t.box)},n.prototype.hideMenu=function(){this.menu.detach()},n.prototype.showSliderSelector=function(e,i){var n=NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"choose"});this.sliderSelectorModal=new NextendModal({zero:{size:[970,600],title:e,back:!1,close:!0,content:"",fn:{show:function(){var e=t('<iframe src="'+n+'" width="970" height="540" style="margin: 0 -20px 0 -20px;"></iframe>').appendTo(this.content),r=window.addEventListener?"addEventListener":"attachEvent";window[r]("attachEvent"==r?"onmessage":"message",t.proxy(function(t){if(t.source==(e[0].contentWindow||e[0].contentDocument)){var n=t[t.message?"message":"data"];i(n),this.hide()}},this),!1)},destroy:function(){this.destroy()}}}},!0)},n}),N2Require("SlideAdmin",[],[],function(t,e,i){function n(){this.layerAnimationManager=null,this.slideEditManager=null,this.frontend=null,this.generator=null,this.canvasManager=null,this.history=null,this.$currentSlideElement=null}return n.prototype.startEditor=function(t,i,n){return null===this.slideEditManager&&(this.slideEditManager=new e.SlideEditManager(t,i,n)),this.slideEditManager},window.nextend.pre="div#n2-ss-0 ",window.nextend.smartSlider=new n,n}),N2Require("SlideEditManager",["SlideAdmin"],["smartSlider"],function(t,e,i,n){"use strict";function r(e,i,n){this.readyDeferred=t.Deferred(),this.options=t.extend({slideAsFile:0,isUploadDisabled:!0,uploadUrl:"",uploadDir:""},n),this.warnInternetExplorerUsers(),this.$slideContentElement=t("#"+i),this.slideStartValue=this.$slideContentElement.val(),window[e].started(t.proxy(this.sliderStarted,this)),n.isAddSample&&this.startSampleSlides()}return r.prototype.startSampleSlides=function(){var e="https://smartslider3.com/slides/"+window.N2SS3VERSION+"/free/",i=this,r=window.addEventListener?"addEventListener":"attachEvent",s=t('<iframe src="'+e+'"></iframe>').prependTo(".n2-ss-sample-slides-container"),o=s[0];t("html, body").scrollTop(s.offset().top-t("#wpadminbar").height());var a=t(".n2-ss-sample-slide-settings"),l=t("#slidebackgroundImage"),h=t("#n2-ss-sample-slide-setting-background-image").on("click",function(){l.parent().find(".n2-form-element-button").trigger("click")}),d=function(){var e=l.val();""===e?(a.removeClass("n2-ss-has-image"),h.css("background-image","url(//nextenddev.no-ip.org/roland/wordpress1/wp-content/plugins/nextend-smart-slider3-pro/nextend/media/images/placeholder/image.png)"),t("#slidebackground-type").val("color").trigger("change")):(a.addClass("n2-ss-has-image"),t("#slidebackground-type").val("image").trigger("change"),h.css("background-image","url("+nextend.imageHelper.fixed(e)+")"))};h.find(".n2-i-close").on("click",function(t){t.stopPropagation(),l.parent().find(".n2-form-element-clear").trigger("click")}),l.on("nextendChange",d),d();var c=t("#slidebackgroundImageOpacity"),p=t("#n2-ss-sample-slide-setting-opacity-slider").removeAttr("slide").prop("slide",!1).slider({min:0,max:100,step:1,slide:function(t,e){
|
3 |
-
c.data("field").insideChange(e.value)}}),u=function(t){p.slider("value",c.val())};c.on("nextendChange",u),u();var y=t("#slidebackgroundImageBlur"),g=t("#n2-ss-sample-slide-setting-blur-slider").removeAttr("slide").prop("slide",!1).slider({min:0,max:40,step:1,slide:function(t,e){y.data("field").insideChange(e.value)}}),f=function(t){g.slider("value",y.val())};y.on("nextendChange",f),f();var v=t("#slidebackgroundColor"),m=t("#n2-ss-sample-slide-setting-color").n2spectrum({showAlpha:1,preferredFormat:"hex8",showInput:!1,showButtons:!1,move:function(){var t=m.n2spectrum("get").toHexString8();m.val(t),v.data("field").insideChange(t)},showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}),b=function(t){var e=v.val();e!=m.val()&&m.n2spectrum("set",e)};v.on("nextendChange",b),b();var x=t("#slidebackgroundGradient"),C=function(){"off"==x.val()?a.removeClass("n2-ss-has-gradient"):a.addClass("n2-ss-has-gradient")};x.on("nextendChange",C),C();var S=t("#slidebackgroundColorEnd"),w=t("#n2-ss-sample-slide-setting-gradient").n2spectrum({showAlpha:1,preferredFormat:"hex8",showInput:!1,showButtons:!1,move:function(){var t=w.n2spectrum("get").toHexString8();S.data("field").insideChange(t)},showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}),k=function(t){w.n2spectrum("set",S.val())};S.on("outsideChange",k),k(),window[r]("attachEvent"==r?"onmessage":"message",function(t){if(t.source==(o.contentWindow||o.contentDocument)){var e=t[t.message?"message":"data"];if(e.key)switch(e.key){case"sampleSlide":var r=JSON.parse(e.data);i.settings.setData(r.data,!0),i.canvasManager.mainContainer.replaceLayers(r.layers),"content"!=i.canvasManager.currentEditorMode&&i.canvasManager.mainContent!=n&&i.canvasManager.updateEditorMode("content");break;case"ready":(o.contentWindow||o.contentDocument).postMessage({key:"ackReady"},"*"),i.options.isAddSample&&((o.contentWindow||o.contentDocument).postMessage({key:"create"},"*"),i.options.isAddSample=!1)}}},!1)},r.prototype.sliderStarted=function(){i.history=new e.History,i.frontend=window["n2-ss-0"],i.frontend.visible(function(){t("body").addClass("n2-ss-slider-visible");var e=t("#n2-ss-slide-canvas-container"),i=e.tinyscrollbar({axis:"x",wheel:!1,wheelLock:!1}).data("plugin_tinyscrollbar");"function"==typeof e.get(0).move&&(e.get(0).move=null),this.sliderElement.on("SliderResize",function(){i.update("relative")})}),i.$currentSlideElement=i.frontend.adminGetCurrentSlideElement(),new e.Generator,i.$currentSlideElement.addClass("n2-ss-currently-edited-slide");var n=i.frontend.parameters.isStaticEdited;this.settings=new e.SlideSettings(n),this.canvasManager=new e.CanvasManager(this,n,this.options),this.readyDeferred.resolve(),t("#smartslider-form").on({checkChanged:t.proxy(this.prepareFormForCheck,this),submit:t.proxy(this.onSlideSubmit,this)})},r.prototype.ready=function(t){this.readyDeferred.done(t)},r.prototype.prepareFormForCheck=function(){var t=JSON.stringify(this.canvasManager.getData()),e=JSON.stringify(JSON.parse(Base64.decode(this.slideStartValue)));this.$slideContentElement.val(e==t?this.slideStartValue:Base64.encode(t))},r.prototype.onSlideSubmit=function(e){if(!nextend.isPreview)if(this.prepareForm(),e.preventDefault(),nextend.askToSave=!1,this.options.slideAsFile&&typeof window.FormData!==n&&"undefined"!=typeof window.File){var i=new FormData,r=t("#smartslider-form").serializeArray();t.each(r,function(t,e){if("slide[slide]"==e.name)try{i.append("slide",new File([e.value],"slide.txt"))}catch(n){i.append("slide",new Blob([e.value]))}else i.append(e.name,e.value)}),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(window.location.href),type:"POST",data:i,contentType:!1,processData:!1}).done(t.proxy(this.afterSave,this))}else NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(window.location.href),data:t("#smartslider-form").serialize(),dataType:"json"}).done(t.proxy(this.afterSave,this))},r.prototype.afterSave=function(){nextend.askToSave=!0,t("#smartslider-form").trigger("saved"),t(".n2-ss-edit-slide-top-details .n2-h1").html(t("#slidetitle").val())},r.prototype.prepareForm=function(){i.ruler&&t("#slideguides").val(Base64.encode(JSON.stringify(i.ruler.toArray()))),this.$slideContentElement.val(Base64.encode(nextend.UnicodeToHTMLEntity(JSON.stringify(this.canvasManager.getData()))))},r.prototype.warnInternetExplorerUsers=function(){var t=this.isInternetExplorer();t&&10>t&&alert(window.ss2lang.The_editor_was_tested_under_Internet_Explorer_10_Firefox_and_Chrome_Please_use_one_of_the_tested_browser)},r.prototype.isInternetExplorer=function(){var t=navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):!1},r.prototype.getLayout=function(){for(var e=t("#smartslider-form").serializeArray(),i={},n=0;n<e.length;n++){var r=e[n].name.match(/slide\[(.*?)\]/);r&&(i[r[1]]=e[n].value)}return delete i.generator,delete i.published,delete i.publishdates,delete i["record-start"],delete i["record-slides"],delete i.slide,i.slide=this.canvasManager.getData(),i},r.prototype.loadLayout=function(e,i,n){var r=e.slide;if(delete e.slide,n?this.canvasManager.importLayers(r,!0):this.canvasManager.importLayers(r,!1),i)for(var s in e)t("#slide"+s).val(e[s]).trigger("change");e.slide=r},r.prototype.getSelf=function(){return this},r.prototype.copySlide=function(){var e={data:this.settings.getBackgroundData(),layers:this.canvasManager.getData()};t.jStorage.set("copiedSlide",JSON.stringify(e))},r.prototype.pasteSlide=function(){var e=t.jStorage.get("copiedSlide");e&&(e=JSON.parse(e),this.settings.setData(e.data),this.canvasManager.mainContainer.replaceLayers(e.layers))},r.prototype.hasCopiedSlide=function(){var e=t.jStorage.get("copiedSlide");return!!e},r}),N2Require("Generator",["SlideAdmin"],["smartSlider"],function(t,e,i,n){"use strict";function r(){this._refreshTimeout=null,this.modal=!1,this.group=0,i.generator=this;var e=i.$currentSlideElement.data("variables");if(e){this.variables=e;for(var n in this.variables)!isNaN(parseFloat(n))&&isFinite(n)&&(this.group=Math.max(this.group,parseInt(n)+1));this.fill=this.generatorFill,this.group>0&&(this.registerField=this.generatorRegisterField,this.button=t('<a href="#" class="n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-blue n2-h5 n2-uc" style="position:absolute;right: -2px;top: -18px;">Variable</a>').on("click",t.proxy(function(t){t.preventDefault(),this.showModal()},this)),this.registerField(t("#slidetitle")),this.registerField(t("#slidedescription")),this.registerField(t("#slidethumbnail")),this.registerField(t("#slidebackgroundImage")),this.registerField(t("#slidebackgroundAlt")),this.registerField(t("#slidebackgroundTitle")),this.registerField(t("#slidebackgroundVideoMp4")),this.registerField(t("#linkslidelink_0")),this.registerField(t("#layergenerator-visible")),this.registerField(t("#layergroup-generator-visible")),t("body").addClass("n2-ss-dynamic-slide")),this.initSlideDataRefresh()}else this.variables=null}return r.prototype.isDynamicSlide=function(){return this.group>0},r.prototype.splitTokens=function(t){for(var e=[],i="",n=0,r=0;r<t.length;r++){var s=t[r];","===s&&0===n?(e.push(i),i=""):(i+=s,"("===s?n++:")"===s&&n--)}return i.length&&e.push(i),e},r.prototype.fill=function(t){return t},r.prototype.generatorFill=function(e){return e.replace(/{((([a-z]+)\(([^}]+)\))|([a-zA-Z0-9][a-zA-Z0-9_\/]*))}/g,t.proxy(this.parseFunction,this))},r.prototype.parseFunction=function(t,e,i,n,r,s){if("undefined"==typeof s){for(var o=this.splitTokens(r),a=0;a<o.length;a++)o[a]=this.parseVariable(o[a]);return this[n].apply(this,o)}return this.parseVariable(s)},r.prototype.parseVariable=function(t){var e=t.match(/^("|')(.*)("|')$/);if(e)return e[2];var i=t.match(/((([a-z]+)\(([^}]+)\)))/);if(i)return this.parseFunction.apply(this,i);var n=t.match(/([a-zA-Z][0-9a-zA-Z_]*)(\/([0-9a-z]+))?/);if(n){var r=n[3];if("undefined"==typeof r)r=0;else{var s=parseInt(r);isNaN(s)||(r=Math.max(r,1)-1)}return"undefined"!=typeof this.variables[r]&&"undefined"!=typeof this.variables[r][n[1]]?this.variables[r][n[1]]:""}return t},r.prototype.fallback=function(t,e){return""==t?e:t},r.prototype.cleanhtml=function(t){return this.stripTags(t,"<p><a><b><br /><br/><i>")},r.prototype.stripTags=function(t,e){e=(((e||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var i=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,n=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return t.replace(n,"").replace(i,function(t,i){return e.indexOf("<"+i.toLowerCase()+">")>-1?t:""})},r.prototype.removehtml=function(e){return t("<div>"+e+"</div>").text()},r.prototype.splitbychars=function(t,e,i){return t.substr(e,i)},r.prototype.splitbywords=function(t,e,i){var n=t,r=n.length,s=Math.max(0,0==e?0:n.indexOf(" ",e)),o=Math.max(0,i>r?r:n.indexOf(" ",i));return 0==o&&r>=i&&(o=r),n.substr(s,o)},r.prototype.findimage=function(t,e){var i=t,n=/(<img.*?src=[\'"](.*?)[\'"][^>]*>)|(background(-image)??\s*?:.*?url\((["|\']?)?(.+?)(["|\']?)?\))/gi,r=[],s=null;for(e="undefined"!=typeof e?parseInt(e)-1:0;s=n.exec(i);)"undefined"!=typeof s[2]?r.push(s[2]):"undefined"!=typeof s[6]&&r.push(s[6]);return r.length?r.length>e?r[e]:r[r.length-1]:""},r.prototype.findlink=function(t,e){var i=t,n=/href=["\']?([^"\'>]+)["\']?/gi,r=[],s=null;for(e="undefined"!=typeof e?parseInt(e)-1:0;s=n.exec(i);)"undefined"!=typeof s[1]&&r.push(s[1]);return r.length?r.length>e?r[e]:r[r.length-1]:""},r.prototype.removevarlink=function(t){var e=String(t),i=/<a href=\"(.*?)\">(.*?)<\/a>/g;return e.replace(i,"")},r.prototype.registerField=function(t){},r.prototype.generatorRegisterField=function(e){var i=e.parent();i.on({mouseenter:t.proxy(function(){this.activeField=e,this.button.prependTo(i)},this)})},r.prototype.getModal=function(){var e=this;if(!this.modal){var i={key:"",group:1,filter:"no",split:"no",splitStart:0,splitLength:300,findImage:0,findImageIndex:1,findLink:0,findLinkIndex:1,removeVarLink:0},n=function(){var t=i.key+"/"+i.group;return i.findImage&&(t="findimage("+t+","+Math.max(1,i.findImageIndex)+")"),i.findLink&&(t="findlink("+t+","+Math.max(1,i.findLinkIndex)+")"),i.removeVarLink&&(t="removevarlink("+t+")"),"no"!=i.filter&&(t=i.filter+"("+t+")"),"no"!=i.split&&i.splitStart>=0&&i.splitLength>0&&(t=i.split+"("+t+","+i.splitStart+","+i.splitLength+")"),"{"+t+"}"},r=t('<div class="n2-generator-result-container" />'),s=function(){r.html(t("<div/>").text(e.fill(n())).html())},o=e.group,a=null,l=null,h=t('<div class="n2-generator-insert-variable"/>'),d=NextendModal.prototype.createHeading(n2_("Choose the group")).appendTo(h),c=t('<div class="n2-group-container" />').appendTo(h);h.append(NextendModal.prototype.createHeading(n2_("Choose the variable")));var p=t('<div class="n2-variable-container" />').appendTo(h),u=t('<div class="n2-generator-functions-container n2-form-element-mixed" />').appendTo(t('<div class="n2-form" />').appendTo(h));h.append(NextendModal.prototype.createHeading(n2_("Result"))),r.appendTo(h),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Filter")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="filter" id="n2-generator-function-filter"><option selected="selected" value="no">'+n2_("No")+'</option><option value="cleanhtml">'+n2_("Clean HTML")+'</option><option value="removehtml">'+n2_("Remove HTML")+"</option></select></div></div></div>").appendTo(u);var y=u.find("#n2-generator-function-filter");y.on("change",t.proxy(function(){i.filter=y.val(),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Split by chars")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="split" id="n2-generator-function-split"><option selected="selected" value="no">'+n2_("No")+'</option><option value="splitbychars">'+n2_("Strict")+'</option><option value="splitbywords">'+n2_("Respect words")+'</option></select></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Start")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="0" id="n2-generator-function-split-start"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Length")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="300" id="n2-generator-function-split-length"></div></div></div>').appendTo(u);var g=u.find("#n2-generator-function-split");g.on("change",t.proxy(function(){i.split=g.val(),s()},this));var f=u.find("#n2-generator-function-split-start");f.on("change",t.proxy(function(){i.splitStart=parseInt(f.val()),s()},this));var v=u.find("#n2-generator-function-split-length");v.on("change",t.proxy(function(){i.splitLength=parseInt(v.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Find image")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findimage"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Index")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findimage-index"></div></div></div>').appendTo(u);var m=u.find("#n2-generator-function-findimage");m.on("nextendChange",t.proxy(function(){i.findImage=parseInt(m.val()),s()},this));var b=u.find("#n2-generator-function-findimage-index");b.on("change",t.proxy(function(){i.findImageIndex=parseInt(b.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Find link")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findlink"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Index")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findlink-index"></div></div></div>').appendTo(u);var x=u.find("#n2-generator-function-findlink");x.on("nextendChange",t.proxy(function(){i.findLink=parseInt(x.val()),s()},this));var C=u.find("#n2-generator-function-findlink-index");C.on("change",t.proxy(function(){i.findLinkIndex=parseInt(C.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Remove links")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-removevarlink"></div></div></div>').appendTo(u);var S=u.find("#n2-generator-function-removevarlink");S.on("nextendChange",t.proxy(function(){i.removeVarLink=parseInt(S.val()),s()},this));var w=u.find("#n2-generator-function-removevarlink-index");w.on("change",t.proxy(function(){i.removeVarLinkIndex=parseInt(w.val()),s()},this));for(var k in this.variables[0])t('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">'+k+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),a.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.key=e,s()},this,k)).appendTo(p);a=p.find("a"),a.eq(0).trigger("click"),1==o&&(d.css("display","none"),c.css("display","none"));for(var P=0;o>P;P++)t('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">'+(P+1)+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),l.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.group=e+1,s()},this,P)).appendTo(c);l=c.find("a"),l.eq(0).trigger("click");var M=!1;this.modal=new NextendModal({zero:{size:[1e3,o>1?560:490],title:n2_("Insert variable"),back:!1,close:!0,content:h,controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green">'+n2_("Insert")+"</a>"],fn:{show:function(){M||(new N2Classes.FormElementOnoff("n2-generator-function-findimage"),new N2Classes.FormElementOnoff("n2-generator-function-findlink"),new N2Classes.FormElementOnoff("n2-generator-function-removevarlink"),M=!0),this.controls.find(".n2-button").on("click",t.proxy(function(t){t.preventDefault(),e.insert(n()),this.hide(t)},this))}}}},!1),this.modal.setCustomClass("n2-ss-generator-modal")}return this.modal},r.prototype.showModal=function(){this.getModal().show()},r.prototype.insert=function(t){this.activeField.val(t).trigger("change")},r.prototype.initSlideDataRefresh=function(){var e=t("#slidetitle").on("nextendChange",t.proxy(function(){this.variables.slide.name=e.val(),this.refresh()},this)),i=t("#slidedescription").on("nextendChange",t.proxy(function(){this.variables.slide.description=i.val(),this.refresh()},this))},r.prototype.refresh=function(){this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),this._refreshTimeout=setTimeout(t.proxy(this._refresh,this),100)},r.prototype._refresh=function(){for(var t=i.canvasManager.mainContainer.container.getAllLayers(),e=0;e<t.length;e++)"layer"==t[e].type&&t[e].item.reRender()},r}),N2Require("History",[],[],function(t,e,i){"use strict";function n(){this.historyStates=50,this.enabled=0!=this.historyStates,this.historyAddAllowed=!0,this.isBatched=!1,this.currentBatch=this,this.index=-1,this.stackedOff=[],this.tasks=[],this.preventUndoRedo=!1,this.undoBTN=t("#n2-ss-undo").on({click:t.proxy(this.undo,this),mousedown:function(t){nextend.context.setMouseDownArea("undo",t)}}),this.redoBTN=t("#n2-ss-redo").on({click:t.proxy(this.redo,this),mousedown:function(t){nextend.context.setMouseDownArea("redo",t)}}),this.updateUI()}function r(t){this.parent=t,this.tasks=[]}function s(t){switch(t){case"skipForwardUndos":this.undo=function(){return!1}}}function o(t,e,i,n){this.that=t,this.undoAction=e,this.redoAction=i,this.context=n||[]}function a(){o.prototype.constructor.apply(this,arguments)}return n.prototype.updateUI=function(){0==this.index||0==this.tasks.length?this.undoBTN.removeClass("n2-active"):this.undoBTN.addClass("n2-active"),-1==this.index||this.index>=this.tasks.length?this.redoBTN.removeClass("n2-active"):this.redoBTN.addClass("n2-active")},n.prototype.throttleUndoRedo=function(){return this.preventUndoRedo?!0:(this.preventUndoRedo=!0,setTimeout(t.proxy(function(){this.preventUndoRedo=!1},this),100),!1)},n.prototype.isEnabled=function(){return this.enabled&&this.historyAddAllowed},n.prototype.startBatch=function(){if(this.isEnabled()){var t=new r(this.currentBatch);return this.currentBatch._add(t),this.currentBatch=t,t}return!1},n.prototype.endBatch=function(){this.isEnabled()&&(this.currentBatch.parent==i,this.currentBatch=this.currentBatch.parent)},n.prototype.addControl=function(t){return this.currentBatch._add(new s(t))},n.prototype.addSimple=function(t,e,i,n){return this.isEnabled()?this.currentBatch._add(new o(t,e,i,n)):!1},n.prototype.addValue=function(t,e,i){if(this.isEnabled()){if(this.isBatched||this.currentBatch!=this)for(var n=this.getCurrentBatchStack(),r=0;r<n.length;r++)if(n[r].isEqual(t,e,i))return n.push(n.splice(r,1)[0]),n[n.length-1];return this.currentBatch._add(new a(t,e,e,i))}return!1},n.prototype.getCurrentBatchStack=function(){return this.currentBatch!=this?this.currentBatch.tasks:this.tasks[this.tasks.length-1]},n.prototype._add=function(e){return-1!=this.index&&this.tasks.splice(this.index,this.tasks.length),this.index=-1,this.isBatched?this.tasks[this.tasks.length-1].push(e):(this.tasks.push([e]),this.isBatched=!0,setTimeout(t.proxy(function(){this.isBatched=!1},this),100)),this.tasks.length>this.historyStates&&this.tasks.unshift(),this.updateUI(),e},n.prototype.off=function(){this.historyAddAllowed=!1,this.stackedOff.push(1)},n.prototype.on=function(){this.stackedOff.pop(),0==this.stackedOff.length&&(this.historyAddAllowed=!0)},n.prototype.undo=function(t){if(t&&t.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1==this.index?this.index=this.tasks.length-1:this.index--,this.index>=0)for(var e=this.tasks[this.index],i=e.length-1;i>=0&&e[i].undo();i--);else this.index=0;return this.on(),this.updateUI(),!0},n.prototype.redo=function(t){if(t&&t.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1!=this.index&&this.index<this.tasks.length){var e=this.tasks[this.index];this.index++;for(var i=0;i<e.length&&e[i].redo();i++);}return this.on(),this.updateUI(),!0},r.prototype._add=function(t){return this.tasks.push(t),t},r.prototype.invertUndo=function(){return this.undo=function(){for(var t=this.tasks.length-1;t>=0&&this.tasks[t].undo();t--);return!0},this},r.prototype.undo=function(){for(var t=0;t<this.tasks.length&&this.tasks[t].undo();t++);return!0},r.prototype.redo=function(){for(var t=0;t<this.tasks.length&&this.tasks[t].redo();t++);return!0},r.prototype.isEqual=function(){return!1},s.prototype.undo=function(){return!0},s.prototype.redo=function(){return!0},s.prototype.isEqual=function(){return!1},o.prototype.undo=function(){return this.undoAction.apply(this.that.getSelf(),this.context),!0},o.prototype.redo=function(){return this.redoAction.apply(this.that.getSelf(),this.context),!0},o.prototype.isEqual=function(){return!1},a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype.setValues=function(t,e){this.undoValue=t,this.redoValue=e},a.prototype.undo=function(){return this.context.unshift(this.undoValue),this.undoAction.apply(this.that.getSelf(),this.context),this.context.shift(),!0},a.prototype.redo=function(){return this.context.unshift(this.redoValue),this.redoAction.apply(this.that.getSelf(),this.context),this.context.shift(),!0},a.prototype.isEqual=function(t,e,i){if(t==this.that&&e==this.undoAction){for(var n=0;n<i.length;n++)if(i[n]!=this.context[n])return!1;return this.setValues=function(t,e){this.redoValue=e},!0}return!1},n}),N2Require("InlineField",[],[],function(t,e,i){function n(){this.$input=t('<input type="text" name="name" />').on({mouseup:function(t){t.stopPropagation()},keyup:t.proxy(function(t){27==t.keyCode&&this.cancel()},this),blur:t.proxy(this.save,this)}),this.$form=t('<form class="n2-inline-form"></form>').append(this.$input).on("submit",t.proxy(this.save,this))}return n.prototype.injectNode=function(t,e){this.$input.val(e),t.append(this.$form),this.$input.focus()},n.prototype.save=function(t){t.preventDefault(),this.$input.trigger("valueChanged",[this.$input.val()]),this.$input.off("blur"),this.destroy()},n.prototype.cancel=function(){this.$input.trigger("cancel"),this.destroy()},n.prototype.destroy=function(){this.$input.off("blur"),this.$form.remove()},n}),N2Require("SlideSettings",["SlideEditManager"],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.isStatic=e;var n=t("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]'),r={};if(n.each(t.proxy(function(e,i){var n=t(i),s=n.attr("name").match(/slide\[(.*)\]/)[1];r[s]=n.on("nextendChange",t.proxy(this.onChange,this,s))},this)),this.fields=r,this.slideBackground=i.$currentSlideElement.data("slideBackground"),!e){this.backgroundImageElement=i.$currentSlideElement.find(".nextend-slide-bg"),this.canvas=i.$currentSlideElement.find(".n2-ss-slide-background"),this.currentBackgroundType=this.fields["background-type"].val();var s=t("#slidethumbnail");if(""==s.val()){var o=t("#item_imageimage"),a=t.proxy(function(t){""!=t&&"$system$/images/placeholder/image.png"!=t&&(s.val(t).trigger("change"),this.fields.backgroundImage.off(".slidethumbnail"),o.off(".slidethumbnail"))},this);this.fields.backgroundImage.on("nextendChange.slidethumbnail",t.proxy(function(){a(this.fields.backgroundImage.val())},this)),o.on("nextendChange.slidethumbnail",t.proxy(function(){a(o.val())},this))}}this.createHistory()}r.prototype.createHistory=function(){this.values={},t("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]').not("#slideslide").each(t.proxy(function(e,n){var r=t(n),s=r.data("field"),o=r.attr("id");this.values[o]=r.val(),r.on("nextendChange",t.proxy(function(){var t=r.val(),e=i.history.addValue(this,this.historyUpdateSlideValue,[s]);e&&e.setValues(this.values[o],t),this.values[o]=t},this))},this))},r.prototype.getSelf=function(){return this},r.prototype.historyUpdateSlideValue=function(t,e){e.insideChange(t)},r.prototype.getAllData=function(){var t={};for(var e in this.fields)t[e]=this.fields[e].val();return t};var s=["thumbnail","background-type","backgroundColor","backgroundGradient","backgroundColorEnd","backgroundImage","backgroundImageOpacity","backgroundImageBlur","backgroundFocusX","backgroundFocusY","backgroundMode"];return r.prototype.getBackgroundData=function(){for(var t={},e=0;e<s.length;e++)t[s[e]]=this.fields[s[e]].val();return t},r.prototype.setData=function(t,e){e&&this.slideBackground.setVisualLoad(!1);for(var i in t)this.fields[i].val(t[i]).trigger("change");e&&this.slideBackground.setVisualLoad(!1)},r.prototype.onChange=function(t,e){"function"==typeof this["sync_"+t]&&this["sync_"+t].call(this)},r.prototype.sync_backgroundColor=r.prototype.sync_backgroundGradient=r.prototype.sync_backgroundColorEnd=function(){this.updateBackgroundColor()},r.prototype.updateBackgroundColor=function(){var t=this.fields.backgroundColor.val(),e=this.fields.backgroundGradient.val();if("off"!=e){var i=this.fields.backgroundColorEnd.val(),n=this.canvas.css({background:"",filter:""});switch(e){case"horizontal":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=1)");break;case"vertical":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=0)");break;case"diagonal1":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=1)");break;case"diagonal2":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=1)")}}else"00"==t.substr(6,8)?this.canvas.css("background",""):this.canvas.css("background","#"+t.substr(0,6)).css("background",N2Color.hex2rgbaCSS(t))},r.prototype.sync_backgroundImage=function(){this["sync_background-type"]()},r.prototype["sync_background-type"]=function(){var t=this.fields["background-type"].val();"color"==t?this.slideBackground.setDesktopSrc(""):this.slideBackground.setDesktopSrc(i.generator.fill(this.fields.backgroundImage.val()))},r.prototype.sync_backgroundMode=function(){this.slideBackground.setMode(this.fields.backgroundMode.val())},r.prototype.sync_backgroundFocusY=function(){this.slideBackground.setFocus(this.fields.backgroundFocusX.val(),this.fields.backgroundFocusY.val())},r.prototype.sync_backgroundFocusX=function(){this.slideBackground.setFocus(this.fields.backgroundFocusX.val(),this.fields.backgroundFocusY.val())},r.prototype.sync_backgroundImageOpacity=function(){this.slideBackground.setOpacity(this.fields.backgroundImageOpacity.val()/100)},r.prototype.sync_backgroundImageBlur=function(){this.slideBackground.setBlur(this.fields.backgroundImageBlur.val())},r}),N2Require("LayerContainer",[],["smartSlider"],function(t,e,i,n){"use strict";function r(t,e,i,n,r){this.component=t,this.$ul=e.data("container",this),this.allowedPlacementMode=i,this.childrenSelector=n,this.allowedChildren=r,this.layerContainerElement=t.layer}return r.prototype.setLayerContainerElement=function(t){this.layerContainerElement=t},r.prototype.startWithExistingNodes=function(){for(var t=this.layerContainerElement.find(this.childrenSelector),e=0;e<t.length;e++)this._loadNode(t.eq(e),!1);this.component.onChildCountChange()},r.prototype.isChildAllowed=function(e){return-1!==t.inArray(e,this.allowedChildren)},r.prototype._loadNode=function(t,i){var n=t.data("type");if(this.isChildAllowed(n)){var r;switch(n){case"layer":r=new e.Layer(this.component.canvasManager,this.component);break;case"content":r=new e.Content(this.component.canvasManager,this.component);break;case"row":r=new e.Row(this.component.canvasManager,this.component);break;case"col":r=new e.Col(this.component.canvasManager,this.component);break;case"group":}if(r)return r.load(t),i&&r.sync(),r}else console.error(n+" is not allowed in "+this.component.label);return!1},r.prototype.getLayerCount=function(){return this.layerContainerElement.find(this.childrenSelector).length},r.prototype.getLayerIndex=function(t){return this.layerContainerElement.find(this.childrenSelector).index(t)},r.prototype.getSortedLayers=function(){var e=[];return this.layerContainerElement.find(this.childrenSelector).each(function(i,r){var s=t(r).data("layerObject");s!==n&&e.push(s)}),e},r.prototype.append=function(t){t.appendTo(this.layerContainerElement);var e=this._loadNode(t,!0);return this.component.onChildCountChange(),e},r.prototype.insertAt=function(t,e){var i=this.getSortedLayers();e>=i.length?t.appendTo(this.layerContainerElement):t.insertBefore(i[e].layer);var n=this._loadNode(t,!0);return this.component.onChildCountChange(),n},r.prototype.insert=function(t){t.getRootElement().appendTo(this.layerContainerElement)},r.prototype.insertLayerAt=function(e,i){var n=this.getSortedLayers(),r=t.inArray(e,n);"-1"!=r&&i>r&&i++,i>=n.length?e.getRootElement().appendTo(this.layerContainerElement):e.getRootElement().insertBefore(n[i].getRootElement()),
|
4 |
-
this.syncLayerRow(e)},r.prototype.syncLayerRow=function(t){var e,i="absolute"==this.allowedPlacementMode;e=i?t.getRootElement().prevAll(".n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer").first().data("layerObject"):t.getRootElement().nextAll(".n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer").first().data("layerObject"),e!==n?t.layerRow.insertBefore(e.layerRow):this.$ul.append(t.layerRow),t.animations&&t.animations.syncRow(e,i)},r.prototype.getChildLayersRecursive=function(t){for(var e=this.getSortedLayers(),i=[],n=0;n<e.length;n++)t?i.push(e[n].layer[0]):i.push(e[n]),e[n].container&&i.push.apply(i,e[n].container.getChildLayersRecursive(t));return i},r.prototype.moveLayerToGroup=function(t,e){this.moveLayersToGroup([t],[e])},r.prototype.moveLayersToGroup=function(e,i){i=i||[];for(var n=[],r=0;r<e.length;r++){var s=e[r],o=s.group,a=s.getIndex();"undefined"!=typeof i[r]?this.insertLayerAt(s,i[r]):this.insert(s),s.changeGroup(a,this.component),this!=o&&-1==t.inArray(o,n)&&n.push(o)}for(var r=0;r<n.length;r++)n[r].update()},r.prototype.activateFirst=function(){var t=this.getSortedLayers();t.length>0&&t[t.length-1].activate()},r.prototype.resetModes=function(t){for(var e=this.getSortedLayers(),i=0;i<e.length;i++)e[i].resetMode(t),e[i].container!=n&&e[i].container.resetModes(t)},r.prototype.copyModes=function(t,e){for(var i=this.getSortedLayers(),r=0;r<i.length;r++)i[r].copyMode(t,e),i[r].container!=n&&i[r].container.copyModes(t,e)},r.prototype.changeEditorModes=function(t){for(var e=this.getSortedLayers(),i=0;i<e.length;i++)e[i].changeEditorMode(t),e[i].container!=n&&e[i].container.changeEditorModes(t)},r.prototype.renderModeProperties=function(){for(var t=this.getSortedLayers(),e=0;e<t.length;e++)t[e].renderModeProperties(),t[e].container!=n&&t[e].container.renderModeProperties()},r.prototype.getAllLayers=function(t){t=t||[];for(var e=this.getSortedLayers(),i=0;i<e.length;i++)t.push(e[i]),e[i].container!=n&&e[i].container.getAllLayers(t);return t},r.prototype.getData=function(e){e=t.extend({layersIncluded:!0,itemsIncluded:!0},e);var i=[],n=this.getSortedLayers();if("absolute"==this.allowedPlacementMode)for(var r=n.length-1;r>=0;r--)i.push(n[r].getData(e));else for(var r=0;r<n.length;r++)i.push(n[r].getData(e));return i},r.prototype.getHTML=function(t){for(var e=this.getSortedLayers(),i=[],n=0;n<e.length;n++)i.push(e[n].getHTML(t));return i},r.prototype.getDroppables=function(t){for(var e=[],i=this.getSortedLayers(),n=0;n<i.length;n++)if(i[n]!=t){var r=i[n].getDroppable();r&&e.push(r),i[n].container&&e.push.apply(e,i[n].container.getDroppables(t))}return e},r.prototype.getLLDroppables=function(t){var e=[],i=this.component.getLLDroppable(t);i&&e.push(i);for(var n=this.getSortedLayers(),r=0;r<n.length;r++)n[r].container&&n[r]!=t&&e.push.apply(e,n[r].container.getLLDroppables(t));return e},r}),N2Require("LayerDataStorage",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){this.isDeviceProp={},this.propertyScope={},this.property={},this.deviceProperty={desktopPortrait:{},desktopLandscape:{},tabletPortrait:{},tabletLandscape:{},mobilePortrait:{},mobileLandscape:{}}}return r.prototype.getMode=function(){return this.canvasManager.getMode()},r.prototype.getRawProperty=function(t){if(this.isDeviceProp[t]){var e=this.getMode(),i=this.deviceProperty[e];return i[t]!==n?i[t]:n}return this.property[t]},r.prototype.getProperty=function(t){if(this.isDeviceProp[t]){var e=this.getMode(),i=this.deviceProperty[e],n=this.deviceProperty.desktopPortrait;if("undefined"!=typeof i[t])return i[t];if("undefined"!=typeof n[t])return n[t]}return this.property[t]},r.prototype.historyStore=function(t,e,i){if(!this.isDeleteStarted){var n=this.getMode();this.isDeviceProp[e]&&i!=n?(this.deviceProperty[i][e]=t,this.render(e)):(this.store(e,t,!0,"history"),this.$.trigger("propertyChanged",[e,this.getProperty(e)]))}},r.prototype.store=function(t,e,n,r){var s,o,a=this.getMode();this.isDeviceProp[t]?(s=this.deviceProperty[a][t],o=this.getProperty(t)):o=s=this.property[t];var l=i.history.addValue(this,this.historyStore,[t,a]);l&&l.setValues(s,e),this.property[t]=e,this.isDeviceProp[t]&&(this.deviceProperty[a][t]=e),n&&this.render(t,o,r)},r.prototype.render=function(t,e,i){this.propertyScope[t]["_sync"+t](e,i)},r.prototype.isDimensionPropertyAccepted=function(t){return!(!(t+"").match(/[0-9]+%/)&&"auto"!=t)},r.prototype.changeEditorMode=function(t){var e=parseInt(this.property[t]);e?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[t,e]),this.renderModeProperties(!1)},r.prototype.renderModeProperties=function(){for(var t in this.property)this.property[t]=this.getProperty(t),this.$.trigger("propertyChanged",[t,this.property[t]])},r.prototype.historyResetMode=function(e,i){this.deviceProperty[i]=t.extend({},e),i==this.canvasManager.getMode()&&this.renderModeProperties(!0)},r.prototype.resetMode=function(e){if("desktopPortrait"!=e){var n,r=i.history.addValue(this,this.historyResetMode,[e]);r&&r.setValues(t.extend({},this.deviceProperty[e]),{});for(var s in this.deviceProperty[e])this.deviceProperty[e][s]=n;e==this.canvasManager.getMode()&&this.renderModeProperties(!0)}},r.prototype.copyMode=function(e,n){if(e!=n){var r=this.deviceProperty[n];this.deviceProperty[n]=t.extend({},this.deviceProperty[n],this.deviceProperty[e]);var s=i.history.addValue(this,this.historyResetMode,[n]);s&&s.setValues(r,this.deviceProperty[n])}},r.prototype._getDefault=function(t,e){return this.originalProperties[t]!==n?this.originalProperties[t]:e},r.prototype.createProperty=function(t,e,i,r){this.isDeviceProp[t]=!1,this.propertyScope[t]=r||this,i?(this.property[t]=i.data(t.toLowerCase()),this.property[t]===n&&(this.property[t]=this._getDefault(t,e))):this.property[t]=this._getDefault(t,e)},r.prototype.createDeviceProperty=function(t,e,i,r){if(this.isDeviceProp[t]=!0,this.propertyScope[t]=r||this,i){for(var s in this.deviceProperty)this.deviceProperty[s][t]=i.data(s.toLowerCase()+t.toLowerCase()),""===this.deviceProperty[s][t]&&(this.deviceProperty[s][t]=n);for(var s in this.deviceProperty)if(this.deviceProperty[s][t]===n||""===this.deviceProperty[s][t]){var o=this._getDefault(s.toLowerCase()+t.toLowerCase());o!==n&&(this.deviceProperty[s][t]=o)}for(var s in e)this.deviceProperty[s][t]!==n&&""!==this.deviceProperty[s][t]||(this.deviceProperty[s][t]=e[s])}else{for(var s in e)this.deviceProperty[s][t]=e[s];for(var s in this.deviceProperty){var o=this._getDefault(s.toLowerCase()+t.toLowerCase());o!==n&&(this.deviceProperty[s][t]=o)}}this.property[t]=this.deviceProperty.desktopPortrait[t]},r.prototype.removeProperty=function(t){if(delete this.property[t],this.layer.removeData(t.toLowerCase()).removeAttr("data-"+t.toLowerCase()),this.isDeviceProp[t])for(var e in this.deviceProperty)delete this.deviceProperty[e][t],this.layer.removeData(e.toLowerCase()+t.toLowerCase()).removeAttr("data-"+e.toLowerCase()+t.toLowerCase());delete this.isDeviceProp[t],delete this.propertyScope[t]},r.prototype.removeProperties=function(t){for(var e=0;e<t.length;e++)this.removeProperty(t[e])},r.prototype.getPropertiesData=function(t){for(var e={},i=0;i<t.length;i++){var r=t[i];if(this.property[r]!==n&&(e[r]=this.property[r]),this.isDeviceProp[r])for(var s in this.deviceProperty)this.deviceProperty[s][r]!==n&&(e[s.toLowerCase()+r]=this.deviceProperty[s][r])}return e},r.prototype.setProperty=function(t,e,i){this.propertyScope[t]!==n&&("function"==typeof this.propertyScope[t]["setProperty"+t]?this.propertyScope[t]["setProperty"+t](t,e,i):this._setProperty(t,e,i))},r.prototype._setProperty=function(t,e,i){this.store(t,e,!0,i),"manager"!=i&&this.$.trigger("propertyChanged",[t,this.getProperty(t)])},r}),N2Require("CanvasManager",[],["smartSlider"],function(t,e,i,n){"use strict";function r(n,r,s){this.mode="desktopPortrait",this.slideEditManager=n,this.isStatic=r,this.ready=t.Deferred(),this.shouldPreventActivationBubble=!1,this.$=t(this),i.canvasManager=this,this.$highlight=t('<div class="n2-ss-layer-highlight n2-ss-layer-highlight-n" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-e" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-s" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-w" />'),this.initSelectMode(),this.layerWindow=new e.LayerWindow(this),this.layerOptions=new e.ComponentSettings(this),this.ui=new e.CanvasUserInterface(this),this.mainContainer=new e.MainContainer(this),this.itemEditor=new e.ItemManager(this,s),this.mainContainer.lateInit(),this._initDeviceModeChange(),this.canvasSettings=new e.CanvasSettings(this),this.layerOptions.startFeatures(),this.hotkeys(),this.addContextMenu(),this.mainContainer.refreshHasLayers();var o=t("#n2-ss-editor-mode .n2-radio-option"),a=t.proxy(function(t){switch(this.updateEditorMode(t),t){case"content":o.eq(0).addClass("n2-active"),o.eq(1).removeClass("n2-active");break;case"canvas":o.eq(0).removeClass("n2-active"),o.eq(1).addClass("n2-active")}},this);if(this.mainContent&&this.mainContent.container.getLayerCount())a("content");else{var l=this.mainContainer.container.getSortedLayers();if(this.mainContent&&l.length>1||!this.mainContent&&l.length>0)a("canvas");else{var h=t.jStorage.get("editormode");h||(h="content",t.jStorage.set("editormode",h)),a(h)}}o.on("click",t.proxy(function(e){o.removeClass("n2-active");var i=t(e.currentTarget),n=i.data("mode");i.addClass("n2-active"),n!=this.currentEditorMode&&(this.updateEditorMode(n),t.jStorage.set("editormode",n))},this)),this.isMultiDrag=!1}var s={16:0,38:0,40:0,37:0,39:0},o={97:"left",98:"center",99:"right",100:"left",101:"center",102:"right",103:"left",104:"center",105:"right"},a={97:"bottom",98:"bottom",99:"bottom",100:"middle",101:"middle",102:"middle",103:"top",104:"top",105:"top"},l={OFF:0,ON:1,GROUP:2};return r.prototype.updateEditorMode=function(e){this.currentEditorMode=e,t("body").attr("data-editormode",this.currentEditorMode)},r.prototype.getMode=function(){return this.mode},r.prototype.getResponsiveRatio=function(t){return"h"==t?i.frontend.responsive.lastRatios.slideW:"v"==t?i.frontend.responsive.lastRatios.slideH:0},r.prototype.setMainContent=function(t){this.mainContent=t},r.prototype.isGroup=function(t){return!1},r.prototype.isRow=function(t){return t instanceof e.Row},r.prototype.isCol=function(t){return t instanceof e.Col},r.prototype.isLayer=function(t){return t instanceof e.Layer},r.prototype.isContent=function(t){return t instanceof e.Content},r.prototype._initDeviceModeChange=function(){var e=t("#layerresettodesktop").on("click",t.proxy(this.__onResetToDesktopClick,this));this.resetToDesktopTRElement=e.closest("tr"),this.resetToDesktopGlobalElement=t("#n2-ss-layer-reset-to-desktop").on("click",t.proxy(function(){"block"==this.resetToDesktopTRElement.css("display")&&e.trigger("click")},this));var n=t("#n2-ss-layer-show-on"),r={},s=i.frontend.responsive.parameters.deviceModes;for(var o in s)s[o]&&(r[o]=t('<div class="n2-radio-option"><i class="n2-i n2-it n2-i-'+o+'"></i></div>').on("click",t.proxy(function(t){this.layerOptions.currentForm[t].data("field").onoff.trigger("click")},this,o)).appendTo(n));n.children().first().addClass("n2-first"),n.children().last().addClass("n2-last"),this.globalShowOnDeviceCB=function(t){"undefined"!=typeof r[t]&&r[t].toggleClass("n2-active",1==this.layerOptions.currentForm[t].val())},this.layerOptions.forms.global.desktopPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopPortrait")),this.layerOptions.forms.global.desktopLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopLandscape")),this.layerOptions.forms.global.tabletPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletPortrait")),this.layerOptions.forms.global.tabletLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletLandscape")),this.layerOptions.forms.global.mobilePortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobilePortrait")),this.layerOptions.forms.global.mobileLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobileLandscape")),t("#layershow").data("field").setAvailableDevices(s),t("#layergroup-show").data("field").setAvailableDevices(s),this.__onChangeDeviceOrientation(),i.frontend.sliderElement.on("SliderDeviceOrientation",t.proxy(function(){this.__onChangeDeviceOrientation()},this)),this.ready.resolve()},r.prototype.refreshMode=function(){this.__onChangeDeviceOrientation(),i.frontend.responsive.reTriggerSliderDeviceOrientation()},r.prototype.__onChangeDeviceOrientation=function(){this.mode=i.frontend.responsive.getNormalizedModeString(),this.resetToDesktopTRElement.css("display","desktopPortrait"==this.mode?"none":""),this.resetToDesktopGlobalElement.css("display","desktopPortrait"==this.mode?"none":""),this.mainContainer.container.changeEditorModes(this.mode)},r.prototype.__onResetToDesktopClick=function(){if(this.mainContainer.getSelectedLayer()){var t=this.getMode();this.mainContainer.getSelectedLayer().resetMode(t)}},r.prototype.copyOrResetMode=function(t){var e=this.getMode();"desktopPortrait"==e?"desktopPortrait"!=t&&this.mainContainer.container.resetModes(t):t==e?this.mainContainer.container.resetModes(t):this.mainContainer.container.copyModes(e,t)},r.prototype.getSnap=function(){return this.canvasSettings.get("n2-ss-snap-to-enabled")?t(this.isStatic?".n2-ss-static-slide .n2-ss-layer.ui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide":".n2-ss-slide.n2-ss-slide-active .n2-ss-layer.ui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide"):!1},r.prototype.getHTML=function(){for(var e=t("<div></div>"),i=this.mainContainer.container.getAllLayers(),n=0;n<i.length;n++)e.append(i[n].getHTML(!0));return e.html()},r.prototype.getData=function(){return this.mainContainer.container.getData()},r.prototype.importLayers=function(e,i){var n=(this.mainContainer,t.extend(!0,[],e));i&&this.mainContainer.deleteLayers(),this._idTranslation={};for(var r=this.dataToLayers(n),s=0;s<r.length;s++)this.mainContainer.container.append(r[s]);if(this.refreshMode(),!this.mainContainer.getSelectedLayer()){var n=this.mainContainer.container.getSortedLayers();n.length>0&&n[0].activate()}},r.prototype.loadComponentWithNode=function(t,e,i,n){var r=t.container.append(e);return n&&this.refreshMode(),r},r.prototype.insertComponentWithNode=function(t,e,i,n,r){var s=t.container.insertAt(e,i);return r&&this.refreshMode(),s},r.prototype.fixActiveLayer=function(){var t=this.mainContainer.getSelectedLayer();(0==t||t.isDeleted)&&this.resetActiveLayer()},r.prototype.resetActiveLayer=function(){var t=this.mainContainer.container.getSortedLayers();t.length?t[t.length-1].activate():this.changeActiveLayer(null)},r.prototype.changeActiveLayer=function(e,i){var n=this.mainContainer.getSelectedLayer();n&&!n.isDeleted&&(n.$.off("propertyChanged.editor").off(".active"),n.deActivate()),this.mainContainer.activeLayer=e,i||this.exitSelectMode(),e&&(this.layerOptions.changeActiveComponent(e,e.type,e.placement.getType(),e.property),e.$.on({"propertyChanged.editor":t.proxy(this.layerOptions.onUpdateField,this.layerOptions),"placementChanged.active":t.proxy(function(t,i,n){this.layerOptions.changeActiveComponentPlacement(i,e.property)},this)})),this.$.trigger("activeLayerChanged")},r.prototype.highlight=function(t){this.$highlight.appendTo(t.layer)},r.prototype.deHighlight=function(t){this.$highlight.detach()},r.prototype["delete"]=function(){this.mainContainer.getSelectedLayer()&&this.doActionOnActiveLayer("delete")},r.prototype.duplicate=function(){this.mainContainer.getSelectedLayer()&&this.doActionOnActiveLayer("duplicate",[this.selectMode!=l.ON,!1])},r.prototype.copy=function(e){var i;if(e==n)if(1==this.selectMode)i=this.selectedLayers;else{var r=this.mainContainer.getSelectedLayer();r&&(i=[r])}else i=this.isCol(e)||this.isContent(e)?e.container.getSortedLayers():[e];var s=this.mainContainer.getLayerData(i);s.length&&t.jStorage.set("ss3layersclipboard",JSON.stringify(s))},r.prototype.paste=function(e){var i=t.jStorage.get("ss3layersclipboard");if(i){var r=JSON.parse(i);if(r.length){var s;s=e!==n&&e?this.isCol(e)||this.isContent(e)?e:e.group:this.mainContainer.getActiveGroup(),this.mainContainer.addLayers(r,s)}}},r.prototype.hasLayersOnClipboard=function(){return!!t.jStorage.get("ss3layersclipboard")},r.prototype.addContextMenu=function(){t("#n2-ss-0 .n2-ss-currently-edited-slide").nextendContextMenu({onShow:t.proxy(function(e,i){var n=t(e.target),r=n.closest(".n2-ss-layer"),s=r.data("layerObject");s||(s=this.mainContainer.getSelectedLayer()),s&&(this.isCol(s)||this.isContent(s)?i.addItem("Copy child layers","n2-i-copy",t.proxy(function(){this.copy(s)},this)):i.addItem("Copy layer","n2-i-copy",t.proxy(function(){this.selectMode==l.ON?this.copy():this.copy(s)},this))),this.hasLayersOnClipboard()&&i.addItem("Paste layer(s)","n2-i-paste",t.proxy(function(){this.paste(s)},this)),i.addItem("Copy slide","n2-i-copy",t.proxy(function(){this.slideEditManager.copySlide()},this)),this.slideEditManager.hasCopiedSlide()&&i.addItem("Paste slide","n2-i-paste",t.proxy(function(){this.slideEditManager.pasteSlide()},this))},this)})},r.prototype.initSelectMode=function(){this.selectMode=l.OFF,this.selectedLayers=[],t(".n2-ss-layer-list-top-bar .n2-button").on("mousedown",t.proxy(function(e){switch(e.preventDefault(),t(e.currentTarget).data("action")){case"delete":this["delete"]();break;case"duplicate":this.duplicate();break;case"group":this.createGroupFromSelected();break;case"cancel":this.exitSelectMode()}},this))},r.prototype.startSelection=function(t){t?(this.selectMode==l.ON&&this.exitSelectMode(),this.changeSelectMode(l.GROUP)):this.changeSelectMode(l.ON)},r.prototype.changeSelectMode=function(e){var i=this.selectMode;i!=e&&(i==l.ON?t("#n2-admin").removeClass("n2-ss-select-layer-mode-on"):i==l.GROUP&&t("#n2-admin").removeClass("n2-ss-select-layer-mode-group"),this.selectMode=e,i==l.GROUP&&e==l.ON&&this.selectedLayers[0].activate(null,null,!0),e==l.OFF?t("#n2-admin").removeClass("n2-ss-select-layer-mode"):(t("#n2-admin").addClass("n2-ss-select-layer-mode"),e==l.ON?t("#n2-admin").addClass("n2-ss-select-layer-mode-on"):e==l.GROUP&&t("#n2-admin").addClass("n2-ss-select-layer-mode-group")),this.selectMode==l.OFF?t("body").off(".n2-ss-selection"):t("body").on("mousedown.n2-ss-selection",t.proxy(function(t){3!=event.which&&"main"==nextend.context.getCurrentWindow()&&nextend.context.mouseDownArea===!1&&this.exitSelectMode()},this)))},r.prototype.endSelection=function(t){t&&this.selectMode==l.GROUP&&this.exitSelectMode()},r.prototype.selectLayer=function(t,e){if("layer"!=t.type)return!0;if(this.selectMode!=l.ON){var i=this.mainContainer.getSelectedLayer();if("layer"!=i.type)return t.activate(null),!0;this.startSelection(!1),e&&this.selectedLayers.push(i)}return this._selectLayer(t),!0},r.prototype._selectLayer=function(e){var i=t.inArray(e,this.selectedLayers);if(-1!=i){if(this.selectMode==l.ON&&this.selectedLayers.length<=1)return this.exitSelectMode(),!1;var n=this.selectedLayers[i];if(this.selectedLayers.splice(i,1),e.layerRow.removeClass("n2-selected"),e.layer.removeClass("n2-ss-layer-selected"),this.selectMode==l.ON&&this.selectedLayers.length<=1)return this.selectedLayers[0].activate(),this.exitSelectMode(),!1;n===this.mainContainer.getSelectedLayer()&&this.selectedLayers[0].activate(!1,null,!0)}else{for(var r=this.selectedLayers.length,s=0;s<this.selectedLayers.length;s++)if(e.layer.add(this.selectedLayers[s].layer).index(this.selectedLayers[s].layer)>0){r=s;break}this.selectedLayers.splice(r,0,e)}for(var s=0;s<this.selectedLayers.length;s++)this.selectedLayers[s].layerRow.addClass("n2-selected"),this.selectedLayers[s].layer.addClass("n2-ss-layer-selected")},r.prototype.addSelection=function(t,e){e||this.changeSelectMode(l.ON);for(var i=0;i<t.length;i++)this._selectLayer(t[i],!1)},r.prototype.exitSelectMode=function(){if(this.selectMode){for(var e=0;e<this.selectedLayers.length;e++)this.selectedLayers[e]!=this.mainContainer.getSelectedLayer()&&this.selectedLayers[e].layerRow.removeClass("n2-active"),this.selectedLayers[e].layerRow.removeClass("n2-selected"),this.selectedLayers[e].layer.removeClass("n2-ss-layer-selected");t("#n2-admin").removeClass("n2-ss-select-layer-mode"),this.selectedLayers=[],this.changeSelectMode(l.OFF)}},r.prototype.doActionOnActiveLayer=function(e,i){if(this.selectMode==l.ON)for(var n=t.extend([],this.selectedLayers),r=0;r<n.length;r++)n[r][e].apply(n[r],i);else{var s=this.mainContainer.getSelectedLayer();s&&s[e].apply(s,i)}},r.prototype.canvasDragStart=function(t,e){if(this.selectMode&&"canvas"==this.currentEditorMode&&"absolute"==e.mode){for(var i=!1,n=0;n<this.selectedLayers.length;n++){var r=this.selectedLayers[n],s=r.layer;if(s[0]!=e.layer.layer[0]){var o=s.css("display");"none"==o&&s.css("display",""),r._originalPosition=s.position(),"none"==o&&s.css("display","none")}else i=!0}i||this.exitSelectMode(),this.isMultiDrag=!0}},r.prototype.canvasDragMove=function(t,e){if(this.isMultiDrag===!0)for(var i={left:e.position.left+e.canvasOffset.left-e.originalOffset.left,top:e.position.top+e.canvasOffset.top-e.originalOffset.top},n=0;n<this.selectedLayers.length;n++){var r=this.selectedLayers[n];if(!this.isGroup(r)){var s=r.layer;s[0]!=e.layer.layer[0]&&(s.css({left:r._originalPosition.left+i.left,top:r._originalPosition.top+i.top,bottom:"auto",right:"auto"}),r.placement.doAction("triggerLayerResized"))}}},r.prototype.canvasDragStop=function(t,e){if(this.isMultiDrag===!0){for(var i=0;i<this.selectedLayers.length;i++){var n=this.selectedLayers[i];if(!this.isGroup(n)){var r=n.layer;if(r[0]!=e.layer.layer[0]){var s=r.css("display");"none"==s&&r.css("display","block");var o=parseInt(n.layer.css("left")),a=parseInt(n.layer.css("top"));n.placement.current.setPosition(o,a),n.placement.doAction("triggerLayerResized"),"none"==s&&r.css("display","none")}}}return this.isMultiDrag=!1,!0}return!1},r.prototype.historyDeleteGroup=function(t){t.getSelf()["delete"]()},r.prototype.historyCreateGroup=function(t){var i=new e.Group(this,this.mainContainer,{},null);i.create(),t.setSelf(i)},r.prototype.createGroupFromSelected=function(){var t;switch(this.selectMode){case l.ON:t=new e.Group(this,this.mainContainer,{},null),t.create(),i.history.addSimple(this,this.historyDeleteGroup,this.historyCreateGroup,[t]),t.addLayers(this.selectedLayers),this.exitSelectMode(),t.activate();break;case l.OFF:var n=this.mainContainer.getSelectedLayer();n.group instanceof e.Group?n.group.activate():(t=new e.Group(this,this.mainContainer,{},null),t.create(),i.history.addSimple(this,this.historyDeleteGroup,this.historyCreateGroup,[t]),t.addLayers([n]),t.activate());break;case l.GROUP:}},r.prototype.createRow=function(t){var i=new e.Row(this,t,{});return i.create(),i.hightlightStructure(),{layer:i}},r.prototype.createCol=function(t){var e=t,i=null;if(this.isCol(e))i=e.group.createCol();else if(this.isRow(e))i=e.createCol();else{if(!this.isCol(e.group))return this.createRow(t);i=e.group.group.createCol()}return i.activate(null),{layer:i}},r.prototype.preventActivationBubbling=function(){return this.shouldPreventActivationBubble?!1:(this.shouldPreventActivationBubble=!0,!0)},r.prototype.allowActivation=function(){this.shouldPreventActivationBubble=!1},r.prototype.hotkeys=function(){t(window).on({keydown:t.proxy(function(e){if(!("TEXTAREA"==e.target.tagName||"INPUT"==e.target.tagName||i.layerAnimationManager&&i.layerAnimationManager.timelineControl&&i.layerAnimationManager.timelineControl.isActivated())){var n=this.mainContainer.getSelectedLayer(),r=e.keyCode;if(r>=49&&57>=r){var l=e.originalEvent.location||e.originalEvent.keyLocation||0;3==l&&(r+=48)}if(n)if(46==r||8==r)this["delete"](),e.preventDefault();else if(35==r)this.duplicate(),e.preventDefault();else if(16==r)s[r]=1;else if(38==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveY",[-1*(s[16]?10:1)])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(40==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveY",[s[16]?10:1])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(37==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveX",[-1*(s[16]?10:1)])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(39==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveX",[s[16]?10:1])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(r>=97&&105>=r){var d=o[r],c=a[r],p=!1;this.layerOptions.forms.placement.absolute.align.val()==d&&this.layerOptions.forms.placement.absolute.valign.val()==c&&(p=!0),this.layerOptions.layerFeatures.horizontalAlign(d,p),this.layerOptions.layerFeatures.verticalAlign(c,p)}else if(65==r){e.preventDefault();var u=this.mainContainer.getSelectedLayer();u&&"absolute"==u.placement.getType()&&u.placement.current.fit()}(e.ctrlKey||e.metaKey)&&(90==r?e.shiftKey?i.history.redo()&&e.preventDefault():i.history.undo()&&e.preventDefault():71==r?(this.createGroupFromSelected(),e.preventDefault()):68==r?(e.preventDefault(),this.slideEditManager.copySlide()):70==r?(e.preventDefault(),this.slideEditManager.pasteSlide()):67==r?this.copy():86==r&&this.paste())}},this),keyup:t.proxy(function(t){"undefined"!=typeof s[t.keyCode]&&s[t.keyCode]&&(clearInterval(s[t.keyCode]),s[t.keyCode]=0)},this)})},r.prototype.getSelf=function(){return this},r}),N2Require("CanvasUserInterface",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.canvasManager=e,this.isShown=!t.jStorage.get("ssLayersShown",!1),this.tlHeight=t.jStorage.get("ssLayersHeight")||200,this.$container=t("#n2-ss-layers"),this.fixScroll(),this.switchLayerList(),this.topBar=t(".n2-ss-layer-list-top-bar").on("mousedown",t.proxy(this.resizeStart,this)),this.topBar.find(".n2-ss-layer-list-opener").on("click",t.proxy(function(t){t.preventDefault(),this.switchLayerList()},this)),t(".n2-ss-slide-show-layers").on("click",t.proxy(function(t){t.preventDefault(),this.switchLayerList()},this)),this.onResize(),t(window).on("resize",t.proxy(this.onResize,this))}return r.prototype.onResize=function(){var t=this.$container.height();this.paneLeft.height(t-48),this.paneRight.height(t-48)},r.prototype.onActivateLayer=function(t){var e=this.paneLeft.scrollTop(),i=0,n=t;do i+=n.layerRow.get(0).offsetTop,n=n.group;while(n!==this.canvasManager.mainContainer);(e>i||i>e+this.paneLeft.height()-40)&&(this.paneLeft.scrollTop(i),this.paneRight.scrollTop(i))},r.prototype.fixScroll=function(){this.paneLeft=t(".n2-ss-layers-sidebar-rows"),this.paneRight=t(".n2-ss-timeline-content-layers-container");var e=t.proxy(function(t){var e=this.paneLeft.scrollTop();t.originalEvent.deltaY>0?e+=40:e-=40,e=40*Math.round(e/40),this.paneLeft.scrollTop(e),this.paneRight.scrollTop(e),t.preventDefault()},this);this.paneLeft.on("mousewheel",e),this.paneLeft.on("scroll",t.proxy(function(t){var e=this.paneLeft.scrollTop();this.paneRight.scrollTop(e),t.preventDefault()},this)),this.paneRight.on("mousewheel",e)},r.prototype.resizeStart=function(e){this.isShown&&(e.target==this.topBar[0]||t(e.target).hasClass("n2-h2"))&&(e.preventDefault(),this.startY=e.clientY,this.height=this.$container.height(),t("body").on({"mousemove.n2-ss-tl-resize":t.proxy(this.resizeMove,this),"mouseup.n2-ss-tl-resize":t.proxy(this.resizeStop,this),"mouseleave.n2-ss-tl-resize":t.proxy(this.resizeStop,this)}))},r.prototype.resizeMove=function(t){t.preventDefault(),this.setTLHeight(this._calculateDesiredHeight(t))},r.prototype.resizeStop=function(e){e.preventDefault(),t("body").off(".n2-ss-tl-resize");var i=this._calculateDesiredHeight(e);this.setTLHeight(i),this.tlHeight=i,t.jStorage.set("ssLayersHeight",i),t("#n2-admin").triggerHandler("resize")},r.prototype._calculateDesiredHeight=function(t){var e=this.startY-t.clientY+this.height-48;return this.__calculateDesiredHeight(e)},r.prototype.__calculateDesiredHeight=function(t){return 40*Math.round(Math.min(Math.max(40,t),(window.innerHeight||document.documentElement.clientHeight)/2)/40)+48},r.prototype.switchLayerList=function(){this.isShown=!this.isShown,this.$container.toggleClass("n2-active",this.isShown),this.isShown?this.setTLHeight(this.tlHeight):this.setTLHeight(48),t.jStorage.set("ssLayersShown",this.isShown)},r.prototype.setTLHeight=function(t){t=Math.max(48,t),this.$container.height(t),t=this.$container.height(),this.paneLeft.height(t-48),this.paneRight.height(t-48),nextend.triggerResize()},r.prototype.activateAdd=function(t,e){this.$add.css({left:t,top:e}).appendTo(this.$container)},r}),N2Require("LayerFeatures",[],["smartSlider"],function(t,e,i,n){"use strict";function r(t,e){this.fields=t,this.canvasManager=e,this.initParentLinker(),this.initAlign(),this.initEvents()}var s={left:0,center:1,right:2,top:0,middle:1,bottom:2};return r.prototype.initParentLinker=function(){var e=this.fields.parentid.data("field");t("#n2-ss-layer-parent-linker").on({click:function(t){e.click(t)}})},r.prototype.initAlign=function(){this.layerDefault={align:null,valign:null};var e=t("#n2-ss-layer-horizontal-align .n2-radio-option"),i=t("#n2-ss-layer-vertical-align .n2-radio-option");e.add(i).on("click",t.proxy(function(n){if(n.ctrlKey||n.metaKey){var r=t(n.currentTarget),s=r.hasClass("n2-sub-active"),o=r.data("align");switch(o){case"left":case"center":case"right":e.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-horizontal-align",null),this.layerDefault.align=null):(t.jStorage.set("ss-item-horizontal-align",o),this.layerDefault.align=o,r.addClass("n2-sub-active"));break;case"top":case"middle":case"bottom":i.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-vertical-align",null),this.layerDefault.valign=null):(t.jStorage.set("ss-item-vertical-align",o),this.layerDefault.valign=o,r.addClass("n2-sub-active"))}}else if(this.canvasManager.mainContainer.getSelectedLayer()){var o=t(n.currentTarget).data("align");switch(o){case"left":case"center":case"right":this.horizontalAlign(o,!0);break;case"top":case"middle":case"bottom":this.verticalAlign(o,!0)}}},this)),this.fields.align.on("nextendChange",t.proxy(function(){switch(e.removeClass("n2-active"),this.fields.align.val()){case"left":e.eq(0).addClass("n2-active");break;case"center":e.eq(1).addClass("n2-active");break;case"right":e.eq(2).addClass("n2-active")}},this)),this.fields.valign.on("nextendChange",t.proxy(function(){switch(i.removeClass("n2-active"),this.fields.valign.val()){case"top":i.eq(0).addClass("n2-active");break;case"middle":i.eq(1).addClass("n2-active");break;case"bottom":i.eq(2).addClass("n2-active")}},this));var n=t.jStorage.get("ss-item-horizontal-align",null),r=t.jStorage.get("ss-item-vertical-align",null);null!=n&&(e.eq(s[n]).addClass("n2-sub-active"),this.layerDefault.align=n),null!=r&&(i.eq(s[r]).addClass("n2-sub-active"),this.layerDefault.valign=r)},r.prototype.horizontalAlign=function(t,e){this.fields.align.val()!=t?this.fields.align.data("field").options.eq(s[t]).trigger("click"):e&&this.fields.left.val(0).trigger("change")},r.prototype.verticalAlign=function(t,e){this.fields.valign.val()!=t?this.fields.valign.data("field").options.eq(s[t]).trigger("click"):e&&this.fields.top.val(0).trigger("change")},r.prototype.initEvents=function(){var e=t("#n2-tab-events"),i=e.find(".n2-h3"),n=i.html(),r=t('<div class="n2-editor-header n2-h2 n2-uc"><span>'+n+"</span></div>");i.replaceWith(r)},r}),N2Require("LayerWindow",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.isMinimized=!1,this.detachedPosition={left:t.jStorage.get("ssPanelLeft")||100,top:t.jStorage.get("ssPanelTop")||100,height:t.jStorage.get("ssPanelHeight")||400},this.autoPosition=t.jStorage.get("ssPanelAutoPosition",1),this.hasBreadcrumb=!1,this.lastHeight=this.detachedPosition.height,this.admin=t("#n2-admin"),this.sidebar=t("#n2-ss-layer-window").on("mousedown",t.proxy(nextend.context.setMouseDownArea,nextend.context,"sidebarClicked")),this.title=this.sidebar.find(".n2-ss-layer-window-title-inner"),this.sidebarTD=this.sidebar.parent(),
|
5 |
-
this.canvasManager=e,i.layerWindow=this,this.viewPanes={layerEdit:t("#n2-tabbed-slide-editor-settings > .n2-tabs").addClass("n2-scrollable")};for(var n in this.viewPanes)this.viewPanes[n].on("DOMMouseScroll mousewheel",function(e){var i=!1;e.originalEvent&&(e.originalEvent.wheelDelta&&(i=e.originalEvent.wheelDelta/-1<0),e.originalEvent.deltaY&&(i=e.originalEvent.deltaY<0),e.originalEvent.detail&&(i=e.originalEvent.detail<0));var n=function(){return e.stopPropagation(),e.preventDefault(),e.returnValue=!1,!1};return!i&&this.scrollHeight<=t(this).innerHeight()+this.scrollTop+1?n():i&&0>=this.scrollTop-1?n():void 0});this.panelHeading=t("#n2-tabbed-slide-editor-settings").find(".n2-sidebar-tab-switcher .n2-td");var r=this.sidebar.find(".n2-ss-layer-window-title-nav-left");t('<a href="#"><i class="n2-i n2-i-minimize n2-i-grey-opacity"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.toggleMinimize()},this)).appendTo(r);var s=this.sidebar.find(".n2-ss-layer-window-title-nav-right");this.magnet=t('<a href="#"><i class="n2-i n2-i-magnet n2-i-grey-opacity" data-n2tip="Auto position layer window"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.magnetize()},this)).css("display","none").appendTo(s),t('<a href="#"><i class="n2-i n2-i-closewindow n2-i-grey-opacity"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.hide()},this)).appendTo(s),nextend.tooltip.add(s),this.$breadcrumb=t('<div class="n2-ss-layer-window-breadcrumb"></div>').insertAfter("#n2-tabbed-slide-editor-settings > .n2-sidebar-tab-switcher");var o=t("#n2-ss-add-sidebar");t(".n2-ss-add-layer-button").on("click",function(e){e.preventDefault(),t("#n2-ss-layers-switcher > .n2-labels .n2-td").eq(0).trigger("click"),o.toggleClass("n2-active")}),t(".n2-ss-core-item").on("click",function(t){o.removeClass("n2-active")});var a=t("#wpadminbar, .navbar-fixed-top").height()+t(".n2-top-bar").height();this.$verticalBarInner=t(".n2-ss-add-sidebar-inner").each(function(){var e=t(this);e.fixTo(e.parent(),{top:a})}),this.$resizeInnerContainer=t("#n2-ss-layers-switcher_0, #n2-ss-layers-switcher_1"),this.extraHeightToRemove=60,this.$resizeInnerContainer.length||(this.extraHeightToRemove=0,this.$resizeInnerContainer=this.$verticalBarInner),this.$resizeInnerContainer.css("overflow","auto"),this.detach(),t("#n2-admin").on("resize",t.proxy(this.resizeVerticalBar,this)),t(window).on("resize",t.proxy(this.onResize,this)),t(".n2-ss-slide-duplicate-layer").on("click",t.proxy(function(t){t.preventDefault(),this.duplicate()},this.canvasManager)),t(".n2-ss-slide-delete-layer").on("click",t.proxy(function(t){t.preventDefault(),this["delete"]()},this.canvasManager)),t("body").on("mousedown",t.proxy(function(t){"main"==nextend.context.getCurrentWindow()&&nextend.context.mouseDownArea===!1&&this.hide()},this));var l=t('<div id="n2-ss-devicespecific-settings"></div>'),h=nextend.smartSlider.frontend.responsive.parameters.deviceModes;for(var n in h)if(h[n]){var d=n.replace(/([A-Z])/g," $1").split(" "),c=d[0],p=d[1].toLowerCase();l.append('<i class="n2-i n2-it n2-i-mini-'+c+"-"+p+'" data-device="'+c+'" data-orientation="'+p+'"></i>')}var u={mouseenter:t.proxy(function(t){l.appendTo(t.currentTarget)},this),mouseleave:t.proxy(function(t){l.detach()},this)};this.sidebar.find("[data-devicespecific] label").prepend('<span class="n2-i n2-i-mini-desktop-portrait"></span>'),this.sidebar.find("[data-devicespecific] label").on(u),l.find(".n2-i").on({click:t.proxy(function(e){e.preventDefault();var i=t(e.currentTarget);t("#n2-ss-devices").find('[data-device="'+i.data("device")+'"][data-orientation="'+i.data("orientation")+'"]').trigger("click")},this)})}return r.prototype.toggleMinimize=function(){this.isMinimized=!this.isMinimized,this.sidebar.toggleClass("n2-ss-layer-window-minized",this.isMinimized),this.isMinimized||this.onResize()},r.prototype.magnetize=function(){if(!this.autoPosition){this.autoPosition=1,t.jStorage.set("ssPanelAutoPosition",1),this.magnet.css("display","none");var e=this.canvasManager.mainContainer.getSelectedLayer();e&&e.positionSidebar()}},r.prototype.show=function(e,i){this.setTitle(e),t("body").addClass("n2-ss-layer-edit-visible"),this.autoPosition&&this.sidebar.position({my:"left top",at:"right+10 top",collision:"flipfit",of:i.is(":visible")?i:"#n2-ss-layer-list"})},r.prototype._show=function(){t("body").addClass("n2-ss-layer-edit-visible")},r.prototype.hide=function(){t("body").removeClass("n2-ss-layer-edit-visible")},r.prototype.isVisible=function(){return t("body").hasClass("n2-ss-layer-edit-visible")},r.prototype.hideWithDeferred=function(e){t("body").hasClass("n2-ss-layer-edit-visible")&&(this.hide(),e.done(t.proxy(this._show,this)))},r.prototype.setTitle=function(t){this.title.html(t.getName()),this.updateGroupTitle(t)},r.prototype.updateGroupTitle=function(e){var i;for(this.$breadcrumb.html(""),i=0;5>i&&(t('<span class="n2-window-title-structure-nav"><span>'+e.label+'</span><span class="n2-i n2-it n2-i-mini-arrow-thin"></span></span>').on({mouseenter:t.proxy(function(){this.canvasManager.highlight(this)},e),mouseleave:t.proxy(function(){this.canvasManager.deHighlight(this)},e),click:t.proxy(function(t){this.canvasManager.deHighlight(this),this.activate(t)},e)}).prependTo(this.$breadcrumb),e.group&&e.group!==this.canvasManager.mainContainer);i++)e=e.group;this.hasBreadcrumb=i>0,this.$breadcrumb.toggleClass("n2-has-breadcrumb",this.hasBreadcrumb),this.onResize()},r.prototype.getLayerEditExcludedHeight=function(){return 85+(this.hasBreadcrumb?23:0)},r.prototype.resizeVerticalBar=function(){this.$resizeInnerContainer.height((window.innerHeight||document.documentElement.clientHeight)-(t("#n2-ss-layers").is(":visible")&&t("#n2-ss-layers").hasClass("n2-active")?t("#n2-ss-layers").height():0)-t("#wpadminbar, .navbar-fixed-top").height()-t(".n2-top-bar").height()-this.extraHeightToRemove)},r.prototype.onResize=function(){this.sidebar.css("display","block"),this.resizeVerticalBar();var t=window.innerHeight||document.documentElement.clientHeight,e=this.sidebar.height()-this.getLayerEditExcludedHeight();this.viewPanes.layerEdit.height(e);var i={},n=window.innerWidth||document.documentElement.clientWidth,r=this.sidebar[0].getBoundingClientRect();r.left<0?i.left=0:r.left+r.width>n&&(i.left=Math.max(0,n-r.width)),r.height>t-r.top&&(i.top=t-r.top-r.height+r.top,i.top<0&&(this.lastHeight=i.height=r.height+i.top,i.top=0)),this.sidebar.css(i),this.sidebar.css("display","")},r.prototype.detach=function(){this.autoPosition?(this.sidebar.css("height",this.detachedPosition.height),this.magnet.css("display","none")):(this.sidebar.css(this.detachedPosition),this.magnet.css("display","inline-block")),this.sidebar.appendTo(this.admin),this.admin.addClass("n2-sidebar-hidden"),t(window).off(".n2-ss-panel"),this.sidebar.removeClass("n2-sidebar-fixed"),this.sidebar.draggable({distance:5,handle:".n2-ss-layer-window-title",containment:"window",stop:t.proxy(function(e,i){this.sidebar.css("height",this.lastHeight);var n=this.sidebar[0].getBoundingClientRect();this.detachedPosition.left=n.left,this.detachedPosition.top=n.top,t.jStorage.set("ssPanelLeft",n.left),t.jStorage.set("ssPanelTop",n.top),this.autoPosition=0,t.jStorage.set("ssPanelAutoPosition",0),this.magnet.css("display","inline-block")},this),scroll:!1}).resizable({distance:5,handles:"s",stop:t.proxy(function(e,i){this.lastHeight=this.detachedPosition.height=this.sidebar.height(),t.jStorage.set("ssPanelHeight",this.detachedPosition.height)},this),create:t.proxy(function(e,i){t(e.target).find(".ui-resizable-handle").addClass("n2-ss-layer-window-resizer")},this)}),this.onResize(),nextend.triggerResize()},r.prototype.switchTab=function(t){this.panelHeading.filter('[data-tab="'+t+'"]').trigger("click")},r}),N2Require("PositionDisplay",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){this.currentSource="",t(window).ready(t.proxy(this.ready,this))}return r.prototype.ready=function(){this.$body=t("body"),this.$el=t('<div class="n2 n2-ss-position-display"/>').appendTo("body")},r.prototype.show=function(t){""==this.currentSource&&(this.currentSource=t,this.$el.addClass("n2-active"),this.$body.addClass("n2-position-display-active"))},r.prototype.update=function(t,e,i){this.currentSource==e&&this.$el.html(i).css({left:t.pageX+10,top:t.pageY+10})},r.prototype.hide=function(t){this.currentSource!=t&&t!==n||(this.$body.removeClass("n2-position-display-active"),this.$el.removeClass("n2-active"),this.currentSource="")},i.positionDisplay=new r,r}),N2Require("Ruler",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.showGuides=1,this.guides=[],this.container=t('<div class="n2-ruler-container" />').appendTo("#n2-ss-slide-canvas-container-inner .n2-ss-slider-outer-container"),this.scale=10,this.vertical=t('<div class="n2-ruler n2-ruler-vertical unselectable"></div>').appendTo(".n2-ss-slider-real-container"),this.horizontal=t('<div class="n2-ruler n2-ruler-horizontal unselectable"></div>').appendTo(this.container),this.verticalSpans=t(),this.horizontalSpans=t(),this.onResize(),nextend.smartSlider.frontend.sliderElement.on("SliderResize",t.proxy(this.onSliderResize,this)),t(window).on("resize",t.proxy(this.onResize,this)),this.horizontal.on("mousedown",t.proxy(function(t){this.showGuides&&new o(this,this.horizontal,t)},this)),this.vertical.on("mousedown",t.proxy(function(t){this.showGuides&&new a(this,this.vertical,t)},this));try{e=t.extend({vertical:[],horizontal:[]},JSON.parse(Base64.decode(e)));for(var i=0;i<e.horizontal.length;i++){var n=new o(this,this.horizontal);n.setPosition(e.horizontal[i])}for(var i=0;i<e.vertical.length;i++){var n=new a(this,this.vertical);n.setPosition(e.vertical[i])}}catch(r){}nextend.ruler=this,this.measureToolVertical(),this.measureToolHorizontal()}function s(e,i,n){this.ruler=e,this.container=i,this.position=0,this.guide=t('<div class="n2-ruler-guide n2-ruler-user-guide"><div class="n2-ruler-guide-border"></div><div class="n2-ruler-guide-handle"></div></div>').appendTo(i).on("mousedown",t.proxy(function(t){t.preventDefault(),t.stopPropagation(),nextend.smartSlider.canvasManager.canvasSettings.settings["n2-ss-lock-guides"]||this["delete"]()},this)),this.ruler.addGuide(this),n&&this.create(n)}function o(){s.prototype.constructor.apply(this,arguments)}function a(){s.prototype.constructor.apply(this,arguments)}return r.prototype.addGuide=function(t){this.guides.push(t)},r.prototype.removeGuide=function(e){this.guides.splice(t.inArray(e,this.guides),1)},r.prototype.clearGuides=function(){for(var t=this.guides.length-1;t>=0;t--)this.guides[t]["delete"]()},r.prototype.onSliderResize=function(t,e){this.onResize()},r.prototype.onResize=function(){var e=nextend.smartSlider.frontend.responsive.responsiveDimensions,i=Math.max(e.slider.width,t("#n2-ss-slide-canvas-container").outerWidth(!0)-40),n=Math.max(e.slider.height,t("#n2-ss-slide-canvas-container").outerHeight(!0));this.container.css({width:i+40,height:n+40});for(var r=this.horizontalSpans.length-3;r<i/this.scale;r++){var s=t("<span />").appendTo(this.horizontal);r%10==0?s.addClass("n2-ss-ruler-mark-large").append("<span>"+r/10*100+"</span>"):r%2==0&&s.addClass("n2-ss-ruler-mark-medium"),this.horizontalSpans=this.horizontalSpans.add(s)}for(var r=this.verticalSpans.length-3;r<n/this.scale;r++){var s=t("<span />").appendTo(this.vertical);r%10==0?s.addClass("n2-ss-ruler-mark-large").append("<span>"+r/10*100+"</span>"):r%2==0&&s.addClass("n2-ss-ruler-mark-medium"),this.verticalSpans=this.verticalSpans.add(s)}},r.prototype.toArray=function(){for(var t={horizontal:[],vertical:[]},e=0;e<this.guides.length;e++)this.guides[e]instanceof o?t.horizontal.push(this.guides[e].position):this.guides[e]instanceof a&&t.vertical.push(this.guides[e].position);return t},r.prototype.measureToolVertical=function(){var e=t('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>').css("display","none").appendTo(this.vertical),n=!1,r=t.proxy(function(){n||(n=!0,e.css("display",""),i.positionDisplay.show("Guide"))},this),s=t.proxy(function(){n&&(n=!1,e.css("display","none"),i.positionDisplay.hide("Guide"))},this);this.vertical.on({mouseenter:t.proxy(function(n){if(this.showGuides){var o=0,a=Math.round(this.vertical.offset().top);r(),this.vertical.on("mousemove.n2-ruler-measure-tool",t.proxy(function(n){if(t(n.target).hasClass("n2-ruler-guide-border")&&t(n.target).parent()[0]!=e[0])s();else if(r(),o!=n.pageY){var l=n.pageY-a;e.css("top",l),i.positionDisplay.update(n,"Guide",l-40+"px"),o=n.pageY}},this))}},this),mouseleave:t.proxy(function(){this.vertical.off(".n2-ruler-measure-tool"),s()},this)})},r.prototype.measureToolHorizontal=function(){var e=t('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>').css("display","none").appendTo(this.horizontal),n=!1,r=t.proxy(function(){n||(n=!0,e.css("display",""),i.positionDisplay.show("Guide"))},this),s=t.proxy(function(){n&&(n=!1,e.css("display","none"),i.positionDisplay.hide("Guide"))},this);this.horizontal.on({mouseenter:t.proxy(function(n){if(this.showGuides){var o=0,a=Math.round(this.horizontal.offset().left);r(),this.horizontal.on("mousemove.n2-ruler-measure-tool",t.proxy(function(n){if(t(n.target).hasClass("n2-ruler-guide-border")&&t(n.target).parent()[0]!=e[0])s();else if(r(),o!=n.pageX){var l=Math.max(n.pageX-a,40);e.css("left",l),i.positionDisplay.update(n,"Guide",l-40+"px"),o=n.pageX}},this))}},this),mouseleave:t.proxy(function(){this.horizontal.off(".n2-ruler-measure-tool"),s()},this)})},s.prototype._position=function(t,e){return Math.max(0,t)},s.prototype.setPosition=function(t){this.position=t,this.refresh()},s.prototype.refresh=function(){this.positionRender(this.position)},s.prototype["delete"]=function(){this.ruler.removeGuide(this),this.guide.remove()},o.prototype=Object.create(s.prototype),o.prototype.constructor=o,o.prototype.create=function(t){var e=Math.round(this.container.offset().left)+40;this.position=this._position(t.pageX-e,t),this.positionRender(this.position)},o.prototype.rawPositionRender=function(t){this.guide.css("left",Math.max(0,t)+40)},o.prototype.positionRender=function(t){this.guide.css("left",Math.max(0,t)+40)},a.prototype=Object.create(s.prototype),a.prototype.constructor=a,a.prototype.create=function(t){var e=Math.round(this.container.offset().top)+40;this.position=this._position(t.pageY-e,t),this.positionRender(this.position)},a.prototype.rawPositionRender=function(t){this.guide.css("top",Math.max(0,t)+40)},a.prototype.positionRender=function(t){this.guide.css("top",Math.max(0,t)+40)},r}),N2Require("CanvasSettings",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.canvasManager=e,this.settings={};var i=t("#n2-ss-slide-canvas-settings").on("mouseleave",t.proxy(function(){i.removeClass("n2-active")},this));i.find("> a").on("click",function(t){t.preventDefault(),i.toggleClass("n2-active")}),this.$settingsPanel=i.find(".n2-ss-settings-panel-inner"),this.snapTo(),this.roundTo(),this.colorScheme(),this.canvasManager.slideEditManager.options.isAddSample||this.ruler()}return r.prototype._addSettings=function(e,i,n,r){this.settings[e]=parseInt(t.jStorage.get(e,n));var s=t('<a href="">'+i+'<span class="n2-setting-tick"><i class="n2-i n2-it n2-i-tick2"></i></span></a>').on("click",t.proxy(function(i){i.preventDefault(),this.settings[e]=1==this.settings[e]?0:1,t.jStorage.set(e,this.settings[e]),s.toggleClass("n2-setting-enabled",1==this.settings[e]),r(this.settings[e],!1)},this)).appendTo(this.$settingsPanel);s.toggleClass("n2-setting-enabled",1==this.settings[e]),r(this.settings[e],!0)},r.prototype._addAction=function(e,i){t('<a href="" class="n2-panel-action">'+e+"</a>").on("click",t.proxy(function(t){t.preventDefault(),i()},this)).appendTo(this.$settingsPanel)},r.prototype.get=function(t){return this.settings[t]},r.prototype.snapTo=function(){this._addSettings("n2-ss-snap-to-enabled",n2_("Smart Snap"),1,t.proxy(function(t){for(var e=this.mainContainer.container.getSortedLayers(),i=0;i<e.length;i++)e[i].placement.doAction("snap")},this.canvasManager))},r.prototype.roundTo=function(){this._addSettings("n2-ss-round-to-enabled",n2_("Round to 5px"),1,function(t){1==t?nextend.roundTo=5:nextend.roundTo=1})},r.prototype.colorScheme=function(){var e=t("#n2-ss-slide-canvas-container");this._addSettings("n2-ss-theme-dark",n2_("Dark Mode"),0,function(t){e.toggleClass("n2-ss-theme-dark",1==t)})},r.prototype.ruler=function(){i.ruler=new e.Ruler(t("#slideguides").val());var n=t("#n2-ss-slide-canvas-container");this._addSettings("n2-ss-ruler-enabled",n2_("Ruler"),1,t.proxy(function(t){n.toggleClass("n2-ss-has-ruler",1==t),nextend.triggerResize()},this)),this._addSettings("n2-ss-show-guides",n2_("Show Guides"),1,t.proxy(function(t){nextend.ruler.showGuides=t,n.toggleClass("n2-ss-show-guides",1==t)},this)),this._addSettings("n2-ss-lock-guides",n2_("Lock Guides"),0,t.proxy(function(t){n.toggleClass("n2-ss-lock-guides",1==t)},this)),this._addAction("Clear Guides",t.proxy(function(){nextend.ruler.clearGuides()},this))},r}),N2Require("PlacementAbsolute",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="absolute",this.transferredProperties={},e.PlacementAbstract.prototype.constructor.apply(this,arguments),this.doThrottledTheResize=this.doTheResize,this._triggerLayerResizedThrottled=NextendThrottle(this._triggerLayerResized,30),this.parentIsVisible=!0,this.children=[]}var s=function(){var t=0;return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){var i,n=(new Date).getTime();return i=Math.max(0,16-(n-t)),t=n+i,setTimeout(function(){e(n+i)},i)}}(),o={raf:!1,ratios:null,isThrottled:!1,layers:[]},a=function(){o.raf===!1&&(o.raf=!0,s(function(){for(var t=0;t<o.layers.length;t++)o.layers[t].isDeleted||o.layers[t].doTheResize(o.ratios,!0,o.isThrottled);o={raf:!1,ratios:null,isThrottled:!1,layers:[]}}))};return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer,this.$layerRow=this.layer.layerRow},r.prototype.preActivation=function(t){if("normal"==t.type){var e=this.layer.getProperty("height");e>0&&(this.transferredProperties.height=e)}},r.prototype.activated=function(e){var i=this.$layer.data("parentid");if(i){var n=t("#"+i);n.length>0?this.activatedAfterParentReady(e):setTimeout(t.proxy(function(){this.activatedAfterParentReady(e)},this),300)}else this._activated(e)},r.prototype.activatedAfterParentReady=function(e){var i=this.$layer.data("parentid");if(i){var n=t("#"+i);if(n.length>0){var r=n.data("layerObject");r?r.readyDeferred.done(t.proxy(this._activated,this,e)):n.on("layerStarted",t.proxy(function(i,n){n.readyDeferred.done(t.proxy(this._activated,this,e))},this))}else this.$layer.data("parentid",""),this._activated(e)}else this._activated(e)},r.prototype._activated=function(e){this.loadProperties(t.extend(e,this.transferredProperties)),this.transferredProperties={},this.$layer.css("zIndex",""),this.___makeLayerAlign(),this.___makeLayerResizeable()},r.prototype.deActivated=function(t){this.$layer.removeAttr("data-align").removeAttr("data-valign").css({left:"",top:"",right:"",bottom:"",width:"",height:"","text-align":""}),this.alignMarker.remove(),this.$layer.nextendResizable("destroy"),this.$layer.off(".n2-ss-absolute"),this.$layer.triggerHandler("LayerUnavailable");var e=["parentid","responsiveposition","responsivesize","parentalign","parentvalign","align","valign","left","top","width","height"],i=this.layer.getPropertiesData(e);return this.layer.removeProperties(e),this.chainParent.remove(),i},r.prototype.loadProperties=function(e){this.layer.createProperty("parentid",null,this.layer.layer,this),this.layer.createProperty("responsiveposition",1,this.layer.layer,this),this.layer.createProperty("responsivesize",1,this.layer.layer,this),this.layer.createDeviceProperty("parentalign",{desktopPortrait:"center"},this.layer.layer,this),this.layer.createDeviceProperty("parentvalign",{desktopPortrait:"middle"},this.layer.layer,this),this.layer.createDeviceProperty("align",{desktopPortrait:e.align||"center"},this.layer.layer,this),this.layer.createDeviceProperty("valign",{desktopPortrait:e.valign||"middle"},this.layer.layer,this),this.layer.createDeviceProperty("left",{desktopPortrait:e.left||0},this.layer.layer,this),this.layer.createDeviceProperty("top",{desktopPortrait:e.top||0},this.layer.layer,this),this.layer.createDeviceProperty("width",{desktopPortrait:e.width||"auto"},this.layer.layer,this),this.layer.createDeviceProperty("height",{desktopPortrait:e.height||"auto"},this.layer.layer,this);var i=this.layer.layer;this.subscribeParentCallbacks={},this.layer.getProperty("parentid")&&this.subscribeParent(),i.attr({"data-align":this.layer.getProperty("align"),"data-valign":this.layer.getProperty("valign")});var n=null;this.chainParent=t('<div class="n2-ss-layer-chain-parent n2-button n2-button-icon n2-button-xs n2-radius-s n2-button-blue"><i class="n2-i n2-i-layerunlink"></i></div>').on({click:t.proxy(this.unlink,this),mouseenter:t.proxy(function(){n=t("#"+this.layer.getProperty("parentid")).addClass("n2-highlight")},this),mouseleave:t.proxy(function(){n&&(n.removeClass("n2-highlight"),n=null)},this)}).appendTo(this.$layer)},r.prototype.triggerLayerResized=function(t,e){t?this._triggerLayerResized(t,e):this._triggerLayerResizedThrottled(!0,e)},r.prototype._triggerLayerResized=function(t,e){this.layer.isDeleted||this.$layer.triggerHandler("LayerResized",[e||{slideW:this.canvasManager.getResponsiveRatio("h"),slideH:this.canvasManager.getResponsiveRatio("v")},t||!1])},r.prototype.___makeLayerAlign=function(){this.alignMarker=t('<div class="n2-ss-layer-cc" />').appendTo(this.$layer)},r.prototype.___makeLayerResizeable=function(){this._resizableJustClick=!1,this.$layer.nextendResizable({handles:"n, e, s, w, ne, se, sw, nw",_containment:this.canvasManager.mainContainer.layer,start:t.proxy(this.____makeLayerResizeableStart,this),resize:t.proxy(this.____makeLayerResizeableResize,this),stop:t.proxy(this.____makeLayerResizeableStop,this),create:t.proxy(function(){this.$layer.find(".ui-resizable-handle, .n2-ss-layer-cc").on({mousedown:t.proxy(function(t){this._resizableJustClick=[t.clientX,t.clientY]},this),mouseup:t.proxy(function(e){if(this._resizableJustClick&&Math.abs(Math.sqrt(Math.pow(this._resizableJustClick[0]-e.clientX,2)+Math.pow(this._resizableJustClick[1]-e.clientY,2)))<1){var i=t(e.currentTarget),n=this.canvasManager.layerOptions.layerFeatures;i.hasClass("ui-resizable-nw")?(n.horizontalAlign("left",!1),n.verticalAlign("top",!1)):i.hasClass("ui-resizable-w")?(n.horizontalAlign("left",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-sw")?(n.horizontalAlign("left",!1),n.verticalAlign("bottom",!1)):i.hasClass("ui-resizable-n")?(n.horizontalAlign("center",!1),n.verticalAlign("top",!1)):i.hasClass("n2-ss-layer-cc")?(n.horizontalAlign("center",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-s")?(n.horizontalAlign("center",!1),n.verticalAlign("bottom",!1)):i.hasClass("ui-resizable-ne")?(n.horizontalAlign("right",!1),n.verticalAlign("top",!1)):i.hasClass("ui-resizable-e")?(n.horizontalAlign("right",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-se")&&(n.horizontalAlign("right",!1),n.verticalAlign("bottom",!1))}this._resizableJustClick=!1},this)})},this),smartguides:t.proxy(function(){return this.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this),tolerance:5}).on({"mousedown.n2-ss-absolute":t.proxy(function(t){!this.layer.status!=e.ComponentAbstract.STATUS.LOCKED&&(i.positionDisplay.show("Canvas"),i.positionDisplay.update(t,"Canvas","W: "+parseInt(this.$layer.width())+"px<br />H: "+parseInt(this.$layer.height())+"px")),document.activeElement&&document.activeElement.blur()},this),"mouseup.n2-ss-absolute":t.proxy(function(t){i.positionDisplay.hide("Canvas")},this)})},r.prototype.____makeLayerResizeableStart=function(e,n){this.preventActivation=!0,this.resizableDeferred=t.Deferred(),this.canvasManager.layerWindow.hideWithDeferred(this.resizableDeferred),t("body").addClass("n2-ss-resize-layer"),this._resizableJustClick&&(this._resizableJustClick=!1),this.____makeLayerResizeableResize(e,n),i.positionDisplay.show("Canvas")},r.prototype.____makeLayerResizeableResize=function(t,e){i.positionDisplay.update(t,"Canvas","W: "+e.size.width+"px<br />H: "+e.size.height+"px"),this.triggerLayerResized()},r.prototype.____makeLayerResizeableStop=function(e,n){t("body").removeClass("n2-ss-resize-layer"),this.resizableDeferred.resolve();var r=!1;if("n"==n.axis||"s"==n.axis||n.originalSize.width==n.size.width){var s=this.layer.getProperty("width");this.layer.isDimensionPropertyAccepted(s)&&(r=!0,this._syncwidth())}var o=!1;if("e"==n.axis||"w"==n.axis||n.originalSize.height==n.size.height){var s=this.layer.getProperty("height");this.layer.isDimensionPropertyAccepted(s)&&(o=!0,this._syncheight())}var a=this.canvasManager.getResponsiveRatio("h"),l=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsivesize"))||(a=l=1);var h=null;r||(h=Math.round(n.size.width*(1/a)));var d=null;o||(d=Math.round(n.size.height*(1/l))),this._setPosition(null,null,n.position.left,n.position.top,h,d,!0),this.triggerLayerResized(),this.$layer.triggerHandler("LayerUnParent"),i.positionDisplay.hide("Canvas"),setTimeout(t.proxy(function(){this.preventActivation=!1},this),80)},r.prototype._setPosition=function(t,e,n,r,s,o,a){var l=this.layer.getMode();null===t&&(t=this.layer.getProperty("align")),null===e&&(e=this.layer.getProperty("valign")),null===n?n=this.layer.getProperty("left"):a&&(n=this.calculatePositionLeft(t,n)),null===r?r=this.layer.getProperty("top"):a&&(r=this.calculatePositionTop(e,r)),null===s&&(s=this.layer.getProperty("width")),null===o&&(o=this.layer.getProperty("height"));var h=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStorePosition",l]);h&&h.setValues({align:this.layer.getRawProperty("align"),valign:this.layer.getRawProperty("valign"),left:this.layer.getRawProperty("left"),top:this.layer.getRawProperty("top"),width:this.layer.getRawProperty("width"),height:this.layer.getRawProperty("height")},{align:t,valign:e,left:n,top:r,width:s,height:o}),i.history.off(),this.layer.store("left",n,!0,"layer"),this.layer.$.trigger("propertyChanged",["left",n]),this.layer.store("top",r,!0,"layer"),this.layer.$.trigger("propertyChanged",["top",r]),this.layer.store("width",s,!0,"layer"),this.layer.$.trigger("propertyChanged",["width",s]),this.layer.store("height",o,!0,"layer"),this.layer.$.trigger("propertyChanged",["height",o]),this.layer.store("align",t,!0,"layer"),this.layer.$.trigger("propertyChanged",["align",t]),this.layer.store("valign",e,!0,"layer"),this.layer.$.trigger("propertyChanged",["valign",e]),i.history.on()},r.prototype.historyStorePosition=function(t,e){this.layer.historyStore(t.align,"align",e),this.layer.historyStore(t.valign,"valign",e),this.layer.historyStore(t.width,"width",e),this.layer.historyStore(t.height,"height",e),this.layer.historyStore(t.left,"left",e),this.layer.historyStore(t.top,"top",e),this.triggerLayerResized()},r.prototype.calculatePositionLeft=function(t,e){var i=this.canvasManager.getResponsiveRatio("h");parseInt(this.layer.getProperty("responsiveposition"))||(i=1);var n=this.parent,r={left:0,leftMultiplier:1};if(n&&n.is(":visible")){var s=n.position();switch(this.layer.getProperty("parentalign")){case"right":r.left=s.left+n.width();break;case"center":r.left=s.left+n.width()/2;break;default:r.left=s.left}}else switch(n=this.$layer.parent(),t){case"center":r.left+=n.width()/2;break;case"right":r.left+=n.width()}var e;switch(t){case"left":e=-Math.round((r.left-e)*(1/i));break;case"center":e=-Math.round((r.left-e-this.$layer.width()/2)*(1/i));break;case"right":e=-Math.round((r.left-e-this.$layer.width())*(1/i))}return e},r.prototype.calculatePositionTop=function(t,e){var i=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsiveposition"))||(i=1);var n=this.parent,r={top:0,topMultiplier:1};if(n&&n.is(":visible")){var s=n.position();switch(this.layer.getProperty("parentvalign")){case"bottom":r.top=s.top+n.height();break;case"middle":r.top=s.top+n.height()/2;break;default:r.top=s.top}}else switch(n=this.$layer.parent(),t){case"middle":r.top+=n.height()/2;break;case"bottom":r.top+=n.height()}var e;switch(t){case"top":e=-Math.round((r.top-e)*(1/i));break;case"middle":e=-Math.round((r.top-e-this.$layer.height()/2)*(1/i));break;case"bottom":e=-Math.round((r.top-e-this.$layer.height())*(1/i))}return e},r.prototype.moveX=function(t){this._setPosition(null,null,this.layer.getProperty("left")+t,null,null,null,!1)},r.prototype.moveY=function(t){this._setPosition(null,null,null,this.layer.getProperty("top")+t,null,null,!1)},r.prototype.setPositionLeft=function(t){t=this.calculatePositionLeft(this.layer.getProperty("align"),t),this.layer.store("left",t,!0),this.layer.$.trigger("propertyChanged",["left",t])},r.prototype.setPositionTop=function(t){t=this.calculatePositionTop(this.layer.getProperty("valign"),t),this.layer.store("top",t,!0),this.layer.$.trigger("propertyChanged",["top",t])},r.prototype.setPosition=function(t,e){this.setPositionLeft(t),this.setPositionTop(e)},r.prototype.setDeviceBasedAlign=function(){var t=this.layer.getMode();"undefined"==typeof this.layer.deviceProperty[t].align&&this.layer.setProperty("align",this.layer.getProperty("align"),"layer"),"undefined"==typeof this.layer.deviceProperty[t].valign&&this.layer.setProperty("valign",this.layer.getProperty("valign"),"layer")},r.prototype.setPropertyresponsiveposition=r.prototype.setPropertyresponsivesize=function(t,e,i){this.layer._setProperty(t,parseInt(e),i)},r.prototype.setPropertywidth=r.prototype.setPropertyheight=function(e,i,n){var r=i;this.layer.isDimensionPropertyAccepted(i)||(r=~~i,r!=i&&this.layer.$.trigger("propertyChanged",[e,r])),setTimeout(t.proxy(function(){this.onResize(!1)},this),50),this.layer._setProperty(e,r,n)},r.prototype.setPropertyleft=r.prototype.setPropertytop=function(t,e,i){var n=~~e;n!=e&&this.layer.$.trigger("propertyChanged",[t,n]),this.layer._setProperty(t,n,i)},r.prototype.render=function(t){this["_sync"+t]()},r.prototype.renderWithModifier=function(t,e,i){try{"width"!=t&&"height"!=t||!this.layer.isDimensionPropertyAccepted(e)?this["_sync"+t](Math.round(e*i)):this["_sync"+t](e)}catch(n){console.error("_sync"+t)}},r.prototype.onResize=function(t){this.resize({slideW:this.canvasManager.getResponsiveRatio("h"),slideH:this.canvasManager.getResponsiveRatio("v")},t)},r.prototype.resize=function(t,e){this.parent&&!e||this.addToResizeCollection(this,t,!1)},r.prototype.addToResizeCollection=function(t,e,i){o.ratios=e,o.isThrottled=i;for(var n=0;n<o.layers.length;n++)if(o.layers[n]==this){o.layers.splice(n,1);break}o.layers.push(t),a(),this.triggerLayerResized(i,e)},r.prototype._syncresponsiveposition=function(){this.onResize(!1)},r.prototype._syncwidth=function(){var t=this.layer.getProperty("width");if(!this.layer.isDimensionPropertyAccepted(t)){if(parseInt(this.layer.getProperty("responsivesize"))){var e=this.canvasManager.getResponsiveRatio("h");t*=e}t+="px"}this.$layer.css("width",t)},r.prototype._syncheight=function(){var t=this.layer.getProperty("height");if(!this.layer.isDimensionPropertyAccepted(t)){if(parseInt(this.layer.getProperty("responsivesize"))){var e=this.canvasManager.getResponsiveRatio("v");t*=e}t+="px"}this.$layer.css("height",t)},r.prototype._syncparentalign=function(){var t=this.layer.getProperty("parentalign");this.$layer.data("parentalign",t);var e=this.getParent();e&&e.placement.current.onResize(!1)},r.prototype._syncparentvalign=function(){var t=this.layer.getProperty("parentvalign");this.$layer.data("parentvalign",t);var e=this.getParent();e&&e.placement.current.onResize(!1)},r.prototype._syncleft=function(){var t=this.layer.getProperty("left");
|
6 |
-
if(parseInt(this.layer.getProperty("responsiveposition"))){var e=this.canvasManager.getResponsiveRatio("h");t*=e}if(this.parent&&this.parentIsVisible){var i=this.parent.position(),n=this.layer.getProperty("align"),r=this.layer.getProperty("parentalign"),s=0;switch(r){case"right":s=i.left+this.parent.width();break;case"center":s=i.left+this.parent.width()/2;break;default:s=i.left}switch(n){case"right":this.$layer.css({left:"auto",right:this.$layer.parent().width()-s-t+"px"});break;case"center":this.$layer.css({left:s+t-this.$layer.width()/2+"px",right:"auto"});break;default:this.$layer.css({left:s+t+"px",right:"auto"})}}else switch(this.layer.getProperty("align")){case"right":this.$layer.css({left:"auto",right:-t+"px"});break;case"center":this.$layer.css({left:this.$layer.parent().width()/2+t-this.$layer.width()/2+"px",right:"auto"});break;default:this.$layer.css({left:t+"px",right:"auto"})}this.triggerLayerResized()},r.prototype._synctop=function(){var t=this.layer.getProperty("top");if(parseInt(this.layer.getProperty("responsiveposition"))){var e=this.canvasManager.getResponsiveRatio("v");t*=e}if(this.parent&&this.parentIsVisible){var i=this.parent.position(),n=this.layer.getProperty("valign"),r=this.layer.getProperty("parentvalign"),s=0;switch(r){case"bottom":s=i.top+this.parent.height();break;case"middle":s=i.top+this.parent.height()/2;break;default:s=i.top}switch(n){case"bottom":this.$layer.css({top:"auto",bottom:this.$layer.parent().height()-s-t+"px"});break;case"middle":this.$layer.css({top:s+t-this.$layer.height()/2+"px",bottom:"auto"});break;default:this.$layer.css({top:s+t+"px",bottom:"auto"})}}else switch(this.layer.getProperty("valign")){case"bottom":this.$layer.css({top:"auto",bottom:-t+"px"});break;case"middle":this.$layer.css({top:this.$layer.parent().height()/2+t-this.$layer.height()/2+"px",bottom:"auto"});break;default:this.$layer.css({top:t+"px",bottom:"auto"})}this.triggerLayerResized()},r.prototype._syncresponsivesize=function(){this.onResize(!1)},r.prototype.historyStoreDoubleProp=function(t,e,i,n){var r=this.layer.getMode();e==r?(this.layer._setProperty(i,t.value,"history"),this.layer._setProperty(n,t.value2,"history")):(this.layer.deviceProperty[e][i]=t.value,this.layer.deviceProperty[e][n]=t.value2,this.layer.$.trigger("propertyChanged",[i,this.layer.getProperty(i)]),this.layer.$.trigger("propertyChanged",[n,this.layer.getProperty(n)]),this.layer.render(i,null,"history"),this.layer.render(n,null,"history"))},r.prototype.setPropertyalign=function(t,e,n){var r=this.layer.getProperty(t),s=this.layer.getRawProperty("left");i.history.off(),this.layer._setProperty(t,e,n),i.history.on();var o=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStoreDoubleProp",this.layer.getMode(),"align","left"]);o&&o.setValues({value:r,value2:s},{value:e,value2:this.layer.getRawProperty("left")})},r.prototype.setPropertyvalign=function(t,e,n){var r=this.layer.getProperty(t),s=this.layer.getRawProperty("top");i.history.off(),this.layer._setProperty(t,e,n),i.history.on();var o=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStoreDoubleProp",this.layer.getMode(),"valign","top"]);o&&o.setValues({value:r,value2:s},{value:e,value2:this.layer.getRawProperty("top")})},r.prototype._syncalign=function(t,e){var i=this.layer.getProperty("align");this.$layer.attr("data-align",i),"history"!=e&&i!=t&&this.setPositionLeft(this.$layer.position().left)},r.prototype._syncvalign=function(t,e){var i=this.layer.getProperty("valign");this.$layer.attr("data-valign",i),"history"!=e&&i!=t&&this.setPositionTop(this.$layer.position().top)},r.prototype.fit=function(){var t=this.$layer.get(0);this.$layer.position();if(t.scrollWidth>0&&t.scrollHeight>0){var e=!1;if(this.layer.item&&(e=this.layer.item.fitLayer()),!e){this.layer.setProperty("width","auto","layer"),this.layer.setProperty("height","auto","layer");var i=this.$layer.width();Math.abs(this.canvasManager.mainContainer.layer.width()-this.$layer.position().left-i)<2&&this.layer.setProperty("width",i,"layer")}}},r.prototype.hide=function(t){this.layer.store(t?t:this.layer.getMode(),0,!0)},r.prototype.show=function(t){this.layer.store(t?t:this.layer.getMode(),1,!0)},r.prototype.changeStatus=function(t,i){t==e.ComponentAbstract.STATUS.LOCKED&&this.layer.nextendResizable("enable"),i==e.ComponentAbstract.STATUS.LOCKED&&this.$layer.nextendResizable("disable")},r.prototype.getParent=function(){return t("#"+this.layer.getProperty("parentid")).data("layerObject")},r.prototype.subscribeParent=function(){var e=this;this.subscribeParentCallbacks={LayerResized:function(){e.resizeParent.apply(e,arguments)},LayerParent:function(){e.$layer.addClass("n2-ss-layer-parent"),e.$layer.triggerHandler("LayerParent")},LayerUnParent:function(){e.$layer.removeClass("n2-ss-layer-parent"),e.$layer.triggerHandler("LayerUnParent")},LayerDeleted:function(t){e.layer.setProperty("parentid","","layer")},LayerUnavailable:function(t){e.layer.setProperty("parentid","","layer"),e.layer.setProperty("left",0,"layer"),e.layer.setProperty("top",0,"layer")},LayerShowChange:function(t,i,n){e.layer.getMode()==i&&(e.parentIsVisible=n)},"n2-ss-activate":function(){e.$layerRow.addClass("n2-parent-active")},"n2-ss-deactivate":function(){e.$layerRow.removeClass("n2-parent-active")},LayerGetDataWithChildren:function(t,i){e.layer.getDataWithChildren(i)}},this.parent=t("#"+this.layer.property.parentid).on(this.subscribeParentCallbacks),this.parent.data("layerObject").placement.current.addChild(this),this.$layer.addClass("n2-ss-layer-has-parent")},r.prototype.unSubscribeParent=function(t){if(this.$layerRow.removeClass("n2-parent-active"),this.$layer.removeClass("n2-ss-layer-has-parent"),this.parent&&this.parent.off(this.subscribeParentCallbacks),this.parent=!1,this.subscribeParentCallbacks={},"delete"!=t){var e=this.$layer.position();this._setPosition(null,null,e.left,e.top,null,null,!0)}},r.prototype.addChild=function(t){this.children.push(t)},r.prototype.removeChild=function(e){this.children.splice(t.inArray(e,this.children),1)},r.prototype.unlink=function(t){t&&t.preventDefault(),this.layer.setProperty("parentid","","layer")},r.prototype.parentPicked=function(t,e,i,n,r){this.layer.setProperty("parentid","","layer"),this.layer.setProperty("align",n,"layer"),this.layer.setProperty("valign",r,"layer"),this.layer.setProperty("parentalign",e,"layer"),this.layer.setProperty("parentvalign",i,"layer"),this.layer.setProperty("parentid",t.requestID(),"layer");var s;for(var o in this.layer.deviceProperty)"desktopPortrait"!=o&&(this.layer.deviceProperty[o].left=s,this.layer.deviceProperty[o].top=s,this.layer.deviceProperty[o].valign=s,this.layer.deviceProperty[o].align=s)},r.prototype._syncparentid=function(){var e=this.layer.getProperty("parentid");if(e&&""!=e)if(0==t("#"+e).length)this.layer.setProperty("parentid","","layer");else{this.$layer.attr("data-parentid",e).addClass("n2-ss-layer-has-parent"),this.subscribeParent();var i=this.$layer.position();this._setPosition(null,null,i.left,i.top,null,null,!0)}else this.$layer.removeAttr("data-parentid"),this.unSubscribeParent()},r.prototype.snap=function(){this.$layer.nextendResizable("option","smartguides",t.proxy(function(){return this.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this))},r.prototype._renderModeProperties=function(t){this.$layer.attr("data-align",this.layer.property.align),this.$layer.attr("data-valign",this.layer.property.valign),t&&this.onResize(!0)},r.prototype.doLinearResize=function(t){this.doThrottledTheResize(t,!0)},r.prototype.doTheResize=function(t,e,i){this.render("width"),this.render("height"),this.render("left"),this.render("top"),e||this.triggerLayerResized(i,t)},r.prototype.resizeParent=function(t,e,i){this.addToResizeCollection(this,e,i)},r.prototype.updatePosition=function(){var t=this.parent;if("center"==this.layer.getProperty("align")){var e=0;e=t?t.position().left+t.width()/2:this.$layer.parent().width()/2;var i=this.canvasManager.getResponsiveRatio("h");parseInt(this.layer.getProperty("responsiveposition"))||(i=1),this.$layer.css("left",e-this.$layer.width()/2+this.layer.getProperty("left")*i)}if("middle"==this.layer.getProperty("valign")){var n=0;n=t?t.position().top+t.height()/2:this.$layer.parent().height()/2;var i=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsiveposition"))||(i=1),this.$layer.css("top",n-this.$layer.height()/2+this.layer.getProperty("top")*i)}this.triggerLayerResized()},r.prototype.getIndex=function(){var t=parseInt(this.$layer.css("zIndex"));return isNaN(t)&&(t=0),t},r.prototype.renderIndex=function(t){},r.prototype.sync=function(){this._syncalign(null,"history"),this._syncvalign(null,"history"),this._syncwidth(),this._syncheight(),this._synctop(),this._syncleft(),this._syncparentid()},r.prototype["delete"]=function(){var t=this.layer.getProperty("parentid");t&&this.unSubscribeParent("delete")},r.prototype.isParentOrChild=function(){return this.parent||this.children.length>0},r}),N2Require("PlacementContent",["PlacementAbstract"],[],function(t,e,i){"use strict";function n(t,i,n){this.type="content",e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.PlacementAbstract.prototype),n.prototype.constructor=n,n}),N2Require("PlacementDefault",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="default",e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer},r.prototype.activated=function(t){this.startUISizing()},r.prototype.deActivated=function(t){this.$layer.nextendNormalSizing("destroy")},r.prototype.startUISizing=function(){var e=!1;this.layer.item&&this.layer.item.needSize&&(e=!0),this.$layer.nextendNormalSizing({start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.layer.setProperty("maxwidth",e.value)},this)})},r}),N2Require("PlacementNormal",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="normal",this.transferredProperties={},e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer},r.prototype.preActivation=function(t){if("absolute"==t.type&&this.layer.item&&this.layer.item.needSize){var e=this.layer.getProperty("height");e.match&&e.match(/[0-9]+%$/)?this.transferredProperties.height=Math.max(100,parseInt(this.$layer.parent().height()*parseInt(e)/100)):e>0&&(this.transferredProperties.height=e)}},r.prototype.activated=function(e){this.loadProperties(t.extend(e,this.transferredProperties)),this.transferredProperties={},this.layer.$.on("baseSizeUpdated.placementnormal",t.proxy(this._syncmargin,this)),this.layer.$.on("baseSizeUpdated.placementnormal",t.proxy(this._syncheight,this)),this.startUISpacing(),this.startUISizing(),this.$layer.on({mousedown:t.proxy(function(t){t.stopPropagation()})})},r.prototype.loadProperties=function(t){this.layer.createDeviceProperty("margin",{desktopPortrait:"0|*|0|*|0|*|0|*|px+"},this.layer.layer,this),this.layer.createDeviceProperty("height",{desktopPortrait:t.height||0},this.layer.layer,this),this.layer.createDeviceProperty("maxwidth",{desktopPortrait:0},this.layer.layer,this),this.layer.createDeviceProperty("selfalign",{desktopPortrait:"inherit"},this.layer.layer,this)},r.prototype.deActivated=function(t){this.layer.$.off(".placementnormal"),this.$layer.nextendSpacing("destroy"),this.$layer.nextendNormalSizing("destroy"),this.layer.layer.removeClass("n2-ss-has-maxwidth"),this.layer.layer.removeAttr("data-cssselfalign");var e=this.layer.getPropertiesData(["margin","height"]);return this.layer.removeProperty("margin"),this.layer.removeProperty("height"),this.layer.removeProperty("maxwidth"),this.layer.removeProperty("selfalign"),this.layer.layer.css({position:"",margin:"",height:"",maxWidth:""}),e},r.prototype._renderModeProperties=function(t){this._syncmargin(),this._syncheight(),this._syncmaxwidth(),this._syncselfalign()},r.prototype._syncmargin=function(){var t=this.layer.getProperty("margin").split("|*|"),e=t.pop(),i=this.layer.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var t=t.join(e+" ")+e;this.layer.layer.css("margin",t),this.layer.update(),this.$layer.nextendSpacing("option","current",t)},r.prototype.startUISpacing=function(){this.$layer.nextendSpacing({mode:"margin",sync:{n:"margin-top",e:"margin-right",s:"margin-bottom",w:"margin-left"},handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Margin "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.onSpacingStop,this)})},r.prototype.onSpacingStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.layer.getProperty("margin").split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.$layer.css("fontSize"))-this.layer.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.layer.setProperty("margin",r.join("|*|")),t("#layernormal-margin").data("field").insideChange(r.join("|*|"))},r.prototype.startUISizing=function(){var e=!1;this.layer.item&&this.layer.item.needSize&&(e=!0),this.$layer.nextendNormalSizing({height:e,syncWidth:!0,start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.layer.setProperty("maxwidth",e.value)},this),resizeHeight:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Height: "+e.value+"px")},this),stopHeight:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing");var n=1;parseInt(this.$layer.css("fontSize"))!=this.layer.baseSize&&(n=this.canvasManager.getResponsiveRatio("h"));var r=Math.round(r/n);this.layer.setProperty("height",e.value)},this)})},r.prototype._syncheight=function(){var t=parseInt(this.layer.getProperty("height"));if(t>0){var e="px",i=this.layer.baseSize;i>0&&(e="em",t=parseInt(t)/i),this.layer.layer.css("height",t+e)}else this.layer.layer.css("height","");this.layer.update()},r.prototype._syncmaxwidth=function(){var t=parseInt(this.layer.getProperty("maxwidth"));0>=t||isNaN(t)?this.layer.layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth"),this.layer.update()},r.prototype._syncselfalign=function(){this.layer.layer.attr("data-cssselfalign",this.layer.getProperty("selfalign"))},r.prototype.sync=function(){this._syncmargin(),this._syncheight(),this._syncmaxwidth()},r}),N2Require("Placement",[],[],function(t,e,i){"use strict";function n(t){this.layer=t,this.canvasManager=t.canvasManager,this.modes={},this.current=null,this.isTransferHandled=!1,this.updatePositionThrottled=NextendDeBounce(this.updatePosition,200)}return n.prototype.allow=function(t){switch(t){case"absolute":this.modes.absolute=new e.PlacementAbsolute(this,this.layer,this.canvasManager);break;case"normal":this.modes.normal=new e.PlacementNormal(this,this.layer,this.canvasManager);break;case"group":this.modes.absolute=new e.PlacementGroup(this,this.layer,this.canvasManager);break;case"content":this.modes.absolute=new e.PlacementContent(this,this.layer,this.canvasManager);break;case"default":this.modes["default"]=new e.PlacementDefault(this,this.layer,this.canvasManager)}},n.prototype.start=function(){for(var t in this.modes)this.modes[t].start()},n.prototype.setMode=function(t,e){var i=!1;if(e=e||{},"undefined"==typeof this.modes[t])throw new Exception("Layer placement("+t+") not allowed for the container",this.layer);if(this.current!=this.modes[t]){var n;this.current&&(this.modes[t].preActivation(this.current),n=this.current.type,i=this.current.deActivated(this.modes[t])),this.current=this.modes[t],this.layer.layer.attr("data-pm",this.current.type),this.current.activated(e),this.layer.$.triggerHandler("placementChanged",[this.current.type,n])}return i},n.prototype.doAction=function(t){try{return this.current[t].apply(this.current,Array.prototype.slice.call(arguments,1))}catch(e){}},n.prototype.getType=function(){return this.current.type},n.prototype.onResize=function(t){"function"==typeof this.current.onResize&&this.current.onResize(t)},n.prototype.updatePosition=function(){this.current.updatePosition()},n.prototype.getIndex=function(){return this.current.getIndex()},n.prototype.renderIndex=function(t){return this.current.renderIndex(t)},n.prototype.doLinearResize=function(t){this.current.doLinearResize(t)},n.prototype.sync=function(){this.current.sync()},n.prototype.renderModeProperties=function(t){var e=this.layer.getProperty("fontsize");this.layer.adjustFontSize(this.layer.getProperty("adaptivefont"),e,!1),this.current._renderModeProperties(t)},n.prototype["delete"]=function(){this.current["delete"]()},n}),N2Require("PlacementAbstract",["Placement"],[],function(t,e,i){"use strict";function n(t,e,i){this.placement=t,this.layer=e,this.canvasManager=i}return n.prototype.start=function(){},n.prototype.preActivation=function(t){},n.prototype.activated=function(){},n.prototype.deActivated=function(t){return!1},n.prototype.updatePosition=function(){this.layer.group.update()},n.prototype._renderModeProperties=function(t){},n.prototype._hide=function(){},n.prototype._show=function(){},n.prototype.snap=function(){return!1},n.prototype.getIndex=function(){return this.layer.layer.index()},n.prototype.renderIndex=function(t){},n.prototype.doLinearResize=function(t){},n.prototype.sync=function(){},n.prototype["delete"]=function(){},n.prototype.triggerLayerResized=function(t,e){},n.prototype.changeStatus=function(t,e){},n}),N2Require("Item",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e,i,r){this.type===n&&(this.type=e.data("item")),this.needSize=this.needSize||!1,this.self=this,this.$item=e,this.layer=i,this.itemEditor=r,this.fonts=[],this.styles=[],this.needFill=[],this.values=this.$item.data("itemvalues"),"object"!=typeof this.values&&(this.values=t.parseJSON(this.values)),this.pre="div#"+nextend.smartSlider.frontend.sliderElement.attr("id")+" ",this.defaultValues=r.getItemForm(this.type).values,this.added(),this.$item.data("item",this),this.$item.appendTo(this.layer.getContent()),this.layer.item=this,0===this.$item.children().length&&this.layer.readyDeferred.done(t.proxy(this.reRender,this)),t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.$item),this.$item.find("a").on("click",function(t){t.preventDefault()}),t(window).trigger("ItemCreated")}return r.prototype.setSelf=function(t){this.self!=this&&this.self.setSelf(t),this.self=t},r.prototype.getSelf=function(){return this.self!=this&&(this.self=this.self.getSelf()),this.self},r.prototype.changeValue=function(e,i){this==this.itemEditor.activeItem?t("#item_"+this.type+e).data("field").insideChange(i):this.values[e]=i},r.prototype.activate=function(t,e,i){this.itemEditor.setActiveItem(this,e,i)&&(nextend.basicCSS.activate("ss3item"+this.type,this.values,{font:this.fonts,style:this.styles}),this.itemEditor.lastValues[this.type]=this.values)},r.prototype.deActivate=function(){nextend.basicCSS.deActivate()},r.prototype.render=function(e,i){this.layer.layer.triggerHandler("itemRender"),this.$item.html(""),this.parseAll(e),this._render(e),this.itemEditor.lastValues[this.type]=this.values=i,t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.$item);var n=this.getName(e);n=n===!1||""==n||"Layer"==n?this.type:n.replace(/[<>]/gi,""),this.layer.rename(n,!1),this.layer.update(),this.$item.find("a").on("click",function(t){t.preventDefault()})},r.prototype._render=function(t){},r.prototype.reRender=function(e){this.values=t.extend({},this.getDefault(),this.values,e),this.render(t.extend({},this.values),this.values)},r.prototype["delete"]=function(){this.$item.trigger("mouseleave"),this.$item.remove(),this.itemEditor.activeItem==this&&(this.itemEditor.activeItem=null)},r.prototype.getHTML=function(e){var i="";return i=e?"["+this.type+' values="'+Base64.encode(JSON.stringify(this.values))+'"]':t('<div class="n2-ss-item n2-ss-item-'+this.type+'"></div>').attr("data-item",this.type).attr("data-itemvalues",JSON.stringify(this.values))},r.prototype.getData=function(){return{type:this.type,values:this.values}},r.prototype.getDefault=function(){return{}},r.prototype.added=function(){},r.prototype.addedFont=function(e,i){var n=t("#item_"+this.type+i);n.length&&(this.fonts.push({mode:e,name:i,field:n.data("field"),def:this.defaultValues[i]}),t.when(nextend.fontManager.addVisualUsage(e,this.values[i],this.pre)).done(t.proxy(function(t){t||this.changeValue(i,"")},this)))},r.prototype.addedStyle=function(e,i){var n=t("#item_"+this.type+i);n.length&&(this.styles.push({mode:e,name:i,field:n.data("field"),def:this.defaultValues[i]}),t.when(nextend.styleManager.addVisualUsage(e,this.values[i],this.pre)).done(t.proxy(function(t){t||this.changeValue(i,"")},this)))},r.prototype.parseAll=function(t){for(var e=0;e<this.fonts.length;e++)t[this.fonts[e].name+"class"]=nextend.fontManager.getClass(t[this.fonts[e].name],this.fonts[e].mode)+" ";for(var e=0;e<this.styles.length;e++)t[this.styles[e].name+"class"]=nextend.styleManager.getClass(t[this.styles[e].name],this.styles[e].mode)+" ";for(var e=0;e<this.needFill.length;e++)"undefined"!=typeof t[this.needFill[e]]&&(t[this.needFill[e]]=nextend.smartSlider.generator.fill(t[this.needFill[e]]+""))},r.prototype.getName=function(t){return"Layer"},r.prototype.resizeLayerToImage=function(e){var n=this.layer;t("<img/>").attr("src",e).load(function(){var t=i.frontend.dimensions.slide,e=this.width,r=this.height,s=t.width,o=t.height;e>0&&r>0&&(e>s&&(r=r*s/e,e=s),r>o&&(e=e*o/r,r=o),nextend.smartSlider.history.off(),n.setProperty("width",e),n.setProperty("height",r),nextend.smartSlider.history.on())})},r.prototype.fitLayer=function(t){return!1},r}),N2Require("ItemManager",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e,n){this.suppressChange=!1,this.activeItemOriginalData=null,this.canvasManager=e,this.lastValues={},this.startItems(),this.forms={},this.activeForm=!1,n.isUploadDisabled||i.frontend.sliderElement.fileupload({url:n.uploadUrl,pasteZone:!1,dropZone:i.frontend.sliderElement,dataType:"json",paramName:"image",add:function(t,e){e.formData={path:"/"+n.uploadDir},e.submit()},done:t.proxy(function(t,e){var i=e.result;if(i.data&&i.data.name){var n=this.createLayerItem(!1,{item:"image"});n.reRender({image:i.data.url}),n.activate(null,null,!0)}else NextendAjaxHelper.notification(i)},this),fail:function(t,e){NextendAjaxHelper.notification(e.jqXHR.responseJSON)},start:function(){NextendAjaxHelper.startLoading()},stop:function(){setTimeout(function(){NextendAjaxHelper.stopLoading()},100)}})}return r.prototype.setActiveItem=function(e,i,n){if(e!=this.activeItem||n){this.activeItemOriginalData=null;var r=e.type;this.activeForm&&this.activeForm.form.css("display","none"),this.activeItem&&this.activeItem.deActivate(),this.activeForm=this.getItemForm(r);var s=t.extend({},this.activeForm.values,e.values);this.activeItem=e,this.suppressChange=!0;for(var o in s){var a=t("#item_"+r+o).data("field");a&&a.insideChange(s[o])}return this.suppressChange=!1,this.activeForm.form.css("display","block"),this.focusFirst(i),!0}return!1},r.prototype.focusFirst=function(t){var e=this.activeForm.fields.eq(0).data("field");nextend.smartSlider.generator.isDynamicSlide()&&e.connectedField&&e.connectedField instanceof N2Classes.FormElementImage||this.activeForm.fields.eq(0).data("field").focus("undefined"!=typeof t&&t)},r.prototype.startItems=function(){t(".n2-ss-core-item").nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,distance:5,$layer:function(){return this.element.clone()},onCreate:t.proxy(function(t,e,n,r){switch(n.layer.type){case"content":case"col":i.history.startBatch();var s=this.createLayerItem(n.layer,e.$layer.data(),"click");i.history.addControl("skipForwardUndos"),n.layer.container.insertLayerAt(s.layer,r),s.layer.changeGroup(!1,n.layer),i.history.endBatch();break;case"row":var o=n.layer.createCol();n.layer.moveCol(o.getIndex(),r),i.history.startBatch();var s=this.createLayerItem(o,e.$layer.data(),"click");i.history.addControl("skipForwardUndos"),o.container.insertLayerAt(s.layer,0),s.layer.changeGroup(!1,o),i.history.endBatch();break;default:var a=nextend.smartSlider.$currentSlideElement.offset(),s=this.createLayerItem(this.canvasManager.mainContainer,e.$layer.data(),"click");s.layer.placement.current.setPosition(t.pageX-a.left-20,t.pageY-a.top-20)}},this),start:function(){t("#n2-ss-add-sidebar").removeClass("n2-active")}}).on("click",t.proxy(function(e){this.createLayerItem(this.canvasManager.mainContainer.getActiveGroup(),t(e.currentTarget).data(),"click")},this)),t("[data-itemshortcut]").on({click:t.proxy(function(e){e.preventDefault(),t('.n2-ss-core-item[data-item="'+t(e.currentTarget).data("itemshortcut")+'"]').trigger("click")},this),mousedown:t.proxy(function(e){t('.n2-ss-core-item[data-item="'+t(e.currentTarget).data("itemshortcut")+'"]').trigger(e)},this)}),t("[data-structureshortcut]").on({click:t.proxy(function(e){e.preventDefault(),t(".n2-ss-add-layer-button").trigger("click"),t("#n2-ss-layers-switcher > .n2-labels .n2-td").eq(1).trigger("click")},this),mousedown:t.proxy(function(e){t('.n2-ss-core-item[data-type="'+t(e.currentTarget).data("structureshortcut")+'"]').trigger(e)},this)})},r.prototype.createLayerItem=function(n,r,s,o){n=n||this.canvasManager.mainContainer.getActiveGroup();var a=r.item;if("structure"==a){var l=new e.Row(this.canvasManager,n,{});return l.create(r.type),l.hightlightStructure(),{layer:l}}var h=this.getItemForm(a),d=t("<div></div>").attr("data-item",a).data("itemvalues",t.extend(!0,{},h.values,this.getLastValues(a))).addClass("n2-ss-item n2-ss-item-"+a),l=this._createLayer(d,n,t.extend(t(".n2-ss-core-item-"+a).data("layerproperties"),o));return s&&"click"==s?setTimeout(function(){l.layer.trigger("mousedown",["create"]).trigger("mouseup",["create"]).trigger("click",["create"])},500):l.activate(),i.layerWindow.switchTab("item"),i.history.addSimple(this,this.historyDelete,this.historyCreate,[n,l,r]),l.item},r.prototype.getLastValues=function(t){return this.lastValues[t]!==n?this.lastValues[t]:{}},r.prototype.getItemClass=function(t){var i="Item"+t.capitalize();return"undefined"==typeof e[i]?"Item":i},r.prototype._createLayer=function(t,i,n){var r=this.canvasManager.layerOptions.layerFeatures.layerDefault;for(var s in r)null!==r[s]&&(n[s]=r[s]);var o=new e.Layer(this.canvasManager,i,n);return o.create(function(e){return e._createLayer().append(t)}),o},r.prototype.getItemForm=function(e){if(this.forms[e]===n){var i=t("#smartslider-slide-toolbox-item-type-"+e),r={form:i,values:i.data("itemvalues"),fields:i.find('[name^="item_'+e+'"]'),fieldNameRegexp:new RegExp("item_"+e+"\\[(.*?)\\]","")};r.fields.on({nextendChange:t.proxy(this.updateCurrentItem,this),keydown:t.proxy(this.updateCurrentItemDeBounced,this)}),this.forms[e]=r}return this.forms[e]},r.prototype.updateCurrentItem=function(e){if(!this.suppressChange){null===this.activeItemOriginalData&&(this.activeItemOriginalData=t.extend({},this.activeItem.values));var n={},r={};if(this.activeForm.fields.each(t.proxy(function(e,i){var i=t(i),s=i.attr("name").match(this.activeForm.fieldNameRegexp)[1];r[s]=n[s]=i.val()},this)),e&&"nextendChange"==e.type){var s=i.history.addValue(this,this.historyUpdateCurrentItem,[this.activeItem]);s&&s.setValues(this.activeItemOriginalData,t.extend({},r)),this.activeItemOriginalData=null}this.activeItem.render(t.extend({},this.activeItem.getDefault(),n),r)}},r.prototype.historyUpdateCurrentItem=function(e,i){var n=i.getSelf();n.reRender(t.extend(!0,{},e)),n.values=e,this.activeItem==n&&n.activate(null,null,!0)},r.prototype.updateCurrentItemDeBounced=NextendDeBounce(function(t){this.updateCurrentItem(t)},100),r.prototype.historyDelete=function(t,e){e.getSelf()["delete"]()},r.prototype.historyCreate=function(t,e,i){var n=this.createLayerItem(t.getSelf(),i);e.setSelf(n.layer)},r.prototype.historyCreateStructure=function(t,e,i){var n=this.createLayerItem(t.getSelf(),i);e.setSelf(n.layer)},r.prototype.getSelf=function(){return this},r}),N2Require("PluginActivatable",[],[],function(t,e,i){"use strict";function n(){this.isActive=!1,this.preventActivation=!1}return n.prototype.activate=function(t,e,i){return this.preventActivation?!1:(document.activeElement&&document.activeElement.blur(),t&&(t.ctrlKey||t.metaKey)&&this.canvasManager.mainContainer.getSelectedLayer()?!this.select():t&&3==t.which&&this.canvasManager.selectMode?!1:(i||this.canvasManager.exitSelectMode(),t&&this.positionSidebar(),this.canvasManager.mainContainer.getSelectedLayer()!==this&&(this.layerRow.addClass("n2-active"),this.layer.addClass("n2-active"),this.layer.triggerHandler("n2-ss-activate"),this.canvasManager.changeActiveLayer(this,i),nextend.activeLayer=this.layer,this.canvasManager.ui.onActivateLayer(this)),this.isActive=!0,!0))},n.prototype.deActivate=function(){this.isActive=!1,this.layer===i&&console.error(),this.layer.removeClass("n2-active"),this.layerRow.removeClass("n2-active"),this.layer.triggerHandler("n2-ss-deactivate")},n}),N2Require("PluginEditableName",[],[],function(t,e,i){"use strict";function n(){}var r=300,s=null;return n.prototype.addProperties=function(t){this.createProperty("name",this.label,t),this.createProperty("nameSynced",1,t)},n.prototype.makeNameEditable=function(){this.layerTitleSpan.on({mouseup:t.proxy(function(e){s?(clearTimeout(s),s=null,this.editName()):(this.activate(e),s=setTimeout(t.proxy(function(){s=null},this),r))},this)})},n.prototype.editName=function(){var i=new e.InlineField;i.$input.on({valueChanged:t.proxy(function(t,e){this.rename(e,!0),this.layerTitleSpan.css("display","inline")},this),cancel:t.proxy(function(){this.layerTitleSpan.css("display","inline")},this)}),this.layerTitleSpan.css("display","none"),i.injectNode(this.layerTitle,this.property.name)},n.prototype.rename=function(t,e){if(this.property.nameSynced||e){if(e&&(this.property.nameSynced=0),""==t){if(e)return this.property.nameSynced=1,this.item.reRender(),!1;t="Layer #"+(this.group.getLayerCount()+1)}t=t.substr(0,35),this.property.name!=t&&(this.property.name=t,this.layerTitleSpan.html(t),this.$.trigger("layerRenamed",t))}},n}),N2Require("PluginShowOn",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){}return r.prototype.addProperties=function(t){this.showsOnCurrent=!0,this.createProperty("generatorvisible","",t),this.createProperty("desktopPortrait",1,t),this.createProperty("desktopLandscape",1,t),this.createProperty("tabletPortrait",1,t),this.createProperty("tabletLandscape",1,t),this.createProperty("mobilePortrait",1,t),this.createProperty("mobileLandscape",1,t)},r.prototype._hide=function(){this.layer.css("display","none"),this.showsOnCurrent=!1,this.update()},r.prototype._show=function(){parseInt(this.property[this.canvasManager.getMode()])&&(this.layer.css("display",""),this.showsOnCurrent=!0),this.update();
|
7 |
-
},r.prototype._syncdesktopPortrait=function(){var t=this.getProperty("desktopPortrait");this.__syncShowOnDevice("desktopPortrait",t)},r.prototype._syncdesktopLandscape=function(){var t=this.getProperty("desktopLandscape");this.__syncShowOnDevice("desktopLandscape",t)},r.prototype._synctabletPortrait=function(){var t=this.getProperty("tabletPortrait");this.__syncShowOnDevice("tabletPortrait",t)},r.prototype._synctabletLandscape=function(){var t=this.getProperty("tabletLandscape");this.__syncShowOnDevice("tabletLandscape",t)},r.prototype._syncmobilePortrait=function(){var t=this.getProperty("mobilePortrait");this.__syncShowOnDevice("mobilePortrait",t)},r.prototype._syncmobileLandscape=function(){var t=this.getProperty("mobileLandscape");this.__syncShowOnDevice("mobileLandscape",t)},r.prototype.__syncShowOnDevice=function(t,e){if(this.getMode()==t){var e=parseInt(e);e?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[t,e]),this.placement.doAction("triggerLayerResized")}},r}),N2Require("Col",["ContentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.label="Col",this.type="col",this.innerContainer="> .n2-ss-layer-col",e.ContentAbstract.prototype.constructor.call(this,t,i,n),this.placement.allow("default")}return r.prototype=Object.create(e.ContentAbstract.prototype),r.prototype.constructor=r,r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"><div class="n2-ss-layer-content n2-ss-layer-col"></div></div>').attr("data-type",this.type)},r.prototype.addProperties=function(t){e.ContentAbstract.prototype.addProperties.call(this,t),this.createProperty("colwidth","1",t),this.createProperty("borderradius",0,t),this.createProperty("boxshadow","0|*|0|*|0|*|0|*|00000080",t),this.createProperty("borderwidth","1|*|1|*|1|*|1",t),this.createProperty("borderstyle","none",t),this.createProperty("bordercolor","ffffffff",t),this.createDeviceProperty("order",{desktopPortrait:0},t)},r.prototype.create=function(){e.ContentAbstract.prototype.create.call(this),this._syncorder(),this._syncborder(),this._syncborderradius(),this._syncboxshadow(),this._onReady()},r.prototype.load=function(t){e.ContentAbstract.prototype.load.call(this,t),this._syncorder(),this._syncborder(),this._syncborderradius(),this._syncboxshadow(),this._onReady();var i=t.data("rowcolumns")+"";if(i!=n&&"resolved"==this.group.readyDeferred.state()){for(var r=i.split("+"),s=0;s<r.length;s++)r[s]=new Fraction(r[s]);this.group.setColsWidth(r)}},r.prototype.createRow=function(){this.$content=this.layer.find(".n2-ss-layer-content:first"),this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"normal","> .n2-ss-layer",["row","layer"]),this.container.setLayerContainerElement(this.$content);var i=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));this._createLayerListRow([t('<div class="n2-actions"></div>').append(n).append(i)]).addClass("n2-ss-layer-content-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-col"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype._start=function(t){e.ContentAbstract.prototype._start.call(this,t),t&&this.highlight(2e3)},r.prototype.getRealOrder=function(){var t=this.getProperty("order");return 0==t?10:t},r.prototype._syncorder=function(){var t=this.getProperty("order");0==t?this.layer.css("order",""):this.layer.css("order",t),this.group.refreshUI()},r.prototype._synccolwidth=function(){this.layer.css("width",100*new Fraction(this.getProperty("colwidth")).valueOf()+"%"),this.group.refreshUI()},r.prototype._syncborderradius=function(){this.$content.css("border-radius",this.getProperty("borderradius")+"px")},r.prototype._syncborderwidth=r.prototype._syncbordercolor=r.prototype._syncborderstyle=function(){this._syncborder()},r.prototype._syncborder=function(){var t=this.getProperty("borderstyle");if("none"!=t){this.$content.css("border-color",N2Color.hex2rgbaCSS(this.getProperty("bordercolor"))),this.$content.css("border-style",this.getProperty("borderstyle"));var e=this.getProperty("borderwidth").split("|*|"),i="px";this.$content.css("border-width",e.join(i+" ")+i)}else this.$content.css("border","");this.update()},r.prototype._syncboxshadow=function(){var t=this.getProperty("boxshadow").split("|*|");0==t[0]&&0==t[1]&&0==t[2]&&0==t[3]||0==N2Color.hex2alpha(t[4])?this.$content.css("box-shadow",""):this.$content.css("box-shadow",t[0]+"px "+t[1]+"px "+t[2]+"px "+t[3]+"px "+N2Color.hex2rgbaCSS(t[4]))},r.prototype["delete"]=function(){this.group.container.getLayerCount()>1?this._delete():this.group["delete"]()},r.prototype.getHTML=function(t){var i=e.ComponentAbstract.prototype.getHTML.call(this,t);return i.attr("data-rowcolumns",this.group.getColumns()),i},r.prototype.renderModeProperties=function(t){this._syncorder(),e.ContentAbstract.prototype.renderModeProperties.call(this,t)},r.prototype.update=function(){this.group._syncwrapafter(),e.ComponentAbstract.prototype.update.call(this)},r});var dependencies=["LayerDataStorage","PluginEditableName"];N2Require("ComponentAbstract",dependencies,["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,o){this.wraps={},this.counter=s++,window.layers[this.counter]=this,this.self=this,this.originalProperties=o||{},e.LayerDataStorage.prototype.constructor.call(this),this.readyDeferred=t.Deferred(),this.readyDeferred.done(t.proxy(this.onReady,this)),this.isDeleteStarted=!1,this.isDeleted=!1,this._lastClasses=!1,this.$=t(this),this.proxyRefreshBaseSize=t.proxy(this.refreshBaseSize,this),this.status=r.STATUS.UNDEFINED,this.canvasManager=i,this.group=n,e.PluginActivatable.prototype.constructor.call(this),this.placement=new e.Placement(this),this.readyDeferred.done(t.proxy(this.addUILabels,this))}var s=0;window.layers=[],r.STATUS={UNDEFINED:0,NORMAL:1,LOCKED:2,HIDDEN:3},r.STATUS_INV={0:"UNDEFINED",1:"NORMAL",2:"LOCKED",3:"HIDDEN"};for(var o in e.PluginActivatable.prototype)r.prototype[o]=e.PluginActivatable.prototype[o];for(var o in e.LayerDataStorage.prototype)r.prototype[o]=e.LayerDataStorage.prototype[o];for(var o in e.PluginEditableName.prototype)r.prototype[o]=e.PluginEditableName.prototype[o];for(var o in e.PluginShowOn.prototype)r.prototype[o]=e.PluginShowOn.prototype[o];return r.prototype.addUILabels=function(){this.markTimer=null,this.uiLabel=t('<div class="n2-ss-layer-ui-label-container"><div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-self">'+this.getUILabel()+"</div></div>").appendTo(this.layer),nextend.tooltip.addElement(t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-up n2-ss-layer-ui-label-action"><i class="n2-i n2-i-uplevel"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(t){this.up(t)},this)}).appendTo(this.uiLabel),"Select parent"),t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-duplicate"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(){this.duplicate()},this)}).appendTo(this.uiLabel),t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-trash"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(){this["delete"]()},this)}).appendTo(this.uiLabel)},r.prototype.getUILabel=function(){return this.label},r.prototype.up=function(t){t.stopImmediatePropagation(),this.group.activate(t)},r.prototype.addProperties=function(t){this.createProperty("id",null,t,this),this.createProperty("class","",t),this.createProperty("crop","visible",t),this.createProperty("rotation",0,t),this.createProperty("parallax",0,t),this.createProperty("adaptivefont",0,t),this.createDeviceProperty("fontsize",{desktopPortrait:100},t),e.PluginShowOn.prototype.addProperties.call(this,t),e.PluginEditableName.prototype.addProperties.call(this,t)},r.prototype.getRootElement=function(){return this.layer},r.prototype.create=function(t,e){e=e||!1,e||this.addProperties(!1),"function"==typeof t?this.layer=t.call(null,this):this.layer=this._createLayer(),this.layer.addClass("n2-ss-layer-under-creation"),e&&this.addProperties(this.layer),this.layer.data("layerObject",this),this.layer.triggerHandler("layerStarted",[this]),this.group.container.insert(this),this.group.onChildCountChange(),this.$.triggerHandler("create"),this._start(!0)},r.prototype.load=function(t){this.addProperties(t),this.layer=t.data("layerObject",this),this.layer.triggerHandler("layerStarted",[this]),this.$.triggerHandler("load"),this._start(!1);var e=t.data("status");null!==e&&"undefined"!=typeof e?this.changeStatus(e):this.changeStatus(r.STATUS.NORMAL)},r.prototype._start=function(e){this.createRow();var i=this.layer.find("> .n2-ss-layer-mask");i.length&&(this.wraps.mask=i),this._synccrop(),this._syncrotation(),this.placement.start(),this.placement.setMode(this.group.container.allowedPlacementMode,this.originalProperties),this.setGroup(this.group),this.canvasManager.$.triggerHandler("layerCreated",this),e&&(this.refreshBaseSize(),this.$.triggerHandler("created")),setTimeout(t.proxy(function(){this.isDeleted||(this.placement.onResize(!0),this.layer.css("visibility",""),this.layer.removeClass("n2-ss-layer-under-creation"))},this),300)},r.prototype._onReady=function(){this.originalProperties={},this.readyDeferred.resolve(),this.layer.on({mouseover:t.proxy(this.markOver,this),mouseout:t.proxy(this.markOut,this)})},r.prototype.isReady=function(){return"resolved"==this.readyDeferred.state()},r.prototype.getName=function(){return this.property.name},r.prototype.setGroup=function(t){this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=t,this.placement.setMode(t.container.allowedPlacementMode),t.container.syncLayerRow(this),this.isReady()&&this.refreshBaseSize(),this.group.$.on("baseSizeUpdated",this.proxyRefreshBaseSize)},r.prototype.changeGroup=function(t,e){var i=this.group;i.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=e;var n=this.placement.setMode(e.container.allowedPlacementMode);e.container.syncLayerRow(this),this.refreshBaseSize(),e.$.on("baseSizeUpdated",this.proxyRefreshBaseSize),this.userGroupChange(i,t,n,e,this.getIndex()),i.update()},r.prototype.userGroupChange=function(t,e,n,r,s){if(t==r)this.userIndexChange(e,s);else{var o=i.history.addValue(this,this.historyUserGroupChange,[]);o&&o.setValues({historyGroup:t,index:e,placementData:n},{historyGroup:r,index:s})}},r.prototype.historyUserGroupChange=function(t){var e=this.group,i=t.historyGroup.getSelf(),n=t.index;i.container.insertLayerAt(this,n),this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=i,t.placementData&&this.layer.data(t.placementData),this.placement.setMode(i.container.allowedPlacementMode),i.container.syncLayerRow(this),this.refreshBaseSize(),this.group.$.on("baseSizeUpdated",this.proxyRefreshBaseSize),i.onChildCountChange(),t.placementData&&this.placement.sync(),e.update()},r.prototype.userIndexChange=function(t,e){var n=i.history.addValue(this,this.historyUserIndexChange);n&&n.setValues(t,e),this.group.container.insertLayerAt(this,e)},r.prototype.historyUserIndexChange=function(t){this.group.container.insertLayerAt(this,t)},r.prototype._createLayerListRow=function(e){return this.layerRow=t('<li class="n2-ss-layerlist-row"></li>').data("layer",this).on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerRowClicked")}).appendTo(this.group.container.$ul),this.layerTitleSpan=t('<span class="n2-ucf">'+this.property.name+"</span>"),this.makeNameEditable(),this.layerTitle=t('<div class="n2-ss-layer-title"></div>').on({mouseenter:t.proxy(function(){this.canvasManager.highlight(this)},this),mouseleave:t.proxy(function(){this.canvasManager.deHighlight(this)},this)}).append(this.layerTitleSpan).append(e).appendTo(this.layerRow).on({mouseup:t.proxy(function(t){nextend.shouldPreventMouseUp||"DIV"!==t.target.tagName||this.activate(t)},this)}),nextend.tooltip.add(this.layerRow),this.layerRow.nextendLayerListItem({UIManager:this.canvasManager.mainContainer.layerListUIManager,layer:this,$item:this.layerRow}),this.layerRow},r.prototype.select=function(t){return this.canvasManager.selectLayer(this,!0)},r.prototype.update=function(){this.readyDeferred.done(t.proxy(this.placement.updatePositionThrottled,this.placement))},r.prototype.updateThrottled=function(){this.placement.updatePositionThrottled()},r.prototype.positionSidebar=function(){this.canvasManager.layerWindow.show(this,this.layer)},r.prototype.showEditor=function(){this.canvasManager.layerWindow._show()},r.prototype.highlight=function(e){e=e||2e3,this.isHighlighted&&(clearTimeout(this.isHighlighted),this.isHighlighted=!1),this.layer.addClass("n2-highlight"),this.isHighlighted=setTimeout(t.proxy(function(){this.layer.removeClass("n2-highlight")},this),e)},r.prototype.setPropertydesktopPortrait=r.prototype.setPropertydesktopLandscape=r.prototype.setPropertytabletPortrait=r.prototype.setPropertytabletLandscape=r.prototype.setPropertymobilePortrait=r.prototype.setPropertymobileLandscape=function(t,e,i){this._setProperty(t,parseInt(e),i)},r.prototype.getHTML=function(t){var i=this._createLayer();for(var r in this.property)"width"!=r&&"height"!=r&&"left"!=r&&"top"!=r&&i.attr("data-"+r.toLowerCase(),this.property[r]);for(var r in this.deviceProperty)for(var s in this.deviceProperty[r])i.attr("data-"+r.toLowerCase()+s,this.deviceProperty[r][s]);for(var r in this.deviceProperty.desktop)i.css(r,this.deviceProperty.desktop[r]+"px");if(this.container!=n){var o=i;this.innerContainer!=n&&(o=i.find(this.innerContainer)),o.append(this.container.getHTML(t))}var a=this.getProperty("id");return a&&""!=a&&i.attr("id",a),this.status>e.ComponentAbstract.STATUS.NORMAL&&i.attr("data-status",this.status),i},r.prototype.duplicate=function(e){var n=this.getHTML(!1);if("absolute"==this.placement.getType()){var r=n.attr("id");r&&(r=t.fn.uid(),n.attr("id",r),n.attr("data-id",r)),n.attr("data-parentid")?(n.data("desktopportraittop",0),n.data("desktopportraitleft",0)):(n.data("desktopportraittop",n.data("desktopportraittop")+40),n.data("desktopportraitleft",n.data("desktopportraitleft")+40)),n.attr("data-parentid","")}var s=this.canvasManager.insertComponentWithNode(this.group,n,this.getIndex()+1,!1,!0);return this.layerRow.trigger("mouseleave"),e&&s.activate(),i.history.addSimple(this,this.historyDeleteDuplicated,this.historyDuplicate,[s,s.container?s.container.getAllLayers():!1]),s},r.prototype.historyDeleteDuplicated=function(t){t.getSelf()["delete"]()},r.prototype.historyDuplicate=function(t,e){var i=this.duplicate(!1,!1);if(t.setSelf(i),e)for(var n=i.container.getAllLayers(),r=0;r<n.length;r++)e[r].setSelf(n[r])},r.prototype.historyDelete=function(){this["delete"]()},r.prototype.historyRestore=function(t,e,i,n){var r=this.canvasManager.insertComponentWithNode(this.group.getSelf(),t.clone(),i,!1,!0);if(this.setSelf(r),n)for(var s=r.container.getAllLayers(),o=0;o<s.length;o++)n[o].setSelf(s[o])},r.prototype["delete"]=function(){i.positionDisplay.hide(),nextend.tooltip.onLeave(),this._delete()},r.prototype._delete=function(){if(this.isDeleteStarted=!0,this.canvasManager.mainContainer.getSelectedLayer()==this&&this.canvasManager.layerWindow.hide(),this.isHighlighted&&(clearTimeout(this.isHighlighted),this.isHighlighted=!1),i.history.startBatch(),i.history.addSimple(this,this.historyRestore,this.historyDelete,[this.getHTML(!1),this.group,this.getIndex(),this.container?this.container.getAllLayers():!1]),this.deActivate(),this.container!=n){i.history.off();for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]._delete();i.history.on()}i.history.endBatch(),this.item!=n&&this.item["delete"](),this.placement["delete"](),this.layer.trigger("mouseup"),this.isDeleted=!0,this.canvasManager.mainContainer.layerDeleted(this),this.layer.triggerHandler("LayerDeleted"),this.getRootElement().remove(),this.layerRow.remove(),this.group.update(),this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.$.trigger("layerDeleted"),this.markTimer&&clearTimeout(this.markTimer),delete this.layer,delete this.itemEditor,this.group.onChildCountChange()},r.prototype.getData=function(i){var n={type:this.type};this.status>e.ComponentAbstract.STATUS.NORMAL&&(n.status=this.status);var r=t.extend({},this.property);for(var s in this.deviceProperty)for(var o in this.deviceProperty[s]){delete r[o];var a=this.deviceProperty[s][o];if("undefined"!=typeof a){switch(o){case"width":case"height":this.isDimensionPropertyAccepted(a)||(a=parseFloat(a));break;case"fontsize":case"left":case"top":case"gutter":case"wrap":a=parseFloat(a)}n[s.toLowerCase()+o]=a}}for(var l in r)n[l.toLowerCase()]=r[l];return n},r.prototype.onChildCountChange=function(){},r.prototype.getDataWithChildren=function(t){return t.push(this.getData({layersIncluded:!0,itemsIncluded:!0})),this.layer.triggerHandler("LayerGetDataWithChildren",[t]),t},r.prototype.markOver=function(t){this.layer.addClass("n2-ss-mouse-over"),t.stopPropagation(),this.group.markEnter(),this.markTimer&&clearTimeout(this.markTimer),this.layer.addClass("n2-ss-mouse-over-delayed"),this.uiLabel.removeClass("invisible")},r.prototype.markOut=function(e){this.layer.removeClass("n2-ss-mouse-over"),e&&e.stopPropagation(),this.group.markLeave(),this.markTimer&&clearTimeout(this.markTimer),this.isActive||this.uiLabel.addClass("invisible"),this.markTimer=setTimeout(t.proxy(function(){this.layer.removeClass("n2-ss-mouse-over-delayed"),this.uiLabel.removeClass("invisible"),this.markTimer=null},this),10)},r.prototype.markEnter=function(t){this.layer.addClass("n2-ss-mouse-hover"),this.group.markEnter()},r.prototype.markLeave=function(t){this.layer.removeClass("n2-ss-mouse-hover"),this.group.markLeave()},r.prototype.formSetname=function(t,e){},r.prototype.formSetnameSynced=function(t,e){},r.prototype.formSetdesktopPortrait=function(t,e){t.currentForm.desktopPortrait.data("field").insideChange(e)},r.prototype.formSetdesktopLandscape=function(t,e){t.currentForm.desktopLandscape.data("field").insideChange(e)},r.prototype.formSettabletPortrait=function(t,e){t.currentForm.tabletPortrait.data("field").insideChange(e)},r.prototype.formSettabletLandscape=function(t,e){t.currentForm.tabletLandscape.data("field").insideChange(e)},r.prototype.formSetmobilePortrait=function(t,e){t.currentForm.mobilePortrait.data("field").insideChange(e)},r.prototype.formSetmobileLandscape=function(t,e){t.currentForm.mobileLandscape.data("field").insideChange(e)},r.prototype.sync=function(){if(this._syncid(),this.container)for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e].sync();this.placement.sync()},r.prototype._syncid=function(){var t=this.getProperty("id");t&&""!=t?this.layer.attr("id",t):this.layer.removeAttr("id")},r.prototype.requestID=function(){var e=this.getProperty("id");return e||(e=t.fn.uid(),this.setProperty("id",e,"layer")),e},r.prototype._syncfontsize=function(){this.adjustFontSize(this.getProperty("adaptivefont"),this.getProperty("fontsize"),!0)},r.prototype._syncadaptivefont=function(){this.adjustFontSize(this.getProperty("adaptivefont"),this.getProperty("fontsize"),!0)},r.prototype.adjustFontSize=function(t,e,i){e=parseInt(e),parseInt(t)?this.layer.css("font-size",16*e/100+"px"):100!=e?this.layer.css("font-size",e+"%"):this.layer.css("font-size",""),this.refreshBaseSize(),i&&this.update()},r.prototype.refreshBaseSize=function(){var t=this.getFontSize();this.isAdaptiveFont()?this.baseSize=16*t/100:this.baseSize=this.group.baseSize*t/100,this.$.triggerHandler("baseSizeUpdated")},r.prototype.getFontSize=function(){return parseInt(this.getProperty("fontsize"))},r.prototype.isAdaptiveFont=function(){return parseInt(this.getProperty("adaptivefont"))},r.prototype._synccrop=function(){var t=this.getProperty("crop");"auto"==t&&(t="hidden"),"mask"==t?(t="hidden",this.addWrap("mask","<div class='n2-ss-layer-mask'></div>")):(this.removeWrap("mask"),this.layer.data("animatableselector",null)),this.layer.css("overflow",t)},r.prototype._syncrotation=function(){var t=parseFloat(this.getProperty("rotation"));if(t/360!=0){var e=this.addWrap("rotation","<div class='n2-ss-layer-rotation'></div>");NextendTween.set(e[0],{rotationZ:t})}else this.removeWrap("rotation")},r.prototype.addWrap=function(e,i){if(this.wraps[e]===n){var r=t(i);switch(this.wraps[e]=r,e){case"mask":r.appendTo(this.layer),this.wraps.rotation!==n?r.append(this.wraps.rotation):r.append(this.getContents()),this.layer.data("animatableselector",".n2-ss-layer-mask:first");break;case"rotation":this.wraps.mask!==n?r.appendTo(this.wraps.mask):r.appendTo(this.layer),r.append(this.getContents())}}return this.wraps[e]},r.prototype.removeWrap=function(t){if(this.wraps[t]!==n){switch(t){case"mask":this.wraps.rotation!==n?this.layer.append(this.wraps.rotation):this.layer.append(this.getContents());break;case"rotation":this.wraps.mask!==n?this.wraps.mask.append(this.getContents()):this.layer.append(this.getContents())}this.wraps[t].remove(),delete this.wraps[t]}},r.prototype.getContents=function(){return!1},r.prototype._syncclass=function(){this._lastClasses!==!1&&this.layer.removeClass(this._lastClasses);var t=this.getProperty("class");t&&""!=t?(this.layer.addClass(t),this._lastClasses=t):this._lastClasses=!1},r.prototype._syncparallax=function(){},r.prototype._syncgeneratorvisible=function(){},r.prototype._syncmouseenter=r.prototype._syncclick=r.prototype._syncmouseleave=r.prototype._syncplay=r.prototype._syncpause=r.prototype._syncstop=function(){},r.prototype.renderModeProperties=function(t){e.LayerDataStorage.prototype.renderModeProperties.call(this),this.placement.renderModeProperties(t)},r.prototype.getIndex=function(){return this.group.container.getLayerIndex(this.layer)},r.prototype.toString=function(){return this.type+" #"+this.counter},r.prototype.setSelf=function(t){t===n&&console.error(t),this.self!=this&&this.self.setSelf(t),this.self=t},r.prototype.getSelf=function(){return this.self!==this&&(this.self=this.self.getSelf()),this.self},r.prototype.historyStoreOnPlacement=function(){var t=Array.prototype.slice.call(arguments);t.splice(1,1),this.placement.current[arguments[1]].apply(this.placement.current,t)},r.prototype.getDroppable=function(){return!1},r.prototype.onCanvasUpdate=function(t,e,i){if(this.group==e)t!=i&&this.userIndexChange(t,i);else{var n;if(this.canvasManager.isCol(this.group))for(n=this;n&&(!n.placement||"absolute"!==n.placement.getType());)n=n.group;this.changeGroup(t,e),e.onChildCountChange();for(var r=this;r&&(!r.placement||"absolute"!==r.placement.getType());)r=r.group;n&&n!=r&&n.placement.updatePosition(),r&&r.placement.updatePosition()}},r.prototype.setStatusNormal=function(){this.changeStatus(r.STATUS.NORMAL)},r.prototype.changeStatus=function(t){var e=this.status;switch(t==this.status&&(t=r.STATUS.NORMAL),this.status){case r.STATUS.HIDDEN:this.getRootElement().removeAttr("data-visibility"),this.layerRow.removeClass("n2-ss-layer-status-hidden");break;case r.STATUS.LOCKED:this.layer.removeClass("n2-ss-layer-locked"),this.layerRow.removeClass("n2-ss-layer-status-locked")}switch(this.status=t,this.status){case r.STATUS.HIDDEN:this.getRootElement().attr("data-visibility","hidden"),this.layerRow.addClass("n2-ss-layer-status-hidden");break;case r.STATUS.LOCKED:this.layer.addClass("n2-ss-layer-locked"),this.layerRow.addClass("n2-ss-layer-status-locked")}this.placement.current.changeStatus(e,this.status)},r.prototype.moveX=function(t){"absolute"==this.placement.getType()&&this.placement.current.moveX(t)},r.prototype.moveY=function(t){"absolute"==this.placement.getType()&&this.placement.current.moveY(t)},r}),N2Require("Content",["ContentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Content"),this.type="content",this.innerContainer="> .n2-ss-layer-content",this._defaults=t.extend({verticalalign:"center"},this._defaults),e.ContentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("content"),i.setMainContent(this)}return r.prototype=Object.create(e.ContentAbstract.prototype),r.prototype.constructor=r,r.prototype.addUILabels=function(){this.markTimer=null,this.uiLabel=t('<div class="n2-ss-layer-ui-label-container"><div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-self">'+this.getUILabel()+"</div></div>").appendTo(this.layer)},r.prototype.addProperties=function(t){e.ContentAbstract.prototype.addProperties.call(this,t),this.createDeviceProperty("selfalign",{desktopPortrait:"inherit"},t)},r.prototype.getRootElement=function(){return this.$outerSection},r.prototype.getBackgroundElement=function(){return this.$outerSection},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer n2-ss-content-empty"><div class="n2-ss-section-main-content n2-ss-layer-content"></div></div>').attr("data-type",this.type)},r.prototype.createRow=function(){this.$outerSection=this.layer.parent(),this.$outerSection.hasClass("n2-ss-section-outer")||(this.$outerSection=t('<div class="n2-ss-section-outer"></div>').insertAfter(this.layer).append(this.layer)),this.$outerSection.data("layerObject",this),this.$content=this.layer.find("> .n2-ss-layer-content");var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this));this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"normal","> .n2-ss-layer",["row","layer"]),this.container.setLayerContainerElement(this.$content),t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(n)]).addClass("n2-ss-layer-content-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-col"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype.create=function(){this.originalProperties.adaptivefont=1,e.ContentAbstract.prototype.create.call(this),this._syncselfalign(),this._onReady()},r.prototype.load=function(t){e.ContentAbstract.prototype.load.call(this,t),this._syncselfalign(),this._onReady()},r.prototype._onReady=function(){e.ContentAbstract.prototype._onReady.call(this),this.startUISizing()},r.prototype.startUISizing=function(){this.layer.nextendNormalSizing({start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.setProperty("maxwidth",e.value)},this)})},r.prototype["delete"]=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]["delete"]()},r.prototype.remove=function(){this._delete()},r.prototype.update=function(){nextend.smartSlider.frontend.responsive.doVerticalResize()},r.prototype.onChildCountChange=function(){var t=this.container.getSortedLayers();this.layer.toggleClass("n2-ss-content-empty",0==t.length)},r.prototype.renderModeProperties=function(t){e.ContentAbstract.prototype.renderModeProperties.call(this,t),this._syncselfalign()},r.prototype._syncselfalign=function(){this.layer.attr("data-cssselfalign",this.getProperty("selfalign"))},r.prototype.duplicate=function(t){console.error("Content can not be duplicated!")},r}),N2Require("ContentAbstract",["LayerContainer","ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this._defaults=t.extend({verticalalign:"flex-start"},this._defaults),this._syncbgThrottled=NextendThrottle(this._syncbgThrottled,50),e.ComponentAbstract.prototype.constructor.call(this,i,n,r)}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.addProperties=function(t){this.createProperty("opened",1,t,this),e.ComponentAbstract.prototype.addProperties.call(this,t),this.createProperty("bgimage","",t),this.createProperty("bgimagex",50,t),this.createProperty("bgimagey",50,t),this.createProperty("bgimageparallax",0,t),this.createProperty("bgcolor","00000000",t),this.createProperty("bgcolorgradient","off",t),this.createProperty("bgcolorgradientend","00000000",t),this.createProperty("verticalalign",this._defaults.verticalalign,t),this.createDeviceProperty("maxwidth",{desktopPortrait:0},t),this.createDeviceProperty("inneralign",{desktopPortrait:"inherit"},t),this.createDeviceProperty("padding",{desktopPortrait:"10|*|10|*|10|*|10|*|px+"},t)},r.prototype.getBackgroundElement=function(){return this.$content},r.prototype.getPaddingElement=function(){return this.$content},r.prototype.create=function(){e.ComponentAbstract.prototype.create.call(this),this.initUI(),this._syncverticalalign(),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign(),this._syncbgThrottled()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this._syncverticalalign(),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign(),this._syncbgThrottled(),this.container.startWithExistingNodes()},r.prototype.initUI=function(){this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){!nextend.shouldPreventMouseUp&&this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="layer"]').trigger("click")},this)}),this.getPaddingElement().nextendSpacing({handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Padding "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.onSpacingStop,this)})},r.prototype.onSpacingStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.getPadding().split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.layer.css("fontSize"))-this.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.setProperty("padding",r.join("|*|")),t("#layercol-padding").data("field").insideChange(r.join("|*|"))},r.prototype.switchOpened=function(t){t.preventDefault(),this.getProperty("opened")?this.setProperty("opened",0):this.setProperty("opened",1)},r.prototype._syncopened=function(){this.getProperty("opened")?(this.openerElement.removeClass("n2-closed"),this.container.$ul.css("display",""),this.layer.triggerHandler("opened")):(this.openerElement.addClass("n2-closed"),this.container.$ul.css("display","none"),this.layer.triggerHandler("closed"))},r.prototype.getPadding=function(){return this.getProperty("padding")},r.prototype._syncpadding=function(){var t=this.getPadding().split("|*|"),e=t.pop(),i=this.baseSize;
|
8 |
-
if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var r=t.join(e+" ")+e;this.getPaddingElement().css("padding",r),this.update(),this.getPaddingElement().nextendSpacing("option","current",r)},r.prototype._syncmaxwidth=function(){var t=parseInt(this.getProperty("maxwidth"));0>=t||isNaN(t)?this.layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth"),this.update()},r.prototype.getInnerAlign=function(){return this.getProperty("inneralign")},r.prototype._syncinneralign=function(){this.layer.attr("data-csstextalign",this.getInnerAlign())},r.prototype.getVerticalAlign=function(){return this.getProperty("verticalalign")},r.prototype._syncverticalalign=function(){this.$content.attr("data-verticalalign",this.getVerticalAlign())},r.prototype._syncbgimage=r.prototype._syncbgimagex=r.prototype._syncbgimagey=r.prototype._syncbgimageparallax=r.prototype._syncbgcolor=r.prototype._syncbgcolorgradient=r.prototype._syncbgcolorgradientend=function(){this._syncbgThrottled()},r.prototype._syncbgThrottled=function(){var t="",e=this.getProperty("bgimage");if(""!=e){var i=parseInt(this.getProperty("bgimagex"));isFinite(i)||(i=50);var n=parseInt(this.getProperty("bgimagey"));isFinite(n)||(n=50),t+='url("'+nextend.imageHelper.fixed(e)+'") '+i+"% "+n+"% / cover no-repeat"+(1==this.getProperty("bgimageparallax")?" fixed":"")}var r=this.getProperty("bgcolor"),s=this.getProperty("bgcolorgradient"),o=this.getProperty("bgcolorgradientend");if(0!=N2Color.hex2alpha(r)||"off"!=s&&0!=N2Color.hex2alpha(o)){var a="";switch(""!=t&&(a=","+t),s){case"horizontal":this.getBackgroundElement().css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"vertical":this.getBackgroundElement().css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal1":this.getBackgroundElement().css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal2":this.getBackgroundElement().css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"off":default:""!=t?t="linear-gradient("+N2Color.hex2rgbaCSS(r)+", "+N2Color.hex2rgbaCSS(r)+"),"+t:t+=N2Color.hex2rgbaCSS(r),this.getBackgroundElement().css("background",t)}}else this.getBackgroundElement().css("background",t)},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.layersIncluded&&(i.layers=this.container.getData(t)),i},r.prototype.onChildCountChange=function(){this.layer.toggleClass("n2-ss-content-empty",0==this.container.getLayerCount()),this.update()},r.prototype.renderModeProperties=function(t){e.ComponentAbstract.prototype.renderModeProperties.call(this,t),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign()},r.prototype.getDroppable=function(){return{$container:this.$content,layer:this,placement:"normal",axis:"y"}},r.prototype.getLLDroppable=function(t){switch(t.type){case"layer":case"row":return{$container:this.container.$ul,layer:this}}return!1},r.prototype.getContents=function(){return this.$content},r}),N2Require("Layer",["ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Layer"),this.type="layer",this.parent=!1,this.itemEditor=i.itemEditor,e.ComponentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("absolute"),this.placement.allow("normal"),this.$.on("load create",t.proxy(this.startItem,this))}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.create=function(){e.ComponentAbstract.prototype.create.apply(this,arguments),this.initUI(),this._onReady()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this._onReady()},r.prototype.startItem=function(){var t=this.layer.find(".n2-ss-item");new(e[this.itemEditor.getItemClass(t.data("item"))])(t,this,this.itemEditor),this.layer.nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,layer:this,$layer:this.layer}),this.item.needSize&&this.layer.addClass("n2-ss-layer-needsize")},r.prototype.initUI=function(){this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="item"]').trigger("click"),this.item.itemEditor.focusFirst("dblclick")},this)})},r.prototype.getContent=function(){var t=this.layer,e=t.data("animatableselector");return e&&(t=t.find(e)),t},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"></div>').attr("data-type",this.type)},r.prototype.createRow=function(){var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),r=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(r).append(n)]).addClass("n2-ss-layer-layer-row")},r.prototype.activate=function(t,i,n){e.PluginActivatable.prototype.activate.call(this,t,i,n),this.item?this.item.activate(null,i):console.error("The layer do not have item on it!")},r.prototype.getHTML=function(t){var i=e.ComponentAbstract.prototype.getHTML.call(this,t),n=this.item.getHTML(t);return i.attr("style",i.attr("style")+this.getStyleText()).append(n),i},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.itemsIncluded&&(i.item=this.item.getData()),i},r.prototype.getStyleText=function(){var t="",e=this.property.crop;return"auto"!=e&&"mask"!=e||(e="hidden"),t+="overflow:"+e+";"},r.prototype.getContents=function(){return this.item.$item},r.prototype.setSelf=function(t){this.self!=this&&this.self.setSelf(t),this.self=t,this.item.setSelf(t.item)},r.prototype.getSelf=function(){return this.self!==this&&(this.self=this.self.getSelf()),this.self},r}),N2Require("MainContainer",["LayerContainer"],["smartSlider"],function(t,e,i,n){"use strict";function r(n){this.baseSize=16,this.activeLayer=null,this.$=n.$,this.isActiveGroupBlurred=!0,this.isMainGroup=!0,this.canvasManager=n,this.layer=i.$currentSlideElement.find(".n2-ss-layers-container").addBack().last(),this.layer.nextendCanvas({mainContainer:this,tolerance:5,smartguides:t.proxy(function(t){return t.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this),display:{hidden:!0,show:t.proxy(function(){i.positionDisplay.show("Canvas")},this),update:t.proxy(function(t,e){i.positionDisplay.update(t,"Canvas","L: "+parseInt(0|e.left)+"px<br />T: "+parseInt(0|e.top)+"px")},this),hide:t.proxy(function(){i.positionDisplay.hide("Canvas")},this)},start:t.proxy(function(t,e){this.canvasManager.canvasDragStart(t,e)},this),drag:t.proxy(function(t,e){this.canvasManager.canvasDragMove(t,e),e.layer&&e.layer.placement.current.triggerLayerResized()},this),stop:t.proxy(function(t,e){this.canvasManager.canvasDragStop(t,e),e.layer&&e.layer.placement.current.triggerLayerResized()},this)}),this.canvasUIManager=this.layer.data("uiNextendCanvas"),this.layer.nextendLayerList({mainContainer:this,$fixed:t("#n2-ss-layers"),$scrolled:t("#n2-ss-layer-list")}),this.layerListUIManager=this.layer.data("uiNextendLayerList"),this.layer.parent().prepend('<div class="n2-ss-slide-border n2-ss-slide-border-left" /><div class="n2-ss-slide-border n2-ss-slide-border-top" /><div class="n2-ss-slide-border n2-ss-slide-border-right" /><div class="n2-ss-slide-border n2-ss-slide-border-bottom" />'),this.container=new e.LayerContainer(this,t("#n2-ss-layer-list").find("ul"),"absolute","> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group",["content","row","layer","group"]),this.layerRow=this.container.$ul,this.$.on("layerCreated",t.proxy(function(){this.refreshHasLayers()},this))}return r.prototype.lateInit=function(){this.container.startWithExistingNodes(),this.layer.parent().on("click",t.proxy(function(){this.canvasManager.shouldPreventActivationBubble?this.blurActiveGroup():this.unBlurActiveGroup(),this.canvasManager.allowActivation()},this)),i.frontend.sliderElement.on("SliderResize",t.proxy(this.onResize,this))},r.prototype.onResize=function(t,e){for(var i=this.getEverySortedLayers(),n=0;n<i.length;n++)i[n].placement.doLinearResize(e)},r.prototype.getEverySortedLayers=function(){for(var t=this.container.getChildLayersRecursive(!1),e={},i=t.length-1;i>=0;i--)"undefined"!=typeof t[i].property.parentid&&t[i].property.parentid&&("undefined"==typeof e[t[i].property.parentid]&&(e[t[i].property.parentid]=[]),e[t[i].property.parentid].push(t[i]),t.splice(i,1));for(var i=0;i<t.length;i++)"undefined"!=typeof t[i].property.id&&t[i].property.id&&"undefined"!=typeof e[t[i].property.id]&&(e[t[i].property.id].unshift(0),e[t[i].property.id].unshift(i+1),t.splice.apply(t,e[t[i].property.id]),delete e[t[i].property.id]);return t},r.prototype.deleteLayers=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]["delete"]()},r.prototype.blurActiveGroup=function(){this.isActiveGroupBlurred=!0},r.prototype.unBlurActiveGroup=function(){this.isActiveGroupBlurred=!1},r.prototype.getActiveGroup=function(){if(this.isActiveGroupBlurred){var t=this,e=this.activeLayer;switch(this.canvasManager.isGroup(e)||this.canvasManager.isCol(e)||this.canvasManager.isContent(e)?t=e:this.canvasManager.isRow(e)?t=e.container.getSortedLayers()[0]:e&&(t=e.group),this.canvasManager.currentEditorMode){case"content":t==this&&(t=this.canvasManager.mainContent);break;case"canvas":t==this.canvasManager.mainContent&&(t=this)}return t}return this},r.prototype.getSelectedLayer=function(){return null==this.activeLayer?!1:this.activeLayer},r.prototype.getLayerData=function(t){if(t===n)return[];for(var e=[],i=0;i<t.length;i++)t[i].getDataWithChildren(e);return e},r.prototype.layerDeleted=function(t){for(var e=this.canvasManager.selectedLayers.length;e--;)t==this.canvasManager.selectedLayers[e]&&this.canvasManager.selectedLayers.splice(e,1);this._afterLayerDeletedDeBounced(t),this.refreshHasLayers()},r.prototype._afterLayerDeletedDeBounced=NextendDeBounce(function(t){this.activeLayer&&!this.activeLayer.isDeleted||this.canvasManager.resetActiveLayer()},50),r.prototype.refreshHasLayers=function(){t("body").toggleClass("n2-ss-has-layers",this.container.getLayerCount()>0),nextend.triggerResize()},r.prototype.getName=function(){return"Slide"},r.prototype.update=function(){},r.prototype.onChildCountChange=function(){},r.prototype.markEnter=function(t){},r.prototype.markLeave=function(t){},r.prototype.getSelf=function(){return this},r.prototype.createLayerAnimations=function(t,e){for(var i=[],n=this.container.getSortedLayers(),r=0;r<n.length;r++)i.push.apply(i,n[r].createLayerAnimations(t,e));return i},r.prototype.getDroppables=function(e){var i,n=this.canvasManager.currentEditorMode,r=[];if("canvas"==n){r.push(this.getDroppable()),i=this.container.getSortedLayers();var s=t.inArray(this.canvasManager.mainContent,i);s>-1&&i.splice(s,1)}else"content"==n&&(i=[this.canvasManager.mainContent]);for(var o=0;o<i.length;o++)if(i[o]!=e){var a=i[o].getDroppable();a&&r.push(a),i[o].container&&r.push.apply(r,i[o].container.getDroppables(e))}return r},r.prototype.getLLDroppables=function(t){return this.container.getLLDroppables(t)},r.prototype.getDroppable=function(){return{$container:this.layer,layer:this,placement:"absolute"}},r.prototype.getLLDroppable=function(t){switch(t.type){case"layer":case"row":case"group":case"content":return{$container:this.container.$ul,layer:this}}return!1},r.prototype.replaceLayers=function(e){this._idTranslation={};var n=this.dataToLayers(t.extend(!0,[],e).reverse()),r=[];this.deleteLayers(),this.canvasManager.mainContent.remove();for(var s=0;s<n.length;s++)r.push(this.container.append(n[s]));return this.canvasManager.refreshMode(),this.getSelectedLayer()||r.length>0&&r[0].activate(),i.history.isEnabled()&&i.history.addSimple(this,this.historyDeleteAll,this.historyReplaceLayers,[e,r,this.container.getAllLayers()]),r},r.prototype.historyDeleteAll=function(t,e){for(var i=0;i<e.length;i++)e[i].getSelf()["delete"]();this.canvasManager.mainContent.getSelf().remove()},r.prototype.historyReplaceLayers=function(t,e,i){this.replaceLayers(t);for(var n=this.container.getAllLayers(),r=0;r<i.length;r++)i[r].setSelf(n[r])},r.prototype.addLayers=function(e,n){this._idTranslation={};for(var r=this.dataToLayers(t.extend(!0,[],e)),s=[],o=0;o<r.length;o++)s.push(n.container.append(r[o]));return this.canvasManager.refreshMode(),i.history.addSimple(this,this.historyDeleteLayers,this.historyAddLayers,[e,s,n]),s},r.prototype.historyDeleteLayers=function(t,e,i){for(var n=0;n<e.length;n++)e[n].getSelf()["delete"]()},r.prototype.historyAddLayers=function(t,e,i){for(var n=this.addLayers(t,i.getSelf()),r=0;r<e.length;r++)e[r].setSelf(n[r])},r.prototype.dataToLayers=function(t,e){for(var i=[],n=0;n<t.length;n++)switch(t[n].type){case"group":console.error("Group data to layer not implemented!");break;case"row":i.push(this.buildRowNode(t[n],e));break;case"col":i.push(this.buildColNode(t[n],e));break;case"content":i.push(this.buildContentNode(t[n],e));break;case"layer":default:i.push(this.buildLayerNode(t[n],e))}return i},r.prototype._buildNodePrepareID=function(e,i){if(i.id){var n=t.fn.uid(),r=!1;"object"==typeof this._idTranslation[i.id]&&(r=this._idTranslation[i.id]),this._idTranslation[i.id]=n,i.id=n,e.attr("id",n),r&&r.resolve(i.id,n)}if(i.parentid)switch(typeof this._idTranslation[i.parentid]){case"string":i.parentid=this._idTranslation[i.parentid];break;case"undefined":this._idTranslation[i.parentid]=t.Deferred();case"object":this._idTranslation[i.parentid].done(t.proxy(function(t,e,i){t.data("parentid",i)},this,e));break;default:i.parentid=""}},r.prototype.buildContentNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='content'/>"),s=t("<div class='n2-ss-section-main-content n2-ss-layer-content' />").appendTo(r);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.layers,s),r},r.prototype.buildRowNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='row'/>"),s=t("<div class='n2-ss-layer-row' />").appendTo(r);this._buildNodePrepareID(r,e);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.cols,s),r},r.prototype.buildColNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='col'/>"),s=t("<div class='n2-ss-layer-col n2-ss-layer-content' />").appendTo(r);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.layers,s),r},r.prototype.buildLayerNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='layer'></div>").attr("style",e.style),s=1;e.zIndex&&(s=e.zIndex),this._buildNodePrepareID(r,e),e.items!==n&&(e.item=e.items[0],delete e.items),t('<div class="n2-ss-item n2-ss-item-'+e.item.type+'"></div>').data("item",e.item.type).data("itemvalues",e.item.values).appendTo(r),delete e.style,delete e.item;for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),r},r}),N2Require("Row",["LayerContainer","ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Row"),this.type="row",this._syncbgThrottled=NextendThrottle(this._syncbgThrottled,50),this.innerContainer="> .n2-ss-layer-row",this.columnsField=t("#layerrow-columns").data("field"),this.refreshUI=NextendDeBounce(this.refreshUI,100),e.ComponentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("absolute"),this.placement.allow("normal")}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.addProperties=function(t){this.createProperty("opened",1,t,this),e.ComponentAbstract.prototype.addProperties.call(this,t),this.createProperty("bgimage","",t),this.createProperty("bgimagex",50,t),this.createProperty("bgimagey",50,t),this.createProperty("bgimageparallax",0,t),this.createProperty("bgcolor","00000000",t),this.createProperty("bgcolorgradient","off",t),this.createProperty("bgcolorgradientend","00000000",t),this.createProperty("borderradius",0,t),this.createProperty("boxshadow","0|*|0|*|0|*|0|*|00000080",t),this.createProperty("fullwidth",1,t),this.createProperty("stretch",0,t),this.createDeviceProperty("inneralign",{desktopPortrait:"inherit"},t),this.createDeviceProperty("padding",{desktopPortrait:"10|*|10|*|10|*|10|*|px+"},t),this.createDeviceProperty("gutter",{desktopPortrait:20},t),this.createDeviceProperty("wrapafter",{desktopPortrait:0,mobilePortrait:1,mobileLandscape:1},t)},r.prototype.historyDeleteSelf=function(){this["delete"]()},r.prototype.historyCreateSelf=function(t,i,n){var r=new e.Row(this.canvasManager,t.getSelf(),{});r.create(i),this.setSelf(r);for(var s=r.container.getSortedLayers(),o=0;o<s.length;o++)n[o].setSelf(s[o])},r.prototype.create=function(n){var r,s=function(e){return t("<div class='n2-ss-layer' />").append(t("<div class='n2-ss-layer-row' />").append(e)).attr("data-type","row")},o=function(e){return t("<div class='n2-ss-layer' data-type='col'/>").append(t("<div class='n2-ss-layer-col n2-ss-layer-content' />").append(e))};switch(n){case"2col":r=function(t){return s([o(),o()])};break;case"2col-60-40":r=function(t){return s([o().data("colwidth","6/10"),o().data("colwidth","4/10")])};break;case"2col-40-60":r=function(t){return s([o().data("colwidth","4/10"),o().data("colwidth","6/10")])};break;case"2col-80-20":r=function(t){return s([o().data("colwidth","8/10"),o().data("colwidth","2/10")])};break;case"2col-20-80":r=function(t){return s([o().data("colwidth","2/10"),o().data("colwidth","8/10")])};break;case"3col":r=function(t){return s([o(),o(),o()])};break;case"3col-20-60-20":r=function(t){return s([o().data("colwidth","2/10"),o().data("colwidth","6/10"),o().data("colwidth","2/10")])};break;case"4col":r=function(t){return s([o(),o(),o(),o()])};break;case"special":r=function(t){var e=s([o(),o()]);return s([o().data("colwidth","1/5"),o(e).data("colwidth","4/5")])};break;default:r=function(t){return s([o()])}}"absolute"==this.group.container.allowedPlacementMode&&(this.originalProperties=t.extend({width:"100%",align:"center",valign:"top",top:20},this.originalProperties)),e.ComponentAbstract.prototype.create.call(this,r,!0),this.initUI(),this.container.startWithExistingNodes(),this._syncpadding(),this._syncinneralign(),this._syncfullwidth(),this._syncstretch(),this._syncbgThrottled(),this._syncborderradius(),this._syncboxshadow(),this.renderModeProperties(),this.container.renderModeProperties(),i.history.addSimple(this,this.historyDeleteSelf,this.historyCreateSelf,[this.group,n,this.container.getSortedLayers()]),this._onReady()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this.container.startWithExistingNodes(),this._syncpadding(),this._syncinneralign(),this._syncfullwidth(),this._syncstretch(),this._syncbgThrottled(),this._syncborderradius(),this._syncboxshadow(),this._onReady()},r.prototype.initUI=function(){this.layer.nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,layer:this,$layer:this.layer}),this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){!nextend.shouldPreventMouseUp&&this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="row"]').trigger("click")},this)}),this.$row.nextendSpacing({handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Padding "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.____makeLayerResizeableStop,this)}),this.$row.nextendColumns({columns:"1",gutter:this.getGutter(),start:t.proxy(function(t,e){i.positionDisplay.show("Columns")},this),colwidth:t.proxy(function(t,e){this.updateColumnWidth(e.currentPercent),i.positionDisplay.update(t,"Columns",Math.round(100*e.currentPercent[e.index])+"% — "+Math.round(100*e.currentPercent[e.index+1])+"%")},this),stop:t.proxy(function(t,e){i.positionDisplay.hide("Columns"),this.setRealColsWidth(e.currentFractions)},this)}),this.$row.sortable({distance:10,tolerance:"pointer",forceHelperSize:!0,forcePlaceholderSize:!0,items:"> .n2-ss-layer",handle:" > .n2-ss-layer-ui-label-container > .n2-ss-layer-ui-label-self",start:t.proxy(function(t,e){var i=this.getColumns().split("+");e.placeholder.css({width:100*new Fraction(i[e.item.data("layerObject").getIndex()]).valueOf()+"%",height:e.helper.height(),visibility:"visible",marginRight:this.getGutter()+"px",marginTop:this.getGutter()+"px"}),e.helper.hasClass("n2-ss-last-in-row")&&e.placeholder.addClass("n2-ss-last-in-row"),e.placeholder.css("order",e.helper.css("order")),e.placeholder.attr("data-r",e.helper.attr("data-r"))},this),stop:t.proxy(function(t,e){var i=e.item.data("layerObject"),n=e.item.prevAll(".n2-ss-layer, .n2-ss-layer-group").first().data("layerObject");this.$row.sortable("cancel");var r=i.getIndex(),s=0;n&&(s=n.getIndex(),r>s&&s++),r!=s&&this.moveCol(r,s)},this)})},r.prototype.____makeLayerResizeableStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.getPadding().split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.layer.css("fontSize"))-this.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.setProperty("padding",r.join("|*|")),t("#layerrow-padding").data("field").insideChange(r.join("|*|"))},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"><div class="n2-ss-layer-row"></div></div>').attr("data-type",this.type)},r.prototype.historyDeleteCol=function(t,e){e.getSelf()["delete"]()},r.prototype.historyCreateCol=function(t,e){var i=t.getSelf().createCol();e.setSelf(i)},r.prototype.createCol=function(){var t=new e.Col(this.canvasManager,this,{});return i.history.addSimple(this,this.historyDeleteCol,this.historyCreateCol,[this,t]),t.create(),this.isReady()&&this.placement.updatePosition(),t},r.prototype.createRow=function(){this.$row=this.layer.find(".n2-ss-layer-row:first"),this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"default","> .n2-ss-layer",["col"]),this.container.setLayerContainerElement(this.$row);var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),r=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(r).append(n)]).addClass("n2-ss-layer-row-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-row"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype.activate=function(){e.PluginActivatable.prototype.activate.apply(this,arguments),this.columnsField.setRow(this)},r.prototype.switchOpened=function(t){t.preventDefault(),this.getProperty("opened")?this.setProperty("opened",0):this.setProperty("opened",1)},r.prototype._syncopened=function(){this.getProperty("opened")?(this.openerElement.removeClass("n2-closed"),this.container.$ul.css("display",""),this.layer.triggerHandler("opened")):(this.openerElement.addClass("n2-closed"),this.container.$ul.css("display","none"),this.layer.triggerHandler("closed"))},r.prototype.getColumns=function(){for(var t=this.container.getSortedLayers(),e=[],i=0;i<t.length;i++)e.push(t[i].getProperty("colwidth"));return e.join("+")},r.prototype.getColumnsOrdered=function(){for(var t=this.getOrderedColumns(),e=[],i=0;i<t.length;i++)e.push(t[i].getProperty("colwidth"));return e.join("+")},r.prototype._synccolumns=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]._synccolwidth();this.update()},r.prototype.getPadding=function(){return this.getProperty("padding")},r.prototype._syncpadding=function(){var t=this.getPadding().split("|*|"),e=t.pop(),i=this.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var r=t.join(e+" ")+e;this.$row.css("padding",r),this.$row.nextendSpacing("option","current",r),this.update()},r.prototype.getGutter=function(){return this.getProperty("gutter")},r.prototype._syncgutter=function(){var t=this.getGutter()+"px",e=this.container.getSortedLayers();if(e.length>0)for(var i=e.length-1;i>=0;i--)e[i].layer.css("marginRight",t).css("marginTop",t);this.$row.nextendColumns("option","gutter",this.getGutter()),this.update()},r.prototype._syncwrapafter=function(){for(var e=parseInt(this.getProperty("wrapafter")),i=this.getOrderedColumns(),n=!1,r=i.length-1;r>=0;r--)i[r].showsOnCurrent||i.splice(r,1);var s=i.length;if(e>0&&s>e&&(n=!0),this.$row.find("> .n2-ss-row-break").remove(),this.$row.toggleClass("n2-ss-row-wrapped",n),n)for(var r=0;s>r;r++){var o=parseInt(r/e);if(i[r].layer.attr("data-r",o),(r+1)%e==0||r==s-1){var a=i[r].getProperty("order");0==a&&(a=10),t('<div class="n2-ss-row-break"/>').css("order",a).insertAfter(i[r].layer.addClass("n2-ss-last-in-row"))}else i[r].layer.removeClass("n2-ss-last-in-row")}else{for(var r=0;s>r;r++)i[r].layer.removeClass("n2-ss-last-in-row").attr("data-r",0);i.length>0?i[s-1].layer.addClass("n2-ss-last-in-row"):console.error("The row does not have col.")}this.update()},r.prototype.getOrderedColumns=function(){return this.container.getSortedLayers().sort(function(t,e){return t.getRealOrder()-e.getRealOrder()})},r.prototype.getInnerAlign=function(){return this.getProperty("inneralign")},r.prototype._syncinneralign=function(){this.layer.attr("data-csstextalign",this.getInnerAlign())},r.prototype._syncfullwidth=function(){this.layer.toggleClass("n2-ss-autowidth",0==this.getProperty("fullwidth"))},r.prototype._syncstretch=function(){this.layer.toggleClass("n2-ss-stretch-layer",1==this.getProperty("stretch"))},r.prototype._syncborderradius=function(){this.$row.css("border-radius",this.getProperty("borderradius")+"px")},r.prototype._syncboxshadow=function(){var t=this.getProperty("boxshadow").split("|*|");0==t[0]&&0==t[1]&&0==t[2]&&0==t[3]||0==N2Color.hex2alpha(t[4])?this.$row.css("box-shadow",""):this.$row.css("box-shadow",t[0]+"px "+t[1]+"px "+t[2]+"px "+t[3]+"px "+N2Color.hex2rgbaCSS(t[4]))},r.prototype._syncbgimage=r.prototype._syncbgimagex=r.prototype._syncbgimagey=r.prototype._syncbgimageparallax=r.prototype._syncbgcolor=r.prototype._syncbgcolorgradient=r.prototype._syncbgcolorgradientend=function(){this._syncbgThrottled()},r.prototype._syncbgThrottled=function(){var t="",e=this.getProperty("bgimage");if(""!=e){var i=parseInt(this.getProperty("bgimagex"));isFinite(i)||(i=50);var n=parseInt(this.getProperty("bgimagey"));isFinite(n)||(n=50),t+='url("'+nextend.imageHelper.fixed(e)+'") '+i+"% "+n+"% / cover no-repeat"+(1==this.getProperty("bgimageparallax")?" fixed":"")}var r=this.getProperty("bgcolor"),s=this.getProperty("bgcolorgradient"),o=this.getProperty("bgcolorgradientend");if(0!=N2Color.hex2alpha(r)||"off"!=s&&0!=N2Color.hex2alpha(o)){var a="";switch(""!=t&&(a=","+t),s){case"horizontal":this.$row.css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"vertical":this.$row.css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal1":this.$row.css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal2":this.$row.css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"off":default:""!=t?t="linear-gradient("+N2Color.hex2rgbaCSS(r)+", "+N2Color.hex2rgbaCSS(r)+"),"+t:t+=N2Color.hex2rgbaCSS(r),this.$row.css("background",t)}}else this.$row.css("background",t)},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.itemsIncluded&&(i.cols=this.container.getData(t)),i},r.prototype.moveCol=function(t,e){if("desktopPortrait"==this.getMode()){this._moveCol(t,e);var n=i.history.addValue(this,this.historyMoveCol,[]);n&&n.setValues({oldIndex:e,newIndex:t},{oldIndex:t,newIndex:e})}else{var r=this.getOrderedColumns(),s=r[t];r.splice(t,1),r.splice(e,0,s);for(var o=0;o<r.length;o++)r[o].setProperty("order",o+1);this.refreshUI()}},r.prototype._moveCol=function(t,e){
|
9 |
-
var i=this.container.getSortedLayers();e>t&&e++,this.container.insertLayerAt(i[t],e),this.refreshUI()},r.prototype.historyMoveCol=function(t){this._moveCol(t.oldIndex,t.newIndex)},r.prototype.setColsWidth=function(t){for(var e=this.container.getSortedLayers(),i=0;i<t.length;i++)e[i].setProperty("colwidth",t[i].toFraction());this.update(),this.refreshUI()},r.prototype.setRealColsWidth=function(t){for(var e=this.getOrderedColumns(),i=0;i<t.length;i++)e[i].setProperty("colwidth",t[i].toFraction());this.update(),this.refreshUI()},r.prototype.updateColumnWidth=function(t){for(var e=this.getOrderedColumns(),i=0;i<e.length;i++)e[i].layer.css("width",100*t[i]+"%");this.update()},r.prototype.activateColumn=function(t,e){this.container.getSortedLayers()[t].activate(e)},r.prototype.onChildCountChange=function(){if(!this.isDeleted&&!this.isDeleteStarted){var t=this.container.getSortedLayers(),e=t.length;if(e){for(var i=this.getColumns().split("+"),n=0,r=0;r<i.length;r++)n=new Fraction(i[r]).add(n);if(1!=n.valueOf())for(var r=0;e>r;r++)t[r].setProperty("colwidth","1/"+e);else for(var r=0;e>r;r++)t[r]._synccolwidth();this.refreshUI()}this._syncgutter(),this._syncwrapafter()}},r.prototype.renderModeProperties=function(t){e.ComponentAbstract.prototype.renderModeProperties.call(this,t),this._syncpadding(),this._syncinneralign(),this._syncwrapafter(),this._syncgutter(),this.isActive&&this.columnsField.setRow(this)},r.prototype.hightlightStructure=function(e){e=e||4e3,this.isStructureHighlighted&&(clearTimeout(this.isStructureHighlighted),this.isStructureHighlighted=!1),this.layer.addClass("n2-highlight-structure"),this.isStructureHighlighted=setTimeout(t.proxy(function(){this.isDeleted||this.layer.removeClass("n2-highlight-structure")},this),e)},r.prototype.refreshUI=function(){this.isDeleteStarted||(this.isActive&&this.columnsField.setRow(this),this._syncwrapafter(),this.$row.nextendColumns("option","columns",this.getColumnsOrdered()))},r.prototype.getDroppable=function(){return{$container:this.$row,layer:this,placement:"normal",axis:"x"}},r.prototype.getLLDroppable=function(t){switch(t.type){case"col":if(t.group==this)return{$container:this.container.$ul,layer:this}}return!1},r.prototype.getContents=function(){return this.$row},r}),N2Require("ComponentSettings",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.componentType="undefined",this.placementType="undefined",t("html").attr("data-component",""),t("html").attr("data-placement",""),this.currentForm={},this.forms={undefined:null,placement:{absolute:{},normal:{},"default":{}},component:{content:{},layer:{},row:{},col:{},group:{}},global:{id:t("#layerid"),desktopPortrait:t("#layershow-desktop-portrait"),desktopLandscape:t("#layershow-desktop-landscape"),tabletPortrait:t("#layershow-tablet-portrait"),tabletLandscape:t("#layershow-tablet-landscape"),mobilePortrait:t("#layershow-mobile-portrait"),mobileLandscape:t("#layershow-mobile-landscape"),"class":t("#layerclass"),generatorvisible:t("#layergenerator-visible"),crop:t("#layercrop"),rotation:t("#layerrotation"),parallax:t("#layerparallax"),fontsize:t("#layerfont-size"),adaptivefont:t("#layeradaptive-font"),mouseenter:t("#layeronmouseenter"),click:t("#layeronclick"),mouseleave:t("#layeronmouseleave"),play:t("#layeronplay"),pause:t("#layeronpause"),stop:t("#layeronstop")}},this.canvasManager=e;var n=i.frontend.responsive;n.enabled("desktop","Landscape")||this.forms.global.desktopLandscape.closest(".n2-mixed-group").css("display","none"),n.enabled("tablet","Portrait")||this.forms.global.tabletPortrait.closest(".n2-mixed-group").css("display","none"),n.enabled("tablet","Landscape")||this.forms.global.tabletLandscape.closest(".n2-mixed-group").css("display","none"),n.enabled("mobile","Portrait")||this.forms.global.mobilePortrait.closest(".n2-mixed-group").css("display","none"),n.enabled("mobile","Landscape")||this.forms.global.mobileLandscape.closest(".n2-mixed-group").css("display","none"),this.forms.placement.absolute={parentid:t("#layerparentid"),parentalign:t("#layerparentalign"),parentvalign:t("#layerparentvalign"),left:t("#layerleft"),top:t("#layertop"),responsiveposition:t("#layerresponsive-position"),width:t("#layerwidth"),height:t("#layerheight"),responsivesize:t("#layerresponsive-size"),align:t("#layeralign"),valign:t("#layervalign")},this.forms.placement.normal={margin:t("#layernormal-margin"),height:t("#layernormal-height"),maxwidth:t("#layernormal-maxwidth"),selfalign:t("#layernormal-selfalign")},this.forms.component.content={maxwidth:t("#layercontent-maxwidth"),selfalign:t("#layercontent-selfalign"),padding:t("#layercontent-padding"),inneralign:t("#layercontent-inneralign"),verticalalign:t("#layercontent-verticalalign"),bgcolor:t("#layercontent-background-color"),bgimage:t("#layercontent-background-image"),bgimagex:t("#layercontent-background-focus-x"),bgimagey:t("#layercontent-background-focus-y"),bgimageparallax:t("#layercontent-background-parallax"),bgcolorgradient:t("#layercontent-background-gradient"),bgcolorgradientend:t("#layercontent-background-color-end"),opened:t("#layercontent-opened")},this.forms.component.row={padding:t("#layerrow-padding"),gutter:t("#layerrow-gutter"),fullwidth:t("#layerrow-fullwidth"),stretch:t("#layerrow-stretch"),wrapafter:t("#layerrow-wrap-after"),inneralign:t("#layerrow-inneralign"),bgimage:t("#layerrow-background-image"),bgimagex:t("#layerrow-background-focus-x"),bgimagey:t("#layerrow-background-focus-y"),bgimageparallax:t("#layerrow-background-parallax"),bgcolor:t("#layerrow-background-color"),bgcolorgradient:t("#layerrow-background-gradient"),bgcolorgradientend:t("#layerrow-background-color-end"),borderradius:t("#layerrow-border-radius"),boxshadow:t("#layerrow-boxshadow"),opened:t("#layerrow-opened")},this.forms.component.col={maxwidth:t("#layercol-maxwidth"),padding:t("#layercol-padding"),inneralign:t("#layercol-inneralign"),verticalalign:t("#layercol-verticalalign"),bgcolor:t("#layercol-background-color"),bgimage:t("#layercol-background-image"),bgimagex:t("#layercol-background-focus-x"),bgimagey:t("#layercol-background-focus-y"),bgimageparallax:t("#layercol-background-parallax"),bgcolorgradient:t("#layercol-background-gradient"),bgcolorgradientend:t("#layercol-background-color-end"),borderradius:t("#layercol-border-radius"),boxshadow:t("#layercol-boxshadow"),borderwidth:t("#layercol-border-width"),borderstyle:t("#layercol-border-style"),bordercolor:t("#layercol-border-color"),opened:t("#layercol-opened"),colwidth:t("#layercol-colwidth"),order:t("#layercol-order")}}return r.prototype.changeActiveComponent=function(e,i,n,r){if(this.currentLayer=e,this.componentType!=i){switch(t("html").attr("data-component",i),i){case"content":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["content","animations","position"]);break;case"layer":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["item","style","animations","position"]);break;case"group":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["group","animations"]);break;case"row":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["row","animations","position"]);break;case"col":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["column","animations","position"])}this.componentType=i}this.changeActiveComponentPlacement(n),this.syncFields(r)},r.prototype.changeActiveComponentPlacement=function(e,i){this.placementType!=e&&(t("html").attr("data-placement",e),this.placementType=e),this.syncFields(i)},r.prototype.syncFields=function(e){if("object"==typeof e){this.currentForm=t.extend({},this.forms.global,this.forms.component[this.componentType],this.forms.placement[this.placementType]);for(var i in e)typeof e[i]!==n?this.updateField(i,e[i]):console.error("Value is undefined for: "+i);for(var r in this.currentForm)this.currentForm[r].off(".layeroptions").on("outsideChange.layeroptions",t.proxy(this.activeComponentPropertyChanged,this,r))}},r.prototype.onUpdateField=function(t,e,i){t.target==this.currentLayer&&this.updateField(e,i)},r.prototype.updateField=function(t,e){if("function"==typeof this.currentLayer["formSet"+t])this.currentLayer["formSet"+t](this,e);else if(this.currentForm[t]!==n){var i=this.currentForm[t].data("field");i!==n&&i.insideChange(e)}else console.error("field not available: "+t+":"+e,this.currentForm)},r.prototype.activeComponentPropertyChanged=function(t,e){if(this.currentLayer&&!this.currentLayer.isDeleted){var i=this.currentForm[t].val();this.currentLayer.setProperty(t,i,"manager")}else{var n=this.currentForm[t].data("field");"undefined"!=typeof n&&null!==n&&n.insideChange("")}},r.prototype.startFeatures=function(){this.layerFeatures=new e.LayerFeatures(this.forms.placement.absolute,this.canvasManager);var i=t("#n2-ss-layer-adaptive-font").on("click",t.proxy(function(){this.currentForm.adaptivefont.data("field").onoff.trigger("click")},this));this.forms.global.adaptivefont.on("nextendChange",t.proxy(function(){1==this.currentForm.adaptivefont.val()?i.addClass("n2-active"):i.removeClass("n2-active")},this)),new N2Classes.FormElementNumber("n2-ss-layer-font-size",-Number.MAX_VALUE,Number.MAX_VALUE),new N2Classes.FormElementAutocompleteSlider("n2-ss-layer-font-size",{min:50,max:300,step:5});var n=t("#n2-ss-layer-font-size").on("outsideChange",t.proxy(function(){var t=parseInt(n.val());this.currentForm.fontsize.val(t).trigger("change")},this));this.forms.global.fontsize.on("nextendChange",t.proxy(function(){n.data("field").insideChange(this.forms.global.fontsize.val())},this))},r}),N2Require("BgAnimationManager",[],[],function(t,e,i){function n(){this.type="backgroundanimation",NextendVisualManagerMultipleSelection.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(NextendVisualManagerMultipleSelection.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualManagerMultipleSelection.prototype.loadDefaults.apply(this,arguments),this.type="backgroundanimation",this.labels={visual:"Background animation",visuals:"Background animations"}},n.prototype.initController=function(){return new e.BgAnimationEditor},n.prototype.createVisual=function(t,e){return new NextendVisualWithSetRowMultipleSelection(t,e,this)},n}),N2Require("BgAnimationEditor",[],[],function(t,e,i){function n(){this.parameters={shiftedBackgroundAnimation:0},NextendVisualEditorController.prototype.constructor.call(this,!1),this.bgAnimationElement=t(".n2-bg-animation"),this.slides=t(".n2-bg-animation-slide"),this.bgImages=t(".n2-bg-animation-slide-bg"),NextendTween.set(this.bgImages,{rotationZ:1e-4}),this.directionTab=new N2Classes.FormElementRadio("n2-background-animation-preview-tabs",["0","1"]),this.directionTab.element.on("nextendChange.n2-editor",t.proxy(this.directionTabChanged,this)),nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d||nextend.notificationCenter.error("Background animations are not available in your browser. It works if the <i>transform-style: preserve-3d</i> feature available. ")}return n.prototype=Object.create(NextendVisualEditorController.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualEditorController.prototype.loadDefaults.call(this),this.type="backgroundanimation",this.current=0,this.animationProperties=!1,this.direction=0},n.prototype.get=function(){return null},n.prototype.load=function(t,e,i,n){this.lightbox.addClass("n2-editor-loaded")},n.prototype.setTabs=function(t){},n.prototype.directionTabChanged=function(){this.direction=parseInt(this.directionTab.element.val())},n.prototype.start=function(){this.animationProperties&&(this.timeline?this.timeline.play():this.next())},n.prototype.pause=function(){this.timeline&&this.timeline.pause()},n.prototype.next=function(){this.timeline=new NextendTimeline({paused:!0,onComplete:t.proxy(this.ended,this)});var e=this.bgImages.eq(this.current),i=this.bgImages.eq(1-this.current);nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d?(this.currentAnimation=new N2Classes["SmartSliderBackgroundAnimation"+this.animationProperties.type](this,e,i,this.animationProperties,1,this.direction),this.slides.eq(this.current).css("zIndex",2),this.slides.eq(1-this.current).css("zIndex",3),this.timeline.to(this.slides.eq(this.current),.5,{opacity:0},this.currentAnimation.getExtraDelay()),this.timeline.to(this.slides.eq(1-this.current),.5,{opacity:1},this.currentAnimation.getExtraDelay()),this.currentAnimation.postSetup()):(this.timeline.to(this.slides.eq(this.current),1.5,{opacity:0},0),this.timeline.to(this.slides.eq(1-this.current),1.5,{opacity:1},0)),this.current=1-this.current,this.timeline.play()},n.prototype.ended=function(){this.currentAnimation&&this.currentAnimation.ended(),this.next()},n.prototype.setAnimationProperties=function(t){var e=this.animationProperties;this.animationProperties=t,e||this.next()},n});
|
1 |
+
N2Require("ContextMenu",[],[],function(t,e,i){function n(e,i){this.isActive=!1,this.$el=e.data("nextendcontextmenu",this),this.parameters=t.extend({selector:!1,onShow:function(){}},i),this.$menu=t('<div class="n2-context-menu"></div>').on("mousedown",function(){nextend.context.setMouseDownArea("context-menu")}).appendTo("body"),this.parameters.selector?this.$el.on("contextmenu",this.parameters.selector,t.proxy(this.onShowContextMenu,this)):this.$el.on("contextmenu",t.proxy(this.onShowContextMenu,this))}return n.prototype.onShowContextMenu=function(e){e.preventDefault(),this.clearItems(),this.parameters.onShow.call(this,e,this),this.hasItems&&(e.stopPropagation(),this.isActive=!0,this.$menu.css({left:e.pageX,top:e.pageY}),t("html").on("mouseleave.nextendcontextmenu, click.nextendcontextmenu",t.proxy(this.onHide,this))),this.$menu.toggleClass("n2-active",this.hasItems)},n.prototype.onHide=function(){t("html").off(".nextendcontextmenu"),this.$menu.removeClass("n2-active"),this.isActive=!1},n.prototype.clearItems=function(){this.isActive&&this.onHide(),this.hasItems=!1,this.$menu.html("")},n.prototype.addItem=function(e,i,n){this.hasItems=!0,this.$menu.append(t('<div><i class="n2-i '+i+'"></i><span>'+e+"</span></div>").on("click",n))},t.fn.nextendContextMenu=function(e){return this.each(function(){new n(t(this),e)})},n}),N2Require("Zoom",[],[],function(t,e,i){function n(e){this.key="n2-ss-editor-device-lock-mode",this.devices={unknownUnknown:t("<div />")},this.responsives=[e],e.setOrientation("portrait"),e.parameters.onResizeEnabled=0,e.parameters.forceFull=0,e._getDevice=e._getDeviceZoom,this.lock=t("#n2-ss-lock").on("click",t.proxy(this.switchLock,this));var i=e.parameters.sliderWidthToDevice.desktopPortrait;this.container=e.containerElement.closest(".n2-ss-container-device").addBack(),this.container.width(i),this.containerWidth=i,this.initZoom();var n=t("#n2-ss-devices .n2-tr"),r=e.parameters.deviceModes;this.devices.desktopPortrait=t('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-desktop"></i></div>').prependTo(n),r.desktopLandscape?this.devices.desktopLandscape=t('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-desktop-landscape"></i></div>').prependTo(n):this.devices.desktopLandscape=this.devices.desktopPortrait,r.tabletPortrait?this.devices.tabletPortrait=t('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-tablet"></i></div>').prependTo(n):this.devices.tabletPortrait=this.devices.desktopPortrait,r.tabletLandscape?this.devices.tabletLandscape=t('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-tablet-landscape"></i></div>').prependTo(n):this.devices.tabletLandscape=this.devices.desktopLandscape,r.mobilePortrait?this.devices.mobilePortrait=t('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-mobile"></i></div>').prependTo(n):this.devices.mobilePortrait=this.devices.tabletPortrait,r.mobileLandscape?this.devices.mobileLandscape=t('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-mobile-landscape"></i></div>').prependTo(n):this.devices.mobileLandscape=this.devices.tabletLandscape,this.deviceOptions=t("#n2-ss-devices .n2-panel-option"),this.deviceOptions.each(t.proxy(function(e,i){t(i).on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"zoomDeviceClicked"),click:t.proxy(this.setDeviceMode,this)})},this)),e.sliderElement.on("SliderDeviceOrientation",t.proxy(this.onDeviceOrientationChange,this))}var r=null;return nextend.ssBeforeResponsive=function(){r=new n(this),nextend.ssBeforeResponsive=function(){r.add(this)}},n.prototype.add=function(t){this.responsives.push(t),t.setOrientation("portrait"),t.parameters.onResizeEnabled=0,t.parameters.forceFull=0,t._getDevice=t._getDeviceZoom},n.prototype.onDeviceOrientationChange=function(e,i){t("#n2-admin").removeClass("n2-ss-mode-"+i.lastDevice+i.lastOrientation).addClass("n2-ss-mode-"+i.device+i.orientation),this.devices[i.lastDevice+i.lastOrientation].removeClass("n2-active"),this.devices[i.device+i.orientation].addClass("n2-active")},n.prototype.setDeviceMode=function(e){var i=t(e.currentTarget);if((e.ctrlKey||e.metaKey)&&nextend.smartSlider.canvasManager){var n=i.data("orientation");nextend.smartSlider.canvasManager.copyOrResetMode(i.data("device")+n[0].toUpperCase()+n.substr(1))}else for(var r=0;r<this.responsives.length;r++)this.responsives[r].setOrientation(i.data("orientation")),this.responsives[r].setMode(i.data("device"),this.responsives[r])},n.prototype.switchLock=function(e){e.preventDefault(),this.lock.toggleClass("n2-active"),this.lock.hasClass("n2-active")?(this.setZoomSyncMode(),this.zoomChange(e,this.zoom.slider("value"),"sync",!1),t.jStorage.set(this.key,"sync")):(this.setZoomFixMode(),t.jStorage.set(this.key,"fix"))},n.prototype.initZoom=function(){var e=t("#n2-ss-slider-zoom");e.length>0&&("undefined"!=typeof e[0].slide&&(e[0].slide=null),this.zoom=e.removeAttr("slide").prop("slide",!1).slider({range:"min",step:1,value:1,min:0,max:102}),this.responsives[0].sliderElement.on("SliderResize",t.proxy(this.sliderResize,this)),"fix"==t.jStorage.get(this.key,"sync")?this.setZoomFixMode():(this.setZoomSyncMode(),this.lock.addClass("n2-active")))},n.prototype.sliderResize=function(t,e){this.setZoom()},n.prototype.setZoomFixMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this)})},n.prototype.setZoomSyncMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this)})},n.prototype.zoomChangeFixMode=function(t,e){this.zoomChange(t,e.value,"fix",e)},n.prototype.zoomChangeSyncMode=function(t,e){this.zoomChange(t,e.value,"sync",e)},n.prototype.zoomChange=function(t,e,n,r){var s;if(t.originalEvent!==i){var o=1;50>e?o=nextend.smallestZoom/this.containerWidth+Math.max(e/50,0)*(1-nextend.smallestZoom/this.containerWidth):e>52&&(o=1+(e-52)/50),s=parseInt(o*this.containerWidth),this.container.width(s);for(var a=1;a<this.responsives.length;a++)this.responsives[a].containerElement.width(s);for(var a=0;a<this.responsives.length;a++)switch(n){case"sync":this.responsives[a].doResize(t);break;default:this.responsives[a].doResize(t,!0)}}else s=this.container.last().width(),this.container.width(s);r&&(r.handle.innerHTML=s+"px")},n.prototype.setZoom=function(){var t=this.responsives[0].containerElement.width()/this.containerWidth,e=50;1>t?e=(t-nextend.smallestZoom/this.containerWidth)/(1-nextend.smallestZoom/this.containerWidth)*50:t>1&&(e=50*(t-1)+52);this.zoom.slider("value");this.zoom.slider("value",e)},n}),N2Require("CreateSlider",[],[],function(t,e,i){function n(e,i){this.addToGroupModal=null,this.groupID=e,this.ajaxUrl=i,t(".n2-ss-create-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showModal()},this)),this.notificationStack=new NextendNotificationCenterStackModal(t("body")),t(".n2-ss-add-sample-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showDemoSliders()},this)),"createslider"==window.location.hash.substring(1)&&this.showModal()}return n.prototype.showModal=function(){if(!this.createSliderModal){var e=this,i=this.ajaxUrl,n=[];n.push({key:"default",name:n2_("Default"),image:"$ss$/admin/images/sliderpresets/default.png"}),n.push({key:"fullwidth",name:n2_("Full width"),image:"$ss$/admin/images/sliderpresets/fullwidth.png"}),n.push({key:"thumbnailhorizontal",name:n2_("Thumbnail - horizontal"),image:"$ss$/admin/images/sliderpresets/thumbnailhorizontal.png"});var r=[550,520];this.createSliderModal=new NextendModal({zero:{size:r,title:n2_("Create Slider"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Create")+"</a>"],fn:{show:function(){var r=this.controls.find(".n2-button-green"),s=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),r.trigger("click")});s.append(this.createInput(n2_("Slider name"),"createslidertitle","width: 240px;")),s.append(this.createInputUnit(n2_("Width"),"createsliderwidth","px","width: 30px;")),s.append(this.createInputUnit(n2_("Height"),"createsliderheight","px","width: 30px;")),new N2Classes.FormElementAutocompleteSimple("createsliderwidth",["1920","1200","1000","800","600","400"]),new N2Classes.FormElementAutocompleteSimple("createsliderheight",["800","600","500","400","300","200"]);var o=t("#createslidertitle").val(n2_("Slider")).focus(),a=t("#createsliderwidth").val(1200),l=t("#createsliderheight").val(500);a.parent().addClass("n2-form-element-autocomplete ui-front"),l.parent().addClass("n2-form-element-autocomplete ui-front"),this.createHeading(n2_("Preset")).appendTo(this.content);var h=100,d=this.createImageRadio(n).css("height",h).appendTo(this.content),c=d.find("input");d.css("overflow","hidden"),this.createHeading(n2_("Import Sample Sliders")).appendTo(this.content),t('<div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample1.png")+'\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample2.png")+'\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample3.png")+"')\"></div>").on("click",t.proxy(function(){this.hide(),e.showDemoSliders()},this)).appendTo(this.content),r.on("click",t.proxy(function(){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(i,{nextendaction:"create"}),data:{groupID:e.groupID,sliderTitle:o.val(),sliderSizeWidth:a.val(),sliderSizeHeight:l.val(),preset:c.val()},dataType:"json"}).done(t.proxy(function(t){NextendAjaxHelper.startLoading()},this))},this))}}}})}this.createSliderModal.show()},n.prototype.showDemoSliders=function(){var e=this;t("body").css("overflow","hidden");var i=0,n=t('<iframe src="//smartslider3.com/demo-import/?pro='+i+"&version="+N2SS3VERSION+"&utm_campaign="+N2SS3C+"&utm_source=import-slider-frame&utm_medium=smartslider-"+N2PLATFORM+"-"+(i?"pro":"free")+'" frameborder="0"></iframe>').css({position:"fixed",zIndex:1e5,left:0,top:0,width:"100%",height:"100%"}).appendTo("body"),r=function(){t("body").css("overflow",""),n.remove(),window.removeEventListener("message",o,!1),e.notificationStack.popStack()},s=function(t){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(e.ajaxUrl,{nextendaction:"importDemo"}),data:{groupID:e.groupID,key:Base64.encode(t.replace(/^(http(s)?:)?\/\//,"//"))},dataType:"json"}).fail(function(){})},o=function(t){if("http://smartslider3.com"===t.origin||"https://smartslider3.com"===t.origin){var e=t.data;switch(e.key){case"importSlider":return void("function"==typeof nextend.joinCommunity?nextend.joinCommunity(function(){s(e.data.href)}):s(e.data.href));case"closeWindow":r()}}};this.notificationStack.enableStack(),NextendEsc.add(t.proxy(function(){return r(),!0},this)),window.addEventListener("message",o,!1)},n}),N2Require("ManageSliders",[],[],function(t,e,i){function n(i,n){this.preventSort=!1,this.groupID=i,this.ajaxUrl=n,this.sliders=[],this.sliderPanel=t("#n2-ss-slider-container"),this.orderBy="ordering"==this.sliderPanel.data("orderby"),this.slidersContainer=this.sliderPanel.find(".n2-ss-sliders-container");for(var r=this.slidersContainer.find(".n2-ss-box-slider"),s=0;s<r.length;s++)this.sliders.push(new e.Slider(this,r.eq(s)));this.changed(),this.initMenu(),this.initOrderable(),this.create=new e.CreateSlider(i,n),this.initBulk()}return n.prototype.changed=function(){t("html").attr("data-sliders",this.sliders.length)},n.prototype.initSliders=function(){for(var e=(this.sliders.length,this.slidersContainer.find(".n2-ss-box-slider")),i=[],n=0;n<e.length;n++){var r=e.eq(n).data("slider");i.push(r)}this.sliders=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidersChanged")},n.prototype.initOrderable=function(){this.orderBy&&this.slidersContainer.sortable({helper:"clone",forcePlaceholderSize:!1,tolerance:"pointer",connectWith:".n2-ss-box-slider-group",items:".n2-ss-box-slider",start:function(t,e){e.item.show()},stop:t.proxy(this.saveOrder,this),placeholder:"n2-box-sortable-placeholder",distance:10})},n.prototype.saveOrder=function(e){if(this.preventSort)return this.slidersContainer.sortable("cancel"),void(this.preventSort=!1);for(var i=this.slidersContainer.find(".n2-ss-box-slider"),n=[],r=[],s=[],o=0;o<i.length;o++){var a=i.eq(o).data("slider");n.push(a),r.push(a.getId())}for(var o=0;o<this.sliders.length;o++)s.push(this.sliders[o].getId());if(JSON.stringify(s)!=JSON.stringify(r)){t(window).triggerHandler("SmartSliderSidebarSlidersOrderChanged");var l={nextendcontroller:"sliders",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{groupID:this.groupID,sliderorder:r,isReversed:"DESC"==this.sliderPanel.data("orderbydirection")?1:0}}),this.sliders=n}},n.prototype.initMenu=function(){this.slider=null,this.menu=t("#n2-ss-slider-menu").detach().addClass("n2-inited"),this.menuActions={duplicate:this.menu.find(".n2-ss-duplicate").on("click",t.proxy(function(t){this.slider.duplicate(t)},this)),"delete":this.menu.find(".n2-ss-delete").on("click",t.proxy(function(t){this.slider["delete"](t)},this)),preview:this.menu.find(".n2-ss-preview").on("click",t.proxy(function(t){this.slider.preview(t)},this))},this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},n.prototype.showMenu=function(t){this.slider=t,this.menu.appendTo(t.box)},n.prototype.hideMenu=function(){this.menu.hasClass("n2-active")&&this.menu.removeClass("n2-active").off("mouseleave"),this.menu.detach()},n.prototype.deleteSliders=function(e,i){this.hideMenu();var n=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slider-delete",n,t.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"delete"}),type:"POST",data:{sliders:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSliders(),this.leaveBulk()},this))},this))},n.prototype.duplicateSliders=function(e,i){for(var n=0;n<this.sliders.length;n++)this.sliders[n].selected&&this.sliders[n].duplicate(t.Event("click",{currentTarget:null}))},n.prototype.exportSliders=function(e,i){window.location.href=NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"exportAll"})+"&"+t.param({sliders:e,currentGroupID:this.groupID})},n.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.deSelect()})},this));t(".n2-bulk-actions").find("a").on("click",t.proxy(function(e){switch(e.preventDefault(),t(e.currentTarget).data("action")){case"duplicate":this.bulkAction("duplicateSliders",!1);break;case"delete":this.bulkAction("deleteSliders",!1);break;case"export":this.bulkAction("exportSliders",!1);break;case"addToGroup":this.bulkAction("addToGroup",!0)}},this))},n.prototype.addSelection=function(t){0==this.selection.length&&this.enterBulk(),this.selection.push(t)},n.prototype.removeSelection=function(e){this.selection.splice(t.inArray(e,this.selection),1),0==this.selection.length&&this.leaveBulk()},n.prototype.bulkSelect=function(t){for(var e=0;e<this.sliders.length;e++)t(this.sliders[e])},n.prototype.bulkAction=function(t,e){var i=[],n=[];this.bulkSelect(function(t){!t.selected||e&&t.isGroup||(i.push(t),n.push(t.getId()))}),n.length?(this[t](n,i),this.leaveBulk()):e?nextend.notificationCenter.notice("Please select one or more sliders for the action!"):nextend.notificationCenter.notice("Please select one or more sliders or groups for the action!")},n.prototype.enterBulk=function(){this.isBulkSelection||(this.isBulkSelection=!0,this.orderBy&&this.slidersContainer.sortable("option","disabled",!0),t("#n2-admin").addClass("n2-ss-has-box-selection"))},n.prototype.leaveBulk=function(){if(this.isBulkSelection){this.orderBy&&this.slidersContainer.sortable("option","disabled",!1),t("#n2-admin").removeClass("n2-ss-has-box-selection");for(var e=0;e<this.sliders.length;e++)this.sliders[e].deSelect();this.selection=[],this.isBulkSelection=!1}},n}),N2Require("Slider",[],[],function(t,e,i){function n(e,i){this.selected=!1,this.manager=e,this.box=i.data("slider",this).addClass("n2-clickable"),this.isGroup=this.box.hasClass("n2-ss-box-slider-group"),this.box.on("mouseenter",t.proxy(function(){this.manager.showMenu(this)},this)).on("mouseleave",t.proxy(function(){this.manager.hideMenu()},this)).on("click.n2-slider",t.proxy(this.goToEdit,this)),this.box.find(".n2-ss-box-select").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.invertSelection()},this))}return n.prototype.getId=function(){return this.box.data("sliderid")},n.prototype.goToEdit=function(t,e){var i=this.box.data("editurl");"undefined"!=typeof e&&e?window.open(i,"_blank"):window.location=i},n.prototype.preview=function(t){t.stopPropagation(),t.preventDefault(),window.open(NextendAjaxHelper.makeFallbackUrl(this.box.data("editurl"),{nextendcontroller:"preview",nextendaction:"index"}),"_blank")},n.prototype.duplicate=function(e){e.stopPropagation(),e.preventDefault();var i=t.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendcontroller:"slider",nextendaction:"duplicate"})}).done(t.proxy(function(e){var r=t(e.data).insertAfter(this.box),s=new n(this.manager,r);this.manager.initSliders(),i.resolve(s)},this)),i},n.prototype["delete"]=function(t){t.stopPropagation(),t.preventDefault(),this.manager.deleteSliders([this.getId()],[this])},n.prototype.deleted=function(){this.box.remove()},n.prototype.invertSelection=function(t){t&&t.preventDefault(),this.selected?this.deSelect():this.select()},n.prototype.select=function(){this.selected||(this.selected=!0,this.box.addClass("n2-selected"),this.manager.addSelection(this))},n.prototype.deSelect=function(){this.selected&&(this.selected=!1,this.box.removeClass("n2-selected"),this.manager.removeSelection(this))},n}),N2Require("FormElementAnimationManager",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.managerIdentifier=n,this.element.parent().on("click",t.proxy(this.show,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),this.name=this.element.siblings("input"),this.updateName(this.element.val()),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.show=function(e){e.preventDefault(),nextend[this.managerIdentifier].show(this.element.val(),t.proxy(this.save,this))},n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},n.prototype.save=function(t,e){this.val(e)},n.prototype.val=function(t){this.element.val(t),this.updateName(t),this.triggerOutsideChange()},n.prototype.insideChange=function(t){this.element.val(t),this.updateName(t),this.triggerInsideChange()},n.prototype.updateName=function(t){t=""==t?n2_("Disabled"):t.split("||").length>1?n2_("Multiple animations"):n2_("Single animation"),this.name.val(t)},n}),N2Require("FormElementBackground",["FormElement"],[],function(t,e,i){function n(i,n){this.value="",this.element=t("#"+i),this.$container=this.element.closest(".n2-form-tab"),this.panel=t("#"+i+"-panel"),this.setValue(n),this.options=this.panel.find(".n2-subform-image-option").on("click",t.proxy(this.selectOption,this)),this.active=this.getIndex(this.options.filter(".n2-active").get(0)),this.element.on("change",t.proxy(function(){this.insideChange(this.element.val())},this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.selectOption=function(e){var i=this.getIndex(e.currentTarget);if(i!=this.active){this.options.eq(i).addClass("n2-active"),this.options.eq(this.active).removeClass("n2-active"),this.active=i;var n=t(e.currentTarget).data("value");this.insideChange(n)}},n.prototype.setValue=function(t){this.$container.removeClass("n2-ss-background-type-"+this.value),this.value=t,this.$container.addClass("n2-ss-background-type-"+this.value)},n.prototype.insideChange=function(t){this.setValue(t),this.element.val(t),this.options.removeClass("n2-active"),this.options.filter('[data-value="'+t+'"]').addClass("n2-active"),this.triggerInsideChange()},n.prototype.getIndex=function(e){return t.inArray(e,this.options)},n}),N2Require("FormElementColumns",["FormElement"],[],function(t,e,i){function n(i){this.denominators={1:100,2:100,3:144,4:100,5:100,6:144},this.element=t("#"+i),e.FormElement.prototype.constructor.apply(this,arguments),this.$c=t("#"+i).parent(),this.$container=this.$c.find(".n2-ss-columns-element-container"),this.containerWidth=284,this.maxWidth=0,this.$container.sortable({axis:"x",tolerance:"pointer",items:".n2-ss-columns-element-column",helper:"clone",start:t.proxy(function(t,e){this.$container.addClass("n2-sortable-currently-sorted"),e.placeholder.css("width",e.item.width());var i=this.$container.find(".n2-ss-columns-element-column");e.item.data("index",i.index(e.item))},this),stop:t.proxy(function(t,e){var i=this.$container.find(".n2-ss-columns-element-column"),n=e.item.data("index"),r=i.index(e.item);n!=r&&(this.currentRow.moveCol(n,r),e.item.data("index",null)),this.makeResizable(),this.$container.removeClass("n2-sortable-currently-sorted")},this)}),this.$c.find(".n2-ss-columns-element-add-col").on({click:t.proxy(function(){this.currentRow.createCol()},this)})}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.getDenominator=function(t){return this.denominators[t]===i&&(this.denominators[t]=15*t),this.denominators[t]},n.prototype.setRow=function(t){this.currentRow=t,this.insideChange(t.getColumnsOrdered())},n.prototype.setValue=function(t){},n.prototype.insideChange=function(t){this.start(t)},n.prototype.activateColumn=function(t){var e=this.$container.find(".n2-ss-columns-element-column").index(t.currentTarget);this.currentRow.activateColumn(e,t)},n.prototype.start=function(e){this.percentages=[];for(var i=e.split("+"),n=0;n<i.length;n++)this.percentages.push(new Fraction(i[n]));this.refreshMaxWidth(),this.$container.empty();for(var n=0;n<this.percentages.length;n++)this.updateColumn(t('<div class="n2-ss-columns-element-column">').on("click",t.proxy(this.activateColumn,this)).appendTo(this.$container),this.percentages[n]);this.makeResizable()},n.prototype.refreshMaxWidth=function(){this.maxWidth=this.containerWidth-15*(this.percentages.length-1)},n.prototype.updateColumn=function(t,e){t.css("width",this.maxWidth*e.valueOf()+"px").html(Math.round(100*e.valueOf()*10)/10+"%")},n.prototype.makeResizable=function(){this.handles&&this.handles.remove(),this.$columns=this.$container.find(".n2-ss-columns-element-column"),t('<div class="n2-ss-columns-element-handle"><div class="n2-i n2-i-more"></div></div>').insertAfter(this.$columns.not(this.$columns.last())),this.handles=this.$container.find(".n2-ss-columns-element-handle").on("mousedown",t.proxy(this._resizeStart,this))},n.prototype._resizeStart=function(e){var i=this.handles.index(e.currentTarget),n=this.$container.offset().left+8;this.resizeContext={index:i,cLeft:n,$currentCol:this.$columns.eq(i),$nextCol:this.$columns.eq(i+1),startX:Math.max(0,Math.min(e.clientX-n,this.containerWidth))},this._resizeMove(e),t("html").off(".resizecol").on({"mousemove.resizecol":t.proxy(this._resizeMove,this),"mouseup.resizecol mouseleave.resizecol":t.proxy(this._resizeStop,this)})},n.prototype._resizeMove=function(e){e.preventDefault();var i=Math.max(0,Math.min(e.clientX-this.resizeContext.cLeft,this.containerWidth)),n=this.getDenominator(this.percentages.length),r=new Fraction(Math.round((i-this.resizeContext.startX)/(this.maxWidth/n)),n);r.compare(this.percentages[this.resizeContext.index].clone().mul(-1))<0&&(r=this.percentages[this.resizeContext.index].clone().mul(-1)),r.compare(this.percentages[this.resizeContext.index+1])>0&&(r=this.percentages[this.resizeContext.index+1].clone());var s=this.percentages[this.resizeContext.index].add(r),o=this.percentages[this.resizeContext.index+1].sub(r);this.updateColumn(this.resizeContext.$currentCol,s),this.updateColumn(this.resizeContext.$nextCol,o);var a=t.extend([],this.percentages);return a[this.resizeContext.index]=s,a[this.resizeContext.index+1]=o,this.onColumnWidthChange(a),[s,o]},n.prototype._resizeStop=function(e){var i=this._resizeMove(e);this.percentages[this.resizeContext.index]=i[0],this.percentages[this.resizeContext.index+1]=i[1],t("html").off(".resizecol"),delete this.resizeContext,this.currentRow.setRealColsWidth(this.percentages)},n.prototype.onColumnWidthChange=function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].valueOf());this.currentRow.updateColumnWidth(e)},n}),function(t){"use strict";function e(t,e){return isNaN(t=parseInt(t,10))&&i(),t*e}function i(){throw"Invalid Param"}function n(t,e){return this instanceof n?(o(t,e),t=n.REDUCE?d(s.d,s.n):1,this.s=s.s,this.n=s.n/t,void(this.d=s.d/t)):new n(t,e)}var r=2e3,s={s:1,n:0,d:1},o=function(t,n){var r,o=0,a=1,l=1,h=0,d=0,c=0,p=1,u=1,y=0,g=1,f=1,v=1,m=1e7;if(void 0===t||null===t);else if(void 0!==n)o=t,a=n,l=o*a;else switch(typeof t){case"object":"d"in t&&"n"in t?(o=t.n,a=t.d,"s"in t&&(o*=t.s)):0 in t?(o=t[0],1 in t&&(a=t[1])):i(),l=o*a;break;case"number":if(0>t&&(l=t,t=-t),t%1===0)o=t;else if(t>0){for(t>=1&&(u=Math.pow(10,Math.floor(1+Math.log(t)/Math.LN10)),t/=u);m>=g&&m>=v;){if(r=(y+f)/(g+v),t===r){m>=g+v?(o=y+f,a=g+v):v>g?(o=f,a=v):(o=y,a=g);break}t>r?(y+=f,g+=v):(f+=y,v+=g),g>m?(o=f,a=v):(o=y,a=g)}o*=u}else(isNaN(t)||isNaN(n))&&(a=o=NaN);break;case"string":if(g=t.match(/\d+|./g),"-"===g[y]?(l=-1,y++):"+"===g[y]&&y++,g.length===y+1?d=e(g[y++],l):"."===g[y+1]||"."===g[y]?("."!==g[y]&&(h=e(g[y++],l)),y++,(y+1===g.length||"("===g[y+1]&&")"===g[y+3]||"'"===g[y+1]&&"'"===g[y+3])&&(d=e(g[y],l),p=Math.pow(10,g[y].length),y++),("("===g[y]&&")"===g[y+2]||"'"===g[y]&&"'"===g[y+2])&&(c=e(g[y+1],l),u=Math.pow(10,g[y+1].length)-1,y+=3)):"/"===g[y+1]||":"===g[y+1]?(d=e(g[y],l),p=e(g[y+2],1),y+=3):"/"===g[y+3]&&" "===g[y+1]&&(h=e(g[y],l),d=e(g[y+2],l),p=e(g[y+4],1),y+=5),g.length<=y){a=p*u,l=o=c+a*h+u*d;break}default:i()}if(0===a)throw"DIV/0";s.s=0>l?-1:1,s.n=Math.abs(o),s.d=Math.abs(a)},a=function(t,e,i){for(var n=1;e>0;t=t*t%i,e>>=1)1&e&&(n=n*t%i);return n},l=function(t,e){for(;e%2===0;e/=2);for(;e%5===0;e/=5);if(1===e)return 0;for(var i=10%e,n=1;1!==i;n++)if(i=10*i%e,n>r)return 0;return n},h=function(t,e,i){for(var n=1,r=a(10,i,e),s=0;300>s;s++){if(n===r)return s;n=10*n%e,r=10*r%e}return 0},d=function(t,e){if(!t)return e;if(!e)return t;for(;;){if(t%=e,!t)return e;if(e%=t,!e)return t}};n.REDUCE=1,n.prototype={s:1,n:0,d:1,abs:function(){return new n(this.n,this.d)},neg:function(){return new n(-this.s*this.n,this.d)},add:function(t,e){return o(t,e),new n(this.s*this.n*s.d+s.s*this.d*s.n,this.d*s.d)},sub:function(t,e){return o(t,e),new n(this.s*this.n*s.d-s.s*this.d*s.n,this.d*s.d)},mul:function(t,e){return o(t,e),new n(this.s*s.s*this.n*s.n,this.d*s.d)},div:function(t,e){return o(t,e),new n(this.s*s.s*this.n*s.d,this.d*s.n)},clone:function(){return new n(this)},mod:function(t,e){return isNaN(this.n)||isNaN(this.d)?new n(NaN):void 0===t?new n(this.s*this.n%this.d,1):(o(t,e),0===s.n&&0===this.d&&n(0,0),new n(this.s*s.d*this.n%(s.n*this.d),s.d*this.d))},gcd:function(t,e){return o(t,e),new n(d(s.n,this.n),s.d*this.d/d(s.d,this.d))},lcm:function(t,e){return o(t,e),0===s.n&&0===this.n?new n:new n(s.n*this.n/d(s.n,this.n),d(s.d,this.d))},ceil:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.ceil(t*this.s*this.n/this.d),t)},floor:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.floor(t*this.s*this.n/this.d),t)},round:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.round(t*this.s*this.n/this.d),t)},inverse:function(){return new n(this.s*this.d,this.n)},pow:function(t){return 0>t?new n(Math.pow(this.s*this.d,-t),Math.pow(this.n,-t)):new n(Math.pow(this.s*this.n,t),Math.pow(this.d,t))},equals:function(t,e){return o(t,e),this.s*this.n*s.d===s.s*s.n*this.d},compare:function(t,e){o(t,e);var i=this.s*this.n*s.d-s.s*s.n*this.d;return(i>0)-(0>i)},divisible:function(t,e){return o(t,e),!(!(s.n*this.d)||this.n*s.d%(s.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(t){var e,i="",n=this.n,r=this.d;return this.s<0&&(i+="-"),1===r?i+=n:(t&&(e=Math.floor(n/r))>0&&(i+=e,i+=" ",n%=r),i+=n,i+="/",i+=r),i},toLatex:function(t){var e,i="",n=this.n,r=this.d;return this.s<0&&(i+="-"),1===r?i+=n:(t&&(e=Math.floor(n/r))>0&&(i+=e,n%=r),i+="\\frac{",i+=n,i+="}{",i+=r,i+="}"),i},toContinued:function(){var t,e=this.n,i=this.d,n=[];do n.push(Math.floor(e/i)),t=e%i,e=i,i=t;while(1!==e);return n},toString:function(){var t,e=this.n,i=this.d;if(isNaN(e)||isNaN(i))return"NaN";n.REDUCE||(t=d(e,i),e/=t,i/=t);for(var r=String(e).split(""),s=0,o=[~this.s?"":"-","",""],a="",c=l(e,i),p=h(e,i,c),u=-1,y=1,g=15+c+p+r.length,f=0;g>f;f++,s*=10){if(f<r.length?s+=Number(r[f]):(y=2,u++),c>0)if(u===p)o[y]+=a+"(",a="";else if(u===c+p){o[y]+=a+")";break}s>=i?(o[y]+=a+(s/i|0),a="",s%=i):y>1?a+="0":o[y]&&(o[y]+="0")}return o[0]+=o[1]||"0",o[2]?o[0]+"."+o[2]:o[0]}},t.Fraction=n}(this),N2Require("FormElementSliderType",[],[],function(t,e,i){function n(e){this.element=t("#"+e),this.setAttribute(),this.element.on("nextendChange",t.proxy(this.setAttribute,this))}return n.prototype.setAttribute=function(){t("#n2-admin").attr("data-slider-type",this.element.val()),"block"==this.element.val()&&t(".n2-fm-shadow").trigger("click")},n}),N2Require("FormElementSliderWidgetArea",["FormElement"],[],function(t,e,i){function n(i){this.element=t("#"+i),this.area=t("#"+i+"_area"),this.areas=this.area.find(".n2-area"),this.areas.on("click",t.proxy(this.chooseArea,this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.chooseArea=function(e){var i=parseInt(t(e.target).data("area"));this.element.val(i),this.setSelected(i),this.triggerOutsideChange()},n.prototype.insideChange=function(t){t=parseInt(t),this.element.val(t),this.setSelected(t),this.triggerInsideChange()},n.prototype.setSelected=function(t){this.areas.removeClass("n2-active"),this.areas.eq(t-1).addClass("n2-active")},n}),N2Require("FormElementWidgetPosition",[],[],function(t,e,i){function n(e){this.element=t("#"+e+"-mode"),this.container=this.element.closest(".n2-form-element-mixed"),this.tabs=this.container.find("> .n2-mixed-group"),this.element.on("nextendChange",t.proxy(this.onChange,this)),this.onChange()}return n.prototype.onChange=function(){var t=this.element.val();"advanced"==t?(this.tabs.eq(2).css("display",""),this.tabs.eq(1).css("display","none")):(this.tabs.eq(1).css("display",""),this.tabs.eq(2).css("display","none"));
|
2 |
+
},n}),N2Require("SmartSliderGeneratorRecords",[],[],function(t,e,i){function n(e){this.ajaxUrl=e,t("#generatorrecord-viewer").on("click",t.proxy(this.showRecords,this))}return n.prototype.showRecords=function(e){e.preventDefault(),NextendAjaxHelper.ajax({type:"POST",url:this.ajaxUrl,data:t("#smartslider-form").serialize(),dataType:"json"}).done(function(t){var e=new NextendModal({zero:{size:[1300,700],title:"Records",content:t.data.html}},!0);e.content.css("overflow","auto")}).error(function(t){if(200==t.status){var e=new NextendModal({zero:{size:[1300,700],title:"Response",content:t.responseText}},!0);e.content.css("overflow","auto")}})},n}),N2Require("QuickSlides",[],[],function(t,e,i){function n(e){var i=t("#n2-quick-slides-edit");i.length<1||(this.ajaxUrl=e,i.on("click",t.proxy(this.openEdit,this)))}return n.prototype.openEdit=function(e){e.preventDefault();var i=t("#n2-ss-slides .n2-box-slide"),n=this;this.modal=new NextendModal({zero:{fit:!0,fitX:!1,overflow:"auto",size:[1200,700],title:n2_("Quick Edit - Slides"),back:!1,close:!0,content:'<form class="n2-form"><table></table></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Save")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button-green"),r=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}),s=r.find("table");i.each(t.proxy(function(e,i){var r=t(i),o=t("<tr />").appendTo(s),a=r.data("slideid");o.append(t("<td />").append('<img src="'+r.data("image")+'" style="width:100px;"/>')),o.append(t("<td />").append(n.createInput("Name","title-"+a,r.data("title"),"width: 240px;"))),o.append(t("<td />").append(n.createTextarea("Description","description-"+a,r.data("description"),"width: 330px;height:24px;")));var l=r.data("link").split("|*|");o.append(t("<td />").append(n.createLink("Link","link-"+a,l[0],"width: 180px;"))),o.append(t("<td />").append(n.createTarget("Target","target-"+a,l.length>1?l[1]:"_self",""))),new N2Classes.FormElementUrl("link-"+a,nextend.NextendElementUrlParams)},this)),e.on("click",t.proxy(function(e){var r={};i.each(t.proxy(function(e,i){var n=t(i),s=n.data("slideid"),o=t("#title-"+s).val(),a=t("#description-"+s).val(),l=t("#link-"+s).val()+"|*|"+t("#target-"+s).val();o==n.data("title")&&a==n.data("description")&&l==n.data("link")||(r[s]={name:o,description:a,link:l})},this)),jQuery.isEmptyObject(r)?this.hide(e):(this.hide(e),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(n.ajaxUrl),data:{changed:Base64.encode(JSON.stringify(r))},dataType:"json"}).done(t.proxy(function(e){var i=e.data;for(var n in i){var r=t('.n2-box-slide[data-slideid="'+n+'"]');r.find(".n2-box-placeholder a.n2-h4").html(i[n].title),r.attr("data-title",i[n].rawTitle),r.data("title",i[n].rawTitle),r.attr("data-description",i[n].rawDescription),r.data("description",i[n].rawDescription),r.attr("data-link",i[n].rawLink),r.data("link",i[n].rawLink)}},this)))},this))}}}}),this.modal.setCustomClass("n2-ss-quick-slides-edit-modal"),this.modal.show()},n.prototype.createInput=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+r+'"></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTextarea=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="'+i+'" class="n2-h5" autocomplete="off" style="resize:y;'+r+'"></textarea></div></div></div></div>');return s.find("textarea").val(n),s},n.prototype.createLink=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+r+'"><a href="#" class="n2-form-element-clear"><i class="n2-i n2-it n2-i-empty n2-i-grey-opacity"></i></a><a id="'+i+'_button" class="n2-form-element-button n2-h5 n2-uc" href="#">Link</a></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTarget=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select id="'+i+'" autocomplete="off" style="'+r+'"><option value="_self">Self</option><option value="_blank">Blank</option></select</div></div></div></div>');return s.find("select").val(n),s},n}),N2Require("Slide",[],[],function(t,e,i){function n(e,i){this.selected=!1,this.manager=e,this.box=i.data("slide",this).addClass("n2-clickable"),this.box.on("mouseenter",t.proxy(function(){this.manager.showMenu(this)},this)).on("mouseleave",t.proxy(function(){this.manager.hideMenu()},this)).on("click.n2-slide",t.proxy(this.goToEdit,this)),this.publishElement=this.box.find(".n2-slide-published").on("click",t.proxy(this.switchPublished,this)),this.box.find(".n2-ss-box-select").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.invertSelection()},this))}return n.prototype.getId=function(){return this.box.data("slideid")},n.prototype.setFirst=function(e){e.stopPropagation(),e.preventDefault(),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.manager.ajaxUrl,{nextendaction:"first"}),type:"POST",data:{id:this.getId()}}).done(t.proxy(function(){this.manager.unsetFirst(),this.box.addClass("n2-slide-state-first")},this))},n.prototype.unsetFirst=function(){this.box.removeClass("n2-slide-state-first")},n.prototype.switchPublished=function(t){t.stopPropagation(),t.preventDefault(),this.isPublished()?this.manager.unPublishSlides([this.getId()],[this]):this.manager.publishSlides([this.getId()],[this])},n.prototype.isPublished=function(){return this.box.hasClass("n2-slide-state-published")},n.prototype.published=function(){this.box.addClass("n2-slide-state-published")},n.prototype.unPublished=function(){this.box.removeClass("n2-slide-state-published")},n.prototype.goToEdit=function(t,e){if(this.manager.isBulkSelection)this.invertSelection(),t.preventDefault();else{var i=this.box.data("editurl");"undefined"!=typeof e&&e?window.open(i,"_blank"):i==location.href?n2("#n2-admin").toggleClass("n2-ss-slides-outer-container-visible"):window.location=i}},n.prototype.duplicate=function(e){e.stopPropagation(),e.preventDefault();var i=t.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendaction:"duplicate"})}).done(t.proxy(function(e){var r=t(e.data).insertAfter(this.box),s=new n(this.manager,r);this.manager.initSlides(),i.resolve(s)},this)),i},n.prototype["delete"]=function(t){t.stopPropagation(),t.preventDefault(),this.manager.deleteSlides([this.getId()],[this])},n.prototype.deleted=function(){this.box.remove()},n.prototype.invertSelection=function(t){t&&t.preventDefault(),this.selected?this.deSelect():this.select()},n.prototype.select=function(){this.selected||(this.selected=!0,this.box.addClass("n2-selected"),this.manager.addSelection(this))},n.prototype.deSelect=function(){this.selected&&(this.selected=!1,this.box.removeClass("n2-selected"),this.manager.removeSelection(this))},n.prototype.publish=function(t){this.switchPublished(t)},n.prototype.unpublish=function(t){this.switchPublished(t)},n.prototype.generator=function(t){window.location=this.box.data("generator")},n.prototype.copy=function(e){this.manager.showSliderSelector(n2_("Copy slide to ..."),t.proxy(function(t){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendaction:"copy",targetSliderID:t})})},this))},n}),N2Require("SlidesManager",[],[],function(t,e,i){function n(i,n,r,s,o,a){this.quickPostModal=null,this.quickVideoModal=null,this.parameters=r,this.slides=[],this.ajaxUrl=i,this.contentAjaxUrl=n,this.slidesPanel=t("#n2-ss-slides-container"),this.slidesContainer=this.slidesPanel.find(".n2-ss-slides-container"),this.initMenu(),this.initSlidesOrderable();for(var l=this.slidesContainer.find(".n2-box-slide"),h=0;h<l.length;h++)this.slides.push(new e.Slide(this,l.eq(h)));if(t("html").attr("data-slides",this.slides.length),t(".n2-add-quick-image, .n2-box-slide-dummy").on("click",t.proxy(this.addQuickImage,this)),t(".n2-add-quick-video").on("click",t.proxy(this.addQuickVideo,this)),t(".n2-add-quick-post").on("click",t.proxy(this.addQuickPost,this)),this.initBulk(),!s){var d=[];this.slidesContainer.fileupload({url:o,pasteZone:!1,dataType:"json",paramName:"image",dropZone:t("undefined"==typeof nextend.smartSlider?document:".n2-ss-slides-outer-container"),add:t.proxy(function(t,e){e.formData={path:"/"+a},e.submit()},this),done:t.proxy(function(t,e){var i=e.result;i.data&&i.data.name?d.push({title:i.data.name,description:"",image:i.data.url}):NextendAjaxHelper.notification(i)},this),fail:t.proxy(function(t,e){NextendAjaxHelper.notification(e.jqXHR.responseJSON)},this),start:function(){NextendAjaxHelper.startLoading()},stop:t.proxy(function(){d.length?this._addQuickImages(d):setTimeout(function(){NextendAjaxHelper.stopLoading()},100),d=[]},this)});var c=null;this.slidesContainer.on("dragover",t.proxy(function(e){null!==c?(clearTimeout(c),c=null):this.slidesContainer.addClass("n2-drag-over"),c=setTimeout(t.proxy(function(){this.slidesContainer.removeClass("n2-drag-over"),c=null},this),400)},this))}}return n.prototype.changed=function(){},n.prototype.initSlidesOrderable=function(){this.slidesContainer.sortable({helper:"clone",forcePlaceholderSize:!1,tolerance:"pointer",items:".n2-box-slide",start:function(t,e){e.item.show()},stop:t.proxy(this.saveSlideOrder,this),placeholder:"n2-box-sortable-placeholder n2-box-sortable-placeholder-small",distance:10})},n.prototype.saveSlideOrder=function(e){for(var i=this.slidesContainer.find(".n2-box-slide"),n=[],r=[],s=[],o=0;o<i.length;o++){var a=i.eq(o).data("slide");n.push(a),r.push(a.getId())}for(var o=0;o<this.slides.length;o++)s.push(this.slides[o].getId());if(JSON.stringify(s)!=JSON.stringify(r)){t(window).triggerHandler("SmartSliderSidebarSlidesOrderChanged");var l={nextendcontroller:"slides",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{slideorder:r}}),this.slides=n,this.changed()}},n.prototype.initSlides=function(){for(var e=(this.slides.length,this.slidesContainer.find(".n2-box-slide")),i=[],n=0;n<e.length;n++){var r=e.eq(n).data("slide");i.push(r)}this.slides=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidesChanged"),t("html").attr("data-slides",this.slides.length)},n.prototype.unsetFirst=function(){for(var t=0;t<this.slides.length;t++)this.slides[t].unsetFirst();this.changed()},n.prototype.addQuickImage=function(e){e.preventDefault(),nextend.imageHelper.openMultipleLightbox(t.proxy(this._addQuickImages,this))},n.prototype.addBoxes=function(i){i.insertBefore(this.slidesContainer.find(".n2-clear")),i.addClass("n2-ss-box-just-added").each(t.proxy(function(i,n){new e.Slide(this,t(n))},this)),this.initSlides(),setTimeout(function(){i.removeClass("n2-ss-box-just-added")},200)},n.prototype._addQuickImages=function(e){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickImages"}),data:{images:Base64.encode(JSON.stringify(e))}}).done(t.proxy(function(e){this.addBoxes(t(e.data))},this))},n.prototype.addQuickVideo=function(e){e.preventDefault();var i=this;this.quickVideoModal||(this.quickVideoModal=new NextendModal({zero:{size:[500,350],title:n2_("Add video"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Add video")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button"),n=(this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}).append(this.createInput(n2_("Video url"),"n2-slide-video-url","width: 446px;")),this.content.find("#n2-slide-video-url").focus());this.content.append(this.createHeading(n2_("Examples"))),this.content.append(this.createTable([["YouTube","https://www.youtube.com/watch?v=lsq09izc1H4"],["Vimeo","https://vimeo.com/144598279"]],["",""])),e.on("click",t.proxy(t.proxy(function(e){e.preventDefault();var r=n.val(),s=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,o=r.match(s),a=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,l=r.match(a),h=r.match(/\.(mp4)/i);o?NextendAjaxHelper.getJSON("https://www.googleapis.com/youtube/v3/videos?id="+encodeURI(o[2])+"&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM").done(t.proxy(function(t){if(t.items.length){var e=t.items[0].snippet,n=t.items[0].snippet.thumbnails,s=n.maxres||n.standard||n.high||n.medium||n["default"];i._addQuickVideo(this,{type:"youtube",title:e.title,description:e.description,image:s.url,video:r})}},this)).fail(function(t){nextend.notificationCenter.error(t.error.errors[0].message)}):l?NextendAjaxHelper.getJSON("https://vimeo.com/api/v2/video/"+l[3]+".json").done(t.proxy(function(t){i._addQuickVideo(this,{type:"vimeo",title:t[0].title,description:t[0].description,video:l[3],image:t[0].thumbnail_large})},this)).fail(function(t){nextend.notificationCenter.error(t.responseText)}):h?nextend.notificationCenter.error("This video url is not supported!"):nextend.notificationCenter.error("This video url is not supported!")},this)))}}}})),this.quickVideoModal.show()},n.prototype._addQuickVideo=function(e,i){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickVideo"}),data:{video:Base64.encode(encodeURIComponent(JSON.stringify(i)))}}).done(t.proxy(function(e){this.addBoxes(t(e.data)),this.initSlides()},this)),e.hide()},n.prototype.addQuickPost=function(e){if(e.preventDefault(),!this.quickPostModal){var i=this,n={},r=t.proxy(function(t){return"undefined"==typeof n[t]&&(n[t]=NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.contentAjaxUrl),data:{keyword:t},dataType:"json"})),n[t]},this);this.quickPostModal=new NextendModal({zero:{size:[600,430],title:n2_("Add post"),back:!1,close:!0,content:'<div class="n2-form"></div>',fn:{show:function(){this.content.find(".n2-form").append(this.createInput(n2_("Keyword"),"n2-ss-keyword","width:546px;"));var e=t("#n2-ss-keyword"),n=this.createHeading("").appendTo(this.content),s=this.createResult().appendTo(this.content),o="";e.on("keyup",t.proxy(function(){o=e.val(),r(o).done(t.proxy(function(r){if(e.val()==o){""==o?n.html(n2_("No search term specified. Showing recent items.")):n.html(n2_printf(n2_('Showing items match for "%s"'),o));for(var a=r.data,l=[],h=this,d=0;d<a.length;d++)l.push([a[d].title,a[d].info,t('<div class="n2-button n2-button-normal n2-button-xs n2-button-green n2-radius-s n2-uc n2-h5">'+n2_("Select")+"</div>").on("click",{post:a[d]},function(t){i._addQuickPost(h,t.data.post)})]);s.html(""),this.createTable(l,["width:100%;","",""]).appendTo(this.createTableWrap().appendTo(s))}},this))},this)).trigger("keyup").focus()}}}})}this.quickPostModal.show()},n.prototype._addQuickPost=function(e,i){i.image||(i.image=""),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickPost"}),data:{post:i}}).done(t.proxy(function(e){this.addBoxes(t(e.data)),this.initSlides()},this)),e.hide()},n.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.deSelect()})},this)),e.eq(2).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.box.hasClass("n2-slide-state-published")?t.select():t.deSelect()})},this)),e.eq(3).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.box.hasClass("n2-slide-state-published")?t.deSelect():t.select()})},this)),t(".n2-bulk-actions a").on("click",t.proxy(function(e){var i=t(e.currentTarget).data("action");i&&(e.preventDefault(),this.bulkAction(i))},this))},n.prototype.addSelection=function(t){0==this.selection.length&&this.enterBulk(),this.selection.push(t)},n.prototype.removeSelection=function(e){this.selection.splice(t.inArray(e,this.selection),1),0==this.selection.length&&this.leaveBulk()},n.prototype.bulkSelect=function(t){for(var e=0;e<this.slides.length;e++)t(this.slides[e])},n.prototype.bulkAction=function(t){var e=[],i=[];this.bulkSelect(function(t){t.selected&&(e.push(t),i.push(t.getId()))}),i.length?this[t](i,e):nextend.notificationCenter.notice("Please select one or more slides for the action!")},n.prototype.enterBulk=function(){this.isBulkSelection||(this.isBulkSelection=!0,this.slidesContainer.sortable("option","disabled",!0),t("#n2-admin").addClass("n2-ss-has-box-selection"))},n.prototype.leaveBulk=function(){if(this.isBulkSelection){this.slidesContainer.sortable("option","disabled",!1),t("#n2-admin").removeClass("n2-ss-has-box-selection");for(var e=0;e<this.slides.length;e++)this.slides[e].deSelect();this.selection=[],this.isBulkSelection=!1}},n.prototype.deleteSlides=function(e,i){this.hideMenu();var n=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slide-delete",n,t.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"delete"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSlides(),this.leaveBulk()},this))},this))},n.prototype.duplicateSlides=function(e,i){for(var n=0;n<this.slides.length;n++)this.slides[n].selected&&this.slides[n].duplicate(t.Event("click",{currentTarget:null}))},n.prototype.copySlides=function(e,i){this.showSliderSelector(n2_("Copy slide to ..."),t.proxy(function(t){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"copySlides",targetSliderID:t}),type:"POST",data:{slides:e}})},this))},n.prototype.publishSlides=function(e,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"publish"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].published();this.changed()},this))},n.prototype.unPublishSlides=function(e,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"unpublish"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].unPublished();this.changed()},this))},n.prototype.initMenu=function(){this.slide=null,this.menu=t("#n2-ss-slide-menu").detach().addClass("n2-inited"),this.menu.find("li").on("click",t.proxy(function(e){e.stopPropagation();var i=t(e.currentTarget).data("action");i&&"function"==typeof this.slide[i]&&this.slide[i](e)},this)),this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},n.prototype.showMenu=function(t){this.slide=t,this.menu.appendTo(t.box)},n.prototype.hideMenu=function(){this.menu.detach()},n.prototype.showSliderSelector=function(e,i){var n=NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"choose"});this.sliderSelectorModal=new NextendModal({zero:{size:[970,600],title:e,back:!1,close:!0,content:"",fn:{show:function(){var e=t('<iframe src="'+n+'" width="970" height="540" style="margin: 0 -20px 0 -20px;"></iframe>').appendTo(this.content),r=window.addEventListener?"addEventListener":"attachEvent";window[r]("attachEvent"==r?"onmessage":"message",t.proxy(function(t){if(t.source==(e[0].contentWindow||e[0].contentDocument)){var n=t[t.message?"message":"data"];i(n),this.hide()}},this),!1)},destroy:function(){this.destroy()}}}},!0)},n}),N2Require("SlideAdmin",[],[],function(t,e,i){function n(){this.layerAnimationManager=null,this.slideEditManager=null,this.frontend=null,this.generator=null,this.canvasManager=null,this.history=null,this.$currentSlideElement=null}return n.prototype.startEditor=function(t,i,n){return null===this.slideEditManager&&(this.slideEditManager=new e.SlideEditManager(t,i,n)),this.slideEditManager},window.nextend.pre="div#n2-ss-0 ",window.nextend.smartSlider=new n,n}),N2Require("SmartSliderBackgroundImageAdmin",["SmartSliderBackgroundImage"],[],function(t,e,i){function n(t,i,n){this.allowVisualLoad=!0,this.hash=i.data("hash"),e.SmartSliderBackgroundImage.prototype.constructor.call(this,t,i,n),this.loadAllowed=!0,this.listenImageManager()}return n.prototype=Object.create(e.SmartSliderBackgroundImage.prototype),n.prototype.constructor=n,n.prototype.startColorMode=function(){this.$background=t('<div class="n2-ss-background-image"/>').appendTo(this.element),this.loadDeferred.resolve()},n.prototype.setVisualLoad=function(t){this.allowVisualLoad=t},n.prototype.listenImageManager=function(){""!=this.hash&&t(window).on(this.hash,t.proxy(this.onImageManagerChanged,this))},n.prototype.notListenImageManager=function(){""!=this.hash&&t(window).off(this.hash,null,t.proxy(this.onImageManagerChanged,this))},n.prototype.onImageManagerChanged=function(t,e){this.tabletSrc=e.tablet.image,this.mobileSrc=e.mobile.image,this.updateBackgroundToDevice(this.manager.device)},n.prototype.setDesktopSrc=function(e){if(this.notListenImageManager(),this.desktopSrc=e,this.hash=md5(e),""!=e&&this.allowVisualLoad){var i=new Image;i.addEventListener("load",t.proxy(function(){t.when(nextend.imageManager.getVisual(e)).done(t.proxy(function(t){this.onImageManagerChanged(null,t.value),this.listenImageManager()},this))},this),!1),i.src=nextend.imageHelper.fixed(e)}else this.tabletSrc="",this.mobileSrc="",this.setSrc(nextend.imageHelper.fixed(e))},n.prototype.setSrc=function(t){e.SmartSliderBackgroundImage.prototype.setSrc.call(this,nextend.imageHelper.fixed(t))},n.prototype.startFixed=function(){},n.prototype.setMode=function(t){"default"==t&&(t=nextend.smartSlider.slideBackgroundMode),this.element.attr("data-mode",t),this.mode=t},n.prototype.setFocus=function(t,e){this.$background.css("background-position",t+"% "+e+"%")},n.prototype.setOpacity=function(t){this.opacity=t,this.$background.css("opacity",t)},n.prototype.setBlur=function(t){window.n2FilterProperty&&(t>0?this.$background.css({margin:"-"+2*t+"px",padding:2*t+"px"}).css(window.n2FilterProperty,"blur("+t+"px)"):this.$background.css({margin:"",padding:""}).css(window.n2FilterProperty,"")),this.blur=t},n}),N2Require("SlideEditManager",["SlideAdmin"],["smartSlider"],function(t,e,i,n){"use strict";function r(e,i,n){this.readyDeferred=t.Deferred(),this.options=t.extend({slideAsFile:0,isUploadDisabled:!0,uploadUrl:"",uploadDir:"",isAddSample:!1},n),this.warnInternetExplorerUsers(),this.$slideContentElement=t("#"+i),this.slideStartValue=this.$slideContentElement.val(),window[e].visible(t.proxy(this.sliderStarted,this))}return r.prototype.startSampleSlides=function(){var e="https://smartslider3.com/slides/"+window.N2SS3VERSION+"/free/",i=this,r=window.addEventListener?"addEventListener":"attachEvent",s=t('<iframe src="'+e+'"></iframe>').prependTo(".n2-ss-sample-slides-container"),o=s[0];t("html, body").scrollTop(s.offset().top-t("#wpadminbar").height());var a=t(".n2-ss-sample-slide-settings"),l=t("#slidebackgroundImage"),h=t("#n2-ss-sample-slide-setting-background-image").on("click",function(){l.parent().find(".n2-form-element-button").trigger("click")}),d=function(){var e=l.val();""===e?(a.removeClass("n2-ss-has-image"),h.css("background-image","url(//nextenddev.no-ip.org/roland/wordpress1/wp-content/plugins/nextend-smart-slider3-pro/nextend/media/images/placeholder/image.png)"),t("#slidebackground-type").val("color").trigger("change")):(a.addClass("n2-ss-has-image"),t("#slidebackground-type").val("image").trigger("change"),h.css("background-image","url("+nextend.imageHelper.fixed(e)+")"))};h.find(".n2-i-close").on("click",function(t){t.stopPropagation(),l.parent().find(".n2-form-element-clear").trigger("click")}),l.on("nextendChange",d),d();var c=t("#slidebackgroundImageOpacity"),p=t("#n2-ss-sample-slide-setting-opacity-slider").removeAttr("slide").prop("slide",!1).slider({min:0,max:100,step:1,slide:function(t,e){c.data("field").insideChange(e.value)}}),u=function(t){p.slider("value",c.val())};c.on("nextendChange",u),u();var y=t("#slidebackgroundImageBlur"),g=t("#n2-ss-sample-slide-setting-blur-slider").removeAttr("slide").prop("slide",!1).slider({min:0,max:40,step:1,slide:function(t,e){y.data("field").insideChange(e.value)}}),f=function(t){g.slider("value",y.val())};y.on("nextendChange",f),f();var v=t("#slidebackgroundColor"),m=t("#n2-ss-sample-slide-setting-color").n2spectrum({showAlpha:1,preferredFormat:"hex8",showInput:!1,showButtons:!1,move:function(){var t=m.n2spectrum("get").toHexString8();m.val(t),v.data("field").insideChange(t)},showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}),b=function(t){var e=v.val();e!=m.val()&&m.n2spectrum("set",e)};v.on("nextendChange",b),b();var x=t("#slidebackgroundGradient"),C=function(){"off"==x.val()?a.removeClass("n2-ss-has-gradient"):a.addClass("n2-ss-has-gradient")};x.on("nextendChange",C),C();var S=t("#slidebackgroundColorEnd"),w=t("#n2-ss-sample-slide-setting-gradient").n2spectrum({showAlpha:1,preferredFormat:"hex8",showInput:!1,showButtons:!1,move:function(){var t=w.n2spectrum("get").toHexString8();S.data("field").insideChange(t)},showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}),k=function(t){w.n2spectrum("set",S.val())};S.on("outsideChange",k),k(),window[r]("attachEvent"==r?"onmessage":"message",function(t){if(t.source==(o.contentWindow||o.contentDocument)){var e=t[t.message?"message":"data"];if(e.key)switch(e.key){case"sampleSlide":var r=JSON.parse(e.data);i.settings.setData(r.data,!0),i.canvasManager.mainContainer.replaceLayers(r.layers),"content"!=i.canvasManager.currentEditorMode&&i.canvasManager.mainContent!=n&&i.canvasManager.updateEditorMode("content");break;case"ready":(o.contentWindow||o.contentDocument).postMessage({key:"ackReady"},"*"),i.options.isAddSample&&((o.contentWindow||o.contentDocument).postMessage({key:"create"},"*"),i.options.isAddSample=!1)}}},!1)},r.prototype.sliderStarted=function(){i.history=new e.History,i.frontend=window["n2-ss-0"],i.frontend.visible(function(){t("body").addClass("n2-ss-slider-visible");var e=t("#n2-ss-slide-canvas-container"),i=e.tinyscrollbar({axis:"x",wheel:!1,wheelLock:!1}).data("plugin_tinyscrollbar");"function"==typeof e.get(0).move&&(e.get(0).move=null),this.sliderElement.on("SliderResize",function(){i.update("relative")})}),i.$currentSlideElement=i.frontend.sliderElement.find(".n2-ss-currently-edited-slide");var n=i.$currentSlideElement.hasClass("n2-ss-static-slide");new e.Generator,this.settings=new e.SlideSettings(n),this.canvasManager=new e.CanvasManager(this,n,this.options),this.readyDeferred.resolve(),t("#smartslider-form").on({checkChanged:t.proxy(this.prepareFormForCheck,this),submit:t.proxy(this.onSlideSubmit,this)}),this.options.isAddSample&&this.startSampleSlides()},r.prototype.ready=function(t){this.readyDeferred.done(t)},r.prototype.prepareFormForCheck=function(){var t=JSON.stringify(this.canvasManager.getData()),e=JSON.stringify(JSON.parse(Base64.decode(this.slideStartValue)));this.$slideContentElement.val(e==t?this.slideStartValue:Base64.encode(t))},r.prototype.onSlideSubmit=function(e){if(!nextend.isPreview)if(this.prepareForm(),e.preventDefault(),nextend.askToSave=!1,this.options.slideAsFile&&typeof window.FormData!==n&&"undefined"!=typeof window.File){var i=new FormData,r=t("#smartslider-form").serializeArray();t.each(r,function(t,e){if("slide[slide]"==e.name)try{i.append("slide",new File([e.value],"slide.txt"))}catch(n){i.append("slide",new Blob([e.value]))}else i.append(e.name,e.value)}),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(window.location.href),type:"POST",data:i,contentType:!1,processData:!1}).done(t.proxy(this.afterSave,this))}else NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(window.location.href),data:t("#smartslider-form").serialize(),dataType:"json"}).done(t.proxy(this.afterSave,this))},r.prototype.afterSave=function(){nextend.askToSave=!0,t("#smartslider-form").trigger("saved"),t(".n2-ss-edit-slide-top-details .n2-h1").html(t("#slidetitle").val())},r.prototype.prepareForm=function(){i.ruler&&t("#slideguides").val(Base64.encode(JSON.stringify(i.ruler.toArray()))),this.$slideContentElement.val(Base64.encode(nextend.UnicodeToHTMLEntity(JSON.stringify(this.canvasManager.getData()))))},r.prototype.warnInternetExplorerUsers=function(){var t=this.isInternetExplorer();t&&10>t&&alert(window.ss2lang.The_editor_was_tested_under_Internet_Explorer_10_Firefox_and_Chrome_Please_use_one_of_the_tested_browser)},r.prototype.isInternetExplorer=function(){var t=navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):!1},r.prototype.getLayout=function(){for(var e=t("#smartslider-form").serializeArray(),i={},n=0;n<e.length;n++){var r=e[n].name.match(/slide\[(.*?)\]/);r&&(i[r[1]]=e[n].value)}return delete i.generator,delete i.published,delete i.publishdates,delete i["record-start"],delete i["record-slides"],delete i.slide,i.slide=this.canvasManager.getData(),i},r.prototype.loadLayout=function(e,i,n){var r=e.slide;if(delete e.slide,n?this.canvasManager.importLayers(r,!0):this.canvasManager.importLayers(r,!1),i)for(var s in e)t("#slide"+s).val(e[s]).trigger("change");e.slide=r},r.prototype.getSelf=function(){return this},r.prototype.copySlide=function(){var e={data:this.settings.getBackgroundData(),layers:this.canvasManager.getData()};t.jStorage.set("copiedSlide",JSON.stringify(e))},r.prototype.pasteSlide=function(){var e=t.jStorage.get("copiedSlide");e&&(e=JSON.parse(e),this.settings.setData(e.data),this.canvasManager.mainContainer.replaceLayers(e.layers))},r.prototype.hasCopiedSlide=function(){var e=t.jStorage.get("copiedSlide");return!!e},r}),N2Require("Generator",["SlideAdmin"],["smartSlider"],function(t,e,i,n){"use strict";function r(){this._refreshTimeout=null,this.modal=!1,this.group=0,i.generator=this;var e=i.$currentSlideElement.data("variables");if(e){this.variables=e;for(var n in this.variables)!isNaN(parseFloat(n))&&isFinite(n)&&(this.group=Math.max(this.group,parseInt(n)+1));this.fill=this.generatorFill,this.group>0&&(this.registerField=this.generatorRegisterField,this.button=t('<a href="#" class="n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-blue n2-h5 n2-uc" style="position:absolute;right: -2px;top: -18px;">Variable</a>').on("click",t.proxy(function(t){t.preventDefault(),
|
3 |
+
this.showModal()},this)),this.registerField(t("#slidetitle")),this.registerField(t("#slidedescription")),this.registerField(t("#slidethumbnail")),this.registerField(t("#slidebackgroundImage")),this.registerField(t("#slidebackgroundAlt")),this.registerField(t("#slidebackgroundTitle")),this.registerField(t("#slidebackgroundVideoMp4")),this.registerField(t("#linkslidelink_0")),this.registerField(t("#layergenerator-visible")),this.registerField(t("#layergroup-generator-visible")),t("body").addClass("n2-ss-dynamic-slide")),this.initSlideDataRefresh()}else this.variables=null}return r.prototype.isDynamicSlide=function(){return this.group>0},r.prototype.splitTokens=function(t){for(var e=[],i="",n=0,r=0;r<t.length;r++){var s=t[r];","===s&&0===n?(e.push(i),i=""):(i+=s,"("===s?n++:")"===s&&n--)}return i.length&&e.push(i),e},r.prototype.fill=function(t){return t},r.prototype.generatorFill=function(e){return e.replace(/{((([a-z]+)\(([^}]+)\))|([a-zA-Z0-9][a-zA-Z0-9_\/]*))}/g,t.proxy(this.parseFunction,this))},r.prototype.parseFunction=function(t,e,i,n,r,s){if("undefined"==typeof s){for(var o=this.splitTokens(r),a=0;a<o.length;a++)o[a]=this.parseVariable(o[a]);return this[n].apply(this,o)}return this.parseVariable(s)},r.prototype.parseVariable=function(t){var e=t.match(/^("|')(.*)("|')$/);if(e)return e[2];var i=t.match(/((([a-z]+)\(([^}]+)\)))/);if(i)return this.parseFunction.apply(this,i);var n=t.match(/([a-zA-Z][0-9a-zA-Z_]*)(\/([0-9a-z]+))?/);if(n){var r=n[3];if("undefined"==typeof r)r=0;else{var s=parseInt(r);isNaN(s)||(r=Math.max(r,1)-1)}return"undefined"!=typeof this.variables[r]&&"undefined"!=typeof this.variables[r][n[1]]?this.variables[r][n[1]]:""}return t},r.prototype.fallback=function(t,e){return""==t?e:t},r.prototype.cleanhtml=function(t){return this.stripTags(t,"<p><a><b><br /><br/><i>")},r.prototype.stripTags=function(t,e){e=(((e||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var i=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,n=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return t.replace(n,"").replace(i,function(t,i){return e.indexOf("<"+i.toLowerCase()+">")>-1?t:""})},r.prototype.removehtml=function(e){return t("<div>"+e+"</div>").text()},r.prototype.splitbychars=function(t,e,i){return t.substr(e,i)},r.prototype.splitbywords=function(t,e,i){var n=t,r=n.length,s=Math.max(0,0==e?0:n.indexOf(" ",e)),o=Math.max(0,i>r?r:n.indexOf(" ",i));return 0==o&&r>=i&&(o=r),n.substr(s,o)},r.prototype.findimage=function(t,e){var i=t,n=/(<img.*?src=[\'"](.*?)[\'"][^>]*>)|(background(-image)??\s*?:.*?url\((["|\']?)?(.+?)(["|\']?)?\))/gi,r=[],s=null;for(e="undefined"!=typeof e?parseInt(e)-1:0;s=n.exec(i);)"undefined"!=typeof s[2]?r.push(s[2]):"undefined"!=typeof s[6]&&r.push(s[6]);return r.length?r.length>e?r[e]:r[r.length-1]:""},r.prototype.findlink=function(t,e){var i=t,n=/href=["\']?([^"\'>]+)["\']?/gi,r=[],s=null;for(e="undefined"!=typeof e?parseInt(e)-1:0;s=n.exec(i);)"undefined"!=typeof s[1]&&r.push(s[1]);return r.length?r.length>e?r[e]:r[r.length-1]:""},r.prototype.removevarlink=function(t){var e=String(t),i=/<a href=\"(.*?)\">(.*?)<\/a>/g;return e.replace(i,"")},r.prototype.registerField=function(t){},r.prototype.generatorRegisterField=function(e){var i=e.parent();i.on({mouseenter:t.proxy(function(){this.activeField=e,this.button.prependTo(i)},this)})},r.prototype.getModal=function(){var e=this;if(!this.modal){var i={key:"",group:1,filter:"no",split:"no",splitStart:0,splitLength:300,findImage:0,findImageIndex:1,findLink:0,findLinkIndex:1,removeVarLink:0},n=function(){var t=i.key+"/"+i.group;return i.findImage&&(t="findimage("+t+","+Math.max(1,i.findImageIndex)+")"),i.findLink&&(t="findlink("+t+","+Math.max(1,i.findLinkIndex)+")"),i.removeVarLink&&(t="removevarlink("+t+")"),"no"!=i.filter&&(t=i.filter+"("+t+")"),"no"!=i.split&&i.splitStart>=0&&i.splitLength>0&&(t=i.split+"("+t+","+i.splitStart+","+i.splitLength+")"),"{"+t+"}"},r=t('<div class="n2-generator-result-container" />'),s=function(){r.html(t("<div/>").text(e.fill(n())).html())},o=e.group,a=null,l=null,h=t('<div class="n2-generator-insert-variable"/>'),d=NextendModal.prototype.createHeading(n2_("Choose the group")).appendTo(h),c=t('<div class="n2-group-container" />').appendTo(h);h.append(NextendModal.prototype.createHeading(n2_("Choose the variable")));var p=t('<div class="n2-variable-container" />').appendTo(h),u=t('<div class="n2-generator-functions-container n2-form-element-mixed" />').appendTo(t('<div class="n2-form" />').appendTo(h));h.append(NextendModal.prototype.createHeading(n2_("Result"))),r.appendTo(h),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Filter")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="filter" id="n2-generator-function-filter"><option selected="selected" value="no">'+n2_("No")+'</option><option value="cleanhtml">'+n2_("Clean HTML")+'</option><option value="removehtml">'+n2_("Remove HTML")+"</option></select></div></div></div>").appendTo(u);var y=u.find("#n2-generator-function-filter");y.on("change",t.proxy(function(){i.filter=y.val(),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Split by chars")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="split" id="n2-generator-function-split"><option selected="selected" value="no">'+n2_("No")+'</option><option value="splitbychars">'+n2_("Strict")+'</option><option value="splitbywords">'+n2_("Respect words")+'</option></select></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Start")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="0" id="n2-generator-function-split-start"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Length")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="300" id="n2-generator-function-split-length"></div></div></div>').appendTo(u);var g=u.find("#n2-generator-function-split");g.on("change",t.proxy(function(){i.split=g.val(),s()},this));var f=u.find("#n2-generator-function-split-start");f.on("change",t.proxy(function(){i.splitStart=parseInt(f.val()),s()},this));var v=u.find("#n2-generator-function-split-length");v.on("change",t.proxy(function(){i.splitLength=parseInt(v.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Find image")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findimage"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Index")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findimage-index"></div></div></div>').appendTo(u);var m=u.find("#n2-generator-function-findimage");m.on("nextendChange",t.proxy(function(){i.findImage=parseInt(m.val()),s()},this));var b=u.find("#n2-generator-function-findimage-index");b.on("change",t.proxy(function(){i.findImageIndex=parseInt(b.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Find link")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findlink"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Index")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findlink-index"></div></div></div>').appendTo(u);var x=u.find("#n2-generator-function-findlink");x.on("nextendChange",t.proxy(function(){i.findLink=parseInt(x.val()),s()},this));var C=u.find("#n2-generator-function-findlink-index");C.on("change",t.proxy(function(){i.findLinkIndex=parseInt(C.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Remove links")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-removevarlink"></div></div></div>').appendTo(u);var S=u.find("#n2-generator-function-removevarlink");S.on("nextendChange",t.proxy(function(){i.removeVarLink=parseInt(S.val()),s()},this));var w=u.find("#n2-generator-function-removevarlink-index");w.on("change",t.proxy(function(){i.removeVarLinkIndex=parseInt(w.val()),s()},this));for(var k in this.variables[0])t('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">'+k+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),a.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.key=e,s()},this,k)).appendTo(p);a=p.find("a"),a.eq(0).trigger("click"),1==o&&(d.css("display","none"),c.css("display","none"));for(var P=0;o>P;P++)t('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">'+(P+1)+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),l.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.group=e+1,s()},this,P)).appendTo(c);l=c.find("a"),l.eq(0).trigger("click");var M=!1;this.modal=new NextendModal({zero:{size:[1e3,o>1?560:490],title:n2_("Insert variable"),back:!1,close:!0,content:h,controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green">'+n2_("Insert")+"</a>"],fn:{show:function(){M||(new N2Classes.FormElementOnoff("n2-generator-function-findimage"),new N2Classes.FormElementOnoff("n2-generator-function-findlink"),new N2Classes.FormElementOnoff("n2-generator-function-removevarlink"),M=!0),this.controls.find(".n2-button").on("click",t.proxy(function(t){t.preventDefault(),e.insert(n()),this.hide(t)},this))}}}},!1),this.modal.setCustomClass("n2-ss-generator-modal")}return this.modal},r.prototype.showModal=function(){this.getModal().show()},r.prototype.insert=function(t){this.activeField.val(t).trigger("change")},r.prototype.initSlideDataRefresh=function(){var e=t("#slidetitle").on("nextendChange",t.proxy(function(){this.variables.slide.name=e.val(),this.refresh()},this)),i=t("#slidedescription").on("nextendChange",t.proxy(function(){this.variables.slide.description=i.val(),this.refresh()},this))},r.prototype.refresh=function(){this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),this._refreshTimeout=setTimeout(t.proxy(this._refresh,this),100)},r.prototype._refresh=function(){for(var t=i.canvasManager.mainContainer.container.getAllLayers(),e=0;e<t.length;e++)"layer"==t[e].type&&t[e].item.reRender()},r}),N2Require("History",[],[],function(t,e,i){"use strict";function n(){this.historyStates=50,this.enabled=0!=this.historyStates,this.historyAddAllowed=!0,this.isBatched=!1,this.currentBatch=this,this.index=-1,this.stackedOff=[],this.tasks=[],this.preventUndoRedo=!1,this.undoBTN=t("#n2-ss-undo").on({click:t.proxy(this.undo,this),mousedown:function(t){nextend.context.setMouseDownArea("undo",t)}}),this.redoBTN=t("#n2-ss-redo").on({click:t.proxy(this.redo,this),mousedown:function(t){nextend.context.setMouseDownArea("redo",t)}}),this.updateUI()}function r(t){this.parent=t,this.tasks=[]}function s(t){switch(t){case"skipForwardUndos":this.undo=function(){return!1}}}function o(t,e,i,n){this.that=t,this.undoAction=e,this.redoAction=i,this.context=n||[]}function a(){o.prototype.constructor.apply(this,arguments)}return n.prototype.updateUI=function(){0==this.index||0==this.tasks.length?this.undoBTN.removeClass("n2-active"):this.undoBTN.addClass("n2-active"),-1==this.index||this.index>=this.tasks.length?this.redoBTN.removeClass("n2-active"):this.redoBTN.addClass("n2-active")},n.prototype.throttleUndoRedo=function(){return this.preventUndoRedo?!0:(this.preventUndoRedo=!0,setTimeout(t.proxy(function(){this.preventUndoRedo=!1},this),100),!1)},n.prototype.isEnabled=function(){return this.enabled&&this.historyAddAllowed},n.prototype.startBatch=function(){if(this.isEnabled()){var t=new r(this.currentBatch);return this.currentBatch._add(t),this.currentBatch=t,t}return!1},n.prototype.endBatch=function(){this.isEnabled()&&(this.currentBatch.parent==i,this.currentBatch=this.currentBatch.parent)},n.prototype.addControl=function(t){return this.currentBatch._add(new s(t))},n.prototype.addSimple=function(t,e,i,n){return this.isEnabled()?this.currentBatch._add(new o(t,e,i,n)):!1},n.prototype.addValue=function(t,e,i){if(this.isEnabled()){if(this.isBatched||this.currentBatch!=this)for(var n=this.getCurrentBatchStack(),r=0;r<n.length;r++)if(n[r].isEqual(t,e,i))return n.push(n.splice(r,1)[0]),n[n.length-1];return this.currentBatch._add(new a(t,e,e,i))}return!1},n.prototype.getCurrentBatchStack=function(){return this.currentBatch!=this?this.currentBatch.tasks:this.tasks[this.tasks.length-1]},n.prototype._add=function(e){return-1!=this.index&&this.tasks.splice(this.index,this.tasks.length),this.index=-1,this.isBatched?this.tasks[this.tasks.length-1].push(e):(this.tasks.push([e]),this.isBatched=!0,setTimeout(t.proxy(function(){this.isBatched=!1},this),100)),this.tasks.length>this.historyStates&&this.tasks.unshift(),this.updateUI(),e},n.prototype.off=function(){this.historyAddAllowed=!1,this.stackedOff.push(1)},n.prototype.on=function(){this.stackedOff.pop(),0==this.stackedOff.length&&(this.historyAddAllowed=!0)},n.prototype.undo=function(t){if(t&&t.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1==this.index?this.index=this.tasks.length-1:this.index--,this.index>=0)for(var e=this.tasks[this.index],i=e.length-1;i>=0&&e[i].undo();i--);else this.index=0;return this.on(),this.updateUI(),!0},n.prototype.redo=function(t){if(t&&t.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1!=this.index&&this.index<this.tasks.length){var e=this.tasks[this.index];this.index++;for(var i=0;i<e.length&&e[i].redo();i++);}return this.on(),this.updateUI(),!0},r.prototype._add=function(t){return this.tasks.push(t),t},r.prototype.invertUndo=function(){return this.undo=function(){for(var t=this.tasks.length-1;t>=0&&this.tasks[t].undo();t--);return!0},this},r.prototype.undo=function(){for(var t=0;t<this.tasks.length&&this.tasks[t].undo();t++);return!0},r.prototype.redo=function(){for(var t=0;t<this.tasks.length&&this.tasks[t].redo();t++);return!0},r.prototype.isEqual=function(){return!1},s.prototype.undo=function(){return!0},s.prototype.redo=function(){return!0},s.prototype.isEqual=function(){return!1},o.prototype.undo=function(){return this.undoAction.apply(this.that.getSelf(),this.context),!0},o.prototype.redo=function(){return this.redoAction.apply(this.that.getSelf(),this.context),!0},o.prototype.isEqual=function(){return!1},a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype.setValues=function(t,e){this.undoValue=t,this.redoValue=e},a.prototype.undo=function(){return this.context.unshift(this.undoValue),this.undoAction.apply(this.that.getSelf(),this.context),this.context.shift(),!0},a.prototype.redo=function(){return this.context.unshift(this.redoValue),this.redoAction.apply(this.that.getSelf(),this.context),this.context.shift(),!0},a.prototype.isEqual=function(t,e,i){if(t==this.that&&e==this.undoAction){for(var n=0;n<i.length;n++)if(i[n]!=this.context[n])return!1;return this.setValues=function(t,e){this.redoValue=e},!0}return!1},n}),N2Require("InlineField",[],[],function(t,e,i){function n(){this.$input=t('<input type="text" name="name" />').on({mouseup:function(t){t.stopPropagation()},keyup:t.proxy(function(t){27==t.keyCode&&this.cancel()},this),blur:t.proxy(this.save,this)}),this.$form=t('<form class="n2-inline-form"></form>').append(this.$input).on("submit",t.proxy(this.save,this))}return n.prototype.injectNode=function(t,e){this.$input.val(e),t.append(this.$form),this.$input.focus()},n.prototype.save=function(t){t.preventDefault(),this.$input.trigger("valueChanged",[this.$input.val()]),this.$input.off("blur"),this.destroy()},n.prototype.cancel=function(){this.$input.trigger("cancel"),this.destroy()},n.prototype.destroy=function(){this.$input.off("blur"),this.$form.remove()},n}),N2Require("SlideSettings",["SlideEditManager"],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.isStatic=e;var n=t("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]'),r={};if(n.each(t.proxy(function(e,i){var n=t(i),s=n.attr("name").match(/slide\[(.*)\]/)[1];r[s]=n.on("nextendChange",t.proxy(this.onChange,this,s))},this)),this.fields=r,this.slideBackground=i.$currentSlideElement.data("slideBackground"),!e){this.canvas=this.slideBackground.element;var s=t("#slidethumbnail");if(""==s.val()){var o=t("#item_imageimage"),a=t.proxy(function(t){""!=t&&"$system$/images/placeholder/image.png"!=t&&(s.val(t).trigger("change"),this.fields.backgroundImage.off(".slidethumbnail"),o.off(".slidethumbnail"))},this);this.fields.backgroundImage.on("nextendChange.slidethumbnail",t.proxy(function(){a(this.fields.backgroundImage.val())},this)),o.on("nextendChange.slidethumbnail",t.proxy(function(){a(o.val())},this))}}this.createHistory()}r.prototype.createHistory=function(){this.values={},t("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]').not("#slideslide").each(t.proxy(function(e,n){var r=t(n),s=r.data("field"),o=r.attr("id");this.values[o]=r.val(),r.on("nextendChange",t.proxy(function(){var t=r.val(),e=i.history.addValue(this,this.historyUpdateSlideValue,[s]);e&&e.setValues(this.values[o],t),this.values[o]=t},this))},this))},r.prototype.getSelf=function(){return this},r.prototype.historyUpdateSlideValue=function(t,e){e.insideChange(t)},r.prototype.getAllData=function(){var t={};for(var e in this.fields)t[e]=this.fields[e].val();return t};var s=["thumbnail","background-type","backgroundColor","backgroundGradient","backgroundColorEnd","backgroundImage","backgroundImageOpacity","backgroundImageBlur","backgroundFocusX","backgroundFocusY","backgroundMode"];return r.prototype.getBackgroundData=function(){for(var t={},e=0;e<s.length;e++)t[s[e]]=this.fields[s[e]].val();return t},r.prototype.setData=function(t,e){e&&this.slideBackground.setVisualLoad(!1);for(var i in t)this.fields[i].val(t[i]).trigger("change");e&&this.slideBackground.setVisualLoad(!1)},r.prototype.onChange=function(t,e){"function"==typeof this["sync_"+t]&&this["sync_"+t].call(this)},r.prototype.sync_backgroundColor=r.prototype.sync_backgroundGradient=r.prototype.sync_backgroundColorEnd=function(){this.updateBackgroundColor()},r.prototype.updateBackgroundColor=function(){var t=this.fields.backgroundColor.val(),e=this.fields.backgroundGradient.val();if("off"!=e){var i=this.fields.backgroundColorEnd.val(),n=this.canvas.css({background:"",filter:""});switch(e){case"horizontal":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=1)");break;case"vertical":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=0)");break;case"diagonal1":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=1)");break;case"diagonal2":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=1)")}}else"00"==t.substr(6,8)?this.canvas.css("background",""):this.canvas.css("background","#"+t.substr(0,6)).css("background",N2Color.hex2rgbaCSS(t))},r.prototype.sync_backgroundImage=function(){this["sync_background-type"]()},r.prototype["sync_background-type"]=function(){var t=this.fields["background-type"].val();"color"==t?this.slideBackground.setDesktopSrc(""):this.slideBackground.setDesktopSrc(i.generator.fill(this.fields.backgroundImage.val()))},r.prototype.sync_backgroundMode=function(){this.slideBackground.setMode(this.fields.backgroundMode.val())},r.prototype.sync_backgroundFocusY=function(){this.slideBackground.setFocus(this.fields.backgroundFocusX.val(),this.fields.backgroundFocusY.val())},r.prototype.sync_backgroundFocusX=function(){this.slideBackground.setFocus(this.fields.backgroundFocusX.val(),this.fields.backgroundFocusY.val())},r.prototype.sync_backgroundImageOpacity=function(){this.slideBackground.setOpacity(this.fields.backgroundImageOpacity.val()/100)},r.prototype.sync_backgroundImageBlur=function(){this.slideBackground.setBlur(this.fields.backgroundImageBlur.val())},r}),N2Require("LayerContainer",[],["smartSlider"],function(t,e,i,n){"use strict";function r(t,e,i,n,r){this.component=t,this.$ul=e.data("container",this),this.allowedPlacementMode=i,this.childrenSelector=n,this.allowedChildren=r,this.layerContainerElement=t.layer}return r.prototype.setLayerContainerElement=function(t){this.layerContainerElement=t},r.prototype.startWithExistingNodes=function(){for(var t=this.layerContainerElement.find(this.childrenSelector),e=0;e<t.length;e++)this._loadNode(t.eq(e),!1);this.component.onChildCountChange()},r.prototype.isChildAllowed=function(e){return-1!==t.inArray(e,this.allowedChildren)},r.prototype._loadNode=function(t,i){var r=t.data("type");if(this.isChildAllowed(r)){var s=t.data("lastplacement"),o={};if(s!==n&&s!=this.allowedPlacementMode)switch(s){case"absolute":o=e.PlacementAbsolute.cleanLayer(t);break;case"normal":o=e.PlacementNormal.cleanLayer(t)}var a;switch(r){case"layer":a=new e.Layer(this.component.canvasManager,this.component);var l=a.itemEditor.getItemClass(t.find(".n2-ss-item").data("item"));l&&e[l].needSize&&o.desktopportraitheight!==n&&t.data("desktopportraitheight",o.desktopportraitheight);break;case"content":a=new e.Content(this.component.canvasManager,this.component);break;case"row":a=new e.Row(this.component.canvasManager,this.component);break;case"col":a=new e.Col(this.component.canvasManager,this.component);break;case"group":}if(a)return a.load(t),i&&a.sync(),a}else console.error(r+" is not allowed in "+this.component.label);return!1},r.prototype.getLayerCount=function(){return this.layerContainerElement.find(this.childrenSelector).length},r.prototype.getLayerIndex=function(t){return this.layerContainerElement.find(this.childrenSelector).index(t)},r.prototype.getSortedLayers=function(){var e=[];return this.layerContainerElement.find(this.childrenSelector).each(function(i,r){var s=t(r).data("layerObject");s!==n&&e.push(s)}),e},r.prototype.append=function(t){t.appendTo(this.layerContainerElement);var e=this._loadNode(t,!0);return this.component.onChildCountChange(),e},r.prototype.insertAt=function(t,e){var i=this.getSortedLayers();e>=i.length?t.appendTo(this.layerContainerElement):t.insertBefore(i[e].layer);var n=this._loadNode(t,!0);return this.component.onChildCountChange(),n},r.prototype.insert=function(t){t.getRootElement().appendTo(this.layerContainerElement)},r.prototype.insertLayerAt=function(e,i){var n=this.getSortedLayers(),r=t.inArray(e,n);"-1"!=r&&i>r&&i++,i>=n.length?e.getRootElement().appendTo(this.layerContainerElement):e.getRootElement().insertBefore(n[i].getRootElement()),this.syncLayerRow(e)},r.prototype.syncLayerRow=function(t){var e,i="absolute"==this.allowedPlacementMode;e=i?t.getRootElement().prevAll(".n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer").first().data("layerObject"):t.getRootElement().nextAll(".n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer").first().data("layerObject"),e!==n?t.layerRow.insertBefore(e.layerRow):this.$ul.append(t.layerRow),t.animations&&t.animations.syncRow(e,i)},r.prototype.getChildLayersRecursive=function(t){for(var e=this.getSortedLayers(),i=[],n=0;n<e.length;n++)t?i.push(e[n].layer[0]):i.push(e[n]),e[n].container&&i.push.apply(i,e[n].container.getChildLayersRecursive(t));return i},r.prototype.moveLayerToGroup=function(t,e){this.moveLayersToGroup([t],[e])},r.prototype.moveLayersToGroup=function(e,i){i=i||[];for(var n=[],r=0;r<e.length;r++){var s=e[r],o=s.group,a=s.getIndex();"undefined"!=typeof i[r]?this.insertLayerAt(s,i[r]):this.insert(s),s.changeGroup(a,this.component),this!=o&&-1==t.inArray(o,n)&&n.push(o)}for(var r=0;r<n.length;r++)n[r].update()},r.prototype.activateFirst=function(){var t=this.getSortedLayers();t.length>0&&t[t.length-1].activate()},r.prototype.resetModes=function(t){for(var e=this.getSortedLayers(),i=0;i<e.length;i++)e[i].resetMode(t),e[i].container!=n&&e[i].container.resetModes(t)},r.prototype.copyModes=function(t,e){for(var i=this.getSortedLayers(),r=0;r<i.length;r++)i[r].copyMode(t,e),i[r].container!=n&&i[r].container.copyModes(t,e)},r.prototype.changeEditorModes=function(t){for(var e=this.getSortedLayers(),i=0;i<e.length;i++)e[i].changeEditorMode(t),e[i].container!=n&&e[i].container.changeEditorModes(t)},r.prototype.renderModeProperties=function(){for(var t=this.getSortedLayers(),e=0;e<t.length;e++)t[e].renderModeProperties(),t[e].container!=n&&t[e].container.renderModeProperties()},r.prototype.getAllLayers=function(t){t=t||[];for(var e=this.getSortedLayers(),i=0;i<e.length;i++)t.push(e[i]),e[i].container!=n&&e[i].container.getAllLayers(t);return t},r.prototype.getData=function(e){e=t.extend({layersIncluded:!0,itemsIncluded:!0},e);var i=[],n=this.getSortedLayers();if("absolute"==this.allowedPlacementMode)for(var r=n.length-1;r>=0;r--)i.push(n[r].getData(e));else for(var r=0;r<n.length;r++)i.push(n[r].getData(e));return i},r.prototype.getHTML=function(t){for(var e=this.getSortedLayers(),i=[],n=0;n<e.length;n++)i.push(e[n].getHTML(t));return i},r.prototype.getDroppables=function(t){for(var e=[],i=this.getSortedLayers(),n=0;n<i.length;n++)if(i[n]!=t){var r=i[n].getDroppable();r&&e.push(r),i[n].container&&e.push.apply(e,i[n].container.getDroppables(t))}return e},r.prototype.getLLDroppables=function(t){var e=[],i=this.component.getLLDroppable(t);i&&e.push(i);for(var n=this.getSortedLayers(),r=0;r<n.length;r++)n[r].container&&n[r]!=t&&e.push.apply(e,n[r].container.getLLDroppables(t));return e},r}),N2Require("LayerDataStorage",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){this.isDeviceProp={},this.propertyScope={},this.property={},this.deviceProperty={desktopPortrait:{},desktopLandscape:{},tabletPortrait:{},tabletLandscape:{},mobilePortrait:{},mobileLandscape:{}}}return r.prototype.getMode=function(){return this.canvasManager.getMode()},r.prototype.getRawProperty=function(t){if(this.isDeviceProp[t]){var e=this.getMode(),i=this.deviceProperty[e];return i[t]!==n?i[t]:n}return this.property[t]},r.prototype.getProperty=function(t){if(this.isDeviceProp[t]){var e=this.getMode(),i=this.deviceProperty[e],n=this.deviceProperty.desktopPortrait;if("undefined"!=typeof i[t])return i[t];if("undefined"!=typeof n[t])return n[t]}return this.property[t]},r.prototype.historyStore=function(t,e,i){if(!this.isDeleteStarted){var n=this.getMode();this.isDeviceProp[e]&&i!=n?(this.deviceProperty[i][e]=t,this.render(e)):(this.store(e,t,!0,"history"),this.$.trigger("propertyChanged",[e,this.getProperty(e)]))}},r.prototype.store=function(t,e,n,r){var s,o,a=this.getMode();this.isDeviceProp[t]?(s=this.deviceProperty[a][t],o=this.getProperty(t)):o=s=this.property[t];var l=i.history.addValue(this,this.historyStore,[t,a]);l&&l.setValues(s,e),this.property[t]=e,this.isDeviceProp[t]&&(this.deviceProperty[a][t]=e),n&&this.render(t,o,r)},r.prototype.render=function(t,e,i){this.propertyScope[t]["_sync"+t](e,i)},r.prototype.isDimensionPropertyAccepted=function(t){return!(!(t+"").match(/[0-9]+%/)&&"auto"!=t)},r.prototype.changeEditorMode=function(t){var e=parseInt(this.property[t]);e?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[t,e]),this.renderModeProperties(!1)},r.prototype.renderModeProperties=function(){for(var t in this.property)this.property[t]=this.getProperty(t),this.$.trigger("propertyChanged",[t,this.property[t]])},r.prototype.historyResetMode=function(e,i){this.deviceProperty[i]=t.extend({},e),i==this.canvasManager.getMode()&&this.renderModeProperties(!0)},r.prototype.resetMode=function(e){if("desktopPortrait"!=e){var n,r=i.history.addValue(this,this.historyResetMode,[e]);r&&r.setValues(t.extend({},this.deviceProperty[e]),{});for(var s in this.deviceProperty[e])this.deviceProperty[e][s]=n;e==this.canvasManager.getMode()&&this.renderModeProperties(!0)}},r.prototype.copyMode=function(e,n){if(e!=n){var r=this.deviceProperty[n];this.deviceProperty[n]=t.extend({},this.deviceProperty[n],this.deviceProperty[e]);var s=i.history.addValue(this,this.historyResetMode,[n]);s&&s.setValues(r,this.deviceProperty[n])}},r.prototype._getDefault=function(t,e){return this.originalProperties[t]!==n?this.originalProperties[t]:e},r.prototype.createProperty=function(t,e,i,r){this.isDeviceProp[t]=!1,this.propertyScope[t]=r||this,i?(this.property[t]=i.data(t.toLowerCase()),this.property[t]===n&&(this.property[t]=this._getDefault(t,e))):this.property[t]=this._getDefault(t,e)},r.prototype.createDeviceProperty=function(t,e,i,r){if(this.isDeviceProp[t]=!0,this.propertyScope[t]=r||this,i){for(var s in this.deviceProperty)this.deviceProperty[s][t]=i.data(s.toLowerCase()+t.toLowerCase()),""===this.deviceProperty[s][t]&&(this.deviceProperty[s][t]=n);for(var s in this.deviceProperty)if(this.deviceProperty[s][t]===n||""===this.deviceProperty[s][t]){var o=this._getDefault(s.toLowerCase()+t.toLowerCase());o!==n&&(this.deviceProperty[s][t]=o)}for(var s in e)this.deviceProperty[s][t]!==n&&""!==this.deviceProperty[s][t]||(this.deviceProperty[s][t]=e[s])}else{for(var s in e)this.deviceProperty[s][t]=e[s];for(var s in this.deviceProperty){var o=this._getDefault(s.toLowerCase()+t.toLowerCase());o!==n&&(this.deviceProperty[s][t]=o)}}this.property[t]=this.deviceProperty.desktopPortrait[t]},r.prototype.removeProperty=function(t){if(delete this.property[t],
|
4 |
+
this.layer.removeData(t.toLowerCase()).removeAttr("data-"+t.toLowerCase()),this.isDeviceProp[t])for(var e in this.deviceProperty)delete this.deviceProperty[e][t],this.layer.removeData(e.toLowerCase()+t.toLowerCase()).removeAttr("data-"+e.toLowerCase()+t.toLowerCase());delete this.isDeviceProp[t],delete this.propertyScope[t]},r.prototype.removeProperties=function(t){for(var e=0;e<t.length;e++)this.removeProperty(t[e])},r.prototype.getPropertiesData=function(t){for(var e={},i=0;i<t.length;i++){var r=t[i];if(this.property[r]!==n&&(e[r]=this.property[r]),this.isDeviceProp[r])for(var s in this.deviceProperty)this.deviceProperty[s][r]!==n&&(e[s.toLowerCase()+r]=this.deviceProperty[s][r])}return e},r.prototype.setProperty=function(t,e,i){this.propertyScope[t]!==n&&("function"==typeof this.propertyScope[t]["setProperty"+t]?this.propertyScope[t]["setProperty"+t](t,e,i):this._setProperty(t,e,i))},r.prototype._setProperty=function(t,e,i){this.store(t,e,!0,i),"manager"!=i&&this.$.trigger("propertyChanged",[t,this.getProperty(t)])},r}),N2Require("CanvasManager",[],["smartSlider"],function(t,e,i,n){"use strict";function r(n,r,s){this.mode="desktopPortrait",this.slideEditManager=n,this.isStatic=r,this.ready=t.Deferred(),this.shouldPreventActivationBubble=!1,this.$=t(this),i.canvasManager=this,this.$highlight=t('<div class="n2-ss-layer-highlight n2-ss-layer-highlight-n" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-e" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-s" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-w" />'),this.initSelectMode(),this.layerWindow=new e.LayerWindow(this),this.layerOptions=new e.ComponentSettings(this),this.ui=new e.CanvasUserInterface(this),this.mainContainer=new e.MainContainer(this),this.itemEditor=new e.ItemManager(this,s),this.mainContainer.lateInit(),this._initDeviceModeChange(),this.canvasSettings=new e.CanvasSettings(this),this.layerOptions.startFeatures(),this.hotkeys(),this.addContextMenu(),this.mainContainer.refreshHasLayers();var o=t("#n2-ss-editor-mode .n2-radio-option"),a=t.proxy(function(t){switch(this.updateEditorMode(t),t){case"content":o.eq(0).addClass("n2-active"),o.eq(1).removeClass("n2-active");break;case"canvas":o.eq(0).removeClass("n2-active"),o.eq(1).addClass("n2-active")}},this);if(this.mainContent&&this.mainContent.container.getLayerCount())a("content");else{var l=this.mainContainer.container.getSortedLayers();if(this.mainContent&&l.length>1||!this.mainContent&&l.length>0)a("canvas");else{var h=t.jStorage.get("editormode");h||(h="content",t.jStorage.set("editormode",h)),a(h)}}o.on("click",t.proxy(function(e){o.removeClass("n2-active");var i=t(e.currentTarget),n=i.data("mode");i.addClass("n2-active"),n!=this.currentEditorMode&&(this.updateEditorMode(n),t.jStorage.set("editormode",n))},this)),this.isMultiDrag=!1}var s={16:0,38:0,40:0,37:0,39:0},o={97:"left",98:"center",99:"right",100:"left",101:"center",102:"right",103:"left",104:"center",105:"right"},a={97:"bottom",98:"bottom",99:"bottom",100:"middle",101:"middle",102:"middle",103:"top",104:"top",105:"top"},l={OFF:0,ON:1,GROUP:2};return r.prototype.updateEditorMode=function(e){this.currentEditorMode=e,t("body").attr("data-editormode",this.currentEditorMode)},r.prototype.getMode=function(){return this.mode},r.prototype.getResponsiveRatio=function(t){return"h"==t?i.frontend.responsive.lastRatios.slideW:"v"==t?i.frontend.responsive.lastRatios.slideH:0},r.prototype.setMainContent=function(t){this.mainContent=t},r.prototype.isGroup=function(t){return!1},r.prototype.isRow=function(t){return t instanceof e.Row},r.prototype.isCol=function(t){return t instanceof e.Col},r.prototype.isLayer=function(t){return t instanceof e.Layer},r.prototype.isContent=function(t){return t instanceof e.Content},r.prototype._initDeviceModeChange=function(){var e=t("#layerresettodesktop").on("click",t.proxy(this.__onResetToDesktopClick,this));this.resetToDesktopTRElement=e.closest("tr"),this.resetToDesktopGlobalElement=t("#n2-ss-layer-reset-to-desktop").on("click",t.proxy(function(){"block"==this.resetToDesktopTRElement.css("display")&&e.trigger("click")},this));var n=t("#n2-ss-layer-show-on"),r={},s=i.frontend.responsive.parameters.deviceModes;for(var o in s)s[o]&&(r[o]=t('<div class="n2-radio-option"><i class="n2-i n2-it n2-i-'+o+'"></i></div>').on("click",t.proxy(function(t){this.layerOptions.currentForm[t].data("field").onoff.trigger("click")},this,o)).appendTo(n));n.children().first().addClass("n2-first"),n.children().last().addClass("n2-last"),this.globalShowOnDeviceCB=function(t){"undefined"!=typeof r[t]&&r[t].toggleClass("n2-active",1==this.layerOptions.currentForm[t].val())},this.layerOptions.forms.global.desktopPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopPortrait")),this.layerOptions.forms.global.desktopLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopLandscape")),this.layerOptions.forms.global.tabletPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletPortrait")),this.layerOptions.forms.global.tabletLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletLandscape")),this.layerOptions.forms.global.mobilePortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobilePortrait")),this.layerOptions.forms.global.mobileLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobileLandscape")),t("#layershow").data("field").setAvailableDevices(s),t("#layergroup-show").data("field").setAvailableDevices(s),this.__onChangeDeviceOrientation(),i.frontend.sliderElement.on("SliderDeviceOrientation",t.proxy(function(){this.__onChangeDeviceOrientation()},this)),this.ready.resolve()},r.prototype.refreshMode=function(){this.__onChangeDeviceOrientation(),i.frontend.responsive.reTriggerSliderDeviceOrientation()},r.prototype.__onChangeDeviceOrientation=function(){this.mode=i.frontend.responsive.getNormalizedModeString(),this.resetToDesktopTRElement.css("display","desktopPortrait"==this.mode?"none":""),this.resetToDesktopGlobalElement.css("display","desktopPortrait"==this.mode?"none":""),this.mainContainer.container.changeEditorModes(this.mode)},r.prototype.__onResetToDesktopClick=function(){if(this.mainContainer.getSelectedLayer()){var t=this.getMode();this.mainContainer.getSelectedLayer().resetMode(t)}},r.prototype.copyOrResetMode=function(t){var e=this.getMode();"desktopPortrait"==e?"desktopPortrait"!=t&&this.mainContainer.container.resetModes(t):t==e?this.mainContainer.container.resetModes(t):this.mainContainer.container.copyModes(e,t)},r.prototype.getSnap=function(){return this.canvasSettings.get("n2-ss-snap-to-enabled")?t(this.isStatic?".n2-ss-static-slide .n2-ss-layer.ui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide":".n2-ss-slide.n2-ss-slide-active .n2-ss-layer.ui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide"):!1},r.prototype.getHTML=function(){for(var e=t("<div></div>"),i=this.mainContainer.container.getAllLayers(),n=0;n<i.length;n++)e.append(i[n].getHTML(!0));return e.html()},r.prototype.getData=function(){return this.mainContainer.container.getData()},r.prototype.importLayers=function(e,i){var n=(this.mainContainer,t.extend(!0,[],e));i&&this.mainContainer.deleteLayers(),this._idTranslation={};for(var r=this.dataToLayers(n),s=0;s<r.length;s++)this.mainContainer.container.append(r[s]);if(this.refreshMode(),!this.mainContainer.getSelectedLayer()){var n=this.mainContainer.container.getSortedLayers();n.length>0&&n[0].activate()}},r.prototype.loadComponentWithNode=function(t,e,i,n){var r=t.container.append(e);return n&&this.refreshMode(),r},r.prototype.insertComponentWithNode=function(t,e,i,n,r){var s=t.container.insertAt(e,i);return r&&this.refreshMode(),s},r.prototype.fixActiveLayer=function(){var t=this.mainContainer.getSelectedLayer();(0==t||t.isDeleted)&&this.resetActiveLayer()},r.prototype.resetActiveLayer=function(){var t=this.mainContainer.container.getSortedLayers();t.length?t[t.length-1].activate():this.changeActiveLayer(null)},r.prototype.changeActiveLayer=function(e,i){var n=this.mainContainer.getSelectedLayer();n&&!n.isDeleted&&(n.$.off("propertyChanged.editor").off(".active"),n.deActivate()),this.mainContainer.activeLayer=e,i||this.exitSelectMode(),e&&(this.layerOptions.changeActiveComponent(e,e.type,e.placement.getType(),e.property),e.$.on({"propertyChanged.editor":t.proxy(this.layerOptions.onUpdateField,this.layerOptions),"placementChanged.active":t.proxy(function(t,i,n){this.layerOptions.changeActiveComponentPlacement(i,e.property)},this)})),this.$.trigger("activeLayerChanged")},r.prototype.highlight=function(t){this.$highlight.appendTo(t.layer)},r.prototype.deHighlight=function(t){this.$highlight.detach()},r.prototype["delete"]=function(){this.mainContainer.getSelectedLayer()&&this.doActionOnActiveLayer("delete")},r.prototype.duplicate=function(){this.mainContainer.getSelectedLayer()&&this.doActionOnActiveLayer("duplicate",[this.selectMode!=l.ON,!1])},r.prototype.copy=function(e){var i;if(e==n)if(1==this.selectMode)i=this.selectedLayers;else{var r=this.mainContainer.getSelectedLayer();r&&(i=this.isCol(r)||this.isContent(r)?r.container.getSortedLayers():[r])}else i=this.isCol(e)||this.isContent(e)?e.container.getSortedLayers():[e];var s=this.mainContainer.getLayerData(i);s.length&&t.jStorage.set("ss3layersclipboard",JSON.stringify(s))},r.prototype.paste=function(e){var i=t.jStorage.get("ss3layersclipboard");if(i){var r=JSON.parse(i);if(r.length){var s;s=e!==n&&e?this.isCol(e)||this.isContent(e)?e:e.group:this.mainContainer.getActiveGroup(),this.mainContainer.addLayers(r,s)}}},r.prototype.hasLayersOnClipboard=function(){return!!t.jStorage.get("ss3layersclipboard")},r.prototype.addContextMenu=function(){t("#n2-ss-0 .n2-ss-currently-edited-slide").nextendContextMenu({onShow:t.proxy(function(e,i){var n=t(e.target),r=n.closest(".n2-ss-layer"),s=r.data("layerObject");s||(s=this.mainContainer.getSelectedLayer()),s&&(this.isCol(s)||this.isContent(s)?i.addItem("Copy child layers","n2-i-copy",t.proxy(function(){this.copy(s)},this)):i.addItem("Copy layer","n2-i-copy",t.proxy(function(){this.selectMode==l.ON?this.copy():this.copy(s)},this))),this.hasLayersOnClipboard()&&i.addItem("Paste layer(s)","n2-i-paste",t.proxy(function(){this.paste(s)},this)),i.addItem("Copy slide","n2-i-copy",t.proxy(function(){this.slideEditManager.copySlide()},this)),this.slideEditManager.hasCopiedSlide()&&i.addItem("Paste slide","n2-i-paste",t.proxy(function(){this.slideEditManager.pasteSlide()},this))},this)})},r.prototype.initSelectMode=function(){this.selectMode=l.OFF,this.selectedLayers=[],t(".n2-ss-layer-list-top-bar .n2-button").on("mousedown",t.proxy(function(e){switch(e.preventDefault(),t(e.currentTarget).data("action")){case"delete":this["delete"]();break;case"duplicate":this.duplicate();break;case"group":this.createGroupFromSelected();break;case"cancel":this.exitSelectMode()}},this))},r.prototype.startSelection=function(t){t?(this.selectMode==l.ON&&this.exitSelectMode(),this.changeSelectMode(l.GROUP)):this.changeSelectMode(l.ON)},r.prototype.changeSelectMode=function(e){var i=this.selectMode;i!=e&&(i==l.ON?t("#n2-admin").removeClass("n2-ss-select-layer-mode-on"):i==l.GROUP&&t("#n2-admin").removeClass("n2-ss-select-layer-mode-group"),this.selectMode=e,i==l.GROUP&&e==l.ON&&this.selectedLayers[0].activate(null,null,!0),e==l.OFF?t("#n2-admin").removeClass("n2-ss-select-layer-mode"):(t("#n2-admin").addClass("n2-ss-select-layer-mode"),e==l.ON?t("#n2-admin").addClass("n2-ss-select-layer-mode-on"):e==l.GROUP&&t("#n2-admin").addClass("n2-ss-select-layer-mode-group")),this.selectMode==l.OFF?t("body").off(".n2-ss-selection"):t("body").on("mousedown.n2-ss-selection",t.proxy(function(t){3!=event.which&&"main"==nextend.context.getCurrentWindow()&&nextend.context.mouseDownArea===!1&&this.exitSelectMode()},this)))},r.prototype.endSelection=function(t){t&&this.selectMode==l.GROUP&&this.exitSelectMode()},r.prototype.selectLayer=function(t,e){if("layer"!=t.type)return!0;if(this.selectMode!=l.ON){var i=this.mainContainer.getSelectedLayer();if("layer"!=i.type)return t.activate(null),!0;this.startSelection(!1),e&&this.selectedLayers.push(i)}return this._selectLayer(t),!0},r.prototype._selectLayer=function(e){var i=t.inArray(e,this.selectedLayers);if(-1!=i){if(this.selectMode==l.ON&&this.selectedLayers.length<=1)return this.exitSelectMode(),!1;var n=this.selectedLayers[i];if(this.selectedLayers.splice(i,1),e.layerRow.removeClass("n2-selected"),e.layer.removeClass("n2-ss-layer-selected"),this.selectMode==l.ON&&this.selectedLayers.length<=1)return this.selectedLayers[0].activate(),this.exitSelectMode(),!1;n===this.mainContainer.getSelectedLayer()&&this.selectedLayers[0].activate(!1,null,!0)}else{for(var r=this.selectedLayers.length,s=0;s<this.selectedLayers.length;s++)if(e.layer.add(this.selectedLayers[s].layer).index(this.selectedLayers[s].layer)>0){r=s;break}this.selectedLayers.splice(r,0,e)}for(var s=0;s<this.selectedLayers.length;s++)this.selectedLayers[s].layerRow.addClass("n2-selected"),this.selectedLayers[s].layer.addClass("n2-ss-layer-selected")},r.prototype.addSelection=function(t,e){e||this.changeSelectMode(l.ON);for(var i=0;i<t.length;i++)this._selectLayer(t[i],!1)},r.prototype.exitSelectMode=function(){if(this.selectMode){for(var e=0;e<this.selectedLayers.length;e++)this.selectedLayers[e]!=this.mainContainer.getSelectedLayer()&&this.selectedLayers[e].layerRow.removeClass("n2-active"),this.selectedLayers[e].layerRow.removeClass("n2-selected"),this.selectedLayers[e].layer.removeClass("n2-ss-layer-selected");t("#n2-admin").removeClass("n2-ss-select-layer-mode"),this.selectedLayers=[],this.changeSelectMode(l.OFF)}},r.prototype.doActionOnActiveLayer=function(e,i){if(this.selectMode==l.ON)for(var n=t.extend([],this.selectedLayers),r=0;r<n.length;r++)n[r][e].apply(n[r],i);else{var s=this.mainContainer.getSelectedLayer();s&&s[e].apply(s,i)}},r.prototype.canvasDragStart=function(t,e){if(this.selectMode&&"canvas"==this.currentEditorMode&&"absolute"==e.mode){for(var i=!1,n=0;n<this.selectedLayers.length;n++){var r=this.selectedLayers[n],s=r.layer;if(s[0]!=e.layer.layer[0]){var o=s.css("display");"none"==o&&s.css("display",""),r._originalPosition=s.position(),"none"==o&&s.css("display","none")}else i=!0}i||this.exitSelectMode(),this.isMultiDrag=!0}},r.prototype.canvasDragMove=function(t,e){if(this.isMultiDrag===!0)for(var i={left:e.position.left+e.canvasOffset.left-e.originalOffset.left,top:e.position.top+e.canvasOffset.top-e.originalOffset.top},n=0;n<this.selectedLayers.length;n++){var r=this.selectedLayers[n];if(!this.isGroup(r)){var s=r.layer;s[0]!=e.layer.layer[0]&&(s.css({left:r._originalPosition.left+i.left,top:r._originalPosition.top+i.top,bottom:"auto",right:"auto"}),r.placement.doAction("triggerLayerResized"))}}},r.prototype.canvasDragStop=function(t,e){if(this.isMultiDrag===!0){for(var i=0;i<this.selectedLayers.length;i++){var n=this.selectedLayers[i];if(!this.isGroup(n)){var r=n.layer;if(r[0]!=e.layer.layer[0]){var s=r.css("display");"none"==s&&r.css("display","block");var o=parseInt(n.layer.css("left")),a=parseInt(n.layer.css("top"));n.placement.current.setPosition(o,a),n.placement.doAction("triggerLayerResized"),"none"==s&&r.css("display","none")}}}return this.isMultiDrag=!1,!0}return!1},r.prototype.historyDeleteGroup=function(t){t.getSelf()["delete"]()},r.prototype.historyCreateGroup=function(t){var i=new e.Group(this,this.mainContainer,{},null);i.create(),t.setSelf(i)},r.prototype.createGroupFromSelected=function(){var t;switch(this.selectMode){case l.ON:t=new e.Group(this,this.mainContainer,{},null),t.create(),i.history.addSimple(this,this.historyDeleteGroup,this.historyCreateGroup,[t]),t.addLayers(this.selectedLayers),this.exitSelectMode(),t.activate();break;case l.OFF:var n=this.mainContainer.getSelectedLayer();n.group instanceof e.Group?n.group.activate():(t=new e.Group(this,this.mainContainer,{},null),t.create(),i.history.addSimple(this,this.historyDeleteGroup,this.historyCreateGroup,[t]),t.addLayers([n]),t.activate());break;case l.GROUP:}},r.prototype.createRow=function(t){var i=new e.Row(this,t,{});return i.create(),i.hightlightStructure(),{layer:i}},r.prototype.createCol=function(t){var e=t,i=null;if(this.isCol(e))i=e.group.createCol();else if(this.isRow(e))i=e.createCol();else{if(!this.isCol(e.group))return this.createRow(t);i=e.group.group.createCol()}return i.activate(null),{layer:i}},r.prototype.preventActivationBubbling=function(){return this.shouldPreventActivationBubble?!1:(this.shouldPreventActivationBubble=!0,!0)},r.prototype.allowActivation=function(){this.shouldPreventActivationBubble=!1},r.prototype.hotkeys=function(){t(window).on({keydown:t.proxy(function(e){if(!("TEXTAREA"==e.target.tagName||"INPUT"==e.target.tagName||i.layerAnimationManager&&i.layerAnimationManager.timelineControl&&i.layerAnimationManager.timelineControl.isActivated())){var n=this.mainContainer.getSelectedLayer(),r=e.keyCode;if(r>=49&&57>=r){var l=e.originalEvent.location||e.originalEvent.keyLocation||0;3==l&&(r+=48)}if(n)if(46==r||8==r)this["delete"](),e.preventDefault();else if(35==r)this.duplicate(),e.preventDefault();else if(16==r)s[r]=1;else if(38==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveY",[-1*(s[16]?10:1)])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(40==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveY",[s[16]?10:1])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(37==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveX",[-1*(s[16]?10:1)])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(39==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveX",[s[16]?10:1])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(r>=97&&105>=r){var d=o[r],c=a[r],p=!1;this.layerOptions.forms.placement.absolute.align.val()==d&&this.layerOptions.forms.placement.absolute.valign.val()==c&&(p=!0),this.layerOptions.layerFeatures.horizontalAlign(d,p),this.layerOptions.layerFeatures.verticalAlign(c,p)}else if(65==r){e.preventDefault();var u=this.mainContainer.getSelectedLayer();u&&"absolute"==u.placement.getType()&&u.placement.current.fit()}(e.ctrlKey||e.metaKey)&&(90==r?e.shiftKey?i.history.redo()&&e.preventDefault():i.history.undo()&&e.preventDefault():71==r?(this.createGroupFromSelected(),e.preventDefault()):68==r?(e.preventDefault(),this.slideEditManager.copySlide()):70==r?(e.preventDefault(),this.slideEditManager.pasteSlide()):67==r?this.copy():86==r&&this.paste())}},this),keyup:t.proxy(function(t){"undefined"!=typeof s[t.keyCode]&&s[t.keyCode]&&(clearInterval(s[t.keyCode]),s[t.keyCode]=0)},this)})},r.prototype.getSelf=function(){return this},r}),N2Require("CanvasUserInterface",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.canvasManager=e,this.isShown=!t.jStorage.get("ssLayersShown",!1),this.tlHeight=t.jStorage.get("ssLayersHeight")||200,this.$container=t("#n2-ss-layers"),this.fixScroll(),this.switchLayerList(),this.topBar=t(".n2-ss-layer-list-top-bar").on("mousedown",t.proxy(this.resizeStart,this)),this.topBar.find(".n2-ss-layer-list-opener").on("click",t.proxy(function(t){t.preventDefault(),this.switchLayerList()},this)),t(".n2-ss-slide-show-layers").on("click",t.proxy(function(t){t.preventDefault(),this.switchLayerList()},this)),this.onResize(),t(window).on("resize",t.proxy(this.onResize,this))}return r.prototype.onResize=function(){var t=this.$container.height();this.paneLeft.height(t-48),this.paneRight.height(t-48)},r.prototype.onActivateLayer=function(t){var e=this.paneLeft.scrollTop(),i=0,n=t;do i+=n.layerRow.get(0).offsetTop,n=n.group;while(n!==this.canvasManager.mainContainer);(e>i||i>e+this.paneLeft.height()-40)&&(this.paneLeft.scrollTop(i),this.paneRight.scrollTop(i))},r.prototype.fixScroll=function(){this.paneLeft=t(".n2-ss-layers-sidebar-rows"),this.paneRight=t(".n2-ss-timeline-content-layers-container");var e=t.proxy(function(t){var e=this.paneLeft.scrollTop();t.originalEvent.deltaY>0?e+=40:e-=40,e=40*Math.round(e/40),this.paneLeft.scrollTop(e),this.paneRight.scrollTop(e),t.preventDefault()},this);this.paneLeft.on("mousewheel",e),this.paneLeft.on("scroll",t.proxy(function(t){var e=this.paneLeft.scrollTop();this.paneRight.scrollTop(e),t.preventDefault()},this)),this.paneRight.on("mousewheel",e)},r.prototype.resizeStart=function(e){this.isShown&&(e.target==this.topBar[0]||t(e.target).hasClass("n2-h2"))&&(e.preventDefault(),this.startY=e.clientY,this.height=this.$container.height(),t("body").on({"mousemove.n2-ss-tl-resize":t.proxy(this.resizeMove,this),"mouseup.n2-ss-tl-resize":t.proxy(this.resizeStop,this),"mouseleave.n2-ss-tl-resize":t.proxy(this.resizeStop,this)}))},r.prototype.resizeMove=function(t){t.preventDefault(),this.setTLHeight(this._calculateDesiredHeight(t))},r.prototype.resizeStop=function(e){e.preventDefault(),t("body").off(".n2-ss-tl-resize");var i=this._calculateDesiredHeight(e);this.setTLHeight(i),this.tlHeight=i,t.jStorage.set("ssLayersHeight",i),t("#n2-admin").triggerHandler("resize")},r.prototype._calculateDesiredHeight=function(t){var e=this.startY-t.clientY+this.height-48;return this.__calculateDesiredHeight(e)},r.prototype.__calculateDesiredHeight=function(t){return 40*Math.round(Math.min(Math.max(40,t),(window.innerHeight||document.documentElement.clientHeight)/2)/40)+48},r.prototype.switchLayerList=function(){this.isShown=!this.isShown,this.$container.toggleClass("n2-active",this.isShown),this.isShown?this.setTLHeight(this.tlHeight):this.setTLHeight(48),t.jStorage.set("ssLayersShown",this.isShown)},r.prototype.setTLHeight=function(t){t=Math.max(48,t),this.$container.height(t),t=this.$container.height(),this.paneLeft.height(t-48),this.paneRight.height(t-48),nextend.triggerResize()},r.prototype.activateAdd=function(t,e){this.$add.css({left:t,top:e}).appendTo(this.$container)},r}),N2Require("LayerFeatures",[],["smartSlider"],function(t,e,i,n){"use strict";function r(t,e){this.fields=t,this.canvasManager=e,this.initParentLinker(),this.initAlign(),this.initEvents()}var s={left:0,center:1,right:2,top:0,middle:1,bottom:2};return r.prototype.initParentLinker=function(){var e=this.fields.parentid.data("field");t("#n2-ss-layer-parent-linker").on({click:function(t){e.click(t)}})},r.prototype.initAlign=function(){this.layerDefault={align:null,valign:null};var e=t("#n2-ss-layer-horizontal-align .n2-radio-option"),i=t("#n2-ss-layer-vertical-align .n2-radio-option");e.add(i).on("click",t.proxy(function(n){if(n.ctrlKey||n.metaKey){var r=t(n.currentTarget),s=r.hasClass("n2-sub-active"),o=r.data("align");switch(o){case"left":case"center":case"right":e.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-horizontal-align",null),this.layerDefault.align=null):(t.jStorage.set("ss-item-horizontal-align",o),this.layerDefault.align=o,r.addClass("n2-sub-active"));break;case"top":case"middle":case"bottom":i.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-vertical-align",null),this.layerDefault.valign=null):(t.jStorage.set("ss-item-vertical-align",o),this.layerDefault.valign=o,r.addClass("n2-sub-active"))}}else if(this.canvasManager.mainContainer.getSelectedLayer()){var o=t(n.currentTarget).data("align");switch(o){case"left":case"center":case"right":this.horizontalAlign(o,!0);break;case"top":case"middle":case"bottom":this.verticalAlign(o,!0)}}},this)),this.fields.align.on("nextendChange",t.proxy(function(){switch(e.removeClass("n2-active"),this.fields.align.val()){case"left":e.eq(0).addClass("n2-active");break;case"center":e.eq(1).addClass("n2-active");break;case"right":e.eq(2).addClass("n2-active")}},this)),this.fields.valign.on("nextendChange",t.proxy(function(){switch(i.removeClass("n2-active"),this.fields.valign.val()){case"top":i.eq(0).addClass("n2-active");break;case"middle":i.eq(1).addClass("n2-active");break;case"bottom":i.eq(2).addClass("n2-active")}},this));var n=t.jStorage.get("ss-item-horizontal-align",null),r=t.jStorage.get("ss-item-vertical-align",null);null!=n&&(e.eq(s[n]).addClass("n2-sub-active"),this.layerDefault.align=n),null!=r&&(i.eq(s[r]).addClass("n2-sub-active"),this.layerDefault.valign=r)},r.prototype.horizontalAlign=function(t,e){this.fields.align.val()!=t?this.fields.align.data("field").options.eq(s[t]).trigger("click"):e&&this.fields.left.val(0).trigger("change")},r.prototype.verticalAlign=function(t,e){this.fields.valign.val()!=t?this.fields.valign.data("field").options.eq(s[t]).trigger("click"):e&&this.fields.top.val(0).trigger("change")},r.prototype.initEvents=function(){var e=t("#n2-tab-events"),i=e.find(".n2-h3"),n=i.html(),r=t('<div class="n2-editor-header n2-h2 n2-uc"><span>'+n+"</span></div>");i.replaceWith(r)},r}),N2Require("LayerWindow",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.isMinimized=!1,this.detachedPosition={left:t.jStorage.get("ssPanelLeft")||100,top:t.jStorage.get("ssPanelTop")||100,height:t.jStorage.get("ssPanelHeight")||400},this.autoPosition=t.jStorage.get("ssPanelAutoPosition",1),this.hasBreadcrumb=!1,this.lastHeight=this.detachedPosition.height,this.admin=t("#n2-admin"),this.sidebar=t("#n2-ss-layer-window").on("mousedown",t.proxy(nextend.context.setMouseDownArea,nextend.context,"sidebarClicked")),this.title=this.sidebar.find(".n2-ss-layer-window-title-inner"),this.sidebarTD=this.sidebar.parent(),this.canvasManager=e,i.layerWindow=this,this.viewPanes={layerEdit:t("#n2-tabbed-slide-editor-settings > .n2-tabs").addClass("n2-scrollable")};for(var n in this.viewPanes)this.viewPanes[n].on("DOMMouseScroll mousewheel",function(e){var i=!1;e.originalEvent&&(e.originalEvent.wheelDelta&&(i=e.originalEvent.wheelDelta/-1<0),e.originalEvent.deltaY&&(i=e.originalEvent.deltaY<0),e.originalEvent.detail&&(i=e.originalEvent.detail<0));var n=function(){return e.stopPropagation(),e.preventDefault(),e.returnValue=!1,!1};return!i&&this.scrollHeight<=t(this).innerHeight()+this.scrollTop+1?n():i&&0>=this.scrollTop-1?n():void 0});this.panelHeading=t("#n2-tabbed-slide-editor-settings").find(".n2-sidebar-tab-switcher .n2-td");var r=this.sidebar.find(".n2-ss-layer-window-title-nav-left");t('<a href="#"><i class="n2-i n2-i-minimize n2-i-grey-opacity"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.toggleMinimize()},this)).appendTo(r);var s=this.sidebar.find(".n2-ss-layer-window-title-nav-right");this.magnet=t('<a href="#"><i class="n2-i n2-i-magnet n2-i-grey-opacity" data-n2tip="Auto position layer window"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.magnetize()},this)).css("display","none").appendTo(s),t('<a href="#"><i class="n2-i n2-i-closewindow n2-i-grey-opacity"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.hide()},this)).appendTo(s),nextend.tooltip.add(s),this.$breadcrumb=t('<div class="n2-ss-layer-window-breadcrumb"></div>').insertAfter("#n2-tabbed-slide-editor-settings > .n2-sidebar-tab-switcher");var o=t("#n2-ss-add-sidebar");t(".n2-ss-add-layer-button").on("click",function(e){e.preventDefault(),t("#n2-ss-layers-switcher > .n2-labels .n2-td").eq(0).trigger("click"),o.toggleClass("n2-active")}),t(".n2-ss-core-item").on("click",function(t){o.removeClass("n2-active")});var a=t("#wpadminbar, .navbar-fixed-top").height()+t(".n2-top-bar").height();this.$verticalBarInner=t(".n2-ss-add-sidebar-inner").each(function(){var e=t(this);e.fixTo(e.parent(),{top:a})}),this.$resizeInnerContainer=t("#n2-ss-layers-switcher_0, #n2-ss-layers-switcher_1"),this.extraHeightToRemove=60,this.$resizeInnerContainer.length||(this.extraHeightToRemove=0,this.$resizeInnerContainer=this.$verticalBarInner),this.$resizeInnerContainer.css("overflow","auto"),this.detach(),t("#n2-admin").on("resize",t.proxy(this.resizeVerticalBar,this)),t(window).on("resize",t.proxy(this.onResize,this)),t(".n2-ss-slide-duplicate-layer").on("click",t.proxy(function(t){t.preventDefault(),this.duplicate()},this.canvasManager)),t(".n2-ss-slide-delete-layer").on("click",t.proxy(function(t){t.preventDefault(),this["delete"]()},this.canvasManager)),t("body").on("mousedown",t.proxy(function(t){"main"==nextend.context.getCurrentWindow()&&nextend.context.mouseDownArea===!1&&this.hide()},this));var l=t('<div id="n2-ss-devicespecific-settings"></div>'),h=nextend.smartSlider.frontend.responsive.parameters.deviceModes;for(var n in h)if(h[n]){var d=n.replace(/([A-Z])/g," $1").split(" "),c=d[0],p=d[1].toLowerCase();l.append('<i class="n2-i n2-it n2-i-mini-'+c+"-"+p+'" data-device="'+c+'" data-orientation="'+p+'"></i>')}var u={mouseenter:t.proxy(function(t){l.appendTo(t.currentTarget)},this),mouseleave:t.proxy(function(t){l.detach()},this)};this.sidebar.find("[data-devicespecific] label").prepend('<span class="n2-i n2-i-mini-desktop-portrait"></span>'),this.sidebar.find("[data-devicespecific] label").on(u),l.find(".n2-i").on({click:t.proxy(function(e){e.preventDefault();var i=t(e.currentTarget);t("#n2-ss-devices").find('[data-device="'+i.data("device")+'"][data-orientation="'+i.data("orientation")+'"]').trigger("click")},this)})}return r.prototype.toggleMinimize=function(){this.isMinimized=!this.isMinimized,this.sidebar.toggleClass("n2-ss-layer-window-minized",this.isMinimized),this.isMinimized||this.onResize()},r.prototype.magnetize=function(){if(!this.autoPosition){this.autoPosition=1,t.jStorage.set("ssPanelAutoPosition",1),this.magnet.css("display","none");var e=this.canvasManager.mainContainer.getSelectedLayer();e&&e.positionSidebar()}},r.prototype.show=function(e,i){this.setTitle(e),t("body").addClass("n2-ss-layer-edit-visible"),this.autoPosition&&this.sidebar.position({my:"left top",at:"right+10 top",collision:"flipfit",of:i.is(":visible")?i:"#n2-ss-layer-list"})},r.prototype._show=function(){t("body").addClass("n2-ss-layer-edit-visible")},r.prototype.hide=function(){t("body").removeClass("n2-ss-layer-edit-visible")},r.prototype.isVisible=function(){return t("body").hasClass("n2-ss-layer-edit-visible")},r.prototype.hideWithDeferred=function(e){t("body").hasClass("n2-ss-layer-edit-visible")&&(this.hide(),e.done(t.proxy(this._show,this)))},r.prototype.setTitle=function(t){this.title.html(t.getName()),this.updateGroupTitle(t)},r.prototype.updateGroupTitle=function(e){var i;for(this.$breadcrumb.html(""),i=0;5>i&&(t('<span class="n2-window-title-structure-nav"><span>'+e.label+'</span><span class="n2-i n2-it n2-i-mini-arrow-thin"></span></span>').on({mouseenter:t.proxy(function(){this.canvasManager.highlight(this)},e),mouseleave:t.proxy(function(){this.canvasManager.deHighlight(this)},e),click:t.proxy(function(t){this.canvasManager.deHighlight(this),this.activate(t)},e)}).prependTo(this.$breadcrumb),e.group&&e.group!==this.canvasManager.mainContainer);i++)e=e.group;this.hasBreadcrumb=i>0,this.$breadcrumb.toggleClass("n2-has-breadcrumb",this.hasBreadcrumb),this.onResize()},r.prototype.getLayerEditExcludedHeight=function(){return 85+(this.hasBreadcrumb?23:0)},r.prototype.resizeVerticalBar=function(){this.$resizeInnerContainer.height((window.innerHeight||document.documentElement.clientHeight)-(t("#n2-ss-layers").is(":visible")&&t("#n2-ss-layers").hasClass("n2-active")?t("#n2-ss-layers").height():0)-t("#wpadminbar, .navbar-fixed-top").height()-t(".n2-top-bar").height()-this.extraHeightToRemove)},r.prototype.onResize=function(){this.sidebar.css("display","block"),this.resizeVerticalBar();var t=window.innerHeight||document.documentElement.clientHeight,e=this.sidebar.height()-this.getLayerEditExcludedHeight();this.viewPanes.layerEdit.height(e);var i={},n=window.innerWidth||document.documentElement.clientWidth,r=this.sidebar[0].getBoundingClientRect();r.left<0?i.left=0:r.left+r.width>n&&(i.left=Math.max(0,n-r.width)),r.height>t-r.top&&(i.top=t-r.top-r.height+r.top,i.top<0&&(this.lastHeight=i.height=r.height+i.top,i.top=0)),this.sidebar.css(i),this.sidebar.css("display","")},r.prototype.detach=function(){this.autoPosition?(this.sidebar.css("height",this.detachedPosition.height),
|
5 |
+
this.magnet.css("display","none")):(this.sidebar.css(this.detachedPosition),this.magnet.css("display","inline-block")),this.sidebar.appendTo(this.admin),this.admin.addClass("n2-sidebar-hidden"),t(window).off(".n2-ss-panel"),this.sidebar.removeClass("n2-sidebar-fixed"),this.sidebar.draggable({distance:5,handle:".n2-ss-layer-window-title",containment:"window",stop:t.proxy(function(e,i){this.sidebar.css("height",this.lastHeight);var n=this.sidebar[0].getBoundingClientRect();this.detachedPosition.left=n.left,this.detachedPosition.top=n.top,t.jStorage.set("ssPanelLeft",n.left),t.jStorage.set("ssPanelTop",n.top),this.autoPosition=0,t.jStorage.set("ssPanelAutoPosition",0),this.magnet.css("display","inline-block")},this),scroll:!1}).resizable({distance:5,handles:"s",stop:t.proxy(function(e,i){this.lastHeight=this.detachedPosition.height=this.sidebar.height(),t.jStorage.set("ssPanelHeight",this.detachedPosition.height)},this),create:t.proxy(function(e,i){t(e.target).find(".ui-resizable-handle").addClass("n2-ss-layer-window-resizer")},this)}),this.onResize(),nextend.triggerResize()},r.prototype.switchTab=function(t){this.panelHeading.filter('[data-tab="'+t+'"]').trigger("click")},r}),N2Require("PositionDisplay",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){this.currentSource="",t(window).ready(t.proxy(this.ready,this))}return r.prototype.ready=function(){this.$body=t("body"),this.$el=t('<div class="n2 n2-ss-position-display"/>').appendTo("body")},r.prototype.show=function(t){""==this.currentSource&&(this.currentSource=t,this.$el.addClass("n2-active"),this.$body.addClass("n2-position-display-active"))},r.prototype.update=function(t,e,i){this.currentSource==e&&this.$el.html(i).css({left:t.pageX+10,top:t.pageY+10})},r.prototype.hide=function(t){this.currentSource!=t&&t!==n||(this.$body.removeClass("n2-position-display-active"),this.$el.removeClass("n2-active"),this.currentSource="")},i.positionDisplay=new r,r}),N2Require("Ruler",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.showGuides=1,this.guides=[],this.container=t('<div class="n2-ruler-container" />').appendTo("#n2-ss-slide-canvas-container-inner .n2-ss-slider-outer-container"),this.scale=10,this.vertical=t('<div class="n2-ruler n2-ruler-vertical unselectable"></div>').appendTo(".n2-ss-slider-real-container"),this.horizontal=t('<div class="n2-ruler n2-ruler-horizontal unselectable"></div>').appendTo(this.container),this.verticalSpans=t(),this.horizontalSpans=t(),this.onResize(),nextend.smartSlider.frontend.sliderElement.on("SliderResize",t.proxy(this.onSliderResize,this)),t(window).on("resize",t.proxy(this.onResize,this)),this.horizontal.on("mousedown",t.proxy(function(t){this.showGuides&&new o(this,this.horizontal,t)},this)),this.vertical.on("mousedown",t.proxy(function(t){this.showGuides&&new a(this,this.vertical,t)},this));try{e=t.extend({vertical:[],horizontal:[]},JSON.parse(Base64.decode(e)));for(var i=0;i<e.horizontal.length;i++){var n=new o(this,this.horizontal);n.setPosition(e.horizontal[i])}for(var i=0;i<e.vertical.length;i++){var n=new a(this,this.vertical);n.setPosition(e.vertical[i])}}catch(r){}nextend.ruler=this,this.measureToolVertical(),this.measureToolHorizontal()}function s(e,i,n){this.ruler=e,this.container=i,this.position=0,this.guide=t('<div class="n2-ruler-guide n2-ruler-user-guide"><div class="n2-ruler-guide-border"></div><div class="n2-ruler-guide-handle"></div></div>').appendTo(i).on("mousedown",t.proxy(function(t){t.preventDefault(),t.stopPropagation(),nextend.smartSlider.canvasManager.canvasSettings.settings["n2-ss-lock-guides"]||this["delete"]()},this)),this.ruler.addGuide(this),n&&this.create(n)}function o(){s.prototype.constructor.apply(this,arguments)}function a(){s.prototype.constructor.apply(this,arguments)}return r.prototype.addGuide=function(t){this.guides.push(t)},r.prototype.removeGuide=function(e){this.guides.splice(t.inArray(e,this.guides),1)},r.prototype.clearGuides=function(){for(var t=this.guides.length-1;t>=0;t--)this.guides[t]["delete"]()},r.prototype.onSliderResize=function(t,e){this.onResize()},r.prototype.onResize=function(){var e=nextend.smartSlider.frontend.responsive.responsiveDimensions,i=Math.max(e.slider.width,t("#n2-ss-slide-canvas-container").outerWidth(!0)-40),n=Math.max(e.slider.height,t("#n2-ss-slide-canvas-container").outerHeight(!0));this.container.css({width:i+40,height:n+40});for(var r=this.horizontalSpans.length-3;r<i/this.scale;r++){var s=t("<span />").appendTo(this.horizontal);r%10==0?s.addClass("n2-ss-ruler-mark-large").append("<span>"+r/10*100+"</span>"):r%2==0&&s.addClass("n2-ss-ruler-mark-medium"),this.horizontalSpans=this.horizontalSpans.add(s)}for(var r=this.verticalSpans.length-3;r<n/this.scale;r++){var s=t("<span />").appendTo(this.vertical);r%10==0?s.addClass("n2-ss-ruler-mark-large").append("<span>"+r/10*100+"</span>"):r%2==0&&s.addClass("n2-ss-ruler-mark-medium"),this.verticalSpans=this.verticalSpans.add(s)}},r.prototype.toArray=function(){for(var t={horizontal:[],vertical:[]},e=0;e<this.guides.length;e++)this.guides[e]instanceof o?t.horizontal.push(this.guides[e].position):this.guides[e]instanceof a&&t.vertical.push(this.guides[e].position);return t},r.prototype.measureToolVertical=function(){var e=t('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>').css("display","none").appendTo(this.vertical),n=!1,r=t.proxy(function(){n||(n=!0,e.css("display",""),i.positionDisplay.show("Guide"))},this),s=t.proxy(function(){n&&(n=!1,e.css("display","none"),i.positionDisplay.hide("Guide"))},this);this.vertical.on({mouseenter:t.proxy(function(n){if(this.showGuides){var o=0,a=Math.round(this.vertical.offset().top);r(),this.vertical.on("mousemove.n2-ruler-measure-tool",t.proxy(function(n){if(t(n.target).hasClass("n2-ruler-guide-border")&&t(n.target).parent()[0]!=e[0])s();else if(r(),o!=n.pageY){var l=n.pageY-a;e.css("top",l),i.positionDisplay.update(n,"Guide",l-40+"px"),o=n.pageY}},this))}},this),mouseleave:t.proxy(function(){this.vertical.off(".n2-ruler-measure-tool"),s()},this)})},r.prototype.measureToolHorizontal=function(){var e=t('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>').css("display","none").appendTo(this.horizontal),n=!1,r=t.proxy(function(){n||(n=!0,e.css("display",""),i.positionDisplay.show("Guide"))},this),s=t.proxy(function(){n&&(n=!1,e.css("display","none"),i.positionDisplay.hide("Guide"))},this);this.horizontal.on({mouseenter:t.proxy(function(n){if(this.showGuides){var o=0,a=Math.round(this.horizontal.offset().left);r(),this.horizontal.on("mousemove.n2-ruler-measure-tool",t.proxy(function(n){if(t(n.target).hasClass("n2-ruler-guide-border")&&t(n.target).parent()[0]!=e[0])s();else if(r(),o!=n.pageX){var l=Math.max(n.pageX-a,40);e.css("left",l),i.positionDisplay.update(n,"Guide",l-40+"px"),o=n.pageX}},this))}},this),mouseleave:t.proxy(function(){this.horizontal.off(".n2-ruler-measure-tool"),s()},this)})},s.prototype._position=function(t,e){return Math.max(0,t)},s.prototype.setPosition=function(t){this.position=t,this.refresh()},s.prototype.refresh=function(){this.positionRender(this.position)},s.prototype["delete"]=function(){this.ruler.removeGuide(this),this.guide.remove()},o.prototype=Object.create(s.prototype),o.prototype.constructor=o,o.prototype.create=function(t){var e=Math.round(this.container.offset().left)+40;this.position=this._position(t.pageX-e,t),this.positionRender(this.position)},o.prototype.rawPositionRender=function(t){this.guide.css("left",Math.max(0,t)+40)},o.prototype.positionRender=function(t){this.guide.css("left",Math.max(0,t)+40)},a.prototype=Object.create(s.prototype),a.prototype.constructor=a,a.prototype.create=function(t){var e=Math.round(this.container.offset().top)+40;this.position=this._position(t.pageY-e,t),this.positionRender(this.position)},a.prototype.rawPositionRender=function(t){this.guide.css("top",Math.max(0,t)+40)},a.prototype.positionRender=function(t){this.guide.css("top",Math.max(0,t)+40)},r}),N2Require("CanvasSettings",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.canvasManager=e,this.settings={};var i=t("#n2-ss-slide-canvas-settings").on("mouseleave",t.proxy(function(){i.removeClass("n2-active")},this));i.find("> a").on("click",function(t){t.preventDefault(),i.toggleClass("n2-active")}),this.$settingsPanel=i.find(".n2-ss-settings-panel-inner"),this.snapTo(),this.roundTo(),this.colorScheme(),this.canvasManager.slideEditManager.options.isAddSample||this.ruler()}return r.prototype._addSettings=function(e,i,n,r){this.settings[e]=parseInt(t.jStorage.get(e,n));var s=t('<a href="">'+i+'<span class="n2-setting-tick"><i class="n2-i n2-it n2-i-tick2"></i></span></a>').on("click",t.proxy(function(i){i.preventDefault(),this.settings[e]=1==this.settings[e]?0:1,t.jStorage.set(e,this.settings[e]),s.toggleClass("n2-setting-enabled",1==this.settings[e]),r(this.settings[e],!1)},this)).appendTo(this.$settingsPanel);s.toggleClass("n2-setting-enabled",1==this.settings[e]),r(this.settings[e],!0)},r.prototype._addAction=function(e,i){t('<a href="" class="n2-panel-action">'+e+"</a>").on("click",t.proxy(function(t){t.preventDefault(),i()},this)).appendTo(this.$settingsPanel)},r.prototype.get=function(t){return this.settings[t]},r.prototype.snapTo=function(){this._addSettings("n2-ss-snap-to-enabled",n2_("Smart Snap"),1,t.proxy(function(t){for(var e=this.mainContainer.container.getSortedLayers(),i=0;i<e.length;i++)e[i].placement.doAction("snap")},this.canvasManager))},r.prototype.roundTo=function(){this._addSettings("n2-ss-round-to-enabled",n2_("Round to 5px"),1,function(t){1==t?nextend.roundTo=5:nextend.roundTo=1})},r.prototype.colorScheme=function(){var e=t("#n2-ss-slide-canvas-container");this._addSettings("n2-ss-theme-dark",n2_("Dark Mode"),0,function(t){e.toggleClass("n2-ss-theme-dark",1==t)})},r.prototype.ruler=function(){i.ruler=new e.Ruler(t("#slideguides").val());var n=t("#n2-ss-slide-canvas-container");this._addSettings("n2-ss-ruler-enabled",n2_("Ruler"),1,t.proxy(function(t){n.toggleClass("n2-ss-has-ruler",1==t),nextend.triggerResize()},this)),this._addSettings("n2-ss-show-guides",n2_("Show Guides"),1,t.proxy(function(t){nextend.ruler.showGuides=t,n.toggleClass("n2-ss-show-guides",1==t)},this)),this._addSettings("n2-ss-lock-guides",n2_("Lock Guides"),0,t.proxy(function(t){n.toggleClass("n2-ss-lock-guides",1==t)},this)),this._addAction("Clear Guides",t.proxy(function(){nextend.ruler.clearGuides()},this))},r}),N2Require("PlacementAbsolute",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="absolute",this.transferredProperties={},e.PlacementAbstract.prototype.constructor.apply(this,arguments),this.doThrottledTheResize=this.doTheResize,this._triggerLayerResizedThrottled=NextendThrottle(this._triggerLayerResized,30),this.parentIsVisible=!0,this.children=[]}var s=function(){var t=0;return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){var i,n=(new Date).getTime();return i=Math.max(0,16-(n-t)),t=n+i,setTimeout(function(){e(n+i)},i)}}(),o={raf:!1,ratios:null,isThrottled:!1,layers:[]},a=function(){o.raf===!1&&(o.raf=!0,s(function(){for(var t=0;t<o.layers.length;t++)o.layers[t].isDeleted||o.layers[t].doTheResize(o.ratios,!0,o.isThrottled);o={raf:!1,ratios:null,isThrottled:!1,layers:[]}}))};return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer,this.$layerRow=this.layer.layerRow},r.prototype.preActivation=function(t){if("normal"==t.type){var e=this.layer.getProperty("height");e>0&&(this.transferredProperties.height=e)}},r.prototype.activated=function(e){var i=this.$layer.data("parentid");if(i){var n=t("#"+i);n.length>0?this.activatedAfterParentReady(e):setTimeout(t.proxy(function(){this.activatedAfterParentReady(e)},this),300)}else this._activated(e)},r.prototype.activatedAfterParentReady=function(e){var i=this.$layer.data("parentid");if(i){var n=t("#"+i);if(n.length>0){var r=n.data("layerObject");r?r.readyDeferred.done(t.proxy(this._activated,this,e)):n.on("layerStarted",t.proxy(function(i,n){n.readyDeferred.done(t.proxy(this._activated,this,e))},this))}else this.$layer.data("parentid",""),this._activated(e)}else this._activated(e)},r.prototype._activated=function(e){this.loadProperties(t.extend(e,this.transferredProperties)),this.transferredProperties={},this.$layer.css("zIndex",""),this.___makeLayerAlign(),this.___makeLayerResizeable()},r.cleanLayer=function(t){var e=["desktopPortrait","desktopLandscape","tabletPortrait","tabletLandscape","mobilePortrait","mobileLandscape"];t.removeAttr("data-align").removeAttr("data-valign").css({left:"",top:"",right:"",bottom:"",width:"",height:"","text-align":""});for(var i=["parentid","responsiveposition","responsivesize","parentalign","parentvalign","align","valign","left","top","width","height"],n={},r=0;r<i.length;r++){var s=i[r].toLowerCase();n[s]=t.data(s),t.removeAttr(s),t.removeData(s);for(var o=0;o<e.length;o++){var a=e[o].toLowerCase();n[a+s]=t.data(a+s),t.removeAttr(a+s),t.removeData(a+s)}}return n},r.prototype.deActivated=function(t){this.$layer.removeAttr("data-align").removeAttr("data-valign").css({left:"",top:"",right:"",bottom:"",width:"",height:"","text-align":""}),this.alignMarker.remove(),this.$layer.nextendResizable("destroy"),this.$layer.off(".n2-ss-absolute"),this.$layer.triggerHandler("LayerUnavailable");var e=["parentid","responsiveposition","responsivesize","parentalign","parentvalign","align","valign","left","top","width","height"],i=this.layer.getPropertiesData(e);return this.layer.removeProperties(e),this.chainParent.remove(),i},r.prototype.loadProperties=function(e){this.layer.createProperty("parentid",null,this.layer.layer,this),this.layer.createProperty("responsiveposition",1,this.layer.layer,this),this.layer.createProperty("responsivesize",1,this.layer.layer,this),this.layer.createDeviceProperty("parentalign",{desktopPortrait:"center"},this.layer.layer,this),this.layer.createDeviceProperty("parentvalign",{desktopPortrait:"middle"},this.layer.layer,this),this.layer.createDeviceProperty("align",{desktopPortrait:e.align||"center"},this.layer.layer,this),this.layer.createDeviceProperty("valign",{desktopPortrait:e.valign||"middle"},this.layer.layer,this),this.layer.createDeviceProperty("left",{desktopPortrait:e.left||0},this.layer.layer,this),this.layer.createDeviceProperty("top",{desktopPortrait:e.top||0},this.layer.layer,this),this.layer.createDeviceProperty("width",{desktopPortrait:e.width||"auto"},this.layer.layer,this),this.layer.createDeviceProperty("height",{desktopPortrait:e.height||"auto"},this.layer.layer,this);var i=this.layer.layer;this.subscribeParentCallbacks={},this.layer.getProperty("parentid")&&this.subscribeParent(),i.attr({"data-align":this.layer.getProperty("align"),"data-valign":this.layer.getProperty("valign")});var n=null;this.chainParent=t('<div class="n2-ss-layer-chain-parent n2-button n2-button-icon n2-button-xs n2-radius-s n2-button-blue"><i class="n2-i n2-i-layerunlink"></i></div>').on({click:t.proxy(this.unlink,this),mouseenter:t.proxy(function(){n=t("#"+this.layer.getProperty("parentid")).addClass("n2-highlight")},this),mouseleave:t.proxy(function(){n&&(n.removeClass("n2-highlight"),n=null)},this)}).appendTo(this.$layer)},r.prototype.triggerLayerResized=function(t,e){t?this._triggerLayerResized(t,e):this._triggerLayerResizedThrottled(!0,e)},r.prototype._triggerLayerResized=function(t,e){this.layer.isDeleted||this.$layer.triggerHandler("LayerResized",[e||{slideW:this.canvasManager.getResponsiveRatio("h"),slideH:this.canvasManager.getResponsiveRatio("v")},t||!1])},r.prototype.___makeLayerAlign=function(){this.alignMarker=t('<div class="n2-ss-layer-cc" />').appendTo(this.$layer)},r.prototype.___makeLayerResizeable=function(){this._resizableJustClick=!1,this.$layer.nextendResizable({handles:"n, e, s, w, ne, se, sw, nw",_containment:this.canvasManager.mainContainer.layer,start:t.proxy(this.____makeLayerResizeableStart,this),resize:t.proxy(this.____makeLayerResizeableResize,this),stop:t.proxy(this.____makeLayerResizeableStop,this),create:t.proxy(function(){this.$layer.find(".ui-resizable-handle, .n2-ss-layer-cc").on({mousedown:t.proxy(function(t){this._resizableJustClick=[t.clientX,t.clientY]},this),mouseup:t.proxy(function(e){if(this._resizableJustClick&&Math.abs(Math.sqrt(Math.pow(this._resizableJustClick[0]-e.clientX,2)+Math.pow(this._resizableJustClick[1]-e.clientY,2)))<1){var i=t(e.currentTarget),n=this.canvasManager.layerOptions.layerFeatures;i.hasClass("ui-resizable-nw")?(n.horizontalAlign("left",!1),n.verticalAlign("top",!1)):i.hasClass("ui-resizable-w")?(n.horizontalAlign("left",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-sw")?(n.horizontalAlign("left",!1),n.verticalAlign("bottom",!1)):i.hasClass("ui-resizable-n")?(n.horizontalAlign("center",!1),n.verticalAlign("top",!1)):i.hasClass("n2-ss-layer-cc")?(n.horizontalAlign("center",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-s")?(n.horizontalAlign("center",!1),n.verticalAlign("bottom",!1)):i.hasClass("ui-resizable-ne")?(n.horizontalAlign("right",!1),n.verticalAlign("top",!1)):i.hasClass("ui-resizable-e")?(n.horizontalAlign("right",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-se")&&(n.horizontalAlign("right",!1),n.verticalAlign("bottom",!1))}this._resizableJustClick=!1},this)})},this),smartguides:t.proxy(function(){return this.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this),tolerance:5}).on({"mousedown.n2-ss-absolute":t.proxy(function(t){!this.layer.status!=e.ComponentAbstract.STATUS.LOCKED&&(i.positionDisplay.show("Canvas"),i.positionDisplay.update(t,"Canvas","W: "+parseInt(this.$layer.width())+"px<br />H: "+parseInt(this.$layer.height())+"px")),document.activeElement&&document.activeElement.blur()},this),"mouseup.n2-ss-absolute":t.proxy(function(t){i.positionDisplay.hide("Canvas")},this)})},r.prototype.____makeLayerResizeableStart=function(e,n){this.preventActivation=!0,this.resizableDeferred=t.Deferred(),this.canvasManager.layerWindow.hideWithDeferred(this.resizableDeferred),t("body").addClass("n2-ss-resize-layer"),this._resizableJustClick&&(this._resizableJustClick=!1),this.____makeLayerResizeableResize(e,n),i.positionDisplay.show("Canvas")},r.prototype.____makeLayerResizeableResize=function(t,e){i.positionDisplay.update(t,"Canvas","W: "+e.size.width+"px<br />H: "+e.size.height+"px"),this.triggerLayerResized()},r.prototype.____makeLayerResizeableStop=function(e,n){t("body").removeClass("n2-ss-resize-layer"),this.resizableDeferred.resolve();var r=!1;if("n"==n.axis||"s"==n.axis||n.originalSize.width==n.size.width){var s=this.layer.getProperty("width");this.layer.isDimensionPropertyAccepted(s)&&(r=!0,this._syncwidth())}var o=!1;if("e"==n.axis||"w"==n.axis||n.originalSize.height==n.size.height){var s=this.layer.getProperty("height");this.layer.isDimensionPropertyAccepted(s)&&(o=!0,this._syncheight())}var a=this.canvasManager.getResponsiveRatio("h"),l=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsivesize"))||(a=l=1);var h=null;r||(h=Math.round(n.size.width*(1/a)));var d=null;o||(d=Math.round(n.size.height*(1/l))),this._setPosition(null,null,n.position.left,n.position.top,h,d,!0),this.triggerLayerResized(),this.$layer.triggerHandler("LayerUnParent"),i.positionDisplay.hide("Canvas"),setTimeout(t.proxy(function(){this.preventActivation=!1},this),80)},r.prototype._setPosition=function(t,e,n,r,s,o,a){var l=this.layer.getMode();null===t&&(t=this.layer.getProperty("align")),null===e&&(e=this.layer.getProperty("valign")),null===n?n=this.layer.getProperty("left"):a&&(n=this.calculatePositionLeft(t,n)),null===r?r=this.layer.getProperty("top"):a&&(r=this.calculatePositionTop(e,r)),null===s&&(s=this.layer.getProperty("width")),null===o&&(o=this.layer.getProperty("height"));var h=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStorePosition",l]);h&&h.setValues({align:this.layer.getRawProperty("align"),valign:this.layer.getRawProperty("valign"),left:this.layer.getRawProperty("left"),top:this.layer.getRawProperty("top"),width:this.layer.getRawProperty("width"),height:this.layer.getRawProperty("height")},{align:t,valign:e,left:n,top:r,width:s,height:o}),i.history.off(),this.layer.store("left",n,!0,"layer"),this.layer.$.trigger("propertyChanged",["left",n]),this.layer.store("top",r,!0,"layer"),this.layer.$.trigger("propertyChanged",["top",r]),this.layer.store("width",s,!0,"layer"),this.layer.$.trigger("propertyChanged",["width",s]),this.layer.store("height",o,!0,"layer"),this.layer.$.trigger("propertyChanged",["height",o]),this.layer.store("align",t,!0,"layer"),this.layer.$.trigger("propertyChanged",["align",t]),this.layer.store("valign",e,!0,"layer"),this.layer.$.trigger("propertyChanged",["valign",e]),i.history.on()},r.prototype.historyStorePosition=function(t,e){this.layer.historyStore(t.align,"align",e),this.layer.historyStore(t.valign,"valign",e),this.layer.historyStore(t.width,"width",e),this.layer.historyStore(t.height,"height",e),this.layer.historyStore(t.left,"left",e),this.layer.historyStore(t.top,"top",e),this.triggerLayerResized()},r.prototype.calculatePositionLeft=function(t,e){var i=this.canvasManager.getResponsiveRatio("h");parseInt(this.layer.getProperty("responsiveposition"))||(i=1);var n=this.parent,r={left:0,leftMultiplier:1};if(n&&n.is(":visible")){var s=n.position();switch(this.layer.getProperty("parentalign")){case"right":r.left=s.left+n.width();break;case"center":r.left=s.left+n.width()/2;break;default:r.left=s.left}}else switch(n=this.$layer.parent(),t){case"center":r.left+=n.width()/2;break;case"right":r.left+=n.width()}var e;switch(t){case"left":e=-Math.round((r.left-e)*(1/i));break;case"center":e=-Math.round((r.left-e-this.$layer.width()/2)*(1/i));break;case"right":e=-Math.round((r.left-e-this.$layer.width())*(1/i))}return e},r.prototype.calculatePositionTop=function(t,e){var i=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsiveposition"))||(i=1);var n=this.parent,r={top:0,topMultiplier:1};if(n&&n.is(":visible")){var s=n.position();switch(this.layer.getProperty("parentvalign")){case"bottom":r.top=s.top+n.height();break;case"middle":r.top=s.top+n.height()/2;break;default:r.top=s.top}}else switch(n=this.$layer.parent(),t){case"middle":r.top+=n.height()/2;break;case"bottom":r.top+=n.height()}var e;switch(t){case"top":e=-Math.round((r.top-e)*(1/i));break;case"middle":e=-Math.round((r.top-e-this.$layer.height()/2)*(1/i));break;case"bottom":e=-Math.round((r.top-e-this.$layer.height())*(1/i))}return e},r.prototype.moveX=function(t){this._setPosition(null,null,this.layer.getProperty("left")+t,null,null,null,!1)},r.prototype.moveY=function(t){this._setPosition(null,null,null,this.layer.getProperty("top")+t,null,null,!1)},r.prototype.setPositionLeft=function(t){t=this.calculatePositionLeft(this.layer.getProperty("align"),t),this.layer.store("left",t,!0),this.layer.$.trigger("propertyChanged",["left",t])},r.prototype.setPositionTop=function(t){t=this.calculatePositionTop(this.layer.getProperty("valign"),t),this.layer.store("top",t,!0),this.layer.$.trigger("propertyChanged",["top",t])},r.prototype.setPosition=function(t,e){this.setPositionLeft(t),this.setPositionTop(e)},r.prototype.setDeviceBasedAlign=function(){var t=this.layer.getMode();"undefined"==typeof this.layer.deviceProperty[t].align&&this.layer.setProperty("align",this.layer.getProperty("align"),"layer"),"undefined"==typeof this.layer.deviceProperty[t].valign&&this.layer.setProperty("valign",this.layer.getProperty("valign"),"layer")},r.prototype.setPropertyresponsiveposition=r.prototype.setPropertyresponsivesize=function(t,e,i){this.layer._setProperty(t,parseInt(e),i)},r.prototype.setPropertywidth=r.prototype.setPropertyheight=function(e,i,n){var r=i;this.layer.isDimensionPropertyAccepted(i)||(r=~~i,r!=i&&this.layer.$.trigger("propertyChanged",[e,r])),setTimeout(t.proxy(function(){this.onResize(!1)},this),50),this.layer._setProperty(e,r,n)},r.prototype.setPropertyleft=r.prototype.setPropertytop=function(t,e,i){var n=~~e;n!=e&&this.layer.$.trigger("propertyChanged",[t,n]),this.layer._setProperty(t,n,i)},r.prototype.render=function(t){this["_sync"+t]()},r.prototype.renderWithModifier=function(t,e,i){try{"width"!=t&&"height"!=t||!this.layer.isDimensionPropertyAccepted(e)?this["_sync"+t](Math.round(e*i)):this["_sync"+t](e)}catch(n){console.error("_sync"+t)}},r.prototype.onResize=function(t){this.resize({slideW:this.canvasManager.getResponsiveRatio("h"),slideH:this.canvasManager.getResponsiveRatio("v")},t)},r.prototype.resize=function(t,e){this.parent&&!e||this.addToResizeCollection(this,t,!1)},r.prototype.addToResizeCollection=function(t,e,i){o.ratios=e,o.isThrottled=i;for(var n=0;n<o.layers.length;n++)if(o.layers[n]==this){o.layers.splice(n,1);break}o.layers.push(t),a(),this.triggerLayerResized(i,e)},r.prototype._syncresponsiveposition=function(){this.onResize(!1)},r.prototype._syncwidth=function(){var t=this.layer.getProperty("width");if(!this.layer.isDimensionPropertyAccepted(t)){if(parseInt(this.layer.getProperty("responsivesize"))){var e=this.canvasManager.getResponsiveRatio("h");t*=e}t+="px"}this.$layer.css("width",t)},r.prototype._syncheight=function(){var t=this.layer.getProperty("height");if(!this.layer.isDimensionPropertyAccepted(t)){if(parseInt(this.layer.getProperty("responsivesize"))){var e=this.canvasManager.getResponsiveRatio("v");t*=e}t+="px"}this.$layer.css("height",t)},r.prototype._syncparentalign=function(){var t=this.layer.getProperty("parentalign");this.$layer.data("parentalign",t);var e=this.getParent();e&&e.placement.current.onResize(!1)},r.prototype._syncparentvalign=function(){var t=this.layer.getProperty("parentvalign");this.$layer.data("parentvalign",t);var e=this.getParent();e&&e.placement.current.onResize(!1)},r.prototype._syncleft=function(){var t=this.layer.getProperty("left");if(parseInt(this.layer.getProperty("responsiveposition"))){var e=this.canvasManager.getResponsiveRatio("h");t*=e}if(this.parent&&this.parentIsVisible){var i=this.parent.position(),n=this.layer.getProperty("align"),r=this.layer.getProperty("parentalign"),s=0;switch(r){case"right":s=i.left+this.parent.width();break;case"center":s=i.left+this.parent.width()/2;break;default:s=i.left}switch(n){case"right":this.$layer.css({left:"auto",right:this.$layer.parent().width()-s-t+"px"});break;case"center":this.$layer.css({left:s+t-this.$layer.width()/2+"px",right:"auto"});break;default:this.$layer.css({left:s+t+"px",right:"auto"})}}else switch(this.layer.getProperty("align")){case"right":this.$layer.css({left:"auto",right:-t+"px"});break;case"center":this.$layer.css({left:this.$layer.parent().width()/2+t-this.$layer.width()/2+"px",right:"auto"});break;default:this.$layer.css({left:t+"px",right:"auto"})}this.triggerLayerResized()},r.prototype._synctop=function(){var t=this.layer.getProperty("top");if(parseInt(this.layer.getProperty("responsiveposition"))){var e=this.canvasManager.getResponsiveRatio("v");t*=e}if(this.parent&&this.parentIsVisible){var i=this.parent.position(),n=this.layer.getProperty("valign"),r=this.layer.getProperty("parentvalign"),s=0;switch(r){case"bottom":s=i.top+this.parent.height();break;case"middle":s=i.top+this.parent.height()/2;break;default:s=i.top}switch(n){case"bottom":this.$layer.css({top:"auto",bottom:this.$layer.parent().height()-s-t+"px"});break;case"middle":this.$layer.css({top:s+t-this.$layer.height()/2+"px",bottom:"auto"});break;default:this.$layer.css({top:s+t+"px",bottom:"auto"})}}else switch(this.layer.getProperty("valign")){case"bottom":this.$layer.css({top:"auto",bottom:-t+"px"});break;case"middle":this.$layer.css({top:this.$layer.parent().height()/2+t-this.$layer.height()/2+"px",bottom:"auto"});break;default:this.$layer.css({top:t+"px",bottom:"auto"})}this.triggerLayerResized()},r.prototype._syncresponsivesize=function(){this.onResize(!1)},r.prototype.historyStoreDoubleProp=function(t,e,i,n){var r=this.layer.getMode();e==r?(this.layer._setProperty(i,t.value,"history"),this.layer._setProperty(n,t.value2,"history")):(this.layer.deviceProperty[e][i]=t.value,this.layer.deviceProperty[e][n]=t.value2,this.layer.$.trigger("propertyChanged",[i,this.layer.getProperty(i)]),this.layer.$.trigger("propertyChanged",[n,this.layer.getProperty(n)]),this.layer.render(i,null,"history"),this.layer.render(n,null,"history"))},r.prototype.setPropertyalign=function(t,e,n){var r=this.layer.getProperty(t),s=this.layer.getRawProperty("left");i.history.off(),this.layer._setProperty(t,e,n),i.history.on();var o=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStoreDoubleProp",this.layer.getMode(),"align","left"]);o&&o.setValues({value:r,value2:s},{value:e,value2:this.layer.getRawProperty("left")})},r.prototype.setPropertyvalign=function(t,e,n){var r=this.layer.getProperty(t),s=this.layer.getRawProperty("top");i.history.off(),this.layer._setProperty(t,e,n),i.history.on();var o=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStoreDoubleProp",this.layer.getMode(),"valign","top"]);o&&o.setValues({value:r,value2:s},{value:e,value2:this.layer.getRawProperty("top")})},r.prototype._syncalign=function(t,e){var i=this.layer.getProperty("align");this.$layer.attr("data-align",i),"history"!=e&&i!=t&&this.setPositionLeft(this.$layer.position().left)},r.prototype._syncvalign=function(t,e){var i=this.layer.getProperty("valign");this.$layer.attr("data-valign",i),"history"!=e&&i!=t&&this.setPositionTop(this.$layer.position().top)},r.prototype.fit=function(){var t=this.$layer.get(0);this.$layer.position();if(t.scrollWidth>0&&t.scrollHeight>0){var e=!1;if(this.layer.item&&(e=this.layer.item.fitLayer()),!e){this.layer.setProperty("width","auto","layer"),this.layer.setProperty("height","auto","layer");var i=this.$layer.width();Math.abs(this.canvasManager.mainContainer.layer.width()-this.$layer.position().left-i)<2&&this.layer.setProperty("width",i,"layer")}}},r.prototype.hide=function(t){this.layer.store(t?t:this.layer.getMode(),0,!0)},r.prototype.show=function(t){this.layer.store(t?t:this.layer.getMode(),1,!0)},r.prototype.changeStatus=function(t,i){t==e.ComponentAbstract.STATUS.LOCKED&&this.layer.nextendResizable("enable"),i==e.ComponentAbstract.STATUS.LOCKED&&this.$layer.nextendResizable("disable")},r.prototype.getParent=function(){return t("#"+this.layer.getProperty("parentid")).data("layerObject")},r.prototype.subscribeParent=function(){var e=this,i=t("#"+this.layer.property.parentid);this.parent&&!i.is(this.parent)&&(this.parent.off(this.subscribeParentCallbacks),this.parent=!1),this.parent||(this.subscribeParentCallbacks={LayerResized:function(){e.resizeParent.apply(e,arguments)},LayerParent:function(){e.$layer.addClass("n2-ss-layer-parent"),e.$layer.triggerHandler("LayerParent")},LayerUnParent:function(){e.$layer.removeClass("n2-ss-layer-parent"),e.$layer.triggerHandler("LayerUnParent")},LayerDeleted:function(t){e.layer.setProperty("parentid","","layer")},LayerUnavailable:function(t){e.layer.setProperty("parentid","","layer"),e.layer.setProperty("left",0,"layer"),e.layer.setProperty("top",0,"layer")},LayerShowChange:function(t,i,n){e.layer.getMode()==i&&(e.parentIsVisible=n)},"n2-ss-activate":function(){e.$layerRow.addClass("n2-parent-active")},"n2-ss-deactivate":function(){e.$layerRow.removeClass("n2-parent-active")},LayerGetDataWithChildren:function(t,i,n){e.layer.getDataWithChildren(i,n)}},this.parent=i.on(this.subscribeParentCallbacks),this.parent.data("layerObject").placement.current.addChild(this),this.$layer.addClass("n2-ss-layer-has-parent"))},r.prototype.unSubscribeParent=function(t){if(this.$layerRow.removeClass("n2-parent-active"),this.$layer.removeClass("n2-ss-layer-has-parent"),this.parent&&(this.parent.off(this.subscribeParentCallbacks),this.parent=!1,this.subscribeParentCallbacks={},
|
6 |
+
"delete"!=t)){var e=this.$layer.position();this._setPosition(null,null,e.left,e.top,null,null,!0)}},r.prototype.addChild=function(t){this.children.push(t)},r.prototype.removeChild=function(e){this.children.splice(t.inArray(e,this.children),1)},r.prototype.unlink=function(t){t&&t.preventDefault(),this.layer.setProperty("parentid","","layer")},r.prototype.parentPicked=function(t,e,i,n,r){this.layer.setProperty("parentid","","layer"),this.layer.setProperty("align",n,"layer"),this.layer.setProperty("valign",r,"layer"),this.layer.setProperty("parentalign",e,"layer"),this.layer.setProperty("parentvalign",i,"layer"),this.layer.setProperty("parentid",t.requestID(),"layer");var s;for(var o in this.layer.deviceProperty)"desktopPortrait"!=o&&(this.layer.deviceProperty[o].left=s,this.layer.deviceProperty[o].top=s,this.layer.deviceProperty[o].valign=s,this.layer.deviceProperty[o].align=s)},r.prototype._syncparentid=function(){var e=this.layer.getProperty("parentid");if(e&&""!=e)if(0==t("#"+e).length)this.layer.setProperty("parentid","","layer");else{this.$layer.attr("data-parentid",e).addClass("n2-ss-layer-has-parent"),this.subscribeParent();var i=this.$layer.position();this._setPosition(null,null,i.left,i.top,null,null,!0)}else this.$layer.removeAttr("data-parentid"),this.unSubscribeParent()},r.prototype.snap=function(){this.$layer.nextendResizable("option","smartguides",t.proxy(function(){return this.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this))},r.prototype._renderModeProperties=function(t){this.$layer.attr("data-align",this.layer.property.align),this.$layer.attr("data-valign",this.layer.property.valign),t&&this.onResize(!0)},r.prototype.doLinearResize=function(t){this.doThrottledTheResize(t,!0)},r.prototype.doTheResize=function(t,e,i){this.render("width"),this.render("height"),this.render("left"),this.render("top"),e||this.triggerLayerResized(i,t)},r.prototype.resizeParent=function(t,e,i){this.addToResizeCollection(this,e,i)},r.prototype.updatePosition=function(){var t=this.parent;if("center"==this.layer.getProperty("align")){var e=0;e=t?t.position().left+t.width()/2:this.$layer.parent().width()/2;var i=this.canvasManager.getResponsiveRatio("h");parseInt(this.layer.getProperty("responsiveposition"))||(i=1),this.$layer.css("left",e-this.$layer.width()/2+this.layer.getProperty("left")*i)}if("middle"==this.layer.getProperty("valign")){var n=0;n=t?t.position().top+t.height()/2:this.$layer.parent().height()/2;var i=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsiveposition"))||(i=1),this.$layer.css("top",n-this.$layer.height()/2+this.layer.getProperty("top")*i)}this.triggerLayerResized()},r.prototype.getIndex=function(){var t=parseInt(this.$layer.css("zIndex"));return isNaN(t)&&(t=0),t},r.prototype.renderIndex=function(t){},r.prototype.sync=function(){this._syncalign(null,"history"),this._syncvalign(null,"history"),this._syncwidth(),this._syncheight(),this._synctop(),this._syncleft(),this._syncparentid()},r.prototype["delete"]=function(){var t=this.layer.getProperty("parentid");t&&this.unSubscribeParent("delete")},r.prototype.isParentOrChild=function(){return this.parent||this.children.length>0},r}),N2Require("PlacementContent",["PlacementAbstract"],[],function(t,e,i){"use strict";function n(t,i,n){this.type="content",e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.PlacementAbstract.prototype),n.prototype.constructor=n,n}),N2Require("PlacementDefault",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="default",e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer},r.prototype.activated=function(t){this.startUISizing()},r.prototype.deActivated=function(t){this.$layer.nextendNormalSizing("destroy")},r.prototype.startUISizing=function(){var e=!1;this.layer.item&&this.layer.item.needSize&&(e=!0),this.$layer.nextendNormalSizing({start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.layer.setProperty("maxwidth",e.value)},this)})},r}),N2Require("PlacementNormal",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="normal",this.transferredProperties={},e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer},r.prototype.preActivation=function(t){if("absolute"==t.type&&this.layer.item&&this.layer.item.needSize){var e=this.layer.getProperty("height");e.match&&e.match(/[0-9]+%$/)?this.transferredProperties.height=Math.max(100,parseInt(this.$layer.parent().height()*parseInt(e)/100)):e>0&&(this.transferredProperties.height=e)}},r.prototype.activated=function(e){this.loadProperties(t.extend(e,this.transferredProperties)),this.transferredProperties={},this.layer.$.on("baseSizeUpdated.placementnormal",t.proxy(this._syncmargin,this)),this.layer.$.on("baseSizeUpdated.placementnormal",t.proxy(this._syncheight,this)),this.startUISpacing(),this.startUISizing(),this.$layer.on({mousedown:t.proxy(function(t){t.stopPropagation()})})},r.prototype.loadProperties=function(t){this.layer.createDeviceProperty("margin",{desktopPortrait:"0|*|0|*|0|*|0|*|px+"},this.layer.layer,this),this.layer.createDeviceProperty("height",{desktopPortrait:t.height||0},this.layer.layer,this),this.layer.createDeviceProperty("maxwidth",{desktopPortrait:0},this.layer.layer,this),this.layer.createDeviceProperty("selfalign",{desktopPortrait:"inherit"},this.layer.layer,this)},r.cleanLayer=function(t){var e=["desktopPortrait","desktopLandscape","tabletPortrait","tabletLandscape","mobilePortrait","mobileLandscape"];t.removeClass("n2-ss-has-maxwidth").removeAttr("data-cssselfalign").css({position:"",margin:"",height:"",maxWidth:""});for(var i=["margin","height","maxwidth","selfalign"],n={},r=0;r<i.length;r++){var s=i[r].toLowerCase();n[s]=t.data(s),t.removeAttr(s),t.removeData(s);for(var o=0;o<e.length;o++){var a=e[o].toLowerCase();n[s]=t.data(a+s),t.removeAttr(a+s),t.removeData(a+s)}}return n},r.prototype.deActivated=function(t){this.layer.$.off(".placementnormal"),this.$layer.nextendSpacing("destroy"),this.$layer.nextendNormalSizing("destroy"),this.layer.layer.removeClass("n2-ss-has-maxwidth"),this.layer.layer.removeAttr("data-cssselfalign");var e=["margin","height","maxwidth","selfalign"],i=this.layer.getPropertiesData(e);return this.layer.removeProperties(e),this.layer.layer.css({position:"",margin:"",height:"",maxWidth:""}),i},r.prototype._renderModeProperties=function(t){this._syncmargin(),this._syncheight(),this._syncmaxwidth(),this._syncselfalign()},r.prototype._syncmargin=function(){var t=this.layer.getProperty("margin").split("|*|"),e=t.pop(),i=this.layer.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var t=t.join(e+" ")+e;this.layer.layer.css("margin",t),this.layer.update(),this.$layer.nextendSpacing("option","current",t)},r.prototype.startUISpacing=function(){this.$layer.nextendSpacing({mode:"margin",sync:{n:"margin-top",e:"margin-right",s:"margin-bottom",w:"margin-left"},handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Margin "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.onSpacingStop,this)})},r.prototype.onSpacingStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.layer.getProperty("margin").split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.$layer.css("fontSize"))-this.layer.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.layer.setProperty("margin",r.join("|*|")),t("#layernormal-margin").data("field").insideChange(r.join("|*|"))},r.prototype.startUISizing=function(){var e=!1;this.layer.item&&this.layer.item.needSize&&(e=!0),this.$layer.nextendNormalSizing({height:e,syncWidth:!0,start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.layer.setProperty("maxwidth",e.value)},this),resizeHeight:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Height: "+e.value+"px")},this),stopHeight:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing");var n=1;parseInt(this.$layer.css("fontSize"))!=this.layer.baseSize&&(n=this.canvasManager.getResponsiveRatio("h"));var r=Math.round(r/n);this.layer.setProperty("height",e.value)},this)})},r.prototype._syncheight=function(){var t=parseInt(this.layer.getProperty("height"));if(t>0){var e="px",i=this.layer.baseSize;i>0&&(e="em",t=parseInt(t)/i),this.layer.layer.css("height",t+e)}else this.layer.layer.css("height","");this.layer.update()},r.prototype._syncmaxwidth=function(){var t=parseInt(this.layer.getProperty("maxwidth"));0>=t||isNaN(t)?this.layer.layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth"),this.layer.update()},r.prototype._syncselfalign=function(){this.layer.layer.attr("data-cssselfalign",this.layer.getProperty("selfalign"))},r.prototype.sync=function(){this._syncmargin(),this._syncheight(),this._syncmaxwidth()},r}),N2Require("Placement",[],[],function(t,e,i){"use strict";function n(t){this.layer=t,this.canvasManager=t.canvasManager,this.modes={},this.current=null,this.isTransferHandled=!1,this.updatePositionThrottled=NextendDeBounce(this.updatePosition,200)}return n.prototype.allow=function(t){switch(t){case"absolute":this.modes.absolute=new e.PlacementAbsolute(this,this.layer,this.canvasManager);break;case"normal":this.modes.normal=new e.PlacementNormal(this,this.layer,this.canvasManager);break;case"group":this.modes.absolute=new e.PlacementGroup(this,this.layer,this.canvasManager);break;case"content":this.modes.absolute=new e.PlacementContent(this,this.layer,this.canvasManager);break;case"default":this.modes["default"]=new e.PlacementDefault(this,this.layer,this.canvasManager)}},n.prototype.start=function(){for(var t in this.modes)this.modes[t].start()},n.prototype.setMode=function(t,e){var i=!1;if(e=e||{},"undefined"==typeof this.modes[t])throw new Exception("Layer placement("+t+") not allowed for the container",this.layer);if(this.current!=this.modes[t]){var n;this.current&&(this.modes[t].preActivation(this.current),n=this.current.type,i=this.current.deActivated(this.modes[t])),this.current=this.modes[t],this.layer.layer.attr("data-pm",this.current.type),this.current.activated(e),this.layer.$.triggerHandler("placementChanged",[this.current.type,n])}return i},n.prototype.doAction=function(t){try{return this.current[t].apply(this.current,Array.prototype.slice.call(arguments,1))}catch(e){}},n.prototype.getType=function(){return this.current.type},n.prototype.onResize=function(t){"function"==typeof this.current.onResize&&this.current.onResize(t)},n.prototype.updatePosition=function(){this.current.updatePosition()},n.prototype.getIndex=function(){return this.current.getIndex()},n.prototype.renderIndex=function(t){return this.current.renderIndex(t)},n.prototype.doLinearResize=function(t){this.current.doLinearResize(t)},n.prototype.sync=function(){this.current.sync()},n.prototype.renderModeProperties=function(t){var e=this.layer.getProperty("fontsize");this.layer.adjustFontSize(this.layer.getProperty("adaptivefont"),e,!1),this.current._renderModeProperties(t)},n.prototype["delete"]=function(){this.current["delete"]()},n}),N2Require("PlacementAbstract",["Placement"],[],function(t,e,i){"use strict";function n(t,e,i){this.placement=t,this.layer=e,this.canvasManager=i}return n.prototype.start=function(){},n.prototype.preActivation=function(t){},n.prototype.activated=function(){},n.prototype.deActivated=function(t){return!1},n.prototype.updatePosition=function(){this.layer.group.update()},n.prototype._renderModeProperties=function(t){},n.prototype._hide=function(){},n.prototype._show=function(){},n.prototype.snap=function(){return!1},n.prototype.getIndex=function(){return this.layer.layer.index()},n.prototype.renderIndex=function(t){},n.prototype.doLinearResize=function(t){},n.prototype.sync=function(){},n.prototype["delete"]=function(){},n.prototype.triggerLayerResized=function(t,e){},n.prototype.changeStatus=function(t,e){},n}),N2Require("Item",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e,i,r){this.type===n&&(this.type=e.data("item")),this.needSize=this.constructor.needSize,this.self=this,this.$item=e,this.layer=i,this.itemEditor=r,this.fonts=[],this.styles=[],this.needFill=[],this.values=this.$item.data("itemvalues"),"object"!=typeof this.values&&(this.values=t.parseJSON(this.values)),this.pre="div#"+nextend.smartSlider.frontend.sliderElement.attr("id")+" ",this.defaultValues=r.getItemForm(this.type).values,this.added(),this.$item.data("item",this),this.$item.appendTo(this.layer.getContent()),this.layer.item=this,0===this.$item.children().length&&this.layer.readyDeferred.done(t.proxy(this.reRender,this)),t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.$item),this.$item.find("a").on("click",function(t){t.preventDefault()}),t(window).trigger("ItemCreated")}return r.needSize=!1,r.prototype.setSelf=function(t){this.self!=this&&this.self.setSelf(t),this.self=t},r.prototype.getSelf=function(){return this.self!=this&&(this.self=this.self.getSelf()),this.self},r.prototype.changeValue=function(e,i){this==this.itemEditor.activeItem?t("#item_"+this.type+e).data("field").insideChange(i):this.values[e]=i},r.prototype.activate=function(t,e,i){this.itemEditor.setActiveItem(this,e,i)&&(nextend.basicCSS.activate("ss3item"+this.type,this.values,{font:this.fonts,style:this.styles}),this.itemEditor.lastValues[this.type]=this.values)},r.prototype.deActivate=function(){nextend.basicCSS.deActivate()},r.prototype.render=function(e,i){this.layer.layer.triggerHandler("itemRender"),this.$item.html(""),this.parseAll(e),this._render(e),this.itemEditor.lastValues[this.type]=this.values=i,t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.$item);var n=this.getName(e);n=n===!1||""==n||"Layer"==n?this.type:n.replace(/[<>]/gi,""),this.layer.rename(n,!1),this.layer.update(),this.$item.find("a").on("click",function(t){t.preventDefault()})},r.prototype._render=function(t){},r.prototype.reRender=function(e){this.values=t.extend({},this.getDefault(),this.values,e),this.render(t.extend({},this.values),this.values)},r.prototype["delete"]=function(){this.$item.trigger("mouseleave"),this.$item.remove(),this.itemEditor.activeItem==this&&(this.itemEditor.activeItem=null)},r.prototype.getHTML=function(e){var i="";return i=e?"["+this.type+' values="'+Base64.encode(JSON.stringify(this.values))+'"]':t('<div class="n2-ss-item n2-ss-item-'+this.type+'"></div>').attr("data-item",this.type).attr("data-itemvalues",JSON.stringify(this.values))},r.prototype.getData=function(){return{type:this.type,values:this.values}},r.prototype.getDefault=function(){return{}},r.prototype.added=function(){},r.prototype.addedFont=function(e,i){var n=t("#item_"+this.type+i);n.length&&(this.fonts.push({mode:e,name:i,field:n.data("field"),def:this.defaultValues[i]}),t.when(nextend.fontManager.addVisualUsage(e,this.values[i],this.pre)).done(t.proxy(function(t){t||this.changeValue(i,"")},this)))},r.prototype.addedStyle=function(e,i){var n=t("#item_"+this.type+i);n.length&&(this.styles.push({mode:e,name:i,field:n.data("field"),def:this.defaultValues[i]}),t.when(nextend.styleManager.addVisualUsage(e,this.values[i],this.pre)).done(t.proxy(function(t){t||this.changeValue(i,"")},this)))},r.prototype.parseAll=function(t){for(var e=0;e<this.fonts.length;e++)t[this.fonts[e].name+"class"]=nextend.fontManager.getClass(t[this.fonts[e].name],this.fonts[e].mode)+" ";for(var e=0;e<this.styles.length;e++)t[this.styles[e].name+"class"]=nextend.styleManager.getClass(t[this.styles[e].name],this.styles[e].mode)+" ";for(var e=0;e<this.needFill.length;e++)"undefined"!=typeof t[this.needFill[e]]&&(t[this.needFill[e]]=nextend.smartSlider.generator.fill(t[this.needFill[e]]+""))},r.prototype.getName=function(t){return"Layer"},r.prototype.resizeLayerToImage=function(e){var n=this.layer;t("<img/>").attr("src",e).on("load",function(){var t=i.frontend.dimensions.slide,e=this.width,r=this.height,s=t.width,o=t.height;e>0&&r>0&&(e>s&&(r=r*s/e,e=s),r>o&&(e=e*o/r,r=o),nextend.smartSlider.history.off(),n.setProperty("width",e),n.setProperty("height",r),nextend.smartSlider.history.on())})},r.prototype.fitLayer=function(t){return!1},r}),N2Require("ItemManager",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e,n){this.suppressChange=!1,this.activeItemOriginalData=null,this.canvasManager=e,this.lastValues={},this.startItems(),this.forms={},this.activeForm=!1,n.isUploadDisabled||i.frontend.sliderElement.fileupload({url:n.uploadUrl,pasteZone:!1,dropZone:i.frontend.sliderElement,dataType:"json",paramName:"image",add:function(t,e){e.formData={path:"/"+n.uploadDir},e.submit()},done:t.proxy(function(t,e){var i=e.result;if(i.data&&i.data.name){var n=this.createLayerItem(!1,{item:"image"});n.reRender({image:i.data.url}),n.activate(null,null,!0)}else NextendAjaxHelper.notification(i)},this),fail:function(t,e){NextendAjaxHelper.notification(e.jqXHR.responseJSON)},start:function(){NextendAjaxHelper.startLoading()},stop:function(){setTimeout(function(){NextendAjaxHelper.stopLoading()},100)}})}return r.prototype.setActiveItem=function(e,i,n){if(e!=this.activeItem||n){this.activeItemOriginalData=null;var r=e.type;this.activeForm&&this.activeForm.form.css("display","none"),this.activeItem&&this.activeItem.deActivate(),this.activeForm=this.getItemForm(r);var s=t.extend({},this.activeForm.values,e.values);this.activeItem=e,this.suppressChange=!0;for(var o in s){var a=t("#item_"+r+o).data("field");a&&a.insideChange(s[o])}return this.suppressChange=!1,this.activeForm.form.css("display","block"),this.focusFirst(i),!0}return!1},r.prototype.focusFirst=function(t){var e=this.activeForm.fields.eq(0).data("field");nextend.smartSlider.generator.isDynamicSlide()&&e.connectedField&&e.connectedField instanceof N2Classes.FormElementImage||this.activeForm.fields.eq(0).data("field").focus("undefined"!=typeof t&&t)},r.prototype.startItems=function(){t(".n2-ss-core-item").nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,distance:5,$layer:function(){return this.element.clone()},onCreate:t.proxy(function(t,e,n,r){switch(n.layer.type){case"content":case"col":i.history.startBatch();var s=this.createLayerItem(n.layer,e.$layer.data(),"click");i.history.addControl("skipForwardUndos"),n.layer.container.insertLayerAt(s.layer,r),s.layer.changeGroup(!1,n.layer),i.history.endBatch();break;case"row":var o=n.layer.createCol();n.layer.moveCol(o.getIndex(),r),i.history.startBatch();var s=this.createLayerItem(o,e.$layer.data(),"click");i.history.addControl("skipForwardUndos"),o.container.insertLayerAt(s.layer,0),s.layer.changeGroup(!1,o),i.history.endBatch();break;default:var a=nextend.smartSlider.$currentSlideElement.offset(),s=this.createLayerItem(this.canvasManager.mainContainer,e.$layer.data(),"click");s.layer.placement.current.setPosition(t.pageX-a.left-20,t.pageY-a.top-20)}},this),start:function(){t("#n2-ss-add-sidebar").removeClass("n2-active")}}).on("click",t.proxy(function(e){this.createLayerItem(this.canvasManager.mainContainer.getActiveGroup(),t(e.currentTarget).data(),"click")},this)),t("[data-itemshortcut]").on({click:t.proxy(function(e){e.preventDefault(),t('.n2-ss-core-item[data-item="'+t(e.currentTarget).data("itemshortcut")+'"]').trigger("click")},this),mousedown:t.proxy(function(e){t('.n2-ss-core-item[data-item="'+t(e.currentTarget).data("itemshortcut")+'"]').trigger(e)},this)}),t("[data-structureshortcut]").on({click:t.proxy(function(e){e.preventDefault(),t(".n2-ss-add-layer-button").trigger("click"),t("#n2-ss-layers-switcher > .n2-labels .n2-td").eq(1).trigger("click")},this),mousedown:t.proxy(function(e){t('.n2-ss-core-item[data-type="'+t(e.currentTarget).data("structureshortcut")+'"]').trigger(e)},this)})},r.prototype.createLayerItem=function(n,r,s,o){n=n||this.canvasManager.mainContainer.getActiveGroup();var a=r.item;if("structure"==a){var l=new e.Row(this.canvasManager,n,{});return l.create(r.type),l.hightlightStructure(),{layer:l}}var h=this.getItemForm(a),d=t("<div></div>").attr("data-item",a).data("itemvalues",t.extend(!0,{},h.values,this.getLastValues(a))).addClass("n2-ss-item n2-ss-item-"+a),l=this._createLayer(d,n,t.extend(t(".n2-ss-core-item-"+a).data("layerproperties"),o));return s&&"click"==s?setTimeout(function(){l.layer.trigger("mousedown",["create"]).trigger("mouseup",["create"]).trigger("click",["create"])},500):l.activate(),i.layerWindow.switchTab("item"),i.history.addSimple(this,this.historyDelete,this.historyCreate,[n,l,r]),l.item},r.prototype.getLastValues=function(t){return this.lastValues[t]!==n?this.lastValues[t]:{}},r.prototype.getItemClass=function(t){var i="Item"+t.capitalize();return"undefined"==typeof e[i]?"Item":i},r.prototype._createLayer=function(t,i,n){var r=this.canvasManager.layerOptions.layerFeatures.layerDefault;for(var s in r)null!==r[s]&&(n[s]=r[s]);var o=new e.Layer(this.canvasManager,i,n);return o.create(function(e){return e._createLayer().append(t)}),o},r.prototype.getItemForm=function(e){if(this.forms[e]===n){var i=t("#smartslider-slide-toolbox-item-type-"+e),r={form:i,values:i.data("itemvalues"),fields:i.find('[name^="item_'+e+'"]'),fieldNameRegexp:new RegExp("item_"+e+"\\[(.*?)\\]","")};r.fields.on({nextendChange:t.proxy(this.updateCurrentItem,this),keydown:t.proxy(this.updateCurrentItemDeBounced,this)}),this.forms[e]=r}return this.forms[e]},r.prototype.updateCurrentItem=function(e){if(!this.suppressChange){null===this.activeItemOriginalData&&(this.activeItemOriginalData=t.extend({},this.activeItem.values));var n={},r={};if(this.activeForm.fields.each(t.proxy(function(e,i){var i=t(i),s=i.attr("name").match(this.activeForm.fieldNameRegexp)[1];r[s]=n[s]=i.val()},this)),e&&"nextendChange"==e.type){var s=i.history.addValue(this,this.historyUpdateCurrentItem,[this.activeItem]);s&&s.setValues(this.activeItemOriginalData,t.extend({},r)),this.activeItemOriginalData=null}this.activeItem.render(t.extend({},this.activeItem.getDefault(),n),r)}},r.prototype.historyUpdateCurrentItem=function(e,i){var n=i.getSelf();n.reRender(t.extend(!0,{},e)),n.values=e,this.activeItem==n&&n.activate(null,null,!0)},r.prototype.updateCurrentItemDeBounced=NextendDeBounce(function(t){this.updateCurrentItem(t)},100),r.prototype.historyDelete=function(t,e){e.getSelf()["delete"]()},r.prototype.historyCreate=function(t,e,i){var n=this.createLayerItem(t.getSelf(),i);e.setSelf(n.layer)},r.prototype.historyCreateStructure=function(t,e,i){var n=this.createLayerItem(t.getSelf(),i);e.setSelf(n.layer)},r.prototype.getSelf=function(){return this},r}),N2Require("PluginActivatable",[],[],function(t,e,i){"use strict";function n(){this.isActive=!1,this.preventActivation=!1}return n.prototype.activate=function(t,e,i){return this.preventActivation?!1:(document.activeElement&&document.activeElement.blur(),t&&(t.ctrlKey||t.metaKey)&&this.canvasManager.mainContainer.getSelectedLayer()?!this.select():t&&3==t.which&&this.canvasManager.selectMode?!1:(i||this.canvasManager.exitSelectMode(),t&&this.positionSidebar(),this.canvasManager.mainContainer.getSelectedLayer()!==this&&(this.layerRow.addClass("n2-active"),this.layer.addClass("n2-active"),this.layer.triggerHandler("n2-ss-activate"),this.canvasManager.changeActiveLayer(this,i),nextend.activeLayer=this.layer,this.canvasManager.ui.onActivateLayer(this)),this.isActive=!0,!0))},n.prototype.deActivate=function(){this.isActive=!1,this.layer===i&&console.error(),this.layer.removeClass("n2-active"),this.layerRow.removeClass("n2-active"),this.layer.triggerHandler("n2-ss-deactivate")},n}),N2Require("PluginEditableName",[],[],function(t,e,i){"use strict";function n(){}var r=300,s=null;return n.prototype.addProperties=function(t){this.createProperty("name",this.label,t),this.createProperty("nameSynced",1,t)},n.prototype.makeNameEditable=function(){this.layerTitleSpan.on({mouseup:t.proxy(function(e){s?(clearTimeout(s),s=null,this.editName()):(this.activate(e),s=setTimeout(t.proxy(function(){s=null},this),r))},this)})},n.prototype.editName=function(){var i=new e.InlineField;i.$input.on({valueChanged:t.proxy(function(t,e){this.rename(e,!0),this.layerTitleSpan.css("display","inline")},this),cancel:t.proxy(function(){this.layerTitleSpan.css("display","inline")},this)}),this.layerTitleSpan.css("display","none"),i.injectNode(this.layerTitle,this.property.name)},n.prototype.rename=function(t,e){if(this.property.nameSynced||e){if(e&&(this.property.nameSynced=0),""==t){if(e)return this.property.nameSynced=1,this.item.reRender(),!1;t="Layer #"+(this.group.getLayerCount()+1)}t=t.substr(0,35),this.property.name!=t&&(this.property.name=t,this.layerTitleSpan.html(t),this.$.trigger("layerRenamed",t))}},n}),N2Require("PluginShowOn",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){}return r.prototype.addProperties=function(t){this.showsOnCurrent=!0,this.createProperty("generatorvisible","",t),this.createProperty("desktopPortrait",1,t),this.createProperty("desktopLandscape",1,t),this.createProperty("tabletPortrait",1,t),this.createProperty("tabletLandscape",1,t),this.createProperty("mobilePortrait",1,t),this.createProperty("mobileLandscape",1,t)},r.prototype._hide=function(){this.layer.css("display","none"),this.showsOnCurrent=!1,this.update()},r.prototype._show=function(){parseInt(this.property[this.canvasManager.getMode()])&&(this.layer.css("display",""),this.showsOnCurrent=!0),this.update()},r.prototype._syncdesktopPortrait=function(){var t=this.getProperty("desktopPortrait");this.__syncShowOnDevice("desktopPortrait",t)},r.prototype._syncdesktopLandscape=function(){var t=this.getProperty("desktopLandscape");this.__syncShowOnDevice("desktopLandscape",t)},r.prototype._synctabletPortrait=function(){var t=this.getProperty("tabletPortrait");this.__syncShowOnDevice("tabletPortrait",t)},r.prototype._synctabletLandscape=function(){var t=this.getProperty("tabletLandscape");this.__syncShowOnDevice("tabletLandscape",t)},r.prototype._syncmobilePortrait=function(){var t=this.getProperty("mobilePortrait");this.__syncShowOnDevice("mobilePortrait",t)},r.prototype._syncmobileLandscape=function(){var t=this.getProperty("mobileLandscape");this.__syncShowOnDevice("mobileLandscape",t)},r.prototype.__syncShowOnDevice=function(t,e){if(this.getMode()==t){var e=parseInt(e);e?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[t,e]),this.placement.doAction("triggerLayerResized")}},r}),N2Require("Col",["ContentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.label="Col",this.type="col",this.innerContainer="> .n2-ss-layer-col",e.ContentAbstract.prototype.constructor.call(this,t,i,n),this.placement.allow("default")}return r.prototype=Object.create(e.ContentAbstract.prototype),r.prototype.constructor=r,r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"><div class="n2-ss-layer-content n2-ss-layer-col"></div></div>').attr("data-type",this.type)},r.prototype.addProperties=function(t){e.ContentAbstract.prototype.addProperties.call(this,t),this.createProperty("colwidth","1",t),this.createProperty("link","#|*|_self",t),this.createProperty("borderradius",0,t),this.createProperty("boxshadow","0|*|0|*|0|*|0|*|00000080",t),this.createProperty("borderwidth","1|*|1|*|1|*|1",t),this.createProperty("borderstyle","none",t),this.createProperty("bordercolor","ffffffff",t),this.createDeviceProperty("order",{desktopPortrait:0},t)},r.prototype.create=function(){e.ContentAbstract.prototype.create.call(this),this._syncorder(),this._syncborder(),this._syncborderradius(),this._syncboxshadow(),this._onReady()},r.prototype.load=function(t){e.ContentAbstract.prototype.load.call(this,t),this._syncorder(),this._syncborder(),this._syncborderradius(),this._syncboxshadow(),this._onReady();var i=t.data("rowcolumns")+"";if(i!=n&&"resolved"==this.group.readyDeferred.state()){for(var r=i.split("+"),s=0;s<r.length;s++)r[s]=new Fraction(r[s]);this.group.setColsWidth(r)}},r.prototype.createRow=function(){this.$content=this.layer.find(".n2-ss-layer-content:first"),this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"normal","> .n2-ss-layer",["row","layer"]),this.container.setLayerContainerElement(this.$content);var i=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));this._createLayerListRow([t('<div class="n2-actions"></div>').append(n).append(i)]).addClass("n2-ss-layer-content-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-col"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype._start=function(t){e.ContentAbstract.prototype._start.call(this,t),t&&this.highlight(2e3)},r.prototype.getRealOrder=function(){var t=this.getProperty("order");return 0==t?10:t},r.prototype._syncorder=function(){var t=this.getProperty("order");0==t?this.layer.css("order",""):this.layer.css("order",t),this.group.refreshUI()},r.prototype._synccolwidth=function(){this.layer.css("width",100*new Fraction(this.getProperty("colwidth")).valueOf()+"%"),this.group.refreshUI()},r.prototype._synclink=function(){},r.prototype._syncborderradius=function(){this.$content.css("border-radius",this.getProperty("borderradius")+"px")},r.prototype._syncborderwidth=r.prototype._syncbordercolor=r.prototype._syncborderstyle=function(){this._syncborder()},r.prototype._syncborder=function(){var t=this.getProperty("borderstyle");if("none"!=t){this.$content.css("border-color",N2Color.hex2rgbaCSS(this.getProperty("bordercolor"))),this.$content.css("border-style",this.getProperty("borderstyle"));var e=this.getProperty("borderwidth").split("|*|"),i="px";this.$content.css("border-width",e.join(i+" ")+i)}else this.$content.css("border","");this.update()},r.prototype._syncboxshadow=function(){var t=this.getProperty("boxshadow").split("|*|");0==t[0]&&0==t[1]&&0==t[2]&&0==t[3]||0==N2Color.hex2alpha(t[4])?this.$content.css("box-shadow",""):this.$content.css("box-shadow",t[0]+"px "+t[1]+"px "+t[2]+"px "+t[3]+"px "+N2Color.hex2rgbaCSS(t[4]))},r.prototype["delete"]=function(){this.group.container.getLayerCount()>1?this._delete():this.group["delete"]()},r.prototype.getHTML=function(t){var i=e.ComponentAbstract.prototype.getHTML.call(this,t);return i.attr("data-rowcolumns",this.group.getColumns()),
|
7 |
+
i},r.prototype.renderModeProperties=function(t){this._syncorder(),e.ContentAbstract.prototype.renderModeProperties.call(this,t)},r.prototype.update=function(){this.group._syncwrapafter(),e.ComponentAbstract.prototype.update.call(this)},r});var dependencies=["LayerDataStorage","PluginEditableName"];N2Require("ComponentAbstract",dependencies,["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,o){this.wraps={},this.counter=s++,window.layers[this.counter]=this,this.self=this,this.originalProperties=o||{},e.LayerDataStorage.prototype.constructor.call(this),this.readyDeferred=t.Deferred(),this.readyDeferred.done(t.proxy(this.onReady,this)),this.isDeleteStarted=!1,this.isDeleted=!1,this._lastClasses=!1,this.$=t(this),this.proxyRefreshBaseSize=t.proxy(this.refreshBaseSize,this),this.status=r.STATUS.UNDEFINED,this.canvasManager=i,this.group=n,e.PluginActivatable.prototype.constructor.call(this),this.placement=new e.Placement(this),this.readyDeferred.done(t.proxy(this.addUILabels,this))}var s=0;window.layers=[],r.STATUS={UNDEFINED:0,NORMAL:1,LOCKED:2,HIDDEN:3},r.STATUS_INV={0:"UNDEFINED",1:"NORMAL",2:"LOCKED",3:"HIDDEN"};for(var o in e.PluginActivatable.prototype)r.prototype[o]=e.PluginActivatable.prototype[o];for(var o in e.LayerDataStorage.prototype)r.prototype[o]=e.LayerDataStorage.prototype[o];for(var o in e.PluginEditableName.prototype)r.prototype[o]=e.PluginEditableName.prototype[o];for(var o in e.PluginShowOn.prototype)r.prototype[o]=e.PluginShowOn.prototype[o];return r.prototype.addUILabels=function(){this.markTimer=null,this.uiLabel=t('<div class="n2-ss-layer-ui-label-container"><div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-self">'+this.getUILabel()+"</div></div>").appendTo(this.layer),nextend.tooltip.addElement(t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-up n2-ss-layer-ui-label-action"><i class="n2-i n2-i-uplevel"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(t){this.up(t)},this)}).appendTo(this.uiLabel),"Select parent"),t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-duplicate"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(){this.duplicate()},this)}).appendTo(this.uiLabel),t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-trash"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(){this["delete"]()},this)}).appendTo(this.uiLabel)},r.prototype.getUILabel=function(){return this.label},r.prototype.up=function(t){t.stopImmediatePropagation(),this.group.activate(t)},r.prototype.addProperties=function(t){this.createProperty("id",null,t,this),this.createProperty("class","",t),this.createProperty("crop","visible",t),this.createProperty("rotation",0,t),this.createProperty("parallax",0,t),this.createProperty("adaptivefont",0,t),this.createDeviceProperty("fontsize",{desktopPortrait:100},t),e.PluginShowOn.prototype.addProperties.call(this,t),e.PluginEditableName.prototype.addProperties.call(this,t)},r.prototype.getRootElement=function(){return this.layer},r.prototype.create=function(t,e){e=e||!1,e||this.addProperties(!1),"function"==typeof t?this.layer=t.call(null,this):this.layer=this._createLayer(),this.layer.addClass("n2-ss-layer-under-creation"),e&&this.addProperties(this.layer),this.layer.data("layerObject",this),this.layer.triggerHandler("layerStarted",[this]),this.group.container.insert(this),this.group.onChildCountChange(),this.$.triggerHandler("create"),this._start(!0)},r.prototype.load=function(t){this.addProperties(t),this.layer=t.data("layerObject",this),this.layer.triggerHandler("layerStarted",[this]),this.$.triggerHandler("load"),this._start(!1);var e=t.data("status");null!==e&&"undefined"!=typeof e?this.changeStatus(e):this.changeStatus(r.STATUS.NORMAL)},r.prototype._start=function(e){this.createRow();var i=this.layer.find("> .n2-ss-layer-mask");i.length&&(this.wraps.mask=i),this._synccrop(),this._syncrotation(),this.placement.start(),this.placement.setMode(this.group.container.allowedPlacementMode,this.originalProperties),this.setGroup(this.group),this.canvasManager.$.triggerHandler("layerCreated",this),e&&(this.refreshBaseSize(),this.$.triggerHandler("created")),setTimeout(t.proxy(function(){this.isDeleted||(this.placement.onResize(!0),this.layer.css("visibility",""),this.layer.removeClass("n2-ss-layer-under-creation"))},this),300)},r.prototype._onReady=function(){this.originalProperties={},this.readyDeferred.resolve(),this.layer.on({mouseover:t.proxy(this.markOver,this),mouseout:t.proxy(this.markOut,this)})},r.prototype.isReady=function(){return"resolved"==this.readyDeferred.state()},r.prototype.getName=function(){return this.property.name},r.prototype.setGroup=function(t){this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=t,this.placement.setMode(t.container.allowedPlacementMode),t.container.syncLayerRow(this),this.isReady()&&this.refreshBaseSize(),this.group.$.on("baseSizeUpdated",this.proxyRefreshBaseSize)},r.prototype.changeGroup=function(t,e){var i=this.group;i.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=e;var n=this.placement.setMode(e.container.allowedPlacementMode);e.container.syncLayerRow(this),this.refreshBaseSize(),e.$.on("baseSizeUpdated",this.proxyRefreshBaseSize),this.userGroupChange(i,t,n,e,this.getIndex()),i.update()},r.prototype.userGroupChange=function(t,e,n,r,s){if(t==r)this.userIndexChange(e,s);else{var o=i.history.addValue(this,this.historyUserGroupChange,[]);o&&o.setValues({historyGroup:t,index:e,placementData:n},{historyGroup:r,index:s})}},r.prototype.historyUserGroupChange=function(t){var e=this.group,i=t.historyGroup.getSelf(),n=t.index;i.container.insertLayerAt(this,n),this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=i,t.placementData&&this.layer.data(t.placementData),this.placement.setMode(i.container.allowedPlacementMode),i.container.syncLayerRow(this),this.refreshBaseSize(),this.group.$.on("baseSizeUpdated",this.proxyRefreshBaseSize),i.onChildCountChange(),t.placementData&&this.placement.sync(),e.update()},r.prototype.userIndexChange=function(t,e){var n=i.history.addValue(this,this.historyUserIndexChange);n&&n.setValues(t,e),this.group.container.insertLayerAt(this,e)},r.prototype.historyUserIndexChange=function(t){this.group.container.insertLayerAt(this,t)},r.prototype._createLayerListRow=function(e){return this.layerRow=t('<li class="n2-ss-layerlist-row"></li>').data("layer",this).on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerRowClicked")}).appendTo(this.group.container.$ul),this.layerTitleSpan=t('<span class="n2-ucf">'+this.property.name+"</span>"),this.makeNameEditable(),this.layerTitle=t('<div class="n2-ss-layer-title"></div>').on({mouseenter:t.proxy(function(){this.canvasManager.highlight(this)},this),mouseleave:t.proxy(function(){this.canvasManager.deHighlight(this)},this)}).append(this.layerTitleSpan).append(e).appendTo(this.layerRow).on({mouseup:t.proxy(function(t){nextend.shouldPreventMouseUp||"DIV"!==t.target.tagName||this.activate(t)},this)}),nextend.tooltip.add(this.layerRow),this.layerRow.nextendLayerListItem({UIManager:this.canvasManager.mainContainer.layerListUIManager,layer:this,$item:this.layerRow}),this.layerRow},r.prototype.select=function(t){return this.canvasManager.selectLayer(this,!0)},r.prototype.update=function(){this.readyDeferred.done(t.proxy(this.placement.updatePositionThrottled,this.placement))},r.prototype.updateThrottled=function(){this.placement.updatePositionThrottled()},r.prototype.positionSidebar=function(){this.canvasManager.layerWindow.show(this,this.layer)},r.prototype.showEditor=function(){this.canvasManager.layerWindow._show()},r.prototype.highlight=function(e){e=e||2e3,this.isHighlighted&&(clearTimeout(this.isHighlighted),this.isHighlighted=!1),this.layer.addClass("n2-highlight"),this.isHighlighted=setTimeout(t.proxy(function(){this.layer.removeClass("n2-highlight")},this),e)},r.prototype.setPropertydesktopPortrait=r.prototype.setPropertydesktopLandscape=r.prototype.setPropertytabletPortrait=r.prototype.setPropertytabletLandscape=r.prototype.setPropertymobilePortrait=r.prototype.setPropertymobileLandscape=function(t,e,i){this._setProperty(t,parseInt(e),i)},r.prototype.getHTML=function(t){var i=this._createLayer();for(var r in this.property)"width"!=r&&"height"!=r&&"left"!=r&&"top"!=r&&i.attr("data-"+r.toLowerCase(),this.property[r]);for(var r in this.deviceProperty)for(var s in this.deviceProperty[r])i.attr("data-"+r.toLowerCase()+s,this.deviceProperty[r][s]);for(var r in this.deviceProperty.desktop)i.css(r,this.deviceProperty.desktop[r]+"px");if(this.container!=n){var o=i;this.innerContainer!=n&&(o=i.find(this.innerContainer)),o.append(this.container.getHTML(t))}var a=this.getProperty("id");return a&&""!=a&&i.attr("id",a),this.status>e.ComponentAbstract.STATUS.NORMAL&&i.attr("data-status",this.status),i},r.prototype.duplicate=function(e){var n=this.getHTML(!1);if("absolute"==this.placement.getType()){var r=n.attr("id");r&&(r=t.fn.uid(),n.attr("id",r),n.attr("data-id",r)),n.attr("data-parentid")?(n.data("desktopportraittop",0),n.data("desktopportraitleft",0)):(n.data("desktopportraittop",n.data("desktopportraittop")+40),n.data("desktopportraitleft",n.data("desktopportraitleft")+40)),n.attr("data-parentid","")}var s=this.canvasManager.insertComponentWithNode(this.group,n,this.getIndex()+1,!1,!0);return this.layerRow.trigger("mouseleave"),e&&s.activate(),i.history.addSimple(this,this.historyDeleteDuplicated,this.historyDuplicate,[s,s.container?s.container.getAllLayers():!1]),s},r.prototype.historyDeleteDuplicated=function(t){t.getSelf()["delete"]()},r.prototype.historyDuplicate=function(t,e){var i=this.duplicate(!1,!1);if(t.setSelf(i),e)for(var n=i.container.getAllLayers(),r=0;r<n.length;r++)e[r].setSelf(n[r])},r.prototype.historyDelete=function(){this["delete"]()},r.prototype.historyRestore=function(t,e,i,n){var r=this.canvasManager.insertComponentWithNode(this.group.getSelf(),t.clone(),i,!1,!0);if(this.setSelf(r),n)for(var s=r.container.getAllLayers(),o=0;o<s.length;o++)n[o].setSelf(s[o])},r.prototype["delete"]=function(){i.positionDisplay.hide(),nextend.tooltip.onLeave(),this._delete()},r.prototype._delete=function(){if(this.isDeleteStarted=!0,this.canvasManager.mainContainer.getSelectedLayer()==this&&this.canvasManager.layerWindow.hide(),this.isHighlighted&&(clearTimeout(this.isHighlighted),this.isHighlighted=!1),i.history.startBatch(),i.history.addSimple(this,this.historyRestore,this.historyDelete,[this.getHTML(!1),this.group,this.getIndex(),this.container?this.container.getAllLayers():!1]),this.deActivate(),this.container!=n){i.history.off();for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]._delete();i.history.on()}i.history.endBatch(),this.item!=n&&this.item["delete"](),this.placement["delete"](),this.layer.trigger("mouseup"),this.isDeleted=!0,this.canvasManager.mainContainer.layerDeleted(this),this.layer.triggerHandler("LayerDeleted"),this.getRootElement().remove(),this.layerRow.remove(),this.group.update(),this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.$.trigger("layerDeleted"),this.markTimer&&clearTimeout(this.markTimer),delete this.layer,delete this.itemEditor,this.group.onChildCountChange()},r.prototype.getData=function(i){var n={type:this.type,lastplacement:this.placement.getType()};this.status>e.ComponentAbstract.STATUS.NORMAL&&(n.status=this.status);var r=t.extend({},this.property);for(var s in this.deviceProperty)for(var o in this.deviceProperty[s]){delete r[o];var a=this.deviceProperty[s][o];if("undefined"!=typeof a){switch(o){case"width":case"height":this.isDimensionPropertyAccepted(a)||(a=parseFloat(a));break;case"fontsize":case"left":case"top":case"gutter":case"wrap":a=parseFloat(a)}n[s.toLowerCase()+o]=a}}for(var l in r)n[l.toLowerCase()]=r[l];return n},r.prototype.onChildCountChange=function(){},r.prototype.getDataWithChildren=function(e,i){return-1==t.inArray(this,i)&&(i.push(this),e.push(this.getData({layersIncluded:!0,itemsIncluded:!0})),this.layer.triggerHandler("LayerGetDataWithChildren",[e,i])),e},r.prototype.markOver=function(t){this.layer.addClass("n2-ss-mouse-over"),t.stopPropagation(),this.group.markEnter(),this.markTimer&&clearTimeout(this.markTimer),this.layer.addClass("n2-ss-mouse-over-delayed"),this.uiLabel.removeClass("invisible")},r.prototype.markOut=function(e){this.layer.removeClass("n2-ss-mouse-over"),e&&e.stopPropagation(),this.group.markLeave(),this.markTimer&&clearTimeout(this.markTimer),this.isActive||this.uiLabel.addClass("invisible"),this.markTimer=setTimeout(t.proxy(function(){this.layer.removeClass("n2-ss-mouse-over-delayed"),this.uiLabel.removeClass("invisible"),this.markTimer=null},this),10)},r.prototype.markEnter=function(t){this.layer.addClass("n2-ss-mouse-hover"),this.group.markEnter()},r.prototype.markLeave=function(t){this.layer.removeClass("n2-ss-mouse-hover"),this.group.markLeave()},r.prototype.formSetname=function(t,e){},r.prototype.formSetnameSynced=function(t,e){},r.prototype.formSetdesktopPortrait=function(t,e){t.currentForm.desktopPortrait.data("field").insideChange(e)},r.prototype.formSetdesktopLandscape=function(t,e){t.currentForm.desktopLandscape.data("field").insideChange(e)},r.prototype.formSettabletPortrait=function(t,e){t.currentForm.tabletPortrait.data("field").insideChange(e)},r.prototype.formSettabletLandscape=function(t,e){t.currentForm.tabletLandscape.data("field").insideChange(e)},r.prototype.formSetmobilePortrait=function(t,e){t.currentForm.mobilePortrait.data("field").insideChange(e)},r.prototype.formSetmobileLandscape=function(t,e){t.currentForm.mobileLandscape.data("field").insideChange(e)},r.prototype.sync=function(){if(this._syncid(),this.container)for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e].sync();this.placement.sync()},r.prototype._syncid=function(){var t=this.getProperty("id");t&&""!=t?this.layer.attr("id",t):this.layer.removeAttr("id")},r.prototype.requestID=function(){var e=this.getProperty("id");return e||(e=t.fn.uid(),this.setProperty("id",e,"layer")),e},r.prototype._syncfontsize=function(){this.adjustFontSize(this.getProperty("adaptivefont"),this.getProperty("fontsize"),!0)},r.prototype._syncadaptivefont=function(){this.adjustFontSize(this.getProperty("adaptivefont"),this.getProperty("fontsize"),!0)},r.prototype.adjustFontSize=function(t,e,i){e=parseInt(e),parseInt(t)?this.layer.css("font-size",16*e/100+"px"):100!=e?this.layer.css("font-size",e+"%"):this.layer.css("font-size",""),this.refreshBaseSize(),i&&this.update()},r.prototype.refreshBaseSize=function(){var t=this.getFontSize();this.isAdaptiveFont()?this.baseSize=16*t/100:this.baseSize=this.group.baseSize*t/100,this.$.triggerHandler("baseSizeUpdated")},r.prototype.getFontSize=function(){return parseInt(this.getProperty("fontsize"))},r.prototype.isAdaptiveFont=function(){return parseInt(this.getProperty("adaptivefont"))},r.prototype._synccrop=function(){var t=this.getProperty("crop");"auto"==t&&(t="hidden"),"mask"==t?(t="hidden",this.addWrap("mask","<div class='n2-ss-layer-mask'></div>")):(this.removeWrap("mask"),this.layer.data("animatableselector",null)),this.layer.css("overflow",t)},r.prototype._syncrotation=function(){var t=parseFloat(this.getProperty("rotation"));if(t/360!=0){var e=this.addWrap("rotation","<div class='n2-ss-layer-rotation'></div>");NextendTween.set(e[0],{rotationZ:t})}else this.removeWrap("rotation")},r.prototype.addWrap=function(e,i){if(this.wraps[e]===n){var r=t(i);switch(this.wraps[e]=r,e){case"mask":r.appendTo(this.layer),this.wraps.rotation!==n?r.append(this.wraps.rotation):r.append(this.getContents()),this.layer.data("animatableselector",".n2-ss-layer-mask:first");break;case"rotation":this.wraps.mask!==n?r.appendTo(this.wraps.mask):r.appendTo(this.layer),r.append(this.getContents())}}return this.wraps[e]},r.prototype.removeWrap=function(t){if(this.wraps[t]!==n){switch(t){case"mask":this.wraps.rotation!==n?this.layer.append(this.wraps.rotation):this.layer.append(this.getContents());break;case"rotation":this.wraps.mask!==n?this.wraps.mask.append(this.getContents()):this.layer.append(this.getContents())}this.wraps[t].remove(),delete this.wraps[t]}},r.prototype.getContents=function(){return!1},r.prototype._syncclass=function(){this._lastClasses!==!1&&this.layer.removeClass(this._lastClasses);var t=this.getProperty("class");t&&""!=t?(this.layer.addClass(t),this._lastClasses=t):this._lastClasses=!1},r.prototype._syncparallax=function(){},r.prototype._syncgeneratorvisible=function(){},r.prototype._syncmouseenter=r.prototype._syncclick=r.prototype._syncmouseleave=r.prototype._syncplay=r.prototype._syncpause=r.prototype._syncstop=function(){},r.prototype.renderModeProperties=function(t){e.LayerDataStorage.prototype.renderModeProperties.call(this),this.placement.renderModeProperties(t)},r.prototype.getIndex=function(){return this.group.container.getLayerIndex(this.layer)},r.prototype.toString=function(){return this.type+" #"+this.counter},r.prototype.setSelf=function(t){t===n&&console.error(t),this.self!=this&&this.self.setSelf(t),this.self=t},r.prototype.getSelf=function(){return this.self!==this&&(this.self=this.self.getSelf()),this.self},r.prototype.historyStoreOnPlacement=function(){var t=Array.prototype.slice.call(arguments);t.splice(1,1),this.placement.current[arguments[1]].apply(this.placement.current,t)},r.prototype.getDroppable=function(){return!1},r.prototype.onCanvasUpdate=function(t,e,i){if(this.group==e)t!=i&&this.userIndexChange(t,i);else{var n;if(this.canvasManager.isCol(this.group))for(n=this;n&&(!n.placement||"absolute"!==n.placement.getType());)n=n.group;this.changeGroup(t,e),e.onChildCountChange();for(var r=this;r&&(!r.placement||"absolute"!==r.placement.getType());)r=r.group;n&&n!=r&&n.placement.updatePosition(),r&&r.placement.updatePosition()}},r.prototype.setStatusNormal=function(){this.changeStatus(r.STATUS.NORMAL)},r.prototype.changeStatus=function(t){var e=this.status;switch(t==this.status&&(t=r.STATUS.NORMAL),this.status){case r.STATUS.HIDDEN:this.getRootElement().removeAttr("data-visibility"),this.layerRow.removeClass("n2-ss-layer-status-hidden");break;case r.STATUS.LOCKED:this.layer.removeClass("n2-ss-layer-locked"),this.layerRow.removeClass("n2-ss-layer-status-locked")}switch(this.status=t,this.status){case r.STATUS.HIDDEN:this.getRootElement().attr("data-visibility","hidden"),this.layerRow.addClass("n2-ss-layer-status-hidden");break;case r.STATUS.LOCKED:this.layer.addClass("n2-ss-layer-locked"),this.layerRow.addClass("n2-ss-layer-status-locked")}this.placement.current.changeStatus(e,this.status)},r.prototype.moveX=function(t){"absolute"==this.placement.getType()&&this.placement.current.moveX(t)},r.prototype.moveY=function(t){"absolute"==this.placement.getType()&&this.placement.current.moveY(t)},r}),N2Require("Content",["ContentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Content"),this.type="content",this.innerContainer="> .n2-ss-layer-content",this._defaults=t.extend({verticalalign:"center"},this._defaults),e.ContentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("content"),i.setMainContent(this)}return r.prototype=Object.create(e.ContentAbstract.prototype),r.prototype.constructor=r,r.prototype.addUILabels=function(){this.markTimer=null,this.uiLabel=t('<div class="n2-ss-layer-ui-label-container"><div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-self">'+this.getUILabel()+"</div></div>").appendTo(this.layer)},r.prototype.addProperties=function(t){e.ContentAbstract.prototype.addProperties.call(this,t),this.createDeviceProperty("selfalign",{desktopPortrait:"inherit"},t)},r.prototype.getRootElement=function(){return this.$outerSection},r.prototype.getBackgroundElement=function(){return this.$outerSection},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer n2-ss-content-empty"><div class="n2-ss-section-main-content n2-ss-layer-content"></div></div>').attr("data-type",this.type)},r.prototype.createRow=function(){this.$outerSection=this.layer.parent(),this.$outerSection.hasClass("n2-ss-section-outer")||(this.$outerSection=t('<div class="n2-ss-section-outer"></div>').insertAfter(this.layer).append(this.layer)),this.$outerSection.data("layerObject",this),this.$content=this.layer.find("> .n2-ss-layer-content");var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this));this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"normal","> .n2-ss-layer",["row","layer"]),this.container.setLayerContainerElement(this.$content),t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(n)]).addClass("n2-ss-layer-content-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-col"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype.create=function(){this.originalProperties.adaptivefont=1,e.ContentAbstract.prototype.create.call(this),this._syncselfalign(),this._onReady()},r.prototype.load=function(t){e.ContentAbstract.prototype.load.call(this,t),this._syncselfalign(),this._onReady()},r.prototype._onReady=function(){e.ContentAbstract.prototype._onReady.call(this),this.startUISizing()},r.prototype.startUISizing=function(){this.layer.nextendNormalSizing({start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.setProperty("maxwidth",e.value)},this)})},r.prototype["delete"]=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]["delete"]()},r.prototype.remove=function(){this._delete()},r.prototype.update=function(){nextend.smartSlider.frontend.responsive.doVerticalResize()},r.prototype.onChildCountChange=function(){var t=this.container.getSortedLayers();this.layer.toggleClass("n2-ss-content-empty",0==t.length)},r.prototype.renderModeProperties=function(t){e.ContentAbstract.prototype.renderModeProperties.call(this,t),this._syncselfalign()},r.prototype._syncselfalign=function(){this.layer.attr("data-cssselfalign",this.getProperty("selfalign"))},r.prototype.duplicate=function(t){console.error("Content can not be duplicated!")},r}),N2Require("ContentAbstract",["LayerContainer","ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this._defaults=t.extend({verticalalign:"flex-start"},this._defaults),this._syncbgThrottled=NextendThrottle(this._syncbgThrottled,50),e.ComponentAbstract.prototype.constructor.call(this,i,n,r)}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.addProperties=function(t){this.createProperty("opened",1,t,this),e.ComponentAbstract.prototype.addProperties.call(this,t),this.createProperty("bgimage","",t),this.createProperty("bgimagex",50,t),this.createProperty("bgimagey",50,t),this.createProperty("bgimageparallax",0,t),this.createProperty("bgcolor","00000000",t),this.createProperty("bgcolorgradient","off",t),this.createProperty("bgcolorgradientend","00000000",t),this.createProperty("verticalalign",this._defaults.verticalalign,t),this.createDeviceProperty("maxwidth",{desktopPortrait:0},t),this.createDeviceProperty("inneralign",{desktopPortrait:"inherit"},t),this.createDeviceProperty("padding",{desktopPortrait:"10|*|10|*|10|*|10|*|px+"},t)},r.prototype.getBackgroundElement=function(){return this.$content},r.prototype.getPaddingElement=function(){return this.$content},r.prototype.create=function(){e.ComponentAbstract.prototype.create.call(this),this.initUI(),this._syncverticalalign(),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign(),this._syncbgThrottled()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this._syncverticalalign(),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign(),this._syncbgThrottled(),this.container.startWithExistingNodes()},r.prototype.initUI=function(){this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){!nextend.shouldPreventMouseUp&&this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="layer"]').trigger("click")},this)}),this.getPaddingElement().nextendSpacing({handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Padding "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.onSpacingStop,this)})},r.prototype.onSpacingStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.getPadding().split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.layer.css("fontSize"))-this.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.setProperty("padding",r.join("|*|")),t("#layercol-padding").data("field").insideChange(r.join("|*|"))},r.prototype.switchOpened=function(t){t.preventDefault(),this.getProperty("opened")?this.setProperty("opened",0):this.setProperty("opened",1)},r.prototype._syncopened=function(){this.getProperty("opened")?(this.openerElement.removeClass("n2-closed"),this.container.$ul.css("display",""),this.layer.triggerHandler("opened")):(this.openerElement.addClass("n2-closed"),this.container.$ul.css("display","none"),this.layer.triggerHandler("closed"))},r.prototype.getPadding=function(){return this.getProperty("padding")},r.prototype._syncpadding=function(){var t=this.getPadding().split("|*|"),e=t.pop(),i=this.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var r=t.join(e+" ")+e;this.getPaddingElement().css("padding",r),this.update(),this.getPaddingElement().nextendSpacing("option","current",r)},r.prototype._syncmaxwidth=function(){var t=parseInt(this.getProperty("maxwidth"));0>=t||isNaN(t)?this.layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth"),this.update()},r.prototype.getInnerAlign=function(){return this.getProperty("inneralign")},r.prototype._syncinneralign=function(){this.layer.attr("data-csstextalign",this.getInnerAlign())},r.prototype.getVerticalAlign=function(){return this.getProperty("verticalalign")},r.prototype._syncverticalalign=function(){this.$content.attr("data-verticalalign",this.getVerticalAlign())},r.prototype._syncbgimage=r.prototype._syncbgimagex=r.prototype._syncbgimagey=r.prototype._syncbgimageparallax=r.prototype._syncbgcolor=r.prototype._syncbgcolorgradient=r.prototype._syncbgcolorgradientend=function(){this._syncbgThrottled()},r.prototype._syncbgThrottled=function(){var t="",e=this.getProperty("bgimage");if(""!=e){var i=parseInt(this.getProperty("bgimagex"));isFinite(i)||(i=50);var n=parseInt(this.getProperty("bgimagey"));isFinite(n)||(n=50),t+='url("'+nextend.imageHelper.fixed(e)+'") '+i+"% "+n+"% / cover no-repeat"+(1==this.getProperty("bgimageparallax")?" fixed":"")}var r=this.getProperty("bgcolor"),s=this.getProperty("bgcolorgradient"),o=this.getProperty("bgcolorgradientend");if(0!=N2Color.hex2alpha(r)||"off"!=s&&0!=N2Color.hex2alpha(o)){var a="";switch(""!=t&&(a=","+t),s){case"horizontal":this.getBackgroundElement().css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"vertical":this.getBackgroundElement().css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal1":this.getBackgroundElement().css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal2":this.getBackgroundElement().css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"off":default:""!=t?t="linear-gradient("+N2Color.hex2rgbaCSS(r)+", "+N2Color.hex2rgbaCSS(r)+"),"+t:t+=N2Color.hex2rgbaCSS(r),this.getBackgroundElement().css("background",t)}}else this.getBackgroundElement().css("background",t)},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.layersIncluded&&(i.layers=this.container.getData(t)),i},r.prototype.onChildCountChange=function(){this.layer.toggleClass("n2-ss-content-empty",0==this.container.getLayerCount()),this.update()},r.prototype.renderModeProperties=function(t){e.ComponentAbstract.prototype.renderModeProperties.call(this,t),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign()},r.prototype.getDroppable=function(){return{$container:this.$content,layer:this,placement:"normal",axis:"y"}},r.prototype.getLLDroppable=function(t){switch(t.type){case"layer":case"row":return{$container:this.container.$ul,layer:this}}return!1},r.prototype.getContents=function(){return this.$content},r}),N2Require("Layer",["ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Layer"),this.type="layer",this.parent=!1,this.itemEditor=i.itemEditor,e.ComponentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("absolute"),this.placement.allow("normal"),this.$.on("load create",t.proxy(this.startItem,this))}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.create=function(){e.ComponentAbstract.prototype.create.apply(this,arguments),this.initUI(),this._onReady()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this._onReady()},r.prototype.startItem=function(){var t=this.layer.find(".n2-ss-item");new(e[this.itemEditor.getItemClass(t.data("item"))])(t,this,this.itemEditor),this.layer.nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,layer:this,$layer:this.layer}),this.item.needSize&&this.layer.addClass("n2-ss-layer-needsize")},r.prototype.initUI=function(){
|
8 |
+
this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){nextend.context.isPreventDblClick||(e.stopPropagation(),t('[data-tab="item"]').trigger("click"),this.item.itemEditor.focusFirst("dblclick"))},this)})},r.prototype.getContent=function(){var t=this.layer,e=t.data("animatableselector");return e&&(t=t.find(e)),t},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"></div>').attr("data-type",this.type)},r.prototype.createRow=function(){var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),r=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(r).append(n)]).addClass("n2-ss-layer-layer-row")},r.prototype.activate=function(t,i,n){e.PluginActivatable.prototype.activate.call(this,t,i,n),this.item?this.item.activate(null,i):console.error("The layer do not have item on it!")},r.prototype.getHTML=function(t){var i=e.ComponentAbstract.prototype.getHTML.call(this,t),n=this.item.getHTML(t);return i.attr("style",i.attr("style")+this.getStyleText()).append(n),i},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.itemsIncluded&&(i.item=this.item.getData()),i},r.prototype.getStyleText=function(){var t="",e=this.property.crop;return"auto"!=e&&"mask"!=e||(e="hidden"),t+="overflow:"+e+";"},r.prototype.getContents=function(){return this.item.$item},r.prototype.setSelf=function(t){this.self!=this&&this.self.setSelf(t),this.self=t,this.item.setSelf(t.item)},r.prototype.getSelf=function(){return this.self!==this&&(this.self=this.self.getSelf()),this.self},r}),N2Require("MainContainer",["LayerContainer"],["smartSlider"],function(t,e,i,n){"use strict";function r(n){this.baseSize=16,this.activeLayer=null,this.$=n.$,this.isActiveGroupBlurred=!0,this.isMainGroup=!0,this.canvasManager=n,this.layer=i.$currentSlideElement.find(".n2-ss-layers-container").addBack().last(),this.layer.nextendCanvas({mainContainer:this,tolerance:5,smartguides:t.proxy(function(t){return t.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this),display:{hidden:!0,show:t.proxy(function(){i.positionDisplay.show("Canvas")},this),update:t.proxy(function(t,e){i.positionDisplay.update(t,"Canvas","L: "+parseInt(0|e.left)+"px<br />T: "+parseInt(0|e.top)+"px")},this),hide:t.proxy(function(){i.positionDisplay.hide("Canvas")},this)},start:t.proxy(function(t,e){this.canvasManager.canvasDragStart(t,e)},this),drag:t.proxy(function(t,e){this.canvasManager.canvasDragMove(t,e),e.layer&&e.layer.placement.current.triggerLayerResized()},this),stop:t.proxy(function(t,e){this.canvasManager.canvasDragStop(t,e),e.layer&&e.layer.placement.current.triggerLayerResized()},this)}),this.canvasUIManager=this.layer.data("uiNextendCanvas"),this.layer.nextendLayerList({mainContainer:this,$fixed:t("#n2-ss-layers"),$scrolled:t("#n2-ss-layer-list")}),this.layerListUIManager=this.layer.data("uiNextendLayerList"),this.layer.parent().prepend('<div class="n2-ss-slide-border n2-ss-slide-border-left" /><div class="n2-ss-slide-border n2-ss-slide-border-top" /><div class="n2-ss-slide-border n2-ss-slide-border-right" /><div class="n2-ss-slide-border n2-ss-slide-border-bottom" />'),this.container=new e.LayerContainer(this,t("#n2-ss-layer-list").find("ul"),"absolute","> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group",["content","row","layer","group"]),this.layerRow=this.container.$ul,this.$.on("layerCreated",t.proxy(function(){this.refreshHasLayers()},this))}return r.prototype.lateInit=function(){this.container.startWithExistingNodes(),this.layer.parent().on("click",t.proxy(function(){this.canvasManager.shouldPreventActivationBubble?this.blurActiveGroup():this.unBlurActiveGroup(),this.canvasManager.allowActivation()},this)),i.frontend.sliderElement.on("SliderResize",t.proxy(this.onResize,this))},r.prototype.onResize=function(t,e){for(var i=this.getEverySortedLayers(),n=0;n<i.length;n++)i[n].placement.doLinearResize(e)},r.prototype.getEverySortedLayers=function(){for(var t=this.container.getChildLayersRecursive(!1),e={},i=t.length-1;i>=0;i--)"undefined"!=typeof t[i].property.parentid&&t[i].property.parentid&&("undefined"==typeof e[t[i].property.parentid]&&(e[t[i].property.parentid]=[]),e[t[i].property.parentid].push(t[i]),t.splice(i,1));for(var i=0;i<t.length;i++)"undefined"!=typeof t[i].property.id&&t[i].property.id&&"undefined"!=typeof e[t[i].property.id]&&(e[t[i].property.id].unshift(0),e[t[i].property.id].unshift(i+1),t.splice.apply(t,e[t[i].property.id]),delete e[t[i].property.id]);return t},r.prototype.deleteLayers=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]["delete"]()},r.prototype.blurActiveGroup=function(){this.isActiveGroupBlurred=!0},r.prototype.unBlurActiveGroup=function(){this.isActiveGroupBlurred=!1},r.prototype.getActiveGroup=function(){if(this.isActiveGroupBlurred){var t=this,e=this.activeLayer;switch(this.canvasManager.isGroup(e)||this.canvasManager.isCol(e)||this.canvasManager.isContent(e)?t=e:this.canvasManager.isRow(e)?t=e.container.getSortedLayers()[0]:e&&(t=e.group),this.canvasManager.currentEditorMode){case"content":t==this&&(t=this.canvasManager.mainContent);break;case"canvas":t==this.canvasManager.mainContent&&(t=this)}return t}switch(this.canvasManager.currentEditorMode){case"content":return this.canvasManager.mainContent}return this},r.prototype.getSelectedLayer=function(){return null==this.activeLayer?!1:this.activeLayer},r.prototype.getLayerData=function(t){if(t===n)return[];for(var e=[],i=[],r=0;r<t.length;r++)t[r].getDataWithChildren(e,i);return e},r.prototype.layerDeleted=function(t){for(var e=this.canvasManager.selectedLayers.length;e--;)t==this.canvasManager.selectedLayers[e]&&this.canvasManager.selectedLayers.splice(e,1);this._afterLayerDeletedDeBounced(t),this.refreshHasLayers()},r.prototype._afterLayerDeletedDeBounced=NextendDeBounce(function(t){this.activeLayer&&!this.activeLayer.isDeleted||this.canvasManager.resetActiveLayer()},50),r.prototype.refreshHasLayers=function(){t("body").toggleClass("n2-ss-has-layers",this.container.getLayerCount()>0),nextend.triggerResize()},r.prototype.getName=function(){return"Slide"},r.prototype.update=function(){},r.prototype.onChildCountChange=function(){},r.prototype.markEnter=function(t){},r.prototype.markLeave=function(t){},r.prototype.getSelf=function(){return this},r.prototype.createLayerAnimations=function(t,e){for(var i=[],n=this.container.getSortedLayers(),r=0;r<n.length;r++)i.push.apply(i,n[r].createLayerAnimations(t,e));return i},r.prototype.getDroppables=function(e){var i,n=this.canvasManager.currentEditorMode,r=[];if("canvas"==n){r.push(this.getDroppable()),i=this.container.getSortedLayers();var s=t.inArray(this.canvasManager.mainContent,i);s>-1&&i.splice(s,1)}else"content"==n&&(i=[this.canvasManager.mainContent]);for(var o=0;o<i.length;o++)if(i[o]!=e){var a=i[o].getDroppable();a&&r.push(a),i[o].container&&r.push.apply(r,i[o].container.getDroppables(e))}return r},r.prototype.getLLDroppables=function(t){return this.container.getLLDroppables(t)},r.prototype.getDroppable=function(){return{$container:this.layer,layer:this,placement:"absolute"}},r.prototype.getLLDroppable=function(t){switch(t.type){case"layer":case"row":case"group":case"content":return{$container:this.container.$ul,layer:this}}return!1},r.prototype.replaceLayers=function(e){this._idTranslation={};var n=this.dataToLayers(t.extend(!0,[],e).reverse()),r=[];this.deleteLayers(),this.canvasManager.mainContent.remove();for(var s=0;s<n.length;s++)r.push(this.container.append(n[s]));return this.canvasManager.refreshMode(),this.container.layerContainerElement.n2imagesLoaded().always(t.proxy(this.canvasManager.refreshMode,this.canvasManager)),this.getSelectedLayer()||r.length>0&&r[0].activate(),i.history.isEnabled()&&i.history.addSimple(this,this.historyDeleteAll,this.historyReplaceLayers,[e,r,this.container.getAllLayers()]),r},r.prototype.historyDeleteAll=function(t,e){for(var i=0;i<e.length;i++)e[i].getSelf()["delete"]();this.canvasManager.mainContent.getSelf().remove()},r.prototype.historyReplaceLayers=function(t,e,i){this.replaceLayers(t);for(var n=this.container.getAllLayers(),r=0;r<i.length;r++)i[r].setSelf(n[r])},r.prototype.addLayers=function(e,n){this._idTranslation={};for(var r=this.dataToLayers(t.extend(!0,[],e)),s=[],o=0;o<r.length;o++)s.push(n.container.append(r[o]));return this.canvasManager.refreshMode(),i.history.addSimple(this,this.historyDeleteLayers,this.historyAddLayers,[e,s,n]),s},r.prototype.historyDeleteLayers=function(t,e,i){for(var n=0;n<e.length;n++)e[n].getSelf()["delete"]()},r.prototype.historyAddLayers=function(t,e,i){for(var n=this.addLayers(t,i.getSelf()),r=0;r<e.length;r++)e[r].setSelf(n[r])},r.prototype.dataToLayers=function(t,e){for(var i=[],n=0;n<t.length;n++)switch(t[n].type){case"group":console.error("Group data to layer not implemented!");break;case"row":i.push(this.buildRowNode(t[n],e));break;case"col":i.push(this.buildColNode(t[n],e));break;case"content":i.push(this.buildContentNode(t[n],e));break;case"layer":default:i.push(this.buildLayerNode(t[n],e))}return i},r.prototype._buildNodePrepareID=function(e,i){if(i.id){var n=t.fn.uid(),r=!1;"object"==typeof this._idTranslation[i.id]&&(r=this._idTranslation[i.id]),this._idTranslation[i.id]=n,i.id=n,e.attr("id",n),r&&r.resolve(i.id,n)}if(i.parentid)switch(typeof this._idTranslation[i.parentid]){case"string":i.parentid=this._idTranslation[i.parentid];break;case"undefined":this._idTranslation[i.parentid]=t.Deferred();case"object":this._idTranslation[i.parentid].done(t.proxy(function(t,e,i){t.data("parentid",i)},this,e));break;default:i.parentid=""}},r.prototype.buildContentNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='content'/>"),s=t("<div class='n2-ss-section-main-content n2-ss-layer-content' />").appendTo(r);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.layers,s),r},r.prototype.buildRowNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='row'/>"),s=t("<div class='n2-ss-layer-row' />").appendTo(r);this._buildNodePrepareID(r,e);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.cols,s),r},r.prototype.buildColNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='col'/>"),s=t("<div class='n2-ss-layer-col n2-ss-layer-content' />").appendTo(r);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.layers,s),r},r.prototype.buildLayerNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='layer'></div>").attr("style",e.style),s=1;e.zIndex&&(s=e.zIndex),this._buildNodePrepareID(r,e),e.items!==n&&(e.item=e.items[0],delete e.items),t('<div class="n2-ss-item n2-ss-item-'+e.item.type+'"></div>').data("item",e.item.type).data("itemvalues",e.item.values).appendTo(r),delete e.style,delete e.item;for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),r},r}),N2Require("Row",["LayerContainer","ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Row"),this.type="row",this._syncbgThrottled=NextendThrottle(this._syncbgThrottled,50),this.innerContainer="> .n2-ss-layer-row",this.columnsField=t("#layerrow-columns").data("field"),this.refreshUI=NextendDeBounce(this.refreshUI,100),e.ComponentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("absolute"),this.placement.allow("normal")}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.addProperties=function(t){this.createProperty("opened",1,t,this),e.ComponentAbstract.prototype.addProperties.call(this,t),this.createProperty("bgimage","",t),this.createProperty("bgimagex",50,t),this.createProperty("bgimagey",50,t),this.createProperty("bgimageparallax",0,t),this.createProperty("bgcolor","00000000",t),this.createProperty("bgcolorgradient","off",t),this.createProperty("bgcolorgradientend","00000000",t),this.createProperty("borderradius",0,t),this.createProperty("boxshadow","0|*|0|*|0|*|0|*|00000080",t),this.createProperty("fullwidth",1,t),this.createProperty("stretch",0,t),this.createDeviceProperty("inneralign",{desktopPortrait:"inherit"},t),this.createDeviceProperty("padding",{desktopPortrait:"10|*|10|*|10|*|10|*|px+"},t),this.createDeviceProperty("gutter",{desktopPortrait:20},t),this.createDeviceProperty("wrapafter",{desktopPortrait:0,mobilePortrait:1,mobileLandscape:1},t)},r.prototype.historyDeleteSelf=function(){this["delete"]()},r.prototype.historyCreateSelf=function(t,i,n){var r=new e.Row(this.canvasManager,t.getSelf(),{});r.create(i),this.setSelf(r);for(var s=r.container.getSortedLayers(),o=0;o<s.length;o++)n[o].setSelf(s[o])},r.prototype.create=function(n){var r,s=function(e){return t("<div class='n2-ss-layer' />").append(t("<div class='n2-ss-layer-row' />").append(e)).attr("data-type","row")},o=function(e){return t("<div class='n2-ss-layer' data-type='col'/>").append(t("<div class='n2-ss-layer-col n2-ss-layer-content' />").append(e))};switch(n){case"2col":r=function(t){return s([o(),o()])};break;case"2col-60-40":r=function(t){return s([o().data("colwidth","6/10"),o().data("colwidth","4/10")])};break;case"2col-40-60":r=function(t){return s([o().data("colwidth","4/10"),o().data("colwidth","6/10")])};break;case"2col-80-20":r=function(t){return s([o().data("colwidth","8/10"),o().data("colwidth","2/10")])};break;case"2col-20-80":r=function(t){return s([o().data("colwidth","2/10"),o().data("colwidth","8/10")])};break;case"3col":r=function(t){return s([o(),o(),o()])};break;case"3col-20-60-20":r=function(t){return s([o().data("colwidth","2/10"),o().data("colwidth","6/10"),o().data("colwidth","2/10")])};break;case"4col":r=function(t){return s([o(),o(),o(),o()])};break;case"special":r=function(t){var e=s([o(),o()]);return s([o().data("colwidth","1/5"),o(e).data("colwidth","4/5")])};break;default:r=function(t){return s([o()])}}"absolute"==this.group.container.allowedPlacementMode&&(this.originalProperties=t.extend({width:"100%",align:"center",valign:"top",top:20},this.originalProperties)),e.ComponentAbstract.prototype.create.call(this,r,!0),this.initUI(),this.container.startWithExistingNodes(),this._syncpadding(),this._syncinneralign(),this._syncfullwidth(),this._syncstretch(),this._syncbgThrottled(),this._syncborderradius(),this._syncboxshadow(),this.renderModeProperties(),this.container.renderModeProperties(),i.history.addSimple(this,this.historyDeleteSelf,this.historyCreateSelf,[this.group,n,this.container.getSortedLayers()]),this._onReady()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this.container.startWithExistingNodes(),this._syncpadding(),this._syncinneralign(),this._syncfullwidth(),this._syncstretch(),this._syncbgThrottled(),this._syncborderradius(),this._syncboxshadow(),this._onReady()},r.prototype.initUI=function(){this.layer.nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,layer:this,$layer:this.layer}),this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){!nextend.shouldPreventMouseUp&&this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="row"]').trigger("click")},this)}),this.$row.nextendSpacing({handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Padding "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.____makeLayerResizeableStop,this)}),this.$row.nextendColumns({columns:"1",gutter:this.getGutter(),start:t.proxy(function(t,e){i.positionDisplay.show("Columns")},this),colwidth:t.proxy(function(t,e){this.updateColumnWidth(e.currentPercent),i.positionDisplay.update(t,"Columns",Math.round(100*e.currentPercent[e.index])+"% — "+Math.round(100*e.currentPercent[e.index+1])+"%")},this),stop:t.proxy(function(t,e){i.positionDisplay.hide("Columns"),this.setRealColsWidth(e.currentFractions)},this)}),this.$row.sortable({distance:10,tolerance:"pointer",forceHelperSize:!0,forcePlaceholderSize:!0,items:"> .n2-ss-layer",handle:" > .n2-ss-layer-ui-label-container > .n2-ss-layer-ui-label-self",start:t.proxy(function(t,e){var i=this.getColumns().split("+");e.placeholder.css({width:100*new Fraction(i[e.item.data("layerObject").getIndex()]).valueOf()+"%",height:e.helper.height(),visibility:"visible",marginRight:this.getGutter()+"px",marginTop:this.getGutter()+"px"}),e.helper.hasClass("n2-ss-last-in-row")&&e.placeholder.addClass("n2-ss-last-in-row"),e.placeholder.css("order",e.helper.css("order")),e.placeholder.attr("data-r",e.helper.attr("data-r"))},this),stop:t.proxy(function(t,e){var i=e.item.data("layerObject"),n=e.item.prevAll(".n2-ss-layer, .n2-ss-layer-group").first().data("layerObject");this.$row.sortable("cancel");var r=i.getIndex(),s=0;n&&(s=n.getIndex(),r>s&&s++),r!=s&&this.moveCol(r,s)},this)})},r.prototype.____makeLayerResizeableStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.getPadding().split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.layer.css("fontSize"))-this.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.setProperty("padding",r.join("|*|")),t("#layerrow-padding").data("field").insideChange(r.join("|*|"))},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"><div class="n2-ss-layer-row"></div></div>').attr("data-type",this.type)},r.prototype.historyDeleteCol=function(t,e){e.getSelf()["delete"]()},r.prototype.historyCreateCol=function(t,e){var i=t.getSelf().createCol();e.setSelf(i)},r.prototype.createCol=function(){var t=new e.Col(this.canvasManager,this,{});return i.history.addSimple(this,this.historyDeleteCol,this.historyCreateCol,[this,t]),t.create(),this.isReady()&&this.placement.updatePosition(),t},r.prototype.createRow=function(){this.$row=this.layer.find(".n2-ss-layer-row:first"),this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"default","> .n2-ss-layer",["col"]),this.container.setLayerContainerElement(this.$row);var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),r=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(r).append(n)]).addClass("n2-ss-layer-row-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-row"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype.activate=function(){e.PluginActivatable.prototype.activate.apply(this,arguments),this.columnsField.setRow(this)},r.prototype.switchOpened=function(t){t.preventDefault(),this.getProperty("opened")?this.setProperty("opened",0):this.setProperty("opened",1)},r.prototype._syncopened=function(){this.getProperty("opened")?(this.openerElement.removeClass("n2-closed"),this.container.$ul.css("display",""),this.layer.triggerHandler("opened")):(this.openerElement.addClass("n2-closed"),this.container.$ul.css("display","none"),this.layer.triggerHandler("closed"))},r.prototype.getColumns=function(){for(var t=this.container.getSortedLayers(),e=[],i=0;i<t.length;i++)e.push(t[i].getProperty("colwidth"));return e.join("+")},r.prototype.getColumnsOrdered=function(){for(var t=this.getOrderedColumns(),e=[],i=0;i<t.length;i++)e.push(t[i].getProperty("colwidth"));return e.join("+")},r.prototype._synccolumns=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]._synccolwidth();this.update()},r.prototype.getPadding=function(){return this.getProperty("padding")},r.prototype._syncpadding=function(){var t=this.getPadding().split("|*|"),e=t.pop(),i=this.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var r=t.join(e+" ")+e;this.$row.css("padding",r),this.$row.nextendSpacing("option","current",r),this.update()},r.prototype.getGutter=function(){return this.getProperty("gutter")},r.prototype._syncgutter=function(){var t=this.getGutter()+"px",e=this.container.getSortedLayers();if(e.length>0)for(var i=e.length-1;i>=0;i--)e[i].layer.css("marginRight",t).css("marginTop",t);this.$row.nextendColumns("option","gutter",this.getGutter()),this.update()},r.prototype._syncwrapafter=function(){for(var e=parseInt(this.getProperty("wrapafter")),i=this.getOrderedColumns(),n=!1,r=i.length-1;r>=0;r--)i[r].showsOnCurrent||i.splice(r,1);var s=i.length;if(e>0&&s>e&&(n=!0),this.$row.find("> .n2-ss-row-break").remove(),this.$row.toggleClass("n2-ss-row-wrapped",n),n)for(var r=0;s>r;r++){var o=parseInt(r/e);if(i[r].layer.attr("data-r",o),(r+1)%e==0||r==s-1){var a=i[r].getProperty("order");0==a&&(a=10),t('<div class="n2-ss-row-break"/>').css("order",a).insertAfter(i[r].layer.addClass("n2-ss-last-in-row"))}else i[r].layer.removeClass("n2-ss-last-in-row")}else{for(var r=0;s>r;r++)i[r].layer.removeClass("n2-ss-last-in-row").attr("data-r",0);i.length>0?i[s-1].layer.addClass("n2-ss-last-in-row"):console.error("The row does not have col.")}this.update()},r.prototype.getOrderedColumns=function(){return this.container.getSortedLayers().sort(function(t,e){return t.getRealOrder()-e.getRealOrder()})},r.prototype.getInnerAlign=function(){return this.getProperty("inneralign")},r.prototype._syncinneralign=function(){this.layer.attr("data-csstextalign",this.getInnerAlign())},r.prototype._syncfullwidth=function(){this.layer.toggleClass("n2-ss-autowidth",0==this.getProperty("fullwidth"))},r.prototype._syncstretch=function(){this.layer.toggleClass("n2-ss-stretch-layer",1==this.getProperty("stretch"))},r.prototype._syncborderradius=function(){this.$row.css("border-radius",this.getProperty("borderradius")+"px")},r.prototype._syncboxshadow=function(){var t=this.getProperty("boxshadow").split("|*|");0==t[0]&&0==t[1]&&0==t[2]&&0==t[3]||0==N2Color.hex2alpha(t[4])?this.$row.css("box-shadow",""):this.$row.css("box-shadow",t[0]+"px "+t[1]+"px "+t[2]+"px "+t[3]+"px "+N2Color.hex2rgbaCSS(t[4]))},r.prototype._syncbgimage=r.prototype._syncbgimagex=r.prototype._syncbgimagey=r.prototype._syncbgimageparallax=r.prototype._syncbgcolor=r.prototype._syncbgcolorgradient=r.prototype._syncbgcolorgradientend=function(){this._syncbgThrottled()},r.prototype._syncbgThrottled=function(){var t="",e=this.getProperty("bgimage");if(""!=e){var i=parseInt(this.getProperty("bgimagex"));isFinite(i)||(i=50);var n=parseInt(this.getProperty("bgimagey"));isFinite(n)||(n=50),t+='url("'+nextend.imageHelper.fixed(e)+'") '+i+"% "+n+"% / cover no-repeat"+(1==this.getProperty("bgimageparallax")?" fixed":"")}var r=this.getProperty("bgcolor"),s=this.getProperty("bgcolorgradient"),o=this.getProperty("bgcolorgradientend");if(0!=N2Color.hex2alpha(r)||"off"!=s&&0!=N2Color.hex2alpha(o)){var a="";switch(""!=t&&(a=","+t),s){case"horizontal":this.$row.css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"vertical":this.$row.css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal1":this.$row.css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal2":this.$row.css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"off":default:""!=t?t="linear-gradient("+N2Color.hex2rgbaCSS(r)+", "+N2Color.hex2rgbaCSS(r)+"),"+t:t+=N2Color.hex2rgbaCSS(r),this.$row.css("background",t)}}else this.$row.css("background",t)},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.itemsIncluded&&(i.cols=this.container.getData(t)),i},r.prototype.moveCol=function(t,e){if("desktopPortrait"==this.getMode()){this._moveCol(t,e);var n=i.history.addValue(this,this.historyMoveCol,[]);n&&n.setValues({oldIndex:e,newIndex:t},{oldIndex:t,newIndex:e})}else{var r=this.getOrderedColumns(),s=r[t];r.splice(t,1),r.splice(e,0,s);for(var o=0;o<r.length;o++)r[o].setProperty("order",o+1);this.refreshUI()}},r.prototype._moveCol=function(t,e){var i=this.container.getSortedLayers();e>t&&e++,this.container.insertLayerAt(i[t],e),this.refreshUI()},r.prototype.historyMoveCol=function(t){this._moveCol(t.oldIndex,t.newIndex)},r.prototype.setColsWidth=function(t){for(var e=this.container.getSortedLayers(),i=0;i<t.length;i++)e[i].setProperty("colwidth",t[i].toFraction());this.update(),this.refreshUI()},r.prototype.setRealColsWidth=function(t){for(var e=this.getOrderedColumns(),i=0;i<t.length;i++)e[i].setProperty("colwidth",t[i].toFraction());this.update(),this.refreshUI()},r.prototype.updateColumnWidth=function(t){for(var e=this.getOrderedColumns(),i=0;i<e.length;i++)e[i].layer.css("width",100*t[i]+"%");this.update()},r.prototype.activateColumn=function(t,e){this.container.getSortedLayers()[t].activate(e)},r.prototype.onChildCountChange=function(){if(!this.isDeleted&&!this.isDeleteStarted){var t=this.container.getSortedLayers(),e=t.length;if(e){for(var i=this.getColumns().split("+"),n=0,r=0;r<i.length;r++)n=new Fraction(i[r]).add(n);if(1!=n.valueOf())for(var r=0;e>r;r++)t[r].setProperty("colwidth","1/"+e);else for(var r=0;e>r;r++)t[r]._synccolwidth();this.refreshUI()}this._syncgutter(),this._syncwrapafter()}},r.prototype.renderModeProperties=function(t){e.ComponentAbstract.prototype.renderModeProperties.call(this,t),this._syncpadding(),this._syncinneralign(),this._syncwrapafter(),this._syncgutter(),this.isActive&&this.columnsField.setRow(this)},r.prototype.hightlightStructure=function(e){e=e||4e3,this.isStructureHighlighted&&(clearTimeout(this.isStructureHighlighted),this.isStructureHighlighted=!1),this.layer.addClass("n2-highlight-structure"),this.isStructureHighlighted=setTimeout(t.proxy(function(){this.isDeleted||this.layer.removeClass("n2-highlight-structure")},this),e)},r.prototype.refreshUI=function(){this.isDeleteStarted||(this.isActive&&this.columnsField.setRow(this),this._syncwrapafter(),this.$row.nextendColumns("option","columns",this.getColumnsOrdered()))},r.prototype.getDroppable=function(){return{$container:this.$row,layer:this,placement:"normal",axis:"x"}},r.prototype.getLLDroppable=function(t){switch(t.type){case"col":if(t.group==this)return{$container:this.container.$ul,layer:this}}return!1},r.prototype.getContents=function(){return this.$row},r}),N2Require("ComponentSettings",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.componentType="undefined",this.placementType="undefined",t("html").attr("data-component",""),t("html").attr("data-placement",""),this.currentForm={},this.forms={undefined:null,placement:{absolute:{},normal:{},"default":{}},component:{content:{},layer:{},row:{},col:{},group:{}},global:{id:t("#layerid"),desktopPortrait:t("#layershow-desktop-portrait"),desktopLandscape:t("#layershow-desktop-landscape"),tabletPortrait:t("#layershow-tablet-portrait"),tabletLandscape:t("#layershow-tablet-landscape"),mobilePortrait:t("#layershow-mobile-portrait"),mobileLandscape:t("#layershow-mobile-landscape"),"class":t("#layerclass"),generatorvisible:t("#layergenerator-visible"),crop:t("#layercrop"),rotation:t("#layerrotation"),parallax:t("#layerparallax"),fontsize:t("#layerfont-size"),adaptivefont:t("#layeradaptive-font"),mouseenter:t("#layeronmouseenter"),click:t("#layeronclick"),mouseleave:t("#layeronmouseleave"),play:t("#layeronplay"),pause:t("#layeronpause"),stop:t("#layeronstop")}},this.canvasManager=e;var n=i.frontend.responsive;n.enabled("desktop","Landscape")||this.forms.global.desktopLandscape.closest(".n2-mixed-group").css("display","none"),n.enabled("tablet","Portrait")||this.forms.global.tabletPortrait.closest(".n2-mixed-group").css("display","none"),n.enabled("tablet","Landscape")||this.forms.global.tabletLandscape.closest(".n2-mixed-group").css("display","none"),n.enabled("mobile","Portrait")||this.forms.global.mobilePortrait.closest(".n2-mixed-group").css("display","none"),n.enabled("mobile","Landscape")||this.forms.global.mobileLandscape.closest(".n2-mixed-group").css("display","none"),this.forms.placement.absolute={parentid:t("#layerparentid"),parentalign:t("#layerparentalign"),parentvalign:t("#layerparentvalign"),left:t("#layerleft"),top:t("#layertop"),responsiveposition:t("#layerresponsive-position"),width:t("#layerwidth"),height:t("#layerheight"),responsivesize:t("#layerresponsive-size"),align:t("#layeralign"),valign:t("#layervalign")},this.forms.placement.normal={margin:t("#layernormal-margin"),height:t("#layernormal-height"),maxwidth:t("#layernormal-maxwidth"),selfalign:t("#layernormal-selfalign")},this.forms.component.content={maxwidth:t("#layercontent-maxwidth"),selfalign:t("#layercontent-selfalign"),padding:t("#layercontent-padding"),inneralign:t("#layercontent-inneralign"),verticalalign:t("#layercontent-verticalalign"),bgcolor:t("#layercontent-background-color"),bgimage:t("#layercontent-background-image"),bgimagex:t("#layercontent-background-focus-x"),bgimagey:t("#layercontent-background-focus-y"),bgimageparallax:t("#layercontent-background-parallax"),
|
9 |
+
bgcolorgradient:t("#layercontent-background-gradient"),bgcolorgradientend:t("#layercontent-background-color-end"),opened:t("#layercontent-opened")},this.forms.component.row={padding:t("#layerrow-padding"),gutter:t("#layerrow-gutter"),fullwidth:t("#layerrow-fullwidth"),stretch:t("#layerrow-stretch"),wrapafter:t("#layerrow-wrap-after"),inneralign:t("#layerrow-inneralign"),bgimage:t("#layerrow-background-image"),bgimagex:t("#layerrow-background-focus-x"),bgimagey:t("#layerrow-background-focus-y"),bgimageparallax:t("#layerrow-background-parallax"),bgcolor:t("#layerrow-background-color"),bgcolorgradient:t("#layerrow-background-gradient"),bgcolorgradientend:t("#layerrow-background-color-end"),borderradius:t("#layerrow-border-radius"),boxshadow:t("#layerrow-boxshadow"),opened:t("#layerrow-opened")},this.forms.component.col={maxwidth:t("#layercol-maxwidth"),padding:t("#layercol-padding"),inneralign:t("#layercol-inneralign"),verticalalign:t("#layercol-verticalalign"),bgcolor:t("#layercol-background-color"),link:t("#layercol-link"),bgimage:t("#layercol-background-image"),bgimagex:t("#layercol-background-focus-x"),bgimagey:t("#layercol-background-focus-y"),bgimageparallax:t("#layercol-background-parallax"),bgcolorgradient:t("#layercol-background-gradient"),bgcolorgradientend:t("#layercol-background-color-end"),borderradius:t("#layercol-border-radius"),boxshadow:t("#layercol-boxshadow"),borderwidth:t("#layercol-border-width"),borderstyle:t("#layercol-border-style"),bordercolor:t("#layercol-border-color"),opened:t("#layercol-opened"),colwidth:t("#layercol-colwidth"),order:t("#layercol-order")}}return r.prototype.changeActiveComponent=function(e,i,n,r){if(this.currentLayer=e,this.componentType!=i){switch(t("html").attr("data-component",i),i){case"content":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["content","animations","position"]);break;case"layer":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["item","style","animations","position"]);break;case"group":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["group","animations"]);break;case"row":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["row","animations","position"]);break;case"col":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["column","animations","position"])}this.componentType=i}this.changeActiveComponentPlacement(n),this.syncFields(r)},r.prototype.changeActiveComponentPlacement=function(e,i){this.placementType!=e&&(t("html").attr("data-placement",e),this.placementType=e),this.syncFields(i)},r.prototype.syncFields=function(e){if("object"==typeof e){this.currentForm=t.extend({},this.forms.global,this.forms.component[this.componentType],this.forms.placement[this.placementType]);for(var i in e)typeof e[i]!==n?this.updateField(i,e[i]):console.error("Value is undefined for: "+i);for(var r in this.currentForm)this.currentForm[r].off(".layeroptions").on("outsideChange.layeroptions",t.proxy(this.activeComponentPropertyChanged,this,r))}},r.prototype.onUpdateField=function(t,e,i){t.target==this.currentLayer&&this.updateField(e,i)},r.prototype.updateField=function(t,e){if("function"==typeof this.currentLayer["formSet"+t])this.currentLayer["formSet"+t](this,e);else if(this.currentForm[t]!==n){var i=this.currentForm[t].data("field");i!==n&&i.insideChange(e)}else console.error("field not available: "+t+":"+e,this.currentForm)},r.prototype.activeComponentPropertyChanged=function(t,e){if(this.currentLayer&&!this.currentLayer.isDeleted){var i=this.currentForm[t].val();this.currentLayer.setProperty(t,i,"manager")}else{var n=this.currentForm[t].data("field");"undefined"!=typeof n&&null!==n&&n.insideChange("")}},r.prototype.startFeatures=function(){this.layerFeatures=new e.LayerFeatures(this.forms.placement.absolute,this.canvasManager);var i=t("#n2-ss-layer-adaptive-font").on("click",t.proxy(function(){this.currentForm.adaptivefont.data("field").onoff.trigger("click")},this));this.forms.global.adaptivefont.on("nextendChange",t.proxy(function(){1==this.currentForm.adaptivefont.val()?i.addClass("n2-active"):i.removeClass("n2-active")},this)),new N2Classes.FormElementNumber("n2-ss-layer-font-size",-Number.MAX_VALUE,Number.MAX_VALUE),new N2Classes.FormElementAutocompleteSlider("n2-ss-layer-font-size",{min:50,max:300,step:5});var n=t("#n2-ss-layer-font-size").on("outsideChange",t.proxy(function(){var t=parseInt(n.val());this.currentForm.fontsize.val(t).trigger("change")},this));this.forms.global.fontsize.on("nextendChange",t.proxy(function(){n.data("field").insideChange(this.forms.global.fontsize.val())},this))},r}),N2Require("BgAnimationManager",[],[],function(t,e,i){function n(){this.type="backgroundanimation",NextendVisualManagerMultipleSelection.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(NextendVisualManagerMultipleSelection.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualManagerMultipleSelection.prototype.loadDefaults.apply(this,arguments),this.type="backgroundanimation",this.labels={visual:"Background animation",visuals:"Background animations"}},n.prototype.initController=function(){return new e.BgAnimationEditor},n.prototype.createVisual=function(t,e){return new NextendVisualWithSetRowMultipleSelection(t,e,this)},n}),N2Require("BgAnimationEditor",[],[],function(t,e,i){function n(){this.parameters={shiftedBackgroundAnimation:0},NextendVisualEditorController.prototype.constructor.call(this,!1),this.bgAnimationElement=t(".n2-bg-animation"),this.slides=t(".n2-bg-animation-slide"),this.bgImages=t(".n2-bg-animation-slide-bg"),NextendTween.set(this.bgImages,{rotationZ:1e-4}),this.directionTab=new N2Classes.FormElementRadio("n2-background-animation-preview-tabs",["0","1"]),this.directionTab.element.on("nextendChange.n2-editor",t.proxy(this.directionTabChanged,this)),nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d||nextend.notificationCenter.error("Background animations are not available in your browser. It works if the <i>transform-style: preserve-3d</i> feature available. ")}return n.prototype=Object.create(NextendVisualEditorController.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualEditorController.prototype.loadDefaults.call(this),this.type="backgroundanimation",this.current=0,this.animationProperties=!1,this.direction=0},n.prototype.get=function(){return null},n.prototype.load=function(t,e,i,n){this.lightbox.addClass("n2-editor-loaded")},n.prototype.setTabs=function(t){},n.prototype.directionTabChanged=function(){this.direction=parseInt(this.directionTab.element.val())},n.prototype.start=function(){this.animationProperties&&(this.timeline?this.timeline.play():this.next())},n.prototype.pause=function(){this.timeline&&this.timeline.pause()},n.prototype.next=function(){this.timeline=new NextendTimeline({paused:!0,onComplete:t.proxy(this.ended,this)});var e=this.bgImages.eq(this.current),i=this.bgImages.eq(1-this.current);nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d?(this.currentAnimation=new N2Classes["SmartSliderBackgroundAnimation"+this.animationProperties.type](this,e,i,this.animationProperties,1,this.direction),this.slides.eq(this.current).css("zIndex",2),this.slides.eq(1-this.current).css("zIndex",3),this.timeline.to(this.slides.eq(this.current),.5,{opacity:0},this.currentAnimation.getExtraDelay()),this.timeline.to(this.slides.eq(1-this.current),.5,{opacity:1},this.currentAnimation.getExtraDelay()),this.currentAnimation.postSetup()):(this.timeline.to(this.slides.eq(this.current),1.5,{opacity:0},0),this.timeline.to(this.slides.eq(1-this.current),1.5,{opacity:1},0)),this.current=1-this.current,this.timeline.play()},n.prototype.ended=function(){this.currentAnimation&&this.currentAnimation.ended(),this.next()},n.prototype.setAnimationProperties=function(t){var e=this.animationProperties;this.animationProperties=t,e||this.next()},n});
|
library/media/dist/smartslider-frontend.js
CHANGED
@@ -1,340 +1,53 @@
|
|
1 |
-
N2Require('SmartSliderBackgroundImage', [], [], function ($, scope, undefined) {
|
2 |
-
|
3 |
-
function SmartSliderBackgroundImage(i, element, manager) {
|
4 |
-
this.loadAllowed = false;
|
5 |
-
|
6 |
-
this.width = 0;
|
7 |
-
this.height = 0;
|
8 |
-
|
9 |
-
this.i = i;
|
10 |
-
this.element = element;
|
11 |
-
this.manager = manager;
|
12 |
-
this.loadDeferred = $.Deferred();
|
13 |
-
|
14 |
-
this.currentSrc = '';
|
15 |
-
this.mode = element.data('mode');
|
16 |
-
this.opacity = element.data('opacity');
|
17 |
-
this.blur = element.data('blur');
|
18 |
-
this.x = element.data('x');
|
19 |
-
this.y = element.data('y');
|
20 |
-
|
21 |
-
|
22 |
-
this.hasImage = false;
|
23 |
-
this.$image = element.find('img');
|
24 |
-
|
25 |
-
if (!this.$image.length) {
|
26 |
-
this.startColorMode();
|
27 |
-
} else {
|
28 |
-
this.hasImage = true;
|
29 |
-
this.startImageMode();
|
30 |
-
}
|
31 |
-
};
|
32 |
-
|
33 |
-
SmartSliderBackgroundImage.prototype.startColorMode = function () {
|
34 |
-
this.loadDeferred.resolve();
|
35 |
-
}
|
36 |
-
|
37 |
-
SmartSliderBackgroundImage.prototype.startImageMode = function () {
|
38 |
-
if (this.mode == 'fixed' && ((n2const.isPhone && !this.manager.slider.parameters['background.parallax.mobile']) || (n2const.isTablet && !this.manager.slider.parameters['background.parallax.tablet']))) {
|
39 |
-
this.mode = 'fill';
|
40 |
-
}
|
41 |
-
this.$image.css('display', 'none');
|
42 |
-
this.$background = $('<div class="n2-ss-background-image"/>')
|
43 |
-
.css({
|
44 |
-
opacity: this.opacity,
|
45 |
-
backgroundPosition: this.x + '% ' + this.y + '%'
|
46 |
-
})
|
47 |
-
.appendTo(this.element);
|
48 |
-
|
49 |
-
if (window.n2FilterProperty) {
|
50 |
-
if (this.blur > 0) {
|
51 |
-
this.$background.css({
|
52 |
-
margin: '-' + (this.blur * 2) + 'px',
|
53 |
-
padding: (this.blur * 2) + 'px'
|
54 |
-
}).css(window.n2FilterProperty, 'blur(' + this.blur + 'px)');
|
55 |
-
} else {
|
56 |
-
this.$background.css({
|
57 |
-
margin: '',
|
58 |
-
padding: ''
|
59 |
-
}).css(window.n2FilterProperty, '');
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
if (this.mode == 'fixed') {
|
64 |
-
this.startFixed();
|
65 |
-
}
|
66 |
-
|
67 |
-
this.desktopSrc = this.element.data('desktop') || '';
|
68 |
-
this.tabletSrc = this.element.data('tablet') || '';
|
69 |
-
this.mobileSrc = this.element.data('mobile') || '';
|
70 |
-
|
71 |
-
if (nextend.isRetina) {
|
72 |
-
var retina = this.element.data('desktop-retina');
|
73 |
-
if (retina) {
|
74 |
-
this.desktopSrc = retina;
|
75 |
-
}
|
76 |
-
retina = this.element.data('tablet-retina');
|
77 |
-
if (retina) {
|
78 |
-
this.tabletSrc = retina;
|
79 |
-
}
|
80 |
-
retina = this.element.data('mobile-retina');
|
81 |
-
if (retina) {
|
82 |
-
this.mobileSrc = retina;
|
83 |
-
}
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
SmartSliderBackgroundImage.prototype.preLoad = function () {
|
88 |
-
if (this.loadDeferred.state() == 'pending') {
|
89 |
-
this.loadAllowed = true;
|
90 |
-
this.manager.deviceDeferred.done($.proxy(function () {
|
91 |
-
this.updateBackgroundToDevice(this.manager.device);
|
92 |
-
this.$background.n2imagesLoaded({background: true}, $.proxy(function (e) {
|
93 |
-
var img = e.images[0].img;
|
94 |
-
this.width = img.naturalWidth;
|
95 |
-
this.height = img.naturalHeight;
|
96 |
-
|
97 |
-
this.isLoaded = true;
|
98 |
-
this.loadDeferred.resolve(this.element);
|
99 |
-
}, this));
|
100 |
-
}, this));
|
101 |
-
}
|
102 |
-
return this.loadDeferred;
|
103 |
-
};
|
104 |
-
|
105 |
-
SmartSliderBackgroundImage.prototype.afterLoaded = function () {
|
106 |
-
return $.when(this.loadDeferred, this.manager.slider.responsive.ready);
|
107 |
-
};
|
108 |
-
|
109 |
-
SmartSliderBackgroundImage.prototype.updateBackgroundToDevice = function (device) {
|
110 |
-
var newSrc = this.desktopSrc;
|
111 |
-
if (device.device == 'mobile') {
|
112 |
-
if (this.mobileSrc) {
|
113 |
-
newSrc = this.mobileSrc;
|
114 |
-
} else if (this.tabletSrc) {
|
115 |
-
newSrc = this.tabletSrc;
|
116 |
-
}
|
117 |
-
} else if (device.device == 'tablet') {
|
118 |
-
if (this.tabletSrc) {
|
119 |
-
newSrc = this.tabletSrc;
|
120 |
-
}
|
121 |
-
}
|
122 |
-
if (newSrc) {
|
123 |
-
this.setSrc(newSrc);
|
124 |
-
} else {
|
125 |
-
this.setSrc('');
|
126 |
-
}
|
127 |
-
};
|
128 |
-
|
129 |
-
SmartSliderBackgroundImage.prototype.setSrc = function (src) {
|
130 |
-
if (this.loadAllowed) {
|
131 |
-
if (src != this.currentSrc) {
|
132 |
-
if (src === '') {
|
133 |
-
this.$background.css('background-image', '');
|
134 |
-
} else {
|
135 |
-
this.$background.css('background-image', 'url("' + src + '")');
|
136 |
-
}
|
137 |
-
this.currentSrc = src;
|
138 |
-
}
|
139 |
-
}
|
140 |
-
}
|
141 |
-
|
142 |
-
SmartSliderBackgroundImage.prototype.startFixed = function () {
|
143 |
-
if (!n2const.isEdge) {
|
144 |
-
if (this.manager.slider.parameters.allowBGImageAttachmentFixed && !n2const.isIOS) {
|
145 |
-
this.$background.css('background-repeat', 'repeat');
|
146 |
-
this.$background.css('position', 'static');
|
147 |
-
this.$background.css('background-attachment', 'fixed');
|
148 |
-
} else if (!n2const.isIE) {
|
149 |
-
this.manager.slider.startedDeferred.done($.proxy(function () {
|
150 |
-
fixedBackground.addElement(this.$background, this.element);
|
151 |
-
}, this));
|
152 |
-
}
|
153 |
-
}
|
154 |
-
}
|
155 |
-
|
156 |
-
SmartSliderBackgroundImage.prototype.hack = function () {
|
157 |
-
NextendTween.set(this.element, {
|
158 |
-
rotation: 0.0001
|
159 |
-
});
|
160 |
-
};
|
161 |
-
|
162 |
-
return SmartSliderBackgroundImage;
|
163 |
-
});
|
164 |
-
N2Require('SmartSliderBackgroundImageAdmin', ['SmartSliderBackgroundImage'], [], function ($, scope, undefined) {
|
165 |
-
|
166 |
-
|
167 |
-
function SmartSliderBackgroundImageAdmin(i, element, manager) {
|
168 |
-
this.allowVisualLoad = true;
|
169 |
-
|
170 |
-
this.hash = element.data('hash');
|
171 |
-
|
172 |
-
scope.SmartSliderBackgroundImage.prototype.constructor.call(this, i, element, manager);
|
173 |
-
this.loadAllowed = true;
|
174 |
-
|
175 |
-
this.listenImageManager();
|
176 |
-
};
|
177 |
-
|
178 |
-
SmartSliderBackgroundImageAdmin.prototype = Object.create(scope.SmartSliderBackgroundImage.prototype);
|
179 |
-
SmartSliderBackgroundImageAdmin.prototype.constructor = SmartSliderBackgroundImageAdmin;
|
180 |
-
|
181 |
-
|
182 |
-
SmartSliderBackgroundImageAdmin.prototype.startColorMode = function () {
|
183 |
-
|
184 |
-
// Create an empty div for the background image in the editor
|
185 |
-
this.$background = $('<div class="n2-ss-background-image"/>')
|
186 |
-
.appendTo(this.element);
|
187 |
-
this.loadDeferred.resolve();
|
188 |
-
}
|
189 |
-
|
190 |
-
SmartSliderBackgroundImageAdmin.prototype.setVisualLoad = function (state) {
|
191 |
-
this.allowVisualLoad = state;
|
192 |
-
}
|
193 |
-
|
194 |
-
SmartSliderBackgroundImageAdmin.prototype.listenImageManager = function () {
|
195 |
-
if (this.hash != '') {
|
196 |
-
$(window).on(this.hash, $.proxy(this.onImageManagerChanged, this));
|
197 |
-
}
|
198 |
-
};
|
199 |
-
|
200 |
-
SmartSliderBackgroundImageAdmin.prototype.notListenImageManager = function () {
|
201 |
-
if (this.hash != '') {
|
202 |
-
$(window).off(this.hash, null, $.proxy(this.onImageManagerChanged, this));
|
203 |
-
}
|
204 |
-
};
|
205 |
-
|
206 |
-
SmartSliderBackgroundImageAdmin.prototype.onImageManagerChanged = function (e, imageData) {
|
207 |
-
this.tabletSrc = imageData.tablet.image;
|
208 |
-
this.mobileSrc = imageData.mobile.image;
|
209 |
-
|
210 |
-
this.updateBackgroundToDevice(this.manager.device);
|
211 |
-
};
|
212 |
-
|
213 |
-
SmartSliderBackgroundImageAdmin.prototype.setDesktopSrc = function (src) {
|
214 |
-
this.notListenImageManager();
|
215 |
-
this.desktopSrc = src;
|
216 |
-
this.hash = md5(src);
|
217 |
-
|
218 |
-
if (src != '' && this.allowVisualLoad) {
|
219 |
-
var img = new Image();
|
220 |
-
img.addEventListener("load", $.proxy(function () {
|
221 |
-
$.when(nextend.imageManager.getVisual(src))
|
222 |
-
.done($.proxy(function (visual) {
|
223 |
-
this.onImageManagerChanged(null, visual.value);
|
224 |
-
this.listenImageManager();
|
225 |
-
}, this));
|
226 |
-
}, this), false);
|
227 |
-
img.src = nextend.imageHelper.fixed(src);
|
228 |
-
} else {
|
229 |
-
this.tabletSrc = '';
|
230 |
-
this.mobileSrc = '';
|
231 |
-
|
232 |
-
this.setSrc(nextend.imageHelper.fixed(src));
|
233 |
-
}
|
234 |
-
}
|
235 |
-
SmartSliderBackgroundImageAdmin.prototype.setSrc = function (src) {
|
236 |
-
scope.SmartSliderBackgroundImage.prototype.setSrc.call(this, nextend.imageHelper.fixed(src));
|
237 |
-
}
|
238 |
-
|
239 |
-
SmartSliderBackgroundImageAdmin.prototype.startFixed = function () {
|
240 |
-
|
241 |
-
}
|
242 |
-
|
243 |
-
SmartSliderBackgroundImageAdmin.prototype.setMode = function (newMode) {
|
244 |
-
if (newMode == 'default') {
|
245 |
-
newMode = nextend.smartSlider.slideBackgroundMode;
|
246 |
-
}
|
247 |
-
this.element.attr('data-mode', newMode);
|
248 |
-
this.mode = newMode;
|
249 |
-
}
|
250 |
-
|
251 |
-
SmartSliderBackgroundImageAdmin.prototype.setFocus = function (x, y) {
|
252 |
-
this.$background.css('background-position', x + '% ' + y + '%');
|
253 |
-
}
|
254 |
-
|
255 |
-
SmartSliderBackgroundImageAdmin.prototype.setOpacity = function (opacity) {
|
256 |
-
this.opacity = opacity;
|
257 |
-
this.$background.css('opacity', opacity);
|
258 |
-
};
|
259 |
-
|
260 |
-
SmartSliderBackgroundImageAdmin.prototype.setBlur = function (blur) {
|
261 |
-
if (window.n2FilterProperty) {
|
262 |
-
if (blur > 0) {
|
263 |
-
this.$background.css({
|
264 |
-
margin: '-' + (blur * 2) + 'px',
|
265 |
-
padding: (blur * 2) + 'px'
|
266 |
-
}).css(window.n2FilterProperty, 'blur(' + blur + 'px)');
|
267 |
-
} else {
|
268 |
-
this.$background.css({
|
269 |
-
margin: '',
|
270 |
-
padding: ''
|
271 |
-
}).css(window.n2FilterProperty, '');
|
272 |
-
}
|
273 |
-
}
|
274 |
-
this.blur = blur;
|
275 |
-
};
|
276 |
-
|
277 |
-
return SmartSliderBackgroundImageAdmin;
|
278 |
-
});
|
279 |
N2Require('SmartSliderBackgroundImages', [], [], function ($, scope, undefined) {
|
280 |
|
281 |
function SmartSliderBackgroundImages(slider) {
|
282 |
this.device = null;
|
283 |
|
284 |
-
this.load = $.Deferred();
|
285 |
|
286 |
this.slider = slider;
|
287 |
-
this.slides = this.slider.realSlides;
|
288 |
-
|
289 |
-
this.loaded = [];
|
290 |
|
291 |
this.lazyLoad = slider.parameters.lazyLoad;
|
292 |
this.lazyLoadNeighbor = slider.parameters.lazyLoadNeighbor;
|
293 |
|
294 |
this.deviceDeferred = $.Deferred();
|
295 |
|
296 |
-
/**
|
297 |
-
* @type {SmartSliderBackgroundImage[]}
|
298 |
-
*/
|
299 |
-
this.backgroundImages = [];
|
300 |
-
for (var i = 0; i < this.slides.length; i++) {
|
301 |
-
this.loaded[i] = false;
|
302 |
-
var image = this.slides.eq(i).find('.n2-ss-slide-background');
|
303 |
-
if (image.length > 0) {
|
304 |
-
if (this.slider.isAdmin) {
|
305 |
-
this.backgroundImages[i] = new scope.SmartSliderBackgroundImageAdmin(i, image, this);
|
306 |
-
} else {
|
307 |
-
this.backgroundImages[i] = new scope.SmartSliderBackgroundImage(i, image, this);
|
308 |
-
}
|
309 |
-
} else {
|
310 |
-
this.backgroundImages[i] = false;
|
311 |
-
}
|
312 |
-
this.slides.eq(i).data('slideBackground', this.backgroundImages[i]);
|
313 |
-
}
|
314 |
-
|
315 |
this.slider.sliderElement.one('SliderDevice', $.proxy(this.onSlideDeviceChangedFirst, this));
|
|
|
|
|
316 |
|
317 |
-
}
|
318 |
|
319 |
SmartSliderBackgroundImages.prototype.whenWithProgress = function (arrayOfPromises) {
|
320 |
-
var cntr = 0,
|
321 |
for (var i = 0; i < arrayOfPromises.length; i++) {
|
322 |
-
arrayOfPromises[i].done(function () {
|
323 |
-
|
324 |
});
|
325 |
}
|
326 |
-
|
327 |
-
// then just resolve it when the promise is resolved
|
328 |
-
// But, we can only call .notify() on a defer so if we want to use that,
|
329 |
-
// we are forced to make our own deferred
|
330 |
$.when.apply($, arrayOfPromises).done(function () {
|
331 |
-
|
332 |
});
|
333 |
-
|
|
|
334 |
};
|
335 |
|
336 |
SmartSliderBackgroundImages.prototype.getBackgroundImages = function () {
|
337 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
};
|
339 |
|
340 |
SmartSliderBackgroundImages.prototype.onSlideDeviceChangedFirst = function (e, device) {
|
@@ -343,14 +56,15 @@ N2Require('SmartSliderBackgroundImages', [], [], function ($, scope, undefined)
|
|
343 |
|
344 |
this.slider.sliderElement.on('SliderDevice', $.proxy(this.onSlideDeviceChanged, this));
|
345 |
|
|
|
346 |
if (this.lazyLoad == 1) {
|
347 |
-
this.
|
348 |
|
349 |
-
this.load =
|
350 |
} else if (this.lazyLoad == 2) { // delayed
|
351 |
$(window).on('load', $.proxy(this.preLoadAll, this));
|
352 |
|
353 |
-
this.load =
|
354 |
} else {
|
355 |
this.load = this.whenWithProgress(this.preLoadAll());
|
356 |
}
|
@@ -358,71 +72,53 @@ N2Require('SmartSliderBackgroundImages', [], [], function ($, scope, undefined)
|
|
358 |
|
359 |
SmartSliderBackgroundImages.prototype.onSlideDeviceChanged = function (e, device) {
|
360 |
this.device = device;
|
361 |
-
for (var i = 0; i < this.
|
362 |
-
if (this.
|
363 |
-
this.
|
364 |
-
}
|
365 |
-
}
|
366 |
-
};
|
367 |
-
|
368 |
-
SmartSliderBackgroundImages.prototype.changed = function (i) {
|
369 |
-
if (this.lazyLoad == 1 || this.lazyLoad == 2) {
|
370 |
-
if (i == this.slider.currentSlideIndex) {
|
371 |
-
this.preLoad(i);
|
372 |
}
|
373 |
-
} else {
|
374 |
-
this.preLoad(i);
|
375 |
}
|
376 |
};
|
377 |
|
378 |
-
SmartSliderBackgroundImages.prototype.preLoadCurrent = function () {
|
379 |
-
this.preLoad(this.slider.currentSlideIndex);
|
380 |
-
};
|
381 |
-
|
382 |
SmartSliderBackgroundImages.prototype.preLoadAll = function () {
|
383 |
var deferreds = [];
|
384 |
-
for (var i = 0; i < this.
|
385 |
-
deferreds.push(this.
|
386 |
}
|
387 |
return deferreds;
|
388 |
};
|
389 |
|
390 |
-
SmartSliderBackgroundImages.prototype.
|
391 |
-
|
392 |
-
|
|
|
|
|
|
|
|
|
|
|
393 |
|
394 |
-
|
|
|
395 |
|
396 |
-
|
397 |
-
|
398 |
|
399 |
-
if (lazyLoadNeighbor) {
|
400 |
var j = 0,
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
j++;
|
409 |
-
}
|
410 |
-
j = 0;
|
411 |
-
k = i;
|
412 |
-
while (j < lazyLoadNeighbor) {
|
413 |
-
k++;
|
414 |
-
if (k >= this.backgroundImages.length) {
|
415 |
-
k = 0;
|
416 |
-
}
|
417 |
-
deferreds.push(this._preLoad(k));
|
418 |
j++;
|
419 |
}
|
420 |
}
|
421 |
|
422 |
var renderedDeferred = $.Deferred();
|
423 |
-
if (deferreds[0].state() !=
|
424 |
var timeout = setTimeout($.proxy(function () {
|
425 |
-
this.slider.load.showSpinner('backgroundImage' +
|
426 |
timeout = null;
|
427 |
}, this), 50);
|
428 |
|
@@ -431,7 +127,7 @@ N2Require('SmartSliderBackgroundImages', [], [], function ($, scope, undefined)
|
|
431 |
clearTimeout(timeout);
|
432 |
timeout = null;
|
433 |
} else {
|
434 |
-
this.slider.load.removeSpinner('backgroundImage' +
|
435 |
}
|
436 |
setTimeout(function () {
|
437 |
renderedDeferred.resolve();
|
@@ -447,25 +143,10 @@ N2Require('SmartSliderBackgroundImages', [], [], function ($, scope, undefined)
|
|
447 |
return renderedDeferred;
|
448 |
};
|
449 |
|
450 |
-
SmartSliderBackgroundImages.prototype._preLoad = function (i) {
|
451 |
-
if (!this.loaded[i]) {
|
452 |
-
this.slides.eq(i).find('[data-lazysrc]').each(function () {
|
453 |
-
var $this = $(this);
|
454 |
-
$this.attr('src', $this.data('lazysrc'));
|
455 |
-
});
|
456 |
-
this.loaded[i] = true;
|
457 |
-
}
|
458 |
-
if (this.backgroundImages[i]) {
|
459 |
-
return this.backgroundImages[i].preLoad();
|
460 |
-
} else {
|
461 |
-
return true
|
462 |
-
}
|
463 |
-
};
|
464 |
-
|
465 |
SmartSliderBackgroundImages.prototype.hack = function () {
|
466 |
-
for (var i = 0; i < this.
|
467 |
-
if (this.
|
468 |
-
this.
|
469 |
}
|
470 |
}
|
471 |
};
|
@@ -475,19 +156,21 @@ N2Require('SmartSliderBackgroundImages', [], [], function ($, scope, undefined)
|
|
475 |
N2Require('SmartSliderLoad', [], [], function ($, scope, undefined) {
|
476 |
|
477 |
function SmartSliderLoad(smartSlider, parameters) {
|
478 |
-
this.smartSlider = smartSlider;
|
479 |
-
this.spinnerKey = 'fadePlaceholder';
|
480 |
-
|
481 |
-
this.id = smartSlider.sliderElement.attr('id');
|
482 |
|
483 |
this.parameters = $.extend({
|
484 |
fade: 1,
|
485 |
scroll: 0
|
486 |
}, parameters);
|
487 |
|
488 |
-
this.spinner = $('#' + this.id + '-spinner');
|
489 |
-
|
490 |
this.deferred = $.Deferred();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
};
|
492 |
|
493 |
|
@@ -521,13 +204,12 @@ N2Require('SmartSliderLoad', [], [], function ($, scope, undefined) {
|
|
521 |
};
|
522 |
|
523 |
SmartSliderLoad.prototype.onScroll = function () {
|
524 |
-
|
525 |
-
if (($window.scrollTop() + $window.height() > (this.smartSlider.sliderElement.offset().top + 100))) {
|
526 |
n2c.log('Fade on scroll - reached');
|
527 |
|
528 |
-
this.
|
529 |
|
530 |
-
|
531 |
}
|
532 |
};
|
533 |
|
@@ -538,14 +220,14 @@ N2Require('SmartSliderLoad', [], [], function ($, scope, undefined) {
|
|
538 |
deferred.resolve();
|
539 |
});
|
540 |
return deferred;
|
541 |
-
}
|
542 |
|
543 |
SmartSliderLoad.prototype.showSlider = function () {
|
544 |
|
545 |
$.when(this.smartSlider.responsive.ready, this.smartSlider.backgroundImages.load, this.loadLayerImages()).always($.proxy(function () {
|
546 |
this._showSlider();
|
547 |
}, this));
|
548 |
-
}
|
549 |
|
550 |
SmartSliderLoad.prototype._showSlider = function (cb) {
|
551 |
n2c.log('Images loaded');
|
@@ -556,6 +238,11 @@ N2Require('SmartSliderLoad', [], [], function ($, scope, undefined) {
|
|
556 |
n2c.log('Event: BeforeVisible');
|
557 |
this.smartSlider.responsive.invalidateResponsiveState = true;
|
558 |
this.smartSlider.responsive.doResize();
|
|
|
|
|
|
|
|
|
|
|
559 |
this.smartSlider.sliderElement.trigger('BeforeVisible');
|
560 |
|
561 |
this.smartSlider.responsive.alignElement.addClass('n2-ss-slider-align-visible');
|
@@ -579,12 +266,12 @@ N2Require('SmartSliderLoad', [], [], function ($, scope, undefined) {
|
|
579 |
|
580 |
SmartSliderLoad.prototype.loaded = function (fn) {
|
581 |
this.deferred.done(fn);
|
582 |
-
}
|
583 |
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
|
589 |
SmartSliderLoad.prototype.removeSpinner = function (spinnerKey) {
|
590 |
if (this.spinnerKey == spinnerKey) {
|
@@ -662,84 +349,111 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
662 |
function SmartSliderAbstract(elementID, parameters) {
|
663 |
this.startedDeferred = $.Deferred();
|
664 |
|
665 |
-
if (elementID instanceof n2) {
|
666 |
-
elementID = '#' + elementID.attr('id');
|
667 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
668 |
|
669 |
-
|
670 |
|
671 |
-
if (
|
672 |
-
|
673 |
-
|
|
|
|
|
|
|
674 |
|
675 |
-
|
676 |
-
window[id] = this;
|
677 |
-
this.readyDeferred = $.Deferred();
|
678 |
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
var dependency = sliderElement.data('dependency'),
|
688 |
-
delay = sliderElement.data('delay'),
|
689 |
-
rocketLoad = $.proxy(function () {
|
690 |
-
var rocketSlider = $(sliderElement.html().replace(/<_s_c_r_i_p_t/g, '<script').replace(/<_\/_s_c_r_i_p_t/g, '</script'));
|
691 |
-
sliderElement.replaceWith(rocketSlider);
|
692 |
-
this.postInit(id, $(elementID), parameters);
|
693 |
-
$(window).triggerHandler('n2Rocket', [this.sliderElement]);
|
694 |
-
}, this);
|
695 |
-
if (dependency && $('#n2-ss-' + dependency).length) {
|
696 |
-
n2ss.ready(dependency, $.proxy(function (slider) {
|
697 |
-
slider.ready(rocketLoad);
|
698 |
-
}, this));
|
699 |
-
} else if (delay) {
|
700 |
-
setTimeout(rocketLoad, delay);
|
701 |
-
} else {
|
702 |
-
rocketLoad();
|
703 |
-
}
|
704 |
} else {
|
705 |
-
|
706 |
}
|
707 |
-
}, this), true);
|
708 |
-
};
|
709 |
-
|
710 |
-
SmartSliderAbstract.prototype.postInit = function (id, sliderElement, parameters) {
|
711 |
-
if (parameters.isDelayed) {
|
712 |
-
setTimeout($.proxy(this._postInit, this, id, sliderElement, parameters), 200);
|
713 |
} else {
|
714 |
-
|
|
|
715 |
}
|
716 |
};
|
717 |
|
718 |
-
SmartSliderAbstract.prototype.
|
719 |
-
var
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
725 |
};
|
726 |
|
727 |
-
SmartSliderAbstract.prototype.
|
728 |
this.killed = false;
|
729 |
this.isAdmin = false;
|
730 |
-
|
731 |
this.responsive = false;
|
732 |
-
this.
|
733 |
-
|
734 |
-
|
735 |
-
this.
|
|
|
|
|
736 |
|
737 |
-
this.
|
|
|
|
|
|
|
|
|
738 |
|
739 |
this.parameters = $.extend({
|
740 |
admin: false,
|
741 |
playWhenVisible: 1,
|
742 |
-
|
743 |
callbacks: '',
|
744 |
autoplay: {},
|
745 |
blockrightclick: false,
|
@@ -786,9 +500,12 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
786 |
descriptions: [],
|
787 |
'background.parallax.tablet': 0,
|
788 |
'background.parallax.mobile': 0,
|
789 |
-
allowBGImageAttachmentFixed: 1
|
|
|
790 |
}, parameters);
|
791 |
|
|
|
|
|
792 |
try {
|
793 |
eval(this.parameters.callbacks);
|
794 |
} catch (e) {
|
@@ -810,16 +527,21 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
810 |
|
811 |
this.load = new scope.SmartSliderLoad(this, this.parameters.load);
|
812 |
|
813 |
-
this.
|
|
|
|
|
814 |
|
815 |
-
this.
|
816 |
|
817 |
-
|
|
|
|
|
|
|
818 |
|
819 |
-
|
820 |
if (typeof window['ss' + this.id] !== 'undefined') {
|
821 |
if (typeof window['ss' + this.id] == 'object') {
|
822 |
-
|
823 |
if (forceActiveSlideIndex !== null) {
|
824 |
this.changeActiveBeforeLoad(forceActiveSlideIndex);
|
825 |
}
|
@@ -830,36 +552,58 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
830 |
this.changeActiveBeforeLoad(forceActiveSlideIndex);
|
831 |
}
|
832 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
833 |
}
|
834 |
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
|
|
|
|
|
|
843 |
}
|
|
|
844 |
|
845 |
-
|
846 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
847 |
} else {
|
848 |
-
|
849 |
}
|
850 |
};
|
851 |
|
852 |
-
SmartSliderAbstract.prototype.
|
853 |
-
|
|
|
|
|
|
|
854 |
|
855 |
-
|
|
|
856 |
|
857 |
-
for (var
|
858 |
-
(new Function(this.parameters.initCallbacks[
|
859 |
}
|
860 |
|
861 |
-
this.initSlides();
|
862 |
-
|
863 |
this.widgets = new scope.SmartSliderWidgets(this);
|
864 |
|
865 |
this.sliderElement.on({
|
@@ -877,10 +621,6 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
877 |
|
878 |
this.controls = {};
|
879 |
|
880 |
-
if (this.layerMode) {
|
881 |
-
this.initMainAnimationWithLayerAnimation();
|
882 |
-
}
|
883 |
-
|
884 |
if (this.parameters.blockrightclick) {
|
885 |
this.sliderElement.bind("contextmenu", function (e) {
|
886 |
e.preventDefault();
|
@@ -894,6 +634,10 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
894 |
return;
|
895 |
}
|
896 |
|
|
|
|
|
|
|
|
|
897 |
this.initControls();
|
898 |
|
899 |
this.startedDeferred.resolve(this);
|
@@ -954,34 +698,35 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
954 |
});
|
955 |
});
|
956 |
|
957 |
-
var focusAllowed = false;
|
958 |
|
959 |
-
|
960 |
-
|
961 |
-
focusAllowed = true;
|
962 |
-
},
|
963 |
-
keyup: function () {
|
964 |
-
focusAllowed = false;
|
965 |
-
}
|
966 |
-
});
|
967 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
|
969 |
-
this.
|
970 |
focus: $.proxy(function (e) {
|
971 |
-
if (
|
972 |
-
var
|
973 |
-
if (
|
974 |
-
this.
|
975 |
}
|
976 |
}
|
977 |
}, this)
|
978 |
});
|
|
|
979 |
}
|
980 |
|
981 |
this.preReadyResolve();
|
982 |
|
983 |
-
this.initCarousel();
|
984 |
-
|
985 |
this.sliderElement.find('[role="button"], [tabindex]')
|
986 |
.keypress(function (event) {
|
987 |
if (event.charCode === 32 || event.charCode === 13) {
|
@@ -994,91 +739,88 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
994 |
});
|
995 |
};
|
996 |
|
997 |
-
SmartSliderAbstract.prototype.
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
|
|
|
|
1007 |
}
|
1008 |
}
|
1009 |
-
};
|
1010 |
|
1011 |
-
|
1012 |
-
return index;
|
1013 |
-
};
|
1014 |
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
}, this));
|
1023 |
}
|
1024 |
};
|
1025 |
|
1026 |
-
SmartSliderAbstract.prototype.
|
1027 |
-
|
1028 |
-
$('#' + this.sliderElement.attr('id') + '-placeholder').remove();
|
1029 |
-
this.sliderElement.closest('.n2-ss-align').remove();
|
1030 |
};
|
1031 |
|
1032 |
-
SmartSliderAbstract.prototype.
|
1033 |
-
if (this.
|
1034 |
-
this.
|
1035 |
-
this.
|
1036 |
}
|
|
|
1037 |
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
}
|
1042 |
|
1043 |
-
SmartSliderAbstract.prototype.
|
1044 |
-
|
1045 |
-
|
1046 |
-
});
|
1047 |
-
this.slides.appendTo(this.slides.parent());
|
1048 |
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
}
|
1053 |
|
1054 |
-
|
1055 |
-
|
1056 |
-
for (var i = 0; i < this.shuffled.length; i++) {
|
1057 |
-
shuffledPBG.push(this.parameters.postBackgroundAnimations.slides[this.shuffled[i]]);
|
1058 |
-
}
|
1059 |
-
this.parameters.postBackgroundAnimations.slides = shuffledPBG;
|
1060 |
-
}
|
1061 |
|
1062 |
-
if (this.parameters.
|
1063 |
-
|
1064 |
-
for (var i = 0; i < this.shuffled.length; i++) {
|
1065 |
-
shuffledBG.push(this.parameters.bgAnimations.slides[this.shuffled[i]]);
|
1066 |
-
}
|
1067 |
-
this.parameters.bgAnimations.slides = shuffledBG;
|
1068 |
}
|
|
|
1069 |
|
1070 |
-
|
|
|
|
|
1071 |
|
1072 |
-
|
1073 |
|
1074 |
-
|
1075 |
-
|
1076 |
-
this.realSlides.eq(i).data('originalIndex', i);
|
1077 |
}
|
1078 |
};
|
1079 |
|
1080 |
-
SmartSliderAbstract.prototype.
|
1081 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1082 |
};
|
1083 |
|
1084 |
SmartSliderAbstract.prototype.addWidget = function (e, deferred) {
|
@@ -1128,8 +870,11 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
1128 |
SmartSliderAbstract.prototype.checkIfVisible = function () {
|
1129 |
var windowOffsetTop = $(window).scrollTop(),
|
1130 |
windowHeight = $(window).height(),
|
1131 |
-
|
1132 |
-
|
|
|
|
|
|
|
1133 |
$(window).off('scroll.n2-ss-visible' + this.id + ' resize.n2-ss-visible' + this.id, $.proxy(this.checkIfVisible, this));
|
1134 |
this.visibleDeferred.resolve();
|
1135 |
}
|
@@ -1166,89 +911,121 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
1166 |
return deferred;
|
1167 |
};
|
1168 |
|
1169 |
-
SmartSliderAbstract.prototype.
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
|
|
|
|
|
|
|
|
|
|
1192 |
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1198 |
}
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
|
|
|
|
|
|
1203 |
}
|
1204 |
};
|
1205 |
|
1206 |
-
|
|
|
|
|
|
|
1207 |
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1211 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1212 |
};
|
1213 |
|
1214 |
-
SmartSliderAbstract.prototype.
|
1215 |
-
var nextIndex = this.
|
1216 |
if (nextIndex >= this.slides.length) {
|
1217 |
nextIndex = 0;
|
1218 |
}
|
1219 |
return this.changeTo(nextIndex, false, isSystem, customAnimation);
|
1220 |
};
|
1221 |
|
1222 |
-
SmartSliderAbstract.prototype.
|
1223 |
-
var nextIndex = this.
|
1224 |
if (nextIndex < 0) {
|
1225 |
nextIndex = this.slides.length - 1;
|
1226 |
}
|
1227 |
return this.changeTo(nextIndex, true, isSystem, customAnimation);
|
1228 |
};
|
1229 |
|
1230 |
-
SmartSliderAbstract.prototype.nextNotCarousel = function (isSystem, customAnimation) {
|
1231 |
-
var nextIndex = this.currentSlideIndex + 1;
|
1232 |
-
if (nextIndex < this.slides.length) {
|
1233 |
-
return this.changeTo(nextIndex, false, isSystem, customAnimation);
|
1234 |
-
}
|
1235 |
-
return false;
|
1236 |
-
};
|
1237 |
-
|
1238 |
-
SmartSliderAbstract.prototype.previousNotCarousel = function (isSystem, customAnimation) {
|
1239 |
-
var nextIndex = this.currentSlideIndex - 1;
|
1240 |
-
if (nextIndex >= 0) {
|
1241 |
-
return this.changeTo(nextIndex, true, isSystem, customAnimation);
|
1242 |
-
}
|
1243 |
-
return false;
|
1244 |
-
};
|
1245 |
|
1246 |
SmartSliderAbstract.prototype.directionalChangeToReal = function (nextSlideIndex) {
|
1247 |
this.directionalChangeTo(nextSlideIndex);
|
1248 |
};
|
1249 |
|
1250 |
SmartSliderAbstract.prototype.directionalChangeTo = function (nextSlideIndex) {
|
1251 |
-
if (nextSlideIndex > this.
|
1252 |
this.changeTo(nextSlideIndex, false);
|
1253 |
} else {
|
1254 |
this.changeTo(nextSlideIndex, true);
|
@@ -1258,14 +1035,14 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
1258 |
SmartSliderAbstract.prototype.changeTo = function (nextSlideIndex, reversed, isSystem, customAnimation) {
|
1259 |
nextSlideIndex = parseInt(nextSlideIndex);
|
1260 |
|
1261 |
-
if (nextSlideIndex != this.
|
1262 |
n2c.log('Event: sliderSwitchTo: ', 'targetSlideIndex');
|
1263 |
this.sliderElement.trigger('sliderSwitchTo', [nextSlideIndex, this.getRealIndex(nextSlideIndex)]);
|
1264 |
var time = $.now();
|
1265 |
-
$.when(this.backgroundImages.
|
1266 |
|
1267 |
-
if (this.
|
1268 |
-
this.
|
1269 |
// If the current main animation haven't finished yet or the prefered next slide is the same as our current slide we have nothing to do
|
1270 |
var state = this.mainAnimation.getState();
|
1271 |
if (state == 'ended') {
|
@@ -1281,10 +1058,10 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
1281 |
|
1282 |
this._changeTo(nextSlideIndex, reversed, isSystem, customAnimation);
|
1283 |
|
1284 |
-
n2c.log('Change From:', this.
|
1285 |
-
animation.changeTo(this.
|
1286 |
|
1287 |
-
this.
|
1288 |
|
1289 |
} else if (state == 'playing') {
|
1290 |
this.sliderElement.off('.fastChange').one('mainAnimationComplete.fastChange', $.proxy(function () {
|
@@ -1299,113 +1076,46 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
1299 |
return false;
|
1300 |
};
|
1301 |
|
|
|
|
|
|
|
|
|
1302 |
SmartSliderAbstract.prototype._changeTo = function (nextSlideIndex, reversed, isSystem, customAnimation) {
|
1303 |
|
1304 |
};
|
1305 |
|
1306 |
SmartSliderAbstract.prototype.revertTo = function (nextSlideIndex, originalNextSlideIndex) {
|
1307 |
-
this.unsetActiveSlide(this.slides.eq(originalNextSlideIndex));
|
1308 |
-
this.setActiveSlide(this.slides.eq(nextSlideIndex));
|
1309 |
-
this.currentSlideIndex = nextSlideIndex;
|
1310 |
-
this.sliderElement.trigger('sliderSwitchTo', [nextSlideIndex, this.getRealIndex(nextSlideIndex)]);
|
1311 |
-
}
|
1312 |
|
1313 |
-
|
1314 |
-
|
1315 |
-
if (index === -1) {
|
1316 |
-
index = 0;
|
1317 |
-
}
|
1318 |
-
return index;
|
1319 |
-
};
|
1320 |
|
1321 |
-
|
1322 |
-
slide.addClass('n2-ss-slide-active');
|
1323 |
-
};
|
1324 |
|
1325 |
-
|
1326 |
-
slide.removeClass('n2-ss-slide-active');
|
1327 |
};
|
1328 |
|
1329 |
-
SmartSliderAbstract.prototype.
|
1330 |
-
|
1331 |
-
if (this.parameters.layerMode.mode == 'forced') {
|
1332 |
-
this.sliderElement.on('preChangeToPlay', $.proxy(function (e, deferred, deferredHandled, currentSlide, nextSlide) {
|
1333 |
-
deferredHandled.handled = true;
|
1334 |
-
currentSlide.on('layerAnimationCompleteOut.layers', function () {
|
1335 |
-
currentSlide.off('layerAnimationCompleteOut.layers');
|
1336 |
-
deferred.resolve();
|
1337 |
-
});
|
1338 |
-
this.callOnSlide(currentSlide, 'playOut');
|
1339 |
-
}, this));
|
1340 |
-
}
|
1341 |
-
|
1342 |
-
|
1343 |
-
this.sliderElement.on('mainAnimationStart', $.proxy(this.onMainAnimationStartSyncLayers, this, this.parameters.layerMode))
|
1344 |
-
.on('reverseModeEnabled', $.proxy(this.onMainAnimationStartSyncLayersReverse, this, this.parameters.layerMode));
|
1345 |
};
|
1346 |
|
1347 |
-
SmartSliderAbstract.prototype.
|
1348 |
-
|
1349 |
-
outSlide = this.slides.eq(previousSlideIndex);
|
1350 |
-
if (layerMode.inAnimation == 'mainInStart') {
|
1351 |
-
inSlide.one('mainAnimationStartIn.layers', $.proxy(function () {
|
1352 |
-
inSlide.off('mainAnimationStartInCancel.layers');
|
1353 |
-
this.callOnSlide(inSlide, 'playIn');
|
1354 |
-
}, this));
|
1355 |
-
} else if (layerMode.inAnimation == 'mainInEnd') {
|
1356 |
-
inSlide.one('mainAnimationCompleteIn.layers', $.proxy(function () {
|
1357 |
-
inSlide.off('mainAnimationStartInCancel.layers');
|
1358 |
-
this.callOnSlide(inSlide, 'playIn');
|
1359 |
-
}, this));
|
1360 |
-
}
|
1361 |
-
|
1362 |
-
if (layerMode.mode == 'skippable') {
|
1363 |
-
outSlide.on('mainAnimationCompleteOut.layers', $.proxy(function () {
|
1364 |
-
outSlide.off('mainAnimationCompleteOut.layers');
|
1365 |
-
if (layerMode.playOnce) {
|
1366 |
-
if (!this.parameters.foreverLayerAnimation) {
|
1367 |
-
this.callOnSlide(outSlide, 'pause');
|
1368 |
-
}
|
1369 |
-
} else {
|
1370 |
-
this.callOnSlide(outSlide, 'reset');
|
1371 |
-
}
|
1372 |
-
}, this));
|
1373 |
-
}
|
1374 |
-
|
1375 |
-
inSlide.one('mainAnimationStartInCancel.layers', function () {
|
1376 |
-
inSlide.off('mainAnimationStartIn.layers');
|
1377 |
-
inSlide.off('mainAnimationCompleteIn.layers');
|
1378 |
-
});
|
1379 |
};
|
1380 |
|
1381 |
-
SmartSliderAbstract.prototype.
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
this.
|
1386 |
-
}
|
1387 |
-
} else if (layerMode.inAnimation == 'mainInEnd') {
|
1388 |
-
reverseSlide.one('mainAnimationCompleteIn.layers', $.proxy(function () {
|
1389 |
-
this.sliderElement.off('mainAnimationComplete.layers');
|
1390 |
-
this.callOnSlide(reverseSlide, 'playIn');
|
1391 |
-
}, this));
|
1392 |
}
|
1393 |
-
|
1394 |
-
this.sliderElement.one('mainAnimationComplete.layers', function () {
|
1395 |
-
reverseSlide.off('mainAnimationStartIn.layers');
|
1396 |
-
reverseSlide.off('mainAnimationCompleteIn.layers');
|
1397 |
-
});
|
1398 |
-
};
|
1399 |
-
|
1400 |
-
SmartSliderAbstract.prototype.callOnSlide = function (slide, functionName) {
|
1401 |
};
|
1402 |
|
1403 |
SmartSliderAbstract.prototype.findSlideIndexByElement = function (element) {
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
return i;
|
1408 |
-
}
|
1409 |
}
|
1410 |
return -1;
|
1411 |
};
|
@@ -1415,7 +1125,6 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
1415 |
};
|
1416 |
|
1417 |
SmartSliderAbstract.prototype.initResponsiveMode = function () {
|
1418 |
-
new this['responsiveClass'](this, this.parameters.responsive);
|
1419 |
this.dimensions = this.responsive.responsiveDimensions;
|
1420 |
};
|
1421 |
|
@@ -1457,9 +1166,10 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
1457 |
};
|
1458 |
|
1459 |
SmartSliderAbstract.prototype.slideToID = function (id, direction) {
|
1460 |
-
var
|
1461 |
-
|
1462 |
-
|
|
|
1463 |
}
|
1464 |
|
1465 |
var slider = $('[data-id="' + id + '"]').closest('.n2-ss-slider');
|
@@ -1482,108 +1192,36 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
1482 |
if (index >= 0 && index < this.slides.length) {
|
1483 |
if (typeof direction == 'undefined') {
|
1484 |
if (parseInt(this.parameters.carousel)) {
|
1485 |
-
if (this.
|
1486 |
-
return this.next();
|
1487 |
-
} else {
|
1488 |
-
if (this.
|
1489 |
-
return this.changeTo(index, true);
|
1490 |
-
} else {
|
1491 |
-
return this.changeTo(index);
|
1492 |
-
}
|
1493 |
-
}
|
1494 |
-
} else {
|
1495 |
-
if (this.
|
1496 |
-
return this.changeTo(index, true);
|
1497 |
-
} else {
|
1498 |
-
return this.changeTo(index);
|
1499 |
-
}
|
1500 |
-
}
|
1501 |
-
} else {
|
1502 |
-
return this.changeTo(index, !direction);
|
1503 |
-
}
|
1504 |
-
}
|
1505 |
-
return false;
|
1506 |
-
};
|
1507 |
-
|
1508 |
-
SmartSliderAbstract.prototype.adminGetCurrentSlideElement = function () {
|
1509 |
-
|
1510 |
-
if (this.parameters.isStaticEdited) {
|
1511 |
-
return this.findStaticSlide();
|
1512 |
-
}
|
1513 |
-
return this.slides.eq(this.currentSlideIndex);
|
1514 |
-
};
|
1515 |
-
|
1516 |
-
SmartSliderAbstract.prototype.startAutoplay = function (e) {
|
1517 |
-
if (typeof this.controlAutoplay !== 'undefined') {
|
1518 |
-
this.controlAutoplay.pauseAutoplayExtraPlayingEnded(e, 'autoplayButton');
|
1519 |
-
return true;
|
1520 |
-
}
|
1521 |
-
return false;
|
1522 |
-
}
|
1523 |
-
|
1524 |
-
(function () {
|
1525 |
-
|
1526 |
-
var intervals = {};
|
1527 |
-
var removeListener = function (selector) {
|
1528 |
-
|
1529 |
-
if (intervals[selector]) {
|
1530 |
-
|
1531 |
-
window.clearInterval(intervals[selector]);
|
1532 |
-
intervals[selector] = null;
|
1533 |
-
}
|
1534 |
-
};
|
1535 |
-
var found = 'n2waitUntilExists.found';
|
1536 |
-
|
1537 |
-
/**
|
1538 |
-
* @function
|
1539 |
-
* @property {object} jQuery plugin which runs handler function once specified
|
1540 |
-
* element is inserted into the DOM
|
1541 |
-
* @param {function|string} handler
|
1542 |
-
* A function to execute at the time when the element is inserted or
|
1543 |
-
* string "remove" to remove the listener from the given selector
|
1544 |
-
* @param {bool} shouldRunHandlerOnce
|
1545 |
-
* Optional: if true, handler is unbound after its first invocation
|
1546 |
-
* @example jQuery(selector).n2waitUntilExists(function);
|
1547 |
-
*/
|
1548 |
-
|
1549 |
-
$.fn.n2waitUntilExists = function (selector, handler, shouldRunHandlerOnce, isChild) {
|
1550 |
-
var $this = $(selector);
|
1551 |
-
var $elements = $this.not(function () {
|
1552 |
-
return $(this).data(found);
|
1553 |
-
});
|
1554 |
-
|
1555 |
-
if (handler === 'remove') {
|
1556 |
-
|
1557 |
-
// Hijack and remove interval immediately if the code requests
|
1558 |
-
removeListener(selector);
|
1559 |
-
}
|
1560 |
-
else {
|
1561 |
-
|
1562 |
-
// Run the handler on all found elements and mark as found
|
1563 |
-
$elements.each(handler).data(found, true);
|
1564 |
-
|
1565 |
-
if (shouldRunHandlerOnce && $this.length) {
|
1566 |
-
|
1567 |
-
// Element was found, implying the handler already ran for all
|
1568 |
-
// matched elements
|
1569 |
-
removeListener(selector);
|
1570 |
-
}
|
1571 |
-
else if (!isChild) {
|
1572 |
-
|
1573 |
-
// If this is a recurring search or if the target has not yet been
|
1574 |
-
// found, create an interval to continue searching for the target
|
1575 |
-
intervals[selector] = window.setInterval(function () {
|
1576 |
-
|
1577 |
-
$this.n2waitUntilExists(selector, handler, shouldRunHandlerOnce, true);
|
1578 |
-
}, 500);
|
1579 |
}
|
|
|
|
|
1580 |
}
|
|
|
|
|
|
|
1581 |
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
|
|
|
|
1587 |
|
1588 |
return SmartSliderAbstract;
|
1589 |
});
|
@@ -1684,7 +1322,7 @@ N2Require('SmartSliderWidgets', [], [], function ($, scope, undefined) {
|
|
1684 |
}
|
1685 |
}
|
1686 |
}
|
1687 |
-
hideOrShow(widget, excludedSlides, this.slider.
|
1688 |
this.slider.sliderElement
|
1689 |
.on('sliderSwitchTo', function (e, targetSlideIndex) {
|
1690 |
hideOrShow(widget, excludedSlides, targetSlideIndex);
|
@@ -2873,6 +2511,7 @@ N2Require('SmartSliderBackgroundAnimationFluxAbstract', ['SmartSliderBackgroundA
|
|
2873 |
width: this.w,
|
2874 |
height: this.h
|
2875 |
});
|
|
|
2876 |
}
|
2877 |
return this._clonedCurrent;
|
2878 |
};
|
@@ -2885,6 +2524,7 @@ N2Require('SmartSliderBackgroundAnimationFluxAbstract', ['SmartSliderBackgroundA
|
|
2885 |
width: this.w,
|
2886 |
height: this.h
|
2887 |
});
|
|
|
2888 |
}
|
2889 |
return this._clonedNext;
|
2890 |
};
|
@@ -2935,7 +2575,8 @@ N2Require('SmartSliderMainAnimationAbstract', [], [], function ($, scope, undefi
|
|
2935 |
this.isTouch = false;
|
2936 |
this.isReverseAllowed = true;
|
2937 |
this.isReverseEnabled = false;
|
2938 |
-
this.reverseSlideIndex =
|
|
|
2939 |
|
2940 |
this.slider = slider;
|
2941 |
|
@@ -2953,9 +2594,13 @@ N2Require('SmartSliderMainAnimationAbstract', [], [], function ($, scope, undefi
|
|
2953 |
});
|
2954 |
|
2955 |
this.sliderElement.on('mainAnimationStart', $.proxy(function (e, animation, currentSlideIndex, nextSlideIndex) {
|
2956 |
-
this.
|
2957 |
-
this.
|
2958 |
}, this));
|
|
|
|
|
|
|
|
|
2959 |
};
|
2960 |
|
2961 |
SmartSliderMainAnimationAbstract.prototype.enableReverseMode = function () {
|
@@ -3027,7 +2672,7 @@ N2Require('SmartSliderMainAnimationAbstract', [], [], function ($, scope, undefi
|
|
3027 |
this.fixTouchDuration(this.timeline, 1 - progress, duration);
|
3028 |
this.timeline.reverse();
|
3029 |
|
3030 |
-
this.willRevertTo(this.
|
3031 |
}
|
3032 |
};
|
3033 |
|
@@ -3037,7 +2682,7 @@ N2Require('SmartSliderMainAnimationAbstract', [], [], function ($, scope, undefi
|
|
3037 |
this.fixTouchDuration(this.reverseTimeline, progress, duration);
|
3038 |
this.reverseTimeline.play();
|
3039 |
|
3040 |
-
this.willRevertTo(this.reverseSlideIndex, this.
|
3041 |
} else {
|
3042 |
|
3043 |
this.willCleanSlideIndex(this.reverseSlideIndex);
|
@@ -3057,7 +2702,7 @@ N2Require('SmartSliderMainAnimationAbstract', [], [], function ($, scope, undefi
|
|
3057 |
|
3058 |
this.willCleanSlideIndex(this.reverseSlideIndex);
|
3059 |
|
3060 |
-
this.willRevertTo(this.
|
3061 |
}
|
3062 |
};
|
3063 |
|
@@ -3081,52 +2726,30 @@ N2Require('SmartSliderMainAnimationAbstract', [], [], function ($, scope, undefi
|
|
3081 |
return this.timeline.timeScale();
|
3082 |
};
|
3083 |
|
3084 |
-
SmartSliderMainAnimationAbstract.prototype.
|
3085 |
-
var deferredHandled = {
|
3086 |
-
handled: false
|
3087 |
-
};
|
3088 |
-
|
3089 |
-
this.sliderElement.trigger('preChangeToPlay', [deferred, deferredHandled, currentSlide, nextSlide]);
|
3090 |
-
|
3091 |
-
if (!deferredHandled.handled) {
|
3092 |
-
deferred.resolve();
|
3093 |
-
}
|
3094 |
-
};
|
3095 |
-
|
3096 |
-
SmartSliderMainAnimationAbstract.prototype.changeTo = function (currentSlideIndex, currentSlide, nextSlideIndex, nextSlide, reversed, isSystem) {
|
3097 |
|
3098 |
-
this._initAnimation(
|
3099 |
|
3100 |
this.state = 'initAnimation';
|
3101 |
|
3102 |
this.timeline.paused(true);
|
3103 |
-
this.timeline.eventCallback('onStart', this.onChangeToStart, [
|
3104 |
-
this.timeline.eventCallback('onComplete', this.onChangeToComplete, [
|
3105 |
this.timeline.eventCallback('onReverseComplete', null);
|
3106 |
|
3107 |
this.revertCB = $.proxy(function (timeline) {
|
3108 |
-
timeline.eventCallback('onReverseComplete', this.onReverseChangeToComplete, [
|
3109 |
}, this);
|
3110 |
|
3111 |
if (this.slider.parameters.dynamicHeight) {
|
3112 |
var tl = new NextendTimeline();
|
3113 |
-
this.slider.responsive.doResize(false, tl,
|
3114 |
this.timeline.add(tl);
|
3115 |
}
|
3116 |
-
|
3117 |
-
|
3118 |
-
// If the animation is in touch mode, we do not need to play the timeline as the touch will set the actual progress and also play later...
|
3119 |
if (!this.isTouch) {
|
3120 |
-
|
3121 |
-
|
3122 |
-
deferred.done($.proxy(function () {
|
3123 |
-
this.play();
|
3124 |
-
}, this.timeline));
|
3125 |
-
|
3126 |
-
this.preChangeToPlay(deferred, currentSlide, nextSlide);
|
3127 |
-
} else {
|
3128 |
-
this.slider.callOnSlide(currentSlide, 'onOutAnimationsPlayed');
|
3129 |
}
|
|
|
3130 |
};
|
3131 |
|
3132 |
|
@@ -3142,7 +2765,7 @@ N2Require('SmartSliderMainAnimationAbstract', [], [], function ($, scope, undefi
|
|
3142 |
this.slider.revertTo(slideIndex, originalNextSlideIndex);
|
3143 |
|
3144 |
// Cancel the pre-initialized layer animations on the original next slide.
|
3145 |
-
this.slider.slides
|
3146 |
};
|
3147 |
|
3148 |
|
@@ -3157,39 +2780,37 @@ N2Require('SmartSliderMainAnimationAbstract', [], [], function ($, scope, undefi
|
|
3157 |
|
3158 |
/**
|
3159 |
* @abstract
|
3160 |
-
* @param currentSlideIndex
|
3161 |
* @param currentSlide
|
3162 |
-
* @param nextSlideIndex
|
3163 |
* @param nextSlide
|
3164 |
* @param reversed
|
3165 |
* @private
|
3166 |
*/
|
3167 |
-
SmartSliderMainAnimationAbstract.prototype._initAnimation = function (
|
3168 |
|
3169 |
};
|
3170 |
|
3171 |
-
SmartSliderMainAnimationAbstract.prototype.onChangeToStart = function (
|
3172 |
|
3173 |
this.state = 'playing';
|
3174 |
|
3175 |
-
var parameters = [this,
|
3176 |
|
3177 |
n2c.log('Event: mainAnimationStart: ', parameters, '{NextendSmartSliderMainAnimationAbstract}, previousSlideIndex, currentSlideIndex, isSystem');
|
3178 |
this.sliderElement.trigger('mainAnimationStart', parameters);
|
3179 |
|
3180 |
-
this.slider.slides.
|
3181 |
-
this.slider.slides.
|
3182 |
};
|
3183 |
|
3184 |
-
SmartSliderMainAnimationAbstract.prototype.onChangeToComplete = function (
|
3185 |
-
var parameters = [this,
|
3186 |
|
3187 |
this.clearTimelines();
|
3188 |
|
3189 |
this.disableReverseMode();
|
3190 |
|
3191 |
-
this.slider.slides.
|
3192 |
-
this.slider.slides.
|
3193 |
|
3194 |
this.state = 'ended';
|
3195 |
|
@@ -3197,7 +2818,7 @@ N2Require('SmartSliderMainAnimationAbstract', [], [], function ($, scope, undefi
|
|
3197 |
this.sliderElement.trigger('mainAnimationComplete', parameters);
|
3198 |
};
|
3199 |
|
3200 |
-
SmartSliderMainAnimationAbstract.prototype.onReverseChangeToComplete = function (
|
3201 |
SmartSliderMainAnimationAbstract.prototype.onChangeToComplete.apply(this, arguments);
|
3202 |
};
|
3203 |
|
@@ -3207,10 +2828,8 @@ N2Require('SmartSliderMainAnimationAbstract', [], [], function ($, scope, undefi
|
|
3207 |
};
|
3208 |
this.timeline.clear();
|
3209 |
this.timeline.timeScale(1);
|
3210 |
-
//this.reverseTimeline.clear();
|
3211 |
-
//this.reverseTimeline.timeScale(1);
|
3212 |
|
3213 |
-
}
|
3214 |
|
3215 |
SmartSliderMainAnimationAbstract.prototype.getEase = function () {
|
3216 |
if (this.isTouch) {
|
@@ -3286,7 +2905,7 @@ N2Require('SmartSliderControlAutoplay', [], [], function ($, scope, undefined) {
|
|
3286 |
var obj = {
|
3287 |
_progress: 0
|
3288 |
};
|
3289 |
-
this.timeline = NextendTween.to(obj, this.getSlideDuration(this.slider.
|
3290 |
_progress: 1,
|
3291 |
paused: true,
|
3292 |
onComplete: $.proxy(this.next, this)
|
@@ -3398,7 +3017,7 @@ N2Require('SmartSliderControlAutoplay', [], [], function ($, scope, undefined) {
|
|
3398 |
|
3399 |
SmartSliderControlAutoplay.prototype.onMainAnimationComplete = function (e, animation, previousSlideIndex, currentSlideIndex) {
|
3400 |
|
3401 |
-
if (this.parameters.autoplayToSlideIndex >= 0 && this.parameters.autoplayToSlideIndex == this.slider.
|
3402 |
this.limitAutoplay();
|
3403 |
}
|
3404 |
|
@@ -3410,7 +3029,7 @@ N2Require('SmartSliderControlAutoplay', [], [], function ($, scope, undefined) {
|
|
3410 |
};
|
3411 |
|
3412 |
SmartSliderControlAutoplay.prototype.getSlideDuration = function (index) {
|
3413 |
-
var slide = this.slider.realSlides
|
3414 |
duration = slide.minimumSlideDuration;
|
3415 |
|
3416 |
if (duration < 0.3 && duration < this.parameters.duration) {
|
@@ -3575,7 +3194,7 @@ N2Require('SmartSliderControlAutoplay', [], [], function ($, scope, undefined) {
|
|
3575 |
/**
|
3576 |
* We have reached the maximum slides in the autoplay so disable it completely
|
3577 |
*/
|
3578 |
-
if (this.parameters.autoplayToSlide > 0 && this._currentCount >= this.parameters.autoplayToSlide || this.parameters.autoplayToSlideIndex >= 0 && this.parameters.autoplayToSlideIndex == this.slider.
|
3579 |
this.limitAutoplay();
|
3580 |
}
|
3581 |
|
@@ -3612,8 +3231,8 @@ N2Require('SmartSliderControlFullscreen', [], [], function ($, scope, undefined)
|
|
3612 |
this.forceFullpage = this._type == 'auto' || this._type == 'fullwidth' || this._type == 'fullpage';
|
3613 |
if (this.forceFullpage) {
|
3614 |
this._upscale = this.responsive.parameters.upscale;
|
3615 |
-
this._minimumHeightRatio = this.responsive.parameters.minimumHeightRatio;
|
3616 |
-
this._maximumHeightRatio = this.responsive.parameters.maximumHeightRatio;
|
3617 |
}
|
3618 |
|
3619 |
this.isFullScreen = false;
|
@@ -3777,9 +3396,9 @@ N2Require('SmartSliderControlFullscreen', [], [], function ($, scope, undefined)
|
|
3777 |
this.responsive.parameters.maximumHeightRatio = this._maximumHeightRatio;
|
3778 |
this.responsive.containerElement.css(nextend.rtl.marginLeft, this._marginLeft);
|
3779 |
this.fullParent.css({
|
3780 |
-
width:
|
3781 |
-
height:
|
3782 |
-
backgroundColor:
|
3783 |
}).removeClass("n2-ss-in-fullscreen");
|
3784 |
$('html').removeClass('n2-in-fullscreen');
|
3785 |
$(window).trigger('resize');
|
@@ -3876,14 +3495,15 @@ N2Require('SmartSliderControlScroll', [], [], function ($, scope, undefined) {
|
|
3876 |
|
3877 |
function SmartSliderControlScroll(slider) {
|
3878 |
|
3879 |
-
this.preventScroll = false
|
|
|
3880 |
|
3881 |
this.slider = slider;
|
3882 |
|
3883 |
slider.sliderElement.on('DOMMouseScroll mousewheel', $.proxy(this.onMouseWheel, this));
|
3884 |
|
3885 |
slider.controls.scroll = this;
|
3886 |
-
}
|
3887 |
|
3888 |
SmartSliderControlScroll.prototype.onMouseWheel = function (e) {
|
3889 |
if (!this.preventScroll) {
|
@@ -3897,23 +3517,28 @@ N2Require('SmartSliderControlScroll', [], [], function ($, scope, undefined) {
|
|
3897 |
|
3898 |
if (up) {
|
3899 |
if (this.slider.previous()) {
|
3900 |
-
this.
|
3901 |
-
// Stops the browser normal scroll
|
3902 |
-
e.preventDefault();
|
3903 |
}
|
3904 |
} else {
|
3905 |
if (this.slider.next()) {
|
3906 |
-
this.
|
3907 |
-
// Stops the browser normal scroll
|
3908 |
-
e.preventDefault();
|
3909 |
}
|
3910 |
}
|
3911 |
-
setTimeout($.proxy(function () {
|
3912 |
-
this.preventScroll = false;
|
3913 |
-
}, this), 1000);
|
3914 |
} else {
|
3915 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3916 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
3917 |
};
|
3918 |
|
3919 |
return SmartSliderControlScroll;
|
@@ -4008,7 +3633,7 @@ N2Require('SmartSliderControlTouch', [], [], function ($, scope, undefined) {
|
|
4008 |
fallbackToMouseEvents: true
|
4009 |
}, parameters);
|
4010 |
|
4011 |
-
this.swipeElement = this.slider.sliderElement.find('>
|
4012 |
|
4013 |
if (_direction == 'vertical') {
|
4014 |
this.setVertical();
|
@@ -4018,72 +3643,132 @@ N2Require('SmartSliderControlTouch', [], [], function ($, scope, undefined) {
|
|
4018 |
|
4019 |
var initTouch = $.proxy(function () {
|
4020 |
var that = this;
|
4021 |
-
|
4022 |
-
|
4023 |
-
|
4024 |
-
|
4025 |
-
|
4026 |
-
|
4027 |
-
|
4028 |
-
|
4029 |
-
|
4030 |
-
if (
|
4031 |
-
|
4032 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4033 |
}
|
4034 |
-
|
4035 |
-
that.
|
4036 |
-
|
4037 |
-
|
4038 |
-
|
4039 |
-
|
4040 |
-
|
4041 |
-
|
4042 |
-
percent: 0
|
4043 |
-
};
|
4044 |
-
var isChangePossible = that.slider[that._direction[direction]](false);
|
4045 |
-
if (!isChangePossible) {
|
4046 |
-
that.currentAnimation = null;
|
4047 |
-
return false;
|
4048 |
}
|
4049 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4050 |
|
4051 |
-
|
4052 |
-
|
4053 |
-
that.logDistance(realDistance);
|
4054 |
-
if (that.currentAnimation.percent < 1) {
|
4055 |
-
var percent = Math.max(-0.99999, Math.min(0.99999, realDistance / that.slider.dimensions.slider[that._property]));
|
4056 |
-
that.currentAnimation.percent = percent;
|
4057 |
-
that._animation.setTouchProgress(percent);
|
4058 |
}
|
4059 |
-
|
4060 |
-
|
4061 |
-
|
|
|
|
|
4062 |
}
|
4063 |
}
|
4064 |
-
|
4065 |
-
|
4066 |
-
|
4067 |
-
|
4068 |
-
|
4069 |
-
|
4070 |
-
|
4071 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4072 |
}
|
4073 |
-
that.swipeElement.removeClass('n2-grabbing');
|
4074 |
|
4075 |
-
|
4076 |
-
|
4077 |
-
|
4078 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4079 |
|
4080 |
-
|
4081 |
-
|
4082 |
-
|
4083 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4084 |
}
|
4085 |
-
}
|
4086 |
-
}
|
4087 |
}, this);
|
4088 |
|
4089 |
if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
|
@@ -4180,22 +3865,198 @@ N2Require('SmartSliderControlTouch', [], [], function ($, scope, undefined) {
|
|
4180 |
if ((lastValue >= 0 && firstValue > lastValue) || (lastValue < 0 && firstValue < lastValue)) {
|
4181 |
return 0;
|
4182 |
}
|
4183 |
-
return 1;
|
4184 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4185 |
|
4186 |
-
|
4187 |
-
|
4188 |
-
|
4189 |
-
|
4190 |
-
setTimeout(function () {
|
4191 |
-
preventMultipleTap = false;
|
4192 |
-
}, 500);
|
4193 |
-
}
|
4194 |
};
|
4195 |
|
4196 |
-
return
|
4197 |
});
|
4198 |
N2Require('FrontendComponent', [], [], function ($, scope, undefined) {
|
|
|
|
|
|
|
|
|
|
|
4199 |
function FrontendComponent(slide, parent, $layer, $children) {
|
4200 |
this.wraps = {};
|
4201 |
this.isVisible = true;
|
@@ -4404,6 +4265,210 @@ N2Require('FrontendPlacement', [], [], function ($, scope, undefined) {
|
|
4404 |
|
4405 |
return FrontendPlacement;
|
4406 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4407 |
N2Require('FrontendPlacementAbsolute', ['FrontendPlacement'], [], function ($, scope, undefined) {
|
4408 |
|
4409 |
if (/(MSIE\ [0-7]\.\d+)/.test(navigator.userAgent)) {
|
@@ -4559,6 +4624,7 @@ N2Require('FrontendPlacementAbsolute', ['FrontendPlacement'], [], function ($, s
|
|
4559 |
break;
|
4560 |
}
|
4561 |
}
|
|
|
4562 |
$layer.css(positionCSS);
|
4563 |
|
4564 |
for (var i = 0; i < this.linked.length; i++) {
|
@@ -4902,6 +4968,10 @@ N2Require('FrontendComponentRow', ['FrontendComponent'], [], function ($, scope,
|
|
4902 |
length = columns.length,
|
4903 |
isWrapped = false;
|
4904 |
|
|
|
|
|
|
|
|
|
4905 |
if (wrapAfter > 0 && wrapAfter < length) {
|
4906 |
isWrapped = true;
|
4907 |
}
|
@@ -4920,133 +4990,25 @@ N2Require('FrontendComponentRow', ['FrontendComponent'], [], function ($, scope,
|
|
4920 |
$('<div class="n2-ss-row-break"/>')
|
4921 |
.css('order', order)
|
4922 |
.insertAfter(columns[i].$layer), columns[i].$layer;
|
4923 |
-
} else {
|
4924 |
-
columns[i].$layer.removeClass('n2-ss-last-in-row');
|
4925 |
-
}
|
4926 |
-
}
|
4927 |
-
} else {
|
4928 |
-
for (var i = 0; i < length; i++) {
|
4929 |
-
columns[i].$layer
|
4930 |
-
.removeClass('n2-ss-last-in-row')
|
4931 |
-
.attr('data-r', 0);
|
4932 |
-
}
|
4933 |
-
columns[length - 1].$layer.addClass('n2-ss-last-in-row');
|
4934 |
-
}
|
4935 |
-
}
|
4936 |
-
|
4937 |
-
FrontendComponentRow.prototype.getContents = function () {
|
4938 |
-
return this.$row;
|
4939 |
-
}
|
4940 |
-
|
4941 |
-
return FrontendComponentRow;
|
4942 |
-
});
|
4943 |
-
N2Require('FrontendComponentSlide', ['FrontendComponentSlideAbstract'], [], function ($, scope, undefined) {
|
4944 |
-
|
4945 |
-
function FrontendComponentSlide(slider, $slideElement, isFirst) {
|
4946 |
-
this.isStaticSlide = false;
|
4947 |
-
this.isFirstSlide = isFirst;
|
4948 |
-
this.$slideElement = $slideElement.data('slide', this);
|
4949 |
-
|
4950 |
-
|
4951 |
-
if (!slider.parameters.admin) {
|
4952 |
-
this.minimumSlideDuration = $slideElement.data('slide-duration');
|
4953 |
-
if (!$.isNumeric(this.minimumSlideDuration)) {
|
4954 |
-
this.minimumSlideDuration = 0;
|
4955 |
-
}
|
4956 |
-
} else {
|
4957 |
-
this.minimumSlideDuration = 0;
|
4958 |
-
}
|
4959 |
-
|
4960 |
-
var $container = $slideElement.find('.n2-ss-layers-container');
|
4961 |
-
scope.FrontendComponentSlideAbstract.prototype.constructor.call(this, slider, $container);
|
4962 |
-
}
|
4963 |
-
|
4964 |
-
FrontendComponentSlide.prototype = Object.create(scope.FrontendComponentSlideAbstract.prototype);
|
4965 |
-
FrontendComponentSlide.prototype.constructor = FrontendComponentSlide;
|
4966 |
-
|
4967 |
-
FrontendComponentSlide.prototype.isActive = function () {
|
4968 |
-
return this.$slideElement.hasClass('n2-ss-slide-active');
|
4969 |
-
}
|
4970 |
-
|
4971 |
-
return FrontendComponentSlide;
|
4972 |
-
});
|
4973 |
-
N2Require('FrontendComponentSlideAbstract', ['FrontendComponent'], [], function ($, scope, undefined) {
|
4974 |
-
|
4975 |
-
var SlideStatus = {
|
4976 |
-
NOT_INITIALIZED: -1,
|
4977 |
-
INITIALIZED: 0,
|
4978 |
-
READY_TO_START: 1,
|
4979 |
-
PLAYING: 2,
|
4980 |
-
ENDED: 3
|
4981 |
-
};
|
4982 |
-
|
4983 |
-
function FrontendComponentSlideAbstract(slider, $el) {
|
4984 |
-
|
4985 |
-
this.baseSize = 16;
|
4986 |
-
|
4987 |
-
if (!slider.parameters.admin || !this.$slideElement.is(slider.adminGetCurrentSlideElement())) {
|
4988 |
-
|
4989 |
-
this.slider = slider;
|
4990 |
-
this.status = SlideStatus.NOT_INITIALIZED;
|
4991 |
-
|
4992 |
-
scope.FrontendComponent.prototype.constructor.call(this, this, this, $el, $el.find('> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group'));
|
4993 |
-
|
4994 |
-
this.slider.sliderElement.on({
|
4995 |
-
SliderDeviceOrientation: $.proxy(function (e, modes) {
|
4996 |
-
this.onDeviceChange(modes.device + modes.orientation.toLowerCase());
|
4997 |
-
}, this),
|
4998 |
-
SliderResize: $.proxy(function (e, ratios, responsive) {
|
4999 |
-
this.onResize(ratios, responsive.responsiveDimensions);
|
5000 |
-
}, this)
|
5001 |
-
});
|
5002 |
-
|
5003 |
-
this.start();
|
5004 |
-
}
|
5005 |
-
}
|
5006 |
-
|
5007 |
-
FrontendComponentSlideAbstract.prototype = Object.create(scope.FrontendComponent.prototype);
|
5008 |
-
FrontendComponentSlideAbstract.prototype.constructor = FrontendComponentSlideAbstract;
|
5009 |
-
|
5010 |
-
|
5011 |
-
FrontendComponentSlideAbstract.prototype.refreshBaseSize = function (fontSize) {
|
5012 |
-
|
5013 |
-
}
|
5014 |
-
|
5015 |
-
FrontendComponentSlideAbstract.prototype.onResize = function (ratios, dimensions) {
|
5016 |
-
for (var i = 0; i < this.children.length; i++) {
|
5017 |
-
this.children[i].onResize(ratios, dimensions, this.isStaticSlide)
|
5018 |
-
}
|
5019 |
-
}
|
5020 |
-
|
5021 |
-
|
5022 |
-
FrontendComponentSlideAbstract.prototype.hasLayers = function () {
|
5023 |
-
return this.children.length > 0;
|
5024 |
-
}
|
5025 |
-
|
5026 |
-
FrontendComponentSlideAbstract.prototype.onDeviceChange = function (device) {
|
5027 |
-
this.device = device;
|
5028 |
-
|
5029 |
-
for (var i = 0; i < this.children.length; i++) {
|
5030 |
-
this.children[i].onDeviceChange(device)
|
5031 |
}
|
5032 |
-
this.placement.onDeviceChange(device);
|
5033 |
-
|
5034 |
}
|
5035 |
|
5036 |
-
|
5037 |
-
|
5038 |
-
N2Require('FrontendComponentStaticSlide', ['FrontendComponentSlideAbstract'], [], function ($, scope, undefined) {
|
5039 |
-
|
5040 |
-
function FrontendComponentStaticSlide(slider, $slideElement) {
|
5041 |
-
this.isStaticSlide = true;
|
5042 |
-
this.$slideElement = $slideElement.data('slide', this);
|
5043 |
-
scope.FrontendComponentSlideAbstract.prototype.constructor.call(this, slider, $slideElement);
|
5044 |
}
|
5045 |
|
5046 |
-
|
5047 |
-
FrontendComponentStaticSlide.prototype.constructor = FrontendComponentStaticSlide;
|
5048 |
-
|
5049 |
-
return FrontendComponentStaticSlide;
|
5050 |
});
|
5051 |
N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
5052 |
|
@@ -5061,70 +5023,6 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5061 |
|
5062 |
this.invalidateResponsiveState = true;
|
5063 |
|
5064 |
-
if (slider.isAdmin) {
|
5065 |
-
this.doResize = NextendThrottle(this.doResize, 50);
|
5066 |
-
}
|
5067 |
-
|
5068 |
-
this.loadDeferred = $.Deferred();
|
5069 |
-
|
5070 |
-
if (nextend.fontsDeferred == undefined) {
|
5071 |
-
nextend.loadDeferred.always($.proxy(function () {
|
5072 |
-
this.loadDeferred.resolve();
|
5073 |
-
}, this));
|
5074 |
-
} else {
|
5075 |
-
nextend.fontsDeferred.always($.proxy(function () {
|
5076 |
-
this.loadDeferred.resolve();
|
5077 |
-
}, this));
|
5078 |
-
}
|
5079 |
-
|
5080 |
-
|
5081 |
-
this.fixedEditRatio = 1;
|
5082 |
-
this.normalizeTimeout = null;
|
5083 |
-
this.delayedResizeAdded = false;
|
5084 |
-
|
5085 |
-
this.deviceMode = SmartSliderResponsive.DeviceMode.UNKNOWN;
|
5086 |
-
this.orientationMode = SmartSliderResponsive.OrientationMode.SCREEN;
|
5087 |
-
this.orientation = SmartSliderResponsive.DeviceOrientation.UNKNOWN;
|
5088 |
-
this.lastRatios = {
|
5089 |
-
ratio: -1
|
5090 |
-
};
|
5091 |
-
this.lastRawRatios = {
|
5092 |
-
ratio: -1
|
5093 |
-
};
|
5094 |
-
this.normalizedMode = 'unknownUnknown';
|
5095 |
-
|
5096 |
-
slider.responsive = this;
|
5097 |
-
|
5098 |
-
this.widgetMargins = {
|
5099 |
-
Top: [],
|
5100 |
-
Right: [],
|
5101 |
-
Bottom: [],
|
5102 |
-
Left: []
|
5103 |
-
};
|
5104 |
-
this.staticSizes = {
|
5105 |
-
paddingTop: 0,
|
5106 |
-
paddingRight: 0,
|
5107 |
-
paddingBottom: 0,
|
5108 |
-
paddingLeft: 0
|
5109 |
-
};
|
5110 |
-
this.enabledWidgetMargins = [];
|
5111 |
-
|
5112 |
-
this.slider = slider;
|
5113 |
-
this.sliderElement = slider.sliderElement;
|
5114 |
-
|
5115 |
-
|
5116 |
-
this.alignElement = this.slider.sliderElement.closest('.n2-ss-align');
|
5117 |
-
|
5118 |
-
var ready = this.ready = $.Deferred();
|
5119 |
-
|
5120 |
-
this.sliderElement.triggerHandler('SliderResponsiveStarted');
|
5121 |
-
|
5122 |
-
this.sliderElement.one('SliderResize', function () {
|
5123 |
-
ready.resolve();
|
5124 |
-
});
|
5125 |
-
|
5126 |
-
this.containerElementPadding = this.sliderElement.parent();
|
5127 |
-
this.containerElement = this.containerElementPadding.parent();
|
5128 |
this.parameters = $.extend({
|
5129 |
desktop: 1,
|
5130 |
tablet: 1,
|
@@ -5220,6 +5118,100 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5220 |
overflowHiddenPage: 0
|
5221 |
}, parameters);
|
5222 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5223 |
|
5224 |
if (!this.slider.isAdmin && this.parameters.overflowHiddenPage) {
|
5225 |
$('html, body').css('overflow', 'hidden');
|
@@ -5229,7 +5221,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5229 |
this.orientationMode = SmartSliderResponsive.OrientationMode.SCREEN_WIDTH_ONLY;
|
5230 |
}
|
5231 |
|
5232 |
-
nextend.smallestZoom = Math.min(Math.max(parameters.sliderWidthToDevice.mobilePortrait, 120), 320);
|
5233 |
|
5234 |
switch (this.parameters.basedOn) {
|
5235 |
case 'screen':
|
@@ -5274,7 +5266,6 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5274 |
this.parameters.maximumHeightRatio.mobilePortrait = this.parameters.maximumHeightRatio.desktopPortrait;
|
5275 |
this.parameters.maximumHeightRatio.mobileLandscape = this.parameters.maximumHeightRatio.desktopPortrait;
|
5276 |
}
|
5277 |
-
|
5278 |
if (this.parameters.maximumSlideWidth > 0) {
|
5279 |
this.parameters.maximumSlideWidthRatio = {
|
5280 |
desktopPortrait: this.parameters.maximumSlideWidth / this.responsiveDimensions.startSlideWidth,
|
@@ -5283,7 +5274,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5283 |
tabletLandscape: this.parameters.maximumSlideWidthTabletLandscape / this.responsiveDimensions.startSlideWidth,
|
5284 |
mobilePortrait: this.parameters.maximumSlideWidthMobile / this.responsiveDimensions.startSlideWidth,
|
5285 |
mobileLandscape: this.parameters.maximumSlideWidthMobileLandscape / this.responsiveDimensions.startSlideWidth
|
5286 |
-
}
|
5287 |
|
5288 |
if (this.parameters.maximumSlideWidthConstrainHeight) {
|
5289 |
this.parameters.maximumHeightRatio = $.extend({}, this.parameters.maximumSlideWidthRatio);
|
@@ -5300,8 +5291,10 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5300 |
|
5301 |
this.onResize();
|
5302 |
if (this.parameters.onResizeEnabled || this.parameters.type == 'adaptive') {
|
5303 |
-
$(window).on(
|
5304 |
-
|
|
|
|
|
5305 |
|
5306 |
this.sliderElement.on('SliderInternalResize', $.proxy(this.onResize, this));
|
5307 |
|
@@ -5320,38 +5313,8 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5320 |
}
|
5321 |
};
|
5322 |
|
5323 |
-
SmartSliderResponsive.OrientationMode = {
|
5324 |
-
SCREEN: 0,
|
5325 |
-
ADMIN_LANDSCAPE: 1,
|
5326 |
-
ADMIN_PORTRAIT: 2,
|
5327 |
-
SCREEN_WIDTH_ONLY: 3
|
5328 |
-
};
|
5329 |
-
SmartSliderResponsive.DeviceOrientation = {
|
5330 |
-
UNKNOWN: 0,
|
5331 |
-
LANDSCAPE: 1,
|
5332 |
-
PORTRAIT: 2
|
5333 |
-
};
|
5334 |
-
SmartSliderResponsive._DeviceOrientation = {
|
5335 |
-
0: 'Unknown',
|
5336 |
-
1: 'Landscape',
|
5337 |
-
2: 'Portrait'
|
5338 |
-
};
|
5339 |
-
SmartSliderResponsive.DeviceMode = {
|
5340 |
-
UNKNOWN: 0,
|
5341 |
-
DESKTOP: 1,
|
5342 |
-
TABLET: 2,
|
5343 |
-
MOBILE: 3
|
5344 |
-
};
|
5345 |
-
SmartSliderResponsive._DeviceMode = {
|
5346 |
-
0: 'unknown',
|
5347 |
-
1: 'desktop',
|
5348 |
-
2: 'tablet',
|
5349 |
-
3: 'mobile'
|
5350 |
-
};
|
5351 |
-
|
5352 |
SmartSliderResponsive.prototype.getOuterWidth = function () {
|
5353 |
-
|
5354 |
-
return rd.startSliderWidth + rd.startSliderMarginLeft + rd.startSliderMarginRight;
|
5355 |
};
|
5356 |
|
5357 |
SmartSliderResponsive.prototype.storeDefaults = function () {
|
@@ -5376,7 +5339,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5376 |
bottom: this.responsiveDimensions.startSliderMarginBottom,
|
5377 |
left: this.responsiveDimensions.startSliderMarginLeft
|
5378 |
}
|
5379 |
-
}
|
5380 |
|
5381 |
SmartSliderResponsive.prototype.addHorizontalElement = function (element, cssproperties, ratioName, name) {
|
5382 |
ratioName = ratioName || 'ratio';
|
@@ -5384,7 +5347,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5384 |
var responsiveElement = new scope.SmartSliderResponsiveElement(this, ratioName, element, cssproperties, name);
|
5385 |
this.horizontalElements.push(responsiveElement);
|
5386 |
return responsiveElement;
|
5387 |
-
}
|
5388 |
|
5389 |
SmartSliderResponsive.prototype.addVerticalElement = function (element, cssproperties, ratioName, name) {
|
5390 |
ratioName = ratioName || 'ratio';
|
@@ -5392,7 +5355,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5392 |
var responsiveElement = new scope.SmartSliderResponsiveElement(this, ratioName, element, cssproperties, name);
|
5393 |
this.verticalElements.push(responsiveElement);
|
5394 |
return responsiveElement;
|
5395 |
-
}
|
5396 |
|
5397 |
SmartSliderResponsive.prototype.resizeHorizontalElements = function (ratios) {
|
5398 |
for (var i = 0; i < this.horizontalElements.length; i++) {
|
@@ -5402,12 +5365,12 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5402 |
}
|
5403 |
responsiveElement.resize(this.responsiveDimensions, ratios[responsiveElement.ratioName], false, 0);
|
5404 |
}
|
5405 |
-
}
|
5406 |
|
5407 |
SmartSliderResponsive.prototype.updateVerticalRatios = function (ratios) {
|
5408 |
|
5409 |
return ratios;
|
5410 |
-
}
|
5411 |
|
5412 |
SmartSliderResponsive.prototype._updateVerticalRatios = function (ratios) {
|
5413 |
|
@@ -5428,7 +5391,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5428 |
}
|
5429 |
|
5430 |
return ratios;
|
5431 |
-
}
|
5432 |
|
5433 |
SmartSliderResponsive.prototype.resizeVerticalElements = function (ratios, timeline, duration) {
|
5434 |
|
@@ -5439,7 +5402,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5439 |
}
|
5440 |
responsiveElement.resize(this.responsiveDimensions, ratios[responsiveElement.ratioName], timeline, duration);
|
5441 |
}
|
5442 |
-
}
|
5443 |
|
5444 |
SmartSliderResponsive.prototype.getDeviceMode = function () {
|
5445 |
return SmartSliderResponsive._DeviceMode[this.deviceMode];
|
@@ -5449,9 +5412,9 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5449 |
return SmartSliderResponsive._DeviceMode[this.deviceMode] + SmartSliderResponsive._DeviceOrientation[this.orientation];
|
5450 |
};
|
5451 |
|
5452 |
-
SmartSliderResponsive.prototype.onResize = function () {
|
5453 |
if (!this.slider.mainAnimation || this.slider.mainAnimation.getState() == 'ended') {
|
5454 |
-
this.doResize();
|
5455 |
} else if (!this.delayedResizeAdded) {
|
5456 |
this.delayedResizeAdded = true;
|
5457 |
this.sliderElement.on('mainAnimationComplete.responsive', $.proxy(this._doDelayedResize, this));
|
@@ -5567,8 +5530,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5567 |
});
|
5568 |
};
|
5569 |
|
5570 |
-
SmartSliderResponsive.prototype.doResize = function (fixedMode, timeline,
|
5571 |
-
|
5572 |
if (!this.disableTransitions) {
|
5573 |
this.disableTransitions = true;
|
5574 |
this.sliderElement.addClass('n2notransition');
|
@@ -5608,11 +5570,14 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5608 |
|
5609 |
var windowWidth = customWidth > 0 ? customWidth : (document.body.clientWidth || document.documentElement.clientWidth),
|
5610 |
outerEl = this.containerElement.parent(),
|
5611 |
-
|
5612 |
-
|
5613 |
-
|
|
|
|
|
|
|
5614 |
}
|
5615 |
-
this.containerElement.css(nextend.rtl.marginLeft, -outerElOffset
|
5616 |
.width(windowWidth);
|
5617 |
}
|
5618 |
}
|
@@ -5670,22 +5635,35 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5670 |
if (!this.slider.isAdmin) {
|
5671 |
if (this.parameters.type == 'fullpage') {
|
5672 |
var clientHeight = 0;
|
5673 |
-
if ((/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent || navigator.vendor || window.opera)) {
|
5674 |
-
var
|
5675 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5676 |
// landscape
|
5677 |
-
clientHeight = Math.min(screen.width,
|
5678 |
if (this.lastOrientation != 90) {
|
5679 |
isOrientationChanged = true;
|
5680 |
this.lastOrientation = 90;
|
5681 |
}
|
5682 |
} else {
|
5683 |
-
clientHeight = Math.min(screen.height,
|
5684 |
if (this.lastOrientation != 0) {
|
5685 |
isOrientationChanged = true;
|
5686 |
this.lastOrientation = 0;
|
5687 |
}
|
5688 |
}
|
|
|
5689 |
if (!isOrientationChanged && Math.abs(clientHeight - this.lastClientHeight) < 100) {
|
5690 |
clientHeight = this.lastClientHeight;
|
5691 |
} else {
|
@@ -5725,7 +5703,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5725 |
} else if (!this.parameters.upscale && ratio > zeroRatio) {
|
5726 |
ratio = zeroRatio;
|
5727 |
}
|
5728 |
-
this._doResize(ratio, timeline,
|
5729 |
|
5730 |
if (this.slider.parameters.align == 'center') {
|
5731 |
this.alignElement.css('maxWidth', this.responsiveDimensions.slider.width);
|
@@ -5749,7 +5727,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5749 |
return this.parameters.deviceModes[device + orientation];
|
5750 |
};
|
5751 |
|
5752 |
-
SmartSliderResponsive.prototype._doResize = function (ratio, timeline,
|
5753 |
var ratios = {
|
5754 |
ratio: ratio,
|
5755 |
w: ratio,
|
@@ -5759,13 +5737,8 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5759 |
fontRatio: 1
|
5760 |
};
|
5761 |
|
5762 |
-
this._buildRatios(ratios, this.slider.parameters.dynamicHeight,
|
5763 |
-
|
5764 |
-
if (this.fixedEditRatio && this.slider.isAdmin) {
|
5765 |
-
ratios.w = ratios.slideW;
|
5766 |
-
ratios.h = ratios.slideH;
|
5767 |
-
}
|
5768 |
-
*/
|
5769 |
ratios.fontRatio = ratios.slideW;
|
5770 |
|
5771 |
|
@@ -5822,7 +5795,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5822 |
this.triggerResize(ratios, false);
|
5823 |
}
|
5824 |
|
5825 |
-
}
|
5826 |
|
5827 |
/**
|
5828 |
* Admin only
|
@@ -5841,30 +5814,29 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5841 |
if (isChanged) {
|
5842 |
this.finishVerticalResize(ratios);
|
5843 |
}
|
5844 |
-
}
|
5845 |
|
5846 |
SmartSliderResponsive.prototype.finishVerticalResize = function (ratios) {
|
5847 |
this.loadDeferred.done($.proxy(function () {
|
5848 |
this.finishVerticalResize = this._finishVerticalResize;
|
5849 |
this.finishVerticalResize(ratios);
|
5850 |
}, this));
|
5851 |
-
}
|
5852 |
|
5853 |
SmartSliderResponsive.prototype._finishVerticalResize = function (ratios) {
|
5854 |
this.resizeVerticalElements(ratios, false, 0);
|
5855 |
|
5856 |
this.lastRatios = ratios;
|
5857 |
-
|
5858 |
this.triggerResize(ratios, false);
|
5859 |
|
5860 |
-
}
|
5861 |
|
5862 |
SmartSliderResponsive.prototype.triggerResize = function (ratios, timeline) {
|
5863 |
n2c.log('Event: SliderResize', ratios);
|
5864 |
this.sliderElement.trigger('SliderResize', [ratios, this, timeline]);
|
5865 |
};
|
5866 |
|
5867 |
-
SmartSliderResponsive.prototype._buildRatios = function (ratios, dynamicHeight,
|
5868 |
|
5869 |
var deviceModeOrientation = this.getDeviceModeOrientation();
|
5870 |
|
@@ -5874,9 +5846,9 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5874 |
|
5875 |
ratios.slideW = ratios.slideH = Math.min(ratios.slideW, ratios.slideH);
|
5876 |
|
5877 |
-
|
5878 |
var verticalRatioModifier = this.parameters.verticalRatioModifiers[deviceModeOrientation];
|
5879 |
ratios.slideH *= verticalRatioModifier;
|
|
|
5880 |
if (this.parameters.type == 'fullpage') {
|
5881 |
ratios.h *= verticalRatioModifier;
|
5882 |
|
@@ -5929,13 +5901,11 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
5929 |
|
5930 |
if (dynamicHeight) {
|
5931 |
|
5932 |
-
var slideIndex = this.slider.currentSlideIndex;
|
5933 |
-
if (typeof nextSlideIndex !== 'undefined') {
|
5934 |
-
slideIndex = nextSlideIndex;
|
5935 |
-
}
|
5936 |
-
|
5937 |
/** @type {SmartSliderBackgroundImage} */
|
5938 |
-
var backgroundImage = this.slider.
|
|
|
|
|
|
|
5939 |
|
5940 |
if (backgroundImage.width > 0 && backgroundImage.height > 0) {
|
5941 |
var backgroundRatioModifier = (this.responsiveDimensions.startSlideWidth / backgroundImage.width) * ( backgroundImage.height / this.responsiveDimensions.startSlideHeight);
|
@@ -6005,6 +5975,8 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
6005 |
};
|
6006 |
|
6007 |
SmartSliderResponsive.prototype.addStaticMargin = function (side, widget) {
|
|
|
|
|
6008 |
if (!this.widgetStaticMargins) {
|
6009 |
this.widgetStaticMargins = {
|
6010 |
Top: [],
|
@@ -6061,7 +6033,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
|
6061 |
}
|
6062 |
this.staticSizes = staticSizes;
|
6063 |
}
|
6064 |
-
}
|
6065 |
|
6066 |
SmartSliderResponsive.prototype._addMarginSize = function (side, size) {
|
6067 |
var axis = null;
|
@@ -6374,7 +6346,7 @@ N2Require('FrontendItemVimeo', [], [], function ($, scope, undefined) {
|
|
6374 |
this.setVolume(volume);
|
6375 |
}
|
6376 |
|
6377 |
-
this.
|
6378 |
|
6379 |
if (this.parameters.center == 1) {
|
6380 |
this.onResize();
|
@@ -6404,7 +6376,7 @@ N2Require('FrontendItemVimeo', [], [], function ($, scope, undefined) {
|
|
6404 |
if (!this.isStatic) {
|
6405 |
//pause video when slide changed
|
6406 |
this.slider.sliderElement.on("mainAnimationStart", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
|
6407 |
-
if (
|
6408 |
if (parseInt(this.parameters.reset)) {
|
6409 |
this.reset();
|
6410 |
} else {
|
@@ -6447,12 +6419,12 @@ N2Require('FrontendItemVimeo', [], [], function ($, scope, undefined) {
|
|
6447 |
if (!this.isStatic) {
|
6448 |
//change slide
|
6449 |
this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
|
6450 |
-
if (
|
6451 |
this.play();
|
6452 |
}
|
6453 |
}, this));
|
6454 |
|
6455 |
-
if (this.slider.
|
6456 |
this.play();
|
6457 |
}
|
6458 |
} else {
|
@@ -6511,10 +6483,10 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6511 |
showinfo: 1,
|
6512 |
modestbranding: 1,
|
6513 |
reset: 0,
|
6514 |
-
query: []
|
6515 |
}, parameters);
|
6516 |
|
6517 |
-
if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
|
6518 |
this.parameters.autoplay = 0;
|
6519 |
}
|
6520 |
|
@@ -6605,7 +6577,6 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6605 |
vars[k] = this.parameters.query[k];
|
6606 |
}
|
6607 |
}
|
6608 |
-
;
|
6609 |
|
6610 |
this.player = new YT.Player(this.playerId, {
|
6611 |
videoId: this.parameters.youtubecode,
|
@@ -6643,7 +6614,7 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6643 |
|
6644 |
this.playerElement = $("#" + this.playerId);
|
6645 |
|
6646 |
-
this.
|
6647 |
if (this.parameters.center == 1) {
|
6648 |
this.playerElement.parent().css('overflow', 'hidden');
|
6649 |
|
@@ -6654,7 +6625,7 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6654 |
|
6655 |
};
|
6656 |
|
6657 |
-
FrontendItemYouTube.prototype.onReady = function (
|
6658 |
|
6659 |
var volume = parseFloat(this.parameters.volume);
|
6660 |
if (volume >= 0) {
|
@@ -6667,14 +6638,14 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6667 |
|
6668 |
if (!this.isStatic) {
|
6669 |
//pause video when slide changed
|
6670 |
-
this.slider.sliderElement.on("mainAnimationStart", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex
|
6671 |
-
if (
|
6672 |
this.pause();
|
6673 |
}
|
6674 |
}, this));
|
6675 |
if (parseInt(this.parameters.reset)) {
|
6676 |
-
this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex
|
6677 |
-
if (
|
6678 |
this.player.seekTo(0);
|
6679 |
}
|
6680 |
}, this));
|
@@ -6709,13 +6680,13 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6709 |
|
6710 |
if (!this.isStatic) {
|
6711 |
//change slide
|
6712 |
-
this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex
|
6713 |
-
if (
|
6714 |
this.play();
|
6715 |
}
|
6716 |
}, this));
|
6717 |
|
6718 |
-
if (this.slider.
|
6719 |
this.play();
|
6720 |
}
|
6721 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
N2Require('SmartSliderBackgroundImages', [], [], function ($, scope, undefined) {
|
2 |
|
3 |
function SmartSliderBackgroundImages(slider) {
|
4 |
this.device = null;
|
5 |
|
6 |
+
//this.load = $.Deferred();
|
7 |
|
8 |
this.slider = slider;
|
|
|
|
|
|
|
9 |
|
10 |
this.lazyLoad = slider.parameters.lazyLoad;
|
11 |
this.lazyLoadNeighbor = slider.parameters.lazyLoadNeighbor;
|
12 |
|
13 |
this.deviceDeferred = $.Deferred();
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
this.slider.sliderElement.one('SliderDevice', $.proxy(this.onSlideDeviceChangedFirst, this));
|
16 |
+
this.slider.sliderElement.on('visibleSlidesChanged', $.proxy(this.onVisibleSlidesChanged, this));
|
17 |
+
this.slider.sliderElement.on('slideCountChanged', $.proxy(this.onVisibleSlidesChanged, this));
|
18 |
|
19 |
+
}
|
20 |
|
21 |
SmartSliderBackgroundImages.prototype.whenWithProgress = function (arrayOfPromises) {
|
22 |
+
var cntr = 0, deferred = $.Deferred();
|
23 |
for (var i = 0; i < arrayOfPromises.length; i++) {
|
24 |
+
$.when(arrayOfPromises[i]).done(function () {
|
25 |
+
deferred.notify(++cntr, arrayOfPromises.length);
|
26 |
});
|
27 |
}
|
28 |
+
|
|
|
|
|
|
|
29 |
$.when.apply($, arrayOfPromises).done(function () {
|
30 |
+
deferred.resolveWith(null, arguments);
|
31 |
});
|
32 |
+
|
33 |
+
return deferred;
|
34 |
};
|
35 |
|
36 |
SmartSliderBackgroundImages.prototype.getBackgroundImages = function () {
|
37 |
+
var images = [];
|
38 |
+
for (var i = 0; i < this.slider.realSlides.length; i++) {
|
39 |
+
images.push(this.slider.realSlides[i].backgroundImage);
|
40 |
+
}
|
41 |
+
return images;
|
42 |
+
};
|
43 |
+
|
44 |
+
SmartSliderBackgroundImages.prototype.onVisibleSlidesChanged = function () {
|
45 |
+
|
46 |
+
if (this.lazyLoad == 1) {
|
47 |
+
this.load = this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide));
|
48 |
+
} else if (this.lazyLoad == 2) { // delayed
|
49 |
+
this.load = this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide));
|
50 |
+
}
|
51 |
};
|
52 |
|
53 |
SmartSliderBackgroundImages.prototype.onSlideDeviceChangedFirst = function (e, device) {
|
56 |
|
57 |
this.slider.sliderElement.on('SliderDevice', $.proxy(this.onSlideDeviceChanged, this));
|
58 |
|
59 |
+
this.preLoadSlides = this._preLoadSlides;
|
60 |
if (this.lazyLoad == 1) {
|
61 |
+
this.preLoadSlides = this.preloadSlidesLazyNeighbor;
|
62 |
|
63 |
+
this.load = this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide));
|
64 |
} else if (this.lazyLoad == 2) { // delayed
|
65 |
$(window).on('load', $.proxy(this.preLoadAll, this));
|
66 |
|
67 |
+
this.load = this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide));
|
68 |
} else {
|
69 |
this.load = this.whenWithProgress(this.preLoadAll());
|
70 |
}
|
72 |
|
73 |
SmartSliderBackgroundImages.prototype.onSlideDeviceChanged = function (e, device) {
|
74 |
this.device = device;
|
75 |
+
for (var i = 0; i < this.slider.realSlides.length; i++) {
|
76 |
+
if (this.slider.realSlides[i].backgroundImage) {
|
77 |
+
this.slider.realSlides[i].backgroundImage.updateBackgroundToDevice(device);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
|
|
|
|
79 |
}
|
80 |
};
|
81 |
|
|
|
|
|
|
|
|
|
82 |
SmartSliderBackgroundImages.prototype.preLoadAll = function () {
|
83 |
var deferreds = [];
|
84 |
+
for (var i = 0; i < this.slider.realSlides.length; i++) {
|
85 |
+
deferreds.push(this.slider.realSlides[i].preLoad());
|
86 |
}
|
87 |
return deferreds;
|
88 |
};
|
89 |
|
90 |
+
SmartSliderBackgroundImages.prototype._preLoadSlides = function (slides) {
|
91 |
+
var deferreds = [];
|
92 |
+
if (Object.prototype.toString.call(slides) !== '[object Array]') {
|
93 |
+
slides = [slides];
|
94 |
+
}
|
95 |
+
for (var i = 0; i < slides.length; i++) {
|
96 |
+
deferreds.push(slides[i].preLoad());
|
97 |
+
}
|
98 |
|
99 |
+
return $.when.apply($, deferreds);
|
100 |
+
};
|
101 |
|
102 |
+
SmartSliderBackgroundImages.prototype.preloadSlidesLazyNeighbor = function (slides) {
|
103 |
+
var deferreds = [this._preLoadSlides(slides)];
|
104 |
|
105 |
+
if (this.lazyLoadNeighbor) {
|
106 |
var j = 0,
|
107 |
+
previousSlide = slides[0].previousSlide,
|
108 |
+
nextSlide = slides[slides.length - 1].nextSlide;
|
109 |
+
while (j < this.lazyLoadNeighbor) {
|
110 |
+
deferreds.push(previousSlide.preLoad());
|
111 |
+
previousSlide = previousSlide.previousSlide;
|
112 |
+
deferreds.push(nextSlide.preLoad());
|
113 |
+
nextSlide = nextSlide.nextSlide;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
j++;
|
115 |
}
|
116 |
}
|
117 |
|
118 |
var renderedDeferred = $.Deferred();
|
119 |
+
if (deferreds[0].state() != 'resolved') {
|
120 |
var timeout = setTimeout($.proxy(function () {
|
121 |
+
this.slider.load.showSpinner('backgroundImage' + slides[0].index);
|
122 |
timeout = null;
|
123 |
}, this), 50);
|
124 |
|
127 |
clearTimeout(timeout);
|
128 |
timeout = null;
|
129 |
} else {
|
130 |
+
this.slider.load.removeSpinner('backgroundImage' + slides[0].index);
|
131 |
}
|
132 |
setTimeout(function () {
|
133 |
renderedDeferred.resolve();
|
143 |
return renderedDeferred;
|
144 |
};
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
SmartSliderBackgroundImages.prototype.hack = function () {
|
147 |
+
for (var i = 0; i < this.slider.realSlides.length; i++) {
|
148 |
+
if (this.slider.realSlides[i].backgroundImage) {
|
149 |
+
this.slider.realSlides[i].backgroundImage.hack();
|
150 |
}
|
151 |
}
|
152 |
};
|
156 |
N2Require('SmartSliderLoad', [], [], function ($, scope, undefined) {
|
157 |
|
158 |
function SmartSliderLoad(smartSlider, parameters) {
|
|
|
|
|
|
|
|
|
159 |
|
160 |
this.parameters = $.extend({
|
161 |
fade: 1,
|
162 |
scroll: 0
|
163 |
}, parameters);
|
164 |
|
|
|
|
|
165 |
this.deferred = $.Deferred();
|
166 |
+
|
167 |
+
this.smartSlider = smartSlider;
|
168 |
+
this.spinnerKey = 'fadePlaceholder';
|
169 |
+
|
170 |
+
this.id = smartSlider.sliderElement.attr('id');
|
171 |
+
this.$window = $(window);
|
172 |
+
|
173 |
+
this.spinner = $('#' + this.id + '-spinner');
|
174 |
};
|
175 |
|
176 |
|
204 |
};
|
205 |
|
206 |
SmartSliderLoad.prototype.onScroll = function () {
|
207 |
+
if ((this.$window.scrollTop() + this.$window.height() > (this.smartSlider.sliderElement.offset().top + 100))) {
|
|
|
208 |
n2c.log('Fade on scroll - reached');
|
209 |
|
210 |
+
this.$window.off('scroll.' + this.id);
|
211 |
|
212 |
+
this.showSlider();
|
213 |
}
|
214 |
};
|
215 |
|
220 |
deferred.resolve();
|
221 |
});
|
222 |
return deferred;
|
223 |
+
};
|
224 |
|
225 |
SmartSliderLoad.prototype.showSlider = function () {
|
226 |
|
227 |
$.when(this.smartSlider.responsive.ready, this.smartSlider.backgroundImages.load, this.loadLayerImages()).always($.proxy(function () {
|
228 |
this._showSlider();
|
229 |
}, this));
|
230 |
+
};
|
231 |
|
232 |
SmartSliderLoad.prototype._showSlider = function (cb) {
|
233 |
n2c.log('Images loaded');
|
238 |
n2c.log('Event: BeforeVisible');
|
239 |
this.smartSlider.responsive.invalidateResponsiveState = true;
|
240 |
this.smartSlider.responsive.doResize();
|
241 |
+
|
242 |
+
if (this.smartSlider.mainAnimation) this.smartSlider.mainAnimation.setToStarterSlide(this.smartSlider.starterSlide);
|
243 |
+
|
244 |
+
this.smartSlider.starterSlide.setStarterSlide();
|
245 |
+
|
246 |
this.smartSlider.sliderElement.trigger('BeforeVisible');
|
247 |
|
248 |
this.smartSlider.responsive.alignElement.addClass('n2-ss-slider-align-visible');
|
266 |
|
267 |
SmartSliderLoad.prototype.loaded = function (fn) {
|
268 |
this.deferred.done(fn);
|
269 |
+
};
|
270 |
|
271 |
+
SmartSliderLoad.prototype.showSpinner = function (spinnerKey) {
|
272 |
+
this.spinnerKey = spinnerKey;
|
273 |
+
this.spinner.appendTo(this.loadingArea).css('display', '');
|
274 |
+
};
|
275 |
|
276 |
SmartSliderLoad.prototype.removeSpinner = function (spinnerKey) {
|
277 |
if (this.spinnerKey == spinnerKey) {
|
349 |
function SmartSliderAbstract(elementID, parameters) {
|
350 |
this.startedDeferred = $.Deferred();
|
351 |
|
352 |
+
if (elementID instanceof n2) {
|
353 |
+
elementID = '#' + elementID.attr('id');
|
354 |
+
}
|
355 |
+
|
356 |
+
var id = elementID.substr(1);
|
357 |
+
|
358 |
+
if (window[id] && window[id] instanceof SmartSliderAbstract) {
|
359 |
+
return false;
|
360 |
+
}
|
361 |
+
|
362 |
+
this.id = parseInt(id.replace('n2-ss-', ''));
|
363 |
+
|
364 |
+
// Register our object to a global variable
|
365 |
+
window[id] = this;
|
366 |
+
this.readyDeferred = $.Deferred();
|
367 |
+
|
368 |
+
this.waitForExists(id, parameters);
|
369 |
+
}
|
370 |
+
|
371 |
+
SmartSliderAbstract.prototype.kill = function () {
|
372 |
+
this.killed = true;
|
373 |
+
$('#' + this.sliderElement.attr('id') + '-placeholder').remove();
|
374 |
+
this.sliderElement.closest('.n2-ss-align').remove();
|
375 |
+
};
|
376 |
+
|
377 |
+
SmartSliderAbstract.prototype.waitForExists = function (id, parameters) {
|
378 |
+
var deferred = $.Deferred(),
|
379 |
+
existsCheck = function () {
|
380 |
+
var $el = $('#' + id);
|
381 |
+
if ($el.length) {
|
382 |
+
deferred.resolve($el);
|
383 |
+
} else {
|
384 |
+
setTimeout(existsCheck, 500);
|
385 |
+
}
|
386 |
+
};
|
387 |
+
deferred.done($.proxy(this.onSliderExists, this, id, parameters));
|
388 |
+
|
389 |
+
existsCheck();
|
390 |
+
};
|
391 |
|
392 |
+
SmartSliderAbstract.prototype.onSliderExists = function (id, parameters, $sliderElement) {
|
393 |
|
394 |
+
if ($sliderElement.prop('tagName') == 'SCRIPT') {
|
395 |
+
var dependency = $sliderElement.data('dependency'),
|
396 |
+
delay = $sliderElement.data('delay'),
|
397 |
+
rocketLoad = $.proxy(function () {
|
398 |
+
var rocketSlider = $($sliderElement.html().replace(/<_s_c_r_i_p_t/g, '<script').replace(/<_\/_s_c_r_i_p_t/g, '</script'));
|
399 |
+
$sliderElement.replaceWith(rocketSlider);
|
400 |
|
401 |
+
this.waitForDimension($('#' + id), parameters);
|
|
|
|
|
402 |
|
403 |
+
$(window).triggerHandler('n2Rocket', [this.sliderElement]);
|
404 |
+
}, this);
|
405 |
+
if (dependency && $('#n2-ss-' + dependency).length) {
|
406 |
+
n2ss.ready(dependency, $.proxy(function (slider) {
|
407 |
+
slider.ready(rocketLoad);
|
408 |
+
}, this));
|
409 |
+
} else if (delay) {
|
410 |
+
setTimeout(rocketLoad, delay);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
} else {
|
412 |
+
rocketLoad();
|
413 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
} else {
|
415 |
+
|
416 |
+
this.waitForDimension($sliderElement, parameters);
|
417 |
}
|
418 |
};
|
419 |
|
420 |
+
SmartSliderAbstract.prototype.waitForDimension = function ($sliderElement, parameters) {
|
421 |
+
var deferred = $.Deferred(),
|
422 |
+
startDimensionCheck = function () {
|
423 |
+
var hasDimension = $sliderElement.is(':visible');
|
424 |
+
if (hasDimension) {
|
425 |
+
deferred.resolve();
|
426 |
+
} else {
|
427 |
+
setTimeout(startDimensionCheck, 200);
|
428 |
+
}
|
429 |
+
};
|
430 |
+
startDimensionCheck();
|
431 |
+
deferred
|
432 |
+
.done($.proxy(this.onSliderHasDimension, this, $sliderElement, parameters));
|
433 |
};
|
434 |
|
435 |
+
SmartSliderAbstract.prototype.onSliderHasDimension = function ($sliderElement, parameters) {
|
436 |
this.killed = false;
|
437 |
this.isAdmin = false;
|
438 |
+
|
439 |
this.responsive = false;
|
440 |
+
this.mainAnimationLastChangeTime = 0;
|
441 |
+
|
442 |
+
this.currentSlide = null;
|
443 |
+
this.currentRealSlide = null;
|
444 |
+
this.staticSlide = false;
|
445 |
+
this.isShuffled = false;
|
446 |
|
447 |
+
this.slides = [];
|
448 |
+
|
449 |
+
this.visibleSlides = 1;
|
450 |
+
|
451 |
+
this.sliderElement = $sliderElement.data('ss', this);
|
452 |
|
453 |
this.parameters = $.extend({
|
454 |
admin: false,
|
455 |
playWhenVisible: 1,
|
456 |
+
playWhenVisibleAt: 0.5,
|
457 |
callbacks: '',
|
458 |
autoplay: {},
|
459 |
blockrightclick: false,
|
500 |
descriptions: [],
|
501 |
'background.parallax.tablet': 0,
|
502 |
'background.parallax.mobile': 0,
|
503 |
+
allowBGImageAttachmentFixed: 1,
|
504 |
+
particlejs: 0
|
505 |
}, parameters);
|
506 |
|
507 |
+
this.firstSlideReady = $.Deferred();
|
508 |
+
|
509 |
try {
|
510 |
eval(this.parameters.callbacks);
|
511 |
} catch (e) {
|
527 |
|
528 |
this.load = new scope.SmartSliderLoad(this, this.parameters.load);
|
529 |
|
530 |
+
this.backgroundImages = new scope.SmartSliderBackgroundImages(this);
|
531 |
+
|
532 |
+
this.__initSlides();
|
533 |
|
534 |
+
$.when(this.overrideFirstSlide()).done($.proxy(this.onFirstSlideInitialized, this));
|
535 |
|
536 |
+
if (navigator.userAgent.match('UCBrowser')) {
|
537 |
+
$('html').addClass('n2-ucbrowser');
|
538 |
+
}
|
539 |
+
};
|
540 |
|
541 |
+
SmartSliderAbstract.prototype.overrideFirstSlide = function () {
|
542 |
if (typeof window['ss' + this.id] !== 'undefined') {
|
543 |
if (typeof window['ss' + this.id] == 'object') {
|
544 |
+
return window['ss' + this.id].done($.proxy(function (forceActiveSlideIndex) {
|
545 |
if (forceActiveSlideIndex !== null) {
|
546 |
this.changeActiveBeforeLoad(forceActiveSlideIndex);
|
547 |
}
|
552 |
this.changeActiveBeforeLoad(forceActiveSlideIndex);
|
553 |
}
|
554 |
}
|
555 |
+
} else {
|
556 |
+
if (!this.isAdmin && this.parameters.maintainSession && typeof sessionStorage !== 'undefined') {
|
557 |
+
var sessionIndex = sessionStorage.getItem('ss-' + this.id);
|
558 |
+
if (sessionIndex !== null) {
|
559 |
+
this.changeActiveBeforeLoad(parseInt(sessionIndex));
|
560 |
+
}
|
561 |
+
this.sliderElement.on('mainAnimationComplete', $.proxy(function (e, animation, previous, next) {
|
562 |
+
sessionStorage.setItem('ss-' + this.id, next);
|
563 |
+
}, this));
|
564 |
+
}
|
565 |
}
|
566 |
|
567 |
+
return true;
|
568 |
+
};
|
569 |
+
|
570 |
+
SmartSliderAbstract.prototype.changeActiveBeforeLoad = function (index) {
|
571 |
+
if (index > 0 && index < this.realSlides.length && this.starterSlide != this.realSlides[index]) {
|
572 |
+
|
573 |
+
this.unsetActiveSlide(this.starterSlide);
|
574 |
+
|
575 |
+
this.starterSlide = this.realSlides[index];
|
576 |
+
|
577 |
+
this.setActiveSlide(this.realSlides[index]);
|
578 |
}
|
579 |
+
};
|
580 |
|
581 |
+
SmartSliderAbstract.prototype.startCurrentSlideIndex = function () {
|
582 |
+
|
583 |
+
this.currentRealSlide = this.currentSlide = this.starterSlide;
|
584 |
+
|
585 |
+
this.setActiveSlide(this.currentSlide);
|
586 |
+
|
587 |
+
if (!parseInt(this.parameters.carousel)) {
|
588 |
+
this.initNotCarousel();
|
589 |
} else {
|
590 |
+
this.initCarousel();
|
591 |
}
|
592 |
};
|
593 |
|
594 |
+
SmartSliderAbstract.prototype.onFirstSlideInitialized = function () {
|
595 |
+
//Prepare linked list of slides
|
596 |
+
for (var i = 0; i < this.realSlides.length; i++) {
|
597 |
+
this.realSlides[i].setNext(this.realSlides[i + 1 > this.realSlides.length - 1 ? 0 : i + 1]);
|
598 |
+
}
|
599 |
|
600 |
+
this.startCurrentSlideIndex();
|
601 |
+
this.firstSlideReady.resolve(this.currentSlide);
|
602 |
|
603 |
+
for (var j = 0; j < this.parameters.initCallbacks.length; j++) {
|
604 |
+
(new Function('$', this.parameters.initCallbacks[j])).call(this, $);
|
605 |
}
|
606 |
|
|
|
|
|
607 |
this.widgets = new scope.SmartSliderWidgets(this);
|
608 |
|
609 |
this.sliderElement.on({
|
621 |
|
622 |
this.controls = {};
|
623 |
|
|
|
|
|
|
|
|
|
624 |
if (this.parameters.blockrightclick) {
|
625 |
this.sliderElement.bind("contextmenu", function (e) {
|
626 |
e.preventDefault();
|
634 |
return;
|
635 |
}
|
636 |
|
637 |
+
this.sliderElement.one('touchstart', $.proxy(function () {
|
638 |
+
this.sliderElement.removeClass('n2-has-hover');
|
639 |
+
}, this));
|
640 |
+
|
641 |
this.initControls();
|
642 |
|
643 |
this.startedDeferred.resolve(this);
|
698 |
});
|
699 |
});
|
700 |
|
|
|
701 |
|
702 |
+
if (window.n2FocusAllowed == undefined) {
|
703 |
+
window.n2FocusAllowed = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
704 |
|
705 |
+
$(window).on({
|
706 |
+
keydown: function () {
|
707 |
+
window.n2FocusAllowed = true;
|
708 |
+
},
|
709 |
+
keyup: function () {
|
710 |
+
window.n2FocusAllowed = false;
|
711 |
+
}
|
712 |
+
});
|
713 |
+
}
|
714 |
|
715 |
+
this.sliderElement.find('a').on({
|
716 |
focus: $.proxy(function (e) {
|
717 |
+
if (n2FocusAllowed) {
|
718 |
+
var slide = this.slider.findSlideByElement(e.currentTarget);
|
719 |
+
if (slide && slide != this.currentRealSlide) {
|
720 |
+
this.directionalChangeToReal(slide.index);
|
721 |
}
|
722 |
}
|
723 |
}, this)
|
724 |
});
|
725 |
+
|
726 |
}
|
727 |
|
728 |
this.preReadyResolve();
|
729 |
|
|
|
|
|
730 |
this.sliderElement.find('[role="button"], [tabindex]')
|
731 |
.keypress(function (event) {
|
732 |
if (event.charCode === 32 || event.charCode === 13) {
|
739 |
});
|
740 |
};
|
741 |
|
742 |
+
SmartSliderAbstract.prototype.__initSlides = function () {
|
743 |
+
|
744 |
+
var $slides = this.sliderElement.find('.n2-ss-slide');
|
745 |
+
for (var i = 0; i < $slides.length; i++) {
|
746 |
+
this.slides.push(new scope.FrontendSliderSlide(this, $slides.eq(i), i));
|
747 |
+
}
|
748 |
|
749 |
+
this.starterSlide = this.slides[0];
|
750 |
+
for (var i = 0; i < this.slides.length; i++) {
|
751 |
+
this.slides[i].init();
|
752 |
+
if (this.slides[i].$element.data('first') == 1) {
|
753 |
+
this.starterSlide = this.slides[i];
|
754 |
}
|
755 |
}
|
|
|
756 |
|
757 |
+
this.realSlides = this.slides;
|
|
|
|
|
758 |
|
759 |
+
this.afterRawSlidesReady();
|
760 |
+
|
761 |
+
this.randomize(this.slides);
|
762 |
+
|
763 |
+
var staticSlide = this.sliderElement.find('.n2-ss-static-slide');
|
764 |
+
if (staticSlide.length) {
|
765 |
+
this.staticSlide = new scope.FrontendSliderStaticSlide(this, staticSlide);
|
|
|
766 |
}
|
767 |
};
|
768 |
|
769 |
+
SmartSliderAbstract.prototype.afterRawSlidesReady = function () {
|
770 |
+
|
|
|
|
|
771 |
};
|
772 |
|
773 |
+
SmartSliderAbstract.prototype.setVisibleSlides = function (visibleSlides) {
|
774 |
+
if (visibleSlides != this.visibleSlides) {
|
775 |
+
this.visibleSlides = visibleSlides;
|
776 |
+
this.sliderElement.triggerHandler('visibleSlidesChanged');
|
777 |
}
|
778 |
+
};
|
779 |
|
780 |
+
SmartSliderAbstract.prototype.getVisibleSlides = function (relativeSlide) {
|
781 |
+
if (arguments.length == 0) relativeSlide = this.currentSlide;
|
782 |
+
return [relativeSlide];
|
783 |
+
};
|
784 |
|
785 |
+
SmartSliderAbstract.prototype.findSlideBackground = function (slide) {
|
786 |
+
return slide.$element.find('.n2-ss-slide-background');
|
787 |
+
};
|
|
|
|
|
788 |
|
789 |
+
SmartSliderAbstract.prototype.getRealIndex = function (index) {
|
790 |
+
return index;
|
791 |
+
};
|
|
|
792 |
|
793 |
+
SmartSliderAbstract.prototype.randomize = function (slides) {
|
794 |
+
this.randomizeFirst();
|
|
|
|
|
|
|
|
|
|
|
795 |
|
796 |
+
if (this.parameters.randomize.randomize) {
|
797 |
+
this.shuffleSlides(slides);
|
|
|
|
|
|
|
|
|
798 |
}
|
799 |
+
};
|
800 |
|
801 |
+
SmartSliderAbstract.prototype.randomizeFirst = function () {
|
802 |
+
if (this.parameters.randomize.randomizeFirst) {
|
803 |
+
this.unsetActiveSlide(this.starterSlide);
|
804 |
|
805 |
+
this.starterSlide = this.realSlides[Math.floor(Math.random() * this.realSlides.length)];
|
806 |
|
807 |
+
this.setActiveSlide(this.starterSlide);
|
808 |
+
console.log('randomize first');
|
|
|
809 |
}
|
810 |
};
|
811 |
|
812 |
+
SmartSliderAbstract.prototype.shuffleSlides = function (slides) {
|
813 |
+
|
814 |
+
slides.sort(function () {
|
815 |
+
return 0.5 - Math.random();
|
816 |
+
});
|
817 |
+
var $container = slides[0].$element.parent();
|
818 |
+
for (var i = 0; i < slides.length; i++) {
|
819 |
+
slides[i].$element.appendTo($container);
|
820 |
+
slides[i].setIndex(i);
|
821 |
+
}
|
822 |
+
|
823 |
+
this.isShuffled = true;
|
824 |
};
|
825 |
|
826 |
SmartSliderAbstract.prototype.addWidget = function (e, deferred) {
|
870 |
SmartSliderAbstract.prototype.checkIfVisible = function () {
|
871 |
var windowOffsetTop = $(window).scrollTop(),
|
872 |
windowHeight = $(window).height(),
|
873 |
+
sliderTop = this.sliderElement.offset().top,
|
874 |
+
middlePointTop = sliderTop + Math.min(this.sliderElement.height(), windowHeight) * this.parameters.playWhenVisibleAt,
|
875 |
+
middlePointBottom = sliderTop + Math.min(this.sliderElement.height(), windowHeight) * (1 - this.parameters.playWhenVisibleAt);
|
876 |
+
|
877 |
+
if (middlePointTop >= windowOffsetTop && middlePointBottom <= windowOffsetTop + windowHeight) {
|
878 |
$(window).off('scroll.n2-ss-visible' + this.id + ' resize.n2-ss-visible' + this.id, $.proxy(this.checkIfVisible, this));
|
879 |
this.visibleDeferred.resolve();
|
880 |
}
|
911 |
return deferred;
|
912 |
};
|
913 |
|
914 |
+
SmartSliderAbstract.prototype.initNotCarousel = function () {
|
915 |
+
this.next = function (isSystem, customAnimation) {
|
916 |
+
var nextIndex = this.currentSlide.index + 1;
|
917 |
+
if (nextIndex < this.slides.length) {
|
918 |
+
return this.changeTo(nextIndex, false, isSystem, customAnimation);
|
919 |
+
}
|
920 |
+
return false;
|
921 |
+
};
|
922 |
+
this.previous = function (isSystem, customAnimation) {
|
923 |
+
var nextIndex = this.currentSlide.index - 1;
|
924 |
+
if (nextIndex >= 0) {
|
925 |
+
return this.changeTo(nextIndex, true, isSystem, customAnimation);
|
926 |
+
}
|
927 |
+
return false;
|
928 |
+
};
|
929 |
+
this.isChangePossible = function (direction) {
|
930 |
+
var nextIndex = false;
|
931 |
+
if (direction == 'next') {
|
932 |
+
nextIndex = this.currentSlide.index + 1;
|
933 |
+
if (nextIndex >= this.slides.length) {
|
934 |
+
nextIndex = false;
|
935 |
+
}
|
936 |
+
} else if (direction == 'previous') {
|
937 |
+
nextIndex = this.currentSlide.index - 1;
|
938 |
+
if (nextIndex < 0) {
|
939 |
+
nextIndex = false;
|
940 |
+
}
|
941 |
+
}
|
942 |
|
943 |
+
if (nextIndex !== false && nextIndex != this.currentSlide.index) {
|
944 |
+
return true;
|
945 |
+
}
|
946 |
+
return false;
|
947 |
+
};
|
948 |
+
|
949 |
+
var slidesCount = this.slides.length,
|
950 |
+
previousArrowOpacity = 1,
|
951 |
+
previousArrow = this.sliderElement.find('.nextend-arrow-previous'),
|
952 |
+
changePreviousArrowOpacity = function (opacity) {
|
953 |
+
if (opacity != previousArrowOpacity) {
|
954 |
+
NextendTween.to(previousArrow, 0.4, {opacity: opacity}).play();
|
955 |
+
previousArrowOpacity = opacity;
|
956 |
}
|
957 |
+
};
|
958 |
+
var nextArrowOpacity = 1,
|
959 |
+
nextArrow = this.sliderElement.find('.nextend-arrow-next'),
|
960 |
+
changeNextArrowOpacity = function (opacity) {
|
961 |
+
if (opacity != nextArrowOpacity) {
|
962 |
+
NextendTween.to(nextArrow, 0.4, {opacity: opacity}).play();
|
963 |
+
nextArrowOpacity = opacity;
|
964 |
}
|
965 |
};
|
966 |
|
967 |
+
var hideOrShowArrows = function (i) {
|
968 |
+
changePreviousArrowOpacity(i == 0 ? 0 : 1);
|
969 |
+
changeNextArrowOpacity(i == slidesCount - 1 ? 0 : 1);
|
970 |
+
};
|
971 |
|
972 |
+
hideOrShowArrows(this.currentSlide.index);
|
973 |
+
|
974 |
+
this.sliderElement.on('sliderSwitchTo', function (e, i) {
|
975 |
+
hideOrShowArrows(i);
|
976 |
+
});
|
977 |
+
};
|
978 |
+
|
979 |
+
SmartSliderAbstract.prototype.isChangePossibleCarousel = function (direction) {
|
980 |
+
var nextIndex = false;
|
981 |
+
if (direction == 'next') {
|
982 |
+
nextIndex = this.currentSlide.index + 1;
|
983 |
+
if (nextIndex >= this.slides.length) {
|
984 |
+
nextIndex = 0;
|
985 |
+
}
|
986 |
+
} else if (direction == 'previous') {
|
987 |
+
nextIndex = this.currentSlide.index - 1;
|
988 |
+
if (nextIndex < 0) {
|
989 |
+
nextIndex = this.slides.length - 1;
|
990 |
+
}
|
991 |
}
|
992 |
+
|
993 |
+
if (nextIndex !== false && nextIndex != this.currentSlide.index) {
|
994 |
+
return true;
|
995 |
+
}
|
996 |
+
return false;
|
997 |
+
};
|
998 |
+
|
999 |
+
SmartSliderAbstract.prototype.initCarousel = function () {
|
1000 |
+
|
1001 |
+
this.next = this.nextCarousel;
|
1002 |
+
this.previous = this.previousCarousel;
|
1003 |
+
this.isChangePossible = this.isChangePossibleCarousel;
|
1004 |
};
|
1005 |
|
1006 |
+
SmartSliderAbstract.prototype.nextCarousel = function (isSystem, customAnimation) {
|
1007 |
+
var nextIndex = this.currentSlide.index + 1;
|
1008 |
if (nextIndex >= this.slides.length) {
|
1009 |
nextIndex = 0;
|
1010 |
}
|
1011 |
return this.changeTo(nextIndex, false, isSystem, customAnimation);
|
1012 |
};
|
1013 |
|
1014 |
+
SmartSliderAbstract.prototype.previousCarousel = function (isSystem, customAnimation) {
|
1015 |
+
var nextIndex = this.currentSlide.index - 1;
|
1016 |
if (nextIndex < 0) {
|
1017 |
nextIndex = this.slides.length - 1;
|
1018 |
}
|
1019 |
return this.changeTo(nextIndex, true, isSystem, customAnimation);
|
1020 |
};
|
1021 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1022 |
|
1023 |
SmartSliderAbstract.prototype.directionalChangeToReal = function (nextSlideIndex) {
|
1024 |
this.directionalChangeTo(nextSlideIndex);
|
1025 |
};
|
1026 |
|
1027 |
SmartSliderAbstract.prototype.directionalChangeTo = function (nextSlideIndex) {
|
1028 |
+
if (nextSlideIndex > this.currentSlide.index) {
|
1029 |
this.changeTo(nextSlideIndex, false);
|
1030 |
} else {
|
1031 |
this.changeTo(nextSlideIndex, true);
|
1035 |
SmartSliderAbstract.prototype.changeTo = function (nextSlideIndex, reversed, isSystem, customAnimation) {
|
1036 |
nextSlideIndex = parseInt(nextSlideIndex);
|
1037 |
|
1038 |
+
if (nextSlideIndex != this.currentSlide.index) {
|
1039 |
n2c.log('Event: sliderSwitchTo: ', 'targetSlideIndex');
|
1040 |
this.sliderElement.trigger('sliderSwitchTo', [nextSlideIndex, this.getRealIndex(nextSlideIndex)]);
|
1041 |
var time = $.now();
|
1042 |
+
$.when(this.backgroundImages.preLoadSlides(this.getVisibleSlides(this.slides[nextSlideIndex])), this.focus(isSystem)).done($.proxy(function () {
|
1043 |
|
1044 |
+
if (this.mainAnimationLastChangeTime <= time) {
|
1045 |
+
this.mainAnimationLastChangeTime = time;
|
1046 |
// If the current main animation haven't finished yet or the prefered next slide is the same as our current slide we have nothing to do
|
1047 |
var state = this.mainAnimation.getState();
|
1048 |
if (state == 'ended') {
|
1058 |
|
1059 |
this._changeTo(nextSlideIndex, reversed, isSystem, customAnimation);
|
1060 |
|
1061 |
+
n2c.log('Change From:', this.currentSlide.index, ' To: ', nextSlideIndex, ' Reversed: ', reversed, ' System: ', isSystem);
|
1062 |
+
animation.changeTo(this.currentSlide, this.slides[nextSlideIndex], reversed, isSystem);
|
1063 |
|
1064 |
+
this._changeCurrentSlide(nextSlideIndex);
|
1065 |
|
1066 |
} else if (state == 'playing') {
|
1067 |
this.sliderElement.off('.fastChange').one('mainAnimationComplete.fastChange', $.proxy(function () {
|
1076 |
return false;
|
1077 |
};
|
1078 |
|
1079 |
+
SmartSliderAbstract.prototype._changeCurrentSlide = function (index) {
|
1080 |
+
this.currentRealSlide = this.currentSlide = this.slides[index];
|
1081 |
+
};
|
1082 |
+
|
1083 |
SmartSliderAbstract.prototype._changeTo = function (nextSlideIndex, reversed, isSystem, customAnimation) {
|
1084 |
|
1085 |
};
|
1086 |
|
1087 |
SmartSliderAbstract.prototype.revertTo = function (nextSlideIndex, originalNextSlideIndex) {
|
|
|
|
|
|
|
|
|
|
|
1088 |
|
1089 |
+
this.unsetActiveSlide(this.slides[originalNextSlideIndex]);
|
1090 |
+
this.setActiveSlide(this.slides[nextSlideIndex]);
|
|
|
|
|
|
|
|
|
|
|
1091 |
|
1092 |
+
this._changeCurrentSlide(nextSlideIndex);
|
|
|
|
|
1093 |
|
1094 |
+
this.sliderElement.trigger('sliderSwitchTo', [nextSlideIndex, this.getRealIndex(nextSlideIndex)]);
|
|
|
1095 |
};
|
1096 |
|
1097 |
+
SmartSliderAbstract.prototype.setActiveSlide = function (slide) {
|
1098 |
+
slide.$element.addClass('n2-ss-slide-active');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1099 |
};
|
1100 |
|
1101 |
+
SmartSliderAbstract.prototype.unsetActiveSlide = function (slide) {
|
1102 |
+
slide.$element.removeClass('n2-ss-slide-active');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1103 |
};
|
1104 |
|
1105 |
+
SmartSliderAbstract.prototype.findSlideByElement = function (element) {
|
1106 |
+
element = $(element);
|
1107 |
+
for (var i = 0; i < this.realSlides.length; i++) {
|
1108 |
+
if (this.realSlides[i].$element.has(element).length === 1) {
|
1109 |
+
return this.realSlides[i];
|
1110 |
+
}
|
|
|
|
|
|
|
|
|
|
|
1111 |
}
|
1112 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1113 |
};
|
1114 |
|
1115 |
SmartSliderAbstract.prototype.findSlideIndexByElement = function (element) {
|
1116 |
+
var slide = this.findSlideByElement(element);
|
1117 |
+
if (slide) {
|
1118 |
+
return slide;
|
|
|
|
|
1119 |
}
|
1120 |
return -1;
|
1121 |
};
|
1125 |
};
|
1126 |
|
1127 |
SmartSliderAbstract.prototype.initResponsiveMode = function () {
|
|
|
1128 |
this.dimensions = this.responsive.responsiveDimensions;
|
1129 |
};
|
1130 |
|
1166 |
};
|
1167 |
|
1168 |
SmartSliderAbstract.prototype.slideToID = function (id, direction) {
|
1169 |
+
for (var i = 0; i < this.realSlides.length; i++) {
|
1170 |
+
if (this.realSlides[i].id == id) {
|
1171 |
+
return this.slide(this.getSlideIndex(i), direction);
|
1172 |
+
}
|
1173 |
}
|
1174 |
|
1175 |
var slider = $('[data-id="' + id + '"]').closest('.n2-ss-slider');
|
1192 |
if (index >= 0 && index < this.slides.length) {
|
1193 |
if (typeof direction == 'undefined') {
|
1194 |
if (parseInt(this.parameters.carousel)) {
|
1195 |
+
if (this.currentSlide.index == this.slides.length - 1 && index == 0) {
|
1196 |
+
return this.next();
|
1197 |
+
} else {
|
1198 |
+
if (this.currentSlide.index > index) {
|
1199 |
+
return this.changeTo(index, true);
|
1200 |
+
} else {
|
1201 |
+
return this.changeTo(index);
|
1202 |
+
}
|
1203 |
+
}
|
1204 |
+
} else {
|
1205 |
+
if (this.currentSlide.index > index) {
|
1206 |
+
return this.changeTo(index, true);
|
1207 |
+
} else {
|
1208 |
+
return this.changeTo(index);
|
1209 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1210 |
}
|
1211 |
+
} else {
|
1212 |
+
return this.changeTo(index, !direction);
|
1213 |
}
|
1214 |
+
}
|
1215 |
+
return false;
|
1216 |
+
};
|
1217 |
|
1218 |
+
SmartSliderAbstract.prototype.startAutoplay = function (e) {
|
1219 |
+
if (typeof this.controlAutoplay !== 'undefined') {
|
1220 |
+
this.controlAutoplay.pauseAutoplayExtraPlayingEnded(e, 'autoplayButton');
|
1221 |
+
return true;
|
1222 |
+
}
|
1223 |
+
return false;
|
1224 |
+
};
|
1225 |
|
1226 |
return SmartSliderAbstract;
|
1227 |
});
|
1322 |
}
|
1323 |
}
|
1324 |
}
|
1325 |
+
hideOrShow(widget, excludedSlides, this.slider.currentRealSlide.index);
|
1326 |
this.slider.sliderElement
|
1327 |
.on('sliderSwitchTo', function (e, targetSlideIndex) {
|
1328 |
hideOrShow(widget, excludedSlides, targetSlideIndex);
|
2511 |
width: this.w,
|
2512 |
height: this.h
|
2513 |
});
|
2514 |
+
this._clonedCurrent.find('.n2-ss-slide-background-video').remove();
|
2515 |
}
|
2516 |
return this._clonedCurrent;
|
2517 |
};
|
2524 |
width: this.w,
|
2525 |
height: this.h
|
2526 |
});
|
2527 |
+
this._clonedNext.find('.n2-ss-slide-background-video').remove();
|
2528 |
}
|
2529 |
return this._clonedNext;
|
2530 |
};
|
2575 |
this.isTouch = false;
|
2576 |
this.isReverseAllowed = true;
|
2577 |
this.isReverseEnabled = false;
|
2578 |
+
this.reverseSlideIndex = null;
|
2579 |
+
this.isNoAnimation = false;
|
2580 |
|
2581 |
this.slider = slider;
|
2582 |
|
2594 |
});
|
2595 |
|
2596 |
this.sliderElement.on('mainAnimationStart', $.proxy(function (e, animation, currentSlideIndex, nextSlideIndex) {
|
2597 |
+
this._revertCurrentSlideIndex = currentSlideIndex;
|
2598 |
+
this._revertNextSlideIndex = nextSlideIndex;
|
2599 |
}, this));
|
2600 |
+
}
|
2601 |
+
|
2602 |
+
SmartSliderMainAnimationAbstract.prototype.setToStarterSlide = function (slide) {
|
2603 |
+
|
2604 |
};
|
2605 |
|
2606 |
SmartSliderMainAnimationAbstract.prototype.enableReverseMode = function () {
|
2672 |
this.fixTouchDuration(this.timeline, 1 - progress, duration);
|
2673 |
this.timeline.reverse();
|
2674 |
|
2675 |
+
this.willRevertTo(this._revertCurrentSlideIndex, this._revertNextSlideIndex);
|
2676 |
}
|
2677 |
};
|
2678 |
|
2682 |
this.fixTouchDuration(this.reverseTimeline, progress, duration);
|
2683 |
this.reverseTimeline.play();
|
2684 |
|
2685 |
+
this.willRevertTo(this.reverseSlideIndex, this._revertNextSlideIndex);
|
2686 |
} else {
|
2687 |
|
2688 |
this.willCleanSlideIndex(this.reverseSlideIndex);
|
2702 |
|
2703 |
this.willCleanSlideIndex(this.reverseSlideIndex);
|
2704 |
|
2705 |
+
this.willRevertTo(this._revertCurrentSlideIndex, this._revertNextSlideIndex);
|
2706 |
}
|
2707 |
};
|
2708 |
|
2726 |
return this.timeline.timeScale();
|
2727 |
};
|
2728 |
|
2729 |
+
SmartSliderMainAnimationAbstract.prototype.changeTo = function (currentSlide, nextSlide, reversed, isSystem) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2730 |
|
2731 |
+
this._initAnimation(currentSlide, nextSlide, reversed);
|
2732 |
|
2733 |
this.state = 'initAnimation';
|
2734 |
|
2735 |
this.timeline.paused(true);
|
2736 |
+
this.timeline.eventCallback('onStart', this.onChangeToStart, [currentSlide, nextSlide, isSystem], this);
|
2737 |
+
this.timeline.eventCallback('onComplete', this.onChangeToComplete, [currentSlide, nextSlide, isSystem], this);
|
2738 |
this.timeline.eventCallback('onReverseComplete', null);
|
2739 |
|
2740 |
this.revertCB = $.proxy(function (timeline) {
|
2741 |
+
timeline.eventCallback('onReverseComplete', this.onReverseChangeToComplete, [nextSlide, currentSlide, isSystem], this);
|
2742 |
}, this);
|
2743 |
|
2744 |
if (this.slider.parameters.dynamicHeight) {
|
2745 |
var tl = new NextendTimeline();
|
2746 |
+
this.slider.responsive.doResize(null, false, tl, nextSlide, 0.6);
|
2747 |
this.timeline.add(tl);
|
2748 |
}
|
|
|
|
|
|
|
2749 |
if (!this.isTouch) {
|
2750 |
+
this.timeline.play();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2751 |
}
|
2752 |
+
|
2753 |
};
|
2754 |
|
2755 |
|
2765 |
this.slider.revertTo(slideIndex, originalNextSlideIndex);
|
2766 |
|
2767 |
// Cancel the pre-initialized layer animations on the original next slide.
|
2768 |
+
this.slider.slides[originalNextSlideIndex].triggerHandler('mainAnimationStartInCancel');
|
2769 |
};
|
2770 |
|
2771 |
|
2780 |
|
2781 |
/**
|
2782 |
* @abstract
|
|
|
2783 |
* @param currentSlide
|
|
|
2784 |
* @param nextSlide
|
2785 |
* @param reversed
|
2786 |
* @private
|
2787 |
*/
|
2788 |
+
SmartSliderMainAnimationAbstract.prototype._initAnimation = function (currentSlide, nextSlide, reversed) {
|
2789 |
|
2790 |
};
|
2791 |
|
2792 |
+
SmartSliderMainAnimationAbstract.prototype.onChangeToStart = function (previousSlide, currentSlide, isSystem) {
|
2793 |
|
2794 |
this.state = 'playing';
|
2795 |
|
2796 |
+
var parameters = [this, previousSlide.index, currentSlide.index, isSystem];
|
2797 |
|
2798 |
n2c.log('Event: mainAnimationStart: ', parameters, '{NextendSmartSliderMainAnimationAbstract}, previousSlideIndex, currentSlideIndex, isSystem');
|
2799 |
this.sliderElement.trigger('mainAnimationStart', parameters);
|
2800 |
|
2801 |
+
this.slider.slides[previousSlide.index].trigger('mainAnimationStartOut', parameters);
|
2802 |
+
this.slider.slides[currentSlide.index].trigger('mainAnimationStartIn', parameters);
|
2803 |
};
|
2804 |
|
2805 |
+
SmartSliderMainAnimationAbstract.prototype.onChangeToComplete = function (previousSlide, currentSlide, isSystem) {
|
2806 |
+
var parameters = [this, previousSlide.index, currentSlide.index, isSystem];
|
2807 |
|
2808 |
this.clearTimelines();
|
2809 |
|
2810 |
this.disableReverseMode();
|
2811 |
|
2812 |
+
this.slider.slides[previousSlide.index].trigger('mainAnimationCompleteOut', parameters);
|
2813 |
+
this.slider.slides[currentSlide.index].trigger('mainAnimationCompleteIn', parameters);
|
2814 |
|
2815 |
this.state = 'ended';
|
2816 |
|
2818 |
this.sliderElement.trigger('mainAnimationComplete', parameters);
|
2819 |
};
|
2820 |
|
2821 |
+
SmartSliderMainAnimationAbstract.prototype.onReverseChangeToComplete = function (previousSlide, currentSlide, isSystem) {
|
2822 |
SmartSliderMainAnimationAbstract.prototype.onChangeToComplete.apply(this, arguments);
|
2823 |
};
|
2824 |
|
2828 |
};
|
2829 |
this.timeline.clear();
|
2830 |
this.timeline.timeScale(1);
|
|
|
|
|
2831 |
|
2832 |
+
};
|
2833 |
|
2834 |
SmartSliderMainAnimationAbstract.prototype.getEase = function () {
|
2835 |
if (this.isTouch) {
|
2905 |
var obj = {
|
2906 |
_progress: 0
|
2907 |
};
|
2908 |
+
this.timeline = NextendTween.to(obj, this.getSlideDuration(this.slider.currentSlide.index), {
|
2909 |
_progress: 1,
|
2910 |
paused: true,
|
2911 |
onComplete: $.proxy(this.next, this)
|
3017 |
|
3018 |
SmartSliderControlAutoplay.prototype.onMainAnimationComplete = function (e, animation, previousSlideIndex, currentSlideIndex) {
|
3019 |
|
3020 |
+
if (this.parameters.autoplayToSlideIndex >= 0 && this.parameters.autoplayToSlideIndex == this.slider.currentRealSlide.index + 1) {
|
3021 |
this.limitAutoplay();
|
3022 |
}
|
3023 |
|
3029 |
};
|
3030 |
|
3031 |
SmartSliderControlAutoplay.prototype.getSlideDuration = function (index) {
|
3032 |
+
var slide = this.slider.realSlides[this.slider.getRealIndex(index)],
|
3033 |
duration = slide.minimumSlideDuration;
|
3034 |
|
3035 |
if (duration < 0.3 && duration < this.parameters.duration) {
|
3194 |
/**
|
3195 |
* We have reached the maximum slides in the autoplay so disable it completely
|
3196 |
*/
|
3197 |
+
if (this.parameters.autoplayToSlide > 0 && this._currentCount >= this.parameters.autoplayToSlide || this.parameters.autoplayToSlideIndex >= 0 && this.parameters.autoplayToSlideIndex == this.slider.currentRealSlide.index + 2) {
|
3198 |
this.limitAutoplay();
|
3199 |
}
|
3200 |
|
3231 |
this.forceFullpage = this._type == 'auto' || this._type == 'fullwidth' || this._type == 'fullpage';
|
3232 |
if (this.forceFullpage) {
|
3233 |
this._upscale = this.responsive.parameters.upscale;
|
3234 |
+
this._minimumHeightRatio = $.extend({}, this.responsive.parameters.minimumHeightRatio);
|
3235 |
+
this._maximumHeightRatio = $.extend({}, this.responsive.parameters.maximumHeightRatio);
|
3236 |
}
|
3237 |
|
3238 |
this.isFullScreen = false;
|
3396 |
this.responsive.parameters.maximumHeightRatio = this._maximumHeightRatio;
|
3397 |
this.responsive.containerElement.css(nextend.rtl.marginLeft, this._marginLeft);
|
3398 |
this.fullParent.css({
|
3399 |
+
width: '',
|
3400 |
+
height: '',
|
3401 |
+
backgroundColor: ''
|
3402 |
}).removeClass("n2-ss-in-fullscreen");
|
3403 |
$('html').removeClass('n2-in-fullscreen');
|
3404 |
$(window).trigger('resize');
|
3495 |
|
3496 |
function SmartSliderControlScroll(slider) {
|
3497 |
|
3498 |
+
this.preventScroll = false;
|
3499 |
+
this._preventScrollTimeout = null;
|
3500 |
|
3501 |
this.slider = slider;
|
3502 |
|
3503 |
slider.sliderElement.on('DOMMouseScroll mousewheel', $.proxy(this.onMouseWheel, this));
|
3504 |
|
3505 |
slider.controls.scroll = this;
|
3506 |
+
}
|
3507 |
|
3508 |
SmartSliderControlScroll.prototype.onMouseWheel = function (e) {
|
3509 |
if (!this.preventScroll) {
|
3517 |
|
3518 |
if (up) {
|
3519 |
if (this.slider.previous()) {
|
3520 |
+
this.preventScrollTimeout(e);
|
|
|
|
|
3521 |
}
|
3522 |
} else {
|
3523 |
if (this.slider.next()) {
|
3524 |
+
this.preventScrollTimeout(e);
|
|
|
|
|
3525 |
}
|
3526 |
}
|
|
|
|
|
|
|
3527 |
} else {
|
3528 |
+
this.preventScrollTimeout(e);
|
3529 |
+
}
|
3530 |
+
};
|
3531 |
+
|
3532 |
+
SmartSliderControlScroll.prototype.preventScrollTimeout = function (e) {
|
3533 |
+
if (this._preventScrollTimeout !== null) {
|
3534 |
+
clearTimeout(this._preventScrollTimeout);
|
3535 |
}
|
3536 |
+
this.preventScroll = true;
|
3537 |
+
e.preventDefault();
|
3538 |
+
this._preventScrollTimeout = setTimeout($.proxy(function () {
|
3539 |
+
this.preventScroll = false;
|
3540 |
+
this._preventScrollTimeout = null;
|
3541 |
+
}, this), 400);
|
3542 |
};
|
3543 |
|
3544 |
return SmartSliderControlScroll;
|
3633 |
fallbackToMouseEvents: true
|
3634 |
}, parameters);
|
3635 |
|
3636 |
+
this.swipeElement = this.slider.sliderElement.find('> .n2-ss-swipe-element');
|
3637 |
|
3638 |
if (_direction == 'vertical') {
|
3639 |
this.setVertical();
|
3643 |
|
3644 |
var initTouch = $.proxy(function () {
|
3645 |
var that = this;
|
3646 |
+
if (this._animation.isNoAnimation) {
|
3647 |
+
N2EventBurrito(this.swipeElement.get(0), {
|
3648 |
+
mouse: this.parameters.fallbackToMouseEvents,
|
3649 |
+
axis: _direction == 'horizontal' ? 'x' : 'y',
|
3650 |
+
start: function () {
|
3651 |
+
hadDirection = false;
|
3652 |
+
},
|
3653 |
+
move: function (event, start, diff, speed, isRealScrolling) {
|
3654 |
+
var direction = that._direction.measure(diff);
|
3655 |
+
if (!isRealScrolling && direction != 'unknown' && that.currentAnimation === null) {
|
3656 |
+
|
3657 |
+
if (that._animation.state != 'ended') {
|
3658 |
+
// skip the event as the current animation is still playing
|
3659 |
+
return false;
|
3660 |
+
}
|
3661 |
+
that.distance = [0];
|
3662 |
+
that.swipeElement.addClass('n2-grabbing');
|
3663 |
+
|
3664 |
+
that.currentAnimation = {
|
3665 |
+
direction: direction
|
3666 |
+
};
|
3667 |
+
var isChangePossible = that.slider.isChangePossible(that._direction[direction]);
|
3668 |
+
if (!isChangePossible) {
|
3669 |
+
that.currentAnimation = null;
|
3670 |
+
return false;
|
3671 |
+
}
|
3672 |
}
|
3673 |
+
|
3674 |
+
if (that.currentAnimation) {
|
3675 |
+
var realDistance = that._direction.get(diff, that.currentAnimation.direction);
|
3676 |
+
that.logDistance(realDistance);
|
3677 |
+
if ((hadDirection || Math.abs(realDistance) > that._direction.minDistance) && event.cancelable) {
|
3678 |
+
hadDirection = true;
|
3679 |
+
return true;
|
3680 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
3681 |
}
|
3682 |
+
return false;
|
3683 |
+
},
|
3684 |
+
end: function (event, start, diff, speed, isRealScrolling) {
|
3685 |
+
if (that.currentAnimation !== null) {
|
3686 |
+
var targetDirection = isRealScrolling ? 0 : that.measureRealDirection();
|
3687 |
+
if (targetDirection) {
|
3688 |
+
that.slider[that._direction[that.currentAnimation.direction]]();
|
3689 |
+
}
|
3690 |
|
3691 |
+
that.swipeElement.removeClass('n2-grabbing');
|
3692 |
+
that.currentAnimation = null;
|
|
|
|
|
|
|
|
|
|
|
3693 |
}
|
3694 |
+
|
3695 |
+
if (Math.abs(diff.x) < 10 && Math.abs(diff.y) < 10) {
|
3696 |
+
that.onTap(event);
|
3697 |
+
} else {
|
3698 |
+
nextend.preventClick();
|
3699 |
}
|
3700 |
}
|
3701 |
+
});
|
3702 |
+
} else {
|
3703 |
+
N2EventBurrito(this.swipeElement.get(0), {
|
3704 |
+
mouse: this.parameters.fallbackToMouseEvents,
|
3705 |
+
axis: _direction == 'horizontal' ? 'x' : 'y',
|
3706 |
+
start: function (event, start) {
|
3707 |
+
hadDirection = false;
|
3708 |
+
},
|
3709 |
+
move: function (event, start, diff, speed, isRealScrolling) {
|
3710 |
+
var direction = that._direction.measure(diff);
|
3711 |
+
if (!isRealScrolling && direction != 'unknown' && that.currentAnimation === null) {
|
3712 |
+
|
3713 |
+
if (that._animation.state != 'ended') {
|
3714 |
+
// skip the event as the current animation is still playing
|
3715 |
+
return false;
|
3716 |
+
}
|
3717 |
+
that.distance = [0];
|
3718 |
+
that.swipeElement.addClass('n2-grabbing');
|
3719 |
+
|
3720 |
+
// Force the main animation into touch mode horizontal/vertical
|
3721 |
+
that._animation.setTouch(that._direction.axis);
|
3722 |
+
|
3723 |
+
that.currentAnimation = {
|
3724 |
+
direction: direction,
|
3725 |
+
percent: 0
|
3726 |
+
};
|
3727 |
+
var isChangePossible = that.slider[that._direction[direction]](false);
|
3728 |
+
if (!isChangePossible) {
|
3729 |
+
that._animation.setTouch(false);
|
3730 |
+
that.currentAnimation = null;
|
3731 |
+
return false;
|
3732 |
+
}
|
3733 |
}
|
|
|
3734 |
|
3735 |
+
if (that.currentAnimation) {
|
3736 |
+
var realDistance = that._direction.get(diff, that.currentAnimation.direction);
|
3737 |
+
that.logDistance(realDistance);
|
3738 |
+
if (that.currentAnimation.percent < 1) {
|
3739 |
+
var percent = Math.max(-0.99999, Math.min(0.99999, realDistance / that.slider.dimensions.slider[that._property]));
|
3740 |
+
that.currentAnimation.percent = percent;
|
3741 |
+
that._animation.setTouchProgress(percent);
|
3742 |
+
}
|
3743 |
+
if ((hadDirection || Math.abs(realDistance) > that._direction.minDistance) && event.cancelable) {
|
3744 |
+
hadDirection = true;
|
3745 |
+
return true;
|
3746 |
+
}
|
3747 |
+
}
|
3748 |
+
return false;
|
3749 |
+
},
|
3750 |
+
end: function (event, start, diff, speed, isRealScrolling) {
|
3751 |
+
if (that.currentAnimation !== null) {
|
3752 |
+
var targetDirection = isRealScrolling ? 0 : that.measureRealDirection();
|
3753 |
+
var progress = that._animation.timeline.progress();
|
3754 |
+
if (progress != 1) {
|
3755 |
+
that._animation.setTouchEnd(targetDirection, that.currentAnimation.percent, diff.time);
|
3756 |
+
}
|
3757 |
+
that.swipeElement.removeClass('n2-grabbing');
|
3758 |
|
3759 |
+
// Switch back the animation into the original mode when our touch is ended
|
3760 |
+
that._animation.setTouch(false);
|
3761 |
+
that.currentAnimation = null;
|
3762 |
+
}
|
3763 |
+
|
3764 |
+
if (Math.abs(diff.x) < 10 && Math.abs(diff.y) < 10) {
|
3765 |
+
that.onTap(event);
|
3766 |
+
} else {
|
3767 |
+
nextend.preventClick();
|
3768 |
+
}
|
3769 |
}
|
3770 |
+
});
|
3771 |
+
}
|
3772 |
}, this);
|
3773 |
|
3774 |
if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
|
3865 |
if ((lastValue >= 0 && firstValue > lastValue) || (lastValue < 0 && firstValue < lastValue)) {
|
3866 |
return 0;
|
3867 |
}
|
3868 |
+
return 1;
|
3869 |
+
};
|
3870 |
+
|
3871 |
+
SmartSliderControlTouch.prototype.onTap = function (e) {
|
3872 |
+
if (!preventMultipleTap) {
|
3873 |
+
$(e.target).trigger('n2click');
|
3874 |
+
preventMultipleTap = true;
|
3875 |
+
setTimeout(function () {
|
3876 |
+
preventMultipleTap = false;
|
3877 |
+
}, 500);
|
3878 |
+
}
|
3879 |
+
};
|
3880 |
+
|
3881 |
+
return SmartSliderControlTouch;
|
3882 |
+
});
|
3883 |
+
N2Require('SmartSliderBackgroundImage', [], [], function ($, scope, undefined) {
|
3884 |
+
|
3885 |
+
function SmartSliderBackgroundImage(slide, element, manager) {
|
3886 |
+
this.loadStarted = false;
|
3887 |
+
|
3888 |
+
this.loadAllowed = false;
|
3889 |
+
|
3890 |
+
this.width = 0;
|
3891 |
+
this.height = 0;
|
3892 |
+
|
3893 |
+
this.slide = slide;
|
3894 |
+
|
3895 |
+
this.element = element;
|
3896 |
+
this.manager = manager;
|
3897 |
+
this.loadDeferred = $.Deferred();
|
3898 |
+
|
3899 |
+
this.currentSrc = '';
|
3900 |
+
this.mode = element.data('mode');
|
3901 |
+
this.opacity = element.data('opacity');
|
3902 |
+
this.blur = element.data('blur');
|
3903 |
+
this.x = element.data('x');
|
3904 |
+
this.y = element.data('y');
|
3905 |
+
|
3906 |
+
|
3907 |
+
this.hasImage = false;
|
3908 |
+
this.$image = element.find('img');
|
3909 |
+
|
3910 |
+
if (!this.$image.length) {
|
3911 |
+
this.startColorMode();
|
3912 |
+
} else {
|
3913 |
+
this.hasImage = true;
|
3914 |
+
this.startImageMode();
|
3915 |
+
}
|
3916 |
+
|
3917 |
+
};
|
3918 |
+
|
3919 |
+
SmartSliderBackgroundImage.prototype.startColorMode = function () {
|
3920 |
+
this.loadDeferred.resolve();
|
3921 |
+
}
|
3922 |
+
|
3923 |
+
SmartSliderBackgroundImage.prototype.startImageMode = function () {
|
3924 |
+
if (this.mode == 'fixed' && ((n2const.isPhone && !this.slide.slider.parameters['background.parallax.mobile']) || (n2const.isTablet && !this.slide.slider.parameters['background.parallax.tablet']))) {
|
3925 |
+
this.mode = 'fill';
|
3926 |
+
}
|
3927 |
+
this.$image.css('display', 'none');
|
3928 |
+
this.$background = $('<div class="n2-ss-background-image"/>')
|
3929 |
+
.css({
|
3930 |
+
opacity: this.opacity,
|
3931 |
+
backgroundPosition: this.x + '% ' + this.y + '%'
|
3932 |
+
})
|
3933 |
+
.appendTo(this.element);
|
3934 |
+
|
3935 |
+
if (window.n2FilterProperty) {
|
3936 |
+
if (this.blur > 0) {
|
3937 |
+
this.$background.css({
|
3938 |
+
margin: '-' + (this.blur * 2) + 'px',
|
3939 |
+
padding: (this.blur * 2) + 'px'
|
3940 |
+
}).css(window.n2FilterProperty, 'blur(' + this.blur + 'px)');
|
3941 |
+
} else {
|
3942 |
+
this.$background.css({
|
3943 |
+
margin: '',
|
3944 |
+
padding: ''
|
3945 |
+
}).css(window.n2FilterProperty, '');
|
3946 |
+
}
|
3947 |
+
}
|
3948 |
+
|
3949 |
+
if (this.mode == 'fixed') {
|
3950 |
+
this.startFixed();
|
3951 |
+
}
|
3952 |
+
|
3953 |
+
this.desktopSrc = this.element.data('desktop') || '';
|
3954 |
+
this.tabletSrc = this.element.data('tablet') || '';
|
3955 |
+
this.mobileSrc = this.element.data('mobile') || '';
|
3956 |
+
|
3957 |
+
if (nextend.isRetina) {
|
3958 |
+
var retina = this.element.data('desktop-retina');
|
3959 |
+
if (retina) {
|
3960 |
+
this.desktopSrc = retina;
|
3961 |
+
}
|
3962 |
+
retina = this.element.data('tablet-retina');
|
3963 |
+
if (retina) {
|
3964 |
+
this.tabletSrc = retina;
|
3965 |
+
}
|
3966 |
+
retina = this.element.data('mobile-retina');
|
3967 |
+
if (retina) {
|
3968 |
+
this.mobileSrc = retina;
|
3969 |
+
}
|
3970 |
+
}
|
3971 |
+
}
|
3972 |
+
|
3973 |
+
SmartSliderBackgroundImage.prototype.preLoad = function () {
|
3974 |
+
if (!this.loadStarted) {
|
3975 |
+
this.slide.$element.find('[data-lazysrc]').each(function () {
|
3976 |
+
var $this = $(this);
|
3977 |
+
$this.attr('src', $this.data('lazysrc'));
|
3978 |
+
});
|
3979 |
+
this.loadStarted = true;
|
3980 |
+
}
|
3981 |
+
|
3982 |
+
if (this.loadDeferred.state() == 'pending') {
|
3983 |
+
this.loadAllowed = true;
|
3984 |
+
this.manager.deviceDeferred.done($.proxy(function () {
|
3985 |
+
this.updateBackgroundToDevice(this.manager.device);
|
3986 |
+
this.$background.n2imagesLoaded({background: true}, $.proxy(function (e) {
|
3987 |
+
var img = e.images[0].img;
|
3988 |
+
this.width = img.naturalWidth;
|
3989 |
+
this.height = img.naturalHeight;
|
3990 |
+
|
3991 |
+
this.isLoaded = true;
|
3992 |
+
this.loadDeferred.resolve(this.element);
|
3993 |
+
}, this));
|
3994 |
+
}, this));
|
3995 |
+
}
|
3996 |
+
return this.loadDeferred;
|
3997 |
+
};
|
3998 |
+
|
3999 |
+
SmartSliderBackgroundImage.prototype.updateBackgroundToDevice = function (device) {
|
4000 |
+
var newSrc = this.desktopSrc;
|
4001 |
+
if (device.device == 'mobile') {
|
4002 |
+
if (this.mobileSrc) {
|
4003 |
+
newSrc = this.mobileSrc;
|
4004 |
+
} else if (this.tabletSrc) {
|
4005 |
+
newSrc = this.tabletSrc;
|
4006 |
+
}
|
4007 |
+
} else if (device.device == 'tablet') {
|
4008 |
+
if (this.tabletSrc) {
|
4009 |
+
newSrc = this.tabletSrc;
|
4010 |
+
}
|
4011 |
+
}
|
4012 |
+
if (newSrc) {
|
4013 |
+
this.setSrc(newSrc);
|
4014 |
+
} else {
|
4015 |
+
this.setSrc('');
|
4016 |
+
}
|
4017 |
+
};
|
4018 |
+
|
4019 |
+
SmartSliderBackgroundImage.prototype.setSrc = function (src) {
|
4020 |
+
if (this.loadAllowed) {
|
4021 |
+
if (src != this.currentSrc) {
|
4022 |
+
if (src === '') {
|
4023 |
+
this.$background.css('background-image', '');
|
4024 |
+
} else {
|
4025 |
+
this.$background.css('background-image', 'url("' + src + '")');
|
4026 |
+
}
|
4027 |
+
this.currentSrc = src;
|
4028 |
+
}
|
4029 |
+
}
|
4030 |
+
}
|
4031 |
+
|
4032 |
+
SmartSliderBackgroundImage.prototype.startFixed = function () {
|
4033 |
+
if (!n2const.isEdge) {
|
4034 |
+
if (this.slide.slider.parameters.allowBGImageAttachmentFixed && !n2const.isIOS) {
|
4035 |
+
this.$background.css('background-repeat', 'repeat');
|
4036 |
+
this.$background.css('position', 'static');
|
4037 |
+
this.$background.css('background-attachment', 'fixed');
|
4038 |
+
} else if (!n2const.isIE) {
|
4039 |
+
this.slide.slider.startedDeferred.done($.proxy(function () {
|
4040 |
+
fixedBackground.addElement(this.$background, this.element);
|
4041 |
+
}, this));
|
4042 |
+
}
|
4043 |
+
}
|
4044 |
+
}
|
4045 |
|
4046 |
+
SmartSliderBackgroundImage.prototype.hack = function () {
|
4047 |
+
NextendTween.set(this.element, {
|
4048 |
+
rotation: 0.0001
|
4049 |
+
});
|
|
|
|
|
|
|
|
|
4050 |
};
|
4051 |
|
4052 |
+
return SmartSliderBackgroundImage;
|
4053 |
});
|
4054 |
N2Require('FrontendComponent', [], [], function ($, scope, undefined) {
|
4055 |
+
|
4056 |
+
/**
|
4057 |
+
* @constructor
|
4058 |
+
* @memberof scope
|
4059 |
+
*/
|
4060 |
function FrontendComponent(slide, parent, $layer, $children) {
|
4061 |
this.wraps = {};
|
4062 |
this.isVisible = true;
|
4265 |
|
4266 |
return FrontendPlacement;
|
4267 |
});
|
4268 |
+
N2Require('FrontendSliderSlide', ['FrontendComponentSlideAbstract'], [], function ($, scope, undefined) {
|
4269 |
+
|
4270 |
+
/**
|
4271 |
+
* @constructor
|
4272 |
+
* @augments FrontendComponentSlideAbstract
|
4273 |
+
* @memberof scope
|
4274 |
+
*/
|
4275 |
+
function FrontendSliderSlide(slider, $element, index) {
|
4276 |
+
this.isStaticSlide = false;
|
4277 |
+
this.originalIndex = index;
|
4278 |
+
this.index = index;
|
4279 |
+
this.localIndex = index;
|
4280 |
+
this.$element = $element.data('slide', this);
|
4281 |
+
this.id = this.$element.data('id');
|
4282 |
+
|
4283 |
+
this.backgroundImage = false;
|
4284 |
+
this.backgroundVideo = false;
|
4285 |
+
|
4286 |
+
this.slides = [this];
|
4287 |
+
|
4288 |
+
if (!slider.parameters.admin) {
|
4289 |
+
this.minimumSlideDuration = $element.data('slide-duration');
|
4290 |
+
if (!$.isNumeric(this.minimumSlideDuration)) {
|
4291 |
+
this.minimumSlideDuration = 0;
|
4292 |
+
}
|
4293 |
+
} else {
|
4294 |
+
this.minimumSlideDuration = 0;
|
4295 |
+
}
|
4296 |
+
|
4297 |
+
var $container = $element.find('.n2-ss-layers-container');
|
4298 |
+
|
4299 |
+
scope.FrontendComponentSlideAbstract.prototype.constructor.call(this, slider, $container);
|
4300 |
+
}
|
4301 |
+
|
4302 |
+
FrontendSliderSlide.prototype = Object.create(scope.FrontendComponentSlideAbstract.prototype);
|
4303 |
+
FrontendSliderSlide.prototype.constructor = FrontendSliderSlide;
|
4304 |
+
|
4305 |
+
FrontendSliderSlide.prototype.init = function () {
|
4306 |
+
scope.FrontendComponentSlideAbstract.prototype.init.call(this);
|
4307 |
+
var $image = this.slider.findSlideBackground(this);
|
4308 |
+
if ($image.length > 0) {
|
4309 |
+
if (this.slider.isAdmin) {
|
4310 |
+
this.backgroundImage = new scope.SmartSliderBackgroundImageAdmin(this, $image, this.slider.backgroundImages);
|
4311 |
+
} else {
|
4312 |
+
this.backgroundImage = new scope.SmartSliderBackgroundImage(this, $image, this.slider.backgroundImages);
|
4313 |
+
}
|
4314 |
+
}
|
4315 |
+
|
4316 |
+
this.$element.data('slideBackground', this.backgroundImage);
|
4317 |
+
|
4318 |
+
var $video = this.backgroundImage.element.find('.n2-ss-slide-background-video');
|
4319 |
+
if ($video.length > 0) {
|
4320 |
+
this.backgroundVideo = new scope.SmartSliderBackgroundVideo(this, $video);
|
4321 |
+
}
|
4322 |
+
};
|
4323 |
+
|
4324 |
+
FrontendSliderSlide.prototype.setStarterSlide = function () {
|
4325 |
+
scope.FrontendComponentSlideAbstract.prototype.setStarterSlide.call(this);
|
4326 |
+
};
|
4327 |
+
|
4328 |
+
FrontendSliderSlide.prototype.setIndex = function (index) {
|
4329 |
+
this.localIndex = this.index = index;
|
4330 |
+
};
|
4331 |
+
|
4332 |
+
FrontendSliderSlide.prototype.preLoad = function () {
|
4333 |
+
if (this.backgroundImage) {
|
4334 |
+
return this.backgroundImage.preLoad();
|
4335 |
+
}
|
4336 |
+
|
4337 |
+
return true;
|
4338 |
+
};
|
4339 |
+
|
4340 |
+
/**
|
4341 |
+
* Linked list
|
4342 |
+
* @param previousSlide
|
4343 |
+
*/
|
4344 |
+
FrontendSliderSlide.prototype.setPrevious = function (previousSlide) {
|
4345 |
+
this.previousSlide = previousSlide;
|
4346 |
+
};
|
4347 |
+
|
4348 |
+
/**
|
4349 |
+
* Linked list
|
4350 |
+
* @param nextSlide
|
4351 |
+
*/
|
4352 |
+
FrontendSliderSlide.prototype.setNext = function (nextSlide) {
|
4353 |
+
this.nextSlide = nextSlide;
|
4354 |
+
nextSlide.setPrevious(this);
|
4355 |
+
};
|
4356 |
+
|
4357 |
+
FrontendSliderSlide.prototype.hasBackgroundVideo = function () {
|
4358 |
+
return this.backgroundVideo;
|
4359 |
+
};
|
4360 |
+
|
4361 |
+
return FrontendSliderSlide;
|
4362 |
+
});
|
4363 |
+
N2Require('FrontendComponentSlideAbstract', ['FrontendComponent'], [], function ($, scope, undefined) {
|
4364 |
+
|
4365 |
+
var SlideStatus = {
|
4366 |
+
NOT_INITIALIZED: -1,
|
4367 |
+
INITIALIZED: 0,
|
4368 |
+
READY_TO_START: 1,
|
4369 |
+
PLAYING: 2,
|
4370 |
+
ENDED: 3
|
4371 |
+
};
|
4372 |
+
|
4373 |
+
/**
|
4374 |
+
* @constructor
|
4375 |
+
* @augments FrontendComponent
|
4376 |
+
* @memberof scope
|
4377 |
+
*/
|
4378 |
+
function FrontendComponentSlideAbstract(slider, $el) {
|
4379 |
+
this.baseSize = 16;
|
4380 |
+
this.slider = slider;
|
4381 |
+
|
4382 |
+
if (!this.isCurrentlyEdited()) {
|
4383 |
+
|
4384 |
+
this.status = SlideStatus.NOT_INITIALIZED;
|
4385 |
+
|
4386 |
+
scope.FrontendComponent.prototype.constructor.call(this, this, this, $el, $el.find('> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group'));
|
4387 |
+
|
4388 |
+
this.slider.sliderElement.on({
|
4389 |
+
SliderDeviceOrientation: $.proxy(function (e, modes) {
|
4390 |
+
this.onDeviceChange(modes.device + modes.orientation.toLowerCase());
|
4391 |
+
}, this),
|
4392 |
+
SliderResize: $.proxy(function (e, ratios, responsive) {
|
4393 |
+
this.onResize(ratios, responsive.responsiveDimensions);
|
4394 |
+
}, this)
|
4395 |
+
});
|
4396 |
+
|
4397 |
+
scope.FrontendComponent.prototype.start.call(this);
|
4398 |
+
}
|
4399 |
+
}
|
4400 |
+
|
4401 |
+
FrontendComponentSlideAbstract.prototype = Object.create(scope.FrontendComponent.prototype);
|
4402 |
+
FrontendComponentSlideAbstract.prototype.constructor = FrontendComponentSlideAbstract;
|
4403 |
+
|
4404 |
+
FrontendComponentSlideAbstract.prototype.isCurrentlyEdited = function () {
|
4405 |
+
return this.slider.parameters.admin && this.$element.hasClass('n2-ss-currently-edited-slide');
|
4406 |
+
};
|
4407 |
+
|
4408 |
+
FrontendComponentSlideAbstract.prototype.trigger = function () {
|
4409 |
+
this.$element.trigger.apply(this.$element, [].slice.call(arguments));
|
4410 |
+
};
|
4411 |
+
|
4412 |
+
FrontendComponentSlideAbstract.prototype.triggerHandler = function () {
|
4413 |
+
return this.$element.triggerHandler.apply(this.$element, [].slice.call(arguments));
|
4414 |
+
};
|
4415 |
+
|
4416 |
+
FrontendComponentSlideAbstract.prototype.init = function () {
|
4417 |
+
|
4418 |
+
if (!this.isCurrentlyEdited()) {
|
4419 |
+
}
|
4420 |
+
};
|
4421 |
+
|
4422 |
+
FrontendComponentSlideAbstract.prototype.refreshBaseSize = function (fontSize) {
|
4423 |
+
|
4424 |
+
};
|
4425 |
+
|
4426 |
+
FrontendComponentSlideAbstract.prototype.onResize = function (ratios, dimensions) {
|
4427 |
+
for (var i = 0; i < this.children.length; i++) {
|
4428 |
+
this.children[i].onResize(ratios, dimensions, this.isStaticSlide)
|
4429 |
+
}
|
4430 |
+
};
|
4431 |
+
|
4432 |
+
|
4433 |
+
FrontendComponentSlideAbstract.prototype.hasLayers = function () {
|
4434 |
+
return this.children.length > 0;
|
4435 |
+
};
|
4436 |
+
|
4437 |
+
FrontendComponentSlideAbstract.prototype.onDeviceChange = function (device) {
|
4438 |
+
this.device = device;
|
4439 |
+
|
4440 |
+
for (var i = 0; i < this.children.length; i++) {
|
4441 |
+
this.children[i].onDeviceChange(device)
|
4442 |
+
}
|
4443 |
+
this.placement.onDeviceChange(device);
|
4444 |
+
|
4445 |
+
};
|
4446 |
+
|
4447 |
+
FrontendComponentSlideAbstract.prototype.setStarterSlide = function () {
|
4448 |
+
};
|
4449 |
+
|
4450 |
+
return FrontendComponentSlideAbstract;
|
4451 |
+
});
|
4452 |
+
N2Require('FrontendSliderStaticSlide', ['FrontendComponentSlideAbstract'], [], function ($, scope, undefined) {
|
4453 |
+
|
4454 |
+
/**
|
4455 |
+
* @constructor
|
4456 |
+
* @augments FrontendComponentSlideAbstract
|
4457 |
+
* @memberof scope
|
4458 |
+
*/
|
4459 |
+
function FrontendSliderStaticSlide(slider, $element) {
|
4460 |
+
this.isStaticSlide = true;
|
4461 |
+
this.$element = $element.data('slide', this);
|
4462 |
+
scope.FrontendComponentSlideAbstract.prototype.constructor.call(this, slider, $element);
|
4463 |
+
|
4464 |
+
this.init();
|
4465 |
+
}
|
4466 |
+
|
4467 |
+
FrontendSliderStaticSlide.prototype = Object.create(scope.FrontendComponentSlideAbstract.prototype);
|
4468 |
+
FrontendSliderStaticSlide.prototype.constructor = FrontendSliderStaticSlide;
|
4469 |
+
|
4470 |
+
return FrontendSliderStaticSlide;
|
4471 |
+
});
|
4472 |
N2Require('FrontendPlacementAbsolute', ['FrontendPlacement'], [], function ($, scope, undefined) {
|
4473 |
|
4474 |
if (/(MSIE\ [0-7]\.\d+)/.test(navigator.userAgent)) {
|
4624 |
break;
|
4625 |
}
|
4626 |
}
|
4627 |
+
|
4628 |
$layer.css(positionCSS);
|
4629 |
|
4630 |
for (var i = 0; i < this.linked.length; i++) {
|
4968 |
length = columns.length,
|
4969 |
isWrapped = false;
|
4970 |
|
4971 |
+
if (length == 0) {
|
4972 |
+
return false;
|
4973 |
+
}
|
4974 |
+
|
4975 |
if (wrapAfter > 0 && wrapAfter < length) {
|
4976 |
isWrapped = true;
|
4977 |
}
|
4990 |
$('<div class="n2-ss-row-break"/>')
|
4991 |
.css('order', order)
|
4992 |
.insertAfter(columns[i].$layer), columns[i].$layer;
|
4993 |
+
} else {
|
4994 |
+
columns[i].$layer.removeClass('n2-ss-last-in-row');
|
4995 |
+
}
|
4996 |
+
}
|
4997 |
+
} else {
|
4998 |
+
for (var i = 0; i < length; i++) {
|
4999 |
+
columns[i].$layer
|
5000 |
+
.removeClass('n2-ss-last-in-row')
|
5001 |
+
.attr('data-r', 0);
|
5002 |
+
}
|
5003 |
+
columns[length - 1].$layer.addClass('n2-ss-last-in-row');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5004 |
}
|
|
|
|
|
5005 |
}
|
5006 |
|
5007 |
+
FrontendComponentRow.prototype.getContents = function () {
|
5008 |
+
return this.$row;
|
|
|
|
|
|
|
|
|
|
|
|
|
5009 |
}
|
5010 |
|
5011 |
+
return FrontendComponentRow;
|
|
|
|
|
|
|
5012 |
});
|
5013 |
N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
|
5014 |
|
5023 |
|
5024 |
this.invalidateResponsiveState = true;
|
5025 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5026 |
this.parameters = $.extend({
|
5027 |
desktop: 1,
|
5028 |
tablet: 1,
|
5118 |
overflowHiddenPage: 0
|
5119 |
}, parameters);
|
5120 |
|
5121 |
+
if (slider.isAdmin) {
|
5122 |
+
this.doResize = NextendThrottle(this.doResize, 50);
|
5123 |
+
}
|
5124 |
+
|
5125 |
+
this.loadDeferred = $.Deferred();
|
5126 |
+
|
5127 |
+
this.slider = slider;
|
5128 |
+
this.sliderElement = slider.sliderElement;
|
5129 |
+
}
|
5130 |
+
|
5131 |
+
SmartSliderResponsive.OrientationMode = {
|
5132 |
+
SCREEN: 0,
|
5133 |
+
ADMIN_LANDSCAPE: 1,
|
5134 |
+
ADMIN_PORTRAIT: 2,
|
5135 |
+
SCREEN_WIDTH_ONLY: 3
|
5136 |
+
};
|
5137 |
+
SmartSliderResponsive.DeviceOrientation = {
|
5138 |
+
UNKNOWN: 0,
|
5139 |
+
LANDSCAPE: 1,
|
5140 |
+
PORTRAIT: 2
|
5141 |
+
};
|
5142 |
+
SmartSliderResponsive._DeviceOrientation = {
|
5143 |
+
0: 'Unknown',
|
5144 |
+
1: 'Landscape',
|
5145 |
+
2: 'Portrait'
|
5146 |
+
};
|
5147 |
+
SmartSliderResponsive.DeviceMode = {
|
5148 |
+
UNKNOWN: 0,
|
5149 |
+
DESKTOP: 1,
|
5150 |
+
TABLET: 2,
|
5151 |
+
MOBILE: 3
|
5152 |
+
};
|
5153 |
+
SmartSliderResponsive._DeviceMode = {
|
5154 |
+
0: 'unknown',
|
5155 |
+
1: 'desktop',
|
5156 |
+
2: 'tablet',
|
5157 |
+
3: 'mobile'
|
5158 |
+
};
|
5159 |
+
|
5160 |
+
SmartSliderResponsive.prototype.start = function () {
|
5161 |
+
|
5162 |
+
if (nextend.fontsDeferred == undefined) {
|
5163 |
+
nextend.loadDeferred.always($.proxy(function () {
|
5164 |
+
this.loadDeferred.resolve();
|
5165 |
+
}, this));
|
5166 |
+
} else {
|
5167 |
+
nextend.fontsDeferred.always($.proxy(function () {
|
5168 |
+
this.loadDeferred.resolve();
|
5169 |
+
}, this));
|
5170 |
+
}
|
5171 |
+
|
5172 |
+
|
5173 |
+
this.normalizeTimeout = null;
|
5174 |
+
this.delayedResizeAdded = false;
|
5175 |
+
|
5176 |
+
this.deviceMode = SmartSliderResponsive.DeviceMode.UNKNOWN;
|
5177 |
+
this.orientationMode = SmartSliderResponsive.OrientationMode.SCREEN;
|
5178 |
+
this.orientation = SmartSliderResponsive.DeviceOrientation.UNKNOWN;
|
5179 |
+
this.lastRatios = {
|
5180 |
+
ratio: -1
|
5181 |
+
};
|
5182 |
+
this.lastRawRatios = {
|
5183 |
+
ratio: -1
|
5184 |
+
};
|
5185 |
+
this.normalizedMode = 'unknownUnknown';
|
5186 |
+
|
5187 |
+
this.widgetMargins = {
|
5188 |
+
Top: [],
|
5189 |
+
Right: [],
|
5190 |
+
Bottom: [],
|
5191 |
+
Left: []
|
5192 |
+
};
|
5193 |
+
this.staticSizes = {
|
5194 |
+
paddingTop: 0,
|
5195 |
+
paddingRight: 0,
|
5196 |
+
paddingBottom: 0,
|
5197 |
+
paddingLeft: 0
|
5198 |
+
};
|
5199 |
+
this.enabledWidgetMargins = [];
|
5200 |
+
|
5201 |
+
|
5202 |
+
this.alignElement = this.slider.sliderElement.closest('.n2-ss-align');
|
5203 |
+
|
5204 |
+
var ready = this.ready = $.Deferred();
|
5205 |
+
|
5206 |
+
this.sliderElement.triggerHandler('SliderResponsiveStarted');
|
5207 |
+
|
5208 |
+
this.sliderElement.one('SliderResize', function () {
|
5209 |
+
ready.resolve();
|
5210 |
+
});
|
5211 |
+
|
5212 |
+
this.containerElementPadding = this.sliderElement.parent();
|
5213 |
+
this.containerElement = this.containerElementPadding.parent();
|
5214 |
+
|
5215 |
|
5216 |
if (!this.slider.isAdmin && this.parameters.overflowHiddenPage) {
|
5217 |
$('html, body').css('overflow', 'hidden');
|
5221 |
this.orientationMode = SmartSliderResponsive.OrientationMode.SCREEN_WIDTH_ONLY;
|
5222 |
}
|
5223 |
|
5224 |
+
nextend.smallestZoom = Math.min(Math.max(this.parameters.sliderWidthToDevice.mobilePortrait, 120), 320);
|
5225 |
|
5226 |
switch (this.parameters.basedOn) {
|
5227 |
case 'screen':
|
5266 |
this.parameters.maximumHeightRatio.mobilePortrait = this.parameters.maximumHeightRatio.desktopPortrait;
|
5267 |
this.parameters.maximumHeightRatio.mobileLandscape = this.parameters.maximumHeightRatio.desktopPortrait;
|
5268 |
}
|
|
|
5269 |
if (this.parameters.maximumSlideWidth > 0) {
|
5270 |
this.parameters.maximumSlideWidthRatio = {
|
5271 |
desktopPortrait: this.parameters.maximumSlideWidth / this.responsiveDimensions.startSlideWidth,
|
5274 |
tabletLandscape: this.parameters.maximumSlideWidthTabletLandscape / this.responsiveDimensions.startSlideWidth,
|
5275 |
mobilePortrait: this.parameters.maximumSlideWidthMobile / this.responsiveDimensions.startSlideWidth,
|
5276 |
mobileLandscape: this.parameters.maximumSlideWidthMobileLandscape / this.responsiveDimensions.startSlideWidth
|
5277 |
+
};
|
5278 |
|
5279 |
if (this.parameters.maximumSlideWidthConstrainHeight) {
|
5280 |
this.parameters.maximumHeightRatio = $.extend({}, this.parameters.maximumSlideWidthRatio);
|
5291 |
|
5292 |
this.onResize();
|
5293 |
if (this.parameters.onResizeEnabled || this.parameters.type == 'adaptive') {
|
5294 |
+
$(window).on({
|
5295 |
+
resize: $.proxy(this.onResize, this),
|
5296 |
+
orientationchange: $.proxy(this.onResize, this)
|
5297 |
+
});
|
5298 |
|
5299 |
this.sliderElement.on('SliderInternalResize', $.proxy(this.onResize, this));
|
5300 |
|
5313 |
}
|
5314 |
};
|
5315 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5316 |
SmartSliderResponsive.prototype.getOuterWidth = function () {
|
5317 |
+
return this.responsiveDimensions.startSliderWidth + this.responsiveDimensions.startSliderMarginLeft + this.responsiveDimensions.startSliderMarginRight;
|
|
|
5318 |
};
|
5319 |
|
5320 |
SmartSliderResponsive.prototype.storeDefaults = function () {
|
5339 |
bottom: this.responsiveDimensions.startSliderMarginBottom,
|
5340 |
left: this.responsiveDimensions.startSliderMarginLeft
|
5341 |
}
|
5342 |
+
};
|
5343 |
|
5344 |
SmartSliderResponsive.prototype.addHorizontalElement = function (element, cssproperties, ratioName, name) {
|
5345 |
ratioName = ratioName || 'ratio';
|
5347 |
var responsiveElement = new scope.SmartSliderResponsiveElement(this, ratioName, element, cssproperties, name);
|
5348 |
this.horizontalElements.push(responsiveElement);
|
5349 |
return responsiveElement;
|
5350 |
+
};
|
5351 |
|
5352 |
SmartSliderResponsive.prototype.addVerticalElement = function (element, cssproperties, ratioName, name) {
|
5353 |
ratioName = ratioName || 'ratio';
|
5355 |
var responsiveElement = new scope.SmartSliderResponsiveElement(this, ratioName, element, cssproperties, name);
|
5356 |
this.verticalElements.push(responsiveElement);
|
5357 |
return responsiveElement;
|
5358 |
+
};
|
5359 |
|
5360 |
SmartSliderResponsive.prototype.resizeHorizontalElements = function (ratios) {
|
5361 |
for (var i = 0; i < this.horizontalElements.length; i++) {
|
5365 |
}
|
5366 |
responsiveElement.resize(this.responsiveDimensions, ratios[responsiveElement.ratioName], false, 0);
|
5367 |
}
|
5368 |
+
};
|
5369 |
|
5370 |
SmartSliderResponsive.prototype.updateVerticalRatios = function (ratios) {
|
5371 |
|
5372 |
return ratios;
|
5373 |
+
};
|
5374 |
|
5375 |
SmartSliderResponsive.prototype._updateVerticalRatios = function (ratios) {
|
5376 |
|
5391 |
}
|
5392 |
|
5393 |
return ratios;
|
5394 |
+
};
|
5395 |
|
5396 |
SmartSliderResponsive.prototype.resizeVerticalElements = function (ratios, timeline, duration) {
|
5397 |
|
5402 |
}
|
5403 |
responsiveElement.resize(this.responsiveDimensions, ratios[responsiveElement.ratioName], timeline, duration);
|
5404 |
}
|
5405 |
+
};
|
5406 |
|
5407 |
SmartSliderResponsive.prototype.getDeviceMode = function () {
|
5408 |
return SmartSliderResponsive._DeviceMode[this.deviceMode];
|
5412 |
return SmartSliderResponsive._DeviceMode[this.deviceMode] + SmartSliderResponsive._DeviceOrientation[this.orientation];
|
5413 |
};
|
5414 |
|
5415 |
+
SmartSliderResponsive.prototype.onResize = function (e) {
|
5416 |
if (!this.slider.mainAnimation || this.slider.mainAnimation.getState() == 'ended') {
|
5417 |
+
this.doResize(e);
|
5418 |
} else if (!this.delayedResizeAdded) {
|
5419 |
this.delayedResizeAdded = true;
|
5420 |
this.sliderElement.on('mainAnimationComplete.responsive', $.proxy(this._doDelayedResize, this));
|
5530 |
});
|
5531 |
};
|
5532 |
|
5533 |
+
SmartSliderResponsive.prototype.doResize = function (e, fixedMode, timeline, nextSlide, duration) {
|
|
|
5534 |
if (!this.disableTransitions) {
|
5535 |
this.disableTransitions = true;
|
5536 |
this.sliderElement.addClass('n2notransition');
|
5570 |
|
5571 |
var windowWidth = customWidth > 0 ? customWidth : (document.body.clientWidth || document.documentElement.clientWidth),
|
5572 |
outerEl = this.containerElement.parent(),
|
5573 |
+
outerElBoundingRect = outerEl[0].getBoundingClientRect(),
|
5574 |
+
outerElOffset;
|
5575 |
+
if (nextend.rtl.isRtl) {
|
5576 |
+
outerElOffset = windowWidth - (outerElBoundingRect.left + outerEl.outerWidth());
|
5577 |
+
} else {
|
5578 |
+
outerElOffset = outerElBoundingRect.left;
|
5579 |
}
|
5580 |
+
this.containerElement.css(nextend.rtl.marginLeft, -outerElOffset - parseInt(outerEl.css('paddingLeft')) - parseInt(outerEl.css('borderLeftWidth')) + adjustLeftOffset)
|
5581 |
.width(windowWidth);
|
5582 |
}
|
5583 |
}
|
5635 |
if (!this.slider.isAdmin) {
|
5636 |
if (this.parameters.type == 'fullpage') {
|
5637 |
var clientHeight = 0;
|
5638 |
+
if (window.matchMedia && (/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent || navigator.vendor || window.opera)) {
|
5639 |
+
var innerHeight,
|
5640 |
+
isOrientationChanged = false;
|
5641 |
+
|
5642 |
+
if (e && e.type == 'orientationchange') {
|
5643 |
+
isOrientationChanged = true;
|
5644 |
+
}
|
5645 |
+
|
5646 |
+
if (n2const.isIOS) {
|
5647 |
+
innerHeight = document.documentElement.clientHeight;
|
5648 |
+
} else {
|
5649 |
+
innerHeight = window.innerHeight;
|
5650 |
+
}
|
5651 |
+
|
5652 |
+
if (window.matchMedia("(orientation: landscape)").matches) {
|
5653 |
// landscape
|
5654 |
+
clientHeight = Math.min(screen.width, innerHeight);
|
5655 |
if (this.lastOrientation != 90) {
|
5656 |
isOrientationChanged = true;
|
5657 |
this.lastOrientation = 90;
|
5658 |
}
|
5659 |
} else {
|
5660 |
+
clientHeight = Math.min(screen.height, innerHeight);
|
5661 |
if (this.lastOrientation != 0) {
|
5662 |
isOrientationChanged = true;
|
5663 |
this.lastOrientation = 0;
|
5664 |
}
|
5665 |
}
|
5666 |
+
|
5667 |
if (!isOrientationChanged && Math.abs(clientHeight - this.lastClientHeight) < 100) {
|
5668 |
clientHeight = this.lastClientHeight;
|
5669 |
} else {
|
5703 |
} else if (!this.parameters.upscale && ratio > zeroRatio) {
|
5704 |
ratio = zeroRatio;
|
5705 |
}
|
5706 |
+
this._doResize(ratio, timeline, nextSlide, duration);
|
5707 |
|
5708 |
if (this.slider.parameters.align == 'center') {
|
5709 |
this.alignElement.css('maxWidth', this.responsiveDimensions.slider.width);
|
5727 |
return this.parameters.deviceModes[device + orientation];
|
5728 |
};
|
5729 |
|
5730 |
+
SmartSliderResponsive.prototype._doResize = function (ratio, timeline, nextSlide, duration) {
|
5731 |
var ratios = {
|
5732 |
ratio: ratio,
|
5733 |
w: ratio,
|
5737 |
fontRatio: 1
|
5738 |
};
|
5739 |
|
5740 |
+
this._buildRatios(ratios, this.slider.parameters.dynamicHeight, nextSlide);
|
5741 |
+
|
|
|
|
|
|
|
|
|
|
|
5742 |
ratios.fontRatio = ratios.slideW;
|
5743 |
|
5744 |
|
5795 |
this.triggerResize(ratios, false);
|
5796 |
}
|
5797 |
|
5798 |
+
};
|
5799 |
|
5800 |
/**
|
5801 |
* Admin only
|
5814 |
if (isChanged) {
|
5815 |
this.finishVerticalResize(ratios);
|
5816 |
}
|
5817 |
+
};
|
5818 |
|
5819 |
SmartSliderResponsive.prototype.finishVerticalResize = function (ratios) {
|
5820 |
this.loadDeferred.done($.proxy(function () {
|
5821 |
this.finishVerticalResize = this._finishVerticalResize;
|
5822 |
this.finishVerticalResize(ratios);
|
5823 |
}, this));
|
5824 |
+
};
|
5825 |
|
5826 |
SmartSliderResponsive.prototype._finishVerticalResize = function (ratios) {
|
5827 |
this.resizeVerticalElements(ratios, false, 0);
|
5828 |
|
5829 |
this.lastRatios = ratios;
|
|
|
5830 |
this.triggerResize(ratios, false);
|
5831 |
|
5832 |
+
};
|
5833 |
|
5834 |
SmartSliderResponsive.prototype.triggerResize = function (ratios, timeline) {
|
5835 |
n2c.log('Event: SliderResize', ratios);
|
5836 |
this.sliderElement.trigger('SliderResize', [ratios, this, timeline]);
|
5837 |
};
|
5838 |
|
5839 |
+
SmartSliderResponsive.prototype._buildRatios = function (ratios, dynamicHeight, nextSlide) {
|
5840 |
|
5841 |
var deviceModeOrientation = this.getDeviceModeOrientation();
|
5842 |
|
5846 |
|
5847 |
ratios.slideW = ratios.slideH = Math.min(ratios.slideW, ratios.slideH);
|
5848 |
|
|
|
5849 |
var verticalRatioModifier = this.parameters.verticalRatioModifiers[deviceModeOrientation];
|
5850 |
ratios.slideH *= verticalRatioModifier;
|
5851 |
+
|
5852 |
if (this.parameters.type == 'fullpage') {
|
5853 |
ratios.h *= verticalRatioModifier;
|
5854 |
|
5901 |
|
5902 |
if (dynamicHeight) {
|
5903 |
|
|
|
|
|
|
|
|
|
|
|
5904 |
/** @type {SmartSliderBackgroundImage} */
|
5905 |
+
var backgroundImage = this.slider.currentSlide.backgroundImage;
|
5906 |
+
if (typeof nextSlide !== 'undefined') {
|
5907 |
+
backgroundImage = nextSlide.backgroundImage;
|
5908 |
+
}
|
5909 |
|
5910 |
if (backgroundImage.width > 0 && backgroundImage.height > 0) {
|
5911 |
var backgroundRatioModifier = (this.responsiveDimensions.startSlideWidth / backgroundImage.width) * ( backgroundImage.height / this.responsiveDimensions.startSlideHeight);
|
5975 |
};
|
5976 |
|
5977 |
SmartSliderResponsive.prototype.addStaticMargin = function (side, widget) {
|
5978 |
+
if (side == 'Bottom' || side == 'Top') return;
|
5979 |
+
|
5980 |
if (!this.widgetStaticMargins) {
|
5981 |
this.widgetStaticMargins = {
|
5982 |
Top: [],
|
6033 |
}
|
6034 |
this.staticSizes = staticSizes;
|
6035 |
}
|
6036 |
+
};
|
6037 |
|
6038 |
SmartSliderResponsive.prototype._addMarginSize = function (side, size) {
|
6039 |
var axis = null;
|
6346 |
this.setVolume(volume);
|
6347 |
}
|
6348 |
|
6349 |
+
this.slide = this.slider.findSlideByElement(this.playerElement);
|
6350 |
|
6351 |
if (this.parameters.center == 1) {
|
6352 |
this.onResize();
|
6376 |
if (!this.isStatic) {
|
6377 |
//pause video when slide changed
|
6378 |
this.slider.sliderElement.on("mainAnimationStart", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
|
6379 |
+
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) == -1) {
|
6380 |
if (parseInt(this.parameters.reset)) {
|
6381 |
this.reset();
|
6382 |
} else {
|
6419 |
if (!this.isStatic) {
|
6420 |
//change slide
|
6421 |
this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
|
6422 |
+
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) >= 0) {
|
6423 |
this.play();
|
6424 |
}
|
6425 |
}, this));
|
6426 |
|
6427 |
+
if ($.inArray(this.slide, this.slider.getVisibleSlides()) >= 0) {
|
6428 |
this.play();
|
6429 |
}
|
6430 |
} else {
|
6483 |
showinfo: 1,
|
6484 |
modestbranding: 1,
|
6485 |
reset: 0,
|
6486 |
+
query: []
|
6487 |
}, parameters);
|
6488 |
|
6489 |
+
if (navigator.userAgent.toLowerCase().indexOf("android") > -1 || n2const.isIOS) {
|
6490 |
this.parameters.autoplay = 0;
|
6491 |
}
|
6492 |
|
6577 |
vars[k] = this.parameters.query[k];
|
6578 |
}
|
6579 |
}
|
|
|
6580 |
|
6581 |
this.player = new YT.Player(this.playerId, {
|
6582 |
videoId: this.parameters.youtubecode,
|
6614 |
|
6615 |
this.playerElement = $("#" + this.playerId);
|
6616 |
|
6617 |
+
this.slide = this.slider.findSlideByElement(this.playerElement);
|
6618 |
if (this.parameters.center == 1) {
|
6619 |
this.playerElement.parent().css('overflow', 'hidden');
|
6620 |
|
6625 |
|
6626 |
};
|
6627 |
|
6628 |
+
FrontendItemYouTube.prototype.onReady = function () {
|
6629 |
|
6630 |
var volume = parseFloat(this.parameters.volume);
|
6631 |
if (volume >= 0) {
|
6638 |
|
6639 |
if (!this.isStatic) {
|
6640 |
//pause video when slide changed
|
6641 |
+
this.slider.sliderElement.on("mainAnimationStart", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex) {
|
6642 |
+
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) == -1) {
|
6643 |
this.pause();
|
6644 |
}
|
6645 |
}, this));
|
6646 |
if (parseInt(this.parameters.reset)) {
|
6647 |
+
this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex) {
|
6648 |
+
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) == -1) {
|
6649 |
this.player.seekTo(0);
|
6650 |
}
|
6651 |
}, this));
|
6680 |
|
6681 |
if (!this.isStatic) {
|
6682 |
//change slide
|
6683 |
+
this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex) {
|
6684 |
+
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) >= 0) {
|
6685 |
this.play();
|
6686 |
}
|
6687 |
}, this));
|
6688 |
|
6689 |
+
if ($.inArray(this.slide, this.slider.getVisibleSlides()) >= 0) {
|
6690 |
this.play();
|
6691 |
}
|
6692 |
} else {
|
library/media/dist/smartslider-frontend.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
N2Require("SmartSliderBackgroundImage",[],[],function(e,t,i){function s(t,i,s){this.loadAllowed=!1,this.width=0,this.height=0,this.i=t,this.element=i,this.manager=s,this.loadDeferred=e.Deferred(),this.currentSrc="",this.mode=i.data("mode"),this.opacity=i.data("opacity"),this.blur=i.data("blur"),this.x=i.data("x"),this.y=i.data("y"),this.hasImage=!1,this.$image=i.find("img"),this.$image.length?(this.hasImage=!0,this.startImageMode()):this.startColorMode()}return s.prototype.startColorMode=function(){this.loadDeferred.resolve()},s.prototype.startImageMode=function(){if("fixed"==this.mode&&(n2const.isPhone&&!this.manager.slider.parameters["background.parallax.mobile"]||n2const.isTablet&&!this.manager.slider.parameters["background.parallax.tablet"])&&(this.mode="fill"),this.$image.css("display","none"),this.$background=e('<div class="n2-ss-background-image"/>').css({opacity:this.opacity,backgroundPosition:this.x+"% "+this.y+"%"}).appendTo(this.element),window.n2FilterProperty&&(this.blur>0?this.$background.css({margin:"-"+2*this.blur+"px",padding:2*this.blur+"px"}).css(window.n2FilterProperty,"blur("+this.blur+"px)"):this.$background.css({margin:"",padding:""}).css(window.n2FilterProperty,"")),"fixed"==this.mode&&this.startFixed(),this.desktopSrc=this.element.data("desktop")||"",this.tabletSrc=this.element.data("tablet")||"",this.mobileSrc=this.element.data("mobile")||"",nextend.isRetina){var t=this.element.data("desktop-retina");t&&(this.desktopSrc=t),t=this.element.data("tablet-retina"),t&&(this.tabletSrc=t),t=this.element.data("mobile-retina"),t&&(this.mobileSrc=t)}},s.prototype.preLoad=function(){return"pending"==this.loadDeferred.state()&&(this.loadAllowed=!0,this.manager.deviceDeferred.done(e.proxy(function(){this.updateBackgroundToDevice(this.manager.device),this.$background.n2imagesLoaded({background:!0},e.proxy(function(e){var t=e.images[0].img;this.width=t.naturalWidth,this.height=t.naturalHeight,this.isLoaded=!0,this.loadDeferred.resolve(this.element)},this))},this))),this.loadDeferred},s.prototype.afterLoaded=function(){return e.when(this.loadDeferred,this.manager.slider.responsive.ready)},s.prototype.updateBackgroundToDevice=function(e){var t=this.desktopSrc;"mobile"==e.device?this.mobileSrc?t=this.mobileSrc:this.tabletSrc&&(t=this.tabletSrc):"tablet"==e.device&&this.tabletSrc&&(t=this.tabletSrc),t?this.setSrc(t):this.setSrc("")},s.prototype.setSrc=function(e){this.loadAllowed&&e!=this.currentSrc&&(""===e?this.$background.css("background-image",""):this.$background.css("background-image",'url("'+e+'")'),this.currentSrc=e)},s.prototype.startFixed=function(){n2const.isEdge||(this.manager.slider.parameters.allowBGImageAttachmentFixed&&!n2const.isIOS?(this.$background.css("background-repeat","repeat"),this.$background.css("position","static"),this.$background.css("background-attachment","fixed")):n2const.isIE||this.manager.slider.startedDeferred.done(e.proxy(function(){fixedBackground.addElement(this.$background,this.element)},this)))},s.prototype.hack=function(){NextendTween.set(this.element,{rotation:1e-4})},s}),N2Require("SmartSliderBackgroundImageAdmin",["SmartSliderBackgroundImage"],[],function(e,t,i){function s(e,i,s){this.allowVisualLoad=!0,this.hash=i.data("hash"),t.SmartSliderBackgroundImage.prototype.constructor.call(this,e,i,s),this.loadAllowed=!0,this.listenImageManager()}return s.prototype=Object.create(t.SmartSliderBackgroundImage.prototype),s.prototype.constructor=s,s.prototype.startColorMode=function(){this.$background=e('<div class="n2-ss-background-image"/>').appendTo(this.element),this.loadDeferred.resolve()},s.prototype.setVisualLoad=function(e){this.allowVisualLoad=e},s.prototype.listenImageManager=function(){""!=this.hash&&e(window).on(this.hash,e.proxy(this.onImageManagerChanged,this))},s.prototype.notListenImageManager=function(){""!=this.hash&&e(window).off(this.hash,null,e.proxy(this.onImageManagerChanged,this))},s.prototype.onImageManagerChanged=function(e,t){this.tabletSrc=t.tablet.image,this.mobileSrc=t.mobile.image,this.updateBackgroundToDevice(this.manager.device)},s.prototype.setDesktopSrc=function(t){if(this.notListenImageManager(),this.desktopSrc=t,this.hash=md5(t),""!=t&&this.allowVisualLoad){var i=new Image;i.addEventListener("load",e.proxy(function(){e.when(nextend.imageManager.getVisual(t)).done(e.proxy(function(e){this.onImageManagerChanged(null,e.value),this.listenImageManager()},this))},this),!1),i.src=nextend.imageHelper.fixed(t)}else this.tabletSrc="",this.mobileSrc="",this.setSrc(nextend.imageHelper.fixed(t))},s.prototype.setSrc=function(e){t.SmartSliderBackgroundImage.prototype.setSrc.call(this,nextend.imageHelper.fixed(e))},s.prototype.startFixed=function(){},s.prototype.setMode=function(e){"default"==e&&(e=nextend.smartSlider.slideBackgroundMode),this.element.attr("data-mode",e),this.mode=e},s.prototype.setFocus=function(e,t){this.$background.css("background-position",e+"% "+t+"%")},s.prototype.setOpacity=function(e){this.opacity=e,this.$background.css("opacity",e)},s.prototype.setBlur=function(e){window.n2FilterProperty&&(e>0?this.$background.css({margin:"-"+2*e+"px",padding:2*e+"px"}).css(window.n2FilterProperty,"blur("+e+"px)"):this.$background.css({margin:"",padding:""}).css(window.n2FilterProperty,"")),this.blur=e},s}),N2Require("SmartSliderBackgroundImages",[],[],function(e,t,i){function s(i){this.device=null,this.load=e.Deferred(),this.slider=i,this.slides=this.slider.realSlides,this.loaded=[],this.lazyLoad=i.parameters.lazyLoad,this.lazyLoadNeighbor=i.parameters.lazyLoadNeighbor,this.deviceDeferred=e.Deferred(),this.backgroundImages=[];for(var s=0;s<this.slides.length;s++){this.loaded[s]=!1;var n=this.slides.eq(s).find(".n2-ss-slide-background");n.length>0?this.slider.isAdmin?this.backgroundImages[s]=new t.SmartSliderBackgroundImageAdmin(s,n,this):this.backgroundImages[s]=new t.SmartSliderBackgroundImage(s,n,this):this.backgroundImages[s]=!1,this.slides.eq(s).data("slideBackground",this.backgroundImages[s])}this.slider.sliderElement.one("SliderDevice",e.proxy(this.onSlideDeviceChangedFirst,this))}return s.prototype.whenWithProgress=function(t){for(var i=0,s=e.Deferred(),n=0;n<t.length;n++)t[n].done(function(){s.notify(++i,t.length)});return e.when.apply(e,t).done(function(){s.resolveWith(null,arguments)}),s.promise()},s.prototype.getBackgroundImages=function(){return this.backgroundImages},s.prototype.onSlideDeviceChangedFirst=function(t,i){this.onSlideDeviceChanged(t,i),this.deviceDeferred.resolve(),this.slider.sliderElement.on("SliderDevice",e.proxy(this.onSlideDeviceChanged,this)),1==this.lazyLoad?(this.preLoad=this.preLoadLazyNeighbor,this.load=e.when(this.preLoad(this.slider.currentSlideIndex))):2==this.lazyLoad?(e(window).on("load",e.proxy(this.preLoadAll,this)),this.load=e.when(this.preLoad(this.slider.currentSlideIndex))):this.load=this.whenWithProgress(this.preLoadAll())},s.prototype.onSlideDeviceChanged=function(e,t){this.device=t;for(var i=0;i<this.backgroundImages.length;i++)this.backgroundImages[i]&&this.backgroundImages[i].updateBackgroundToDevice(t)},s.prototype.changed=function(e){1==this.lazyLoad||2==this.lazyLoad?e==this.slider.currentSlideIndex&&this.preLoad(e):this.preLoad(e)},s.prototype.preLoadCurrent=function(){this.preLoad(this.slider.currentSlideIndex)},s.prototype.preLoadAll=function(){for(var e=[],t=0;t<this.backgroundImages.length;t++)e.push(this._preLoad(t));return e},s.prototype.preLoad=function(e){return this._preLoad(e)},s.prototype.preLoadLazyNeighbor=function(t){var i=this.lazyLoadNeighbor,s=[this._preLoad(t)];if(i){for(var n=0,r=t;i>n;)r--,0>r&&(r=this.backgroundImages.length-1),s.push(this._preLoad(r)),n++;for(n=0,r=t;i>n;)r++,r>=this.backgroundImages.length&&(r=0),s.push(this._preLoad(r)),n++}var o=e.Deferred();if(1!=s[0].state()&&"resolved"!=s[0].state()){var a=setTimeout(e.proxy(function(){this.slider.load.showSpinner("backgroundImage"+t),a=null},this),50);e.when.apply(e,s).done(e.proxy(function(){a?(clearTimeout(a),a=null):this.slider.load.removeSpinner("backgroundImage"+t),setTimeout(function(){o.resolve()},100)},this))}else setTimeout(function(){o.resolve()},100);return o},s.prototype._preLoad=function(t){return this.loaded[t]||(this.slides.eq(t).find("[data-lazysrc]").each(function(){var t=e(this);t.attr("src",t.data("lazysrc"))}),this.loaded[t]=!0),this.backgroundImages[t]?this.backgroundImages[t].preLoad():!0},s.prototype.hack=function(){for(var e=0;e<this.backgroundImages.length;e++)this.backgroundImages[e]&&this.backgroundImages[e].hack()},s}),N2Require("SmartSliderLoad",[],[],function(e,t,i){function s(t,i){this.smartSlider=t,this.spinnerKey="fadePlaceholder",this.id=t.sliderElement.attr("id"),this.parameters=e.extend({fade:1,scroll:0},i),this.spinner=e("#"+this.id+"-spinner"),this.deferred=e.Deferred()}return s.prototype.start=function(){if(this.parameters.scroll){var t=e(window);t.on("scroll."+this.id,e.proxy(this.onScroll,this)),this.onScroll()}else if(this.parameters.fade){this.loadingArea=e("#"+this.id+"-placeholder").eq(0),this.showSpinner("fadePlaceholder");var i=this.spinner.find(".n2-ss-spinner-counter");i.length&&this.smartSlider.backgroundImages.load.progress(e.proxy(function(e,t){i.html(Math.round(e/(t+1)*100)+"%")},this)),this.showSlider()}else this.smartSlider.responsive.ready.done(e.proxy(function(){this._showSlider()},this))},s.prototype.onScroll=function(){var t=e(window);t.scrollTop()+t.height()>this.smartSlider.sliderElement.offset().top+100&&(this.showSlider(),t.off("scroll."+this.id))},s.prototype.loadLayerImages=function(){var t=e.Deferred();return this.smartSlider.sliderElement.find(".n2-ss-layers-container").n2imagesLoaded().always(function(){t.resolve()}),t},s.prototype.showSlider=function(){e.when(this.smartSlider.responsive.ready,this.smartSlider.backgroundImages.load,this.loadLayerImages()).always(e.proxy(function(){this._showSlider()},this))},s.prototype._showSlider=function(t){this.smartSlider.responsive.isReadyToResize=!0,e.when.apply(e,this.smartSlider.widgetDeferreds).done(e.proxy(function(){this.smartSlider.responsive.invalidateResponsiveState=!0,this.smartSlider.responsive.doResize(),this.smartSlider.sliderElement.trigger("BeforeVisible"),this.smartSlider.responsive.alignElement.addClass("n2-ss-slider-align-visible"),this.smartSlider.sliderElement.addClass("n2-ss-loaded").removeClass("n2notransition"),this.removeSpinner("fadePlaceholder"),e("#"+this.id+"-placeholder").remove(),this.loadingArea=this.smartSlider.sliderElement,"function"==typeof t?t(this.deferred):this.deferred.resolve()},this))},s.prototype.loaded=function(e){this.deferred.done(e)},s.prototype.showSpinner=function(e){this.spinnerKey=e,this.spinner.appendTo(this.loadingArea).css("display","")},s.prototype.removeSpinner=function(e){this.spinnerKey==e&&(this.spinner.detach(),this.spinnerKey="")},s}),N2Require("SmartSliderApi",[],[],function(e,t,i){function s(){this.sliders={},this.readys={},this._resetCounters=[]}return s.prototype.makeReady=function(e,t){if(this.sliders[e]=t,"undefined"!=typeof this.readys[e])for(var i=0;i<this.readys[e].length;i++)this.readys[e][i].call(t,t,t.sliderElement)},s.prototype.ready=function(e,t){"undefined"!=typeof this.sliders[e]?t.call(this.sliders[e],this.sliders[e],this.sliders[e].sliderElement):("undefined"==typeof this.readys[e]&&(this.readys[e]=[]),this.readys[e].push(t))},s.prototype.trigger=function(t,i){var s=n2(t),n=i.split(","),r=s.closest(".n2-ss-slide,.n2-ss-static-slide");if(n.length>1){-1==e.inArray(t,this._resetCounters)&&(this._resetCounters.push(t),r.on("layerAnimationSetStart.resetCounter",function(){s.data("eventCounter",0)}));var o=s.data("eventCounter")||0;i=n[o],o++,o>n.length-1&&(o=0),s.data("eventCounter",o)}r.triggerHandler(i)},s.prototype.applyAction=function(e,t){var i=n2(e).closest(".n2-ss-slider").data("ss");i[t].apply(i,Array.prototype.slice.call(arguments,2))},window.n2ss=new s,s}),N2Require("SmartSliderAbstract",[],[],function($,scope,undefined){function SmartSliderAbstract(e,t){this.startedDeferred=$.Deferred(),e instanceof n2&&(e="#"+e.attr("id"));var i=e.substr(1);return window[i]&&window[i]instanceof SmartSliderAbstract?!1:(window[i]=this,this.readyDeferred=$.Deferred(),void $(e).n2waitUntilExists(e,$.proxy(function(){var s=$(e);if(this.nextCarousel=this.next,this.previousCarousel=this.previous,"SCRIPT"==s.prop("tagName")){var n=s.data("dependency"),r=s.data("delay"),o=$.proxy(function(){var n=$(s.html().replace(/<_s_c_r_i_p_t/g,"<script").replace(/<_\/_s_c_r_i_p_t/g,"</script"));s.replaceWith(n),this.postInit(i,$(e),t),$(window).triggerHandler("n2Rocket",[this.sliderElement])},this);n&&$("#n2-ss-"+n).length?n2ss.ready(n,$.proxy(function(e){e.ready(o)},this)):r?setTimeout(o,r):o()}else this.postInit(i,s,t)},this),!0))}return SmartSliderAbstract.prototype.postInit=function(e,t,i){i.isDelayed?setTimeout($.proxy(this._postInit,this,e,t,i),200):this._postInit(e,t,i)},SmartSliderAbstract.prototype._postInit=function(e,t,i){var s=t.is(":visible");s?this.__postInit(e,t,i):setTimeout($.proxy(this._postInit,this,e,t,i),200)},SmartSliderAbstract.prototype.__postInit=function(id,sliderElement,parameters){this.killed=!1,this.isAdmin=!1,this.currentSlideIndex=0,this.responsive=!1,this.layerMode=!0,this._lastChangeTime=0,this.id=parseInt(id.replace("n2-ss-","")),this.sliderElement=sliderElement.data("ss",this),this.parameters=$.extend({admin:!1,playWhenVisible:1,isStaticEdited:!1,callbacks:"",autoplay:{},blockrightclick:!1,maintainSession:0,align:"normal",controls:{drag:!1,touch:"horizontal",keyboard:!1,scroll:!1,tilt:!1},hardwareAcceleration:!0,layerMode:{playOnce:0,playFirstLayer:1,mode:"skippable",inAnimation:"mainInEnd"},foreverLayerAnimation:!1,parallax:{enabled:0,mobile:0,horizontal:"mouse",vertical:"mouse",origin:"enter"},load:{},mainanimation:{},randomize:{randomize:0,randomizeFirst:0},responsive:{},lazyload:{enabled:0},postBackgroundAnimations:!1,initCallbacks:[],dynamicHeight:0,lightbox:[],lightboxDeviceImages:[],titles:[],descriptions:[],"background.parallax.tablet":0,"background.parallax.mobile":0,allowBGImageAttachmentFixed:1},parameters);try{eval(this.parameters.callbacks)}catch(e){console.error(e)}this.startVisibilityCheck(),n2ss.makeReady(this.id,this),this.widgetDeferreds=[],this.sliderElement.on("addWidget",$.proxy(this.addWidget,this)),this.isAdmin=!!this.parameters.admin,this.isAdmin&&(this.changeTo=function(){}),this.load=new scope.SmartSliderLoad(this,this.parameters.load),this.findSlides(),this.randomize(),this.currentSlideIndex=this.__getActiveSlideIndex();var postInit2Deferred=!1;if("undefined"!=typeof window["ss"+this.id])if("object"==typeof window["ss"+this.id])postInit2Deferred=window["ss"+this.id].done($.proxy(function(e){null!==e&&this.changeActiveBeforeLoad(e)},this));else{var forceActiveSlideIndex="undefined"!=typeof window["ss"+this.id]?parseInt(window["ss"+this.id]):null;null!==forceActiveSlideIndex&&this.changeActiveBeforeLoad(forceActiveSlideIndex)}if(!this.isAdmin&&this.parameters.maintainSession&&"undefined"!=typeof sessionStorage){var sessionIndex=parseInt(sessionStorage.getItem("ss-"+this.id));null===forceActiveSlideIndex&&null!==sessionIndex&&this.changeActiveBeforeLoad(sessionIndex),this.sliderElement.on("mainAnimationComplete",$.proxy(function(e,t,i,s){sessionStorage.setItem("ss-"+this.id,s)},this))}postInit2Deferred?postInit2Deferred.done($.proxy(this.__postInit2,this)):this.__postInit2()},SmartSliderAbstract.prototype.__postInit2=function(){this.backgroundImages=new scope.SmartSliderBackgroundImages(this);for(var i=0;i<this.parameters.initCallbacks.length;i++)new Function(this.parameters.initCallbacks[i])(this);if(this.initSlides(),this.widgets=new scope.SmartSliderWidgets(this),this.sliderElement.on({universalenter:$.proxy(function(e){$(e.target).closest(".n2-full-screen-widget").length||this.sliderElement.addClass("n2-hover")},this),universalleave:$.proxy(function(e){e.stopPropagation(),this.sliderElement.removeClass("n2-hover")},this)}),this.controls={},this.layerMode&&this.initMainAnimationWithLayerAnimation(),this.parameters.blockrightclick&&this.sliderElement.bind("contextmenu",function(e){e.preventDefault()}),this.initMainAnimation(),this.initResponsiveMode(),!this.killed){if(this.initControls(),this.startedDeferred.resolve(this),!this.isAdmin){var event="click";"0"!=this.parameters.controls.touch&&this.parameters.controls.touch&&(event="n2click"),this.sliderElement.find("[data-n2click]").each(function(i,el){var el=$(el);el.on(event,function(){eval(el.data("n2click"))})}),this.sliderElement.find("[data-click]").each(function(i,el){var el=$(el).on("click",function(){eval(el.data("click"))}).css("cursor","pointer")}),this.sliderElement.find("[data-n2middleclick]").on("mousedown",function(e){var el=$(this);2!=e.which&&4!=e.which||(e.preventDefault(),eval(el.data("n2middleclick")))}),this.sliderElement.find("[data-mouseenter]").each(function(i,el){var el=$(el).on("mouseenter",function(){eval(el.data("mouseenter"))})}),this.sliderElement.find("[data-mouseleave]").each(function(i,el){var el=$(el).on("mouseleave",function(){eval(el.data("mouseleave"))})}),this.sliderElement.find("[data-play]").each(function(i,el){var el=$(el).on("n2play",function(){eval(el.data("play"))})}),this.sliderElement.find("[data-pause]").each(function(i,el){var el=$(el).on("n2pause",function(){eval(el.data("pause"))})}),this.sliderElement.find("[data-stop]").each(function(i,el){var el=$(el).on("n2stop",function(){eval(el.data("stop"))})});var focusAllowed=!1;$(window).on({keydown:function(){focusAllowed=!0},keyup:function(){focusAllowed=!1}}),this.slides.find("a").on({focus:$.proxy(function(e){if(focusAllowed){var t=this.findSlideIndexByElement(e.currentTarget);-1!=t&&t!=this.currentSlideIndex&&this.changeTo(t,!1,!1)}},this)})}this.preReadyResolve(),this.initCarousel(),this.sliderElement.find('[role="button"], [tabindex]').keypress(function(e){32!==e.charCode&&13!==e.charCode||(e.preventDefault(),$(e.target).click())}).on("mouseleave",function(e){$(e.currentTarget).blur()})}},SmartSliderAbstract.prototype.initSlides=function(){if(this.layerMode){for(var e=0;e<this.slides.length;e++)new scope.FrontendComponentSlide(this,this.slides.eq(e),this.currentSlideIndex==e);var t=this.findStaticSlide();t.length&&new scope.FrontendComponentStaticSlide(this,t)}},SmartSliderAbstract.prototype.getRealIndex=function(e){return e},SmartSliderAbstract.prototype.changeActiveBeforeLoad=function(e){e>0&&e<this.slides.length&&this.currentSlideIndex!=e&&(this.unsetActiveSlide(this.slides.eq(this.currentSlideIndex)),this.setActiveSlide(this.slides.eq(e)),this.currentSlideIndex=e,this.ready($.proxy(function(){this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)])},this)))},SmartSliderAbstract.prototype.kill=function(){this.killed=!0,$("#"+this.sliderElement.attr("id")+"-placeholder").remove(),this.sliderElement.closest(".n2-ss-align").remove()},SmartSliderAbstract.prototype.randomize=function(){this.parameters.randomize.randomizeFirst&&(this.slides.filter(".n2-ss-slide-active").removeClass("n2-ss-slide-active"),this.slides.eq(Math.floor(Math.random()*this.slides.length)).addClass("n2-ss-slide-active")),this.parameters.randomize.randomize&&this.shuffleSlides()},SmartSliderAbstract.prototype.shuffleSlides=function(){this.slides.sort(function(){return Math.round(Math.random())-.5}),this.slides.appendTo(this.slides.parent()),this.shuffled=[];for(var e=0;e<this.slides.length;e++)this.shuffled[e]=this.slides.eq(e).data("originalIndex");if(this.parameters.postBackgroundAnimations&&this.parameters.postBackgroundAnimations.slides){for(var t=[],e=0;e<this.shuffled.length;e++)t.push(this.parameters.postBackgroundAnimations.slides[this.shuffled[e]]);this.parameters.postBackgroundAnimations.slides=t}if(this.parameters.bgAnimations&&this.parameters.bgAnimations.slides){for(var i=[],e=0;e<this.shuffled.length;e++)i.push(this.parameters.bgAnimations.slides[this.shuffled[e]]);this.parameters.bgAnimations.slides=i}},SmartSliderAbstract.prototype.findSlides=function(){this.realSlides=this.slides=this.sliderElement.find(".n2-ss-slide");for(var e=0;e<this.realSlides.length;e++)this.realSlides.eq(e).data("originalIndex",e)},SmartSliderAbstract.prototype.findStaticSlide=function(){return this.sliderElement.find(".n2-ss-static-slide")},SmartSliderAbstract.prototype.addWidget=function(e,t){this.widgetDeferreds.push(t)},SmartSliderAbstract.prototype.started=function(e){this.startedDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.preReadyResolve=function(){setTimeout($.proxy(this._preReadyResolve,this),1)},SmartSliderAbstract.prototype._preReadyResolve=function(){this.load.start(),this.load.loaded($.proxy(this.readyResolve,this))},SmartSliderAbstract.prototype.readyResolve=function(){$(window).scroll(),this.readyDeferred.resolve()},SmartSliderAbstract.prototype.ready=function(e){this.readyDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.startVisibilityCheck=function(){this.visibleDeferred=$.Deferred(),this.parameters.playWhenVisible?this.ready($.proxy(function(){$(window).on("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.checkIfVisible()},this)):this.ready($.proxy(function(){this.visibleDeferred.resolve()},this))},SmartSliderAbstract.prototype.checkIfVisible=function(){var e=$(window).scrollTop(),t=$(window).height(),i=this.sliderElement.offset().top+Math.min(this.sliderElement.height(),t)/2;i>=e&&e>=i-t&&($(window).off("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.visibleDeferred.resolve())},SmartSliderAbstract.prototype.visible=function(e){this.visibleDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.isPlaying=function(){return"ended"!=this.mainAnimation.getState()},SmartSliderAbstract.prototype.focus=function(e){var t=$.Deferred();if("undefined"==typeof e&&(e=0),this.responsive.parameters.focusUser&&!e||this.responsive.parameters.focusAutoplay&&e){var i=this.sliderElement.offset().top-(this.responsive.verticalOffsetSelectors.height()||0);$(window).scrollTop()!=i?$("html, body").animate({scrollTop:i},400,$.proxy(function(){t.resolve()},this)):t.resolve()}else t.resolve();return t},SmartSliderAbstract.prototype.initCarousel=function(){if(!parseInt(this.parameters.carousel)){this.next=this.nextNotCarousel,this.previous=this.previousNotCarousel;var e=this.slides.length,t=1,i=this.sliderElement.find(".nextend-arrow-previous"),s=function(e){e!=t&&(NextendTween.to(i,.4,{opacity:e}).play(),t=e)},n=1,r=this.sliderElement.find(".nextend-arrow-next"),o=function(e){e!=n&&(NextendTween.to(r,.4,{opacity:e}).play(),n=e)},a=function(t){s(0==t?0:1),o(t==e-1?0:1)};a(this.__getActiveSlideIndex()),this.sliderElement.on("sliderSwitchTo",function(e,t){a(t)})}},SmartSliderAbstract.prototype.next=function(e,t){var i=this.currentSlideIndex+1;return i>=this.slides.length&&(i=0),this.changeTo(i,!1,e,t)},SmartSliderAbstract.prototype.previous=function(e,t){var i=this.currentSlideIndex-1;return 0>i&&(i=this.slides.length-1),this.changeTo(i,!0,e,t)},SmartSliderAbstract.prototype.nextNotCarousel=function(e,t){var i=this.currentSlideIndex+1;return i<this.slides.length?this.changeTo(i,!1,e,t):!1},SmartSliderAbstract.prototype.previousNotCarousel=function(e,t){var i=this.currentSlideIndex-1;return i>=0?this.changeTo(i,!0,e,t):!1},SmartSliderAbstract.prototype.directionalChangeToReal=function(e){this.directionalChangeTo(e)},SmartSliderAbstract.prototype.directionalChangeTo=function(e){e>this.currentSlideIndex?this.changeTo(e,!1):this.changeTo(e,!0)},SmartSliderAbstract.prototype.changeTo=function(e,t,i,s){if(e=parseInt(e),e!=this.currentSlideIndex){this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)]);var n=$.now();return $.when(this.backgroundImages.preLoad(e),this.focus(i)).done($.proxy(function(){if(this._lastChangeTime<=n){this._lastChangeTime=n;var r=this.mainAnimation.getState();if("ended"==r){"undefined"==typeof i&&(i=!1);var o=this.mainAnimation;"undefined"!=typeof s&&(o=s),this._changeTo(e,t,i,s),o.changeTo(this.currentSlideIndex,this.slides.eq(this.currentSlideIndex),e,this.slides.eq(e),t,i),this.currentSlideIndex=e}else"playing"==r&&(this.sliderElement.off(".fastChange").one("mainAnimationComplete.fastChange",$.proxy(function(){this.changeTo.call(this,e,t,i,s)},this)),this.mainAnimation.timeScale(2*this.mainAnimation.timeScale()))}},this)),!0}return!1},SmartSliderAbstract.prototype._changeTo=function(e,t,i,s){},SmartSliderAbstract.prototype.revertTo=function(e,t){this.unsetActiveSlide(this.slides.eq(t)),this.setActiveSlide(this.slides.eq(e)),this.currentSlideIndex=e,this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)])},SmartSliderAbstract.prototype.__getActiveSlideIndex=function(){var e=this.slides.index(this.slides.filter(".n2-ss-slide-active"));return-1===e&&(e=0),e},SmartSliderAbstract.prototype.setActiveSlide=function(e){e.addClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.unsetActiveSlide=function(e){e.removeClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.initMainAnimationWithLayerAnimation=function(){"forced"==this.parameters.layerMode.mode&&this.sliderElement.on("preChangeToPlay",$.proxy(function(e,t,i,s,n){i.handled=!0,s.on("layerAnimationCompleteOut.layers",function(){s.off("layerAnimationCompleteOut.layers"),t.resolve()}),this.callOnSlide(s,"playOut")},this)),this.sliderElement.on("mainAnimationStart",$.proxy(this.onMainAnimationStartSyncLayers,this,this.parameters.layerMode)).on("reverseModeEnabled",$.proxy(this.onMainAnimationStartSyncLayersReverse,this,this.parameters.layerMode))},SmartSliderAbstract.prototype.onMainAnimationStartSyncLayers=function(e,t,i,s,n){var r=this.slides.eq(n),o=this.slides.eq(s);"mainInStart"==e.inAnimation?r.one("mainAnimationStartIn.layers",$.proxy(function(){r.off("mainAnimationStartInCancel.layers"),this.callOnSlide(r,"playIn")},this)):"mainInEnd"==e.inAnimation&&r.one("mainAnimationCompleteIn.layers",$.proxy(function(){r.off("mainAnimationStartInCancel.layers"),this.callOnSlide(r,"playIn")},this)),"skippable"==e.mode&&o.on("mainAnimationCompleteOut.layers",$.proxy(function(){o.off("mainAnimationCompleteOut.layers"),e.playOnce?this.parameters.foreverLayerAnimation||this.callOnSlide(o,"pause"):this.callOnSlide(o,"reset")},this)),r.one("mainAnimationStartInCancel.layers",function(){r.off("mainAnimationStartIn.layers"),r.off("mainAnimationCompleteIn.layers")})},SmartSliderAbstract.prototype.onMainAnimationStartSyncLayersReverse=function(e,t,i){var s=this.slides.eq(i);"mainInStart"==e.inAnimation?s.one("mainAnimationStartIn.layers",$.proxy(function(){this.callOnSlide(s,"playIn")},this)):"mainInEnd"==e.inAnimation&&s.one("mainAnimationCompleteIn.layers",$.proxy(function(){this.sliderElement.off("mainAnimationComplete.layers"),this.callOnSlide(s,"playIn")},this)),this.sliderElement.one("mainAnimationComplete.layers",function(){s.off("mainAnimationStartIn.layers"),s.off("mainAnimationCompleteIn.layers")})},SmartSliderAbstract.prototype.callOnSlide=function(e,t){},SmartSliderAbstract.prototype.findSlideIndexByElement=function(e){e=$(e);for(var t=0;t<this.slides.length;t++)if(1===this.slides.eq(t).has(e).length)return t;return-1},SmartSliderAbstract.prototype.initMainAnimation=function(){this.mainAnimation=!1},SmartSliderAbstract.prototype.initResponsiveMode=function(){new this.responsiveClass(this,this.parameters.responsive),this.dimensions=this.responsive.responsiveDimensions},SmartSliderAbstract.prototype.initControls=function(){this.parameters.admin||("0"!=this.parameters.controls.touch&&new scope.SmartSliderControlTouch(this,this.parameters.controls.touch,{fallbackToMouseEvents:this.parameters.controls.drag}),this.parameters.controls.keyboard&&("undefined"!=typeof this.controls.touch?new scope.SmartSliderControlKeyboard(this,this.controls.touch._direction.axis):new scope.SmartSliderControlKeyboard(this,"horizontal")),this.parameters.controls.scroll&&new scope.SmartSliderControlScroll(this),this.parameters.controls.tilt&&new scope.SmartSliderControlTilt(this),this.controlAutoplay=new scope.SmartSliderControlAutoplay(this,this.parameters.autoplay),this.controlFullscreen=new scope.SmartSliderControlFullscreen(this))},SmartSliderAbstract.prototype.getSlideIndex=function(e){return e},SmartSliderAbstract.prototype.slideToID=function(e,t){var i=this.realSlides.index(this.realSlides.filter('[data-id="'+e+'"]'));if(-1!=i)return this.slide(this.getSlideIndex(i),t);var s=$('[data-id="'+e+'"]').closest(".n2-ss-slider");if(s.length&&this.id==s.data("ss").id)return!0;if(s.length){var n=0;return"undefined"!=typeof n2ScrollOffsetSelector&&(n=n2(n2ScrollOffsetSelector).outerHeight()),n2("html, body").animate({scrollTop:s.offset().top-n},400),s.data("ss").slideToID(e,t)}},SmartSliderAbstract.prototype.slide=function(e,t){return e>=0&&e<this.slides.length?"undefined"==typeof t?parseInt(this.parameters.carousel)&&this.currentSlideIndex==this.slides.length-1&&0==e?this.next():this.currentSlideIndex>e?this.changeTo(e,!0):this.changeTo(e):this.changeTo(e,!t):!1},SmartSliderAbstract.prototype.adminGetCurrentSlideElement=function(){return this.parameters.isStaticEdited?this.findStaticSlide():this.slides.eq(this.currentSlideIndex)},SmartSliderAbstract.prototype.startAutoplay=function(e){return"undefined"!=typeof this.controlAutoplay?(this.controlAutoplay.pauseAutoplayExtraPlayingEnded(e,"autoplayButton"),!0):!1}(function(){var e={},t=function(t){e[t]&&(window.clearInterval(e[t]),e[t]=null)},i="n2waitUntilExists.found";$.fn.n2waitUntilExists=function(s,n,r,o){var a=$(s),l=a.not(function(){return $(this).data(i)});return"remove"===n?t(s):(l.each(n).data(i,!0),r&&a.length?t(s):o||(e[s]=window.setInterval(function(){a.n2waitUntilExists(s,n,r,!0)},500))),a}}()),SmartSliderAbstract}),N2Require("SmartSliderWidgets",[],[],function($,scope,undefined){function SmartSliderWidgets(e){this.slider=e,this.sliderElement=e.sliderElement.on("BeforeVisible",$.proxy(this.onReady,this)),this.initExcludeSlides()}return SmartSliderWidgets.prototype.onReady=function(){this.dimensions=this.slider.dimensions,this.widgets={previous:this.sliderElement.find(".nextend-arrow-previous"),next:this.sliderElement.find(".nextend-arrow-next"),bullet:this.sliderElement.find(".nextend-bullet-bar"),autoplay:this.sliderElement.find(".nextend-autoplay"),indicator:this.sliderElement.find(".nextend-indicator"),bar:this.sliderElement.find(".nextend-bar"),thumbnail:this.sliderElement.find(".nextend-thumbnail"),shadow:this.sliderElement.find(".nextend-shadow"),fullscreen:this.sliderElement.find(".nextend-fullscreen"),html:this.sliderElement.find(".nextend-widget-html")},this.variableElementsDimension={width:this.sliderElement.find("[data-sswidth]"),height:this.sliderElement.find("[data-ssheight]")},this.variableElements={top:this.sliderElement.find("[data-sstop]"),right:this.sliderElement.find("[data-ssright]"),bottom:this.sliderElement.find("[data-ssbottom]"),left:this.sliderElement.find("[data-ssleft]")},this.slider.sliderElement.on("SliderAnimatedResize",$.proxy(this.onAnimatedResize,this)),this.slider.sliderElement.on("SliderResize",$.proxy(this.onResize,this)),this.slider.sliderElement.one("slideCountChanged",$.proxy(function(){this.onResize(this.slider.responsive.lastRatios)},this)),this.onResize(this.slider.responsive.lastRatios),this.initHover()},SmartSliderWidgets.prototype.initHover=function(){var e=null,t=this.sliderElement.find(".n2-ss-widget-hover");t.length>0&&this.sliderElement.on("universalenter",function(i){var s=$(this);e&&clearTimeout(e),t.css("visibility","visible"),setTimeout(function(){s.addClass("n2-ss-widget-hover-show")},50)}).on("universalleave",function(){var i=this;e&&clearTimeout(e),e=setTimeout(function(){$(i).removeClass("n2-ss-widget-hover-show"),e=setTimeout(function(){t.css("visibility","hidden")},400)},500)})},SmartSliderWidgets.prototype.initExcludeSlides=function(){var e=this.sliderElement.find(".n2-ss-widget[data-exclude-slides]"),t=function(e,t,i){-1!=$.inArray(i+1+"",t)?e.addClass("n2-ss-widget-hidden"):e.removeClass("n2-ss-widget-hidden");
|
2 |
-
};e.each($.proxy(function(e,i){for(var s=$(i),n=s.attr("data-exclude-slides").split(","),e=n.length-1;e>=0;e--){var r=n[e].split("-");if(2==r.length&&parseInt(r[0])<=parseInt(r[1])){n[e]=r[0],r[0]=parseInt(r[0]),r[1]=parseInt(r[1]);for(var o=r[0]+1;o<=r[1];o++)n.push(o+"")}}t(s,n,this.slider.currentSlideIndex),this.slider.sliderElement.on("sliderSwitchTo",function(e,i){t(s,n,i)})},this))},SmartSliderWidgets.prototype.onAnimatedResize=function(e,ratios,timeline,duration){for(var key in this.widgets){var el=this.widgets[key],visible=el.is(":visible");this.dimensions[key+"width"]=visible?el.outerWidth(!1):0,this.dimensions[key+"height"]=visible?el.outerHeight(!1):0}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)variableText+="var "+key+key2+" = "+value[key2]+";";else variableText+="var "+key+" = "+value+";"}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible")){var to={};try{to[k]=eval(el.data("ss"+k))+"px";for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}timeline.to(el,duration,to,0)}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var to={};to[k]=eval(el.data("ss"+k))+"px",timeline.to(el,duration,to,0)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}},SmartSliderWidgets.prototype.onResize=function(e,ratios,responsive,timeline){if(!timeline){for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,0)}for(var key in this.widgets){var el=this.widgets[key],visible=el.length&&el.is(":visible");el.length&&el.is(":visible")?(this.dimensions[key+"width"]=el.outerWidth(!1),this.dimensions[key+"height"]=el.outerHeight(!1)):(this.dimensions[key+"width"]=0,this.dimensions[key+"height"]=0)}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,last)}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)variableText+="var "+key+key2+" = "+value[key2]+";";else variableText+="var "+key+" = "+value+";"}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible"))try{el.css(k,eval(el.data("ss"+k))+"px");for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var value=eval(el.data("ss"+k));el.css(k,value+"px"),el.data("n2Last"+k,value)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}this.slider.responsive.refreshStaticSizes()}},SmartSliderWidgets}),N2Require("SmartSliderBackgroundAnimationAbstract",[],[],function(e,t,i){function s(e,t,i,s,n,r){this.durationMultiplier=n,this.original={currentImage:t,nextImage:i},this.animationProperties=s,this.reversed=r,this.timeline=e.timeline,this.containerElement=e.bgAnimationElement,this.shiftedBackgroundAnimation=e.parameters.shiftedBackgroundAnimation,this.clonedImages={}}return s.prototype.postSetup=function(){},s.prototype.ended=function(){},s.prototype.revertEnded=function(){},s.prototype.placeNextImage=function(){this.clonedImages.nextImage=this.original.nextImage.clone().css({position:"absolute",top:0,left:0}),this.containerElement.append(this.clonedImages.nextImage)},s.prototype.placeCurrentImage=function(){this.clonedImages.currentImage=this.original.currentImage.clone().css({position:"absolute",top:0,left:0}),this.containerElement.append(this.clonedImages.currentImage)},s.prototype.hideOriginals=function(){this.original.currentImage.css("opacity",0),this.original.nextImage.css("opacity",0)},s.prototype.resetAll=function(){this.original.currentImage.css("opacity",1),this.original.nextImage.css("opacity",1),this.containerElement.html("")},s.prototype.getExtraDelay=function(){return 0},s}),N2Require("SmartSliderBackgroundAnimationCubic",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,fullCube:!0,tiles:{delay:.2,sequence:"Parallel"},depth:50,main:{side:"Left",duration:.5,ease:"easeInOutCubic",direction:"horizontal",real3D:!0},pre:[],post:[]},this.animationProperties);i.fullCube=!0,this.reversed&&("undefined"!=typeof i.invert&&e.extend(!0,i.main,i.invert),"undefined"!=typeof i.invertTiles&&e.extend(i.tiles,i.invertTiles)),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,n,r,o){var a=n.depth;switch(a){case"width":a=i;break;case"height":a=s}switch(n.main.side){case"Top":case"Bottom":a=s;break;case"Left":case"Right":a=i}n.main.real3D&&NextendTween.set(t.get(0),{transformStyle:"preserve-3d"});var l=e('<div class="cuboid"></div>').css({position:"absolute",left:"0",top:"0",width:"100%",height:"100%"}).appendTo(t);NextendTween.set(l.get(0),{transformStyle:"preserve-3d",z:-a/2});var d=0;"horizontal"==n.main.direction&&(d=180);var h=this.getSide(l,i,s,0,0,-a/2,180,0,d),p={Back:h,BackInvert:h};return(n.fullCube||"vertical"==n.main.direction)&&(p.Bottom=this.getSide(l,i,a,0,s-a/2,0,-90,0,0),p.Top=this.getSide(l,i,a,0,-a/2,0,90,0,0)),p.Front=this.getSide(l,i,s,0,0,a/2,0,0,0),(n.fullCube||"horizontal"==n.main.direction)&&(p.Left=this.getSide(l,a,s,-a/2,0,0,0,-90,0),p.Right=this.getSide(l,a,s,i-a/2,0,0,0,90,0)),p.Front.append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})),p[n.main.side].append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})),l},s.prototype.getSide=function(t,i,s,n,r,o,a,l,d){var h=e('<div class="n2-3d-side"></div>').css({width:i,height:s}).appendTo(t);return NextendTween.set(h.get(0),{x:n,y:r,z:o,rotationX:a,rotationY:l,rotationZ:d,backfaceVisibility:"hidden"}),h},s.prototype.addAnimation=function(e,t){var i=e.duration;delete e.duration,this.timeline.to(t,i*this.durationMultiplier,e)},s.prototype.transform=function(e,t,i){for(var s=0;s<e.pre.length;s++){var n=e.pre[s],r=n.duration*this.durationMultiplier;this.timeline.to(t,r,n,i),i+=r}this["transform"+e.main.side](e.main,t,i),i+=e.main.duration;for(var s=0;s<e.post.length;s++){var n=e.post[s],r=n.duration*this.durationMultiplier;this.timeline.to(t,r,n,i),i+=r}},s.prototype.transformLeft=function(e,t,i){this._transform(e,t,i,0,90,0)},s.prototype.transformRight=function(e,t,i){this._transform(e,t,i,0,-90,0)},s.prototype.transformTop=function(e,t,i){this._transform(e,t,i,-90,0,0)},s.prototype.transformBottom=function(e,t,i){this._transform(e,t,i,90,0,0)},s.prototype.transformBack=function(e,t,i){"horizontal"==e.direction?this._transform(e,t,i,0,180,0):this._transform(e,t,i,180,0,0)},s.prototype.transformBackInvert=function(e,t,i){"horizontal"==e.direction?this._transform(e,t,i,0,-180,0):this._transform(e,t,i,-180,0,0)},s.prototype._transform=function(e,t,i,s,n,r){this.timeline.to(t,e.duration*this.durationMultiplier,{rotationX:s,rotationY:n,rotationZ:r,ease:e.ease},i)},s}),N2Require("SmartSliderBackgroundAnimationExplode",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,n,r,o){var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:t}},s.prototype.transform=function(t,i,s){var n=e.extend(!0,{},t.main.current);n.rotationX=90*(3*Math.random()-1),n.rotationY=90*(3*Math.random()-1),n.rotationZ=90*(3*Math.random()-1),this.timeline.to(i.tile,t.main.duration*this.durationMultiplier,n,s)},s}),N2Require("SmartSliderBackgroundAnimationExplodeReversed",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeCurrentImage(),this.clonedImages.currentImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,n,r,o){var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{next:a,tile:t}},s.prototype.transform=function(t,i,s){var n=e.extend(!0,{},t.main.current);n.rotationX=90*(3*Math.random()-1),n.rotationY=90*(3*Math.random()-1),n.rotationZ=30*(3*Math.random()-1),this.timeline.from(i.tile,t.main.duration*this.durationMultiplier,n,s)},s}),N2Require("SmartSliderBackgroundAnimationFlat",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,tiles:{cropOuter:!1,crop:!0,delay:0,sequence:"Parallel"},main:{type:"next",duration:.5,real3D:!0,zIndex:1,current:{ease:"easeInOutCubic"},next:{ease:"easeInOutCubic"}}},this.animationProperties);this.reversed&&("undefined"!=typeof i.invert&&e.extend(!0,i.main,i.invert),"undefined"!=typeof i.invertTiles&&e.extend(i.tiles,i.invertTiles)),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i),i.tiles.cropOuter&&this.container.css("overflow","hidden")},s.prototype.renderTile=function(t,i,s,n,r,o){n.tiles.crop&&t.css("overflow","hidden");var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(t),l=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:1}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(t);return n.main.real3D&&(NextendTween.set(t.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(a.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(l.get(0),{transformStyle:"preserve-3d"})),{current:a,next:l}},s.prototype.transform=function(e,t,i){var s=e.main;"current"!=s.type&&"both"!=s.type||this.timeline.to(t.current,s.duration*this.durationMultiplier,s.current,i),"next"!=s.type&&"both"!=s.type||this.timeline.from(t.next,s.duration*this.durationMultiplier,s.next,i)},s}),N2Require("SmartSliderBackgroundAnimationSlixes",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:2,rows:2,main:{duration:2,zIndex:2}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,n,r,o){this.container.css("overflow","hidden");var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:t}},s.prototype.animate=function(t,i,s){this.timeline.to(s[0][0].tile,t.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},0),this.timeline.to(s[0][1].tile,t.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},.3),this.timeline.to(s[1][0].tile,t.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.15),this.timeline.to(s[1][1].tile,t.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.45),e("<div />").css({position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"}).prependTo(this.clonedImages.nextImage.parent()).append(this.clonedImages.nextImage),this.timeline.fromTo(this.clonedImages.nextImage,t.main.duration*this.durationMultiplier,{scale:1.3},{scale:1},.45)},s}),N2Require("SmartSliderBackgroundAnimationTiled",["SmartSliderBackgroundAnimationFluxAbstract"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this,arguments),this.setup()}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationFluxAbstract.prototype),s.prototype.constructor=s,s.prototype.setup=function(t){var i=e("<div></div>").css({position:"absolute",left:0,top:0,width:this.w,height:this.h});this.container=i,NextendTween.set(i.get(0),{force3D:!0,perspective:1e3});for(var s=[],n=[],r=t.columns,o=t.rows,a=Math.floor(this.w/r),l=Math.floor(this.h/o),d=this.w-r*a,h=Math.ceil(d/r),p=this.h-o*l,c=Math.ceil(p/o),u=0,m=0;r>m;m++){s[m]=[];var f=a,y=0;if(d>0){var g=d>=h?h:d;f+=g,d-=g}for(var v=p,S=0;o>S;S++){var x=l;if(v>0){var g=v>=c?c:v;x+=g,v-=g}var b=e('<div class="tile tile-'+m+"-"+S+'"></div>').css({position:"absolute",top:y+"px",left:u+"px",width:f+"px",height:x+"px",zIndex:-Math.abs(m-parseInt(r/2))+r-Math.abs(S-parseInt(o/2))}).appendTo(i),w=this.renderTile(b,f,x,t,u,y);n.push(w),s[m][S]=w,y+=x}u+=f}i.appendTo(this.containerElement),this.preSetup(),this.animate(t,n,s)},s.prototype.animate=function(t,i,s){this["sequence"+t.tiles.sequence](e.proxy(this.transform,this,t),i,s,t.tiles.delay*this.durationMultiplier)},s.prototype.sequenceParallel=function(e,t){e(t,null)},s.prototype.sequenceRandom=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=0;r<t.length;r++)e(t[r],n+Math.random()*s)},s.prototype.sequenceForwardCol=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=0;r<t.length;r++)e(t[r],n+s*r)},s.prototype.sequenceBackwardCol=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=t.length-1,o=0;o<t.length;o++)e(t[o],n+s*(r-o))},s.prototype.sequenceForwardRow=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=0,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],n+s*r),r++},s.prototype.sequenceBackwardRow=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=t.length-1,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],n+s*r),r--},s.prototype.sequenceForwardDiagonal=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=0;r<i[0].length;r++)for(var o=0;o<i.length;o++)e(i[o][r],n+s*(o+r))},s.prototype.sequenceBackwardDiagonal=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=i[0].length+i.length-2,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],n+s*(r-a-o))},s}),N2Require("SmartSliderBackgroundAnimationTurn",["SmartSliderBackgroundAnimationFluxAbstract"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this,arguments);var i=e.extend(!0,{perspective:1.5*this.w,duration:.8,direction:"left"},this.animationProperties);this.reversed&&("left"==i.direction?i.direction="right":i.direction="left");var s=parseInt(this.w/2);this.clonedCurrent().css({position:"absolute",top:0,left:"left"==i.direction?-1*(this.w/2):0}),this.clonedNext().css({position:"absolute",top:0,left:"left"==i.direction?0:-1*(this.w/2)});var n=e('<div class="tab"></div>').css({width:s,height:this.h,position:"absolute",top:"0px",left:"left"==i.direction?s:"0","z-index":101});NextendTween.set(n,{transformStyle:"preserve-3d",transformOrigin:"left"==i.direction?"0px 0px":s+"px 0px"});var r=e('<div class="n2-ff-3d"></div>').append(this.clonedCurrent()).css({width:s,height:this.h,position:"absolute",top:0,left:0,"-webkit-transform":"translateZ(0.1px)",overflow:"hidden"}).appendTo(n);NextendTween.set(r,{backfaceVisibility:"hidden",transformStyle:"preserve-3d"});var o=e('<div class="n2-ff-3d"></div>').append(this.clonedNext()).appendTo(n).css({width:s,height:this.h,position:"absolute",top:0,left:0,overflow:"hidden"});NextendTween.set(o,{backfaceVisibility:"hidden",transformStyle:"preserve-3d",rotationY:180,rotationZ:0});var a=e("<div></div>").append(this.clonedCurrent().clone().css("left","left"==i.direction?0:-s)).css({position:"absolute",top:0,left:"left"==i.direction?"0":s,width:s,height:this.h,zIndex:100,overflow:"hidden"}),l=e('<div class="overlay"></div>').css({position:"absolute",top:0,left:"left"==i.direction?s:0,width:s,height:this.h,background:"#000",opacity:1,overflow:"hidden"}),d=e("<div></div>").css({width:this.w,height:this.h,position:"absolute",top:0,left:0}).append(n).append(a).append(l);NextendTween.set(d,{perspective:i.perspective,perspectiveOrigin:"50% 50%"}),this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),this.containerElement.append(d),this.preSetup(),this.timeline.to(n.get(0),i.duration*this.durationMultiplier,{rotationY:"left"==i.direction?-180:180},0),this.timeline.to(l.get(0),i.duration*this.durationMultiplier,{opacity:0},0)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationFluxAbstract.prototype),s.prototype.constructor=s,s.prototype.getExtraDelay=function(){return 0},s}),N2Require("SmartSliderBackgroundAnimationFluxAbstract",["SmartSliderBackgroundAnimationAbstract"],[],function(e,t,i){function s(){this.shiftedPreSetup=!1,this._clonedCurrent=!1,this._clonedNext=!1,t.SmartSliderBackgroundAnimationAbstract.prototype.constructor.apply(this,arguments),this.w=this.original.currentImage.width(),this.h=this.original.currentImage.height()}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationAbstract.prototype),s.prototype.constructor=s,s.prototype.clonedCurrent=function(){return this._clonedCurrent||(this._clonedCurrent=this.original.currentImage.clone().css({width:this.w,height:this.h})),this._clonedCurrent},s.prototype.clonedNext=function(){return this._clonedNext||(this._clonedNext=this.original.nextImage.clone().css({width:this.w,height:this.h})),this._clonedNext},s.prototype.preSetup=function(){0!=this.shiftedBackgroundAnimation?this.shiftedPreSetup=!0:this._preSetup()},s.prototype._preSetup=function(e){this.timeline.to(this.original.currentImage.get(0),this.getExtraDelay(),{opacity:0},0),this.original.nextImage.css("opacity",0)},s.prototype.postSetup=function(){this.timeline.to(this.original.nextImage.get(0),this.getExtraDelay(),{opacity:1})},s.prototype.getExtraDelay=function(){return.2},s.prototype.ended=function(){this.original.currentImage.css("opacity",1),this.containerElement.html("")},s.prototype.revertEnded=function(){this.original.nextImage.css("opacity",1),this.containerElement.html("")},s}),N2Require("SmartSliderMainAnimationAbstract",[],[],function(e,t,i){function s(t,i){this.state="ended",this.isTouch=!1,this.isReverseAllowed=!0,this.isReverseEnabled=!1,this.reverseSlideIndex=-1,this.slider=t,this.parameters=e.extend({duration:1500,ease:"easeInOutQuint"},i),this.parameters.duration/=1e3,this.sliderElement=t.sliderElement,this.timeline=new NextendTimeline({paused:!0}),this.sliderElement.on("mainAnimationStart",e.proxy(function(e,t,i,s){this.currentSlideIndex=i,this.nextSlideIndex=s},this))}return s.prototype.enableReverseMode=function(){this.isReverseEnabled=!0,this.reverseTimeline=new NextendTimeline({paused:!0}),this.sliderElement.triggerHandler("reverseModeEnabled",this.reverseSlideIndex)},s.prototype.disableReverseMode=function(){this.isReverseEnabled=!1},s.prototype.setTouch=function(e){this.isTouch=e},s.prototype.setTouchProgress=function(e){this.isReverseEnabled?this._setTouchProgressWithReverse(e):this._setTouchProgress(e)},s.prototype._setTouchProgress=function(e){"ended"!=this.state&&(0>=e?this.timeline.progress(Math.max(e,1e-6),!1):e>=0&&1>=e&&this.timeline.progress(e))},s.prototype._setTouchProgressWithReverse=function(e){0==e?(this.reverseTimeline.progress(0),this.timeline.progress(e,!1)):e>=0&&1>=e?(this.reverseTimeline.progress(0),this.timeline.progress(e)):0>e&&e>=-1&&(this.timeline.progress(0),this.reverseTimeline.progress(Math.abs(e)))},s.prototype.setTouchEnd=function(e,t,i){"ended"!=this.state&&(this.isReverseEnabled?this._setTouchEndWithReverse(e,t,i):this._setTouchEnd(e,t,i))},s.prototype._setTouchEnd=function(e,t,i){e&&t>0?(this.fixTouchDuration(this.timeline,t,i),this.timeline.play()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-t,i),this.timeline.reverse(),this.willRevertTo(this.currentSlideIndex,this.nextSlideIndex))},s.prototype._setTouchEndWithReverse=function(e,t,i){e?0>t&&this.reverseTimeline.totalDuration()>0?(this.fixTouchDuration(this.reverseTimeline,t,i),this.reverseTimeline.play(),this.willRevertTo(this.reverseSlideIndex,this.nextSlideIndex)):(this.willCleanSlideIndex(this.reverseSlideIndex),this.fixTouchDuration(this.timeline,t,i),this.timeline.play()):(0>t?(this.revertCB(this.reverseTimeline),this.fixTouchDuration(this.reverseTimeline,1-t,i),this.reverseTimeline.reverse()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-t,i),this.timeline.reverse()),this.willCleanSlideIndex(this.reverseSlideIndex),this.willRevertTo(this.currentSlideIndex,this.nextSlideIndex))},s.prototype.fixTouchDuration=function(e,t,i){var s=e.totalDuration(),n=Math.max(s/3,Math.min(s,i/Math.abs(t)/1e3));n!=s&&e.totalDuration(n)},s.prototype.getState=function(){return this.state},s.prototype.timeScale=function(){return arguments.length>0?(this.timeline.timeScale(arguments[0]),this):this.timeline.timeScale()},s.prototype.preChangeToPlay=function(e,t,i){var s={handled:!1};this.sliderElement.trigger("preChangeToPlay",[e,s,t,i]),s.handled||e.resolve()},s.prototype.changeTo=function(t,i,s,n,r,o){if(this._initAnimation(t,i,s,n,r),this.state="initAnimation",this.timeline.paused(!0),this.timeline.eventCallback("onStart",this.onChangeToStart,[t,s,o],this),this.timeline.eventCallback("onComplete",this.onChangeToComplete,[t,s,o],this),this.timeline.eventCallback("onReverseComplete",null),this.revertCB=e.proxy(function(e){e.eventCallback("onReverseComplete",this.onReverseChangeToComplete,[s,t,o],this)},this),this.slider.parameters.dynamicHeight){var a=new NextendTimeline;this.slider.responsive.doResize(!1,a,s,.6),this.timeline.add(a)}if(this.isTouch)this.slider.callOnSlide(i,"onOutAnimationsPlayed");else{var l=e.Deferred();l.done(e.proxy(function(){this.play()},this.timeline)),this.preChangeToPlay(l,i,n)}},s.prototype.willRevertTo=function(t,i){this.sliderElement.triggerHandler("mainAnimationWillRevertTo",[t,i]),this.sliderElement.one("mainAnimationComplete",e.proxy(this.revertTo,this,t,i))},s.prototype.revertTo=function(e,t){this.slider.revertTo(e,t),this.slider.slides.eq(t).triggerHandler("mainAnimationStartInCancel")},s.prototype.willCleanSlideIndex=function(t){this.sliderElement.one("mainAnimationComplete",e.proxy(this.cleanSlideIndex,this,t))},s.prototype.cleanSlideIndex=function(){},s.prototype._initAnimation=function(e,t,i,s,n){},s.prototype.onChangeToStart=function(e,t,i){this.state="playing";var s=[this,e,t,i];this.sliderElement.trigger("mainAnimationStart",s),this.slider.slides.eq(e).trigger("mainAnimationStartOut",s),this.slider.slides.eq(t).trigger("mainAnimationStartIn",s)},s.prototype.onChangeToComplete=function(e,t,i){var s=[this,e,t,i];this.clearTimelines(),this.disableReverseMode(),this.slider.slides.eq(e).trigger("mainAnimationCompleteOut",s),this.slider.slides.eq(t).trigger("mainAnimationCompleteIn",s),this.state="ended",this.sliderElement.trigger("mainAnimationComplete",s)},s.prototype.onReverseChangeToComplete=function(e,t,i){s.prototype.onChangeToComplete.apply(this,arguments)},s.prototype.clearTimelines=function(){this.revertCB=function(){},this.timeline.clear(),this.timeline.timeScale(1)},s.prototype.getEase=function(){return this.isTouch?"linear":this.parameters.ease},s}),N2Require("SmartSliderControlAutoplay",[],[],function(e,t,i){"use strict";function s(t,i){this._paused=!0,this._wait=!1,this._disabled=!1,this._currentCount=0,this._progressEnabled=!1,this.timeline=null,this.hasButton=!1,this.deferredsMediaPlaying=null,this.deferredMouseLeave=null,this.deferredMouseEnter=null,this.mainAnimationDeferred=!0,this.autoplayDeferred=null,this.slider=t,this.parameters=e.extend({enabled:0,start:1,duration:8e3,autoplayToSlide:0,autoplayToSlideIndex:-1,allowReStart:0,pause:{mouse:"enter",click:!0,mediaStarted:!0},resume:{click:0,mouse:0,mediaEnded:!0}},i),this.parameters.enabled?(this.parameters.duration/=1e3,t.controls.autoplay=this,this.deferredsExtraPlaying={},this.slider.visible(e.proxy(this.onReady,this))):this.disable(),t.controls.autoplay=this}var n=!1;return s.prototype.onReady=function(){this.autoplayDeferred=e.Deferred();var t={_progress:0};this.timeline=NextendTween.to(t,this.getSlideDuration(this.slider.currentSlideIndex),{_progress:1,paused:!0,onComplete:e.proxy(this.next,this)}),this._progressEnabled&&this.enableProgress();var i=this.slider.sliderElement;if(this.parameters.start?this.continueAutoplay():this.pauseAutoplayExtraPlaying(null,"autoplayButton"),i.on("mainAnimationStart.autoplay",e.proxy(this.onMainAnimationStart,this)),"0"!=this.parameters.pause.mouse)switch(i.on("touchend.autoplay",function(){n=!0,setTimeout(function(){n=!1},300)}),this.parameters.pause.mouse){case"enter":i.on("mouseenter.autoplay",e.proxy(this.pauseAutoplayMouseEnter,this)),i.on("mouseleave.autoplay",e.proxy(this.pauseAutoplayMouseEnterEnded,this));break;case"leave":i.on("mouseleave.autoplay",e.proxy(this.pauseAutoplayMouseLeave,this)),i.on("mouseenter.autoplay",e.proxy(this.pauseAutoplayMouseLeaveEnded,this))}if(this.parameters.pause.click&&!this.parameters.resume.click?i.on("universalclick.autoplay",e.proxy(this.pauseAutoplayUniversal,this)):!this.parameters.pause.click&&this.parameters.resume.click?i.on("universalclick.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this)):this.parameters.pause.click&&this.parameters.resume.click&&i.on("universalclick.autoplay",e.proxy(function(e){this._paused?this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton"):this.pauseAutoplayUniversal(e)},this)),this.parameters.pause.mediaStarted&&(this.deferredsMediaPlaying={},i.on("mediaStarted.autoplay",e.proxy(this.pauseAutoplayMediaPlaying,this)),i.on("mediaEnded.autoplay",e.proxy(this.pauseAutoplayMediaPlayingEnded,this))),"0"!=this.parameters.resume.mouse)switch(this.parameters.resume.mouse){case"enter":this.hasButton&&"0"!=this.parameters.pause.mouse?i.on("mouseenter.autoplay",e.proxy(this.continueAutoplay,this)):i.on("mouseenter.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this));break;case"leave":this.hasButton&&"0"!=this.parameters.pause.mouse?i.on("mouseleave.autoplay",e.proxy(this.continueAutoplay,this)):i.on("mouseleave.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this))}this.parameters.resume.mediaEnded&&i.on("mediaEnded.autoplay",e.proxy(this.continueAutoplay,this)),i.on("autoplayExtraWait.autoplay",e.proxy(this.pauseAutoplayExtraPlaying,this)),i.on("autoplayExtraContinue.autoplay",e.proxy(this.pauseAutoplayExtraPlayingEnded,this)),this.slider.sliderElement.on("mainAnimationComplete.autoplay",e.proxy(this.onMainAnimationComplete,this))},s.prototype.enableProgress=function(){this.timeline&&this.timeline.eventCallback("onUpdate",e.proxy(this.onUpdate,this)),this._progressEnabled=!0},s.prototype.onMainAnimationStart=function(t,i,s,n,r){this.mainAnimationDeferred=e.Deferred(),this.deActivate(0,"wait");for(var o in this.deferredsMediaPlaying)this.deferredsMediaPlaying[o].resolve()},s.prototype.onMainAnimationComplete=function(e,t,i,s){this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentSlideIndex+1&&this.limitAutoplay(),this.timeline.duration(this.getSlideDuration(s)),this.mainAnimationDeferred.resolve(),this.continueAutoplay()},s.prototype.getSlideDuration=function(e){var t=this.slider.realSlides.eq(this.slider.getRealIndex(e)).data("slide"),i=t.minimumSlideDuration;return.3>i&&i<this.parameters.duration&&(i=this.parameters.duration),i},s.prototype.continueAutoplay=function(t){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.reject();var i=[];for(var s in this.deferredsExtraPlaying)i.push(this.deferredsExtraPlaying[s]);for(var s in this.deferredsMediaPlaying)i.push(this.deferredsMediaPlaying[s]);this.deferredMouseEnter&&i.push(this.deferredMouseEnter),this.deferredMouseLeave&&i.push(this.deferredMouseLeave),i.push(this.mainAnimationDeferred),this.autoplayDeferred=e.Deferred(),this.autoplayDeferred.done(e.proxy(this._continueAutoplay,this)),e.when.apply(e,i).done(e.proxy(function(){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.resolve();
|
3 |
-
},this))},s.prototype._continueAutoplay=function(){!this._paused&&!this._wait||this._disabled||(this._paused=!1,this._wait=!1,this.slider.sliderElement.triggerHandler("autoplayStarted"),1==this.timeline.progress()&&this.timeline.pause(0,!1),this.startTimeout(null))},s.prototype.pauseAutoplayUniversal=function(e){this.pauseAutoplayExtraPlaying(e,"autoplayButton"),this.deActivate(null,"pause")},s.prototype.pauseAutoplayMouseEnter=function(){n||(this.autoplayDeferred.reject(),this.deferredMouseEnter=e.Deferred(),this.deActivate(null,"leave"==this.parameters.resume.mouse?"wait":"pause"))},s.prototype.pauseAutoplayMouseEnterEnded=function(){this.deferredMouseEnter&&this.deferredMouseEnter.resolve()},s.prototype.pauseAutoplayMouseLeave=function(){this.autoplayDeferred.reject(),this.deferredMouseLeave=e.Deferred(),this.deActivate(null,"enter"==this.parameters.resume.mouse?"wait":"pause")},s.prototype.pauseAutoplayMouseLeaveEnded=function(){this.deferredMouseLeave&&this.deferredMouseLeave.resolve()},s.prototype.pauseAutoplayMediaPlaying=function(t,i){"undefined"!=typeof this.deferredsMediaPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsMediaPlaying[i]=e.Deferred(),this.deActivate(null,"wait")},s.prototype.pauseAutoplayMediaPlayingEnded=function(e,t){"undefined"!=typeof this.deferredsMediaPlaying[t]&&(this.autoplayDeferred.reject(),this.deferredsMediaPlaying[t].resolve(),delete this.deferredsMediaPlaying[t])},s.prototype.pauseAutoplayExtraPlaying=function(t,i){"undefined"!=typeof this.deferredsExtraPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsExtraPlaying[i]=e.Deferred(),this.deActivate(null,"pause")},s.prototype.pauseAutoplayExtraPlayingEnded=function(e,t){"undefined"!=typeof this.deferredsExtraPlaying[t]&&(this.autoplayDeferred.reject(),this.deferredsExtraPlaying[t].resolve(),delete this.deferredsExtraPlaying[t]),this.continueAutoplay()},s.prototype.deActivate=function(e,t){"pause"==t?this._paused||(this._paused=!0,0!==e&&this.slider.sliderElement.triggerHandler("autoplayPaused")):"wait"==t&&(this._wait||(this._wait=!0,0!==e&&this.slider.sliderElement.triggerHandler("autoplayWait"))),this.timeline&&this.timeline.pause(e,!1)},s.prototype.disable=function(){this.deActivate(0,"pause"),this.slider.sliderElement.triggerHandler("autoplayPaused"),this.slider.sliderElement.triggerHandler("autoplayDisabled"),this.slider.sliderElement.off(".autoplay"),this._disabled=!0},s.prototype.startTimeout=function(e){this._paused||this._disabled||this.timeline.play(e)},s.prototype.next=function(){this.timeline.pause(),this._currentCount++,(this.parameters.autoplayToSlide>0&&this._currentCount>=this.parameters.autoplayToSlide||this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentSlideIndex+2)&&this.limitAutoplay(),this.slider.nextCarousel(!0)},s.prototype.limitAutoplay=function(){this.parameters.allowReStart?(this._currentCount=0,this.slider.sliderElement.triggerHandler("autoplayExtraWait","autoplayButton")):this.disable()},s.prototype.onUpdate=function(){this.slider.sliderElement.triggerHandler("autoplay",this.timeline.progress())},s}),N2Require("SmartSliderControlFullscreen",[],[],function(e,t,i){"use strict";function s(t,i,s){this.slider=t,this.responsive=this.slider.responsive,this._type=this.responsive.parameters.type,this._forceFull=this.responsive.parameters.forceFull,this.forceFullpage="auto"==this._type||"fullwidth"==this._type||"fullpage"==this._type,this.forceFullpage&&(this._upscale=this.responsive.parameters.upscale,this._minimumHeightRatio=this.responsive.parameters.minimumHeightRatio,this._maximumHeightRatio=this.responsive.parameters.maximumHeightRatio),this.isFullScreen=!1,this.fullParent=this.slider.sliderElement.closest(".n2-ss-align"),this.browserSpecific={};var n=this.slider.sliderElement[0];n.requestFullscreen?(this.browserSpecific.requestFullscreen="requestFullscreen",this.browserSpecific.event="fullscreenchange"):n.msRequestFullscreen?(this.browserSpecific.requestFullscreen="msRequestFullscreen",this.browserSpecific.event="MSFullscreenChange"):n.mozRequestFullScreen?(this.browserSpecific.requestFullscreen="mozRequestFullScreen",this.browserSpecific.event="mozfullscreenchange"):n.webkitRequestFullscreen?(this.browserSpecific.requestFullscreen="webkitRequestFullscreen",this.browserSpecific.event="webkitfullscreenchange"):(this.browserSpecific.requestFullscreen="nextendRequestFullscreen",this.browserSpecific.event="nextendfullscreenchange",this.fullParent[0][this.browserSpecific.requestFullscreen]=e.proxy(function(){this.fullParent.css({position:"fixed",left:0,top:0,width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e6}),document.fullscreenElement=this.fullParent[0],this.triggerEvent(document,this.browserSpecific.event),e(window).trigger("resize")},this)),document.exitFullscreen?this.browserSpecific.exitFullscreen="exitFullscreen":document.msExitFullscreen?this.browserSpecific.exitFullscreen="msExitFullscreen":document.mozCancelFullScreen?this.browserSpecific.exitFullscreen="mozCancelFullScreen":document.webkitExitFullscreen?this.browserSpecific.exitFullscreen="webkitExitFullscreen":(this.browserSpecific.exitFullscreen="nextendExitFullscreen",this.fullParent[0][this.browserSpecific.exitFullscreen]=e.proxy(function(){this.fullParent.css({position:"",left:"",top:"",width:"",height:"",backgroundColor:"",zIndex:""}),document.fullscreenElement=null,this.triggerEvent(document,this.browserSpecific.event)},this)),document.addEventListener(this.browserSpecific.event,e.proxy(this.fullScreenChange,this))}return s.prototype.switchState=function(){this.isFullScreen=!this.isFullScreen,this.isFullScreen?this._fullScreen():this._normalScreen()},s.prototype.requestFullscreen=function(){return this.isFullScreen?!1:(this.isFullScreen=!0,this._fullScreen(),!0)},s.prototype.exitFullscreen=function(){return this.isFullScreen?(this.isFullScreen=!1,this._normalScreen(),!0):!1},s.prototype.triggerEvent=function(e,t){var i;document.createEvent?(i=document.createEvent("HTMLEvents"),i.initEvent(t,!0,!0)):document.createEventObject&&(i=document.createEventObject(),i.eventType=t),i.eventName=t,e.dispatchEvent?e.dispatchEvent(i):e.fireEvent&&htmlEvents["on"+t]?e.fireEvent("on"+i.eventType,i):e[t]?e[t]():e["on"+t]&&e["on"+t]()},s.prototype._fullScreen=function(){this.forceFullpage&&(this.responsive.parameters.type="fullpage",this.responsive.parameters.upscale=!0,this.responsive.parameters.forceFull=!1,this._marginLeft=this.responsive.containerElement[0].style.marginLeft,this.responsive.containerElement.css(nextend.rtl.marginLeft,0)),this.fullParent.css({width:"100%",height:"100%",backgroundColor:e("body").css("background-color")}).addClass("n2-ss-in-fullscreen"),this.fullParent.get(0)[this.browserSpecific.requestFullscreen]()},s.prototype._normalScreen=function(){document[this.browserSpecific.exitFullscreen]?document[this.browserSpecific.exitFullscreen]():this.fullParent[0][this.browserSpecific.exitFullscreen]&&this.fullParent[0][this.browserSpecific.exitFullscreen]()},s.prototype.fullScreenChange=function(){this.isDocumentInFullScreenMode()?(this.slider.sliderElement.triggerHandler("n2FullScreen"),e("html").addClass("n2-in-fullscreen"),this.isFullScreen=!0,e(window).trigger("resize")):this.forceFullpage&&(this.responsive.parameters.type=this._type,this.responsive.parameters.upscale=this._upscale,this.responsive.parameters.forceFull=this._forceFull,this.responsive.parameters.minimumHeightRatio=this._minimumHeightRatio,this.responsive.parameters.maximumHeightRatio=this._maximumHeightRatio,this.responsive.containerElement.css(nextend.rtl.marginLeft,this._marginLeft),this.fullParent.css({width:null,height:null,backgroundColor:null}).removeClass("n2-ss-in-fullscreen"),e("html").removeClass("n2-in-fullscreen"),e(window).trigger("resize"),this.isFullScreen=!1,this.slider.sliderElement.triggerHandler("n2ExitFullScreen"))},s.prototype.isDocumentInFullScreenMode=function(){return document.fullscreenElement&&null!==document.fullscreenElement||document.msFullscreenElement&&null!==document.msFullscreenElement||document.mozFullScreen||document.webkitIsFullScreen},s}),N2Require("SmartSliderControlKeyboard",[],[],function(e,t,i){"use strict";function s(t,i,n){this.slider=t,this.parameters=e.extend({},n),"vertical"==i?this.parseEvent=s.prototype.parseEventVertical:this.parseEvent=s.prototype.parseEventHorizontal,e(document).on("keydown",e.proxy(this.onKeyDown,this)),t.controls.keyboard=this}return s.prototype.isSliderOnScreen=function(){var t=this.slider.sliderElement.offset(),i=e(window).scrollTop(),s=this.slider.sliderElement.height();return t.top+.5*s>=i&&t.top-.5*s<=i+e(window).height()},s.prototype.onKeyDown=function(e){e.target.tagName.match(/BODY|DIV|IMG/)&&this.isSliderOnScreen()&&(e=e||window.event,this.parseEvent.call(this,e)&&(e.preventDefault(),e.stopImmediatePropagation()))},s.prototype.parseEventHorizontal=function(e){switch(e.keyCode){case 39:return this.slider[nextend.rtl.next](),!0;case 37:return this.slider[nextend.rtl.previous](),!0;default:return!1}},s.prototype.parseEventVertical=function(e){switch(e.keyCode){case 40:return this.slider.next(),!0;case 38:return this.slider.previous(),!0;default:return!1}},s}),N2Require("SmartSliderControlScroll",[],[],function(e,t,i){"use strict";function s(t){this.preventScroll=!1,this.slider=t,t.sliderElement.on("DOMMouseScroll mousewheel",e.proxy(this.onMouseWheel,this)),t.controls.scroll=this}return s.prototype.onMouseWheel=function(t){if(this.preventScroll)t.preventDefault();else{var i=!1;t.originalEvent&&(t.originalEvent.wheelDelta&&(i=t.originalEvent.wheelDelta/-1<0),t.originalEvent.deltaY&&(i=t.originalEvent.deltaY<0),t.originalEvent.detail&&(i=t.originalEvent.detail<0)),i?this.slider.previous()&&(this.preventScroll=!0,t.preventDefault()):this.slider.next()&&(this.preventScroll=!0,t.preventDefault()),setTimeout(e.proxy(function(){this.preventScroll=!1},this),1e3)}},s}),N2Require("SmartSliderControlTilt",[],[],function(e,t,i){"use strict";function s(t,i){return"undefined"==typeof window.DeviceOrientationEvent||"undefined"==typeof window.orientation?"Not supported":(this.timeout=null,this.slider=t,this.parameters=e.extend({duration:2e3},i),this.orientationchange(),window.addEventListener("orientationchange",e.proxy(this.orientationchange,this)),window.addEventListener("deviceorientation",e.proxy(this.handleOrientation,this),!0),void(t.controls.tilt=this))}return s.prototype.orientationchange=function(){switch(window.orientation){case-90:case 90:this.parseEvent=s.prototype.parseEventHorizontalLandscape;break;default:this.parseEvent=s.prototype.parseEventHorizontal}},s.prototype.clearTimeout=function(){this.timeout=null},s.prototype.handleOrientation=function(t){null==this.timeout&&this.parseEvent.call(this,t)&&(this.timeout=setTimeout(e.proxy(this.clearTimeout,this),this.parameters.duration),t.preventDefault())},s.prototype.parseEventHorizontal=function(e){return e.gamma>10?(this.slider.next(),!0):e.gamma<-10?(this.slider.previous(),!0):!1},s.prototype.parseEventHorizontalLandscape=function(e){return e.beta<-10?(this.slider.next(),!0):e.beta>10?(this.slider.previous(),!0):!1},s}),N2Require("SmartSliderControlTouch",[],[],function(e,t,i){"use strict";function s(t,i,s){this.currentAnimation=null,this.slider=t,this._animation=t.mainAnimation,this.parameters=e.extend({fallbackToMouseEvents:!0},s),this.swipeElement=this.slider.sliderElement.find("> div").eq(0),"vertical"==i?this.setVertical():"horizontal"==i&&this.setHorizontal();var n=e.proxy(function(){var e=this;N2EventBurrito(this.swipeElement.get(0),{mouse:this.parameters.fallbackToMouseEvents,axis:"horizontal"==i?"x":"y",start:function(e,t){r=!1},move:function(t,i,s,n,o){var a=e._direction.measure(s);if(!o&&"unknown"!=a&&null===e.currentAnimation){if("ended"!=e._animation.state)return!1;e.distance=[0],e.swipeElement.addClass("n2-grabbing"),e._animation.setTouch(e._direction.axis),e.currentAnimation={direction:a,percent:0};var l=e.slider[e._direction[a]](!1);if(!l)return e.currentAnimation=null,!1}if(e.currentAnimation){var d=e._direction.get(s,e.currentAnimation.direction);if(e.logDistance(d),e.currentAnimation.percent<1){var h=Math.max(-.99999,Math.min(.99999,d/e.slider.dimensions.slider[e._property]));e.currentAnimation.percent=h,e._animation.setTouchProgress(h)}if((r||Math.abs(d)>e._direction.minDistance)&&t.cancelable)return r=!0,!0}return!1},end:function(t,i,s,n,r){if(null!==e.currentAnimation){var o=r?0:e.measureRealDirection(),a=e._animation.timeline.progress();1!=a&&e._animation.setTouchEnd(o,e.currentAnimation.percent,s.time),e.swipeElement.removeClass("n2-grabbing"),e._animation.setTouch(!1),e.currentAnimation=null}Math.abs(s.x)<10&&Math.abs(s.y)<10?e.onTap(t):nextend.preventClick()}})},this);if(navigator.userAgent.toLowerCase().indexOf("android")>-1){var o=this.swipeElement.parent();1!=o.css("opacity")?this.swipeElement.parent().one("transitionend",n):n()}else n();this.parameters.fallbackToMouseEvents||this.swipeElement.on("click",e.proxy(this.onTap,this)),this.parameters.fallbackToMouseEvents&&this.swipeElement.addClass("n2-grab"),t.controls.touch=this}var n=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,r=!1,o=!1;return s.prototype.setHorizontal=function(){this._property="width",this._direction={left:nextend.rtl.next,right:nextend.rtl.previous,up:null,down:null,axis:"horizontal",minDistance:10,measure:function(e){return!r&&Math.abs(e.x)<10||0==e.x||Math.abs(e.x)<Math.abs(e.y)?"unknown":e.x<0?"left":"right"},get:function(e,t){return"left"==t?-e.x:e.x}},n&&(this.swipeElement.css("-ms-touch-action","pan-y"),this.swipeElement.css("touch-action","pan-y"))},s.prototype.setVertical=function(){this._property="height",this._direction={left:null,right:null,up:"next",down:"previous",axis:"vertical",minDistance:1,measure:function(e){return!r&&Math.abs(e.y)<1||0==e.y||Math.abs(e.y)<Math.abs(e.x)?"unknown":e.y<0?"up":"down"},get:function(e,t){return"up"==t?-e.y:e.y}},n&&(this.swipeElement.css("-ms-touch-action","pan-x"),this.swipeElement.css("touch-action","pan-x"))},s.prototype.logDistance=function(e){this.distance.length>3&&this.distance.shift(),this.distance.push(e)},s.prototype.measureRealDirection=function(){var e=this.distance[0],t=this.distance[this.distance.length-1];return t>=0&&e>t||0>t&&t>e?0:1},s.prototype.onTap=function(t){o||(e(t.target).trigger("n2click"),o=!0,setTimeout(function(){o=!1},500))},s}),N2Require("FrontendComponent",[],[],function(e,t,i){function s(e,i,s,n){this.wraps={},this.isVisible=!0,this.device="",this.children=[],this.slide=e,this.parent=i,this.$layer=s.data("layer",this);var r=this.$layer.find("> .n2-ss-layer-mask");r.length&&(this.wraps.mask=r);var o=this.$layer.find("> .n2-ss-layer-parallax");switch(o.length&&(this.wraps.parallax=o),s.data("pm")){case"absolute":this.placement=new t.FrontendPlacementAbsolute(this);break;case"normal":this.placement=new t.FrontendPlacementNormal(this);break;case"content":this.placement=new t.FrontendPlacementContent(this);break;default:this.placement=new t.FrontendPlacementDefault(this)}if(this.parallax=s.data("parallax"),this.baseSize=this.baseSize||100,this.isAdaptiveFont=this.get("adaptivefont"),this.refreshBaseSize(this.getDevice("fontsize")),n)for(var a=0;a<n.length;a++)switch(n.eq(a).data("type")){case"content":this.children.push(new t.FrontendComponentContent(this.slide,this,n.eq(a)));break;case"row":this.children.push(new t.FrontendComponentRow(this.slide,this,n.eq(a)));break;case"col":this.children.push(new t.FrontendComponentCol(this.slide,this,n.eq(a)));break;case"group":break;default:this.children.push(new t.FrontendComponentLayer(this.slide,this,n.eq(a)))}}return s.prototype.refreshBaseSize=function(e){this.isAdaptiveFont?this.baseSize=16*e/100:this.baseSize=this.parent.baseSize*e/100},s.prototype.start=function(){this.placement.start();for(var e=0;e<this.children.length;e++)this.children[e].start();var t=this.get("rotation")||0;if(t/360!=0){var i=this.addWrap("rotation","<div class='n2-ss-layer-rotation'></div>");NextendTween.set(i[0],{rotationZ:t})}},s.prototype.onDeviceChange=function(e){this.device=e;var t=this.isVisible;if(this.isVisible=this.getDevice(""),this.isVisible===i&&(this.isVisible=1),t&&!this.isVisible?(this.$layer.data("shows",0),this.$layer.css("display","none")):!t&&this.isVisible&&(this.$layer.data("shows",1),this.$layer.css("display","block")),this.isVisible){var s=this.getDevice("fontsize");this.refreshBaseSize(s),this.isAdaptiveFont?this.$layer.css("font-size",16*s/100+"px"):this.$layer.css("font-size",s+"%");for(var n=0;n<this.children.length;n++)this.children[n].onDeviceChange(e);this.placement.onDeviceChange(e),this.onAfterDeviceChange(e)}},s.prototype.onAfterDeviceChange=function(e){},s.prototype.onResize=function(e,t,i){if(this.isVisible||this.placement.alwaysResize){for(var s=0;s<this.children.length;s++)this.children[s].onResize(e,t,i);this.placement.onResize(e,t,i)}},s.prototype.getDevice=function(e,t){var s=this.$layer.data(this.device+e);return s!=i?s:"desktopportrait"!=this.device?this.$layer.data("desktopportrait"+e):t!==i?t:0},s.prototype.get=function(e){return this.$layer.data(e)},s.prototype.getParallaxNodes=function(){var e=[];if(this.isVisible){this.parallax&&e.push(this.$layer[0]);for(var t=0;t<this.children.length;t++)e.push.apply(e,this.children[t].getParallaxNodes())}return e},s.prototype.addWrap=function(t,s){if(this.wraps[t]===i){var n=e(s);switch(t){case"rotation":this.wraps.mask!==i?n.appendTo(this.wraps.mask):this.wraps.parallax!==i?n.appendTo(this.wraps.parallax):n.appendTo(this.$layer),n.append(this.getContents())}this.wraps[t]=n}return n},s.prototype.getContents=function(){return!1},s}),N2Require("FrontendPlacement",[],[],function(e,t,i){function s(e){this.layer=e,this.alwaysResize=!1}return s.prototype.start=function(){},s.prototype.onDeviceChange=function(e){},s.prototype.onResize=function(e,t,i){},s}),N2Require("FrontendPlacementAbsolute",["FrontendPlacement"],[],function(e,t,i){function s(e){return e.position()}function s(e){return{left:e.prop("offsetLeft"),top:e.prop("offsetTop")}}function n(e){this.linked=[],this.parentLayer=!1,this.$parent=!1,t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return/(MSIE\ [0-7]\.\d+)/.test(navigator.userAgent),n.prototype=Object.create(t.FrontendPlacement.prototype),n.prototype.constructor=n,n.prototype.start=function(){var t=this.layer.get("parentid");t&&(this.$parent=e("#"+t),0==this.$parent.length?this.$parent=!1:(this.parentLayer=this.$parent.data("layer"),this.parentLayer.placement.addLinked(this),this.onResize=function(){}))},n.prototype.addLinked=function(e){this.linked.push(e),this.alwaysResize=!0},n.prototype.onResize=n.prototype.onResizeLinked=function(e,t,i){var n=this.layer.$layer,r=e.slideW,o=r,a=e.slideH,l=a;parseInt(this.layer.get("responsivesize"))||(o=l=1),n.css("width",this.getWidth(o)),n.css("height",this.getHeight(l)),parseInt(this.layer.get("responsiveposition"))||(r=a=1);var d=this.layer.getDevice("left")*r,h=this.layer.getDevice("top")*a,p=this.layer.getDevice("align"),c=this.layer.getDevice("valign"),u={left:"auto",top:"auto",right:"auto",bottom:"auto"};if(this.$parent&&this.$parent.data("layer").isVisible){var m=s(this.$parent),f={left:0,top:0};switch(this.layer.getDevice("parentalign")){case"right":f.left=m.left+this.$parent.width();break;case"center":f.left=m.left+this.$parent.width()/2;break;default:f.left=m.left}switch(p){case"right":u.right=n.parent().width()-f.left-d+"px";break;case"center":u.left=f.left+d-n.width()/2+"px";break;default:u.left=f.left+d+"px"}switch(this.layer.getDevice("parentvalign")){case"bottom":f.top=m.top+this.$parent.height();break;case"middle":f.top=m.top+this.$parent.height()/2;break;default:f.top=m.top}switch(c){case"bottom":u.bottom=n.parent().height()-f.top-h+"px";break;case"middle":u.top=f.top+h-n.height()/2+"px";break;default:u.top=f.top+h+"px"}}else{switch(p){case"right":u.right=-d+"px";break;case"center":u.left=(i?n.parent().width():t.slide.width)/2+d-n.width()/2+"px";break;default:u.left=d+"px"}switch(c){case"bottom":u.bottom=-h+"px";break;case"middle":u.top=(i?n.parent().height():t.slide.height)/2+h-n.height()/2+"px";break;default:u.top=h+"px"}}n.css(u);for(var y=0;y<this.linked.length;y++)this.linked[y].onResizeLinked(e,t,i)},n.prototype.getWidth=function(e){var t=this.layer.getDevice("width");return this.isDimensionPropertyAccepted(t)?t:t*e+"px"},n.prototype.getHeight=function(e){var t=this.layer.getDevice("height");return this.isDimensionPropertyAccepted(t)?t:t*e+"px"},n.prototype.isDimensionPropertyAccepted=function(e){return!(!(e+"").match(/[0-9]+%/)&&"auto"!=e)},n}),N2Require("FrontendPlacementContent",["FrontendPlacement"],[],function(e,t,i){function s(e){t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.FrontendPlacement.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementDefault",["FrontendPlacement"],[],function(e,t,i){function s(e){t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.FrontendPlacement.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementNormal",["FrontendPlacement"],[],function(e,t,i){function s(e){t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.FrontendPlacement.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(){this.updateMargin(),this.updateHeight(),this.updateMaxWidth(),this.updateSelfAlign()},s.prototype.updateMargin=function(){var e=this.layer.getDevice("margin").split("|*|"),t=e.pop(),i=this.layer.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.layer.$layer.css("margin",e.join(t+" ")+t)},s.prototype.updateHeight=function(){var e=this.layer.getDevice("height"),t="px";if(e>0){var i=this.layer.baseSize;i>0&&(t="em",e=parseInt(e)/i),this.layer.$layer.css("height",e+t)}else this.layer.$layer.css("height","")},s.prototype.updateMaxWidth=function(){var e=parseInt(this.layer.getDevice("maxwidth"));0>=e||isNaN(e)?this.layer.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.$layer.css("maxWidth",e+"px").addClass("n2-ss-has-maxwidth")},s.prototype.updateSelfAlign=function(){this.layer.$layer.attr("data-cssselfalign",this.layer.getDevice("selfalign"))},s}),N2Require("FrontendComponentCol",["FrontendComponent"],[],function(e,t,i){function s(e,i,s){this.$content=s.find(".n2-ss-layer-col:first"),t.FrontendComponent.prototype.constructor.call(this,e,i,s,this.$content.find("> .n2-ss-layer"))}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(e){t.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updateOrder(),this.updatePadding(),this.updateInnerAlign(),this.updateMaxWidth()},s.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.$content.css("padding",e.join(t+" ")+t)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateMaxWidth=function(){var e=parseInt(this.getDevice("maxwidth"));0>=e||isNaN(e)?this.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.$layer.css("maxWidth",e+"px").addClass("n2-ss-has-maxwidth")},s.prototype.getRealOrder=function(){var e=this.getDevice("order");return 0==e?10:e},s.prototype.updateOrder=function(){var e=this.getDevice("order");0==e?this.$layer.css("order",""):this.$layer.css("order",e)},s.prototype.getContents=function(){return this.$content},s}),N2Require("FrontendComponentContent",["FrontendComponent"],[],function(e,t,i){function s(e,i,s){this.$content=s.find("> .n2-ss-section-main-content"),t.FrontendComponent.prototype.constructor.call(this,e,i,s,this.$content.find("> .n2-ss-layer"))}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(e){t.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateInnerAlign(),this.updateMaxWidth(),this.updateSelfAlign()},s.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.$content.css("padding",e.join(t+" ")+t)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateMaxWidth=function(){var e=parseInt(this.getDevice("maxwidth"));0>=e||isNaN(e)?this.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.$layer.css("maxWidth",e+"px").addClass("n2-ss-has-maxwidth")},s.prototype.updateSelfAlign=function(){this.$layer.attr("data-cssselfalign",this.getDevice("selfalign"))},s.prototype.getContents=function(){return this.$content},s}),N2Require("FrontendComponentLayer",["FrontendComponent"],[],function(e,t,i){function s(e,s,n){t.FrontendComponent.prototype.constructor.call(this,e,s,n),this.wraps.mask!==i?this.$item=this.wraps.mask.children():this.wraps.parallax!==i?this.$item=this.wraps.parallax.children():this.$item=n.children()}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.getContents=function(){return this.$item},s}),N2Require("FrontendComponentRow",["FrontendComponent"],[],function(e,t,i){function s(e,i,s){this.$row=s.find(".n2-ss-layer-row:first"),t.FrontendComponent.prototype.constructor.call(this,e,i,s,this.$row.find("> .n2-ss-layer"))}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(e){t.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateGutter(),this.updateInnerAlign()},s.prototype.onAfterDeviceChange=function(e){this.updateWrapAfter()},s.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.$row.css("padding",e.join(t+" ")+t)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateGutter=function(){var e=this.getDevice("gutter")+"px";if(this.children.length>0)for(var t=this.children.length-1;t>=0;t--)this.children[t].$layer.css("marginRight",e).css("marginTop",e)},s.prototype.getSortedColumns=function(){for(var t=e.extend([],this.children).sort(function(e,t){return e.getRealOrder()-t.getRealOrder()}),i=t.length-1;i>=0;i--)t[i].isVisible||t.splice(i,1);return t},s.prototype.updateWrapAfter=function(){var t=parseInt(this.getDevice("wrapafter")),i=this.getSortedColumns(),s=i.length,n=!1;if(t>0&&s>t&&(n=!0),this.$row.find("> .n2-ss-row-break").remove(),this.$row.toggleClass("n2-ss-row-wrapped",n),n)for(var r=0;s>r;r++){var o=parseInt(r/t);if(i[r].$layer.attr("data-r",o),(r+1)%t==0||r==s-1){i[r].$layer.addClass("n2-ss-last-in-row");var a=i[r].getDevice("order");0==a&&(a=10),e('<div class="n2-ss-row-break"/>').css("order",a).insertAfter(i[r].$layer),i[r].$layer}else i[r].$layer.removeClass("n2-ss-last-in-row")}else{for(var r=0;s>r;r++)i[r].$layer.removeClass("n2-ss-last-in-row").attr("data-r",0);i[s-1].$layer.addClass("n2-ss-last-in-row")}},s.prototype.getContents=function(){return this.$row},s}),N2Require("FrontendComponentSlide",["FrontendComponentSlideAbstract"],[],function(e,t,i){function s(i,s,n){this.isStaticSlide=!1,this.isFirstSlide=n,this.$slideElement=s.data("slide",this),i.parameters.admin?this.minimumSlideDuration=0:(this.minimumSlideDuration=s.data("slide-duration"),e.isNumeric(this.minimumSlideDuration)||(this.minimumSlideDuration=0));var r=s.find(".n2-ss-layers-container");t.FrontendComponentSlideAbstract.prototype.constructor.call(this,i,r)}return s.prototype=Object.create(t.FrontendComponentSlideAbstract.prototype),s.prototype.constructor=s,s.prototype.isActive=function(){return this.$slideElement.hasClass("n2-ss-slide-active")},s}),N2Require("FrontendComponentSlideAbstract",["FrontendComponent"],[],function(e,t,i){function s(i,s){this.baseSize=16,i.parameters.admin&&this.$slideElement.is(i.adminGetCurrentSlideElement())||(this.slider=i,this.status=n.NOT_INITIALIZED,t.FrontendComponent.prototype.constructor.call(this,this,this,s,s.find("> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group")),this.slider.sliderElement.on({SliderDeviceOrientation:e.proxy(function(e,t){this.onDeviceChange(t.device+t.orientation.toLowerCase())},this),SliderResize:e.proxy(function(e,t,i){this.onResize(t,i.responsiveDimensions)},this)}),this.start())}var n={NOT_INITIALIZED:-1,INITIALIZED:0,READY_TO_START:1,PLAYING:2,ENDED:3};return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.refreshBaseSize=function(e){},s.prototype.onResize=function(e,t){for(var i=0;i<this.children.length;i++)this.children[i].onResize(e,t,this.isStaticSlide)},s.prototype.hasLayers=function(){return this.children.length>0},s.prototype.onDeviceChange=function(e){this.device=e;for(var t=0;t<this.children.length;t++)this.children[t].onDeviceChange(e);this.placement.onDeviceChange(e)},s}),N2Require("FrontendComponentStaticSlide",["FrontendComponentSlideAbstract"],[],function(e,t,i){function s(e,i){this.isStaticSlide=!0,this.$slideElement=i.data("slide",this),t.FrontendComponentSlideAbstract.prototype.constructor.call(this,e,i)}return s.prototype=Object.create(t.FrontendComponentSlideAbstract.prototype),s.prototype.constructor=s,s}),N2Require("SmartSliderResponsive",[],[],function(e,t,i){function s(t,o){this.disableTransitions=!1,this.disableTransitionsTimeout=null,this.lastClientHeight=0,this.lastOrientation=0,this.invalidateResponsiveState=!0,t.isAdmin&&(this.doResize=NextendThrottle(this.doResize,50)),this.loadDeferred=e.Deferred(),nextend.fontsDeferred==i?nextend.loadDeferred.always(e.proxy(function(){this.loadDeferred.resolve()},this)):nextend.fontsDeferred.always(e.proxy(function(){this.loadDeferred.resolve()},this)),this.fixedEditRatio=1,this.normalizeTimeout=null,this.delayedResizeAdded=!1,this.deviceMode=s.DeviceMode.UNKNOWN,this.orientationMode=s.OrientationMode.SCREEN,this.orientation=s.DeviceOrientation.UNKNOWN,this.lastRatios={ratio:-1},this.lastRawRatios={ratio:-1},this.normalizedMode="unknownUnknown",t.responsive=this,this.widgetMargins={Top:[],Right:[],Bottom:[],Left:[]},this.staticSizes={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},this.enabledWidgetMargins=[],this.slider=t,this.sliderElement=t.sliderElement,this.alignElement=this.slider.sliderElement.closest(".n2-ss-align");var a=this.ready=e.Deferred();switch(this.sliderElement.triggerHandler("SliderResponsiveStarted"),this.sliderElement.one("SliderResize",function(){a.resolve()}),this.containerElementPadding=this.sliderElement.parent(),this.containerElement=this.containerElementPadding.parent(),this.parameters=e.extend({desktop:1,tablet:1,mobile:1,onResizeEnabled:!0,type:"auto",downscale:!0,upscale:!1,constrainRatio:!0,minimumHeight:0,maximumHeight:0,minimumHeightRatio:0,maximumHeightRatio:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},maximumSlideWidth:0,maximumSlideWidthLandscape:0,maximumSlideWidthRatio:-1,maximumSlideWidthTablet:0,maximumSlideWidthTabletLandscape:0,maximumSlideWidthMobile:0,maximumSlideWidthMobileLandscape:0,maximumSlideWidthConstrainHeight:0,forceFull:0,forceFullHorizontalSelector:"",verticalOffsetSelectors:"",focusUser:0,focusAutoplay:0,deviceModes:{desktopLandscape:1,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},normalizedDeviceModes:{unknownUnknown:["unknown","Unknown"],desktopPortrait:["desktop","Portrait"]},verticalRatioModifiers:{unknownUnknown:1,desktopLandscape:1,desktopPortrait:1,mobileLandscape:1,
|
4 |
-
mobilePortrait:1,tabletLandscape:1,tabletPortrait:1},minimumFontSizes:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},ratioToDevice:{Portrait:{tablet:0,mobile:0},Landscape:{tablet:0,mobile:0}},sliderWidthToDevice:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},basedOn:"combined",desktopPortraitScreenWidth:1200,tabletPortraitScreenWidth:800,mobilePortraitScreenWidth:440,tabletLandscapeScreenWidth:1024,mobileLandscapeScreenWidth:740,orientationMode:"width_and_height",scrollFix:0,overflowHiddenPage:0},o),!this.slider.isAdmin&&this.parameters.overflowHiddenPage&&e("html, body").css("overflow","hidden"),"width"==this.parameters.orientationMode&&(this.orientationMode=s.OrientationMode.SCREEN_WIDTH_ONLY),nextend.smallestZoom=Math.min(Math.max(o.sliderWidthToDevice.mobilePortrait,120),320),this.parameters.basedOn){case"screen":break;default:if(null==n){var l=new MobileDetect(window.navigator.userAgent,801);n=!!l.tablet(),r=!!l.phone()}}if(!(this.slider.isAdmin||this.parameters.desktop&&this.parameters.tablet&&this.parameters.mobile)){if(null==n){var l=new MobileDetect(window.navigator.userAgent,801);n=!!l.tablet(),r=!!l.phone()}if(!this.parameters.mobile&&r||!this.parameters.tablet&&n||!this.parameters.desktop&&!n&&!r)return void this.slider.kill()}if(this.verticalOffsetSelectors=e(this.parameters.verticalOffsetSelectors),this.storeDefaults(),this.parameters.minimumHeight>0&&(this.parameters.minimumHeightRatio=this.parameters.minimumHeight/this.responsiveDimensions.startHeight),this.parameters.maximumHeight>0&&this.parameters.maximumHeight>=this.parameters.minimumHeight&&(this.parameters.maximumHeightRatio={desktopPortrait:this.parameters.maximumHeight/this.responsiveDimensions.startHeight},this.parameters.maximumHeightRatio.desktopLandscape=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.tabletPortrait=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.tabletLandscape=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.mobilePortrait=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.mobileLandscape=this.parameters.maximumHeightRatio.desktopPortrait),this.parameters.maximumSlideWidth>0&&(this.parameters.maximumSlideWidthRatio={desktopPortrait:this.parameters.maximumSlideWidth/this.responsiveDimensions.startSlideWidth,desktopLandscape:this.parameters.maximumSlideWidthLandscape/this.responsiveDimensions.startSlideWidth,tabletPortrait:this.parameters.maximumSlideWidthTablet/this.responsiveDimensions.startSlideWidth,tabletLandscape:this.parameters.maximumSlideWidthTabletLandscape/this.responsiveDimensions.startSlideWidth,mobilePortrait:this.parameters.maximumSlideWidthMobile/this.responsiveDimensions.startSlideWidth,mobileLandscape:this.parameters.maximumSlideWidthMobileLandscape/this.responsiveDimensions.startSlideWidth},this.parameters.maximumSlideWidthConstrainHeight)){this.parameters.maximumHeightRatio=e.extend({},this.parameters.maximumSlideWidthRatio);for(var d in this.parameters.maximumHeightRatio)this.parameters.maximumHeightRatio[d]*=this.parameters.verticalRatioModifiers[d]}if("undefined"!=typeof nextend&&"undefined"!=typeof nextend.ssBeforeResponsive&&nextend.ssBeforeResponsive.call(this),this.onResize(),(this.parameters.onResizeEnabled||"adaptive"==this.parameters.type)&&(e(window).on("resize",e.proxy(this.onResize,this)),this.sliderElement.on("SliderInternalResize",e.proxy(this.onResize,this)),this.parameters.scrollFix))try{var h=this;e('<iframe sandbox="allow-same-origin allow-scripts" style="height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;"/>').on("load",function(t){e(t.target.contentWindow?t.target.contentWindow:t.target.contentDocument.defaultView).on("resize",function(){h.sliderElement.triggerHandler("SliderInternalResize")})}).insertBefore(this.containerElement)}catch(p){}}var n=null,r=null;return s.OrientationMode={SCREEN:0,ADMIN_LANDSCAPE:1,ADMIN_PORTRAIT:2,SCREEN_WIDTH_ONLY:3},s.DeviceOrientation={UNKNOWN:0,LANDSCAPE:1,PORTRAIT:2},s._DeviceOrientation={0:"Unknown",1:"Landscape",2:"Portrait"},s.DeviceMode={UNKNOWN:0,DESKTOP:1,TABLET:2,MOBILE:3},s._DeviceMode={0:"unknown",1:"desktop",2:"tablet",3:"mobile"},s.prototype.getOuterWidth=function(){var e=this.responsiveDimensions;return e.startSliderWidth+e.startSliderMarginLeft+e.startSliderMarginRight},s.prototype.storeDefaults=function(){this.responsiveDimensions={startWidth:this.sliderElement.outerWidth(!0),startHeight:this.sliderElement.outerHeight(!0)},this.horizontalElements=[],this.verticalElements=[],this.init(),this.margins={top:this.responsiveDimensions.startSliderMarginTop,right:this.responsiveDimensions.startSliderMarginRight,bottom:this.responsiveDimensions.startSliderMarginBottom,left:this.responsiveDimensions.startSliderMarginLeft}},s.prototype.addHorizontalElement=function(e,i,s,n){s=s||"ratio";var r=new t.SmartSliderResponsiveElement(this,s,e,i,n);return this.horizontalElements.push(r),r},s.prototype.addVerticalElement=function(e,i,s,n){s=s||"ratio";var r=new t.SmartSliderResponsiveElement(this,s,e,i,n);return this.verticalElements.push(r),r},s.prototype.resizeHorizontalElements=function(e){for(var t=0;t<this.horizontalElements.length;t++){var i=this.horizontalElements[t];"undefined"==typeof e[i.ratioName]&&console.log("error with "+i.ratioName),i.resize(this.responsiveDimensions,e[i.ratioName],!1,0)}},s.prototype.updateVerticalRatios=function(e){return e},s.prototype._updateVerticalRatios=function(t){var i=this.responsiveDimensions.startSlideHeight*t.slideH,s=!1;return this.sliderElement.find(".n2-ss-section-main-content").addClass("n2-ss-section-main-content-calc").each(function(t,n){var r=e(n).outerHeight();r>i&&(s=!0,i=r)}).removeClass("n2-ss-section-main-content-calc"),s&&(t.slideH=i/this.responsiveDimensions.startSlideHeight,t.h=Math.max(t.h,t.slideH)),t},s.prototype.resizeVerticalElements=function(e,t,i){for(var s=0;s<this.verticalElements.length;s++){var n=this.verticalElements[s];"undefined"==typeof e[n.ratioName]&&console.log("error with "+n.ratioName),n.resize(this.responsiveDimensions,e[n.ratioName],t,i)}},s.prototype.getDeviceMode=function(){return s._DeviceMode[this.deviceMode]},s.prototype.getDeviceModeOrientation=function(){return s._DeviceMode[this.deviceMode]+s._DeviceOrientation[this.orientation]},s.prototype.onResize=function(){this.slider.mainAnimation&&"ended"!=this.slider.mainAnimation.getState()?this.delayedResizeAdded||(this.delayedResizeAdded=!0,this.sliderElement.on("mainAnimationComplete.responsive",e.proxy(this._doDelayedResize,this))):this.doResize()},s.prototype._doDelayedResize=function(){this.doResize(),this.delayedResizeAdded=!1},s.prototype.doNormalizedResize=function(){this.normalizeTimeout&&clearTimeout(this.normalizeTimeout),this.normalizeTimeout=setTimeout(e.proxy(this.doResize,this),10)},s.prototype._getOrientation=function(){return this.orientationMode==s.OrientationMode.SCREEN?window.innerHeight<=window.innerWidth?s.DeviceOrientation.LANDSCAPE:s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE?s.DeviceOrientation.LANDSCAPE:void 0},s.prototype._getDevice=function(){switch(this.parameters.basedOn){case"combined":return this._getDeviceDevice(this._getDeviceScreenWidth());case"device":return this._getDeviceDevice(s.DeviceMode.DESKTOP);case"screen":return this._getDeviceScreenWidth()}},s.prototype._getDeviceScreenWidth=function(){var e=window.innerWidth;if(this.orientation==s.DeviceOrientation.PORTRAIT){if(e<this.parameters.mobilePortraitScreenWidth)return s.DeviceMode.MOBILE;if(e<this.parameters.tabletPortraitScreenWidth)return s.DeviceMode.TABLET}else{if(e<this.parameters.mobileLandscapeScreenWidth)return s.DeviceMode.MOBILE;if(e<this.parameters.tabletLandscapeScreenWidth)return s.DeviceMode.TABLET}return s.DeviceMode.DESKTOP},s.prototype._getDeviceAndOrientationByScreenWidth=function(){var e=window.innerWidth;return e<this.parameters.mobilePortraitScreenWidth?[s.DeviceMode.MOBILE,s.DeviceOrientation.PORTRAIT]:e<this.parameters.mobileLandscapeScreenWidth?[s.DeviceMode.MOBILE,s.DeviceOrientation.LANDSCAPE]:e<this.parameters.tabletPortraitScreenWidth?[s.DeviceMode.TABLET,s.DeviceOrientation.PORTRAIT]:e<this.parameters.tabletLandscapeScreenWidth?[s.DeviceMode.TABLET,s.DeviceOrientation.LANDSCAPE]:e<this.parameters.desktopPortraitScreenWidth?[s.DeviceMode.DESKTOP,s.DeviceOrientation.PORTRAIT]:[s.DeviceMode.DESKTOP,s.DeviceOrientation.LANDSCAPE]},s.prototype._getDeviceDevice=function(e){return r===!0?s.DeviceMode.MOBILE:n&&e!=s.DeviceMode.MOBILE?s.DeviceMode.TABLET:e},s.prototype._getDeviceZoom=function(e){var t;this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?t=s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE&&(t=s.DeviceOrientation.LANDSCAPE);var i=s.DeviceMode.DESKTOP;return e-this.parameters.ratioToDevice[s._DeviceOrientation[t]].mobile<.001?i=s.DeviceMode.MOBILE:e-this.parameters.ratioToDevice[s._DeviceOrientation[t]].tablet<.001&&(i=s.DeviceMode.TABLET),i},s.prototype.reTriggerSliderDeviceOrientation=function(){var e=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:e[0],lastOrientation:e[1],device:e[0],orientation:e[1]})},s.prototype.doResize=function(t,i,n,r){if(this.disableTransitions||(this.disableTransitions=!0,this.sliderElement.addClass("n2notransition"),this.disableTransitionsTimeout&&clearTimeout(this.disableTransitionsTimeout),this.disableTransitionsTimeout=setTimeout(e.proxy(function(){this.sliderElement.removeClass("n2notransition"),this.disableTransitions=!1},this),500)),this.refreshMargin(),"center"==this.slider.parameters.align&&("fullpage"==this.parameters.type?this.alignElement.css("maxWidth","none"):this.alignElement.css("maxWidth",this.responsiveDimensions.startWidth)),!this.slider.isAdmin&&this.parameters.forceFull){e("body").css("overflow-x","hidden");var o=0,a=0;if(""!=this.parameters.forceFullHorizontalSelector){var l=this.sliderElement.closest(this.parameters.forceFullHorizontalSelector);l&&l.length>0&&(o=l.width(),a=l.offset().left)}var d=o>0?o:document.body.clientWidth||document.documentElement.clientWidth,h=this.containerElement.parent(),p=h.offset();nextend.isRTL&&(p.right=d-(p.left+h.outerWidth())),this.containerElement.css(nextend.rtl.marginLeft,-p[nextend.rtl.left]-parseInt(h.css("paddingLeft"))-parseInt(h.css("borderLeftWidth"))+a).width(d)}var c=this.containerElementPadding.width()/this.getOuterWidth(),u=!1,m=this.orientation,f=this.deviceMode,y=null,g=null;if(this.orientationMode==s.OrientationMode.SCREEN_WIDTH_ONLY){var v=this._getDeviceAndOrientationByScreenWidth();g=v[0],y=v[1]}else y=this._getOrientation();if(this.orientation!=y&&(this.orientation=y,u=!0,this.sliderElement.trigger("SliderOrientation",{lastOrientation:s._DeviceOrientation[m],orientation:s._DeviceOrientation[y]})),t||(this.orientationMode!=s.OrientationMode.SCREEN_WIDTH_ONLY&&(g=this._getDevice(c)),this.deviceMode!=g&&(this.deviceMode=g,this.sliderElement.removeClass("n2-ss-"+s._DeviceMode[f]).addClass("n2-ss-"+s._DeviceMode[g]),this.sliderElement.trigger("SliderDevice",{lastDevice:s._DeviceMode[f],device:s._DeviceMode[g]}),u=!0)),!this.slider.isAdmin&&"fullpage"==this.parameters.type){var S=0;if(/Android|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent||navigator.vendor||window.opera)){var x=!1;90==Math.abs(window.orientation)?(S=Math.min(screen.width,window.innerHeight),90!=this.lastOrientation&&(x=!0,this.lastOrientation=90)):(S=Math.min(screen.height,window.innerHeight),0!=this.lastOrientation&&(x=!0,this.lastOrientation=0)),!x&&Math.abs(S-this.lastClientHeight)<100?S=this.lastClientHeight:this.lastClientHeight=S}else S=window.n2ClientHeight||document.documentElement.clientHeight||document.body.clientHeight;this.parameters.maximumHeightRatio[this.getDeviceModeOrientation()]=this.parameters.minimumHeightRatio=(S-this.getVerticalOffsetHeight())/this.responsiveDimensions.startHeight}if(u){var b=this._normalizeMode(s._DeviceMode[f],s._DeviceOrientation[m]),w=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);b[0]==w[0]&&b[1]==w[1]||(this.normalizedMode=w[0]+w[1],this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:b[0],lastOrientation:b[1],device:w[0],orientation:w[1]}))}var E=this.parameters.sliderWidthToDevice[this.normalizedMode]/this.parameters.sliderWidthToDevice.desktopPortrait;!this.parameters.downscale&&E>c?c=E:!this.parameters.upscale&&c>E&&(c=E),this._doResize(c,i,n,r),"center"==this.slider.parameters.align&&this.alignElement.css("maxWidth",this.responsiveDimensions.slider.width)},s.prototype._normalizeMode=function(e,t){return this.parameters.normalizedDeviceModes[e+t]},s.prototype.getNormalizedModeString=function(){var e=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);return e.join("")},s.prototype.getModeString=function(){return s._DeviceMode[this.deviceMode]+s._DeviceOrientation[this.orientation]},s.prototype.enabled=function(e,t){return this.parameters.deviceModes[e+t]},s.prototype._doResize=function(t,i,s,n){var r={ratio:t,w:t,h:t,slideW:t,slideH:t,fontRatio:1};this._buildRatios(r,this.slider.parameters.dynamicHeight,s),r.fontRatio=r.slideW;var o=!1;for(var a in r)if(r[a]!=this.lastRawRatios[a]){o=!0;break}(this.invalidateResponsiveState||o)&&(this.lastRawRatios=e.extend({},r),this.resizeHorizontalElements(r),this.finishResize(r,i,n))},s.prototype.finishResize=function(t,i,s){this.loadDeferred.done(e.proxy(function(){var n=e.proxy(function(){this.finishResize=this._finishResize,this.finishResize(t,i,s)},this);/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor)||/CriOS/.exec(window.navigator.userAgent)?setTimeout(n,200):n()},this)),this.invalidateResponsiveState=!1},s.prototype._finishResize=function(e,t,i){this.invalidateResponsiveState=!1,e=this.updateVerticalRatios(e),this.resizeVerticalElements(e,t,i),this.lastRatios=e,t?(this.sliderElement.trigger("SliderAnimatedResize",[e,t,i]),t.eventCallback("onComplete",function(){this.triggerResize(e,t)},[],this)):this.triggerResize(e,!1)},s.prototype.doVerticalResize=function(){var t=this.updateVerticalRatios(e.extend({},this.lastRawRatios)),i=!1;for(var s in t)if(t[s]!=this.lastRatios[s]){i=!0;break}i&&this.finishVerticalResize(t)},s.prototype.finishVerticalResize=function(t){this.loadDeferred.done(e.proxy(function(){this.finishVerticalResize=this._finishVerticalResize,this.finishVerticalResize(t)},this))},s.prototype._finishVerticalResize=function(e){this.resizeVerticalElements(e,!1,0),this.lastRatios=e,this.triggerResize(e,!1)},s.prototype.triggerResize=function(e,t){this.sliderElement.trigger("SliderResize",[e,this,t])},s.prototype._buildRatios=function(e,t,i){var s=this.getDeviceModeOrientation();this.parameters.maximumSlideWidthRatio[s]>0&&e.slideW>this.parameters.maximumSlideWidthRatio[s]&&(e.slideW=this.parameters.maximumSlideWidthRatio[s]),e.slideW=e.slideH=Math.min(e.slideW,e.slideH);var n=this.parameters.verticalRatioModifiers[s];if(e.slideH*=n,"fullpage"==this.parameters.type)e.h*=n,this.parameters.minimumHeightRatio>0&&(e.h=Math.max(e.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[s]>0&&(e.h=Math.min(e.h,this.parameters.maximumHeightRatio[s])),this.slider.isAdmin?this.parameters.constrainRatio?(e.slideH=Math.min(e.slideH,e.h),e.slideH=e.slideW=Math.min(e.slideW,e.slideH)):(e.w=e.slideW,e.h=e.slideH):this.parameters.constrainRatio?(e.slideH=Math.min(e.slideH,e.h),e.slideH=e.slideW=Math.min(e.slideW,e.slideH)):(e.slideW=e.w,this.parameters.maximumSlideWidthRatio[s]>0&&e.slideW>this.parameters.maximumSlideWidthRatio[s]&&(e.slideW=this.parameters.maximumSlideWidthRatio[s]),e.slideH=e.h);else if(e.h*=n,this.parameters.minimumHeightRatio>0&&(e.h=Math.max(e.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[s]>0&&(e.h=Math.min(e.h,this.parameters.maximumHeightRatio[s])),e.slideH=Math.min(e.slideH,e.h),e.slideW=e.slideH/n,"showcase"==this.slider.type&&(e.slideW=Math.min(e.slideW,e.w),e.slideH=Math.min(e.slideW,e.slideH)),t){var r=this.slider.currentSlideIndex;"undefined"!=typeof i&&(r=i);var o=this.slider.backgroundImages.backgroundImages[r];if(o.width>0&&o.height>0){var a=this.responsiveDimensions.startSlideWidth/o.width*(o.height/this.responsiveDimensions.startSlideHeight);-1!=a&&(e.slideH*=a,e.h*=a)}}this.sliderElement.triggerHandler("responsiveBuildRatios",[e])},s.prototype.setOrientation=function(e){"portrait"==e?this.orientationMode=s.OrientationMode.ADMIN_PORTRAIT:"landscape"==e&&(this.orientationMode=s.OrientationMode.ADMIN_LANDSCAPE)},s.prototype.setMode=function(e,t){var i;if(this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?i=s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE&&(i=s.DeviceOrientation.LANDSCAPE),this==t){var n=this.parameters.sliderWidthToDevice[e+s._DeviceOrientation[i]];if("mobile"==e)switch(s._DeviceOrientation[i]){case"Portrait":n=Math.max(nextend.smallestZoom,320)}this.setSize(n)}},s.prototype.setSize=function(e){this.containerElement.width(e),this.doResize()},s.prototype.getVerticalOffsetHeight=function(){for(var e=0,t=0;t<this.verticalOffsetSelectors.length;t++)e+=this.verticalOffsetSelectors.eq(t).outerHeight();return e},s.prototype.addMargin=function(e,t){this.widgetMargins[e].push(t),t.isVisible()&&(this._addMarginSize(e,t.getSize()),this.enabledWidgetMargins.push(t)),this.doNormalizedResize()},s.prototype.addStaticMargin=function(e,t){this.widgetStaticMargins||(this.widgetStaticMargins={Top:[],Right:[],Bottom:[],Left:[]}),this.widgetStaticMargins[e].push(t),this.doNormalizedResize()},s.prototype.refreshMargin=function(){for(var t in this.widgetMargins)for(var i=this.widgetMargins[t],s=i.length-1;s>=0;s--){var n=i[s];if(n.isVisible())-1==e.inArray(n,this.enabledWidgetMargins)&&(this._addMarginSize(t,n.getSize()),this.enabledWidgetMargins.push(n));else{var r=e.inArray(n,this.enabledWidgetMargins);-1!=r&&(this._addMarginSize(t,-n.getSize()),this.enabledWidgetMargins.splice(r,1))}}this.refreshStaticSizes()},s.prototype.refreshStaticSizes=function(){if(this.widgetStaticMargins){var e={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0};for(var t in this.widgetStaticMargins)for(var i=this.widgetStaticMargins[t],s=i.length-1;s>=0;s--){var n=i[s];n.isVisible()&&(e["padding"+t]+=n.getSize())}for(var r in e)this.containerElementPadding.css(e);this.staticSizes=e}},s.prototype._addMarginSize=function(e,t){var i=null;switch(e){case"Top":case"Bottom":i=this._sliderVertical;break;default:i=this._sliderHorizontal}i.data["margin"+e]+=t,this.responsiveDimensions["startSliderMargin"+e]+=t},s}),N2Require("SmartSliderResponsiveElement",[],[],function(e,t,i){function s(e){return e.charAt(0).toUpperCase()+e.slice(1)}function n(t,i,s,n,r){this._lastRatio=1,this.responsive=t,this.ratioName=i,this.element=s,this._readyDeferred=e.Deferred(),"undefined"!=typeof r?this.name=r:this.name=null,this.data={},this.helper={parent:null,parentProps:null,fontSize:!1,centered:!1},this._lateInit(n)}return n.prototype._lateInit=function(t){this._cssProperties=t,this.reloadDefault(),-1!=e.inArray("fontSize",t)&&(this.data.fontSize=this.element.data("fontsize"),this.helper.fontSize={fontSize:this.element.data("fontsize"),desktopPortrait:this.element.data("minfontsizedesktopportrait"),desktopLandscape:this.element.data("minfontsizedesktoplandscape"),tabletPortrait:this.element.data("minfontsizetabletportrait"),tabletLandscape:this.element.data("minfontsizetabletlandscape"),mobilePortrait:this.element.data("minfontsizemobileportrait"),mobileLandscape:this.element.data("minfontsizemobilelandscape")},this.responsive.sliderElement.on("SliderDeviceOrientation",e.proxy(this.onModeChange,this))),this.resize=this._resize,this._readyDeferred.resolve()},n.prototype.reloadDefault=function(){for(var e=0;e<this._cssProperties.length;e++){var t=this._cssProperties[e];this.data[t]=parseInt(this.element.css(t))}if(this.name){var i=this.responsive.responsiveDimensions;for(var n in this.data)i["start"+s(this.name)+s(n)]=this.data[n]}},n.prototype.ready=function(e){this._readyDeferred.done(e)},n.prototype.resize=function(t,i){this.ready(e.proxy(this.resize,this,t,i)),this._lastRatio=i},n.prototype._resize=function(e,t,i,s){this.name&&"undefined"==typeof e[this.name]&&(e[this.name]={});var n={};for(var r in this.data){var o=this.data[r]*t;"function"==typeof this[r+"Prepare"]&&(o=this[r+"Prepare"](o)),this.name&&(e[this.name][r]=o),n[r]=o}i?i.to(this.element,s,n,0):(this.element.css(n),this.helper.centered&&(this.element.css({marginTop:this.getVerticalMargin(parseInt((this.helper.parent.height()-this.element.height())/2))}),this.element.css(nextend.rtl.marginLeft,this.getHorizontalMargin(parseInt((this.helper.parent.width()-this.element.width())/2))))),this._lastRatio=t},n.prototype.getHorizontalMargin=function(e){return e},n.prototype.getVerticalMargin=function(e){return e},n.prototype._refreshResize=function(){this.responsive.ready.done(e.proxy(function(){this._resize(this.responsive.responsiveDimensions,this.responsive.lastRatios[this.ratioName])},this))},n.prototype.widthPrepare=function(e){return Math.round(e)},n.prototype.heightPrepare=function(e){return Math.round(e)},n.prototype.marginLeftPrepare=function(e){return parseInt(e)},n.prototype.marginRightPrepare=function(e){return parseInt(e)},n.prototype.lineHeightPrepare=function(e){return e+"px"},n.prototype.fontSizePrepare=function(e){var t=this.responsive.getNormalizedModeString();return e<this.helper.fontSize[t]?this.helper.fontSize[t]:e},n.prototype.setCentered=function(){this.helper.parent=this.element.parent(),this.helper.centered=!0},n.prototype.unsetCentered=function(){this.helper.centered=!1},n.prototype.onModeChange=function(){this.setFontSizeByMode()},n.prototype.setFontSizeByMode=function(){this.element.css("fontSize",this.fontSizePrepare(this.data.fontSize*this._lastRatio))},n}),N2Require("FrontendItemVimeo",[],[],function(e,t,i){function s(t,i,s,n,r,o){this.readyDeferred=e.Deferred(),this.slider=t,this.playerId=i,this.start=o,this.parameters=e.extend({vimeourl:"//vimeo.com/144598279",center:0,autoplay:"0",reset:"0",title:"1",byline:"1",portrait:"0",loop:"0",color:"00adef",volume:"-1"},n),navigator.userAgent.toLowerCase().indexOf("android")>-1&&(this.parameters.autoplay=0),1==this.parameters.autoplay||!r||n2const.isMobile?this.ready(e.proxy(this.initVimeoPlayer,this)):e("#"+this.playerId).on("click.vimeo n2click.vimeo",e.proxy(function(t){e(t.currentTarget).off(".vimeo"),t.preventDefault(),t.stopPropagation(),this.ready(e.proxy(function(){this.readyDeferred.done(e.proxy(function(){this.play()},this)),this.initVimeoPlayer()},this))},this))}return s.vimeoDeferred=null,s.prototype.ready=function(t){null===s.vimeoDeferred&&(s.vimeoDeferred=e.getScript("https://player.vimeo.com/api/player.js")),s.vimeoDeferred.done(t)},s.prototype.initVimeoPlayer=function(){var t=n2('<iframe id="'+this.playerId+'_video" src="https://player.vimeo.com/video/'+this.parameters.vimeocode+"?autoplay=0&_video&title="+this.parameters.title+"&byline="+this.parameters.byline+"&background="+this.parameters.background+"&portrait="+this.parameters.portrait+"&color="+this.parameters.color+"&loop="+this.parameters.loop+("-1"==this.parameters.quality?"":"&quality="+this.parameters.quality)+'" style="position: absolute; top:0; left: 0; width: 100%; height: 100%;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');e("#"+this.playerId).append(t),this.isStatic=t.closest(".n2-ss-static-slide").length,this.playerElement=t,this.player=new Vimeo.Player(t[0]),this.player.ready().then(e.proxy(this.onReady,this))},s.prototype.onReady=function(){var t=parseFloat(this.parameters.volume);t>=0&&this.setVolume(t),this.slideIndex=this.slider.findSlideIndexByElement(this.playerElement),1==this.parameters.center&&(this.onResize(),this.slider.sliderElement.on("SliderResize",e.proxy(this.onResize,this)));var i=this.playerElement.parent().parent();this.player.on("play",e.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),i.triggerHandler("n2play")},this)),this.player.on("pause",e.proxy(function(){i.triggerHandler("n2pause")})),this.player.on("ended",e.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop")},this)),this.isStatic||this.slider.sliderElement.on("mainAnimationStart",e.proxy(function(e,t,i,s,n){s!=this.slideIndex&&(parseInt(this.parameters.reset)?this.reset():this.pause())},this)),1==this.parameters.autoplay&&this.slider.visible(e.proxy(this.initAutoplay,this)),this.readyDeferred.resolve()},s.prototype.onResize=function(){var e=52,t=this.playerElement.parent(),i=t.width()+e,s=t.height()+e,n=16/9,r={width:i,height:s,marginTop:0};r[nextend.rtl.marginLeft]=0,i/s>n?(r.height=i*n,r.marginTop=(s-r.height)/2):(r.width=s*n,r[nextend.rtl.marginLeft]=(i-r.width)/2),this.playerElement.css(r)},s.prototype.initAutoplay=function(){this.isStatic?this.play():(this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(e,t,i,s,n){s==this.slideIndex&&this.play()},this)),this.slider.currentSlideIndex==this.slideIndex&&this.play())},s.prototype.play=function(){this.slider.sliderElement.trigger("mediaStarted",this.playerId),0!=this.start&&this.player.setCurrentTime(this.start),this.player.play(),this.player.getCurrentTime().then(e.proxy(function(e){e<this.start&&0!=this.start&&this.player.setCurrentTime(this.start),this.player.play()},this))["catch"](e.proxy(function(e){this.player.play()},this))},s.prototype.pause=function(){this.player.pause()},s.prototype.reset=function(){this.player.setCurrentTime(this.start)},s.prototype.setVolume=function(e){this.player.setVolume(e)},s}),N2Require("FrontendItemYouTube",[],[],function(e,t,i){function s(t,i,s,n){this.readyDeferred=e.Deferred(),this.slider=t,this.playerId=i,this.parameters=e.extend({youtubeurl:"//www.youtube.com/watch?v=MKmIwHAFjSU",youtubecode:"MKmIwHAFjSU",center:0,autoplay:"1",theme:"dark",related:"1",vq:"default",volume:"-1",loop:0,showinfo:1,modestbranding:1,reset:0,query:[]},s),navigator.userAgent.toLowerCase().indexOf("android")>-1&&(this.parameters.autoplay=0),1==this.parameters.autoplay||!n||n2const.isMobile?this.ready(e.proxy(this.initYoutubePlayer,this)):e("#"+this.playerId).on("click.youtube n2click.youtube",e.proxy(function(t){e(t.currentTarget).off(".youtube"),t.preventDefault(),t.stopPropagation(),this.ready(e.proxy(function(){this.readyDeferred.done(e.proxy(function(){this.play()},this)),this.initYoutubePlayer()},this))},this))}return s.YTDeferred=null,s.prototype.ready=function(t){if(null===s.YTDeferred)if(s.YTDeferred=e.Deferred(),"undefined"==typeof YT){var i=function(){};"function"==typeof window.onYouTubeIframeAPIReady&&(i=window.onYouTubeIframeAPIReady),window.onYouTubeIframeAPIReady=function(){s.YTDeferred.resolve(),i()},e.getScript("https://www.youtube.com/iframe_api")}else if(YT.loaded)s.YTDeferred.resolve();else var n=setInterval(function(){YT.loaded&&(s.YTDeferred.resolve(),clearInterval(n))},200);s.YTDeferred.done(t)},s.prototype.initYoutubePlayer=function(){var t=e("#"+this.playerId),i=t.closest(".n2-ss-layer");this.isStatic=t.closest(".n2-ss-static-slide").length;var s={enablejsapi:1,origin:window.location.protocol+"//"+window.location.host,theme:this.parameters.theme,wmode:"opaque",rel:this.parameters.related,vq:this.parameters.vq,start:this.parameters.start,showinfo:this.parameters.start.showinfo,modestbranding:this.parameters.start.modestbranding};1==this.parameters.center&&(s.controls=0,s.showinfo=0),1!=this.parameters.controls&&(s.autohide=1,s.controls=0,s.showinfo=0),+(navigator.platform.toUpperCase().indexOf("MAC")>=0&&navigator.userAgent.search("Firefox")>-1)&&(s.html5=1);for(var n in this.parameters.query)this.parameters.query.hasOwnProperty(n)&&(s[n]=this.parameters.query[n]);this.player=new YT.Player(this.playerId,{videoId:this.parameters.youtubecode,wmode:"opaque",playerVars:s,events:{onReady:e.proxy(this.onReady,this),onStateChange:e.proxy(function(e){switch(e.data){case YT.PlayerState.PLAYING:this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),i.triggerHandler("n2play");break;case YT.PlayerState.PAUSED:i.triggerHandler("n2pause");break;case YT.PlayerState.ENDED:1==this.parameters.loop?(this.player.seekTo(0),this.player.playVideo()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop"))}},this)}}),this.playerElement=e("#"+this.playerId),this.slideIndex=this.slider.findSlideIndexByElement(this.playerElement),1==this.parameters.center&&(this.playerElement.parent().css("overflow","hidden"),this.onResize(),this.slider.sliderElement.on("SliderResize",e.proxy(this.onResize,this)))},s.prototype.onReady=function(t){var i=parseFloat(this.parameters.volume);i>=0&&this.setVolume(i),1==this.parameters.autoplay&&this.slider.visible(e.proxy(this.initAutoplay,this)),this.isStatic||(this.slider.sliderElement.on("mainAnimationStart",e.proxy(function(e,t,i,s,n){s!=this.slideIndex&&this.pause()},this)),parseInt(this.parameters.reset)&&this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(e,t,i,s,n){s!=this.slideIndex&&this.player.seekTo(0)},this))),this.readyDeferred.resolve()},s.prototype.onResize=function(){var e=100,t=this.playerElement.parent(),i=t.width(),s=t.height()+e,n=16/9,r={width:i,height:s,marginTop:0};r[nextend.rtl.marginLeft]=0,i/s>n?(r.height=i*n,r.marginTop=(s-r.height)/2):(r.width=s*n,r[nextend.rtl.marginLeft]=(i-r.width)/2),this.playerElement.css(r)},s.prototype.initAutoplay=function(){this.isStatic?this.play():(this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(e,t,i,s,n){s==this.slideIndex&&this.play()},this)),this.slider.currentSlideIndex==this.slideIndex&&this.play())},s.prototype.play=function(){this.isStopped()&&(this.slider.sliderElement.trigger("mediaStarted",this.playerId),this.player.playVideo())},s.prototype.pause=function(){this.isStopped()||this.player.pauseVideo()},s.prototype.stop=function(){this.player.stopVideo()},s.prototype.isStopped=function(){var e=this.player.getPlayerState();switch(e){case-1:case 0:case 2:case 5:return!0;default:return!1}},s.prototype.setVolume=function(e){this.player.setVolume(100*e)},s});
|
1 |
+
N2Require("SmartSliderBackgroundImages",[],[],function(e,t,i){function s(t){this.device=null,this.slider=t,this.lazyLoad=t.parameters.lazyLoad,this.lazyLoadNeighbor=t.parameters.lazyLoadNeighbor,this.deviceDeferred=e.Deferred(),this.slider.sliderElement.one("SliderDevice",e.proxy(this.onSlideDeviceChangedFirst,this)),this.slider.sliderElement.on("visibleSlidesChanged",e.proxy(this.onVisibleSlidesChanged,this)),this.slider.sliderElement.on("slideCountChanged",e.proxy(this.onVisibleSlidesChanged,this))}return s.prototype.whenWithProgress=function(t){for(var i=0,s=e.Deferred(),r=0;r<t.length;r++)e.when(t[r]).done(function(){s.notify(++i,t.length)});return e.when.apply(e,t).done(function(){s.resolveWith(null,arguments)}),s},s.prototype.getBackgroundImages=function(){for(var e=[],t=0;t<this.slider.realSlides.length;t++)e.push(this.slider.realSlides[t].backgroundImage);return e},s.prototype.onVisibleSlidesChanged=function(){1==this.lazyLoad?this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide)):2==this.lazyLoad&&(this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide)))},s.prototype.onSlideDeviceChangedFirst=function(t,i){this.onSlideDeviceChanged(t,i),this.deviceDeferred.resolve(),this.slider.sliderElement.on("SliderDevice",e.proxy(this.onSlideDeviceChanged,this)),this.preLoadSlides=this._preLoadSlides,1==this.lazyLoad?(this.preLoadSlides=this.preloadSlidesLazyNeighbor,this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide))):2==this.lazyLoad?(e(window).on("load",e.proxy(this.preLoadAll,this)),this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide))):this.load=this.whenWithProgress(this.preLoadAll())},s.prototype.onSlideDeviceChanged=function(e,t){this.device=t;for(var i=0;i<this.slider.realSlides.length;i++)this.slider.realSlides[i].backgroundImage&&this.slider.realSlides[i].backgroundImage.updateBackgroundToDevice(t)},s.prototype.preLoadAll=function(){for(var e=[],t=0;t<this.slider.realSlides.length;t++)e.push(this.slider.realSlides[t].preLoad());return e},s.prototype._preLoadSlides=function(t){var i=[];"[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]);for(var s=0;s<t.length;s++)i.push(t[s].preLoad());return e.when.apply(e,i)},s.prototype.preloadSlidesLazyNeighbor=function(t){var i=[this._preLoadSlides(t)];if(this.lazyLoadNeighbor)for(var s=0,r=t[0].previousSlide,n=t[t.length-1].nextSlide;s<this.lazyLoadNeighbor;)i.push(r.preLoad()),r=r.previousSlide,i.push(n.preLoad()),n=n.nextSlide,s++;var o=e.Deferred();if("resolved"!=i[0].state()){var a=setTimeout(e.proxy(function(){this.slider.load.showSpinner("backgroundImage"+t[0].index),a=null},this),50);e.when.apply(e,i).done(e.proxy(function(){a?(clearTimeout(a),a=null):this.slider.load.removeSpinner("backgroundImage"+t[0].index),setTimeout(function(){o.resolve()},100)},this))}else setTimeout(function(){o.resolve()},100);return o},s.prototype.hack=function(){for(var e=0;e<this.slider.realSlides.length;e++)this.slider.realSlides[e].backgroundImage&&this.slider.realSlides[e].backgroundImage.hack()},s}),N2Require("SmartSliderLoad",[],[],function(e,t,i){function s(t,i){this.parameters=e.extend({fade:1,scroll:0},i),this.deferred=e.Deferred(),this.smartSlider=t,this.spinnerKey="fadePlaceholder",this.id=t.sliderElement.attr("id"),this.$window=e(window),this.spinner=e("#"+this.id+"-spinner")}return s.prototype.start=function(){if(this.parameters.scroll){var t=e(window);t.on("scroll."+this.id,e.proxy(this.onScroll,this)),this.onScroll()}else if(this.parameters.fade){this.loadingArea=e("#"+this.id+"-placeholder").eq(0),this.showSpinner("fadePlaceholder");var i=this.spinner.find(".n2-ss-spinner-counter");i.length&&this.smartSlider.backgroundImages.load.progress(e.proxy(function(e,t){i.html(Math.round(e/(t+1)*100)+"%")},this)),this.showSlider()}else this.smartSlider.responsive.ready.done(e.proxy(function(){this._showSlider()},this))},s.prototype.onScroll=function(){this.$window.scrollTop()+this.$window.height()>this.smartSlider.sliderElement.offset().top+100&&(this.$window.off("scroll."+this.id),this.showSlider())},s.prototype.loadLayerImages=function(){var t=e.Deferred();return this.smartSlider.sliderElement.find(".n2-ss-layers-container").n2imagesLoaded().always(function(){t.resolve()}),t},s.prototype.showSlider=function(){e.when(this.smartSlider.responsive.ready,this.smartSlider.backgroundImages.load,this.loadLayerImages()).always(e.proxy(function(){this._showSlider()},this))},s.prototype._showSlider=function(t){this.smartSlider.responsive.isReadyToResize=!0,e.when.apply(e,this.smartSlider.widgetDeferreds).done(e.proxy(function(){this.smartSlider.responsive.invalidateResponsiveState=!0,this.smartSlider.responsive.doResize(),this.smartSlider.mainAnimation&&this.smartSlider.mainAnimation.setToStarterSlide(this.smartSlider.starterSlide),this.smartSlider.starterSlide.setStarterSlide(),this.smartSlider.sliderElement.trigger("BeforeVisible"),this.smartSlider.responsive.alignElement.addClass("n2-ss-slider-align-visible"),this.smartSlider.sliderElement.addClass("n2-ss-loaded").removeClass("n2notransition"),this.removeSpinner("fadePlaceholder"),e("#"+this.id+"-placeholder").remove(),this.loadingArea=this.smartSlider.sliderElement,"function"==typeof t?t(this.deferred):this.deferred.resolve()},this))},s.prototype.loaded=function(e){this.deferred.done(e)},s.prototype.showSpinner=function(e){this.spinnerKey=e,this.spinner.appendTo(this.loadingArea).css("display","")},s.prototype.removeSpinner=function(e){this.spinnerKey==e&&(this.spinner.detach(),this.spinnerKey="")},s}),N2Require("SmartSliderApi",[],[],function(e,t,i){function s(){this.sliders={},this.readys={},this._resetCounters=[]}return s.prototype.makeReady=function(e,t){if(this.sliders[e]=t,"undefined"!=typeof this.readys[e])for(var i=0;i<this.readys[e].length;i++)this.readys[e][i].call(t,t,t.sliderElement)},s.prototype.ready=function(e,t){"undefined"!=typeof this.sliders[e]?t.call(this.sliders[e],this.sliders[e],this.sliders[e].sliderElement):("undefined"==typeof this.readys[e]&&(this.readys[e]=[]),this.readys[e].push(t))},s.prototype.trigger=function(t,i){var s=n2(t),r=i.split(","),n=s.closest(".n2-ss-slide,.n2-ss-static-slide");if(r.length>1){-1==e.inArray(t,this._resetCounters)&&(this._resetCounters.push(t),n.on("layerAnimationSetStart.resetCounter",function(){s.data("eventCounter",0)}));var o=s.data("eventCounter")||0;i=r[o],o++,o>r.length-1&&(o=0),s.data("eventCounter",o)}n.triggerHandler(i)},s.prototype.applyAction=function(e,t){var i=n2(e).closest(".n2-ss-slider").data("ss");i[t].apply(i,Array.prototype.slice.call(arguments,2))},window.n2ss=new s,s}),N2Require("SmartSliderAbstract",[],[],function($,scope,undefined){function SmartSliderAbstract(e,t){this.startedDeferred=$.Deferred(),e instanceof n2&&(e="#"+e.attr("id"));var i=e.substr(1);return window[i]&&window[i]instanceof SmartSliderAbstract?!1:(this.id=parseInt(i.replace("n2-ss-","")),window[i]=this,this.readyDeferred=$.Deferred(),void this.waitForExists(i,t))}return SmartSliderAbstract.prototype.kill=function(){this.killed=!0,$("#"+this.sliderElement.attr("id")+"-placeholder").remove(),this.sliderElement.closest(".n2-ss-align").remove()},SmartSliderAbstract.prototype.waitForExists=function(e,t){var i=$.Deferred(),s=function(){var t=$("#"+e);t.length?i.resolve(t):setTimeout(s,500)};i.done($.proxy(this.onSliderExists,this,e,t)),s()},SmartSliderAbstract.prototype.onSliderExists=function(e,t,i){if("SCRIPT"==i.prop("tagName")){var s=i.data("dependency"),r=i.data("delay"),n=$.proxy(function(){var s=$(i.html().replace(/<_s_c_r_i_p_t/g,"<script").replace(/<_\/_s_c_r_i_p_t/g,"</script"));i.replaceWith(s),this.waitForDimension($("#"+e),t),$(window).triggerHandler("n2Rocket",[this.sliderElement])},this);s&&$("#n2-ss-"+s).length?n2ss.ready(s,$.proxy(function(e){e.ready(n)},this)):r?setTimeout(n,r):n()}else this.waitForDimension(i,t)},SmartSliderAbstract.prototype.waitForDimension=function(e,t){var i=$.Deferred(),s=function(){var t=e.is(":visible");t?i.resolve():setTimeout(s,200)};s(),i.done($.proxy(this.onSliderHasDimension,this,e,t))},SmartSliderAbstract.prototype.onSliderHasDimension=function($sliderElement,parameters){this.killed=!1,this.isAdmin=!1,this.responsive=!1,this.mainAnimationLastChangeTime=0,this.currentSlide=null,this.currentRealSlide=null,this.staticSlide=!1,this.isShuffled=!1,this.slides=[],this.visibleSlides=1,this.sliderElement=$sliderElement.data("ss",this),this.parameters=$.extend({admin:!1,playWhenVisible:1,playWhenVisibleAt:.5,callbacks:"",autoplay:{},blockrightclick:!1,maintainSession:0,align:"normal",controls:{drag:!1,touch:"horizontal",keyboard:!1,scroll:!1,tilt:!1},hardwareAcceleration:!0,layerMode:{playOnce:0,playFirstLayer:1,mode:"skippable",inAnimation:"mainInEnd"},foreverLayerAnimation:!1,parallax:{enabled:0,mobile:0,horizontal:"mouse",vertical:"mouse",origin:"enter"},load:{},mainanimation:{},randomize:{randomize:0,randomizeFirst:0},responsive:{},lazyload:{enabled:0},postBackgroundAnimations:!1,initCallbacks:[],dynamicHeight:0,lightbox:[],lightboxDeviceImages:[],titles:[],descriptions:[],"background.parallax.tablet":0,"background.parallax.mobile":0,allowBGImageAttachmentFixed:1,particlejs:0},parameters),this.firstSlideReady=$.Deferred();try{eval(this.parameters.callbacks)}catch(e){console.error(e)}this.startVisibilityCheck(),n2ss.makeReady(this.id,this),this.widgetDeferreds=[],this.sliderElement.on("addWidget",$.proxy(this.addWidget,this)),this.isAdmin=!!this.parameters.admin,this.isAdmin&&(this.changeTo=function(){}),this.load=new scope.SmartSliderLoad(this,this.parameters.load),this.backgroundImages=new scope.SmartSliderBackgroundImages(this),this.__initSlides(),$.when(this.overrideFirstSlide()).done($.proxy(this.onFirstSlideInitialized,this)),navigator.userAgent.match("UCBrowser")&&$("html").addClass("n2-ucbrowser")},SmartSliderAbstract.prototype.overrideFirstSlide=function(){if("undefined"!=typeof window["ss"+this.id]){if("object"==typeof window["ss"+this.id])return window["ss"+this.id].done($.proxy(function(e){null!==e&&this.changeActiveBeforeLoad(e)},this));var e="undefined"!=typeof window["ss"+this.id]?parseInt(window["ss"+this.id]):null;null!==e&&this.changeActiveBeforeLoad(e)}else if(!this.isAdmin&&this.parameters.maintainSession&&"undefined"!=typeof sessionStorage){var t=sessionStorage.getItem("ss-"+this.id);null!==t&&this.changeActiveBeforeLoad(parseInt(t)),this.sliderElement.on("mainAnimationComplete",$.proxy(function(e,t,i,s){sessionStorage.setItem("ss-"+this.id,s)},this))}return!0},SmartSliderAbstract.prototype.changeActiveBeforeLoad=function(e){e>0&&e<this.realSlides.length&&this.starterSlide!=this.realSlides[e]&&(this.unsetActiveSlide(this.starterSlide),this.starterSlide=this.realSlides[e],this.setActiveSlide(this.realSlides[e]))},SmartSliderAbstract.prototype.startCurrentSlideIndex=function(){this.currentRealSlide=this.currentSlide=this.starterSlide,this.setActiveSlide(this.currentSlide),parseInt(this.parameters.carousel)?this.initCarousel():this.initNotCarousel()},SmartSliderAbstract.prototype.onFirstSlideInitialized=function(){for(var i=0;i<this.realSlides.length;i++)this.realSlides[i].setNext(this.realSlides[i+1>this.realSlides.length-1?0:i+1]);this.startCurrentSlideIndex(),this.firstSlideReady.resolve(this.currentSlide);for(var j=0;j<this.parameters.initCallbacks.length;j++)new Function("$",this.parameters.initCallbacks[j]).call(this,$);if(this.widgets=new scope.SmartSliderWidgets(this),this.sliderElement.on({universalenter:$.proxy(function(e){$(e.target).closest(".n2-full-screen-widget").length||this.sliderElement.addClass("n2-hover")},this),universalleave:$.proxy(function(e){e.stopPropagation(),this.sliderElement.removeClass("n2-hover")},this)}),this.controls={},this.parameters.blockrightclick&&this.sliderElement.bind("contextmenu",function(e){e.preventDefault()}),this.initMainAnimation(),this.initResponsiveMode(),!this.killed){if(this.sliderElement.one("touchstart",$.proxy(function(){this.sliderElement.removeClass("n2-has-hover")},this)),this.initControls(),this.startedDeferred.resolve(this),!this.isAdmin){var event="click";"0"!=this.parameters.controls.touch&&this.parameters.controls.touch&&(event="n2click"),this.sliderElement.find("[data-n2click]").each(function(i,el){var el=$(el);el.on(event,function(){eval(el.data("n2click"))})}),this.sliderElement.find("[data-click]").each(function(i,el){var el=$(el).on("click",function(){eval(el.data("click"))}).css("cursor","pointer")}),this.sliderElement.find("[data-n2middleclick]").on("mousedown",function(e){var el=$(this);2!=e.which&&4!=e.which||(e.preventDefault(),eval(el.data("n2middleclick")))}),this.sliderElement.find("[data-mouseenter]").each(function(i,el){var el=$(el).on("mouseenter",function(){eval(el.data("mouseenter"))})}),this.sliderElement.find("[data-mouseleave]").each(function(i,el){var el=$(el).on("mouseleave",function(){eval(el.data("mouseleave"))})}),this.sliderElement.find("[data-play]").each(function(i,el){var el=$(el).on("n2play",function(){eval(el.data("play"))})}),this.sliderElement.find("[data-pause]").each(function(i,el){var el=$(el).on("n2pause",function(){eval(el.data("pause"))})}),this.sliderElement.find("[data-stop]").each(function(i,el){var el=$(el).on("n2stop",function(){eval(el.data("stop"))})}),window.n2FocusAllowed==undefined&&(window.n2FocusAllowed=!1,$(window).on({keydown:function(){window.n2FocusAllowed=!0},keyup:function(){window.n2FocusAllowed=!1}})),this.sliderElement.find("a").on({focus:$.proxy(function(e){if(n2FocusAllowed){var t=this.slider.findSlideByElement(e.currentTarget);t&&t!=this.currentRealSlide&&this.directionalChangeToReal(t.index)}},this)})}this.preReadyResolve(),this.sliderElement.find('[role="button"], [tabindex]').keypress(function(e){32!==e.charCode&&13!==e.charCode||(e.preventDefault(),$(e.target).click())}).on("mouseleave",function(e){$(e.currentTarget).blur()})}},SmartSliderAbstract.prototype.__initSlides=function(){for(var e=this.sliderElement.find(".n2-ss-slide"),t=0;t<e.length;t++)this.slides.push(new scope.FrontendSliderSlide(this,e.eq(t),t));this.starterSlide=this.slides[0];for(var t=0;t<this.slides.length;t++)this.slides[t].init(),1==this.slides[t].$element.data("first")&&(this.starterSlide=this.slides[t]);this.realSlides=this.slides,this.afterRawSlidesReady(),this.randomize(this.slides);var i=this.sliderElement.find(".n2-ss-static-slide");i.length&&(this.staticSlide=new scope.FrontendSliderStaticSlide(this,i))},SmartSliderAbstract.prototype.afterRawSlidesReady=function(){},SmartSliderAbstract.prototype.setVisibleSlides=function(e){e!=this.visibleSlides&&(this.visibleSlides=e,this.sliderElement.triggerHandler("visibleSlidesChanged"))},SmartSliderAbstract.prototype.getVisibleSlides=function(e){return 0==arguments.length&&(e=this.currentSlide),[e]},SmartSliderAbstract.prototype.findSlideBackground=function(e){return e.$element.find(".n2-ss-slide-background")},SmartSliderAbstract.prototype.getRealIndex=function(e){return e},SmartSliderAbstract.prototype.randomize=function(e){this.randomizeFirst(),this.parameters.randomize.randomize&&this.shuffleSlides(e)},SmartSliderAbstract.prototype.randomizeFirst=function(){this.parameters.randomize.randomizeFirst&&(this.unsetActiveSlide(this.starterSlide),this.starterSlide=this.realSlides[Math.floor(Math.random()*this.realSlides.length)],this.setActiveSlide(this.starterSlide),console.log("randomize first"))},SmartSliderAbstract.prototype.shuffleSlides=function(e){e.sort(function(){return.5-Math.random()});for(var t=e[0].$element.parent(),i=0;i<e.length;i++)e[i].$element.appendTo(t),e[i].setIndex(i);this.isShuffled=!0},SmartSliderAbstract.prototype.addWidget=function(e,t){this.widgetDeferreds.push(t)},SmartSliderAbstract.prototype.started=function(e){this.startedDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.preReadyResolve=function(){setTimeout($.proxy(this._preReadyResolve,this),1)},SmartSliderAbstract.prototype._preReadyResolve=function(){this.load.start(),this.load.loaded($.proxy(this.readyResolve,this))},SmartSliderAbstract.prototype.readyResolve=function(){$(window).scroll(),this.readyDeferred.resolve()},SmartSliderAbstract.prototype.ready=function(e){this.readyDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.startVisibilityCheck=function(){this.visibleDeferred=$.Deferred(),this.parameters.playWhenVisible?this.ready($.proxy(function(){$(window).on("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.checkIfVisible()},this)):this.ready($.proxy(function(){this.visibleDeferred.resolve()},this))},SmartSliderAbstract.prototype.checkIfVisible=function(){var e=$(window).scrollTop(),t=$(window).height(),i=this.sliderElement.offset().top,s=i+Math.min(this.sliderElement.height(),t)*this.parameters.playWhenVisibleAt,r=i+Math.min(this.sliderElement.height(),t)*(1-this.parameters.playWhenVisibleAt);s>=e&&e+t>=r&&($(window).off("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.visibleDeferred.resolve())},SmartSliderAbstract.prototype.visible=function(e){this.visibleDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.isPlaying=function(){return"ended"!=this.mainAnimation.getState()},SmartSliderAbstract.prototype.focus=function(e){var t=$.Deferred();if("undefined"==typeof e&&(e=0),this.responsive.parameters.focusUser&&!e||this.responsive.parameters.focusAutoplay&&e){var i=this.sliderElement.offset().top-(this.responsive.verticalOffsetSelectors.height()||0);$(window).scrollTop()!=i?$("html, body").animate({scrollTop:i},400,$.proxy(function(){t.resolve()},this)):t.resolve()}else t.resolve();return t},SmartSliderAbstract.prototype.initNotCarousel=function(){this.next=function(e,t){var i=this.currentSlide.index+1;return i<this.slides.length?this.changeTo(i,!1,e,t):!1},this.previous=function(e,t){var i=this.currentSlide.index-1;return i>=0?this.changeTo(i,!0,e,t):!1},this.isChangePossible=function(e){var t=!1;return"next"==e?(t=this.currentSlide.index+1,t>=this.slides.length&&(t=!1)):"previous"==e&&(t=this.currentSlide.index-1,0>t&&(t=!1)),t!==!1&&t!=this.currentSlide.index};var e=this.slides.length,t=1,i=this.sliderElement.find(".nextend-arrow-previous"),s=function(e){e!=t&&(NextendTween.to(i,.4,{opacity:e}).play(),t=e)},r=1,n=this.sliderElement.find(".nextend-arrow-next"),o=function(e){e!=r&&(NextendTween.to(n,.4,{opacity:e}).play(),r=e)},a=function(t){s(0==t?0:1),o(t==e-1?0:1)};a(this.currentSlide.index),this.sliderElement.on("sliderSwitchTo",function(e,t){a(t)})},SmartSliderAbstract.prototype.isChangePossibleCarousel=function(e){var t=!1;return"next"==e?(t=this.currentSlide.index+1,t>=this.slides.length&&(t=0)):"previous"==e&&(t=this.currentSlide.index-1,0>t&&(t=this.slides.length-1)),t!==!1&&t!=this.currentSlide.index},SmartSliderAbstract.prototype.initCarousel=function(){this.next=this.nextCarousel,this.previous=this.previousCarousel,this.isChangePossible=this.isChangePossibleCarousel},SmartSliderAbstract.prototype.nextCarousel=function(e,t){var i=this.currentSlide.index+1;return i>=this.slides.length&&(i=0),this.changeTo(i,!1,e,t)},SmartSliderAbstract.prototype.previousCarousel=function(e,t){var i=this.currentSlide.index-1;return 0>i&&(i=this.slides.length-1),this.changeTo(i,!0,e,t)},SmartSliderAbstract.prototype.directionalChangeToReal=function(e){this.directionalChangeTo(e)},SmartSliderAbstract.prototype.directionalChangeTo=function(e){e>this.currentSlide.index?this.changeTo(e,!1):this.changeTo(e,!0)},SmartSliderAbstract.prototype.changeTo=function(e,t,i,s){if(e=parseInt(e),e!=this.currentSlide.index){this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)]);var r=$.now();return $.when(this.backgroundImages.preLoadSlides(this.getVisibleSlides(this.slides[e])),this.focus(i)).done($.proxy(function(){if(this.mainAnimationLastChangeTime<=r){this.mainAnimationLastChangeTime=r;var n=this.mainAnimation.getState();if("ended"==n){"undefined"==typeof i&&(i=!1);var o=this.mainAnimation;"undefined"!=typeof s&&(o=s),this._changeTo(e,t,i,s),o.changeTo(this.currentSlide,this.slides[e],t,i),this._changeCurrentSlide(e)}else"playing"==n&&(this.sliderElement.off(".fastChange").one("mainAnimationComplete.fastChange",$.proxy(function(){this.changeTo.call(this,e,t,i,s)},this)),this.mainAnimation.timeScale(2*this.mainAnimation.timeScale()))}},this)),!0}return!1},SmartSliderAbstract.prototype._changeCurrentSlide=function(e){this.currentRealSlide=this.currentSlide=this.slides[e]},SmartSliderAbstract.prototype._changeTo=function(e,t,i,s){},SmartSliderAbstract.prototype.revertTo=function(e,t){this.unsetActiveSlide(this.slides[t]),this.setActiveSlide(this.slides[e]),this._changeCurrentSlide(e),this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)])},SmartSliderAbstract.prototype.setActiveSlide=function(e){e.$element.addClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.unsetActiveSlide=function(e){e.$element.removeClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.findSlideByElement=function(e){e=$(e);for(var t=0;t<this.realSlides.length;t++)if(1===this.realSlides[t].$element.has(e).length)return this.realSlides[t];return!1},SmartSliderAbstract.prototype.findSlideIndexByElement=function(e){var t=this.findSlideByElement(e);return t?t:-1},SmartSliderAbstract.prototype.initMainAnimation=function(){this.mainAnimation=!1},SmartSliderAbstract.prototype.initResponsiveMode=function(){this.dimensions=this.responsive.responsiveDimensions},SmartSliderAbstract.prototype.initControls=function(){this.parameters.admin||("0"!=this.parameters.controls.touch&&new scope.SmartSliderControlTouch(this,this.parameters.controls.touch,{fallbackToMouseEvents:this.parameters.controls.drag}),this.parameters.controls.keyboard&&("undefined"!=typeof this.controls.touch?new scope.SmartSliderControlKeyboard(this,this.controls.touch._direction.axis):new scope.SmartSliderControlKeyboard(this,"horizontal")),this.parameters.controls.scroll&&new scope.SmartSliderControlScroll(this),this.parameters.controls.tilt&&new scope.SmartSliderControlTilt(this),this.controlAutoplay=new scope.SmartSliderControlAutoplay(this,this.parameters.autoplay),this.controlFullscreen=new scope.SmartSliderControlFullscreen(this))},SmartSliderAbstract.prototype.getSlideIndex=function(e){return e},SmartSliderAbstract.prototype.slideToID=function(e,t){for(var i=0;i<this.realSlides.length;i++)if(this.realSlides[i].id==e)return this.slide(this.getSlideIndex(i),t);var s=$('[data-id="'+e+'"]').closest(".n2-ss-slider");if(s.length&&this.id==s.data("ss").id)return!0;if(s.length){var r=0;return"undefined"!=typeof n2ScrollOffsetSelector&&(r=n2(n2ScrollOffsetSelector).outerHeight()),n2("html, body").animate({scrollTop:s.offset().top-r},400),s.data("ss").slideToID(e,t)}},SmartSliderAbstract.prototype.slide=function(e,t){return e>=0&&e<this.slides.length?"undefined"==typeof t?parseInt(this.parameters.carousel)&&this.currentSlide.index==this.slides.length-1&&0==e?this.next():this.currentSlide.index>e?this.changeTo(e,!0):this.changeTo(e):this.changeTo(e,!t):!1},SmartSliderAbstract.prototype.startAutoplay=function(e){return"undefined"!=typeof this.controlAutoplay?(this.controlAutoplay.pauseAutoplayExtraPlayingEnded(e,"autoplayButton"),!0):!1},SmartSliderAbstract}),N2Require("SmartSliderWidgets",[],[],function($,scope,undefined){function SmartSliderWidgets(e){this.slider=e,this.sliderElement=e.sliderElement.on("BeforeVisible",$.proxy(this.onReady,this)),this.initExcludeSlides()}return SmartSliderWidgets.prototype.onReady=function(){this.dimensions=this.slider.dimensions,this.widgets={previous:this.sliderElement.find(".nextend-arrow-previous"),next:this.sliderElement.find(".nextend-arrow-next"),bullet:this.sliderElement.find(".nextend-bullet-bar"),autoplay:this.sliderElement.find(".nextend-autoplay"),indicator:this.sliderElement.find(".nextend-indicator"),bar:this.sliderElement.find(".nextend-bar"),thumbnail:this.sliderElement.find(".nextend-thumbnail"),shadow:this.sliderElement.find(".nextend-shadow"),fullscreen:this.sliderElement.find(".nextend-fullscreen"),html:this.sliderElement.find(".nextend-widget-html")},this.variableElementsDimension={width:this.sliderElement.find("[data-sswidth]"),height:this.sliderElement.find("[data-ssheight]")},this.variableElements={top:this.sliderElement.find("[data-sstop]"),right:this.sliderElement.find("[data-ssright]"),bottom:this.sliderElement.find("[data-ssbottom]"),left:this.sliderElement.find("[data-ssleft]")},this.slider.sliderElement.on("SliderAnimatedResize",$.proxy(this.onAnimatedResize,this)),this.slider.sliderElement.on("SliderResize",$.proxy(this.onResize,this)),this.slider.sliderElement.one("slideCountChanged",$.proxy(function(){this.onResize(this.slider.responsive.lastRatios)},this)),this.onResize(this.slider.responsive.lastRatios),this.initHover()},SmartSliderWidgets.prototype.initHover=function(){var e=null,t=this.sliderElement.find(".n2-ss-widget-hover");t.length>0&&this.sliderElement.on("universalenter",function(i){var s=$(this);e&&clearTimeout(e),t.css("visibility","visible"),setTimeout(function(){s.addClass("n2-ss-widget-hover-show")},50)}).on("universalleave",function(){var i=this;e&&clearTimeout(e),e=setTimeout(function(){$(i).removeClass("n2-ss-widget-hover-show"),e=setTimeout(function(){t.css("visibility","hidden")},400)},500)})},SmartSliderWidgets.prototype.initExcludeSlides=function(){var e=this.sliderElement.find(".n2-ss-widget[data-exclude-slides]"),t=function(e,t,i){-1!=$.inArray(i+1+"",t)?e.addClass("n2-ss-widget-hidden"):e.removeClass("n2-ss-widget-hidden")};e.each($.proxy(function(e,i){for(var s=$(i),r=s.attr("data-exclude-slides").split(","),e=r.length-1;e>=0;e--){var n=r[e].split("-");if(2==n.length&&parseInt(n[0])<=parseInt(n[1])){r[e]=n[0],n[0]=parseInt(n[0]),n[1]=parseInt(n[1]);for(var o=n[0]+1;o<=n[1];o++)r.push(o+"")}}t(s,r,this.slider.currentRealSlide.index),this.slider.sliderElement.on("sliderSwitchTo",function(e,i){t(s,r,i)})},this))},SmartSliderWidgets.prototype.onAnimatedResize=function(e,ratios,timeline,duration){for(var key in this.widgets){var el=this.widgets[key],visible=el.is(":visible");this.dimensions[key+"width"]=visible?el.outerWidth(!1):0,this.dimensions[key+"height"]=visible?el.outerHeight(!1):0}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)variableText+="var "+key+key2+" = "+value[key2]+";";else variableText+="var "+key+" = "+value+";"}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible")){var to={};try{to[k]=eval(el.data("ss"+k))+"px";for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}timeline.to(el,duration,to,0)}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var to={};to[k]=eval(el.data("ss"+k))+"px",timeline.to(el,duration,to,0)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}},SmartSliderWidgets.prototype.onResize=function(e,ratios,responsive,timeline){if(!timeline){for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,0)}for(var key in this.widgets){var el=this.widgets[key],visible=el.length&&el.is(":visible");el.length&&el.is(":visible")?(this.dimensions[key+"width"]=el.outerWidth(!1),this.dimensions[key+"height"]=el.outerHeight(!1)):(this.dimensions[key+"width"]=0,this.dimensions[key+"height"]=0)}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,last)}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)variableText+="var "+key+key2+" = "+value[key2]+";";else variableText+="var "+key+" = "+value+";"}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible"))try{el.css(k,eval(el.data("ss"+k))+"px");for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var value=eval(el.data("ss"+k));el.css(k,value+"px"),el.data("n2Last"+k,value)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}this.slider.responsive.refreshStaticSizes()}},SmartSliderWidgets}),N2Require("SmartSliderBackgroundAnimationAbstract",[],[],function(e,t,i){function s(e,t,i,s,r,n){this.durationMultiplier=r,this.original={currentImage:t,nextImage:i},this.animationProperties=s,this.reversed=n,this.timeline=e.timeline,this.containerElement=e.bgAnimationElement,this.shiftedBackgroundAnimation=e.parameters.shiftedBackgroundAnimation,this.clonedImages={}}return s.prototype.postSetup=function(){},s.prototype.ended=function(){},s.prototype.revertEnded=function(){},s.prototype.placeNextImage=function(){this.clonedImages.nextImage=this.original.nextImage.clone().css({position:"absolute",top:0,left:0}),this.containerElement.append(this.clonedImages.nextImage)},s.prototype.placeCurrentImage=function(){this.clonedImages.currentImage=this.original.currentImage.clone().css({position:"absolute",top:0,left:0}),this.containerElement.append(this.clonedImages.currentImage)},s.prototype.hideOriginals=function(){this.original.currentImage.css("opacity",0),this.original.nextImage.css("opacity",0)},s.prototype.resetAll=function(){this.original.currentImage.css("opacity",1),this.original.nextImage.css("opacity",1),this.containerElement.html("")},s.prototype.getExtraDelay=function(){return 0},s}),N2Require("SmartSliderBackgroundAnimationCubic",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){
|
2 |
+
var i=e.extend(!0,{columns:1,rows:1,fullCube:!0,tiles:{delay:.2,sequence:"Parallel"},depth:50,main:{side:"Left",duration:.5,ease:"easeInOutCubic",direction:"horizontal",real3D:!0},pre:[],post:[]},this.animationProperties);i.fullCube=!0,this.reversed&&("undefined"!=typeof i.invert&&e.extend(!0,i.main,i.invert),"undefined"!=typeof i.invertTiles&&e.extend(i.tiles,i.invertTiles)),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){var a=r.depth;switch(a){case"width":a=i;break;case"height":a=s}switch(r.main.side){case"Top":case"Bottom":a=s;break;case"Left":case"Right":a=i}r.main.real3D&&NextendTween.set(t.get(0),{transformStyle:"preserve-3d"});var l=e('<div class="cuboid"></div>').css({position:"absolute",left:"0",top:"0",width:"100%",height:"100%"}).appendTo(t);NextendTween.set(l.get(0),{transformStyle:"preserve-3d",z:-a/2});var d=0;"horizontal"==r.main.direction&&(d=180);var h=this.getSide(l,i,s,0,0,-a/2,180,0,d),p={Back:h,BackInvert:h};return(r.fullCube||"vertical"==r.main.direction)&&(p.Bottom=this.getSide(l,i,a,0,s-a/2,0,-90,0,0),p.Top=this.getSide(l,i,a,0,-a/2,0,90,0,0)),p.Front=this.getSide(l,i,s,0,0,a/2,0,0,0),(r.fullCube||"horizontal"==r.main.direction)&&(p.Left=this.getSide(l,a,s,-a/2,0,0,0,-90,0),p.Right=this.getSide(l,a,s,i-a/2,0,0,0,90,0)),p.Front.append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})),p[r.main.side].append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})),l},s.prototype.getSide=function(t,i,s,r,n,o,a,l,d){var h=e('<div class="n2-3d-side"></div>').css({width:i,height:s}).appendTo(t);return NextendTween.set(h.get(0),{x:r,y:n,z:o,rotationX:a,rotationY:l,rotationZ:d,backfaceVisibility:"hidden"}),h},s.prototype.addAnimation=function(e,t){var i=e.duration;delete e.duration,this.timeline.to(t,i*this.durationMultiplier,e)},s.prototype.transform=function(e,t,i){for(var s=0;s<e.pre.length;s++){var r=e.pre[s],n=r.duration*this.durationMultiplier;this.timeline.to(t,n,r,i),i+=n}this["transform"+e.main.side](e.main,t,i),i+=e.main.duration;for(var s=0;s<e.post.length;s++){var r=e.post[s],n=r.duration*this.durationMultiplier;this.timeline.to(t,n,r,i),i+=n}},s.prototype.transformLeft=function(e,t,i){this._transform(e,t,i,0,90,0)},s.prototype.transformRight=function(e,t,i){this._transform(e,t,i,0,-90,0)},s.prototype.transformTop=function(e,t,i){this._transform(e,t,i,-90,0,0)},s.prototype.transformBottom=function(e,t,i){this._transform(e,t,i,90,0,0)},s.prototype.transformBack=function(e,t,i){"horizontal"==e.direction?this._transform(e,t,i,0,180,0):this._transform(e,t,i,180,0,0)},s.prototype.transformBackInvert=function(e,t,i){"horizontal"==e.direction?this._transform(e,t,i,0,-180,0):this._transform(e,t,i,-180,0,0)},s.prototype._transform=function(e,t,i,s,r,n){this.timeline.to(t,e.duration*this.durationMultiplier,{rotationX:s,rotationY:r,rotationZ:n,ease:e.ease},i)},s}),N2Require("SmartSliderBackgroundAnimationExplode",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:t}},s.prototype.transform=function(t,i,s){var r=e.extend(!0,{},t.main.current);r.rotationX=90*(3*Math.random()-1),r.rotationY=90*(3*Math.random()-1),r.rotationZ=90*(3*Math.random()-1),this.timeline.to(i.tile,t.main.duration*this.durationMultiplier,r,s)},s}),N2Require("SmartSliderBackgroundAnimationExplodeReversed",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeCurrentImage(),this.clonedImages.currentImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{next:a,tile:t}},s.prototype.transform=function(t,i,s){var r=e.extend(!0,{},t.main.current);r.rotationX=90*(3*Math.random()-1),r.rotationY=90*(3*Math.random()-1),r.rotationZ=30*(3*Math.random()-1),this.timeline.from(i.tile,t.main.duration*this.durationMultiplier,r,s)},s}),N2Require("SmartSliderBackgroundAnimationFlat",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,tiles:{cropOuter:!1,crop:!0,delay:0,sequence:"Parallel"},main:{type:"next",duration:.5,real3D:!0,zIndex:1,current:{ease:"easeInOutCubic"},next:{ease:"easeInOutCubic"}}},this.animationProperties);this.reversed&&("undefined"!=typeof i.invert&&e.extend(!0,i.main,i.invert),"undefined"!=typeof i.invertTiles&&e.extend(i.tiles,i.invertTiles)),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i),i.tiles.cropOuter&&this.container.css("overflow","hidden")},s.prototype.renderTile=function(t,i,s,r,n,o){r.tiles.crop&&t.css("overflow","hidden");var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t),l=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:1}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return r.main.real3D&&(NextendTween.set(t.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(a.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(l.get(0),{transformStyle:"preserve-3d"})),{current:a,next:l}},s.prototype.transform=function(e,t,i){var s=e.main;"current"!=s.type&&"both"!=s.type||this.timeline.to(t.current,s.duration*this.durationMultiplier,s.current,i),"next"!=s.type&&"both"!=s.type||this.timeline.from(t.next,s.duration*this.durationMultiplier,s.next,i)},s}),N2Require("SmartSliderBackgroundAnimationSlixes",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:2,rows:2,main:{duration:2,zIndex:2}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){this.container.css("overflow","hidden");var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:t}},s.prototype.animate=function(t,i,s){this.timeline.to(s[0][0].tile,t.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},0),this.timeline.to(s[0][1].tile,t.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},.3),this.timeline.to(s[1][0].tile,t.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.15),this.timeline.to(s[1][1].tile,t.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.45),e("<div />").css({position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"}).prependTo(this.clonedImages.nextImage.parent()).append(this.clonedImages.nextImage),this.timeline.fromTo(this.clonedImages.nextImage,t.main.duration*this.durationMultiplier,{scale:1.3},{scale:1},.45)},s}),N2Require("SmartSliderBackgroundAnimationTiled",["SmartSliderBackgroundAnimationFluxAbstract"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this,arguments),this.setup()}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationFluxAbstract.prototype),s.prototype.constructor=s,s.prototype.setup=function(t){var i=e("<div></div>").css({position:"absolute",left:0,top:0,width:this.w,height:this.h});this.container=i,NextendTween.set(i.get(0),{force3D:!0,perspective:1e3});for(var s=[],r=[],n=t.columns,o=t.rows,a=Math.floor(this.w/n),l=Math.floor(this.h/o),d=this.w-n*a,h=Math.ceil(d/n),p=this.h-o*l,c=Math.ceil(p/o),u=0,m=0;n>m;m++){s[m]=[];var f=a,g=0;if(d>0){var y=d>=h?h:d;f+=y,d-=y}for(var v=p,S=0;o>S;S++){var b=l;if(v>0){var y=v>=c?c:v;b+=y,v-=y}var x=e('<div class="tile tile-'+m+"-"+S+'"></div>').css({position:"absolute",top:g+"px",left:u+"px",width:f+"px",height:b+"px",zIndex:-Math.abs(m-parseInt(n/2))+n-Math.abs(S-parseInt(o/2))}).appendTo(i),w=this.renderTile(x,f,b,t,u,g);r.push(w),s[m][S]=w,g+=b}u+=f}i.appendTo(this.containerElement),this.preSetup(),this.animate(t,r,s)},s.prototype.animate=function(t,i,s){this["sequence"+t.tiles.sequence](e.proxy(this.transform,this,t),i,s,t.tiles.delay*this.durationMultiplier)},s.prototype.sequenceParallel=function(e,t){e(t,null)},s.prototype.sequenceRandom=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0;n<t.length;n++)e(t[n],r+Math.random()*s)},s.prototype.sequenceForwardCol=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0;n<t.length;n++)e(t[n],r+s*n)},s.prototype.sequenceBackwardCol=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=t.length-1,o=0;o<t.length;o++)e(t[o],r+s*(n-o))},s.prototype.sequenceForwardRow=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],r+s*n),n++},s.prototype.sequenceBackwardRow=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=t.length-1,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],r+s*n),n--},s.prototype.sequenceForwardDiagonal=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0;n<i[0].length;n++)for(var o=0;o<i.length;o++)e(i[o][n],r+s*(o+n))},s.prototype.sequenceBackwardDiagonal=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=i[0].length+i.length-2,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],r+s*(n-a-o))},s}),N2Require("SmartSliderBackgroundAnimationTurn",["SmartSliderBackgroundAnimationFluxAbstract"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this,arguments);var i=e.extend(!0,{perspective:1.5*this.w,duration:.8,direction:"left"},this.animationProperties);this.reversed&&("left"==i.direction?i.direction="right":i.direction="left");var s=parseInt(this.w/2);this.clonedCurrent().css({position:"absolute",top:0,left:"left"==i.direction?-1*(this.w/2):0}),this.clonedNext().css({position:"absolute",top:0,left:"left"==i.direction?0:-1*(this.w/2)});var r=e('<div class="tab"></div>').css({width:s,height:this.h,position:"absolute",top:"0px",left:"left"==i.direction?s:"0","z-index":101});NextendTween.set(r,{transformStyle:"preserve-3d",transformOrigin:"left"==i.direction?"0px 0px":s+"px 0px"});var n=e('<div class="n2-ff-3d"></div>').append(this.clonedCurrent()).css({width:s,height:this.h,position:"absolute",top:0,left:0,"-webkit-transform":"translateZ(0.1px)",overflow:"hidden"}).appendTo(r);NextendTween.set(n,{backfaceVisibility:"hidden",transformStyle:"preserve-3d"});var o=e('<div class="n2-ff-3d"></div>').append(this.clonedNext()).appendTo(r).css({width:s,height:this.h,position:"absolute",top:0,left:0,overflow:"hidden"});NextendTween.set(o,{backfaceVisibility:"hidden",transformStyle:"preserve-3d",rotationY:180,rotationZ:0});var a=e("<div></div>").append(this.clonedCurrent().clone().css("left","left"==i.direction?0:-s)).css({position:"absolute",top:0,left:"left"==i.direction?"0":s,width:s,height:this.h,zIndex:100,overflow:"hidden"}),l=e('<div class="overlay"></div>').css({position:"absolute",top:0,left:"left"==i.direction?s:0,width:s,height:this.h,background:"#000",opacity:1,overflow:"hidden"}),d=e("<div></div>").css({width:this.w,height:this.h,position:"absolute",top:0,left:0}).append(r).append(a).append(l);NextendTween.set(d,{perspective:i.perspective,perspectiveOrigin:"50% 50%"}),this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),this.containerElement.append(d),this.preSetup(),this.timeline.to(r.get(0),i.duration*this.durationMultiplier,{rotationY:"left"==i.direction?-180:180},0),this.timeline.to(l.get(0),i.duration*this.durationMultiplier,{opacity:0},0)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationFluxAbstract.prototype),s.prototype.constructor=s,s.prototype.getExtraDelay=function(){return 0},s}),N2Require("SmartSliderBackgroundAnimationFluxAbstract",["SmartSliderBackgroundAnimationAbstract"],[],function(e,t,i){function s(){this.shiftedPreSetup=!1,this._clonedCurrent=!1,this._clonedNext=!1,t.SmartSliderBackgroundAnimationAbstract.prototype.constructor.apply(this,arguments),this.w=this.original.currentImage.width(),this.h=this.original.currentImage.height()}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationAbstract.prototype),s.prototype.constructor=s,s.prototype.clonedCurrent=function(){return this._clonedCurrent||(this._clonedCurrent=this.original.currentImage.clone().css({width:this.w,height:this.h}),this._clonedCurrent.find(".n2-ss-slide-background-video").remove()),this._clonedCurrent},s.prototype.clonedNext=function(){return this._clonedNext||(this._clonedNext=this.original.nextImage.clone().css({width:this.w,height:this.h}),this._clonedNext.find(".n2-ss-slide-background-video").remove()),this._clonedNext},s.prototype.preSetup=function(){0!=this.shiftedBackgroundAnimation?this.shiftedPreSetup=!0:this._preSetup()},s.prototype._preSetup=function(e){this.timeline.to(this.original.currentImage.get(0),this.getExtraDelay(),{opacity:0},0),this.original.nextImage.css("opacity",0)},s.prototype.postSetup=function(){this.timeline.to(this.original.nextImage.get(0),this.getExtraDelay(),{opacity:1})},s.prototype.getExtraDelay=function(){return.2},s.prototype.ended=function(){this.original.currentImage.css("opacity",1),this.containerElement.html("")},s.prototype.revertEnded=function(){this.original.nextImage.css("opacity",1),this.containerElement.html("")},s}),N2Require("SmartSliderMainAnimationAbstract",[],[],function(e,t,i){function s(t,i){this.state="ended",this.isTouch=!1,this.isReverseAllowed=!0,this.isReverseEnabled=!1,this.reverseSlideIndex=null,this.isNoAnimation=!1,this.slider=t,this.parameters=e.extend({duration:1500,ease:"easeInOutQuint"},i),this.parameters.duration/=1e3,this.sliderElement=t.sliderElement,this.timeline=new NextendTimeline({paused:!0}),this.sliderElement.on("mainAnimationStart",e.proxy(function(e,t,i,s){this._revertCurrentSlideIndex=i,this._revertNextSlideIndex=s},this))}return s.prototype.setToStarterSlide=function(e){},s.prototype.enableReverseMode=function(){this.isReverseEnabled=!0,this.reverseTimeline=new NextendTimeline({paused:!0}),this.sliderElement.triggerHandler("reverseModeEnabled",this.reverseSlideIndex)},s.prototype.disableReverseMode=function(){this.isReverseEnabled=!1},s.prototype.setTouch=function(e){this.isTouch=e},s.prototype.setTouchProgress=function(e){this.isReverseEnabled?this._setTouchProgressWithReverse(e):this._setTouchProgress(e)},s.prototype._setTouchProgress=function(e){"ended"!=this.state&&(0>=e?this.timeline.progress(Math.max(e,1e-6),!1):e>=0&&1>=e&&this.timeline.progress(e))},s.prototype._setTouchProgressWithReverse=function(e){0==e?(this.reverseTimeline.progress(0),this.timeline.progress(e,!1)):e>=0&&1>=e?(this.reverseTimeline.progress(0),this.timeline.progress(e)):0>e&&e>=-1&&(this.timeline.progress(0),this.reverseTimeline.progress(Math.abs(e)))},s.prototype.setTouchEnd=function(e,t,i){"ended"!=this.state&&(this.isReverseEnabled?this._setTouchEndWithReverse(e,t,i):this._setTouchEnd(e,t,i))},s.prototype._setTouchEnd=function(e,t,i){e&&t>0?(this.fixTouchDuration(this.timeline,t,i),this.timeline.play()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-t,i),this.timeline.reverse(),this.willRevertTo(this._revertCurrentSlideIndex,this._revertNextSlideIndex))},s.prototype._setTouchEndWithReverse=function(e,t,i){e?0>t&&this.reverseTimeline.totalDuration()>0?(this.fixTouchDuration(this.reverseTimeline,t,i),this.reverseTimeline.play(),this.willRevertTo(this.reverseSlideIndex,this._revertNextSlideIndex)):(this.willCleanSlideIndex(this.reverseSlideIndex),this.fixTouchDuration(this.timeline,t,i),this.timeline.play()):(0>t?(this.revertCB(this.reverseTimeline),this.fixTouchDuration(this.reverseTimeline,1-t,i),this.reverseTimeline.reverse()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-t,i),this.timeline.reverse()),this.willCleanSlideIndex(this.reverseSlideIndex),this.willRevertTo(this._revertCurrentSlideIndex,this._revertNextSlideIndex))},s.prototype.fixTouchDuration=function(e,t,i){var s=e.totalDuration(),r=Math.max(s/3,Math.min(s,i/Math.abs(t)/1e3));r!=s&&e.totalDuration(r)},s.prototype.getState=function(){return this.state},s.prototype.timeScale=function(){return arguments.length>0?(this.timeline.timeScale(arguments[0]),this):this.timeline.timeScale()},s.prototype.changeTo=function(t,i,s,r){if(this._initAnimation(t,i,s),this.state="initAnimation",this.timeline.paused(!0),this.timeline.eventCallback("onStart",this.onChangeToStart,[t,i,r],this),this.timeline.eventCallback("onComplete",this.onChangeToComplete,[t,i,r],this),this.timeline.eventCallback("onReverseComplete",null),this.revertCB=e.proxy(function(e){e.eventCallback("onReverseComplete",this.onReverseChangeToComplete,[i,t,r],this)},this),this.slider.parameters.dynamicHeight){var n=new NextendTimeline;this.slider.responsive.doResize(null,!1,n,i,.6),this.timeline.add(n)}this.isTouch||this.timeline.play()},s.prototype.willRevertTo=function(t,i){this.sliderElement.triggerHandler("mainAnimationWillRevertTo",[t,i]),this.sliderElement.one("mainAnimationComplete",e.proxy(this.revertTo,this,t,i))},s.prototype.revertTo=function(e,t){this.slider.revertTo(e,t),this.slider.slides[t].triggerHandler("mainAnimationStartInCancel")},s.prototype.willCleanSlideIndex=function(t){this.sliderElement.one("mainAnimationComplete",e.proxy(this.cleanSlideIndex,this,t))},s.prototype.cleanSlideIndex=function(){},s.prototype._initAnimation=function(e,t,i){},s.prototype.onChangeToStart=function(e,t,i){this.state="playing";var s=[this,e.index,t.index,i];this.sliderElement.trigger("mainAnimationStart",s),this.slider.slides[e.index].trigger("mainAnimationStartOut",s),this.slider.slides[t.index].trigger("mainAnimationStartIn",s)},s.prototype.onChangeToComplete=function(e,t,i){var s=[this,e.index,t.index,i];this.clearTimelines(),this.disableReverseMode(),this.slider.slides[e.index].trigger("mainAnimationCompleteOut",s),this.slider.slides[t.index].trigger("mainAnimationCompleteIn",s),this.state="ended",this.sliderElement.trigger("mainAnimationComplete",s)},s.prototype.onReverseChangeToComplete=function(e,t,i){s.prototype.onChangeToComplete.apply(this,arguments)},s.prototype.clearTimelines=function(){this.revertCB=function(){},this.timeline.clear(),this.timeline.timeScale(1)},s.prototype.getEase=function(){return this.isTouch?"linear":this.parameters.ease},s}),N2Require("SmartSliderControlAutoplay",[],[],function(e,t,i){"use strict";function s(t,i){this._paused=!0,this._wait=!1,this._disabled=!1,this._currentCount=0,this._progressEnabled=!1,this.timeline=null,this.hasButton=!1,this.deferredsMediaPlaying=null,this.deferredMouseLeave=null,this.deferredMouseEnter=null,this.mainAnimationDeferred=!0,this.autoplayDeferred=null,this.slider=t,this.parameters=e.extend({enabled:0,start:1,duration:8e3,autoplayToSlide:0,autoplayToSlideIndex:-1,allowReStart:0,pause:{mouse:"enter",click:!0,mediaStarted:!0},resume:{click:0,mouse:0,mediaEnded:!0}},i),this.parameters.enabled?(this.parameters.duration/=1e3,t.controls.autoplay=this,this.deferredsExtraPlaying={},this.slider.visible(e.proxy(this.onReady,this))):this.disable(),t.controls.autoplay=this}var r=!1;return s.prototype.onReady=function(){this.autoplayDeferred=e.Deferred();var t={_progress:0};this.timeline=NextendTween.to(t,this.getSlideDuration(this.slider.currentSlide.index),{_progress:1,paused:!0,onComplete:e.proxy(this.next,this)}),this._progressEnabled&&this.enableProgress();var i=this.slider.sliderElement;if(this.parameters.start?this.continueAutoplay():this.pauseAutoplayExtraPlaying(null,"autoplayButton"),i.on("mainAnimationStart.autoplay",e.proxy(this.onMainAnimationStart,this)),"0"!=this.parameters.pause.mouse)switch(i.on("touchend.autoplay",function(){r=!0,setTimeout(function(){r=!1},300)}),this.parameters.pause.mouse){case"enter":i.on("mouseenter.autoplay",e.proxy(this.pauseAutoplayMouseEnter,this)),i.on("mouseleave.autoplay",e.proxy(this.pauseAutoplayMouseEnterEnded,this));break;case"leave":i.on("mouseleave.autoplay",e.proxy(this.pauseAutoplayMouseLeave,this)),i.on("mouseenter.autoplay",e.proxy(this.pauseAutoplayMouseLeaveEnded,this))}if(this.parameters.pause.click&&!this.parameters.resume.click?i.on("universalclick.autoplay",e.proxy(this.pauseAutoplayUniversal,this)):!this.parameters.pause.click&&this.parameters.resume.click?i.on("universalclick.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this)):this.parameters.pause.click&&this.parameters.resume.click&&i.on("universalclick.autoplay",e.proxy(function(e){this._paused?this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton"):this.pauseAutoplayUniversal(e)},this)),this.parameters.pause.mediaStarted&&(this.deferredsMediaPlaying={},i.on("mediaStarted.autoplay",e.proxy(this.pauseAutoplayMediaPlaying,this)),i.on("mediaEnded.autoplay",e.proxy(this.pauseAutoplayMediaPlayingEnded,this))),"0"!=this.parameters.resume.mouse)switch(this.parameters.resume.mouse){case"enter":this.hasButton&&"0"!=this.parameters.pause.mouse?i.on("mouseenter.autoplay",e.proxy(this.continueAutoplay,this)):i.on("mouseenter.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this));break;case"leave":this.hasButton&&"0"!=this.parameters.pause.mouse?i.on("mouseleave.autoplay",e.proxy(this.continueAutoplay,this)):i.on("mouseleave.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this))}this.parameters.resume.mediaEnded&&i.on("mediaEnded.autoplay",e.proxy(this.continueAutoplay,this)),i.on("autoplayExtraWait.autoplay",e.proxy(this.pauseAutoplayExtraPlaying,this)),i.on("autoplayExtraContinue.autoplay",e.proxy(this.pauseAutoplayExtraPlayingEnded,this)),this.slider.sliderElement.on("mainAnimationComplete.autoplay",e.proxy(this.onMainAnimationComplete,this))},s.prototype.enableProgress=function(){this.timeline&&this.timeline.eventCallback("onUpdate",e.proxy(this.onUpdate,this)),this._progressEnabled=!0},s.prototype.onMainAnimationStart=function(t,i,s,r,n){this.mainAnimationDeferred=e.Deferred(),this.deActivate(0,"wait");for(var o in this.deferredsMediaPlaying)this.deferredsMediaPlaying[o].resolve()},s.prototype.onMainAnimationComplete=function(e,t,i,s){this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentRealSlide.index+1&&this.limitAutoplay(),this.timeline.duration(this.getSlideDuration(s)),this.mainAnimationDeferred.resolve(),this.continueAutoplay()},s.prototype.getSlideDuration=function(e){var t=this.slider.realSlides[this.slider.getRealIndex(e)],i=t.minimumSlideDuration;return.3>i&&i<this.parameters.duration&&(i=this.parameters.duration),i},s.prototype.continueAutoplay=function(t){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.reject();var i=[];for(var s in this.deferredsExtraPlaying)i.push(this.deferredsExtraPlaying[s]);for(var s in this.deferredsMediaPlaying)i.push(this.deferredsMediaPlaying[s]);this.deferredMouseEnter&&i.push(this.deferredMouseEnter),this.deferredMouseLeave&&i.push(this.deferredMouseLeave),i.push(this.mainAnimationDeferred),this.autoplayDeferred=e.Deferred(),this.autoplayDeferred.done(e.proxy(this._continueAutoplay,this)),e.when.apply(e,i).done(e.proxy(function(){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.resolve()},this))},s.prototype._continueAutoplay=function(){!this._paused&&!this._wait||this._disabled||(this._paused=!1,this._wait=!1,this.slider.sliderElement.triggerHandler("autoplayStarted"),1==this.timeline.progress()&&this.timeline.pause(0,!1),this.startTimeout(null))},s.prototype.pauseAutoplayUniversal=function(e){this.pauseAutoplayExtraPlaying(e,"autoplayButton"),this.deActivate(null,"pause")},s.prototype.pauseAutoplayMouseEnter=function(){r||(this.autoplayDeferred.reject(),this.deferredMouseEnter=e.Deferred(),this.deActivate(null,"leave"==this.parameters.resume.mouse?"wait":"pause"))},s.prototype.pauseAutoplayMouseEnterEnded=function(){this.deferredMouseEnter&&this.deferredMouseEnter.resolve()},s.prototype.pauseAutoplayMouseLeave=function(){this.autoplayDeferred.reject(),this.deferredMouseLeave=e.Deferred(),this.deActivate(null,"enter"==this.parameters.resume.mouse?"wait":"pause")},s.prototype.pauseAutoplayMouseLeaveEnded=function(){this.deferredMouseLeave&&this.deferredMouseLeave.resolve()},s.prototype.pauseAutoplayMediaPlaying=function(t,i){"undefined"!=typeof this.deferredsMediaPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsMediaPlaying[i]=e.Deferred(),this.deActivate(null,"wait")},s.prototype.pauseAutoplayMediaPlayingEnded=function(e,t){"undefined"!=typeof this.deferredsMediaPlaying[t]&&(this.autoplayDeferred.reject(),this.deferredsMediaPlaying[t].resolve(),delete this.deferredsMediaPlaying[t])},s.prototype.pauseAutoplayExtraPlaying=function(t,i){"undefined"!=typeof this.deferredsExtraPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsExtraPlaying[i]=e.Deferred(),this.deActivate(null,"pause")},s.prototype.pauseAutoplayExtraPlayingEnded=function(e,t){"undefined"!=typeof this.deferredsExtraPlaying[t]&&(this.autoplayDeferred.reject(),this.deferredsExtraPlaying[t].resolve(),delete this.deferredsExtraPlaying[t]),this.continueAutoplay()},s.prototype.deActivate=function(e,t){"pause"==t?this._paused||(this._paused=!0,0!==e&&this.slider.sliderElement.triggerHandler("autoplayPaused")):"wait"==t&&(this._wait||(this._wait=!0,0!==e&&this.slider.sliderElement.triggerHandler("autoplayWait"))),this.timeline&&this.timeline.pause(e,!1)},s.prototype.disable=function(){this.deActivate(0,"pause"),this.slider.sliderElement.triggerHandler("autoplayPaused"),this.slider.sliderElement.triggerHandler("autoplayDisabled"),this.slider.sliderElement.off(".autoplay"),this._disabled=!0},s.prototype.startTimeout=function(e){this._paused||this._disabled||this.timeline.play(e)},s.prototype.next=function(){this.timeline.pause(),this._currentCount++,(this.parameters.autoplayToSlide>0&&this._currentCount>=this.parameters.autoplayToSlide||this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentRealSlide.index+2)&&this.limitAutoplay(),this.slider.nextCarousel(!0)},s.prototype.limitAutoplay=function(){this.parameters.allowReStart?(this._currentCount=0,this.slider.sliderElement.triggerHandler("autoplayExtraWait","autoplayButton")):this.disable()},s.prototype.onUpdate=function(){this.slider.sliderElement.triggerHandler("autoplay",this.timeline.progress())},s}),N2Require("SmartSliderControlFullscreen",[],[],function(e,t,i){"use strict";function s(t,i,s){this.slider=t,this.responsive=this.slider.responsive,this._type=this.responsive.parameters.type,this._forceFull=this.responsive.parameters.forceFull,this.forceFullpage="auto"==this._type||"fullwidth"==this._type||"fullpage"==this._type,this.forceFullpage&&(this._upscale=this.responsive.parameters.upscale,this._minimumHeightRatio=e.extend({},this.responsive.parameters.minimumHeightRatio),this._maximumHeightRatio=e.extend({},this.responsive.parameters.maximumHeightRatio)),this.isFullScreen=!1,this.fullParent=this.slider.sliderElement.closest(".n2-ss-align"),this.browserSpecific={};var r=this.slider.sliderElement[0];r.requestFullscreen?(this.browserSpecific.requestFullscreen="requestFullscreen",this.browserSpecific.event="fullscreenchange"):r.msRequestFullscreen?(this.browserSpecific.requestFullscreen="msRequestFullscreen",this.browserSpecific.event="MSFullscreenChange"):r.mozRequestFullScreen?(this.browserSpecific.requestFullscreen="mozRequestFullScreen",this.browserSpecific.event="mozfullscreenchange"):r.webkitRequestFullscreen?(this.browserSpecific.requestFullscreen="webkitRequestFullscreen",this.browserSpecific.event="webkitfullscreenchange"):(this.browserSpecific.requestFullscreen="nextendRequestFullscreen",this.browserSpecific.event="nextendfullscreenchange",this.fullParent[0][this.browserSpecific.requestFullscreen]=e.proxy(function(){this.fullParent.css({position:"fixed",left:0,top:0,width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e6}),document.fullscreenElement=this.fullParent[0],this.triggerEvent(document,this.browserSpecific.event),e(window).trigger("resize")},this)),document.exitFullscreen?this.browserSpecific.exitFullscreen="exitFullscreen":document.msExitFullscreen?this.browserSpecific.exitFullscreen="msExitFullscreen":document.mozCancelFullScreen?this.browserSpecific.exitFullscreen="mozCancelFullScreen":document.webkitExitFullscreen?this.browserSpecific.exitFullscreen="webkitExitFullscreen":(this.browserSpecific.exitFullscreen="nextendExitFullscreen",this.fullParent[0][this.browserSpecific.exitFullscreen]=e.proxy(function(){this.fullParent.css({position:"",left:"",top:"",width:"",height:"",backgroundColor:"",zIndex:""}),document.fullscreenElement=null,this.triggerEvent(document,this.browserSpecific.event)},this)),document.addEventListener(this.browserSpecific.event,e.proxy(this.fullScreenChange,this))}return s.prototype.switchState=function(){this.isFullScreen=!this.isFullScreen,this.isFullScreen?this._fullScreen():this._normalScreen()},s.prototype.requestFullscreen=function(){return this.isFullScreen?!1:(this.isFullScreen=!0,this._fullScreen(),!0)},s.prototype.exitFullscreen=function(){return this.isFullScreen?(this.isFullScreen=!1,this._normalScreen(),!0):!1},s.prototype.triggerEvent=function(e,t){var i;document.createEvent?(i=document.createEvent("HTMLEvents"),i.initEvent(t,!0,!0)):document.createEventObject&&(i=document.createEventObject(),i.eventType=t),i.eventName=t,e.dispatchEvent?e.dispatchEvent(i):e.fireEvent&&htmlEvents["on"+t]?e.fireEvent("on"+i.eventType,i):e[t]?e[t]():e["on"+t]&&e["on"+t]()},s.prototype._fullScreen=function(){this.forceFullpage&&(this.responsive.parameters.type="fullpage",
|
3 |
+
this.responsive.parameters.upscale=!0,this.responsive.parameters.forceFull=!1,this._marginLeft=this.responsive.containerElement[0].style.marginLeft,this.responsive.containerElement.css(nextend.rtl.marginLeft,0)),this.fullParent.css({width:"100%",height:"100%",backgroundColor:e("body").css("background-color")}).addClass("n2-ss-in-fullscreen"),this.fullParent.get(0)[this.browserSpecific.requestFullscreen]()},s.prototype._normalScreen=function(){document[this.browserSpecific.exitFullscreen]?document[this.browserSpecific.exitFullscreen]():this.fullParent[0][this.browserSpecific.exitFullscreen]&&this.fullParent[0][this.browserSpecific.exitFullscreen]()},s.prototype.fullScreenChange=function(){this.isDocumentInFullScreenMode()?(this.slider.sliderElement.triggerHandler("n2FullScreen"),e("html").addClass("n2-in-fullscreen"),this.isFullScreen=!0,e(window).trigger("resize")):this.forceFullpage&&(this.responsive.parameters.type=this._type,this.responsive.parameters.upscale=this._upscale,this.responsive.parameters.forceFull=this._forceFull,this.responsive.parameters.minimumHeightRatio=this._minimumHeightRatio,this.responsive.parameters.maximumHeightRatio=this._maximumHeightRatio,this.responsive.containerElement.css(nextend.rtl.marginLeft,this._marginLeft),this.fullParent.css({width:"",height:"",backgroundColor:""}).removeClass("n2-ss-in-fullscreen"),e("html").removeClass("n2-in-fullscreen"),e(window).trigger("resize"),this.isFullScreen=!1,this.slider.sliderElement.triggerHandler("n2ExitFullScreen"))},s.prototype.isDocumentInFullScreenMode=function(){return document.fullscreenElement&&null!==document.fullscreenElement||document.msFullscreenElement&&null!==document.msFullscreenElement||document.mozFullScreen||document.webkitIsFullScreen},s}),N2Require("SmartSliderControlKeyboard",[],[],function(e,t,i){"use strict";function s(t,i,r){this.slider=t,this.parameters=e.extend({},r),"vertical"==i?this.parseEvent=s.prototype.parseEventVertical:this.parseEvent=s.prototype.parseEventHorizontal,e(document).on("keydown",e.proxy(this.onKeyDown,this)),t.controls.keyboard=this}return s.prototype.isSliderOnScreen=function(){var t=this.slider.sliderElement.offset(),i=e(window).scrollTop(),s=this.slider.sliderElement.height();return t.top+.5*s>=i&&t.top-.5*s<=i+e(window).height()},s.prototype.onKeyDown=function(e){e.target.tagName.match(/BODY|DIV|IMG/)&&this.isSliderOnScreen()&&(e=e||window.event,this.parseEvent.call(this,e)&&(e.preventDefault(),e.stopImmediatePropagation()))},s.prototype.parseEventHorizontal=function(e){switch(e.keyCode){case 39:return this.slider[nextend.rtl.next](),!0;case 37:return this.slider[nextend.rtl.previous](),!0;default:return!1}},s.prototype.parseEventVertical=function(e){switch(e.keyCode){case 40:return this.slider.next(),!0;case 38:return this.slider.previous(),!0;default:return!1}},s}),N2Require("SmartSliderControlScroll",[],[],function(e,t,i){"use strict";function s(t){this.preventScroll=!1,this._preventScrollTimeout=null,this.slider=t,t.sliderElement.on("DOMMouseScroll mousewheel",e.proxy(this.onMouseWheel,this)),t.controls.scroll=this}return s.prototype.onMouseWheel=function(e){if(this.preventScroll)this.preventScrollTimeout(e);else{var t=!1;e.originalEvent&&(e.originalEvent.wheelDelta&&(t=e.originalEvent.wheelDelta/-1<0),e.originalEvent.deltaY&&(t=e.originalEvent.deltaY<0),e.originalEvent.detail&&(t=e.originalEvent.detail<0)),t?this.slider.previous()&&this.preventScrollTimeout(e):this.slider.next()&&this.preventScrollTimeout(e)}},s.prototype.preventScrollTimeout=function(t){null!==this._preventScrollTimeout&&clearTimeout(this._preventScrollTimeout),this.preventScroll=!0,t.preventDefault(),this._preventScrollTimeout=setTimeout(e.proxy(function(){this.preventScroll=!1,this._preventScrollTimeout=null},this),400)},s}),N2Require("SmartSliderControlTilt",[],[],function(e,t,i){"use strict";function s(t,i){return"undefined"==typeof window.DeviceOrientationEvent||"undefined"==typeof window.orientation?"Not supported":(this.timeout=null,this.slider=t,this.parameters=e.extend({duration:2e3},i),this.orientationchange(),window.addEventListener("orientationchange",e.proxy(this.orientationchange,this)),window.addEventListener("deviceorientation",e.proxy(this.handleOrientation,this),!0),void(t.controls.tilt=this))}return s.prototype.orientationchange=function(){switch(window.orientation){case-90:case 90:this.parseEvent=s.prototype.parseEventHorizontalLandscape;break;default:this.parseEvent=s.prototype.parseEventHorizontal}},s.prototype.clearTimeout=function(){this.timeout=null},s.prototype.handleOrientation=function(t){null==this.timeout&&this.parseEvent.call(this,t)&&(this.timeout=setTimeout(e.proxy(this.clearTimeout,this),this.parameters.duration),t.preventDefault())},s.prototype.parseEventHorizontal=function(e){return e.gamma>10?(this.slider.next(),!0):e.gamma<-10?(this.slider.previous(),!0):!1},s.prototype.parseEventHorizontalLandscape=function(e){return e.beta<-10?(this.slider.next(),!0):e.beta>10?(this.slider.previous(),!0):!1},s}),N2Require("SmartSliderControlTouch",[],[],function(e,t,i){"use strict";function s(t,i,s){this.currentAnimation=null,this.slider=t,this._animation=t.mainAnimation,this.parameters=e.extend({fallbackToMouseEvents:!0},s),this.swipeElement=this.slider.sliderElement.find("> .n2-ss-swipe-element"),"vertical"==i?this.setVertical():"horizontal"==i&&this.setHorizontal();var r=e.proxy(function(){var e=this;this._animation.isNoAnimation?N2EventBurrito(this.swipeElement.get(0),{mouse:this.parameters.fallbackToMouseEvents,axis:"horizontal"==i?"x":"y",start:function(){n=!1},move:function(t,i,s,r,o){var a=e._direction.measure(s);if(!o&&"unknown"!=a&&null===e.currentAnimation){if("ended"!=e._animation.state)return!1;e.distance=[0],e.swipeElement.addClass("n2-grabbing"),e.currentAnimation={direction:a};var l=e.slider.isChangePossible(e._direction[a]);if(!l)return e.currentAnimation=null,!1}if(e.currentAnimation){var d=e._direction.get(s,e.currentAnimation.direction);if(e.logDistance(d),(n||Math.abs(d)>e._direction.minDistance)&&t.cancelable)return n=!0,!0}return!1},end:function(t,i,s,r,n){if(null!==e.currentAnimation){var o=n?0:e.measureRealDirection();o&&e.slider[e._direction[e.currentAnimation.direction]](),e.swipeElement.removeClass("n2-grabbing"),e.currentAnimation=null}Math.abs(s.x)<10&&Math.abs(s.y)<10?e.onTap(t):nextend.preventClick()}}):N2EventBurrito(this.swipeElement.get(0),{mouse:this.parameters.fallbackToMouseEvents,axis:"horizontal"==i?"x":"y",start:function(e,t){n=!1},move:function(t,i,s,r,o){var a=e._direction.measure(s);if(!o&&"unknown"!=a&&null===e.currentAnimation){if("ended"!=e._animation.state)return!1;e.distance=[0],e.swipeElement.addClass("n2-grabbing"),e._animation.setTouch(e._direction.axis),e.currentAnimation={direction:a,percent:0};var l=e.slider[e._direction[a]](!1);if(!l)return e._animation.setTouch(!1),e.currentAnimation=null,!1}if(e.currentAnimation){var d=e._direction.get(s,e.currentAnimation.direction);if(e.logDistance(d),e.currentAnimation.percent<1){var h=Math.max(-.99999,Math.min(.99999,d/e.slider.dimensions.slider[e._property]));e.currentAnimation.percent=h,e._animation.setTouchProgress(h)}if((n||Math.abs(d)>e._direction.minDistance)&&t.cancelable)return n=!0,!0}return!1},end:function(t,i,s,r,n){if(null!==e.currentAnimation){var o=n?0:e.measureRealDirection(),a=e._animation.timeline.progress();1!=a&&e._animation.setTouchEnd(o,e.currentAnimation.percent,s.time),e.swipeElement.removeClass("n2-grabbing"),e._animation.setTouch(!1),e.currentAnimation=null}Math.abs(s.x)<10&&Math.abs(s.y)<10?e.onTap(t):nextend.preventClick()}})},this);if(navigator.userAgent.toLowerCase().indexOf("android")>-1){var o=this.swipeElement.parent();1!=o.css("opacity")?this.swipeElement.parent().one("transitionend",r):r()}else r();this.parameters.fallbackToMouseEvents||this.swipeElement.on("click",e.proxy(this.onTap,this)),this.parameters.fallbackToMouseEvents&&this.swipeElement.addClass("n2-grab"),t.controls.touch=this}var r=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,n=!1,o=!1;return s.prototype.setHorizontal=function(){this._property="width",this._direction={left:nextend.rtl.next,right:nextend.rtl.previous,up:null,down:null,axis:"horizontal",minDistance:10,measure:function(e){return!n&&Math.abs(e.x)<10||0==e.x||Math.abs(e.x)<Math.abs(e.y)?"unknown":e.x<0?"left":"right"},get:function(e,t){return"left"==t?-e.x:e.x}},r&&(this.swipeElement.css("-ms-touch-action","pan-y"),this.swipeElement.css("touch-action","pan-y"))},s.prototype.setVertical=function(){this._property="height",this._direction={left:null,right:null,up:"next",down:"previous",axis:"vertical",minDistance:1,measure:function(e){return!n&&Math.abs(e.y)<1||0==e.y||Math.abs(e.y)<Math.abs(e.x)?"unknown":e.y<0?"up":"down"},get:function(e,t){return"up"==t?-e.y:e.y}},r&&(this.swipeElement.css("-ms-touch-action","pan-x"),this.swipeElement.css("touch-action","pan-x"))},s.prototype.logDistance=function(e){this.distance.length>3&&this.distance.shift(),this.distance.push(e)},s.prototype.measureRealDirection=function(){var e=this.distance[0],t=this.distance[this.distance.length-1];return t>=0&&e>t||0>t&&t>e?0:1},s.prototype.onTap=function(t){o||(e(t.target).trigger("n2click"),o=!0,setTimeout(function(){o=!1},500))},s}),N2Require("SmartSliderBackgroundImage",[],[],function(e,t,i){function s(t,i,s){this.loadStarted=!1,this.loadAllowed=!1,this.width=0,this.height=0,this.slide=t,this.element=i,this.manager=s,this.loadDeferred=e.Deferred(),this.currentSrc="",this.mode=i.data("mode"),this.opacity=i.data("opacity"),this.blur=i.data("blur"),this.x=i.data("x"),this.y=i.data("y"),this.hasImage=!1,this.$image=i.find("img"),this.$image.length?(this.hasImage=!0,this.startImageMode()):this.startColorMode()}return s.prototype.startColorMode=function(){this.loadDeferred.resolve()},s.prototype.startImageMode=function(){if("fixed"==this.mode&&(n2const.isPhone&&!this.slide.slider.parameters["background.parallax.mobile"]||n2const.isTablet&&!this.slide.slider.parameters["background.parallax.tablet"])&&(this.mode="fill"),this.$image.css("display","none"),this.$background=e('<div class="n2-ss-background-image"/>').css({opacity:this.opacity,backgroundPosition:this.x+"% "+this.y+"%"}).appendTo(this.element),window.n2FilterProperty&&(this.blur>0?this.$background.css({margin:"-"+2*this.blur+"px",padding:2*this.blur+"px"}).css(window.n2FilterProperty,"blur("+this.blur+"px)"):this.$background.css({margin:"",padding:""}).css(window.n2FilterProperty,"")),"fixed"==this.mode&&this.startFixed(),this.desktopSrc=this.element.data("desktop")||"",this.tabletSrc=this.element.data("tablet")||"",this.mobileSrc=this.element.data("mobile")||"",nextend.isRetina){var t=this.element.data("desktop-retina");t&&(this.desktopSrc=t),t=this.element.data("tablet-retina"),t&&(this.tabletSrc=t),t=this.element.data("mobile-retina"),t&&(this.mobileSrc=t)}},s.prototype.preLoad=function(){return this.loadStarted||(this.slide.$element.find("[data-lazysrc]").each(function(){var t=e(this);t.attr("src",t.data("lazysrc"))}),this.loadStarted=!0),"pending"==this.loadDeferred.state()&&(this.loadAllowed=!0,this.manager.deviceDeferred.done(e.proxy(function(){this.updateBackgroundToDevice(this.manager.device),this.$background.n2imagesLoaded({background:!0},e.proxy(function(e){var t=e.images[0].img;this.width=t.naturalWidth,this.height=t.naturalHeight,this.isLoaded=!0,this.loadDeferred.resolve(this.element)},this))},this))),this.loadDeferred},s.prototype.updateBackgroundToDevice=function(e){var t=this.desktopSrc;"mobile"==e.device?this.mobileSrc?t=this.mobileSrc:this.tabletSrc&&(t=this.tabletSrc):"tablet"==e.device&&this.tabletSrc&&(t=this.tabletSrc),t?this.setSrc(t):this.setSrc("")},s.prototype.setSrc=function(e){this.loadAllowed&&e!=this.currentSrc&&(""===e?this.$background.css("background-image",""):this.$background.css("background-image",'url("'+e+'")'),this.currentSrc=e)},s.prototype.startFixed=function(){n2const.isEdge||(this.slide.slider.parameters.allowBGImageAttachmentFixed&&!n2const.isIOS?(this.$background.css("background-repeat","repeat"),this.$background.css("position","static"),this.$background.css("background-attachment","fixed")):n2const.isIE||this.slide.slider.startedDeferred.done(e.proxy(function(){fixedBackground.addElement(this.$background,this.element)},this)))},s.prototype.hack=function(){NextendTween.set(this.element,{rotation:1e-4})},s}),N2Require("FrontendComponent",[],[],function(e,t,i){function s(e,i,s,r){this.wraps={},this.isVisible=!0,this.device="",this.children=[],this.slide=e,this.parent=i,this.$layer=s.data("layer",this);var n=this.$layer.find("> .n2-ss-layer-mask");n.length&&(this.wraps.mask=n);var o=this.$layer.find("> .n2-ss-layer-parallax");switch(o.length&&(this.wraps.parallax=o),s.data("pm")){case"absolute":this.placement=new t.FrontendPlacementAbsolute(this);break;case"normal":this.placement=new t.FrontendPlacementNormal(this);break;case"content":this.placement=new t.FrontendPlacementContent(this);break;default:this.placement=new t.FrontendPlacementDefault(this)}if(this.parallax=s.data("parallax"),this.baseSize=this.baseSize||100,this.isAdaptiveFont=this.get("adaptivefont"),this.refreshBaseSize(this.getDevice("fontsize")),r)for(var a=0;a<r.length;a++)switch(r.eq(a).data("type")){case"content":this.children.push(new t.FrontendComponentContent(this.slide,this,r.eq(a)));break;case"row":this.children.push(new t.FrontendComponentRow(this.slide,this,r.eq(a)));break;case"col":this.children.push(new t.FrontendComponentCol(this.slide,this,r.eq(a)));break;case"group":break;default:this.children.push(new t.FrontendComponentLayer(this.slide,this,r.eq(a)))}}return s.prototype.refreshBaseSize=function(e){this.isAdaptiveFont?this.baseSize=16*e/100:this.baseSize=this.parent.baseSize*e/100},s.prototype.start=function(){this.placement.start();for(var e=0;e<this.children.length;e++)this.children[e].start();var t=this.get("rotation")||0;if(t/360!=0){var i=this.addWrap("rotation","<div class='n2-ss-layer-rotation'></div>");NextendTween.set(i[0],{rotationZ:t})}},s.prototype.onDeviceChange=function(e){this.device=e;var t=this.isVisible;if(this.isVisible=this.getDevice(""),this.isVisible===i&&(this.isVisible=1),t&&!this.isVisible?(this.$layer.data("shows",0),this.$layer.css("display","none")):!t&&this.isVisible&&(this.$layer.data("shows",1),this.$layer.css("display","block")),this.isVisible){var s=this.getDevice("fontsize");this.refreshBaseSize(s),this.isAdaptiveFont?this.$layer.css("font-size",16*s/100+"px"):this.$layer.css("font-size",s+"%");for(var r=0;r<this.children.length;r++)this.children[r].onDeviceChange(e);this.placement.onDeviceChange(e),this.onAfterDeviceChange(e)}},s.prototype.onAfterDeviceChange=function(e){},s.prototype.onResize=function(e,t,i){if(this.isVisible||this.placement.alwaysResize){for(var s=0;s<this.children.length;s++)this.children[s].onResize(e,t,i);this.placement.onResize(e,t,i)}},s.prototype.getDevice=function(e,t){var s=this.$layer.data(this.device+e);return s!=i?s:"desktopportrait"!=this.device?this.$layer.data("desktopportrait"+e):t!==i?t:0},s.prototype.get=function(e){return this.$layer.data(e)},s.prototype.getParallaxNodes=function(){var e=[];if(this.isVisible){this.parallax&&e.push(this.$layer[0]);for(var t=0;t<this.children.length;t++)e.push.apply(e,this.children[t].getParallaxNodes())}return e},s.prototype.addWrap=function(t,s){if(this.wraps[t]===i){var r=e(s);switch(t){case"rotation":this.wraps.mask!==i?r.appendTo(this.wraps.mask):this.wraps.parallax!==i?r.appendTo(this.wraps.parallax):r.appendTo(this.$layer),r.append(this.getContents())}this.wraps[t]=r}return r},s.prototype.getContents=function(){return!1},s}),N2Require("FrontendPlacement",[],[],function(e,t,i){function s(e){this.layer=e,this.alwaysResize=!1}return s.prototype.start=function(){},s.prototype.onDeviceChange=function(e){},s.prototype.onResize=function(e,t,i){},s}),N2Require("FrontendSliderSlide",["FrontendComponentSlideAbstract"],[],function(e,t,i){function s(i,s,r){this.isStaticSlide=!1,this.originalIndex=r,this.index=r,this.localIndex=r,this.$element=s.
|
|